@pisell/materials 1.0.492 → 1.0.493

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/browserSelect/index.js +2 -2
  12. package/es/components/browserSelect/index.less +49 -47
  13. package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
  14. package/es/components/dataSourceComponents/dataSourceForm/style.less +12 -3
  15. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
  16. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +5 -2
  17. package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -0
  18. package/es/components/dataSourceComponents/dataSourceForm/utils.js +12 -6
  19. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +14 -13
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +4 -5
  21. package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -1
  22. package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
  23. package/es/components/dataSourceComponents/dataSourceWrapper/index.js +4 -2
  24. package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +5 -3
  25. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +7 -2
  26. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +2 -1
  27. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +10 -1
  28. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.less +8 -0
  29. package/es/components/dataSourceComponents/fields/Upload/fallback.png +0 -0
  30. package/es/components/dataSourceComponents/fields/Upload/index.less +9 -0
  31. package/es/components/dataSourceComponents/fields/index.d.ts +2 -1
  32. package/es/components/dataSourceComponents/fields/index.js +1 -0
  33. package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
  34. package/es/components/dataSourceComponents/hooks/useActions.js +51 -22
  35. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +2 -0
  36. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +6 -3
  37. package/es/components/dataSourceComponents/utils/index.d.ts +0 -0
  38. package/es/components/dataSourceComponents/utils/index.js +0 -0
  39. package/es/components/pisellWalletPassCard/index.d.ts +1 -1
  40. package/es/components/select/index.js +5 -2
  41. package/es/components/select/index.less +11 -0
  42. package/es/components/table/Tabs/index.js +8 -2
  43. package/es/locales/en-US.d.ts +1 -0
  44. package/es/locales/en-US.js +2 -1
  45. package/es/locales/zh-CN.d.ts +1 -0
  46. package/es/locales/zh-CN.js +2 -1
  47. package/es/locales/zh-TW.d.ts +1 -0
  48. package/es/locales/zh-TW.js +2 -1
  49. package/lib/components/browserSelect/index.js +2 -2
  50. package/lib/components/browserSelect/index.less +49 -47
  51. package/lib/components/dataSourceComponents/dataSourceForm/index.js +10 -2
  52. package/lib/components/dataSourceComponents/dataSourceForm/style.less +12 -3
  53. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
  54. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +5 -2
  55. package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -0
  56. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +2 -3
  57. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +14 -13
  58. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +3 -2
  59. package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -1
  60. package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
  61. package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +11 -2
  62. package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +11 -2
  63. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +2 -1
  64. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +2 -1
  65. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +15 -1
  66. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.less +8 -0
  67. package/lib/components/dataSourceComponents/fields/Upload/fallback.png +0 -0
  68. package/lib/components/dataSourceComponents/fields/Upload/index.less +9 -0
  69. package/lib/components/dataSourceComponents/fields/index.d.ts +2 -1
  70. package/lib/components/dataSourceComponents/fields/index.js +1 -0
  71. package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
  72. package/lib/components/dataSourceComponents/hooks/useActions.js +22 -3
  73. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +2 -0
  74. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +7 -3
  75. package/lib/components/dataSourceComponents/utils/index.d.ts +0 -0
  76. package/lib/components/dataSourceComponents/utils/index.js +0 -0
  77. package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
  78. package/lib/components/select/index.js +5 -2
  79. package/lib/components/select/index.less +11 -0
  80. package/lib/components/table/Tabs/index.js +1 -0
  81. package/lib/locales/en-US.d.ts +1 -0
  82. package/lib/locales/en-US.js +2 -1
  83. package/lib/locales/zh-CN.d.ts +1 -0
  84. package/lib/locales/zh-CN.js +2 -1
  85. package/lib/locales/zh-TW.d.ts +1 -0
  86. package/lib/locales/zh-TW.js +2 -1
  87. package/lowcode/button/meta.ts +1 -1
  88. package/lowcode/data-source-form/utils.ts +21 -2
  89. package/lowcode/data-source-table/meta.ts +18 -1
  90. package/lowcode/data-source-table/utils.tsx +2 -2
  91. package/lowcode/form-item-select/meta.ts +12 -6
  92. package/lowcode/form-item-select/snippets.ts +2 -6
  93. package/lowcode/form-item-upload/__screenshots__/upload.png +0 -0
  94. package/lowcode/form-item-upload/meta.ts +2 -2
  95. package/lowcode/form-item-upload/snippets.ts +1 -0
  96. package/lowcode/select/snippets.ts +1 -0
  97. package/lowcode/submit-button/meta.ts +67 -16
  98. package/lowcode/submit-button/snippets.ts +6 -1
  99. package/package.json +1 -1
  100. package/dist/umd/materials.min.css +0 -1
  101. package/dist/umd/materials.min.js +0 -1
  102. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  103. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  104. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  105. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  106. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  107. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
@@ -2,8 +2,9 @@ import { DataSourceType } from '../provider/dataSource/DataSourceContext';
2
2
  export interface UseActionsParams {
3
3
  dataSource?: DataSourceType;
4
4
  currentValue?: 'server' | 'local';
5
+ __designMode?: string;
5
6
  }
6
- declare const useActions: ({ dataSource: propsDataSource, currentValue: propsCurrentValue, }?: UseActionsParams) => {
7
+ declare const useActions: ({ dataSource: propsDataSource, currentValue: propsCurrentValue, __designMode, }?: UseActionsParams) => {
7
8
  create: (values: Record<string, any>) => Promise<any>;
8
9
  get: () => Promise<any>;
9
10
  update: (values: Record<string, any>) => Promise<any>;
@@ -42,13 +42,15 @@ var import_useDataSource = __toESM(require("./useDataSource"));
42
42
  var import_locales = require("../../../locales");
43
43
  var useActions = ({
44
44
  dataSource: propsDataSource,
45
- currentValue: propsCurrentValue
45
+ currentValue: propsCurrentValue,
46
+ __designMode
46
47
  } = {}) => {
47
- const { dataSource: ctxDataSource } = (0, import_useDataSource.default)();
48
+ const { dataSource: ctxDataSource, __designMode: ctxDesignMode } = (0, import_useDataSource.default)();
48
49
  const { parseVariable } = (0, import_useVariables.default)();
49
50
  const { parseActions } = (0, import_useParseActionsVariable.default)();
50
51
  const currentDataSource = propsDataSource || ctxDataSource;
51
52
  const currentValue = propsCurrentValue || "server";
53
+ const designMode = __designMode || ctxDesignMode;
52
54
  const {
53
55
  isCustomApi,
54
56
  actions: originalActions,
@@ -92,7 +94,16 @@ var useActions = ({
92
94
  const getHeaders = (0, import_ahooks.useMemoizedFn)(() => {
93
95
  return headerDataSource ? { "x-data-source": headerDataSource } : {};
94
96
  });
97
+ const designModeToast = (0, import_ahooks.useMemoizedFn)(() => {
98
+ return (0, import_pisellToast.default)({
99
+ content: (0, import_locales.getText)("pisell-design-mode-action-disabled")
100
+ });
101
+ });
95
102
  const create = (0, import_ahooks.useMemoizedFn)(async (values) => {
103
+ if (designMode === "design") {
104
+ designModeToast();
105
+ return Promise.reject();
106
+ }
96
107
  if (isCustomApi) {
97
108
  const actions = getParsedActions();
98
109
  const createApi = genCustomApi(actions == null ? void 0 : actions.create);
@@ -124,6 +135,10 @@ var useActions = ({
124
135
  return {};
125
136
  });
126
137
  const update = (0, import_ahooks.useMemoizedFn)(async (values) => {
138
+ if (designMode === "design") {
139
+ designModeToast();
140
+ return Promise.reject();
141
+ }
127
142
  if (isCustomApi) {
128
143
  const actions = getParsedActions();
129
144
  if (!actions.update) {
@@ -170,6 +185,10 @@ var useActions = ({
170
185
  }
171
186
  );
172
187
  const destroy = (0, import_ahooks.useMemoizedFn)(async (id) => {
188
+ if (designMode === "design") {
189
+ designModeToast();
190
+ return Promise.reject();
191
+ }
173
192
  if (isCustomApi) {
174
193
  const actions = getParsedActions();
175
194
  if (!actions.destroy) {
@@ -179,7 +198,7 @@ var useActions = ({
179
198
  return deleteApi({});
180
199
  }
181
200
  if (!name)
182
- return;
201
+ return Promise.reject();
183
202
  return (0, import_serve.deleteNocobaseData)(name, id, getHeaders());
184
203
  });
185
204
  return {
@@ -89,6 +89,7 @@ export declare type DataSourceContextProps = {
89
89
  get?: boolean;
90
90
  };
91
91
  __id?: string;
92
+ __designMode?: string;
92
93
  };
93
94
  export interface DataSourceContextType {
94
95
  dataSource?: DataSourceType;
@@ -97,6 +98,7 @@ export interface DataSourceContextType {
97
98
  get: Result<any, any>;
98
99
  update: Result<any, any>;
99
100
  create: Result<any, any>;
101
+ __designMode?: string;
100
102
  }
101
103
  export declare const DataSourceContext: import("react").Context<DataSourceContextType>;
102
104
  export default DataSourceContext;
@@ -46,14 +46,16 @@ var DataSourceProvider = (props) => {
46
46
  currentValue,
47
47
  actions: externalActions,
48
48
  overrideData,
49
- autoRun
49
+ autoRun,
50
+ __designMode
50
51
  } = props;
51
52
  (0, import_useSetRequest.default)();
52
53
  const { parseVariable } = (0, import_useVariables.default)();
53
54
  const dataSource = (0, import_utils.isString)(propsDataSource) ? parseVariable == null ? void 0 : parseVariable(propsDataSource) : propsDataSource;
54
55
  const standardActions = (0, import_useActions.default)({
55
56
  dataSource,
56
- currentValue
57
+ currentValue,
58
+ __designMode
57
59
  });
58
60
  const list = (externalActions == null ? void 0 : externalActions.list) || standardActions.list;
59
61
  const get = (externalActions == null ? void 0 : externalActions.get) || standardActions.get;
@@ -77,6 +79,7 @@ var DataSourceProvider = (props) => {
77
79
  });
78
80
  const value = (0, import_react.useMemo)(() => {
79
81
  return {
82
+ __designMode,
80
83
  dataSource,
81
84
  list: {
82
85
  ...listResult,
@@ -97,7 +100,8 @@ var DataSourceProvider = (props) => {
97
100
  getResult,
98
101
  updateResult,
99
102
  createResult,
100
- overrideData
103
+ overrideData,
104
+ __designMode
101
105
  ]);
102
106
  return /* @__PURE__ */ import_react.default.createElement(import_DataSourceContext.default.Provider, { value }, children);
103
107
  };
@@ -21,7 +21,7 @@ export interface PisellWalletPassCardProps {
21
21
  /** 禁用原因 */
22
22
  disabledReason?: string;
23
23
  /** 是否展示禁用原因 */
24
- showDisabledReason?: string;
24
+ showDisabledReason?: boolean;
25
25
  /** 封面图 */
26
26
  cover?: string;
27
27
  /** 余额标题文案 */
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(select_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_ahooks = require("ahooks");
38
+ var import_classnames = __toESM(require("classnames"));
38
39
  var import_iconfont = __toESM(require("../iconfont"));
39
40
  var import_locales = require("../../locales");
40
41
  var import_hoc = require("../../utils/hoc");
@@ -50,7 +51,8 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
50
51
  dropdownRender: propsDropdownRender,
51
52
  showSearch,
52
53
  styleType,
53
- optionFilterProp = "value"
54
+ optionFilterProp = "value",
55
+ popupClassName
54
56
  } = props;
55
57
  const [state, setState] = (0, import_ahooks.useControllableValue)(props);
56
58
  const [searchValue, setSearchValue] = (0, import_react.useState)("");
@@ -136,7 +138,8 @@ var SelectBase = (0, import_react.forwardRef)((props, ref) => {
136
138
  value: state,
137
139
  onChange: (value, option) => setState(value, option),
138
140
  dropdownRender,
139
- options: filteredOptions
141
+ options: filteredOptions,
142
+ popupClassName: (0, import_classnames.default)("pisell-base-select-dropdown", popupClassName)
140
143
  }
141
144
  );
142
145
  });
@@ -9,3 +9,14 @@
9
9
  padding: 0 5px 5px;
10
10
  }
11
11
  }
12
+
13
+ // 添加选项间距
14
+ .pisell-base-select-dropdown {
15
+ .pisell-lowcode-select-item {
16
+ margin-bottom: 4px;
17
+
18
+ &:last-child {
19
+ margin-bottom: 0;
20
+ }
21
+ }
22
+ }
@@ -42,6 +42,7 @@ var Tabs = ({
42
42
  }) => {
43
43
  const tabItems = (0, import_react.useMemo)(() => {
44
44
  return items.map((item, index) => ({
45
+ ...item,
45
46
  key: String(index),
46
47
  label: item.name
47
48
  }));
@@ -161,5 +161,6 @@ declare const _default: {
161
161
  'walletCard-discount': string;
162
162
  'pisellQrcode-done': string;
163
163
  'pisellQrcode-qrcode': string;
164
+ 'pisell-design-mode-action-disabled': string;
164
165
  };
165
166
  export default _default;
@@ -201,5 +201,6 @@ var en_US_default = {
201
201
  "walletCard-discount": "Discount",
202
202
  //PisellQrcode组件
203
203
  "pisellQrcode-done": "Done",
204
- "pisellQrcode-qrcode": "QR code"
204
+ "pisellQrcode-qrcode": "QR code",
205
+ "pisell-design-mode-action-disabled": "This action cannot be performed in edit mode"
205
206
  };
@@ -161,5 +161,6 @@ declare const _default: {
161
161
  'walletCard-discount': string;
162
162
  'pisellQrcode-done': string;
163
163
  'pisellQrcode-qrcode': string;
164
+ 'pisell-design-mode-action-disabled': string;
164
165
  };
165
166
  export default _default;
@@ -200,5 +200,6 @@ var zh_CN_default = {
200
200
  "walletCard-discount": "折扣卡",
201
201
  //PisellQrcode组件
202
202
  "pisellQrcode-done": "完成",
203
- "pisellQrcode-qrcode": "二维码"
203
+ "pisellQrcode-qrcode": "二维码",
204
+ "pisell-design-mode-action-disabled": "编辑模式下不可执行此操作"
204
205
  };
@@ -161,5 +161,6 @@ declare const _default: {
161
161
  'walletCard-discount': string;
162
162
  'pisellQrcode-done': string;
163
163
  'pisellQrcode-qrcode': string;
164
+ 'pisell-design-mode-action-disabled': string;
164
165
  };
165
166
  export default _default;
@@ -201,5 +201,6 @@ var zh_TW_default = {
201
201
  "walletCard-discount": "折扣卡",
202
202
  //PisellQrcode组件
203
203
  "pisellQrcode-done": "完成",
204
- "pisellQrcode-qrcode": "二維碼"
204
+ "pisellQrcode-qrcode": "二維碼",
205
+ "pisell-design-mode-action-disabled": "編輯模式下不可執行此操作"
205
206
  };
@@ -40,7 +40,7 @@ const ButtonMeta = {
40
40
  tip: "children",
41
41
  },
42
42
  propType: 'string',
43
- setter: 'StringSetter',
43
+ setter: 'PisellI18nSetter',
44
44
  },
45
45
  {
46
46
  name: "htmlType",
@@ -42,13 +42,23 @@ export const createSubmitButton = (props: any = {}) => {
42
42
  type: 'primary',
43
43
  size: 'large',
44
44
  status: 'normal',
45
- children: 'Submit',
45
+ childrenString: {
46
+ type: 'i18n',
47
+ en: 'Submit',
48
+ 'zh-CN': '提交',
49
+ 'zh-HK': '提交',
50
+ },
46
51
  confirmConfig: {
47
52
  enable: false,
48
53
  },
49
54
  toastConfig: {
50
55
  enable: true,
51
- title: 'Submitted successfully',
56
+ title: {
57
+ type: 'i18n',
58
+ en: 'Submitted successfully',
59
+ 'zh-CN': '提交成功',
60
+ 'zh-HK': '提交成功',
61
+ },
52
62
  },
53
63
  refreshData: true,
54
64
  afterSubmitType: 'none',
@@ -202,6 +212,13 @@ export const createFormItemSchema = (
202
212
  ) {
203
213
  if (['Radio.Group', 'Checkbox.Group'].includes(xComponent)) {
204
214
  props.direction = 'horizontal';
215
+ } else {
216
+ props.styleType = 'antd';
217
+ if (props.mode === "multiple") {
218
+ props.selectAll = true;
219
+ props.isShowDropdown = true;
220
+ props.showSearch = true;
221
+ }
205
222
  }
206
223
  props.optionSourceType = 'default';
207
224
  props.options = uiSchema.enum;
@@ -209,12 +226,14 @@ export const createFormItemSchema = (
209
226
 
210
227
  if (xComponent === 'TimePicker') {
211
228
  props.format = 'HH:mm';
229
+ props.placeholder = '';
212
230
  props.defaultValue = props.defaultValue || null;
213
231
  }
214
232
 
215
233
  if (xComponent === 'DatePicker') {
216
234
  props.format = props.dateFormat || 'YYYY-MM-DD';
217
235
  props.showTime = false;
236
+ props.placeholder = '';
218
237
  props.defaultValue = null;
219
238
  }
220
239
 
@@ -367,7 +367,6 @@ const dataSourceTable = {
367
367
  },
368
368
  propType: 'bool',
369
369
  setter: 'BoolSetter',
370
- isRequired: true,
371
370
  },
372
371
  ],
373
372
  },
@@ -996,6 +995,24 @@ const dataSourceTable = {
996
995
  propType: 'string',
997
996
  setter: 'StringSetter',
998
997
  },
998
+ {
999
+ name: 'disabled',
1000
+ title: {
1001
+ label: {
1002
+ type: 'i18n',
1003
+ 'en-US': 'Disabled',
1004
+ 'zh-CN': '是否禁用',
1005
+ },
1006
+ tip: {
1007
+ type: 'i18n',
1008
+ 'en-US': 'disabled | Whether the tab is disabled',
1009
+ 'zh-CN': 'disabled | 是否禁用标签页',
1010
+ },
1011
+ },
1012
+ propType: 'bool',
1013
+ defaultValue: false,
1014
+ setter: 'BoolSetter'
1015
+ }
999
1016
  ],
1000
1017
  },
1001
1018
  },
@@ -2,7 +2,7 @@ import {
2
2
  nocobaseCpt2PisellCptMap,
3
3
  systemFields,
4
4
  } from '../data-source-form/constants';
5
- import { clearVariables, createFormItemSchema } from '../data-source-form/utils';
5
+ import { clearVariables, createFormItemSchema, createFormGroup } from '../data-source-form/utils';
6
6
  import {
7
7
  getVariable,
8
8
  getAllVariables,
@@ -241,7 +241,7 @@ export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
241
241
  ? genDataSourceValueKey(target, 'currentRecord')
242
242
  : undefined,
243
243
  },
244
- children: childrenSchemas,
244
+ children: createFormGroup(childrenSchemas),
245
245
  },
246
246
  ],
247
247
  };
@@ -70,16 +70,22 @@ export default {
70
70
  'en-US': 'Style',
71
71
  'zh-CN': '样式使用',
72
72
  },
73
+ condition(target: any) {
74
+ const mode = target.getProps().getPropValue('mode');
75
+ if (!mode) return false;
76
+ return ['multiple', 'tags'].includes(mode);
77
+ },
73
78
  setter: {
74
79
  componentName: 'SelectSetter',
75
80
  props: {
76
81
  options: [
77
82
  { title: '系统样式', value: 'system' },
78
- { title: 'Antd样式', value: 'antd' }
79
- ]
80
- }
81
- }
82
- }
83
+ { title: 'Antd样式', value: 'antd' },
84
+ ],
85
+ },
86
+ },
87
+ defaultValue: 'antd',
88
+ },
83
89
  ]),
84
90
  ],
85
91
  props: [
@@ -458,7 +464,7 @@ export default {
458
464
  propType: 'bool',
459
465
  },
460
466
  {
461
- name: 'FormItemSelectAll',
467
+ name: 'selectAll',
462
468
  title: { label: '全选', tip: 'FormItemSelectAll |全选' },
463
469
  propType: 'bool',
464
470
  condition: {
@@ -9,9 +9,7 @@ export default [
9
9
  allowClear: true,
10
10
  optionSourceType: 'default',
11
11
  optionFilterProp: 'label',
12
- style: {
13
- width: 200,
14
- },
12
+ styleType: "antd",
15
13
  options: [
16
14
  {
17
15
  label: 'A',
@@ -40,9 +38,7 @@ export default [
40
38
  mode: 'multiple',
41
39
  optionSourceType: 'default',
42
40
  optionFilterProp: 'label',
43
- style: {
44
- width: 200,
45
- },
41
+ styleType: "antd",
46
42
  options: [
47
43
  {
48
44
  label: 'A',
@@ -202,10 +202,10 @@ export default {
202
202
  return target.getProps().getPropValue('enableCustomType');
203
203
  },
204
204
  setter: {
205
- componentName: 'SelectSetter',
205
+ componentName: 'PisellSelectSetter',
206
206
  props: {
207
207
  options: [],
208
- mode: 'tag',
208
+ mode: 'tags',
209
209
  },
210
210
  },
211
211
  },
@@ -1,6 +1,7 @@
1
1
  export default [
2
2
  {
3
3
  title: '多媒体文件上传',
4
+ screenshot: require('./__screenshots__/upload.png'),
4
5
  schema: {
5
6
  componentName: 'FormItemUpload',
6
7
  title: '多媒体文件上传',
@@ -8,6 +8,7 @@ export default [
8
8
  style: {
9
9
  width: 200,
10
10
  },
11
+ styleType: 'antd',
11
12
  options: [
12
13
  {
13
14
  label: 'A',
@@ -28,20 +28,21 @@ const SubmitButtonMeta: ComponentMetadata = {
28
28
  display: 'accordion',
29
29
  items: [
30
30
  {
31
- name: 'children',
31
+ name: 'childrenString',
32
32
  title: {
33
33
  label: {
34
34
  type: 'i18n',
35
35
  'en-US': 'Text',
36
36
  'zh-CN': '文字',
37
37
  },
38
- tip: 'children',
39
38
  },
40
- propType: {
41
- type: 'oneOfType',
42
- value: ['node', 'string'],
39
+ setter: ['PisellI18nSetter'],
40
+ defaultValue: {
41
+ type: 'i18n',
42
+ en: 'Submit',
43
+ 'zh-CN': '提交',
44
+ 'zh-HK': '提交',
43
45
  },
44
- setter: ['SlotSetter', 'PisellI18nSetter', 'VariableSetter'],
45
46
  },
46
47
  {
47
48
  name: 'status',
@@ -214,7 +215,12 @@ const SubmitButtonMeta: ComponentMetadata = {
214
215
  'zh-CN': '标题',
215
216
  },
216
217
  setter: ['PisellI18nSetter', 'VariableSetter'],
217
- defaultValue: 'Confirm',
218
+ defaultValue: {
219
+ type: 'i18n',
220
+ en: 'Confirm submission',
221
+ 'zh-CN': '确认提交',
222
+ 'zh-HK': '確認提交',
223
+ },
218
224
  },
219
225
  {
220
226
  name: 'content',
@@ -224,7 +230,12 @@ const SubmitButtonMeta: ComponentMetadata = {
224
230
  'zh-CN': '辅助文字',
225
231
  },
226
232
  setter: ['PisellI18nSetter', 'VariableSetter'],
227
- defaultValue: 'Are you sure you want to submit the form?',
233
+ defaultValue: {
234
+ type: 'i18n',
235
+ en: 'Are you sure you want to submit this form?',
236
+ 'zh-CN': '确定要提交此表单吗?',
237
+ 'zh-HK': '確定要提交此表單嗎?',
238
+ },
228
239
  },
229
240
  {
230
241
  name: 'cancelText',
@@ -234,7 +245,12 @@ const SubmitButtonMeta: ComponentMetadata = {
234
245
  'zh-CN': '取消按钮文字',
235
246
  },
236
247
  setter: ['PisellI18nSetter', 'VariableSetter'],
237
- defaultValue: 'Cancel',
248
+ defaultValue: {
249
+ type: 'i18n',
250
+ en: 'Cancel',
251
+ 'zh-CN': '取消',
252
+ 'zh-HK': '取消',
253
+ },
238
254
  },
239
255
  {
240
256
  name: 'okText',
@@ -244,7 +260,12 @@ const SubmitButtonMeta: ComponentMetadata = {
244
260
  'zh-CN': '确定按钮文字',
245
261
  },
246
262
  setter: ['PisellI18nSetter', 'VariableSetter'],
247
- defaultValue: 'Confirm',
263
+ defaultValue: {
264
+ type: 'i18n',
265
+ en: 'Submit',
266
+ 'zh-CN': '提交',
267
+ 'zh-HK': '提交',
268
+ },
248
269
  },
249
270
  ],
250
271
  },
@@ -323,7 +344,12 @@ const SubmitButtonMeta: ComponentMetadata = {
323
344
  'zh-CN': '文字',
324
345
  },
325
346
  setter: ['PisellI18nSetter', 'VariableSetter'],
326
- defaultValue: 'Submitted successfully',
347
+ defaultValue: {
348
+ type: 'i18n',
349
+ en: 'Submitted successfully',
350
+ 'zh-CN': '提交成功',
351
+ 'zh-HK': '提交成功',
352
+ },
327
353
  },
328
354
  ],
329
355
  },
@@ -398,7 +424,12 @@ const SubmitButtonMeta: ComponentMetadata = {
398
424
  'zh-CN': '标题',
399
425
  },
400
426
  setter: 'PisellI18nSetter',
401
- defaultValue: 'Submitted successfully',
427
+ defaultValue: {
428
+ type: 'i18n',
429
+ en: 'Submitted successfully',
430
+ 'zh-CN': '提交成功',
431
+ 'zh-HK': '提交成功',
432
+ },
402
433
  },
403
434
  {
404
435
  name: 'afterSubmitModalConfig.content',
@@ -408,7 +439,12 @@ const SubmitButtonMeta: ComponentMetadata = {
408
439
  'zh-CN': '内容',
409
440
  },
410
441
  setter: 'PisellI18nSetter',
411
- defaultValue: 'Your submission has been successfully completed.',
442
+ defaultValue: {
443
+ type: 'i18n',
444
+ en: 'Your form has been successfully submitted',
445
+ 'zh-CN': '您的表单已成功提交',
446
+ 'zh-HK': '您的表單已成功提交',
447
+ },
412
448
  },
413
449
  {
414
450
  name: 'afterSubmitModalConfig.okText',
@@ -418,7 +454,12 @@ const SubmitButtonMeta: ComponentMetadata = {
418
454
  'zh-CN': '按钮文字',
419
455
  },
420
456
  setter: 'PisellI18nSetter',
421
- defaultValue: 'OK',
457
+ defaultValue: {
458
+ type: 'i18n',
459
+ en: 'OK',
460
+ 'zh-CN': '确定',
461
+ 'zh-HK': '確定',
462
+ },
422
463
  },
423
464
  ],
424
465
  },
@@ -471,7 +512,12 @@ const SubmitButtonMeta: ComponentMetadata = {
471
512
  'zh-CN': '文字',
472
513
  },
473
514
  setter: 'PisellI18nSetter',
474
- defaultValue: 'Submitted successfully',
515
+ defaultValue: {
516
+ type: 'i18n',
517
+ en: 'Submitted successfully',
518
+ 'zh-CN': '提交成功',
519
+ 'zh-HK': '提交成功',
520
+ },
475
521
  },
476
522
  {
477
523
  name: 'afterSubmitNotificationConfig.content',
@@ -481,7 +527,12 @@ const SubmitButtonMeta: ComponentMetadata = {
481
527
  'zh-CN': '消息',
482
528
  },
483
529
  setter: 'PisellI18nSetter',
484
- defaultValue: 'Your submission has been successfully completed.',
530
+ defaultValue: {
531
+ type: 'i18n',
532
+ en: 'Your form has been successfully submitted',
533
+ 'zh-CN': '您的表单已成功提交',
534
+ 'zh-HK': '您的表單已成功提交',
535
+ },
485
536
  },
486
537
  {
487
538
  name: 'afterSubmitNotificationConfig.placement',
@@ -6,7 +6,12 @@ export default [
6
6
  componentName: 'SubmitButton',
7
7
  props: {
8
8
  type: 'primary',
9
- children: 'Submit',
9
+ childrenString: {
10
+ type: 'i18n',
11
+ en: 'Submit',
12
+ 'zh-CN': '提交',
13
+ 'zh-HK': '提交',
14
+ },
10
15
  status: 'normal',
11
16
  afterSubmitType: 'none',
12
17
  refreshData: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.492",
3
+ "version": "1.0.493",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",