@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,235 @@
|
|
|
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/table.tsx
|
|
30
|
+
var table_exports = {};
|
|
31
|
+
__export(table_exports, {
|
|
32
|
+
default: () => table_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(table_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_utils = require("@pisell/utils");
|
|
38
|
+
var { Column } = import_antd.Table;
|
|
39
|
+
var { Title, Text } = import_antd.Typography;
|
|
40
|
+
var App = ({
|
|
41
|
+
type,
|
|
42
|
+
eftposName,
|
|
43
|
+
tableSize,
|
|
44
|
+
getList,
|
|
45
|
+
onEdit,
|
|
46
|
+
onDel,
|
|
47
|
+
onRepair,
|
|
48
|
+
style
|
|
49
|
+
}, ref) => {
|
|
50
|
+
const size = (0, import_react.useMemo)(() => {
|
|
51
|
+
if (Array.isArray(tableSize)) {
|
|
52
|
+
return [
|
|
53
|
+
tableSize[0] || 200,
|
|
54
|
+
tableSize[1] || 120,
|
|
55
|
+
tableSize[2] || 120,
|
|
56
|
+
tableSize[3] || 240
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
return [200, 120, 120, 240];
|
|
60
|
+
}, [tableSize]);
|
|
61
|
+
const totalSize = (0, import_react.useMemo)(() => {
|
|
62
|
+
return size.reduce(
|
|
63
|
+
(accumulator, currentValue) => accumulator + currentValue,
|
|
64
|
+
0
|
|
65
|
+
);
|
|
66
|
+
}, [size]);
|
|
67
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
68
|
+
const deviceRef = (0, import_react.useRef)("");
|
|
69
|
+
const [pagination, setPagination] = (0, import_react.useState)({
|
|
70
|
+
pageSize: 10,
|
|
71
|
+
current: 1,
|
|
72
|
+
total: 0
|
|
73
|
+
});
|
|
74
|
+
const [data, setData] = (0, import_react.useState)([]);
|
|
75
|
+
const loadData = async (current) => {
|
|
76
|
+
if (typeof getList !== "function") {
|
|
77
|
+
return Promise.reject(`getList ${getList} is not function`);
|
|
78
|
+
}
|
|
79
|
+
setLoading(true);
|
|
80
|
+
const res = await getList({
|
|
81
|
+
type,
|
|
82
|
+
num: pagination.pageSize,
|
|
83
|
+
skip: typeof current === "number" ? current : pagination.current
|
|
84
|
+
}).catch((res2) => {
|
|
85
|
+
setLoading(false);
|
|
86
|
+
});
|
|
87
|
+
setLoading(false);
|
|
88
|
+
setPagination((p) => ({
|
|
89
|
+
...p,
|
|
90
|
+
total: res.data.count,
|
|
91
|
+
current: typeof current === "number" ? current : pagination.current
|
|
92
|
+
}));
|
|
93
|
+
setData(res.data.list);
|
|
94
|
+
};
|
|
95
|
+
(0, import_react.useEffect)(() => {
|
|
96
|
+
loadData(1);
|
|
97
|
+
}, []);
|
|
98
|
+
const onAddDevice = () => {
|
|
99
|
+
onEdit();
|
|
100
|
+
};
|
|
101
|
+
const onEditDevice = (device) => {
|
|
102
|
+
const { connection, setting, ...other } = device;
|
|
103
|
+
onEdit({
|
|
104
|
+
...other,
|
|
105
|
+
...connection || {},
|
|
106
|
+
...setting || {}
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
const onRepairDevice = (device) => {
|
|
110
|
+
const { connection, setting, ...other } = device;
|
|
111
|
+
onRepair({
|
|
112
|
+
...other,
|
|
113
|
+
...connection || {},
|
|
114
|
+
...setting || {}
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
const onDelDevice = (record) => {
|
|
118
|
+
deviceRef.current = record.id;
|
|
119
|
+
import_antd.Modal.confirm({
|
|
120
|
+
title: import_utils.locales.getText("page.eftpos.text.confim.delete"),
|
|
121
|
+
content: import_utils.locales.getText("page.eftpos.text.confirm_delete-message")(
|
|
122
|
+
record.name
|
|
123
|
+
),
|
|
124
|
+
okText: import_utils.locales.getText("page.eftpos.text.confim.delete"),
|
|
125
|
+
cancelText: import_utils.locales.getText("page.eftpos.text.confim.cancel"),
|
|
126
|
+
onOk
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
const onChangeSize = (num) => {
|
|
130
|
+
loadData(num);
|
|
131
|
+
};
|
|
132
|
+
const onOk = () => {
|
|
133
|
+
if (deviceRef.current) {
|
|
134
|
+
onDel(deviceRef.current).then(() => {
|
|
135
|
+
return loadData();
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
140
|
+
loadData
|
|
141
|
+
}));
|
|
142
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
143
|
+
"div",
|
|
144
|
+
{
|
|
145
|
+
className: "pisell-lowcode__pos-table",
|
|
146
|
+
style: {
|
|
147
|
+
...style || {}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
/* @__PURE__ */ import_react.default.createElement(Title, { level: 4, className: "pisell-lowcode__pos-title" }, eftposName, " ", import_utils.locales.getText("page.eftpos.text.device")),
|
|
151
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-table-act" }, /* @__PURE__ */ import_react.default.createElement(Text, null, import_utils.locales.getText("page.eftpos.text.device.list")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", onClick: onAddDevice }, import_utils.locales.getText("page.eftpos.text.device.add")())),
|
|
152
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
153
|
+
import_antd.Table,
|
|
154
|
+
{
|
|
155
|
+
dataSource: data,
|
|
156
|
+
rowKey: "id",
|
|
157
|
+
pagination: false,
|
|
158
|
+
loading,
|
|
159
|
+
bordered: true,
|
|
160
|
+
scroll: { y: "600px", x: totalSize + "px" },
|
|
161
|
+
tableLayout: "fixed"
|
|
162
|
+
},
|
|
163
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
164
|
+
Column,
|
|
165
|
+
{
|
|
166
|
+
title: import_utils.locales.getText("page.eftpos.text.table.name"),
|
|
167
|
+
dataIndex: "name",
|
|
168
|
+
key: "name",
|
|
169
|
+
width: size[0],
|
|
170
|
+
className: "pisell-lowcode__pos-table-col"
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
174
|
+
Column,
|
|
175
|
+
{
|
|
176
|
+
title: import_utils.locales.getText("page.eftpos.text.table.status"),
|
|
177
|
+
width: size[1],
|
|
178
|
+
dataIndex: "status",
|
|
179
|
+
key: "status",
|
|
180
|
+
render: (status) => {
|
|
181
|
+
return import_utils.locales.getText(
|
|
182
|
+
`page.eftpos.text.${status.toLocaleLowerCase()}`
|
|
183
|
+
);
|
|
184
|
+
},
|
|
185
|
+
className: "pisell-lowcode__pos-table-col"
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
189
|
+
Column,
|
|
190
|
+
{
|
|
191
|
+
title: import_utils.locales.getText("page.eftpos.text.table.surcharge"),
|
|
192
|
+
dataIndex: "setting",
|
|
193
|
+
key: "setting",
|
|
194
|
+
width: size[2],
|
|
195
|
+
render: (setting) => {
|
|
196
|
+
if (!setting) {
|
|
197
|
+
return /* @__PURE__ */ import_react.default.createElement(Text, null, "-");
|
|
198
|
+
}
|
|
199
|
+
const array = [
|
|
200
|
+
setting.constant_rate ? setting.constant_rate + "%" : "",
|
|
201
|
+
setting.constant_money
|
|
202
|
+
].filter(Boolean);
|
|
203
|
+
if (array.length === 0) {
|
|
204
|
+
return /* @__PURE__ */ import_react.default.createElement(Text, null, "-");
|
|
205
|
+
}
|
|
206
|
+
return /* @__PURE__ */ import_react.default.createElement(Text, null, setting.surcharge ? array.length > 1 ? array.join("+") : array[0] : "-");
|
|
207
|
+
},
|
|
208
|
+
className: "pisell-lowcode__pos-table-col"
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
212
|
+
Column,
|
|
213
|
+
{
|
|
214
|
+
title: import_utils.locales.getText("page.eftpos.text.table.opeartion"),
|
|
215
|
+
width: size[3],
|
|
216
|
+
key: "opeartion",
|
|
217
|
+
className: "pisell-lowcode__pos-table-col",
|
|
218
|
+
render: (record) => /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: "middle" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onRepairDevice(record) }, import_utils.locales.getText("page.eftpos.text.repair")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onEditDevice(record) }, import_utils.locales.getText("page.eftpos.text.edit")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: () => onDelDevice(record) }, import_utils.locales.getText("page.eftpos.text.delete")))
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
),
|
|
222
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
223
|
+
import_antd.Pagination,
|
|
224
|
+
{
|
|
225
|
+
style: { textAlign: "right" },
|
|
226
|
+
pageSize: pagination.pageSize,
|
|
227
|
+
current: pagination.current,
|
|
228
|
+
total: pagination.total,
|
|
229
|
+
onChange: onChangeSize,
|
|
230
|
+
onShowSizeChange: onChangeSize
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
);
|
|
234
|
+
};
|
|
235
|
+
var table_default = import_react.default.forwardRef(App);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PosProps } from './const';
|
|
3
|
+
declare const _default: ({ className, onChange, onClose, formatAmount, isIpad, net, }: {
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
onChange?: ((status: "page" | "success" | "fail", params?: string | {
|
|
6
|
+
[keys: string]: unknown;
|
|
7
|
+
} | undefined) => void) | undefined;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
formatAmount(amount: number | string, precision: number, symbol: string): string;
|
|
10
|
+
isIpad: boolean;
|
|
11
|
+
net: boolean;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export default _default;
|
|
14
|
+
export declare const limitDecimals: (value: any) => any;
|
|
@@ -0,0 +1,239 @@
|
|
|
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/amount.tsx
|
|
30
|
+
var amount_exports = {};
|
|
31
|
+
__export(amount_exports, {
|
|
32
|
+
default: () => amount_default,
|
|
33
|
+
limitDecimals: () => limitDecimals
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(amount_exports);
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_decimal = require("decimal.js");
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_alert = __toESM(require("./component/alert"));
|
|
41
|
+
var import_titlebar = __toESM(require("./component/header/titlebar"));
|
|
42
|
+
var import_manufacturer = require("./manufacturer");
|
|
43
|
+
var import_store = require("./store");
|
|
44
|
+
var amount_default = ({
|
|
45
|
+
className = "",
|
|
46
|
+
onChange,
|
|
47
|
+
onClose,
|
|
48
|
+
formatAmount = (number, precision, symbol) => `${symbol}${number}`,
|
|
49
|
+
isIpad,
|
|
50
|
+
net
|
|
51
|
+
}) => {
|
|
52
|
+
const dispatch = (0, import_store.useDispatch)();
|
|
53
|
+
const [status, setStatus] = (0, import_react.useState)(true);
|
|
54
|
+
const store = (0, import_store.useContextData)();
|
|
55
|
+
const {
|
|
56
|
+
name,
|
|
57
|
+
symbol,
|
|
58
|
+
money,
|
|
59
|
+
amount: lastMoney,
|
|
60
|
+
surRate,
|
|
61
|
+
surMoney
|
|
62
|
+
} = (0, import_manufacturer.getDeviceInfo)(store);
|
|
63
|
+
const [curSurRate, setSurRate] = (0, import_react.useState)(surRate);
|
|
64
|
+
const [curSurMoney, setSurMoney] = (0, import_react.useState)(surMoney);
|
|
65
|
+
const [currentMoney, setCurrentMoney] = (0, import_react.useState)(lastMoney);
|
|
66
|
+
const [tempSurRate, setTempSurRate] = (0, import_react.useState)(curSurRate);
|
|
67
|
+
const [tempSurMoney, setTempSurMoney] = (0, import_react.useState)(curSurMoney);
|
|
68
|
+
const surRateMoney = (0, import_react.useMemo)(() => {
|
|
69
|
+
const surRateDeci = new import_decimal.Decimal(curSurRate);
|
|
70
|
+
const moneyDeci = new import_decimal.Decimal(currentMoney);
|
|
71
|
+
return moneyDeci.mul(surRateDeci.div(100)).toFixed(2, import_decimal.Decimal.ROUND_HALF_UP);
|
|
72
|
+
}, [currentMoney, curSurRate]);
|
|
73
|
+
const totalSurMoney = (0, import_react.useMemo)(() => {
|
|
74
|
+
const surRateDeci = new import_decimal.Decimal(curSurRate);
|
|
75
|
+
const moneyDeci = new import_decimal.Decimal(currentMoney);
|
|
76
|
+
const surMoneyDeci = new import_decimal.Decimal(curSurMoney);
|
|
77
|
+
return moneyDeci.mul(surRateDeci.div(100)).add(surMoneyDeci).toFixed(2, import_decimal.Decimal.ROUND_HALF_UP);
|
|
78
|
+
}, [currentMoney, curSurRate, curSurMoney]);
|
|
79
|
+
const total = (0, import_react.useMemo)(() => {
|
|
80
|
+
const totalSurDeci = new import_decimal.Decimal(totalSurMoney);
|
|
81
|
+
const moneyDeci = new import_decimal.Decimal(currentMoney);
|
|
82
|
+
return totalSurDeci.add(moneyDeci).toFixed(2, import_decimal.Decimal.ROUND_HALF_UP);
|
|
83
|
+
}, [currentMoney, totalSurMoney]);
|
|
84
|
+
const subtracted = (0, import_react.useMemo)(() => {
|
|
85
|
+
const moneyDeci = new import_decimal.Decimal(money);
|
|
86
|
+
const currentMoneyDeci = new import_decimal.Decimal(currentMoney);
|
|
87
|
+
return moneyDeci.sub(currentMoneyDeci).toFixed(2, import_decimal.Decimal.ROUND_HALF_UP);
|
|
88
|
+
}, [currentMoney, money]);
|
|
89
|
+
const onBack = () => {
|
|
90
|
+
setStatus(true);
|
|
91
|
+
};
|
|
92
|
+
const onSubmit = () => {
|
|
93
|
+
if (!status) {
|
|
94
|
+
setStatus(true);
|
|
95
|
+
setSurRate(tempSurRate);
|
|
96
|
+
setSurMoney(tempSurMoney);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (!net) {
|
|
100
|
+
import_antd.message.open({
|
|
101
|
+
key: "net-warning",
|
|
102
|
+
type: "warning",
|
|
103
|
+
content: import_utils.locales.getText("page.eftpos-pay.text.not.connected")
|
|
104
|
+
});
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const rate = new import_decimal.Decimal(curSurRate).div(100).toFixed(4, import_decimal.Decimal.ROUND_HALF_UP);
|
|
108
|
+
const pay = {
|
|
109
|
+
sourceAmount: `${money}`,
|
|
110
|
+
amount: `${currentMoney}`,
|
|
111
|
+
surcharge: `${totalSurMoney}`,
|
|
112
|
+
total: `${total}`,
|
|
113
|
+
surPercentRate: `${rate}`,
|
|
114
|
+
surRate: `${curSurRate}`,
|
|
115
|
+
surMoney: `${curSurMoney}`,
|
|
116
|
+
surRateMoney: `${surRateMoney}`,
|
|
117
|
+
totalUnit: formatAmount(total, 2, symbol)
|
|
118
|
+
};
|
|
119
|
+
console.log("surRateMoney = ", surRateMoney);
|
|
120
|
+
dispatch(
|
|
121
|
+
(0, import_store.updateState)({
|
|
122
|
+
custom: store.custom ? { ...store.custom, pay } : { pay }
|
|
123
|
+
})
|
|
124
|
+
);
|
|
125
|
+
dispatch((0, import_store.updateComponent)(""));
|
|
126
|
+
onChange && onChange("page", "pay");
|
|
127
|
+
};
|
|
128
|
+
const onCancel = () => {
|
|
129
|
+
if (!status) {
|
|
130
|
+
setStatus(true);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
onClose();
|
|
134
|
+
};
|
|
135
|
+
const onEdit = () => {
|
|
136
|
+
setStatus(false);
|
|
137
|
+
setTempSurRate(curSurRate);
|
|
138
|
+
setTempSurMoney(curSurMoney);
|
|
139
|
+
};
|
|
140
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-amount ${className}` }, isIpad ? null : /* @__PURE__ */ import_react.default.createElement(
|
|
141
|
+
import_titlebar.default,
|
|
142
|
+
{
|
|
143
|
+
type: status ? "left-title-close" : "back-title-cancel",
|
|
144
|
+
onBack,
|
|
145
|
+
onClose
|
|
146
|
+
},
|
|
147
|
+
status ? name : import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.title")
|
|
148
|
+
), status ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
className: "pisell-lowcode__eft-pay-cash",
|
|
152
|
+
"data-money": formatAmount(money, 2, symbol)
|
|
153
|
+
},
|
|
154
|
+
import_utils.locales.getText("page.eftpos-pay.text.amount.to.pay")
|
|
155
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money-title" }, import_utils.locales.getText("page.eftpos-pay.text.input.title")(name)), /* @__PURE__ */ import_react.default.createElement(
|
|
156
|
+
import_antd.InputNumber,
|
|
157
|
+
{
|
|
158
|
+
addonBefore: symbol || "$",
|
|
159
|
+
max: money,
|
|
160
|
+
precision: 2,
|
|
161
|
+
min: 0,
|
|
162
|
+
style: { width: "100%" },
|
|
163
|
+
value: currentMoney,
|
|
164
|
+
formatter: limitDecimals,
|
|
165
|
+
parser: limitDecimals,
|
|
166
|
+
onChange: (event) => {
|
|
167
|
+
if (event !== null && event !== void 0) {
|
|
168
|
+
setCurrentMoney(event || 0);
|
|
169
|
+
} else {
|
|
170
|
+
setCurrentMoney(0);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money-tip" }, import_utils.locales.getText(
|
|
175
|
+
"page.eftpos-pay.text.amount.cash.left.pay.paid"
|
|
176
|
+
)(formatAmount(`${subtracted}`, 2, symbol)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-surcharge" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-details" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-total" }, import_utils.locales.getText(
|
|
177
|
+
"page.eftpos-pay.text.surcharge.edit.actual.pay"
|
|
178
|
+
), ":", formatAmount(`${total}`, 2, symbol)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money" }, import_utils.locales.getText(
|
|
179
|
+
"page.eftpos-pay.text.surcharge.edit.inc.surcharge"
|
|
180
|
+
), ": ", formatAmount(`${totalSurMoney}`, 2, symbol), " (", import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.rate"), ":", curSurRate, "% + ", formatAmount(`${curSurMoney}`, 2, symbol), ")")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: onEdit }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.surcharge")))) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(import_alert.default, null, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage-fixed")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-form" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item-title" }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage")), /* @__PURE__ */ import_react.default.createElement(
|
|
181
|
+
import_antd.InputNumber,
|
|
182
|
+
{
|
|
183
|
+
value: tempSurRate,
|
|
184
|
+
min: 0,
|
|
185
|
+
max: 100,
|
|
186
|
+
precision: 2,
|
|
187
|
+
addonAfter: "%",
|
|
188
|
+
style: { width: "100%" },
|
|
189
|
+
onChange: (e) => {
|
|
190
|
+
setTempSurRate(e || 0);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item-title" }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.fixed")), /* @__PURE__ */ import_react.default.createElement(
|
|
194
|
+
import_antd.InputNumber,
|
|
195
|
+
{
|
|
196
|
+
value: tempSurMoney,
|
|
197
|
+
min: 0,
|
|
198
|
+
max: 1e5,
|
|
199
|
+
precision: 2,
|
|
200
|
+
style: { width: "100%" },
|
|
201
|
+
addonBefore: symbol || "$",
|
|
202
|
+
onChange: (e) => {
|
|
203
|
+
setTempSurMoney(e || 0);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, /* @__PURE__ */ import_react.default.createElement(
|
|
207
|
+
import_antd.Button,
|
|
208
|
+
{
|
|
209
|
+
block: true,
|
|
210
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
211
|
+
onClick: onCancel
|
|
212
|
+
},
|
|
213
|
+
import_utils.locales.getText("page.eftpos-pay.text.cancel")
|
|
214
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
215
|
+
import_antd.Button,
|
|
216
|
+
{
|
|
217
|
+
block: true,
|
|
218
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
219
|
+
type: "primary",
|
|
220
|
+
onClick: onSubmit,
|
|
221
|
+
disabled: currentMoney <= 0 && status
|
|
222
|
+
},
|
|
223
|
+
import_utils.locales.getText("page.eftpos-pay.text.sure")
|
|
224
|
+
)));
|
|
225
|
+
};
|
|
226
|
+
var limitDecimals = (value) => {
|
|
227
|
+
const reg = /^(\-)*(\d+)\.(\d\d).*$/;
|
|
228
|
+
if (typeof value === "string") {
|
|
229
|
+
return !isNaN(Number(value)) ? value.replace(reg, "$1$2.$3") : "";
|
|
230
|
+
}
|
|
231
|
+
if (typeof value === "number") {
|
|
232
|
+
return !isNaN(value) ? String(value).replace(reg, "$1$2.$3") : "";
|
|
233
|
+
}
|
|
234
|
+
return "";
|
|
235
|
+
};
|
|
236
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
237
|
+
0 && (module.exports = {
|
|
238
|
+
limitDecimals
|
|
239
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
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/alert/index.tsx
|
|
30
|
+
var alert_exports = {};
|
|
31
|
+
__export(alert_exports, {
|
|
32
|
+
default: () => alert_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(alert_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_warn = __toESM(require("./warn"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var alert_default = ({ children }) => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__alert-warn-box" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__alert-warn" }, /* @__PURE__ */ import_react.default.createElement(import_warn.default, null)), children);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.pisell-lowcode__alert-warn-box{
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: flex;
|
|
4
|
+
padding: 8px 16px;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
align-self: stretch;
|
|
7
|
+
|
|
8
|
+
border-radius: 12px;
|
|
9
|
+
border: 1px solid var(--Warning-300, #fec84b);
|
|
10
|
+
background: var(--Warning-25, #fffcf5);
|
|
11
|
+
|
|
12
|
+
/* Shadow/xs */
|
|
13
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
14
|
+
|
|
15
|
+
color: var(--Warning-700, #b54708);
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: 20px; /* 142.857% */
|
|
20
|
+
}
|
|
21
|
+
.pisell-lowcode__alert-warn{
|
|
22
|
+
position: relative;
|
|
23
|
+
font-size: 36px;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
font-size: 36px;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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/alert/warn.tsx
|
|
30
|
+
var warn_exports = {};
|
|
31
|
+
__export(warn_exports, {
|
|
32
|
+
default: () => warn_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(warn_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var warn_default = () => /* @__PURE__ */ import_react.default.createElement(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
width: "1em",
|
|
40
|
+
height: "1em",
|
|
41
|
+
viewBox: "0 0 36 36",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
fill: "none"
|
|
44
|
+
},
|
|
45
|
+
/* @__PURE__ */ import_react.default.createElement("g", { opacity: "0.3" }, /* @__PURE__ */ import_react.default.createElement(
|
|
46
|
+
"rect",
|
|
47
|
+
{
|
|
48
|
+
x: "5.49999",
|
|
49
|
+
y: "5.5013",
|
|
50
|
+
width: "25",
|
|
51
|
+
height: "25",
|
|
52
|
+
rx: "12.5",
|
|
53
|
+
stroke: "#DC6803",
|
|
54
|
+
strokeWidth: "1.66667"
|
|
55
|
+
}
|
|
56
|
+
)),
|
|
57
|
+
/* @__PURE__ */ import_react.default.createElement("g", { opacity: "0.1" }, /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
"rect",
|
|
59
|
+
{
|
|
60
|
+
x: "1.33333",
|
|
61
|
+
y: "1.33333",
|
|
62
|
+
width: "33.3333",
|
|
63
|
+
height: "33.3333",
|
|
64
|
+
rx: "16.6667",
|
|
65
|
+
stroke: "#DC6803",
|
|
66
|
+
strokeWidth: "1.66667"
|
|
67
|
+
}
|
|
68
|
+
)),
|
|
69
|
+
/* @__PURE__ */ import_react.default.createElement("g", { clipPath: "url(#clip0_5109_25282)" }, /* @__PURE__ */ import_react.default.createElement(
|
|
70
|
+
"path",
|
|
71
|
+
{
|
|
72
|
+
d: "M18 14.668V18.0013M18 21.3346H18.0083M26.3333 18.0013C26.3333 22.6037 22.6024 26.3346 18 26.3346C13.3976 26.3346 9.66666 22.6037 9.66666 18.0013C9.66666 13.3989 13.3976 9.66797 18 9.66797C22.6024 9.66797 26.3333 13.3989 26.3333 18.0013Z",
|
|
73
|
+
stroke: "#DC6803",
|
|
74
|
+
strokeWidth: "1.66667",
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeLinejoin: "round"
|
|
77
|
+
}
|
|
78
|
+
)),
|
|
79
|
+
/* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement("clipPath", { id: "clip0_5109_25282" }, /* @__PURE__ */ import_react.default.createElement("rect", { width: "20", height: "20", fill: "white", transform: "translate(8 8)" })))
|
|
80
|
+
);
|