@pisell/materials 1.0.501 → 1.0.503

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 (38) 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 +1 -1
  6. package/build/lowcode/preview.js +4 -4
  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 +11 -11
  11. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +1 -1
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  13. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +6 -2
  14. package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.js +5 -2
  15. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +1 -3
  16. package/es/components/dataSourceComponents/fields/Upload/index.less +3 -0
  17. package/es/components/table/Table/utils.d.ts +1 -1
  18. package/es/locales/en-US.d.ts +1 -0
  19. package/es/locales/en-US.js +3 -2
  20. package/es/locales/zh-CN.d.ts +1 -0
  21. package/es/locales/zh-CN.js +3 -2
  22. package/es/locales/zh-TW.d.ts +1 -0
  23. package/es/locales/zh-TW.js +3 -2
  24. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +1 -1
  25. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  26. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +5 -1
  27. package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.js +5 -2
  28. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +1 -1
  29. package/lib/components/dataSourceComponents/fields/Upload/index.less +3 -0
  30. package/lib/components/table/Table/utils.d.ts +1 -1
  31. package/lib/locales/en-US.d.ts +1 -0
  32. package/lib/locales/en-US.js +3 -2
  33. package/lib/locales/zh-CN.d.ts +1 -0
  34. package/lib/locales/zh-CN.js +3 -2
  35. package/lib/locales/zh-TW.d.ts +1 -0
  36. package/lib/locales/zh-TW.js +3 -2
  37. package/lowcode/data-source-table/utils.tsx +20 -0
  38. package/package.json +3 -3
@@ -46,7 +46,7 @@ var getCptProps = function getCptProps(field, cptType, item) {
46
46
  });
47
47
  props.placeholder = item.label;
48
48
  props.allowClear = true;
49
- if (cptType === 'Select') {
49
+ if (cptType === 'FormItemSelect') {
50
50
  props.mode = 'multiple';
51
51
  }
52
52
  if (['Select', 'Radio.Group', 'Checkbox.Group'].includes(field === null || field === void 0 ? void 0 : (_field$uiSchema2 = field.uiSchema) === null || _field$uiSchema2 === void 0 ? void 0 : _field$uiSchema2['x-component']) && ((field === null || field === void 0 ? void 0 : (_field$uiSchema3 = field.uiSchema) === null || _field$uiSchema3 === void 0 ? void 0 : (_field$uiSchema3$enum = _field$uiSchema3.enum) === null || _field$uiSchema3$enum === void 0 ? void 0 : _field$uiSchema3$enum.length) || 0) > 0) {
@@ -59,7 +59,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
59
59
  useCustomAction: boolean;
60
60
  actionType: string;
61
61
  openMode: "modal" | "drawer";
62
- openContentSize: "small" | "large" | "middle";
62
+ openContentSize: "small" | "middle" | "large";
63
63
  openTitle: string;
64
64
  key: string;
65
65
  } | undefined;
@@ -9,7 +9,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
9
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
10
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
11
11
  import React, { useMemo, useEffect } from 'react';
12
- import { Button, Space, Modal } from 'antd';
12
+ import { Button, Space } from 'antd';
13
13
  import { isString } from '@pisell/utils';
14
14
  import { useMemoizedFn } from 'ahooks';
15
15
  import Filter from "../filter";
@@ -20,6 +20,7 @@ import useComponentId from "../../hooks/useComponentId";
20
20
  import useDataSource from "../../hooks/useDataSource";
21
21
  import PisellToast from "../../../pisellToast";
22
22
  import { getText } from "../../../../locales";
23
+ import PisellModal from "../../../pisellModal";
23
24
  /**
24
25
  * 处理table的props
25
26
  * 转换title
@@ -114,6 +115,9 @@ var useTableProps = function useTableProps(props) {
114
115
  case 0:
115
116
  destroy === null || destroy === void 0 ? void 0 : destroy.runAsync(record.id).then(function () {
116
117
  refreshData();
118
+ PisellToast({
119
+ content: getText('pisell-action-delete-success')
120
+ });
117
121
  });
118
122
  case 1:
119
123
  case "end":
@@ -157,7 +161,7 @@ var useTableProps = function useTableProps(props) {
157
161
  actionType = item.actionType;
158
162
  var handleClick = function handleClick() {
159
163
  if (actionType === 'delete') {
160
- Modal.confirm({
164
+ PisellModal.confirm({
161
165
  title: getText('pisell-delete-confirm-title'),
162
166
  content: getText('pisell-delete-confirm-content'),
163
167
  okText: getText('pisell-delete-confirm-ok'),
@@ -45,6 +45,9 @@ var Translation = function Translation(_ref) {
45
45
  open = _useState2[0],
46
46
  setOpen = _useState2[1];
47
47
  var hasAnyTranslation = useCallback(function () {
48
+ if (!value) {
49
+ return false;
50
+ }
48
51
  return Object.entries(value).some(function (_ref2) {
49
52
  var _ref3 = _slicedToArray(_ref2, 2),
50
53
  key = _ref3[0],
@@ -75,7 +78,7 @@ var Translation = function Translation(_ref) {
75
78
  }, /*#__PURE__*/React.createElement("div", {
76
79
  className: "translation-label"
77
80
  }, label), /*#__PURE__*/React.createElement(Input, {
78
- value: value[key],
81
+ value: (value === null || value === void 0 ? void 0 : value[key]) || "",
79
82
  onChange: handleInputChange(key),
80
83
  allowClear: true
81
84
  }));
@@ -83,7 +86,7 @@ var Translation = function Translation(_ref) {
83
86
  return /*#__PURE__*/React.createElement("div", {
84
87
  className: "translation-wrapper"
85
88
  }, /*#__PURE__*/React.createElement(Input, {
86
- value: value.original,
89
+ value: (value === null || value === void 0 ? void 0 : value.original) || "",
87
90
  onChange: handleInputChange('original'),
88
91
  placeholder: placeholder,
89
92
  disabled: disabled,
@@ -498,9 +498,7 @@ var BaseUpload = function BaseUpload(props) {
498
498
  onOk: handleEditMultilingualOk
499
499
  }, /*#__PURE__*/React.createElement("div", {
500
500
  className: "pisell-upload-multilingual-container"
501
- }, SUPPORTED_LANGUAGES.filter(function (lang) {
502
- return lang !== 'original';
503
- }).map(function (lang) {
501
+ }, SUPPORTED_LANGUAGES.map(function (lang) {
504
502
  var _editMultilingualFile, _editMultilingualFile2, _editMultilingualFile3;
505
503
  return /*#__PURE__*/React.createElement("div", {
506
504
  key: lang,
@@ -75,4 +75,7 @@
75
75
  }
76
76
  .pisell-lowcode-image-preview-mask {
77
77
  z-index: 1201 !important;
78
+ }
79
+ .pisell-lowcode-image-preview-operations-wrapper {
80
+ z-index: 1202!important;
78
81
  }
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
167
167
  sort?: SortType | undefined;
168
168
  mode: "" | "localStorage" | "remote";
169
169
  currentViewMode: ModeType;
170
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
170
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
171
171
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
172
  export declare const stringify: (obj: Record<string, any>) => string;
173
173
  export {};
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell-upload-multilingual-item-title-zh-HK': string;
160
160
  'pisell-color-picker-default': string;
161
161
  'pisell-action-get-data': string;
162
+ 'pisell-action-delete-success': string;
162
163
  'pisell-action-delete-failed': string;
163
164
  'walletCard-points': string;
164
165
  'walletCard-rechargeable': string;
@@ -214,6 +214,7 @@ export default (_tableFilterSearch$ = {
214
214
  'pisell-color-picker-default': 'Default',
215
215
  // 获取数据
216
216
  'pisell-action-get-data': 'Please get data first',
217
+ 'pisell-action-delete-success': 'Deleted successfully',
217
218
  'pisell-action-delete-failed': 'Delete failed, please try again',
218
219
  'walletCard-points': 'Points',
219
220
  'walletCard-rechargeable': 'Recharge',
@@ -224,7 +225,7 @@ export default (_tableFilterSearch$ = {
224
225
  'pisellQrcode-qrcode': 'QR code',
225
226
  'pisell-design-mode-action-disabled': 'This action cannot be performed in edit mode',
226
227
  'pisell-delete-confirm-title': 'Confirm Delete',
227
- 'pisell-delete-confirm-content': 'Are you sure you want to delete this record?',
228
- 'pisell-delete-confirm-ok': 'OK',
228
+ 'pisell-delete-confirm-content': 'Are you sure you want to delete this record? This action cannot be undone.',
229
+ 'pisell-delete-confirm-ok': 'Delete',
229
230
  'pisell-delete-confirm-cancel': 'Cancel'
230
231
  }, _defineProperty(_tableFilterSearch$, "pisell-design-mode-action-disabled", 'This operation is not allowed in edit mode'), _defineProperty(_tableFilterSearch$, 'pisell-translation-original', 'Original'), _tableFilterSearch$);
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell-upload-multilingual-item-title-zh-HK': string;
160
160
  'pisell-color-picker-default': string;
161
161
  'pisell-action-get-data': string;
162
+ 'pisell-action-delete-success': string;
162
163
  'pisell-action-delete-failed': string;
163
164
  'walletCard-points': string;
164
165
  'walletCard-rechargeable': string;
@@ -208,6 +208,7 @@ export default {
208
208
  'pisell-color-picker-default': '默认',
209
209
  // 获取数据
210
210
  'pisell-action-get-data': '请先获取数据',
211
+ 'pisell-action-delete-success': '删除成功',
211
212
  'pisell-action-delete-failed': '删除失败,请重试',
212
213
  'walletCard-points': '积分卡',
213
214
  'walletCard-rechargeable': '充值卡',
@@ -217,8 +218,8 @@ export default {
217
218
  'pisellQrcode-done': '完成',
218
219
  'pisellQrcode-qrcode': '二维码',
219
220
  'pisell-delete-confirm-title': '确认删除',
220
- 'pisell-delete-confirm-content': '确定要删除该条记录吗?',
221
- 'pisell-delete-confirm-ok': '确定',
221
+ 'pisell-delete-confirm-content': '确定要删除该条记录吗? 此操作无法撤销。',
222
+ 'pisell-delete-confirm-ok': '删除',
222
223
  'pisell-delete-confirm-cancel': '取消',
223
224
  'pisell-design-mode-action-disabled': '编辑模式下不可执行此操作',
224
225
  'pisell-translation-original': '原始语言'
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell-upload-multilingual-item-title-zh-HK': string;
160
160
  'pisell-color-picker-default': string;
161
161
  'pisell-action-get-data': string;
162
+ 'pisell-action-delete-success': string;
162
163
  'pisell-action-delete-failed': string;
163
164
  'walletCard-points': string;
164
165
  'walletCard-rechargeable': string;
@@ -209,6 +209,7 @@ export default {
209
209
  'pisell-color-picker-default': '默認',
210
210
  // 获取数据
211
211
  'pisell-action-get-data': '請先獲取數據',
212
+ 'pisell-action-delete-success': '刪除成功',
212
213
  'pisell-action-delete-failed': '刪除失敗,請重試',
213
214
  'walletCard-points': '積分卡',
214
215
  'walletCard-rechargeable': '充值卡',
@@ -218,8 +219,8 @@ export default {
218
219
  'pisellQrcode-done': '完成',
219
220
  'pisellQrcode-qrcode': '二維碼',
220
221
  'pisell-delete-confirm-title': '確認刪除',
221
- 'pisell-delete-confirm-content': '確定要刪除該條記錄嗎?',
222
- 'pisell-delete-confirm-ok': '確定',
222
+ 'pisell-delete-confirm-content': '確定要刪除該條記錄嗎? 此操作無法撤銷。',
223
+ 'pisell-delete-confirm-ok': '刪除',
223
224
  'pisell-delete-confirm-cancel': '取消',
224
225
  'pisell-design-mode-action-disabled': '編輯模式下不可執行此操作',
225
226
  'pisell-translation-original': '原始語言'
@@ -76,7 +76,7 @@ var getCptProps = (field, cptType, item) => {
76
76
  };
77
77
  props.placeholder = item.label;
78
78
  props.allowClear = true;
79
- if (cptType === "Select") {
79
+ if (cptType === "FormItemSelect") {
80
80
  props.mode = "multiple";
81
81
  }
82
82
  if (["Select", "Radio.Group", "Checkbox.Group"].includes(
@@ -59,7 +59,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
59
59
  useCustomAction: boolean;
60
60
  actionType: string;
61
61
  openMode: "modal" | "drawer";
62
- openContentSize: "small" | "large" | "middle";
62
+ openContentSize: "small" | "middle" | "large";
63
63
  openTitle: string;
64
64
  key: string;
65
65
  } | undefined;
@@ -44,6 +44,7 @@ var import_useComponentId = __toESM(require("../../hooks/useComponentId"));
44
44
  var import_useDataSource = __toESM(require("../../hooks/useDataSource"));
45
45
  var import_pisellToast = __toESM(require("../../../pisellToast"));
46
46
  var import_locales = require("../../../../locales");
47
+ var import_pisellModal = __toESM(require("../../../pisellModal"));
47
48
  var useTableProps = (props) => {
48
49
  var _a;
49
50
  const {
@@ -113,6 +114,9 @@ var useTableProps = (props) => {
113
114
  setTimeout(async () => {
114
115
  destroy == null ? void 0 : destroy.runAsync(record.id).then(() => {
115
116
  refreshData();
117
+ (0, import_pisellToast.default)({
118
+ content: (0, import_locales.getText)("pisell-action-delete-success")
119
+ });
116
120
  });
117
121
  });
118
122
  } catch (error) {
@@ -140,7 +144,7 @@ var useTableProps = (props) => {
140
144
  const { label, actionType } = item;
141
145
  const handleClick = () => {
142
146
  if (actionType === "delete") {
143
- import_antd.Modal.confirm({
147
+ import_pisellModal.default.confirm({
144
148
  title: (0, import_locales.getText)("pisell-delete-confirm-title"),
145
149
  content: (0, import_locales.getText)("pisell-delete-confirm-content"),
146
150
  okText: (0, import_locales.getText)("pisell-delete-confirm-ok"),
@@ -57,6 +57,9 @@ var Translation = ({
57
57
  }) => {
58
58
  const [open, setOpen] = (0, import_react.useState)(false);
59
59
  const hasAnyTranslation = (0, import_react.useCallback)(() => {
60
+ if (!value) {
61
+ return false;
62
+ }
60
63
  return Object.entries(value).some(([key, val]) => val);
61
64
  }, [value]);
62
65
  const handleInputChange = (0, import_react.useCallback)(
@@ -72,7 +75,7 @@ var Translation = ({
72
75
  const content = /* @__PURE__ */ import_react.default.createElement("div", { className: "translation-popover" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical", style: { width: "100%" }, size: 16 }, languageConfig.map(({ key, label }) => /* @__PURE__ */ import_react.default.createElement("div", { key, className: "translation-field" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "translation-label" }, label), /* @__PURE__ */ import_react.default.createElement(
73
76
  import_antd.Input,
74
77
  {
75
- value: value[key],
78
+ value: (value == null ? void 0 : value[key]) || "",
76
79
  onChange: handleInputChange(key),
77
80
  allowClear: true
78
81
  }
@@ -80,7 +83,7 @@ var Translation = ({
80
83
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "translation-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
81
84
  import_antd.Input,
82
85
  {
83
- value: value.original,
86
+ value: (value == null ? void 0 : value.original) || "",
84
87
  onChange: handleInputChange("original"),
85
88
  placeholder,
86
89
  disabled,
@@ -447,7 +447,7 @@ var BaseUpload = (props) => {
447
447
  onCancel: handleEditMultilingualCancel,
448
448
  onOk: handleEditMultilingualOk
449
449
  },
450
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-upload-multilingual-container" }, import_constants.SUPPORTED_LANGUAGES.filter((lang) => lang !== "original").map(
450
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-upload-multilingual-container" }, import_constants.SUPPORTED_LANGUAGES.map(
451
451
  (lang) => {
452
452
  var _a, _b, _c;
453
453
  return /* @__PURE__ */ import_react.default.createElement("div", { key: lang, className: "pisell-upload-multilingual-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-upload-multilingual-item-title" }, (0, import_locales.getText)(`pisell-upload-multilingual-item-title-${lang}`)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-upload-multilingual-item-content" }, /* @__PURE__ */ import_react.default.createElement(
@@ -75,4 +75,7 @@
75
75
  }
76
76
  .pisell-lowcode-image-preview-mask {
77
77
  z-index: 1201 !important;
78
+ }
79
+ .pisell-lowcode-image-preview-operations-wrapper {
80
+ z-index: 1202!important;
78
81
  }
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
167
167
  sort?: SortType | undefined;
168
168
  mode: "" | "localStorage" | "remote";
169
169
  currentViewMode: ModeType;
170
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
170
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
171
171
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
172
  export declare const stringify: (obj: Record<string, any>) => string;
173
173
  export {};
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell-upload-multilingual-item-title-zh-HK': string;
160
160
  'pisell-color-picker-default': string;
161
161
  'pisell-action-get-data': string;
162
+ 'pisell-action-delete-success': string;
162
163
  'pisell-action-delete-failed': string;
163
164
  'walletCard-points': string;
164
165
  'walletCard-rechargeable': string;
@@ -199,6 +199,7 @@ var en_US_default = {
199
199
  "pisell-color-picker-default": "Default",
200
200
  // 获取数据
201
201
  "pisell-action-get-data": "Please get data first",
202
+ "pisell-action-delete-success": "Deleted successfully",
202
203
  "pisell-action-delete-failed": "Delete failed, please try again",
203
204
  "walletCard-points": "Points",
204
205
  "walletCard-rechargeable": "Recharge",
@@ -209,8 +210,8 @@ var en_US_default = {
209
210
  "pisellQrcode-qrcode": "QR code",
210
211
  "pisell-design-mode-action-disabled": "This action cannot be performed in edit mode",
211
212
  "pisell-delete-confirm-title": "Confirm Delete",
212
- "pisell-delete-confirm-content": "Are you sure you want to delete this record?",
213
- "pisell-delete-confirm-ok": "OK",
213
+ "pisell-delete-confirm-content": "Are you sure you want to delete this record? This action cannot be undone.",
214
+ "pisell-delete-confirm-ok": "Delete",
214
215
  "pisell-delete-confirm-cancel": "Cancel",
215
216
  "pisell-design-mode-action-disabled": "This operation is not allowed in edit mode",
216
217
  "pisell-translation-original": "Original"
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell-upload-multilingual-item-title-zh-HK': string;
160
160
  'pisell-color-picker-default': string;
161
161
  'pisell-action-get-data': string;
162
+ 'pisell-action-delete-success': string;
162
163
  'pisell-action-delete-failed': string;
163
164
  'walletCard-points': string;
164
165
  'walletCard-rechargeable': string;
@@ -198,6 +198,7 @@ var zh_CN_default = {
198
198
  "pisell-color-picker-default": "默认",
199
199
  // 获取数据
200
200
  "pisell-action-get-data": "请先获取数据",
201
+ "pisell-action-delete-success": "删除成功",
201
202
  "pisell-action-delete-failed": "删除失败,请重试",
202
203
  "walletCard-points": "积分卡",
203
204
  "walletCard-rechargeable": "充值卡",
@@ -207,8 +208,8 @@ var zh_CN_default = {
207
208
  "pisellQrcode-done": "完成",
208
209
  "pisellQrcode-qrcode": "二维码",
209
210
  "pisell-delete-confirm-title": "确认删除",
210
- "pisell-delete-confirm-content": "确定要删除该条记录吗?",
211
- "pisell-delete-confirm-ok": "确定",
211
+ "pisell-delete-confirm-content": "确定要删除该条记录吗? 此操作无法撤销。",
212
+ "pisell-delete-confirm-ok": "删除",
212
213
  "pisell-delete-confirm-cancel": "取消",
213
214
  "pisell-design-mode-action-disabled": "编辑模式下不可执行此操作",
214
215
  "pisell-translation-original": "原始语言"
@@ -159,6 +159,7 @@ declare const _default: {
159
159
  'pisell-upload-multilingual-item-title-zh-HK': string;
160
160
  'pisell-color-picker-default': string;
161
161
  'pisell-action-get-data': string;
162
+ 'pisell-action-delete-success': string;
162
163
  'pisell-action-delete-failed': string;
163
164
  'walletCard-points': string;
164
165
  'walletCard-rechargeable': string;
@@ -199,6 +199,7 @@ var zh_TW_default = {
199
199
  "pisell-color-picker-default": "默認",
200
200
  // 获取数据
201
201
  "pisell-action-get-data": "請先獲取數據",
202
+ "pisell-action-delete-success": "刪除成功",
202
203
  "pisell-action-delete-failed": "刪除失敗,請重試",
203
204
  "walletCard-points": "積分卡",
204
205
  "walletCard-rechargeable": "充值卡",
@@ -208,8 +209,8 @@ var zh_TW_default = {
208
209
  "pisellQrcode-done": "完成",
209
210
  "pisellQrcode-qrcode": "二維碼",
210
211
  "pisell-delete-confirm-title": "確認刪除",
211
- "pisell-delete-confirm-content": "確定要刪除該條記錄嗎?",
212
- "pisell-delete-confirm-ok": "確定",
212
+ "pisell-delete-confirm-content": "確定要刪除該條記錄嗎? 此操作無法撤銷。",
213
+ "pisell-delete-confirm-ok": "刪除",
213
214
  "pisell-delete-confirm-cancel": "取消",
214
215
  "pisell-design-mode-action-disabled": "編輯模式下不可執行此操作",
215
216
  "pisell-translation-original": "原始語言"
@@ -202,6 +202,21 @@ export const getJsSlot = () => {
202
202
  };
203
203
  };
204
204
 
205
+ const toastTitleMap: Record<'add' | 'edit', any> = {
206
+ add: {
207
+ type: 'i18n',
208
+ en: 'Added successfully',
209
+ 'zh-CN': '添加成功',
210
+ 'zh-HK': '添加成功',
211
+ },
212
+ edit: {
213
+ type: 'i18n',
214
+ en: 'Updated successfully',
215
+ 'zh-CN': '更新成功',
216
+ 'zh-HK': '更新成功',
217
+ },
218
+ }
219
+
205
220
  export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
206
221
  const fields = getVariable(target, 'currentFields');
207
222
  let childrenSchemas = [createFormGroup(fields2ChildrenSchemas(fields, mode))];
@@ -216,6 +231,11 @@ export const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
216
231
  childrenSchemas = childrenSchemas.concat(
217
232
  createSubmitButton({
218
233
  afterSubmitType: 'close',
234
+ toastConfig: {
235
+ enable: true,
236
+ showAfterSubmit: true,
237
+ title: toastTitleMap[mode as 'add' | 'edit'],
238
+ },
219
239
  })
220
240
  );
221
241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.501",
3
+ "version": "1.0.503",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -68,8 +68,8 @@
68
68
  "styled-components": "^6.0.0-rc.3",
69
69
  "libphonenumber-js": "^1.11.17",
70
70
  "@pisell/icon": "0.0.10",
71
- "@pisell/date-picker": "1.0.114",
72
- "@pisell/utils": "1.0.43"
71
+ "@pisell/utils": "1.0.43",
72
+ "@pisell/date-picker": "1.0.114"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "react": "^18.0.0",