@pisell/materials 1.0.837 → 1.0.839

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 (71) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +3 -3
  6. package/build/lowcode/view.js +3 -3
  7. package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +5 -1
  8. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +3 -3
  9. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +4 -3
  10. package/es/components/pisellDraggable/components/TreeItem/index.d.ts +1 -1
  11. package/es/components/pisellDraggable/components/TreeItem/index.js +1 -1
  12. package/es/components/pisellDraggable/index.js +6 -4
  13. package/es/components/pisellDropSort/PisellDropSort.d.ts +5 -0
  14. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +26 -0
  15. package/es/components/pisellDropSort/types.d.ts +58 -0
  16. package/es/components/pisellMenu/PisellMenu.js +1 -0
  17. package/es/components/pisellNavigationMenu/types.d.ts +79 -0
  18. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +5 -1
  19. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +3 -3
  20. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +4 -7
  21. package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +1 -1
  22. package/lib/components/pisellDraggable/components/TreeItem/index.js +12 -2
  23. package/lib/components/pisellDraggable/index.js +3 -1
  24. package/lib/components/pisellDropSort/PisellDropSort.d.ts +5 -0
  25. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +26 -0
  26. package/lib/components/pisellDropSort/types.d.ts +58 -0
  27. package/lib/components/pisellMenu/PisellMenu.js +1 -0
  28. package/lib/components/pisellNavigationMenu/types.d.ts +79 -0
  29. package/package.json +3 -3
  30. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
  31. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -98
  32. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -16
  33. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
  34. package/es/components/dataSourceComponents/fields/utils.d.ts +0 -3
  35. package/es/components/pisell-config-provider/index.d.ts +0 -12
  36. package/es/components/pisellGoodPassCard/index.d.ts +0 -49
  37. package/es/components/pisellMenu/PisellMenu.d.ts +0 -9
  38. package/es/components/productCard/components/AmountFooter/index.d.ts +0 -3
  39. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
  40. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
  41. package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -2
  42. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
  43. package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  44. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
  45. package/es/components/table/Gallery/index.d.ts +0 -5
  46. package/es/components/table/Table/index.d.ts +0 -4
  47. package/es/components/table/Table/utils.d.ts +0 -173
  48. package/es/components/table/hooks/useTableSetting.d.ts +0 -22
  49. package/es/components/table/hooks/useTransDataSource.d.ts +0 -12
  50. package/es/index.d.ts +0 -142
  51. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
  52. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -98
  53. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -16
  54. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
  55. package/lib/components/dataSourceComponents/fields/utils.d.ts +0 -3
  56. package/lib/components/pisell-config-provider/index.d.ts +0 -12
  57. package/lib/components/pisellGoodPassCard/index.d.ts +0 -49
  58. package/lib/components/pisellMenu/PisellMenu.d.ts +0 -9
  59. package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -3
  60. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
  61. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
  62. package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -2
  63. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
  64. package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  65. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
  66. package/lib/components/table/Gallery/index.d.ts +0 -5
  67. package/lib/components/table/Table/index.d.ts +0 -4
  68. package/lib/components/table/Table/utils.d.ts +0 -173
  69. package/lib/components/table/hooks/useTableSetting.d.ts +0 -22
  70. package/lib/components/table/hooks/useTransDataSource.d.ts +0 -12
  71. package/lib/index.d.ts +0 -142
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import { FormInstance } from 'antd';
3
- import { ModeType } from './type';
4
- import './style.less';
5
- export interface WithModeProps {
6
- renderMode?: ModeType;
7
- value?: any;
8
- onChange?: (value: any) => void;
9
- [key: string]: any;
10
- }
11
- /**
12
- * @title: 增加renderMode属性
13
- * @description: 基于renderMode属性控制渲染模式
14
- * @return: *
15
- * @Author: shengjie.zuo
16
- * @Date: 2024-11-23 17:13:18
17
- */
18
- export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
19
- renderMode: ModeType;
20
- }> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
21
- export interface WithFormItemProps {
22
- name: string;
23
- label?: string;
24
- mode?: ModeType;
25
- [key: string]: any;
26
- }
27
- export declare const formItemNameReplace: (name: string) => string;
28
- export declare const formItemNameReverse: (name: string) => string;
29
- export declare const isValidDomain: (value: string) => boolean;
30
- /**
31
- * @title: 追加formItem层
32
- * @description:
33
- * @return: *
34
- * @Author: shengjie.zuo
35
- * @Date: 2024-11-23 17:14:25
36
- */
37
- export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, overlayProps?: {
38
- otherFormItemProps?: Record<string, any> | ((props: Record<string, any>, others?: Record<string, any>) => Record<string, any>) | undefined;
39
- innerProps?: Record<string, any> | undefined;
40
- } | undefined) => React.FC<P & WithFormItemProps>;
41
- export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
42
- dataSource?: any;
43
- }) => JSX.Element;
44
- export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
45
- options?: any;
46
- optionSourceType?: "default" | "custom" | "api" | undefined;
47
- labelField: string;
48
- valueField: string;
49
- extraParams?: Record<string, any> | undefined;
50
- }) => JSX.Element;
51
- export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
52
- export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => JSX.Element | null;
53
- export declare function toArr(str: string | number | (string | number)[]): (string | number)[];
54
- export declare const filterSystemFields: (params: Record<string, any>) => Record<string, any>;
55
- export declare const transformFormObjToArrayWithUntouched: (obj: Record<string, any>) => any[];
56
- export declare const setFormFieldsUntouched: (form: FormInstance) => void;
@@ -1,98 +0,0 @@
1
- import React from 'react';
2
- import { DataSourceTableProps } from '../type';
3
- import { OperationItem } from '../type';
4
- interface UseTablePropsProps {
5
- data: any;
6
- originProps: DataSourceTableProps;
7
- openDrawer: (type: OperationItem) => void;
8
- closeDrawer: () => void;
9
- refreshData: () => void;
10
- handleFilterChange: (changedFields: any, allFields: any) => void;
11
- tableRef: any;
12
- }
13
- /**
14
- * 处理table的props
15
- * 转换title
16
- * @param props
17
- * @returns
18
- */
19
- declare const useTableProps: (props: UseTablePropsProps) => {
20
- title: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
21
- pagination: {
22
- total: number;
23
- current: number;
24
- pageSize: number;
25
- size: string;
26
- showSizeChanger: boolean;
27
- };
28
- columns: import("./useColumns").Column[];
29
- subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
30
- buttons: any[] | null;
31
- filter: JSX.Element | null;
32
- onRow: (record: any) => any;
33
- actionButtons: any[] | null;
34
- titleButtons?: {
35
- show: boolean;
36
- maxCount: number;
37
- items: OperationItem[];
38
- } | undefined;
39
- tableButtons?: {
40
- show: boolean;
41
- maxCount: number;
42
- items: OperationItem[];
43
- } | undefined;
44
- operation?: {
45
- show: boolean;
46
- title: string; /**
47
- * 处理table的props
48
- * 转换title
49
- * @param props
50
- * @returns
51
- */
52
- width: number;
53
- align: "center" | "left" | "right";
54
- fixed: false | "left" | "right";
55
- type: "button" | "link";
56
- items: OperationItem[];
57
- } | undefined;
58
- operationContent?: {
59
- [key: string]: React.ReactNode;
60
- } | undefined;
61
- dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
62
- search?: {
63
- show: boolean;
64
- placeholder: string;
65
- } | undefined;
66
- __designMode: string;
67
- componentId: string;
68
- clickToDetail?: {
69
- show: boolean;
70
- useCustomAction: boolean;
71
- actionType: string;
72
- openMode: "modal" | "drawer";
73
- openContentSize: "large" | "middle" | "small";
74
- openTitle: string;
75
- key: string;
76
- } | undefined;
77
- filterBy?: Record<string, any> | undefined;
78
- sortBy: string;
79
- tabs?: {
80
- show: boolean;
81
- type: string;
82
- items: {
83
- name: string;
84
- filterBy: Record<string, any>;
85
- sortBy: string;
86
- }[];
87
- } | undefined;
88
- onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
89
- onDeleteFinish?: ((record: Record<string, any>) => void) | undefined;
90
- extraParams?: {
91
- list?: Record<string, any> | undefined;
92
- get?: Record<string, any> | undefined;
93
- update?: Record<string, any> | undefined;
94
- create?: Record<string, any> | undefined;
95
- destroy?: Record<string, any> | undefined;
96
- } | undefined;
97
- };
98
- export default useTableProps;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { InputProps } from 'antd';
3
- import { ModeType } from "../../dataSourceForm/type";
4
- declare type PhoneValue = string | {
5
- phone: string;
6
- countryCallingCode: string;
7
- };
8
- export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
- renderMode: ModeType;
10
- value?: PhoneValue;
11
- onChange?: (value: PhoneValue) => void;
12
- returnFormat?: 'string' | 'object';
13
- inputRef?: any;
14
- }
15
- declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
16
- export default MobileNumberInputWithMode;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { InputProps } from 'antd';
3
- import { ModeType } from "../../dataSourceForm/type";
4
- declare type PhoneValue = string | {
5
- phone: string;
6
- countryCallingCode: string;
7
- };
8
- export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
- renderMode: ModeType;
10
- value?: PhoneValue;
11
- onChange?: (value: PhoneValue) => void;
12
- returnFormat?: 'string' | 'object';
13
- inputRef?: any;
14
- }
15
- declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
16
- export default PhoneNumberInputWithMode;
@@ -1,3 +0,0 @@
1
- import { FormFieldFilterFuncMapType } from './type';
2
- declare const formFieldFilterFuncMap: FormFieldFilterFuncMapType;
3
- export { formFieldFilterFuncMap };
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { PisellContextType } from './context';
3
- interface PisellConfigProviderType {
4
- platform?: PisellContextType['platform'];
5
- children: React.ReactNode;
6
- /** 货币符号 */
7
- symbol?: string;
8
- /** 当前语言环境 */
9
- locale?: string;
10
- }
11
- declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
12
- export default PisellConfigProvider;
@@ -1,49 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface ApplicableProductDetails {
4
- amount: string;
5
- type: string;
6
- resource_id: number;
7
- title: string;
8
- original_amount: string;
9
- }
10
- interface Discount {
11
- id: number;
12
- product_name: string;
13
- encoded: string;
14
- code: string;
15
- tag: string;
16
- expire_time?: string;
17
- product_id: number;
18
- relation_type: string;
19
- par_value: string;
20
- used_par_value: string;
21
- limit_status: string;
22
- limited_relation_product_data: any;
23
- balance: string;
24
- format_title: any;
25
- product: any;
26
- savedAmount: number;
27
- isDisabled: boolean;
28
- isSelected?: boolean;
29
- isAvailable?: boolean;
30
- isUsed?: boolean;
31
- applicableProductIds?: number[];
32
- applicableProductDetails: ApplicableProductDetails[];
33
- appliedProductDetails: any[];
34
- }
35
- export interface PisellGoodPassCardProps {
36
- /**数据源 */
37
- dataSource: Array<Discount>;
38
- /**事件 */
39
- onChange?: (current: {
40
- id: string | number;
41
- isSelected: boolean;
42
- }) => void;
43
- /**样式 */
44
- style: React.CSSProperties;
45
- /**快捷展示排序 */
46
- mixedSort?: (val: Discount[]) => Discount[];
47
- }
48
- declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
49
- export default index;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './PisellMenu.less';
3
- import type { PisellMenuProps } from './types';
4
- declare const PisellMenu: {
5
- ({ className, style, mode, theme, defaultOpenKeys, defaultSelectedKeys, inlineCollapsed, openKeys, selectedKeys, onOpenChange, onSelect, dataSource, __designMode, children, other, ...restProps }: PisellMenuProps): JSX.Element;
6
- Item: Omit<React.FunctionComponent<import("antd").MenuItemProps>, ""> & (<T extends import("antd").MenuItemProps>(props: T extends infer U extends import("antd").MenuItemProps ? unknown extends U ? import("antd").MenuItemProps : U : import("antd").MenuItemProps, context?: any) => React.ReactElement<any, any> | null);
7
- SubMenu: React.FC<import("antd").SubMenuProps>;
8
- };
9
- export default PisellMenu;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Footer: ({ item, hideDivider, type, isOnlyTotal }: any) => JSX.Element;
3
- export default Footer;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const SelectHolder: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
3
- export default SelectHolder;
@@ -1,13 +0,0 @@
1
- import './index.less';
2
- interface SelectHolderModalProps {
3
- visible: boolean;
4
- onClose: () => void;
5
- onConfirm: (value: any) => void;
6
- lists: any[];
7
- value: any[];
8
- holderMaxCount: number;
9
- addHolderButtonText: string;
10
- onAdd: () => void;
11
- }
12
- declare const SelectHolderModal: (props: SelectHolderModalProps) => JSX.Element;
13
- export default SelectHolderModal;
@@ -1,2 +0,0 @@
1
- declare const SelectHolderMultiple: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
2
- export default SelectHolderMultiple;
@@ -1,18 +0,0 @@
1
- import './index.less';
2
- interface ResourceItem {
3
- id: string | number;
4
- label: string;
5
- isError?: boolean;
6
- [key: string]: any;
7
- }
8
- interface SelectResourceProps {
9
- lists: ResourceItem[];
10
- value: any;
11
- onChange: (val: any) => void;
12
- resourceMode?: 'multiple' | 'tags' | undefined;
13
- maxLength?: number;
14
- isParallelResource?: boolean;
15
- [key: string]: any;
16
- }
17
- declare const SelectResource: ({ lists, value, onChange, resourceMode, allowClear, onClearResource, maxLength, isErrorResource, resourceErrorText, ...props }: SelectResourceProps) => JSX.Element;
18
- export default SelectResource;
@@ -1,7 +0,0 @@
1
- import { ExportImportType } from '../../../types';
2
- import './index.less';
3
- declare type ExportImportProps = {
4
- exportImport: ExportImportType;
5
- };
6
- declare const ExportImport: ({ exportImport }: ExportImportProps) => JSX.Element;
7
- export default ExportImport;
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { GallerySettingType, GallerySettingValueType } from "../../../types";
3
- import "./index.less";
4
- declare type GalleryItemProps = {
5
- record: Record<string, any>;
6
- gallery: GallerySettingType;
7
- columnsMap: Map<string, Record<string, any>>;
8
- index: number;
9
- gallerySetting: GallerySettingValueType;
10
- columns: Record<string, any>[];
11
- onClick: React.MouseEventHandler<HTMLDivElement>;
12
- };
13
- declare const GalleryItem: (props: GalleryItemProps) => JSX.Element;
14
- export default GalleryItem;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { GalleryProps } from './types';
3
- import './index.less';
4
- declare const _default: React.MemoExoticComponent<(props: GalleryProps) => JSX.Element>;
5
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.NamedExoticComponent<any>;
4
- export default _default;
@@ -1,173 +0,0 @@
1
- import { GroupValue } from "../Actions/component/Group/PopoverContent";
2
- import { FilterItemProps, FilterType } from "../../filter/types";
3
- import { ColumnSettingType, DataSourceGroupType, GallerySettingValueType, ModeType, SortType } from "../types";
4
- export declare const getHash: (obj: any) => any;
5
- export declare const calcFilterSort: ({ dataSource, filter, sort, columns }: any) => any;
6
- /**
7
- * 合并列设置
8
- * @param defaultColumns 默认列设置
9
- * @param tableId 表ID
10
- * @returns 合并后的列设置
11
- */
12
- export declare const mergeColumnSetting: ({ columns, tableId, currentViewMode, }: {
13
- columns: Record<string, any>[];
14
- tableId?: string | undefined;
15
- currentViewMode: ModeType;
16
- }) => {
17
- isShow: boolean;
18
- }[] | ({
19
- width: any;
20
- isShow: any;
21
- sortIndex: number;
22
- } | {
23
- isShow: boolean;
24
- sortIndex: number;
25
- })[];
26
- /**
27
- * 对数据源进行排序
28
- * @param dataSource 数据源数组
29
- * @param sortObj 排序对象,包含排序的键、值和类型
30
- * @returns 排序后的数据源数组
31
- */
32
- export declare const sortDataSource: (dataSource: Record<string, any>[], sortObj: {
33
- sortKey: string;
34
- sortValue: "asc" | "desc";
35
- sortType: "date" | "string" | "number";
36
- }) => Record<string, any>[];
37
- /**
38
- * 根据行键获取 ID
39
- * @param item 记录对象
40
- * @param rowKey 行键,可以是字符串或函数
41
- * @returns 返回 ID
42
- */
43
- export declare const getIdByRowKey: (item: Record<string, any>, rowKey: string | ((params: any) => string)) => any;
44
- /**
45
- * 根据分组条件对数据源进行分组
46
- * @param dataSource 数据源
47
- * @param group 分组条件
48
- * @param rowKey 行键生成函数或字符串
49
- * @returns 返回分组后的数据源
50
- */
51
- export declare const groupDataSource: (dataSource: Record<string, any>[], group: GroupValue, rowKey: string | ((params: any) => string)) => Record<string, any>[];
52
- declare type ViewSetting = {
53
- order_by: string;
54
- group_by: GroupValue;
55
- column_setting: Record<string, any>[];
56
- gallery_setting: GallerySettingValueType;
57
- filters: any;
58
- filter_setting: {
59
- quickFilter: FilterItemProps[];
60
- otherFilter: FilterItemProps[];
61
- };
62
- };
63
- /**
64
- * 本地存储的表格设置对象
65
- */
66
- declare type TableSettingObjType = {
67
- view_mode: ModeType;
68
- currentSettingHash: string;
69
- } & {
70
- [K in ModeType]: ViewSetting;
71
- };
72
- /**
73
- * 将表格设置保存到本地存储
74
- * @param tableId 表格id
75
- * @param tableSettingObj 表格设置对象
76
- */
77
- export declare const setTableSettingToLocalStorage: ({ tableId, tableSettingObj, currentViewMode, currentSettingHash, }: {
78
- tableId: string;
79
- tableSettingObj: Partial<ViewSetting & {
80
- view_mode: ModeType;
81
- }>;
82
- currentViewMode: ModeType;
83
- currentSettingHash: string;
84
- }) => {
85
- key: string;
86
- value: Record<string, any>;
87
- } | undefined;
88
- export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
89
- /**
90
- * 从本地存储中获取表格设置, 全部配置
91
- * @param tableId 表格ID
92
- * @returns 表格设置对象
93
- */
94
- export declare const getTableSettingFromLocalStorage: (tableId?: string) => Partial<TableSettingObjType>;
95
- /**
96
- * 从LocalStorage读取表当前视图模式
97
- * @param tableId
98
- */
99
- export declare const getCurrentViewModeFromLocalStorage: (tableId?: string) => ModeType | undefined;
100
- /**
101
- * 根据视图模式获取配置
102
- * @param tableId
103
- * @param currentViewMode
104
- */
105
- export declare const getTableSettingByCurrentViewMode: (tableId: string, currentViewMode: ModeType) => ViewSetting | undefined;
106
- /**
107
- * 将表单值保存到本地存储中
108
- * @param tableId 表单ID
109
- * @param allValues 表单所有值
110
- * @param keys 存储的键名
111
- */
112
- export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, currentViewMode, currentSettingHash, }: {
113
- tableId?: string | undefined;
114
- allValues?: Record<string, any> | undefined;
115
- keys?: string[] | undefined;
116
- currentViewMode: ModeType;
117
- currentSettingHash: string;
118
- }) => {
119
- key: string;
120
- value: Record<string, any>;
121
- } | undefined;
122
- /**
123
- * 获取表格键值
124
- * @param tableId 表格ID
125
- * @returns 返回格式化后的表格键值
126
- */
127
- export declare const getTableKey: (tableId: string) => string;
128
- /**
129
- * 合并筛选设置
130
- * @param list 列表数据
131
- * @param quickFilterMaxLength 快速筛选最大长度
132
- * @param tableId 表ID
133
- * @returns 返回合并后的筛选设置
134
- */
135
- export declare const mergeFilterSetting: ({ list, quickFilterMaxLength, tableId, sortButtonShow, currentViewMode, }: {
136
- list: FilterItemProps[];
137
- quickFilterMaxLength: number;
138
- tableId?: string | undefined;
139
- sortButtonShow: boolean;
140
- currentViewMode: ModeType;
141
- }) => {
142
- quickFilter: FilterItemProps[];
143
- otherFilter: FilterItemProps[];
144
- notSortFilter: FilterItemProps[];
145
- };
146
- /**
147
- * 过滤数据源
148
- * @param dataSource 数据源
149
- * @param filters 过滤条件
150
- * @param filterLocalArr 本地过滤项
151
- * @returns 过滤后的数据源
152
- */
153
- export declare const filterDataSource: (dataSource: Record<string, any>[], filters: Record<string, any>, filterLocalArr: FilterItemProps[]) => Record<string, any>[];
154
- /**
155
- * 根据模式获取设置键数组
156
- * @param filter 筛选器
157
- * @param columnSetting 列设置
158
- * @param dataSourceGroup 数据源分组
159
- * @param sort 排序
160
- * @param mode 模式,可选值为 "localStorage" 或 "remote"
161
- * @returns 返回设置键数组
162
- */
163
- export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourceGroup, sort, mode, currentViewMode, }: {
164
- filter?: FilterType | undefined;
165
- columnSetting?: ColumnSettingType | undefined;
166
- dataSourceGroup?: DataSourceGroupType | undefined;
167
- sort?: SortType | undefined;
168
- mode: "" | "localStorage" | "remote";
169
- currentViewMode: ModeType;
170
- }) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
171
- export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
- export declare const stringify: (obj: Record<string, any>) => string;
173
- export {};
@@ -1,22 +0,0 @@
1
- import { FilterType } from "../../filter/types";
2
- import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType } from "../types";
3
- declare type UseTableSettingProps = {
4
- tableId?: string;
5
- filter: FilterType;
6
- columns: Record<string, any>[];
7
- columnSetting?: ColumnSettingType;
8
- dataSourceGroup?: DataSourceGroupType;
9
- sort?: SortType;
10
- view: GridViewType;
11
- currentViewMode: ModeType;
12
- gallery?: GallerySettingType;
13
- currentSettingHash: string;
14
- exportImport?: ExportImportModeType;
15
- };
16
- declare const useTableSetting: (params: UseTableSettingProps) => {
17
- setTableSetting: (values: Record<string, any>) => void;
18
- tableSetting: {
19
- [x: string]: any;
20
- };
21
- };
22
- export default useTableSetting;
@@ -1,12 +0,0 @@
1
- import { FormInstance } from "antd/es/form";
2
- import { FilterType } from "../../filter/types";
3
- declare type UseTransDataSourceParams = {
4
- form: FormInstance;
5
- localPagination: boolean;
6
- dataSource: Record<string, any>[];
7
- rowKey: string | ((params: any) => string);
8
- filter: FilterType;
9
- currentView: 'gallery' | 'table';
10
- };
11
- declare const useTransDataSource: (params: UseTransDataSourceParams) => Record<string, any>[];
12
- export default useTransDataSource;