@pisell/private-materials 3.0.97 → 3.0.99

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.
Files changed (55) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +4 -4
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +5 -5
  11. package/es/components/booking/info/service/editService/index.js +12 -0
  12. package/es/components/eftpos/device.js +4 -1
  13. package/es/components/eftpos/index.less +18 -2
  14. package/es/components/eftpos/locales.d.ts +12 -0
  15. package/es/components/eftpos/locales.js +15 -3
  16. package/es/components/eftpos/table.js +66 -17
  17. package/es/components/eftposPay/amount.js +1 -2
  18. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -1
  19. package/es/components/eftposPay/component/fail/failCustom.js +9 -5
  20. package/es/components/eftposPay/component/fail/index.d.ts +1 -1
  21. package/es/components/eftposPay/component/fail/index.js +10 -6
  22. package/es/components/eftposPay/component/header/titlebar.less +1 -1
  23. package/es/components/eftposPay/component/manual/index.js +12 -6
  24. package/es/components/eftposPay/component/manual/index.less +20 -7
  25. package/es/components/eftposPay/const.d.ts +1 -0
  26. package/es/components/eftposPay/device.less +1 -1
  27. package/es/components/eftposPay/index.js +4 -5
  28. package/es/components/eftposPay/index.less +30 -40
  29. package/es/components/eftposPay/locales.js +1 -1
  30. package/es/components/eftposPay/pay.d.ts +2 -1
  31. package/es/components/eftposPay/pay.js +4 -2
  32. package/es/components/eftposPay/var.less +9 -0
  33. package/lib/components/booking/info/service/editService/index.js +8 -0
  34. package/lib/components/eftpos/device.js +1 -1
  35. package/lib/components/eftpos/index.less +18 -2
  36. package/lib/components/eftpos/locales.d.ts +12 -0
  37. package/lib/components/eftpos/locales.js +15 -3
  38. package/lib/components/eftpos/table.js +37 -12
  39. package/lib/components/eftposPay/amount.js +1 -2
  40. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -1
  41. package/lib/components/eftposPay/component/fail/failCustom.js +8 -5
  42. package/lib/components/eftposPay/component/fail/index.d.ts +1 -1
  43. package/lib/components/eftposPay/component/fail/index.js +8 -5
  44. package/lib/components/eftposPay/component/header/titlebar.less +1 -1
  45. package/lib/components/eftposPay/component/manual/index.js +26 -14
  46. package/lib/components/eftposPay/component/manual/index.less +20 -7
  47. package/lib/components/eftposPay/const.d.ts +1 -0
  48. package/lib/components/eftposPay/device.less +1 -1
  49. package/lib/components/eftposPay/index.js +4 -0
  50. package/lib/components/eftposPay/index.less +30 -40
  51. package/lib/components/eftposPay/locales.js +1 -1
  52. package/lib/components/eftposPay/pay.d.ts +2 -1
  53. package/lib/components/eftposPay/pay.js +4 -2
  54. package/lib/components/eftposPay/var.less +9 -0
  55. package/package.json +3 -3
@@ -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;
@@ -24,7 +24,8 @@ var Pay = function Pay(_ref) {
24
24
  onChangeStatus = _ref.onChange,
25
25
  className = _ref.className,
26
26
  terminal = _ref.terminal,
27
- net = _ref.net;
27
+ net = _ref.net,
28
+ isIpad = _ref.isIpad;
28
29
  var data = useContextData();
29
30
  var dispatch = useDispatch();
30
31
  var ref = useRef(false);
@@ -102,7 +103,8 @@ var Pay = function Pay(_ref) {
102
103
  }) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
103
104
  onChange: onChange,
104
105
  api: api,
105
- className: className
106
+ className: className,
107
+ isIpad: true
106
108
  }) : null);
107
109
  };
108
110
  export default Pay;
@@ -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);
@@ -47,6 +47,7 @@ var import_utils3 = require("../../../utils");
47
47
  var import_like = __toESM(require("../like"));
48
48
  var import_mock = require("../../../mock");
49
49
  var import_utils4 = require("../addService/utils");
50
+ var submitLock = false;
50
51
  var Info = () => {
51
52
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
52
53
  const [form] = import_antd.Form.useForm();
@@ -214,6 +215,13 @@ var Info = () => {
214
215
  };
215
216
  const onFinish = (values) => {
216
217
  var _a2;
218
+ if (submitLock) {
219
+ return;
220
+ }
221
+ submitLock = true;
222
+ setTimeout(() => {
223
+ submitLock = false;
224
+ }, 500);
217
225
  let _list = [...state.service.value];
218
226
  let _item = {
219
227
  ...state.service.cacheItem,
@@ -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
- 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
- });
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: status ? "left-title-close" : "back-title-cancel",
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, import_react.useEffect)(() => {
81
- onChange("page", "fail");
82
- }, []);
83
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: failCustom.status }, (failCustom == null ? void 0 : failCustom.status) === "fail" ? /* @__PURE__ */ import_react.default.createElement(
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, import_react.useEffect)(() => {
86
- onChange("page", "fail");
87
- }, []);
88
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-box ${className}` }, /* @__PURE__ */ import_react.default.createElement(import_header.default, { status: steps[step].status }, steps[step].status === "fail" ? /* @__PURE__ */ import_react.default.createElement(
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,
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;
5
- padding: 24px 0 20px;
5
+ padding: 16px 0 16px;
6
6
  flex-shrink: 0;
7
7
  }
8
8
  .pisell-lowcode__eft-pay-header-title {
@@ -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("div", { className: "pisell-lowcode__eft-pay-manual-card" }, /* @__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-img",
76
- style: { backgroundImage: `url(${prefix}/pay_success.png)` }
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
- import_utils.locales.getText("page.eftpos-pay.text.successful")(mode)
86
- )), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-card" }, /* @__PURE__ */ import_react.default.createElement(
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
- disabled
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, fit-content);
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: 400px) {
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: 401px) and (max-width: 820px) {
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
- flex-direction: column;
83
+ gap:10px;
84
+ height: 400px;
85
+
80
86
  }
81
87
  .pisell-lowcode__eft-pay-manual-card {
82
- width: 100%;
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
- @media only screen and (min-width: 821px) {
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;
@@ -128,4 +128,5 @@ export interface ActionProps {
128
128
  [key: string]: (...agrn: unknown[]) => Promise<unknown>;
129
129
  };
130
130
  className?: string;
131
+ isIpad?: boolean;
131
132
  }
@@ -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, 400px);
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
- .simulator {
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: 32px 0 0 0;
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: 34px;
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 Payment Surcharge",
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`,