You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
11 KiB
1 lines
11 KiB
{"ast":null,"code":"import { VERTICAL } from './defaults.mjs';\nimport { buildProp, buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { mutable } from '../../../utils/typescript.mjs';\nconst itemSize = buildProp({\n type: definePropType([Number, Function]),\n required: true\n});\nconst estimatedItemSize = buildProp({\n type: Number\n});\nconst cache = buildProp({\n type: Number,\n default: 2\n});\nconst direction = buildProp({\n type: String,\n values: [\"ltr\", \"rtl\"],\n default: \"ltr\"\n});\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0\n});\nconst total = buildProp({\n type: Number,\n required: true\n});\nconst layout = buildProp({\n type: String,\n values: [\"horizontal\", \"vertical\"],\n default: VERTICAL\n});\nconst virtualizedProps = buildProps({\n className: {\n type: String,\n default: \"\"\n },\n containerElement: {\n type: definePropType([String, Object]),\n default: \"div\"\n },\n data: {\n type: definePropType(Array),\n default: () => mutable([])\n },\n direction,\n height: {\n type: [String, Number],\n required: true\n },\n innerElement: {\n type: [String, Object],\n default: \"div\"\n },\n style: {\n type: definePropType([Object, String, Array])\n },\n useIsScrolling: {\n type: Boolean,\n default: false\n },\n width: {\n type: [Number, String],\n required: false\n },\n perfMode: {\n type: Boolean,\n default: true\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false\n }\n});\nconst virtualizedListProps = buildProps({\n cache,\n estimatedItemSize,\n layout,\n initScrollOffset,\n total,\n itemSize,\n ...virtualizedProps\n});\nconst scrollbarSize = {\n type: Number,\n default: 6\n};\nconst startGap = {\n type: Number,\n default: 0\n};\nconst endGap = {\n type: Number,\n default: 2\n};\nconst virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType(Function),\n default: ({\n columnIndex,\n rowIndex\n }) => `${rowIndex}:${columnIndex}`\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n role: String,\n ...virtualizedProps\n});\nconst virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true\n },\n clientSize: {\n type: Number,\n required: true\n },\n scrollFrom: {\n type: Number,\n required: true\n },\n scrollbarSize,\n startGap,\n endGap,\n visible: Boolean\n});\nexport { virtualizedGridProps, virtualizedListProps, virtualizedProps, virtualizedScrollbarProps };","map":{"version":3,"names":["itemSize","buildProp","type","definePropType","Number","Function","required","estimatedItemSize","cache","default","direction","String","values","initScrollOffset","total","layout","VERTICAL","virtualizedProps","buildProps","className","containerElement","Object","data","Array","mutable","height","innerElement","style","useIsScrolling","Boolean","width","perfMode","scrollbarAlwaysOn","virtualizedListProps","scrollbarSize","startGap","endGap","virtualizedGridProps","columnCache","columnWidth","estimatedColumnWidth","estimatedRowHeight","initScrollLeft","initScrollTop","itemKey","columnIndex","rowIndex","rowCache","rowHeight","totalColumn","totalRow","hScrollbarSize","vScrollbarSize","scrollbarStartGap","scrollbarEndGap","role","virtualizedScrollbarProps","alwaysOn","class","ratio","clientSize","scrollFrom","visible"],"sources":["../../../../../../packages/components/virtual-list/src/props.ts"],"sourcesContent":["import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { GridItemKeyGetter, ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType<number | ItemSize>([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType<string | Element>([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType<any[]>(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n style: {\n type: definePropType<StyleValue>([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nconst scrollbarSize = {\n type: Number,\n default: 6,\n} as const\n\nconst startGap = { type: Number, default: 0 } as const\nconst endGap = { type: Number, default: 2 } as const\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType<GridItemKeyGetter>(Function),\n default: ({\n columnIndex,\n rowIndex,\n }: {\n columnIndex: number\n rowIndex: number\n }) => `${rowIndex}:${columnIndex}`,\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n role: String,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n scrollbarSize,\n startGap,\n endGap,\n\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes<typeof virtualizedProps>\nexport type VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"mappings":";;;AAOA,MAAMA,QAAQ,GAAGC,SAAS,CAAC;EACzBC,IAAI,EAAEC,cAAc,CAAC,CAACC,MAAM,EAAEC,QAAQ,CAAC,CAAC;EACxCC,QAAQ,EAAE;AACZ,CAAC,CAAC;AACF,MAAMC,iBAAiB,GAAGN,SAAS,CAAC;EAClCC,IAAI,EAAEE;AACR,CAAC,CAAC;AACF,MAAMI,KAAK,GAAGP,SAAS,CAAC;EACtBC,IAAI,EAAEE,MAAM;EACZK,OAAO,EAAE;AACX,CAAC,CAAC;AACF,MAAMC,SAAS,GAAGT,SAAS,CAAC;EAC1BC,IAAI,EAAES,MAAM;EACZC,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;EACtBH,OAAO,EAAE;AACX,CAAC,CAAC;AACF,MAAMI,gBAAgB,GAAGZ,SAAS,CAAC;EACjCC,IAAI,EAAEE,MAAM;EACZK,OAAO,EAAE;AACX,CAAC,CAAC;AACF,MAAMK,KAAK,GAAGb,SAAS,CAAC;EACtBC,IAAI,EAAEE,MAAM;EACZE,QAAQ,EAAE;AACZ,CAAC,CAAC;AACF,MAAM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