@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.
Files changed (267) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +16 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +15 -8
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +1 -2
  13. package/es/components/booking/forms/forms.d.ts +1 -1
  14. package/es/components/booking/forms/index.d.ts +1 -1
  15. package/es/components/booking/forms/model.d.ts +1 -2
  16. package/es/components/booking/index.d.ts +1 -1
  17. package/es/components/booking/info/index.d.ts +1 -1
  18. package/es/components/booking/info/model.d.ts +1 -2
  19. package/es/components/booking/model.d.ts +1 -2
  20. package/es/components/booking/notes/index.d.ts +1 -1
  21. package/es/components/booking/notes/model.d.ts +1 -2
  22. package/es/components/booking/payments/index.d.ts +1 -1
  23. package/es/components/booking/payments/model.d.ts +1 -2
  24. package/es/components/eftpos/const.d.ts +38 -0
  25. package/es/components/eftpos/const.js +79 -0
  26. package/es/components/eftpos/device.d.ts +8 -0
  27. package/es/components/eftpos/device.js +30 -0
  28. package/es/components/eftpos/form/index.d.ts +16 -0
  29. package/es/components/eftpos/form/index.js +113 -0
  30. package/es/components/eftpos/index.d.ts +37 -0
  31. package/es/components/eftpos/index.js +274 -0
  32. package/es/components/eftpos/index.less +153 -0
  33. package/es/components/eftpos/locales.d.ts +75 -0
  34. package/es/components/eftpos/locales.js +98 -0
  35. package/es/components/eftpos/pos.d.ts +9 -0
  36. package/es/components/eftpos/pos.js +33 -0
  37. package/es/components/eftpos/surcharge/index.css +17 -0
  38. package/es/components/eftpos/surcharge/index.d.ts +8 -0
  39. package/es/components/eftpos/surcharge/index.js +111 -0
  40. package/es/components/eftpos/table.d.ts +17 -0
  41. package/es/components/eftpos/table.js +236 -0
  42. package/es/components/eftposPay/amount.d.ts +14 -0
  43. package/es/components/eftposPay/amount.js +253 -0
  44. package/es/components/eftposPay/component/alert/index.d.ts +6 -0
  45. package/es/components/eftposPay/component/alert/index.js +11 -0
  46. package/es/components/eftposPay/component/alert/index.less +29 -0
  47. package/es/components/eftposPay/component/alert/warn.d.ts +3 -0
  48. package/es/components/eftposPay/component/alert/warn.js +45 -0
  49. package/es/components/eftposPay/component/fail/failCustom.d.ts +4 -0
  50. package/es/components/eftposPay/component/fail/failCustom.js +95 -0
  51. package/es/components/eftposPay/component/fail/index.d.ts +4 -0
  52. package/es/components/eftposPay/component/fail/index.js +105 -0
  53. package/es/components/eftposPay/component/fail/network.d.ts +4 -0
  54. package/es/components/eftposPay/component/fail/network.js +48 -0
  55. package/es/components/eftposPay/component/fail/unknow.d.ts +4 -0
  56. package/es/components/eftposPay/component/fail/unknow.js +43 -0
  57. package/es/components/eftposPay/component/header/index.d.ts +9 -0
  58. package/es/components/eftposPay/component/header/index.js +66 -0
  59. package/es/components/eftposPay/component/header/index.less +44 -0
  60. package/es/components/eftposPay/component/header/titlebar.d.ts +13 -0
  61. package/es/components/eftposPay/component/header/titlebar.js +39 -0
  62. package/es/components/eftposPay/component/header/titlebar.less +17 -0
  63. package/es/components/eftposPay/component/manual/index.d.ts +5 -0
  64. package/es/components/eftposPay/component/manual/index.js +91 -0
  65. package/es/components/eftposPay/component/manual/index.less +96 -0
  66. package/es/components/eftposPay/component/signature/index.d.ts +4 -0
  67. package/es/components/eftposPay/component/signature/index.js +63 -0
  68. package/es/components/eftposPay/component/step/index.d.ts +12 -0
  69. package/es/components/eftposPay/component/step/index.js +31 -0
  70. package/es/components/eftposPay/component/step/step.d.ts +9 -0
  71. package/es/components/eftposPay/component/step/step.js +23 -0
  72. package/es/components/eftposPay/const.d.ts +131 -0
  73. package/es/components/eftposPay/const.js +48 -0
  74. package/es/components/eftposPay/device.d.ts +14 -0
  75. package/es/components/eftposPay/device.js +124 -0
  76. package/es/components/eftposPay/device.less +61 -0
  77. package/es/components/eftposPay/eftpos/config.d.ts +11 -0
  78. package/es/components/eftposPay/eftpos/config.js +178 -0
  79. package/es/components/eftposPay/eftpos/const.d.ts +10 -0
  80. package/es/components/eftposPay/eftpos/const.js +139 -0
  81. package/es/components/eftposPay/eftpos/index.d.ts +7 -0
  82. package/es/components/eftposPay/eftpos/index.js +35 -0
  83. package/es/components/eftposPay/helper.d.ts +3 -0
  84. package/es/components/eftposPay/helper.js +35 -0
  85. package/es/components/eftposPay/hooks.d.ts +4 -0
  86. package/es/components/eftposPay/hooks.js +153 -0
  87. package/es/components/eftposPay/index.d.ts +7 -0
  88. package/es/components/eftposPay/index.js +188 -0
  89. package/es/components/eftposPay/index.less +273 -0
  90. package/es/components/eftposPay/locales.d.ts +264 -0
  91. package/es/components/eftposPay/locales.js +384 -0
  92. package/es/components/eftposPay/manufacturer.d.ts +6 -0
  93. package/es/components/eftposPay/manufacturer.js +32 -0
  94. package/es/components/eftposPay/pay.d.ts +10 -0
  95. package/es/components/eftposPay/pay.js +108 -0
  96. package/es/components/eftposPay/payo/config.d.ts +11 -0
  97. package/es/components/eftposPay/payo/config.js +357 -0
  98. package/es/components/eftposPay/payo/const.d.ts +6 -0
  99. package/es/components/eftposPay/payo/const.js +93 -0
  100. package/es/components/eftposPay/payo/hooks.d.ts +5 -0
  101. package/es/components/eftposPay/payo/hooks.js +84 -0
  102. package/es/components/eftposPay/payo/index.d.ts +7 -0
  103. package/es/components/eftposPay/payo/index.js +35 -0
  104. package/es/components/eftposPay/store/index.d.ts +239 -0
  105. package/es/components/eftposPay/store/index.js +304 -0
  106. package/es/components/eftposPay/store/useThunkReducer.d.ts +9 -0
  107. package/es/components/eftposPay/store/useThunkReducer.js +31 -0
  108. package/es/components/eftposPay/windcave/action.d.ts +8 -0
  109. package/es/components/eftposPay/windcave/action.js +104 -0
  110. package/es/components/eftposPay/windcave/const.d.ts +104 -0
  111. package/es/components/eftposPay/windcave/const.js +253 -0
  112. package/es/components/eftposPay/windcave/helper.d.ts +9 -0
  113. package/es/components/eftposPay/windcave/helper.js +314 -0
  114. package/es/components/eftposPay/windcave/hook.d.ts +14 -0
  115. package/es/components/eftposPay/windcave/hook.js +144 -0
  116. package/es/components/eftposPay/windcave/index.d.ts +8 -0
  117. package/es/components/eftposPay/windcave/index.js +49 -0
  118. package/es/components/eftposPay/windcave/pos.d.ts +8 -0
  119. package/es/components/eftposPay/windcave/pos.js +180 -0
  120. package/es/components/eftposPay/windcave/pwd.d.ts +8 -0
  121. package/es/components/eftposPay/windcave/pwd.js +124 -0
  122. package/es/components/eftposPay/windcave/receipet.d.ts +6 -0
  123. package/es/components/eftposPay/windcave/receipet.js +67 -0
  124. package/es/components/eftposPay/windcave/receiptAction.d.ts +11 -0
  125. package/es/components/eftposPay/windcave/receiptAction.js +326 -0
  126. package/es/components/eftposPay/windcave/timer.d.ts +17 -0
  127. package/es/components/eftposPay/windcave/timer.js +181 -0
  128. package/es/components/eftposPay/windcave/wait.d.ts +12 -0
  129. package/es/components/eftposPay/windcave/wait.js +139 -0
  130. package/es/components/eftposPay/windcave/windcave.d.ts +6 -0
  131. package/es/components/eftposPay/windcave/windcave.js +283 -0
  132. package/es/components/schedules/index.d.ts +1 -1
  133. package/es/components/schedules/model.d.ts +1 -2
  134. package/es/hooks/usePrefix.d.ts +1 -0
  135. package/es/hooks/usePrefix.js +10 -0
  136. package/es/index.d.ts +2 -0
  137. package/es/index.js +3 -1
  138. package/lib/components/booking/addons/index.d.ts +1 -1
  139. package/lib/components/booking/addons/model.d.ts +1 -2
  140. package/lib/components/booking/forms/forms.d.ts +1 -1
  141. package/lib/components/booking/forms/index.d.ts +1 -1
  142. package/lib/components/booking/forms/model.d.ts +1 -2
  143. package/lib/components/booking/index.d.ts +1 -1
  144. package/lib/components/booking/info/index.d.ts +1 -1
  145. package/lib/components/booking/info/model.d.ts +1 -2
  146. package/lib/components/booking/model.d.ts +1 -2
  147. package/lib/components/booking/notes/index.d.ts +1 -1
  148. package/lib/components/booking/notes/model.d.ts +1 -2
  149. package/lib/components/booking/payments/index.d.ts +1 -1
  150. package/lib/components/booking/payments/model.d.ts +1 -2
  151. package/lib/components/eftpos/const.d.ts +38 -0
  152. package/lib/components/eftpos/const.js +108 -0
  153. package/lib/components/eftpos/device.d.ts +8 -0
  154. package/lib/components/eftpos/device.js +55 -0
  155. package/lib/components/eftpos/form/index.d.ts +16 -0
  156. package/lib/components/eftpos/form/index.js +124 -0
  157. package/lib/components/eftpos/index.d.ts +37 -0
  158. package/lib/components/eftpos/index.js +279 -0
  159. package/lib/components/eftpos/index.less +153 -0
  160. package/lib/components/eftpos/locales.d.ts +75 -0
  161. package/lib/components/eftpos/locales.js +116 -0
  162. package/lib/components/eftpos/pos.d.ts +9 -0
  163. package/lib/components/eftpos/pos.js +55 -0
  164. package/lib/components/eftpos/surcharge/index.css +17 -0
  165. package/lib/components/eftpos/surcharge/index.d.ts +8 -0
  166. package/lib/components/eftpos/surcharge/index.js +125 -0
  167. package/lib/components/eftpos/table.d.ts +17 -0
  168. package/lib/components/eftpos/table.js +235 -0
  169. package/lib/components/eftposPay/amount.d.ts +14 -0
  170. package/lib/components/eftposPay/amount.js +239 -0
  171. package/lib/components/eftposPay/component/alert/index.d.ts +6 -0
  172. package/lib/components/eftposPay/component/alert/index.js +38 -0
  173. package/lib/components/eftposPay/component/alert/index.less +29 -0
  174. package/lib/components/eftposPay/component/alert/warn.d.ts +3 -0
  175. package/lib/components/eftposPay/component/alert/warn.js +80 -0
  176. package/lib/components/eftposPay/component/fail/failCustom.d.ts +4 -0
  177. package/lib/components/eftposPay/component/fail/failCustom.js +117 -0
  178. package/lib/components/eftposPay/component/fail/index.d.ts +4 -0
  179. package/lib/components/eftposPay/component/fail/index.js +121 -0
  180. package/lib/components/eftposPay/component/fail/network.d.ts +4 -0
  181. package/lib/components/eftposPay/component/fail/network.js +65 -0
  182. package/lib/components/eftposPay/component/fail/unknow.d.ts +4 -0
  183. package/lib/components/eftposPay/component/fail/unknow.js +72 -0
  184. package/lib/components/eftposPay/component/header/index.d.ts +9 -0
  185. package/lib/components/eftposPay/component/header/index.js +92 -0
  186. package/lib/components/eftposPay/component/header/index.less +44 -0
  187. package/lib/components/eftposPay/component/header/titlebar.d.ts +13 -0
  188. package/lib/components/eftposPay/component/header/titlebar.js +55 -0
  189. package/lib/components/eftposPay/component/header/titlebar.less +17 -0
  190. package/lib/components/eftposPay/component/manual/index.d.ts +5 -0
  191. package/lib/components/eftposPay/component/manual/index.js +101 -0
  192. package/lib/components/eftposPay/component/manual/index.less +96 -0
  193. package/lib/components/eftposPay/component/signature/index.d.ts +4 -0
  194. package/lib/components/eftposPay/component/signature/index.js +80 -0
  195. package/lib/components/eftposPay/component/step/index.d.ts +12 -0
  196. package/lib/components/eftposPay/component/step/index.js +71 -0
  197. package/lib/components/eftposPay/component/step/step.d.ts +9 -0
  198. package/lib/components/eftposPay/component/step/step.js +59 -0
  199. package/lib/components/eftposPay/const.d.ts +131 -0
  200. package/lib/components/eftposPay/const.js +86 -0
  201. package/lib/components/eftposPay/device.d.ts +14 -0
  202. package/lib/components/eftposPay/device.js +127 -0
  203. package/lib/components/eftposPay/device.less +61 -0
  204. package/lib/components/eftposPay/eftpos/config.d.ts +11 -0
  205. package/lib/components/eftposPay/eftpos/config.js +199 -0
  206. package/lib/components/eftposPay/eftpos/const.d.ts +10 -0
  207. package/lib/components/eftposPay/eftpos/const.js +165 -0
  208. package/lib/components/eftposPay/eftpos/index.d.ts +7 -0
  209. package/lib/components/eftposPay/eftpos/index.js +66 -0
  210. package/lib/components/eftposPay/helper.d.ts +3 -0
  211. package/lib/components/eftposPay/helper.js +62 -0
  212. package/lib/components/eftposPay/hooks.d.ts +4 -0
  213. package/lib/components/eftposPay/hooks.js +237 -0
  214. package/lib/components/eftposPay/index.d.ts +7 -0
  215. package/lib/components/eftposPay/index.js +189 -0
  216. package/lib/components/eftposPay/index.less +273 -0
  217. package/lib/components/eftposPay/locales.d.ts +264 -0
  218. package/lib/components/eftposPay/locales.js +304 -0
  219. package/lib/components/eftposPay/manufacturer.d.ts +6 -0
  220. package/lib/components/eftposPay/manufacturer.js +77 -0
  221. package/lib/components/eftposPay/pay.d.ts +10 -0
  222. package/lib/components/eftposPay/pay.js +120 -0
  223. package/lib/components/eftposPay/payo/config.d.ts +11 -0
  224. package/lib/components/eftposPay/payo/config.js +377 -0
  225. package/lib/components/eftposPay/payo/const.d.ts +6 -0
  226. package/lib/components/eftposPay/payo/const.js +112 -0
  227. package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
  228. package/lib/components/eftposPay/payo/hooks.js +80 -0
  229. package/lib/components/eftposPay/payo/index.d.ts +7 -0
  230. package/lib/components/eftposPay/payo/index.js +63 -0
  231. package/lib/components/eftposPay/store/index.d.ts +239 -0
  232. package/lib/components/eftposPay/store/index.js +371 -0
  233. package/lib/components/eftposPay/store/useThunkReducer.d.ts +9 -0
  234. package/lib/components/eftposPay/store/useThunkReducer.js +53 -0
  235. package/lib/components/eftposPay/windcave/action.d.ts +8 -0
  236. package/lib/components/eftposPay/windcave/action.js +143 -0
  237. package/lib/components/eftposPay/windcave/const.d.ts +104 -0
  238. package/lib/components/eftposPay/windcave/const.js +300 -0
  239. package/lib/components/eftposPay/windcave/helper.d.ts +9 -0
  240. package/lib/components/eftposPay/windcave/helper.js +378 -0
  241. package/lib/components/eftposPay/windcave/hook.d.ts +14 -0
  242. package/lib/components/eftposPay/windcave/hook.js +139 -0
  243. package/lib/components/eftposPay/windcave/index.d.ts +8 -0
  244. package/lib/components/eftposPay/windcave/index.js +78 -0
  245. package/lib/components/eftposPay/windcave/pos.d.ts +8 -0
  246. package/lib/components/eftposPay/windcave/pos.js +197 -0
  247. package/lib/components/eftposPay/windcave/pwd.d.ts +8 -0
  248. package/lib/components/eftposPay/windcave/pwd.js +143 -0
  249. package/lib/components/eftposPay/windcave/receipet.d.ts +6 -0
  250. package/lib/components/eftposPay/windcave/receipet.js +93 -0
  251. package/lib/components/eftposPay/windcave/receiptAction.d.ts +11 -0
  252. package/lib/components/eftposPay/windcave/receiptAction.js +386 -0
  253. package/lib/components/eftposPay/windcave/timer.d.ts +17 -0
  254. package/lib/components/eftposPay/windcave/timer.js +126 -0
  255. package/lib/components/eftposPay/windcave/wait.d.ts +12 -0
  256. package/lib/components/eftposPay/windcave/wait.js +163 -0
  257. package/lib/components/eftposPay/windcave/windcave.d.ts +6 -0
  258. package/lib/components/eftposPay/windcave/windcave.js +283 -0
  259. package/lib/components/schedules/index.d.ts +1 -1
  260. package/lib/components/schedules/model.d.ts +1 -2
  261. package/lib/hooks/usePrefix.d.ts +1 -0
  262. package/lib/hooks/usePrefix.js +44 -0
  263. package/lib/index.d.ts +2 -0
  264. package/lib/index.js +6 -0
  265. package/lowcode/eftpos/meta.ts +187 -0
  266. package/lowcode/eftpos-pay/meta.ts +122 -0
  267. package/package.json +4 -3
@@ -0,0 +1,43 @@
1
+ /* eslint-disable no-nested-ternary */
2
+ import { locales } from '@pisell/utils';
3
+ import { Button } from 'antd';
4
+ import React, { useEffect } from 'react';
5
+ import { useDispatch, useContextData, updateState, updateComponent } from "../../store";
6
+ import Header from "../header";
7
+ export default (function (_ref) {
8
+ var _ref$className = _ref.className,
9
+ className = _ref$className === void 0 ? '' : _ref$className;
10
+ var _useContextData = useContextData(),
11
+ lastComponent = _useContextData.lastComponent,
12
+ mode = _useContextData.mode;
13
+ var dispatch = useDispatch();
14
+ var onManually = function onManually() {
15
+ dispatch(updateState({
16
+ manual: {
17
+ title: locales.getText('page.eftpos-pay.text.request.unknown.title')(mode),
18
+ text: locales.getText('page.eftpos-pay.text.request.unknown.text')(mode)
19
+ }
20
+ }));
21
+ dispatch(updateComponent('Manual'));
22
+ };
23
+ useEffect(function () {
24
+ if (lastComponent === 'Network') {
25
+ dispatch(updateComponent(''));
26
+ }
27
+ }, [lastComponent]);
28
+ return /*#__PURE__*/React.createElement("div", {
29
+ className: "pisell-lowcode__eft-pay-box ".concat(className)
30
+ }, /*#__PURE__*/React.createElement(Header, {
31
+ status: "warn"
32
+ }), /*#__PURE__*/React.createElement("div", {
33
+ className: "pisell-lowcode__eft-pay-fail-title"
34
+ }, locales.getText('page.eftpos-pay.text.unknown.title')(mode)), /*#__PURE__*/React.createElement("div", {
35
+ className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body"
36
+ }, locales.getText('page.eftpos-pay.text.unknown.text')(mode)), /*#__PURE__*/React.createElement("div", {
37
+ className: "pisell-lowcode__eft-pay-step-item-btns"
38
+ }, /*#__PURE__*/React.createElement(Button, {
39
+ block: true,
40
+ className: "pisell-lowcode__eft-pay-step-item-btn",
41
+ onClick: onManually
42
+ }, locales.getText('page.eftpos-pay.text.manual.marking'))));
43
+ });
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { StatusType } from '../../const';
3
+ import './index.less';
4
+ declare const _default: ({ status, title, children }: {
5
+ status: StatusType;
6
+ title?: string | undefined;
7
+ children?: React.ReactNode;
8
+ }) => React.JSX.Element;
9
+ export default _default;
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import usePrefix from "../../../../hooks/usePrefix";
3
+ import { StatusEnum } from "../../const";
4
+ import "./index.less";
5
+ var Icon = function Icon(_ref) {
6
+ var status = _ref.status;
7
+ var prefix = usePrefix();
8
+ if (status === StatusEnum.Loading) {
9
+ return /*#__PURE__*/React.createElement("div", {
10
+ style: {
11
+ backgroundImage: "url(".concat(prefix, "/loading.png)")
12
+ },
13
+ className: "pisell-lowcode__eft-pay-img pisell-lowcode__eft-pay-load"
14
+ });
15
+ }
16
+ if (status === StatusEnum.Success) {
17
+ return /*#__PURE__*/React.createElement("div", {
18
+ style: {
19
+ backgroundImage: "url(".concat(prefix, "/success.png)")
20
+ },
21
+ className: "pisell-lowcode__eft-pay-img " // pisell-lowcode__eft-pay-success
22
+ });
23
+ }
24
+
25
+ if (status === StatusEnum.Fail) {
26
+ return /*#__PURE__*/React.createElement("div", {
27
+ style: {
28
+ backgroundImage: "url(".concat(prefix, "/error.png)")
29
+ },
30
+ className: "pisell-lowcode__eft-pay-img " // pisell-lowcode__eft-pay-fail
31
+ });
32
+ }
33
+
34
+ if (status === StatusEnum.Warn) {
35
+ return /*#__PURE__*/React.createElement("div", {
36
+ style: {
37
+ backgroundImage: "url(".concat(prefix, "/warn.png)")
38
+ },
39
+ className: "pisell-lowcode__eft-pay-img " // pisell-lowcode__eft-pay-warn
40
+ });
41
+ }
42
+
43
+ if (status === StatusEnum.Question) {
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ style: {
46
+ backgroundImage: "url(".concat(prefix, "/question.png)")
47
+ },
48
+ className: "pisell-lowcode__eft-pay-img " // pisell-lowcode__eft-pay-warn
49
+ });
50
+ }
51
+
52
+ return null;
53
+ };
54
+ export default (function (_ref2) {
55
+ var status = _ref2.status,
56
+ _ref2$title = _ref2.title,
57
+ title = _ref2$title === void 0 ? '' : _ref2$title,
58
+ children = _ref2.children;
59
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
60
+ className: "pisell-lowcode__eft-pay-icon"
61
+ }, /*#__PURE__*/React.createElement(Icon, {
62
+ status: status
63
+ }), children), title ? /*#__PURE__*/React.createElement("div", {
64
+ className: "pisell-lowcode__eft-pay-title"
65
+ }, title) : null);
66
+ });
@@ -0,0 +1,44 @@
1
+ .pisell-lowcode__eft-pay-icon {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ height: 120px;
6
+ margin: 0 0 24px 0;
7
+ flex-shrink: 0;
8
+ position: relative;
9
+ }
10
+ .pisell-lowcode__eft-pay-title {
11
+ color: var(--gray-900, #101828);
12
+
13
+ font-size: 18px;
14
+ font-style: normal;
15
+ font-weight: 600;
16
+ line-height: 28px; /* 155.556% */
17
+ }
18
+ .pisell-lowcode__eft-pay-img {
19
+ width: 120px;
20
+ height: 120px;
21
+ background-repeat: no-repeat;
22
+ background-position: center;
23
+ background-size: contain;
24
+ }
25
+ .pisell-lowcode__eft-pay-load {
26
+ animation: spin 1s linear infinite;
27
+ }
28
+ // .pisell-lowcode__eft-pay-success{
29
+
30
+ // }
31
+ // .pisell-lowcode__eft-pay-warn{
32
+
33
+ // }
34
+ // .pisell-lowcode__eft-pay-fail{
35
+
36
+ // }
37
+ @keyframes spin {
38
+ from {
39
+ transform: rotate(0deg);
40
+ }
41
+ to {
42
+ transform: rotate(360deg);
43
+ }
44
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import './titlebar.less';
3
+ declare enum EPopupTitleBarVariantType {
4
+ BackTitleClose = "back-title-cancel",
5
+ LeftTitleClose = "left-title-close"
6
+ }
7
+ declare const _default: ({ type, children, onBack, onClose, }: {
8
+ type?: "back-title-cancel" | "left-title-close" | undefined;
9
+ children: string;
10
+ onBack?: (() => void) | undefined;
11
+ onClose?: (() => void) | undefined;
12
+ }) => React.JSX.Element;
13
+ export default _default;
@@ -0,0 +1,39 @@
1
+ /* eslint-disable import/order */
2
+ /* eslint-disable no-nested-ternary */
3
+ import React from 'react';
4
+ import "./titlebar.less";
5
+ import XClose from '@pisell/icon/es/XClose';
6
+ import LeftOutlined from '@ant-design/icons/LeftOutlined';
7
+ var EPopupTitleBarVariantType;
8
+ (function (EPopupTitleBarVariantType) {
9
+ EPopupTitleBarVariantType["BackTitleClose"] = "back-title-cancel";
10
+ EPopupTitleBarVariantType["LeftTitleClose"] = "left-title-close";
11
+ })(EPopupTitleBarVariantType || (EPopupTitleBarVariantType = {}));
12
+ export default (function (_ref) {
13
+ var _ref$type = _ref.type,
14
+ type = _ref$type === void 0 ? EPopupTitleBarVariantType.LeftTitleClose : _ref$type,
15
+ children = _ref.children,
16
+ onBack = _ref.onBack,
17
+ onClose = _ref.onClose;
18
+ return /*#__PURE__*/React.createElement("div", {
19
+ className: "pisell-lowcode__eft-pay-header",
20
+ style: type === EPopupTitleBarVariantType.LeftTitleClose ? {
21
+ justifyContent: 'space-between'
22
+ } : type === EPopupTitleBarVariantType.BackTitleClose ? {
23
+ justifyContent: 'space-between'
24
+ } : {}
25
+ }, type === EPopupTitleBarVariantType.BackTitleClose ? /*#__PURE__*/React.createElement(LeftOutlined, {
26
+ style: {
27
+ fontSize: '24px'
28
+ },
29
+ onClick: onBack
30
+ }) : null, /*#__PURE__*/React.createElement("div", {
31
+ className: "pisell-lowcode__eft-pay-header-title"
32
+ }, children), /*#__PURE__*/React.createElement(XClose, {
33
+ size: 20,
34
+ style: {
35
+ fontSize: '24px'
36
+ },
37
+ onClick: onClose
38
+ }));
39
+ });
@@ -0,0 +1,17 @@
1
+ .pisell-lowcode__eft-pay-header {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ padding: 24px 0 20px;
6
+ flex-shrink: 0;
7
+ }
8
+ .pisell-lowcode__eft-pay-header-title {
9
+ color: var(--gray-900, #101828);
10
+
11
+ /* Text lg/Semibold */
12
+
13
+ font-size: 18px;
14
+ font-style: normal;
15
+ font-weight: 600;
16
+ line-height: 28px; /* 155.556% */
17
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ActionProps } from '../../const';
3
+ import './index.less';
4
+ declare const _default: ({ onChange, className }: ActionProps) => React.JSX.Element;
5
+ export default _default;
@@ -0,0 +1,91 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import { locales } from '@pisell/utils';
14
+ import { Button } from 'antd';
15
+ import React, { useState } from 'react';
16
+ import usePrefix from "../../../../hooks/usePrefix";
17
+ import { ModeEnum } from "../../const";
18
+ import { useContextData } from "../../store";
19
+ import "./index.less";
20
+ export default (function (_ref) {
21
+ var onChange = _ref.onChange,
22
+ _ref$className = _ref.className,
23
+ className = _ref$className === void 0 ? '' : _ref$className;
24
+ var _useContextData = useContextData(),
25
+ manual = _useContextData.manual,
26
+ custom = _useContextData.custom,
27
+ mode = _useContextData.mode,
28
+ device = _useContextData.device;
29
+ var _useState = useState(false),
30
+ _useState2 = _slicedToArray(_useState, 2),
31
+ disabled = _useState2[0],
32
+ setDisabled = _useState2[1];
33
+ var prefix = usePrefix();
34
+ var onSuccess = function onSuccess() {
35
+ setDisabled(true);
36
+ if (mode === ModeEnum.Pay) {
37
+ var obj = (custom === null || custom === void 0 ? void 0 : custom.pay) || {};
38
+ onChange('success', _objectSpread(_objectSpread({}, obj), {}, {
39
+ number: custom === null || custom === void 0 ? void 0 : custom.number,
40
+ device: device
41
+ }));
42
+ return;
43
+ }
44
+ if (mode === ModeEnum.Refund) {
45
+ var _obj = (custom === null || custom === void 0 ? void 0 : custom.refund) || {};
46
+ onChange('success', _objectSpread(_objectSpread({}, _obj), {}, {
47
+ number: custom === null || custom === void 0 ? void 0 : custom.number,
48
+ device: device
49
+ }));
50
+ return;
51
+ }
52
+ onChange('success', {
53
+ number: custom === null || custom === void 0 ? void 0 : custom.number
54
+ });
55
+ };
56
+ var onFail = function onFail() {
57
+ setDisabled(true);
58
+ onChange('fail');
59
+ };
60
+ return /*#__PURE__*/React.createElement("div", {
61
+ className: "pisell-lowcode__eft-pay-manual ".concat(className)
62
+ }, /*#__PURE__*/React.createElement("div", {
63
+ className: "pisell-lowcode__eft-pay-manual-title"
64
+ }, manual === null || manual === void 0 ? void 0 : manual.title), /*#__PURE__*/React.createElement("div", {
65
+ className: "pisell-lowcode__eft-pay-manual-txt"
66
+ }, manual === null || manual === void 0 ? void 0 : manual.text), /*#__PURE__*/React.createElement("div", {
67
+ className: "pisell-lowcode__eft-pay-manual-card-box"
68
+ }, /*#__PURE__*/React.createElement("div", {
69
+ className: "pisell-lowcode__eft-pay-manual-card"
70
+ }, /*#__PURE__*/React.createElement("div", {
71
+ className: "pisell-lowcode__eft-pay-manual-img",
72
+ style: {
73
+ backgroundImage: "url(".concat(prefix, "/pay_success.png)")
74
+ }
75
+ }), /*#__PURE__*/React.createElement(Button, {
76
+ onClick: onSuccess,
77
+ className: "pisell-lowcode__eft-pay-manual-btn",
78
+ disabled: disabled
79
+ }, locales.getText('page.eftpos-pay.text.successful')(mode))), /*#__PURE__*/React.createElement("div", {
80
+ className: "pisell-lowcode__eft-pay-manual-card"
81
+ }, /*#__PURE__*/React.createElement("div", {
82
+ className: "pisell-lowcode__eft-pay-manual-img",
83
+ style: {
84
+ backgroundImage: "url(".concat(prefix, "/pay_error.png)")
85
+ }
86
+ }), /*#__PURE__*/React.createElement(Button, {
87
+ onClick: onFail,
88
+ className: "pisell-lowcode__eft-pay-manual-btn",
89
+ disabled: disabled
90
+ }, locales.getText('page.eftpos-pay.text.failed')(mode)))));
91
+ });
@@ -0,0 +1,96 @@
1
+ .pisell-lowcode__eft-pay-manual{
2
+ padding: var(--pisel-lc-pos-manual-padding, 24px);
3
+ width: var(--pisel-lc-pos-manual-width, fit-content);
4
+ }
5
+
6
+ .pisell-lowcode__eft-pay-manual-title {
7
+ color: var(--text-text_1, #1b1b1b);
8
+
9
+ /* H6/Semi Bold */
10
+
11
+ font-size: 16px;
12
+ font-style: normal;
13
+ font-weight: 600;
14
+ line-height: 22px; /* 137.5% */
15
+ }
16
+ .pisell-lowcode__eft-pay-manual-txt {
17
+ color: var(--text-text_1, #1b1b1b);
18
+ /* Paragraph/Regular */
19
+
20
+ font-size: 14px;
21
+ font-style: normal;
22
+ font-weight: 400;
23
+ line-height: 20px; /* 142.857% */
24
+ }
25
+
26
+ .pisell-lowcode__eft-pay-manual-card-box {
27
+ display: flex;
28
+ flex-direction: row;
29
+ align-items: center;
30
+ gap: 10px;
31
+ margin-top: 20px;
32
+ flex-wrap: nowrap;
33
+ }
34
+ .pisell-lowcode__eft-pay-manual-card {
35
+ display: flex;
36
+ padding: 20px 10px;
37
+ flex-direction: column;
38
+ justify-content: center;
39
+ align-items: center;
40
+ gap: 30px;
41
+ align-self: stretch;
42
+ border-radius: 20px;
43
+ border: 1px solid var(--surface-surface_3, #c6c6c6);
44
+ position: relative;
45
+ z-index: 1;
46
+ }
47
+ .pisell-lowcode__eft-pay-manual-img {
48
+ width: 160px;
49
+ height: 160px;
50
+ background-repeat: no-repeat;
51
+ background-position: center;
52
+ background-size: cover;
53
+ }
54
+ .pisell-lowcode__eft-pay-manual-card-box{
55
+ flex: 1;
56
+ overflow: auto;
57
+ }
58
+
59
+ @media only screen and (max-width: 400px) {
60
+ .pisell-lowcode__eft-pay-manual-card-box {
61
+ gap:10px;
62
+ }
63
+ .pisell-lowcode__eft-pay-manual-card {
64
+ flex: 1;
65
+ padding: 8px;
66
+ }
67
+ .pisell-lowcode__eft-pay-manual-img {
68
+ width: 110px;
69
+ height: 150px;
70
+ }
71
+ .pisell-lowcode__eft-pay-manual-card .pisell-lowcode__eft-pay-manual-btn{
72
+ font-size: 12px !important;
73
+ }
74
+ }
75
+
76
+
77
+ @media only screen and (min-width: 401px) and (max-width: 820px) {
78
+ .pisell-lowcode__eft-pay-manual-card-box {
79
+ flex-direction: column;
80
+ }
81
+ .pisell-lowcode__eft-pay-manual-card {
82
+ width: 100%;
83
+ }
84
+
85
+ }
86
+
87
+ @media only screen and (min-width: 821px) {
88
+ .pisell-lowcode__eft-pay-manual-card-box {
89
+ margin: 24px auto 0;
90
+ gap: 20px;
91
+ width: 100%;
92
+ }
93
+ .pisell-lowcode__eft-pay-manual-card {
94
+ flex: 1;
95
+ }
96
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ActionProps } from '../../const';
3
+ declare const _default: ({ api, className }: ActionProps) => React.JSX.Element;
4
+ export default _default;
@@ -0,0 +1,63 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { locales } from '@pisell/utils';
8
+ import { Button } from 'antd';
9
+ import React, { useState } from 'react';
10
+ import { useContextData, useDispatch, updateNextStep, updateComponent } from "../../store";
11
+ import Header from "../header";
12
+ export default (function (_ref) {
13
+ var api = _ref.api,
14
+ _ref$className = _ref.className,
15
+ className = _ref$className === void 0 ? '' : _ref$className;
16
+ var dispatch = useDispatch();
17
+ var _useContextData = useContextData(),
18
+ custom = _useContextData.custom,
19
+ mode = _useContextData.mode;
20
+ var _useState = useState(false),
21
+ _useState2 = _slicedToArray(_useState, 2),
22
+ disabled = _useState2[0],
23
+ setDisabled = _useState2[1];
24
+ var onBack = function onBack() {
25
+ dispatch(updateComponent(''));
26
+ };
27
+ var onConfirm = function onConfirm() {
28
+ setDisabled(true);
29
+ api.update({
30
+ type: 'NO',
31
+ number: custom === null || custom === void 0 ? void 0 : custom.number
32
+ }).then(function () {
33
+ setDisabled(false);
34
+ dispatch(updateComponent(''));
35
+ // 取消接口
36
+ dispatch(updateNextStep());
37
+ }).catch(function (res) {
38
+ setDisabled(false);
39
+ console.log(res);
40
+ });
41
+ };
42
+ return /*#__PURE__*/React.createElement("div", {
43
+ className: "pisell-lowcode__eft-pay-box ".concat(className)
44
+ }, /*#__PURE__*/React.createElement(Header, {
45
+ status: "warn"
46
+ }), /*#__PURE__*/React.createElement("div", {
47
+ className: "pisell-lowcode__eft-pay-fail-title"
48
+ }, locales.getText('page.eftpos-pay.text.signature.title')), /*#__PURE__*/React.createElement("div", {
49
+ className: "pisell-lowcode__eft-pay-warn-text pisell-lowcode__eft-pay-body"
50
+ }, locales.getText('page.eftpos-pay.text.signature.text')(mode)), /*#__PURE__*/React.createElement("div", {
51
+ className: "pisell-lowcode__eft-pay-step-item-btns"
52
+ }, /*#__PURE__*/React.createElement(Button, {
53
+ block: true,
54
+ className: "pisell-lowcode__eft-pay-step-item-btn",
55
+ onClick: onBack
56
+ }, locales.getText('page.eftpos-pay.text.back')), /*#__PURE__*/React.createElement(Button, {
57
+ block: true,
58
+ className: "pisell-lowcode__eft-pay-step-item-btn",
59
+ type: "primary",
60
+ onClick: onConfirm,
61
+ disabled: disabled
62
+ }, locales.getText('page.eftpos-pay.text.confirm.decline'))));
63
+ });
@@ -0,0 +1,12 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { StatusType } from '../../const';
3
+ declare const _default: (props: {
4
+ status: StatusType;
5
+ warn?: ReactNode;
6
+ text?: ReactNode;
7
+ tip?: ReactNode;
8
+ loading?: ReactNode;
9
+ success?: ReactNode;
10
+ fail?: ReactNode;
11
+ }) => React.JSX.Element;
12
+ export default _default;
@@ -0,0 +1,31 @@
1
+ /* eslint-disable react/no-unused-prop-types */
2
+ import { CheckCircleFilled } from '@ant-design/icons';
3
+ import React from 'react';
4
+ import { StatusEnum } from "../../const";
5
+ export default (function (props) {
6
+ var status = props.status,
7
+ warn = props.warn,
8
+ text = props.text,
9
+ tip = props.tip;
10
+ var txt = '';
11
+ if ((status === StatusEnum.Loading || status === StatusEnum.Success || status === StatusEnum.Fail) && props[status]) {
12
+ txt = props[status];
13
+ } else {
14
+ txt = text;
15
+ }
16
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
17
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-".concat(status)
18
+ }, txt, status === StatusEnum.Success ? /*#__PURE__*/React.createElement(CheckCircleFilled, {
19
+ color: "#1B945C",
20
+ style: {
21
+ color: '#1B945C',
22
+ fontSize: '24px',
23
+ verticalAlign: 'middle',
24
+ margin: '0 0 0 4px'
25
+ }
26
+ }) : null), status === StatusEnum.Loading && tip ? /*#__PURE__*/React.createElement("div", {
27
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
28
+ }, tip) : null, status === StatusEnum.Warn && warn ? /*#__PURE__*/React.createElement("div", {
29
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-".concat(status)
30
+ }, warn) : null);
31
+ });
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from 'react';
2
+ declare const _default: (props: {
3
+ status: string;
4
+ pedding?: ReactNode;
5
+ resolve?: ReactNode;
6
+ reject?: ReactNode;
7
+ className?: string | undefined;
8
+ }) => React.JSX.Element;
9
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /* eslint-disable no-nested-ternary */
2
+ /* eslint-disable react/no-unused-prop-types */
3
+ import { CheckCircleFilled } from '@ant-design/icons';
4
+ import React from 'react';
5
+ export default (function (props) {
6
+ var className = props.className,
7
+ status = props.status,
8
+ pedding = props.pedding,
9
+ resolve = props.resolve,
10
+ reject = props.reject;
11
+ var txt = status === 'pedding' ? pedding : status === 'resolve' ? resolve : reject;
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-".concat(status, " ").concat(className || '')
14
+ }, txt || pedding, status === 'resolve' ? /*#__PURE__*/React.createElement(CheckCircleFilled, {
15
+ color: "#1B945C",
16
+ style: {
17
+ color: '#1B945C',
18
+ fontSize: '24px',
19
+ verticalAlign: 'middle',
20
+ margin: '0 0 0 4px'
21
+ }
22
+ }) : null);
23
+ });