@pisell/private-materials 3.0.136 → 3.0.138

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 (219) 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 +12 -12
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/forms/single/index.js +3 -0
  12. package/es/components/eftpos/const.d.ts +26 -0
  13. package/es/components/eftpos/const.js +40 -8
  14. package/es/components/eftpos/device.d.ts +3 -2
  15. package/es/components/eftpos/device.js +6 -5
  16. package/es/components/eftpos/form/index.d.ts +5 -0
  17. package/es/components/eftpos/form/index.js +8 -0
  18. package/es/components/eftpos/hooks.d.ts +34 -0
  19. package/es/components/{eftposPay/windcave/hook.js → eftpos/hooks.js} +96 -122
  20. package/es/components/eftpos/icon/apiKey.d.ts +5 -0
  21. package/es/components/eftpos/icon/apiKey.js +17 -0
  22. package/es/components/eftpos/icon/device.d.ts +5 -0
  23. package/es/components/eftpos/icon/device.js +19 -0
  24. package/es/components/eftpos/index.d.ts +10 -0
  25. package/es/components/eftpos/index.js +329 -46
  26. package/es/components/eftpos/index.less +38 -1
  27. package/es/components/eftpos/locales.d.ts +12 -0
  28. package/es/components/eftpos/locales.js +15 -3
  29. package/es/components/eftpos/log.d.ts +8 -0
  30. package/es/components/eftpos/log.js +85 -0
  31. package/es/components/eftpos/pos.d.ts +1 -1
  32. package/es/components/eftpos/pos.js +8 -5
  33. package/es/components/eftpos/surcharge/index.d.ts +25 -2
  34. package/es/components/eftpos/surcharge/index.js +100 -16
  35. package/es/components/eftpos/table.d.ts +4 -0
  36. package/es/components/eftpos/table.js +102 -10
  37. package/es/components/eftposPay/amount.d.ts +7 -1
  38. package/es/components/eftposPay/amount.js +65 -38
  39. package/es/components/eftposPay/component/fail/failCustom.js +65 -20
  40. package/es/components/eftposPay/component/fail/index.js +60 -30
  41. package/es/components/eftposPay/component/fail/network.d.ts +5 -0
  42. package/es/components/eftposPay/component/fail/network.js +13 -0
  43. package/es/components/eftposPay/component/fail/unknow.d.ts +6 -0
  44. package/es/components/eftposPay/component/fail/unknow.js +18 -3
  45. package/es/components/eftposPay/component/header/index.d.ts +2 -1
  46. package/es/components/eftposPay/component/header/index.js +4 -1
  47. package/es/components/eftposPay/component/header/index.less +1 -10
  48. package/es/components/eftposPay/component/manual/index.d.ts +6 -1
  49. package/es/components/eftposPay/component/manual/index.js +174 -23
  50. package/es/components/eftposPay/component/manual/index.less +42 -14
  51. package/es/components/eftposPay/component/signature/index.d.ts +5 -0
  52. package/es/components/eftposPay/component/signature/index.js +20 -2
  53. package/es/components/eftposPay/component/step/index.d.ts +7 -7
  54. package/es/components/eftposPay/component/step/step.d.ts +4 -4
  55. package/es/components/eftposPay/const.d.ts +19 -4
  56. package/es/components/eftposPay/const.js +4 -2
  57. package/es/components/eftposPay/device.d.ts +7 -0
  58. package/es/components/eftposPay/device.js +22 -0
  59. package/es/components/eftposPay/helper.d.ts +54 -0
  60. package/es/components/eftposPay/helper.js +93 -1
  61. package/es/components/eftposPay/hooks.d.ts +30 -1
  62. package/es/components/eftposPay/hooks.js +181 -26
  63. package/es/components/eftposPay/index.d.ts +2 -4
  64. package/es/components/eftposPay/index.js +119 -31
  65. package/es/components/eftposPay/index.less +27 -19
  66. package/es/components/eftposPay/locales.d.ts +45 -0
  67. package/es/components/eftposPay/locales.js +348 -3
  68. package/es/components/eftposPay/manufacturer.d.ts +2 -2
  69. package/es/components/eftposPay/manufacturer.js +9 -10
  70. package/es/components/eftposPay/pay.d.ts +10 -1
  71. package/es/components/eftposPay/pay.js +112 -34
  72. package/es/components/eftposPay/payo/config.js +137 -270
  73. package/es/components/eftposPay/payo/const.d.ts +22 -2
  74. package/es/components/eftposPay/payo/const.js +83 -33
  75. package/es/components/eftposPay/payo/hooks.d.ts +5 -0
  76. package/es/components/eftposPay/payo/hooks.js +19 -2
  77. package/es/components/eftposPay/store/index.d.ts +154 -53
  78. package/es/components/eftposPay/store/index.js +112 -60
  79. package/es/components/eftposPay/tyro/const.d.ts +17 -0
  80. package/es/components/eftposPay/{eftpos → tyro}/const.js +71 -90
  81. package/es/components/eftposPay/tyro/hooks.d.ts +14 -0
  82. package/es/components/eftposPay/tyro/hooks.js +40 -0
  83. package/es/components/eftposPay/tyro/index.d.ts +9 -0
  84. package/es/components/eftposPay/tyro/index.js +575 -0
  85. package/es/components/eftposPay/windcave/const.d.ts +24 -9
  86. package/es/components/eftposPay/windcave/const.js +90 -81
  87. package/es/components/eftposPay/windcave/helper.d.ts +16 -2
  88. package/es/components/eftposPay/windcave/helper.js +175 -42
  89. package/es/components/eftposPay/windcave/receiptAction.d.ts +12 -0
  90. package/es/components/eftposPay/windcave/receiptAction.js +91 -43
  91. package/es/components/eftposPay/windcave/timer.d.ts +13 -1
  92. package/es/components/eftposPay/windcave/timer.js +18 -1
  93. package/es/components/eftposPay/windcave/windcave.d.ts +2 -1
  94. package/es/components/eftposPay/windcave/windcave.js +155 -139
  95. package/es/utils/load.d.ts +11 -0
  96. package/es/utils/load.js +85 -0
  97. package/lib/components/booking/forms/single/index.js +1 -0
  98. package/lib/components/eftpos/const.d.ts +26 -0
  99. package/lib/components/eftpos/const.js +13 -1
  100. package/lib/components/eftpos/device.d.ts +3 -2
  101. package/lib/components/eftpos/device.js +2 -2
  102. package/lib/components/eftpos/form/index.d.ts +5 -0
  103. package/lib/components/eftpos/hooks.d.ts +34 -0
  104. package/lib/components/eftpos/hooks.js +106 -0
  105. package/lib/components/eftpos/icon/apiKey.d.ts +5 -0
  106. package/lib/components/eftpos/icon/apiKey.js +57 -0
  107. package/lib/components/eftpos/icon/device.d.ts +5 -0
  108. package/lib/components/eftpos/icon/device.js +57 -0
  109. package/lib/components/eftpos/index.d.ts +10 -0
  110. package/lib/components/eftpos/index.js +262 -97
  111. package/lib/components/eftpos/index.less +38 -1
  112. package/lib/components/eftpos/locales.d.ts +12 -0
  113. package/lib/components/eftpos/locales.js +15 -3
  114. package/lib/components/eftpos/log.d.ts +8 -0
  115. package/lib/components/eftpos/log.js +87 -0
  116. package/lib/components/eftpos/pos.d.ts +1 -1
  117. package/lib/components/eftpos/pos.js +5 -4
  118. package/lib/components/eftpos/surcharge/index.d.ts +25 -2
  119. package/lib/components/eftpos/surcharge/index.js +36 -6
  120. package/lib/components/eftpos/table.d.ts +4 -0
  121. package/lib/components/eftpos/table.js +40 -8
  122. package/lib/components/eftposPay/amount.d.ts +7 -1
  123. package/lib/components/eftposPay/amount.js +10 -33
  124. package/lib/components/eftposPay/component/fail/failCustom.js +27 -6
  125. package/lib/components/eftposPay/component/fail/index.js +39 -18
  126. package/lib/components/eftposPay/component/fail/network.d.ts +5 -0
  127. package/lib/components/eftposPay/component/fail/unknow.d.ts +6 -0
  128. package/lib/components/eftposPay/component/fail/unknow.js +3 -3
  129. package/lib/components/eftposPay/component/header/index.d.ts +2 -1
  130. package/lib/components/eftposPay/component/header/index.js +2 -1
  131. package/lib/components/eftposPay/component/header/index.less +1 -10
  132. package/lib/components/eftposPay/component/manual/index.d.ts +6 -1
  133. package/lib/components/eftposPay/component/manual/index.js +122 -31
  134. package/lib/components/eftposPay/component/manual/index.less +42 -14
  135. package/lib/components/eftposPay/component/signature/index.d.ts +5 -0
  136. package/lib/components/eftposPay/component/signature/index.js +2 -2
  137. package/lib/components/eftposPay/component/step/index.d.ts +7 -7
  138. package/lib/components/eftposPay/component/step/step.d.ts +4 -4
  139. package/lib/components/eftposPay/const.d.ts +19 -4
  140. package/lib/components/eftposPay/const.js +3 -1
  141. package/lib/components/eftposPay/device.d.ts +7 -0
  142. package/lib/components/eftposPay/helper.d.ts +54 -0
  143. package/lib/components/eftposPay/helper.js +64 -0
  144. package/lib/components/eftposPay/hooks.d.ts +30 -1
  145. package/lib/components/eftposPay/hooks.js +182 -44
  146. package/lib/components/eftposPay/index.d.ts +2 -4
  147. package/lib/components/eftposPay/index.js +74 -27
  148. package/lib/components/eftposPay/index.less +27 -19
  149. package/lib/components/eftposPay/locales.d.ts +45 -0
  150. package/lib/components/eftposPay/locales.js +352 -3
  151. package/lib/components/eftposPay/manufacturer.d.ts +2 -2
  152. package/lib/components/eftposPay/manufacturer.js +13 -13
  153. package/lib/components/eftposPay/pay.d.ts +10 -1
  154. package/lib/components/eftposPay/pay.js +86 -25
  155. package/lib/components/eftposPay/payo/config.js +121 -268
  156. package/lib/components/eftposPay/payo/const.d.ts +22 -2
  157. package/lib/components/eftposPay/payo/const.js +55 -36
  158. package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
  159. package/lib/components/eftposPay/payo/hooks.js +1 -1
  160. package/lib/components/eftposPay/store/index.d.ts +154 -53
  161. package/lib/components/eftposPay/store/index.js +7 -66
  162. package/lib/components/eftposPay/tyro/const.d.ts +17 -0
  163. package/lib/components/eftposPay/tyro/const.js +114 -0
  164. package/lib/components/eftposPay/tyro/hooks.d.ts +14 -0
  165. package/lib/components/eftposPay/{eftpos/index.js → tyro/hooks.js} +31 -36
  166. package/lib/components/eftposPay/tyro/index.d.ts +9 -0
  167. package/lib/components/eftposPay/tyro/index.js +558 -0
  168. package/lib/components/eftposPay/windcave/const.d.ts +24 -9
  169. package/lib/components/eftposPay/windcave/const.js +53 -104
  170. package/lib/components/eftposPay/windcave/helper.d.ts +16 -2
  171. package/lib/components/eftposPay/windcave/helper.js +163 -48
  172. package/lib/components/eftposPay/windcave/receiptAction.d.ts +12 -0
  173. package/lib/components/eftposPay/windcave/receiptAction.js +15 -47
  174. package/lib/components/eftposPay/windcave/timer.d.ts +13 -1
  175. package/lib/components/eftposPay/windcave/timer.js +5 -0
  176. package/lib/components/eftposPay/windcave/windcave.d.ts +2 -1
  177. package/lib/components/eftposPay/windcave/windcave.js +130 -130
  178. package/lib/utils/load.d.ts +11 -0
  179. package/lib/utils/load.js +100 -0
  180. package/lowcode/eftpos/meta.ts +202 -160
  181. package/lowcode/eftpos-pay/meta.ts +45 -12
  182. package/package.json +4 -4
  183. package/es/components/eftposPay/eftpos/config.d.ts +0 -11
  184. package/es/components/eftposPay/eftpos/config.js +0 -178
  185. package/es/components/eftposPay/eftpos/const.d.ts +0 -10
  186. package/es/components/eftposPay/eftpos/index.d.ts +0 -7
  187. package/es/components/eftposPay/eftpos/index.js +0 -35
  188. package/es/components/eftposPay/windcave/action.d.ts +0 -8
  189. package/es/components/eftposPay/windcave/action.js +0 -104
  190. package/es/components/eftposPay/windcave/hook.d.ts +0 -14
  191. package/es/components/eftposPay/windcave/index.d.ts +0 -8
  192. package/es/components/eftposPay/windcave/index.js +0 -49
  193. package/es/components/eftposPay/windcave/pos.d.ts +0 -8
  194. package/es/components/eftposPay/windcave/pos.js +0 -180
  195. package/es/components/eftposPay/windcave/pwd.d.ts +0 -8
  196. package/es/components/eftposPay/windcave/pwd.js +0 -124
  197. package/es/components/eftposPay/windcave/receipet.d.ts +0 -6
  198. package/es/components/eftposPay/windcave/receipet.js +0 -67
  199. package/es/components/eftposPay/windcave/wait.d.ts +0 -12
  200. package/es/components/eftposPay/windcave/wait.js +0 -139
  201. package/lib/components/eftposPay/eftpos/config.d.ts +0 -11
  202. package/lib/components/eftposPay/eftpos/config.js +0 -199
  203. package/lib/components/eftposPay/eftpos/const.d.ts +0 -10
  204. package/lib/components/eftposPay/eftpos/const.js +0 -165
  205. package/lib/components/eftposPay/eftpos/index.d.ts +0 -7
  206. package/lib/components/eftposPay/windcave/action.d.ts +0 -8
  207. package/lib/components/eftposPay/windcave/action.js +0 -143
  208. package/lib/components/eftposPay/windcave/hook.d.ts +0 -14
  209. package/lib/components/eftposPay/windcave/hook.js +0 -139
  210. package/lib/components/eftposPay/windcave/index.d.ts +0 -8
  211. package/lib/components/eftposPay/windcave/index.js +0 -78
  212. package/lib/components/eftposPay/windcave/pos.d.ts +0 -8
  213. package/lib/components/eftposPay/windcave/pos.js +0 -197
  214. package/lib/components/eftposPay/windcave/pwd.d.ts +0 -8
  215. package/lib/components/eftposPay/windcave/pwd.js +0 -143
  216. package/lib/components/eftposPay/windcave/receipet.d.ts +0 -6
  217. package/lib/components/eftposPay/windcave/receipet.js +0 -93
  218. package/lib/components/eftposPay/windcave/wait.d.ts +0 -12
  219. package/lib/components/eftposPay/windcave/wait.js +0 -163
@@ -1,136 +1,130 @@
1
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
+ var _excluded = ["order_id", "name", "symbol", "amount", "mode", "number", "pay", "device", "net"];
2
3
  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
4
  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
5
  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
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
7
  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); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
7
10
  import { locales } from '@pisell/utils';
8
- import React from 'react';
9
11
  import { EftposEnum, StatusEnum, PayRouteEnum, ModeEnum } from "../const";
10
- export var getStep = function getStep() {
11
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
12
- amount: '0',
13
- symbol: '',
12
+ /**
13
+ * @title: 初始化 windcave 数据
14
+ * @return store 全局数据管理
15
+ * @Author: hongbing.wang
16
+ * @Date: 2024-08-12 10:42
17
+ */
18
+ export default (function (params) {
19
+ var _ref = params || {
14
20
  mode: ModeEnum.Pay
15
21
  },
16
- amount = _ref.amount,
22
+ order_id = _ref.order_id,
23
+ name = _ref.name,
17
24
  symbol = _ref.symbol,
18
- mode = _ref.mode;
19
- return [{
20
- title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
21
- key: Date.now(),
22
- text: locales.getText('page.eftpos-pay.text.wait')(symbol + amount, mode),
23
- // 'Asked EFTPOS to accept payment for Purchase $100...',
24
- warn: '',
25
- tip: locales.getText('page.eftpos-pay.text.processing'),
26
- status: StatusEnum.Loading
27
- }, {
28
- title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
29
- key: Date.now(),
30
- text: locales.getText('page.eftpos-pay.text.pin'),
31
- warn: '',
32
- tip: locales.getText('page.eftpos-pay.text.processing'),
33
- status: StatusEnum.Loading
34
- }, {
35
- title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
36
- key: Date.now(),
37
- text: locales.getText('page.eftpos-pay.text.receipt'),
38
- warn: '',
39
- tip: locales.getText('page.eftpos-pay.text.processing'),
40
- status: StatusEnum.Loading
41
- }, {
42
- title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
43
- key: Date.now(),
44
- text: locales.getText('page.eftpos-pay.text.receipt.again.title'),
45
- warn: locales.getText('page.eftpos-pay.text.receipt.again.text'),
46
- tip: '',
47
- status: StatusEnum.Warn
48
- }, {
49
- title: locales.getText('page.eftpos-pay.text.loading')(mode || ModeEnum.Pay),
50
- key: Date.now(),
51
- text: locales.getText('page.eftpos-pay.text.waiting.processing'),
52
- success: 'Approade',
53
- warn: '',
54
- tip: locales.getText('page.eftpos-pay.text.processing'),
55
- status: StatusEnum.Loading
56
- }];
57
- };
58
- var getInitState = function getInitState(params) {
59
- if (typeof params.number !== 'undefined') {
60
- params.isPay = true;
61
- }
62
- return _objectSpread({
63
- mode: (params === null || params === void 0 ? void 0 : params.mode) || ModeEnum.Pay,
25
+ amount = _ref.amount,
26
+ mode = _ref.mode,
27
+ number = _ref.number,
28
+ pay = _ref.pay,
29
+ device = _ref.device,
30
+ net = _ref.net,
31
+ other = _objectWithoutProperties(_ref, _excluded);
32
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
33
+ order_id: order_id,
34
+ name: name,
35
+ symbol: symbol,
36
+ amount: amount,
37
+ mode: mode,
64
38
  eftpos: EftposEnum.Windcave,
65
39
  key: Date.now(),
66
40
  warn: '',
67
41
  step: 0,
68
42
  type: PayRouteEnum.Step,
69
- title: locales.getText('page.eftpos-pay.text.loading')((params === null || params === void 0 ? void 0 : params.mode) || ModeEnum.Pay),
43
+ title: locales.getText('page.eftpos-pay.text.loading')(mode),
70
44
  component: '',
71
45
  status: StatusEnum.Loading,
72
- steps: getStep(params),
73
- custom: params ? _objectSpread(_objectSpread({}, params), {}, {
46
+ steps: [],
47
+ render: true,
48
+ custom: other ? _objectSpread(_objectSpread({}, other), {}, {
74
49
  list: [],
75
- step: 2
50
+ step: StepStatusEnum.Free
76
51
  }) : {
77
52
  list: [],
78
- step: 2
79
- },
80
- render: true
81
- }, params.device ? {
82
- device: params.device
53
+ step: StepStatusEnum.Free
54
+ }
55
+ }, typeof net !== 'undefined' ? {
56
+ net: net
57
+ } : {}), typeof number !== 'undefined' ? {
58
+ number: number
59
+ } : {}), typeof pay !== 'undefined' ? {
60
+ pay: pay
61
+ } : {}), typeof device !== 'undefined' ? {
62
+ device: device
83
63
  } : {});
84
- };
85
- export default getInitState;
64
+ });
65
+
66
+ /**
67
+ * @title: windcave 金额信息
68
+ * @description:
69
+ * @param {State} store : 全局store数据管理
70
+ * @return 金额信息
71
+ * @Author: hongbing.wang
72
+ * @Date: 2024-08-12 10:43
73
+ */
86
74
  export function getAmonunt(store) {
87
75
  var device = store.device,
88
- custom = store.custom;
76
+ pay = store.pay,
77
+ custom = store.custom,
78
+ name = store.name,
79
+ symbol = store.symbol,
80
+ amount = store.amount;
89
81
  if (!device || !custom) {
90
82
  throw Error('device or custom is not defined');
91
83
  }
92
- var name = custom.name;
93
- var symbol = custom.symbol;
94
- // const format = custom.format as string;
95
- var money = custom.amount;
96
- var pay = custom.pay;
97
84
  var setting = device.setting;
85
+
86
+ // 从 金额编辑页 获取到 支付数据
98
87
  if (pay) {
99
88
  return {
100
89
  name: name,
101
90
  symbol: symbol,
102
91
  // format,
103
- money: money,
92
+ money: Number(amount),
104
93
  amount: Number(pay.amount),
105
94
  surRate: Number(pay.surRate),
106
95
  surMoney: Number(pay.surMoney),
107
- surcharge: (setting === null || setting === void 0 ? void 0 : setting.surcharge) || false
96
+ surcharge: (setting === null || setting === void 0 ? void 0 : setting.surcharge) || false,
97
+ useOriginSurcharge: (pay === null || pay === void 0 ? void 0 : pay.useOriginSurcharge) || false
108
98
  };
109
99
  }
100
+ // 原始支付总额
110
101
  if (!setting) {
111
102
  return {
112
103
  name: name,
113
104
  symbol: symbol,
114
105
  // format,
115
- money: money,
116
- amount: money,
106
+ money: Number(amount),
107
+ amount: Number(amount),
117
108
  surRate: 0,
118
109
  surMoney: 0,
119
- surcharge: false
110
+ surcharge: false,
111
+ useOriginSurcharge: false
120
112
  };
121
113
  }
114
+ // 直接设备中手续费金额 + 原始支付总额
122
115
  var surRate = setting.constant_rate || 0;
123
116
  var surMoney = setting.constant_money || 0;
124
117
  var surcharge = setting.surcharge;
118
+ var useOriginSurcharge = setting.useOriginSurcharge || false;
125
119
  return {
126
120
  name: name,
127
121
  symbol: symbol,
128
- // format,
129
- money: money,
130
- amount: money,
131
- surRate: surcharge ? surRate : 0,
132
- surMoney: surcharge ? surMoney : 0,
133
- surcharge: surcharge
122
+ money: Number(amount),
123
+ amount: Number(amount),
124
+ surRate: useOriginSurcharge ? 0 : surcharge ? surRate : 0,
125
+ surMoney: useOriginSurcharge ? 0 : surcharge ? surMoney : 0,
126
+ surcharge: surcharge,
127
+ useOriginSurcharge: useOriginSurcharge
134
128
  };
135
129
  }
136
130
  export var StepStatusEnum;
@@ -145,6 +139,14 @@ export var StepStatusEnum;
145
139
  StepStatusEnum[StepStatusEnum["Wait"] = 8] = "Wait";
146
140
  })(StepStatusEnum || (StepStatusEnum = {}));
147
141
  export var StemTypeEnum;
142
+
143
+ /**
144
+ * @title: windcave 步骤信息
145
+ * @description: 步骤对应配置信息
146
+ * @return 步骤配置信息
147
+ * @Author: hongbing.wang
148
+ * @Date: 2024-08-12 10:44
149
+ */
148
150
  (function (StemTypeEnum) {
149
151
  StemTypeEnum["Active"] = "active";
150
152
  StemTypeEnum["Passive"] = "passive";
@@ -228,7 +230,14 @@ export var getStepMapping = function getStepMapping(type, _ref2) {
228
230
  // passive active
229
231
  status: 'pedding',
230
232
  //
231
- pedding: /*#__PURE__*/React.createElement(React.Fragment, null, locales.getText('page.eftpos-pay.text.receipt.again.title'), /*#__PURE__*/React.createElement("br", null), locales.getText('page.eftpos-pay.text.receipt.again.text')),
233
+ pedding: "".concat(locales.getText('page.eftpos-pay.text.receipt.again.title'), "\n").concat(locales.getText('page.eftpos-pay.text.receipt.again.text')),
234
+ // pedding: (
235
+ // <>
236
+ // {locales.getText('page.eftpos-pay.text.receipt.again.title')}
237
+ // <br />
238
+ // {locales.getText('page.eftpos-pay.text.receipt.again.text')}
239
+ // </>
240
+ // ),
232
241
  resolve: locales.getText('page.eftpos-pay.text.receipt.again.title'),
233
242
  reject: locales.getText('page.eftpos-pay.text.receipt.again.title'),
234
243
  // locales.getText('page.eftpos-pay.text.waiting.decline'), // 'Wait for the Decline',
@@ -1,9 +1,23 @@
1
1
  import React from 'react';
2
2
  import { PayStatus } from '../const';
3
3
  import XhrTimer from './timer';
4
+ /**
5
+ * @title: windcave 支付,退款,查询 错误逻辑处理
6
+ * @description: 动态步骤页 异常前往 FailCustom 页面
7
+ * @return null
8
+ * @Author: hongbing.wang
9
+ * @Date: 2024-08-12 10:29
10
+ */
4
11
  export declare const useFail: () => (res: {
5
- code?: "200" | "4004" | "701000" | "701001" | "701003" | "701004" | "701005" | "701006" | "701007" | undefined;
12
+ code?: "200" | "4004" | "701000" | "701001" | "701003" | "701004" | "701005" | "701006" | "701007" | "701008" | "701009" | "701010" | undefined;
6
13
  }, isMark?: boolean) => void;
14
+ /**
15
+ * @title: 轮询 check 接口
16
+ * @description: 轮询 终止条件 1.超时 , 2. 返回非200状态码 , 3. 外部关闭
17
+ * @return [run, XhrTimer] run: 启动函数 , XhrTimer 轮询类
18
+ * @Author: hongbing.wang
19
+ * @Date: 2024-08-12 10:30
20
+ */
7
21
  export declare const useValidate: (check: (...agrn: unknown[]) => Promise<unknown>, num: number, onChange: (params: {
8
22
  [key: string]: unknown;
9
- }) => unknown) => readonly [(timeout?: number) => void, React.MutableRefObject<XhrTimer | undefined>];
23
+ }) => unknown) => readonly [(timeout?: number) => void, React.MutableRefObject<((res: any, isRun?: boolean) => unknown) | undefined>, React.MutableRefObject<XhrTimer | undefined>];