@pisell/private-materials 6.3.15 → 6.3.17

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 (218) 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 +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  12. package/es/components/booking/addons/model.d.ts +10 -1
  13. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  14. package/es/components/booking/components/browserSelect/index.js +1 -1
  15. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  16. package/es/components/booking/forms/model.d.ts +10 -1
  17. package/es/components/booking/forms/model.js +5 -5
  18. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  19. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  20. package/es/components/booking/info/model.d.ts +10 -1
  21. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  22. package/es/components/booking/info/service/like/index.d.ts +1 -0
  23. package/es/components/booking/info/service/like/index.js +1 -1
  24. package/es/components/booking/info/service2/utils.d.ts +1 -1
  25. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  26. package/es/components/booking/model.d.ts +9 -1
  27. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  28. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  29. package/es/components/booking/notes/model.d.ts +10 -1
  30. package/es/components/booking/notes/model.js +5 -5
  31. package/es/components/booking/payments/model.d.ts +10 -1
  32. package/es/components/booking/payments/model.js +5 -5
  33. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  34. package/es/components/eftpos/group/index.d.ts +1 -0
  35. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  36. package/es/components/eftpos/icon/device.d.ts +1 -0
  37. package/es/components/eftpos/receipt/index.d.ts +1 -0
  38. package/es/components/eftposPay/amount.d.ts +1 -1
  39. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  40. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  41. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  42. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  43. package/es/components/eftposPay/device.d.ts +1 -1
  44. package/es/components/eftposPay/hooks.d.ts +2 -2
  45. package/es/components/eftposPay/store/index.d.ts +3 -3
  46. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  47. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  48. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  49. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  50. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  51. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  52. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  53. package/es/components/index.d.ts +3 -1
  54. package/es/components/index.js +3 -1
  55. package/es/components/listComponent/index.js +5 -5
  56. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  57. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
  58. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
  59. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
  60. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
  61. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
  62. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
  63. package/es/components/pay/toC/model.d.ts +9 -1
  64. package/es/components/pay/toC/utils.js +1 -1
  65. package/es/components/pinModal/hooks.d.ts +7 -0
  66. package/es/components/pinModal/hooks.js +65 -0
  67. package/es/components/pinModal/index.d.ts +4 -0
  68. package/es/components/pinModal/index.js +98 -0
  69. package/es/components/pinModal/index.less +44 -0
  70. package/es/components/pinModal/locales.d.ts +27 -0
  71. package/es/components/pinModal/locales.js +26 -0
  72. package/es/components/pinModal/serve.d.ts +6 -0
  73. package/es/components/pinModal/serve.js +11 -0
  74. package/es/components/pinModal/types.d.ts +0 -0
  75. package/es/components/pinModal/types.js +0 -0
  76. package/es/components/pinVerifyModal/hooks.d.ts +7 -0
  77. package/es/components/pinVerifyModal/hooks.js +80 -0
  78. package/es/components/pinVerifyModal/index.d.ts +5 -0
  79. package/es/components/pinVerifyModal/index.js +218 -0
  80. package/es/components/pinVerifyModal/index.less +92 -0
  81. package/es/components/pinVerifyModal/locales.d.ts +24 -0
  82. package/es/components/pinVerifyModal/locales.js +23 -0
  83. package/es/components/pinVerifyModal/types.d.ts +33 -0
  84. package/es/components/pinVerifyModal/types.js +1 -0
  85. package/es/components/productExtension/card/index.js +3 -3
  86. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  87. package/es/components/productExtension/fields/Forms/index.js +12 -12
  88. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  89. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  90. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  91. package/es/components/productExtension/server.js +2 -2
  92. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  93. package/es/components/schedules/calendar/index.js +4 -4
  94. package/es/components/schedules/calendar/serve.js +2 -2
  95. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  96. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  97. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  98. package/es/components/schedules/components/ResourceList/index.js +1 -1
  99. package/es/components/schedules/components/Search/index.js +5 -5
  100. package/es/components/schedules/model.d.ts +9 -1
  101. package/es/components/schedules/model.js +5 -5
  102. package/es/components/schedules/openHours/index.js +1 -1
  103. package/es/components/schedules/openHours/serve.js +2 -2
  104. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  105. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  107. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  108. package/es/components/schedules/products/serve.js +2 -2
  109. package/es/components/schedules/products/utils.js +5 -5
  110. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  111. package/es/components/schedules/resources/detail/index.js +10 -10
  112. package/es/components/schedules/resources/list/index.js +2 -2
  113. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  114. package/es/components/schedules/resources/serve.js +2 -2
  115. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  116. package/es/components/schedules/utils.d.ts +1 -1
  117. package/es/components/schedules/utils.js +4 -4
  118. package/es/components/selectModal/index.js +2 -2
  119. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -0
  120. package/es/components/wallet/Detail/index.js +3 -1
  121. package/es/components/wallet/Detail/model.d.ts +13 -1
  122. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  123. package/es/components/wallet/PointCard/model.d.ts +13 -1
  124. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  125. package/es/components/wallet/Voucher/model.d.ts +13 -1
  126. package/es/components/wallet/components/WalletCard.js +8 -3
  127. package/es/components/wallet/model.d.ts +9 -1
  128. package/es/components/walletList/index.js +20 -2
  129. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  130. package/es/hooks/useComponents.js +1 -1
  131. package/es/index.d.ts +2 -0
  132. package/es/index.js +3 -1
  133. package/es/utils/index.d.ts +1 -1
  134. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  135. package/lib/components/booking/addons/model.d.ts +10 -1
  136. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  137. package/lib/components/booking/forms/model.d.ts +10 -1
  138. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  139. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  140. package/lib/components/booking/info/model.d.ts +10 -1
  141. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  142. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  143. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  144. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  145. package/lib/components/booking/model.d.ts +9 -1
  146. package/lib/components/booking/notes/model.d.ts +10 -1
  147. package/lib/components/booking/payments/model.d.ts +10 -1
  148. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  149. package/lib/components/eftpos/group/index.d.ts +1 -0
  150. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  151. package/lib/components/eftpos/icon/device.d.ts +1 -0
  152. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  153. package/lib/components/eftposPay/amount.d.ts +1 -1
  154. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  155. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  156. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  157. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  158. package/lib/components/eftposPay/device.d.ts +1 -1
  159. package/lib/components/eftposPay/hooks.d.ts +2 -2
  160. package/lib/components/eftposPay/store/index.d.ts +3 -3
  161. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  162. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  163. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  164. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  165. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  166. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  167. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  168. package/lib/components/index.d.ts +3 -1
  169. package/lib/components/index.js +6 -0
  170. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  171. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
  172. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
  173. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
  174. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
  175. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
  176. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
  177. package/lib/components/pay/toC/model.d.ts +9 -1
  178. package/lib/components/pay/toC/utils.js +1 -1
  179. package/lib/components/pinModal/hooks.d.ts +7 -0
  180. package/lib/components/pinModal/hooks.js +85 -0
  181. package/lib/components/pinModal/index.d.ts +4 -0
  182. package/lib/components/pinModal/index.js +88 -0
  183. package/lib/components/pinModal/index.less +44 -0
  184. package/lib/components/pinModal/locales.d.ts +27 -0
  185. package/lib/components/pinModal/locales.js +50 -0
  186. package/lib/components/pinModal/serve.d.ts +6 -0
  187. package/lib/components/pinModal/serve.js +37 -0
  188. package/lib/components/pinModal/types.d.ts +0 -0
  189. package/lib/components/pinModal/types.js +0 -0
  190. package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
  191. package/lib/components/pinVerifyModal/hooks.js +93 -0
  192. package/lib/components/pinVerifyModal/index.d.ts +5 -0
  193. package/lib/components/pinVerifyModal/index.js +230 -0
  194. package/lib/components/pinVerifyModal/index.less +92 -0
  195. package/lib/components/pinVerifyModal/locales.d.ts +24 -0
  196. package/lib/components/pinVerifyModal/locales.js +47 -0
  197. package/lib/components/pinVerifyModal/types.d.ts +33 -0
  198. package/lib/components/pinVerifyModal/types.js +17 -0
  199. package/lib/components/schedules/model.d.ts +9 -1
  200. package/lib/components/schedules/utils.d.ts +1 -1
  201. package/lib/components/schedules/utils.js +1 -1
  202. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -0
  203. package/lib/components/wallet/Detail/index.js +18 -5
  204. package/lib/components/wallet/Detail/model.d.ts +13 -1
  205. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  206. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  207. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  208. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  209. package/lib/components/wallet/components/WalletCard.js +3 -1
  210. package/lib/components/wallet/model.d.ts +9 -1
  211. package/lib/components/walletList/index.js +19 -2
  212. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  213. package/lib/index.d.ts +2 -0
  214. package/lib/index.js +6 -0
  215. package/lib/utils/index.d.ts +1 -1
  216. package/lowcode/pin-modal/meta.ts +37 -0
  217. package/lowcode/pin-verify-modal/meta.ts +80 -0
  218. package/package.json +3 -3
@@ -0,0 +1,44 @@
1
+ .pin-modal {
2
+ width: 100%;
3
+ height: 100%;
4
+ padding: 16px 0;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ gap: 16px;
9
+
10
+ &-content {
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: center;
14
+ gap: 4px;
15
+
16
+ &-label {
17
+ color: #101828;
18
+ text-align: center;
19
+ font-size: 16px;
20
+ font-weight: 400;
21
+ }
22
+
23
+ &-code {
24
+ color: #101828;
25
+ text-align: center;
26
+ font-size: 24px;
27
+ font-weight: 600;
28
+ }
29
+
30
+ &-desc {
31
+ color: #101828;
32
+ text-align: center;
33
+ font-size: 16px;
34
+ font-weight: 500;
35
+ }
36
+
37
+ &-time {
38
+ color: #667085;
39
+ text-align: center;
40
+ font-size: 16px;
41
+ font-weight: 400;
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.pin.modal.title': string;
4
+ 'pisell2.pin.modal.label': string;
5
+ 'pisell2.pin.modal.desc': string;
6
+ 'pisell2.pin.modal.time': string;
7
+ 'pisell2.pin.modal.reset.pin': string;
8
+ 'pisell2.pin.modal.cancel': string;
9
+ };
10
+ 'zh-CN': {
11
+ 'pisell2.pin.modal.title': string;
12
+ 'pisell2.pin.modal.label': string;
13
+ 'pisell2.pin.modal.desc': string;
14
+ 'pisell2.pin.modal.time': string;
15
+ 'pisell2.pin.modal.reset.pin': string;
16
+ 'pisell2.pin.modal.cancel': string;
17
+ };
18
+ 'zh-HK': {
19
+ 'pisell2.pin.modal.title': string;
20
+ 'pisell2.pin.modal.label': string;
21
+ 'pisell2.pin.modal.desc': string;
22
+ 'pisell2.pin.modal.time': string;
23
+ 'pisell2.pin.modal.reset.pin': string;
24
+ 'pisell2.pin.modal.cancel': string;
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,26 @@
1
+ export default {
2
+ en: {
3
+ 'pisell2.pin.modal.title': 'View PIN',
4
+ 'pisell2.pin.modal.label': 'Current PIN :',
5
+ 'pisell2.pin.modal.desc': 'This PIN will expire in 72 hours. Do not share your PIN with others.',
6
+ 'pisell2.pin.modal.time': 'Last Updated : ',
7
+ 'pisell2.pin.modal.reset.pin': 'Regenerate PIN',
8
+ 'pisell2.pin.modal.cancel': 'Cancel'
9
+ },
10
+ 'zh-CN': {
11
+ 'pisell2.pin.modal.title': '查看PIN',
12
+ 'pisell2.pin.modal.label': '当前PIN码 :',
13
+ 'pisell2.pin.modal.desc': '该PIN码将在72小时后失效,请勿向他人泄露您的PIN码。',
14
+ 'pisell2.pin.modal.time': '最后更新时间 : ',
15
+ 'pisell2.pin.modal.reset.pin': '重新生成PIN',
16
+ 'pisell2.pin.modal.cancel': '取消'
17
+ },
18
+ 'zh-HK': {
19
+ 'pisell2.pin.modal.title': '查看PIN',
20
+ 'pisell2.pin.modal.label': '當前PIN碼 :',
21
+ 'pisell2.pin.modal.desc': '該PIN碼將在72小時後失效,請勿向他人洩露您的PIN碼。',
22
+ 'pisell2.pin.modal.time': '最後更新時間 : ',
23
+ 'pisell2.pin.modal.reset.pin': '重新生成PIN',
24
+ 'pisell2.pin.modal.cancel': '取消'
25
+ }
26
+ };
@@ -0,0 +1,6 @@
1
+ export declare const getPinApi: (data: {
2
+ wallet_detail_id: string | number;
3
+ }) => Promise<any>;
4
+ export declare const resetPinApi: (data: {
5
+ wallet_detail_id: string | number;
6
+ }) => Promise<any>;
@@ -0,0 +1,11 @@
1
+ import { request } from "../../utils";
2
+
3
+ // 获取PIN码
4
+ export var getPinApi = function getPinApi(data) {
5
+ return request.getRequest().get('/h5/wallet/detail/pin', data);
6
+ };
7
+
8
+ // 重置PIN码
9
+ export var resetPinApi = function resetPinApi(data) {
10
+ return request.getRequest().post('/h5/wallet/detail/pin/refresh', data);
11
+ };
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ import { TVerifyPin, VerifyInfo } from './types';
2
+ export declare const usePinVerify: () => {
3
+ verifyPin: TVerifyPin;
4
+ loading: boolean;
5
+ verifyInfo: VerifyInfo | null;
6
+ setVerifyInfo: (data: VerifyInfo | null) => void;
7
+ };
@@ -0,0 +1,80 @@
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(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useRef, useState } from 'react';
8
+ import { useRequest } from 'ahooks';
9
+ import { PisellToast } from '@pisell/materials';
10
+ import useEngineContext from "../../hooks/useEngineContext";
11
+ import { request } from "../../utils";
12
+ export var usePinVerify = function usePinVerify() {
13
+ var _context$appHelper;
14
+ var context = useEngineContext();
15
+ var apiPrefix = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.constants) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.apiPrefix;
16
+ var _useState = useState(null),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ verifyInfo = _useState2[0],
19
+ setVerifyInfo = _useState2[1];
20
+ var verifySuccessRef = useRef(function () {});
21
+
22
+ /**
23
+ * @title: 设置验证信息
24
+ * @description 设置验证信息,如果check_max_count为0,则设置为null,剩余次数为check_max_count - failed_count
25
+ * @param data 验证信息
26
+ */
27
+ var _setVerifyInfo = function _setVerifyInfo(data) {
28
+ var _ref = data || {},
29
+ failed_count = _ref.failed_count,
30
+ check_max_count = _ref.check_max_count;
31
+ if (!check_max_count) {
32
+ setVerifyInfo(null);
33
+ return;
34
+ }
35
+ setVerifyInfo({
36
+ check_max_count: check_max_count,
37
+ remaining_count: check_max_count - (failed_count || 0)
38
+ });
39
+ };
40
+ var verifyPinApi = function verifyPinApi(data) {
41
+ return request.getRequest().post("".concat(apiPrefix, "/wallet/detail/pin/validate"), data, {
42
+ fullResult: true
43
+ });
44
+ };
45
+ var _verifyPin = useRequest(verifyPinApi, {
46
+ manual: true,
47
+ onSuccess: function onSuccess(res) {
48
+ if ((res === null || res === void 0 ? void 0 : res.code) === 200) {
49
+ var _ref2 = (res === null || res === void 0 ? void 0 : res.data) || {},
50
+ status = _ref2.status,
51
+ msg = _ref2.msg,
52
+ failed_count = _ref2.failed_count,
53
+ check_max_count = _ref2.check_max_count;
54
+ _setVerifyInfo({
55
+ failed_count: failed_count,
56
+ check_max_count: check_max_count
57
+ });
58
+ // 状态 success:成功 locked:锁定 failed:失败
59
+ PisellToast({
60
+ content: msg,
61
+ duration: 2
62
+ });
63
+ if (status === 'success') {
64
+ var _verifySuccessRef$cur;
65
+ (_verifySuccessRef$cur = verifySuccessRef.current) === null || _verifySuccessRef$cur === void 0 || _verifySuccessRef$cur.call(verifySuccessRef, res === null || res === void 0 ? void 0 : res.data);
66
+ }
67
+ }
68
+ }
69
+ });
70
+ var verifyPin = function verifyPin(data, onSuccess) {
71
+ verifySuccessRef.current = onSuccess;
72
+ _verifyPin.run(data);
73
+ };
74
+ return {
75
+ verifyPin: verifyPin,
76
+ loading: _verifyPin.loading,
77
+ verifyInfo: verifyInfo,
78
+ setVerifyInfo: _setVerifyInfo
79
+ };
80
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { PinVerifyModalProps, PinVerifyModalRef } from './types';
4
+ declare const _default: React.ForwardRefExoticComponent<PinVerifyModalProps & React.RefAttributes<PinVerifyModalRef>>;
5
+ export default _default;
@@ -0,0 +1,218 @@
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(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useImperativeHandle, useState, forwardRef, useRef, useMemo } from 'react';
8
+ import Delete from '@pisell/icon/es/Delete';
9
+ import { PisellModal, VirtualKeyboard, PisellToast } from '@pisell/materials';
10
+ import { locales } from '@pisell/utils';
11
+ import useEngineContext from "../../hooks/useEngineContext";
12
+ import localeTexts from "./locales";
13
+ import { request } from "../../utils";
14
+ import "./index.less";
15
+ import { usePinVerify } from "./hooks";
16
+ var PinVerifyModal = function PinVerifyModal(props, ref) {
17
+ var _context$engine, _context$appHelper, _context$appHelper2, _context$appHelper2$i, _context$appHelper3, _modalParamsRef$curre2, _modalParamsRef$curre3, _modalParamsRef$curre4;
18
+ var context = useEngineContext();
19
+ locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
20
+ request.setRequest(context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.request);
21
+
22
+ // 判断是否是终端环境
23
+ var isTerminal = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2$i = _context$appHelper2.isTerminal) === null || _context$appHelper2$i === void 0 ? void 0 : _context$appHelper2$i.call(_context$appHelper2);
24
+ var platform = context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.constants) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.platform;
25
+ var _useState = useState(false),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ visible = _useState2[0],
28
+ setVisible = _useState2[1];
29
+ var modalParamsRef = useRef({});
30
+ var _useState3 = useState(''),
31
+ _useState4 = _slicedToArray(_useState3, 2),
32
+ pin = _useState4[0],
33
+ setPin = _useState4[1];
34
+ var _usePinVerify = usePinVerify(),
35
+ verifyPin = _usePinVerify.verifyPin,
36
+ loading = _usePinVerify.loading,
37
+ verifyInfo = _usePinVerify.verifyInfo,
38
+ setVerifyInfo = _usePinVerify.setVerifyInfo;
39
+ var KeyboardItems = useMemo(function () {
40
+ return [{
41
+ value: 1,
42
+ label: '1',
43
+ disabled: false,
44
+ type: 'text'
45
+ }, {
46
+ value: 2,
47
+ label: '2',
48
+ disabled: false,
49
+ type: 'text'
50
+ }, {
51
+ value: 3,
52
+ label: '3',
53
+ disabled: false,
54
+ type: 'text'
55
+ }, {
56
+ value: 4,
57
+ label: '4',
58
+ disabled: false,
59
+ type: 'text'
60
+ }, {
61
+ value: 5,
62
+ label: '5',
63
+ disabled: false,
64
+ type: 'text'
65
+ }, {
66
+ value: 6,
67
+ label: '6',
68
+ disabled: false,
69
+ type: 'text'
70
+ }, {
71
+ value: 7,
72
+ label: '7',
73
+ disabled: false,
74
+ type: 'text'
75
+ }, {
76
+ value: 8,
77
+ label: '8',
78
+ disabled: false,
79
+ type: 'text'
80
+ }, {
81
+ value: 9,
82
+ label: '9',
83
+ disabled: false,
84
+ type: 'text'
85
+ }, {
86
+ value: 'delete',
87
+ label: /*#__PURE__*/React.createElement(Delete, {
88
+ className: "virtual-keyboard-input-delete-icon"
89
+ }),
90
+ disabled: false,
91
+ type: 'text'
92
+ }, {
93
+ value: 0,
94
+ label: '0',
95
+ disabled: false,
96
+ type: 'text'
97
+ }, {
98
+ value: 'verify',
99
+ label: locales.getText('pisell2.pin.verify.modal.keyboard.verify'),
100
+ disabled: false,
101
+ type: 'primary'
102
+ }];
103
+ }, [locales]);
104
+ var onOpen = function onOpen(params) {
105
+ var _props$onOpen;
106
+ modalParamsRef.current = params;
107
+ setVerifyInfo({
108
+ failed_count: (params === null || params === void 0 ? void 0 : params.failed_count) || 0,
109
+ check_max_count: (params === null || params === void 0 ? void 0 : params.check_max_count) || 0
110
+ });
111
+ setVisible(true);
112
+ (_props$onOpen = props.onOpen) === null || _props$onOpen === void 0 || _props$onOpen.call(props);
113
+ };
114
+ var onClose = function onClose() {
115
+ var _props$onClose;
116
+ modalParamsRef.current = {};
117
+ setPin('');
118
+ setVerifyInfo(null);
119
+ setVisible(false);
120
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 || _props$onClose.call(props);
121
+ };
122
+ useImperativeHandle(ref, function () {
123
+ return {
124
+ open: onOpen,
125
+ close: onClose
126
+ };
127
+ });
128
+ var handleChange = function handleChange(e) {
129
+ if (e === 'delete') {
130
+ setPin(pin.slice(0, -1));
131
+ return;
132
+ } else if (e === 'verify') {
133
+ handleVerify();
134
+ return;
135
+ } else {
136
+ if (pin.length < 4) {
137
+ setPin(pin + e);
138
+ }
139
+ }
140
+ };
141
+ var handleVerify = function handleVerify() {
142
+ if (loading) {
143
+ return;
144
+ }
145
+ if (pin.length === 4) {
146
+ var _modalParamsRef$curre;
147
+ var wallet_detail_id = (_modalParamsRef$curre = modalParamsRef.current) === null || _modalParamsRef$curre === void 0 ? void 0 : _modalParamsRef$curre.wallet_detail_id;
148
+ verifyPin({
149
+ wallet_detail_id: wallet_detail_id,
150
+ pin: pin
151
+ }, function (params) {
152
+ var _props$onSuccess;
153
+ (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 || _props$onSuccess.call(props, params);
154
+ onClose();
155
+ });
156
+ } else {
157
+ PisellToast({
158
+ content: locales.getText('pisell2.pin.verify.modal.keyboard.title'),
159
+ duration: 2
160
+ });
161
+ }
162
+ };
163
+ return /*#__PURE__*/React.createElement(PisellModal, {
164
+ platform: isTerminal ? 'h5' : undefined,
165
+ visible: visible,
166
+ title: locales.getText('pisell2.pin.verify.modal.title'),
167
+ headerDivider: false,
168
+ footer: null,
169
+ onClose: onClose,
170
+ maskClosable: false,
171
+ onCancel: onClose,
172
+ destroyOnClose: true,
173
+ mobileModalHeight: isTerminal ? undefined : 'auto'
174
+ }, /*#__PURE__*/React.createElement("div", {
175
+ className: "pin-verify-modal-content"
176
+ }, /*#__PURE__*/React.createElement("div", {
177
+ className: "pin-verify-modal-content-user"
178
+ }, /*#__PURE__*/React.createElement("div", {
179
+ className: "pin-verify-modal-content-user-avatar"
180
+ }, /*#__PURE__*/React.createElement("img", {
181
+ src: ((_modalParamsRef$curre2 = modalParamsRef.current.customer) === null || _modalParamsRef$curre2 === void 0 ? void 0 : _modalParamsRef$curre2.cover) || 'https://file.mypisell.com/static/default_product.png',
182
+ alt: "avatar",
183
+ className: "pin-verify-modal-content-user-avatar-img"
184
+ })), /*#__PURE__*/React.createElement("div", {
185
+ className: "pin-verify-modal-content-user-right"
186
+ }, /*#__PURE__*/React.createElement("div", {
187
+ className: "pin-verify-modal-content-user-right-name"
188
+ }, ((_modalParamsRef$curre3 = modalParamsRef.current.customer) === null || _modalParamsRef$curre3 === void 0 ? void 0 : _modalParamsRef$curre3.display_name) || ((_modalParamsRef$curre4 = modalParamsRef.current.customer) === null || _modalParamsRef$curre4 === void 0 ? void 0 : _modalParamsRef$curre4.nickname)), /*#__PURE__*/React.createElement("div", {
189
+ className: "pin-verify-modal-content-user-right-wallet"
190
+ }, locales.getText('pisell2.pin.verify.modal.wallet'), modalParamsRef.current.wallet_code))), /*#__PURE__*/React.createElement("div", {
191
+ className: "pin-verify-modal-content-keyboard"
192
+ }, /*#__PURE__*/React.createElement("div", {
193
+ className: "pin-verify-modal-content-keyboard-title"
194
+ }, locales.getText('pisell2.pin.verify.modal.keyboard.title')), /*#__PURE__*/React.createElement(VirtualKeyboard, {
195
+ style: {
196
+ width: '300px'
197
+ },
198
+ keyboardProps: {
199
+ keydown: false,
200
+ items: KeyboardItems,
201
+ onChange: handleChange
202
+ },
203
+ virtualKeyInputProps: {
204
+ value: pin,
205
+ onChange: function onChange(e) {
206
+ setPin(e.target.value);
207
+ },
208
+ placeholder: '0000',
209
+ style: {
210
+ height: '45px',
211
+ fontSize: '36px'
212
+ }
213
+ }
214
+ }), verifyInfo !== null && verifyInfo !== void 0 && verifyInfo.check_max_count ? /*#__PURE__*/React.createElement("div", {
215
+ className: "pin-verify-modal-content-keyboard-desc"
216
+ }, locales.getText('pisell2.pin.verify.modal.keyboard.desc'), verifyInfo === null || verifyInfo === void 0 ? void 0 : verifyInfo.remaining_count, "/", verifyInfo === null || verifyInfo === void 0 ? void 0 : verifyInfo.check_max_count) : null)));
217
+ };
218
+ export default /*#__PURE__*/forwardRef(PinVerifyModal);
@@ -0,0 +1,92 @@
1
+ .pin-verify-modal-content {
2
+ width: 100%;
3
+ height: 100%;
4
+ padding-bottom: 16px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ gap: 16px;
9
+
10
+ &-user {
11
+ min-width: 300px;
12
+ min-height: 60px;
13
+ padding: 8px;
14
+ display: flex;
15
+ align-items: center;
16
+ gap: 8px;
17
+ border-radius: 8px;
18
+ border: 1px solid #d0d5dd;
19
+
20
+ &-avatar {
21
+ width: 42px;
22
+ height: 42px;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ border-radius: 50%;
27
+ overflow: hidden;
28
+
29
+ &-img {
30
+ width: 100%;
31
+ }
32
+ }
33
+
34
+ &-right {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 4px;
38
+
39
+ &-name {
40
+ font-size: 16px;
41
+ font-weight: 600;
42
+ color: #101828;
43
+ }
44
+
45
+ &-wallet {
46
+ color: #667085;
47
+ font-size: 14px;
48
+ font-weight: 400;
49
+ }
50
+ }
51
+ }
52
+
53
+ &-keyboard {
54
+ display: flex;
55
+ flex-direction: column;
56
+ align-items: center;
57
+ gap: 8px;
58
+
59
+ &-title {
60
+ text-align: center;
61
+ color: #101828;
62
+ font-size: 16px;
63
+ font-weight: 500;
64
+ }
65
+
66
+ &-desc {
67
+ color: #667085;
68
+ font-size: 16px;
69
+ font-weight: 400;
70
+ }
71
+ }
72
+
73
+ .virtual-keyboard-input-wrap {
74
+ height: 45px !important;
75
+ }
76
+
77
+ .virtual-keyboard-wrap .virtual-keyboard-content .virtual-keyboard-item {
78
+ padding-top: 50px !important;
79
+ }
80
+
81
+ .virtual-keyboard-wrap
82
+ .virtual-keyboard-content
83
+ .virtual-keyboard-item
84
+ .virtual-keyboard-item-button {
85
+ padding: 0 !important;
86
+ }
87
+
88
+ .virtual-keyboard-input-delete {
89
+ font-size: 30px;
90
+ color: #000;
91
+ }
92
+ }
@@ -0,0 +1,24 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.pin.verify.modal.title': string;
4
+ 'pisell2.pin.verify.modal.wallet': string;
5
+ 'pisell2.pin.verify.modal.keyboard.title': string;
6
+ 'pisell2.pin.verify.modal.keyboard.desc': string;
7
+ 'pisell2.pin.verify.modal.keyboard.verify': string;
8
+ };
9
+ 'zh-CN': {
10
+ 'pisell2.pin.verify.modal.title': string;
11
+ 'pisell2.pin.verify.modal.wallet': string;
12
+ 'pisell2.pin.verify.modal.keyboard.title': string;
13
+ 'pisell2.pin.verify.modal.keyboard.desc': string;
14
+ 'pisell2.pin.verify.modal.keyboard.verify': string;
15
+ };
16
+ 'zh-HK': {
17
+ 'pisell2.pin.verify.modal.title': string;
18
+ 'pisell2.pin.verify.modal.wallet': string;
19
+ 'pisell2.pin.verify.modal.keyboard.title': string;
20
+ 'pisell2.pin.verify.modal.keyboard.desc': string;
21
+ 'pisell2.pin.verify.modal.keyboard.verify': string;
22
+ };
23
+ };
24
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export default {
2
+ en: {
3
+ 'pisell2.pin.verify.modal.title': 'Wallet Verification',
4
+ 'pisell2.pin.verify.modal.wallet': 'Wallet : ',
5
+ 'pisell2.pin.verify.modal.keyboard.title': 'Enter the 4-digit PIN to continue',
6
+ 'pisell2.pin.verify.modal.keyboard.desc': 'Remaining attempts : ',
7
+ 'pisell2.pin.verify.modal.keyboard.verify': 'Verify'
8
+ },
9
+ 'zh-CN': {
10
+ 'pisell2.pin.verify.modal.title': '钱包验证',
11
+ 'pisell2.pin.verify.modal.wallet': '钱包 : ',
12
+ 'pisell2.pin.verify.modal.keyboard.title': '请输入该钱包的4位PIN码以继续',
13
+ 'pisell2.pin.verify.modal.keyboard.desc': '剩余验证次数 : ',
14
+ 'pisell2.pin.verify.modal.keyboard.verify': '验证'
15
+ },
16
+ 'zh-HK': {
17
+ 'pisell2.pin.verify.modal.title': '錢包驗證',
18
+ 'pisell2.pin.verify.modal.wallet': '錢包 : ',
19
+ 'pisell2.pin.verify.modal.keyboard.title': '請輸入該錢包的4位PIN碼以繼續',
20
+ 'pisell2.pin.verify.modal.keyboard.desc': '剩餘驗證次數 : ',
21
+ 'pisell2.pin.verify.modal.keyboard.verify': '驗證'
22
+ }
23
+ };
@@ -0,0 +1,33 @@
1
+ export interface PinVerifyModalProps {
2
+ onOpen?: () => void;
3
+ onClose?: () => void;
4
+ onSuccess?: (params?: VerifyPinSuccessParams) => void;
5
+ }
6
+ export interface PinVerifyModalRef {
7
+ open: (params: ModalParams) => void;
8
+ close: () => void;
9
+ }
10
+ export interface ModalParams {
11
+ wallet_code: string;
12
+ wallet_detail_id: string | number;
13
+ failed_count?: number;
14
+ check_max_count?: number;
15
+ customer?: {
16
+ display_name?: string;
17
+ nickname?: string;
18
+ cover?: string;
19
+ };
20
+ }
21
+ export interface VerifyInfo {
22
+ remaining_count?: number;
23
+ failed_count?: number;
24
+ check_max_count?: number;
25
+ }
26
+ export declare type TVerifyPin = (data: {
27
+ wallet_detail_id: string | number;
28
+ pin: string;
29
+ }, onSuccess: (params: VerifyPinSuccessParams) => void) => void;
30
+ export interface VerifyPinSuccessParams {
31
+ customer_id: string | number;
32
+ customer_pin_key: string;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
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); }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  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; }
3
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
- 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); }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import React from "react";
6
6
  import classNames from "classnames";
7
7
  import "./index.less";
@@ -6,7 +6,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
6
6
  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."); }
7
7
  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); }
8
8
  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; }
9
- 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; } }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useEffect, useState } from "react";
12
12
  import { Form, InputNumber, Select } from "antd";