@pisell/private-materials 6.7.8 → 6.8.1

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 (423) 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 +2 -2
  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 +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
  12. package/es/components/booking/addons/index.js +25 -17
  13. package/es/components/booking/addons/model.d.ts +10 -1
  14. package/es/components/booking/components/footer/amount.d.ts +1 -0
  15. package/es/components/booking/components/footer/amount.js +548 -84
  16. package/es/components/booking/components/footer/index.js +77 -56
  17. package/es/components/booking/components/footer/utils.d.ts +19 -0
  18. package/es/components/booking/components/footer/utils.js +194 -73
  19. package/es/components/booking/components/voucher/index.js +23 -7
  20. package/es/components/booking/forms/model.d.ts +10 -1
  21. package/es/components/booking/hooks/useQuotation.js +4 -1
  22. package/es/components/booking/info/model.d.ts +10 -1
  23. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/info/service2/utils.js +1 -0
  25. package/es/components/booking/info2/cartClientCard/index.js +30 -6
  26. package/es/components/booking/info2/index.js +1 -1
  27. package/es/components/booking/info2/service/addService/index.js +2 -3
  28. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  29. package/es/components/booking/info2/service/editNormalService/index.js +6 -0
  30. package/es/components/booking/info2/service/editService/index.js +16 -6
  31. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  32. package/es/components/booking/info2/service/editService/utils.js +66 -0
  33. package/es/components/booking/model.d.ts +9 -1
  34. package/es/components/booking/notes/model.d.ts +10 -1
  35. package/es/components/booking/payments/model.d.ts +10 -1
  36. package/es/components/booking/utils.d.ts +1 -0
  37. package/es/components/booking/utils.js +16 -3
  38. package/es/components/checkout/PaymentModal.d.ts +13 -5
  39. package/es/components/checkout/PaymentModal.js +304 -252
  40. package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  41. package/es/components/checkout/components/AdditionalModule/index.js +52 -12
  42. package/es/components/checkout/components/AmountSummary/index.js +9 -76
  43. package/es/components/checkout/components/AmountSummary/index.less +5 -6
  44. package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  45. package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
  46. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  47. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  48. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
  49. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  50. package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  51. package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  52. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  53. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
  54. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  55. package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
  56. package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
  57. package/es/components/checkout/hooks/useWalletPass.js +1 -1
  58. package/es/components/checkout/index.less +1 -1
  59. package/es/components/checkout/locales.d.ts +6 -0
  60. package/es/components/checkout/locales.js +6 -0
  61. package/es/components/checkout/plugin.d.ts +2 -0
  62. package/es/components/checkout/plugin.js +303 -0
  63. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  64. package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  65. package/es/components/eftposPay/hooks.d.ts +1 -1
  66. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  67. package/es/components/eftposPay/payo/config.js +70 -32
  68. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  69. package/es/components/eftposPay/payo/payment.js +579 -0
  70. package/es/components/eftposPay/store/index.d.ts +4 -4
  71. package/es/components/eftposPay/tyro/index.js +12 -0
  72. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  73. package/es/components/eftposPay/utils/log/index.js +371 -0
  74. package/es/components/index.d.ts +2 -1
  75. package/es/components/index.js +2 -1
  76. package/es/components/list/List.js +99 -56
  77. package/es/components/list/hooks/useListState.d.ts +5 -3
  78. package/es/components/list/hooks/useListState.js +10 -2
  79. package/es/components/list/styles/base.less +4 -0
  80. package/es/components/list/styles/content.less +1 -1
  81. package/es/components/list/styles/header.less +4 -4
  82. package/es/components/list/types.d.ts +1 -0
  83. package/es/components/list/utils/index.d.ts +13 -1
  84. package/es/components/list/utils/index.js +43 -1
  85. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
  86. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  87. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  88. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  89. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  90. package/es/components/pay/toC/index.js +7 -4
  91. package/es/components/pay/toC/locales.d.ts +3 -0
  92. package/es/components/pay/toC/locales.js +6 -3
  93. package/es/components/pay/toC/model.d.ts +9 -1
  94. package/es/components/pay/toC/status.d.ts +1 -0
  95. package/es/components/pay/toC/status.js +3 -0
  96. package/es/components/schedules/model.d.ts +9 -1
  97. package/es/components/subTotal/index.js +1 -1
  98. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  99. package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
  100. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  101. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  102. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  103. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  104. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  105. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  106. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  107. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  108. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  109. package/es/components/systemSettings/registry/components/index.js +4 -0
  110. package/es/components/systemSettings/registry/index.d.ts +5 -0
  111. package/es/components/systemSettings/registry/index.js +1059 -0
  112. package/es/components/systemSettings/registry/index.less +410 -0
  113. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  114. package/es/components/systemSettings/registry/locales.js +300 -0
  115. package/es/components/systemSettings/registry/services.d.ts +77 -0
  116. package/es/components/systemSettings/registry/services.js +472 -0
  117. package/es/components/systemSettings/registry/types.d.ts +126 -0
  118. package/es/components/systemSettings/registry/types.js +1 -0
  119. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  120. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  121. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  122. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  123. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +58 -11
  124. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
  125. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
  126. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +149 -36
  127. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
  128. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  129. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  130. package/es/components/ticketBooking/components/timeBar/index.js +112 -7
  131. package/es/components/ticketBooking/components/timeBar/index.less +59 -0
  132. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
  133. package/es/components/ticketBooking/locales.d.ts +9 -0
  134. package/es/components/ticketBooking/locales.js +12 -3
  135. package/es/components/ticketBooking/utils/index.d.ts +3 -0
  136. package/es/components/ticketBooking/utils/index.js +36 -13
  137. package/es/components/wallet/Detail/index.js +34 -2
  138. package/es/components/wallet/Detail/index.less +11 -0
  139. package/es/components/wallet/Detail/locales.d.ts +6 -0
  140. package/es/components/wallet/Detail/locales.js +14 -2
  141. package/es/components/wallet/Detail/model.d.ts +13 -1
  142. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  143. package/es/components/wallet/PointCard/model.d.ts +13 -1
  144. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  145. package/es/components/wallet/Voucher/index.js +11 -10
  146. package/es/components/wallet/Voucher/model.d.ts +13 -1
  147. package/es/components/wallet/components/WalletCard.js +5 -1
  148. package/es/components/wallet/index.js +4 -2
  149. package/es/components/wallet/model.d.ts +9 -1
  150. package/es/components/wallet/serve.d.ts +7 -0
  151. package/es/components/wallet/utils.d.ts +48 -0
  152. package/es/components/wallet/utils.js +342 -0
  153. package/es/index.d.ts +5 -0
  154. package/es/index.js +6 -1
  155. package/es/plus/clientCard/locales.js +3 -3
  156. package/es/plus/clinetSearch/index.js +28 -30
  157. package/es/plus/clinetSearch/locales.d.ts +3 -0
  158. package/es/plus/clinetSearch/locales.js +7 -4
  159. package/es/plus/clinetSearch/types.d.ts +12 -0
  160. package/es/plus/productSelect/CategoryTabs/index.d.ts +1 -0
  161. package/es/plus/productSelect/CategoryTabs/index.js +2 -1
  162. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  163. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  164. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  165. package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
  166. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  167. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  168. package/es/plus/walletPassGallery/index.js +7 -3
  169. package/es/plus/walletPassGallery/serve.d.ts +3 -0
  170. package/es/plus/walletPassGallery/serve.js +4 -2
  171. package/es/pro/Login2.0/index.less +15 -8
  172. package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  173. package/es/pro/Selector/BatchSelectorDemo.js +470 -0
  174. package/es/pro/Selector/Selector.d.ts +5 -0
  175. package/es/pro/Selector/Selector.js +283 -0
  176. package/es/pro/Selector/SelectorGroup.d.ts +11 -0
  177. package/es/pro/Selector/SelectorGroup.js +537 -0
  178. package/es/pro/Selector/components/Card/index.d.ts +27 -0
  179. package/es/pro/Selector/components/Card/index.js +96 -0
  180. package/es/pro/Selector/components/Card/index.less +132 -0
  181. package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  182. package/es/pro/Selector/components/IntersectionObserver.js +384 -0
  183. package/es/pro/Selector/components/NumericStepper/index.d.ts +41 -0
  184. package/es/pro/Selector/components/NumericStepper/index.js +198 -0
  185. package/es/pro/Selector/components/NumericStepper/index.less +221 -0
  186. package/es/pro/Selector/components/index.d.ts +2 -0
  187. package/es/pro/Selector/components/index.js +2 -0
  188. package/es/pro/Selector/demo.d.ts +3 -0
  189. package/es/pro/Selector/demo.js +158 -0
  190. package/es/pro/Selector/hooks/useSelectionController.d.ts +42 -0
  191. package/es/pro/Selector/hooks/useSelectionController.js +414 -0
  192. package/es/pro/Selector/index.d.ts +8 -0
  193. package/es/pro/Selector/index.js +5 -0
  194. package/es/pro/Selector/locales.d.ts +42 -0
  195. package/es/pro/Selector/locales.js +80 -0
  196. package/es/pro/Selector/selector.less +3 -0
  197. package/es/pro/Selector/selectorGroup.less +8 -0
  198. package/es/pro/Selector/types.d.ts +114 -0
  199. package/es/pro/Selector/types.js +1 -0
  200. package/es/pro/Selector/utils/index.d.ts +49 -0
  201. package/es/pro/Selector/utils/index.js +229 -0
  202. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  203. package/es/pro/comprehensiveSearch/locales.js +1 -1
  204. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
  205. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  206. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
  207. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  208. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
  209. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  210. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  211. package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
  212. package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  213. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  214. package/lib/components/booking/addons/index.js +15 -7
  215. package/lib/components/booking/addons/model.d.ts +10 -1
  216. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  217. package/lib/components/booking/components/footer/amount.js +293 -41
  218. package/lib/components/booking/components/footer/index.js +30 -11
  219. package/lib/components/booking/components/footer/utils.d.ts +19 -0
  220. package/lib/components/booking/components/footer/utils.js +138 -41
  221. package/lib/components/booking/components/voucher/index.js +25 -9
  222. package/lib/components/booking/forms/model.d.ts +10 -1
  223. package/lib/components/booking/hooks/useQuotation.js +2 -1
  224. package/lib/components/booking/info/model.d.ts +10 -1
  225. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  226. package/lib/components/booking/info/service2/utils.js +1 -0
  227. package/lib/components/booking/info2/cartClientCard/index.js +25 -5
  228. package/lib/components/booking/info2/index.js +7 -2
  229. package/lib/components/booking/info2/service/addService/index.js +1 -2
  230. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  231. package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
  232. package/lib/components/booking/info2/service/editService/index.js +12 -3
  233. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  234. package/lib/components/booking/info2/service/editService/utils.js +40 -3
  235. package/lib/components/booking/model.d.ts +9 -1
  236. package/lib/components/booking/notes/model.d.ts +10 -1
  237. package/lib/components/booking/payments/model.d.ts +10 -1
  238. package/lib/components/booking/utils.d.ts +1 -0
  239. package/lib/components/booking/utils.js +11 -0
  240. package/lib/components/checkout/PaymentModal.d.ts +13 -5
  241. package/lib/components/checkout/PaymentModal.js +190 -147
  242. package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  243. package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
  244. package/lib/components/checkout/components/AmountSummary/index.js +5 -46
  245. package/lib/components/checkout/components/AmountSummary/index.less +5 -6
  246. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  247. package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
  248. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  249. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  250. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
  251. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  252. package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
  253. package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  254. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  255. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
  256. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  257. package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
  258. package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
  259. package/lib/components/checkout/hooks/useWalletPass.js +1 -1
  260. package/lib/components/checkout/index.less +1 -1
  261. package/lib/components/checkout/locales.d.ts +6 -0
  262. package/lib/components/checkout/locales.js +6 -0
  263. package/lib/components/checkout/plugin.d.ts +2 -0
  264. package/lib/components/checkout/plugin.js +263 -0
  265. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  266. package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  267. package/lib/components/eftposPay/hooks.d.ts +1 -1
  268. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  269. package/lib/components/eftposPay/payo/config.js +98 -73
  270. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  271. package/lib/components/eftposPay/payo/payment.js +357 -0
  272. package/lib/components/eftposPay/store/index.d.ts +4 -4
  273. package/lib/components/eftposPay/tyro/index.js +12 -0
  274. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  275. package/lib/components/eftposPay/utils/log/index.js +294 -0
  276. package/lib/components/index.d.ts +2 -1
  277. package/lib/components/index.js +3 -0
  278. package/lib/components/list/List.js +58 -36
  279. package/lib/components/list/hooks/useListState.d.ts +5 -3
  280. package/lib/components/list/hooks/useListState.js +9 -1
  281. package/lib/components/list/styles/base.less +4 -0
  282. package/lib/components/list/styles/content.less +1 -1
  283. package/lib/components/list/styles/header.less +4 -4
  284. package/lib/components/list/types.d.ts +1 -0
  285. package/lib/components/list/utils/index.d.ts +13 -1
  286. package/lib/components/list/utils/index.js +27 -0
  287. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
  288. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  289. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  290. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  291. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  292. package/lib/components/pay/toC/index.js +4 -1
  293. package/lib/components/pay/toC/locales.d.ts +3 -0
  294. package/lib/components/pay/toC/locales.js +6 -3
  295. package/lib/components/pay/toC/model.d.ts +9 -1
  296. package/lib/components/pay/toC/status.d.ts +1 -0
  297. package/lib/components/pay/toC/status.js +5 -0
  298. package/lib/components/schedules/model.d.ts +9 -1
  299. package/lib/components/subTotal/index.js +1 -1
  300. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  301. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  302. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  303. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  304. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  305. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  306. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  307. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  308. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  309. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  310. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  311. package/lib/components/systemSettings/registry/components/index.js +48 -0
  312. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  313. package/lib/components/systemSettings/registry/index.js +529 -0
  314. package/lib/components/systemSettings/registry/index.less +410 -0
  315. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  316. package/lib/components/systemSettings/registry/locales.js +324 -0
  317. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  318. package/lib/components/systemSettings/registry/services.js +290 -0
  319. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  320. package/lib/components/systemSettings/registry/types.js +17 -0
  321. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  322. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  323. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  324. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  325. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +40 -5
  326. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
  327. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
  328. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +93 -24
  329. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
  330. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  331. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  332. package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
  333. package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
  334. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
  335. package/lib/components/ticketBooking/locales.d.ts +9 -0
  336. package/lib/components/ticketBooking/locales.js +12 -3
  337. package/lib/components/ticketBooking/utils/index.d.ts +3 -0
  338. package/lib/components/ticketBooking/utils/index.js +20 -6
  339. package/lib/components/wallet/Detail/index.js +31 -3
  340. package/lib/components/wallet/Detail/index.less +11 -0
  341. package/lib/components/wallet/Detail/locales.d.ts +6 -0
  342. package/lib/components/wallet/Detail/locales.js +14 -2
  343. package/lib/components/wallet/Detail/model.d.ts +13 -1
  344. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  345. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  346. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  347. package/lib/components/wallet/Voucher/index.js +8 -8
  348. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  349. package/lib/components/wallet/components/WalletCard.js +4 -0
  350. package/lib/components/wallet/index.js +2 -2
  351. package/lib/components/wallet/model.d.ts +9 -1
  352. package/lib/components/wallet/serve.d.ts +7 -0
  353. package/lib/components/wallet/utils.d.ts +48 -0
  354. package/lib/components/wallet/utils.js +287 -0
  355. package/lib/index.d.ts +5 -0
  356. package/lib/index.js +15 -0
  357. package/lib/plus/clientCard/locales.js +3 -3
  358. package/lib/plus/clinetSearch/index.js +17 -8
  359. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  360. package/lib/plus/clinetSearch/locales.js +7 -4
  361. package/lib/plus/clinetSearch/types.d.ts +12 -0
  362. package/lib/plus/productSelect/CategoryTabs/index.d.ts +1 -0
  363. package/lib/plus/productSelect/CategoryTabs/index.js +2 -1
  364. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  365. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  366. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  367. package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
  368. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  369. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  370. package/lib/plus/walletPassGallery/index.js +7 -3
  371. package/lib/plus/walletPassGallery/serve.d.ts +3 -0
  372. package/lib/plus/walletPassGallery/serve.js +3 -2
  373. package/lib/pro/Login2.0/index.less +15 -8
  374. package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  375. package/lib/pro/Selector/BatchSelectorDemo.js +376 -0
  376. package/lib/pro/Selector/Selector.d.ts +5 -0
  377. package/lib/pro/Selector/Selector.js +264 -0
  378. package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
  379. package/lib/pro/Selector/SelectorGroup.js +463 -0
  380. package/lib/pro/Selector/components/Card/index.d.ts +27 -0
  381. package/lib/pro/Selector/components/Card/index.js +114 -0
  382. package/lib/pro/Selector/components/Card/index.less +132 -0
  383. package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  384. package/lib/pro/Selector/components/IntersectionObserver.js +281 -0
  385. package/lib/pro/Selector/components/NumericStepper/index.d.ts +41 -0
  386. package/lib/pro/Selector/components/NumericStepper/index.js +221 -0
  387. package/lib/pro/Selector/components/NumericStepper/index.less +221 -0
  388. package/lib/pro/Selector/components/index.d.ts +2 -0
  389. package/lib/pro/Selector/components/index.js +42 -0
  390. package/lib/pro/Selector/demo.d.ts +3 -0
  391. package/lib/pro/Selector/demo.js +102 -0
  392. package/lib/pro/Selector/hooks/useSelectionController.d.ts +42 -0
  393. package/lib/pro/Selector/hooks/useSelectionController.js +338 -0
  394. package/lib/pro/Selector/index.d.ts +8 -0
  395. package/lib/pro/Selector/index.js +39 -0
  396. package/lib/pro/Selector/locales.d.ts +42 -0
  397. package/lib/pro/Selector/locales.js +80 -0
  398. package/lib/pro/Selector/selector.less +3 -0
  399. package/lib/pro/Selector/selectorGroup.less +8 -0
  400. package/lib/pro/Selector/types.d.ts +114 -0
  401. package/lib/pro/Selector/types.js +17 -0
  402. package/lib/pro/Selector/utils/index.d.ts +49 -0
  403. package/lib/pro/Selector/utils/index.js +221 -0
  404. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  405. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  406. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
  407. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  408. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
  409. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  410. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
  411. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  412. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  413. package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
  414. package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  415. package/lowcode/payment-modal/meta.ts +135 -0
  416. package/lowcode/selector/meta.ts +352 -0
  417. package/lowcode/selector.group/meta.ts +200 -0
  418. package/lowcode/settings-registry/meta.ts +29 -0
  419. package/lowcode/wallet-pass-detail/meta.ts +89 -0
  420. package/package.json +3 -3
  421. package/es/components/checkout/PaymentPlugin.d.ts +0 -3
  422. package/lib/components/checkout/PaymentPlugin.d.ts +0 -3
  423. package/lib/components/checkout/PaymentPlugin.js +0 -181
@@ -0,0 +1,221 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/pro/Selector/components/NumericStepper/index.tsx
30
+ var NumericStepper_exports = {};
31
+ __export(NumericStepper_exports, {
32
+ default: () => NumericStepper_default
33
+ });
34
+ module.exports = __toCommonJS(NumericStepper_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_react = require("react");
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_index = require("./index.less");
39
+ var NumericStepper = ({
40
+ value,
41
+ defaultValue = 0,
42
+ min = 0,
43
+ max = Infinity,
44
+ step = 1,
45
+ disabled = false,
46
+ onChange,
47
+ className,
48
+ style,
49
+ size = "middle",
50
+ shape = "round",
51
+ showInput = false,
52
+ minusIcon,
53
+ plusIcon
54
+ }) => {
55
+ const [internalValue, setInternalValue] = (0, import_react.useState)(
56
+ value !== void 0 ? value : defaultValue
57
+ );
58
+ const [inputDisplayValue, setInputDisplayValue] = (0, import_react.useState)("");
59
+ const currentValue = value !== void 0 ? value : internalValue;
60
+ (0, import_react.useEffect)(() => {
61
+ if (value !== void 0) {
62
+ setInternalValue(value);
63
+ }
64
+ }, [value]);
65
+ (0, import_react.useEffect)(() => {
66
+ setInputDisplayValue(currentValue.toString());
67
+ }, [currentValue]);
68
+ const handleValueChange = (0, import_react.useCallback)(
69
+ (newValue) => {
70
+ const clampedValue = Math.max(min, Math.min(max, newValue));
71
+ if (value === void 0) {
72
+ setInternalValue(clampedValue);
73
+ }
74
+ onChange == null ? void 0 : onChange(clampedValue);
75
+ },
76
+ [min, max, value, onChange]
77
+ );
78
+ const handleDecrease = (0, import_react.useCallback)(() => {
79
+ if (disabled) return;
80
+ const newValue = currentValue - step;
81
+ if (newValue >= min) {
82
+ handleValueChange(newValue);
83
+ }
84
+ }, [currentValue, step, min, disabled, handleValueChange]);
85
+ const handleIncrease = (0, import_react.useCallback)(() => {
86
+ if (disabled) return;
87
+ const newValue = currentValue + step;
88
+ if (newValue <= max) {
89
+ handleValueChange(newValue);
90
+ }
91
+ }, [currentValue, step, max, disabled, handleValueChange]);
92
+ const handleInputChange = (0, import_react.useCallback)(
93
+ (e) => {
94
+ const inputValue = e.target.value;
95
+ setInputDisplayValue(inputValue);
96
+ },
97
+ []
98
+ );
99
+ const processInputValue = (0, import_react.useCallback)(
100
+ (inputValue) => {
101
+ const trimmedValue = inputValue.trim();
102
+ if (trimmedValue === "") {
103
+ setInputDisplayValue(currentValue.toString());
104
+ return;
105
+ }
106
+ const numValue = parseFloat(trimmedValue);
107
+ if (!isNaN(numValue)) {
108
+ const clampedValue = Math.max(min, Math.min(max, numValue));
109
+ handleValueChange(clampedValue);
110
+ setInputDisplayValue(clampedValue.toString());
111
+ } else {
112
+ setInputDisplayValue(currentValue.toString());
113
+ }
114
+ },
115
+ [min, max, currentValue, handleValueChange]
116
+ );
117
+ const handleInputBlur = (0, import_react.useCallback)(
118
+ (e) => {
119
+ processInputValue(e.target.value);
120
+ },
121
+ [processInputValue]
122
+ );
123
+ const handleInputKeyDown = (0, import_react.useCallback)(
124
+ (e) => {
125
+ if (e.key === "Enter") {
126
+ e.preventDefault();
127
+ processInputValue(e.currentTarget.value);
128
+ e.currentTarget.blur();
129
+ } else if (e.key === "Escape") {
130
+ e.preventDefault();
131
+ setInputDisplayValue(currentValue.toString());
132
+ e.currentTarget.blur();
133
+ }
134
+ },
135
+ [processInputValue, currentValue]
136
+ );
137
+ const isDecreaseDisabled = disabled || currentValue <= min;
138
+ const isIncreaseDisabled = disabled || currentValue >= max;
139
+ const stepperClasses = (0, import_classnames.default)(
140
+ "numeric-stepper",
141
+ `numeric-stepper-${size}`,
142
+ `numeric-stepper-${shape}`,
143
+ {
144
+ "numeric-stepper-disabled": disabled,
145
+ "numeric-stepper-with-input": showInput,
146
+ "numeric-stepper-simple": currentValue === 0 || currentValue === void 0
147
+ },
148
+ className
149
+ );
150
+ const isSimpleMode = currentValue === 0 || currentValue === void 0;
151
+ return /* @__PURE__ */ React.createElement(
152
+ "div",
153
+ {
154
+ className: stepperClasses,
155
+ style,
156
+ onClick: (e) => e.stopPropagation()
157
+ },
158
+ !isSimpleMode && /* @__PURE__ */ React.createElement(
159
+ "button",
160
+ {
161
+ type: "button",
162
+ className: (0, import_classnames.default)(
163
+ "numeric-stepper-button",
164
+ "numeric-stepper-minus",
165
+ {
166
+ "numeric-stepper-button-disabled": isDecreaseDisabled
167
+ }
168
+ ),
169
+ disabled: isDecreaseDisabled,
170
+ onClick: handleDecrease
171
+ },
172
+ minusIcon || /* @__PURE__ */ React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React.createElement(
173
+ "path",
174
+ {
175
+ d: "M3 8h10",
176
+ stroke: "currentColor",
177
+ strokeWidth: "1.5",
178
+ strokeLinecap: "round"
179
+ }
180
+ ))
181
+ ),
182
+ !isSimpleMode && (showInput ? /* @__PURE__ */ React.createElement(
183
+ "input",
184
+ {
185
+ type: "text",
186
+ className: "numeric-stepper-input",
187
+ value: inputDisplayValue,
188
+ onChange: handleInputChange,
189
+ onBlur: handleInputBlur,
190
+ onKeyDown: handleInputKeyDown,
191
+ disabled,
192
+ placeholder: currentValue.toString()
193
+ }
194
+ ) : /* @__PURE__ */ React.createElement("span", { className: "numeric-stepper-display" }, currentValue)),
195
+ /* @__PURE__ */ React.createElement(
196
+ "button",
197
+ {
198
+ type: "button",
199
+ className: (0, import_classnames.default)(
200
+ "numeric-stepper-button",
201
+ "numeric-stepper-plus",
202
+ {
203
+ "numeric-stepper-button-disabled": isIncreaseDisabled
204
+ }
205
+ ),
206
+ disabled: isIncreaseDisabled,
207
+ onClick: handleIncrease
208
+ },
209
+ plusIcon || /* @__PURE__ */ React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React.createElement(
210
+ "path",
211
+ {
212
+ d: "M8 3v10M3 8h10",
213
+ stroke: "currentColor",
214
+ strokeWidth: "1.5",
215
+ strokeLinecap: "round"
216
+ }
217
+ ))
218
+ )
219
+ );
220
+ };
221
+ var NumericStepper_default = NumericStepper;
@@ -0,0 +1,221 @@
1
+ .numeric-stepper {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ gap: 8px;
5
+ transition: all 0.2s ease-in-out;
6
+
7
+ &-disabled {
8
+ cursor: not-allowed;
9
+ }
10
+
11
+ // 简单模式样式(只显示加号按钮)
12
+ &-simple {
13
+ gap: 0;
14
+ }
15
+
16
+ // 按钮样式
17
+ &-button {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ width: 32px;
22
+ height: 32px;
23
+ border: none;
24
+ background-color: #7f56d9;
25
+ cursor: pointer;
26
+ color: #ffffff;
27
+ transition: all 0.2s ease-in-out;
28
+
29
+ &:hover {
30
+ background-color: #6b46c1;
31
+ }
32
+
33
+ &:active {
34
+ background-color: #553c9a;
35
+ transform: scale(0.95);
36
+ }
37
+
38
+ &:focus {
39
+ outline: none;
40
+ box-shadow: 0 0 0 2px rgba(127, 86, 217, 0.3);
41
+ }
42
+
43
+ &-disabled {
44
+ cursor: not-allowed;
45
+ background-color: #d0d5dd !important;
46
+
47
+ &:hover {
48
+ background-color: #d0d5dd !important;
49
+ transform: none;
50
+ }
51
+ }
52
+
53
+ svg {
54
+ width: 16px;
55
+ height: 16px;
56
+ stroke: currentColor;
57
+ }
58
+ }
59
+
60
+ // 按钮形状样式
61
+ &-round {
62
+ .numeric-stepper-button {
63
+ border-radius: 50%;
64
+ }
65
+ }
66
+
67
+ &-square {
68
+ .numeric-stepper-button {
69
+ border-radius: 12px;
70
+ }
71
+ }
72
+
73
+ // 输入框样式
74
+ &-input {
75
+ border: none;
76
+ outline: none;
77
+ text-align: center;
78
+ font-size: 16px;
79
+ font-weight: 600;
80
+ line-height: 1.5;
81
+ color: #101828;
82
+ background: transparent;
83
+ width: 30px;
84
+ height: 30px;
85
+ max-width: 56px;
86
+ padding: 0 4px;
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+
91
+ &::-webkit-outer-spin-button,
92
+ &::-webkit-inner-spin-button {
93
+ -webkit-appearance: none;
94
+ margin: 0;
95
+ }
96
+
97
+ &[type='number'] {
98
+ -moz-appearance: textfield;
99
+ }
100
+
101
+ &:disabled {
102
+ color: #9ca3af;
103
+ cursor: not-allowed;
104
+ }
105
+ }
106
+
107
+ // 显示区域样式(当不显示输入框时)
108
+ &-display {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ width: 30px;
113
+ height: 30px;
114
+ max-width: 56px;
115
+ padding: 0 4px;
116
+ font-size: 16px;
117
+ font-weight: 600;
118
+ line-height: 1.5;
119
+ color: #101828;
120
+ text-align: center;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ }
125
+
126
+ // 尺寸变体
127
+ &-small {
128
+ gap: 8px;
129
+
130
+ .numeric-stepper-button {
131
+ width: 24px;
132
+ height: 24px;
133
+
134
+ svg {
135
+ width: 12px;
136
+ height: 12px;
137
+ }
138
+ }
139
+
140
+ .numeric-stepper-input,
141
+ .numeric-stepper-display {
142
+ width: 24px;
143
+ height: 24px;
144
+ max-width: 40px;
145
+ font-size: 14px;
146
+ font-weight: 600;
147
+ color: #101828;
148
+ padding: 0 2px;
149
+ text-align: center;
150
+ overflow: hidden;
151
+ text-overflow: ellipsis;
152
+ white-space: nowrap;
153
+ }
154
+ }
155
+
156
+ &-middle {
157
+ gap: 8px;
158
+
159
+ .numeric-stepper-button {
160
+ width: 32px;
161
+ height: 32px;
162
+
163
+ svg {
164
+ width: 16px;
165
+ height: 16px;
166
+ }
167
+ }
168
+
169
+ .numeric-stepper-input,
170
+ .numeric-stepper-display {
171
+ width: 30px;
172
+ height: 30px;
173
+ max-width: 56px;
174
+ font-size: 16px;
175
+ font-weight: 600;
176
+ color: #101828;
177
+ padding: 0 4px;
178
+ text-align: center;
179
+ overflow: hidden;
180
+ text-overflow: ellipsis;
181
+ white-space: nowrap;
182
+ }
183
+ }
184
+
185
+ &-large {
186
+ gap: 10px;
187
+
188
+ .numeric-stepper-button {
189
+ width: 40px;
190
+ height: 40px;
191
+
192
+ svg {
193
+ width: 20px;
194
+ height: 20px;
195
+ }
196
+ }
197
+
198
+ .numeric-stepper-input,
199
+ .numeric-stepper-display {
200
+ width: 36px;
201
+ height: 36px;
202
+ max-width: 64px;
203
+ font-size: 18px;
204
+ font-weight: 600;
205
+ color: #101828;
206
+ padding: 0 6px;
207
+ text-align: center;
208
+ overflow: hidden;
209
+ text-overflow: ellipsis;
210
+ white-space: nowrap;
211
+ }
212
+ }
213
+
214
+ // 禁用状态下的特殊样式
215
+ &-disabled {
216
+ .numeric-stepper-input,
217
+ .numeric-stepper-display {
218
+ color: #9ca3af;
219
+ }
220
+ }
221
+ }
@@ -0,0 +1,2 @@
1
+ export { default as CardItem } from './Card';
2
+ export { default as NumericStepper } from './NumericStepper';
@@ -0,0 +1,42 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/pro/Selector/components/index.tsx
30
+ var components_exports = {};
31
+ __export(components_exports, {
32
+ CardItem: () => import_Card.default,
33
+ NumericStepper: () => import_NumericStepper.default
34
+ });
35
+ module.exports = __toCommonJS(components_exports);
36
+ var import_Card = __toESM(require("./Card"));
37
+ var import_NumericStepper = __toESM(require("./NumericStepper"));
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ CardItem,
41
+ NumericStepper
42
+ });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SelectorDemo: () => React.JSX.Element;
3
+ export default SelectorDemo;
@@ -0,0 +1,102 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/pro/Selector/demo.tsx
30
+ var demo_exports = {};
31
+ __export(demo_exports, {
32
+ default: () => demo_default
33
+ });
34
+ module.exports = __toCommonJS(demo_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_index = __toESM(require("./index"));
37
+ var SelectorDemo = () => {
38
+ const [value, setValue] = (0, import_react.useState)([
39
+ {
40
+ value: 1,
41
+ quantity: 2
42
+ }
43
+ ]);
44
+ const [mutexValue, setMutexValue] = (0, import_react.useState)([]);
45
+ const dataSource = [
46
+ { id: 1, title: "选项1", price: 100, ruleConfig: { min: 1, max: 3 } },
47
+ { id: 2, title: "选项2", price: 200, ruleConfig: { min: 1, max: 2 } },
48
+ { id: 3, title: "选项3", price: 300, ruleConfig: { min: 1, max: 1 } },
49
+ { id: 4, title: "选项4", price: 400, ruleConfig: { min: 1, max: 2 } },
50
+ { id: 5, title: "选项5", price: 500, ruleConfig: { min: 1, max: 3 } },
51
+ { id: 6, title: "选项6", price: 600, ruleConfig: { min: 1, max: 1 } }
52
+ ];
53
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: 20 } }, /* @__PURE__ */ import_react.default.createElement("h2", null, "Selector 组件演示"), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "多选模式 - 卡片样式 + 网格布局"), /* @__PURE__ */ import_react.default.createElement(
54
+ import_index.default,
55
+ {
56
+ dataSource,
57
+ mode: "multiple",
58
+ valueType: "object",
59
+ fieldNames: { value: "id", label: "title" },
60
+ value,
61
+ onChange: setValue,
62
+ appearance: {
63
+ itemVariant: "card",
64
+ layout: { mode: "grid", columns: 3 },
65
+ selectedProps: {
66
+ variant: "filled"
67
+ }
68
+ }
69
+ }
70
+ )), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "当前选择值:"), /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(value, null, 2))), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "组内互斥示例(同组仅可选择一个)"), /* @__PURE__ */ import_react.default.createElement("p", { style: { color: "#667085", marginBottom: 8 } }, "规则:互斥组1(1、2、3 互斥),互斥组2(4、5 互斥)。当选择同组的一个选项时,会自动取消该组内其它已选项。"), /* @__PURE__ */ import_react.default.createElement(
71
+ import_index.default,
72
+ {
73
+ dataSource: [
74
+ { id: 1, title: "选项1" },
75
+ { id: 2, title: "选项2" },
76
+ { id: 3, title: "选项3" },
77
+ { id: 4, title: "选项4" },
78
+ { id: 5, title: "选项5" },
79
+ { id: 6, title: "选项6" }
80
+ ],
81
+ mode: "multiple",
82
+ valueType: "primitive",
83
+ fieldNames: { value: "id", label: "title" },
84
+ value: mutexValue,
85
+ onChange: setMutexValue,
86
+ ruleConfig: {
87
+ mutex: [
88
+ [1, 2, 3],
89
+ [4, 5]
90
+ ]
91
+ },
92
+ appearance: {
93
+ itemVariant: "card",
94
+ layout: { mode: "grid", columns: 3 },
95
+ selectedProps: {
96
+ variant: "filled"
97
+ }
98
+ }
99
+ }
100
+ )), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "互斥组当前选择值:"), /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(mutexValue, null, 2))));
101
+ };
102
+ var demo_default = SelectorDemo;
@@ -0,0 +1,42 @@
1
+ import { RuleConfig, OptionItem, SelectionValuePrimitive, SelectionValue, OptionKey } from '../types';
2
+ declare type ErrorItem = {
3
+ type: 'required' | 'max' | 'min' | 'requireOneOf' | 'mutex';
4
+ message: string;
5
+ _key?: OptionKey;
6
+ };
7
+ declare type InnerOptionItem = OptionItem & {
8
+ _key: OptionKey;
9
+ _label: string;
10
+ selected: boolean;
11
+ quantity: number;
12
+ };
13
+ export default function useSelectionController(props: {
14
+ dataSource?: OptionItem[];
15
+ ruleConfig?: RuleConfig;
16
+ fieldNames?: {
17
+ label?: string;
18
+ value?: string;
19
+ };
20
+ mode?: 'single' | 'multiple';
21
+ valueType?: 'primitive' | 'object';
22
+ value?: SelectionValuePrimitive | SelectionValue;
23
+ defaultValue?: SelectionValuePrimitive | SelectionValue;
24
+ onChange?: (value: SelectionValuePrimitive | SelectionValue) => void;
25
+ }): {
26
+ state: {
27
+ options: InnerOptionItem[];
28
+ values: SelectionValue;
29
+ showQuantity: boolean;
30
+ errors: Array<ErrorItem>;
31
+ validated: boolean;
32
+ };
33
+ actions: {
34
+ toggle: (optionKey: OptionKey) => void;
35
+ update: (optionKey: OptionKey, data?: any) => void;
36
+ setValue: (value: SelectionValuePrimitive | SelectionValue) => void;
37
+ clear: () => void;
38
+ validate: () => Promise<void>;
39
+ reset: () => void;
40
+ };
41
+ };
42
+ export {};