@pisell/materials 6.5.8 → 6.5.9
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -1
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/es/components/date-picker/datePickerCpt.d.ts +0 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/lowCodePage/index.d.ts +0 -1
- package/es/components/page/index.d.ts +8 -0
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellAdjustPrice/index.d.ts +4 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +40 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/es/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellLoading/index.d.ts +0 -1
- package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/index.d.ts +0 -1
- package/es/components/pisellQRScanner/index.d.ts +24 -0
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/pisellToast/index.d.ts +17 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +0 -1
- package/es/components/productCard/components/Header/EditButton/index.d.ts +0 -1
- package/es/components/productCard/components/Header/index.d.ts +3 -0
- package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -1
- package/es/components/productCard/components/Time/index.d.ts +0 -1
- package/es/components/qrcode/index.d.ts +0 -1
- package/es/components/select-time/index.d.ts +0 -1
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/link/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +161 -0
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +5 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +25 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +5 -0
- package/es/components/virtual-keyboard/index.d.ts +25 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/appVersionControl/index.d.ts +0 -1
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -1
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/lowCodePage/index.d.ts +0 -1
- package/lib/components/page/index.d.ts +8 -0
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +4 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +40 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/lib/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellLoading/index.d.ts +0 -1
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/index.d.ts +0 -1
- package/lib/components/pisellQRScanner/index.d.ts +24 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/pisellToast/index.d.ts +17 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/index.d.ts +3 -0
- package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/index.d.ts +0 -1
- package/lib/components/qrcode/index.d.ts +0 -1
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/link/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +161 -0
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +5 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +25 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +5 -0
- package/lib/components/virtual-keyboard/index.d.ts +25 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
- package/es/components/drag-sort-tree/index.d.ts +0 -5
- package/es/components/filter/types.d.ts +0 -45
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/select/index.d.ts +0 -9
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
- package/es/components/table/Actions/index.d.ts +0 -17
- package/es/components/table/serve.d.ts +0 -13
- package/es/components/table/types.d.ts +0 -268
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
- package/lib/components/drag-sort-tree/index.d.ts +0 -5
- package/lib/components/filter/types.d.ts +0 -45
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
- package/lib/components/table/Actions/index.d.ts +0 -17
- package/lib/components/table/serve.d.ts +0 -13
- package/lib/components/table/types.d.ts +0 -268
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
}) => void;
|
|
85
|
+
export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
|
|
86
|
+
/**
|
|
87
|
+
* 从本地存储中获取表格设置, 全部配置
|
|
88
|
+
* @param tableId 表格ID
|
|
89
|
+
* @returns 表格设置对象
|
|
90
|
+
*/
|
|
91
|
+
export declare const getTableSettingFromLocalStorage: (tableId?: string) => Partial<TableSettingObjType>;
|
|
92
|
+
/**
|
|
93
|
+
* 从LocalStorage读取表当前视图模式
|
|
94
|
+
* @param tableId
|
|
95
|
+
*/
|
|
96
|
+
export declare const getCurrentViewModeFromLocalStorage: (tableId?: string) => ModeType | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* 根据视图模式获取配置
|
|
99
|
+
* @param tableId
|
|
100
|
+
* @param currentViewMode
|
|
101
|
+
*/
|
|
102
|
+
export declare const getTableSettingByCurrentViewMode: (tableId: string, currentViewMode: ModeType) => ViewSetting | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* 将表单值保存到本地存储中
|
|
105
|
+
* @param tableId 表单ID
|
|
106
|
+
* @param allValues 表单所有值
|
|
107
|
+
* @param keys 存储的键名
|
|
108
|
+
*/
|
|
109
|
+
export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, currentViewMode, currentSettingHash, }: {
|
|
110
|
+
tableId?: string | undefined;
|
|
111
|
+
allValues?: Record<string, any> | undefined;
|
|
112
|
+
keys?: string[] | undefined;
|
|
113
|
+
currentViewMode: ModeType;
|
|
114
|
+
currentSettingHash: string;
|
|
115
|
+
}) => void;
|
|
116
|
+
/**
|
|
117
|
+
* 合并筛选设置
|
|
118
|
+
* @param list 列表数据
|
|
119
|
+
* @param quickFilterMaxLength 快速筛选最大长度
|
|
120
|
+
* @param tableId 表ID
|
|
121
|
+
* @returns 返回合并后的筛选设置
|
|
122
|
+
*/
|
|
123
|
+
export declare const mergeFilterSetting: ({ list, quickFilterMaxLength, tableId, sortButtonShow, currentViewMode, }: {
|
|
124
|
+
list: FilterItemProps[];
|
|
125
|
+
quickFilterMaxLength: number;
|
|
126
|
+
tableId?: string | undefined;
|
|
127
|
+
sortButtonShow: boolean;
|
|
128
|
+
currentViewMode: ModeType;
|
|
129
|
+
}) => {
|
|
130
|
+
quickFilter: FilterItemProps[];
|
|
131
|
+
otherFilter: FilterItemProps[];
|
|
132
|
+
notSortFilter: FilterItemProps[];
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* 过滤数据源
|
|
136
|
+
* @param dataSource 数据源
|
|
137
|
+
* @param filters 过滤条件
|
|
138
|
+
* @param filterLocalArr 本地过滤项
|
|
139
|
+
* @returns 过滤后的数据源
|
|
140
|
+
*/
|
|
141
|
+
export declare const filterDataSource: (dataSource: Record<string, any>[], filters: Record<string, any>, filterLocalArr: FilterItemProps[]) => Record<string, any>[];
|
|
142
|
+
/**
|
|
143
|
+
* 根据模式获取设置键数组
|
|
144
|
+
* @param filter 筛选器
|
|
145
|
+
* @param columnSetting 列设置
|
|
146
|
+
* @param dataSourceGroup 数据源分组
|
|
147
|
+
* @param sort 排序
|
|
148
|
+
* @param mode 模式,可选值为 "localStorage" 或 "remote"
|
|
149
|
+
* @returns 返回设置键数组
|
|
150
|
+
*/
|
|
151
|
+
export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourceGroup, sort, mode, currentViewMode, }: {
|
|
152
|
+
filter?: FilterType | undefined;
|
|
153
|
+
columnSetting?: ColumnSettingType | undefined;
|
|
154
|
+
dataSourceGroup?: DataSourceGroupType | undefined;
|
|
155
|
+
sort?: SortType | undefined;
|
|
156
|
+
mode: "" | "localStorage" | "remote";
|
|
157
|
+
currentViewMode: ModeType;
|
|
158
|
+
}) => ("filters" | "column_setting" | "gallery_setting" | "order_by" | "group_by" | "filter_setting" | "view_mode")[];
|
|
159
|
+
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
|
+
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseNumberKeyboardProps } from '../BaseNumberKeyboard';
|
|
3
|
+
export interface RightItemsStyleProps {
|
|
4
|
+
buttonBackgroundColor?: string;
|
|
5
|
+
textColor?: string;
|
|
6
|
+
resetButtonBackgroundColor?: string;
|
|
7
|
+
resetButtonTextColor?: string;
|
|
8
|
+
isDoneButtonFollowTheme?: boolean;
|
|
9
|
+
doneButtonBackgroundColor?: string;
|
|
10
|
+
doneButtonTextColor?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface AmountProps {
|
|
13
|
+
max?: number;
|
|
14
|
+
min?: number;
|
|
15
|
+
doneText?: string;
|
|
16
|
+
resetText?: string;
|
|
17
|
+
defaultValue?: string | number;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
amountProps?: {
|
|
20
|
+
showCurrencySymbol: boolean;
|
|
21
|
+
useThousandsSeparator: boolean;
|
|
22
|
+
};
|
|
23
|
+
presets?: BaseNumberKeyboardProps['presets'];
|
|
24
|
+
value?: string | number;
|
|
25
|
+
onChange?: (val: string | number) => void;
|
|
26
|
+
onEnter?: (val: string | number) => void;
|
|
27
|
+
defaultSelect?: boolean;
|
|
28
|
+
inputFormat?: (_v: string) => React.ReactNode | null;
|
|
29
|
+
rightItemsStyle?: RightItemsStyleProps;
|
|
30
|
+
selectType?: 'light' | 'dark';
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
containerBackgroundColor?: string;
|
|
33
|
+
buttonBackgroundColor?: string;
|
|
34
|
+
textColor?: string;
|
|
35
|
+
resetButtonBackgroundColor?: string;
|
|
36
|
+
resetButtonTextColor?: string;
|
|
37
|
+
isDoneButtonFollowTheme?: boolean;
|
|
38
|
+
doneButtonBackgroundColor?: string;
|
|
39
|
+
doneButtonTextColor?: string;
|
|
40
|
+
keyboardBackgroundColor?: string;
|
|
41
|
+
keyboardButtonBackgroundColor?: string;
|
|
42
|
+
keyboardButtonTextColor?: string;
|
|
43
|
+
keyboardButtonHoverColor?: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PresetsProps } from './Presets';
|
|
3
|
+
import { KeyboardProps } from '../Keyboard';
|
|
4
|
+
import { RightItemsStyleProps } from '../Amount';
|
|
5
|
+
import './index.less';
|
|
6
|
+
export interface BaseNumberKeyboardProps {
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
format?: (val: string) => React.ReactNode;
|
|
9
|
+
defaultValue?: string | number;
|
|
10
|
+
doneText?: string;
|
|
11
|
+
resetText?: string;
|
|
12
|
+
onChange?: (val: string) => void;
|
|
13
|
+
onEnter?: (val: string) => void;
|
|
14
|
+
value?: string | number;
|
|
15
|
+
max?: number;
|
|
16
|
+
min?: number;
|
|
17
|
+
presets?: PresetsProps['presets'];
|
|
18
|
+
defaultSelect?: boolean;
|
|
19
|
+
rightItemsStyle?: RightItemsStyleProps;
|
|
20
|
+
customDisplay?: React.ReactNode | ((props: any) => React.ReactNode);
|
|
21
|
+
keyboardProps?: KeyboardProps;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
declare const BaseNumberKeyboard: (props: BaseNumberKeyboardProps) => JSX.Element;
|
|
25
|
+
export default BaseNumberKeyboard;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { KeyboardProps } from "./Keyboard";
|
|
3
|
+
import { VirtualKeyInputProps } from "./VirtualKeyInput";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
keyboardProps?: KeyboardProps;
|
|
7
|
+
virtualKeyInputProps?: VirtualKeyInputProps;
|
|
8
|
+
rightPanel?: React.ReactNode;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
onChange?: (value?: any) => void;
|
|
11
|
+
value?: string;
|
|
12
|
+
selectType?: 'light' | 'dark';
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
containerBackgroundColor?: string;
|
|
15
|
+
buttonBackgroundColor?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
keyboardBackgroundColor?: string;
|
|
18
|
+
keyboardButtonBackgroundColor?: string;
|
|
19
|
+
keyboardButtonTextColor?: string;
|
|
20
|
+
keyboardButtonHoverColor?: string;
|
|
21
|
+
primaryButtonBackgroundColor?: string;
|
|
22
|
+
primaryButtonTextColor?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const VirtualKeyboard: (props: VirtualKeyboardProps) => JSX.Element;
|
|
25
|
+
export default VirtualKeyboard;
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
package/package.json
CHANGED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnType } from 'antd/es/table';
|
|
3
|
-
import { LocalSettingsType } from '../../table/types';
|
|
4
|
-
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
5
|
-
export declare type OperationItem = {
|
|
6
|
-
label?: string;
|
|
7
|
-
openMode: 'modal' | 'drawer' | 'custom';
|
|
8
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
9
|
-
openTitle: string;
|
|
10
|
-
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
11
|
-
key: string;
|
|
12
|
-
buttonProps?: any;
|
|
13
|
-
onClick?: (record: any) => void;
|
|
14
|
-
afterClose?: () => void;
|
|
15
|
-
};
|
|
16
|
-
export interface DataSourceTableProps {
|
|
17
|
-
__id?: string;
|
|
18
|
-
currentComponentId?: string;
|
|
19
|
-
currentSettingKey?: string;
|
|
20
|
-
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
21
|
-
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
22
|
-
titleButtons?: {
|
|
23
|
-
show: boolean;
|
|
24
|
-
maxCount: number;
|
|
25
|
-
items: OperationItem[];
|
|
26
|
-
};
|
|
27
|
-
tableButtons?: {
|
|
28
|
-
show: boolean;
|
|
29
|
-
maxCount: number;
|
|
30
|
-
items: OperationItem[];
|
|
31
|
-
};
|
|
32
|
-
buttons?: any[];
|
|
33
|
-
operation?: {
|
|
34
|
-
show: boolean;
|
|
35
|
-
title: string;
|
|
36
|
-
width: number;
|
|
37
|
-
align: 'left' | 'center' | 'right';
|
|
38
|
-
fixed: 'left' | 'right' | false;
|
|
39
|
-
type: 'link' | 'button';
|
|
40
|
-
items: OperationItem[];
|
|
41
|
-
};
|
|
42
|
-
operationContent?: {
|
|
43
|
-
[key: string]: React.ReactNode;
|
|
44
|
-
};
|
|
45
|
-
dataSource: DataSourceType;
|
|
46
|
-
columns: ColumnType<any>[];
|
|
47
|
-
filter: any;
|
|
48
|
-
search?: {
|
|
49
|
-
show: boolean;
|
|
50
|
-
placeholder: string;
|
|
51
|
-
};
|
|
52
|
-
__designMode: string;
|
|
53
|
-
componentId: string;
|
|
54
|
-
clickToDetail?: {
|
|
55
|
-
show: boolean;
|
|
56
|
-
useCustomAction: boolean;
|
|
57
|
-
actionType: string;
|
|
58
|
-
openMode: 'modal' | 'drawer';
|
|
59
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
60
|
-
openTitle: string;
|
|
61
|
-
key: string;
|
|
62
|
-
};
|
|
63
|
-
onRow?: any;
|
|
64
|
-
filterBy?: Record<string, any>;
|
|
65
|
-
sortBy: string;
|
|
66
|
-
tabs?: {
|
|
67
|
-
show: boolean;
|
|
68
|
-
type: string;
|
|
69
|
-
items: {
|
|
70
|
-
name: string;
|
|
71
|
-
filterBy: Record<string, any>;
|
|
72
|
-
sortBy: string;
|
|
73
|
-
}[];
|
|
74
|
-
};
|
|
75
|
-
onValuesChange?: (changedValues: any, values: any) => void;
|
|
76
|
-
extraParams?: {
|
|
77
|
-
list?: Record<string, any>;
|
|
78
|
-
get?: Record<string, any>;
|
|
79
|
-
update?: Record<string, any>;
|
|
80
|
-
create?: Record<string, any>;
|
|
81
|
-
destroy?: Record<string, any>;
|
|
82
|
-
};
|
|
83
|
-
localSettings?: LocalSettingsType;
|
|
84
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取nocobase数据列表
|
|
3
|
-
*/
|
|
4
|
-
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
-
export interface Country {
|
|
6
|
-
id: number;
|
|
7
|
-
name: {
|
|
8
|
-
en: string;
|
|
9
|
-
"zh-CN": string;
|
|
10
|
-
"zh-HK": string;
|
|
11
|
-
original: string;
|
|
12
|
-
};
|
|
13
|
-
code: string;
|
|
14
|
-
calling_code: string;
|
|
15
|
-
currency_code: string;
|
|
16
|
-
sort: number;
|
|
17
|
-
status: string;
|
|
18
|
-
created_at: string;
|
|
19
|
-
updated_at: string;
|
|
20
|
-
prefix: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const useCountries: () => {
|
|
23
|
-
data: Country[];
|
|
24
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取nocobase数据列表
|
|
3
|
-
*/
|
|
4
|
-
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
-
export interface Country {
|
|
6
|
-
id: number;
|
|
7
|
-
name: {
|
|
8
|
-
en: string;
|
|
9
|
-
"zh-CN": string;
|
|
10
|
-
"zh-HK": string;
|
|
11
|
-
original: string;
|
|
12
|
-
};
|
|
13
|
-
code: string;
|
|
14
|
-
calling_code: string;
|
|
15
|
-
currency_code: string;
|
|
16
|
-
sort: number;
|
|
17
|
-
status: string;
|
|
18
|
-
created_at: string;
|
|
19
|
-
updated_at: string;
|
|
20
|
-
prefix: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const useCountries: () => {
|
|
23
|
-
data: Country[];
|
|
24
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ModeType } from "../table/types";
|
|
2
|
-
/**
|
|
3
|
-
* 筛选总配置
|
|
4
|
-
*/
|
|
5
|
-
export declare type FilterType = {
|
|
6
|
-
/** 筛选是否展示 */
|
|
7
|
-
show: boolean;
|
|
8
|
-
/** 筛选项排序按钮是否展示 */
|
|
9
|
-
sortButtonShow: boolean;
|
|
10
|
-
/** 筛选列表 */
|
|
11
|
-
list: FilterItemProps[];
|
|
12
|
-
items?: string[];
|
|
13
|
-
__items: string[];
|
|
14
|
-
/** 快速筛选最大长度 */
|
|
15
|
-
quickFilterMaxLength: number;
|
|
16
|
-
/** 配置存储模式 */
|
|
17
|
-
storageMode: "" | "localStorage";
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* 筛选列表项配置
|
|
21
|
-
*/
|
|
22
|
-
export declare type FilterItemProps = {
|
|
23
|
-
type: "single" | "input" | "datePicker" | "rangePicker" | "search";
|
|
24
|
-
name?: string | string[];
|
|
25
|
-
key: string;
|
|
26
|
-
props: object;
|
|
27
|
-
label?: string;
|
|
28
|
-
sort?: boolean;
|
|
29
|
-
localFilter?: boolean;
|
|
30
|
-
other: Record<string, any>;
|
|
31
|
-
isCustom?: boolean;
|
|
32
|
-
columnKey?: string;
|
|
33
|
-
isHidden?: boolean;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* 筛选组件属性
|
|
37
|
-
*/
|
|
38
|
-
export interface FilterProps {
|
|
39
|
-
filter: FilterType;
|
|
40
|
-
isRenderFormContent: boolean;
|
|
41
|
-
onValuesChange?: () => void;
|
|
42
|
-
tableId?: string;
|
|
43
|
-
viewMode?: ModeType;
|
|
44
|
-
isMobile?: boolean;
|
|
45
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
/**
|
|
4
|
-
* loginAndRegister组件的属性接口
|
|
5
|
-
*/
|
|
6
|
-
export interface loginAndRegisterProps {
|
|
7
|
-
/** Logo相关配置 */
|
|
8
|
-
showLogo?: boolean;
|
|
9
|
-
logo?: string;
|
|
10
|
-
logoPosition?: 'left' | 'center' | 'right';
|
|
11
|
-
logoSize?: {
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
};
|
|
15
|
-
/** 标题相关配置 */
|
|
16
|
-
title?: string;
|
|
17
|
-
showTitle?: boolean;
|
|
18
|
-
titleAlign?: 'left' | 'center' | 'right';
|
|
19
|
-
/** 副标题相关配置 */
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
showSubtitle?: boolean;
|
|
22
|
-
subtitleAlign?: 'left' | 'center' | 'right';
|
|
23
|
-
/** 登录方式配置 */
|
|
24
|
-
loginMethods?: ('email' | 'google' | 'facebook' | 'apple')[];
|
|
25
|
-
defaultLoginMethod?: 'email' | 'google' | 'facebook' | 'apple';
|
|
26
|
-
/** 表单配置 */
|
|
27
|
-
emailLabel?: string;
|
|
28
|
-
passwordLabel?: string;
|
|
29
|
-
emailPlaceholder?: string;
|
|
30
|
-
passwordPlaceholder?: string;
|
|
31
|
-
emailRules?: any[];
|
|
32
|
-
buttonText?: string;
|
|
33
|
-
rememberMeText?: string;
|
|
34
|
-
forgotPasswordText?: string;
|
|
35
|
-
showRememberMe?: boolean;
|
|
36
|
-
showForgotPassword?: boolean;
|
|
37
|
-
/** 社交登录配置 */
|
|
38
|
-
socialLoginTexts?: {
|
|
39
|
-
google?: string;
|
|
40
|
-
facebook?: string;
|
|
41
|
-
apple?: string;
|
|
42
|
-
};
|
|
43
|
-
/** 底部配置 */
|
|
44
|
-
showFooter?: boolean;
|
|
45
|
-
showSignUp?: boolean;
|
|
46
|
-
signUpText?: string;
|
|
47
|
-
signUpLink?: string;
|
|
48
|
-
signUpPosition?: 'left' | 'center' | 'right';
|
|
49
|
-
otherLinks?: Array<{
|
|
50
|
-
text: string;
|
|
51
|
-
url: string;
|
|
52
|
-
}>;
|
|
53
|
-
otherLinksPosition?: 'left' | 'center' | 'right';
|
|
54
|
-
/** 登录/注册切换配置 */
|
|
55
|
-
showTabs?: boolean;
|
|
56
|
-
loginTabText?: string;
|
|
57
|
-
registerTabText?: string;
|
|
58
|
-
/** 注册表单配置 */
|
|
59
|
-
registerEmailPlaceholder?: string;
|
|
60
|
-
registerPasswordPlaceholder?: string;
|
|
61
|
-
registerButtonText?: string;
|
|
62
|
-
/** 事件回调 */
|
|
63
|
-
onLogin?: (values: {
|
|
64
|
-
email: string;
|
|
65
|
-
loginMethod: string;
|
|
66
|
-
}) => void;
|
|
67
|
-
onSocialLogin?: (type: 'google' | 'facebook' | 'apple') => void;
|
|
68
|
-
onSignUp?: () => void;
|
|
69
|
-
onRegister?: (values: {
|
|
70
|
-
email: string;
|
|
71
|
-
password: string;
|
|
72
|
-
}) => void;
|
|
73
|
-
/** 新增背景图片属性 */
|
|
74
|
-
backgroundImage?: string;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Saas登录组件
|
|
78
|
-
* @param props - 组件属性
|
|
79
|
-
* @returns React组件
|
|
80
|
-
*/
|
|
81
|
-
declare const loginAndRegister: React.FC<loginAndRegisterProps>;
|
|
82
|
-
export default loginAndRegister;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EmptyProps } from 'antd';
|
|
3
|
-
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
-
import './index.less';
|
|
5
|
-
export interface PisellEmptyProps extends EmptyProps {
|
|
6
|
-
/** 平台 */
|
|
7
|
-
platform?: PisellContextType['platform'];
|
|
8
|
-
/** 额外内容描述 */
|
|
9
|
-
extraDescription?: React.ReactNode;
|
|
10
|
-
/** 额外内容描述 */
|
|
11
|
-
icon?: React.ReactNode;
|
|
12
|
-
/** 自定义底部额外操作区域 */
|
|
13
|
-
footer?: React.ReactNode;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
/** 最大宽度 */
|
|
16
|
-
maxWidth?: number;
|
|
17
|
-
}
|
|
18
|
-
declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
|
|
19
|
-
export default PisellEmpty;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Select as OriginalSelect } from 'antd';
|
|
3
|
-
import type { SelectProps } from 'antd';
|
|
4
|
-
import './index.less';
|
|
5
|
-
interface CompoundedComponent extends React.ForwardRefExoticComponent<SelectProps> {
|
|
6
|
-
Option: typeof OriginalSelect.Option;
|
|
7
|
-
}
|
|
8
|
-
declare const Select: CompoundedComponent;
|
|
9
|
-
export default Select;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FilterType } from "../../filter/types";
|
|
2
|
-
import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
declare type ActionsProps = {
|
|
5
|
-
filter: FilterType;
|
|
6
|
-
tableId?: string;
|
|
7
|
-
columnSetting?: ColumnSettingType;
|
|
8
|
-
dataSourceGroup?: DataSourceGroupType;
|
|
9
|
-
sort: SortType;
|
|
10
|
-
localPagination?: boolean;
|
|
11
|
-
buttons: any[];
|
|
12
|
-
view: GridViewType;
|
|
13
|
-
gallery: GallerySettingType;
|
|
14
|
-
exportImport?: ExportImportType;
|
|
15
|
-
};
|
|
16
|
-
declare const Actions: ({ filter, sort, columnSetting, dataSourceGroup, tableId, localPagination, buttons, view, gallery, exportImport, }: ActionsProps) => JSX.Element | null;
|
|
17
|
-
export default Actions;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare type exportParams = {
|
|
2
|
-
ids?: Array<string | number>;
|
|
3
|
-
file_name?: string;
|
|
4
|
-
form_id?: string | number;
|
|
5
|
-
code?: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const exportData: (params: exportParams) => Promise<any>;
|
|
9
|
-
export declare const batchImport: (params: any) => Promise<any>;
|
|
10
|
-
export declare const importTemplate: (params: exportParams) => Promise<any>;
|
|
11
|
-
export declare const getExportFile: (params: any) => Promise<any>;
|
|
12
|
-
export declare const getImportLog: (params: any) => Promise<any>;
|
|
13
|
-
export {};
|