@pisell/materials 1.0.295 → 1.0.296

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 (64) 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 +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/batch-editor/fields/Image/index.d.ts +7 -0
  20. package/es/components/batch-editor/fields/Image/index.js +14 -0
  21. package/es/components/batch-editor/fields/Image/index.less +6 -0
  22. package/es/components/batch-editor/fields/Price/index.d.ts +6 -0
  23. package/es/components/batch-editor/fields/Price/index.js +19 -0
  24. package/es/components/batch-editor/fields/Text/index.d.ts +6 -0
  25. package/es/components/batch-editor/fields/Text/index.js +8 -0
  26. package/es/components/batch-editor/fields/index.d.ts +7 -0
  27. package/es/components/batch-editor/fields/index.js +8 -0
  28. package/es/components/batch-editor/index.d.ts +11 -0
  29. package/es/components/batch-editor/index.js +446 -0
  30. package/es/components/batch-editor/index.less +48 -0
  31. package/es/components/table/hooks/useTransDataSource.js +1 -0
  32. package/es/components/table/index.js +11 -15
  33. package/es/index.d.ts +1 -0
  34. package/es/index.js +2 -1
  35. package/es/locales/en-US.d.ts +11 -0
  36. package/es/locales/en-US.js +16 -1
  37. package/es/locales/zh-CN.d.ts +11 -0
  38. package/es/locales/zh-CN.js +16 -1
  39. package/es/locales/zh-TW.d.ts +11 -0
  40. package/es/locales/zh-TW.js +16 -1
  41. package/lib/components/batch-editor/fields/Image/index.d.ts +7 -0
  42. package/lib/components/batch-editor/fields/Image/index.js +48 -0
  43. package/lib/components/batch-editor/fields/Image/index.less +6 -0
  44. package/lib/components/batch-editor/fields/Price/index.d.ts +6 -0
  45. package/lib/components/batch-editor/fields/Price/index.js +54 -0
  46. package/lib/components/batch-editor/fields/Text/index.d.ts +6 -0
  47. package/lib/components/batch-editor/fields/Text/index.js +40 -0
  48. package/lib/components/batch-editor/fields/index.d.ts +7 -0
  49. package/lib/components/batch-editor/fields/index.js +42 -0
  50. package/lib/components/batch-editor/index.d.ts +11 -0
  51. package/lib/components/batch-editor/index.js +357 -0
  52. package/lib/components/batch-editor/index.less +48 -0
  53. package/lib/components/table/hooks/useTransDataSource.js +1 -0
  54. package/lib/components/table/index.js +16 -4
  55. package/lib/index.d.ts +1 -0
  56. package/lib/index.js +3 -0
  57. package/lib/locales/en-US.d.ts +11 -0
  58. package/lib/locales/en-US.js +12 -1
  59. package/lib/locales/zh-CN.d.ts +11 -0
  60. package/lib/locales/zh-CN.js +12 -1
  61. package/lib/locales/zh-TW.d.ts +11 -0
  62. package/lib/locales/zh-TW.js +12 -1
  63. package/lowcode/batch-editor/meta.ts +93 -0
  64. package/package.json +3 -3
@@ -0,0 +1,357 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/batch-editor/index.tsx
30
+ var batch_editor_exports = {};
31
+ __export(batch_editor_exports, {
32
+ default: () => batch_editor_default
33
+ });
34
+ module.exports = __toCommonJS(batch_editor_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_ahooks = require("ahooks");
38
+ var import_table = __toESM(require("../table"));
39
+ var import_fields = __toESM(require("./fields"));
40
+ var import_Price = __toESM(require("./fields/Price"));
41
+ var import_locales = require("../../locales/index");
42
+ var import_index = require("./index.less");
43
+ var BatchEditor = (props) => {
44
+ var _a;
45
+ const { columns, dataSource = [], onChange, rowKey, otherTableProps } = props;
46
+ const [form] = import_antd.Form.useForm();
47
+ const [openModal, setOpenModal] = (0, import_react.useState)(false);
48
+ const [selectList, setSelectList] = (0, import_react.useState)([]);
49
+ const renderColumnItem = (0, import_react.useCallback)(
50
+ (_item) => {
51
+ return (text, record) => {
52
+ if (!_item.type) {
53
+ const Com2 = import_fields.default["text"];
54
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "editor-item" }, /* @__PURE__ */ import_react.default.createElement(Com2, null, text));
55
+ }
56
+ if ((record.disabledList || []).includes(_item.dataIndex)) {
57
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "editor-item", style: { padding: `0 11px` } }, /* @__PURE__ */ import_react.default.createElement(
58
+ import_antd.Tooltip,
59
+ {
60
+ overlay: (record == null ? void 0 : record.disabledTexts) ? (
61
+ //@ts-ignore
62
+ (record == null ? void 0 : record.disabledTexts[_item.dataIndex]) || text
63
+ ) : text
64
+ },
65
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "name" }, (record == null ? void 0 : record.disabledTexts) ? (
66
+ //@ts-ignore
67
+ (record == null ? void 0 : record.disabledTexts[_item.dataIndex]) || text
68
+ ) : text)
69
+ ));
70
+ }
71
+ const Com = import_fields.default[_item.type];
72
+ if (Com) {
73
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "editor-item" }, /* @__PURE__ */ import_react.default.createElement(
74
+ Com,
75
+ {
76
+ status: record.status,
77
+ value: text,
78
+ onChange: (e) => {
79
+ handleChange(e, _item.dataIndex, record[rowKey]);
80
+ }
81
+ }
82
+ ));
83
+ }
84
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "editor-item" }, "-");
85
+ };
86
+ },
87
+ [dataSource, rowKey, columns]
88
+ );
89
+ const _onChange = (newDataSource) => {
90
+ onChange == null ? void 0 : onChange(newDataSource);
91
+ };
92
+ const handleChange = (val, key, id) => {
93
+ let _dataSource = JSON.parse(JSON.stringify(dataSource));
94
+ let fn = (_list) => {
95
+ for (let d of _list) {
96
+ if (d[rowKey] === id) {
97
+ d[key] = val;
98
+ break;
99
+ }
100
+ if (d.children && d.children.length) {
101
+ fn(d.children);
102
+ }
103
+ }
104
+ };
105
+ fn(_dataSource || []);
106
+ _onChange(_dataSource);
107
+ };
108
+ const handleBatchEditChange = (val, key) => {
109
+ let _dataSource = JSON.parse(JSON.stringify(dataSource));
110
+ let fn = (_list) => {
111
+ for (let d of _list) {
112
+ if (selectList.includes(d[rowKey]) && !(d.disabledList || []).includes(key)) {
113
+ d[key] = val;
114
+ }
115
+ if (d.children && d.children.length) {
116
+ fn(d.children);
117
+ }
118
+ }
119
+ };
120
+ fn(_dataSource || []);
121
+ _onChange(_dataSource);
122
+ };
123
+ const handleRemove = (ids) => {
124
+ let _dataSource = JSON.parse(JSON.stringify(dataSource));
125
+ if (_dataSource.some((d) => ids.includes(d[rowKey]))) {
126
+ _dataSource = _dataSource.filter((d) => !ids.includes(d[rowKey]));
127
+ } else {
128
+ _dataSource.forEach((d) => {
129
+ if (d.children) {
130
+ d.children = d.children.filter((d2) => !ids.includes(d2[rowKey]));
131
+ }
132
+ });
133
+ }
134
+ _onChange(_dataSource);
135
+ };
136
+ const setDebounceValue = (0, import_ahooks.useDebounceFn)(
137
+ (_dataSource) => {
138
+ _onChange(_dataSource);
139
+ },
140
+ {
141
+ wait: 300
142
+ }
143
+ );
144
+ const renderPopoverContent = (0, import_react.useCallback)(
145
+ (_item) => {
146
+ const Com = import_fields.default[_item.type];
147
+ let val;
148
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "batch-popover-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "editor-item" }, /* @__PURE__ */ import_react.default.createElement(
149
+ Com,
150
+ {
151
+ onBlur: () => {
152
+ if (val !== void 0) {
153
+ handleBatchEditChange(val, _item.dataIndex);
154
+ }
155
+ },
156
+ onChange: (e) => {
157
+ val = e;
158
+ }
159
+ }
160
+ )));
161
+ },
162
+ [dataSource, selectList]
163
+ );
164
+ const renderColumnTitle = (0, import_react.useCallback)(
165
+ (item) => {
166
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "column-title" }, /* @__PURE__ */ import_react.default.createElement("span", null, item.title), selectList.length && item.batchEdit ? /* @__PURE__ */ import_react.default.createElement(
167
+ import_antd.Popover,
168
+ {
169
+ destroyTooltipOnHide: true,
170
+ trigger: ["click"],
171
+ placement: "bottom",
172
+ title: `${(0, import_locales.getText)("batch-editor-batch-edit")}: ${item.title}`,
173
+ content: renderPopoverContent(item)
174
+ },
175
+ /* @__PURE__ */ import_react.default.createElement("a", null, (0, import_locales.getText)("batch-editor-batch-edit"))
176
+ ) : null);
177
+ },
178
+ [dataSource, rowKey, selectList]
179
+ );
180
+ const _columns = (0, import_react.useMemo)(() => {
181
+ return columns.filter((d) => !d.hide).map((d) => {
182
+ return {
183
+ ...d,
184
+ titleStr: d.title,
185
+ title: renderColumnTitle(d),
186
+ render: renderColumnItem(d)
187
+ };
188
+ }).concat([
189
+ {
190
+ title: (0, import_locales.getText)("batch-editor-actions"),
191
+ dataIndex: rowKey,
192
+ key: "actions",
193
+ align: "center",
194
+ fixed: "right",
195
+ width: 100,
196
+ dataSource,
197
+ selectList,
198
+ render: (text, record) => {
199
+ return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
200
+ import_antd.Button,
201
+ {
202
+ onClick: () => {
203
+ handleRemove([text]);
204
+ }
205
+ },
206
+ (0, import_locales.getText)("batch-editor-remove")
207
+ ));
208
+ }
209
+ }
210
+ ]);
211
+ }, [renderColumnItem, rowKey, dataSource, selectList]);
212
+ const selectOptions = (0, import_react.useMemo)(() => {
213
+ return _columns.filter((d) => d.batchEdit).map((d) => {
214
+ return {
215
+ label: d.titleStr,
216
+ value: d.dataIndex
217
+ };
218
+ });
219
+ }, [_columns]);
220
+ const onFinish = (values) => {
221
+ handleBatchEditChange(values.value, values.key);
222
+ onCancel();
223
+ setSelectList([]);
224
+ };
225
+ const onCancel = () => {
226
+ form.resetFields();
227
+ setOpenModal(false);
228
+ };
229
+ const onOpenMOdal = () => {
230
+ setOpenModal(true);
231
+ form.setFieldsValue({
232
+ key: selectOptions[0].value
233
+ });
234
+ };
235
+ const modalTitle = (0, import_react.useMemo)(() => {
236
+ var _a2, _b;
237
+ let str = "";
238
+ let selectItems = [];
239
+ selectList.forEach((item) => {
240
+ let productItem = dataSource.find((d) => d[rowKey] === item);
241
+ if (productItem) {
242
+ selectItems.push(productItem);
243
+ } else {
244
+ dataSource.forEach((d) => {
245
+ if (d.children) {
246
+ let childProductItem = d.children.find(
247
+ (t) => t[rowKey] === item
248
+ );
249
+ if (childProductItem) {
250
+ selectItems.push(childProductItem);
251
+ }
252
+ }
253
+ });
254
+ }
255
+ });
256
+ str = ``;
257
+ if (selectItems.length > 1) {
258
+ str = (0, import_locales.getText)("batch-editor-quick-edit-title")(
259
+ (_a2 = selectItems[0]) == null ? void 0 : _a2.title,
260
+ selectItems.length
261
+ );
262
+ } else {
263
+ str = (0, import_locales.getText)("batch-editor-quick-edit-title-2")((_b = selectItems[0]) == null ? void 0 : _b.title);
264
+ }
265
+ return str;
266
+ }, [selectList, dataSource]);
267
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
268
+ import_table.default,
269
+ {
270
+ actionButtons: !!selectList.length && [
271
+ {
272
+ title: (0, import_locales.getText)("batch-editor-batch-remove"),
273
+ size: "large",
274
+ onClick: () => {
275
+ handleRemove(selectList);
276
+ setSelectList([]);
277
+ }
278
+ },
279
+ {
280
+ title: (0, import_locales.getText)("batch-editor-batch-edit"),
281
+ onClick: onOpenMOdal,
282
+ size: "large",
283
+ type: "primary"
284
+ }
285
+ ],
286
+ bordered: true,
287
+ dataSource,
288
+ columns: _columns,
289
+ size: "small",
290
+ className: "batch-editor-table",
291
+ rowKey,
292
+ rowSelection: {
293
+ type: "checkbox",
294
+ selectedRowKeys: selectList,
295
+ onChange: (keys) => {
296
+ setSelectList(keys);
297
+ }
298
+ },
299
+ scroll: { x: _columns.length * 200 },
300
+ pagination: { localPagination: true },
301
+ ...otherTableProps,
302
+ onValuesChange: (values) => {
303
+ var _a2;
304
+ setSelectList([]);
305
+ (_a2 = otherTableProps == null ? void 0 : otherTableProps.onValuesChange) == null ? void 0 : _a2.call(otherTableProps, values);
306
+ },
307
+ filter: {
308
+ show: true,
309
+ sortButtonShow: false,
310
+ quickFilterMaxLength: 3,
311
+ storageMode: "localStorage",
312
+ ...otherTableProps == null ? void 0 : otherTableProps.filter,
313
+ list: [
314
+ {
315
+ type: "search",
316
+ name: "keywords",
317
+ key: "keywords",
318
+ localFilter: true,
319
+ other: {
320
+ trigger: ["onChange"],
321
+ size: "large",
322
+ onChange: () => {
323
+ setSelectList([]);
324
+ }
325
+ }
326
+ },
327
+ ...(_a = otherTableProps == null ? void 0 : otherTableProps.filter) == null ? void 0 : _a.list
328
+ ]
329
+ }
330
+ }
331
+ ), /* @__PURE__ */ import_react.default.createElement(
332
+ import_antd.Modal,
333
+ {
334
+ title: (0, import_locales.getText)("batch-editor-quick-edit"),
335
+ open: openModal,
336
+ footer: null,
337
+ onCancel: () => {
338
+ setOpenModal(false);
339
+ }
340
+ },
341
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "title", style: { marginBottom: 20 } }, modalTitle),
342
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { layout: "vertical", form, onFinish }, /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label: (0, import_locales.getText)("batch-editor-what-price"), name: "key" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Select, { size: "large", options: selectOptions })), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label: (0, import_locales.getText)("batch-editor-price"), name: "value" }, /* @__PURE__ */ import_react.default.createElement(import_Price.default, null))),
343
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { display: "flex", gap: 20, width: "100%" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { size: "large", style: { flex: 1 }, onClick: onCancel }, (0, import_locales.getText)("batch-editor-cancel")), /* @__PURE__ */ import_react.default.createElement(
344
+ import_antd.Button,
345
+ {
346
+ size: "large",
347
+ type: "primary",
348
+ onClick: () => {
349
+ form.submit();
350
+ },
351
+ style: { flex: 1 }
352
+ },
353
+ (0, import_locales.getText)("batch-editor-confirm")
354
+ ))
355
+ ));
356
+ };
357
+ var batch_editor_default = BatchEditor;
@@ -0,0 +1,48 @@
1
+ .batch-editor-table {
2
+
3
+ :global {
4
+
5
+ // .ant-table-tbody .ant-table-cell {
6
+ // display: flex;
7
+ // align-items: center;
8
+ // }
9
+ .ant-table-cell-with-append {
10
+ display: flex;
11
+ align-items: center;
12
+ height: 95px;
13
+ }
14
+ }
15
+
16
+ .column-title {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: space-between;
20
+ word-wrap: normal !important;
21
+ word-break: normal !important;
22
+
23
+ .icon {
24
+ cursor: pointer;
25
+ }
26
+ }
27
+
28
+ .editor-item {
29
+ flex: 1;
30
+ cursor: pointer;
31
+ min-height: 40px;
32
+
33
+ .name {
34
+ overflow: hidden;
35
+ text-overflow: ellipsis;
36
+ white-space: nowrap;
37
+
38
+ max-width: 240px;
39
+ }
40
+ }
41
+
42
+ :global {
43
+ .batch-popover-content {
44
+ width: 250px;
45
+ height: 50px;
46
+ }
47
+ }
48
+ }
@@ -84,6 +84,7 @@ var useTransDataSource = (params) => {
84
84
  filterLocalArr,
85
85
  filters
86
86
  ]);
87
+ console.log("dataSourcedataSource", dataSource);
87
88
  return dataSource;
88
89
  };
89
90
  var useTransDataSource_default = useTransDataSource;
@@ -122,9 +122,18 @@ var GridView = (0, import_model.Provider)(
122
122
  }
123
123
  return viewMode || defaultViewMode;
124
124
  }, [viewMode, defaultViewMode, multiple]);
125
+ const removeTitleColumns = (0, import_react.useMemo)(() => {
126
+ let _columns = columns.map((item) => {
127
+ return {
128
+ ...item,
129
+ title: void 0
130
+ };
131
+ });
132
+ return _columns;
133
+ }, [columns]);
125
134
  const currentSettingHash = (0, import_react.useMemo)(() => {
126
- return currentSettingKey || (0, import_utils.getHash)(columns) || "";
127
- }, [currentSettingKey, JSON.stringify(columns)]);
135
+ return currentSettingKey || (0, import_utils.getHash)(removeTitleColumns) || "";
136
+ }, [currentSettingKey, JSON.stringify(removeTitleColumns)]);
128
137
  (0, import_react.useEffect)(() => {
129
138
  const setting = (0, import_utils.getTableSettingFromLocalStorage)(tableId);
130
139
  if (setting.currentSettingHash !== currentSettingHash) {
@@ -242,8 +251,11 @@ var GridView = (0, import_model.Provider)(
242
251
  }, [currentViewMode]);
243
252
  (0, import_react.useEffect)(() => {
244
253
  form.setFieldValue("column_setting", {});
245
- form.setFieldValue("column_setting", tableSettingRef.current.column_setting);
246
- }, [(0, import_utils.stringify)(columns)]);
254
+ form.setFieldValue(
255
+ "column_setting",
256
+ tableSettingRef.current.column_setting
257
+ );
258
+ }, [(0, import_utils.stringify)(removeTitleColumns)]);
247
259
  (0, import_react.useEffect)(() => {
248
260
  form.setFieldsValue(initialValuesRef.current);
249
261
  }, [JSON.stringify(propsFilter)]);
package/lib/index.d.ts CHANGED
@@ -78,3 +78,4 @@ export { default as VirtualKeyboard } from "./components/virtual-keyboard";
78
78
  export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
79
79
  export { default as SelectTime } from "./components/select-time";
80
80
  export { default as AutoCompleteNumber } from "./components/auto-complete-number";
81
+ export { default as BatchEditor } from "./components/batch-editor";
package/lib/index.js CHANGED
@@ -36,6 +36,7 @@ __export(src_exports, {
36
36
  AutoCompleteNumber: () => import_auto_complete_number.default,
37
37
  Avatar: () => import_antd4.Avatar,
38
38
  Badge: () => import_antd5.Badge,
39
+ BatchEditor: () => import_batch_editor.default,
39
40
  Breadcrumb: () => import_antd6.Breadcrumb,
40
41
  Button: () => import_button.default,
41
42
  Calendar: () => import_calendar.default,
@@ -191,6 +192,7 @@ var import_virtual_keyboard = __toESM(require("./components/virtual-keyboard"));
191
192
  var import_Time = __toESM(require("./components/virtual-keyboard/Time"));
192
193
  var import_select_time = __toESM(require("./components/select-time"));
193
194
  var import_auto_complete_number = __toESM(require("./components/auto-complete-number"));
195
+ var import_batch_editor = __toESM(require("./components/batch-editor"));
194
196
  // Annotate the CommonJS export names for ESM import in node:
195
197
  0 && (module.exports = {
196
198
  Affix,
@@ -200,6 +202,7 @@ var import_auto_complete_number = __toESM(require("./components/auto-complete-nu
200
202
  AutoCompleteNumber,
201
203
  Avatar,
202
204
  Badge,
205
+ BatchEditor,
203
206
  Breadcrumb,
204
207
  Button,
205
208
  Calendar,
@@ -37,5 +37,16 @@ declare const _default: {
37
37
  "table-action-range-picker-presets-last-90-day": string;
38
38
  "virtual-keyboard-time-now": string;
39
39
  "virtual-keyboard-time-ok": string;
40
+ 'batch-editor-batch-edit': string;
41
+ 'batch-editor-actions': string;
42
+ 'batch-editor-remove': string;
43
+ 'batch-editor-price': string;
44
+ 'batch-editor-cancel': string;
45
+ 'batch-editor-confirm': string;
46
+ 'batch-editor-batch-remove': string;
47
+ 'batch-editor-quick-edit': string;
48
+ 'batch-editor-what-price': string;
49
+ 'batch-editor-quick-edit-title': (product: string, num: string) => string;
50
+ 'batch-editor-quick-edit-title-2': (product: string) => string;
40
51
  };
41
52
  export default _default;
@@ -60,5 +60,16 @@ var en_US_default = {
60
60
  "table-action-range-picker-presets-last-30-day": "Last 30 Days",
61
61
  "table-action-range-picker-presets-last-90-day": "Last 90 Days",
62
62
  "virtual-keyboard-time-now": "Now",
63
- "virtual-keyboard-time-ok": "OK"
63
+ "virtual-keyboard-time-ok": "OK",
64
+ "batch-editor-batch-edit": "Batch edit",
65
+ "batch-editor-actions": "Actions",
66
+ "batch-editor-remove": "Remove",
67
+ "batch-editor-price": "Price",
68
+ "batch-editor-cancel": "Cancel",
69
+ "batch-editor-confirm": "Confirm",
70
+ "batch-editor-batch-remove": "Batch remove",
71
+ "batch-editor-quick-edit": "Quick edit",
72
+ "batch-editor-what-price": "What price",
73
+ "batch-editor-quick-edit-title": (product, num) => `You have selected ${num} products including ${product}`,
74
+ "batch-editor-quick-edit-title-2": (product) => `You have selected ${product}`
64
75
  };
@@ -37,5 +37,16 @@ declare const _default: {
37
37
  "table-action-range-picker-presets-last-90-day": string;
38
38
  "virtual-keyboard-time-now": string;
39
39
  "virtual-keyboard-time-ok": string;
40
+ 'batch-editor-batch-edit': string;
41
+ 'batch-editor-actions': string;
42
+ 'batch-editor-remove': string;
43
+ 'batch-editor-price': string;
44
+ 'batch-editor-cancel': string;
45
+ 'batch-editor-confirm': string;
46
+ 'batch-editor-batch-remove': string;
47
+ 'batch-editor-quick-edit': string;
48
+ 'batch-editor-what-price': string;
49
+ 'batch-editor-quick-edit-title': (product: string, num: string) => string;
50
+ 'batch-editor-quick-edit-title-2': (product: string) => string;
40
51
  };
41
52
  export default _default;
@@ -60,5 +60,16 @@ var zh_CN_default = {
60
60
  "table-action-range-picker-presets-last-30-day": "过去30天",
61
61
  "table-action-range-picker-presets-last-90-day": "过去90天",
62
62
  "virtual-keyboard-time-now": "此刻",
63
- "virtual-keyboard-time-ok": "确定"
63
+ "virtual-keyboard-time-ok": "确定",
64
+ "batch-editor-batch-edit": "批量编辑",
65
+ "batch-editor-actions": "操作",
66
+ "batch-editor-remove": "删除",
67
+ "batch-editor-price": "价格",
68
+ "batch-editor-cancel": "取消",
69
+ "batch-editor-confirm": "确认",
70
+ "batch-editor-batch-remove": "批量移除",
71
+ "batch-editor-quick-edit": "快速编辑",
72
+ "batch-editor-what-price": "什么价格",
73
+ "batch-editor-quick-edit-title": (product, num) => `您已选择 ${product} 等${num}件商品`,
74
+ "batch-editor-quick-edit-title-2": (product) => `您已选择 ${product}`
64
75
  };
@@ -37,5 +37,16 @@ declare const _default: {
37
37
  "table-action-range-picker-presets-last-90-day": string;
38
38
  "virtual-keyboard-time-now": string;
39
39
  "virtual-keyboard-time-ok": string;
40
+ 'batch-editor-batch-edit': string;
41
+ 'batch-editor-actions': string;
42
+ 'batch-editor-remove': string;
43
+ 'batch-editor-price': string;
44
+ 'batch-editor-cancel': string;
45
+ 'batch-editor-confirm': string;
46
+ 'batch-editor-batch-remove': string;
47
+ 'batch-editor-what-price': string;
48
+ 'batch-editor-quick-edit': string;
49
+ 'batch-editor-quick-edit-title': (product: string, num: string) => string;
50
+ 'batch-editor-quick-edit-title-2': (product: string) => string;
40
51
  };
41
52
  export default _default;
@@ -60,5 +60,16 @@ var zh_TW_default = {
60
60
  "table-action-range-picker-presets-last-30-day": "過去30天",
61
61
  "table-action-range-picker-presets-last-90-day": "過去90天",
62
62
  "virtual-keyboard-time-now": "此刻",
63
- "virtual-keyboard-time-ok": "確定"
63
+ "virtual-keyboard-time-ok": "確定",
64
+ "batch-editor-batch-edit": "批量編輯",
65
+ "batch-editor-actions": "操作",
66
+ "batch-editor-remove": "刪除",
67
+ "batch-editor-price": "價格",
68
+ "batch-editor-cancel": "取消",
69
+ "batch-editor-confirm": "確認",
70
+ "batch-editor-batch-remove": "批量移除",
71
+ "batch-editor-what-price": "什麼價格",
72
+ "batch-editor-quick-edit": "快速編輯",
73
+ "batch-editor-quick-edit-title": (product, num) => `您已選擇 ${product} 等${num}件產品`,
74
+ "batch-editor-quick-edit-title-2": (product) => `您已選擇 ${product}`
64
75
  };
@@ -0,0 +1,93 @@
1
+
2
+ import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
3
+
4
+ const BatchEditorMeta: ComponentMetadata = {
5
+ "componentName": "BatchEditor",
6
+ "title": "BatchEditor",
7
+ "docUrl": "",
8
+ "screenshot": "",
9
+ "devMode": "proCode",
10
+ "npm": {
11
+ "package": "@pisell/private-materials",
12
+ "version": "1.0.4",
13
+ "exportName": "BatchEditor",
14
+ "main": "src/index.ts",
15
+ "destructuring": true,
16
+ "subName": ""
17
+ },
18
+ "configure": {
19
+ "props": [
20
+ {
21
+ "title": {
22
+ "label": {
23
+ "type": "i18n",
24
+ "en-US": "columns",
25
+ "zh-CN": "columns"
26
+ }
27
+ },
28
+ "name": "columns",
29
+ "setter": ["JsonSetter", "VariableSetter"],
30
+ },
31
+
32
+ {
33
+ "title": {
34
+ "label": {
35
+ "type": "i18n",
36
+ "en-US": "dataSource",
37
+ "zh-CN": "dataSource"
38
+ }
39
+ },
40
+ "name": "dataSource",
41
+ "setter": ["JsonSetter", "VariableSetter"],
42
+ },
43
+ {
44
+ "title": {
45
+ "label": {
46
+ "type": "i18n",
47
+ "en-US": "rowKey",
48
+ "zh-CN": "rowKey"
49
+ }
50
+ },
51
+ "name": "rowKey",
52
+ "setter": {
53
+ "componentName": "StringSetter",
54
+ "initialValue": "id"
55
+ }
56
+ },
57
+
58
+ {
59
+ "title": {
60
+ "label": {
61
+ "type": "i18n",
62
+ "en-US": "otherTableProps",
63
+ "zh-CN": "otherTableProps"
64
+ }
65
+ },
66
+ "name": "otherTableProps",
67
+ "setter": ["JsonSetter", "VariableSetter"],
68
+ },
69
+ ],
70
+ "supports": {
71
+ "style": true,
72
+ "events": [{
73
+ "name": "onChange"
74
+ }]
75
+ },
76
+ "component": {}
77
+ }
78
+ };
79
+ const snippets: Snippet[] = [
80
+ {
81
+ "title": "BatchEditor",
82
+ "screenshot": "",
83
+ "schema": {
84
+ "componentName": "BatchEditor",
85
+ "props": {}
86
+ }
87
+ }
88
+ ];
89
+
90
+ export default {
91
+ ...BatchEditorMeta,
92
+ snippets
93
+ };