@pisell/materials 1.0.496 → 1.0.498
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/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +14 -14
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +53 -13
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -3
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +5 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +4 -4
- package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +15 -4
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +4 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.less +3 -0
- package/es/components/page/index.js +2 -6
- package/es/locales/en-US.d.ts +4 -0
- package/es/locales/en-US.js +5 -1
- package/es/locales/zh-CN.d.ts +4 -0
- package/es/locales/zh-CN.js +4 -0
- package/es/locales/zh-TW.d.ts +4 -0
- package/es/locales/zh-TW.js +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +54 -12
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -3
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +5 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +8 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +4 -4
- package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +16 -4
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +4 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.less +3 -0
- package/lib/components/page/index.js +2 -2
- package/lib/locales/en-US.d.ts +4 -0
- package/lib/locales/en-US.js +5 -1
- package/lib/locales/zh-CN.d.ts +4 -0
- package/lib/locales/zh-CN.js +4 -0
- package/lib/locales/zh-TW.d.ts +4 -0
- package/lib/locales/zh-TW.js +4 -0
- package/lowcode/data-source-form/__screenshots__/add.png +0 -0
- package/lowcode/data-source-form/__screenshots__/detail.png +0 -0
- package/lowcode/data-source-form/snippets.ts +3 -4
- package/lowcode/data-source-table/meta.ts +23 -1
- package/lowcode/data-source-table/utils.tsx +70 -14
- package/lowcode/form-group/__screenshots__/group.png +0 -0
- package/lowcode/form-group/snippets.ts +1 -0
- package/lowcode/form-item-input-number/meta.ts +60 -44
- package/lowcode/form-item-input.json/snippets.ts +16 -0
- package/lowcode/form-item-select/snippets.ts +2 -2
- package/lowcode/form-item-time-picker/meta.ts +1 -1
- package/lowcode/submit-button/snippets.ts +1 -0
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ interface UseTablePropsProps {
|
|
|
16
16
|
* @returns
|
|
17
17
|
*/
|
|
18
18
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
19
|
-
title: number | boolean |
|
|
19
|
+
title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
20
20
|
pagination: {
|
|
21
21
|
total: number;
|
|
22
22
|
current: number;
|
|
@@ -25,7 +25,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
25
25
|
showSizeChanger: boolean;
|
|
26
26
|
};
|
|
27
27
|
columns: import("./useColumns").Column[];
|
|
28
|
-
subTitle: number | boolean |
|
|
28
|
+
subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
29
29
|
buttons: any[] | null;
|
|
30
30
|
filter: React.JSX.Element | null;
|
|
31
31
|
onRow: (record: any) => any;
|
|
@@ -40,7 +40,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
40
40
|
width: number;
|
|
41
41
|
align: "center" | "left" | "right";
|
|
42
42
|
fixed: false | "left" | "right";
|
|
43
|
-
type: "
|
|
43
|
+
type: "link" | "button";
|
|
44
44
|
items: OperationItem[];
|
|
45
45
|
} | undefined;
|
|
46
46
|
operationContent?: {
|
|
@@ -132,10 +132,10 @@ var useTableProps = (props) => {
|
|
|
132
132
|
const handleClick = () => {
|
|
133
133
|
if (actionType === "delete") {
|
|
134
134
|
import_antd.Modal.confirm({
|
|
135
|
-
title: "
|
|
136
|
-
content: "
|
|
137
|
-
okText: "
|
|
138
|
-
cancelText: "
|
|
135
|
+
title: (0, import_locales.getText)("pisell-delete-confirm-title"),
|
|
136
|
+
content: (0, import_locales.getText)("pisell-delete-confirm-content"),
|
|
137
|
+
okText: (0, import_locales.getText)("pisell-delete-confirm-ok"),
|
|
138
|
+
cancelText: (0, import_locales.getText)("pisell-delete-confirm-cancel"),
|
|
139
139
|
onOk: () => {
|
|
140
140
|
handleDelete(record);
|
|
141
141
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const ColorPicker: React.FC<import("
|
|
2
|
+
declare const ColorPicker: React.FC<import("./type").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -53,7 +53,8 @@ var TimePicker = (props) => {
|
|
|
53
53
|
value,
|
|
54
54
|
onChange,
|
|
55
55
|
disabled,
|
|
56
|
-
placeholder
|
|
56
|
+
placeholder,
|
|
57
|
+
defaultValue: propsDefaultValue
|
|
57
58
|
} = props;
|
|
58
59
|
const normalizedValue = (0, import_react.useMemo)(() => {
|
|
59
60
|
if (!value)
|
|
@@ -61,11 +62,22 @@ var TimePicker = (props) => {
|
|
|
61
62
|
if (import_dayjs.default.isDayjs(value))
|
|
62
63
|
return value;
|
|
63
64
|
try {
|
|
64
|
-
return (0, import_dayjs.default)(String(value),
|
|
65
|
+
return (0, import_dayjs.default)(String(value), format);
|
|
65
66
|
} catch {
|
|
66
67
|
return void 0;
|
|
67
68
|
}
|
|
68
69
|
}, [value, format]);
|
|
70
|
+
const defaultValue = (0, import_react.useMemo)(() => {
|
|
71
|
+
if (!propsDefaultValue)
|
|
72
|
+
return void 0;
|
|
73
|
+
if (import_dayjs.default.isDayjs(propsDefaultValue))
|
|
74
|
+
return propsDefaultValue;
|
|
75
|
+
try {
|
|
76
|
+
return (0, import_dayjs.default)(String(propsDefaultValue), format);
|
|
77
|
+
} catch {
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
}, [propsDefaultValue, format]);
|
|
69
81
|
if (config.platform === "h5") {
|
|
70
82
|
const sizeClassMap = {
|
|
71
83
|
large: "pisell-h5-time-picker-lg",
|
|
@@ -111,7 +123,7 @@ var TimePicker = (props) => {
|
|
|
111
123
|
},
|
|
112
124
|
timePickerProps: {
|
|
113
125
|
format,
|
|
114
|
-
...(0, import_utils2.omit)(props, ["value"]) || {}
|
|
126
|
+
...(0, import_utils2.omit)(props, ["value", "defaultValue"]) || {}
|
|
115
127
|
},
|
|
116
128
|
popoverProps: {},
|
|
117
129
|
timeProps: {},
|
|
@@ -119,7 +131,7 @@ var TimePicker = (props) => {
|
|
|
119
131
|
}
|
|
120
132
|
);
|
|
121
133
|
}
|
|
122
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.TimePicker, { ...props, value: normalizedValue });
|
|
134
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.TimePicker, { ...props, value: normalizedValue, defaultValue });
|
|
123
135
|
};
|
|
124
136
|
var TimePickerWithMode = (0, import_utils3.withMode)(TimePicker, import_ReadPretty.default);
|
|
125
137
|
var WithMode_default = TimePickerWithMode;
|
|
@@ -47,7 +47,10 @@ var UploadReadPretty = (props) => {
|
|
|
47
47
|
src: props == null ? void 0 : props.value,
|
|
48
48
|
width: 100,
|
|
49
49
|
height: 100,
|
|
50
|
-
fallback: import_fallback.default
|
|
50
|
+
fallback: import_fallback.default,
|
|
51
|
+
preview: {
|
|
52
|
+
maskClassName: "pisell-upload-read-pretty-mask"
|
|
53
|
+
}
|
|
51
54
|
}
|
|
52
55
|
);
|
|
53
56
|
};
|
|
@@ -79,7 +79,7 @@ var Page = (props) => {
|
|
|
79
79
|
if (props == null ? void 0 : props.theme) {
|
|
80
80
|
return {
|
|
81
81
|
...props.theme,
|
|
82
|
-
cssVar: { key:
|
|
82
|
+
// cssVar: { key: 'app' },
|
|
83
83
|
token: {
|
|
84
84
|
...props.theme.token,
|
|
85
85
|
// 外部透传主题时,如果没有传入colorPrimary 默认使用主项目内主题色
|
|
@@ -88,7 +88,7 @@ var Page = (props) => {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
return {
|
|
91
|
-
cssVar: { key:
|
|
91
|
+
// cssVar: { key: 'app' },
|
|
92
92
|
components: {
|
|
93
93
|
Table: {
|
|
94
94
|
colorFillContent: "#EAECF0",
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -162,5 +162,9 @@ declare const _default: {
|
|
|
162
162
|
'pisellQrcode-done': string;
|
|
163
163
|
'pisellQrcode-qrcode': string;
|
|
164
164
|
'pisell-design-mode-action-disabled': string;
|
|
165
|
+
'pisell-delete-confirm-title': string;
|
|
166
|
+
'pisell-delete-confirm-content': string;
|
|
167
|
+
'pisell-delete-confirm-ok': string;
|
|
168
|
+
'pisell-delete-confirm-cancel': string;
|
|
165
169
|
};
|
|
166
170
|
export default _default;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -202,5 +202,9 @@ var en_US_default = {
|
|
|
202
202
|
//PisellQrcode组件
|
|
203
203
|
"pisellQrcode-done": "Done",
|
|
204
204
|
"pisellQrcode-qrcode": "QR code",
|
|
205
|
-
"pisell-design-mode-action-disabled": "This action cannot be performed in edit mode"
|
|
205
|
+
"pisell-design-mode-action-disabled": "This action cannot be performed in edit mode",
|
|
206
|
+
"pisell-delete-confirm-title": "Confirm Delete",
|
|
207
|
+
"pisell-delete-confirm-content": "Are you sure you want to delete this record?",
|
|
208
|
+
"pisell-delete-confirm-ok": "OK",
|
|
209
|
+
"pisell-delete-confirm-cancel": "Cancel"
|
|
206
210
|
};
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -161,6 +161,10 @@ declare const _default: {
|
|
|
161
161
|
'walletCard-discount': string;
|
|
162
162
|
'pisellQrcode-done': string;
|
|
163
163
|
'pisellQrcode-qrcode': string;
|
|
164
|
+
'pisell-delete-confirm-title': string;
|
|
165
|
+
'pisell-delete-confirm-content': string;
|
|
166
|
+
'pisell-delete-confirm-ok': string;
|
|
167
|
+
'pisell-delete-confirm-cancel': string;
|
|
164
168
|
'pisell-design-mode-action-disabled': string;
|
|
165
169
|
};
|
|
166
170
|
export default _default;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -201,5 +201,9 @@ var zh_CN_default = {
|
|
|
201
201
|
//PisellQrcode组件
|
|
202
202
|
"pisellQrcode-done": "完成",
|
|
203
203
|
"pisellQrcode-qrcode": "二维码",
|
|
204
|
+
"pisell-delete-confirm-title": "确认删除",
|
|
205
|
+
"pisell-delete-confirm-content": "确定要删除该条记录吗?",
|
|
206
|
+
"pisell-delete-confirm-ok": "确定",
|
|
207
|
+
"pisell-delete-confirm-cancel": "取消",
|
|
204
208
|
"pisell-design-mode-action-disabled": "编辑模式下不可执行此操作"
|
|
205
209
|
};
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -161,6 +161,10 @@ declare const _default: {
|
|
|
161
161
|
'walletCard-discount': string;
|
|
162
162
|
'pisellQrcode-done': string;
|
|
163
163
|
'pisellQrcode-qrcode': string;
|
|
164
|
+
'pisell-delete-confirm-title': string;
|
|
165
|
+
'pisell-delete-confirm-content': string;
|
|
166
|
+
'pisell-delete-confirm-ok': string;
|
|
167
|
+
'pisell-delete-confirm-cancel': string;
|
|
164
168
|
'pisell-design-mode-action-disabled': string;
|
|
165
169
|
};
|
|
166
170
|
export default _default;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -202,5 +202,9 @@ var zh_TW_default = {
|
|
|
202
202
|
//PisellQrcode组件
|
|
203
203
|
"pisellQrcode-done": "完成",
|
|
204
204
|
"pisellQrcode-qrcode": "二維碼",
|
|
205
|
+
"pisell-delete-confirm-title": "確認刪除",
|
|
206
|
+
"pisell-delete-confirm-content": "確定要刪除該條記錄嗎?",
|
|
207
|
+
"pisell-delete-confirm-ok": "確定",
|
|
208
|
+
"pisell-delete-confirm-cancel": "取消",
|
|
205
209
|
"pisell-design-mode-action-disabled": "編輯模式下不可執行此操作"
|
|
206
210
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export default [
|
|
2
2
|
{
|
|
3
3
|
title: '表单(添加)',
|
|
4
|
-
screenshot:
|
|
5
|
-
'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/form-1.png',
|
|
4
|
+
screenshot: require('./__screenshots__/add.png'),
|
|
6
5
|
schema: {
|
|
7
6
|
title: '表单(添加)',
|
|
8
7
|
componentName: 'DataSourceForm',
|
|
@@ -92,8 +91,8 @@ export default [
|
|
|
92
91
|
},
|
|
93
92
|
{
|
|
94
93
|
title: '详情',
|
|
95
|
-
screenshot:
|
|
96
|
-
|
|
94
|
+
screenshot: require('./__screenshots__/detail.png'),
|
|
95
|
+
|
|
97
96
|
schema: {
|
|
98
97
|
title: '详情',
|
|
99
98
|
componentName: 'DataSourceForm',
|
|
@@ -1377,6 +1377,23 @@ const dataSourceTable = {
|
|
|
1377
1377
|
defaultValue: false,
|
|
1378
1378
|
isRequired: true,
|
|
1379
1379
|
},
|
|
1380
|
+
{
|
|
1381
|
+
name: 'other',
|
|
1382
|
+
title: {
|
|
1383
|
+
label: {
|
|
1384
|
+
type: 'i18n',
|
|
1385
|
+
'en-US': 'Other Properties',
|
|
1386
|
+
'zh-CN': '其他拓展属性'
|
|
1387
|
+
},
|
|
1388
|
+
tip: {
|
|
1389
|
+
type: 'i18n',
|
|
1390
|
+
'en-US': 'Other extended properties',
|
|
1391
|
+
'zh-CN': '其他拓展属性'
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
propType: 'object',
|
|
1395
|
+
setter: 'JsonSetter'
|
|
1396
|
+
}
|
|
1380
1397
|
],
|
|
1381
1398
|
},
|
|
1382
1399
|
},
|
|
@@ -1865,7 +1882,12 @@ const dataSourceTable = {
|
|
|
1865
1882
|
},
|
|
1866
1883
|
propType: 'string',
|
|
1867
1884
|
setter: 'PisellI18nSetter',
|
|
1868
|
-
defaultValue:
|
|
1885
|
+
defaultValue: {
|
|
1886
|
+
'en': 'Operation',
|
|
1887
|
+
'zh-CN': '操作',
|
|
1888
|
+
'zh-HK': '操作',
|
|
1889
|
+
type: 'i18n',
|
|
1890
|
+
},
|
|
1869
1891
|
condition: {
|
|
1870
1892
|
type: 'JSFunction',
|
|
1871
1893
|
value:
|
|
@@ -96,7 +96,8 @@ export const fields2Columns = (fields: any[]) => {
|
|
|
96
96
|
// value: [createRenderSchema(field)],
|
|
97
97
|
// id: 'node_ocm49b0bm71',
|
|
98
98
|
// },
|
|
99
|
-
fieldComponent: createFormItemSchema(field, 'edit').componentName,
|
|
99
|
+
fieldComponent: createFormItemSchema(field, 'edit').componentName === 'JsonWrapper' ? 'FormItemInput.JSON' : createFormItemSchema(field, 'edit').componentName,
|
|
100
|
+
// fieldProps
|
|
100
101
|
}));
|
|
101
102
|
};
|
|
102
103
|
|
|
@@ -178,7 +179,12 @@ export const resetTableProps = (target: any) => {
|
|
|
178
179
|
});
|
|
179
180
|
target.getProps().setPropValue('search', {
|
|
180
181
|
show: false,
|
|
181
|
-
placeholder:
|
|
182
|
+
placeholder: {
|
|
183
|
+
type: 'i18n',
|
|
184
|
+
'en': 'Search',
|
|
185
|
+
'zh-CN': '搜索',
|
|
186
|
+
'zh-HK': '搜索',
|
|
187
|
+
},
|
|
182
188
|
});
|
|
183
189
|
target.getProps().setPropValue('titleButtons', {
|
|
184
190
|
show: false,
|
|
@@ -198,7 +204,7 @@ export const getJsSlot = () => {
|
|
|
198
204
|
|
|
199
205
|
export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
|
|
200
206
|
const fields = getVariable(target, 'currentFields');
|
|
201
|
-
let childrenSchemas = fields2ChildrenSchemas(fields, mode);
|
|
207
|
+
let childrenSchemas = [createFormGroup(fields2ChildrenSchemas(fields, mode))];
|
|
202
208
|
const titleMap = {
|
|
203
209
|
add: '表单(添加)',
|
|
204
210
|
edit: '编辑',
|
|
@@ -241,7 +247,7 @@ export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
|
|
|
241
247
|
? genDataSourceValueKey(target, 'currentRecord')
|
|
242
248
|
: undefined,
|
|
243
249
|
},
|
|
244
|
-
children:
|
|
250
|
+
children: childrenSchemas,
|
|
245
251
|
},
|
|
246
252
|
],
|
|
247
253
|
};
|
|
@@ -251,29 +257,59 @@ export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
|
|
|
251
257
|
export const setDefaultOperationAndTitleButtons = (target: any) => {
|
|
252
258
|
const operation = {
|
|
253
259
|
show: true,
|
|
254
|
-
title:
|
|
260
|
+
title: {
|
|
261
|
+
type: 'i18n',
|
|
262
|
+
'en': 'Operation',
|
|
263
|
+
'zh-CN': '操作',
|
|
264
|
+
'zh-HK': '操作',
|
|
265
|
+
},
|
|
255
266
|
align: 'center',
|
|
256
267
|
fixed: false,
|
|
257
268
|
type: 'link',
|
|
258
269
|
items: [
|
|
259
270
|
{
|
|
260
|
-
label:
|
|
271
|
+
label: {
|
|
272
|
+
type: 'i18n',
|
|
273
|
+
'en': 'View',
|
|
274
|
+
'zh-CN': '查看',
|
|
275
|
+
'zh-HK': '查看',
|
|
276
|
+
},
|
|
261
277
|
openMode: 'drawer',
|
|
262
278
|
openContentSize: 'middle',
|
|
263
|
-
openTitle:
|
|
279
|
+
openTitle: {
|
|
280
|
+
type: 'i18n',
|
|
281
|
+
'en': 'Detail',
|
|
282
|
+
'zh-CN': '详情',
|
|
283
|
+
'zh-HK': '詳情',
|
|
284
|
+
},
|
|
264
285
|
actionType: 'view',
|
|
265
286
|
key: 'view',
|
|
266
287
|
},
|
|
267
288
|
{
|
|
268
|
-
label:
|
|
289
|
+
label: {
|
|
290
|
+
type: 'i18n',
|
|
291
|
+
'en': 'Edit',
|
|
292
|
+
'zh-CN': '编辑',
|
|
293
|
+
'zh-HK': '編輯',
|
|
294
|
+
},
|
|
269
295
|
openMode: 'drawer',
|
|
270
296
|
openContentSize: 'middle',
|
|
271
|
-
openTitle:
|
|
297
|
+
openTitle: {
|
|
298
|
+
type: 'i18n',
|
|
299
|
+
'en': 'Edit',
|
|
300
|
+
'zh-CN': '编辑',
|
|
301
|
+
'zh-HK': '編輯',
|
|
302
|
+
},
|
|
272
303
|
actionType: 'edit',
|
|
273
304
|
key: 'edit',
|
|
274
305
|
},
|
|
275
306
|
{
|
|
276
|
-
label:
|
|
307
|
+
label: {
|
|
308
|
+
type: 'i18n',
|
|
309
|
+
'en': 'Delete',
|
|
310
|
+
'zh-CN': '删除',
|
|
311
|
+
'zh-HK': '刪除',
|
|
312
|
+
},
|
|
277
313
|
actionType: 'delete',
|
|
278
314
|
},
|
|
279
315
|
],
|
|
@@ -283,15 +319,30 @@ export const setDefaultOperationAndTitleButtons = (target: any) => {
|
|
|
283
319
|
show: true,
|
|
284
320
|
items: [
|
|
285
321
|
{
|
|
286
|
-
label:
|
|
322
|
+
label: {
|
|
323
|
+
type: 'i18n',
|
|
324
|
+
'en': 'Add',
|
|
325
|
+
'zh-CN': '添加',
|
|
326
|
+
'zh-HK': '添加',
|
|
327
|
+
},
|
|
287
328
|
openMode: 'drawer',
|
|
288
329
|
openContentSize: 'middle',
|
|
289
|
-
openTitle:
|
|
330
|
+
openTitle: {
|
|
331
|
+
type: 'i18n',
|
|
332
|
+
'en': 'Add',
|
|
333
|
+
'zh-CN': '添加',
|
|
334
|
+
'zh-HK': '添加',
|
|
335
|
+
},
|
|
290
336
|
actionType: 'add',
|
|
291
337
|
key: 'add',
|
|
292
338
|
buttonProps: {
|
|
293
339
|
type: 'primary',
|
|
294
|
-
title:
|
|
340
|
+
title: {
|
|
341
|
+
type: 'i18n',
|
|
342
|
+
'en': 'Add',
|
|
343
|
+
'zh-CN': '添加',
|
|
344
|
+
'zh-HK': '添加',
|
|
345
|
+
},
|
|
295
346
|
},
|
|
296
347
|
},
|
|
297
348
|
],
|
|
@@ -337,7 +388,12 @@ export const setDefaultSearchFilter = (target: any, fields: any[]) => {
|
|
|
337
388
|
|
|
338
389
|
target.getProps().setPropValue('search', {
|
|
339
390
|
show: true,
|
|
340
|
-
placeholder:
|
|
391
|
+
placeholder: {
|
|
392
|
+
type: 'i18n',
|
|
393
|
+
'en': 'Search',
|
|
394
|
+
'zh-CN': '搜索',
|
|
395
|
+
'zh-HK': '搜索',
|
|
396
|
+
},
|
|
341
397
|
});
|
|
342
398
|
|
|
343
399
|
target.getProps().setPropValue('filter', {
|
|
Binary file
|
|
@@ -32,7 +32,23 @@ export default {
|
|
|
32
32
|
generalItemMap['extra'],
|
|
33
33
|
generalItemMap['hideLabel'],
|
|
34
34
|
generalItemMap['renderMode'],
|
|
35
|
-
|
|
35
|
+
{
|
|
36
|
+
name: 'defaultValue',
|
|
37
|
+
title: {
|
|
38
|
+
label: {
|
|
39
|
+
type: 'i18n',
|
|
40
|
+
'en-US': 'Default value',
|
|
41
|
+
'zh-CN': '默认值',
|
|
42
|
+
},
|
|
43
|
+
tip: {
|
|
44
|
+
type: 'i18n',
|
|
45
|
+
'en-US': 'Default value',
|
|
46
|
+
'zh-CN': '默认值',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
propType: 'string',
|
|
50
|
+
setter: 'NumberSetter',
|
|
51
|
+
},
|
|
36
52
|
{
|
|
37
53
|
name: 'addonAfter',
|
|
38
54
|
title: {
|
|
@@ -131,49 +147,49 @@ export default {
|
|
|
131
147
|
defaultValue: 1,
|
|
132
148
|
setter: 'NumberSetter',
|
|
133
149
|
},
|
|
134
|
-
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
},
|
|
150
|
+
// {
|
|
151
|
+
// name: 'previewFormatter',
|
|
152
|
+
// title: {
|
|
153
|
+
// label: {
|
|
154
|
+
// type: 'i18n',
|
|
155
|
+
// 'en-US': 'Number Format',
|
|
156
|
+
// 'zh-CN': '数值格式化',
|
|
157
|
+
// },
|
|
158
|
+
// tip: {
|
|
159
|
+
// type: 'i18n',
|
|
160
|
+
// 'en-US': 'Format the display value',
|
|
161
|
+
// 'zh-CN': '格式化展示值,如大数字缩写 1000 -> 1k',
|
|
162
|
+
// },
|
|
163
|
+
// },
|
|
164
|
+
// propType: {
|
|
165
|
+
// type: 'oneOf',
|
|
166
|
+
// value: ['none', 'thousand', 'million', 'billion']
|
|
167
|
+
// },
|
|
168
|
+
// defaultValue: 'none',
|
|
169
|
+
// setter: {
|
|
170
|
+
// componentName: 'SelectSetter',
|
|
171
|
+
// props: {
|
|
172
|
+
// options: [
|
|
173
|
+
// {
|
|
174
|
+
// title: '无',
|
|
175
|
+
// value: 'none'
|
|
176
|
+
// },
|
|
177
|
+
// {
|
|
178
|
+
// title: '千',
|
|
179
|
+
// value: 'thousand'
|
|
180
|
+
// },
|
|
181
|
+
// {
|
|
182
|
+
// title: '百万',
|
|
183
|
+
// value: 'million'
|
|
184
|
+
// },
|
|
185
|
+
// {
|
|
186
|
+
// title: '十亿',
|
|
187
|
+
// value: 'billion'
|
|
188
|
+
// }
|
|
189
|
+
// ]
|
|
190
|
+
// }
|
|
191
|
+
// }
|
|
192
|
+
// },
|
|
177
193
|
]),
|
|
178
194
|
getFormItemValidateGroup([
|
|
179
195
|
generalItemMap['requiredobj'],
|
|
@@ -7,8 +7,24 @@ export default [
|
|
|
7
7
|
componentName: 'FormItemInput.JSON',
|
|
8
8
|
props: {
|
|
9
9
|
autoSize: {
|
|
10
|
+
minRows: 4,
|
|
10
11
|
},
|
|
11
12
|
placeholder: '请输入',
|
|
13
|
+
normalize: {
|
|
14
|
+
type: 'JSExpression',
|
|
15
|
+
value:
|
|
16
|
+
'(value) => {\n try {\n return JSON.parse(value);\n } catch(error) {\n console.log(error)\n }\n return value\n}',
|
|
17
|
+
},
|
|
18
|
+
getValueProps: {
|
|
19
|
+
type: 'JSExpression',
|
|
20
|
+
value:
|
|
21
|
+
'(value) => {\n try {\n return { value: value != "" && typeof value === \'object\' ? JSON.stringify(value, null, 2) : value};\n } catch(error) {\n console.log(error)\n }\n return {value: value}\n}',
|
|
22
|
+
},
|
|
23
|
+
validator: {
|
|
24
|
+
type: 'JSExpression',
|
|
25
|
+
value:
|
|
26
|
+
"async (value) => {\n try {\n if (typeof value === 'string' && value.trim() !== '') {\n JSON.parse(value);\n }\n } catch (err) {\n return Promise.reject(new Error(err.message));\n }\n}",
|
|
27
|
+
}
|
|
12
28
|
},
|
|
13
29
|
},
|
|
14
30
|
},
|
|
@@ -28,10 +28,10 @@ export default [
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
title: '
|
|
31
|
+
title: '多项选择器',
|
|
32
32
|
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/select-1.png',
|
|
33
33
|
schema: {
|
|
34
|
-
title: '
|
|
34
|
+
title: '多项选择器',
|
|
35
35
|
componentName: 'FormItemSelect',
|
|
36
36
|
props: {
|
|
37
37
|
allowClear: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.498",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"react-window": "^1.8.10",
|
|
68
68
|
"styled-components": "^6.0.0-rc.3",
|
|
69
69
|
"libphonenumber-js": "^1.11.17",
|
|
70
|
-
"@pisell/date-picker": "1.0.114",
|
|
71
70
|
"@pisell/icon": "0.0.10",
|
|
71
|
+
"@pisell/date-picker": "1.0.114",
|
|
72
72
|
"@pisell/utils": "1.0.43"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|