@gx-design-vue/pro-table 0.2.0-beta.3 → 0.2.0-beta.30

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 (38) hide show
  1. package/dist/ProTable.d.ts +279 -156
  2. package/dist/_utils/ant-design-vue/index.d.ts +1 -0
  3. package/dist/_utils/ant-design-vue/spin/typings.d.ts +1 -0
  4. package/dist/_utils/ant-design-vue/table/typings.d.ts +1 -0
  5. package/dist/_utils/index.d.ts +0 -1
  6. package/dist/components/ColumnSetting/index.d.ts +27 -3
  7. package/dist/components/ColumnSetting/style.d.ts +3 -0
  8. package/dist/components/Form/index.d.ts +7 -7
  9. package/dist/components/Form/style.d.ts +3 -0
  10. package/dist/components/ListToolBar/index.d.ts +1 -2
  11. package/dist/components/ListToolBar/style.d.ts +3 -0
  12. package/dist/components/ToolBar/FullscreenIcon.d.ts +1 -2
  13. package/dist/components/ToolBar/index.d.ts +0 -1
  14. package/dist/context/TableContext.d.ts +3 -4
  15. package/dist/hooks/useFetchData.d.ts +3 -3
  16. package/dist/hooks/useLoading.d.ts +2 -10
  17. package/dist/hooks/useRowSelection.d.ts +2 -2
  18. package/dist/index.d.ts +1 -7
  19. package/dist/pro-table.mjs +26515 -16795
  20. package/dist/pro-table.umd.js +249 -19
  21. package/dist/props.d.ts +124 -73
  22. package/dist/style.d.ts +3 -0
  23. package/dist/types/TableTypings.d.ts +5 -6
  24. package/dist/utils/utils.d.ts +1 -1
  25. package/package.json +7 -9
  26. package/dist/_utils/typings.d.ts +0 -9
  27. package/dist/components/ColumnSetting/style.less +0 -93
  28. package/dist/components/Form/style.less +0 -35
  29. package/dist/components/ListToolBar/style.less +0 -63
  30. package/dist/components/ToolBar/style.less +0 -16
  31. package/dist/design/ant-design-theme.less +0 -3
  32. package/dist/design/ant-design-vue.less +0 -19
  33. package/dist/design/config.less +0 -2
  34. package/dist/proTable.less +0 -5
  35. package/dist/style/index.less +0 -186
  36. package/dist/style/table.less +0 -34
  37. package/dist/style.css +0 -1
  38. package/dist/style.less +0 -3
@@ -1,3 +1,4 @@
1
+ export * from './spin/typings';
1
2
  export * from './pagination/typings';
2
3
  export * from './table/typings';
3
4
  export * from './table/props';
@@ -0,0 +1 @@
1
+ export type { SpinProps } from 'ant-design-vue';
@@ -3,6 +3,7 @@ import type { FilterValue, SorterResult } from 'ant-design-vue/es/table/interfac
3
3
  import type { RecordType } from '@gx-design-vue/pro-utils';
4
4
  export type { TablePaginationConfig, TableRowSelection } from 'ant-design-vue/es/table/interface';
5
5
  export type { Key } from 'ant-design-vue/es/vc-table/interface';
6
+ export type { ChangeEvent } from 'ant-design-vue/es/_util/EventInterface';
6
7
  export type TableFilters = Record<string, FilterValue | null>;
7
8
  export type TableSorterRecord = SorterResult<RecordType>;
8
9
  export type TableSorter = TableSorterRecord | TableSorterRecord[];
@@ -1,4 +1,3 @@
1
1
  export { initDefaultProps } from 'ant-design-vue/es/_util/props-util';
2
2
  export { noteOnce, warning } from 'ant-design-vue/es/vc-util/warning';
3
- export * from './typings';
4
3
  export * from './ant-design-vue';
@@ -1,11 +1,35 @@
1
- import type { FunctionalComponent as FC } from 'vue';
1
+ import type { PropType } from 'vue';
2
2
  import type { SettingExtraRender } from '../../types/SlotsTypings';
3
- import './style.less';
4
3
  export type ColumnSettingProps = {
5
4
  draggable?: boolean;
6
5
  checkable?: boolean;
7
6
  extra?: SettingExtraRender;
8
7
  checkedReset?: boolean;
9
8
  };
10
- declare const ColumnSetting: FC<ColumnSettingProps>;
9
+ declare const ColumnSetting: import("vue").DefineComponent<{
10
+ draggable: {
11
+ type: PropType<boolean | undefined>;
12
+ default: undefined;
13
+ };
14
+ checkable: {
15
+ type: PropType<boolean | undefined>;
16
+ default: undefined;
17
+ };
18
+ checkedReset: PropType<boolean | undefined>;
19
+ extra: PropType<SettingExtraRender>;
20
+ }, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ draggable: {
22
+ type: PropType<boolean | undefined>;
23
+ default: undefined;
24
+ };
25
+ checkable: {
26
+ type: PropType<boolean | undefined>;
27
+ default: undefined;
28
+ };
29
+ checkedReset: PropType<boolean | undefined>;
30
+ extra: PropType<SettingExtraRender>;
31
+ }>>, {
32
+ checkable: boolean | undefined;
33
+ draggable: boolean | undefined;
34
+ }>;
11
35
  export default ColumnSetting;
@@ -0,0 +1,3 @@
1
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
2
+ import type { ProAliasToken } from '@gx-design-vue/pro-provider';
3
+ export declare const genColumnSettingStyle: GenerateStyle<ProAliasToken>;
@@ -1,11 +1,11 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { RecordType } from '@gx-design-vue/pro-utils';
3
+ import type { SearchConfig } from '../../types/TableTypings';
3
4
  import type { ProSearchMap } from '../../types/ColumnTypings';
4
- import './style.less';
5
5
  declare const ProTableForm: import("vue").DefineComponent<{
6
6
  search: {
7
- type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
8
- default: () => import("../../types/TableTypings").SearchConfig;
7
+ type: PropType<SearchConfig>;
8
+ default: () => SearchConfig;
9
9
  };
10
10
  modal: PropType<boolean | undefined>;
11
11
  searchMap: {
@@ -15,10 +15,10 @@ declare const ProTableForm: import("vue").DefineComponent<{
15
15
  loading: PropType<boolean>;
16
16
  prefixCls: PropType<string>;
17
17
  defaultParams: PropType<RecordType>;
18
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
+ }, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
19
  search: {
20
- type: PropType<import("../../types/TableTypings").SearchConfig | undefined>;
21
- default: () => import("../../types/TableTypings").SearchConfig;
20
+ type: PropType<SearchConfig>;
21
+ default: () => SearchConfig;
22
22
  };
23
23
  modal: PropType<boolean | undefined>;
24
24
  searchMap: {
@@ -31,7 +31,7 @@ declare const ProTableForm: import("vue").DefineComponent<{
31
31
  }>> & {
32
32
  onSearch?: ((...args: any[]) => any) | undefined;
33
33
  }, {
34
- search: import("../../types/TableTypings").SearchConfig | undefined;
34
+ search: SearchConfig;
35
35
  searchMap: ProSearchMap<"text">[];
36
36
  }>;
37
37
  export default ProTableForm;
@@ -0,0 +1,3 @@
1
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
2
+ import type { ProAliasToken } from '@gx-design-vue/pro-provider';
3
+ export declare const genTableFormStyle: GenerateStyle<ProAliasToken>;
@@ -1,6 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { VueNode } from '@gx-design-vue/pro-utils';
3
- import './style.less';
4
3
  export type ListToolBarSetting = {
5
4
  icon: VueNode;
6
5
  tooltip?: string;
@@ -30,7 +29,7 @@ declare const ListToolBar: import("vue").DefineComponent<{
30
29
  type: PropType<import("../../types/SlotsTypings").OptionsExtraRender>;
31
30
  default: () => undefined;
32
31
  };
33
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
32
+ }, () => import("ant-design-vue/es/_util/type").VueNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
33
  actions: {
35
34
  type: PropType<import("../../types/SlotsTypings").ToolBarBtnRender>;
36
35
  default: () => undefined;
@@ -0,0 +1,3 @@
1
+ import type { GenerateStyle } from 'ant-design-vue/es/theme/internal';
2
+ import type { ProAliasToken } from '@gx-design-vue/pro-provider';
3
+ export declare const genListToolBarStyle: GenerateStyle<ProAliasToken>;
@@ -1,3 +1,2 @@
1
- import type { FunctionalComponent as FC } from 'vue';
2
- declare const FullScreenIcon: FC;
1
+ declare const FullScreenIcon: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3
2
  export default FullScreenIcon;
@@ -1,6 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { ProTableProps, OptionConfig } from '../../types/TableTypings';
3
- import './style.less';
4
3
  export type OptionsFunctionType = () => void;
5
4
  export type ToolBarProps = {
6
5
  headerTitle?: ProTableProps['headerTitle'];
@@ -4,7 +4,6 @@ import type { SizeType } from '@gx-design-vue/pro-utils';
4
4
  import type { ProColumnsType } from '../types/ColumnTypings';
5
5
  import type { ColumnsState, SettingsAction } from '../hooks/useColumnSetting';
6
6
  import type { PaginationProps } from '../_utils';
7
- export type ContextType = any;
8
7
  export interface TableContextProps {
9
8
  columns?: ComputedRef<ProColumnsType>;
10
9
  cacheColumns?: ComputedRef<ProColumnsType>;
@@ -21,6 +20,6 @@ export interface TableContextProps {
21
20
  changeColumns: (map: Record<string, ColumnsState>, fixed: boolean) => void;
22
21
  [key: string]: any;
23
22
  }
24
- export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<ContextType>, defaultValue?: ContextType) => T;
25
- export declare const provideTableContext: (value: TableContextProps | ComputedRef<TableContextProps>) => void;
26
- export declare const useTableContext: () => Required<TableContextProps>;
23
+ export declare const useContext: <T>(contextInjectKey?: string | InjectionKey<T>, defaultValue?: T | undefined) => T;
24
+ export declare const provideTableContext: (value: TableContextProps) => void;
25
+ export declare const useTableContext: (defaultValue?: Required<TableContextProps>) => Required<TableContextProps>;
@@ -1,13 +1,13 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
- import type { SpinProps, TableSorter } from '../_utils';
2
+ import type { TableSorter } from '../_utils';
3
3
  import type { RecordType } from '@gx-design-vue/pro-utils';
4
4
  import type { ProTableProps, ProTablePagination, ProTabelFeachParams, ProTablePaginationConfig } from '../types/TableTypings';
5
5
  import type { ProColumnsType } from '../types/ColumnTypings';
6
6
  interface ActionType {
7
- getLoading: ComputedRef<boolean | SpinProps | undefined>;
7
+ getLoading: ComputedRef<boolean | undefined>;
8
8
  getPaginationInfo: ComputedRef<ProTablePagination>;
9
9
  setPagination: (info: Partial<ProTablePagination>) => void;
10
- setLoading: (loading: boolean | SpinProps) => void;
10
+ setLoading: (loading: boolean) => void;
11
11
  setColumns: (columnList: ProColumnsType) => void;
12
12
  removeRowKeys: (keyList: (string | number)[]) => void;
13
13
  syncSelectedRows: (dataList: any[]) => void;
@@ -4,14 +4,6 @@ export declare function useLoading({ emit, loading }: {
4
4
  loading: Ref<boolean | SpinProps | undefined>;
5
5
  emit: any;
6
6
  }): {
7
- getLoading: import("vue").ComputedRef<boolean | {
8
- prefixCls?: string | undefined;
9
- spinning?: boolean | undefined;
10
- size?: "small" | "default" | "large" | undefined;
11
- wrapperClassName?: string | undefined;
12
- tip?: string | undefined;
13
- delay?: number | undefined;
14
- indicator?: any;
15
- }>;
16
- setLoading: (loading: boolean | SpinProps) => void;
7
+ getLoading: import("vue").ComputedRef<boolean>;
8
+ setLoading: (loading: boolean) => void;
17
9
  };
@@ -1,7 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
2
  import type { RecordType } from '@gx-design-vue/pro-utils';
3
- import type { ProTableProps } from '../types/TableTypings';
4
- export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableProps['rowSelection']>): {
3
+ import type { ProTableProps, ProTableRowSelection } from '../types/TableTypings';
4
+ export declare function useRowSelection(rowKey: Ref<ProTableProps['rowKey']>, rowSelection: Ref<ProTableRowSelection | undefined>): {
5
5
  selectedKey: Ref<(string | number)[]>;
6
6
  selectRowKey: (record: RecordType, selected: any[]) => void;
7
7
  selectAllRowKey: (selected: any[], selectedRows: any[], changeRows: any[]) => void;
package/dist/index.d.ts CHANGED
@@ -1,14 +1,8 @@
1
- import './design/config.less';
2
- import './design/ant-design-theme.less';
3
- import './design/ant-design-vue.less';
4
- import './style/table.less';
5
- import './proTable.less';
6
- import './style.less';
7
1
  import { useTable } from './hooks/useTable';
8
2
  export { proTableProps } from './props';
9
3
  export { default } from './ProTable';
10
4
  export type { ProTableProps } from './types/TableTypings';
11
- export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType } from './types/TableTypings';
5
+ export type { RequsetFunction, ProTableRef, ProCoreActionType, ProTabelFeachParams, ProCoreFormType, OptionConfig, SearchConfig } from './types/TableTypings';
12
6
  export type { ProColumnType, ProColumnsType, ProSearchMap } from './types/ColumnTypings';
13
7
  export { useTable };
14
8
  export { default as GProTable } from './ProTable';