@pisell/private-materials 3.4.84 → 3.4.86

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 (61) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +2 -2
  6. package/build/lowcode/view.js +2 -2
  7. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  8. package/es/components/eftposPay/component/fail/failCustom.js +17 -12
  9. package/es/components/eftposPay/component/fail/index.js +12 -5
  10. package/es/components/eftposPay/const.d.ts +2 -0
  11. package/es/components/eftposPay/const.js +1 -0
  12. package/es/components/eftposPay/hooks.d.ts +1 -0
  13. package/es/components/eftposPay/hooks.js +12 -0
  14. package/es/components/eftposPay/index.js +5 -1
  15. package/es/components/eftposPay/linkly/const.js +1 -1
  16. package/es/components/eftposPay/payo/config.js +1 -0
  17. package/es/components/eftposPay/payo/const.js +1 -1
  18. package/es/components/eftposPay/store/index.d.ts +3 -0
  19. package/es/components/eftposPay/tyro/const.js +1 -1
  20. package/es/components/eftposPay/windcave/const.js +1 -1
  21. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  22. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  23. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  24. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +32 -16
  25. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +16 -10
  26. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  27. package/es/components/systemSettings/registry/components/ItemModal.js +121 -51
  28. package/es/components/systemSettings/registry/locales.d.ts +9 -0
  29. package/es/components/systemSettings/registry/locales.js +15 -3
  30. package/es/components/systemSettings/registry/types.d.ts +1 -0
  31. package/es/plus/pisellSalesManagement/config/booking.d.ts +0 -1
  32. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  33. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  34. package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
  35. package/lib/components/eftposPay/component/fail/index.js +4 -1
  36. package/lib/components/eftposPay/const.d.ts +2 -0
  37. package/lib/components/eftposPay/const.js +1 -0
  38. package/lib/components/eftposPay/hooks.d.ts +1 -0
  39. package/lib/components/eftposPay/hooks.js +16 -0
  40. package/lib/components/eftposPay/index.js +5 -1
  41. package/lib/components/eftposPay/linkly/const.js +1 -1
  42. package/lib/components/eftposPay/payo/config.js +1 -0
  43. package/lib/components/eftposPay/payo/const.js +1 -1
  44. package/lib/components/eftposPay/store/index.d.ts +3 -0
  45. package/lib/components/eftposPay/tyro/const.js +1 -1
  46. package/lib/components/eftposPay/windcave/const.js +1 -1
  47. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  48. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  49. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  50. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +19 -11
  51. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +21 -22
  52. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  53. package/lib/components/systemSettings/registry/components/ItemModal.js +78 -24
  54. package/lib/components/systemSettings/registry/locales.d.ts +9 -0
  55. package/lib/components/systemSettings/registry/locales.js +15 -3
  56. package/lib/components/systemSettings/registry/types.d.ts +1 -0
  57. package/lib/plus/pisellSalesManagement/config/booking.d.ts +0 -1
  58. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  59. package/lowcode/eco-cup-list/meta.ts +1 -1
  60. package/lowcode/eco-customer-list/meta.ts +1 -1
  61. package/package.json +4 -4
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(List_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_utils = require("@pisell/utils");
38
+ var import_ahooks = require("ahooks");
38
39
  var import_materials = require("@pisell/materials");
39
40
  var import_classnames = __toESM(require("classnames"));
40
41
  var import_model = require("../../../model");
@@ -63,6 +64,7 @@ var MWCreditCardList = (props, ref) => {
63
64
  setOrder(_order);
64
65
  setOpen(true);
65
66
  setManage(false);
67
+ setOkLoading(false);
66
68
  setCurrentCard(0);
67
69
  _getCreditCardList();
68
70
  };
@@ -137,16 +139,21 @@ var MWCreditCardList = (props, ref) => {
137
139
  });
138
140
  }
139
141
  };
140
- const onOk = () => {
141
- var _a;
142
- if (manage) {
143
- setManage(false);
144
- handleBatchDeleteCards();
145
- return;
146
- }
147
- let cur = creditCardList.find((d) => d.id === currentCard);
148
- (_a = props.onChange) == null ? void 0 : _a.call(props, cur);
149
- };
142
+ const [okLoading, setOkLoading] = (0, import_react.useState)(false);
143
+ const { run: onOk } = (0, import_ahooks.useDebounceFn)(
144
+ () => {
145
+ var _a;
146
+ if (manage) {
147
+ setManage(false);
148
+ handleBatchDeleteCards();
149
+ return;
150
+ }
151
+ setOkLoading(true);
152
+ let cur = creditCardList.find((d) => d.id === currentCard);
153
+ (_a = props.onChange) == null ? void 0 : _a.call(props, cur);
154
+ },
155
+ { wait: 300 }
156
+ );
150
157
  const renderList = (0, import_react.useMemo)(() => {
151
158
  return creditCardList.filter((d) => d.delete !== 1);
152
159
  }, [creditCardList]);
@@ -178,7 +185,8 @@ var MWCreditCardList = (props, ref) => {
178
185
  okText: manage ? import_utils.locales.getText("tocPay.text.done") : okText,
179
186
  onOk,
180
187
  okButtonProps: {
181
- disabled: !currentCard
188
+ disabled: !currentCard,
189
+ loading: okLoading
182
190
  },
183
191
  bodyStyle: { padding: 24 }
184
192
  },
@@ -263,35 +263,34 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
263
263
  let timer = null;
264
264
  return new Promise((res, rej) => {
265
265
  var _a2;
266
+ const handleMessage = (event) => {
267
+ if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf("securesuite") !== -1) {
268
+ if (typeof event.data.threeDSServerTransID == "string") {
269
+ setHistoryLog({
270
+ msg: "第三步: message 返回 threeDSServerTransID",
271
+ time: getCurrentTime(),
272
+ threeDSServerTransID: event.data.threeDSServerTransID
273
+ });
274
+ if (timer) {
275
+ clearTimeout(timer);
276
+ }
277
+ window.removeEventListener("message", handleMessage);
278
+ res({
279
+ threeDSServerTransID: event.data.threeDSServerTransID,
280
+ threeDSCompInd: "Y"
281
+ });
282
+ }
283
+ }
284
+ };
266
285
  timer = setTimeout(() => {
286
+ window.removeEventListener("message", handleMessage);
267
287
  res(defaultReturnParams);
268
288
  log({
269
289
  msg: "第三步: 10秒超时则走N逻辑",
270
290
  data: threeDSMethodData
271
291
  });
272
292
  }, ((_a2 = threeDSMethodData == null ? void 0 : threeDSMethodData.pay_info) == null ? void 0 : _a2.tdsMethodTimeoutMS) || 1e4);
273
- window.addEventListener(
274
- "message",
275
- (event) => {
276
- if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf("securesuite") !== -1) {
277
- if (typeof event.data.threeDSServerTransID == "string") {
278
- setHistoryLog({
279
- msg: "第三步: message 返回 threeDSServerTransID",
280
- time: getCurrentTime(),
281
- threeDSServerTransID: event.data.threeDSServerTransID
282
- });
283
- if (timer) {
284
- clearTimeout(timer);
285
- }
286
- res({
287
- threeDSServerTransID: event.data.threeDSServerTransID,
288
- threeDSCompInd: "Y"
289
- });
290
- }
291
- }
292
- },
293
- false
294
- );
293
+ window.addEventListener("message", handleMessage, false);
295
294
  });
296
295
  };
297
296
  var checkTDSAuth = async (step2, step3, callback) => {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Empty: (props: any) => import("react").JSX.Element;
4
3
  export default Empty;
@@ -71,7 +71,8 @@ var interfaceTypeOptions = {
71
71
  ],
72
72
  array: [
73
73
  { value: "Select", label: "多选下拉框" },
74
- { value: "Input.JSON", label: "JSON编辑器" }
74
+ { value: "Input.JSON", label: "JSON编辑器" },
75
+ { value: "RecordListWrapper", label: "记录列表包装器" }
75
76
  ]
76
77
  };
77
78
  var ItemModal = ({
@@ -193,6 +194,14 @@ var ItemModal = ({
193
194
  } else {
194
195
  formData.xDataSource = { type: "default", options: [] };
195
196
  }
197
+ const xRecordSchema = schema["x-record-schema"];
198
+ if (!xRecordSchema) {
199
+ formData.xRecordSchema = "";
200
+ } else if (typeof xRecordSchema === "string") {
201
+ formData.xRecordSchema = xRecordSchema;
202
+ } else if (typeof xRecordSchema === "object") {
203
+ formData.xRecordSchema = JSON.stringify(xRecordSchema, null, 2);
204
+ }
196
205
  const xCustomUiSchema = schema["x-custom-ui-schema"];
197
206
  if (!xCustomUiSchema) {
198
207
  formData.xCustomUiSchema = "";
@@ -228,7 +237,8 @@ var ItemModal = ({
228
237
  scopes: ["string"],
229
238
  // 为key字段添加section code前缀作为默认值
230
239
  key: (section == null ? void 0 : section.code) ? `${section.code}.` : "",
231
- xDataSource: { type: "default", options: [] }
240
+ xDataSource: { type: "default", options: [] },
241
+ xRecordSchema: ""
232
242
  };
233
243
  form.setFieldsValue(defaultValues);
234
244
  setSelectedFieldType("string");
@@ -241,15 +251,15 @@ var ItemModal = ({
241
251
  form.setFieldsValue({ interfaceType: void 0 });
242
252
  form.setFieldsValue({ default: void 0 });
243
253
  form.setFieldsValue({ xDataSource: { type: "default", options: [] } });
254
+ form.setFieldsValue({ xRecordSchema: "" });
244
255
  form.validateFields(["default"]).catch(() => {
245
256
  });
246
257
  };
247
258
  const handleInterfaceTypeChange = (value) => {
248
- if (value !== "Select") {
249
- form.setFieldsValue({
250
- xDataSource: { type: "default", options: [] }
251
- });
252
- }
259
+ form.setFieldsValue({
260
+ xDataSource: { type: "default", options: [] },
261
+ xRecordSchema: ""
262
+ });
253
263
  };
254
264
  const handleScopesChange = (values) => {
255
265
  const stringValues = values.map((v) => String(v));
@@ -298,7 +308,10 @@ var ItemModal = ({
298
308
  );
299
309
  }
300
310
  }
301
- if (values.interfaceType === "Select" && values.xDataSource) {
311
+ const needUseXDataSource = ["Select", "RecordListWrapper"].includes(
312
+ values.interfaceType || ""
313
+ );
314
+ if (needUseXDataSource && values.xDataSource) {
302
315
  const {
303
316
  type: type2 = "default",
304
317
  options = [],
@@ -322,9 +335,24 @@ var ItemModal = ({
322
335
  } else if (type2 === "custom") {
323
336
  schema["x-data-source"] = { type: type2 };
324
337
  }
338
+ } else {
339
+ schema["x-data-source"] = void 0;
340
+ }
341
+ const needUseXRecordSchema = values.interfaceType === "RecordListWrapper";
342
+ if (needUseXRecordSchema && values.xRecordSchema) {
343
+ try {
344
+ schema["x-record-schema"] = JSON.parse(values.xRecordSchema);
345
+ } catch (error) {
346
+ throw new Error(
347
+ `Record List Wrapper Schema格式错误: ${error instanceof Error ? error.message : "未知错误"}`
348
+ );
349
+ }
350
+ } else {
351
+ schema["x-record-schema"] = void 0;
325
352
  }
326
353
  values.schema = Object.keys(schema).length > 0 ? schema : void 0;
327
354
  delete values.xDataSource;
355
+ delete values.xRecordSchema;
328
356
  delete values.xCustomUiSchema;
329
357
  await onOk(values);
330
358
  } catch (error) {
@@ -338,6 +366,17 @@ var ItemModal = ({
338
366
  const title = import_utils.locales.getText(
339
367
  type === "add" ? "registry.modal.add.item" : "registry.modal.edit.item"
340
368
  );
369
+ const jsonValidator = (value, message) => {
370
+ if (!value || value.trim() === "") {
371
+ return Promise.resolve();
372
+ }
373
+ try {
374
+ JSON.parse(value);
375
+ return Promise.resolve();
376
+ } catch (error) {
377
+ return Promise.reject(new Error(message));
378
+ }
379
+ };
341
380
  return /* @__PURE__ */ import_react.default.createElement(
342
381
  import_antd.Drawer,
343
382
  {
@@ -458,7 +497,33 @@ var ItemModal = ({
458
497
  (option) => /* @__PURE__ */ import_react.default.createElement(Option, { key: option.value, value: option.value }, option.label)
459
498
  )
460
499
  )
461
- ))), _interfaceType === "Select" && /* @__PURE__ */ import_react.default.createElement(import_OptionDataSource.default, { form, treeDataSource }), /* @__PURE__ */ import_react.default.createElement(
500
+ ))), ["Select", "RecordListWrapper"].includes(_interfaceType || "") && /* @__PURE__ */ import_react.default.createElement(import_OptionDataSource.default, { form, treeDataSource }), _interfaceType === "RecordListWrapper" && /* @__PURE__ */ import_react.default.createElement(
501
+ import_antd.Form.Item,
502
+ {
503
+ name: "xRecordSchema",
504
+ label: import_utils.locales.getText("registry.form.recordListWrapper.label"),
505
+ rules: [
506
+ {
507
+ validator: (_, value) => jsonValidator(
508
+ value,
509
+ import_utils.locales.getText(
510
+ "registry.message.recordListWrapper.invalid"
511
+ )
512
+ )
513
+ }
514
+ ]
515
+ },
516
+ /* @__PURE__ */ import_react.default.createElement(
517
+ TextArea,
518
+ {
519
+ placeholder: import_utils.locales.getText(
520
+ "registry.form.recordListWrapper.placeholder"
521
+ ),
522
+ rows: 6,
523
+ style: { fontFamily: "monospace" }
524
+ }
525
+ )
526
+ ), /* @__PURE__ */ import_react.default.createElement(
462
527
  import_antd.Form.Item,
463
528
  {
464
529
  name: "scopes",
@@ -545,21 +610,10 @@ var ItemModal = ({
545
610
  label: import_utils.locales.getText("registry.form.uiSchema"),
546
611
  rules: [
547
612
  {
548
- validator: (_, value) => {
549
- if (!value || value.trim() === "") {
550
- return Promise.resolve();
551
- }
552
- try {
553
- JSON.parse(value);
554
- return Promise.resolve();
555
- } catch (error) {
556
- return Promise.reject(
557
- new Error(
558
- import_utils.locales.getText("registry.message.uiSchema.invalid")
559
- )
560
- );
561
- }
562
- }
613
+ validator: (_, value) => jsonValidator(
614
+ value,
615
+ import_utils.locales.getText("registry.message.uiSchema.invalid")
616
+ )
563
617
  }
564
618
  ]
565
619
  },
@@ -113,6 +113,9 @@ declare const _default: {
113
113
  'registry.optionDataSource.options.required-desc': string;
114
114
  'registry.optionDataSource.options.empty': string;
115
115
  'registry.optionDataSource.options.add': string;
116
+ 'registry.form.recordListWrapper.label': string;
117
+ 'registry.form.recordListWrapper.placeholder': string;
118
+ 'registry.message.recordListWrapper.invalid': string;
116
119
  };
117
120
  'zh-CN': {
118
121
  'registry.title': string;
@@ -228,6 +231,9 @@ declare const _default: {
228
231
  'registry.optionDataSource.options.required-desc': string;
229
232
  'registry.optionDataSource.options.empty': string;
230
233
  'registry.optionDataSource.options.add': string;
234
+ 'registry.form.recordListWrapper.label': string;
235
+ 'registry.form.recordListWrapper.placeholder': string;
236
+ 'registry.message.recordListWrapper.invalid': string;
231
237
  };
232
238
  'zh-HK': {
233
239
  'registry.title': string;
@@ -336,6 +342,9 @@ declare const _default: {
336
342
  'registry.optionDataSource.options.required-desc': string;
337
343
  'registry.optionDataSource.options.empty': string;
338
344
  'registry.optionDataSource.options.add': string;
345
+ 'registry.form.recordListWrapper.label': string;
346
+ 'registry.form.recordListWrapper.placeholder': string;
347
+ 'registry.message.recordListWrapper.invalid': string;
339
348
  };
340
349
  ja: {
341
350
  'registry.title': string;
@@ -148,7 +148,11 @@ var locales_default = {
148
148
  "registry.optionDataSource.options.drag-desc": "Drag rows to reorder.",
149
149
  "registry.optionDataSource.options.required-desc": "Each option must have a value and a label.",
150
150
  "registry.optionDataSource.options.empty": "Please add at least one option for Pre-defined data source.",
151
- "registry.optionDataSource.options.add": "Add Option"
151
+ "registry.optionDataSource.options.add": "Add Option",
152
+ // 记录列表包装器JSON配置
153
+ "registry.form.recordListWrapper.label": "Record List Wrapper Schema",
154
+ "registry.form.recordListWrapper.placeholder": "Please enter record list wrapper schema in JSON format",
155
+ "registry.message.recordListWrapper.invalid": "Please enter valid JSON format"
152
156
  },
153
157
  "zh-CN": {
154
158
  // 页面标题
@@ -275,7 +279,11 @@ var locales_default = {
275
279
  "registry.optionDataSource.options.drag-desc": "拖拽行可调整顺序。",
276
280
  "registry.optionDataSource.options.required-desc": "每个选项必须有选项值和标签。",
277
281
  "registry.optionDataSource.options.empty": "预设类型至少需要添加一个选项。",
278
- "registry.optionDataSource.options.add": "添加选项"
282
+ "registry.optionDataSource.options.add": "添加选项",
283
+ // 记录列表包装器JSON配置
284
+ "registry.form.recordListWrapper.label": "记录列表包装器JSON配置",
285
+ "registry.form.recordListWrapper.placeholder": "请输入记录列表包装器JSON配置",
286
+ "registry.message.recordListWrapper.invalid": "请输入有效的JSON格式"
279
287
  },
280
288
  "zh-HK": {
281
289
  // 页面标题
@@ -394,7 +402,11 @@ var locales_default = {
394
402
  "registry.optionDataSource.options.drag-desc": "拖拽行可調整順序。",
395
403
  "registry.optionDataSource.options.required-desc": "每個選項必須有選項值和標籤。",
396
404
  "registry.optionDataSource.options.empty": "預設類型至少需要添加一個選項。",
397
- "registry.optionDataSource.options.add": "添加選項"
405
+ "registry.optionDataSource.options.add": "添加選項",
406
+ // 记录列表包装器JSON配置
407
+ "registry.form.recordListWrapper.label": "記錄列表包裝器JSON配置",
408
+ "registry.form.recordListWrapper.placeholder": "請輸入記錄列表包裝器JSON配置",
409
+ "registry.message.recordListWrapper.invalid": "請輸入有效的JSON格式"
398
410
  },
399
411
  ja: {
400
412
  "registry.title": "設定レジストリ",
@@ -112,6 +112,7 @@ export interface ItemFormData {
112
112
  extraParams?: string;
113
113
  };
114
114
  xCustomUiSchema?: string;
115
+ xRecordSchema?: string;
115
116
  }
116
117
  export interface GroupModalProps {
117
118
  open: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const getBookingStatusMap: () => Record<string, string>;
3
2
  export declare const BOOKING_STATUS_COLOR_MAP: Record<string, string>;
4
3
  export declare const getBookingPlatformMap: () => Record<string, string>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
4
3
  export default ErrorTip;
@@ -9,7 +9,7 @@ const EcoCupListMeta: ComponentMetadata = {
9
9
  "devMode": "proCode",
10
10
  "npm": {
11
11
  "package": "@pisell/private-materials",
12
- "version": "3.4.83",
12
+ "version": "1.1.2073",
13
13
  "exportName": "EcoCupList",
14
14
  "main": "src/index.ts",
15
15
  "destructuring": true,
@@ -9,7 +9,7 @@ const EcoCustomerListMeta: ComponentMetadata = {
9
9
  "devMode": "proCode",
10
10
  "npm": {
11
11
  "package": "@pisell/private-materials",
12
- "version": "3.4.83",
12
+ "version": "1.1.2073",
13
13
  "exportName": "EcoCustomerList",
14
14
  "main": "src/index.ts",
15
15
  "destructuring": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.4.84",
3
+ "version": "3.4.86",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -76,10 +76,10 @@
76
76
  "react-infinite-scroll-component": "^6.1.0",
77
77
  "react-resizable": "^3.0.5",
78
78
  "styled-components": "^6.0.0-rc.3",
79
- "@pisell/utils": "3.0.2",
80
- "@pisell/materials": "3.3.87",
79
+ "@pisell/date-picker": "3.0.4",
81
80
  "@pisell/icon": "0.0.11",
82
- "@pisell/date-picker": "3.0.4"
81
+ "@pisell/materials": "3.3.88",
82
+ "@pisell/utils": "3.0.2"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "react": "^18.0.0",