@pisell/materials 6.0.5 → 6.0.7
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -53
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -50
- package/es/components/config-provider/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +20 -11
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +11 -3
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +36 -20
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +50 -35
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +38 -10
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +14 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +48 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +7 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.js +7 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.js +10 -31
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +73 -36
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +53 -6
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +360 -0
- package/es/components/login-and-register/index.less +211 -0
- package/es/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/es/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/es/components/organizationTenantSwitcher/index.js +96 -0
- package/es/components/organizationTenantSwitcher/index.less +88 -0
- package/es/components/page/index.js +8 -6
- package/es/components/page-header/index.d.ts +14 -0
- package/es/components/page-header/index.js +36 -0
- package/es/components/page-header/index.less +45 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +89 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/profileMenu/index.d.ts +26 -0
- package/es/components/profileMenu/index.js +115 -0
- package/es/components/profileMenu/index.less +135 -0
- package/es/components/select/index.js +3 -2
- package/es/components/table/Header/index.js +8 -11
- package/es/index.d.ts +6 -0
- package/es/index.js +7 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/config-provider/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +22 -4
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +17 -3
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +16 -6
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +9 -5
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +19 -9
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +51 -5
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +14 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +46 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +17 -2
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +20 -12
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +25 -7
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +48 -7
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +261 -0
- package/lib/components/login-and-register/index.less +211 -0
- package/lib/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/lib/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/lib/components/organizationTenantSwitcher/index.js +119 -0
- package/lib/components/organizationTenantSwitcher/index.less +88 -0
- package/lib/components/page/index.js +6 -6
- package/lib/components/page-header/index.d.ts +14 -0
- package/lib/components/page-header/index.js +63 -0
- package/lib/components/page-header/index.less +45 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellAvatar/index.js +108 -0
- package/lib/components/pisellAvatar/index.less +26 -0
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/profileMenu/index.d.ts +26 -0
- package/lib/components/profileMenu/index.js +113 -0
- package/lib/components/profileMenu/index.less +135 -0
- package/lib/components/select/index.js +2 -1
- package/lib/components/table/Header/index.js +11 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.js +18 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lowcode/_utils/defaultSchema.ts +64 -0
- package/lowcode/data-source-form/meta.ts +130 -0
- package/lowcode/data-source-form/utils.ts +33 -3
- package/lowcode/data-source-table/meta.ts +420 -3
- package/lowcode/data-source-table/utils.tsx +6 -0
- package/lowcode/form-item-date-picker/snippets.ts +3 -0
- package/lowcode/form-item-input/snippets.ts +3 -1
- package/lowcode/form-item-input-number/snippets.ts +4 -0
- package/lowcode/form-item-input.email/snippets.ts +3 -0
- package/lowcode/form-item-input.json/snippets.ts +4 -1
- package/lowcode/form-item-input.password/snippets.ts +3 -0
- package/lowcode/form-item-input.phone/snippets.ts +3 -0
- package/lowcode/form-item-input.text-area/snippets.ts +3 -1
- package/lowcode/form-item-input.url/snippets.ts +3 -0
- package/lowcode/form-item-select/meta.ts +2 -1
- package/lowcode/form-item-select/snippets.ts +6 -0
- package/lowcode/form-item-time-picker/snippets.ts +3 -0
- package/lowcode/form-item-translation/snippets.ts +3 -1
- package/lowcode/login-and-register/meta.ts +541 -0
- package/lowcode/login-and-register/snippets.ts +38 -0
- package/lowcode/organization-tenant-switch/meta.ts +127 -0
- package/lowcode/page-header/meta.ts +68 -124
- package/lowcode/page-header/snippets.ts +1 -1
- package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/pisell-avatar/meta.ts +111 -0
- package/lowcode/pisell-avatar/snippets.ts +14 -0
- package/lowcode/pisell-tags/__screenshots__/tag-1.png +0 -0
- package/lowcode/pisell-tags/meta.ts +123 -0
- package/lowcode/pisell-tags/snippets.ts +14 -0
- package/lowcode/profile-menu/meta.ts +175 -0
- package/lowcode/profile-menu/snippets.ts +71 -0
- package/lowcode/submit-button/meta.ts +6 -0
- package/package.json +3 -3
|
@@ -164,6 +164,7 @@ const dataSourceForm: MetaType = {
|
|
|
164
164
|
title: '字段',
|
|
165
165
|
display: 'entry',
|
|
166
166
|
type: 'group',
|
|
167
|
+
name: "_fields1",
|
|
167
168
|
items: [
|
|
168
169
|
{
|
|
169
170
|
title: {
|
|
@@ -261,6 +262,59 @@ const dataSourceForm: MetaType = {
|
|
|
261
262
|
},
|
|
262
263
|
},
|
|
263
264
|
},
|
|
265
|
+
{
|
|
266
|
+
type: 'group',
|
|
267
|
+
name: "_extraParams",
|
|
268
|
+
title: '额外参数',
|
|
269
|
+
display: 'entry',
|
|
270
|
+
items: [
|
|
271
|
+
{
|
|
272
|
+
name: 'extraParams.list',
|
|
273
|
+
title: {
|
|
274
|
+
type: 'i18n',
|
|
275
|
+
'en-US': 'List Params',
|
|
276
|
+
'zh-CN': '列表参数',
|
|
277
|
+
},
|
|
278
|
+
setter: 'StringSetter'
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: 'extraParams.get',
|
|
282
|
+
title: {
|
|
283
|
+
type: 'i18n',
|
|
284
|
+
'en-US': 'Get Params',
|
|
285
|
+
'zh-CN': '获取参数',
|
|
286
|
+
},
|
|
287
|
+
setter: 'JsonSetter'
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: 'extraParams.update',
|
|
291
|
+
title: {
|
|
292
|
+
type: 'i18n',
|
|
293
|
+
'en-US': 'Update Params',
|
|
294
|
+
'zh-CN': '更新参数',
|
|
295
|
+
},
|
|
296
|
+
setter: 'JsonSetter'
|
|
297
|
+
},
|
|
298
|
+
// {
|
|
299
|
+
// name: 'extraParams.create',
|
|
300
|
+
// title: {
|
|
301
|
+
// type: 'i18n',
|
|
302
|
+
// 'en-US': 'Create Params',
|
|
303
|
+
// 'zh-CN': '创建参数',
|
|
304
|
+
// },
|
|
305
|
+
// setter: 'StringSetter'
|
|
306
|
+
// },
|
|
307
|
+
// {
|
|
308
|
+
// name: 'extraParams.destroy',
|
|
309
|
+
// title: {
|
|
310
|
+
// type: 'i18n',
|
|
311
|
+
// 'en-US': 'Destroy Params',
|
|
312
|
+
// 'zh-CN': '删除参数',
|
|
313
|
+
// },
|
|
314
|
+
// setter: 'StringSetter'
|
|
315
|
+
// }
|
|
316
|
+
]
|
|
317
|
+
}
|
|
264
318
|
],
|
|
265
319
|
},
|
|
266
320
|
{
|
|
@@ -453,6 +507,70 @@ const dataSourceForm: MetaType = {
|
|
|
453
507
|
setter: 'BoolSetter',
|
|
454
508
|
supportVariable: true,
|
|
455
509
|
},
|
|
510
|
+
|
|
511
|
+
{
|
|
512
|
+
type: 'group',
|
|
513
|
+
title: {
|
|
514
|
+
type: 'i18n',
|
|
515
|
+
'en-US': 'Functions',
|
|
516
|
+
'zh-CN': '函数配置',
|
|
517
|
+
},
|
|
518
|
+
display: 'accordion',
|
|
519
|
+
items: [
|
|
520
|
+
{
|
|
521
|
+
name: 'customSubmit',
|
|
522
|
+
title: {
|
|
523
|
+
label: {
|
|
524
|
+
type: 'i18n',
|
|
525
|
+
'en-US': 'Custom Submit',
|
|
526
|
+
'zh-CN': '自定义提交',
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
setter: {
|
|
530
|
+
componentName: 'FunctionSetter',
|
|
531
|
+
props: {
|
|
532
|
+
template:
|
|
533
|
+
"customSubmit(values,${extParams}){\n// 格式化数据\nreturn values}",
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
name: 'formatSubmitValues',
|
|
539
|
+
title: {
|
|
540
|
+
label: {
|
|
541
|
+
type: 'i18n',
|
|
542
|
+
'en-US': 'Format Submit Values',
|
|
543
|
+
'zh-CN': '提交前格式化数据',
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
setter: {
|
|
547
|
+
componentName: 'FunctionSetter',
|
|
548
|
+
props: {
|
|
549
|
+
template:
|
|
550
|
+
"formatSubmitValues(values,${extParams}){\n// 格式化数据\nreturn values}",
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
name: 'formatInitialValues',
|
|
556
|
+
title: {
|
|
557
|
+
label: {
|
|
558
|
+
type: 'i18n',
|
|
559
|
+
'en-US': 'Format Initial Values',
|
|
560
|
+
'zh-CN': '获取详情时格式化数据',
|
|
561
|
+
},
|
|
562
|
+
},
|
|
563
|
+
setter: {
|
|
564
|
+
componentName: 'FunctionSetter',
|
|
565
|
+
props: {
|
|
566
|
+
template:
|
|
567
|
+
"formatInitialValues(values,${extParams}){\n// 格式化数据\nreturn values}",
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
],
|
|
572
|
+
},
|
|
573
|
+
|
|
456
574
|
{
|
|
457
575
|
type: 'group',
|
|
458
576
|
title: '布局',
|
|
@@ -704,6 +822,13 @@ const dataSourceForm: MetaType = {
|
|
|
704
822
|
tip: '字段值更新时触发回调事件',
|
|
705
823
|
},
|
|
706
824
|
},
|
|
825
|
+
{
|
|
826
|
+
name: 'onDataSourceFinish',
|
|
827
|
+
title: {
|
|
828
|
+
label: '数据源提交成功',
|
|
829
|
+
tip: '数据源提交成功',
|
|
830
|
+
},
|
|
831
|
+
},
|
|
707
832
|
],
|
|
708
833
|
component: { isContainer: true },
|
|
709
834
|
supports: {
|
|
@@ -729,6 +854,11 @@ const dataSourceForm: MetaType = {
|
|
|
729
854
|
template:
|
|
730
855
|
"onValuesChange(changedValues,allValues,${extParams}){\n// 字段值更新时触发回调事件\nconsole.log('onValuesChange',changedValues,allValues);}",
|
|
731
856
|
},
|
|
857
|
+
{
|
|
858
|
+
name: 'onDataSourceFinish',
|
|
859
|
+
template:
|
|
860
|
+
"onDataSourceFinish(values,result,${extParams}){\n// 数据源提交成功\nconsole.log('onDataSourceFinish',values,result);}",
|
|
861
|
+
},
|
|
732
862
|
],
|
|
733
863
|
},
|
|
734
864
|
advanced: {
|
|
@@ -139,6 +139,12 @@ export const createFormItemSchema = (
|
|
|
139
139
|
name,
|
|
140
140
|
renderMode: modeMap[mode] || 'edit',
|
|
141
141
|
allowClear: true,
|
|
142
|
+
placeholder: {
|
|
143
|
+
type: 'i18n',
|
|
144
|
+
'en': 'Enter',
|
|
145
|
+
'zh-CN': '请输入',
|
|
146
|
+
'zh-HK': '請輸入',
|
|
147
|
+
},
|
|
142
148
|
};
|
|
143
149
|
let componentName = xComponent;
|
|
144
150
|
|
|
@@ -224,13 +230,27 @@ export const createFormItemSchema = (
|
|
|
224
230
|
) {
|
|
225
231
|
if (['Radio.Group', 'Checkbox.Group'].includes(xComponent)) {
|
|
226
232
|
props.direction = 'horizontal';
|
|
233
|
+
props.placeholder = "";
|
|
227
234
|
} else {
|
|
228
235
|
props.styleType = 'antd';
|
|
229
236
|
props.showSearch = true;
|
|
230
|
-
props.isShowDropdown = true;
|
|
231
237
|
props.optionFilterProp = 'label';
|
|
238
|
+
props.placeholder = {
|
|
239
|
+
type: 'i18n',
|
|
240
|
+
'en': 'Select an option',
|
|
241
|
+
'zh-CN': '请选择一个选项',
|
|
242
|
+
'zh-HK': '請選擇一個選項',
|
|
243
|
+
};
|
|
244
|
+
|
|
232
245
|
if (props.mode === "multiple") {
|
|
233
246
|
props.selectAll = true;
|
|
247
|
+
props.isShowDropdown = true;
|
|
248
|
+
props.placeholder = {
|
|
249
|
+
type: 'i18n',
|
|
250
|
+
'en': 'Select one or more options',
|
|
251
|
+
'zh-CN': '请选择一个或多个选项',
|
|
252
|
+
'zh-HK': '請選擇一個或多個選項',
|
|
253
|
+
};
|
|
234
254
|
}
|
|
235
255
|
}
|
|
236
256
|
props.optionSourceType = 'default';
|
|
@@ -239,14 +259,24 @@ export const createFormItemSchema = (
|
|
|
239
259
|
|
|
240
260
|
if (xComponent === 'TimePicker') {
|
|
241
261
|
props.format = 'HH:mm';
|
|
242
|
-
props.placeholder =
|
|
262
|
+
props.placeholder = {
|
|
263
|
+
type: 'i18n',
|
|
264
|
+
'en': 'Select a time',
|
|
265
|
+
'zh-CN': '请选择时间',
|
|
266
|
+
'zh-HK': '請選擇時間',
|
|
267
|
+
};
|
|
243
268
|
props.defaultValue = props.defaultValue || null;
|
|
244
269
|
}
|
|
245
270
|
|
|
246
271
|
if (xComponent === 'DatePicker') {
|
|
247
272
|
props.format = props.dateFormat || 'YYYY-MM-DD';
|
|
248
273
|
props.showTime = false;
|
|
249
|
-
props.placeholder =
|
|
274
|
+
props.placeholder = {
|
|
275
|
+
type: 'i18n',
|
|
276
|
+
'en': 'Select a date',
|
|
277
|
+
'zh-CN': '请选择日期',
|
|
278
|
+
'zh-HK': '請選擇日期',
|
|
279
|
+
};
|
|
250
280
|
props.defaultValue = null;
|
|
251
281
|
}
|
|
252
282
|
|