@pisell/private-materials 6.7.9 → 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 (421) 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/components/footer/amount.d.ts +1 -0
  14. package/es/components/booking/components/footer/amount.js +548 -84
  15. package/es/components/booking/components/footer/index.js +77 -56
  16. package/es/components/booking/components/footer/utils.d.ts +19 -0
  17. package/es/components/booking/components/footer/utils.js +194 -73
  18. package/es/components/booking/components/voucher/index.js +23 -7
  19. package/es/components/booking/hooks/useQuotation.js +4 -1
  20. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  21. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  22. package/es/components/booking/info/service2/utils.js +1 -0
  23. package/es/components/booking/info2/cartClientCard/index.js +30 -6
  24. package/es/components/booking/info2/index.js +1 -1
  25. package/es/components/booking/info2/service/addService/index.js +2 -3
  26. package/es/components/booking/info2/service/editNormalService/index.js +6 -0
  27. package/es/components/booking/info2/service/editService/index.js +16 -6
  28. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  29. package/es/components/booking/info2/service/editService/utils.js +66 -0
  30. package/es/components/booking/utils.d.ts +1 -0
  31. package/es/components/booking/utils.js +16 -3
  32. package/es/components/checkout/PaymentModal.d.ts +13 -5
  33. package/es/components/checkout/PaymentModal.js +304 -252
  34. package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  35. package/es/components/checkout/components/AdditionalModule/index.js +52 -12
  36. package/es/components/checkout/components/AmountSummary/index.js +9 -76
  37. package/es/components/checkout/components/AmountSummary/index.less +5 -6
  38. package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  39. package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
  40. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  41. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  42. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
  43. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  44. package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  45. package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  46. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  47. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
  48. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  49. package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
  50. package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
  51. package/es/components/checkout/index.less +1 -1
  52. package/es/components/checkout/locales.d.ts +6 -0
  53. package/es/components/checkout/locales.js +6 -0
  54. package/es/components/checkout/plugin.d.ts +2 -0
  55. package/es/components/checkout/plugin.js +303 -0
  56. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  57. package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  58. package/es/components/eftpos/hooks.d.ts +0 -1
  59. package/es/components/eftposPay/hooks.d.ts +1 -1
  60. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  61. package/es/components/eftposPay/payo/config.js +70 -32
  62. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  63. package/es/components/eftposPay/payo/payment.js +579 -0
  64. package/es/components/eftposPay/store/index.d.ts +4 -4
  65. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  66. package/es/components/eftposPay/tyro/index.js +12 -0
  67. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  68. package/es/components/eftposPay/utils/log/index.js +371 -0
  69. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  77. package/es/components/index.d.ts +2 -1
  78. package/es/components/index.js +2 -1
  79. package/es/components/list/List.js +99 -56
  80. package/es/components/list/hooks/useListState.d.ts +5 -3
  81. package/es/components/list/hooks/useListState.js +10 -2
  82. package/es/components/list/styles/base.less +4 -0
  83. package/es/components/list/styles/content.less +1 -1
  84. package/es/components/list/styles/header.less +4 -4
  85. package/es/components/list/types.d.ts +1 -0
  86. package/es/components/list/utils/index.d.ts +13 -1
  87. package/es/components/list/utils/index.js +43 -1
  88. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
  89. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  90. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  92. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  93. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  94. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
  95. package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  96. package/es/components/pay/toC/index.js +7 -4
  97. package/es/components/pay/toC/locales.d.ts +3 -0
  98. package/es/components/pay/toC/locales.js +6 -3
  99. package/es/components/pay/toC/status.d.ts +1 -0
  100. package/es/components/pay/toC/status.js +3 -0
  101. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  102. package/es/components/subTotal/index.js +1 -1
  103. package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  104. package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
  105. package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  106. package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
  107. package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  108. package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
  109. package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  110. package/es/components/systemSettings/registry/components/SectionList.js +174 -0
  111. package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  112. package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
  113. package/es/components/systemSettings/registry/components/index.d.ts +4 -0
  114. package/es/components/systemSettings/registry/components/index.js +4 -0
  115. package/es/components/systemSettings/registry/index.d.ts +5 -0
  116. package/es/components/systemSettings/registry/index.js +1059 -0
  117. package/es/components/systemSettings/registry/index.less +410 -0
  118. package/es/components/systemSettings/registry/locales.d.ts +272 -0
  119. package/es/components/systemSettings/registry/locales.js +300 -0
  120. package/es/components/systemSettings/registry/services.d.ts +77 -0
  121. package/es/components/systemSettings/registry/services.js +472 -0
  122. package/es/components/systemSettings/registry/types.d.ts +126 -0
  123. package/es/components/systemSettings/registry/types.js +1 -0
  124. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  125. package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
  126. package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
  127. package/es/components/systemSettings/registry/utils/validators.js +44 -0
  128. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +58 -11
  129. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
  130. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
  131. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +149 -36
  132. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
  133. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  134. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  135. package/es/components/ticketBooking/components/timeBar/index.js +112 -7
  136. package/es/components/ticketBooking/components/timeBar/index.less +59 -0
  137. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
  138. package/es/components/ticketBooking/locales.d.ts +9 -0
  139. package/es/components/ticketBooking/locales.js +12 -3
  140. package/es/components/ticketBooking/utils/index.d.ts +3 -0
  141. package/es/components/ticketBooking/utils/index.js +36 -13
  142. package/es/components/wallet/Detail/index.js +34 -2
  143. package/es/components/wallet/Detail/index.less +11 -0
  144. package/es/components/wallet/Detail/locales.d.ts +6 -0
  145. package/es/components/wallet/Detail/locales.js +14 -2
  146. package/es/components/wallet/Voucher/index.js +11 -10
  147. package/es/components/wallet/components/WalletCard.js +5 -1
  148. package/es/components/wallet/index.js +4 -2
  149. package/es/components/wallet/serve.d.ts +7 -0
  150. package/es/components/wallet/utils.d.ts +48 -0
  151. package/es/components/wallet/utils.js +342 -0
  152. package/es/index.d.ts +5 -0
  153. package/es/index.js +6 -1
  154. package/es/plus/clientCard/locales.js +3 -3
  155. package/es/plus/clinetSearch/index.js +28 -30
  156. package/es/plus/clinetSearch/locales.d.ts +3 -0
  157. package/es/plus/clinetSearch/locales.js +7 -4
  158. package/es/plus/clinetSearch/types.d.ts +12 -0
  159. package/es/plus/productSelect/CategoryTabs/index.d.ts +1 -0
  160. package/es/plus/productSelect/CategoryTabs/index.js +2 -1
  161. package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
  162. package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
  163. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  164. package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
  165. package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
  166. package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
  167. package/es/plus/walletPassGallery/index.js +7 -3
  168. package/es/plus/walletPassGallery/serve.d.ts +3 -0
  169. package/es/plus/walletPassGallery/serve.js +4 -2
  170. package/es/pro/Login2.0/index.less +15 -8
  171. package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  172. package/es/pro/Selector/BatchSelectorDemo.js +470 -0
  173. package/es/pro/Selector/Selector.d.ts +5 -0
  174. package/es/pro/Selector/Selector.js +283 -0
  175. package/es/pro/Selector/SelectorGroup.d.ts +11 -0
  176. package/es/pro/Selector/SelectorGroup.js +537 -0
  177. package/es/pro/Selector/components/Card/index.d.ts +27 -0
  178. package/es/pro/Selector/components/Card/index.js +96 -0
  179. package/es/pro/Selector/components/Card/index.less +132 -0
  180. package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  181. package/es/pro/Selector/components/IntersectionObserver.js +384 -0
  182. package/es/pro/Selector/components/NumericStepper/index.d.ts +41 -0
  183. package/es/pro/Selector/components/NumericStepper/index.js +198 -0
  184. package/es/pro/Selector/components/NumericStepper/index.less +221 -0
  185. package/es/pro/Selector/components/index.d.ts +2 -0
  186. package/es/pro/Selector/components/index.js +2 -0
  187. package/es/pro/Selector/demo.d.ts +3 -0
  188. package/es/pro/Selector/demo.js +158 -0
  189. package/es/pro/Selector/hooks/useSelectionController.d.ts +42 -0
  190. package/es/pro/Selector/hooks/useSelectionController.js +414 -0
  191. package/es/pro/Selector/index.d.ts +8 -0
  192. package/es/pro/Selector/index.js +5 -0
  193. package/es/pro/Selector/locales.d.ts +42 -0
  194. package/es/pro/Selector/locales.js +80 -0
  195. package/es/pro/Selector/selector.less +3 -0
  196. package/es/pro/Selector/selectorGroup.less +8 -0
  197. package/es/pro/Selector/types.d.ts +114 -0
  198. package/es/pro/Selector/types.js +1 -0
  199. package/es/pro/Selector/utils/index.d.ts +49 -0
  200. package/es/pro/Selector/utils/index.js +229 -0
  201. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  202. package/es/pro/comprehensiveSearch/locales.js +1 -1
  203. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
  204. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  205. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
  206. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  207. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
  208. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  209. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  210. package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
  211. package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  212. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  213. package/lib/components/booking/addons/index.js +15 -7
  214. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  215. package/lib/components/booking/components/footer/amount.js +293 -41
  216. package/lib/components/booking/components/footer/index.js +30 -11
  217. package/lib/components/booking/components/footer/utils.d.ts +19 -0
  218. package/lib/components/booking/components/footer/utils.js +138 -41
  219. package/lib/components/booking/components/voucher/index.js +25 -9
  220. package/lib/components/booking/hooks/useQuotation.js +2 -1
  221. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  222. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  223. package/lib/components/booking/info/service2/utils.js +1 -0
  224. package/lib/components/booking/info2/cartClientCard/index.js +25 -5
  225. package/lib/components/booking/info2/index.js +7 -2
  226. package/lib/components/booking/info2/service/addService/index.js +1 -2
  227. package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
  228. package/lib/components/booking/info2/service/editService/index.js +12 -3
  229. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  230. package/lib/components/booking/info2/service/editService/utils.js +40 -3
  231. package/lib/components/booking/utils.d.ts +1 -0
  232. package/lib/components/booking/utils.js +11 -0
  233. package/lib/components/checkout/PaymentModal.d.ts +13 -5
  234. package/lib/components/checkout/PaymentModal.js +190 -147
  235. package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  236. package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
  237. package/lib/components/checkout/components/AmountSummary/index.js +5 -46
  238. package/lib/components/checkout/components/AmountSummary/index.less +5 -6
  239. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  240. package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
  241. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  242. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  243. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
  244. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  245. package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
  246. package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  247. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  248. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
  249. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  250. package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
  251. package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
  252. package/lib/components/checkout/index.less +1 -1
  253. package/lib/components/checkout/locales.d.ts +6 -0
  254. package/lib/components/checkout/locales.js +6 -0
  255. package/lib/components/checkout/plugin.d.ts +2 -0
  256. package/lib/components/checkout/plugin.js +263 -0
  257. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
  258. package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  259. package/lib/components/eftpos/hooks.d.ts +0 -1
  260. package/lib/components/eftposPay/hooks.d.ts +1 -1
  261. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  262. package/lib/components/eftposPay/payo/config.js +98 -73
  263. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  264. package/lib/components/eftposPay/payo/payment.js +357 -0
  265. package/lib/components/eftposPay/store/index.d.ts +4 -4
  266. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  267. package/lib/components/eftposPay/tyro/index.js +12 -0
  268. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  269. package/lib/components/eftposPay/utils/log/index.js +294 -0
  270. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  271. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  272. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  273. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  274. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  275. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  276. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  277. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  278. package/lib/components/index.d.ts +2 -1
  279. package/lib/components/index.js +3 -0
  280. package/lib/components/list/List.js +58 -36
  281. package/lib/components/list/hooks/useListState.d.ts +5 -3
  282. package/lib/components/list/hooks/useListState.js +9 -1
  283. package/lib/components/list/styles/base.less +4 -0
  284. package/lib/components/list/styles/content.less +1 -1
  285. package/lib/components/list/styles/header.less +4 -4
  286. package/lib/components/list/types.d.ts +1 -0
  287. package/lib/components/list/utils/index.d.ts +13 -1
  288. package/lib/components/list/utils/index.js +27 -0
  289. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
  290. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  291. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  292. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  293. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  294. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  295. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
  296. package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
  297. package/lib/components/pay/toC/index.js +4 -1
  298. package/lib/components/pay/toC/locales.d.ts +3 -0
  299. package/lib/components/pay/toC/locales.js +6 -3
  300. package/lib/components/pay/toC/status.d.ts +1 -0
  301. package/lib/components/pay/toC/status.js +5 -0
  302. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  303. package/lib/components/subTotal/index.js +1 -1
  304. package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
  305. package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
  306. package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
  307. package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
  308. package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
  309. package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
  310. package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
  311. package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
  312. package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
  313. package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
  314. package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
  315. package/lib/components/systemSettings/registry/components/index.js +48 -0
  316. package/lib/components/systemSettings/registry/index.d.ts +5 -0
  317. package/lib/components/systemSettings/registry/index.js +529 -0
  318. package/lib/components/systemSettings/registry/index.less +410 -0
  319. package/lib/components/systemSettings/registry/locales.d.ts +272 -0
  320. package/lib/components/systemSettings/registry/locales.js +324 -0
  321. package/lib/components/systemSettings/registry/services.d.ts +77 -0
  322. package/lib/components/systemSettings/registry/services.js +290 -0
  323. package/lib/components/systemSettings/registry/types.d.ts +126 -0
  324. package/lib/components/systemSettings/registry/types.js +17 -0
  325. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
  326. package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
  327. package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
  328. package/lib/components/systemSettings/registry/utils/validators.js +54 -0
  329. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +40 -5
  330. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
  331. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
  332. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +93 -24
  333. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
  334. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  335. package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
  336. package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
  337. package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
  338. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
  339. package/lib/components/ticketBooking/locales.d.ts +9 -0
  340. package/lib/components/ticketBooking/locales.js +12 -3
  341. package/lib/components/ticketBooking/utils/index.d.ts +3 -0
  342. package/lib/components/ticketBooking/utils/index.js +20 -6
  343. package/lib/components/wallet/Detail/index.js +31 -3
  344. package/lib/components/wallet/Detail/index.less +11 -0
  345. package/lib/components/wallet/Detail/locales.d.ts +6 -0
  346. package/lib/components/wallet/Detail/locales.js +14 -2
  347. package/lib/components/wallet/Voucher/index.js +8 -8
  348. package/lib/components/wallet/components/WalletCard.js +4 -0
  349. package/lib/components/wallet/index.js +2 -2
  350. package/lib/components/wallet/serve.d.ts +7 -0
  351. package/lib/components/wallet/utils.d.ts +48 -0
  352. package/lib/components/wallet/utils.js +287 -0
  353. package/lib/index.d.ts +5 -0
  354. package/lib/index.js +15 -0
  355. package/lib/plus/clientCard/locales.js +3 -3
  356. package/lib/plus/clinetSearch/index.js +17 -8
  357. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  358. package/lib/plus/clinetSearch/locales.js +7 -4
  359. package/lib/plus/clinetSearch/types.d.ts +12 -0
  360. package/lib/plus/productSelect/CategoryTabs/index.d.ts +1 -0
  361. package/lib/plus/productSelect/CategoryTabs/index.js +2 -1
  362. package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
  363. package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
  364. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  365. package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
  366. package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
  367. package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
  368. package/lib/plus/walletPassGallery/index.js +7 -3
  369. package/lib/plus/walletPassGallery/serve.d.ts +3 -0
  370. package/lib/plus/walletPassGallery/serve.js +3 -2
  371. package/lib/pro/Login2.0/index.less +15 -8
  372. package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  373. package/lib/pro/Selector/BatchSelectorDemo.js +376 -0
  374. package/lib/pro/Selector/Selector.d.ts +5 -0
  375. package/lib/pro/Selector/Selector.js +264 -0
  376. package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
  377. package/lib/pro/Selector/SelectorGroup.js +463 -0
  378. package/lib/pro/Selector/components/Card/index.d.ts +27 -0
  379. package/lib/pro/Selector/components/Card/index.js +114 -0
  380. package/lib/pro/Selector/components/Card/index.less +132 -0
  381. package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  382. package/lib/pro/Selector/components/IntersectionObserver.js +281 -0
  383. package/lib/pro/Selector/components/NumericStepper/index.d.ts +41 -0
  384. package/lib/pro/Selector/components/NumericStepper/index.js +221 -0
  385. package/lib/pro/Selector/components/NumericStepper/index.less +221 -0
  386. package/lib/pro/Selector/components/index.d.ts +2 -0
  387. package/lib/pro/Selector/components/index.js +42 -0
  388. package/lib/pro/Selector/demo.d.ts +3 -0
  389. package/lib/pro/Selector/demo.js +102 -0
  390. package/lib/pro/Selector/hooks/useSelectionController.d.ts +42 -0
  391. package/lib/pro/Selector/hooks/useSelectionController.js +338 -0
  392. package/lib/pro/Selector/index.d.ts +8 -0
  393. package/lib/pro/Selector/index.js +39 -0
  394. package/lib/pro/Selector/locales.d.ts +42 -0
  395. package/lib/pro/Selector/locales.js +80 -0
  396. package/lib/pro/Selector/selector.less +3 -0
  397. package/lib/pro/Selector/selectorGroup.less +8 -0
  398. package/lib/pro/Selector/types.d.ts +114 -0
  399. package/lib/pro/Selector/types.js +17 -0
  400. package/lib/pro/Selector/utils/index.d.ts +49 -0
  401. package/lib/pro/Selector/utils/index.js +221 -0
  402. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  403. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  404. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
  405. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  406. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
  407. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  408. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
  409. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  410. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  411. package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
  412. package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  413. package/lowcode/payment-modal/meta.ts +135 -0
  414. package/lowcode/selector/meta.ts +352 -0
  415. package/lowcode/selector.group/meta.ts +200 -0
  416. package/lowcode/settings-registry/meta.ts +29 -0
  417. package/lowcode/wallet-pass-detail/meta.ts +89 -0
  418. package/package.json +4 -4
  419. package/es/components/checkout/PaymentPlugin.d.ts +0 -3
  420. package/lib/components/checkout/PaymentPlugin.d.ts +0 -3
  421. package/lib/components/checkout/PaymentPlugin.js +0 -181
@@ -0,0 +1,765 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["record", "children", "className", "style"];
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+ import React, { useState, useMemo } from 'react';
22
+ import { Table, Tag, Space, Empty, Modal, Spin } from 'antd';
23
+
24
+ // 临时类型修复
25
+ var AntdTag = Tag;
26
+ var AntdSpace = Space;
27
+ import { Button } from '@pisell/materials';
28
+ import { PlusOutlined, EditOutlined, DeleteOutlined, CaretRightOutlined, CaretDownOutlined, HolderOutlined } from '@ant-design/icons';
29
+ import { locales } from '@pisell/utils';
30
+ import { DndContext, PointerSensor, useSensor, useSensors, DragOverlay, closestCenter, rectIntersection } from '@dnd-kit/core';
31
+ import { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
32
+ import { useDroppable } from '@dnd-kit/core';
33
+ import { CSS } from '@dnd-kit/utilities';
34
+ import useEngineContext from "../../../../hooks/useEngineContext";
35
+ // 作用域值到 locales key 的映射(与 ItemModal 保持一致)
36
+ var scopeKeyMapping = {
37
+ 'system': 'registry.scope.systemDefault',
38
+ 'saas': 'registry.scope.saasDefault',
39
+ 'organization': 'registry.scope.organization',
40
+ 'business': 'registry.scope.business',
41
+ 'channel': 'registry.scope.channel',
42
+ 'board': 'registry.scope.board'
43
+ };
44
+
45
+ // 工具函数:获取多语言文本的显示值
46
+ var getMultiLanguageText = function getMultiLanguageText(text, currentLocale) {
47
+ if (typeof text === 'string') {
48
+ return text;
49
+ }
50
+
51
+ // 获取当前语言,优先使用传入的 currentLocale
52
+ var currentLang = currentLocale || localStorage.getItem('umi_locale') || 'zh-CN';
53
+
54
+ // 根据当前语言返回对应的文本,如果没有则使用 original
55
+ if (text[currentLang]) {
56
+ return text[currentLang];
57
+ }
58
+ return text.original || '';
59
+ };
60
+
61
+ // 虚拟拖动容器类型
62
+
63
+ // 可拖拽行组件
64
+
65
+ // 创建一个 Context 来传递拖拽属性
66
+ var DragContext = /*#__PURE__*/React.createContext({});
67
+
68
+ // 拖拽句柄组件
69
+ var DragHandle = function DragHandle(_ref) {
70
+ var record = _ref.record,
71
+ isGroup = _ref.isGroup,
72
+ isExpanded = _ref.isExpanded,
73
+ onExpand = _ref.onExpand,
74
+ currentLocale = _ref.currentLocale;
75
+ var _React$useContext = React.useContext(DragContext),
76
+ attributes = _React$useContext.attributes,
77
+ listeners = _React$useContext.listeners;
78
+ return /*#__PURE__*/React.createElement("div", {
79
+ className: "pisell-settings-registry-table-title",
80
+ style: {
81
+ paddingLeft: record.level * 24,
82
+ display: 'flex',
83
+ alignItems: 'center'
84
+ }
85
+ }, /*#__PURE__*/React.createElement("div", _extends({
86
+ className: "drag-handle"
87
+ }, attributes || {}, listeners || {}, {
88
+ style: {
89
+ cursor: 'grab',
90
+ marginRight: 8,
91
+ color: '#999',
92
+ fontSize: '12px',
93
+ display: 'flex',
94
+ alignItems: 'center'
95
+ }
96
+ }), /*#__PURE__*/React.createElement(HolderOutlined, null)), isGroup && /*#__PURE__*/React.createElement(Button, {
97
+ type: "text",
98
+ size: "small",
99
+ icon: isExpanded ? /*#__PURE__*/React.createElement(CaretDownOutlined, null) : /*#__PURE__*/React.createElement(CaretRightOutlined, null),
100
+ onClick: function onClick() {
101
+ return onExpand(record.key);
102
+ },
103
+ style: {
104
+ marginRight: 8
105
+ }
106
+ }), /*#__PURE__*/React.createElement(AntdTag, {
107
+ color: isGroup ? 'blue' : 'green'
108
+ }, locales.getText(isGroup ? 'registry.level.group' : 'registry.level.item')), /*#__PURE__*/React.createElement("span", {
109
+ style: {
110
+ marginLeft: 8
111
+ }
112
+ }, getMultiLanguageText(record.data.title || record.data.name, currentLocale)));
113
+ };
114
+
115
+ // 移除了 DroppableVirtualContainer 组件,拖放逻辑已集成到行级别
116
+
117
+ var DraggableRow = function DraggableRow(_ref2) {
118
+ var record = _ref2.record,
119
+ children = _ref2.children,
120
+ className = _ref2.className,
121
+ style = _ref2.style,
122
+ props = _objectWithoutProperties(_ref2, _excluded);
123
+ // 如果没有有效的 record,返回普通的 tr
124
+ if (!record || !record.key) {
125
+ return /*#__PURE__*/React.createElement("tr", _extends({
126
+ className: className,
127
+ style: style
128
+ }, props), children);
129
+ }
130
+
131
+ // 普通的可拖拽行
132
+ var _useSortable = useSortable({
133
+ id: record.key,
134
+ data: {
135
+ type: record.type,
136
+ record: record,
137
+ groupId: record.type === 'item' ? record.data.groupId || record.data.group_id : record.data.id
138
+ }
139
+ }),
140
+ attributes = _useSortable.attributes,
141
+ listeners = _useSortable.listeners,
142
+ setNodeRef = _useSortable.setNodeRef,
143
+ transform = _useSortable.transform,
144
+ transition = _useSortable.transition,
145
+ isDragging = _useSortable.isDragging;
146
+
147
+ // 为组行添加拖放区域(用于接受设置项)
148
+ var dropResult = useDroppable({
149
+ id: record.type === 'group' ? "item-container-".concat(record.data.id) : "drop-".concat(record.key),
150
+ data: {
151
+ type: record.type === 'group' ? 'item-container' : 'item',
152
+ groupId: record.type === 'group' ? record.data.id : undefined,
153
+ acceptTypes: record.type === 'group' ? ['item'] : []
154
+ },
155
+ disabled: record.type !== 'group' // 只有组行才能接受拖放
156
+ });
157
+ var dragStyle = _objectSpread(_objectSpread({
158
+ transform: CSS.Transform.toString(transform),
159
+ transition: transition,
160
+ opacity: isDragging ? 0.5 : 1
161
+ }, record.type === 'group' && dropResult.isOver ? {
162
+ backgroundColor: 'rgba(24, 144, 255, 0.05)',
163
+ borderLeft: '3px solid #1890ff'
164
+ } : {}), style);
165
+
166
+ // 合并拖拽和拖放的 ref
167
+ var combinedRef = function combinedRef(node) {
168
+ setNodeRef(node);
169
+ dropResult.setNodeRef(node);
170
+ };
171
+ return /*#__PURE__*/React.createElement(DragContext.Provider, {
172
+ value: {
173
+ attributes: attributes,
174
+ listeners: listeners
175
+ }
176
+ }, /*#__PURE__*/React.createElement("tr", _extends({
177
+ ref: combinedRef,
178
+ style: dragStyle,
179
+ className: "".concat(className, " ").concat(isDragging ? 'dragging' : '', " ").concat(record.type === 'group' ? 'group-row' : '', " ").concat(dropResult.isOver && record.type === 'group' ? 'drop-over' : '')
180
+ }, props), children));
181
+ };
182
+ var SettingsTable = function SettingsTable(_ref3) {
183
+ var _context$engine;
184
+ var section = _ref3.section,
185
+ _ref3$groupList = _ref3.groupList,
186
+ groupList = _ref3$groupList === void 0 ? [] : _ref3$groupList,
187
+ _ref3$groupLoading = _ref3.groupLoading,
188
+ groupLoading = _ref3$groupLoading === void 0 ? false : _ref3$groupLoading,
189
+ onDataChange = _ref3.onDataChange,
190
+ onEditGroup = _ref3.onEditGroup,
191
+ onDeleteGroup = _ref3.onDeleteGroup,
192
+ onAddItem = _ref3.onAddItem,
193
+ onEditItem = _ref3.onEditItem,
194
+ onDeleteItem = _ref3.onDeleteItem,
195
+ onGroupReorder = _ref3.onGroupReorder,
196
+ onItemMove = _ref3.onItemMove;
197
+ var context = useEngineContext();
198
+ var _useState = useState([]),
199
+ _useState2 = _slicedToArray(_useState, 2),
200
+ expandedKeys = _useState2[0],
201
+ setExpandedKeys = _useState2[1];
202
+ var _useState3 = useState(null),
203
+ _useState4 = _slicedToArray(_useState3, 2),
204
+ activeId = _useState4[0],
205
+ setActiveId = _useState4[1];
206
+ var _useState5 = useState(null),
207
+ _useState6 = _slicedToArray(_useState5, 2),
208
+ dragOverZone = _useState6[0],
209
+ setDragOverZone = _useState6[1];
210
+
211
+ // 配置拖拽传感器
212
+ var sensors = useSensors(useSensor(PointerSensor, {
213
+ activationConstraint: {
214
+ distance: 8
215
+ }
216
+ }));
217
+
218
+ // 创建虚拟拖动区域
219
+ var virtualDropZones = useMemo(function () {
220
+ var zones = [];
221
+
222
+ // 为每个组创建一个组级别的拖动区域(用于组之间的排序)
223
+ groupList.forEach(function (group) {
224
+ zones.push({
225
+ id: "group-zone-".concat(group.id),
226
+ type: 'group',
227
+ groupId: group.id,
228
+ acceptTypes: ['group'],
229
+ key: "group-".concat(group.id)
230
+ });
231
+
232
+ // 为每个组创建一个项目容器区域(用于项目的跨组移动)
233
+ zones.push({
234
+ id: "item-container-".concat(group.id),
235
+ type: 'item-container',
236
+ groupId: group.id,
237
+ acceptTypes: ['item'],
238
+ key: "item-".concat(group.id)
239
+ });
240
+ });
241
+ return zones;
242
+ }, [groupList]);
243
+
244
+ // 自定义碰撞检测,基于虚拟区域
245
+ var customCollisionDetection = function customCollisionDetection(args) {
246
+ var _standardCollisions$;
247
+ var active = args.active,
248
+ droppableContainers = args.droppableContainers;
249
+
250
+ // 首先尝试检测虚拟容器
251
+ var virtualContainers = Array.from(droppableContainers.values()).filter(function (container) {
252
+ var id = container.id;
253
+ return id.startsWith('item-container-') || id.startsWith('group-zone-');
254
+ });
255
+ if (virtualContainers.length > 0) {
256
+ // 对虚拟容器使用矩形相交检测
257
+ var virtualCollisions = rectIntersection(_objectSpread(_objectSpread({}, args), {}, {
258
+ droppableContainers: virtualContainers
259
+ }));
260
+ if (virtualCollisions && virtualCollisions.length > 0) {
261
+ console.log('虚拟容器碰撞检测:', virtualCollisions[0].id);
262
+ return virtualCollisions;
263
+ }
264
+ }
265
+
266
+ // 如果没有虚拟容器碰撞,则使用标准的最近中心点检测
267
+ var standardCollisions = closestCenter(args);
268
+ console.log('标准碰撞检测:', standardCollisions === null || standardCollisions === void 0 || (_standardCollisions$ = standardCollisions[0]) === null || _standardCollisions$ === void 0 ? void 0 : _standardCollisions$.id);
269
+ return standardCollisions;
270
+ };
271
+
272
+ // 获取当前语言
273
+ var currentLocale = (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || localStorage.getItem('umi_locale') || 'zh-CN';
274
+
275
+ // 将组数据转换为树形结构
276
+ var treeData = useMemo(function () {
277
+ if (!groupList || groupList.length === 0) return [];
278
+ var nodes = [];
279
+ groupList.forEach(function (group) {
280
+ var groupNode = {
281
+ key: "group-".concat(group.id),
282
+ type: 'group',
283
+ data: group,
284
+ children: []
285
+ };
286
+ group === null || group === void 0 || group.items.sort(function (a, b) {
287
+ return a.sort - b.sort || a.id - b.id;
288
+ }).forEach(function (item) {
289
+ var itemNode = {
290
+ key: "item-".concat(item.id),
291
+ type: 'item',
292
+ data: item,
293
+ parentKey: groupNode.key
294
+ };
295
+ groupNode.children.push(itemNode);
296
+ });
297
+ nodes.push(groupNode);
298
+ });
299
+ return nodes;
300
+ }, [groupList]);
301
+
302
+ // 初始化展开状态
303
+ React.useEffect(function () {
304
+ if (groupList && groupList.length > 0) {
305
+ var defaultExpanded = groupList.filter(function (group) {
306
+ return group.expanded !== false;
307
+ }).map(function (group) {
308
+ return "group-".concat(group.id);
309
+ });
310
+ setExpandedKeys(defaultExpanded);
311
+ }
312
+ }, [groupList]);
313
+
314
+ // 扁平化数据用于表格显示,包含虚拟容器
315
+ var flattenData = useMemo(function () {
316
+ var result = [];
317
+ treeData.forEach(function (groupNode, groupIndex) {
318
+ // 添加组行,包装在组级虚拟容器中
319
+ var groupZone = virtualDropZones.find(function (z) {
320
+ return z.id === "group-zone-".concat(groupNode.data.id);
321
+ });
322
+ result.push({
323
+ key: groupNode.key,
324
+ type: 'group',
325
+ data: groupNode.data,
326
+ level: 0,
327
+ virtualZone: groupZone
328
+ });
329
+ if (expandedKeys.includes(groupNode.key)) {
330
+ // 只添加实际的子项,不添加占位空行
331
+ if (groupNode.children && groupNode.children.length > 0) {
332
+ groupNode.children.forEach(function (itemNode) {
333
+ result.push({
334
+ key: itemNode.key,
335
+ type: 'item',
336
+ data: itemNode.data,
337
+ level: 1
338
+ });
339
+ });
340
+ }
341
+ }
342
+ });
343
+ return result;
344
+ }, [treeData, expandedKeys, virtualDropZones]);
345
+
346
+ // 处理展开/收起
347
+ var handleExpand = function handleExpand(key) {
348
+ setExpandedKeys(function (prev) {
349
+ return prev.includes(key) ? prev.filter(function (k) {
350
+ return k !== key;
351
+ }) : [].concat(_toConsumableArray(prev), [key]);
352
+ });
353
+ };
354
+
355
+ // 拖拽开始
356
+ var handleDragStart = function handleDragStart(event) {
357
+ setActiveId(event.active.id);
358
+ };
359
+
360
+ // 拖拽悬停
361
+ var handleDragOver = function handleDragOver(event) {
362
+ var active = event.active,
363
+ over = event.over;
364
+ if (!over) {
365
+ setDragOverZone(null);
366
+ return;
367
+ }
368
+ var overId = over.id;
369
+
370
+ // 检查是否悬停在虚拟区域上
371
+ var zone = virtualDropZones.find(function (z) {
372
+ return z.id === overId;
373
+ });
374
+ if (zone) {
375
+ setDragOverZone(overId);
376
+ } else {
377
+ setDragOverZone(null);
378
+ }
379
+ };
380
+
381
+ // 拖拽结束 - 基于虚拟拖动容器
382
+ var handleDragEnd = function handleDragEnd(event) {
383
+ var active = event.active,
384
+ over = event.over;
385
+ setActiveId(null);
386
+ setDragOverZone(null);
387
+ if (!over || active.id === over.id) return;
388
+ var activeData = active.data.current;
389
+ var overData = over.data.current;
390
+ if (!activeData) return;
391
+ var activeRecord = activeData.record;
392
+ var overId = over.id;
393
+
394
+ // 基于虚拟容器的拖拽处理
395
+ console.log('拖拽结束:', {
396
+ activeId: active.id,
397
+ overId: overId,
398
+ activeRecord: activeRecord.type
399
+ });
400
+
401
+ // 处理组与组之间的排序(拖拽到组的虚拟容器)
402
+ if (activeRecord.type === 'group') {
403
+ // 查找目标组的虚拟容器
404
+ var targetZone = virtualDropZones.find(function (z) {
405
+ return z.key === overId && z.type === 'group';
406
+ });
407
+ if (targetZone) {
408
+ var activeGroupId = activeRecord.data.id;
409
+ var targetGroupId = targetZone.groupId;
410
+ if (activeGroupId === targetGroupId) return; // 同一个组,不需要移动
411
+
412
+ var newGroupOrder = _toConsumableArray(groupList);
413
+ var activeIndex = newGroupOrder.findIndex(function (g) {
414
+ return g.id === activeGroupId;
415
+ });
416
+ var targetIndex = newGroupOrder.findIndex(function (g) {
417
+ return g.id === targetGroupId;
418
+ });
419
+ if (activeIndex !== -1 && targetIndex !== -1) {
420
+ var _newGroupOrder$splice = newGroupOrder.splice(activeIndex, 1),
421
+ _newGroupOrder$splice2 = _slicedToArray(_newGroupOrder$splice, 1),
422
+ movedGroup = _newGroupOrder$splice2[0];
423
+ newGroupOrder.splice(targetIndex, 0, movedGroup);
424
+ var groupIds = newGroupOrder.map(function (g) {
425
+ return g.id;
426
+ });
427
+ console.log('调用组重排序接口 (虚拟容器):', groupIds);
428
+ onGroupReorder === null || onGroupReorder === void 0 || onGroupReorder(groupIds);
429
+ }
430
+ return;
431
+ }
432
+ }
433
+
434
+ // 处理设置项拖放到虚拟容器(跨组移动)
435
+ if (activeRecord.type === 'item') {
436
+ // 查找目标虚拟容器
437
+ var _targetZone = virtualDropZones.find(function (z) {
438
+ return z.id === overId;
439
+ });
440
+ if (_targetZone && _targetZone.type === 'item-container') {
441
+ var _targetGroup$items;
442
+ var activeItemId = activeRecord.data.id;
443
+ var _targetGroupId = _targetZone.groupId;
444
+
445
+ // 获取当前设置项的原始位置信息
446
+ var currentGroup = groupList.find(function (g) {
447
+ return g.items && g.items.some(function (item) {
448
+ return item.id === activeItemId;
449
+ });
450
+ });
451
+ if (!currentGroup) return;
452
+ var currentGroupId = currentGroup.id;
453
+
454
+ // 如果是同一个组,不需要移动
455
+ if (currentGroupId === _targetGroupId) return;
456
+
457
+ // 移动到目标组的末尾
458
+ var targetGroup = groupList.find(function (g) {
459
+ return g.id === _targetGroupId;
460
+ });
461
+ var newOrder = (targetGroup === null || targetGroup === void 0 || (_targetGroup$items = targetGroup.items) === null || _targetGroup$items === void 0 ? void 0 : _targetGroup$items.length) || 0;
462
+ console.log('调用设置项移动接口 (虚拟容器):', {
463
+ activeItemId: activeItemId,
464
+ targetGroupId: _targetGroupId,
465
+ newOrder: newOrder
466
+ });
467
+ onItemMove === null || onItemMove === void 0 || onItemMove(activeItemId, _targetGroupId, newOrder);
468
+ return;
469
+ }
470
+ }
471
+
472
+ // 如果没有匹配到虚拟容器,则可能是直接拖拽到行上的情况
473
+ if (overData && overData.record) {
474
+ var overRecord = overData.record;
475
+
476
+ // 设置项拖放到组行上
477
+ if (activeRecord.type === 'item' && overRecord.type === 'group') {
478
+ var _targetGroup$items2;
479
+ var _activeItemId = activeRecord.data.id;
480
+ var _targetGroupId2 = overRecord.data.id;
481
+ var _currentGroup = groupList.find(function (g) {
482
+ return g.items && g.items.some(function (item) {
483
+ return item.id === _activeItemId;
484
+ });
485
+ });
486
+ if (!_currentGroup) return;
487
+ var _currentGroupId = _currentGroup.id;
488
+ if (_currentGroupId === _targetGroupId2) return;
489
+ var _targetGroup = groupList.find(function (g) {
490
+ return g.id === _targetGroupId2;
491
+ });
492
+ var _newOrder = (_targetGroup === null || _targetGroup === void 0 || (_targetGroup$items2 = _targetGroup.items) === null || _targetGroup$items2 === void 0 ? void 0 : _targetGroup$items2.length) || 0;
493
+ console.log('调用设置项移动接口 (直接拖放到组):', {
494
+ activeItemId: _activeItemId,
495
+ targetGroupId: _targetGroupId2,
496
+ newOrder: _newOrder
497
+ });
498
+ onItemMove === null || onItemMove === void 0 || onItemMove(_activeItemId, _targetGroupId2, _newOrder);
499
+ return;
500
+ }
501
+
502
+ // 设置项与设置项之间的排序
503
+ if (activeRecord.type === 'item' && overRecord.type === 'item') {
504
+ var _activeItemId2 = activeRecord.data.id;
505
+ var overItemId = overRecord.data.id;
506
+ var activeGroup = groupList.find(function (g) {
507
+ return g.items && g.items.some(function (item) {
508
+ return item.id === _activeItemId2;
509
+ });
510
+ });
511
+ var overGroup = groupList.find(function (g) {
512
+ return g.items && g.items.some(function (item) {
513
+ return item.id === overItemId;
514
+ });
515
+ });
516
+ if (!activeGroup || !overGroup) return;
517
+ if (activeGroup.id === overGroup.id) {
518
+ // 同组内排序
519
+ var _activeIndex = activeGroup.items.findIndex(function (item) {
520
+ return item.id === _activeItemId2;
521
+ });
522
+ var overIndex = activeGroup.items.findIndex(function (item) {
523
+ return item.id === overItemId;
524
+ });
525
+ if (_activeIndex !== -1 && overIndex !== -1 && _activeIndex !== overIndex) {
526
+ console.log('调用同组内设置项排序接口:', {
527
+ activeItemId: _activeItemId2,
528
+ targetGroupId: activeGroup.id,
529
+ newOrder: overIndex
530
+ });
531
+ onItemMove === null || onItemMove === void 0 || onItemMove(_activeItemId2, activeGroup.id, overIndex);
532
+ }
533
+ } else {
534
+ // 跨组移动
535
+ var _overIndex = overGroup.items.findIndex(function (item) {
536
+ return item.id === overItemId;
537
+ });
538
+ var _newOrder2 = _overIndex >= 0 ? _overIndex : 0;
539
+ console.log('调用跨组设置项移动接口:', {
540
+ activeItemId: _activeItemId2,
541
+ targetGroupId: overGroup.id,
542
+ newOrder: _newOrder2
543
+ });
544
+ onItemMove === null || onItemMove === void 0 || onItemMove(_activeItemId2, overGroup.id, _newOrder2);
545
+ }
546
+ }
547
+ }
548
+ };
549
+
550
+ // 处理删除
551
+ var handleDelete = function handleDelete(record) {
552
+ if (record.type === 'group') {
553
+ // 检查组下是否有设置项
554
+ var hasItems = record.data.items && record.data.items.length > 0;
555
+ if (hasItems) {
556
+ // 如果组下有设置项,显示无法删除的提示
557
+ Modal.warning({
558
+ title: locales.getText('registry.modal.delete.group.hasItems.title'),
559
+ content: locales.getText('registry.modal.delete.group.hasItems.content')
560
+ });
561
+ return;
562
+ }
563
+ }
564
+ Modal.confirm({
565
+ title: locales.getText('registry.modal.delete.title'),
566
+ content: locales.getText(record.type === 'group' ? 'registry.modal.delete.group.content' : 'registry.modal.delete.item.content'),
567
+ onOk: function onOk() {
568
+ if (record.type === 'group') {
569
+ // 调用删除组的回调函数
570
+ onDeleteGroup === null || onDeleteGroup === void 0 || onDeleteGroup(record.data.id);
571
+ } else {
572
+ // 调用删除设置项的回调函数
573
+ onDeleteItem === null || onDeleteItem === void 0 || onDeleteItem(record.data.id);
574
+ }
575
+ }
576
+ });
577
+ };
578
+
579
+ // 获取当前拖拽的类型
580
+ var activeType = useMemo(function () {
581
+ if (!activeId) return undefined;
582
+ var activeItem = flattenData.find(function (item) {
583
+ return item.key === activeId;
584
+ });
585
+ return activeItem === null || activeItem === void 0 ? void 0 : activeItem.type;
586
+ }, [activeId, flattenData]);
587
+
588
+ // 表格列定义
589
+ var columns = [{
590
+ title: locales.getText('registry.table.title'),
591
+ dataIndex: 'name',
592
+ key: 'name',
593
+ width: '30%',
594
+ render: function render(_, record) {
595
+ var isGroup = record.type === 'group';
596
+ var isExpanded = expandedKeys.includes(record.key);
597
+ return /*#__PURE__*/React.createElement(DragHandle, {
598
+ record: record,
599
+ isGroup: isGroup,
600
+ isExpanded: isExpanded,
601
+ onExpand: handleExpand,
602
+ currentLocale: currentLocale
603
+ });
604
+ }
605
+ }, {
606
+ title: locales.getText('registry.table.key'),
607
+ dataIndex: 'key',
608
+ key: 'key',
609
+ width: '25%',
610
+ render: function render(_, record) {
611
+ if (record.type === 'group') {
612
+ return /*#__PURE__*/React.createElement("span", {
613
+ className: "pisell-settings-registry-code"
614
+ }, record.data.code);
615
+ }
616
+ return /*#__PURE__*/React.createElement("span", {
617
+ className: "pisell-settings-registry-key"
618
+ }, record.data.key || record.data.code);
619
+ }
620
+ }, {
621
+ title: locales.getText('registry.table.scopes'),
622
+ dataIndex: 'scopes',
623
+ key: 'scopes',
624
+ width: '25%',
625
+ render: function render(_, record) {
626
+ if (record.type === 'item' && record.data.scopes) {
627
+ return /*#__PURE__*/React.createElement(AntdSpace, {
628
+ wrap: true
629
+ }, record.data.scopes.map(function (scope) {
630
+ return /*#__PURE__*/React.createElement(AntdTag, {
631
+ key: scope,
632
+ size: "small"
633
+ }, locales.getText(scopeKeyMapping[scope] || "registry.scope.".concat(scope)));
634
+ }));
635
+ }
636
+ return '-';
637
+ }
638
+ }, {
639
+ title: locales.getText('registry.table.actions'),
640
+ key: 'actions',
641
+ width: '20%',
642
+ render: function render(_, record) {
643
+ var isGroup = record.type === 'group';
644
+ return /*#__PURE__*/React.createElement(AntdSpace, {
645
+ size: "small"
646
+ }, isGroup && /*#__PURE__*/React.createElement(Button, {
647
+ type: "text",
648
+ size: "small",
649
+ icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
650
+ onClick: function onClick() {
651
+ return onAddItem === null || onAddItem === void 0 ? void 0 : onAddItem(record.data.id);
652
+ },
653
+ title: locales.getText('registry.action.add.item')
654
+ }), /*#__PURE__*/React.createElement(Button, {
655
+ type: "text",
656
+ size: "small",
657
+ icon: /*#__PURE__*/React.createElement(EditOutlined, null),
658
+ onClick: function onClick() {
659
+ if (isGroup) {
660
+ onEditGroup === null || onEditGroup === void 0 || onEditGroup(record.data);
661
+ } else {
662
+ onEditItem === null || onEditItem === void 0 || onEditItem(record.data);
663
+ }
664
+ },
665
+ title: locales.getText('registry.action.edit')
666
+ }), /*#__PURE__*/React.createElement(Button, {
667
+ type: "text",
668
+ size: "small",
669
+ icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
670
+ danger: true,
671
+ onClick: function onClick() {
672
+ return handleDelete(record);
673
+ },
674
+ title: locales.getText('registry.action.delete')
675
+ }));
676
+ }
677
+ }];
678
+ if (!section) {
679
+ return /*#__PURE__*/React.createElement("div", {
680
+ className: "pisell-settings-registry-table-empty"
681
+ }, /*#__PURE__*/React.createElement(Empty, {
682
+ description: locales.getText('registry.message.select.section'),
683
+ image: Empty.PRESENTED_IMAGE_SIMPLE
684
+ }));
685
+ }
686
+ if (groupLoading) {
687
+ return /*#__PURE__*/React.createElement("div", {
688
+ className: "pisell-settings-registry-table-loading",
689
+ style: {
690
+ textAlign: 'center',
691
+ padding: '50px'
692
+ }
693
+ }, /*#__PURE__*/React.createElement(Spin, {
694
+ size: "large"
695
+ }), /*#__PURE__*/React.createElement("div", {
696
+ style: {
697
+ marginTop: '16px'
698
+ }
699
+ }, locales.getText('registry.message.loading.groups')));
700
+ }
701
+ if (flattenData.length === 0) {
702
+ return /*#__PURE__*/React.createElement("div", {
703
+ className: "pisell-settings-registry-table-empty"
704
+ }, /*#__PURE__*/React.createElement(Empty, {
705
+ description: locales.getText('registry.message.no.settings'),
706
+ image: Empty.PRESENTED_IMAGE_SIMPLE
707
+ }));
708
+ }
709
+
710
+ // 获取所有可拖拽的项目ID
711
+ var sortableIds = flattenData.map(function (item) {
712
+ return item.key;
713
+ });
714
+ return /*#__PURE__*/React.createElement("div", {
715
+ className: "pisell-settings-registry-table"
716
+ }, /*#__PURE__*/React.createElement(DndContext, {
717
+ sensors: sensors,
718
+ collisionDetection: customCollisionDetection,
719
+ onDragStart: handleDragStart,
720
+ onDragOver: handleDragOver,
721
+ onDragEnd: handleDragEnd
722
+ }, /*#__PURE__*/React.createElement(SortableContext, {
723
+ items: sortableIds,
724
+ strategy: verticalListSortingStrategy
725
+ }, /*#__PURE__*/React.createElement(Table, {
726
+ columns: columns,
727
+ dataSource: flattenData,
728
+ pagination: false,
729
+ rowKey: "key",
730
+ className: "pisell-settings-registry-table-content",
731
+ components: {
732
+ body: {
733
+ row: function row(props) {
734
+ // Antd Table 会通过 data-row-key 传递行的 key
735
+ var rowKey = props['data-row-key'];
736
+ // 从 dataSource 中找到对应的 record
737
+ var record = flattenData.find(function (item) {
738
+ return item.key === rowKey;
739
+ });
740
+
741
+ // 如果找不到 record,返回普通的 tr
742
+ if (!record) {
743
+ return /*#__PURE__*/React.createElement("tr", props);
744
+ }
745
+ return /*#__PURE__*/React.createElement(DraggableRow, _extends({}, props, {
746
+ record: record
747
+ }));
748
+ }
749
+ }
750
+ }
751
+ })), /*#__PURE__*/React.createElement(DragOverlay, null, activeId ? /*#__PURE__*/React.createElement("div", {
752
+ className: "pisell-settings-registry-drag-overlay"
753
+ }, function () {
754
+ var activeItem = flattenData.find(function (item) {
755
+ return item.key === activeId;
756
+ });
757
+ if (!activeItem) return null;
758
+ return /*#__PURE__*/React.createElement("div", {
759
+ className: "pisell-settings-registry-drag-item"
760
+ }, /*#__PURE__*/React.createElement(AntdTag, {
761
+ color: activeItem.type === 'group' ? 'blue' : 'green'
762
+ }, locales.getText(activeItem.type === 'group' ? 'registry.level.group' : 'registry.level.item')), /*#__PURE__*/React.createElement("span", null, getMultiLanguageText(activeItem.data.title || activeItem.data.name, currentLocale)));
763
+ }()) : null)));
764
+ };
765
+ export default SettingsTable;