@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,6 +1,26 @@
1
1
  import { Amount, ModeEnum } from '../const';
2
2
  import { State } from '../store';
3
+ /**
4
+ * @title: payo 步骤信息
5
+ * @description:
6
+ * @return {*}
7
+ * @Author: hongbing.wang
8
+ * @Date: 2024-08-12 10:19
9
+ */
3
10
  export declare const getStep: (mode?: ModeEnum) => State['steps'];
4
- declare const getInitState: (params: any) => State;
5
- export default getInitState;
11
+ /**
12
+ * @title: 初始化 payo 数据
13
+ * @description:
14
+ * @Author: hongbing.wang
15
+ * @Date: 2024-08-12 10:19
16
+ */
17
+ declare const _default: (params: any) => State;
18
+ export default _default;
19
+ /**
20
+ * @title: payo 金额信息
21
+ * @description: 在 amount 页面设置则使用 pay ,如果有 setting 则使用 setting 信息 ,都没有则设置0
22
+ * @param {State} store : 全局store数据管理
23
+ * @Author: hongbing.wang
24
+ * @Date: 2024-08-12 10:24
25
+ */
6
26
  export declare function getAmonunt(store: State): Amount;
@@ -39,44 +39,61 @@ var getStep = (mode = import_const.ModeEnum.Pay) => [
39
39
  status: import_const.StatusEnum.Loading
40
40
  }
41
41
  ];
42
- var getInitState = (params) => ({
43
- mode: (params == null ? void 0 : params.mode) || import_const.ModeEnum.Pay,
44
- eftpos: import_const.EftposEnum.Payo,
45
- key: Date.now(),
46
- warn: import_utils.locales.getText("page.eftpos-pay.text.waiting.pay")((params == null ? void 0 : params.mode) || import_const.ModeEnum.Pay),
47
- // 'If you have confirmed the payment status from the PoS, you can press Manual marking buttonto skip.',
48
- step: 0,
49
- type: import_const.PayRouteEnum.Step,
50
- title: import_utils.locales.getText("page.eftpos-pay.text.loading")((params == null ? void 0 : params.mode) || import_const.ModeEnum.Pay),
51
- // 'Payment in process...',
52
- component: "",
53
- status: import_const.StatusEnum.Loading,
54
- steps: getStep((params == null ? void 0 : params.mode) || import_const.ModeEnum.Pay),
55
- custom: params,
56
- render: true,
57
- ...params.device ? { device: params.device } : {}
58
- });
59
- var const_default = getInitState;
42
+ var const_default = (params) => {
43
+ const {
44
+ order_id,
45
+ name,
46
+ symbol,
47
+ amount,
48
+ mode,
49
+ number,
50
+ pay,
51
+ device,
52
+ net,
53
+ ...other
54
+ } = params || {
55
+ mode: import_const.ModeEnum.Pay
56
+ };
57
+ return {
58
+ order_id,
59
+ name,
60
+ symbol,
61
+ amount,
62
+ mode,
63
+ eftpos: import_const.EftposEnum.Payo,
64
+ key: Date.now(),
65
+ warn: import_utils.locales.getText("page.eftpos-pay.text.waiting.pay")(mode),
66
+ step: 0,
67
+ type: import_const.PayRouteEnum.Step,
68
+ title: import_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
69
+ component: "",
70
+ status: import_const.StatusEnum.Loading,
71
+ steps: getStep(mode),
72
+ render: true,
73
+ custom: other || {},
74
+ ...typeof net !== "undefined" ? { net } : {},
75
+ ...typeof number !== "undefined" ? { number } : {},
76
+ ...typeof pay !== "undefined" ? { pay } : {},
77
+ ...typeof device !== "undefined" ? { device } : {}
78
+ };
79
+ };
60
80
  function getAmonunt(store) {
61
- const { device, custom } = store;
81
+ const { device, pay, custom, name, symbol, amount } = store;
62
82
  if (!device || !custom) {
63
83
  throw Error("device or custom is not defined");
64
84
  }
65
- const name = custom.name;
66
- const symbol = custom.symbol;
67
- const money = custom.amount;
68
- const pay = custom.pay;
69
85
  const setting = device.setting;
70
86
  if (pay) {
71
87
  return {
72
88
  name,
73
89
  symbol,
74
90
  // format,
75
- money,
91
+ money: Number(amount),
76
92
  amount: Number(pay.amount),
77
93
  surRate: Number(pay.surRate),
78
94
  surMoney: Number(pay.surMoney),
79
- surcharge: (setting == null ? void 0 : setting.surcharge) || false
95
+ surcharge: (setting == null ? void 0 : setting.surcharge) || false,
96
+ useOriginSurcharge: (pay == null ? void 0 : pay.useOriginSurcharge) || false
80
97
  };
81
98
  }
82
99
  if (!setting) {
@@ -84,25 +101,27 @@ function getAmonunt(store) {
84
101
  name,
85
102
  symbol,
86
103
  // format,
87
- money,
88
- amount: money,
104
+ money: Number(amount),
105
+ amount: Number(amount),
89
106
  surRate: 0,
90
107
  surMoney: 0,
91
- surcharge: false
108
+ surcharge: false,
109
+ useOriginSurcharge: false
92
110
  };
93
111
  }
94
- const surRate = setting.constant_rate || 0;
95
- const surMoney = setting.constant_money || 0;
112
+ const surRate = setting.useOriginSurcharge ? 0 : setting.constant_rate || 0;
113
+ const surMoney = setting.useOriginSurcharge ? 0 : setting.constant_money || 0;
96
114
  const surcharge = setting.surcharge;
115
+ const useOriginSurcharge = setting.useOriginSurcharge || false;
97
116
  return {
98
117
  name,
99
118
  symbol,
100
- // format,
101
- money,
102
- amount: money,
103
- surRate: surcharge ? surRate : 0,
104
- surMoney: surcharge ? surMoney : 0,
105
- surcharge
119
+ money: Number(amount),
120
+ amount: Number(amount),
121
+ surRate: useOriginSurcharge ? 0 : surcharge ? surRate : 0,
122
+ surMoney: useOriginSurcharge ? 0 : surcharge ? surMoney : 0,
123
+ surcharge,
124
+ useOriginSurcharge
106
125
  };
107
126
  }
108
127
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,4 +1,9 @@
1
1
  import { PayStatus } from '../const';
2
+ /**
3
+ * @title: 循环查询 接口状态
4
+ * @Author: hongbing.wang
5
+ * @Date: 2024-08-20 13:29
6
+ */
2
7
  export declare const useValidate: (timeout: number) => readonly [(params_0: (...agrn: unknown[]) => Promise<any>, params_1: number, params_2?: number | undefined) => Promise<{
3
8
  [key: string]: unknown;
4
9
  code: `${PayStatus}`;
@@ -37,7 +37,7 @@ var useValidate = (timeout) => {
37
37
  code: import_const.PayStatus.Timeout
38
38
  };
39
39
  console.log("循环开始前...");
40
- while (ref.current && res && (`${res.code}` === import_const.PayStatus.Timeout || `${res.code}` === import_const.PayStatus.PayTimeout)) {
40
+ while (ref.current && res && `${res.code}` === import_const.PayStatus.Timeout) {
41
41
  const start = Date.now();
42
42
  res = await check(
43
43
  { number },
@@ -1,11 +1,10 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { DeviceStatusType, StatusType, ModeType } from '../const';
2
+ import { DeviceStatusType, StatusType, ModeType, RouteType } from '../const';
3
3
  import { ThunkDispatch } from './useThunkReducer';
4
4
  export declare enum EActionTypes {
5
5
  UPDATE_INIT = "UPDATE_INIT",
6
6
  UPDATE_CUSTOM = "UPDATE_CUSTOM",
7
7
  UPDATE_KEY = "UPDATE_KEY",
8
- UPDATE_STEP = "UPDATE_STEP",
9
8
  UPDATE_STEP_KEY = "UPDATE_STEP_KEY",
10
9
  UPDATE_DEVICE = "UPDATE_DEVICE",
11
10
  UPDATE_NEXT_STEP = "UPDATE_NEXT_STEP",
@@ -14,59 +13,80 @@ export declare enum EActionTypes {
14
13
  UPDATE_LOADING = "UPDATE_LOADING",
15
14
  UPDATE_COMPONENT = "UPDATE_COMPONENT",
16
15
  UPDATE_STEPS = "UPDATE_STEPS",
17
- UPDATE_WARN = "UPDATE_WARN",
18
16
  UPDATE_STEP_CURRENT_ITEM_CUSTOM = "UPDATE_STEP_CURRENT_ITEM_CUSTOM",
19
- UPDATE_STEP_ITEM_CUSTOM = "UPDATE_STEP_ITEM_CUSTOM",
20
17
  UPDATE_STEP_ITEM = "UPDATE_STEP_ITEM",
21
18
  BACKUP_PRODUCTION = "BACKUP_PRODUCTION",
22
19
  BACKUP_FREE = "BACKUP_FREE"
23
20
  }
24
21
  export declare type State = {
22
+ /** 支付名称 */
23
+ name: string;
24
+ /** 金额单位 */
25
+ symbol: string;
26
+ /** 支付原始金额 */
27
+ amount: string | number;
28
+ /** 模式 */
25
29
  mode: ModeType;
30
+ /** 订单号 */
31
+ order_id: string | number;
26
32
  /** 厂商 */
27
33
  eftpos: DeviceStatusType;
34
+ action?: RouteType;
28
35
  /** 用于重置页面特指 =》全部步骤 */
29
36
  key: number;
30
37
  /** 当前执行到哪一步了 */
31
38
  step: number;
32
39
  /** 标题 */
33
40
  title: string;
41
+ /** 标题 */
42
+ subTitle?: string;
34
43
  /** step : 常规步骤页面 ,unset 自定义页面 */
35
44
  type: 'step' | 'unset';
36
45
  render: boolean;
46
+ /** 网络 */
47
+ net?: boolean;
37
48
  /** 上面 unset 自定义页面,这里需要指定到具体页面 */
38
49
  component: string;
39
- lastComponent?: string;
50
+ form?: string;
40
51
  /** 页面状态 */
41
52
  status: StatusType;
42
53
  /** 警告文案 */
43
- warn: ReactNode;
54
+ warn: string;
44
55
  steps: {
45
56
  /** 用于重置当前步骤 */
46
57
  key: number;
47
- title?: ReactNode;
48
- text?: ReactNode;
49
- warn?: ReactNode;
50
- tip?: ReactNode;
51
- success?: ReactNode;
52
- fail?: ReactNode;
53
- loading?: ReactNode;
58
+ title?: string;
59
+ text?: string;
60
+ warn?: string;
61
+ tip?: string;
62
+ success?: string;
63
+ fail?: string;
64
+ loading?: string;
54
65
  /** 步骤状态 */
55
66
  status: StatusType;
56
67
  custom?: {
57
- /** 厂商自定义 */
68
+ /** 步骤自定义 */
58
69
  [key: string]: unknown;
59
70
  };
60
71
  }[];
72
+ /** 支付流水号 */
73
+ number?: string | number;
74
+ /** 设备信息 */
61
75
  device?: {
62
76
  [key: string]: unknown;
63
77
  };
78
+ /** 支付信息 */
79
+ pay?: {
80
+ [key: string]: unknown;
81
+ };
64
82
  custom?: {
65
83
  [key: string]: unknown;
66
84
  };
67
85
  manual?: {
68
86
  title: string;
69
87
  text: string;
88
+ status?: boolean;
89
+ money?: number;
70
90
  };
71
91
  backup?: Omit<State, 'backup'>;
72
92
  };
@@ -74,12 +94,26 @@ export declare type Action = {
74
94
  type: EActionTypes;
75
95
  payload: Partial<State>;
76
96
  };
97
+ /**
98
+ * @title: 刷新 key
99
+ * @description: 用户重置组件生命周期,
100
+ * @param {number} key
101
+ * @Author: hongbing.wang
102
+ * @Date: 2024-08-19 09:56
103
+ */
77
104
  export declare const updateKey: (key: number) => {
78
105
  type: EActionTypes;
79
106
  payload: {
80
107
  key: number;
81
108
  };
82
109
  };
110
+ /**
111
+ * @title: 更新设备信息
112
+ * @description: 用户选择设备将回填到此处
113
+ * @param {object} payload
114
+ * @Author: hongbing.wang
115
+ * @Date: 2024-08-19 09:57
116
+ */
83
117
  export declare const updateDevice: (payload: {
84
118
  device: State['device'];
85
119
  }) => {
@@ -88,10 +122,23 @@ export declare const updateDevice: (payload: {
88
122
  device: State['device'];
89
123
  };
90
124
  };
125
+ /**
126
+ * @title: 刷新 步骤key
127
+ * @description: 重置某一步生命周期
128
+ * @Author: hongbing.wang
129
+ * @Date: 2024-08-19 09:58
130
+ */
91
131
  export declare const updateStepKey: () => {
92
132
  type: EActionTypes;
93
133
  payload: {};
94
134
  };
135
+ /**
136
+ * @title: 更新至下一步
137
+ * @description: 更新至下一步
138
+ * @param {string} warn?: 错误信息
139
+ * @Author: hongbing.wang
140
+ * @Date: 2024-08-19 09:58
141
+ */
95
142
  export declare const updateNextStep: (warn?: string) => {
96
143
  type: EActionTypes;
97
144
  payload: {
@@ -100,16 +147,13 @@ export declare const updateNextStep: (warn?: string) => {
100
147
  warn?: undefined;
101
148
  };
102
149
  };
103
- export declare const updateStep: (payload: {
104
- step: number;
105
- warn?: ReactNode;
106
- }) => {
107
- type: EActionTypes;
108
- payload: {
109
- step: number;
110
- warn?: ReactNode;
111
- };
112
- };
150
+ /**
151
+ * @title: 更新自定义信息
152
+ * @description: 更新自定义信息
153
+ * @param {object} payload
154
+ * @Author: hongbing.wang
155
+ * @Date: 2024-08-19 10:03
156
+ */
113
157
  export declare const updateCustom: (payload: {
114
158
  [key: string]: unknown;
115
159
  }) => {
@@ -118,18 +162,28 @@ export declare const updateCustom: (payload: {
118
162
  [key: string]: unknown;
119
163
  };
120
164
  };
165
+ /**
166
+ * @title: 更新 全局状态
167
+ * @description: 更新 全局状态
168
+ * @param {string} status : 状态
169
+ * * @Author: hongbing.wang
170
+ * @Date: 2024-08-19 10:03
171
+ */
121
172
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
122
173
  type: EActionTypes;
123
174
  payload: {
124
175
  status: "loading" | "success" | "warn" | "fail" | "question";
125
176
  };
126
177
  };
127
- export declare const updateWarn: (warn: ReactNode) => {
128
- type: EActionTypes;
129
- payload: {
130
- warn: React.ReactNode;
131
- };
132
- };
178
+ /**
179
+ * @title: 更新自定义组件
180
+ * @description: 更新自定义组件
181
+ * @param {string} component 组件名称
182
+ * @param {boolean} render : true : 隐藏 原组件(维持原组件内状态) ;false : 卸载
183
+ * @return {*}
184
+ * @Author: hongbing.wang
185
+ * @Date: 2024-08-19 10:04
186
+ */
133
187
  export declare const updateComponent: (component: string, render?: boolean) => {
134
188
  type: EActionTypes;
135
189
  payload: {
@@ -142,19 +196,26 @@ export declare const updateComponent: (component: string, render?: boolean) => {
142
196
  readonly component?: undefined;
143
197
  };
144
198
  };
199
+ /**
200
+ * @title: 更新步骤信息
201
+ * @description: 更新某一步骤信息
202
+ * @param {State} steps 某一步骤信息
203
+ * @Author: hongbing.wang
204
+ * @Date: 2024-08-19 10:07
205
+ */
145
206
  export declare const updateSteps: (steps: State['steps']) => {
146
207
  type: EActionTypes;
147
208
  payload: {
148
209
  steps: {
149
210
  /** 用于重置当前步骤 */
150
211
  key: number;
151
- title?: ReactNode;
152
- text?: ReactNode;
153
- warn?: ReactNode;
154
- tip?: ReactNode;
155
- success?: ReactNode;
156
- fail?: ReactNode;
157
- loading?: ReactNode;
212
+ title?: string | undefined;
213
+ text?: string | undefined;
214
+ warn?: string | undefined;
215
+ tip?: string | undefined;
216
+ success?: string | undefined;
217
+ fail?: string | undefined;
218
+ loading?: string | undefined;
158
219
  /** 步骤状态 */
159
220
  status: StatusType;
160
221
  custom?: {
@@ -163,69 +224,109 @@ export declare const updateSteps: (steps: State['steps']) => {
163
224
  }[];
164
225
  };
165
226
  };
227
+ /**
228
+ * @title: 更新状态管理信息
229
+ * @description: 更新状态管理信息
230
+ * @param {Partial} payload
231
+ * @return {*}
232
+ * @Author: hongbing.wang
233
+ * @Date: 2024-08-19 10:08
234
+ */
166
235
  export declare const updateState: (payload: Partial<State>) => {
167
236
  type: EActionTypes;
168
237
  payload: Partial<State>;
169
238
  };
239
+ /**
240
+ * @title: 更新当前步骤自定义信息
241
+ * @description: 更新当前步骤自定义信息
242
+ * @Author: hongbing.wang
243
+ * @Date: 2024-08-19 10:09
244
+ */
170
245
  export declare const updateCurrentCustomStemItem: (payload: NonNullable<Partial<State['steps'][number]['custom']>>) => {
171
246
  type: EActionTypes;
172
247
  payload: Partial<{
173
248
  [key: string]: unknown;
174
249
  }>;
175
250
  };
176
- export declare const updateCustomStemItem: (payload: NonNullable<Partial<State['steps'][number]['custom']>>) => {
177
- type: EActionTypes;
178
- payload: Partial<{
179
- [key: string]: unknown;
180
- }>;
181
- };
251
+ /**
252
+ * @title: 更新当前步骤信息
253
+ * @description: 更新当前步骤信息
254
+ * @Author: hongbing.wang
255
+ * @Date: 2024-08-19 10:09
256
+ */
182
257
  export declare const updateCurrentStemItem: (payload: any) => {
183
258
  type: EActionTypes;
184
259
  payload: any;
185
260
  };
261
+ /**
262
+ * @title: 更新备份信息
263
+ * @description: 更新备份信息
264
+ * @Author: hongbing.wang
265
+ * @Date: 2024-08-19 10:25
266
+ */
186
267
  export declare const backUpProduction: (payload: Partial<State>) => {
187
268
  type: EActionTypes;
188
269
  payload: Partial<State>;
189
270
  };
271
+ /**
272
+ * @title: 释放备份信息
273
+ * @description: 释放备份信息
274
+ * @param {Partial} payload
275
+ * @Author: hongbing.wang
276
+ * @Date: 2024-08-19 10:27
277
+ */
190
278
  export declare const backUpFree: (payload: Partial<State>) => {
191
279
  type: EActionTypes;
192
280
  payload: {
281
+ name?: string | undefined;
282
+ symbol?: string | undefined;
283
+ amount?: string | number | undefined;
193
284
  mode?: "refund" | "pay" | "query" | undefined;
194
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "eftpos" | undefined;
285
+ order_id?: string | number | undefined;
286
+ eftpos?: "windcave" | "tyro" | "payo" | "stripe" | undefined;
287
+ action?: "amount" | "deviceList" | "pay" | undefined;
195
288
  key?: number | undefined;
196
289
  step?: number | undefined;
197
290
  title?: string | undefined;
291
+ subTitle?: string | undefined;
198
292
  type?: "unset" | "step" | undefined;
199
293
  render?: boolean | undefined;
294
+ net?: boolean | undefined;
200
295
  component?: string | undefined;
201
- lastComponent?: string | undefined;
296
+ form?: string | undefined;
202
297
  status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
203
- warn?: ReactNode;
298
+ warn?: string | undefined;
204
299
  steps?: {
205
300
  /** 用于重置当前步骤 */
206
301
  key: number;
207
- title?: ReactNode;
208
- text?: ReactNode;
209
- warn?: ReactNode;
210
- tip?: ReactNode;
211
- success?: ReactNode;
212
- fail?: ReactNode;
213
- loading?: ReactNode;
302
+ title?: string | undefined;
303
+ text?: string | undefined;
304
+ warn?: string | undefined;
305
+ tip?: string | undefined;
306
+ success?: string | undefined;
307
+ fail?: string | undefined;
308
+ loading?: string | undefined;
214
309
  /** 步骤状态 */
215
310
  status: StatusType;
216
311
  custom?: {
217
312
  [key: string]: unknown;
218
313
  } | undefined;
219
314
  }[] | undefined;
315
+ number?: string | number | undefined;
220
316
  device?: {
221
317
  [key: string]: unknown;
222
318
  } | undefined;
319
+ pay?: {
320
+ [key: string]: unknown;
321
+ } | undefined;
223
322
  custom?: {
224
323
  [key: string]: unknown;
225
324
  } | undefined;
226
325
  manual?: {
227
326
  title: string;
228
327
  text: string;
328
+ status?: boolean | undefined;
329
+ money?: number | undefined;
229
330
  } | undefined;
230
331
  backup?: Omit<State, "backup"> | undefined;
231
332
  };