@xingm/xui 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +61 -7
  2. package/dist/style.css +1 -1
  3. package/dist/types/src/components/Button/index.d.ts +2 -0
  4. package/dist/types/src/components/Button/index.d.ts.map +1 -0
  5. package/dist/types/src/components/Button/src/XButton.vue.d.ts.map +1 -0
  6. package/dist/types/src/components/Card/index.d.ts +2 -0
  7. package/dist/types/src/components/Card/index.d.ts.map +1 -0
  8. package/dist/types/src/components/Card/src/XCard.vue.d.ts.map +1 -0
  9. package/dist/types/src/components/Descriptions/index.d.ts +3 -0
  10. package/dist/types/src/components/Descriptions/index.d.ts.map +1 -0
  11. package/dist/types/src/components/Descriptions/src/XDescriptions.vue.d.ts +78 -0
  12. package/dist/types/src/components/Descriptions/src/XDescriptions.vue.d.ts.map +1 -0
  13. package/dist/types/src/components/Descriptions/src/XDescriptionsItem.vue.d.ts +43 -0
  14. package/dist/types/src/components/Descriptions/src/XDescriptionsItem.vue.d.ts.map +1 -0
  15. package/dist/types/src/components/Drawer/index.d.ts +2 -0
  16. package/dist/types/src/components/Drawer/index.d.ts.map +1 -0
  17. package/dist/types/src/components/Drawer/src/XDrawer.vue.d.ts +143 -0
  18. package/dist/types/src/components/Drawer/src/XDrawer.vue.d.ts.map +1 -0
  19. package/dist/types/src/components/Empty/index.d.ts +2 -0
  20. package/dist/types/src/components/Empty/index.d.ts.map +1 -0
  21. package/dist/types/src/components/Empty/src/XEmpty.vue.d.ts +51 -0
  22. package/dist/types/src/components/Empty/src/XEmpty.vue.d.ts.map +1 -0
  23. package/dist/types/src/components/Loading/index.d.ts +2 -0
  24. package/dist/types/src/components/Loading/index.d.ts.map +1 -0
  25. package/dist/types/src/components/Loading/src/XLoading.vue.d.ts +130 -0
  26. package/dist/types/src/components/Loading/src/XLoading.vue.d.ts.map +1 -0
  27. package/dist/types/src/components/Modal/index.d.ts +2 -0
  28. package/dist/types/src/components/Modal/index.d.ts.map +1 -0
  29. package/dist/types/{components → src/components/Modal/src}/XModal.vue.d.ts +59 -17
  30. package/dist/types/src/components/Modal/src/XModal.vue.d.ts.map +1 -0
  31. package/dist/types/src/components/SearchForm/index.d.ts +2 -0
  32. package/dist/types/src/components/SearchForm/index.d.ts.map +1 -0
  33. package/dist/types/src/components/SearchForm/src/XSearchForm.vue.d.ts +84 -0
  34. package/dist/types/src/components/SearchForm/src/XSearchForm.vue.d.ts.map +1 -0
  35. package/dist/types/src/components/Table/index.d.ts +7 -0
  36. package/dist/types/src/components/Table/index.d.ts.map +1 -0
  37. package/dist/types/src/components/Table/src/XTable.vue.d.ts +556 -0
  38. package/dist/types/src/components/Table/src/XTable.vue.d.ts.map +1 -0
  39. package/dist/types/src/components/Table/src/components/HeaderCell.vue.d.ts +17 -0
  40. package/dist/types/src/components/Table/src/components/HeaderCell.vue.d.ts.map +1 -0
  41. package/dist/types/src/components/Table/src/components/TableAction.vue.d.ts +80 -0
  42. package/dist/types/src/components/Table/src/components/TableAction.vue.d.ts.map +1 -0
  43. package/dist/types/src/components/Table/src/components/TableToolbar.vue.d.ts +46 -0
  44. package/dist/types/{components/XButton.vue.d.ts.map → src/components/Table/src/components/TableToolbar.vue.d.ts.map} +1 -1
  45. package/dist/types/src/components/Table/src/const.d.ts +19 -0
  46. package/dist/types/src/components/Table/src/const.d.ts.map +1 -0
  47. package/dist/types/src/components/Table/src/helper.d.ts +5 -0
  48. package/dist/types/src/components/Table/src/helper.d.ts.map +1 -0
  49. package/dist/types/src/components/Table/src/hooks/useColumns.d.ts +36 -0
  50. package/dist/types/src/components/Table/src/hooks/useColumns.d.ts.map +1 -0
  51. package/dist/types/src/components/Table/src/hooks/useCustomRow.d.ts +24 -0
  52. package/dist/types/src/components/Table/src/hooks/useCustomRow.d.ts.map +1 -0
  53. package/dist/types/src/components/Table/src/hooks/useDataSource.d.ts +38 -0
  54. package/dist/types/src/components/Table/src/hooks/useDataSource.d.ts.map +1 -0
  55. package/dist/types/src/components/Table/src/hooks/useLoading.d.ts +5 -0
  56. package/dist/types/src/components/Table/src/hooks/useLoading.d.ts.map +1 -0
  57. package/dist/types/src/components/Table/src/hooks/usePagination.d.ts +14 -0
  58. package/dist/types/src/components/Table/src/hooks/usePagination.d.ts.map +1 -0
  59. package/dist/types/src/components/Table/src/hooks/useRender.d.ts +208 -0
  60. package/dist/types/src/components/Table/src/hooks/useRender.d.ts.map +1 -0
  61. package/dist/types/src/components/Table/src/hooks/useRowSelection.d.ts +19 -0
  62. package/dist/types/src/components/Table/src/hooks/useRowSelection.d.ts.map +1 -0
  63. package/dist/types/src/components/Table/src/hooks/useScrollTo.d.ts +8 -0
  64. package/dist/types/src/components/Table/src/hooks/useScrollTo.d.ts.map +1 -0
  65. package/dist/types/src/components/Table/src/hooks/useTable.d.ts +11 -0
  66. package/dist/types/src/components/Table/src/hooks/useTable.d.ts.map +1 -0
  67. package/dist/types/src/components/Table/src/hooks/useTableContext.d.ts +26 -0
  68. package/dist/types/src/components/Table/src/hooks/useTableContext.d.ts.map +1 -0
  69. package/dist/types/src/components/Table/src/hooks/useTableExpand.d.ts +23 -0
  70. package/dist/types/src/components/Table/src/hooks/useTableExpand.d.ts.map +1 -0
  71. package/dist/types/src/components/Table/src/hooks/useTableForm.d.ts +18 -0
  72. package/dist/types/src/components/Table/src/hooks/useTableForm.d.ts.map +1 -0
  73. package/dist/types/src/components/Table/src/hooks/useTableScroll.d.ts +12 -0
  74. package/dist/types/src/components/Table/src/hooks/useTableScroll.d.ts.map +1 -0
  75. package/dist/types/src/components/Table/src/hooks/useTableStyle.d.ts +11 -0
  76. package/dist/types/src/components/Table/src/hooks/useTableStyle.d.ts.map +1 -0
  77. package/dist/types/src/components/Table/src/props.d.ts +220 -0
  78. package/dist/types/src/components/Table/src/props.d.ts.map +1 -0
  79. package/dist/types/src/components/Table/src/types/pagination.d.ts +26 -0
  80. package/dist/types/src/components/Table/src/types/pagination.d.ts.map +1 -0
  81. package/dist/types/src/components/Table/src/types/table.d.ts +230 -0
  82. package/dist/types/src/components/Table/src/types/table.d.ts.map +1 -0
  83. package/dist/types/src/components/index.d.ts +20 -0
  84. package/dist/types/src/components/index.d.ts.map +1 -0
  85. package/dist/types/src/components/utils/dateUtil.d.ts +5 -0
  86. package/dist/types/src/components/utils/dateUtil.d.ts.map +1 -0
  87. package/dist/types/src/components/utils/index.d.ts +33 -0
  88. package/dist/types/src/components/utils/index.d.ts.map +1 -0
  89. package/dist/types/src/components/utils/propTypes.d.ts +52 -0
  90. package/dist/types/src/components/utils/propTypes.d.ts.map +1 -0
  91. package/dist/types/{index.d.ts → src/index.d.ts} +1 -0
  92. package/dist/types/src/index.d.ts.map +1 -0
  93. package/dist/types/src/install.d.ts.map +1 -0
  94. package/dist/types/src/locale/index.d.ts +39 -0
  95. package/dist/types/src/locale/index.d.ts.map +1 -0
  96. package/dist/types/src/theme/index.d.ts.map +1 -0
  97. package/dist/types/{types → src/types}/index.d.ts +24 -1
  98. package/dist/types/src/types/index.d.ts.map +1 -0
  99. package/dist/types/src/utils/index.d.ts +16 -0
  100. package/dist/types/src/utils/index.d.ts.map +1 -0
  101. package/dist/xui.es.js +4551 -117
  102. package/dist/xui.umd.js +57 -1
  103. package/package.json +6 -3
  104. package/dist/types/components/XCard.vue.d.ts.map +0 -1
  105. package/dist/types/components/XModal.vue.d.ts.map +0 -1
  106. package/dist/types/components/index.d.ts +0 -4
  107. package/dist/types/components/index.d.ts.map +0 -1
  108. package/dist/types/index.d.ts.map +0 -1
  109. package/dist/types/install.d.ts.map +0 -1
  110. package/dist/types/theme/index.d.ts.map +0 -1
  111. package/dist/types/types/index.d.ts.map +0 -1
  112. package/dist/types/utils/index.d.ts +0 -1
  113. package/dist/types/utils/index.d.ts.map +0 -1
  114. /package/dist/types/{components → src/components/Button/src}/XButton.vue.d.ts +0 -0
  115. /package/dist/types/{components → src/components/Card/src}/XCard.vue.d.ts +0 -0
  116. /package/dist/types/{install.d.ts → src/install.d.ts} +0 -0
  117. /package/dist/types/{theme → src/theme}/index.d.ts +0 -0
@@ -0,0 +1,46 @@
1
+ import { TableSetting, ColumnChangeParam } from '../types/table';
2
+
3
+ interface Props {
4
+ title?: string | (() => any);
5
+ showTableSetting?: boolean;
6
+ tableSetting?: TableSetting;
7
+ titleHelpMessage?: string | string[];
8
+ }
9
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
10
+ titleHelpMessage: string;
11
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ "columns-change": (data: ColumnChangeParam[]) => void;
13
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
14
+ titleHelpMessage: string;
15
+ }>>> & Readonly<{
16
+ "onColumns-change"?: ((data: ColumnChangeParam[]) => any) | undefined;
17
+ }>, {
18
+ titleHelpMessage: string | string[];
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
20
+ title?(_: {}): any;
21
+ toolbar?(_: {}): any;
22
+ }>;
23
+ export default _default;
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToRuntimeProps<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
33
+ type __VLS_WithDefaults<P, D> = {
34
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
35
+ default: D[K];
36
+ }> : P[K];
37
+ };
38
+ type __VLS_Prettify<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $sl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AC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"TableToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/components/TableToolbar.vue"],"names":[],"mappings":"AAoBA;AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKtE,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACtC;;;;;;;;;;;;;;;AAwLD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const ROW_KEY = "key";
2
+ export declare const PAGE_SIZE_OPTIONS: string[];
3
+ export declare const PAGE_SIZE = 10;
4
+ export declare const DEFAULT_SIZE = "default";
5
+ export declare const DEFAULT_ALIGN = "center";
6
+ export declare const INDEX_COLUMN_FLAG = "INDEX";
7
+ export declare const ACTION_COLUMN_FLAG = "ACTION";
8
+ export declare const FETCH_SETTING: {
9
+ pageField: string;
10
+ sizeField: string;
11
+ listField: string;
12
+ totalField: string;
13
+ };
14
+ export declare const DEFAULT_SORT_FN: (sortInfo: any) => {
15
+ field: any;
16
+ order: any;
17
+ };
18
+ export declare const DEFAULT_FILTER_FN: (filters: any) => any;
19
+ //# sourceMappingURL=const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/src/const.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,iBAAiB,UAAiC,CAAC;AAChE,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,GAAG;;;CAM5C,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAAa,GAAG,QAE7C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { BasicTableProps } from './types/table';
2
+
3
+ export declare function parseRowKey<RecordType = any>(rowKey: BasicTableProps['rowKey'], record: RecordType, autoCreateKey?: boolean): number | string;
4
+ export declare function parseRowKeyValue<RecordType = any>(rowKey: BasicTableProps['rowKey'], record: RecordType, autoCreateKey?: boolean): number | string;
5
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Table/src/helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,wBAAgB,WAAW,CAAC,UAAU,GAAG,GAAG,EAC1C,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,MAAM,EAAE,UAAU,EAClB,aAAa,CAAC,EAAE,OAAO,GACtB,MAAM,GAAG,MAAM,CAYjB;AAED,wBAAgB,gBAAgB,CAAC,UAAU,GAAG,GAAG,EAC/C,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,MAAM,EAAE,UAAU,EAClB,aAAa,CAAC,EAAE,OAAO,GACtB,MAAM,GAAG,MAAM,CAMjB"}
@@ -0,0 +1,36 @@
1
+ import { BasicTableProps, BasicColumn, CellFormat, GetColumnsParams } from '../types/table';
2
+ import { PaginationProps } from '../types/pagination';
3
+ import { ComputedRef } from 'vue';
4
+
5
+ /**
6
+ * 格式化单元格内容
7
+ * 支持函数格式化、日期格式化、Map 映射三种方式
8
+ * @param text 原始文本
9
+ * @param format 格式化配置
10
+ * @param record 行数据
11
+ * @param index 行索引
12
+ * @returns 格式化后的文本
13
+ */
14
+ export declare function formatCell(text: string, format: CellFormat, record: Recordable, index: number): any;
15
+ /**
16
+ * 表格列配置管理 Hook
17
+ * 提供列的读取、设置、缓存等功能
18
+ * @param propsRef 表格 Props 引用
19
+ * @param getPaginationRef 分页配置引用
20
+ * @returns 列操作相关的方法和计算属性
21
+ */
22
+ export declare function useColumns(propsRef: {
23
+ value: BasicTableProps;
24
+ } | ComputedRef<BasicTableProps>, getPaginationRef: {
25
+ value: boolean | PaginationProps;
26
+ }): {
27
+ getColumnsRef: ComputedRef<BasicColumn[]>;
28
+ getCacheColumns: () => BasicColumn[];
29
+ getColumns: (opt?: GetColumnsParams) => BasicColumn[];
30
+ setColumns: (columnList: Partial<BasicColumn>[] | (string | string[])[]) => void;
31
+ setColumnWidth: (w: number, col: any) => void;
32
+ getViewColumns: ComputedRef<BasicColumn[]>;
33
+ setCacheColumnsByField: (dataIndex: string | undefined, value: Partial<BasicColumn>) => void;
34
+ setCacheColumns: (columns: BasicColumn[]) => void;
35
+ };
36
+ //# sourceMappingURL=useColumns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useColumns.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useColumns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAiLvC;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,OA4B7F;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC,EACnE,gBAAgB,EAAE;IAAE,KAAK,EAAE,OAAO,GAAG,eAAe,CAAA;CAAE;;;uBAwM5B,gBAAgB;6BAnDV,QAAQ,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE;wBA2FnD,MAAM,OAAO,GAAG;;wCA9GA,MAAM,GAAG,SAAS,SAAS,QAAQ,WAAW,CAAC;+BAkGxD,WAAW,EAAE;EA0BhD"}
@@ -0,0 +1,24 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { BasicTableProps } from '../types/table';
3
+ import { Key } from 'ant-design-vue/es/table/interface';
4
+
5
+ interface Options {
6
+ setSelectedRowKeys: (keyValues: Key[]) => void;
7
+ getSelectRowKeys: () => Key[];
8
+ clearSelectedRowKeys: () => void;
9
+ emit: (event: string, ...args: any[]) => void;
10
+ getAutoCreateKey: Ref<boolean> | ComputedRef<boolean>;
11
+ }
12
+ export declare function useCustomRow(propsRef: {
13
+ value: BasicTableProps;
14
+ } | ComputedRef<BasicTableProps>, { setSelectedRowKeys, getSelectRowKeys, getAutoCreateKey, clearSelectedRowKeys, emit }: Options): {
15
+ customRow: (record: Record<string, any>, index: number) => {
16
+ onClick: (e: Event) => void;
17
+ onDblclick: (event: Event) => void;
18
+ onContextmenu: (event: Event) => void;
19
+ onMouseenter: (event: Event) => void;
20
+ onMouseleave: (event: Event) => void;
21
+ };
22
+ };
23
+ export {};
24
+ //# sourceMappingURL=useCustomRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCustomRow.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useCustomRow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAG7D,UAAU,OAAO;IACf,kBAAkB,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC/C,gBAAgB,EAAE,MAAM,GAAG,EAAE,CAAC;IAC9B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CACvD;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC,EACnE,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAAE,OAAO;wBAEpE,OAAO,MAAM,EAAE,GAAG,CAAC,SAAS,MAAM;qBAE5C,KAAK;4BA6CE,KAAK;+BAGF,KAAK;8BAGN,KAAK;8BAGL,KAAK;;EAOhC"}
@@ -0,0 +1,38 @@
1
+ import { BasicTableProps, FetchParams, SorterResult } from '../types/table';
2
+ import { PaginationProps } from '../types/pagination';
3
+ import { ComputedRef } from 'vue';
4
+
5
+ interface ActionType {
6
+ getPaginationInfo: {
7
+ value: boolean | PaginationProps;
8
+ };
9
+ setPagination: (info: Partial<PaginationProps>) => void;
10
+ setLoading: (loading: boolean) => void;
11
+ getFieldsValue: () => Record<string, any>;
12
+ clearSelectedRowKeys: () => void;
13
+ tableData: {
14
+ value: Record<string, any>[];
15
+ };
16
+ }
17
+ export declare function useDataSource(propsRef: {
18
+ value: BasicTableProps;
19
+ } | ComputedRef<BasicTableProps>, { getPaginationInfo, setPagination, setLoading, getFieldsValue, clearSelectedRowKeys, tableData, }: ActionType, emit: (event: string, ...args: any[]) => void): {
20
+ getDataSourceRef: import('vue').Ref<Record<string, any>[], Record<string, any>[]>;
21
+ getDataSource: <T = Record<string, any>>() => T[];
22
+ getRawDataSource: <T_1 = Record<string, any>>() => T_1;
23
+ searchInfoRef: import('vue').Ref<Record<string, any>, Record<string, any>>;
24
+ getSearchInfo: <T_2 = Record<string, any>>() => T_2;
25
+ getRowKey: ComputedRef<any>;
26
+ setTableData: <T_3 = Record<string, any>>(values: T_3[]) => void;
27
+ getAutoCreateKey: ComputedRef<boolean>;
28
+ fetch: (opt?: FetchParams) => Promise<Record<string, any>[] | undefined>;
29
+ reload: (opt?: FetchParams) => Promise<Record<string, any>[] | undefined>;
30
+ updateTableData: (index: number, key: string | number, value: any) => Promise<Record<string, any>>;
31
+ updateTableDataRecord: (keyValue: string | number, record: Record<string, any>) => Record<string, any> | undefined;
32
+ deleteTableDataRecord: (keyValues: string | number | (string | number)[]) => void;
33
+ insertTableDataRecord: (record: Record<string, any> | Record<string, any>[], index?: number) => Record<string, any>[] | undefined;
34
+ findTableDataRecord: (keyValue: string | number) => Record<string, any> | undefined;
35
+ handleTableChange: (pagination: PaginationProps, filters: Partial<Recordable<string[]>>, sorter: SorterResult) => void;
36
+ };
37
+ export {};
38
+ //# sourceMappingURL=useDataSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDataSource.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO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e,WAClB,QAAQ,WAAW,MAAM,EAAE,CAAC,CAAC,UAC9B,YAAY;EAmWvB"}
@@ -0,0 +1,5 @@
1
+ export declare function useLoading(props: any): {
2
+ getLoading: import('vue').ComputedRef<any>;
3
+ setLoading: (loading: boolean) => void;
4
+ };
5
+ //# sourceMappingURL=useLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLoading.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useLoading.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG;;0BAYN,OAAO;EAKrC"}
@@ -0,0 +1,14 @@
1
+ import { BasicTableProps } from '../types/table';
2
+ import { PaginationProps } from '../types/pagination';
3
+ import { ComputedRef } from 'vue';
4
+
5
+ export declare function usePagination(refProps: {
6
+ value: BasicTableProps;
7
+ } | ComputedRef<BasicTableProps>): {
8
+ getPagination: () => boolean | PaginationProps;
9
+ getPaginationInfo: ComputedRef<boolean | PaginationProps>;
10
+ setShowPagination: (flag: boolean) => Promise<void>;
11
+ getShowPagination: () => boolean;
12
+ setPagination: (info: Partial<PaginationProps>) => void;
13
+ };
14
+ //# sourceMappingURL=usePagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/usePagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAqBvC,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC;;;8BAyCxD,OAAO;;0BAhBjB,QAAQ,eAAe,CAAC;EAqBtD"}
@@ -0,0 +1,208 @@
1
+ import { PropType, VNode } from 'vue';
2
+
3
+ /** 脱敏模式类型 */
4
+ export type MaskPattern = 'phone' | 'email' | 'idcard' | 'bankcard' | 'custom';
5
+ /** renderCopyable 配置项 */
6
+ export interface RenderCopyableOptions {
7
+ showIcon?: boolean;
8
+ iconStyle?: Record<string, unknown>;
9
+ tooltip?: string;
10
+ copyText?: string;
11
+ maxWidth?: string | number;
12
+ mask?: boolean;
13
+ maskPattern?: MaskPattern;
14
+ maskChar?: string;
15
+ maskStart?: number;
16
+ maskEnd?: number;
17
+ maskLength?: number;
18
+ }
19
+ /** renderTag 配置项 */
20
+ export interface RenderTagOptions {
21
+ color?: string;
22
+ maxWidth?: string | number;
23
+ style?: Record<string, unknown>;
24
+ }
25
+ /** renderImg 配置项 */
26
+ export interface RenderImgOptions {
27
+ size?: number | string;
28
+ shape?: 'circle' | 'square';
29
+ max?: number;
30
+ showBadge?: boolean;
31
+ }
32
+ /** renderEllipsisTooltip 配置项 */
33
+ export interface RenderEllipsisTooltipOptions {
34
+ width?: string | number;
35
+ style?: Record<string, unknown>;
36
+ }
37
+ /**
38
+ * 脱敏处理函数
39
+ */
40
+ declare function maskText(originalText: string, options: {
41
+ maskPattern: MaskPattern;
42
+ maskChar: string;
43
+ maskStart?: number;
44
+ maskEnd?: number;
45
+ maskLength?: number;
46
+ }): string;
47
+ /**
48
+ * 复制文本到剪贴板
49
+ */
50
+ declare function copyToClipboard(text: string, successMsg?: string, failMsg?: string): Promise<boolean>;
51
+ /**
52
+ * 渲染图片
53
+ * @param text 图片地址(单个或数组)
54
+ * @param options 配置项
55
+ */
56
+ declare function renderImg(text: string | string[], options?: RenderImgOptions): VNode;
57
+ /**
58
+ * 渲染头像
59
+ * @param src 头像地址
60
+ * @param name 名称(用于没有图片时显示首字)
61
+ * @param size 尺寸
62
+ */
63
+ declare function renderAvatar(src?: string, name?: string, size?: number): VNode;
64
+ /**
65
+ * 渲染日期
66
+ * @param text 日期字符串
67
+ * @param format 格式化字符串,默认 'YYYY-MM-DD HH:mm:ss'
68
+ */
69
+ declare function renderDate(text: string | undefined, format?: string): string;
70
+ /**
71
+ * 渲染相对时间(多久之前)
72
+ * @param text 日期字符串
73
+ */
74
+ declare function renderRelativeTime(text: string | undefined): string;
75
+ /**
76
+ * 渲染可复制文本(带复制图标)
77
+ */
78
+ declare function renderCopyable(text: string | number | undefined, options?: RenderCopyableOptions): VNode;
79
+ /**
80
+ * 渲染带脱敏的文本(不带复制图标)
81
+ */
82
+ declare function renderMasked(text: string | number | undefined, options: Omit<RenderCopyableOptions, 'showIcon'>): string;
83
+ /**
84
+ * 渲染标签
85
+ */
86
+ declare function renderTag(text: string | number | undefined, options?: RenderTagOptions): VNode;
87
+ /**
88
+ * 渲染多标签
89
+ */
90
+ declare function renderTags(texts: string[] | undefined, options?: RenderTagOptions): VNode;
91
+ /**
92
+ * 渲染链接
93
+ */
94
+ declare function renderLink(url: string | undefined, text?: string): VNode;
95
+ /**
96
+ * 渲染带省略号的文本
97
+ */
98
+ declare function renderText(text: string | number | undefined, suffix?: string): string;
99
+ /**
100
+ * 渲染带省略号和 Tooltip 的文本
101
+ */
102
+ declare function renderEllipsis(text: string | number | undefined, options?: RenderEllipsisTooltipOptions): VNode;
103
+ export declare const useRender: {
104
+ renderImg: typeof renderImg;
105
+ renderAvatar: typeof renderAvatar;
106
+ TableImg: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
107
+ imgList: {
108
+ type: PropType<string[]>;
109
+ default: () => never[];
110
+ };
111
+ size: {
112
+ type: PropType<string | number>;
113
+ default: number;
114
+ };
115
+ max: {
116
+ type: PropType<number>;
117
+ default: number;
118
+ };
119
+ }>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
120
+ [key: string]: any;
121
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
122
+ imgList: {
123
+ type: PropType<string[]>;
124
+ default: () => never[];
125
+ };
126
+ size: {
127
+ type: PropType<string | number>;
128
+ default: number;
129
+ };
130
+ max: {
131
+ type: PropType<number>;
132
+ default: number;
133
+ };
134
+ }>> & Readonly<{}>, {
135
+ size: string | number;
136
+ max: number;
137
+ imgList: string[];
138
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
139
+ renderDate: typeof renderDate;
140
+ renderRelativeTime: typeof renderRelativeTime;
141
+ renderCopyable: typeof renderCopyable;
142
+ renderMasked: typeof renderMasked;
143
+ copyToClipboard: typeof copyToClipboard;
144
+ renderTag: typeof renderTag;
145
+ renderTags: typeof renderTags;
146
+ renderLink: typeof renderLink;
147
+ renderText: typeof renderText;
148
+ renderEllipsis: typeof renderEllipsis;
149
+ maskText: typeof maskText;
150
+ };
151
+ export declare const renderFactory: {
152
+ /**
153
+ * 创建图片列渲染器
154
+ */
155
+ img: (options?: RenderImgOptions) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
156
+ [key: string]: any;
157
+ }>;
158
+ /**
159
+ * 创建头像列渲染器
160
+ */
161
+ avatar: (nameField?: string, size?: number) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
162
+ [key: string]: any;
163
+ }>;
164
+ /**
165
+ * 创建日期列渲染器
166
+ */
167
+ date: (format?: string) => (_: unknown, record: Record<string, unknown>, field: string) => string;
168
+ /**
169
+ * 创建相对时间列渲染器
170
+ */
171
+ relativeTime: () => (_: unknown, record: Record<string, unknown>, field: string) => string;
172
+ /**
173
+ * 创建可复制列渲染器
174
+ */
175
+ copyable: (options?: RenderCopyableOptions) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
176
+ [key: string]: any;
177
+ }>;
178
+ /**
179
+ * 创建脱敏列渲染器
180
+ */
181
+ masked: (options: Omit<RenderCopyableOptions, 'showIcon'>) => (_: unknown, record: Record<string, unknown>, field: string) => string;
182
+ /**
183
+ * 创建标签列渲染器
184
+ */
185
+ tag: (options?: RenderTagOptions) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
186
+ [key: string]: any;
187
+ }>;
188
+ /**
189
+ * 创建多标签列渲染器
190
+ */
191
+ tags: (options?: RenderTagOptions) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
192
+ [key: string]: any;
193
+ }>;
194
+ /**
195
+ * 创建链接列渲染器
196
+ */
197
+ link: (textField?: string) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
198
+ [key: string]: any;
199
+ }>;
200
+ /**
201
+ * 创建省略号列渲染器
202
+ */
203
+ ellipsis: (options?: RenderEllipsisTooltipOptions) => (_: unknown, record: Record<string, unknown>, field: string) => VNode<import('vue').RendererNode, import('vue').RendererElement, {
204
+ [key: string]: any;
205
+ }>;
206
+ };
207
+ export {};
208
+ //# sourceMappingURL=useRender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRender.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useRender.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAOnC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAA;AAShC,aAAa;AACb,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE9E,yBAAyB;AACzB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,IAAI,CAAC,EA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vue';
3
+ import { Key } from 'ant-design-vue/es/table/interface';
4
+
5
+ export declare function useRowSelection(propsRef: {
6
+ value: BasicTableProps;
7
+ } | ComputedRef<BasicTableProps>, _tableData: {
8
+ value: Record<string, any>[];
9
+ }, _emit?: (event: string, ...args: any[]) => void): {
10
+ getRowSelection: () => TableRowSelection<any>;
11
+ getRowSelectionRef: ComputedRef<TableRowSelection<any> | null>;
12
+ getSelectRows: <T = Recordable<any>>() => T[];
13
+ getSelectRowKeys: () => Key[];
14
+ setSelectedRowKeys: (keyValues?: Key[]) => void;
15
+ clearSelectedRowKeys: () => void;
16
+ deleteSelectRowByKey: (key: Key) => void;
17
+ setSelectedRows: (rows: Record<string, any>[]) => void;
18
+ };
19
+ //# sourceMappingURL=useRowSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRowSelection.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useRowSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAE7D,wBAAgB,eAAe,CAC7B,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC,EACnE,UAAU,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;CAAE,EAC5C,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;;;;;qCA0BP,GAAG,EAAE;;gCAgBV,GAAG;4BAZP,OAAO,MAAM,EAAE,GAAG,CAAC,EAAE;EA0CrD"}
@@ -0,0 +1,8 @@
1
+ export declare function useTableScrollTo(tableElRef: {
2
+ value: any;
3
+ }, getDataSourceRef: {
4
+ value: Record<string, any>[];
5
+ }): {
6
+ scrollTo: (pos: string) => void;
7
+ };
8
+ //# sourceMappingURL=useScrollTo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollTo.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useScrollTo.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE;IAAE,KAAK,EAAE,GAAG,CAAA;CAAE,EAC1B,gBAAgB,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;CAAE;oBAgB3B,MAAM,KAAG,IAAI;EA4BrC"}
@@ -0,0 +1,11 @@
1
+ import { BasicTableProps, TableActionType } from '../types/table';
2
+
3
+ type Props = Partial<BasicTableProps>;
4
+ export declare function useTable(tableProps?: Props): [
5
+ (instance: TableActionType, formInstance?: any) => void,
6
+ TableActionType & {
7
+ getForm?: () => any;
8
+ }
9
+ ];
10
+ export {};
11
+ //# sourceMappingURL=useTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTable.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAA4B,MAAM,gBAAgB,CAAC;AAOjG,KAAK,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAEtC,wBAAgB,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,GAAG;IAC5C,CAAC,QAAQ,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,IAAI;IACvD,eAAe,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAA;KAAE;CAC1C,CA4IA"}
@@ -0,0 +1,26 @@
1
+ import { Ref } from 'vue';
2
+ import { BasicColumn, TableRowSelection, SizeType, ColumnChangeParam } from '../types/table';
3
+
4
+ type TableContextInstance = {
5
+ reload: (opt?: any) => Promise<any>;
6
+ getSelectRows: <T = Record<string, any>>() => T[];
7
+ clearSelectedRowKeys: () => void;
8
+ getSelectRowKeys: () => (string | number)[];
9
+ setColumns: (columns: any[]) => void;
10
+ setLoading: (loading: boolean) => void;
11
+ setProps: (props: any) => void;
12
+ wrapRef: Ref<HTMLElement | null>;
13
+ getBindValues: Ref<Record<string, any>>;
14
+ getRowSelection: () => TableRowSelection<Record<string, any>>;
15
+ getSize: () => SizeType;
16
+ setCacheColumns?: (columns: BasicColumn[]) => void;
17
+ getColumns: (opt?: {
18
+ ignoreIndex?: boolean;
19
+ ignoreAction?: boolean;
20
+ }) => BasicColumn[];
21
+ onColumnsChange?: (data: ColumnChangeParam[]) => void;
22
+ };
23
+ export declare function createTableContext(instance: TableContextInstance): void;
24
+ export declare function useTableContext(): TableContextInstance;
25
+ export {};
26
+ //# sourceMappingURL=useTableContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableContext.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useTableContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAKlG,KAAK,oBAAoB,GAAG;IAC1B,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,aAAa,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;IAClD,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5C,UAAU,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACrC,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACjC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IACxC,eAAe,EAAE,MAAM,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAC9D,OAAO,EAAE,MAAM,QAAQ,CAAC;IACxB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IACnD,UAAU,EAAE,CAAC,GAAG,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,WAAW,EAAE,CAAC;IACvF,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;CACvD,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,QAEhE;AAED,wBAAgB,eAAe,IAAI,oBAAoB,CAEtD"}
@@ -0,0 +1,23 @@
1
+ import { BasicTableProps } from '../types/table';
2
+ import { ComputedRef } from 'vue';
3
+ import { Key } from 'ant-design-vue/es/table/interface';
4
+
5
+ export declare function useTableExpand(propsRef: {
6
+ value: BasicTableProps;
7
+ } | ComputedRef<BasicTableProps>, tableData: {
8
+ value: Record<string, any>[];
9
+ }, emit: (event: string, ...args: any[]) => void): {
10
+ getExpandOption: ComputedRef<{
11
+ expandedRowKeys?: undefined;
12
+ onExpandedRowsChange?: undefined;
13
+ } | {
14
+ expandedRowKeys: Key[];
15
+ onExpandedRowsChange: (keyValues: Key[]) => void;
16
+ }>;
17
+ expandAll: () => void;
18
+ collapseAll: () => void;
19
+ expandRows: (keyValues: Key[]) => void;
20
+ collapseRows: (keyValues: Key[]) => void;
21
+ handleTableExpand: (expanded: boolean, _record: Record<string, any>) => void;
22
+ };
23
+ //# sourceMappingURL=useTableExpand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableExpand.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useTableExpand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAE7D,wBAAgB,cAAc,CAC5B,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC,EACnE,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;CAAE,EAC3C,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;;;;;;0CAsBP,GAAG,EAAE;;;;4BAgBZ,GAAG,EAAE;8BAOH,GAAG,EAAE;kCAuBD,OAAO,WAAW,OAAO,MAAM,EAAE,GAAG,CAAC;EAmB3E"}
@@ -0,0 +1,18 @@
1
+ import { BasicTableProps, FetchParams } from '../types/table';
2
+ import { ComputedRef } from 'vue';
3
+
4
+ interface FormProps {
5
+ [key: string]: any;
6
+ }
7
+ export declare function useTableForm(propsRef: {
8
+ value: BasicTableProps;
9
+ } | ComputedRef<BasicTableProps>, slots: Record<string, any>, fetch: (opt?: FetchParams | undefined) => Promise<Record<string, any>[] | undefined>, getLoading: {
10
+ value: boolean | undefined;
11
+ }): {
12
+ getFormProps: ComputedRef<Partial<FormProps>>;
13
+ replaceFormSlotKey: (key: string) => string;
14
+ getFormSlotKeys: ComputedRef<string[]>;
15
+ handleSearchInfoChange: (info: Record<string, any>) => void;
16
+ };
17
+ export {};
18
+ //# sourceMappingURL=useTableForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableForm.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useTableForm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,UAAU,SAAS;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC,EACnE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,SAAS,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,EACpF,UAAU,EAAE;IAAE,KAAK,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE;;8BAqBT,MAAM;;mCAKD,OAAO,MAAM,EAAE,GAAG,CAAC;EAU1D"}
@@ -0,0 +1,12 @@
1
+ import { BasicTableProps, BasicColumn, TableRowSelection } from '../types/table';
2
+ import { ComputedRef, Ref } from 'vue';
3
+
4
+ export declare function useTableScroll(propsRef: ComputedRef<BasicTableProps>, tableElRef: Ref<any>, columnsRef: ComputedRef<BasicColumn[]>, rowSelectionRef: ComputedRef<TableRowSelection | null>, getDataSourceRef: Ref<Record<string, any>[]>, wrapRef: Ref<HTMLElement | null>): {
5
+ getScrollRef: ComputedRef<{
6
+ x: string | number | true | undefined;
7
+ y: string | number | undefined;
8
+ scrollToFirstRowOnChange: boolean;
9
+ }>;
10
+ redoHeight: () => void;
11
+ };
12
+ //# sourceMappingURL=useTableScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableScroll.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useTableScroll.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AA2B5C,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC,EACtC,UAAU,EAAE,GAAG,CAAC,GAAG,CAAC,EACpB,UAAU,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,EACtC,eAAe,EAAE,WAAW,CAAC,iBAAiB,GAAG,IAAI,CAAC,EACtD,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,EAC5C,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC;;;;;;;EAgVjC"}
@@ -0,0 +1,11 @@
1
+ import { BasicTableProps } from '../types/table';
2
+ import { ComputedRef } from 'vue';
3
+
4
+ export declare function useTableStyle(propsRef: {
5
+ value: BasicTableProps;
6
+ } | ComputedRef<BasicTableProps>, prefixCls: string): {
7
+ getRowClassName: (record: {
8
+ index?: number | undefined;
9
+ }, index: number) => string;
10
+ };
11
+ //# sourceMappingURL=useTableStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableStyle.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Table/src/hooks/useTableStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAEvC,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,GAAG,WAAW,CAAC,eAAe,CAAC,EAAE,SAAS,EAAE,MAAM;;;cACtD,MAAM;EAcnE"}