@pisell/private-materials 3.4.61 → 3.4.62

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 (282) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/Sales/Summary/utils.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Voucher/index.js +16 -1
  13. package/es/components/booking/addons/model.d.ts +1 -10
  14. package/es/components/booking/components/footer/utils.js +36 -37
  15. package/es/components/booking/components/voucher/index.js +39 -14
  16. package/es/components/booking/forms/model.d.ts +1 -10
  17. package/es/components/booking/info/model.d.ts +1 -10
  18. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  19. package/es/components/booking/info/service2/utils.js +2 -1
  20. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  21. package/es/components/booking/model.d.ts +1 -9
  22. package/es/components/booking/notes/model.d.ts +1 -10
  23. package/es/components/booking/payments/model.d.ts +1 -10
  24. package/es/components/eftposPay/amount.d.ts +1 -1
  25. package/es/components/eftposPay/device.d.ts +1 -1
  26. package/es/components/eftposPay/store/index.d.ts +1 -1
  27. package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
  28. package/es/components/pay/toC/PaymentList/index.js +54 -5
  29. package/es/components/pay/toC/PaymentList/index.less +58 -1
  30. package/es/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
  31. package/es/components/pay/toC/PaymentList/payment/visa.png +0 -0
  32. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  33. package/es/components/pay/toC/PaymentList/serve.js +8 -0
  34. package/es/components/pay/toC/PaymentList/utils.d.ts +26 -0
  35. package/es/components/pay/toC/PaymentList/utils.js +187 -6
  36. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +127 -36
  37. package/es/components/pay/toC/index.js +2 -1
  38. package/es/components/pay/toC/locales.d.ts +6 -0
  39. package/es/components/pay/toC/locales.js +9 -3
  40. package/es/components/pay/toC/model.d.ts +1 -9
  41. package/es/components/schedules/model.d.ts +1 -9
  42. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -1
  43. package/es/components/walletList/index.js +180 -41
  44. package/es/components/walletList/locales.d.ts +9 -0
  45. package/es/components/walletList/locales.js +12 -3
  46. package/es/components/walletList/serve.d.ts +19 -0
  47. package/es/components/walletList/serve.js +94 -5
  48. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  49. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  50. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  51. package/es/index.d.ts +2 -1
  52. package/es/index.js +2 -1
  53. package/es/plus/productSelect/index.js +5 -1
  54. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  55. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  56. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  57. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  58. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  59. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  60. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  61. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  62. package/es/plus/selectHolder/index.d.ts +7 -0
  63. package/es/plus/selectHolder/index.js +236 -0
  64. package/es/plus/selectHolder/index.less +117 -0
  65. package/es/plus/selectHolder/locales.d.ts +21 -0
  66. package/es/plus/selectHolder/locales.js +20 -0
  67. package/es/plus/selectHolder/types.d.ts +104 -0
  68. package/es/plus/selectHolder/types.js +1 -0
  69. package/es/plus/selectHolder/utils.d.ts +9 -0
  70. package/es/plus/selectHolder/utils.js +16 -0
  71. package/es/plus/walletEditor/WalletEditor.js +60 -2
  72. package/es/plus/walletEditor/locales.d.ts +9 -0
  73. package/es/plus/walletEditor/locales.js +12 -3
  74. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  75. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  76. package/es/plus/walletPassGallery/index.js +223 -41
  77. package/es/plus/walletPassGallery/index.less +1 -1
  78. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  79. package/es/plus/walletPassGallery/locales.js +29 -5
  80. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  81. package/es/plus/walletPassGallery/serve.js +59 -2
  82. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  83. package/es/plus/walletPassGallery/utils.js +342 -0
  84. package/es/pro/Selector/Selector.d.ts +1 -1
  85. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  86. package/lib/components/appointmentBooking/components/Voucher/index.js +21 -1
  87. package/lib/components/booking/addons/model.d.ts +1 -10
  88. package/lib/components/booking/components/footer/utils.js +6 -8
  89. package/lib/components/booking/components/voucher/index.js +37 -7
  90. package/lib/components/booking/forms/model.d.ts +1 -10
  91. package/lib/components/booking/info/model.d.ts +1 -10
  92. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  93. package/lib/components/booking/info/service2/utils.js +2 -1
  94. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  95. package/lib/components/booking/model.d.ts +1 -9
  96. package/lib/components/booking/notes/model.d.ts +1 -10
  97. package/lib/components/booking/payments/model.d.ts +1 -10
  98. package/lib/components/eftposPay/amount.d.ts +1 -1
  99. package/lib/components/eftposPay/device.d.ts +1 -1
  100. package/lib/components/eftposPay/store/index.d.ts +1 -1
  101. package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
  102. package/lib/components/pay/toC/PaymentList/index.js +36 -5
  103. package/lib/components/pay/toC/PaymentList/index.less +58 -1
  104. package/lib/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
  105. package/lib/components/pay/toC/PaymentList/payment/visa.png +0 -0
  106. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  107. package/lib/components/pay/toC/PaymentList/serve.js +6 -1
  108. package/lib/components/pay/toC/PaymentList/utils.d.ts +26 -0
  109. package/lib/components/pay/toC/PaymentList/utils.js +155 -7
  110. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +85 -1
  111. package/lib/components/pay/toC/index.js +2 -1
  112. package/lib/components/pay/toC/locales.d.ts +6 -0
  113. package/lib/components/pay/toC/locales.js +9 -3
  114. package/lib/components/pay/toC/model.d.ts +1 -9
  115. package/lib/components/schedules/model.d.ts +1 -9
  116. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -1
  117. package/lib/components/walletList/index.js +105 -5
  118. package/lib/components/walletList/locales.d.ts +9 -0
  119. package/lib/components/walletList/locales.js +12 -3
  120. package/lib/components/walletList/serve.d.ts +19 -0
  121. package/lib/components/walletList/serve.js +26 -3
  122. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  123. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  124. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  125. package/lib/index.d.ts +2 -1
  126. package/lib/index.js +6 -3
  127. package/lib/plus/productSelect/index.js +4 -1
  128. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  129. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  130. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  131. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  132. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  133. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  134. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  135. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  136. package/lib/plus/selectHolder/index.d.ts +7 -0
  137. package/lib/plus/selectHolder/index.js +202 -0
  138. package/lib/plus/selectHolder/index.less +117 -0
  139. package/lib/plus/selectHolder/locales.d.ts +21 -0
  140. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
  141. package/lib/plus/selectHolder/types.d.ts +104 -0
  142. package/lib/plus/selectHolder/types.js +17 -0
  143. package/lib/plus/selectHolder/utils.d.ts +9 -0
  144. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  145. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  146. package/lib/plus/walletEditor/locales.d.ts +9 -0
  147. package/lib/plus/walletEditor/locales.js +12 -3
  148. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  149. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  150. package/lib/plus/walletPassGallery/index.js +154 -27
  151. package/lib/plus/walletPassGallery/index.less +1 -1
  152. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  153. package/lib/plus/walletPassGallery/locales.js +32 -5
  154. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  155. package/lib/plus/walletPassGallery/serve.js +17 -5
  156. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  157. package/lib/plus/walletPassGallery/utils.js +287 -0
  158. package/lib/pro/Selector/Selector.d.ts +1 -1
  159. package/lowcode/event-select-holder/meta.ts +2 -2
  160. package/lowcode/select-holder/meta.ts +220 -0
  161. package/lowcode/select-holder/snippets.ts +41 -0
  162. package/package.json +4 -4
  163. package/es/components/wallet/Detail/index.d.ts +0 -42
  164. package/es/components/wallet/Detail/index.js +0 -1182
  165. package/es/components/wallet/Detail/index.less +0 -386
  166. package/es/components/wallet/Detail/locales.d.ts +0 -153
  167. package/es/components/wallet/Detail/locales.js +0 -170
  168. package/es/components/wallet/Detail/model.d.ts +0 -13
  169. package/es/components/wallet/Detail/model.js +0 -22
  170. package/es/components/wallet/Detail/serve.d.ts +0 -39
  171. package/es/components/wallet/Detail/serve.js +0 -64
  172. package/es/components/wallet/DetailContext.d.ts +0 -25
  173. package/es/components/wallet/DetailContext.js +0 -162
  174. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  175. package/es/components/wallet/DiscountCard/index.js +0 -218
  176. package/es/components/wallet/DiscountCard/index.less +0 -9
  177. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  178. package/es/components/wallet/DiscountCard/model.js +0 -22
  179. package/es/components/wallet/PointCard/index.d.ts +0 -3
  180. package/es/components/wallet/PointCard/index.js +0 -169
  181. package/es/components/wallet/PointCard/index.less +0 -9
  182. package/es/components/wallet/PointCard/model.d.ts +0 -13
  183. package/es/components/wallet/PointCard/model.js +0 -22
  184. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  185. package/es/components/wallet/RechargeableCard/index.js +0 -463
  186. package/es/components/wallet/RechargeableCard/index.less +0 -108
  187. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  188. package/es/components/wallet/RechargeableCard/model.js +0 -28
  189. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  190. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  191. package/es/components/wallet/Voucher/index.d.ts +0 -12
  192. package/es/components/wallet/Voucher/index.js +0 -131
  193. package/es/components/wallet/Voucher/index.less +0 -9
  194. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  195. package/es/components/wallet/Voucher/locales.js +0 -20
  196. package/es/components/wallet/Voucher/model.d.ts +0 -13
  197. package/es/components/wallet/Voucher/model.js +0 -22
  198. package/es/components/wallet/carouselArrow.png +0 -0
  199. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  200. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  201. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  202. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  203. package/es/components/wallet/components/UsageRules/index.js +0 -147
  204. package/es/components/wallet/components/UsageRules/index.less +0 -157
  205. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  206. package/es/components/wallet/components/WalletBar/index.js +0 -19
  207. package/es/components/wallet/components/WalletBar/index.less +0 -36
  208. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  209. package/es/components/wallet/components/WalletCard.js +0 -91
  210. package/es/components/wallet/components/index.d.ts +0 -3
  211. package/es/components/wallet/components/index.js +0 -4
  212. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
  213. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  214. package/es/components/wallet/index.d.ts +0 -10
  215. package/es/components/wallet/index.js +0 -807
  216. package/es/components/wallet/index.less +0 -151
  217. package/es/components/wallet/locales.d.ts +0 -132
  218. package/es/components/wallet/locales.js +0 -139
  219. package/es/components/wallet/model.d.ts +0 -37
  220. package/es/components/wallet/model.js +0 -86
  221. package/es/components/wallet/serve.d.ts +0 -150
  222. package/es/components/wallet/serve.js +0 -205
  223. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  224. package/es/components/wallet/utils/formatUtils.js +0 -73
  225. package/lib/components/wallet/Detail/index.d.ts +0 -42
  226. package/lib/components/wallet/Detail/index.js +0 -874
  227. package/lib/components/wallet/Detail/index.less +0 -386
  228. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  229. package/lib/components/wallet/Detail/locales.js +0 -194
  230. package/lib/components/wallet/Detail/model.d.ts +0 -13
  231. package/lib/components/wallet/Detail/model.js +0 -43
  232. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  233. package/lib/components/wallet/Detail/serve.js +0 -44
  234. package/lib/components/wallet/DetailContext.d.ts +0 -25
  235. package/lib/components/wallet/DetailContext.js +0 -118
  236. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  237. package/lib/components/wallet/DiscountCard/index.js +0 -209
  238. package/lib/components/wallet/DiscountCard/index.less +0 -9
  239. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  240. package/lib/components/wallet/DiscountCard/model.js +0 -43
  241. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  242. package/lib/components/wallet/PointCard/index.js +0 -190
  243. package/lib/components/wallet/PointCard/index.less +0 -9
  244. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  245. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  246. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  247. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  248. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  249. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  250. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  251. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  252. package/lib/components/wallet/Voucher/index.js +0 -146
  253. package/lib/components/wallet/Voucher/index.less +0 -9
  254. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  255. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  256. package/lib/components/wallet/Voucher/model.js +0 -43
  257. package/lib/components/wallet/carouselArrow.png +0 -0
  258. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  259. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  260. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  261. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  262. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  263. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  264. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  265. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  266. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  267. package/lib/components/wallet/components/WalletCard.js +0 -97
  268. package/lib/components/wallet/components/index.d.ts +0 -3
  269. package/lib/components/wallet/components/index.js +0 -45
  270. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
  271. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  272. package/lib/components/wallet/index.d.ts +0 -10
  273. package/lib/components/wallet/index.js +0 -580
  274. package/lib/components/wallet/index.less +0 -151
  275. package/lib/components/wallet/locales.d.ts +0 -132
  276. package/lib/components/wallet/locales.js +0 -163
  277. package/lib/components/wallet/model.d.ts +0 -37
  278. package/lib/components/wallet/model.js +0 -91
  279. package/lib/components/wallet/serve.d.ts +0 -150
  280. package/lib/components/wallet/serve.js +0 -85
  281. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  282. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -111,10 +111,26 @@ var VoucherCard = function VoucherCard(props) {
111
111
  appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$b = appointmentBooking.batchUpdateCart) === null || _appointmentBooking$b === void 0 || _appointmentBooking$b.call(appointmentBooking, items);
112
112
  };
113
113
  var onCartChange = function onCartChange() {
114
+ var _shopDiscount$setBook, _appointmentBooking$o;
114
115
  var products = cart === null || cart === void 0 ? void 0 : cart.getItems();
116
+ shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setBook = shopDiscount.setBookingSubject) === null || _shopDiscount$setBook === void 0 || _shopDiscount$setBook.call(shopDiscount, appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSetting) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.bookingSubject);
115
117
  var val = shopDiscount.calcDiscount(products);
116
118
  batchUpdateCart(val.productList);
117
119
  };
120
+ var stringifiedHolders = useMemo(function () {
121
+ var _ret;
122
+ try {
123
+ _ret = JSON.stringify(products.map(function (item) {
124
+ return (item === null || item === void 0 ? void 0 : item.holder_id) || '';
125
+ }));
126
+ } catch (error) {
127
+ _ret = '';
128
+ }
129
+ return _ret;
130
+ }, [products]);
131
+ useEffect(function () {
132
+ onCartChange();
133
+ }, [stringifiedHolders]);
118
134
 
119
135
  // // 监听customer变化
120
136
  useEffect(function () {
@@ -183,7 +199,6 @@ var VoucherCard = function VoucherCard(props) {
183
199
  // const user = utils.store?.getState()?.global?.userInfo;
184
200
  // const currentUser = formatCustomer(user);
185
201
  // const meAccount = accountLists?.find((d: any) => !d?.isGuest);
186
-
187
202
  // if (status === 'success') {
188
203
  // // appointmentBooking.setLoginAccount(
189
204
  // // meAccount?.id,
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -289,7 +289,7 @@ export var formatProductPrice = function formatProductPrice(item) {
289
289
  return price;
290
290
  };
291
291
  var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
292
- var _item$_extend8, _item$_extend9, _item$_extend11, _item$_extend13;
292
+ var _item$_extend8, _item$_extend$holder_, _item$_extend9, _item$_extend10, _item$_extend12;
293
293
  var metadata = {};
294
294
  if ((_item$_extend8 = item._extend) !== null && _item$_extend8 !== void 0 && _item$_extend8.capacity) {
295
295
  metadata.capacity = item._extend.capacity;
@@ -297,17 +297,16 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
297
297
  if (item._extend.groupId) {
298
298
  metadata.groupId = item._extend.groupId;
299
299
  }
300
- if ((_item$_extend9 = item._extend) !== null && _item$_extend9 !== void 0 && _item$_extend9.holder_id) {
301
- var _item$_extend10;
302
- metadata.holder_id = (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.holder_id;
300
+ // if (item._extend?.holder_id) {
301
+ metadata.holder_id = (_item$_extend$holder_ = (_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.holder_id) !== null && _item$_extend$holder_ !== void 0 ? _item$_extend$holder_ : null;
302
+ // }
303
+ if (isMultiDayPrices && (_item$_extend10 = item._extend) !== null && _item$_extend10 !== void 0 && _item$_extend10.multiDayPrices) {
304
+ var _item$_extend11;
305
+ metadata.multiDayPrices = (_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.multiDayPrices;
303
306
  }
304
- if (isMultiDayPrices && (_item$_extend11 = item._extend) !== null && _item$_extend11 !== void 0 && _item$_extend11.multiDayPrices) {
305
- var _item$_extend12;
306
- metadata.multiDayPrices = (_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.multiDayPrices;
307
- }
308
- if ((_item$_extend13 = item._extend) !== null && _item$_extend13 !== void 0 && _item$_extend13.unique_identification_number) {
309
- var _item$_extend14;
310
- metadata.unique_identification_number = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.unique_identification_number;
307
+ if ((_item$_extend12 = item._extend) !== null && _item$_extend12 !== void 0 && _item$_extend12.unique_identification_number) {
308
+ var _item$_extend13;
309
+ metadata.unique_identification_number = (_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.unique_identification_number;
311
310
  }
312
311
  return metadata;
313
312
  };
@@ -328,9 +327,9 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
328
327
 
329
328
  // 获取商品价格 包含组合规格
330
329
  var getSourceProductPrice = function getSourceProductPrice(item) {
331
- var _item$_extend15, _item$_extend16, _item$variant2;
332
- var other = (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.other;
333
- var price = Number((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.price);
330
+ var _item$_extend14, _item$_extend15, _item$variant2;
331
+ var other = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.other;
332
+ var price = Number((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.price);
334
333
 
335
334
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
336
335
  if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
@@ -346,8 +345,8 @@ var getSourceProductPrice = function getSourceProductPrice(item) {
346
345
 
347
346
  // 获取主商品价格 要增加option
348
347
  export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
349
- var _item$_extend17, _item$_extend$other, _item$_extend$other2, _item$_extend18;
350
- if (!isNumber((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.main_product_selling_price)) {
348
+ var _item$_extend16, _item$_extend$other, _item$_extend$other2, _item$_extend17;
349
+ if (!isNumber((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.main_product_selling_price)) {
351
350
  return undefined;
352
351
  }
353
352
  var optionPrice = new Decimal(0);
@@ -360,7 +359,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
360
359
  return accumulator.add(currentPrice.mul(currentNum));
361
360
  }, optionPrice);
362
361
  }
363
- return new Decimal((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.main_product_selling_price).add(optionPrice).toNumber();
362
+ return new Decimal((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.main_product_selling_price).add(optionPrice).toNumber();
364
363
  };
365
364
 
366
365
  /**
@@ -372,11 +371,11 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
372
371
  * @Date: 2024-12-07 14:21
373
372
  */
374
373
  var formatProducts = function formatProducts(item, quantity) {
375
- var _item$_extend19, _getMainProductSellin, _item$_extend20, _item$_extend21, _item$_extend22;
374
+ var _item$_extend18, _getMainProductSellin, _item$_extend19, _item$_extend20, _item$_extend21;
376
375
  var total = Number(item._extend.total);
377
376
  var origin_total = Number(item._extend.origin_total);
378
377
  var discount_amount = origin_total - total;
379
- var bundleDiscountList = getBundleDiscountList(((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 || (_item$_extend19 = _item$_extend19.other) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.bundle) || []);
378
+ var bundleDiscountList = getBundleDiscountList(((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 || (_item$_extend18 = _item$_extend18.other) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.bundle) || []);
380
379
  var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
381
380
  discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
382
381
 
@@ -401,10 +400,10 @@ var formatProducts = function formatProducts(item, quantity) {
401
400
  "discount_per": item._extend.discount_per,
402
401
  "discount_type": item._extend.discount_type || discount_type,
403
402
  "order_detail_id": item._extend.order_detail_id || 0,
404
- "product_bundle": formatProductBundle((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.bundle),
403
+ "product_bundle": formatProductBundle((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 || (_item$_extend19 = _item$_extend19.other) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.bundle),
405
404
  "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
406
- "product_option_item": formatProductOption((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.option),
407
- "product_variant_id": ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 || (_item$_extend22 = _item$_extend22.other) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.product_variant_id) || 0,
405
+ "product_option_item": formatProductOption((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.option),
406
+ "product_variant_id": ((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.product_variant_id) || 0,
408
407
  "discount_list": notManualDiscount,
409
408
  metadata: formatMetaData(item, false)
410
409
  };
@@ -424,8 +423,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
424
423
 
425
424
  // 过滤出卡片中的普通商品
426
425
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
427
- var _item$_extend23;
428
- var holderId = (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.holder_id;
426
+ var _item$_extend22;
427
+ var holderId = (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.holder_id;
429
428
  var bookingHolderId = booking_item._extend.holder_id;
430
429
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
431
430
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -451,15 +450,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
451
450
 
452
451
  // 找出预约商品
453
452
  list = list.filter(function (item) {
454
- var _item$_extend24;
455
- return ((_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.holder_id) && !isNormalProductByDurationSchedule(item);
453
+ var _item$_extend23;
454
+ return ((_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.holder_id) && !isNormalProductByDurationSchedule(item);
456
455
  });
457
456
 
458
457
  // 对预约商品列表根据holder_id进行分组
459
458
  var groupMap = new Map();
460
459
  list.forEach(function (item) {
461
- var _item$_extend25;
462
- var key = (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.holder_id; // 分组键
460
+ var _item$_extend24;
461
+ var key = (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.holder_id; // 分组键
463
462
  if (!groupMap.has(key)) {
464
463
  groupMap.set(key, []);
465
464
  }
@@ -520,7 +519,7 @@ var formatBookings = function formatBookings(data, values) {
520
519
  var bookings = [];
521
520
  var obj = {};
522
521
  list.forEach(function (item) {
523
- var _item$_extend30;
522
+ var _item$_extend29;
524
523
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
525
524
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
526
525
  var end_time = item._extend.endDate.format('HH:mm');
@@ -534,9 +533,9 @@ var formatBookings = function formatBookings(data, values) {
534
533
 
535
534
  // 跨日预约下的普通商品
536
535
  if (isDay) {
537
- var _item$_extend26, _item$_extend27, _item$_extend28, _item$_extend29;
538
- var startDate = ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.startDate) || ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.start_date);
539
- var endDate = ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.endDate) || ((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.end_date);
536
+ var _item$_extend25, _item$_extend26, _item$_extend27, _item$_extend28;
537
+ var startDate = ((_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.startDate) || ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.start_date);
538
+ var endDate = ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.endDate) || ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.end_date);
540
539
  var _formatDayTime = formatDayTime({
541
540
  startDate: startDate,
542
541
  endDate: endDate
@@ -562,7 +561,7 @@ var formatBookings = function formatBookings(data, values) {
562
561
  // 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
563
562
  // 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
564
563
  // 后续出现不需要设置 metadata.multiDayPrices. 节省体积
565
- var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.groupId];
564
+ var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.groupId];
566
565
  var booking = _objectSpread(_objectSpread({
567
566
  product: formatProducts(item),
568
567
  relation_products: formatRelationDetails(item._extend.relation_details),
@@ -620,10 +619,10 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
620
619
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
621
620
  // open items 下的商品
622
621
  list = list.filter(function (item) {
623
- var _item$_extend31;
622
+ var _item$_extend30;
624
623
  return (
625
624
  // 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
626
- type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.holder_id) && appointmentTypes.includes(item.extension_type)
625
+ type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.holder_id) && appointmentTypes.includes(item.extension_type)
627
626
  );
628
627
  });
629
628
  var relationProducts = [];
@@ -757,7 +756,7 @@ export var formatValues = function formatValues(state) {
757
756
  export var checkHolderIsError = function checkHolderIsError(state) {
758
757
  var _state$client;
759
758
  var holderError = state.service.value.some(function (item) {
760
- var _item$_extend32;
759
+ var _item$_extend31;
761
760
  // 普通商品不需要检测holder
762
761
  if (isNormalProductByDurationSchedule(item)) {
763
762
  return false;
@@ -765,7 +764,7 @@ export var checkHolderIsError = function checkHolderIsError(state) {
765
764
  if (item._extend.quantity === 1 && !item._extend.holder_id) {
766
765
  return true;
767
766
  }
768
- if (item._extend.quantity > 1 && ((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 || (_item$_extend32 = _item$_extend32.holder_id) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.length) !== item._extend.quantity) {
767
+ if (item._extend.quantity > 1 && ((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 || (_item$_extend31 = _item$_extend31.holder_id) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.length) !== item._extend.quantity) {
769
768
  return true;
770
769
  }
771
770
  return false;
@@ -40,7 +40,7 @@ var ShopDiscountHooks = {
40
40
  };
41
41
  var services = {};
42
42
  var VoucherCard = function VoucherCard(props) {
43
- var _context$appHelper, _state$client$value, _state$service2;
43
+ var _context$appHelper, _state$client$value, _state$pet2, _state$service2;
44
44
  var context = useEngineContext();
45
45
  var state = props.state,
46
46
  dispatch = props.dispatch,
@@ -63,6 +63,7 @@ var VoucherCard = function VoucherCard(props) {
63
63
  var addonsValueRef = useRef(state.addons.value);
64
64
  var isBooking4Shop = useIsBooking4Shop(state);
65
65
  var shopDiscount = pisellos.getModule('shopDiscount');
66
+ var holderChangedRef = useRef(false);
66
67
  services = state.service;
67
68
 
68
69
  // 设置client
@@ -83,17 +84,18 @@ var VoucherCard = function VoucherCard(props) {
83
84
  var serviceMemo = useMemo(function () {
84
85
  var _ref;
85
86
  var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
86
- var _value$_extend, _value$_extend2;
87
- return _defineProperty({
87
+ var _value$_extend, _value$_extend2, _value$_extend3;
88
+ return {
88
89
  booking_id: value.booking_id,
89
90
  id: value.id,
90
91
  price: value.price,
91
92
  total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
92
93
  discount_list: value.discount_list,
93
94
  origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total,
95
+ holder_id: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.holder_id,
94
96
  quantity: value._extend.quantity,
95
97
  startDate: value._extend.startDate
96
- }, "quantity", value._extend.quantity);
98
+ };
97
99
  });
98
100
  return val;
99
101
  }, [state.service.value]);
@@ -103,22 +105,44 @@ var VoucherCard = function VoucherCard(props) {
103
105
  }, 0);
104
106
  }, [serviceMemo]);
105
107
  var addonsMemo = useMemo(function () {
106
- var _ref3;
107
- var val = (_ref3 = state.addons.value || []) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (value) {
108
- var _value$_extend3, _value$_extend4;
108
+ var _ref2;
109
+ var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
110
+ var _value$_extend4, _value$_extend5;
109
111
  return {
110
112
  booking_id: value.booking_id,
111
113
  id: value.id,
112
114
  _id: value._id,
113
115
  price: value.price,
114
- total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
116
+ total: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.total,
115
117
  discount_list: value.discount_list,
116
118
  _key: value._key,
117
- num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
119
+ num: value === null || value === void 0 || (_value$_extend5 = value._extend) === null || _value$_extend5 === void 0 ? void 0 : _value$_extend5.quantity
118
120
  };
119
121
  });
120
122
  return val;
121
123
  }, [state.addons.value]);
124
+ var holdersMemo = useMemo(function () {
125
+ if (isBooking4Shop) {
126
+ var _state$pet;
127
+ var list = [];
128
+ if ((_state$pet = state.pet) !== null && _state$pet !== void 0 && _state$pet.value) {
129
+ var entries = Object.entries(state.pet.value);
130
+ // 多余 1 个表单类型时,无法计算
131
+ // 同一表单多个 holder 时,os内只取第一个
132
+ if (entries.length === 1) {
133
+ list = entries[0][1];
134
+ }
135
+ }
136
+ shopDiscount.setHolders(list);
137
+ holderChangedRef.current = true;
138
+ return list || [];
139
+ }
140
+ }, [(_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.value, isBooking4Shop]);
141
+ useEffect(function () {
142
+ var _shopDiscount$setBook, _state$bookingConfig;
143
+ console.log('update booking subject', state.bookingConfig);
144
+ shopDiscount === null || shopDiscount === void 0 || (_shopDiscount$setBook = shopDiscount.setBookingSubject) === null || _shopDiscount$setBook === void 0 || _shopDiscount$setBook.call(shopDiscount, (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.basic) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.appointment_subject);
145
+ }, [state.bookingConfig]);
122
146
  var disabled = useMemo(function () {
123
147
  var _state$bookingDetail;
124
148
  if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
@@ -130,8 +154,7 @@ var VoucherCard = function VoucherCard(props) {
130
154
  }, [state, addonsMemo, serviceMemo]);
131
155
  var _useDebounceFn = useDebounceFn(function () {
132
156
  var _state$service;
133
- // console.log('state.service.value1', state.service.value);
134
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
157
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
135
158
  return;
136
159
  }
137
160
  if (isBooking4Shop) {
@@ -139,6 +162,8 @@ var VoucherCard = function VoucherCard(props) {
139
162
  console.log('input: ', state.service.value);
140
163
  console.log('output: ', val);
141
164
  productListToValue(val.productList);
165
+ // 重置 holder 变化标识,防止重复计算
166
+ holderChangedRef.current = false;
142
167
  }
143
168
  }, {
144
169
  wait: 500
@@ -148,7 +173,7 @@ var VoucherCard = function VoucherCard(props) {
148
173
  // 更新productList
149
174
  useEffect(function () {
150
175
  run();
151
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
176
+ }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), JSON.stringify(holdersMemo), isBooking4Shop]);
152
177
  var fn = useMemoizedFn(function (result) {
153
178
  var _result$productList;
154
179
  if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
@@ -220,7 +245,7 @@ var VoucherCard = function VoucherCard(props) {
220
245
 
221
246
  // apply code
222
247
  var onScanCode = /*#__PURE__*/function () {
223
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
248
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
224
249
  var _state$client$value2;
225
250
  var customerId, val;
226
251
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -248,7 +273,7 @@ var VoucherCard = function VoucherCard(props) {
248
273
  }, _callee);
249
274
  }));
250
275
  return function onScanCode() {
251
- return _ref4.apply(this, arguments);
276
+ return _ref3.apply(this, arguments);
252
277
  };
253
278
  }();
254
279
  var availableData = useMemo(function () {
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -201,7 +201,7 @@ export var handleChangeHolder = function handleChangeHolder(products, currentIte
201
201
  _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
202
202
  holder_id: isArr(other) ? other.map(function (item) {
203
203
  return item.id;
204
- }) : item._extend.quantity > 1 ? [other.id] : other.id
204
+ }) : item._extend.quantity > 1 ? [other.id] : other === null || other === void 0 ? void 0 : other.id
205
205
  })
206
206
  });
207
207
  }
@@ -612,6 +612,7 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
612
612
  holders: formatHolders(holders),
613
613
  isShowChangeHolder: !isNormalProduct,
614
614
  isShowAction: isShowAddTime(state, item),
615
+ allowClearHolder: true,
615
616
  actionText: locales.getText('page.booking.text.add-time'),
616
617
  isMultipleResource: true,
617
618
  multiResources: multiResources,
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -109,11 +108,4 @@ export declare const walkInData: {
109
108
  id: number;
110
109
  nickname: string;
111
110
  };
112
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
113
- state: FormState;
114
- } & {
115
- dispatch: (params: {
116
- type: string;
117
- payload: any;
118
- }) => void;
119
- }>;
111
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
300
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
301
  action?: "pay" | "amount" | "deviceList" | undefined;
@@ -12,7 +12,7 @@ export interface PaymentListProps {
12
12
  renderTitle?: () => React.ReactNode;
13
13
  }
14
14
  export interface PaymentListRef {
15
- init: (props: any) => {};
15
+ init: (props: any, amount?: number) => {};
16
16
  calculateSurcharge: (amount: number) => any;
17
17
  }
18
18
  declare const _default: React.ForwardRefExoticComponent<PaymentListProps & React.RefAttributes<unknown>>;