orion-design 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/Throne/index.d.ts +10 -0
  2. package/dist/Throne/index.js +20 -0
  3. package/dist/Throne/index.js.map +1 -0
  4. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  5. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  6. package/dist/components/Button/Button.vue.d.ts +15 -1
  7. package/dist/components/Button/ButtonGroup/ButtonGroup.d.ts +4 -0
  8. package/dist/components/Button/ButtonGroup/ButtonGroup.js +2 -0
  9. package/dist/components/Button/ButtonGroup/ButtonGroup.js.map +1 -0
  10. package/dist/components/Button/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
  11. package/dist/components/Button/ButtonGroup/index.d.ts +1 -0
  12. package/dist/components/Button/ButtonGroup/index.js +2 -0
  13. package/dist/components/Button/ButtonGroup/index.js.map +1 -0
  14. package/dist/components/Button/index.d.ts +21 -4
  15. package/dist/components/Button/index.js +37 -19
  16. package/dist/components/Button/index.js.map +1 -1
  17. package/dist/components/Form/ButtonGroup/ButtonGroup.d.ts +5 -0
  18. package/dist/components/Form/ButtonGroup/ButtonGroup.js +2 -0
  19. package/dist/components/Form/ButtonGroup/ButtonGroup.js.map +1 -0
  20. package/dist/components/Form/ButtonGroup/ButtonGroup.vue.d.ts +17 -0
  21. package/dist/components/Form/ButtonGroup/index.d.ts +1 -0
  22. package/dist/components/Form/ButtonGroup/index.js +2 -0
  23. package/dist/components/Form/ButtonGroup/index.js.map +1 -0
  24. package/dist/components/Form/Checkbox/Checkbox.d.ts +9 -0
  25. package/dist/components/Form/Checkbox/Checkbox.js +2 -0
  26. package/dist/components/Form/Checkbox/Checkbox.js.map +1 -0
  27. package/dist/components/Form/Checkbox/Checkbox.vue.d.ts +3 -0
  28. package/dist/components/Form/Checkbox/index.d.ts +1 -0
  29. package/dist/components/Form/Checkbox/index.js +2 -0
  30. package/dist/components/Form/Checkbox/index.js.map +1 -0
  31. package/dist/components/Form/CheckboxGroup/CheckboxGroup.d.ts +14 -0
  32. package/dist/components/Form/CheckboxGroup/CheckboxGroup.js +2 -0
  33. package/dist/components/Form/CheckboxGroup/CheckboxGroup.js.map +1 -0
  34. package/dist/components/Form/CheckboxGroup/CheckboxGroup.vue.d.ts +3 -0
  35. package/dist/components/Form/CheckboxGroup/index.d.ts +1 -0
  36. package/dist/components/Form/CheckboxGroup/index.js +2 -0
  37. package/dist/components/Form/CheckboxGroup/index.js.map +1 -0
  38. package/dist/components/Form/DateInput/DateInput.d.ts +17 -0
  39. package/dist/components/Form/DateInput/DateInput.js +2 -0
  40. package/dist/components/Form/DateInput/DateInput.js.map +1 -0
  41. package/dist/components/Form/DateInput/DateInput.vue.d.ts +3 -0
  42. package/dist/components/Form/DateInput/index.d.ts +1 -0
  43. package/dist/components/Form/DateInput/index.js +2 -0
  44. package/dist/components/Form/DateInput/index.js.map +1 -0
  45. package/dist/components/Form/DiyItem/DiyItem.d.ts +9 -0
  46. package/dist/components/Form/DiyItem/DiyItem.js +2 -0
  47. package/dist/components/Form/DiyItem/DiyItem.js.map +1 -0
  48. package/dist/components/Form/DiyItem/DiyItem.vue.d.ts +17 -0
  49. package/dist/components/Form/DiyItem/index.d.ts +1 -0
  50. package/dist/components/Form/DiyItem/index.js +2 -0
  51. package/dist/components/Form/DiyItem/index.js.map +1 -0
  52. package/dist/components/Form/FileInput/FileInput.d.ts +10 -0
  53. package/dist/components/Form/FileInput/FileInput.js +2 -0
  54. package/dist/components/Form/FileInput/FileInput.js.map +1 -0
  55. package/dist/components/Form/FileInput/FileInput.vue.d.ts +451 -0
  56. package/dist/components/Form/FileInput/index.d.ts +1 -0
  57. package/dist/components/Form/FileInput/index.js +2 -0
  58. package/dist/components/Form/FileInput/index.js.map +1 -0
  59. package/dist/components/Form/Form.d.ts +1 -0
  60. package/dist/components/Form/Form.js.map +1 -1
  61. package/dist/components/Form/Form.vue.d.ts +10 -10
  62. package/dist/components/Form/MultiSelect/MultiSelect.d.ts +15 -0
  63. package/dist/components/Form/MultiSelect/MultiSelect.js +2 -0
  64. package/dist/components/Form/MultiSelect/MultiSelect.js.map +1 -0
  65. package/dist/components/Form/MultiSelect/MultiSelect.vue.d.ts +3 -0
  66. package/dist/components/Form/MultiSelect/index.d.ts +1 -0
  67. package/dist/components/Form/MultiSelect/index.js +2 -0
  68. package/dist/components/Form/MultiSelect/index.js.map +1 -0
  69. package/dist/components/Form/PasswordInput/PasswordInput.d.ts +0 -2
  70. package/dist/components/Form/RadioGroup/RadioGroup.d.ts +14 -0
  71. package/dist/components/Form/RadioGroup/RadioGroup.js +2 -0
  72. package/dist/components/Form/RadioGroup/RadioGroup.js.map +1 -0
  73. package/dist/components/Form/RadioGroup/RadioGroup.vue.d.ts +3 -0
  74. package/dist/components/Form/RadioGroup/index.d.ts +1 -0
  75. package/dist/components/Form/RadioGroup/index.js +2 -0
  76. package/dist/components/Form/RadioGroup/index.js.map +1 -0
  77. package/dist/components/Form/SingleSelect/SingleSelect.d.ts +17 -0
  78. package/dist/components/Form/SingleSelect/SingleSelect.js +2 -0
  79. package/dist/components/Form/SingleSelect/SingleSelect.js.map +1 -0
  80. package/dist/components/Form/SingleSelect/SingleSelect.vue.d.ts +3 -0
  81. package/dist/components/Form/SingleSelect/index.d.ts +1 -0
  82. package/dist/components/Form/SingleSelect/index.js +2 -0
  83. package/dist/components/Form/SingleSelect/index.js.map +1 -0
  84. package/dist/components/Form/StringInput/StringInput.d.ts +0 -2
  85. package/dist/components/Form/Switch/Switch.d.ts +9 -0
  86. package/dist/components/Form/Switch/Switch.js +2 -0
  87. package/dist/components/Form/Switch/Switch.js.map +1 -0
  88. package/dist/components/Form/Switch/Switch.vue.d.ts +3 -0
  89. package/dist/components/Form/Switch/index.d.ts +1 -0
  90. package/dist/components/Form/Switch/index.js +2 -0
  91. package/dist/components/Form/Switch/index.js.map +1 -0
  92. package/dist/components/Form/Textarea/Textarea.d.ts +0 -2
  93. package/dist/components/Form/hooks/useForm.d.ts +5 -3
  94. package/dist/components/Form/hooks/useForm.js +40 -17
  95. package/dist/components/Form/hooks/useForm.js.map +1 -1
  96. package/dist/components/Form/index.d.ts +37 -6
  97. package/dist/components/Form/index.js +612 -100
  98. package/dist/components/Form/index.js.map +1 -1
  99. package/dist/components/Form/utils/index.d.ts +8 -0
  100. package/dist/components/Form/utils/index.js +26 -0
  101. package/dist/components/Form/utils/index.js.map +1 -0
  102. package/dist/components/Modal/index.d.ts +1 -1
  103. package/dist/components/Pagetable/Pagetable.d.ts +29 -17
  104. package/dist/components/Pagetable/columns/PagetableCellButton.d.ts +24 -0
  105. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +78 -0
  106. package/dist/components/Pagetable/columns/{PagetableDatecolumn.d.ts → PagetableColumnDate.d.ts} +17 -4
  107. package/dist/components/Pagetable/columns/PagetableColumnDiy.d.ts +78 -0
  108. package/dist/components/Pagetable/columns/PagetableColumnIndex.d.ts +5 -0
  109. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +109 -0
  110. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +114 -0
  111. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +109 -0
  112. package/dist/components/Pagetable/columns/{PagetableStringcolumn.d.ts → PagetableColumnString.d.ts} +17 -4
  113. package/dist/components/Pagetable/columns/PagetableColumngroup.d.ts +35 -0
  114. package/dist/components/Pagetable/hooks/useColumns.d.ts +1 -0
  115. package/dist/components/Pagetable/hooks/useColumns.js +96 -0
  116. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -0
  117. package/dist/components/Pagetable/index.d.ts +42 -17
  118. package/dist/components/Pagetable/index.js +496 -119
  119. package/dist/components/Pagetable/index.js.map +1 -1
  120. package/dist/components/Pagetable/utils/index.d.ts +15 -0
  121. package/dist/components/Pagetable/utils/index.js +169 -0
  122. package/dist/components/Pagetable/utils/index.js.map +1 -0
  123. package/dist/components/Space/index.d.ts +3 -3
  124. package/dist/components/_util/type.d.ts +4 -0
  125. package/dist/components/_util/type.js +8 -4
  126. package/dist/components/_util/type.js.map +1 -1
  127. package/dist/components/_util/vue/size.d.ts +1 -1
  128. package/dist/components/components.js +15 -14
  129. package/dist/components/components.js.map +1 -1
  130. package/dist/components/index.js +20 -19
  131. package/dist/components/index.js.map +1 -1
  132. package/dist/components/types.d.ts +11 -0
  133. package/dist/components/types.js +2 -0
  134. package/dist/components/types.js.map +1 -0
  135. package/dist/components-CutWiB7Q.js +68 -0
  136. package/dist/components-CutWiB7Q.js.map +1 -0
  137. package/dist/index-BbsXWo7C.js +44 -0
  138. package/dist/index-BbsXWo7C.js.map +1 -0
  139. package/dist/index.css +1 -1
  140. package/dist/index.d.ts +1 -0
  141. package/dist/index.js +22 -19
  142. package/dist/index.js.map +1 -1
  143. package/dist/utils/md5.js +77 -79
  144. package/dist/utils/md5.js.map +1 -1
  145. package/dist/version/version.d.ts +1 -1
  146. package/dist/version/version.js +1 -1
  147. package/dist/version/version.js.map +1 -1
  148. package/package.json +7 -3
  149. package/dist/components-BZukhWDk.js +0 -106
  150. package/dist/components-BZukhWDk.js.map +0 -1
  151. package/dist/utils/vue/install.d.ts +0 -6
  152. package/dist/utils/vue/install.js +0 -21
  153. package/dist/utils/vue/install.js.map +0 -1
  154. package/dist/utils/vue/typescript.d.ts +0 -5
  155. package/dist/utils/vue/typescript.js +0 -2
  156. package/dist/utils/vue/typescript.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Pagetable/Pagetable.tsx","../../../src/components/Pagetable/columns/PagetableStringcolumn.tsx","../../../src/components/Pagetable/columns/PagetableDatecolumn.tsx","../../../src/components/Pagetable/index.ts"],"sourcesContent":["import { computed, defineComponent } 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 OrionError from '../../error/OrionError'\r\n\r\nimport type { PageTableI } from './interface'\r\n\r\nexport const pagetableProps = () => ({\r\n gutter: anyType<boolean | string>(),\r\n height: String,\r\n data: arrayType<PageTableI['data']>(),\r\n pagination: objectType<PageTableI['pagination']>(),\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 setup(props, { slots, attrs, emit, expose }) {\r\n const style = computed(() => {\r\n const rowStyle: CSSProperties = {}\r\n\r\n return rowStyle\r\n })\r\n\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const tableColumns = children?.map((c) => {\r\n if (c.type.name === 'OPagetableStringcolumn') {\r\n return {\r\n type: c.type.name,\r\n head: c.props?.head,\r\n name: c.props?.name,\r\n width: c.props?.width,\r\n fixed: c.props?.fixed,\r\n }\r\n } else if (c.type.name === 'OPagetableDatecolumn') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: c.props?.head,\r\n name: c.props?.name,\r\n width: c.props?.width,\r\n fixed: c.props?.fixed,\r\n\r\n format: c.props?.format,\r\n sourceFormat: c.props?.sourceFormat,\r\n }\r\n } else {\r\n throw new OrionError(`OPagetable不能正确处理'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n })\r\n\r\n // const slots = {\r\n // bar: () => <span>B</span>,\r\n // }\r\n\r\n return () => {\r\n const { data } = props\r\n\r\n const { pagination } = props\r\n\r\n const cn = classNames('orion-pagetbale')\r\n\r\n const renderColumns = (columns) => {\r\n return columns?.map((c) => {\r\n if (c.type === 'OPagetableStringcolumn') {\r\n return <ElTableColumn label={c.head} prop={c.name} width={c.width} fixed={c.fixed}></ElTableColumn>\r\n } else if (c.type === 'OPagetableDatecolumn') {\r\n return <ElTableColumn label={c.head} prop={c.name} width={c.width} fixed={c.fixed}></ElTableColumn>\r\n } else {\r\n throw new OrionError(`OPagetable不能正确处理'${c.type}'子组件。`)\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 data={data} height={'100%'}>\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 console.log('current-page', e)\r\n }}\r\n pageSize={pagination.pageSize}\r\n onUpdate:page-size={(e) => {\r\n console.log('page-size', e)\r\n }}\r\n total={pagination.total}\r\n layout=\"prev, pager, next, jumper, ->, total\"\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 pagetableStringcolumnProps = () => ({\r\n head: stringType(),\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 PagetableStringcolumnProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableStringcolumnProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableStringcolumn',\r\n inheritAttrs: false,\r\n props: pagetableStringcolumnProps(),\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 pagetableDatecolumnProps = () => ({\r\n head: stringType(),\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 PagetableDatecolumnProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableDatecolumnProps>>>\r\n\r\nexport default defineComponent({\r\n name: 'OPagetableDatecolumn',\r\n inheritAttrs: false,\r\n props: pagetableDatecolumnProps(),\r\n setup(props, { slots, attrs, emit, expose }) {\r\n return () => null\r\n },\r\n})\r\n","import { withInstall, withNoopInstall } from '../../utils/vue/install'\r\n\r\nimport Pagetable from './Pagetable'\r\nimport PagetableStringcolumn from './columns/PagetableStringcolumn'\r\nimport PagetableDatecolumn from './columns/PagetableDatecolumn'\r\n\r\nexport type { PagetableProps } from './Pagetable'\r\n\r\nexport default withInstall<\r\n typeof Pagetable,\r\n {\r\n PagetableStringcolumn: typeof PagetableStringcolumn\r\n PagetableDatecolumn: typeof PagetableDatecolumn\r\n }\r\n>(Pagetable, {\r\n PagetableStringcolumn,\r\n PagetableDatecolumn,\r\n})\r\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","pagetableProps","gutter","anyType","height","String","data","arrayType","pagination","objectType","defineComponent","name","inheritAttrs","props","setup","slots","attrs","emit","expose","style","computed","columns","children","default","map","c","type","head","width","fixed","format","sourceFormat","OrionError","_slot","cn","classNames","renderColumns","_createVNode","ElTableColumn","class","value","ElTable","ElPagination","currentPage","e","console","log","pageSize","total","pagetableStringcolumnProps","stringType","someType","Boolean","pagetableDatecolumnProps","index","withInstall","Pagetable","PagetableStringcolumn","PagetableDatecolumn"],"mappings":";;;;;;AAM+C,SAAA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AAA;AAAA,EAG5CyB,QAAQoB,EAAY;AAAA,EACpBnB,cAAcmB,EAAW;AAC3B,IAIexC,sBAAgB;AAAA,EAC7BC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAOwC,EAA0B;AAAA,EACjCvC,MAAMD,GAAO;AAAA,IAAEE,OAAAA;AAAAA,IAAOC,OAAAA;AAAAA,IAAOC,MAAAA;AAAAA,IAAMC,QAAAA;AAAAA,EAAO,GAAG;AAC3C,WAAO,MAAM;AAAA,EACf;AACF,CAAC,GCrBcoC,IAAAC,EAMbC,GAAW;AAAA,EACX,uBAAAC;AAAA,EACA,qBAAAC;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 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","Pag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AAAA,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;"}
@@ -0,0 +1,15 @@
1
+ interface formatI {
2
+ format(value: Date, targetFormat: string): string;
3
+ format(value: string, sourceFormat: string, targetFormat: string): string;
4
+ }
5
+ export declare const formatDate: formatI['format'];
6
+ export declare function number2string(num: number | null | undefined, thousandsSeparatorValue: boolean, precisionValue: number, percentageValue: boolean): string;
7
+ export declare const getSingleCodeContent: (options: Array<{
8
+ value: string;
9
+ content: string;
10
+ }>, curValue: string) => string | null;
11
+ export declare const getMultiCodeContent: (options: Array<{
12
+ value: string;
13
+ content: string;
14
+ }>, curValue: string) => string | null;
15
+ export {};
@@ -0,0 +1,169 @@
1
+ import w from "decimal.js";
2
+ import { c as s } from "../../../_commonjsHelpers-DaMA6jEr.js";
3
+ import M from "dayjs";
4
+ import u from "../../../error/OrionError.js";
5
+ var $ = {}, v = {};
6
+ Object.defineProperty(v, "__esModule", { value: !0 });
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(".");
12
+ }
13
+ v.comma = j;
14
+ var d = {}, c = {};
15
+ Object.defineProperty(c, "__esModule", { value: !0 });
16
+ c.precise = void 0;
17
+ function N(r, e) {
18
+ return e === void 0 && (e = 12), parseFloat(r.toPrecision(e));
19
+ }
20
+ c.precise = N;
21
+ Object.defineProperty(d, "__esModule", { value: !0 });
22
+ d.toFixed = void 0;
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);
28
+ }
29
+ d.toFixed = O;
30
+ var _ = {};
31
+ Object.defineProperty(_, "__esModule", { value: !0 });
32
+ _.capital = void 0;
33
+ function E(r) {
34
+ var e = String(r);
35
+ if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(e))
36
+ return "";
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);
43
+ return n.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
44
+ }
45
+ _.capital = E;
46
+ var m = {}, l = {}, f = {};
47
+ Object.defineProperty(f, "__esModule", { value: !0 });
48
+ f.MIN_SAFETY_NUMBER = f.MAX_SAFETY_NUMBER = void 0;
49
+ f.MAX_SAFETY_NUMBER = Math.pow(2, 53) - 1;
50
+ f.MIN_SAFETY_NUMBER = -1 * Math.pow(2, 53) + 1;
51
+ Object.defineProperty(l, "__esModule", { value: !0 });
52
+ l.isNumber = void 0;
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;
58
+ }
59
+ l.isNumber = A;
60
+ Object.defineProperty(m, "__esModule", { value: !0 });
61
+ m.percentage = void 0;
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;
67
+ }
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
+ var b = {};
79
+ 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;
83
+ }
84
+ b.randomInt = R;
85
+ var p = {};
86
+ Object.defineProperty(p, "__esModule", { value: !0 });
87
+ p.sum = void 0;
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) {
92
+ return t += n;
93
+ }, 0);
94
+ }
95
+ p.sum = T;
96
+ (function(r) {
97
+ var e = s && s.__createBinding || (Object.create ? function(n, i, o, a) {
98
+ a === void 0 && (a = o), Object.defineProperty(n, a, { enumerable: !0, get: function() {
99
+ return i[o];
100
+ } });
101
+ } : function(n, i, o, a) {
102
+ a === void 0 && (a = o), n[a] = i[o];
103
+ }), t = s && s.__exportStar || function(n, i) {
104
+ for (var o in n) o !== "default" && !i.hasOwnProperty(o) && e(i, n, o);
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);
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;
113
+ if (!n)
114
+ throw new u("value is null.");
115
+ if (!i)
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;
120
+ if (!n || !i || !o)
121
+ throw new u(`Invalid arguments: ${n}, ${i}, ${o}`);
122
+ if (M(n, i, !0).isValid())
123
+ return M(n, i).format(o);
124
+ throw new u(`日期[${n}]与格式[${i}]不匹配。`);
125
+ } else
126
+ throw new u(`入参数量[${arguments.length}]不正确。`);
127
+ };
128
+ function U(r, e) {
129
+ return new w(r).toFixed(e, 4);
130
+ }
131
+ function X(r, e, t, n) {
132
+ if (r == null)
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;
137
+ } else
138
+ throw new u(`num [${r}]:[${typeof r}] is neither a number nor null.`);
139
+ }
140
+ const G = (r, e) => {
141
+ if (!e)
142
+ return null;
143
+ 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)
148
+ return i;
149
+ }
150
+ return e + "(?)";
151
+ }, q = (r, e) => {
152
+ if (!e)
153
+ return null;
154
+ let t = "";
155
+ const n = e.split(",");
156
+ return n.forEach((i, o) => {
157
+ const a = r.findIndex((F) => {
158
+ if (F.value == i) return !0;
159
+ });
160
+ a == -1 ? t += `${i}(?)` : t += r[a].content, o != n.length - 1 && (t += ",");
161
+ }), t;
162
+ };
163
+ export {
164
+ D as formatDate,
165
+ q as getMultiCodeContent,
166
+ G as getSingleCodeContent,
167
+ X as number2string
168
+ };
169
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,EAA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AAjE,KAAQ;AACH,WAAA;MACE,OAAOA,KAAQ,YAAY,OAAOA,KAAQ,UAAU;AACzD,QAAAkE,IAAS,OAAOlE,CAAG;AAGvB,WAAIgE,KAAkB,MACXE,IAAAP,EAAM3D,GAAKgE,CAAc,IAIhCC,KACEF,MAEFG,IAAS7E,EAAAA,MAAM6E,CAAM,IAGbA,KAAA,OACDH,MAGTG,IAAS7E,EAAAA,MAAM6E,CAAM,IAGhBA;AAAA,EAAA;AAEP,UAAM,IAAIX,EAAW,QAAQvD,CAAG,MAAM,OAAOA,CAAG,iCAAiC;AAErF;AAEa,MAAAmE,IAAuB,CAClCC,GAIAC,MACG;AACH,MAAI,CAACA;AACI,WAAA;AAGT,MAAI,CAACD;AACH,WAAOC,IAAW;AAGpB,WAAS7D,IAAI,GAAGA,IAAI4D,EAAQ,QAAQ5D,KAAK;AACvC,UAAM,EAAE,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]}
@@ -31,8 +31,8 @@ declare const _default: {
31
31
  type: PropType<string | boolean>;
32
32
  };
33
33
  }>> & Readonly<{}>, {
34
- gutter: string | boolean;
35
34
  vertical: string | boolean;
35
+ gutter: string | boolean;
36
36
  }, true, {}, CustomSlotsType<{
37
37
  default?: any;
38
38
  }>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
@@ -52,8 +52,8 @@ declare const _default: {
52
52
  type: PropType<string | boolean>;
53
53
  };
54
54
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, {
55
- gutter: string | boolean;
56
55
  vertical: string | boolean;
56
+ gutter: string | boolean;
57
57
  }>;
58
58
  __isFragment?: never;
59
59
  __isTeleport?: never;
@@ -68,8 +68,8 @@ declare const _default: {
68
68
  type: PropType<string | boolean>;
69
69
  };
70
70
  }>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
71
- gutter: string | boolean;
72
71
  vertical: string | boolean;
72
+ gutter: string | boolean;
73
73
  }, {}, string, CustomSlotsType<{
74
74
  default?: any;
75
75
  }>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Plugin;
@@ -53,6 +53,10 @@ export declare function stringType<T extends string = string>(defaultVal?: T): {
53
53
  type: PropType<T>;
54
54
  default: T;
55
55
  };
56
+ export declare function numberType<T extends number = number>(defaultVal?: T): {
57
+ type: PropType<T>;
58
+ default: T;
59
+ };
56
60
  export declare function someType<T>(types?: any[], defaultVal?: T): {
57
61
  type: PropType<T>;
58
62
  default: T;
@@ -1,10 +1,10 @@
1
- const r = (...t) => t, o = (...t) => t, a = (t) => {
1
+ const r = (...t) => t, o = (...t) => t, y = (t) => {
2
2
  const n = t;
3
3
  return n.install = function(e) {
4
4
  e.component(n.displayName || n.name, t);
5
5
  }, t;
6
6
  };
7
- function y() {
7
+ function a() {
8
8
  return { type: [Function, Array] };
9
9
  }
10
10
  function c(t) {
@@ -29,6 +29,9 @@ function l(t) {
29
29
  function d(t) {
30
30
  return { type: String, default: t };
31
31
  }
32
+ function T(t) {
33
+ return { type: Number, default: t };
34
+ }
32
35
  function s(t, n) {
33
36
  return t ? { type: t, default: n } : u(n);
34
37
  }
@@ -36,14 +39,15 @@ export {
36
39
  u as anyType,
37
40
  l as arrayType,
38
41
  i as booleanType,
39
- y as eventType,
42
+ a as eventType,
40
43
  p as functionType,
44
+ T as numberType,
41
45
  c as objectType,
42
46
  s as someType,
43
47
  d as stringType,
44
48
  r as tuple,
45
49
  o as tupleNum,
46
50
  f as vNodeType,
47
- a as withInstall
51
+ y as withInstall
48
52
  };
49
53
  //# sourceMappingURL=type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.js","sources":["../../../src/components/_util/type.ts"],"sourcesContent":["// @ts-ignore\r\nimport type { App, PropType, Plugin, Ref, VNode, SlotsType } from 'vue'\r\n\r\n// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\r\nexport const tuple = <T extends string[]>(...args: T) => args\r\n\r\nexport const tupleNum = <T extends number[]>(...args: T) => args\r\n\r\n/**\r\n * https://stackoverflow.com/a/59187769\r\n * Extract the type of an element of an array/tuple without performing indexing\r\n */\r\nexport type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never\r\n\r\n/**\r\n * https://github.com/Microsoft/TypeScript/issues/29729\r\n */\r\nexport type LiteralUnion<T extends string> = T | (string & {})\r\n\r\nexport type Data = Record<string, unknown>\r\n\r\nexport type Key = string | number\r\n\r\ntype DefaultFactory<T> = (props: Data) => T | null | undefined\r\n\r\nexport interface PropOptions<T = any, D = T> {\r\n type?: PropType<T> | true | null\r\n required?: boolean\r\n default?: D | DefaultFactory<D> | null | undefined | object\r\n validator?(value: unknown): boolean\r\n}\r\n\r\ndeclare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void\r\n\r\n// eslint-disable-next-line no-undef\r\nexport type VueNode = VNodeChildAtom | VNodeChildAtom[] | VNode\r\n\r\nexport const withInstall = <T>(comp: T) => {\r\n const c = comp as any\r\n c.install = function (app: App) {\r\n // @ts-ignore\r\n app.component(c.displayName || c.name, comp)\r\n }\r\n\r\n return comp as T & Plugin\r\n}\r\n\r\nexport type MaybeRef<T> = T | Ref<T>\r\n\r\nexport function eventType<T>() {\r\n return { type: [Function, Array] as PropType<T | T[]> }\r\n}\r\n\r\nexport function objectType<T = {}>(defaultVal?: T) {\r\n return { type: Object as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function booleanType(defaultVal?: boolean) {\r\n return { type: Boolean, default: defaultVal as boolean }\r\n}\r\n\r\nexport function functionType<T = () => {}>(defaultVal?: T) {\r\n return { type: Function as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function anyType<T = any>(defaultVal?: T, required?: boolean) {\r\n const type = { validator: () => true, default: defaultVal as T } as unknown\r\n return required\r\n ? (type as {\r\n type: PropType<T>\r\n default: T\r\n required: true\r\n })\r\n : (type as {\r\n default: T\r\n type: PropType<T>\r\n })\r\n}\r\nexport function vNodeType<T = VueNode>() {\r\n return { validator: () => true } as unknown as { type: PropType<T> }\r\n}\r\n\r\nexport function arrayType<T extends any[]>(defaultVal?: T) {\r\n return { type: Array as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function stringType<T extends string = string>(defaultVal?: T) {\r\n return { type: String as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function someType<T>(types?: any[], defaultVal?: T) {\r\n return types ? { type: types as PropType<T>, default: defaultVal as T } : anyType<T>(defaultVal)\r\n}\r\n\r\n// @ts-ignore\r\nexport type CustomSlotsType<T> = SlotsType<T>\r\n\r\nexport type AnyObject = Record<PropertyKey, any>\r\n"],"names":["tuple","args","tupleNum","withInstall","comp","c","app","eventType","objectType","defaultVal","booleanType","functionType","anyType","required","type","vNodeType","arrayType","stringType","someType","types"],"mappings":"AAIa,MAAAA,IAAQ,IAAwBC,MAAYA,GAE5CC,IAAW,IAAwBD,MAAYA,GA+B/CE,IAAc,CAAIC,MAAY;AACzC,QAAMC,IAAID;AACR,SAAAC,EAAA,UAAU,SAAUC,GAAU;AAE9B,IAAAA,EAAI,UAAUD,EAAE,eAAeA,EAAE,MAAMD,CAAI;AAAA,EAAA,GAGtCA;AACT;AAIO,SAASG,IAAe;AAC7B,SAAO,EAAE,MAAM,CAAC,UAAU,KAAK,EAAuB;AACxD;AAEO,SAASC,EAAmBC,GAAgB;AACjD,SAAO,EAAE,MAAM,QAAuB,SAASA,EAAgB;AACjE;AAEO,SAASC,EAAYD,GAAsB;AAChD,SAAO,EAAE,MAAM,SAAS,SAASA,EAAsB;AACzD;AAEO,SAASE,EAA2BF,GAAgB;AACzD,SAAO,EAAE,MAAM,UAAyB,SAASA,EAAgB;AACnE;AAEgB,SAAAG,EAAiBH,GAAgBI,GAAoB;AACnE,QAAMC,IAAO,EAAE,WAAW,MAAM,IAAM,SAASL;AAC/C,SACKK;AASP;AACO,SAASC,IAAyB;AAChC,SAAA,EAAE,WAAW,MAAM;AAC5B;AAEO,SAASC,EAA2BP,GAAgB;AACzD,SAAO,EAAE,MAAM,OAAiC,SAASA,EAAgB;AAC3E;AAEO,SAASQ,EAAsCR,GAAgB;AACpE,SAAO,EAAE,MAAM,QAAkC,SAASA,EAAgB;AAC5E;AAEgB,SAAAS,EAAYC,GAAeV,GAAgB;AAClD,SAAAU,IAAQ,EAAE,MAAMA,GAAsB,SAASV,EAAgB,IAAIG,EAAWH,CAAU;AACjG;"}
1
+ {"version":3,"file":"type.js","sources":["../../../src/components/_util/type.ts"],"sourcesContent":["// @ts-ignore\r\nimport type { App, PropType, Plugin, Ref, VNode, SlotsType } from 'vue'\r\n\r\n// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\r\nexport const tuple = <T extends string[]>(...args: T) => args\r\n\r\nexport const tupleNum = <T extends number[]>(...args: T) => args\r\n\r\n/**\r\n * https://stackoverflow.com/a/59187769\r\n * Extract the type of an element of an array/tuple without performing indexing\r\n */\r\nexport type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never\r\n\r\n/**\r\n * https://github.com/Microsoft/TypeScript/issues/29729\r\n */\r\nexport type LiteralUnion<T extends string> = T | (string & {})\r\n\r\nexport type Data = Record<string, unknown>\r\n\r\nexport type Key = string | number\r\n\r\ntype DefaultFactory<T> = (props: Data) => T | null | undefined\r\n\r\nexport interface PropOptions<T = any, D = T> {\r\n type?: PropType<T> | true | null\r\n required?: boolean\r\n default?: D | DefaultFactory<D> | null | undefined | object\r\n validator?(value: unknown): boolean\r\n}\r\n\r\ndeclare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void\r\n\r\n// eslint-disable-next-line no-undef\r\nexport type VueNode = VNodeChildAtom | VNodeChildAtom[] | VNode\r\n\r\nexport const withInstall = <T>(comp: T) => {\r\n const c = comp as any\r\n c.install = function (app: App) {\r\n // @ts-ignore\r\n app.component(c.displayName || c.name, comp)\r\n }\r\n\r\n return comp as T & Plugin\r\n}\r\n\r\nexport type MaybeRef<T> = T | Ref<T>\r\n\r\nexport function eventType<T>() {\r\n return { type: [Function, Array] as PropType<T | T[]> }\r\n}\r\n\r\nexport function objectType<T = {}>(defaultVal?: T) {\r\n return { type: Object as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function booleanType(defaultVal?: boolean) {\r\n return { type: Boolean, default: defaultVal as boolean }\r\n}\r\n\r\nexport function functionType<T = () => {}>(defaultVal?: T) {\r\n return { type: Function as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function anyType<T = any>(defaultVal?: T, required?: boolean) {\r\n const type = { validator: () => true, default: defaultVal as T } as unknown\r\n return required\r\n ? (type as {\r\n type: PropType<T>\r\n default: T\r\n required: true\r\n })\r\n : (type as {\r\n default: T\r\n type: PropType<T>\r\n })\r\n}\r\nexport function vNodeType<T = VueNode>() {\r\n return { validator: () => true } as unknown as { type: PropType<T> }\r\n}\r\n\r\nexport function arrayType<T extends any[]>(defaultVal?: T) {\r\n return { type: Array as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function stringType<T extends string = string>(defaultVal?: T) {\r\n return { type: String as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function numberType<T extends number = number>(defaultVal?: T) {\r\n return { type: Number as unknown as PropType<T>, default: defaultVal as T }\r\n}\r\n\r\nexport function someType<T>(types?: any[], defaultVal?: T) {\r\n return types ? { type: types as PropType<T>, default: defaultVal as T } : anyType<T>(defaultVal)\r\n}\r\n\r\n// @ts-ignore\r\nexport type CustomSlotsType<T> = SlotsType<T>\r\n\r\nexport type AnyObject = Record<PropertyKey, any>\r\n"],"names":["tuple","args","tupleNum","withInstall","comp","c","app","eventType","objectType","defaultVal","booleanType","functionType","anyType","required","type","vNodeType","arrayType","stringType","numberType","someType","types"],"mappings":"AAIa,MAAAA,IAAQ,IAAwBC,MAAYA,GAE5CC,IAAW,IAAwBD,MAAYA,GA+B/CE,IAAc,CAAIC,MAAY;AACzC,QAAMC,IAAID;AACR,SAAAC,EAAA,UAAU,SAAUC,GAAU;AAE9B,IAAAA,EAAI,UAAUD,EAAE,eAAeA,EAAE,MAAMD,CAAI;AAAA,EAAA,GAGtCA;AACT;AAIO,SAASG,IAAe;AAC7B,SAAO,EAAE,MAAM,CAAC,UAAU,KAAK,EAAuB;AACxD;AAEO,SAASC,EAAmBC,GAAgB;AACjD,SAAO,EAAE,MAAM,QAAuB,SAASA,EAAgB;AACjE;AAEO,SAASC,EAAYD,GAAsB;AAChD,SAAO,EAAE,MAAM,SAAS,SAASA,EAAsB;AACzD;AAEO,SAASE,EAA2BF,GAAgB;AACzD,SAAO,EAAE,MAAM,UAAyB,SAASA,EAAgB;AACnE;AAEgB,SAAAG,EAAiBH,GAAgBI,GAAoB;AACnE,QAAMC,IAAO,EAAE,WAAW,MAAM,IAAM,SAASL;AAC/C,SACKK;AASP;AACO,SAASC,IAAyB;AAChC,SAAA,EAAE,WAAW,MAAM;AAC5B;AAEO,SAASC,EAA2BP,GAAgB;AACzD,SAAO,EAAE,MAAM,OAAiC,SAASA,EAAgB;AAC3E;AAEO,SAASQ,EAAsCR,GAAgB;AACpE,SAAO,EAAE,MAAM,QAAkC,SAASA,EAAgB;AAC5E;AAEO,SAASS,EAAsCT,GAAgB;AACpE,SAAO,EAAE,MAAM,QAAkC,SAASA,EAAgB;AAC5E;AAEgB,SAAAU,EAAYC,GAAeX,GAAgB;AAClD,SAAAW,IAAQ,EAAE,MAAMA,GAAsB,SAASX,EAAgB,IAAIG,EAAWH,CAAU;AACjG;"}
@@ -1,2 +1,2 @@
1
1
  import { ComponentSize } from 'element-plus';
2
- export declare const getComponentSize: (size?: ComponentSize) => 40 | 32 | 24;
2
+ export declare const getComponentSize: (size?: ComponentSize) => 24 | 32 | 40;
@@ -1,18 +1,19 @@
1
- import { OButton as a } from "./Button/index.js";
2
- import { a as r, i as f } from "../components-BZukhWDk.js";
3
- import { Colflex as x, Flexitem as m, Rowflex as p } from "./Flex/index.js";
4
- import { default as u } from "./Pagetable/index.js";
5
- import { default as i } from "./Modal/useModal.js";
6
- import { default as B } from "./Form/index.js";
1
+ import { default as a } from "./Button/index.js";
2
+ import { S as t } from "../index-BbsXWo7C.js";
3
+ import { Colflex as l, Flexitem as x, Rowflex as m } from "./Flex/index.js";
4
+ import { default as s } from "./Pagetable/index.js";
5
+ import { i as u } from "../components-CutWiB7Q.js";
6
+ import { default as F } from "./Modal/useModal.js";
7
+ import { default as S } from "./Form/index.js";
7
8
  export {
8
9
  a as Button,
9
- x as Colflex,
10
- m as Flexitem,
11
- B as Form,
12
- r as Modal,
13
- u as Pagetable,
14
- p as Rowflex,
15
- f as Space,
16
- i as useOModal
10
+ l as Colflex,
11
+ x as Flexitem,
12
+ S as Form,
13
+ u as Modal,
14
+ s as Pagetable,
15
+ m as Rowflex,
16
+ t as Space,
17
+ F as useOModal
17
18
  };
18
19
  //# sourceMappingURL=components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,26 +1,27 @@
1
- import { c as e } from "../components-BZukhWDk.js";
2
- import { a as n, i as m } from "../components-BZukhWDk.js";
3
- import { OButton as c } from "./Button/index.js";
4
- import { Colflex as u, Flexitem as i, Rowflex as d } from "./Flex/index.js";
5
- import { default as b } from "./Pagetable/index.js";
6
- import { default as F } from "./Modal/useModal.js";
7
- import { default as g } from "./Form/index.js";
1
+ import { c as t } from "../components-CutWiB7Q.js";
2
+ import { i as m } from "../components-CutWiB7Q.js";
3
+ import { default as x } from "./Button/index.js";
4
+ import { S as c } from "../index-BbsXWo7C.js";
5
+ import { Colflex as i, Flexitem as d, Rowflex as b } from "./Flex/index.js";
6
+ import { default as M } from "./Pagetable/index.js";
7
+ import { default as S } from "./Modal/useModal.js";
8
+ import { default as h } from "./Form/index.js";
8
9
  const f = function(o) {
9
- return Object.keys(e).forEach((r) => {
10
- const t = e[r];
11
- t.install && o.use(t);
10
+ return Object.keys(t).forEach((r) => {
11
+ const e = t[r];
12
+ e.install && o.use(e);
12
13
  }), o;
13
14
  };
14
15
  export {
15
- c as Button,
16
- u as Colflex,
17
- i as Flexitem,
18
- g as Form,
19
- n as Modal,
20
- b as Pagetable,
21
- d as Rowflex,
22
- m as Space,
16
+ x as Button,
17
+ i as Colflex,
18
+ d as Flexitem,
19
+ h as Form,
20
+ m as Modal,
21
+ M as Pagetable,
22
+ b as Rowflex,
23
+ c as Space,
23
24
  f as install,
24
- F as useOModal
25
+ S as useOModal
25
26
  };
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/index.ts"],"sourcesContent":["import type { App } from 'vue'\r\n\r\nimport * as components from './components'\r\n\r\nexport * from './components'\r\n\r\nexport const install = function (app: App) {\r\n Object.keys(components).forEach((key) => {\r\n const component = components[key]\r\n if (component.install) {\r\n app.use(component)\r\n }\r\n })\r\n return app\r\n}\r\n"],"names":["install","app","components","key","component"],"mappings":";;;;;;;AAMa,MAAAA,IAAU,SAAUC,GAAU;AACzC,gBAAO,KAAKC,CAAU,EAAE,QAAQ,CAACC,MAAQ;AACjC,UAAAC,IAAYF,EAAWC,CAAG;AAChC,IAAIC,EAAU,WACZH,EAAI,IAAIG,CAAS;AAAA,EACnB,CACD,GACMH;AACT;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/index.ts"],"sourcesContent":["import type { App } from 'vue'\r\n\r\nimport * as components from './components'\r\n\r\nexport * from './components'\r\n\r\nexport const install = function (app: App) {\r\n Object.keys(components).forEach((key) => {\r\n const component = components[key]\r\n if (component.install) {\r\n app.use(component)\r\n }\r\n })\r\n return app\r\n}\r\n"],"names":["install","app","components","key","component"],"mappings":";;;;;;;;AAMa,MAAAA,IAAU,SAAUC,GAAU;AACzC,gBAAO,KAAKC,CAAU,EAAE,QAAQ,CAACC,MAAQ;AACjC,UAAAC,IAAYF,EAAWC,CAAG;AAChC,IAAIC,EAAU,WACZH,EAAI,IAAIG,CAAS;AAAA,EACnB,CACD,GACMH;AACT;"}
@@ -0,0 +1,11 @@
1
+ export interface CodeItem {
2
+ value: string;
3
+ content: string;
4
+ }
5
+ export type CodeData = CodeItem[];
6
+ export type CodeMap = Record<string, CodeData>;
7
+ export type CascadeCodeItem = {
8
+ value: string;
9
+ content: string;
10
+ parent?: string;
11
+ };
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}