@pisell/private-materials 3.4.85 → 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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +32 -16
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +16 -10
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +121 -51
- package/es/components/systemSettings/registry/locales.d.ts +9 -0
- package/es/components/systemSettings/registry/locales.js +15 -3
- package/es/components/systemSettings/registry/types.d.ts +1 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +19 -11
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +21 -22
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +78 -24
- package/lib/components/systemSettings/registry/locales.d.ts +9 -0
- package/lib/components/systemSettings/registry/locales.js +15 -3
- package/lib/components/systemSettings/registry/types.d.ts +1 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/package.json +4 -4
|
@@ -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) => {
|
|
@@ -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
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
550
|
-
|
|
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": "設定レジストリ",
|
|
@@ -9,7 +9,7 @@ const EcoCustomerListMeta: ComponentMetadata = {
|
|
|
9
9
|
"devMode": "proCode",
|
|
10
10
|
"npm": {
|
|
11
11
|
"package": "@pisell/private-materials",
|
|
12
|
-
"version": "
|
|
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.
|
|
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/icon": "0.0.11",
|
|
81
79
|
"@pisell/date-picker": "3.0.4",
|
|
82
|
-
"@pisell/
|
|
80
|
+
"@pisell/icon": "0.0.11",
|
|
81
|
+
"@pisell/materials": "3.3.88",
|
|
82
|
+
"@pisell/utils": "3.0.2"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"react": "^18.0.0",
|