@pisell/private-materials 3.0.97 → 3.0.98
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 +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/components/eftpos/device.js +4 -1
- package/es/components/eftpos/index.less +18 -2
- package/es/components/eftpos/locales.d.ts +12 -0
- package/es/components/eftpos/locales.js +15 -3
- package/es/components/eftpos/table.js +66 -17
- package/es/components/eftposPay/amount.js +1 -2
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -1
- package/es/components/eftposPay/component/fail/failCustom.js +9 -5
- package/es/components/eftposPay/component/fail/index.d.ts +1 -1
- package/es/components/eftposPay/component/fail/index.js +10 -6
- package/es/components/eftposPay/component/header/titlebar.less +1 -1
- package/es/components/eftposPay/component/manual/index.js +12 -6
- package/es/components/eftposPay/component/manual/index.less +20 -7
- package/es/components/eftposPay/const.d.ts +1 -0
- package/es/components/eftposPay/device.less +1 -1
- package/es/components/eftposPay/index.js +4 -5
- package/es/components/eftposPay/index.less +30 -40
- package/es/components/eftposPay/locales.js +1 -1
- package/es/components/eftposPay/pay.d.ts +2 -1
- package/es/components/eftposPay/pay.js +4 -2
- package/es/components/eftposPay/var.less +9 -0
- package/lib/components/eftpos/device.js +1 -1
- package/lib/components/eftpos/index.less +18 -2
- package/lib/components/eftpos/locales.d.ts +12 -0
- package/lib/components/eftpos/locales.js +15 -3
- package/lib/components/eftpos/table.js +37 -12
- package/lib/components/eftposPay/amount.js +1 -2
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/failCustom.js +8 -5
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -1
- package/lib/components/eftposPay/component/fail/index.js +8 -5
- package/lib/components/eftposPay/component/header/titlebar.less +1 -1
- package/lib/components/eftposPay/component/manual/index.js +26 -14
- package/lib/components/eftposPay/component/manual/index.less +20 -7
- package/lib/components/eftposPay/const.d.ts +1 -0
- package/lib/components/eftposPay/device.less +1 -1
- package/lib/components/eftposPay/index.js +4 -0
- package/lib/components/eftposPay/index.less +30 -40
- package/lib/components/eftposPay/locales.js +1 -1
- package/lib/components/eftposPay/pay.d.ts +2 -1
- package/lib/components/eftposPay/pay.js +4 -2
- package/lib/components/eftposPay/var.less +9 -0
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@pos-max-height:var (--pisel-lc-pos-max-height, unset);
|
|
2
|
+
@pos-height:var (--pisel-lc-pos-max-height, unset);
|
|
3
|
+
@pos-width:var (--pisel-lc-pos-width, 600px);
|
|
4
|
+
@pos-padding:var (--pisel-lc-pos-pay-padding, 24px);
|
|
5
|
+
|
|
6
|
+
@pos-terminal-max-height:var (--pisel-lc-pos-max-height, unset);
|
|
7
|
+
@pos-terminal-height:var (--pisel-lc-pos-max-height, unset);
|
|
8
|
+
@pos-terminal-width:var (--pisel-lc-pos-width, 600px);
|
|
9
|
+
@pos-terminal-padding:var (--pisel-lc-pos-pay-padding, 24px);
|
|
@@ -49,7 +49,7 @@ var Device = (props) => {
|
|
|
49
49
|
className: "pisell-lowcode__pos-device"
|
|
50
50
|
},
|
|
51
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")))
|
|
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, style: { height: "48px" } }, import_utils.locales.getText("page.eftpos.text.save")))
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
var device_default = Device;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
flex-shrink: 0;
|
|
29
29
|
}
|
|
30
30
|
.pisell-lowcode__pos_tabs-nav::after {
|
|
31
|
-
content:
|
|
31
|
+
content: '';
|
|
32
32
|
position: absolute;
|
|
33
33
|
top: 0;
|
|
34
34
|
bottom: 0;
|
|
@@ -135,7 +135,23 @@
|
|
|
135
135
|
font-weight: 500 !important;
|
|
136
136
|
line-height: 38px;
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
.pisell-lowcode__pos-table-del-title {
|
|
139
|
+
color: var(--Gray-900, #101828);
|
|
140
|
+
/* Text lg/Semibold */
|
|
141
|
+
font-size: 18px;
|
|
142
|
+
font-style: normal;
|
|
143
|
+
font-weight: 600;
|
|
144
|
+
line-height: 28px; /* 155.556% */
|
|
145
|
+
}
|
|
146
|
+
.pisell-lowcode__pos-table-del-text {
|
|
147
|
+
color: var(--Gray-900, #101828);
|
|
148
|
+
/* Text sm/Regular */
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
font-style: normal;
|
|
151
|
+
font-weight: 400;
|
|
152
|
+
line-height: 20px; /* 142.857% */
|
|
153
|
+
padding: 0 0 12px 0;
|
|
154
|
+
}
|
|
139
155
|
.pisell-lowcode__pos-device {
|
|
140
156
|
display: flex;
|
|
141
157
|
flex-direction: column;
|
|
@@ -22,6 +22,10 @@ declare const _default: {
|
|
|
22
22
|
'page.eftpos.text.table.status': string;
|
|
23
23
|
'page.eftpos.text.table.surcharge': string;
|
|
24
24
|
'page.eftpos.text.table.opeartion': string;
|
|
25
|
+
'page.eftpos.text.table.del.title': string;
|
|
26
|
+
'page.eftpos.text.table.del.text': string;
|
|
27
|
+
'page.eftpos.text.table.del.delete': string;
|
|
28
|
+
'page.eftpos.text.table.del.cancel': string;
|
|
25
29
|
};
|
|
26
30
|
'zh-CN': {
|
|
27
31
|
'page.eftpos.text.manufacturer': string;
|
|
@@ -46,6 +50,10 @@ declare const _default: {
|
|
|
46
50
|
'page.eftpos.text.table.status': string;
|
|
47
51
|
'page.eftpos.text.table.surcharge': string;
|
|
48
52
|
'page.eftpos.text.table.opeartion': string;
|
|
53
|
+
'page.eftpos.text.table.del.title': string;
|
|
54
|
+
'page.eftpos.text.table.del.text': string;
|
|
55
|
+
'page.eftpos.text.table.del.delete': string;
|
|
56
|
+
'page.eftpos.text.table.del.cancel': string;
|
|
49
57
|
};
|
|
50
58
|
'zh-HK': {
|
|
51
59
|
'page.eftpos.text.manufacturer': string;
|
|
@@ -70,6 +78,10 @@ declare const _default: {
|
|
|
70
78
|
'page.eftpos.text.table.status': string;
|
|
71
79
|
'page.eftpos.text.table.surcharge': string;
|
|
72
80
|
'page.eftpos.text.table.opeartion': string;
|
|
81
|
+
'page.eftpos.text.table.del.title': string;
|
|
82
|
+
'page.eftpos.text.table.del.text': string;
|
|
83
|
+
'page.eftpos.text.table.del.delete': string;
|
|
84
|
+
'page.eftpos.text.table.del.cancel': string;
|
|
73
85
|
};
|
|
74
86
|
};
|
|
75
87
|
export default _default;
|
|
@@ -51,7 +51,11 @@ var locales_default = {
|
|
|
51
51
|
"page.eftpos.text.table.name": "Device name",
|
|
52
52
|
"page.eftpos.text.table.status": "Status",
|
|
53
53
|
"page.eftpos.text.table.surcharge": "Surcharge",
|
|
54
|
-
"page.eftpos.text.table.opeartion": "Opeartion"
|
|
54
|
+
"page.eftpos.text.table.opeartion": "Opeartion",
|
|
55
|
+
"page.eftpos.text.table.del.title": "Delete device",
|
|
56
|
+
"page.eftpos.text.table.del.text": "Are you sure you want to delete the device?",
|
|
57
|
+
"page.eftpos.text.table.del.delete": "Delete",
|
|
58
|
+
"page.eftpos.text.table.del.cancel": "Cancel"
|
|
55
59
|
},
|
|
56
60
|
"zh-CN": {
|
|
57
61
|
"page.eftpos.text.manufacturer": "厂商",
|
|
@@ -81,7 +85,11 @@ var locales_default = {
|
|
|
81
85
|
"page.eftpos.text.table.name": "设备名称",
|
|
82
86
|
"page.eftpos.text.table.status": "状态",
|
|
83
87
|
"page.eftpos.text.table.surcharge": "支付手续费",
|
|
84
|
-
"page.eftpos.text.table.opeartion": "操作"
|
|
88
|
+
"page.eftpos.text.table.opeartion": "操作",
|
|
89
|
+
"page.eftpos.text.table.del.title": "删除设备",
|
|
90
|
+
"page.eftpos.text.table.del.text": "您确定要删除设备?",
|
|
91
|
+
"page.eftpos.text.table.del.delete": "删除",
|
|
92
|
+
"page.eftpos.text.table.del.cancel": "取消"
|
|
85
93
|
},
|
|
86
94
|
"zh-HK": {
|
|
87
95
|
"page.eftpos.text.manufacturer": "廠商",
|
|
@@ -111,6 +119,10 @@ var locales_default = {
|
|
|
111
119
|
"page.eftpos.text.table.name": "設備名稱",
|
|
112
120
|
"page.eftpos.text.table.status": "狀態",
|
|
113
121
|
"page.eftpos.text.table.surcharge": "支付手續費",
|
|
114
|
-
"page.eftpos.text.table.opeartion": "操作"
|
|
122
|
+
"page.eftpos.text.table.opeartion": "操作",
|
|
123
|
+
"page.eftpos.text.table.del.title": "刪除設備",
|
|
124
|
+
"page.eftpos.text.table.del.text": "您確定要刪除設備?",
|
|
125
|
+
"page.eftpos.text.table.del.delete": "刪除",
|
|
126
|
+
"page.eftpos.text.table.del.cancel": "取消"
|
|
115
127
|
}
|
|
116
128
|
};
|
|
@@ -34,6 +34,7 @@ __export(table_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(table_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
+
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
37
38
|
var import_utils = require("@pisell/utils");
|
|
38
39
|
var { Column } = import_antd.Table;
|
|
39
40
|
var { Title, Text } = import_antd.Typography;
|
|
@@ -66,6 +67,7 @@ var App = ({
|
|
|
66
67
|
}, [size]);
|
|
67
68
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
68
69
|
const deviceRef = (0, import_react.useRef)("");
|
|
70
|
+
const [isModalOpen, setModalOpen] = (0, import_react.useState)(false);
|
|
69
71
|
const [pagination, setPagination] = (0, import_react.useState)({
|
|
70
72
|
pageSize: 10,
|
|
71
73
|
current: 1,
|
|
@@ -116,20 +118,13 @@ var App = ({
|
|
|
116
118
|
};
|
|
117
119
|
const onDelDevice = (record) => {
|
|
118
120
|
deviceRef.current = record.id;
|
|
119
|
-
|
|
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
|
-
});
|
|
121
|
+
setModalOpen(true);
|
|
128
122
|
};
|
|
129
123
|
const onChangeSize = (num) => {
|
|
130
124
|
loadData(num);
|
|
131
125
|
};
|
|
132
126
|
const onOk = () => {
|
|
127
|
+
setModalOpen(false);
|
|
133
128
|
if (deviceRef.current) {
|
|
134
129
|
onDel(deviceRef.current).then(() => {
|
|
135
130
|
return loadData();
|
|
@@ -139,7 +134,7 @@ var App = ({
|
|
|
139
134
|
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
140
135
|
loadData
|
|
141
136
|
}));
|
|
142
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
137
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
143
138
|
"div",
|
|
144
139
|
{
|
|
145
140
|
className: "pisell-lowcode__pos-table",
|
|
@@ -148,7 +143,7 @@ var App = ({
|
|
|
148
143
|
}
|
|
149
144
|
},
|
|
150
145
|
/* @__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")())),
|
|
146
|
+
/* @__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, style: { height: "48px" } }, import_utils.locales.getText("page.eftpos.text.device.add")())),
|
|
152
147
|
/* @__PURE__ */ import_react.default.createElement(
|
|
153
148
|
import_antd.Table,
|
|
154
149
|
{
|
|
@@ -230,6 +225,36 @@ var App = ({
|
|
|
230
225
|
onShowSizeChange: onChangeSize
|
|
231
226
|
}
|
|
232
227
|
)
|
|
233
|
-
)
|
|
228
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
229
|
+
import_antd.Modal,
|
|
230
|
+
{
|
|
231
|
+
open: isModalOpen,
|
|
232
|
+
width: 400,
|
|
233
|
+
centered: true,
|
|
234
|
+
onCancel: () => setModalOpen(false),
|
|
235
|
+
closeIcon: /* @__PURE__ */ import_react.default.createElement(import_XClose.default, { size: 20, style: { fontSize: "24px" } }),
|
|
236
|
+
footer: /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", gap: "12px" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
237
|
+
import_antd.Button,
|
|
238
|
+
{
|
|
239
|
+
block: true,
|
|
240
|
+
onClick: () => setModalOpen(false),
|
|
241
|
+
style: { flex: 1, height: "48px", borderRadius: "8px" }
|
|
242
|
+
},
|
|
243
|
+
import_utils.locales.getText("page.eftpos.text.table.del.cancel")
|
|
244
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
245
|
+
import_antd.Button,
|
|
246
|
+
{
|
|
247
|
+
type: "primary",
|
|
248
|
+
block: true,
|
|
249
|
+
onClick: onOk,
|
|
250
|
+
style: { flex: 1, height: "48px", borderRadius: "8px" }
|
|
251
|
+
},
|
|
252
|
+
import_utils.locales.getText("page.eftpos.text.table.del.delete")
|
|
253
|
+
))
|
|
254
|
+
},
|
|
255
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { height: "34px" } }),
|
|
256
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-table-del-title" }, import_utils.locales.getText("page.eftpos.text.table.del.title")),
|
|
257
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__pos-table-del-text" }, import_utils.locales.getText("page.eftpos.text.table.del.text"))
|
|
258
|
+
));
|
|
234
259
|
};
|
|
235
260
|
var table_default = import_react.default.forwardRef(App);
|
|
@@ -140,8 +140,7 @@ var amount_default = ({
|
|
|
140
140
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-amount ${className}` }, isIpad ? null : /* @__PURE__ */ import_react.default.createElement(
|
|
141
141
|
import_titlebar.default,
|
|
142
142
|
{
|
|
143
|
-
type:
|
|
144
|
-
onBack,
|
|
143
|
+
type: "left-title-close",
|
|
145
144
|
onClose
|
|
146
145
|
},
|
|
147
146
|
status ? name : import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.title")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
|
-
declare const _default: ({ className, onChange }: ActionProps) => React.JSX.Element;
|
|
3
|
+
declare const _default: ({ className, isIpad, onChange }: ActionProps) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
|
@@ -33,6 +33,7 @@ __export(failCustom_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(failCustom_exports);
|
|
35
35
|
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_ahooks = require("ahooks");
|
|
36
37
|
var import_antd = require("antd");
|
|
37
38
|
var import_react = __toESM(require("react"));
|
|
38
39
|
var import_const = require("../../const");
|
|
@@ -40,7 +41,7 @@ var import_manufacturer = require("../../manufacturer");
|
|
|
40
41
|
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
41
42
|
var import_store = require("../../store");
|
|
42
43
|
var import_header = __toESM(require("../header"));
|
|
43
|
-
var failCustom_default = ({ className = "", onChange }) => {
|
|
44
|
+
var failCustom_default = ({ className = "", isIpad, onChange }) => {
|
|
44
45
|
const { eftpos, custom, mode } = (0, import_store.useContextData)();
|
|
45
46
|
const failCustom = custom == null ? void 0 : custom.failCustom;
|
|
46
47
|
const dispatch = (0, import_store.useDispatch)();
|
|
@@ -77,10 +78,12 @@ var failCustom_default = ({ className = "", onChange }) => {
|
|
|
77
78
|
const onClose = () => {
|
|
78
79
|
onChange("fail");
|
|
79
80
|
};
|
|
80
|
-
(0,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
(0, import_ahooks.useMount)(() => {
|
|
82
|
+
if ((failCustom == null ? void 0 : failCustom.status) === "fail") {
|
|
83
|
+
onChange("page", "fail");
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
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" && !isIpad ? /* @__PURE__ */ import_react.default.createElement(
|
|
84
87
|
import_XClose.default,
|
|
85
88
|
{
|
|
86
89
|
size: 20,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionProps } from '../../const';
|
|
3
|
-
declare const _default: ({ onChange, className }: ActionProps) => React.JSX.Element;
|
|
3
|
+
declare const _default: ({ onChange, className, isIpad }: ActionProps) => React.JSX.Element;
|
|
4
4
|
export default _default;
|
|
@@ -34,12 +34,13 @@ __export(fail_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(fail_exports);
|
|
35
35
|
var import_utils = require("@pisell/utils");
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
+
var import_ahooks = require("ahooks");
|
|
37
38
|
var import_react = __toESM(require("react"));
|
|
38
39
|
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
39
40
|
var import_manufacturer = require("../../manufacturer");
|
|
40
41
|
var import_store = require("../../store");
|
|
41
42
|
var import_header = __toESM(require("../header"));
|
|
42
|
-
var fail_default = ({ onChange, className = "" }) => {
|
|
43
|
+
var fail_default = ({ onChange, className = "", isIpad }) => {
|
|
43
44
|
var _a, _b;
|
|
44
45
|
const { eftpos, step, steps, custom, mode } = (0, import_store.useContextData)();
|
|
45
46
|
const isPosNetworkError = ((_b = (_a = steps[step]) == null ? void 0 : _a.custom) == null ? void 0 : _b.isPosNetworkError) || false;
|
|
@@ -82,10 +83,12 @@ var fail_default = ({ onChange, className = "" }) => {
|
|
|
82
83
|
const onClose = () => {
|
|
83
84
|
onChange("fail");
|
|
84
85
|
};
|
|
85
|
-
(0,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
(0, import_ahooks.useMount)(() => {
|
|
87
|
+
if (steps[step].status === "fail") {
|
|
88
|
+
onChange("page", "fail");
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
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" && !isIpad ? /* @__PURE__ */ import_react.default.createElement(
|
|
89
92
|
import_XClose.default,
|
|
90
93
|
{
|
|
91
94
|
size: 20,
|
|
@@ -44,6 +44,9 @@ var manual_default = ({ onChange, className = "" }) => {
|
|
|
44
44
|
const [disabled, setDisabled] = (0, import_react.useState)(false);
|
|
45
45
|
const prefix = (0, import_usePrefix.default)();
|
|
46
46
|
const onSuccess = () => {
|
|
47
|
+
if (disabled) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
47
50
|
setDisabled(true);
|
|
48
51
|
if (mode === import_const.ModeEnum.Pay) {
|
|
49
52
|
const obj = (custom == null ? void 0 : custom.pay) || {};
|
|
@@ -66,24 +69,34 @@ var manual_default = ({ onChange, className = "" }) => {
|
|
|
66
69
|
onChange("success", { number: custom == null ? void 0 : custom.number });
|
|
67
70
|
};
|
|
68
71
|
const onFail = () => {
|
|
72
|
+
if (disabled) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
69
75
|
setDisabled(true);
|
|
70
76
|
onChange("fail");
|
|
71
77
|
};
|
|
72
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-manual ${className}` }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-title" }, manual == null ? void 0 : manual.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-txt" }, manual == null ? void 0 : manual.text), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card-box" }, /* @__PURE__ */ import_react.default.createElement(
|
|
78
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-manual ${className}` }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-title" }, manual == null ? void 0 : manual.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-txt" }, manual == null ? void 0 : manual.text), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card-box" }, /* @__PURE__ */ import_react.default.createElement(
|
|
73
79
|
"div",
|
|
74
80
|
{
|
|
75
|
-
className: "pisell-lowcode__eft-pay-manual-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
79
|
-
import_antd.Button,
|
|
80
|
-
{
|
|
81
|
-
onClick: onSuccess,
|
|
82
|
-
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
83
|
-
disabled
|
|
81
|
+
className: "pisell-lowcode__eft-pay-manual-card",
|
|
82
|
+
onClick: onSuccess
|
|
84
83
|
},
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: "pisell-lowcode__eft-pay-manual-img",
|
|
88
|
+
style: { backgroundImage: `url(${prefix}/pay_success.png)` }
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
92
|
+
import_antd.Button,
|
|
93
|
+
{
|
|
94
|
+
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
95
|
+
block: true
|
|
96
|
+
},
|
|
97
|
+
import_utils.locales.getText("page.eftpos-pay.text.successful")(mode)
|
|
98
|
+
)
|
|
99
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card", onClick: onFail }, /* @__PURE__ */ import_react.default.createElement(
|
|
87
100
|
"div",
|
|
88
101
|
{
|
|
89
102
|
className: "pisell-lowcode__eft-pay-manual-img",
|
|
@@ -92,9 +105,8 @@ var manual_default = ({ onChange, className = "" }) => {
|
|
|
92
105
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
93
106
|
import_antd.Button,
|
|
94
107
|
{
|
|
95
|
-
onClick: onFail,
|
|
96
108
|
className: "pisell-lowcode__eft-pay-manual-btn",
|
|
97
|
-
|
|
109
|
+
block: true
|
|
98
110
|
},
|
|
99
111
|
import_utils.locales.getText("page.eftpos-pay.text.failed")(mode)
|
|
100
112
|
))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.pisell-lowcode__eft-pay-manual{
|
|
2
2
|
padding: var(--pisel-lc-pos-manual-padding, 24px);
|
|
3
|
-
width: var(--pisel-lc-pos-manual-width,
|
|
3
|
+
width: var(--pisel-lc-pos-manual-width, 600px);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.pisell-lowcode__eft-pay-manual-title {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
overflow: auto;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
@media only screen and (max-width:
|
|
59
|
+
@media only screen and (max-width: 499px) {
|
|
60
60
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
61
61
|
gap:10px;
|
|
62
62
|
}
|
|
@@ -74,17 +74,30 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
@media only screen and (min-width:
|
|
77
|
+
@media only screen and (min-width: 500px) and (max-width: 601px) {
|
|
78
|
+
.pisell-lowcode__eft-pay-terminal .pisell-lowcode__eft-pay-manual-card-box{
|
|
79
|
+
flex: none;
|
|
80
|
+
height: 360px;
|
|
81
|
+
}
|
|
78
82
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
79
|
-
|
|
83
|
+
gap:10px;
|
|
84
|
+
height: 400px;
|
|
85
|
+
|
|
80
86
|
}
|
|
81
87
|
.pisell-lowcode__eft-pay-manual-card {
|
|
82
|
-
|
|
88
|
+
flex: 1;
|
|
89
|
+
padding: 20px;
|
|
90
|
+
gap:30px;
|
|
91
|
+
}
|
|
92
|
+
.pisell-lowcode__eft-pay-manual-img{
|
|
93
|
+
width: 200px;
|
|
94
|
+
height: 200px;
|
|
83
95
|
}
|
|
84
|
-
|
|
85
96
|
}
|
|
86
97
|
|
|
87
|
-
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@media only screen and (min-width: 601px) {
|
|
88
101
|
.pisell-lowcode__eft-pay-manual-card-box {
|
|
89
102
|
margin: 24px auto 0;
|
|
90
103
|
gap: 20px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.pisell-lowcode__eft-pay-device-box {
|
|
2
2
|
max-height: var(--pisel-lc-pos-device-max-height, unset);
|
|
3
|
-
width: var(--pisel-lc-pos-device-width,
|
|
3
|
+
width: var(--pisel-lc-pos-device-width, 600px);
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
padding: var(--pisel-lc-pos-device-padding, 0 24px 24px);
|
|
6
6
|
}
|
|
@@ -138,6 +138,7 @@ var App = ({
|
|
|
138
138
|
onChange,
|
|
139
139
|
className: isIpad ? "pisell-lowcode__eft-pay-terminal" : "",
|
|
140
140
|
terminal,
|
|
141
|
+
isIpad,
|
|
141
142
|
net
|
|
142
143
|
}
|
|
143
144
|
);
|
|
@@ -176,6 +177,9 @@ var eftposPay_default = (props) => {
|
|
|
176
177
|
props.params ? { mode, ...props.params, symbol: current } : { mode, symbol: current }
|
|
177
178
|
);
|
|
178
179
|
}, [mode, props.params, props.type, symbol]);
|
|
180
|
+
(0, import_react.useEffect)(() => {
|
|
181
|
+
document.body.id = "body";
|
|
182
|
+
}, []);
|
|
179
183
|
return /* @__PURE__ */ import_react.default.createElement(import_store.Provider, { state }, /* @__PURE__ */ import_react.default.createElement(
|
|
180
184
|
App,
|
|
181
185
|
{
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
.
|
|
2
|
-
height: auto;
|
|
3
|
-
position: absolute;
|
|
4
|
-
top: 50%;
|
|
5
|
-
left: 50%;
|
|
6
|
-
transform: translate(-50%, -50%);
|
|
7
|
-
border-radius: 12px;
|
|
8
|
-
background-color: #eee;
|
|
9
|
-
padding: 24px;
|
|
10
|
-
}
|
|
1
|
+
@import './var.less';
|
|
11
2
|
|
|
12
3
|
.pisell-lowcode__eft-pay-amount {
|
|
13
4
|
display: flex;
|
|
14
5
|
flex-direction: column;
|
|
15
|
-
gap: 8px;
|
|
16
6
|
}
|
|
17
7
|
|
|
18
8
|
//
|
|
@@ -56,14 +46,14 @@
|
|
|
56
46
|
line-height: 20px; /* 142.857% */
|
|
57
47
|
}
|
|
58
48
|
.pisell-lowcode__eft-pay-step-item-btns {
|
|
59
|
-
margin:
|
|
49
|
+
margin: 24px 0 0 0;
|
|
60
50
|
display: flex;
|
|
61
51
|
gap: 12px;
|
|
62
52
|
flex-shrink: 0;
|
|
63
53
|
}
|
|
64
54
|
.pisell-lowcode__eft-pay-step-item-btn {
|
|
65
55
|
flex: 1;
|
|
66
|
-
height:
|
|
56
|
+
height: 48px !important;
|
|
67
57
|
}
|
|
68
58
|
|
|
69
59
|
|
|
@@ -207,29 +197,6 @@
|
|
|
207
197
|
width: 40px;
|
|
208
198
|
}
|
|
209
199
|
|
|
210
|
-
.pisell-lowcode__eft-pay-box {
|
|
211
|
-
max-height: var(--pisel-lc-pos-pay-max-height, unset);
|
|
212
|
-
width: var(--pisel-lc-pos-pay-width, 400px);
|
|
213
|
-
max-width: 100%;
|
|
214
|
-
padding: var(--pisel-lc-pos-pay-padding, 24px);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.pisell-lowcode__eft-pay-amount {
|
|
218
|
-
max-height: var(--pisel-lc-pos-amount-max-height, unset);
|
|
219
|
-
width: var(--pisel-lc-pos-amount-width, 600px);
|
|
220
|
-
max-width: 100%;
|
|
221
|
-
padding: var(--pisel-lc-pos-device-padding, 0 24px 24px);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.pisell-lowcode__eft-pay-terminal {
|
|
225
|
-
width: var(--pisel-lc-pos-terminal-width, 100%) !important;
|
|
226
|
-
height: var(--pisel-lc-pos-terminal-height, 100%) !important;
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: column;
|
|
229
|
-
}
|
|
230
|
-
// .pisell-lowcode__eft-pay-terminal .pisell-lowcode__eft-pay-amount-body{
|
|
231
|
-
// flex: 1;
|
|
232
|
-
// }
|
|
233
200
|
.pisell-lowcode__eft-pay-amount-body,
|
|
234
201
|
.pisell-lowcode__eft-pay-body {
|
|
235
202
|
flex: 1;
|
|
@@ -258,10 +225,6 @@
|
|
|
258
225
|
line-height: 20px; /* 142.857% */
|
|
259
226
|
}
|
|
260
227
|
|
|
261
|
-
.pisell-lowcode__eft-pay-step-item-pedding {
|
|
262
|
-
}
|
|
263
|
-
.pisell-lowcode__eft-pay-step-item-warn {
|
|
264
|
-
}
|
|
265
228
|
|
|
266
229
|
.pisell-lowcode__eft-pay-step-item-resolve {
|
|
267
230
|
color: var(--gray-true-900, #141414);
|
|
@@ -271,3 +234,30 @@
|
|
|
271
234
|
font-weight: 400;
|
|
272
235
|
line-height: 20px; /* 142.857% */
|
|
273
236
|
}
|
|
237
|
+
.pisell-lowcode__eft-pay-manual-btn{
|
|
238
|
+
// height: ;
|
|
239
|
+
height: 48px !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
.pisell-lowcode__eft-pay-box {
|
|
244
|
+
max-height: var(--pisel-lc-pos-pay-max-height, unset);
|
|
245
|
+
width: var(--pisel-lc-pos-pay-width, 600px);
|
|
246
|
+
max-width: 100%;
|
|
247
|
+
padding: var(--pisel-lc-pos-pay-padding, 24px);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.pisell-lowcode__eft-pay-amount {
|
|
251
|
+
max-height: var(--pisel-lc-pos-amount-max-height, unset);
|
|
252
|
+
width: var(--pisel-lc-pos-amount-width, 600px);
|
|
253
|
+
max-width: 100%;
|
|
254
|
+
padding: var(--pisel-lc-pos-device-padding, 0 24px 24px);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.pisell-lowcode__eft-pay-terminal {
|
|
258
|
+
width: var(--pisel-lc-pos-terminal-width, 100%) !important;
|
|
259
|
+
height: var(--pisel-lc-pos-terminal-height, 100%) !important;
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: column;
|
|
262
|
+
}
|
|
263
|
+
|
|
@@ -74,7 +74,7 @@ var locales_default = {
|
|
|
74
74
|
"page.eftpos-pay.text.surcharge.percentage": "Percentage",
|
|
75
75
|
"page.eftpos-pay.text.surcharge.fixed": "Fixed",
|
|
76
76
|
"page.eftpos-pay.text.surcharge.percentage-fixed": "Surcharge = Percentage + Fixed",
|
|
77
|
-
"page.eftpos-pay.text.surcharge.edit.title": "Edit
|
|
77
|
+
"page.eftpos-pay.text.surcharge.edit.title": "Edit payment surcharge",
|
|
78
78
|
// 自定义
|
|
79
79
|
"page.eftpos-pay.text.input.title": (name) => `Amount to pay on ${name}`,
|
|
80
80
|
"page.eftpos-pay.text.amount.cash.left.pay.paid": (money) => `${money} left to be paid`,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PayProps } from './const';
|
|
3
3
|
import './index.less';
|
|
4
|
-
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, }: PayProps & {
|
|
4
|
+
declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isIpad }: PayProps & {
|
|
5
5
|
terminal: {
|
|
6
6
|
network: boolean;
|
|
7
7
|
};
|
|
8
8
|
net: boolean;
|
|
9
|
+
isIpad: boolean;
|
|
9
10
|
}) => React.JSX.Element;
|
|
10
11
|
export default Pay;
|
|
@@ -58,7 +58,8 @@ var Pay = ({
|
|
|
58
58
|
onChange: onChangeStatus,
|
|
59
59
|
className,
|
|
60
60
|
terminal,
|
|
61
|
-
net
|
|
61
|
+
net,
|
|
62
|
+
isIpad
|
|
62
63
|
}) => {
|
|
63
64
|
const data = (0, import_store.useContextData)();
|
|
64
65
|
const dispatch = (0, import_store.useDispatch)();
|
|
@@ -113,7 +114,8 @@ var Pay = ({
|
|
|
113
114
|
{
|
|
114
115
|
onChange,
|
|
115
116
|
api,
|
|
116
|
-
className
|
|
117
|
+
className,
|
|
118
|
+
isIpad: true
|
|
117
119
|
}
|
|
118
120
|
) : null);
|
|
119
121
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@pos-max-height:var (--pisel-lc-pos-max-height, unset);
|
|
2
|
+
@pos-height:var (--pisel-lc-pos-max-height, unset);
|
|
3
|
+
@pos-width:var (--pisel-lc-pos-width, 600px);
|
|
4
|
+
@pos-padding:var (--pisel-lc-pos-pay-padding, 24px);
|
|
5
|
+
|
|
6
|
+
@pos-terminal-max-height:var (--pisel-lc-pos-max-height, unset);
|
|
7
|
+
@pos-terminal-height:var (--pisel-lc-pos-max-height, unset);
|
|
8
|
+
@pos-terminal-width:var (--pisel-lc-pos-width, 600px);
|
|
9
|
+
@pos-terminal-padding:var (--pisel-lc-pos-pay-padding, 24px);
|