@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,108 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/eftpos/const.ts
|
|
20
|
+
var const_exports = {};
|
|
21
|
+
__export(const_exports, {
|
|
22
|
+
DeviceEnum: () => DeviceEnum,
|
|
23
|
+
Eftpos: () => Eftpos,
|
|
24
|
+
getCommByFields: () => getCommByFields,
|
|
25
|
+
getDefaultValue: () => getDefaultValue
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(const_exports);
|
|
28
|
+
var import_form = require("./form");
|
|
29
|
+
var Eftpos = /* @__PURE__ */ ((Eftpos2) => {
|
|
30
|
+
Eftpos2["Payo"] = "payo";
|
|
31
|
+
Eftpos2["Tyro"] = "tyro";
|
|
32
|
+
Eftpos2["Windcave"] = "windcave";
|
|
33
|
+
Eftpos2["Stripe"] = "stripe";
|
|
34
|
+
return Eftpos2;
|
|
35
|
+
})(Eftpos || {});
|
|
36
|
+
var DeviceEnum = /* @__PURE__ */ ((DeviceEnum2) => {
|
|
37
|
+
DeviceEnum2["Add"] = "add";
|
|
38
|
+
DeviceEnum2["Edit"] = "edit";
|
|
39
|
+
DeviceEnum2["Repair"] = "repair";
|
|
40
|
+
return DeviceEnum2;
|
|
41
|
+
})(DeviceEnum || {});
|
|
42
|
+
var getDefaultValue = (list) => {
|
|
43
|
+
return list.reduce((target, item) => {
|
|
44
|
+
if (Array.isArray(item.children) && item.children.length) {
|
|
45
|
+
return {
|
|
46
|
+
...target,
|
|
47
|
+
[item.__sourceName]: getDefaultValue(item.children)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (!item.Component) {
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
53
|
+
const ComponentName = item.Component;
|
|
54
|
+
if (import_form.helpMapping[ComponentName]) {
|
|
55
|
+
return {
|
|
56
|
+
...target,
|
|
57
|
+
...import_form.helpMapping[ComponentName].getCommDefaultVal(item)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
...target,
|
|
62
|
+
[item.__sourceName]: item.input.defaultValue
|
|
63
|
+
};
|
|
64
|
+
}, {});
|
|
65
|
+
};
|
|
66
|
+
function getCommByFields({
|
|
67
|
+
field,
|
|
68
|
+
value,
|
|
69
|
+
name = [],
|
|
70
|
+
getComm
|
|
71
|
+
}) {
|
|
72
|
+
return field.map((item) => {
|
|
73
|
+
if (typeof item === "string") {
|
|
74
|
+
const commConfig = getComm(
|
|
75
|
+
value ? { field: item, value: value[item] } : { field: item },
|
|
76
|
+
value
|
|
77
|
+
);
|
|
78
|
+
if (!commConfig) {
|
|
79
|
+
return void 0;
|
|
80
|
+
}
|
|
81
|
+
const ComponentName = commConfig.Component;
|
|
82
|
+
const helpFn = import_form.helpMapping[ComponentName];
|
|
83
|
+
if (helpFn) {
|
|
84
|
+
return helpFn.getCommName(commConfig, name);
|
|
85
|
+
}
|
|
86
|
+
commConfig.__sourceName = commConfig.name;
|
|
87
|
+
commConfig.name = name.length > 0 ? [...name, commConfig.name] : commConfig.name;
|
|
88
|
+
return commConfig;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
name: name.length > 0 ? [...name, item.name] : item.name,
|
|
92
|
+
__sourceName: item.name,
|
|
93
|
+
children: getCommByFields({
|
|
94
|
+
field: item.children,
|
|
95
|
+
value,
|
|
96
|
+
name: [...name || [], item.name],
|
|
97
|
+
getComm
|
|
98
|
+
})
|
|
99
|
+
};
|
|
100
|
+
}).filter(Boolean);
|
|
101
|
+
}
|
|
102
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
+
0 && (module.exports = {
|
|
104
|
+
DeviceEnum,
|
|
105
|
+
Eftpos,
|
|
106
|
+
getCommByFields,
|
|
107
|
+
getDefaultValue
|
|
108
|
+
});
|
|
@@ -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/eftpos/device.tsx
|
|
30
|
+
var device_exports = {};
|
|
31
|
+
__export(device_exports, {
|
|
32
|
+
default: () => device_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(device_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_const = require("./const");
|
|
39
|
+
var import_form = __toESM(require("./form"));
|
|
40
|
+
var Device = (props) => {
|
|
41
|
+
const { onSave, formItemList } = props;
|
|
42
|
+
const initialValues = (0, import_const.getDefaultValue)(formItemList);
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
import_antd.Form,
|
|
45
|
+
{
|
|
46
|
+
layout: "vertical",
|
|
47
|
+
onFinish: onSave,
|
|
48
|
+
initialValues,
|
|
49
|
+
className: "pisell-lowcode__pos-device"
|
|
50
|
+
},
|
|
51
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, overflow: "auto", padding: "0 0 60px 0" } }, /* @__PURE__ */ import_react.default.createElement(import_form.default, { formItemList })),
|
|
52
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { className: "pisell-lowcode__pos-device-btn" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { htmlType: "submit", block: true }, import_utils.locales.getText("page.eftpos.text.save")))
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
var device_default = Device;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const CustomFormItem: ({ formItemList, level, onChange, }: {
|
|
3
|
+
formItemList: any[];
|
|
4
|
+
level?: number | undefined;
|
|
5
|
+
onChange?: ((...agrn: unknown[]) => unknown) | undefined;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
export default CustomFormItem;
|
|
8
|
+
declare type helpMappingType = {
|
|
9
|
+
[key: string]: {
|
|
10
|
+
getCommName<T = any>(commConfig: T, name: string[]): T;
|
|
11
|
+
getCommDefaultVal: (commConfig: any) => {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const helpMapping: helpMappingType;
|
|
@@ -0,0 +1,124 @@
|
|
|
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/eftpos/form/index.tsx
|
|
30
|
+
var form_exports = {};
|
|
31
|
+
__export(form_exports, {
|
|
32
|
+
default: () => form_default,
|
|
33
|
+
helpMapping: () => helpMapping
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(form_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_surcharge = __toESM(require("../surcharge"));
|
|
39
|
+
var Mapping = {
|
|
40
|
+
Input: import_antd.Input,
|
|
41
|
+
InputNumber: import_antd.InputNumber,
|
|
42
|
+
Checkbox: import_antd.Checkbox,
|
|
43
|
+
"Checkbox.Group": import_antd.Checkbox.Group,
|
|
44
|
+
Radio: import_antd.Radio,
|
|
45
|
+
"Radio.Group": ({
|
|
46
|
+
direction,
|
|
47
|
+
options,
|
|
48
|
+
...props
|
|
49
|
+
}) => {
|
|
50
|
+
if (direction === "vertical") {
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Radio.Group, { ...props }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical" }, options == null ? void 0 : options.map((item) => {
|
|
52
|
+
if (typeof item === "object") {
|
|
53
|
+
const { label, value, ...other } = item;
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Radio, { ...other, value, key: `${item.value}` }, label);
|
|
55
|
+
}
|
|
56
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Radio, { value: item, key: `${item}` }, item);
|
|
57
|
+
})));
|
|
58
|
+
}
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Radio.Group, { ...props, options });
|
|
60
|
+
},
|
|
61
|
+
"Radio.Button": import_antd.Radio.Button,
|
|
62
|
+
Cascader: import_antd.Cascader,
|
|
63
|
+
DatePicker: import_antd.DatePicker,
|
|
64
|
+
Select: import_antd.Select,
|
|
65
|
+
Slider: import_antd.Slider,
|
|
66
|
+
Switch: import_antd.Switch,
|
|
67
|
+
TimePicker: import_antd.TimePicker,
|
|
68
|
+
Transfer: import_antd.Transfer,
|
|
69
|
+
TreeSelect: import_antd.TreeSelect,
|
|
70
|
+
Upload: import_antd.Upload
|
|
71
|
+
};
|
|
72
|
+
var CustomMapping = {
|
|
73
|
+
Surcharge: import_surcharge.default
|
|
74
|
+
};
|
|
75
|
+
var CustomFormItem = ({
|
|
76
|
+
formItemList,
|
|
77
|
+
level = 0,
|
|
78
|
+
onChange
|
|
79
|
+
}) => {
|
|
80
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, formItemList.map(({ __sourceName, Component, ...item }, index) => {
|
|
81
|
+
if (Array.isArray(item.children)) {
|
|
82
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
CustomFormItem,
|
|
84
|
+
{
|
|
85
|
+
formItemList: item.children,
|
|
86
|
+
onChange,
|
|
87
|
+
key: item.name ? item.name + level : Component + index + level,
|
|
88
|
+
level: level + 1
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (typeof Component === "object") {
|
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement(Component, { ...item, key: item.name + level });
|
|
94
|
+
}
|
|
95
|
+
if (Mapping[Component]) {
|
|
96
|
+
const Comm = Mapping[Component];
|
|
97
|
+
const { input, ...formItemProps } = item;
|
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { ...formItemProps, key: item.name + level }, /* @__PURE__ */ import_react.default.createElement(Comm, { ...input }));
|
|
99
|
+
}
|
|
100
|
+
if (Mapping[Component]) {
|
|
101
|
+
const Comm = Mapping[Component];
|
|
102
|
+
const { input, ...formItemProps } = item;
|
|
103
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { ...formItemProps, key: item.name + level }, /* @__PURE__ */ import_react.default.createElement(Comm, { ...input }));
|
|
104
|
+
}
|
|
105
|
+
if (CustomMapping[Component]) {
|
|
106
|
+
const Comm = CustomMapping[Component];
|
|
107
|
+
return /* @__PURE__ */ import_react.default.createElement(Comm, { ...item, key: item.name + level });
|
|
108
|
+
}
|
|
109
|
+
throw TypeError(
|
|
110
|
+
`pos物料库 输入组件类型 ${Component} 无法映射,请正确传入组件类型`
|
|
111
|
+
);
|
|
112
|
+
}));
|
|
113
|
+
};
|
|
114
|
+
var form_default = CustomFormItem;
|
|
115
|
+
var helpMapping = {
|
|
116
|
+
Surcharge: {
|
|
117
|
+
getCommName: import_surcharge.getCommName,
|
|
118
|
+
getCommDefaultVal: import_surcharge.getCommDefaultVal
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
122
|
+
0 && (module.exports = {
|
|
123
|
+
helpMapping
|
|
124
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Eftpos, DeviceStatus } from "./const";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
interface PosProps {
|
|
5
|
+
/** 厂商类型 */
|
|
6
|
+
type: Eftpos;
|
|
7
|
+
/** 厂商名称 */
|
|
8
|
+
name: string;
|
|
9
|
+
/** 编辑页面zIndex */
|
|
10
|
+
zIndex?: number;
|
|
11
|
+
/** table 列表宽度 */
|
|
12
|
+
tableSize: number[];
|
|
13
|
+
/** 获取字段匹配数据项 */
|
|
14
|
+
getComm: (params: {
|
|
15
|
+
field: string;
|
|
16
|
+
value?: unknown;
|
|
17
|
+
}, record?: any) => any;
|
|
18
|
+
/** 设备厂商默认数据 */
|
|
19
|
+
getField: (type: Eftpos, status?: DeviceStatus) => any;
|
|
20
|
+
/** 编辑设备数据 */
|
|
21
|
+
onEdit: (device: any, type: DeviceStatus) => Promise<any>;
|
|
22
|
+
/** 编辑厂商数据 */
|
|
23
|
+
onEditKey: () => {};
|
|
24
|
+
/** 设备列表数据 */
|
|
25
|
+
getList: (params: {
|
|
26
|
+
type: Eftpos;
|
|
27
|
+
num: number;
|
|
28
|
+
skip: number;
|
|
29
|
+
}) => any;
|
|
30
|
+
/** 删除列表数据 */
|
|
31
|
+
onDel: (id: string | number) => Promise<any>;
|
|
32
|
+
/** 获取pos刷卡机配置字段 */
|
|
33
|
+
getPosComm: (...agrn: unknown[]) => any;
|
|
34
|
+
savePos: (...agrn: unknown[]) => any;
|
|
35
|
+
}
|
|
36
|
+
declare const _default: (props: PosProps) => React.JSX.Element;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,279 @@
|
|
|
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/eftpos/index.tsx
|
|
30
|
+
var eftpos_exports = {};
|
|
31
|
+
__export(eftpos_exports, {
|
|
32
|
+
default: () => eftpos_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(eftpos_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var import_table = __toESM(require("./table"));
|
|
39
|
+
var import_device = __toESM(require("./device"));
|
|
40
|
+
var import_pos = __toESM(require("./pos"));
|
|
41
|
+
var import_drawer = __toESM(require("../booking/components/drawer"));
|
|
42
|
+
var import_locales = __toESM(require("./locales"));
|
|
43
|
+
var import_const = require("./const");
|
|
44
|
+
var import_index = require("./index.less");
|
|
45
|
+
var PosTabs = ({
|
|
46
|
+
Table: Table2,
|
|
47
|
+
PosForm,
|
|
48
|
+
style
|
|
49
|
+
}) => {
|
|
50
|
+
(0, import_react.useEffect)(() => {
|
|
51
|
+
document.body.id = "body";
|
|
52
|
+
}, []);
|
|
53
|
+
const [active, setActive] = (0, import_react.useState)(
|
|
54
|
+
import_utils.locales.getText("page.eftpos.text.device")
|
|
55
|
+
);
|
|
56
|
+
const onClick = (event) => {
|
|
57
|
+
const target = event.currentTarget;
|
|
58
|
+
if (!target) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const { key } = target.dataset;
|
|
62
|
+
key && setActive(key);
|
|
63
|
+
};
|
|
64
|
+
const items = [
|
|
65
|
+
{
|
|
66
|
+
key: import_utils.locales.getText("page.eftpos.text.device"),
|
|
67
|
+
label: (active2) => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_tabs-tab-label" }, /* @__PURE__ */ import_react.default.createElement(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
className: `pisell-lowcode__pos_circle ${active2 ? "active" : ""}`
|
|
71
|
+
}
|
|
72
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
"span",
|
|
74
|
+
{
|
|
75
|
+
className: `pisell-lowcode__pos_tabs-tab-label-tlt ${active2 ? "active" : ""}`
|
|
76
|
+
},
|
|
77
|
+
"device"
|
|
78
|
+
)),
|
|
79
|
+
children: Table2
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: "apiKey",
|
|
83
|
+
label: (active2) => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_tabs-tab-label" }, /* @__PURE__ */ import_react.default.createElement(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: `pisell-lowcode__pos_circle ${active2 ? "active" : ""}`
|
|
87
|
+
}
|
|
88
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
className: `pisell-lowcode__pos_tabs-tab-label-tlt ${active2 ? "active" : ""}`
|
|
92
|
+
},
|
|
93
|
+
"apiKey"
|
|
94
|
+
)),
|
|
95
|
+
children: PosForm
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_tabs", style }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_tabs-nav" }, items.map((item) => {
|
|
99
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
key: item.key,
|
|
103
|
+
style: {
|
|
104
|
+
display: "contents"
|
|
105
|
+
},
|
|
106
|
+
"data-key": item.key,
|
|
107
|
+
onClick
|
|
108
|
+
},
|
|
109
|
+
item.label(active === item.key)
|
|
110
|
+
);
|
|
111
|
+
})), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos_tab-content" }, items.map((item) => {
|
|
112
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
className: `pisell-lowcode__pos_tabs-tabpane ${active === item.key ? "active" : ""}`,
|
|
116
|
+
key: item.key
|
|
117
|
+
},
|
|
118
|
+
item.children
|
|
119
|
+
);
|
|
120
|
+
})));
|
|
121
|
+
};
|
|
122
|
+
import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
|
|
123
|
+
var eftpos_default = (props) => {
|
|
124
|
+
const {
|
|
125
|
+
name,
|
|
126
|
+
zIndex,
|
|
127
|
+
type = import_const.Eftpos.Payo,
|
|
128
|
+
tableSize,
|
|
129
|
+
getList,
|
|
130
|
+
getField,
|
|
131
|
+
getComm,
|
|
132
|
+
onDel,
|
|
133
|
+
onEdit,
|
|
134
|
+
getPosComm,
|
|
135
|
+
savePos
|
|
136
|
+
} = props;
|
|
137
|
+
const [page, setPage] = (0, import_react.useState)("list");
|
|
138
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
139
|
+
const [status, setStatus] = (0, import_react.useState)(import_const.DeviceEnum.Add);
|
|
140
|
+
const tableRef = (0, import_react.useRef)();
|
|
141
|
+
const deviceIdRef = (0, import_react.useRef)("");
|
|
142
|
+
const [deviceItemList, setDeviceCommList] = (0, import_react.useState)([]);
|
|
143
|
+
const [posItemList, setPosCommList] = (0, import_react.useState)([]);
|
|
144
|
+
const onDelDevice = (id) => {
|
|
145
|
+
return onDel(id);
|
|
146
|
+
};
|
|
147
|
+
const onEditDevice = (device) => {
|
|
148
|
+
if (!device) {
|
|
149
|
+
setStatus(import_const.DeviceEnum.Add);
|
|
150
|
+
const field = getField(type);
|
|
151
|
+
const list = (0, import_const.getCommByFields)({ field, getComm });
|
|
152
|
+
console.log(list);
|
|
153
|
+
setDeviceCommList(list);
|
|
154
|
+
} else {
|
|
155
|
+
deviceIdRef.current = device.id;
|
|
156
|
+
const field = getField(type, import_const.DeviceEnum.Edit);
|
|
157
|
+
const list = (0, import_const.getCommByFields)({ field, value: device, getComm });
|
|
158
|
+
setStatus(import_const.DeviceEnum.Edit);
|
|
159
|
+
setDeviceCommList(list);
|
|
160
|
+
}
|
|
161
|
+
setPage("edit");
|
|
162
|
+
};
|
|
163
|
+
const onRepair = (device) => {
|
|
164
|
+
const field = getField(type, import_const.DeviceEnum.Repair);
|
|
165
|
+
const list = (0, import_const.getCommByFields)({ field, value: device, getComm });
|
|
166
|
+
deviceIdRef.current = device.id;
|
|
167
|
+
setDeviceCommList(list);
|
|
168
|
+
setStatus(import_const.DeviceEnum.Repair);
|
|
169
|
+
setPage("edit");
|
|
170
|
+
};
|
|
171
|
+
const onSave = async (device) => {
|
|
172
|
+
setLoading(true);
|
|
173
|
+
await onEdit({ ...device, type }, status || "add").catch(() => {
|
|
174
|
+
setLoading(false);
|
|
175
|
+
});
|
|
176
|
+
setLoading(false);
|
|
177
|
+
await tableRef.current.loadData();
|
|
178
|
+
setPage("list");
|
|
179
|
+
};
|
|
180
|
+
const onSavePos = (pos) => {
|
|
181
|
+
if (typeof savePos === "function") {
|
|
182
|
+
savePos(pos);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const onBack = () => {
|
|
186
|
+
setPage("list");
|
|
187
|
+
};
|
|
188
|
+
(0, import_react.useEffect)(() => {
|
|
189
|
+
if (typeof getPosComm === "function") {
|
|
190
|
+
setPosCommList(getPosComm(type));
|
|
191
|
+
}
|
|
192
|
+
}, [type, getPosComm]);
|
|
193
|
+
(0, import_react.useEffect)(() => {
|
|
194
|
+
setPage("list");
|
|
195
|
+
}, [type]);
|
|
196
|
+
if (type === import_const.Eftpos.Stripe) {
|
|
197
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
198
|
+
PosTabs,
|
|
199
|
+
{
|
|
200
|
+
Table: /* @__PURE__ */ import_react.default.createElement(
|
|
201
|
+
import_table.default,
|
|
202
|
+
{
|
|
203
|
+
ref: tableRef,
|
|
204
|
+
eftposName: name,
|
|
205
|
+
type,
|
|
206
|
+
tableSize,
|
|
207
|
+
getList,
|
|
208
|
+
onDel: onDelDevice,
|
|
209
|
+
onRepair,
|
|
210
|
+
onEdit: onEditDevice,
|
|
211
|
+
key: `postable${type}`
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
PosForm: /* @__PURE__ */ import_react.default.createElement(
|
|
215
|
+
import_pos.default,
|
|
216
|
+
{
|
|
217
|
+
eftposName: name,
|
|
218
|
+
onSave: onSavePos,
|
|
219
|
+
formItemList: posItemList
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
}
|
|
223
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
224
|
+
import_drawer.default,
|
|
225
|
+
{
|
|
226
|
+
open: page === "edit",
|
|
227
|
+
onClose: onBack,
|
|
228
|
+
title: import_utils.locales.getText("page.eftpos.text.device.add")(status, name),
|
|
229
|
+
titleNoWrap: true,
|
|
230
|
+
zIndex: zIndex || 9999,
|
|
231
|
+
destroyOnClose: true,
|
|
232
|
+
className: "pisell-lowcode__pos_drawer"
|
|
233
|
+
},
|
|
234
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
235
|
+
import_antd.Spin,
|
|
236
|
+
{
|
|
237
|
+
tip: "Loading...",
|
|
238
|
+
spinning: loading,
|
|
239
|
+
wrapperClassName: "pisell-lowcode__pos_box"
|
|
240
|
+
},
|
|
241
|
+
/* @__PURE__ */ import_react.default.createElement(import_device.default, { formItemList: deviceItemList, onSave, key: `posdevice${type}` })
|
|
242
|
+
)
|
|
243
|
+
));
|
|
244
|
+
}
|
|
245
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
246
|
+
import_table.default,
|
|
247
|
+
{
|
|
248
|
+
eftposName: name,
|
|
249
|
+
ref: tableRef,
|
|
250
|
+
type,
|
|
251
|
+
tableSize,
|
|
252
|
+
getList,
|
|
253
|
+
onDel: onDelDevice,
|
|
254
|
+
onRepair,
|
|
255
|
+
onEdit: onEditDevice,
|
|
256
|
+
key: `table${type}`
|
|
257
|
+
}
|
|
258
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
259
|
+
import_drawer.default,
|
|
260
|
+
{
|
|
261
|
+
open: page === "edit",
|
|
262
|
+
onClose: onBack,
|
|
263
|
+
title: import_utils.locales.getText("page.eftpos.text.device.add")(status, name),
|
|
264
|
+
titleNoWrap: true,
|
|
265
|
+
zIndex: zIndex || 9999,
|
|
266
|
+
destroyOnClose: true,
|
|
267
|
+
className: "pisell-lowcode__pos_drawer"
|
|
268
|
+
},
|
|
269
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
270
|
+
import_antd.Spin,
|
|
271
|
+
{
|
|
272
|
+
tip: "Loading...",
|
|
273
|
+
spinning: loading,
|
|
274
|
+
wrapperClassName: "pisell-lowcode__pos_box"
|
|
275
|
+
},
|
|
276
|
+
/* @__PURE__ */ import_react.default.createElement(import_device.default, { formItemList: deviceItemList, onSave, key: `device${type}` })
|
|
277
|
+
)
|
|
278
|
+
));
|
|
279
|
+
};
|