@pisell/private-materials 3.0.187 → 3.0.189
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +3 -3
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/eftposPay/amount.d.ts +4 -3
- package/es/components/eftposPay/amount.js +5 -4
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.js +14 -6
- package/es/components/eftposPay/component/fail/index.d.ts +1 -1
- package/es/components/eftposPay/component/fail/index.js +14 -5
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -1
- package/es/components/eftposPay/component/fail/unknow.js +17 -7
- package/es/components/eftposPay/const.d.ts +8 -2
- package/es/components/eftposPay/const.js +5 -0
- package/es/components/eftposPay/device.d.ts +4 -3
- package/es/components/eftposPay/device.js +5 -4
- package/es/components/eftposPay/hooks.d.ts +4 -3
- package/es/components/eftposPay/hooks.js +31 -6
- package/es/components/eftposPay/index.js +57 -23
- package/es/components/eftposPay/index.less +1 -0
- package/es/components/eftposPay/locales.d.ts +6 -0
- package/es/components/eftposPay/locales.js +6 -0
- package/es/components/eftposPay/pay.d.ts +3 -2
- package/es/components/eftposPay/pay.js +8 -7
- package/es/components/eftposPay/payo/config.d.ts +3 -1
- package/es/components/eftposPay/payo/config.js +11 -9
- package/es/components/eftposPay/payo/const.js +4 -2
- package/es/components/eftposPay/payo/index.js +3 -1
- package/es/components/eftposPay/store/index.d.ts +17 -2
- package/es/components/eftposPay/store/index.js +20 -0
- package/es/components/eftposPay/tyro/const.js +4 -2
- package/es/components/eftposPay/tyro/index.js +70 -20
- package/es/components/eftposPay/windcave/const.js +4 -2
- package/es/components/eftposPay/windcave/helper.js +19 -28
- package/es/components/eftposPay/windcave/windcave.js +2 -1
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/eftposPay/amount.d.ts +4 -3
- package/lib/components/eftposPay/amount.js +4 -3
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.js +16 -4
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/index.js +17 -4
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/unknow.js +15 -3
- package/lib/components/eftposPay/const.d.ts +8 -2
- package/lib/components/eftposPay/const.js +7 -0
- package/lib/components/eftposPay/device.d.ts +4 -3
- package/lib/components/eftposPay/device.js +5 -4
- package/lib/components/eftposPay/hooks.d.ts +4 -3
- package/lib/components/eftposPay/hooks.js +30 -8
- package/lib/components/eftposPay/index.js +46 -18
- package/lib/components/eftposPay/index.less +1 -0
- package/lib/components/eftposPay/locales.d.ts +6 -0
- package/lib/components/eftposPay/locales.js +6 -0
- package/lib/components/eftposPay/pay.d.ts +3 -2
- package/lib/components/eftposPay/pay.js +7 -6
- package/lib/components/eftposPay/payo/config.d.ts +3 -1
- package/lib/components/eftposPay/payo/config.js +8 -8
- package/lib/components/eftposPay/payo/const.js +2 -0
- package/lib/components/eftposPay/payo/index.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +17 -2
- package/lib/components/eftposPay/store/index.js +14 -0
- package/lib/components/eftposPay/tyro/const.js +2 -0
- package/lib/components/eftposPay/tyro/index.js +63 -6
- package/lib/components/eftposPay/windcave/const.js +2 -0
- package/lib/components/eftposPay/windcave/helper.js +23 -28
- package/lib/components/eftposPay/windcave/windcave.js +2 -1
- package/package.json +3 -3
|
@@ -39,6 +39,7 @@ var const_default = (params) => {
|
|
|
39
39
|
pay,
|
|
40
40
|
device,
|
|
41
41
|
net,
|
|
42
|
+
client,
|
|
42
43
|
...other
|
|
43
44
|
} = params || {
|
|
44
45
|
mode: import_const.ModeEnum.Pay
|
|
@@ -59,6 +60,7 @@ var const_default = (params) => {
|
|
|
59
60
|
status: import_const.StatusEnum.Loading,
|
|
60
61
|
steps: [],
|
|
61
62
|
render: true,
|
|
63
|
+
client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
|
|
62
64
|
custom: other ? { ...other, list: [], step: 1 /* Free */ } : { list: [], step: 1 /* Free */ },
|
|
63
65
|
...typeof net !== "undefined" ? { net } : {},
|
|
64
66
|
...typeof number !== "undefined" ? { number } : {},
|
|
@@ -44,7 +44,7 @@ var Max4004 = 1;
|
|
|
44
44
|
var useFail = () => {
|
|
45
45
|
const dispatch = (0, import_store.useDispatch)();
|
|
46
46
|
const { custom } = (0, import_store.useContextData)();
|
|
47
|
-
const { modeRef } = (0, import_hooks.useStoreRef)();
|
|
47
|
+
const { modeRef, clientRef } = (0, import_hooks.useStoreRef)();
|
|
48
48
|
const ref = (0, import_react.useRef)((custom == null ? void 0 : custom.retry) || 0);
|
|
49
49
|
(0, import_react.useEffect)(() => {
|
|
50
50
|
ref.current = (custom == null ? void 0 : custom.retry) || 0;
|
|
@@ -135,6 +135,23 @@ var useFail = () => {
|
|
|
135
135
|
}
|
|
136
136
|
if (code === import_const.PayStatus.Timeout) {
|
|
137
137
|
if (isMark) {
|
|
138
|
+
if (clientRef.current === import_const.ClientEnum.User) {
|
|
139
|
+
dispatch(
|
|
140
|
+
(0, import_store.updateCustom)({
|
|
141
|
+
failCustom: {
|
|
142
|
+
isPosNetworkError: true,
|
|
143
|
+
status: "warn",
|
|
144
|
+
fail: null,
|
|
145
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.timedout.title"),
|
|
146
|
+
warn: import_utils.locales.getText(
|
|
147
|
+
"page.eftpos-pay.text.transaction.eftpos.fail.other"
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
);
|
|
152
|
+
dispatch((0, import_store.updateComponent)("FailCustom"));
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
138
155
|
dispatch(
|
|
139
156
|
(0, import_store.updateState)({
|
|
140
157
|
manual: {
|
|
@@ -211,7 +228,7 @@ var useFail = () => {
|
|
|
211
228
|
status: "warn",
|
|
212
229
|
fail: null,
|
|
213
230
|
title: import_utils.locales.getText("page.eftpos-pay.text.interrupted"),
|
|
214
|
-
warn: `${import_utils.locales.getText(
|
|
231
|
+
warn: clientRef.current === import_const.ClientEnum.Merchant ? `${import_utils.locales.getText(
|
|
215
232
|
"page.eftpos-pay.text.transaction.eftpos.fail.title"
|
|
216
233
|
)}
|
|
217
234
|
${import_utils.locales.getText(
|
|
@@ -225,31 +242,9 @@ ${import_utils.locales.getText(
|
|
|
225
242
|
)}
|
|
226
243
|
${import_utils.locales.getText(
|
|
227
244
|
"page.eftpos-pay.text.transaction.eftpos.fail.if"
|
|
228
|
-
)(modeRef.current)}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
// <>
|
|
232
|
-
// {locales.getText(
|
|
233
|
-
// 'page.eftpos-pay.text.transaction.eftpos.fail.title'
|
|
234
|
-
// )}
|
|
235
|
-
// <br />
|
|
236
|
-
// {locales.getText(
|
|
237
|
-
// 'page.eftpos-pay.text.transaction.eftpos.fail.power'
|
|
238
|
-
// )}
|
|
239
|
-
// . <br />
|
|
240
|
-
// {locales.getText(
|
|
241
|
-
// 'page.eftpos-pay.text.transaction.eftpos.fail.device'
|
|
242
|
-
// )}
|
|
243
|
-
// <br />
|
|
244
|
-
// {locales.getText(
|
|
245
|
-
// 'page.eftpos-pay.text.transaction.eftpos.fail.network'
|
|
246
|
-
// )}
|
|
247
|
-
// <br />
|
|
248
|
-
// {locales.getText(
|
|
249
|
-
// 'page.eftpos-pay.text.transaction.eftpos.fail.if'
|
|
250
|
-
// )(modeRef.current)}
|
|
251
|
-
// </>
|
|
252
|
-
// ),
|
|
245
|
+
)(modeRef.current)}` : import_utils.locales.getText(
|
|
246
|
+
"page.eftpos-pay.text.transaction.eftpos.fail.other"
|
|
247
|
+
)
|
|
253
248
|
}
|
|
254
249
|
})
|
|
255
250
|
);
|
|
@@ -331,7 +326,7 @@ var useValidate = (check, num, onChange) => {
|
|
|
331
326
|
const failRef = (0, import_react.useRef)(fail);
|
|
332
327
|
const ref = (0, import_react.useRef)();
|
|
333
328
|
const { custom } = (0, import_store.useContextData)();
|
|
334
|
-
const { netRef, payRef, numRef, modeRef } = (0, import_hooks.useStoreRef)();
|
|
329
|
+
const { netRef, payRef, numRef, modeRef, clientRef } = (0, import_hooks.useStoreRef)();
|
|
335
330
|
const stepRef = (0, import_react.useRef)(custom == null ? void 0 : custom.step);
|
|
336
331
|
const listRef = (0, import_react.useRef)(custom == null ? void 0 : custom.list);
|
|
337
332
|
(0, import_react.useEffect)(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.189",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/
|
|
63
|
+
"@pisell/materials": "3.0.53",
|
|
64
64
|
"@pisell/date-picker": "1.0.100",
|
|
65
|
-
"@pisell/
|
|
65
|
+
"@pisell/icon": "0.0.11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|