@pisell/materials 6.4.5 → 6.5.1
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/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/appVersionControl/index.d.ts +1 -0
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/cardPro/index.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +9 -8
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +3 -2
- package/es/components/date-picker/datePickerCpt.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/list/index.d.ts +1 -0
- package/es/components/page/index.d.ts +3 -0
- package/es/components/page/index.js +4 -2
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/es/components/productCard/components/Action/index.d.ts +0 -1
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/es/components/productCard/components/Header/index.d.ts +0 -1
- package/es/components/productCard/components/Sales/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +4 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +19 -0
- package/es/components/productCard/components/Time/index.d.ts +4 -0
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +1 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/table/types.d.ts +251 -0
- package/es/components/translation/index.d.ts +14 -0
- package/es/components/versionSelect/index.d.ts +1 -0
- package/lib/components/appVersionControl/index.d.ts +1 -0
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/cardPro/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +9 -8
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +2 -2
- package/lib/components/date-picker/datePickerCpt.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +3 -0
- package/lib/components/page/index.js +3 -2
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/lib/components/productCard/components/Action/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/index.d.ts +0 -1
- package/lib/components/productCard/components/Sales/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +4 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +19 -0
- package/lib/components/productCard/components/Time/index.d.ts +4 -0
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +1 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/translation/index.d.ts +14 -0
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const fieldMaps: {
|
|
2
3
|
text: {
|
|
3
4
|
field: {
|
|
@@ -197,12 +198,12 @@ export declare const fieldList: ({
|
|
|
197
198
|
field_icon: string;
|
|
198
199
|
field_name: string;
|
|
199
200
|
field_type: string;
|
|
200
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("
|
|
158
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { FilterType } from "../filter/types";
|
|
2
|
+
import { SortItemProps } from "../sort/types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export declare type StorageMode = "" | "localStorage";
|
|
5
|
+
/**
|
|
6
|
+
* 排序总配置
|
|
7
|
+
*/
|
|
8
|
+
export declare type SortType = {
|
|
9
|
+
/** 排序是否展示 */
|
|
10
|
+
show: boolean;
|
|
11
|
+
/** 排序存储模式 */
|
|
12
|
+
storageMode: StorageMode;
|
|
13
|
+
list: SortItemProps[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* 列展示总配置
|
|
17
|
+
*/
|
|
18
|
+
export declare type ColumnSettingType = {
|
|
19
|
+
/** 列设置是否展示 */
|
|
20
|
+
show: boolean;
|
|
21
|
+
/** 列设置存储模式 */
|
|
22
|
+
storageMode: StorageMode;
|
|
23
|
+
};
|
|
24
|
+
declare type DataSourceListItemType = {
|
|
25
|
+
isCustom: boolean;
|
|
26
|
+
columnKey?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
name?: string | string[];
|
|
29
|
+
isHidden?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 数据源分组总配置
|
|
33
|
+
*/
|
|
34
|
+
export declare type DataSourceGroupType = {
|
|
35
|
+
/** 分组设置是否展示 */
|
|
36
|
+
show: boolean;
|
|
37
|
+
/** 分组设置存储模式 */
|
|
38
|
+
storageMode: StorageMode;
|
|
39
|
+
/** */
|
|
40
|
+
list: DataSourceListItemType[];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Gallery封面总配置
|
|
44
|
+
*/
|
|
45
|
+
declare type GalleryCoverType = {
|
|
46
|
+
/** 封面是否展示 */
|
|
47
|
+
show: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 封面图片可以使用的字段
|
|
50
|
+
*/
|
|
51
|
+
fields: string[];
|
|
52
|
+
/**
|
|
53
|
+
* 封面高度
|
|
54
|
+
*/
|
|
55
|
+
height: number;
|
|
56
|
+
/** 图片裁剪方式 */
|
|
57
|
+
objectFit: "fill" | "cover";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Gallery标题总配置
|
|
61
|
+
*/
|
|
62
|
+
declare type GalleryTitleType = {
|
|
63
|
+
/** 标题使用的字段 */
|
|
64
|
+
field: string;
|
|
65
|
+
/** 标题行数 */
|
|
66
|
+
line: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Gallery头部区域总配置
|
|
70
|
+
*/
|
|
71
|
+
declare type GalleryHeaderType = {
|
|
72
|
+
/** 头部区域插槽 */
|
|
73
|
+
slot?: (record: Record<string, any>, index: number) => React.ReactNode;
|
|
74
|
+
/** 头部区域其他字段设置 */
|
|
75
|
+
fields: {
|
|
76
|
+
/** 头部区域其他字段是否展示 */
|
|
77
|
+
show: boolean;
|
|
78
|
+
/** 头部区域其他字段 */
|
|
79
|
+
list: string[];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Gallery内容区域总配置
|
|
84
|
+
*/
|
|
85
|
+
declare type GalleryContentType = {
|
|
86
|
+
/** 内容区域字段配置 */
|
|
87
|
+
fields: {
|
|
88
|
+
columnKey: string;
|
|
89
|
+
show: boolean;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
export declare type GallerySettingValueType = {
|
|
93
|
+
coverField: string | "noCover";
|
|
94
|
+
coverObjectFit: "fill" | "cover";
|
|
95
|
+
compactMode: "default" | "compact";
|
|
96
|
+
isShowLabel: boolean;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Gallery底部区域总配置
|
|
100
|
+
*/
|
|
101
|
+
declare type GalleryFooterType = {
|
|
102
|
+
/** 底部区域自定义渲染 */
|
|
103
|
+
render: (record: Record<string, any>, index: number) => React.ReactNode;
|
|
104
|
+
/** 底部区域高度 */
|
|
105
|
+
height: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Gallery模式总配置
|
|
109
|
+
*/
|
|
110
|
+
export declare type GallerySettingType = {
|
|
111
|
+
/** 卡片最小宽度 */
|
|
112
|
+
cardMinWidth: number;
|
|
113
|
+
/** 卡片最大宽度 */
|
|
114
|
+
cardMaxWidth: number;
|
|
115
|
+
/** 水平间隔 */
|
|
116
|
+
horizontalGutter: number;
|
|
117
|
+
/** 垂直间隔 */
|
|
118
|
+
verticalGutter: number;
|
|
119
|
+
/** 封面配置 */
|
|
120
|
+
cover: GalleryCoverType;
|
|
121
|
+
/** 标题配置 */
|
|
122
|
+
title: GalleryTitleType;
|
|
123
|
+
/** 头部区域 */
|
|
124
|
+
header: GalleryHeaderType;
|
|
125
|
+
/** 内容区域 */
|
|
126
|
+
content: GalleryContentType;
|
|
127
|
+
/** 固定高度 */
|
|
128
|
+
fixedHeight: boolean;
|
|
129
|
+
/** 固定的卡片高度 */
|
|
130
|
+
cardHeight: number;
|
|
131
|
+
/** 固定顶部 */
|
|
132
|
+
fixedHeader: boolean;
|
|
133
|
+
/** 固定底部 */
|
|
134
|
+
fixedFooter: boolean;
|
|
135
|
+
/** 底部区域 */
|
|
136
|
+
footer: GalleryFooterType;
|
|
137
|
+
/** 卡片点击时间 */
|
|
138
|
+
onItem: (record: Record<string, any>, index: number) => void;
|
|
139
|
+
};
|
|
140
|
+
/** 视图模式 */
|
|
141
|
+
export declare type ModeType = "grid" | "gallery" | "kanban";
|
|
142
|
+
/**
|
|
143
|
+
* 视图模式总配置
|
|
144
|
+
*/
|
|
145
|
+
export declare type GridViewType = {
|
|
146
|
+
/** 默认视图模式 */
|
|
147
|
+
defaultViewMode: ModeType;
|
|
148
|
+
/** 开启多视图模式可进行页面内转换 */
|
|
149
|
+
multiple: boolean;
|
|
150
|
+
/** 当前可用的视图模式列表 */
|
|
151
|
+
modeList: ModeType[];
|
|
152
|
+
};
|
|
153
|
+
declare type SortDetail = {
|
|
154
|
+
fromIndex: number;
|
|
155
|
+
toIndex: number;
|
|
156
|
+
dataSource: Record<string, any>[];
|
|
157
|
+
fromId: number | string;
|
|
158
|
+
toId: number | string;
|
|
159
|
+
fromItem: Record<string, any>;
|
|
160
|
+
toItem: Record<string, any>;
|
|
161
|
+
};
|
|
162
|
+
/** 导入导出模式 */
|
|
163
|
+
export declare type ExportImportModeType = "import" | "export" | "export_file" | "import_log";
|
|
164
|
+
/**
|
|
165
|
+
* @title: 导出导入api
|
|
166
|
+
* @description:
|
|
167
|
+
* @return {*}
|
|
168
|
+
* @Author: WangHan
|
|
169
|
+
* @Date: 2024-09-11 15:44
|
|
170
|
+
*/
|
|
171
|
+
export declare type ApiProps = {
|
|
172
|
+
export?: string;
|
|
173
|
+
import?: string;
|
|
174
|
+
export_file: string;
|
|
175
|
+
import_log?: string;
|
|
176
|
+
template?: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* 导入导出配置
|
|
180
|
+
*/
|
|
181
|
+
export declare type ExportImportType = {
|
|
182
|
+
/** 是否展示 */
|
|
183
|
+
show: boolean;
|
|
184
|
+
/** 当前所选项 */
|
|
185
|
+
selectLists: string[];
|
|
186
|
+
/** 导入模版链接 */
|
|
187
|
+
templateFileUrl: string;
|
|
188
|
+
/** 标题 */
|
|
189
|
+
title: string;
|
|
190
|
+
hiddenKeys?: string[];
|
|
191
|
+
apiUrl?: ApiProps;
|
|
192
|
+
otherParams?: any;
|
|
193
|
+
};
|
|
194
|
+
export declare type GridViewProps = {
|
|
195
|
+
columns: any;
|
|
196
|
+
dataSource: any[];
|
|
197
|
+
dispatch: any;
|
|
198
|
+
/**
|
|
199
|
+
* 画册模式的配置
|
|
200
|
+
*/
|
|
201
|
+
gallery: GallerySettingType;
|
|
202
|
+
/**
|
|
203
|
+
* 视图设置
|
|
204
|
+
*/
|
|
205
|
+
view: GridViewType;
|
|
206
|
+
style: React.CSSProperties;
|
|
207
|
+
pagination: any;
|
|
208
|
+
filter: FilterType;
|
|
209
|
+
buttons: React.ReactNode | any[];
|
|
210
|
+
actionButtons: any;
|
|
211
|
+
sort: SortType;
|
|
212
|
+
title?: React.ReactNode | (() => React.ReactNode);
|
|
213
|
+
showTitle?: boolean;
|
|
214
|
+
subTitle?: React.ReactNode | (() => React.ReactNode);
|
|
215
|
+
showSubTitle?: boolean;
|
|
216
|
+
exportImport: ExportImportType;
|
|
217
|
+
onValuesChange: (changedValues: any, values: any) => void;
|
|
218
|
+
summary: any;
|
|
219
|
+
utils: any;
|
|
220
|
+
rowKey: ((record: Record<string, any>) => string) | string;
|
|
221
|
+
columnSetting?: ColumnSettingType;
|
|
222
|
+
dataSourceGroup?: DataSourceGroupType;
|
|
223
|
+
loading: boolean;
|
|
224
|
+
dragSort: boolean;
|
|
225
|
+
onSortChange?: (detail: SortDetail) => boolean;
|
|
226
|
+
__id?: string;
|
|
227
|
+
__designMode?: "design";
|
|
228
|
+
/**
|
|
229
|
+
* 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
|
|
230
|
+
*/
|
|
231
|
+
currentSettingKey?: string;
|
|
232
|
+
/**
|
|
233
|
+
* 当前本地配置的唯一值, 不填默认使用currentSettingKey
|
|
234
|
+
*/
|
|
235
|
+
currentComponentId?: string;
|
|
236
|
+
/**
|
|
237
|
+
* 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
|
|
238
|
+
* @param currentDataSource
|
|
239
|
+
*/
|
|
240
|
+
onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
|
|
241
|
+
tabs: {
|
|
242
|
+
show: boolean;
|
|
243
|
+
type: 'default' | 'button' | 'buttonGroup' | 'dropdown';
|
|
244
|
+
items: {
|
|
245
|
+
name: string;
|
|
246
|
+
filterBy?: Record<string, any>;
|
|
247
|
+
sortBy?: string;
|
|
248
|
+
}[];
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare type Value = {
|
|
4
|
+
en: string;
|
|
5
|
+
'zh-CN': string;
|
|
6
|
+
'zh-HK': string;
|
|
7
|
+
};
|
|
8
|
+
interface TranslationProps {
|
|
9
|
+
value: Value;
|
|
10
|
+
onChange: (value: Value) => void;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const Translation: React.FC<TranslationProps>;
|
|
14
|
+
export default Translation;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Drawer } from 'antd';
|
|
3
|
+
import { OperationItem } from '../type';
|
|
4
|
+
declare const useDrawerState: (operationContent?: {
|
|
5
|
+
[key: string]: import("react").ReactNode;
|
|
6
|
+
} | undefined) => {
|
|
7
|
+
drawerVisible: boolean;
|
|
8
|
+
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
9
|
+
openDrawer: (item: OperationItem) => void;
|
|
10
|
+
closeDrawer: () => void;
|
|
11
|
+
drawerContent: import("react").ReactNode;
|
|
12
|
+
Container: {
|
|
13
|
+
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
14
|
+
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
15
|
+
destroy: () => void;
|
|
16
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
17
|
+
};
|
|
18
|
+
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
|
+
};
|
|
22
|
+
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
23
|
+
destroy: () => void;
|
|
24
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
25
|
+
};
|
|
26
|
+
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
27
|
+
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
28
|
+
destroy: () => void;
|
|
29
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
30
|
+
};
|
|
31
|
+
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
32
|
+
destroy: () => void;
|
|
33
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
34
|
+
};
|
|
35
|
+
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
36
|
+
} | typeof Drawer;
|
|
37
|
+
containerProps: {};
|
|
38
|
+
};
|
|
39
|
+
export default useDrawerState;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
+
export declare type OperationItem = {
|
|
5
|
+
label?: string;
|
|
6
|
+
openMode: 'modal' | 'drawer' | 'custom';
|
|
7
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
+
openTitle: string;
|
|
9
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
+
key: string;
|
|
11
|
+
buttonProps?: any;
|
|
12
|
+
onClick?: (record: any) => void;
|
|
13
|
+
afterClose?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export interface DataSourceTableProps {
|
|
16
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
17
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
18
|
+
titleButtons?: {
|
|
19
|
+
show: boolean;
|
|
20
|
+
maxCount: number;
|
|
21
|
+
items: OperationItem[];
|
|
22
|
+
};
|
|
23
|
+
tableButtons?: {
|
|
24
|
+
show: boolean;
|
|
25
|
+
maxCount: number;
|
|
26
|
+
items: OperationItem[];
|
|
27
|
+
};
|
|
28
|
+
buttons?: any[];
|
|
29
|
+
operation?: {
|
|
30
|
+
show: boolean;
|
|
31
|
+
title: string;
|
|
32
|
+
width: number;
|
|
33
|
+
align: 'left' | 'center' | 'right';
|
|
34
|
+
fixed: 'left' | 'right' | false;
|
|
35
|
+
type: 'link' | 'button';
|
|
36
|
+
items: OperationItem[];
|
|
37
|
+
};
|
|
38
|
+
operationContent?: {
|
|
39
|
+
[key: string]: React.ReactNode;
|
|
40
|
+
};
|
|
41
|
+
dataSource: DataSourceType;
|
|
42
|
+
columns: ColumnType<any>[];
|
|
43
|
+
filter: any;
|
|
44
|
+
search?: {
|
|
45
|
+
show: boolean;
|
|
46
|
+
placeholder: string;
|
|
47
|
+
};
|
|
48
|
+
__designMode: string;
|
|
49
|
+
componentId: string;
|
|
50
|
+
clickToDetail?: {
|
|
51
|
+
show: boolean;
|
|
52
|
+
useCustomAction: boolean;
|
|
53
|
+
actionType: string;
|
|
54
|
+
openMode: 'modal' | 'drawer';
|
|
55
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
56
|
+
openTitle: string;
|
|
57
|
+
key: string;
|
|
58
|
+
};
|
|
59
|
+
onRow?: any;
|
|
60
|
+
filterBy?: Record<string, any>;
|
|
61
|
+
sortBy: string;
|
|
62
|
+
tabs?: {
|
|
63
|
+
show: boolean;
|
|
64
|
+
type: string;
|
|
65
|
+
items: {
|
|
66
|
+
name: string;
|
|
67
|
+
filterBy: Record<string, any>;
|
|
68
|
+
sortBy: string;
|
|
69
|
+
}[];
|
|
70
|
+
};
|
|
71
|
+
onValuesChange?: (changedValues: any, values: any) => void;
|
|
72
|
+
extraParams?: {
|
|
73
|
+
list?: Record<string, any>;
|
|
74
|
+
get?: Record<string, any>;
|
|
75
|
+
update?: Record<string, any>;
|
|
76
|
+
create?: Record<string, any>;
|
|
77
|
+
destroy?: Record<string, any>;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
2
3
|
options?: any;
|
|
3
4
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const formFieldMap: {
|
|
2
3
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
3
4
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -19,7 +20,7 @@ declare const formFieldMap: {
|
|
|
19
20
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
21
|
onChange: (value: string) => void;
|
|
21
22
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
23
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
23
24
|
customDomain?: string | undefined;
|
|
24
25
|
value?: string | undefined;
|
|
25
26
|
tenantId: string;
|
|
@@ -59,11 +60,13 @@ declare const formFieldMap: {
|
|
|
59
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
62
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
63
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
65
|
} & {
|
|
65
66
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> |
|
|
67
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
68
|
+
onChange: (value: string) => void;
|
|
69
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
70
|
JSON: import("react").FC<any>;
|
|
68
71
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
72
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -76,14 +79,14 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
76
79
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
77
80
|
onChange: (value: string) => void;
|
|
78
81
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
79
|
-
rootDomain: "custom" | "
|
|
82
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
80
83
|
customDomain?: string | undefined;
|
|
81
84
|
value?: string | undefined;
|
|
82
85
|
tenantId: string;
|
|
83
86
|
name?: string | undefined;
|
|
84
87
|
fieldKey?: string | undefined;
|
|
85
88
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
|
-
}) | (import("react").FC<{}> & {
|
|
89
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
87
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
91
|
} & {
|
|
89
92
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -95,7 +98,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
95
98
|
extraParams?: Record<string, any> | undefined;
|
|
96
99
|
} & {
|
|
97
100
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<
|
|
99
|
-
onChange: (value: string) => void;
|
|
100
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -7,6 +7,9 @@ export interface VariablesContextType {
|
|
|
7
7
|
registerValueVariable?: (componentId: string, value: Record<string, any>) => void;
|
|
8
8
|
registerFunctionVariable?: (componentId: string, value: Record<string, any>) => void;
|
|
9
9
|
subscribeVariables?: (listener: (allVariables: Record<string, any>, updateVariables: Record<string, any>) => void) => () => void;
|
|
10
|
+
config?: {
|
|
11
|
+
disabledHistoryListener?: boolean;
|
|
12
|
+
};
|
|
10
13
|
}
|
|
11
14
|
export declare const VariablesContext: import("react").Context<VariablesContextType>;
|
|
12
15
|
export default VariablesContext;
|
|
@@ -48,9 +48,9 @@ var defaultCustomizer = (objValue, srcValue) => {
|
|
|
48
48
|
var VARIABLE_PATTERN = /{{([^}]+)}}/g;
|
|
49
49
|
var VariablesProvider = (props) => {
|
|
50
50
|
var _a, _b, _c, _d;
|
|
51
|
-
const { children, variables } = props;
|
|
51
|
+
const { children, variables, config } = props;
|
|
52
52
|
const context = (0, import_useEngineContext.default)();
|
|
53
|
-
const disabledHistoryListener = (_c = (_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.variablesConfig) == null ? void 0 : _c.disabledHistoryListener;
|
|
53
|
+
const disabledHistoryListener = config ?? ((_c = (_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.variablesConfig) == null ? void 0 : _c.disabledHistoryListener);
|
|
54
54
|
const { getApp } = ((_d = context == null ? void 0 : context.appHelper) == null ? void 0 : _d.utils) || {};
|
|
55
55
|
const initialQuery = (0, import_react.useMemo)(() => {
|
|
56
56
|
var _a2, _b2, _c2;
|