@pisell/private-materials 3.0.95 → 3.0.97
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +16 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -8
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +1 -2
- package/es/components/booking/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/eftpos/const.d.ts +38 -0
- package/es/components/eftpos/const.js +79 -0
- package/es/components/eftpos/device.d.ts +8 -0
- package/es/components/eftpos/device.js +30 -0
- package/es/components/eftpos/form/index.d.ts +16 -0
- package/es/components/eftpos/form/index.js +113 -0
- package/es/components/eftpos/index.d.ts +37 -0
- package/es/components/eftpos/index.js +274 -0
- package/es/components/eftpos/index.less +153 -0
- package/es/components/eftpos/locales.d.ts +75 -0
- package/es/components/eftpos/locales.js +98 -0
- package/es/components/eftpos/pos.d.ts +9 -0
- package/es/components/eftpos/pos.js +33 -0
- package/es/components/eftpos/surcharge/index.css +17 -0
- package/es/components/eftpos/surcharge/index.d.ts +8 -0
- package/es/components/eftpos/surcharge/index.js +111 -0
- package/es/components/eftpos/table.d.ts +17 -0
- package/es/components/eftpos/table.js +236 -0
- package/es/components/eftposPay/amount.d.ts +14 -0
- package/es/components/eftposPay/amount.js +253 -0
- package/es/components/eftposPay/component/alert/index.d.ts +6 -0
- package/es/components/eftposPay/component/alert/index.js +11 -0
- package/es/components/eftposPay/component/alert/index.less +29 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +3 -0
- package/es/components/eftposPay/component/alert/warn.js +45 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/es/components/eftposPay/component/fail/failCustom.js +95 -0
- package/es/components/eftposPay/component/fail/index.d.ts +4 -0
- package/es/components/eftposPay/component/fail/index.js +105 -0
- package/es/components/eftposPay/component/fail/network.d.ts +4 -0
- package/es/components/eftposPay/component/fail/network.js +48 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +4 -0
- package/es/components/eftposPay/component/fail/unknow.js +43 -0
- package/es/components/eftposPay/component/header/index.d.ts +9 -0
- package/es/components/eftposPay/component/header/index.js +66 -0
- package/es/components/eftposPay/component/header/index.less +44 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +13 -0
- package/es/components/eftposPay/component/header/titlebar.js +39 -0
- package/es/components/eftposPay/component/header/titlebar.less +17 -0
- package/es/components/eftposPay/component/manual/index.d.ts +5 -0
- package/es/components/eftposPay/component/manual/index.js +91 -0
- package/es/components/eftposPay/component/manual/index.less +96 -0
- package/es/components/eftposPay/component/signature/index.d.ts +4 -0
- package/es/components/eftposPay/component/signature/index.js +63 -0
- package/es/components/eftposPay/component/step/index.d.ts +12 -0
- package/es/components/eftposPay/component/step/index.js +31 -0
- package/es/components/eftposPay/component/step/step.d.ts +9 -0
- package/es/components/eftposPay/component/step/step.js +23 -0
- package/es/components/eftposPay/const.d.ts +131 -0
- package/es/components/eftposPay/const.js +48 -0
- package/es/components/eftposPay/device.d.ts +14 -0
- package/es/components/eftposPay/device.js +124 -0
- package/es/components/eftposPay/device.less +61 -0
- package/es/components/eftposPay/eftpos/config.d.ts +11 -0
- package/es/components/eftposPay/eftpos/config.js +178 -0
- package/es/components/eftposPay/eftpos/const.d.ts +10 -0
- package/es/components/eftposPay/eftpos/const.js +139 -0
- package/es/components/eftposPay/eftpos/index.d.ts +7 -0
- package/es/components/eftposPay/eftpos/index.js +35 -0
- package/es/components/eftposPay/helper.d.ts +3 -0
- package/es/components/eftposPay/helper.js +35 -0
- package/es/components/eftposPay/hooks.d.ts +4 -0
- package/es/components/eftposPay/hooks.js +153 -0
- package/es/components/eftposPay/index.d.ts +7 -0
- package/es/components/eftposPay/index.js +188 -0
- package/es/components/eftposPay/index.less +273 -0
- package/es/components/eftposPay/locales.d.ts +264 -0
- package/es/components/eftposPay/locales.js +384 -0
- package/es/components/eftposPay/manufacturer.d.ts +6 -0
- package/es/components/eftposPay/manufacturer.js +32 -0
- package/es/components/eftposPay/pay.d.ts +10 -0
- package/es/components/eftposPay/pay.js +108 -0
- package/es/components/eftposPay/payo/config.d.ts +11 -0
- package/es/components/eftposPay/payo/config.js +357 -0
- package/es/components/eftposPay/payo/const.d.ts +6 -0
- package/es/components/eftposPay/payo/const.js +93 -0
- package/es/components/eftposPay/payo/hooks.d.ts +5 -0
- package/es/components/eftposPay/payo/hooks.js +84 -0
- package/es/components/eftposPay/payo/index.d.ts +7 -0
- package/es/components/eftposPay/payo/index.js +35 -0
- package/es/components/eftposPay/store/index.d.ts +239 -0
- package/es/components/eftposPay/store/index.js +304 -0
- package/es/components/eftposPay/store/useThunkReducer.d.ts +9 -0
- package/es/components/eftposPay/store/useThunkReducer.js +31 -0
- package/es/components/eftposPay/windcave/action.d.ts +8 -0
- package/es/components/eftposPay/windcave/action.js +104 -0
- package/es/components/eftposPay/windcave/const.d.ts +104 -0
- package/es/components/eftposPay/windcave/const.js +253 -0
- package/es/components/eftposPay/windcave/helper.d.ts +9 -0
- package/es/components/eftposPay/windcave/helper.js +314 -0
- package/es/components/eftposPay/windcave/hook.d.ts +14 -0
- package/es/components/eftposPay/windcave/hook.js +144 -0
- package/es/components/eftposPay/windcave/index.d.ts +8 -0
- package/es/components/eftposPay/windcave/index.js +49 -0
- package/es/components/eftposPay/windcave/pos.d.ts +8 -0
- package/es/components/eftposPay/windcave/pos.js +180 -0
- package/es/components/eftposPay/windcave/pwd.d.ts +8 -0
- package/es/components/eftposPay/windcave/pwd.js +124 -0
- package/es/components/eftposPay/windcave/receipet.d.ts +6 -0
- package/es/components/eftposPay/windcave/receipet.js +67 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +11 -0
- package/es/components/eftposPay/windcave/receiptAction.js +326 -0
- package/es/components/eftposPay/windcave/timer.d.ts +17 -0
- package/es/components/eftposPay/windcave/timer.js +181 -0
- package/es/components/eftposPay/windcave/wait.d.ts +12 -0
- package/es/components/eftposPay/windcave/wait.js +139 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/es/components/eftposPay/windcave/windcave.js +283 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/hooks/usePrefix.d.ts +1 -0
- package/es/hooks/usePrefix.js +10 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +1 -2
- package/lib/components/booking/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/eftpos/const.d.ts +38 -0
- package/lib/components/eftpos/const.js +108 -0
- package/lib/components/eftpos/device.d.ts +8 -0
- package/lib/components/eftpos/device.js +55 -0
- package/lib/components/eftpos/form/index.d.ts +16 -0
- package/lib/components/eftpos/form/index.js +124 -0
- package/lib/components/eftpos/index.d.ts +37 -0
- package/lib/components/eftpos/index.js +279 -0
- package/lib/components/eftpos/index.less +153 -0
- package/lib/components/eftpos/locales.d.ts +75 -0
- package/lib/components/eftpos/locales.js +116 -0
- package/lib/components/eftpos/pos.d.ts +9 -0
- package/lib/components/eftpos/pos.js +55 -0
- package/lib/components/eftpos/surcharge/index.css +17 -0
- package/lib/components/eftpos/surcharge/index.d.ts +8 -0
- package/lib/components/eftpos/surcharge/index.js +125 -0
- package/lib/components/eftpos/table.d.ts +17 -0
- package/lib/components/eftpos/table.js +235 -0
- package/lib/components/eftposPay/amount.d.ts +14 -0
- package/lib/components/eftposPay/amount.js +239 -0
- package/lib/components/eftposPay/component/alert/index.d.ts +6 -0
- package/lib/components/eftposPay/component/alert/index.js +38 -0
- package/lib/components/eftposPay/component/alert/index.less +29 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +3 -0
- package/lib/components/eftposPay/component/alert/warn.js +80 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +117 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/index.js +121 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/network.js +65 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/unknow.js +72 -0
- package/lib/components/eftposPay/component/header/index.d.ts +9 -0
- package/lib/components/eftposPay/component/header/index.js +92 -0
- package/lib/components/eftposPay/component/header/index.less +44 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +13 -0
- package/lib/components/eftposPay/component/header/titlebar.js +55 -0
- package/lib/components/eftposPay/component/header/titlebar.less +17 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +5 -0
- package/lib/components/eftposPay/component/manual/index.js +101 -0
- package/lib/components/eftposPay/component/manual/index.less +96 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +4 -0
- package/lib/components/eftposPay/component/signature/index.js +80 -0
- package/lib/components/eftposPay/component/step/index.d.ts +12 -0
- package/lib/components/eftposPay/component/step/index.js +71 -0
- package/lib/components/eftposPay/component/step/step.d.ts +9 -0
- package/lib/components/eftposPay/component/step/step.js +59 -0
- package/lib/components/eftposPay/const.d.ts +131 -0
- package/lib/components/eftposPay/const.js +86 -0
- package/lib/components/eftposPay/device.d.ts +14 -0
- package/lib/components/eftposPay/device.js +127 -0
- package/lib/components/eftposPay/device.less +61 -0
- package/lib/components/eftposPay/eftpos/config.d.ts +11 -0
- package/lib/components/eftposPay/eftpos/config.js +199 -0
- package/lib/components/eftposPay/eftpos/const.d.ts +10 -0
- package/lib/components/eftposPay/eftpos/const.js +165 -0
- package/lib/components/eftposPay/eftpos/index.d.ts +7 -0
- package/lib/components/eftposPay/eftpos/index.js +66 -0
- package/lib/components/eftposPay/helper.d.ts +3 -0
- package/lib/components/eftposPay/helper.js +62 -0
- package/lib/components/eftposPay/hooks.d.ts +4 -0
- package/lib/components/eftposPay/hooks.js +237 -0
- package/lib/components/eftposPay/index.d.ts +7 -0
- package/lib/components/eftposPay/index.js +189 -0
- package/lib/components/eftposPay/index.less +273 -0
- package/lib/components/eftposPay/locales.d.ts +264 -0
- package/lib/components/eftposPay/locales.js +304 -0
- package/lib/components/eftposPay/manufacturer.d.ts +6 -0
- package/lib/components/eftposPay/manufacturer.js +77 -0
- package/lib/components/eftposPay/pay.d.ts +10 -0
- package/lib/components/eftposPay/pay.js +120 -0
- package/lib/components/eftposPay/payo/config.d.ts +11 -0
- package/lib/components/eftposPay/payo/config.js +377 -0
- package/lib/components/eftposPay/payo/const.d.ts +6 -0
- package/lib/components/eftposPay/payo/const.js +112 -0
- package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
- package/lib/components/eftposPay/payo/hooks.js +80 -0
- package/lib/components/eftposPay/payo/index.d.ts +7 -0
- package/lib/components/eftposPay/payo/index.js +63 -0
- package/lib/components/eftposPay/store/index.d.ts +239 -0
- package/lib/components/eftposPay/store/index.js +371 -0
- package/lib/components/eftposPay/store/useThunkReducer.d.ts +9 -0
- package/lib/components/eftposPay/store/useThunkReducer.js +53 -0
- package/lib/components/eftposPay/windcave/action.d.ts +8 -0
- package/lib/components/eftposPay/windcave/action.js +143 -0
- package/lib/components/eftposPay/windcave/const.d.ts +104 -0
- package/lib/components/eftposPay/windcave/const.js +300 -0
- package/lib/components/eftposPay/windcave/helper.d.ts +9 -0
- package/lib/components/eftposPay/windcave/helper.js +378 -0
- package/lib/components/eftposPay/windcave/hook.d.ts +14 -0
- package/lib/components/eftposPay/windcave/hook.js +139 -0
- package/lib/components/eftposPay/windcave/index.d.ts +8 -0
- package/lib/components/eftposPay/windcave/index.js +78 -0
- package/lib/components/eftposPay/windcave/pos.d.ts +8 -0
- package/lib/components/eftposPay/windcave/pos.js +197 -0
- package/lib/components/eftposPay/windcave/pwd.d.ts +8 -0
- package/lib/components/eftposPay/windcave/pwd.js +143 -0
- package/lib/components/eftposPay/windcave/receipet.d.ts +6 -0
- package/lib/components/eftposPay/windcave/receipet.js +93 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +11 -0
- package/lib/components/eftposPay/windcave/receiptAction.js +386 -0
- package/lib/components/eftposPay/windcave/timer.d.ts +17 -0
- package/lib/components/eftposPay/windcave/timer.js +126 -0
- package/lib/components/eftposPay/windcave/wait.d.ts +12 -0
- package/lib/components/eftposPay/windcave/wait.js +163 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/lib/components/eftposPay/windcave/windcave.js +283 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/hooks/usePrefix.d.ts +1 -0
- package/lib/hooks/usePrefix.js +44 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/eftpos/meta.ts +187 -0
- package/lowcode/eftpos-pay/meta.ts +122 -0
- package/package.json +4 -3
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/component/fail/failCustom.tsx
|
|
30
|
+
var failCustom_exports = {};
|
|
31
|
+
__export(failCustom_exports, {
|
|
32
|
+
default: () => failCustom_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(failCustom_exports);
|
|
35
|
+
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_const = require("../../const");
|
|
39
|
+
var import_manufacturer = require("../../manufacturer");
|
|
40
|
+
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
41
|
+
var import_store = require("../../store");
|
|
42
|
+
var import_header = __toESM(require("../header"));
|
|
43
|
+
var failCustom_default = ({ className = "", onChange }) => {
|
|
44
|
+
const { eftpos, custom, mode } = (0, import_store.useContextData)();
|
|
45
|
+
const failCustom = custom == null ? void 0 : custom.failCustom;
|
|
46
|
+
const dispatch = (0, import_store.useDispatch)();
|
|
47
|
+
const onRetry = () => {
|
|
48
|
+
onChange("page", "pay");
|
|
49
|
+
dispatch(
|
|
50
|
+
(0, import_store.updateState)(
|
|
51
|
+
(0, import_manufacturer.getInitState)(
|
|
52
|
+
eftpos,
|
|
53
|
+
mode === import_const.ModeEnum.Query ? { ...custom, isPay: true } : { ...custom, number: void 0, isPay: false }
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
const onModify = () => {
|
|
59
|
+
dispatch(
|
|
60
|
+
(0, import_store.updateState)(
|
|
61
|
+
(0, import_manufacturer.getInitState)(eftpos, { ...custom, number: void 0, isPay: false })
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
onChange("page", "amount");
|
|
65
|
+
};
|
|
66
|
+
const onManually = () => {
|
|
67
|
+
dispatch(
|
|
68
|
+
(0, import_store.updateState)({
|
|
69
|
+
manual: {
|
|
70
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.request.title")(mode),
|
|
71
|
+
text: import_utils.locales.getText("page.eftpos-pay.text.request.text")(mode)
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
);
|
|
75
|
+
dispatch((0, import_store.updateComponent)("Manual"));
|
|
76
|
+
};
|
|
77
|
+
const onClose = () => {
|
|
78
|
+
onChange("fail");
|
|
79
|
+
};
|
|
80
|
+
(0, import_react.useEffect)(() => {
|
|
81
|
+
onChange("page", "fail");
|
|
82
|
+
}, []);
|
|
83
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: failCustom.status }, (failCustom == null ? void 0 : failCustom.status) === "fail" ? /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
+
import_XClose.default,
|
|
85
|
+
{
|
|
86
|
+
size: 20,
|
|
87
|
+
style: { fontSize: "24px", position: "absolute", top: 0, right: 0 },
|
|
88
|
+
onClick: onClose
|
|
89
|
+
}
|
|
90
|
+
) : null), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, failCustom.title || import_utils.locales.getText("page.eftpos-pay.text.failed")(mode)), (failCustom == null ? void 0 : failCustom.status) === "fail" ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-text pisell-lowcode__eft-pay-body" }, failCustom == null ? void 0 : failCustom.fail) : (failCustom == null ? void 0 : failCustom.status) === "warn" ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, failCustom == null ? void 0 : failCustom.warn) : null, (failCustom == null ? void 0 : failCustom.isPosNetworkError) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
91
|
+
import_antd.Button,
|
|
92
|
+
{
|
|
93
|
+
block: true,
|
|
94
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
95
|
+
onClick: onManually
|
|
96
|
+
},
|
|
97
|
+
import_utils.locales.getText("page.eftpos-pay.text.manual.marking")
|
|
98
|
+
)) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
+
import_antd.Button,
|
|
100
|
+
{
|
|
101
|
+
block: true,
|
|
102
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
103
|
+
onClick: onRetry
|
|
104
|
+
},
|
|
105
|
+
import_utils.locales.getText("page.eftpos-pay.text.retry")
|
|
106
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
107
|
+
import_antd.Button,
|
|
108
|
+
{
|
|
109
|
+
block: true,
|
|
110
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
111
|
+
type: "primary",
|
|
112
|
+
onClick: onModify,
|
|
113
|
+
disabled: mode !== import_const.ModeEnum.Pay
|
|
114
|
+
},
|
|
115
|
+
import_utils.locales.getText("page.eftpos-pay.text.modify.payment.info")(mode)
|
|
116
|
+
)));
|
|
117
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/component/fail/index.tsx
|
|
30
|
+
var fail_exports = {};
|
|
31
|
+
__export(fail_exports, {
|
|
32
|
+
default: () => fail_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(fail_exports);
|
|
35
|
+
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
39
|
+
var import_manufacturer = require("../../manufacturer");
|
|
40
|
+
var import_store = require("../../store");
|
|
41
|
+
var import_header = __toESM(require("../header"));
|
|
42
|
+
var fail_default = ({ onChange, className = "" }) => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const { eftpos, step, steps, custom, mode } = (0, import_store.useContextData)();
|
|
45
|
+
const isPosNetworkError = ((_b = (_a = steps[step]) == null ? void 0 : _a.custom) == null ? void 0 : _b.isPosNetworkError) || false;
|
|
46
|
+
const dispatch = (0, import_store.useDispatch)();
|
|
47
|
+
const onRetry = () => {
|
|
48
|
+
onChange("page", "pay");
|
|
49
|
+
dispatch(
|
|
50
|
+
(0, import_store.updateState)((0, import_manufacturer.getInitState)(eftpos, { ...custom, number: void 0 }))
|
|
51
|
+
);
|
|
52
|
+
dispatch(
|
|
53
|
+
(0, import_store.updateCustomStemItem)({
|
|
54
|
+
custom: { status: void 0 },
|
|
55
|
+
step
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
const onModify = () => {
|
|
60
|
+
dispatch(
|
|
61
|
+
(0, import_store.updateState)((0, import_manufacturer.getInitState)(eftpos, { ...custom, number: void 0 }))
|
|
62
|
+
);
|
|
63
|
+
dispatch(
|
|
64
|
+
(0, import_store.updateCustomStemItem)({
|
|
65
|
+
custom: { status: void 0 },
|
|
66
|
+
step
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
onChange("page", "amount");
|
|
70
|
+
};
|
|
71
|
+
const onManually = () => {
|
|
72
|
+
dispatch(
|
|
73
|
+
(0, import_store.updateState)({
|
|
74
|
+
manual: {
|
|
75
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.timedout.title"),
|
|
76
|
+
text: import_utils.locales.getText("page.eftpos-pay.text.timedout.text")(mode)
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
);
|
|
80
|
+
dispatch((0, import_store.updateComponent)("Manual"));
|
|
81
|
+
};
|
|
82
|
+
const onClose = () => {
|
|
83
|
+
onChange("fail");
|
|
84
|
+
};
|
|
85
|
+
(0, import_react.useEffect)(() => {
|
|
86
|
+
onChange("page", "fail");
|
|
87
|
+
}, []);
|
|
88
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: steps[step].status }, steps[step].status === "fail" ? /* @__PURE__ */ import_react.default.createElement(
|
|
89
|
+
import_XClose.default,
|
|
90
|
+
{
|
|
91
|
+
size: 20,
|
|
92
|
+
style: { fontSize: "24px", position: "absolute", top: 0, right: 0 },
|
|
93
|
+
onClick: onClose
|
|
94
|
+
}
|
|
95
|
+
) : null), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, steps[step].title || import_utils.locales.getText("page.eftpos-pay.text.failed")(mode)), steps[step].status === "fail" ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-text pisell-lowcode__eft-pay-body" }, steps[step].fail) : steps[step].status === "warn" ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, steps[step].warn) : null, isPosNetworkError ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
import_antd.Button,
|
|
97
|
+
{
|
|
98
|
+
block: true,
|
|
99
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
100
|
+
onClick: onManually
|
|
101
|
+
},
|
|
102
|
+
import_utils.locales.getText("page.eftpos-pay.text.manual.marking")
|
|
103
|
+
)) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
104
|
+
import_antd.Button,
|
|
105
|
+
{
|
|
106
|
+
block: true,
|
|
107
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
108
|
+
onClick: onRetry
|
|
109
|
+
},
|
|
110
|
+
import_utils.locales.getText("page.eftpos-pay.text.retry")
|
|
111
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
import_antd.Button,
|
|
113
|
+
{
|
|
114
|
+
block: true,
|
|
115
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
116
|
+
type: "primary",
|
|
117
|
+
onClick: onModify
|
|
118
|
+
},
|
|
119
|
+
import_utils.locales.getText("page.eftpos-pay.text.modify.payment.info")(mode)
|
|
120
|
+
)));
|
|
121
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/component/fail/network.tsx
|
|
30
|
+
var network_exports = {};
|
|
31
|
+
__export(network_exports, {
|
|
32
|
+
default: () => network_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(network_exports);
|
|
35
|
+
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_header = __toESM(require("../header"));
|
|
39
|
+
var network_default = ({ className = "" }) => {
|
|
40
|
+
const [hasBtn, setBtn] = (0, import_react.useState)(false);
|
|
41
|
+
(0, import_react.useEffect)(() => {
|
|
42
|
+
const clear = setTimeout(() => {
|
|
43
|
+
setBtn(true);
|
|
44
|
+
}, 1e3);
|
|
45
|
+
return () => {
|
|
46
|
+
clearTimeout(clear);
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
49
|
+
const onReconnect = () => {
|
|
50
|
+
import_antd.message.open({
|
|
51
|
+
key: "net-warning",
|
|
52
|
+
type: "loading",
|
|
53
|
+
content: import_utils.locales.getText("page.eftpos-pay.text.reconnecting")
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: "warn" }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, import_utils.locales.getText("page.eftpos-pay.text.network.disconnected")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, import_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.title"), " ", /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.connection"), /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.router"), /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.waiting.wifi.forget.reconnect")), hasBtn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
57
|
+
import_antd.Button,
|
|
58
|
+
{
|
|
59
|
+
block: true,
|
|
60
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
61
|
+
onClick: onReconnect
|
|
62
|
+
},
|
|
63
|
+
import_utils.locales.getText("page.eftpos-pay.text.reconnect.network")
|
|
64
|
+
)) : null);
|
|
65
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/component/fail/unknow.tsx
|
|
30
|
+
var unknow_exports = {};
|
|
31
|
+
__export(unknow_exports, {
|
|
32
|
+
default: () => unknow_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(unknow_exports);
|
|
35
|
+
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_store = require("../../store");
|
|
39
|
+
var import_header = __toESM(require("../header"));
|
|
40
|
+
var unknow_default = ({ className = "" }) => {
|
|
41
|
+
const { lastComponent, mode } = (0, import_store.useContextData)();
|
|
42
|
+
const dispatch = (0, import_store.useDispatch)();
|
|
43
|
+
const onManually = () => {
|
|
44
|
+
dispatch(
|
|
45
|
+
(0, import_store.updateState)({
|
|
46
|
+
manual: {
|
|
47
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.request.unknown.title")(
|
|
48
|
+
mode
|
|
49
|
+
),
|
|
50
|
+
text: import_utils.locales.getText("page.eftpos-pay.text.request.unknown.text")(
|
|
51
|
+
mode
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
);
|
|
56
|
+
dispatch((0, import_store.updateComponent)("Manual"));
|
|
57
|
+
};
|
|
58
|
+
(0, import_react.useEffect)(() => {
|
|
59
|
+
if (lastComponent === "Network") {
|
|
60
|
+
dispatch((0, import_store.updateComponent)(""));
|
|
61
|
+
}
|
|
62
|
+
}, [lastComponent]);
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: "warn" }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-fail-title" }, import_utils.locales.getText("page.eftpos-pay.text.unknown.title")(mode)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body" }, import_utils.locales.getText("page.eftpos-pay.text.unknown.text")(mode)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
+
import_antd.Button,
|
|
65
|
+
{
|
|
66
|
+
block: true,
|
|
67
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
68
|
+
onClick: onManually
|
|
69
|
+
},
|
|
70
|
+
import_utils.locales.getText("page.eftpos-pay.text.manual.marking")
|
|
71
|
+
)));
|
|
72
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StatusType } from '../../const';
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare const _default: ({ status, title, children }: {
|
|
5
|
+
status: StatusType;
|
|
6
|
+
title?: string | undefined;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}) => React.JSX.Element;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/component/header/index.tsx
|
|
30
|
+
var header_exports = {};
|
|
31
|
+
__export(header_exports, {
|
|
32
|
+
default: () => header_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(header_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_usePrefix = __toESM(require("../../../../hooks/usePrefix"));
|
|
37
|
+
var import_const = require("../../const");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var Icon = ({ status }) => {
|
|
40
|
+
const prefix = (0, import_usePrefix.default)();
|
|
41
|
+
if (status === import_const.StatusEnum.Loading) {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
style: { backgroundImage: `url(${prefix}/loading.png)` },
|
|
46
|
+
className: "pisell-lowcode__eft-pay-img pisell-lowcode__eft-pay-load"
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (status === import_const.StatusEnum.Success) {
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
style: { backgroundImage: `url(${prefix}/success.png)` },
|
|
55
|
+
className: "pisell-lowcode__eft-pay-img "
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
if (status === import_const.StatusEnum.Fail) {
|
|
60
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
style: { backgroundImage: `url(${prefix}/error.png)` },
|
|
64
|
+
className: "pisell-lowcode__eft-pay-img "
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
if (status === import_const.StatusEnum.Warn) {
|
|
69
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
style: { backgroundImage: `url(${prefix}/warn.png)` },
|
|
73
|
+
className: "pisell-lowcode__eft-pay-img "
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
if (status === import_const.StatusEnum.Question) {
|
|
78
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
style: { backgroundImage: `url(${prefix}/question.png)` },
|
|
82
|
+
className: "pisell-lowcode__eft-pay-img "
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
};
|
|
88
|
+
var header_default = ({
|
|
89
|
+
status,
|
|
90
|
+
title = "",
|
|
91
|
+
children
|
|
92
|
+
}) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-icon" }, /* @__PURE__ */ import_react.default.createElement(Icon, { status }), children), title ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-title" }, title) : null);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.pisell-lowcode__eft-pay-icon {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
height: 120px;
|
|
6
|
+
margin: 0 0 24px 0;
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
.pisell-lowcode__eft-pay-title {
|
|
11
|
+
color: var(--gray-900, #101828);
|
|
12
|
+
|
|
13
|
+
font-size: 18px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
line-height: 28px; /* 155.556% */
|
|
17
|
+
}
|
|
18
|
+
.pisell-lowcode__eft-pay-img {
|
|
19
|
+
width: 120px;
|
|
20
|
+
height: 120px;
|
|
21
|
+
background-repeat: no-repeat;
|
|
22
|
+
background-position: center;
|
|
23
|
+
background-size: contain;
|
|
24
|
+
}
|
|
25
|
+
.pisell-lowcode__eft-pay-load {
|
|
26
|
+
animation: spin 1s linear infinite;
|
|
27
|
+
}
|
|
28
|
+
// .pisell-lowcode__eft-pay-success{
|
|
29
|
+
|
|
30
|
+
// }
|
|
31
|
+
// .pisell-lowcode__eft-pay-warn{
|
|
32
|
+
|
|
33
|
+
// }
|
|
34
|
+
// .pisell-lowcode__eft-pay-fail{
|
|
35
|
+
|
|
36
|
+
// }
|
|
37
|
+
@keyframes spin {
|
|
38
|
+
from {
|
|
39
|
+
transform: rotate(0deg);
|
|
40
|
+
}
|
|
41
|
+
to {
|
|
42
|
+
transform: rotate(360deg);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './titlebar.less';
|
|
3
|
+
declare enum EPopupTitleBarVariantType {
|
|
4
|
+
BackTitleClose = "back-title-cancel",
|
|
5
|
+
LeftTitleClose = "left-title-close"
|
|
6
|
+
}
|
|
7
|
+
declare const _default: ({ type, children, onBack, onClose, }: {
|
|
8
|
+
type?: "back-title-cancel" | "left-title-close" | undefined;
|
|
9
|
+
children: string;
|
|
10
|
+
onBack?: (() => void) | undefined;
|
|
11
|
+
onClose?: (() => void) | undefined;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/component/header/titlebar.tsx
|
|
30
|
+
var titlebar_exports = {};
|
|
31
|
+
__export(titlebar_exports, {
|
|
32
|
+
default: () => titlebar_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(titlebar_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_titlebar = require("./titlebar.less");
|
|
37
|
+
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
38
|
+
var import_LeftOutlined = __toESM(require("@ant-design/icons/LeftOutlined"));
|
|
39
|
+
var titlebar_default = ({
|
|
40
|
+
type = "left-title-close" /* LeftTitleClose */,
|
|
41
|
+
children,
|
|
42
|
+
onBack,
|
|
43
|
+
onClose
|
|
44
|
+
}) => /* @__PURE__ */ import_react.default.createElement(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: "pisell-lowcode__eft-pay-header",
|
|
48
|
+
style: type === "left-title-close" /* LeftTitleClose */ ? { justifyContent: "space-between" } : type === "back-title-cancel" /* BackTitleClose */ ? {
|
|
49
|
+
justifyContent: "space-between"
|
|
50
|
+
} : {}
|
|
51
|
+
},
|
|
52
|
+
type === "back-title-cancel" /* BackTitleClose */ ? /* @__PURE__ */ import_react.default.createElement(import_LeftOutlined.default, { style: { fontSize: "24px" }, onClick: onBack }) : null,
|
|
53
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-header-title" }, children),
|
|
54
|
+
/* @__PURE__ */ import_react.default.createElement(import_XClose.default, { size: 20, style: { fontSize: "24px" }, onClick: onClose })
|
|
55
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.pisell-lowcode__eft-pay-header {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
padding: 24px 0 20px;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
}
|
|
8
|
+
.pisell-lowcode__eft-pay-header-title {
|
|
9
|
+
color: var(--gray-900, #101828);
|
|
10
|
+
|
|
11
|
+
/* Text lg/Semibold */
|
|
12
|
+
|
|
13
|
+
font-size: 18px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
line-height: 28px; /* 155.556% */
|
|
17
|
+
}
|