type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(resolve) => resolve(config) | Tellan/storybook | lib/core-common/src/presets.ts | TypeScript |
ArrowFunction |
(accumulationPromise: Promise<unknown>, { preset, options }) => {
const change = preset[extension];
if (!change) {
return accumulationPromise;
}
if (typeof change === 'function') {
const extensionFn = change;
const context = {
preset,
combinedOptions: { ...storybookO... | Tellan/storybook | lib/core-common/src/presets.ts | TypeScript |
ArrowFunction |
(newConfig) =>
extensionFn.call(context.preset, newConfig, context.combinedOptions) | Tellan/storybook | lib/core-common/src/presets.ts | TypeScript |
ArrowFunction |
(newConfig) => {
if (Array.isArray(newConfig) && Array.isArray(change)) {
return [...newConfig, ...change];
}
if (isObject(newConfig) && isObject(change)) {
return { ...newConfig, ...change };
}
return change;
} | Tellan/storybook | lib/core-common/src/presets.ts | TypeScript |
ArrowFunction |
async (extension: string, config: any, args = {}) =>
applyPresets(loadedPresets, extension, config, args, storybookOptions) | Tellan/storybook | lib/core-common/src/presets.ts | TypeScript |
TypeAliasDeclaration |
type InterPresetOptions = Omit<CLIOptions & LoadOptions & BuilderOptions, 'frameworkPresets'>; | Tellan/storybook | lib/core-common/src/presets.ts | TypeScript |
ArrowFunction |
series => {
let sort = series.stats[this.props.sort];
if (sort === null) {
sort = -Infinity;
}
return sort;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
(series: TimeSeries, event: any) => {
let hiddenSeries = { ...this.state.hiddenSeries };
if (event.ctrlKey || event.metaKey || event.shiftKey) {
if (hiddenSeries[series.alias]) {
delete hiddenSeries[series.alias];
} else {
hiddenSeries[series.alias] = true;
}
} else {
... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
value => {
if (value.alias === series.alias) {
return true;
}
return hiddenSeries[value.alias];
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
value => {
delete hiddenSeries[value.alias];
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
value => {
if (value.alias === series.alias) {
return;
}
hiddenSeries[value.alias] = true;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
series => !series.hideFromLegend(seriesHideProps) | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
(series, i) => (
<LegendItem
// This trick required because TimeSeries.id is not unique (it's just TimeSeries.alias).
// In future would be good to make id unique across the series list.
key={`${series.id}-${i}` | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
(stat: Sort) => {
let sortDesc = this.props.sortDesc;
let sortBy = this.props.sort;
if (stat !== sortBy) {
sortDesc = null;
}
// if already sort ascending, disable sorting
if (sortDesc === false) {
sortBy = null;
sortDesc = null;
} else {
sortDesc = !sortDesc;
... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
statName =>
seriesValuesProps[statName] && (
<LegendTableHeaderItem
key | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
(series, i) => (
<LegendItem
key={`${series.id}-${i}` | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ArrowFunction |
() => this.props.onClick(this.props.statName) | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ClassDeclaration |
export class GraphLegend extends PureComponent<GraphLegendProps, LegendState> {
static defaultProps: Partial<GraphLegendProps> = {
values: false,
min: false,
max: false,
avg: false,
current: false,
total: false,
alignAsTable: false,
rightSide: false,
sort: undefined,
sortDesc:... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ClassDeclaration |
class LegendSeriesList extends PureComponent<LegendComponentProps> {
render() {
const { seriesList, hiddenSeries, values, min, max, avg, current, total } = this.props;
const seriesValuesProps = { values, min, max, avg, current, total };
return seriesList.map((series, i) => (
<LegendItem
// ... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ClassDeclaration |
class LegendTable extends PureComponent<Partial<LegendComponentProps>> {
onToggleSort = (stat: Sort) => {
let sortDesc = this.props.sortDesc;
let sortBy = this.props.sort;
if (stat !== sortBy) {
sortDesc = null;
}
// if already sort ascending, disable sorting
if (sortDesc === false) {
... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ClassDeclaration |
class LegendTableHeaderItem extends PureComponent<LegendTableHeaderProps & LegendSortProps> {
onClick = () => this.props.onClick(this.props.statName);
render() {
const { statName, sort, sortDesc } = this.props;
return (
<th className="pointer" onClick={this.onClick}>
{statName}
{sort... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ClassDeclaration |
export class Legend extends PureComponent<GraphLegendProps> {
render() {
return (
<CustomScrollbar hideHorizontalTrack>
<GraphLegend {...this.props} />
</CustomScrollbar>
);
}
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendProps {
seriesList: TimeSeries[];
optionalClass?: string;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendEventHandlers {
onToggleSeries?: (hiddenSeries: any) => void;
onToggleSort?: (sortBy: any, sortDesc: any) => void;
onToggleAxis?: (series: TimeSeries) => void;
onColorChange?: (series: TimeSeries, color: string) => void;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendComponentEventHandlers {
onToggleSeries?: (series: TimeSeries, event: any) => void;
onToggleSort?: (sortBy: Sort, sortDesc: any) => void;
onToggleAxis?: (series: TimeSeries) => void;
onColorChange?: (series: TimeSeries, color: string) => void;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendDisplayProps {
hiddenSeries: any;
hideEmpty?: boolean;
hideZero?: boolean;
alignAsTable?: boolean;
rightSide?: boolean;
sideWidth?: number;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendValuesProps {
values?: boolean;
min?: boolean;
max?: boolean;
avg?: boolean;
current?: boolean;
total?: boolean;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendSortProps {
sort?: Sort;
sortDesc?: boolean;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendState {
hiddenSeries: { [seriesAlias: string]: boolean };
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
InterfaceDeclaration |
interface LegendTableHeaderProps {
statName: string;
onClick?: (statName: string) => void;
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
TypeAliasDeclaration |
type Sort = 'min' | 'max' | 'avg' | 'current' | 'total'; | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
TypeAliasDeclaration |
export type GraphLegendProps = LegendProps &
LegendDisplayProps &
LegendValuesProps &
LegendSortProps &
LegendEventHandlers; | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
TypeAliasDeclaration |
export type LegendComponentProps = LegendProps &
LegendDisplayProps &
LegendValuesProps &
LegendSortProps &
LegendComponentEventHandlers; | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
sortLegend() {
let seriesList: TimeSeries[] = [...this.props.seriesList] || [];
if (this.props.sort && this.props[this.props.sort] && this.props.alignAsTable) {
seriesList = _.sortBy(seriesList, series => {
let sort = series.stats[this.props.sort];
if (sort === null) {
sort = -I... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
toggleSeriesExclusiveMode(series: TimeSeries) {
const hiddenSeries = { ...this.state.hiddenSeries };
if (hiddenSeries[series.alias]) {
delete hiddenSeries[series.alias];
}
// check if every other series is hidden
const alreadyExclusive = this.props.seriesList.every(value => {
if (valu... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
render() {
const {
optionalClass,
rightSide,
sideWidth,
sort,
sortDesc,
hideEmpty,
hideZero,
values,
min,
max,
avg,
current,
total,
} = this.props;
const seriesValuesProps = { values, min, max, avg, current, total };
const hi... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
render() {
const { seriesList, hiddenSeries, values, min, max, avg, current, total } = this.props;
const seriesValuesProps = { values, min, max, avg, current, total };
return seriesList.map((series, i) => (
<LegendItem
// This trick required because TimeSeries.id is not unique (it's just Time... | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
render() {
const seriesList = this.props.seriesList;
const { values, min, max, avg, current, total, sort, sortDesc, hiddenSeries } = this.props;
const seriesValuesProps: any = { values, min, max, avg, current, total };
return (
<table>
<colgroup>
<col style={{ width: '100%' }} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
render() {
const { statName, sort, sortDesc } = this.props;
return (
<th className="pointer" onClick={this.onClick}>
{statName}
{sort === statName && <Icon name={sortDesc ? 'angle-down' : 'angle-up'} size="sm"/>}
</th>
);
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<CustomScrollbar hideHorizontalTrack>
<GraphLegend {...this.props} />
</CustomScrollbar>
);
} | genoka/datav | ui/src/plugins/built-in/panel/graph/Legend/Legend.tsx | TypeScript |
ClassDeclaration |
export class CertManagerChart extends Chart {
constructor() {
super(
'cert-manager',
new RemoteChart(
'cert-manager',
'v1.7.1',
'https://charts.jetstack.io',
),
GardenSystemNamespace,
);
}
publi... | schrodit/gardener-helm-installation | src/ts/components/charts/CertManagerChart.ts | TypeScript |
MethodDeclaration |
public async renderValues(values: GeneralValues): Promise<Values> {
return {
installCRDs: true,
};
} | schrodit/gardener-helm-installation | src/ts/components/charts/CertManagerChart.ts | TypeScript |
ArrowFunction |
() => {
let dateNow: Date;
let jwt: string;
beforeAll(async () => {
dateNow = new Date();
const jwtAuthenticationProvider = new JwtAuthenticationTokenProvider()
jwt = jwtAuthenticationProvider.generateToken("admin-id");
await prismaClient.$connect();
await prismaClient.users.create({
... | erickivel/E-commerce | services/AuthenticationService/tests/infra/serverless/EnsureAdmin.spec.ts | TypeScript |
ArrowFunction |
async () => {
dateNow = new Date();
const jwtAuthenticationProvider = new JwtAuthenticationTokenProvider()
jwt = jwtAuthenticationProvider.generateToken("admin-id");
await prismaClient.$connect();
await prismaClient.users.create({
data: {
id: "admin-id",
name: "Admin",
... | erickivel/E-commerce | services/AuthenticationService/tests/infra/serverless/EnsureAdmin.spec.ts | TypeScript |
ArrowFunction |
async () => {
await prismaClient.users.deleteMany();
await prismaClient.$disconnect();
} | erickivel/E-commerce | services/AuthenticationService/tests/infra/serverless/EnsureAdmin.spec.ts | TypeScript |
ArrowFunction |
async () => {
const event = {
headers: {
authorization: `Bearer ${jwt}`
}
};
const placeOrderServerless = await handle(event);
const expectedResponse = {
"isAuthorized": true,
"context": {
"user": {
"id": "admin-id",
"name": "Admin",
... | erickivel/E-commerce | services/AuthenticationService/tests/infra/serverless/EnsureAdmin.spec.ts | TypeScript |
ClassDeclaration |
export class User {
$key: string;
userName: string;
emailId: string;
password?: string;
location?: {
lat: number;
lon: number;
};
phoneNumber: string;
createdOn?: string;
isAdmin: boolean;
avatar?: string;
cart: []
} | joseguerra/yak-brake | src/app/shared/models/user.ts | TypeScript |
ClassDeclaration |
export class UserDetail {
$key: string;
firstName: string;
lastName: string;
userName: string;
email: string;
phone:string;
emailId: string;
address1: string;
address2: string;
country: string;
state: string;
zip: number;
} | joseguerra/yak-brake | src/app/shared/models/user.ts | TypeScript |
InterfaceDeclaration |
export interface JsonGenerator {
generateJson(schema: object): object;
getAddress(mask?: string): string;
getCnpj(useMask?: boolean): string;
getColor(): string;
getCpf(useMask?: boolean): string;
getFloat(min?: number, max?: number, decimals?: number): number;
g... | lucasrochagit/json-generator | index.d.ts | TypeScript |
FunctionDeclaration |
async function getTitleExcerpt(
k: string[],
type: "title" | "excerpt",
origin = false
) {
const { multipleTitles, multipleExcerpts } = self.globalProfile.copysearch
if (k.length === 0) return undefined
switch (type === "title" ? multipleTitles[0] : multipleExcerpts[0]) {
case MultipleTitlesExcerpt.All... | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
FunctionDeclaration |
function getCustomContent(node: MbBookNote) {
const { customContent } = self.globalProfile.copysearch
if (!customContent) return undefined
const template = reverseEscape(`${escapeDoubleQuote(customContent)}`, true)
return renderTemplateOfNodeProperties(node, template)
} | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
FunctionDeclaration |
export async function getContentofOneCard(node: MbBookNote, option: number) {
const titles = node.noteTitle?.split(/\s*[;;]\s*/) ?? []
const excerptText = getExcerptText(node, false).ocr
const customContent = getCustomContent(node)
switch (option) {
case WhichPartofCard.Title: {
const res =
(... | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
FunctionDeclaration |
export function getContentofMuiltCards(nodes: MbBookNote[], option: number) {
switch (option) {
case 0: {
const { multipleTitles } = self.globalProfile.copysearch
return nodes.reduce((acc, cur) => {
const t = cur.noteTitle
if (!t) return acc
if (multipleTitles[0] === MultipleT... | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
FunctionDeclaration |
export async function search(text: string, option: number) {
const {
searchAcademic,
searchChineseText,
searchEnglishText,
searchOtherText,
searchQuestion,
searchTranslation,
searchWord
} = self.globalProfile.copysearch
const searchEngine = [
searchChineseText,
searchEnglishTe... | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
ArrowFunction |
(acc, cur) => {
const t = cur.noteTitle
if (!t) return acc
if (multipleTitles[0] === MultipleTitlesExcerpt.First)
acc.push(t.split(/\s*[;;]\s*/)[0])
else acc.push(t)
return acc
} | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
ArrowFunction |
(acc, cur) => {
const l = getExcerptText(cur, false).ocr
if (!l.length) return acc
if (multipleTitles[0] === MultipleTitlesExcerpt.First) acc.push(l[0])
else acc.push(l.join("\n"))
return acc
} | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
ArrowFunction |
(acc, cur) => {
const t = getCustomContent(cur)
t && acc.push(t)
return acc
} | BryanHuang66/ohmymn | src/modules/copysearch/utils.ts | TypeScript |
InterfaceDeclaration |
export interface AddJobRepository {
save: (job: AddJobRepository.Params) => AddJobRepository.Result
} | ihurry-codespace/server | src/data/use-cases/interfaces/job/AddJobRepository.ts | TypeScript |
TypeAliasDeclaration |
export type Params = Omit<Job, 'id'> | ihurry-codespace/server | src/data/use-cases/interfaces/job/AddJobRepository.ts | TypeScript |
TypeAliasDeclaration |
export type Result = Promise<Job> | ihurry-codespace/server | src/data/use-cases/interfaces/job/AddJobRepository.ts | TypeScript |
ArrowFunction |
data => this.onSendValueChanged(data) | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ArrowFunction |
x => this.address = x.address | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ArrowFunction |
createColdStakingAccountResponse => {
this.stakingService.createColdStakingAccount(walletName, walletPassword, false)
.subscribe(() => {
setTimeout(() => {
this.getFirstUnusedAddress();
}, 2000);
});
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ArrowFunction |
() => {
setTimeout(() => {
this.getFirstUnusedAddress();
}, 2000);
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ArrowFunction |
() => {
this.getFirstUnusedAddress();
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ArrowFunction |
error => {
this.isSending = false;
this.apiError = error.error.errors[0].message;
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-create-hot',
templateUrl: './create-hot.component.html',
styleUrls: ['./create-hot.component.css']
})
export class ColdStakingCreateHotComponent {
feeTypes: FeeType[] = [];
selectedFeeType: FeeType;
public copyType: SelectItem[];
constructor(
private globalService: Global... | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
TypeAliasDeclaration |
type FeeType = { id: number, display: string, value: number }; | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
MethodDeclaration |
private buildSendForm(): void {
this.copyType = [
{ label: 'Copy', value: 'Copy', icon: 'pi pi-copy' }
];
this.sendForm = this.fb.group({
password: ['', Validators.required]
});
this.sendForm.valueChanges.pipe(debounceTime(300)).subscribe(data => this.onSendValueChanged(data));
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
MethodDeclaration |
private onSendValueChanged(data?: any) {
if (!this.sendForm) { return; }
const form = this.sendForm;
// tslint:disable-next-line:forin
for (const field in this.sendFormErrors) {
this.sendFormErrors[field] = '';
const control = form.get(field);
if (control && control.dirty && !control... | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
MethodDeclaration |
public onCopiedClick() {
this.addressCopied = true;
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
MethodDeclaration |
getFirstUnusedAddress() {
this.stakingService.getAddress(this.globalService.getWalletName(), false).subscribe(x => this.address = x.address);
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
MethodDeclaration |
public createAccount(): void {
this.isSending = true;
const walletName = this.globalService.getWalletName();
const walletPassword = this.sendForm.get('password').value;
this.stakingService.createColdStakingAccount(walletName, walletPassword, true)
.subscribe(
createColdStakingAccountResp... | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
MethodDeclaration |
onAcknowledge() {
this.acknowledgeWarning = true;
} | Bosco-2019/xCore | xCore.UI/src/app/wallet/cold-staking/create-hot/create-hot.component.ts | TypeScript |
ArrowFunction |
() => {
React.useEffect(() => {
incModCount();
}, []);
return <div>
I'm component Comp_05_0910
<div>
</div>
</div>;
} | FredKSchott/scale-test | src/components/Comp_05_0910.tsx | TypeScript |
ArrowFunction |
({ preview, options }) => (
<div ref={preview} | kubo550/dark-messenger-extention | src/popup/components/Preview/Preview.tsx | TypeScript |
ArrowFunction |
name => (
<PreviewElement key={name} | kubo550/dark-messenger-extention | src/popup/components/Preview/Preview.tsx | TypeScript |
InterfaceDeclaration |
export interface previewProps {
preview: MutableRefObject<any>;
options: optionInterface;
} | kubo550/dark-messenger-extention | src/popup/components/Preview/Preview.tsx | TypeScript |
TypeAliasDeclaration |
export type previewType = "Menu" | "Header" | "Info" | "Content" | "Input"; | kubo550/dark-messenger-extention | src/popup/components/Preview/Preview.tsx | TypeScript |
ArrowFunction |
() => ({
bordered: PropTypes.looseBool,
dataSource: PropTypes.array,
extra: PropTypes.any,
grid: { type: Object as PropType<ListGridType>, default: undefined as ListGridType },
itemLayout: String as PropType<ListItemLayout>,
loading: {
type: [Boolean, Object] as PropType<boolean | (SpinProps & HTMLAttr... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() =>
props.pagination && typeof props.pagination === 'object' ? props.pagination : {} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
if ('current' in paginationObj.value) {
paginationCurrent.value = paginationObj.value.current;
}
if ('pageSize' in paginationObj.value) {
paginationSize.value = paginationObj.value.pageSize;
}
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
(eventName: string) => (page: number, pageSize: number) => {
paginationCurrent.value = page;
paginationSize.value = pageSize;
if (paginationObj.value[eventName]) {
paginationObj.value[eventName](page, pageSize);
}
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
(page: number, pageSize: number) => {
paginationCurrent.value = page;
paginationSize.value = pageSize;
if (paginationObj.value[eventName]) {
paginationObj.value[eventName](page, pageSize);
}
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
(renderEmptyHandler: RenderEmptyHandler) => (
<div class={`${prefixCls.value}-empty-text` | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
if (typeof props.loading === 'boolean') {
return {
spinning: props.loading,
};
} else {
return props.loading;
}
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => loadingProp.value && loadingProp.value.spinning | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
let size = '';
switch (props.size) {
case 'large':
size = 'lg';
break;
case 'small':
size = 'sm';
break;
default:
break;
}
return size;
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => ({
[`${prefixCls.value}`]: true,
[`${prefixCls.value}-vertical`]: props.itemLayout === 'vertical',
[`${prefixCls.value}-${sizeCls.value}`]: sizeCls.value,
[`${prefixCls.value}-split`]: props.split,
[`${prefixCls.value}-bordered`]: props.bordered,
[`${prefixCls.value}-loading`]... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
const pp = {
...defaultPaginationProps,
total: props.dataSource.length,
current: paginationCurrent.value,
pageSize: paginationSize.value,
...((props.pagination as PaginationConfig) || {}),
};
const largestPage = Math.ceil(pp.total / pp.pageSize);
... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
let dd = [...props.dataSource];
if (props.pagination) {
if (
props.dataSource.length >
(paginationProps.value.current - 1) * paginationProps.value.pageSize
) {
dd = [...props.dataSource].splice(
(paginationProps.value.current - 1) * paginati... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
for (let i = 0; i < responsiveArray.length; i += 1) {
const breakpoint: Breakpoint = responsiveArray[i];
if (screens.value[breakpoint]) {
return breakpoint;
}
}
return undefined;
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
if (!props.grid) {
return undefined;
}
const columnCount =
currentBreakpoint.value && props.grid[currentBreakpoint.value]
? props.grid[currentBreakpoint.value]
: props.grid.column;
if (columnCount) {
return {
width: `${100 / columnCo... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
(item: any, index: number) => {
const renderItem = props.renderItem ?? slots.renderItem;
if (!renderItem) return null;
let key;
const rowKeyType = typeof props.rowKey;
if (rowKeyType === 'function') {
key = (props.rowKey as any)(item);
} else if (rowKeyType === 'string' || ... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
() => {
const loadMore = props.loadMore ?? slots.loadMore?.();
const footer = props.footer ?? slots.footer?.();
const header = props.header ?? slots.header?.();
const children = flattenChildren(slots.default?.());
const isSomethingAfterLastItem = !!(loadMore || props.pagination || footer)... | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
(item: any, index: number) =>
renderInnerItem(item, index) | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
ArrowFunction |
(child: any, index) => (
<div key={listItemsKeys[index]} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
InterfaceDeclaration |
export interface ListGridType {
gutter?: number;
column?: ColumnCount;
xs?: ColumnCount;
sm?: ColumnCount;
md?: ColumnCount;
lg?: ColumnCount;
xl?: ColumnCount;
xxl?: ColumnCount;
xxxl?: ColumnCount;
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
InterfaceDeclaration |
export interface ListLocale {
emptyText: any;
} | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
TypeAliasDeclaration |
export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl'; | AylaAsia-zhaopan/ant-design-vue | components/list/index.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.