orion-design 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/README.md +5 -5
  2. package/dist/components/Button/index.js +11 -10
  3. package/dist/components/Button/index.js.map +1 -1
  4. package/dist/components/Form/FileInput/FileInput.vue.d.ts +1 -1
  5. package/dist/components/Form/hooks/FormItemValidateTrigger.d.ts +15 -0
  6. package/dist/components/Form/hooks/FormItemValidateTrigger.js +18 -0
  7. package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -0
  8. package/dist/components/Form/hooks/index.d.ts +10 -0
  9. package/dist/components/Form/hooks/index.js +83 -0
  10. package/dist/components/Form/hooks/index.js.map +1 -0
  11. package/dist/components/Form/index.js +180 -182
  12. package/dist/components/Form/index.js.map +1 -1
  13. package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +7 -7
  14. package/dist/components/Pagetable/index.js +182 -180
  15. package/dist/components/Pagetable/index.js.map +1 -1
  16. package/dist/components/Pagetable/utils/index.js +82 -82
  17. package/dist/components/Pagetable/utils/index.js.map +1 -1
  18. package/dist/components/_util/arrays.js.map +1 -1
  19. package/dist/components/_util/browser.js.map +1 -1
  20. package/dist/components/_util/dom/aria.js.map +1 -1
  21. package/dist/components/_util/dom/element.js.map +1 -1
  22. package/dist/components/_util/dom/event.js.map +1 -1
  23. package/dist/components/_util/dom/position.js.map +1 -1
  24. package/dist/components/_util/dom/scroll.js.map +1 -1
  25. package/dist/components/_util/dom/style.js.map +1 -1
  26. package/dist/components/_util/easings.js.map +1 -1
  27. package/dist/components/_util/error.js.map +1 -1
  28. package/dist/components/_util/i18n.js.map +1 -1
  29. package/dist/components/_util/objects.js.map +1 -1
  30. package/dist/components/_util/raf.js.map +1 -1
  31. package/dist/components/_util/rand.js.map +1 -1
  32. package/dist/components/_util/strings.js.map +1 -1
  33. package/dist/components/_util/throttleByRaf.js.map +1 -1
  34. package/dist/components/_util/types.js.map +1 -1
  35. package/dist/components/_util/typescript.js.map +1 -1
  36. package/dist/components/_util/vue/global-node.js.map +1 -1
  37. package/dist/components/_util/vue/icon.js.map +1 -1
  38. package/dist/components/_util/vue/install.js.map +1 -1
  39. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  40. package/dist/components/_util/vue/refs.js.map +1 -1
  41. package/dist/components/_util/vue/size.js.map +1 -1
  42. package/dist/components/_util/vue/validator.js.map +1 -1
  43. package/dist/components/_util/vue/vnode.js.map +1 -1
  44. package/dist/index.css +1 -1
  45. package/dist/version/version.d.ts +1 -1
  46. package/dist/version/version.js +1 -1
  47. package/dist/version/version.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/components/Form/hooks/useForm.d.ts +0 -10
  50. package/dist/components/Form/hooks/useForm.js +0 -82
  51. package/dist/components/Form/hooks/useForm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Pagetable/Pagetable.tsx","../../../src/components/Pagetable/columns/PagetableColumnIndex.tsx","../../../src/components/Pagetable/columns/PagetableColumnString.tsx","../../../src/components/Pagetable/columns/PagetableColumnNumber.tsx","../../../src/components/Pagetable/columns/PagetableColumnDate.tsx","../../../src/components/Pagetable/columns/PagetableColumnSingleselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnMultiselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnButtongroup.tsx","../../../src/components/Pagetable/columns/PagetableCellButton.tsx","../../../src/components/Pagetable/columns/PagetableColumngroup.tsx","../../../src/components/Pagetable/columns/PagetableColumnDiy.tsx","../../../src/components/Pagetable/index.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../_util/classNames'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport { formatDate, number2string, getSingleCodeContent, getMultiCodeContent } from './utils'\r\nimport dayjs from 'dayjs'\r\n\r\nimport Space from '../Space'\r\nimport OrionError from '../../error/OrionError'\r\n\r\nimport type { PageTableI } from './interface'\r\n\r\nimport useColumns from './hooks/useColumns'\r\n\r\nimport Throne from '../../Throne'\r\n\r\nexport const pagetableProps = () => ({\r\n data: arrayType<PageTableI['data']>(),\r\n pagination: objectType<PageTableI['pagination']>(),\r\n showRowNumber: booleanType(true),\r\n selectionMode: booleanType(false),\r\n})\r\n\r\nexport type PagetableProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetable',\r\n inheritAttrs: false,\r\n props: pagetableProps(),\r\n emits: ['selectionChange'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const elTableRef = ref()\r\n\r\n const style = computed(() => {\r\n const rowStyle: CSSProperties = {}\r\n\r\n return rowStyle\r\n })\r\n\r\n const columns = useColumns(slots)\r\n\r\n const clearSelection = () => {\r\n elTableRef.value.clearSelection()\r\n }\r\n\r\n const getSelectionRows = () => {\r\n return elTableRef.value.getSelectionRows()\r\n }\r\n\r\n const toggleRowSelection = (...args) => {\r\n return elTableRef.value.toggleRowSelection(...args)\r\n }\r\n\r\n const toggleAllSelection = () => {\r\n return elTableRef.value.toggleAllSelection()\r\n }\r\n\r\n expose({\r\n clearSelection,\r\n getSelectionRows,\r\n toggleRowSelection,\r\n toggleAllSelection,\r\n })\r\n\r\n return () => {\r\n const { data } = props\r\n const { selectionMode = false } = props\r\n const { pagination } = props\r\n const { showRowNumber = true } = props\r\n\r\n const cn = classNames('orion-pagetbale')\r\n\r\n const renderIndexColumn = () => {\r\n return (\r\n <ElTableColumn\r\n type={'index'}\r\n label=\"No\"\r\n width={56}\r\n showOverflowTooltip={true}\r\n index={(index: number) => {\r\n return (pagination.currentPage - 1) * pagination.pageSize + index + 1\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSelectionColumn = () => {\r\n return <ElTableColumn type={'selection'} width={40}></ElTableColumn>\r\n }\r\n\r\n const renderStringColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n return <ElTableColumn label={head} headerAlign={headAlign} prop={name} width={width} fixed={fixed} showOverflowTooltip={true}></ElTableColumn>\r\n }\r\n\r\n const renderNumberColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { thousandsSeparator = true, precision = -1, percentage = false } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={'right'}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n return <span class=\"cell-numbercolumn\">{number2string(row[column.property], thousandsSeparator, precision, percentage)}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDateColumn = (column) => {\r\n const { name, head, headAlign, width, fixed, sourceFormat, format } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n\r\n if (sourceFormat && format) {\r\n return (\r\n <div>\r\n {row[column.property] instanceof Date || dayjs.isDayjs(row[column.property])\r\n ? formatDate(row[column.property], format)\r\n : formatDate(row[column.property], sourceFormat, format)}\r\n </div>\r\n )\r\n } else {\r\n return <div>{row[column.property]}</div>\r\n }\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSingleSelectColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getSingleCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getSingleCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-singleselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderMultiSelectColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getMultiCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getMultiCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-multiselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderButtongroupColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return (\r\n <div class=\"cell-buttongroup\">\r\n <Space>{children}</Space>\r\n </div>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumngroupColumn = (column) => {\r\n const { head, headAlign } = column\r\n const { children } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n v-slots={{\r\n default: (scope) => {\r\n return renderColumns(children)\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDiyColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return <div class=\"cell-diy\">{children} </div>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumns = (columns) => {\r\n return columns?.map((c) => {\r\n if (c.type === 'OPagetableColumnString') {\r\n return renderStringColumn(c)\r\n } else if (c.type === 'OPagetableColumnNumber') {\r\n return renderNumberColumn(c)\r\n } else if (c.type === 'OPagetableColumnDate') {\r\n return renderDateColumn(c)\r\n } else if (c.type === 'OPagetableColumnSingleselect') {\r\n return renderSingleSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnMultiselect') {\r\n return renderMultiSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnButtongroup') {\r\n return renderButtongroupColumn(c)\r\n } else if (c.type === 'OPagetableColumngroup') {\r\n return renderColumngroupColumn(c)\r\n } else if (c.type === 'OPagetableColumnDiy') {\r\n return renderDiyColumn(c)\r\n } else {\r\n throw new OrionError(`OPagetable不能正确渲染'${c.type.name}'子组件。`)\r\n }\r\n })\r\n }\r\n\r\n return (\r\n <div class={[cn, attrs.class]} style={[style.value, attrs.style as CSSProperties]}>\r\n <div class=\"pagetable-wrapper\">\r\n <ElTable ref={elTableRef} data={data} height={'100%'} style={{ width: '100%' }} onSelection-change={(rows) => emit('selectionChange', rows)}>\r\n {showRowNumber && renderIndexColumn()}\r\n {selectionMode && renderSelectionColumn()}\r\n {renderColumns(columns.value)}\r\n </ElTable>\r\n </div>\r\n\r\n <div class=\"pagination-wrapper\">\r\n <ElPagination\r\n currentPage={pagination.currentPage}\r\n onUpdate:current-page={(e) => {\r\n emit('update:pagination', {\r\n ...pagination,\r\n currentPage: e,\r\n })\r\n }}\r\n pageSize={pagination.pageSize}\r\n total={pagination.total}\r\n layout=\"total, ->, prev, pager, next, jumper\"\r\n ></ElPagination>\r\n </div>\r\n </div>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnIndexProps = () => ({})\r\n\r\nexport type PagetableColumnIndexProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnIndexProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnIndex',\r\n inheritAttrs: false,\r\n props: pagetableColumnIndexProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnStringProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnStringProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnStringProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnString',\r\n inheritAttrs: false,\r\n props: pagetableColumnStringProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, numberType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnNumberProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n thousandsSeparator: booleanType(true),\r\n precision: numberType(-1),\r\n percentage: booleanType(false),\r\n})\r\n\r\nexport type PagetableColumnNumberProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnNumberProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnNumber',\r\n inheritAttrs: false,\r\n props: pagetableColumnNumberProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDateProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n // Date\r\n format: stringType(),\r\n sourceFormat: stringType(),\r\n})\r\n\r\nexport type PagetableColumnDateProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDateProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDate',\r\n inheritAttrs: false,\r\n props: pagetableColumnDateProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnSingleselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnSingleselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnSingleselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnSingleselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnSingleselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnMultiselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnMultiselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnMultiselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnMultiselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnMultiselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnButtongroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnButtongroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnButtongroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnButtongroup',\r\n inheritAttrs: false,\r\n props: pagetableColumnButtongroupProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableCellButtonProps = () => ({\r\n type: stringType('primary'),\r\n})\r\n\r\nexport type PagetableCellButtonProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableCellButtonProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableCellButton',\r\n inheritAttrs: false,\r\n props: pagetableCellButtonProps(),\r\n emits: ['click'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const handleClick = (event: Event) => {\r\n emit('click', event)\r\n }\r\n\r\n return () => {\r\n const { type = 'primary' } = props\r\n const children = slots.default?.()\r\n\r\n return (\r\n <ElButton link type={type} size=\"small\" onClick={handleClick}>\r\n {children}\r\n </ElButton>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumngroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n})\r\n\r\nexport type PagetableColumngroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumngroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumngroup',\r\n inheritAttrs: false,\r\n props: pagetableColumngroupProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDiyProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnDiyProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDiyProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDiy',\r\n inheritAttrs: false,\r\n props: pagetableColumnDiyProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { withInstall } from '../_util'\r\n\r\nimport Pagetable from './Pagetable'\r\nimport PagetableColumnIndex from './columns/PagetableColumnIndex'\r\nimport PagetableColumnString from './columns/PagetableColumnString'\r\nimport PagetableColumnNumber from './columns/PagetableColumnNumber'\r\nimport PagetableColumnDate from './columns/PagetableColumnDate'\r\nimport PagetableColumnSingleselect from './columns/PagetableColumnSingleselect'\r\nimport PagetableColumnMultiselect from './columns/PagetableColumnMultiselect'\r\nimport PagetableColumnButtongroup from './columns/PagetableColumnButtongroup'\r\nimport PagetableCellButton from './columns/PagetableCellButton'\r\nimport PagetableColumngroup from './columns/PagetableColumngroup'\r\nimport PagetableColumnDiy from './columns/PagetableColumnDiy'\r\n\r\nexport type { PagetableProps } from './Pagetable'\r\n\r\nexport default withInstall<\r\n typeof Pagetable,\r\n {\r\n PagetableColumnIndex: typeof PagetableColumnIndex\r\n PagetableColumnString: typeof PagetableColumnString\r\n PagetableColumnNumber: typeof PagetableColumnNumber\r\n PagetableColumnDate: typeof PagetableColumnDate\r\n PagetableColumnSingleselect: typeof PagetableColumnSingleselect\r\n PagetableColumnMultiselect: typeof PagetableColumnMultiselect\r\n PagetableColumnButtongroup: typeof PagetableColumnButtongroup\r\n PagetableCellButton: typeof PagetableCellButton\r\n PagetableColumngroup: typeof PagetableColumngroup\r\n PagetableColumnDiy: typeof PagetableColumnDiy\r\n }\r\n>(Pagetable, {\r\n PagetableColumnIndex,\r\n PagetableColumnString,\r\n PagetableColumnNumber,\r\n PagetableColumnDate,\r\n PagetableColumnSingleselect,\r\n PagetableColumnMultiselect,\r\n PagetableColumnButtongroup,\r\n PagetableCellButton,\r\n PagetableColumngroup,\r\n PagetableColumnDiy,\r\n})\r\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","pagetableProps","data","arrayType","pagination","objectType","showRowNumber","booleanType","selectionMode","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","columns","useColumns","clearSelection","value","getSelectionRows","toggleRowSelection","args","toggleAllSelection","cn","classNames","renderIndexColumn","_createVNode","ElTableColumn","index","currentPage","pageSize","renderSelectionColumn","renderStringColumn","column","head","headAlign","width","fixed","renderNumberColumn","thousandsSeparator","precision","percentage","default","scope","row","number2string","property","renderDateColumn","sourceFormat","format","Date","dayjs","isDayjs","formatDate","renderSingleSelectColumn","code","cellValue","codeName","codeData","codeContent","Throne","getCode","getSingleCodeContent","renderMultiSelectColumn","getMultiCodeContent","renderButtongroupColumn","children","rowData","rowIndex","$index","Space","renderColumngroupColumn","renderColumns","renderDiyColumn","_createTextVNode","map","c","type","OrionError","class","ElTable","rows","ElPagination","e","total","pagetableColumnIndexProps","pagetableColumnStringProps","stringType","someType","Boolean","String","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","event","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","withInstall","Pagetable","PagetableColumnIndex","PagetableColumnString","PagetableColumnNumber","PagetableColumnDate","PagetableColumnSingleselect","PagetableColumnMultiselect","PagetableColumnButtongroup","PagetableCellButton","PagetableColumngroup","PagetableColumnDiy"],"mappings":";;;;;;;;;;;;AAgBiC,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAE1B,MAAMM,KAAiBA,OAAO;AAAA,EACnCC,MAAMC,GAA+B;AAAA,EACrCC,YAAYC,GAAsC;AAAA,EAClDC,eAAeC,EAAY,EAAI;AAAA,EAC/BC,eAAeD,EAAY,EAAK;AAClC,IAIeE,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOX,GAAgB;AAAA,EACvBY,OAAO,CAAC,iBAAiB;AAAA,EACzBC,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,UAAMC,IAAaC,KAEbC,IAAQC,EAAS,OACW,CAAA,EAGjC,GAEKC,IAAUC,GAAWT,CAAK;AAkBhCG,WAAAA,EAAO;AAAA,MACLO,gBAjBqBA,MAAM;AAC3BN,QAAAA,EAAWO,MAAMD;;MAiBjBE,kBAduBA,MAChBR,EAAWO,MAAMC;MAcxBC,oBAXyBA,IAAIC,MACtBV,EAAWO,MAAME,mBAAmB,GAAGC,CAAI;AAAA,MAWlDC,oBARyBA,MAClBX,EAAWO,MAAMI;IAQ1B,CAAC,GAEM,MAAM;AACX,YAAM;AAAA,QAAE5B,MAAAA;AAAAA,MAAM,IAAGU,GACX;AAAA,QAAEJ,eAAAA,IAAgB;AAAA,MAAO,IAAGI,GAC5B;AAAA,QAAER,YAAAA;AAAAA,MAAY,IAAGQ,GACjB;AAAA,QAAEN,eAAAA,IAAgB;AAAA,MAAM,IAAGM,GAE3BmB,IAAKC,GAAW,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GAAyB;AAAA,EAChChG,OAAOnB;AAAAA,EAGPkB,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCbckB,KAAA4E,EAcbC,IAAW;AAAA,EACX,sBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,6BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,oBAAAC;AACF,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Pagetable/Pagetable.tsx","../../../src/components/Pagetable/columns/PagetableColumnIndex.tsx","../../../src/components/Pagetable/columns/PagetableColumnString.tsx","../../../src/components/Pagetable/columns/PagetableColumnNumber.tsx","../../../src/components/Pagetable/columns/PagetableColumnDate.tsx","../../../src/components/Pagetable/columns/PagetableColumnSingleselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnMultiselect.tsx","../../../src/components/Pagetable/columns/PagetableColumnButtongroup.tsx","../../../src/components/Pagetable/columns/PagetableCellButton.tsx","../../../src/components/Pagetable/columns/PagetableColumngroup.tsx","../../../src/components/Pagetable/columns/PagetableColumnDiy.tsx","../../../src/components/Pagetable/index.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../_util/classNames'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport { formatDate, number2string, getSingleCodeContent, getMultiCodeContent } from './utils'\r\nimport dayjs from 'dayjs'\r\n\r\nimport Space from '../Space'\r\nimport OrionError from '../../error/OrionError'\r\n\r\nimport type { PageTableI } from './interface'\r\n\r\nimport useColumns from './hooks/useColumns'\r\n\r\nimport Throne from '../../Throne'\r\n\r\nexport const pagetableProps = () => ({\r\n data: arrayType<PageTableI['data']>(),\r\n pagination: objectType<PageTableI['pagination']>(),\r\n showRowNumber: booleanType(true),\r\n selectionMode: booleanType(false),\r\n})\r\n\r\nexport type PagetableProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetable',\r\n inheritAttrs: false,\r\n props: pagetableProps(),\r\n emits: ['selectionChange'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const elTableRef = ref()\r\n\r\n const style = computed(() => {\r\n const rowStyle: CSSProperties = {}\r\n\r\n return rowStyle\r\n })\r\n\r\n const columns = useColumns(slots)\r\n\r\n const clearSelection = () => {\r\n elTableRef.value.clearSelection()\r\n }\r\n\r\n const getSelectionRows = () => {\r\n return elTableRef.value.getSelectionRows()\r\n }\r\n\r\n const toggleRowSelection = (...args) => {\r\n return elTableRef.value.toggleRowSelection(...args)\r\n }\r\n\r\n const toggleAllSelection = () => {\r\n return elTableRef.value.toggleAllSelection()\r\n }\r\n\r\n expose({\r\n clearSelection,\r\n getSelectionRows,\r\n toggleRowSelection,\r\n toggleAllSelection,\r\n })\r\n\r\n return () => {\r\n const { data } = props\r\n const { selectionMode = false } = props\r\n const { pagination } = props\r\n const { showRowNumber = true } = props\r\n\r\n const cn = classNames('orion-pagetbale')\r\n\r\n const renderIndexColumn = () => {\r\n return (\r\n <ElTableColumn\r\n type={'index'}\r\n label=\"No\"\r\n width={56}\r\n fixed={'left'}\r\n showOverflowTooltip={true}\r\n index={(index: number) => {\r\n return (pagination.currentPage - 1) * pagination.pageSize + index + 1\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSelectionColumn = () => {\r\n return <ElTableColumn type={'selection'} width={40} fixed={'left'}></ElTableColumn>\r\n }\r\n\r\n const renderStringColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n return <ElTableColumn label={head} headerAlign={headAlign} prop={name} width={width} fixed={fixed} showOverflowTooltip={true}></ElTableColumn>\r\n }\r\n\r\n const renderNumberColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { thousandsSeparator = true, precision = -1, percentage = false } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n align={'right'}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n return (\r\n <span class=\"cell-numbercolumn\">\r\n {number2string(row[column.property], thousandsSeparator, precision, percentage === true || percentage === '')}\r\n </span>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDateColumn = (column) => {\r\n const { name, head, headAlign, width, fixed, sourceFormat, format = 'YYYYMMDDHHmmss' } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n if (cellValue instanceof Date || dayjs.isDayjs(cellValue)) {\r\n return <div>{formatDate(cellValue, format)}</div>\r\n } else {\r\n if (sourceFormat && format) {\r\n return <div>{formatDate(cellValue, sourceFormat, format)}</div>\r\n } else {\r\n return <div>{cellValue}</div>\r\n }\r\n }\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderSingleSelectColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getSingleCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getSingleCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-singleselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderMultiSelectColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n const { code } = column\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n showOverflowTooltip={true}\r\n v-slots={{\r\n default: (scope) => {\r\n const { row, column } = scope\r\n const cellValue = row[column.property]\r\n\r\n let codeName, codeData, codeContent\r\n if (!code) {\r\n codeContent = null\r\n } else if (typeof code === 'string') {\r\n codeName = code\r\n codeData = Throne.getCode(codeName)\r\n codeContent = getMultiCodeContent(codeData.value, cellValue)\r\n } else {\r\n codeData = code\r\n codeContent = getMultiCodeContent(codeData, cellValue)\r\n }\r\n\r\n return <span class=\"cell-multiselect\">{codeContent}</span>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderButtongroupColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return (\r\n <div class=\"cell-buttongroup\">\r\n <Space>{children}</Space>\r\n </div>\r\n )\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumngroupColumn = (column) => {\r\n const { head, headAlign } = column\r\n const { children } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n v-slots={{\r\n default: (scope) => {\r\n return renderColumns(children)\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderDiyColumn = (column) => {\r\n const { name, head, headAlign, width, fixed } = column\r\n\r\n return (\r\n <ElTableColumn\r\n label={head}\r\n headerAlign={headAlign}\r\n prop={name}\r\n width={width}\r\n fixed={fixed}\r\n v-slots={{\r\n default: (scope) => {\r\n // { row: any, column: any, $index: number }\r\n const children = column.children?.default?.({\r\n rowData: scope.row,\r\n column,\r\n rowIndex: scope.$index,\r\n })\r\n\r\n return <div class=\"cell-diy\">{children} </div>\r\n },\r\n }}\r\n ></ElTableColumn>\r\n )\r\n }\r\n\r\n const renderColumns = (columns) => {\r\n return columns?.map((c) => {\r\n if (c.type === 'OPagetableColumnString') {\r\n return renderStringColumn(c)\r\n } else if (c.type === 'OPagetableColumnNumber') {\r\n return renderNumberColumn(c)\r\n } else if (c.type === 'OPagetableColumnDate') {\r\n return renderDateColumn(c)\r\n } else if (c.type === 'OPagetableColumnSingleselect') {\r\n return renderSingleSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnMultiselect') {\r\n return renderMultiSelectColumn(c)\r\n } else if (c.type === 'OPagetableColumnButtongroup') {\r\n return renderButtongroupColumn(c)\r\n } else if (c.type === 'OPagetableColumngroup') {\r\n return renderColumngroupColumn(c)\r\n } else if (c.type === 'OPagetableColumnDiy') {\r\n return renderDiyColumn(c)\r\n } else {\r\n throw new OrionError(`OPagetable不能正确渲染'${c.type.name}'子组件。`)\r\n }\r\n })\r\n }\r\n\r\n return (\r\n <div class={[cn, attrs.class]} style={[style.value, attrs.style as CSSProperties]}>\r\n <div class=\"pagetable-wrapper\">\r\n <ElTable ref={elTableRef} data={data} height={'100%'} style={{ width: '100%' }} onSelection-change={(rows) => emit('selectionChange', rows)}>\r\n {showRowNumber && renderIndexColumn()}\r\n {selectionMode && renderSelectionColumn()}\r\n {renderColumns(columns.value)}\r\n </ElTable>\r\n </div>\r\n\r\n <div class=\"pagination-wrapper\">\r\n <ElPagination\r\n currentPage={pagination.currentPage}\r\n onUpdate:current-page={(e) => {\r\n emit('update:pagination', {\r\n ...pagination,\r\n currentPage: e,\r\n })\r\n }}\r\n pageSize={pagination.pageSize}\r\n total={pagination.total}\r\n layout=\"total, ->, prev, pager, next, jumper\"\r\n ></ElPagination>\r\n </div>\r\n </div>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnIndexProps = () => ({})\r\n\r\nexport type PagetableColumnIndexProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnIndexProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnIndex',\r\n inheritAttrs: false,\r\n props: pagetableColumnIndexProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnStringProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnStringProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnStringProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnString',\r\n inheritAttrs: false,\r\n props: pagetableColumnStringProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, numberType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnNumberProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n thousandsSeparator: booleanType(true),\r\n precision: numberType(-1),\r\n percentage: booleanType(false),\r\n})\r\n\r\nexport type PagetableColumnNumberProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnNumberProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnNumber',\r\n inheritAttrs: false,\r\n props: pagetableColumnNumberProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDateProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n // Date\r\n format: stringType(),\r\n sourceFormat: stringType(),\r\n})\r\n\r\nexport type PagetableColumnDateProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDateProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDate',\r\n inheritAttrs: false,\r\n props: pagetableColumnDateProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnSingleselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnSingleselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnSingleselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnSingleselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnSingleselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnMultiselectProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n\r\n code: someType<string | { value: string; content: string }[]>([String, Array]),\r\n})\r\n\r\nexport type PagetableColumnMultiselectProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnMultiselectProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnMultiselect',\r\n inheritAttrs: false,\r\n props: pagetableColumnMultiselectProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnButtongroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnButtongroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnButtongroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnButtongroup',\r\n inheritAttrs: false,\r\n props: pagetableColumnButtongroupProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableCellButtonProps = () => ({\r\n type: stringType(),\r\n})\r\n\r\nexport type PagetableCellButtonProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableCellButtonProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableCellButton',\r\n inheritAttrs: false,\r\n props: pagetableCellButtonProps(),\r\n emits: ['click'],\r\n setup(props, { slots, attrs, emit, expose }) {\r\n const handleClick = (event: Event) => {\r\n emit('click', event)\r\n }\r\n\r\n return () => {\r\n const { type } = props\r\n const children = slots.default?.()\r\n\r\n return (\r\n <ElButton link type={type} size=\"small\" onClick={handleClick}>\r\n {children}\r\n </ElButton>\r\n )\r\n }\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType } from '../../_util/type'\r\nimport { ElButton } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumngroupProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n})\r\n\r\nexport type PagetableColumngroupProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumngroupProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumngroup',\r\n inheritAttrs: false,\r\n props: pagetableColumngroupProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { computed, defineComponent } from 'vue'\r\nimport type { PropType, ExtractPropTypes, CSSProperties, Plugin, App } from 'vue'\r\nimport classNames from '../../_util/classNames'\r\nimport OrionError from '../../../error/OrionError'\r\nimport { anyType, booleanType, functionType, objectType, someType, stringType, tuple, arrayType, CustomSlotsType } from '../../_util/type'\r\nimport { ElTable, ElTableColumn, ElPagination } from 'element-plus'\r\n\r\nimport type { PageTableI, FixedType } from '../interface'\r\n\r\nexport const pagetableColumnDiyProps = () => ({\r\n head: stringType(),\r\n headAlign: stringType<'left' | 'right' | 'center'>(),\r\n name: stringType(),\r\n width: someType<boolean | string>([Boolean, String]),\r\n fixed: someType<FixedType>([Boolean, String]),\r\n})\r\n\r\nexport type PagetableColumnDiyProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableColumnDiyProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableColumnDiy',\r\n inheritAttrs: false,\r\n props: pagetableColumnDiyProps(),\r\n slots: Object as CustomSlotsType<{\r\n default: any\r\n }>,\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { withInstall } from '../_util'\r\n\r\nimport Pagetable from './Pagetable'\r\nimport PagetableColumnIndex from './columns/PagetableColumnIndex'\r\nimport PagetableColumnString from './columns/PagetableColumnString'\r\nimport PagetableColumnNumber from './columns/PagetableColumnNumber'\r\nimport PagetableColumnDate from './columns/PagetableColumnDate'\r\nimport PagetableColumnSingleselect from './columns/PagetableColumnSingleselect'\r\nimport PagetableColumnMultiselect from './columns/PagetableColumnMultiselect'\r\nimport PagetableColumnButtongroup from './columns/PagetableColumnButtongroup'\r\nimport PagetableCellButton from './columns/PagetableCellButton'\r\nimport PagetableColumngroup from './columns/PagetableColumngroup'\r\nimport PagetableColumnDiy from './columns/PagetableColumnDiy'\r\n\r\nexport type { PagetableProps } from './Pagetable'\r\n\r\nexport default withInstall<\r\n typeof Pagetable,\r\n {\r\n PagetableColumnIndex: typeof PagetableColumnIndex\r\n PagetableColumnString: typeof PagetableColumnString\r\n PagetableColumnNumber: typeof PagetableColumnNumber\r\n PagetableColumnDate: typeof PagetableColumnDate\r\n PagetableColumnSingleselect: typeof PagetableColumnSingleselect\r\n PagetableColumnMultiselect: typeof PagetableColumnMultiselect\r\n PagetableColumnButtongroup: typeof PagetableColumnButtongroup\r\n PagetableCellButton: typeof PagetableCellButton\r\n PagetableColumngroup: typeof PagetableColumngroup\r\n PagetableColumnDiy: typeof PagetableColumnDiy\r\n }\r\n>(Pagetable, {\r\n PagetableColumnIndex,\r\n PagetableColumnString,\r\n PagetableColumnNumber,\r\n PagetableColumnDate,\r\n PagetableColumnSingleselect,\r\n PagetableColumnMultiselect,\r\n PagetableColumnButtongroup,\r\n PagetableCellButton,\r\n PagetableColumngroup,\r\n PagetableColumnDiy,\r\n})\r\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","pagetableProps","data","arrayType","pagination","objectType","showRowNumber","booleanType","selectionMode","defineComponent","name","inheritAttrs","props","emits","setup","slots","attrs","emit","expose","elTableRef","ref","style","computed","columns","useColumns","clearSelection","value","getSelectionRows","toggleRowSelection","args","toggleAllSelection","cn","classNames","renderIndexColumn","_createVNode","ElTableColumn","index","currentPage","pageSize","renderSelectionColumn","renderStringColumn","column","head","headAlign","width","fixed","renderNumberColumn","thousandsSeparator","precision","percentage","default","scope","row","number2string","property","renderDateColumn","sourceFormat","format","cellValue","Date","dayjs","isDayjs","formatDate","renderSingleSelectColumn","code","codeName","codeData","codeContent","Throne","getCode","getSingleCodeContent","renderMultiSelectColumn","getMultiCodeContent","renderButtongroupColumn","children","rowData","rowIndex","$index","Space","renderColumngroupColumn","renderColumns","renderDiyColumn","_createTextVNode","map","c","type","OrionError","class","ElTable","rows","ElPagination","e","total","pagetableColumnIndexProps","pagetableColumnStringProps","stringType","someType","Boolean","String","pagetableColumnNumberProps","numberType","pagetableColumnDateProps","pagetableColumnSingleselectProps","Array","pagetableColumnMultiselectProps","pagetableColumnButtongroupProps","pagetableCellButtonProps","handleClick","event","ElButton","pagetableColumngroupProps","pagetableColumnDiyProps","withInstall","Pagetable","PagetableColumnIndex","PagetableColumnString","PagetableColumnNumber","PagetableColumnDate","PagetableColumnSingleselect","PagetableColumnMultiselect","PagetableColumnButtongroup","PagetableCellButton","PagetableColumngroup","PagetableColumnDiy"],"mappings":";;;;;;;;;;;;AAgBiC,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAE1B,MAAMM,KAAiBA,OAAO;AAAA,EACnCC,MAAMC,GAA+B;AAAA,EACrCC,YAAYC,GAAsC;AAAA,EAClDC,eAAeC,EAAY,EAAI;AAAA,EAC/BC,eAAeD,EAAY,EAAK;AAClC,IAIeE,uBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOX,GAAgB;AAAA,EACvBY,OAAO,CAAC,iBAAiB;AAAA,EACzBC,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,UAAMC,IAAaC,KAEbC,IAAQC,EAAS,OACW,CAAA,EAGjC,GAEKC,IAAUC,GAAWT,CAAK;AAkBhCG,WAAAA,EAAO;AAAA,MACLO,gBAjBqBA,MAAM;AAC3BN,QAAAA,EAAWO,MAAMD;;MAiBjBE,kBAduBA,MAChBR,EAAWO,MAAMC;MAcxBC,oBAXyBA,IAAIC,MACtBV,EAAWO,MAAME,mBAAmB,GAAGC,CAAI;AAAA,MAWlDC,oBARyBA,MAClBX,EAAWO,MAAMI;IAQ1B,CAAC,GAEM,MAAM;AACX,YAAM;AAAA,QAAE5B,MAAAA;AAAAA,MAAM,IAAGU,GACX;AAAA,QAAEJ,eAAAA,IAAgB;AAAA,MAAO,IAAGI,GAC5B;AAAA,QAAER,YAAAA;AAAAA,MAAY,IAAGQ,GACjB;AAAA,QAAEN,eAAAA,IAAgB;AAAA,MAAM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EACNC,cAAc;AAAA,EACdC,OAAOmG,GAAyB;AAAA,EAChChG,OAAOnB;AAAAA,EAGPkB,MAAMF,GAAO;AAAA,IAAEG,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCbckB,KAAA4E,EAcbC,IAAW;AAAA,EACX,sBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,6BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,4BAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,oBAAAC;AACF,CAAC;"}
@@ -1,45 +1,45 @@
1
1
  import w from "decimal.js";
2
2
  import { c as s } from "../../../_commonjsHelpers-DaMA6jEr.js";
3
- import M from "dayjs";
3
+ import p from "dayjs";
4
4
  import u from "../../../error/OrionError.js";
5
5
  var $ = {}, v = {};
6
6
  Object.defineProperty(v, "__esModule", { value: !0 });
7
7
  v.comma = void 0;
8
- function j(r, e) {
9
- e === void 0 && (e = 3);
10
- var t = String(r).split(".");
11
- return t[0] = t[0].replace(new RegExp("(\\d)(?=(\\d{" + e + "})+$)", "ig"), "$1,"), t.join(".");
8
+ function j(e, r) {
9
+ r === void 0 && (r = 3);
10
+ var t = String(e).split(".");
11
+ return t[0] = t[0].replace(new RegExp("(\\d)(?=(\\d{" + r + "})+$)", "ig"), "$1,"), t.join(".");
12
12
  }
13
13
  v.comma = j;
14
14
  var d = {}, c = {};
15
15
  Object.defineProperty(c, "__esModule", { value: !0 });
16
16
  c.precise = void 0;
17
- function N(r, e) {
18
- return e === void 0 && (e = 12), parseFloat(r.toPrecision(e));
17
+ function N(e, r) {
18
+ return r === void 0 && (r = 12), parseFloat(e.toPrecision(r));
19
19
  }
20
20
  c.precise = N;
21
21
  Object.defineProperty(d, "__esModule", { value: !0 });
22
22
  d.toFixed = void 0;
23
23
  var y = c;
24
- function O(r, e) {
25
- e === void 0 && (e = 2);
26
- var t = parseFloat("" + r), n = Math.pow(10, e);
27
- return t = y.precise(t * n + 0.5), t = parseInt("" + t, 10) / n, y.precise(t).toFixed(e);
24
+ function O(e, r) {
25
+ r === void 0 && (r = 2);
26
+ var t = parseFloat("" + e), n = Math.pow(10, r);
27
+ return t = y.precise(t * n + 0.5), t = parseInt("" + t, 10) / n, y.precise(t).toFixed(r);
28
28
  }
29
29
  d.toFixed = O;
30
30
  var _ = {};
31
31
  Object.defineProperty(_, "__esModule", { value: !0 });
32
32
  _.capital = void 0;
33
- function E(r) {
34
- var e = String(r);
35
- if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(e))
33
+ function E(e) {
34
+ var r = String(e);
35
+ if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(r))
36
36
  return "";
37
37
  var t = "千百拾亿千百拾万千百拾元角分", n = "";
38
- e += "00";
39
- var i = e.indexOf(".");
40
- i >= 0 && (e = e.substring(0, i) + e.substr(i + 1, 2)), t = t.substr(t.length - e.length);
41
- for (var o = 0; o < e.length; o++)
42
- n += "零壹贰叁肆伍陆柒捌玖".charAt(Number(e.charAt(o))) + t.charAt(o);
38
+ r += "00";
39
+ var i = r.indexOf(".");
40
+ i >= 0 && (r = r.substring(0, i) + r.substr(i + 1, 2)), t = t.substr(t.length - r.length);
41
+ for (var o = 0; o < r.length; o++)
42
+ n += "零壹贰叁肆伍陆柒捌玖".charAt(Number(r.charAt(o))) + t.charAt(o);
43
43
  return n.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
44
44
  }
45
45
  _.capital = E;
@@ -51,113 +51,113 @@ f.MIN_SAFETY_NUMBER = -1 * Math.pow(2, 53) + 1;
51
51
  Object.defineProperty(l, "__esModule", { value: !0 });
52
52
  l.isNumber = void 0;
53
53
  var h = f;
54
- function A(r, e) {
55
- e === void 0 && (e = !1);
56
- var t = typeof r == "number" && isFinite(r);
57
- return t && e ? r <= h.MAX_SAFETY_NUMBER && r >= h.MIN_SAFETY_NUMBER : t;
54
+ function A(e, r) {
55
+ r === void 0 && (r = !1);
56
+ var t = typeof e == "number" && isFinite(e);
57
+ return t && r ? e <= h.MAX_SAFETY_NUMBER && e >= h.MIN_SAFETY_NUMBER : t;
58
58
  }
59
59
  l.isNumber = A;
60
60
  Object.defineProperty(m, "__esModule", { value: !0 });
61
61
  m.percentage = void 0;
62
62
  var P = l, I = d;
63
- function S(r, e) {
64
- e === void 0 && (e = 2);
65
- var t = Number(r);
66
- return P.isNumber(t) ? I.toFixed(t * 100, e) + "%" : r;
63
+ function S(e, r) {
64
+ r === void 0 && (r = 2);
65
+ var t = Number(e);
66
+ return P.isNumber(t) ? I.toFixed(t * 100, r) + "%" : e;
67
67
  }
68
68
  m.percentage = S;
69
- var g = {};
70
- Object.defineProperty(g, "__esModule", { value: !0 });
71
- g.idxList = void 0;
72
- function B(r, e) {
73
- return e === void 0 && (e = 0), Array.from(Array(r), function(t, n) {
74
- return n + e;
75
- });
76
- }
77
- g.idxList = B;
78
69
  var b = {};
79
70
  Object.defineProperty(b, "__esModule", { value: !0 });
80
- b.randomInt = void 0;
81
- function R(r, e) {
82
- return e === void 0 && (e = r), r = Math.round(r + 0.4999999), e = Math.round(e - 0.5), r < 0 || r > e ? -1 : Math.round((e - r) * Math.random()) + r;
71
+ b.idxList = void 0;
72
+ function B(e, r) {
73
+ return r === void 0 && (r = 0), Array.from(Array(e), function(t, n) {
74
+ return n + r;
75
+ });
76
+ }
77
+ b.idxList = B;
78
+ var g = {};
79
+ Object.defineProperty(g, "__esModule", { value: !0 });
80
+ g.randomInt = void 0;
81
+ function R(e, r) {
82
+ return r === void 0 && (r = e), e = Math.round(e + 0.4999999), r = Math.round(r - 0.5), e < 0 || e > r ? -1 : Math.round((r - e) * Math.random()) + e;
83
83
  }
84
- b.randomInt = R;
85
- var p = {};
86
- Object.defineProperty(p, "__esModule", { value: !0 });
87
- p.sum = void 0;
84
+ g.randomInt = R;
85
+ var M = {};
86
+ Object.defineProperty(M, "__esModule", { value: !0 });
87
+ M.sum = void 0;
88
88
  function T() {
89
- for (var r = [], e = 0; e < arguments.length; e++)
90
- r[e] = arguments[e];
91
- return r.reduce(function(t, n) {
89
+ for (var e = [], r = 0; r < arguments.length; r++)
90
+ e[r] = arguments[r];
91
+ return e.reduce(function(t, n) {
92
92
  return t += n;
93
93
  }, 0);
94
94
  }
95
- p.sum = T;
96
- (function(r) {
97
- var e = s && s.__createBinding || (Object.create ? function(n, i, o, a) {
95
+ M.sum = T;
96
+ (function(e) {
97
+ var r = s && s.__createBinding || (Object.create ? function(n, i, o, a) {
98
98
  a === void 0 && (a = o), Object.defineProperty(n, a, { enumerable: !0, get: function() {
99
99
  return i[o];
100
100
  } });
101
101
  } : function(n, i, o, a) {
102
102
  a === void 0 && (a = o), n[a] = i[o];
103
103
  }), t = s && s.__exportStar || function(n, i) {
104
- for (var o in n) o !== "default" && !i.hasOwnProperty(o) && e(i, n, o);
104
+ for (var o in n) o !== "default" && !i.hasOwnProperty(o) && r(i, n, o);
105
105
  };
106
- Object.defineProperty(r, "__esModule", { value: !0 }), t(v, r), t(d, r), t(_, r), t(m, r), t(g, r), t(b, r), t(c, r), t(l, r), t(p, r);
106
+ Object.defineProperty(e, "__esModule", { value: !0 }), t(v, e), t(d, e), t(_, e), t(m, e), t(b, e), t(g, e), t(c, e), t(l, e), t(M, e);
107
107
  })($);
108
- const D = (r, e, t) => {
109
- if (!r)
110
- return r;
111
- if (r instanceof Date && typeof e == "string") {
112
- const n = r, i = e;
108
+ const D = (e, r, t) => {
109
+ if (!e)
110
+ return e;
111
+ if (e instanceof Date && typeof r == "string") {
112
+ const n = e, i = r;
113
113
  if (!n)
114
114
  throw new u("value is null.");
115
115
  if (!i)
116
116
  throw new u("format is null.");
117
- return M(n).format(i);
118
- } else if (typeof r == "string" && typeof e == "string" && typeof t == "string") {
119
- const n = r, i = e, o = t;
117
+ return p(n).format(i);
118
+ } else if (typeof e == "string" && typeof r == "string" && typeof t == "string") {
119
+ const n = e, i = r, o = t;
120
120
  if (!n || !i || !o)
121
121
  throw new u(`Invalid arguments: ${n}, ${i}, ${o}`);
122
- if (M(n, i, !0).isValid())
123
- return M(n, i).format(o);
122
+ if (p(n, i, !0).isValid())
123
+ return p(n, i).format(o);
124
124
  throw new u(`日期[${n}]与格式[${i}]不匹配。`);
125
125
  } else
126
126
  throw new u(`入参数量[${arguments.length}]不正确。`);
127
127
  };
128
- function U(r, e) {
129
- return new w(r).toFixed(e, 4);
128
+ function U(e, r) {
129
+ return new w(e).toFixed(r, 4);
130
130
  }
131
- function X(r, e, t, n) {
132
- if (r == null)
131
+ function X(e, r, t, n) {
132
+ if (e == null)
133
133
  return "";
134
- if (typeof r == "number" || typeof r == "string") {
135
- let i = String(r);
136
- return t >= 0 && (i = U(r, t)), n ? (e && (i = $.comma(i)), i += "%") : e && (i = $.comma(i)), i;
134
+ if (typeof e == "number" || typeof e == "string") {
135
+ let i;
136
+ return t >= 0 ? i = U(n ? e * 100 : e, t) : i = String(n ? e * 100 : e), n ? (r && (i = $.comma(i)), i += "%") : r && (i = $.comma(i)), i;
137
137
  } else
138
- throw new u(`num [${r}]:[${typeof r}] is neither a number nor null.`);
138
+ throw new u(`num [${e}]:[${typeof e}] is neither a number nor null.`);
139
139
  }
140
- const G = (r, e) => {
141
- if (!e)
142
- return null;
140
+ const G = (e, r) => {
143
141
  if (!r)
144
- return e + "(?)";
145
- for (let t = 0; t < r.length; t++) {
146
- const { value: n, content: i } = r[t];
147
- if (n == e)
142
+ return null;
143
+ if (!e)
144
+ return r + "(?)";
145
+ for (let t = 0; t < e.length; t++) {
146
+ const { value: n, content: i } = e[t];
147
+ if (n == r)
148
148
  return i;
149
149
  }
150
- return e + "(?)";
151
- }, q = (r, e) => {
152
- if (!e)
150
+ return r + "(?)";
151
+ }, q = (e, r) => {
152
+ if (!r)
153
153
  return null;
154
154
  let t = "";
155
- const n = e.split(",");
155
+ const n = r.split(",");
156
156
  return n.forEach((i, o) => {
157
- const a = r.findIndex((F) => {
157
+ const a = e.findIndex((F) => {
158
158
  if (F.value == i) return !0;
159
159
  });
160
- a == -1 ? t += `${i}(?)` : t += r[a].content, o != n.length - 1 && (t += ",");
160
+ a == -1 ? t += `${i}(?)` : t += e[a].content, o != n.length - 1 && (t += ",");
161
161
  }), t;
162
162
  };
163
163
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../node_modules/number-magic/lib/comma.js","../../../../node_modules/number-magic/lib/precise.js","../../../../node_modules/number-magic/lib/toFixed.js","../../../../node_modules/number-magic/lib/capital.js","../../../../node_modules/number-magic/lib/utils/constants.js","../../../../node_modules/number-magic/lib/isNumber.js","../../../../node_modules/number-magic/lib/percentage.js","../../../../node_modules/number-magic/lib/idxList.js","../../../../node_modules/number-magic/lib/randomInt.js","../../../../node_modules/number-magic/lib/sum.js","../../../../node_modules/number-magic/lib/index.js","../../../../src/components/Pagetable/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.comma = void 0;\nfunction comma(source, length) {\n if (length === void 0) { length = 3; }\n var arr = String(source).split('.');\n arr[0] = arr[0].replace(new RegExp('(\\\\d)(?=(\\\\d{' + length + '})+$)', 'ig'), '$1,');\n return arr.join('.');\n}\nexports.comma = comma;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.precise = void 0;\nfunction precise(source, precision) {\n if (precision === void 0) { precision = 12; }\n return parseFloat(source.toPrecision(precision));\n}\nexports.precise = precise;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toFixed = void 0;\nvar precise_1 = require(\"./precise\");\nfunction toFixed(source, digits) {\n if (digits === void 0) { digits = 2; }\n var num = parseFloat(\"\" + source);\n var times = Math.pow(10, digits);\n num = precise_1.precise(num * times + 0.5);\n num = parseInt(\"\" + num, 10) / times;\n return precise_1.precise(num).toFixed(digits);\n}\nexports.toFixed = toFixed;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.capital = void 0;\nfunction capital(source) {\n var numbStr = String(source);\n if (!/^(0|[1-9]\\d*)(\\.\\d+)?$/.test(numbStr))\n return '';\n var unit = '千百拾亿千百拾万千百拾元角分';\n var str = '';\n numbStr += '00';\n var p = numbStr.indexOf('.');\n if (p >= 0)\n numbStr = numbStr.substring(0, p) + numbStr.substr(p + 1, 2);\n unit = unit.substr(unit.length - numbStr.length);\n for (var i = 0; i < numbStr.length; i++) {\n str += '零壹贰叁肆伍陆柒捌玖'.charAt(Number(numbStr.charAt(i))) + unit.charAt(i);\n }\n return str\n .replace(/零(千|百|拾|角)/g, '零')\n .replace(/(零)+/g, '零')\n .replace(/零(万|亿|元)/g, '$1')\n .replace(/(亿)万|壹(拾)/g, '$1$2')\n .replace(/^元零?|零分/g, '')\n .replace(/元$/g, '元整');\n}\nexports.capital = capital;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MIN_SAFETY_NUMBER = exports.MAX_SAFETY_NUMBER = void 0;\nexports.MAX_SAFETY_NUMBER = Math.pow(2, 53) - 1;\nexports.MIN_SAFETY_NUMBER = -1 * Math.pow(2, 53) + 1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isNumber = void 0;\nvar constants_1 = require(\"./utils/constants\");\nfunction isNumber(source, checkSafetyNumber) {\n if (checkSafetyNumber === void 0) { checkSafetyNumber = false; }\n var isNumb = typeof source === 'number' && isFinite(source);\n if (isNumb && checkSafetyNumber)\n return source <= constants_1.MAX_SAFETY_NUMBER && source >= constants_1.MIN_SAFETY_NUMBER;\n return isNumb;\n}\nexports.isNumber = isNumber;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.percentage = void 0;\nvar isNumber_1 = require(\"./isNumber\");\nvar toFixed_1 = require(\"./toFixed\");\nfunction percentage(source, digits) {\n if (digits === void 0) { digits = 2; }\n var numb = Number(source);\n if (!isNumber_1.isNumber(numb))\n return source;\n return toFixed_1.toFixed(numb * 100, digits) + '%';\n}\nexports.percentage = percentage;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.idxList = void 0;\nfunction idxList(len, delta) {\n if (delta === void 0) { delta = 0; }\n return Array.from(Array(len), function (_v, k) { return k + delta; });\n}\nexports.idxList = idxList;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomInt = void 0;\nfunction randomInt(min, max) {\n if (max === void 0) { max = min; }\n min = Math.round(min + 0.4999999);\n max = Math.round(max - 0.5);\n if (min < 0 || min > max)\n return -1;\n return Math.round((max - min) * Math.random()) + min;\n}\nexports.randomInt = randomInt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sum = void 0;\nfunction sum() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return args.reduce(function (finalValue, current) {\n return (finalValue += current);\n }, 0);\n}\nexports.sum = sum;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./comma\"), exports);\n__exportStar(require(\"./toFixed\"), exports);\n__exportStar(require(\"./capital\"), exports);\n__exportStar(require(\"./percentage\"), exports);\n__exportStar(require(\"./idxList\"), exports);\n__exportStar(require(\"./randomInt\"), exports);\n__exportStar(require(\"./precise\"), exports);\n__exportStar(require(\"./isNumber\"), exports);\n__exportStar(require(\"./sum\"), exports);\n","import Decimal from 'decimal.js'\r\nimport { comma } from 'number-magic'\r\nimport dayjs from 'dayjs'\r\n\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ninterface formatI {\r\n format(value: Date, targetFormat: string): string\r\n format(value: string, sourceFormat: string, targetFormat: string): string\r\n}\r\n\r\nexport const formatDate: formatI['format'] = (p1: Date | string, p2: string, p3?: string) => {\r\n if (!p1) {\r\n return p1\r\n }\r\n\r\n if (p1 instanceof Date && typeof p2 === 'string') {\r\n const value = p1\r\n const format = p2\r\n\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n return dayjs(value).format(format)\r\n } else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {\r\n const value = p1\r\n const sourceFormat = p2\r\n const targetFormat = p3\r\n\r\n if (!value || !sourceFormat || !targetFormat) {\r\n throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`)\r\n }\r\n\r\n if (dayjs(value, sourceFormat, true).isValid()) {\r\n return dayjs(value, sourceFormat).format(targetFormat)\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`)\r\n }\r\n } else {\r\n throw new OrionError(`入参数量[${arguments.length}]不正确。`)\r\n }\r\n}\r\n\r\nfunction round(value: number, how: number) {\r\n const dec = new Decimal(value)\r\n return dec.toFixed(how, 4)\r\n}\r\n\r\nexport function number2string(num: number | null | undefined, thousandsSeparatorValue: boolean, precisionValue: number, percentageValue: boolean): string {\r\n if (num === null || num === undefined) {\r\n return ''\r\n } else if (typeof num === 'number' || typeof num === 'string') {\r\n let result = String(num)\r\n\r\n // 基础:先实现精度化\r\n if (precisionValue >= 0) {\r\n result = round(num, precisionValue)\r\n }\r\n\r\n // 百分比优先级高于千分位,先实现百分比,再实现千分位\r\n if (percentageValue) {\r\n if (thousandsSeparatorValue) {\r\n // 千分位\r\n result = comma(result)\r\n }\r\n\r\n result += '%'\r\n } else if (thousandsSeparatorValue) {\r\n // 千分位\r\n // 小数精度优先级最高\r\n result = comma(result)\r\n }\r\n\r\n return result\r\n } else {\r\n throw new OrionError(`num [${num}]:[${typeof num}] is neither a number nor null.`)\r\n }\r\n}\r\n\r\nexport const getSingleCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n if (!options) {\r\n return curValue + '(?)'\r\n }\r\n\r\n for (let i = 0; i < options.length; i++) {\r\n const { value, content } = options[i]\r\n if (value == curValue) {\r\n return content\r\n }\r\n }\r\n\r\n return curValue + '(?)'\r\n}\r\n\r\nexport const getMultiCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n let content = ''\r\n\r\n const data = curValue.split(',')\r\n data.forEach((selectValue, valueIndex) => {\r\n const index = options.findIndex((item) => {\r\n if (item.value == selectValue) return true\r\n })\r\n\r\n if (index == -1) {\r\n content += `${selectValue}(?)`\r\n } else {\r\n content += options[index].content\r\n }\r\n\r\n if (valueIndex != data.length - 1) {\r\n content += ','\r\n }\r\n })\r\n\r\n return content\r\n}\r\n"],"names":["comma_1","comma","source","length","arr","precise_1","precise","precision","toFixed_1","require$$0","toFixed","digits","num","times","capital_1","capital","numbStr","unit","str","p","i","constants","isNumber_1","constants_1","isNumber","checkSafetyNumber","isNumb","percentage_1","require$$1","percentage","numb","idxList_1","idxList","len","delta","_v","k","randomInt_1","randomInt","min","max","sum_1","sum","args","_i","finalValue","current","__createBinding","this","o","m","k2","__exportStar","exports","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","formatDate","p1","p2","p3","value","format","OrionError","dayjs","sourceFormat","targetFormat","round","how","Decimal","number2string","thousandsSeparatorValue","precisionValue","percentageValue","result","getSingleCodeContent","options","curValue","content","getMultiCodeContent","data","selectValue","valueIndex","index","item"],"mappings":";;;;;AACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC/CA,EAAA,QAAG;AAChB,SAASC,EAAMC,GAAQC,GAAQ;AAC3B,EAAIA,MAAW,WAAUA,IAAS;AAClC,MAAIC,IAAM,OAAOF,CAAM,EAAE,MAAM,GAAG;AAClC,SAAAE,EAAI,CAAC,IAAIA,EAAI,CAAC,EAAE,QAAQ,IAAI,OAAO,kBAAkBD,IAAS,SAAS,IAAI,GAAG,KAAK,GAC5EC,EAAI,KAAK,GAAG;AACvB;AACAJ,EAAA,QAAgBC;;ACRhB,OAAO,eAAeI,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,SAASC,EAAQJ,GAAQK,GAAW;AAChC,SAAIA,MAAc,WAAUA,IAAY,KACjC,WAAWL,EAAO,YAAYK,CAAS,CAAC;AACnD;AACAF,EAAA,UAAkBC;ACNlB,OAAO,eAAeE,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,IAAIH,IAAYI;AAChB,SAASC,EAAQR,GAAQS,GAAQ;AAC7B,EAAIA,MAAW,WAAUA,IAAS;AAClC,MAAIC,IAAM,WAAW,KAAKV,CAAM,GAC5BW,IAAQ,KAAK,IAAI,IAAIF,CAAM;AAC/B,SAAAC,IAAMP,EAAU,QAAQO,IAAMC,IAAQ,GAAG,GACzCD,IAAM,SAAS,KAAKA,GAAK,EAAE,IAAIC,GACxBR,EAAU,QAAQO,CAAG,EAAE,QAAQD,CAAM;AAChD;AACAH,EAAA,UAAkBE;;ACXlB,OAAO,eAAeI,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,SAASC,EAAQb,GAAQ;AACrB,MAAIc,IAAU,OAAOd,CAAM;AAC3B,MAAI,CAAC,yBAAyB,KAAKc,CAAO;AACt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AI,CAACA;AACI,WAAA;AAGT,MAAIC,IAAU;AAER,QAAAE,IAAOH,EAAS,MAAM,GAAG;AAC1B,SAAAG,EAAA,QAAQ,CAACC,GAAaC,MAAe;AACxC,UAAMC,IAAQP,EAAQ,UAAU,CAACQ,MAAS;AACpC,UAAAA,EAAK,SAASH,EAAoB,QAAA;AAAA,IAAA,CACvC;AAED,IAAIE,KAAS,KACXL,KAAW,GAAGG,CAAW,QAEdH,KAAAF,EAAQO,CAAK,EAAE,SAGxBD,KAAcF,EAAK,SAAS,MACnBF,KAAA;AAAA,EACb,CACD,GAEMA;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
1
+ {"version":3,"file":"index.js","sources":["../../../../node_modules/number-magic/lib/comma.js","../../../../node_modules/number-magic/lib/precise.js","../../../../node_modules/number-magic/lib/toFixed.js","../../../../node_modules/number-magic/lib/capital.js","../../../../node_modules/number-magic/lib/utils/constants.js","../../../../node_modules/number-magic/lib/isNumber.js","../../../../node_modules/number-magic/lib/percentage.js","../../../../node_modules/number-magic/lib/idxList.js","../../../../node_modules/number-magic/lib/randomInt.js","../../../../node_modules/number-magic/lib/sum.js","../../../../node_modules/number-magic/lib/index.js","../../../../src/components/Pagetable/utils/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.comma = void 0;\nfunction comma(source, length) {\n if (length === void 0) { length = 3; }\n var arr = String(source).split('.');\n arr[0] = arr[0].replace(new RegExp('(\\\\d)(?=(\\\\d{' + length + '})+$)', 'ig'), '$1,');\n return arr.join('.');\n}\nexports.comma = comma;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.precise = void 0;\nfunction precise(source, precision) {\n if (precision === void 0) { precision = 12; }\n return parseFloat(source.toPrecision(precision));\n}\nexports.precise = precise;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toFixed = void 0;\nvar precise_1 = require(\"./precise\");\nfunction toFixed(source, digits) {\n if (digits === void 0) { digits = 2; }\n var num = parseFloat(\"\" + source);\n var times = Math.pow(10, digits);\n num = precise_1.precise(num * times + 0.5);\n num = parseInt(\"\" + num, 10) / times;\n return precise_1.precise(num).toFixed(digits);\n}\nexports.toFixed = toFixed;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.capital = void 0;\nfunction capital(source) {\n var numbStr = String(source);\n if (!/^(0|[1-9]\\d*)(\\.\\d+)?$/.test(numbStr))\n return '';\n var unit = '千百拾亿千百拾万千百拾元角分';\n var str = '';\n numbStr += '00';\n var p = numbStr.indexOf('.');\n if (p >= 0)\n numbStr = numbStr.substring(0, p) + numbStr.substr(p + 1, 2);\n unit = unit.substr(unit.length - numbStr.length);\n for (var i = 0; i < numbStr.length; i++) {\n str += '零壹贰叁肆伍陆柒捌玖'.charAt(Number(numbStr.charAt(i))) + unit.charAt(i);\n }\n return str\n .replace(/零(千|百|拾|角)/g, '零')\n .replace(/(零)+/g, '零')\n .replace(/零(万|亿|元)/g, '$1')\n .replace(/(亿)万|壹(拾)/g, '$1$2')\n .replace(/^元零?|零分/g, '')\n .replace(/元$/g, '元整');\n}\nexports.capital = capital;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MIN_SAFETY_NUMBER = exports.MAX_SAFETY_NUMBER = void 0;\nexports.MAX_SAFETY_NUMBER = Math.pow(2, 53) - 1;\nexports.MIN_SAFETY_NUMBER = -1 * Math.pow(2, 53) + 1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isNumber = void 0;\nvar constants_1 = require(\"./utils/constants\");\nfunction isNumber(source, checkSafetyNumber) {\n if (checkSafetyNumber === void 0) { checkSafetyNumber = false; }\n var isNumb = typeof source === 'number' && isFinite(source);\n if (isNumb && checkSafetyNumber)\n return source <= constants_1.MAX_SAFETY_NUMBER && source >= constants_1.MIN_SAFETY_NUMBER;\n return isNumb;\n}\nexports.isNumber = isNumber;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.percentage = void 0;\nvar isNumber_1 = require(\"./isNumber\");\nvar toFixed_1 = require(\"./toFixed\");\nfunction percentage(source, digits) {\n if (digits === void 0) { digits = 2; }\n var numb = Number(source);\n if (!isNumber_1.isNumber(numb))\n return source;\n return toFixed_1.toFixed(numb * 100, digits) + '%';\n}\nexports.percentage = percentage;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.idxList = void 0;\nfunction idxList(len, delta) {\n if (delta === void 0) { delta = 0; }\n return Array.from(Array(len), function (_v, k) { return k + delta; });\n}\nexports.idxList = idxList;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.randomInt = void 0;\nfunction randomInt(min, max) {\n if (max === void 0) { max = min; }\n min = Math.round(min + 0.4999999);\n max = Math.round(max - 0.5);\n if (min < 0 || min > max)\n return -1;\n return Math.round((max - min) * Math.random()) + min;\n}\nexports.randomInt = randomInt;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sum = void 0;\nfunction sum() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return args.reduce(function (finalValue, current) {\n return (finalValue += current);\n }, 0);\n}\nexports.sum = sum;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./comma\"), exports);\n__exportStar(require(\"./toFixed\"), exports);\n__exportStar(require(\"./capital\"), exports);\n__exportStar(require(\"./percentage\"), exports);\n__exportStar(require(\"./idxList\"), exports);\n__exportStar(require(\"./randomInt\"), exports);\n__exportStar(require(\"./precise\"), exports);\n__exportStar(require(\"./isNumber\"), exports);\n__exportStar(require(\"./sum\"), exports);\n","import Decimal from 'decimal.js'\r\nimport { comma } from 'number-magic'\r\nimport dayjs from 'dayjs'\r\n\r\nimport OrionError from '../../../error/OrionError'\r\n\r\ninterface formatI {\r\n format(value: Date, targetFormat: string): string\r\n format(value: string, sourceFormat: string, targetFormat: string): string\r\n}\r\n\r\nexport const formatDate: formatI['format'] = (p1: Date | string, p2: string, p3?: string) => {\r\n if (!p1) {\r\n return p1\r\n }\r\n\r\n if (p1 instanceof Date && typeof p2 === 'string') {\r\n const value = p1\r\n const format = p2\r\n\r\n if (!value) {\r\n throw new OrionError('value is null.')\r\n }\r\n\r\n if (!format) {\r\n throw new OrionError('format is null.')\r\n }\r\n\r\n return dayjs(value).format(format)\r\n } else if (typeof p1 === 'string' && typeof p2 === 'string' && typeof p3 === 'string') {\r\n const value = p1\r\n const sourceFormat = p2\r\n const targetFormat = p3\r\n\r\n if (!value || !sourceFormat || !targetFormat) {\r\n throw new OrionError(`Invalid arguments: ${value}, ${sourceFormat}, ${targetFormat}`)\r\n }\r\n\r\n if (dayjs(value, sourceFormat, true).isValid()) {\r\n return dayjs(value, sourceFormat).format(targetFormat)\r\n } else {\r\n throw new OrionError(`日期[${value}]与格式[${sourceFormat}]不匹配。`)\r\n }\r\n } else {\r\n throw new OrionError(`入参数量[${arguments.length}]不正确。`)\r\n }\r\n}\r\n\r\nfunction round(value: number, how: number) {\r\n const dec = new Decimal(value)\r\n return dec.toFixed(how, 4)\r\n}\r\n\r\nexport function number2string(num: number | null | undefined, thousandsSeparatorValue: boolean, precisionValue: number, percentageValue: boolean): string {\r\n if (num === null || num === undefined) {\r\n return ''\r\n } else if (typeof num === 'number' || typeof num === 'string') {\r\n let result\r\n\r\n // 基础:先实现精度化\r\n if (precisionValue >= 0) {\r\n result = round(percentageValue ? num * 100 : num, precisionValue)\r\n } else {\r\n result = String(percentageValue ? num * 100 : num)\r\n }\r\n\r\n // 百分比优先级高于千分位,先实现百分比,再实现千分位\r\n if (percentageValue) {\r\n if (thousandsSeparatorValue) {\r\n // 千分位\r\n result = comma(result)\r\n }\r\n\r\n result += '%'\r\n } else if (thousandsSeparatorValue) {\r\n // 千分位\r\n // 小数精度优先级最高\r\n result = comma(result)\r\n }\r\n\r\n return result\r\n } else {\r\n throw new OrionError(`num [${num}]:[${typeof num}] is neither a number nor null.`)\r\n }\r\n}\r\n\r\nexport const getSingleCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n if (!options) {\r\n return curValue + '(?)'\r\n }\r\n\r\n for (let i = 0; i < options.length; i++) {\r\n const { value, content } = options[i]\r\n if (value == curValue) {\r\n return content\r\n }\r\n }\r\n\r\n return curValue + '(?)'\r\n}\r\n\r\nexport const getMultiCodeContent = (\r\n options: Array<{\r\n value: string\r\n content: string\r\n }>,\r\n curValue: string\r\n) => {\r\n if (!curValue) {\r\n return null\r\n }\r\n\r\n let content = ''\r\n\r\n const data = curValue.split(',')\r\n data.forEach((selectValue, valueIndex) => {\r\n const index = options.findIndex((item) => {\r\n if (item.value == selectValue) return true\r\n })\r\n\r\n if (index == -1) {\r\n content += `${selectValue}(?)`\r\n } else {\r\n content += options[index].content\r\n }\r\n\r\n if (valueIndex != data.length - 1) {\r\n content += ','\r\n }\r\n })\r\n\r\n return content\r\n}\r\n"],"names":["comma_1","comma","source","length","arr","precise_1","precise","precision","toFixed_1","require$$0","toFixed","digits","num","times","capital_1","capital","numbStr","unit","str","p","i","constants","isNumber_1","constants_1","isNumber","checkSafetyNumber","isNumb","percentage_1","require$$1","percentage","numb","idxList_1","idxList","len","delta","_v","k","randomInt_1","randomInt","min","max","sum_1","sum","args","_i","finalValue","current","__createBinding","this","o","m","k2","__exportStar","exports","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","formatDate","p1","p2","p3","value","format","OrionError","dayjs","sourceFormat","targetFormat","round","how","Decimal","number2string","thousandsSeparatorValue","precisionValue","percentageValue","result","getSingleCodeContent","options","curValue","content","getMultiCodeContent","data","selectValue","valueIndex","index","item"],"mappings":";;;;;AACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC/CA,EAAA,QAAG;AAChB,SAASC,EAAMC,GAAQC,GAAQ;AAC3B,EAAIA,MAAW,WAAUA,IAAS;AAClC,MAAIC,IAAM,OAAOF,CAAM,EAAE,MAAM,GAAG;AAClC,SAAAE,EAAI,CAAC,IAAIA,EAAI,CAAC,EAAE,QAAQ,IAAI,OAAO,kBAAkBD,IAAS,SAAS,IAAI,GAAG,KAAK,GAC5EC,EAAI,KAAK,GAAG;AACvB;AACAJ,EAAA,QAAgBC;;ACRhB,OAAO,eAAeI,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,SAASC,EAAQJ,GAAQK,GAAW;AAChC,SAAIA,MAAc,WAAUA,IAAY,KACjC,WAAWL,EAAO,YAAYK,CAAS,CAAC;AACnD;AACAF,EAAA,UAAkBC;ACNlB,OAAO,eAAeE,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA,EAAA,UAAG;AAClB,IAAIH,IAAYI;AAChB,SAASC,EAAQR,GAAQS,GAAQ;AAC7B,EAAIA,MAAW,WAAUA,IAAS;AAClC,MAAIC,IAAM,WAAW,KAAKV,CAAM,GAC5BW,IAAQ,KAAK,IAAI,IAAIF,CAAM;AAC/B,SAAAC,IAAMP,EAAU,QAAQO,IAAMC,IAAQ,GAAG,GACzCD,IAAM,SAAS,KAAKA,GAAK,EAAE,IAAIC,GACxBR,EAAU,QAAQO,CAAG,EAAE,QAAQD,CAAM;AAChD;AACAH,EAAA,UAAkBE;;ACXlB,OAAO,eAAeI,GAAS,cAAc,EAAE,OAAO,GAAI,CAAE;AAC7CA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E,OAAA6C,GAAO,SAAAiB,EAAQ,IAAIF,EAAQ5D,CAAC;AACpC,QAAI6C,KAASgB;AACJ,aAAAC;AAAA,EAEX;AAEA,SAAOD,IAAW;AACpB,GAEaE,IAAsB,CACjCH,GAIAC,MACG;AACH,MAAI,CAACA;AACI,WAAA;AAGT,MAAIC,IAAU;AAER,QAAAE,IAAOH,EAAS,MAAM,GAAG;AAC1B,SAAAG,EAAA,QAAQ,CAACC,GAAaC,MAAe;AACxC,UAAMC,IAAQP,EAAQ,UAAU,CAACQ,MAAS;AACpC,UAAAA,EAAK,SAASH,EAAoB,QAAA;AAAA,IAAA,CACvC;AAED,IAAIE,KAAS,KACXL,KAAW,GAAGG,CAAW,QAEdH,KAAAF,EAAQO,CAAK,EAAE,SAGxBD,KAAcF,EAAK,SAAS,MACnBF,KAAA;AAAA,EACb,CACD,GAEMA;AACT;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
@@ -1 +1 @@
1
- {"version":3,"file":"arrays.js","sources":["../../../src/components/_util/arrays.ts"],"sourcesContent":["export const unique = <T>(arr: T[]) => [...new Set(arr)]\n\ntype Many<T> = T | ReadonlyArray<T>\n// TODO: rename to `ensureArray`\n/** like `_.castArray`, except falsy value returns empty array. */\nexport const castArray = <T>(arr: Many<T>): T[] => {\n if (!arr && (arr as any) !== 0) return []\n return Array.isArray(arr) ? arr : [arr]\n}\n\n// TODO: remove import alias\n// avoid naming conflicts\nexport { castArray as ensureArray } from 'lodash-unified'\n"],"names":["unique","arr","castArray"],"mappings":";AAAa,MAAAA,IAAS,CAAIC,MAAa,CAAC,GAAG,IAAI,IAAIA,CAAG,CAAC,GAK1CC,IAAY,CAAID,MACvB,CAACA,KAAQA,MAAgB,IAAU,CAAA,IAChC,MAAM,QAAQA,CAAG,IAAIA,IAAM,CAACA,CAAG;"}
1
+ {"version":3,"file":"arrays.js","sources":["../../../src/components/_util/arrays.ts"],"sourcesContent":["export const unique = <T>(arr: T[]) => [...new Set(arr)]\r\n\r\ntype Many<T> = T | ReadonlyArray<T>\r\n// TODO: rename to `ensureArray`\r\n/** like `_.castArray`, except falsy value returns empty array. */\r\nexport const castArray = <T>(arr: Many<T>): T[] => {\r\n if (!arr && (arr as any) !== 0) return []\r\n return Array.isArray(arr) ? arr : [arr]\r\n}\r\n\r\n// TODO: remove import alias\r\n// avoid naming conflicts\r\nexport { castArray as ensureArray } from 'lodash-unified'\r\n"],"names":["unique","arr","castArray"],"mappings":";AAAa,MAAAA,IAAS,CAAIC,MAAa,CAAC,GAAG,IAAI,IAAIA,CAAG,CAAC,GAK1CC,IAAY,CAAID,MACvB,CAACA,KAAQA,MAAgB,IAAU,CAAA,IAChC,MAAM,QAAQA,CAAG,IAAIA,IAAM,CAACA,CAAG;"}
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sources":["../../../src/components/_util/browser.ts"],"sourcesContent":["import { isClient, isIOS } from '@vueuse/core'\n\nexport const isFirefox = (): boolean =>\n isClient && /firefox/i.test(window.navigator.userAgent)\n\nexport { isClient, isIOS }\n"],"names":["isFirefox","isClient"],"mappings":";;AAEO,MAAMA,IAAY,MACvBC,KAAY,WAAW,KAAK,OAAO,UAAU,SAAS;"}
1
+ {"version":3,"file":"browser.js","sources":["../../../src/components/_util/browser.ts"],"sourcesContent":["import { isClient, isIOS } from '@vueuse/core'\r\n\r\nexport const isFirefox = (): boolean =>\r\n isClient && /firefox/i.test(window.navigator.userAgent)\r\n\r\nexport { isClient, isIOS }\r\n"],"names":["isFirefox","isClient"],"mappings":";;AAEO,MAAMA,IAAY,MACvBC,KAAY,WAAW,KAAK,OAAO,UAAU,SAAS;"}
@@ -1 +1 @@
1
- {"version":3,"file":"aria.js","sources":["../../../../src/components/_util/dom/aria.ts"],"sourcesContent":["const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`\n\n/**\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\n */\nexport const isVisible = (element: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return true\n const computed = getComputedStyle(element)\n // element.offsetParent won't work on fix positioned\n // WARNING: potential issue here, going to need some expert advices on this issue\n return computed.position === 'fixed' ? false : element.offsetParent !== null\n}\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n return Array.from(\n element.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENT_SELECTORS)\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\n}\n\n/**\n * @desc Determine if target element is focusable\n * @param element {HTMLElement}\n * @returns {Boolean} true if it is focusable\n */\nexport const isFocusable = (element: HTMLElement): boolean => {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n // HTMLButtonElement has disabled\n if ((element as HTMLButtonElement).disabled) {\n return false\n }\n\n switch (element.nodeName) {\n case 'A': {\n // casting current element to Specific HTMLElement in order to be more type precise\n return (\n !!(element as HTMLAnchorElement).href &&\n (element as HTMLAnchorElement).rel !== 'ignore'\n )\n }\n case 'INPUT': {\n return !(\n (element as HTMLInputElement).type === 'hidden' ||\n (element as HTMLInputElement).type === 'file'\n )\n }\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA': {\n return true\n }\n default: {\n return false\n }\n }\n}\n\n/**\n * @desc Set Attempt to set focus on the current node.\n * @param element\n * The node to attempt to focus on.\n * @returns\n * true if element is focused.\n */\nexport const attemptFocus = (element: HTMLElement): boolean => {\n if (!isFocusable(element)) {\n return false\n }\n // Remove the old try catch block since there will be no error to be thrown\n element.focus?.()\n return document.activeElement === element\n}\n\n/**\n * Trigger an event\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\n * @param {HTMLElement} elm\n * @param {String} name\n * @param {*} opts\n */\nexport const triggerEvent = function (\n elm: HTMLElement,\n name: string,\n ...opts: Array<boolean>\n): HTMLElement {\n let eventName: string\n\n if (name.includes('mouse') || name.includes('click')) {\n eventName = 'MouseEvents'\n } else if (name.includes('key')) {\n eventName = 'KeyboardEvent'\n } else {\n eventName = 'HTMLEvents'\n }\n const evt = document.createEvent(eventName)\n\n evt.initEvent(name, ...opts)\n elm.dispatchEvent(evt)\n return elm\n}\n\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\n\nexport const getSibling = (\n el: HTMLElement,\n distance: number,\n elClass: string\n) => {\n const { parentNode } = el\n if (!parentNode) return null\n const siblings = parentNode.querySelectorAll(elClass)\n const index = Array.prototype.indexOf.call(siblings, el)\n return siblings[index + distance] || null\n}\n\nexport const focusNode = (el: HTMLElement) => {\n if (!el) return\n el.focus()\n !isLeaf(el) && el.click()\n}\n"],"names":["FOCUSABLE_ELEMENT_SELECTORS","isVisible","element","obtainAllFocusableElements","item","isFocusable","attemptFocus","_a","triggerEvent","elm","name","opts","eventName","evt","isLeaf","el","getSibling","distance","elClass","parentNode","siblings","index","focusNode"],"mappings":"AAAA,MAAMA,IAA8B,8KAKvBC,IAAY,CAACC,MACpB,QAAQ,IAAI,aAAa,SAAe,KAC3B,iBAAiBA,CAAO,EAGzB,aAAa,UAAU,KAAQA,EAAQ,iBAAiB,MAG7DC,IAA6B,CACxCD,MAEO,MAAM;AAAA,EACXA,EAAQ,iBAA8BF,CAA2B;AAAA,EACjE,OAAO,CAACI,MAAsBC,EAAYD,CAAI,KAAKH,EAAUG,CAAI,CAAC,GAQzDC,IAAc,CAACH,MAAkC;AAE1D,MAAAA,EAAQ,WAAW,KAClBA,EAAQ,aAAa,KAAKA,EAAQ,aAAa,UAAU,MAAM;AAEzD,WAAA;AAGT,MAAKA,EAA8B;AAC1B,WAAA;AAGT,UAAQA,EAAQ,UAAU;AAAA,IACxB,KAAK;AAEH,aACE,CAAC,CAAEA,EAA8B,QAChCA,EAA8B,QAAQ;AAAA,IAG3C,KAAK;AACH,aAAO,EACJA,EAA6B,SAAS,YACtCA,EAA6B,SAAS;AAAA,IAG3C,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IAET;AACS,aAAA;AAAA,EAEX;AACF,GASaI,IAAe,CAACJ,MAAkC;AAtE/D,MAAAK;AAuEM,SAACF,EAAYH,CAAO,MAIxBK,IAAAL,EAAQ,UAAR,QAAAK,EAAA,KAAAL,IACO,SAAS,kBAAkBA,KAJzB;AAKX,GASaM,IAAe,SAC1BC,GACAC,MACGC,GACU;AACT,MAAAC;AAEJ,EAAIF,EAAK,SAAS,OAAO,KAAKA,EAAK,SAAS,OAAO,IACrCE,IAAA,gBACHF,EAAK,SAAS,KAAK,IAChBE,IAAA,kBAEAA,IAAA;AAER,QAAAC,IAAM,SAAS,YAAYD,CAAS;AAEtC,SAAAC,EAAA,UAAUH,GAAM,GAAGC,CAAI,GAC3BF,EAAI,cAAcI,CAAG,GACdJ;AACT,GAEaK,IAAS,CAACC,MAAoB,CAACA,EAAG,aAAa,WAAW,GAE1DC,IAAa,CACxBD,GACAE,GACAC,MACG;AACG,QAAA,EAAE,YAAAC,EAAe,IAAAJ;AACnB,MAAA,CAACI,EAAmB,QAAA;AAClB,QAAAC,IAAWD,EAAW,iBAAiBD,CAAO,GAC9CG,IAAQ,MAAM,UAAU,QAAQ,KAAKD,GAAUL,CAAE;AAChD,SAAAK,EAASC,IAAQJ,CAAQ,KAAK;AACvC,GAEaK,IAAY,CAACP,MAAoB;AAC5C,EAAKA,MACLA,EAAG,MAAM,GACT,CAACD,EAAOC,CAAE,KAAKA,EAAG,MAAM;AAC1B;"}
1
+ {"version":3,"file":"aria.js","sources":["../../../../src/components/_util/dom/aria.ts"],"sourcesContent":["const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`\r\n\r\n/**\r\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\r\n */\r\nexport const isVisible = (element: HTMLElement) => {\r\n if (process.env.NODE_ENV === 'test') return true\r\n const computed = getComputedStyle(element)\r\n // element.offsetParent won't work on fix positioned\r\n // WARNING: potential issue here, going to need some expert advices on this issue\r\n return computed.position === 'fixed' ? false : element.offsetParent !== null\r\n}\r\n\r\nexport const obtainAllFocusableElements = (\r\n element: HTMLElement\r\n): HTMLElement[] => {\r\n return Array.from(\r\n element.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENT_SELECTORS)\r\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\r\n}\r\n\r\n/**\r\n * @desc Determine if target element is focusable\r\n * @param element {HTMLElement}\r\n * @returns {Boolean} true if it is focusable\r\n */\r\nexport const isFocusable = (element: HTMLElement): boolean => {\r\n if (\r\n element.tabIndex > 0 ||\r\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\r\n ) {\r\n return true\r\n }\r\n // HTMLButtonElement has disabled\r\n if ((element as HTMLButtonElement).disabled) {\r\n return false\r\n }\r\n\r\n switch (element.nodeName) {\r\n case 'A': {\r\n // casting current element to Specific HTMLElement in order to be more type precise\r\n return (\r\n !!(element as HTMLAnchorElement).href &&\r\n (element as HTMLAnchorElement).rel !== 'ignore'\r\n )\r\n }\r\n case 'INPUT': {\r\n return !(\r\n (element as HTMLInputElement).type === 'hidden' ||\r\n (element as HTMLInputElement).type === 'file'\r\n )\r\n }\r\n case 'BUTTON':\r\n case 'SELECT':\r\n case 'TEXTAREA': {\r\n return true\r\n }\r\n default: {\r\n return false\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @desc Set Attempt to set focus on the current node.\r\n * @param element\r\n * The node to attempt to focus on.\r\n * @returns\r\n * true if element is focused.\r\n */\r\nexport const attemptFocus = (element: HTMLElement): boolean => {\r\n if (!isFocusable(element)) {\r\n return false\r\n }\r\n // Remove the old try catch block since there will be no error to be thrown\r\n element.focus?.()\r\n return document.activeElement === element\r\n}\r\n\r\n/**\r\n * Trigger an event\r\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\r\n * @param {HTMLElement} elm\r\n * @param {String} name\r\n * @param {*} opts\r\n */\r\nexport const triggerEvent = function (\r\n elm: HTMLElement,\r\n name: string,\r\n ...opts: Array<boolean>\r\n): HTMLElement {\r\n let eventName: string\r\n\r\n if (name.includes('mouse') || name.includes('click')) {\r\n eventName = 'MouseEvents'\r\n } else if (name.includes('key')) {\r\n eventName = 'KeyboardEvent'\r\n } else {\r\n eventName = 'HTMLEvents'\r\n }\r\n const evt = document.createEvent(eventName)\r\n\r\n evt.initEvent(name, ...opts)\r\n elm.dispatchEvent(evt)\r\n return elm\r\n}\r\n\r\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\r\n\r\nexport const getSibling = (\r\n el: HTMLElement,\r\n distance: number,\r\n elClass: string\r\n) => {\r\n const { parentNode } = el\r\n if (!parentNode) return null\r\n const siblings = parentNode.querySelectorAll(elClass)\r\n const index = Array.prototype.indexOf.call(siblings, el)\r\n return siblings[index + distance] || null\r\n}\r\n\r\nexport const focusNode = (el: HTMLElement) => {\r\n if (!el) return\r\n el.focus()\r\n !isLeaf(el) && el.click()\r\n}\r\n"],"names":["FOCUSABLE_ELEMENT_SELECTORS","isVisible","element","obtainAllFocusableElements","item","isFocusable","attemptFocus","_a","triggerEvent","elm","name","opts","eventName","evt","isLeaf","el","getSibling","distance","elClass","parentNode","siblings","index","focusNode"],"mappings":"AAAA,MAAMA,IAA8B,8KAKvBC,IAAY,CAACC,MACpB,QAAQ,IAAI,aAAa,SAAe,KAC3B,iBAAiBA,CAAO,EAGzB,aAAa,UAAU,KAAQA,EAAQ,iBAAiB,MAG7DC,IAA6B,CACxCD,MAEO,MAAM;AAAA,EACXA,EAAQ,iBAA8BF,CAA2B;AAAA,EACjE,OAAO,CAACI,MAAsBC,EAAYD,CAAI,KAAKH,EAAUG,CAAI,CAAC,GAQzDC,IAAc,CAACH,MAAkC;AAE1D,MAAAA,EAAQ,WAAW,KAClBA,EAAQ,aAAa,KAAKA,EAAQ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element.js","sources":["../../../../src/components/_util/dom/element.ts"],"sourcesContent":["import { isString } from '../types'\nimport { isClient } from '../browser'\n\ntype GetElement = <T extends string | HTMLElement | Window | null | undefined>(\n target: T\n) => T extends string ? HTMLElement | null : T\n\nexport const getElement = ((\n target: string | HTMLElement | Window | null | undefined\n) => {\n if (!isClient || target === '') return null\n if (isString(target)) {\n try {\n return document.querySelector<HTMLElement>(target)\n } catch {\n return null\n }\n }\n return target\n}) as GetElement\n"],"names":["getElement","target","isClient","isString"],"mappings":";;;;AAOa,MAAAA,IAAc,CACzBC,MACG;AACH,MAAI,CAACC,KAAYD,MAAW,GAAW,QAAA;AACnC,MAAAE,EAASF,CAAM;AACb,QAAA;AACK,aAAA,SAAS,cAA2BA,CAAM;AAAA,IAAA,QAC3C;AACC,aAAA;AAAA,IACT;AAEK,SAAAA;AACT;"}
1
+ {"version":3,"file":"element.js","sources":["../../../../src/components/_util/dom/element.ts"],"sourcesContent":["import { isString } from '../types'\r\nimport { isClient } from '../browser'\r\n\r\ntype GetElement = <T extends string | HTMLElement | Window | null | undefined>(\r\n target: T\r\n) => T extends string ? HTMLElement | null : T\r\n\r\nexport const getElement = ((\r\n target: string | HTMLElement | Window | null | undefined\r\n) => {\r\n if (!isClient || target === '') return null\r\n if (isString(target)) {\r\n try {\r\n return document.querySelector<HTMLElement>(target)\r\n } catch {\r\n return null\r\n }\r\n }\r\n return target\r\n}) as GetElement\r\n"],"names":["getElement","target","isClient","isString"],"mappings":";;;;AAOa,MAAAA,IAAc,CACzBC,MACG;AACH,MAAI,CAACC,KAAYD,MAAW,GAAW,QAAA;AACnC,MAAAE,EAASF,CAAM;AACb,QAAA;AACK,aAAA,SAAS,cAA2BA,CAAM;AAAA,IAAA,QAC3C;AACC,aAAA;AAAA,IACT;AAEK,SAAAA;AACT;"}