@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.
- 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/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.js +17 -12
- package/es/components/eftposPay/component/fail/index.js +12 -5
- package/es/components/eftposPay/const.d.ts +2 -0
- package/es/components/eftposPay/const.js +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -0
- package/es/components/eftposPay/hooks.js +12 -0
- package/es/components/eftposPay/index.js +5 -1
- package/es/components/eftposPay/linkly/const.js +1 -1
- package/es/components/eftposPay/payo/config.js +1 -0
- package/es/components/eftposPay/payo/const.js +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -0
- package/es/components/eftposPay/tyro/const.js +1 -1
- package/es/components/eftposPay/windcave/const.js +1 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- 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/shoppingCart/components/Empty/index.d.ts +0 -1
- 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/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
- package/lib/components/eftposPay/component/fail/index.js +4 -1
- package/lib/components/eftposPay/const.d.ts +2 -0
- package/lib/components/eftposPay/const.js +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -0
- package/lib/components/eftposPay/hooks.js +16 -0
- package/lib/components/eftposPay/index.js +5 -1
- package/lib/components/eftposPay/linkly/const.js +1 -1
- package/lib/components/eftposPay/payo/config.js +1 -0
- package/lib/components/eftposPay/payo/const.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -0
- package/lib/components/eftposPay/tyro/const.js +1 -1
- package/lib/components/eftposPay/windcave/const.js +1 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- 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/shoppingCart/components/Empty/index.d.ts +0 -1
- 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/plus/pisellSalesManagement/config/booking.d.ts +0 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lowcode/eco-cup-list/meta.ts +1 -1
- package/lowcode/eco-customer-list/meta.ts +1 -1
- package/package.json +4 -4
|
@@ -99,6 +99,9 @@ var interfaceTypeOptions = {
|
|
|
99
99
|
}, {
|
|
100
100
|
value: 'Input.JSON',
|
|
101
101
|
label: 'JSON编辑器'
|
|
102
|
+
}, {
|
|
103
|
+
value: 'RecordListWrapper',
|
|
104
|
+
label: '记录列表包装器'
|
|
102
105
|
}]
|
|
103
106
|
};
|
|
104
107
|
var ItemModal = function ItemModal(_ref) {
|
|
@@ -152,7 +155,9 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
152
155
|
style: {
|
|
153
156
|
width: '100%'
|
|
154
157
|
},
|
|
155
|
-
precision: 0
|
|
158
|
+
precision: 0
|
|
159
|
+
// @ts-ignore
|
|
160
|
+
,
|
|
156
161
|
allowClear: true
|
|
157
162
|
});
|
|
158
163
|
case 'float':
|
|
@@ -160,7 +165,9 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
160
165
|
placeholder: "\u8BF7\u8F93\u5165\u6570\u5B57",
|
|
161
166
|
style: {
|
|
162
167
|
width: '100%'
|
|
163
|
-
}
|
|
168
|
+
}
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
,
|
|
164
171
|
allowClear: true
|
|
165
172
|
});
|
|
166
173
|
case 'boolean':
|
|
@@ -258,6 +265,16 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
258
265
|
};
|
|
259
266
|
}
|
|
260
267
|
|
|
268
|
+
// 处理记录列表包装器JSON配置
|
|
269
|
+
var xRecordSchema = schema['x-record-schema'];
|
|
270
|
+
if (!xRecordSchema) {
|
|
271
|
+
formData.xRecordSchema = '';
|
|
272
|
+
} else if (typeof xRecordSchema === 'string') {
|
|
273
|
+
formData.xRecordSchema = xRecordSchema;
|
|
274
|
+
} else if (_typeof(xRecordSchema) === 'object') {
|
|
275
|
+
formData.xRecordSchema = JSON.stringify(xRecordSchema, null, 2);
|
|
276
|
+
}
|
|
277
|
+
|
|
261
278
|
// 处理自定义UI Schema
|
|
262
279
|
var xCustomUiSchema = schema['x-custom-ui-schema'];
|
|
263
280
|
if (!xCustomUiSchema) {
|
|
@@ -299,7 +316,8 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
299
316
|
xDataSource: {
|
|
300
317
|
type: 'default',
|
|
301
318
|
options: []
|
|
302
|
-
}
|
|
319
|
+
},
|
|
320
|
+
xRecordSchema: ''
|
|
303
321
|
};
|
|
304
322
|
form.setFieldsValue(defaultValues);
|
|
305
323
|
setSelectedFieldType('string');
|
|
@@ -329,6 +347,11 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
329
347
|
}
|
|
330
348
|
});
|
|
331
349
|
|
|
350
|
+
// 清空记录列表包装器JSON配置
|
|
351
|
+
form.setFieldsValue({
|
|
352
|
+
xRecordSchema: ''
|
|
353
|
+
});
|
|
354
|
+
|
|
332
355
|
// 重新验证默认值字段
|
|
333
356
|
form.validateFields(['default']).catch(function () {
|
|
334
357
|
// 验证失败时不做特殊处理,让用户看到错误信息
|
|
@@ -337,15 +360,14 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
337
360
|
|
|
338
361
|
// 处理界面类型变化
|
|
339
362
|
var handleInterfaceTypeChange = function handleInterfaceTypeChange(value) {
|
|
340
|
-
//
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
363
|
+
// 清空选项配置和记录列表包装器JSON配置
|
|
364
|
+
form.setFieldsValue({
|
|
365
|
+
xDataSource: {
|
|
366
|
+
type: 'default',
|
|
367
|
+
options: []
|
|
368
|
+
},
|
|
369
|
+
xRecordSchema: ''
|
|
370
|
+
});
|
|
349
371
|
};
|
|
350
372
|
|
|
351
373
|
// 处理作用域变化
|
|
@@ -361,7 +383,7 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
361
383
|
// 处理确认
|
|
362
384
|
var handleOk = /*#__PURE__*/function () {
|
|
363
385
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
364
|
-
var values, validation, _validation, schema, _ref3, _ref3$type, _type, _ref3$options, options, rest;
|
|
386
|
+
var values, validation, _validation, schema, needUseXDataSource, _ref3, _ref3$type, _type, _ref3$options, options, rest, needUseXRecordSchema;
|
|
365
387
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
366
388
|
while (1) switch (_context.prev = _context.next) {
|
|
367
389
|
case 0:
|
|
@@ -425,72 +447,103 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
425
447
|
_context.t0 = _context["catch"](22);
|
|
426
448
|
throw new Error("UI Schema\u683C\u5F0F\u9519\u8BEF: ".concat(_context.t0 instanceof Error ? _context.t0.message : '未知错误'));
|
|
427
449
|
case 29:
|
|
428
|
-
|
|
429
|
-
|
|
450
|
+
// 将 xDataSource 合并到 schema 的 x-data-source 中
|
|
451
|
+
needUseXDataSource = ['Select', 'RecordListWrapper'].includes(values.interfaceType || '');
|
|
452
|
+
if (!(needUseXDataSource && values.xDataSource)) {
|
|
453
|
+
_context.next = 51;
|
|
430
454
|
break;
|
|
431
455
|
}
|
|
432
456
|
_ref3 = (values === null || values === void 0 ? void 0 : values.xDataSource) || {}, _ref3$type = _ref3.type, _type = _ref3$type === void 0 ? 'default' : _ref3$type, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? [] : _ref3$options, rest = _objectWithoutProperties(_ref3, _excluded);
|
|
433
457
|
if (!(_type === 'default')) {
|
|
434
|
-
_context.next =
|
|
458
|
+
_context.next = 36;
|
|
435
459
|
break;
|
|
436
460
|
}
|
|
437
461
|
schema['x-data-source'] = {
|
|
438
462
|
type: _type,
|
|
439
463
|
options: options
|
|
440
464
|
};
|
|
441
|
-
_context.next =
|
|
465
|
+
_context.next = 49;
|
|
442
466
|
break;
|
|
443
|
-
case
|
|
467
|
+
case 36:
|
|
444
468
|
if (!(_type === 'api')) {
|
|
445
|
-
_context.next =
|
|
469
|
+
_context.next = 48;
|
|
446
470
|
break;
|
|
447
471
|
}
|
|
448
472
|
schema['x-data-source'] = _objectSpread({
|
|
449
473
|
type: _type
|
|
450
474
|
}, rest || {});
|
|
451
475
|
if (!(rest !== null && rest !== void 0 && rest.extraParams)) {
|
|
452
|
-
_context.next =
|
|
476
|
+
_context.next = 46;
|
|
453
477
|
break;
|
|
454
478
|
}
|
|
455
|
-
_context.prev =
|
|
479
|
+
_context.prev = 39;
|
|
456
480
|
schema['x-data-source'].extraParams = JSON.parse(rest.extraParams);
|
|
457
|
-
_context.next =
|
|
481
|
+
_context.next = 46;
|
|
458
482
|
break;
|
|
459
|
-
case
|
|
460
|
-
_context.prev =
|
|
461
|
-
_context.t1 = _context["catch"](
|
|
483
|
+
case 43:
|
|
484
|
+
_context.prev = 43;
|
|
485
|
+
_context.t1 = _context["catch"](39);
|
|
462
486
|
throw new Error("Extra Params\u683C\u5F0F\u9519\u8BEF: ".concat(_context.t1 instanceof Error ? _context.t1.message : '未知错误'));
|
|
463
|
-
case
|
|
464
|
-
_context.next =
|
|
487
|
+
case 46:
|
|
488
|
+
_context.next = 49;
|
|
465
489
|
break;
|
|
466
|
-
case
|
|
490
|
+
case 48:
|
|
467
491
|
if (_type === 'custom') {
|
|
468
492
|
schema['x-data-source'] = {
|
|
469
493
|
type: _type
|
|
470
494
|
};
|
|
471
495
|
}
|
|
472
|
-
case
|
|
496
|
+
case 49:
|
|
497
|
+
_context.next = 52;
|
|
498
|
+
break;
|
|
499
|
+
case 51:
|
|
500
|
+
schema['x-data-source'] = undefined;
|
|
501
|
+
case 52:
|
|
502
|
+
// 将 xRecordSchema 合并到 schema 的 x-record-schema 中
|
|
503
|
+
needUseXRecordSchema = values.interfaceType === 'RecordListWrapper';
|
|
504
|
+
if (!(needUseXRecordSchema && values.xRecordSchema)) {
|
|
505
|
+
_context.next = 63;
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
_context.prev = 54;
|
|
509
|
+
// 验证并解析JSON字符串
|
|
510
|
+
schema['x-record-schema'] = JSON.parse(values.xRecordSchema);
|
|
511
|
+
_context.next = 61;
|
|
512
|
+
break;
|
|
513
|
+
case 58:
|
|
514
|
+
_context.prev = 58;
|
|
515
|
+
_context.t2 = _context["catch"](54);
|
|
516
|
+
throw new Error("Record List Wrapper Schema\u683C\u5F0F\u9519\u8BEF: ".concat(_context.t2 instanceof Error ? _context.t2.message : '未知错误'));
|
|
517
|
+
case 61:
|
|
518
|
+
_context.next = 64;
|
|
519
|
+
break;
|
|
520
|
+
case 63:
|
|
521
|
+
schema['x-record-schema'] = undefined;
|
|
522
|
+
case 64:
|
|
473
523
|
// 更新 uiSchema
|
|
474
524
|
values.schema = Object.keys(schema).length > 0 ? schema : undefined;
|
|
475
525
|
|
|
476
|
-
// 从提交数据中移除 xDataSource
|
|
526
|
+
// 从提交数据中移除 xDataSource
|
|
477
527
|
delete values.xDataSource;
|
|
528
|
+
// 从提交数据中移除 xRecordSchema
|
|
529
|
+
delete values.xRecordSchema;
|
|
530
|
+
// 从提交数据中移除 xCustomUiSchema
|
|
478
531
|
delete values.xCustomUiSchema;
|
|
479
|
-
_context.next =
|
|
532
|
+
_context.next = 70;
|
|
480
533
|
return onOk(values);
|
|
481
|
-
case
|
|
482
|
-
_context.next =
|
|
534
|
+
case 70:
|
|
535
|
+
_context.next = 75;
|
|
483
536
|
break;
|
|
484
|
-
case
|
|
485
|
-
_context.prev =
|
|
486
|
-
_context.
|
|
487
|
-
console.error('Validation failed:', _context.
|
|
537
|
+
case 72:
|
|
538
|
+
_context.prev = 72;
|
|
539
|
+
_context.t3 = _context["catch"](0);
|
|
540
|
+
console.error('Validation failed:', _context.t3);
|
|
488
541
|
// 保存失败时不清空表单,不关闭抽屉
|
|
489
|
-
case
|
|
542
|
+
case 75:
|
|
490
543
|
case "end":
|
|
491
544
|
return _context.stop();
|
|
492
545
|
}
|
|
493
|
-
}, _callee, null, [[0,
|
|
546
|
+
}, _callee, null, [[0, 72], [22, 26], [39, 43], [54, 58]]);
|
|
494
547
|
}));
|
|
495
548
|
return function handleOk() {
|
|
496
549
|
return _ref2.apply(this, arguments);
|
|
@@ -503,6 +556,18 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
503
556
|
onCancel();
|
|
504
557
|
};
|
|
505
558
|
var title = locales.getText(type === 'add' ? 'registry.modal.add.item' : 'registry.modal.edit.item');
|
|
559
|
+
var jsonValidator = function jsonValidator(value, message) {
|
|
560
|
+
// 支持空值时跳过验证
|
|
561
|
+
if (!value || value.trim() === '') {
|
|
562
|
+
return Promise.resolve();
|
|
563
|
+
}
|
|
564
|
+
try {
|
|
565
|
+
JSON.parse(value);
|
|
566
|
+
return Promise.resolve();
|
|
567
|
+
} catch (error) {
|
|
568
|
+
return Promise.reject(new Error(message));
|
|
569
|
+
}
|
|
570
|
+
};
|
|
506
571
|
return /*#__PURE__*/React.createElement(Drawer, {
|
|
507
572
|
title: title,
|
|
508
573
|
open: open,
|
|
@@ -600,10 +665,24 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
600
665
|
key: option.value,
|
|
601
666
|
value: option.value
|
|
602
667
|
}, option.label);
|
|
603
|
-
}))))), _interfaceType
|
|
668
|
+
}))))), ['Select', 'RecordListWrapper'].includes(_interfaceType || '') && /*#__PURE__*/React.createElement(OptionDataSource, {
|
|
604
669
|
form: form,
|
|
605
670
|
treeDataSource: treeDataSource
|
|
606
|
-
}), /*#__PURE__*/React.createElement(Form.Item, {
|
|
671
|
+
}), _interfaceType === 'RecordListWrapper' && /*#__PURE__*/React.createElement(Form.Item, {
|
|
672
|
+
name: "xRecordSchema",
|
|
673
|
+
label: locales.getText('registry.form.recordListWrapper.label'),
|
|
674
|
+
rules: [{
|
|
675
|
+
validator: function validator(_, value) {
|
|
676
|
+
return jsonValidator(value, locales.getText('registry.message.recordListWrapper.invalid'));
|
|
677
|
+
}
|
|
678
|
+
}]
|
|
679
|
+
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
680
|
+
placeholder: locales.getText('registry.form.recordListWrapper.placeholder'),
|
|
681
|
+
rows: 6,
|
|
682
|
+
style: {
|
|
683
|
+
fontFamily: 'monospace'
|
|
684
|
+
}
|
|
685
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
607
686
|
name: "scopes",
|
|
608
687
|
label: locales.getText('registry.form.scopes'),
|
|
609
688
|
rules: [{
|
|
@@ -658,16 +737,7 @@ var ItemModal = function ItemModal(_ref) {
|
|
|
658
737
|
label: locales.getText('registry.form.uiSchema'),
|
|
659
738
|
rules: [{
|
|
660
739
|
validator: function validator(_, value) {
|
|
661
|
-
|
|
662
|
-
if (!value || value.trim() === '') {
|
|
663
|
-
return Promise.resolve();
|
|
664
|
-
}
|
|
665
|
-
try {
|
|
666
|
-
JSON.parse(value);
|
|
667
|
-
return Promise.resolve();
|
|
668
|
-
} catch (error) {
|
|
669
|
-
return Promise.reject(new Error(locales.getText('registry.message.uiSchema.invalid')));
|
|
670
|
-
}
|
|
740
|
+
return jsonValidator(value, locales.getText('registry.message.uiSchema.invalid'));
|
|
671
741
|
}
|
|
672
742
|
}]
|
|
673
743
|
}, /*#__PURE__*/React.createElement(TextArea, {
|
|
@@ -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;
|
|
@@ -124,7 +124,11 @@ export default {
|
|
|
124
124
|
'registry.optionDataSource.options.drag-desc': 'Drag rows to reorder.',
|
|
125
125
|
'registry.optionDataSource.options.required-desc': 'Each option must have a value and a label.',
|
|
126
126
|
'registry.optionDataSource.options.empty': 'Please add at least one option for Pre-defined data source.',
|
|
127
|
-
'registry.optionDataSource.options.add': 'Add Option'
|
|
127
|
+
'registry.optionDataSource.options.add': 'Add Option',
|
|
128
|
+
// 记录列表包装器JSON配置
|
|
129
|
+
'registry.form.recordListWrapper.label': 'Record List Wrapper Schema',
|
|
130
|
+
'registry.form.recordListWrapper.placeholder': 'Please enter record list wrapper schema in JSON format',
|
|
131
|
+
'registry.message.recordListWrapper.invalid': 'Please enter valid JSON format'
|
|
128
132
|
},
|
|
129
133
|
'zh-CN': {
|
|
130
134
|
// 页面标题
|
|
@@ -251,7 +255,11 @@ export default {
|
|
|
251
255
|
'registry.optionDataSource.options.drag-desc': '拖拽行可调整顺序。',
|
|
252
256
|
'registry.optionDataSource.options.required-desc': '每个选项必须有选项值和标签。',
|
|
253
257
|
'registry.optionDataSource.options.empty': '预设类型至少需要添加一个选项。',
|
|
254
|
-
'registry.optionDataSource.options.add': '添加选项'
|
|
258
|
+
'registry.optionDataSource.options.add': '添加选项',
|
|
259
|
+
// 记录列表包装器JSON配置
|
|
260
|
+
'registry.form.recordListWrapper.label': '记录列表包装器JSON配置',
|
|
261
|
+
'registry.form.recordListWrapper.placeholder': '请输入记录列表包装器JSON配置',
|
|
262
|
+
'registry.message.recordListWrapper.invalid': '请输入有效的JSON格式'
|
|
255
263
|
},
|
|
256
264
|
'zh-HK': {
|
|
257
265
|
// 页面标题
|
|
@@ -370,7 +378,11 @@ export default {
|
|
|
370
378
|
'registry.optionDataSource.options.drag-desc': '拖拽行可調整順序。',
|
|
371
379
|
'registry.optionDataSource.options.required-desc': '每個選項必須有選項值和標籤。',
|
|
372
380
|
'registry.optionDataSource.options.empty': '預設類型至少需要添加一個選項。',
|
|
373
|
-
'registry.optionDataSource.options.add': '添加選項'
|
|
381
|
+
'registry.optionDataSource.options.add': '添加選項',
|
|
382
|
+
// 记录列表包装器JSON配置
|
|
383
|
+
'registry.form.recordListWrapper.label': '記錄列表包裝器JSON配置',
|
|
384
|
+
'registry.form.recordListWrapper.placeholder': '請輸入記錄列表包裝器JSON配置',
|
|
385
|
+
'registry.message.recordListWrapper.invalid': '請輸入有效的JSON格式'
|
|
374
386
|
},
|
|
375
387
|
ja: {
|
|
376
388
|
'registry.title': '設定レジストリ',
|
|
@@ -52,25 +52,31 @@ var failCustom_default = ({ className = "", isMobile, onChange }) => {
|
|
|
52
52
|
order_id,
|
|
53
53
|
number,
|
|
54
54
|
device,
|
|
55
|
-
client
|
|
55
|
+
client,
|
|
56
|
+
originalParams
|
|
56
57
|
} = (0, import_store.useContextData)();
|
|
57
58
|
const failCustom = custom == null ? void 0 : custom.failCustom;
|
|
58
59
|
const dispatch = (0, import_store.useDispatch)();
|
|
59
60
|
const onRetry = () => {
|
|
60
61
|
onChange("page", "pay");
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
const params = {
|
|
63
|
+
...originalParams || {},
|
|
64
|
+
mode,
|
|
65
|
+
name,
|
|
66
|
+
symbol,
|
|
67
|
+
amount,
|
|
68
|
+
order_id
|
|
69
|
+
};
|
|
70
|
+
if (mode !== import_const.ModeEnum.Query) {
|
|
71
|
+
params.number = "";
|
|
72
|
+
}
|
|
73
|
+
dispatch((0, import_store.updateState)((0, import_manufacturer.getInitState)(eftpos, params)));
|
|
69
74
|
};
|
|
70
75
|
const onModify = () => {
|
|
71
76
|
dispatch(
|
|
72
77
|
(0, import_store.updateState)(
|
|
73
78
|
(0, import_manufacturer.getInitState)(eftpos, {
|
|
79
|
+
...originalParams || {},
|
|
74
80
|
mode,
|
|
75
81
|
name,
|
|
76
82
|
symbol,
|
|
@@ -54,7 +54,8 @@ var fail_default = ({ onChange, className = "", isMobile }) => {
|
|
|
54
54
|
order_id,
|
|
55
55
|
number,
|
|
56
56
|
device,
|
|
57
|
-
client
|
|
57
|
+
client,
|
|
58
|
+
originalParams
|
|
58
59
|
} = (0, import_store.useContextData)();
|
|
59
60
|
const isPosNetworkError = ((_b = (_a = steps[step]) == null ? void 0 : _a.custom) == null ? void 0 : _b.isPosNetworkError) || false;
|
|
60
61
|
const dispatch = (0, import_store.useDispatch)();
|
|
@@ -63,6 +64,7 @@ var fail_default = ({ onChange, className = "", isMobile }) => {
|
|
|
63
64
|
dispatch(
|
|
64
65
|
(0, import_store.updateState)(
|
|
65
66
|
(0, import_manufacturer.getInitState)(eftpos, {
|
|
67
|
+
...originalParams || {},
|
|
66
68
|
mode,
|
|
67
69
|
name,
|
|
68
70
|
symbol,
|
|
@@ -77,6 +79,7 @@ var fail_default = ({ onChange, className = "", isMobile }) => {
|
|
|
77
79
|
dispatch(
|
|
78
80
|
(0, import_store.updateState)(
|
|
79
81
|
(0, import_manufacturer.getInitState)(eftpos, {
|
|
82
|
+
...originalParams || {},
|
|
80
83
|
mode,
|
|
81
84
|
name,
|
|
82
85
|
symbol,
|
|
@@ -154,6 +154,8 @@ export declare enum PayStatus {
|
|
|
154
154
|
'Unknown' = "701000",
|
|
155
155
|
/** 交易请求超时 */
|
|
156
156
|
'Timeout' = "701001",
|
|
157
|
+
/** 支付失败 */
|
|
158
|
+
'PaymentFailed' = "701002",
|
|
157
159
|
/** 繁忙 EFTPOS终端暂时不可用,因为EFTPOS正在处理另一个请求。 */
|
|
158
160
|
'PayOtherEftposFailed' = "701003",
|
|
159
161
|
/** 购物者没有出示卡片/卡片金额不足/在线拒绝/卡已过期/卡被锁定 */
|
|
@@ -92,6 +92,7 @@ var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
|
|
|
92
92
|
PayStatus2["PairingFailure"] = "606020";
|
|
93
93
|
PayStatus2["Unknown"] = "701000";
|
|
94
94
|
PayStatus2["Timeout"] = "701001";
|
|
95
|
+
PayStatus2["PaymentFailed"] = "701002";
|
|
95
96
|
PayStatus2["PayOtherEftposFailed"] = "701003";
|
|
96
97
|
PayStatus2["PayCardErrorFailed"] = "701004";
|
|
97
98
|
PayStatus2["NoNetWork"] = "701005";
|
|
@@ -384,6 +384,22 @@ ${import_utils.locales.getText(
|
|
|
384
384
|
);
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
|
+
if (code === import_const.PayStatus.PaymentFailed) {
|
|
388
|
+
steps[index].title = import_utils.locales.getText(
|
|
389
|
+
"page.eftpos-pay.text.transaction.fail"
|
|
390
|
+
);
|
|
391
|
+
steps[index].fail = (res == null ? void 0 : res.message) || import_utils.locales.getText("page.eftpos-pay.text.failed")(modeRef.current);
|
|
392
|
+
steps[index].status = "fail";
|
|
393
|
+
dispatch((0, import_store.updateSteps)(steps));
|
|
394
|
+
dispatch((0, import_store.updateComponent)("Fail"));
|
|
395
|
+
dispatch(
|
|
396
|
+
(0, import_store.updateCustom)({
|
|
397
|
+
errorStatus: "know"
|
|
398
|
+
// unknow know
|
|
399
|
+
})
|
|
400
|
+
);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
387
403
|
steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.failed")(
|
|
388
404
|
modeRef.current
|
|
389
405
|
);
|
|
@@ -94,10 +94,14 @@ var eftposPay_default = (props) => {
|
|
|
94
94
|
if (props.source === import_const.RestoreEumn.Restore) {
|
|
95
95
|
return props.params;
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
const initState = (0, import_manufacturer.getInitState)(
|
|
98
98
|
props.type,
|
|
99
99
|
props.params ? { mode, ...props.params, symbol: current } : { mode, symbol: current }
|
|
100
100
|
);
|
|
101
|
+
return {
|
|
102
|
+
...initState || {},
|
|
103
|
+
originalParams: props.params || {}
|
|
104
|
+
};
|
|
101
105
|
}, [mode, props.params, props.type, symbol]);
|
|
102
106
|
const stateRef = (0, import_react.useRef)(state);
|
|
103
107
|
(0, import_react.useEffect)(() => {
|
|
@@ -72,7 +72,7 @@ var const_default = (params) => {
|
|
|
72
72
|
status: import_const.StatusEnum.Loading,
|
|
73
73
|
steps: getStep(mode),
|
|
74
74
|
render: true,
|
|
75
|
-
client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
|
|
75
|
+
client: client !== "undefined" && client !== void 0 ? client : import_const.ClientEnum.Merchant,
|
|
76
76
|
warn: "",
|
|
77
77
|
custom: other || {},
|
|
78
78
|
...typeof net !== "undefined" ? { net } : {},
|
|
@@ -187,6 +187,7 @@ var POS = ({
|
|
|
187
187
|
card_reader_type: eftposRef.current,
|
|
188
188
|
card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id,
|
|
189
189
|
number: numRef.current,
|
|
190
|
+
original_payment_number: custom == null ? void 0 : custom.original_payment_number,
|
|
190
191
|
pay_param_base64: encodeURIComponent(
|
|
191
192
|
btoa(
|
|
192
193
|
encodeURIComponent(
|
|
@@ -71,7 +71,7 @@ var const_default = (params) => {
|
|
|
71
71
|
status: import_const.StatusEnum.Loading,
|
|
72
72
|
steps: getStep(mode),
|
|
73
73
|
render: true,
|
|
74
|
-
client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
|
|
74
|
+
client: client !== "undefined" && client !== void 0 ? client : import_const.ClientEnum.Merchant,
|
|
75
75
|
custom: other || {},
|
|
76
76
|
...typeof net !== "undefined" ? { net } : {},
|
|
77
77
|
...typeof number !== "undefined" ? { number } : {},
|
|
@@ -91,6 +91,8 @@ export declare type State = {
|
|
|
91
91
|
};
|
|
92
92
|
backup?: Omit<State, 'backup'>;
|
|
93
93
|
client: ClientEnum;
|
|
94
|
+
/** 支付原始参数 */
|
|
95
|
+
originalParams?: Record<string, any>;
|
|
94
96
|
};
|
|
95
97
|
export declare type Action = {
|
|
96
98
|
type: EActionTypes;
|
|
@@ -344,6 +346,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
344
346
|
} | undefined;
|
|
345
347
|
backup?: Omit<State, "backup"> | undefined;
|
|
346
348
|
client?: ClientEnum | undefined;
|
|
349
|
+
originalParams?: Record<string, any> | undefined;
|
|
347
350
|
};
|
|
348
351
|
};
|
|
349
352
|
export declare function reducers(state: State, action: Action): State;
|
|
@@ -57,7 +57,7 @@ var const_default = (params) => {
|
|
|
57
57
|
status: import_const.StatusEnum.Loading,
|
|
58
58
|
steps: [],
|
|
59
59
|
render: true,
|
|
60
|
-
client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
|
|
60
|
+
client: client !== "undefined" && client !== void 0 ? client : import_const.ClientEnum.Merchant,
|
|
61
61
|
custom: other || {},
|
|
62
62
|
...typeof net !== "undefined" ? { net } : {},
|
|
63
63
|
...typeof number !== "undefined" ? { number } : {},
|
|
@@ -60,7 +60,7 @@ var const_default = (params) => {
|
|
|
60
60
|
status: import_const.StatusEnum.Loading,
|
|
61
61
|
steps: [],
|
|
62
62
|
render: true,
|
|
63
|
-
client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
|
|
63
|
+
client: client !== "undefined" && client !== void 0 ? client : import_const.ClientEnum.Merchant,
|
|
64
64
|
custom: other ? { ...other, list: [], step: 1 /* Free */ } : { list: [], step: 1 /* Free */ },
|
|
65
65
|
...typeof net !== "undefined" ? { net } : {},
|
|
66
66
|
...typeof number !== "undefined" ? { number } : {},
|