@gx-design-vue/pro-table 0.0.2 → 0.0.3-rc.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 (48) hide show
  1. package/dist/ProTable.d.ts +95 -95
  2. package/dist/_utils/ant-design-vue/table/props.d.ts +2 -1
  3. package/dist/_utils/ant-design-vue/table/typings.d.ts +1 -0
  4. package/dist/_utils/index.d.ts +0 -1
  5. package/dist/components/ColumnSetting/index.d.ts +1 -0
  6. package/dist/components/ColumnSetting/style.less +1 -3
  7. package/dist/components/Form/index.d.ts +1 -0
  8. package/dist/components/Form/style.less +1 -8
  9. package/dist/components/Form/useForm.d.ts +1 -0
  10. package/dist/components/ListToolBar/index.d.ts +13 -12
  11. package/dist/components/ListToolBar/style.less +1 -0
  12. package/dist/components/ToolBar/index.d.ts +1 -0
  13. package/dist/components/ToolBar/style.less +5 -29
  14. package/dist/context/TableContext.d.ts +2 -1
  15. package/dist/design/ant-design-theme.less +4 -0
  16. package/dist/design/ant-design-vue.less +19 -0
  17. package/dist/design/config.less +0 -5
  18. package/dist/hooks/useDebounceFn.d.ts +1 -5
  19. package/dist/hooks/useFetchData.d.ts +6 -4
  20. package/dist/hooks/useLoading.d.ts +1 -1
  21. package/dist/hooks/useRowSelection.d.ts +2 -0
  22. package/dist/hooks/useTableForm.d.ts +1 -0
  23. package/dist/hooks/useTableScroll.d.ts +1 -0
  24. package/dist/hooks/useTableSize.d.ts +1 -1
  25. package/dist/index.d.ts +7 -1
  26. package/dist/pro-table.less +5 -0
  27. package/dist/pro-table.mjs +1178 -1251
  28. package/dist/pro-table.umd.js +1 -1
  29. package/dist/props.d.ts +40 -22
  30. package/dist/style/index.less +18 -0
  31. package/dist/style/table.less +0 -8
  32. package/dist/style.css +1 -1
  33. package/dist/style.less +3 -5
  34. package/dist/types/column.d.ts +11 -3
  35. package/dist/types/table.d.ts +30 -19
  36. package/dist/typing.d.ts +9 -0
  37. package/dist/utils/config.d.ts +1 -0
  38. package/dist/utils/utils.d.ts +2 -0
  39. package/package.json +11 -12
  40. package/dist/_utils/gx-design-vue/extract-public-props.d.ts +0 -7
  41. package/dist/_utils/gx-design-vue/index.d.ts +0 -2
  42. package/dist/_utils/gx-design-vue/typings.d.ts +0 -1
  43. package/dist/hooks/core/index.d.ts +0 -3
  44. package/dist/hooks/core/useMemo.d.ts +0 -10
  45. package/dist/hooks/core/useTimeout.d.ts +0 -11
  46. package/dist/typings/components.d.ts +0 -6
  47. package/dist/utils/index.d.ts +0 -86
  48. package/dist/utils/validate.d.ts +0 -25
@@ -1,10 +1,6 @@
1
- import type { ProTabelFeachParams } from '../types/table';
2
1
  export declare type ReturnValue<T extends any[]> = {
3
2
  run: (...args: T) => void;
4
3
  cancel: () => void;
5
4
  };
6
- declare function useDebounceFn<T extends any[]>(fn: (...args: T) => Promise<any>, wait?: number): {
7
- cancel: () => void;
8
- run: (...args: ProTabelFeachParams[]) => Promise<void>;
9
- };
5
+ declare function useDebounceFn<T extends any[]>(fn: (...args: T) => Promise<any>, wait?: number): ReturnValue<T>;
10
6
  export default useDebounceFn;
@@ -1,6 +1,7 @@
1
1
  import type { ComputedRef } from 'vue';
2
2
  import type { SpinProps } from '../_utils';
3
3
  import type { ProTableProps } from '../ProTable';
4
+ import type { RecordType } from '../typing';
4
5
  import type { ProTablePagination, ProTablePaginationConfig } from '../types/table';
5
6
  import type { ProColumns } from '../types/column';
6
7
  interface ActionType {
@@ -10,9 +11,10 @@ interface ActionType {
10
11
  setLoading: (loading: boolean | SpinProps) => void;
11
12
  setColumns: (columnList: ProColumns) => void;
12
13
  removeRowKeys: (keyList: (string | number)[]) => void;
14
+ syncSelectedRows: (dataList: any[]) => void;
13
15
  columns: ComputedRef<ProColumns>;
14
16
  formParamsRef: RecordType;
15
- beforeSearchSubmit: ProTableProps['beforeSearchSubmit'];
17
+ onBeforeSearchSubmit: ProTableProps['onBeforeSearchSubmit'];
16
18
  }
17
19
  export declare type ConfigFetchData = {
18
20
  polling: ComputedRef<ProTableProps['polling']>;
@@ -23,13 +25,13 @@ export declare type ConfigFetchData = {
23
25
  dataSource: ComputedRef<ProTableProps['dataSource']>;
24
26
  };
25
27
  export declare function useConfigFetchData(props: ProTableProps): ConfigFetchData;
26
- export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime, }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, formParamsRef, setPagination, getPaginationInfo, beforeSearchSubmit }: ActionType, emit: any): {
28
+ export declare function useFetchData({ polling, request, postData, dataSource, waitRequest, debounceTime, }: ConfigFetchData, { columns, getLoading, setLoading, setColumns, removeRowKeys, syncSelectedRows, formParamsRef, setPagination, getPaginationInfo, onBeforeSearchSubmit }: ActionType, emit: any): {
27
29
  getDataSourceRef: ComputedRef<RecordType[]>;
28
30
  isTreeDataRef: ComputedRef<boolean>;
29
31
  reSetDataList: (list: RecordType[]) => void;
30
- changeDataValue: ({ key, value }: {
32
+ changeDataValue: ({ key, params }: {
31
33
  key?: string | undefined;
32
- value: RecordType;
34
+ params: RecordType;
33
35
  }) => void;
34
36
  handleTableChange: (pagination: ProTablePaginationConfig, filters: any, sorter: any) => void;
35
37
  reload: (info?: any) => Promise<void>;
@@ -7,7 +7,7 @@ export declare function useLoading({ emit, loading }: {
7
7
  getLoading: import("vue").ComputedRef<boolean | {
8
8
  prefixCls?: string | undefined;
9
9
  spinning?: boolean | undefined;
10
- size?: "small" | "default" | "large" | undefined;
10
+ size?: "small" | "large" | "default" | undefined;
11
11
  wrapperClassName?: string | undefined;
12
12
  tip?: string | undefined;
13
13
  delay?: number | undefined;
@@ -1,4 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
+ import type { RecordType } from '../typing';
2
3
  import type { ProTableProps } from '../ProTable';
3
4
  export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableProps['rowSelection']>): {
4
5
  selectedKey: Ref<(string | number)[]>;
@@ -6,4 +7,5 @@ export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, ro
6
7
  selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
7
8
  removeRowKeys: (keyList: (string | number)[]) => void;
8
9
  changeRowKey: () => void;
10
+ syncSelectedRows: (dataList: any[]) => void;
9
11
  };
@@ -1,4 +1,5 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
+ import type { RecordType } from '../typing';
2
3
  import type { ProTableProps } from '../ProTable';
3
4
  import type { SearchConfig } from '../types/table';
4
5
  import type { ProSearchMap } from '../types/column';
@@ -1,4 +1,5 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
+ import type { Breakpoint } from '../typing';
2
3
  import type { ProTableProps } from '../ProTable';
3
4
  import type { ProColumns } from '../types/column';
4
5
  declare type ConfigScroll = {
@@ -1,5 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
- import type { SizeType } from '../_utils';
2
+ import type { SizeType } from '../typing';
3
3
  export declare function useTableSize({ size, emit }: {
4
4
  size: Ref<SizeType>;
5
5
  emit: any;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  import './design/config.less';
2
+ import './design/ant-design-theme.less';
3
+ import './design/ant-design-vue.less';
2
4
  import './style/table.less';
5
+ import './pro-table.less';
3
6
  import './style.less';
4
- export { default as ProTable } from './ProTable';
5
7
  export { proTableProps } from './props';
8
+ export { default } from './ProTable';
6
9
  export type { ProTableProps } from './ProTable';
10
+ export type { RequsetFunction, ProCoreActionTypeConfig, ProTabelFeachParams } from './types/table';
11
+ export type { ProColumn, ProColumns } from './types/column';
12
+ export { default as ProTable } from './ProTable';
@@ -0,0 +1,5 @@
1
+ @import './style/index.less';
2
+ @import './components/ColumnSetting/style.less';
3
+ @import './components/Form/style.less';
4
+ @import './components/ListToolBar/style.less';
5
+ @import './components/ToolBar/style.less';