@pisell/private-materials 6.5.27 → 6.6.2

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 (340) 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 +146 -165
  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/Cart/Item/index.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
  13. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
  14. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  15. package/es/components/appointmentBooking/hooks.d.ts +1 -0
  16. package/es/components/appointmentBooking/hooks.js +30 -30
  17. package/es/components/appointmentBooking/locales.d.ts +3 -0
  18. package/es/components/appointmentBooking/locales.js +9 -6
  19. package/es/components/booking/components/actionButtons/index.js +34 -20
  20. package/es/components/booking/components/customSelect/index.js +1 -1
  21. package/es/components/booking/components/footer/amount.js +25 -8
  22. package/es/components/booking/components/footer/index.js +66 -33
  23. package/es/components/booking/components/footer/utils.d.ts +7 -0
  24. package/es/components/booking/components/footer/utils.js +126 -99
  25. package/es/components/booking/components/voucher/index.js +25 -9
  26. package/es/components/booking/dashboard/serve.js +1 -6
  27. package/es/components/booking/forms/footer.js +24 -10
  28. package/es/components/booking/forms/serve.js +2 -12
  29. package/es/components/booking/hooks/useQuotation.js +69 -21
  30. package/es/components/booking/info/client/index.js +28 -13
  31. package/es/components/booking/info/client/serve.js +2 -11
  32. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
  33. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
  34. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  35. package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  36. package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
  37. package/es/components/booking/info/main.js +3 -2
  38. package/es/components/booking/info/model.js +5 -0
  39. package/es/components/booking/info/pet/serve.js +1 -6
  40. package/es/components/booking/info/service/Lists.d.ts +1 -1
  41. package/es/components/booking/info/service/Lists.js +10 -4
  42. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  43. package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
  44. package/es/components/booking/info/service/serve.d.ts +14 -0
  45. package/es/components/booking/info/service/serve.js +25 -18
  46. package/es/components/booking/info/service2/Group/utils.js +2 -0
  47. package/es/components/booking/info/service2/utils.d.ts +1 -33
  48. package/es/components/booking/info/service2/utils.js +92 -56
  49. package/es/components/booking/info/utils.js +5 -0
  50. package/es/components/booking/info2/cartClientCard/index.js +49 -9
  51. package/es/components/booking/info2/index.js +3 -2
  52. package/es/components/booking/info2/serve.js +1 -6
  53. package/es/components/booking/info2/service/addService/index.js +146 -89
  54. package/es/components/booking/info2/service/addService/utils.d.ts +9 -1
  55. package/es/components/booking/info2/service/addService/utils.js +83 -14
  56. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  57. package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
  58. package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  59. package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
  60. package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
  61. package/es/components/booking/info2/service/editService/index.js +313 -57
  62. package/es/components/booking/info2/utilsByBooking.js +19 -14
  63. package/es/components/booking/locales.d.ts +36 -0
  64. package/es/components/booking/locales.js +48 -3
  65. package/es/components/booking/model.d.ts +4 -0
  66. package/es/components/booking/model.js +3 -0
  67. package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
  68. package/es/components/booking/utils/confirmHolderModal.js +318 -0
  69. package/es/components/booking/utils/confirmHolderModal.less +40 -0
  70. package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
  71. package/es/components/booking/utils/selectHolderModal.js +407 -0
  72. package/es/components/booking/utils.d.ts +16 -7
  73. package/es/components/booking/utils.js +26 -37
  74. package/es/components/checkout/PaymentModal.js +61 -30
  75. package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
  76. package/es/components/checkout/components/ScrollableList/index.js +0 -1
  77. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  78. package/es/components/checkout/locales.d.ts +3 -0
  79. package/es/components/checkout/locales.js +3 -0
  80. package/es/components/eftposPay/linkly/index.js +64 -2
  81. package/es/components/eftposPay/tyro/index.js +12 -0
  82. package/es/components/list/List.js +3 -0
  83. package/es/components/pay/toB/components/MX51/index.js +14 -44
  84. package/es/components/pay/toB/types/index.d.ts +0 -12
  85. package/es/components/pay/toB/types/index.js +0 -4
  86. package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -5
  87. package/es/components/shoppingCart/components/Cart/Product.js +6 -3
  88. package/es/components/shoppingCart/type.d.ts +1 -0
  89. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  90. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  91. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
  92. package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  93. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  94. package/es/components/ticketBooking/components/addServiceVariant/addService.js +421 -794
  95. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  96. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
  97. package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  98. package/es/components/ticketBooking/components/menuBar/index.js +109 -12
  99. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  100. package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
  101. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
  102. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  103. package/es/components/ticketBooking/components/timeBar/index.js +1 -4
  104. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  105. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
  106. package/es/components/ticketBooking/index.d.ts +0 -1
  107. package/es/components/ticketBooking/index.js +0 -2
  108. package/es/components/ticketBooking/serve.js +17 -119
  109. package/es/components/ticketBooking/utils/index.d.ts +7 -1
  110. package/es/components/ticketBooking/utils/index.js +44 -28
  111. package/es/hooks/useEngineContext.d.ts +0 -1
  112. package/es/hooks/useEngineContext.js +0 -7
  113. package/es/index.d.ts +4 -0
  114. package/es/index.js +5 -1
  115. package/es/plus/clientCard/locales.js +3 -3
  116. package/es/plus/clinetSearch/index.js +28 -30
  117. package/es/plus/clinetSearch/locales.d.ts +3 -0
  118. package/es/plus/clinetSearch/locales.js +7 -4
  119. package/es/plus/clinetSearch/types.d.ts +12 -0
  120. package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  121. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  122. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  123. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  124. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  125. package/es/plus/contactInfo/index.d.ts +6 -0
  126. package/es/plus/contactInfo/index.js +198 -0
  127. package/es/plus/contactInfo/index.less +621 -0
  128. package/es/plus/contactInfo/locales.d.ts +15 -0
  129. package/es/plus/contactInfo/locales.js +14 -0
  130. package/es/plus/contactInfo/types.d.ts +91 -0
  131. package/es/plus/contactInfo/types.js +1 -0
  132. package/es/plus/contactInfo/utils.d.ts +7 -0
  133. package/es/plus/contactInfo/utils.js +50 -0
  134. package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  135. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  136. package/es/plus/contactInfoModal/index.d.ts +41 -0
  137. package/es/plus/contactInfoModal/index.js +155 -0
  138. package/es/plus/contactInfoModal/index.less +19 -0
  139. package/es/plus/contactInfoModal/locales.d.ts +66 -0
  140. package/es/plus/contactInfoModal/locales.js +65 -0
  141. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  142. package/es/plus/productSelect/ProductCard/index.js +1 -1
  143. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  144. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  145. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  146. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  147. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  148. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  149. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  150. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  151. package/es/plus/selectHolder/index.d.ts +7 -0
  152. package/es/plus/selectHolder/index.js +273 -0
  153. package/es/plus/selectHolder/index.less +137 -0
  154. package/es/plus/selectHolder/locales.d.ts +24 -0
  155. package/es/plus/selectHolder/locales.js +29 -0
  156. package/es/plus/selectHolder/types.d.ts +104 -0
  157. package/es/plus/selectHolder/types.js +1 -0
  158. package/es/plus/selectHolder/utils.d.ts +9 -0
  159. package/es/plus/selectHolder/utils.js +16 -0
  160. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  161. package/es/pro/comprehensiveSearch/locales.js +1 -1
  162. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  163. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
  164. package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  165. package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
  166. package/es/pro/multiDayTimeSelect/index.js +1 -0
  167. package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
  168. package/es/pro/multiDayTimeSelect/types.js +1 -0
  169. package/es/pro/skuDetailModal/types.d.ts +1 -0
  170. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  171. package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
  172. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
  173. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  174. package/lib/components/appointmentBooking/hooks.d.ts +1 -0
  175. package/lib/components/appointmentBooking/hooks.js +73 -35
  176. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  177. package/lib/components/appointmentBooking/locales.js +6 -3
  178. package/lib/components/booking/components/actionButtons/index.js +11 -2
  179. package/lib/components/booking/components/customSelect/index.js +1 -1
  180. package/lib/components/booking/components/footer/amount.js +23 -6
  181. package/lib/components/booking/components/footer/index.js +26 -5
  182. package/lib/components/booking/components/footer/utils.d.ts +7 -0
  183. package/lib/components/booking/components/footer/utils.js +120 -82
  184. package/lib/components/booking/components/voucher/index.js +10 -1
  185. package/lib/components/booking/dashboard/serve.js +1 -6
  186. package/lib/components/booking/forms/footer.js +29 -11
  187. package/lib/components/booking/forms/serve.js +2 -12
  188. package/lib/components/booking/hooks/useQuotation.js +45 -13
  189. package/lib/components/booking/info/client/index.js +14 -1
  190. package/lib/components/booking/info/client/serve.js +2 -13
  191. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
  192. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
  193. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  194. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
  195. package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
  196. package/lib/components/booking/info/main.js +5 -4
  197. package/lib/components/booking/info/model.js +5 -0
  198. package/lib/components/booking/info/pet/serve.js +1 -6
  199. package/lib/components/booking/info/service/Lists.d.ts +1 -1
  200. package/lib/components/booking/info/service/Lists.js +5 -3
  201. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  202. package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
  203. package/lib/components/booking/info/service/serve.d.ts +14 -0
  204. package/lib/components/booking/info/service/serve.js +8 -17
  205. package/lib/components/booking/info/service2/Group/utils.js +2 -0
  206. package/lib/components/booking/info/service2/utils.d.ts +1 -33
  207. package/lib/components/booking/info/service2/utils.js +38 -29
  208. package/lib/components/booking/info/utils.js +4 -0
  209. package/lib/components/booking/info2/cartClientCard/index.js +34 -5
  210. package/lib/components/booking/info2/index.js +11 -5
  211. package/lib/components/booking/info2/serve.js +1 -6
  212. package/lib/components/booking/info2/service/addService/index.js +22 -3
  213. package/lib/components/booking/info2/service/addService/utils.d.ts +9 -1
  214. package/lib/components/booking/info2/service/addService/utils.js +48 -11
  215. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
  216. package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
  217. package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
  218. package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
  219. package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
  220. package/lib/components/booking/info2/service/editService/index.js +254 -32
  221. package/lib/components/booking/info2/utilsByBooking.js +26 -19
  222. package/lib/components/booking/locales.d.ts +36 -0
  223. package/lib/components/booking/locales.js +42 -3
  224. package/lib/components/booking/model.d.ts +4 -0
  225. package/lib/components/booking/model.js +3 -0
  226. package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
  227. package/lib/components/booking/utils/confirmHolderModal.js +253 -0
  228. package/lib/components/booking/utils/confirmHolderModal.less +40 -0
  229. package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
  230. package/lib/components/booking/utils/selectHolderModal.js +319 -0
  231. package/lib/components/booking/utils.d.ts +16 -7
  232. package/lib/components/booking/utils.js +18 -21
  233. package/lib/components/checkout/PaymentModal.js +41 -18
  234. package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
  235. package/lib/components/checkout/components/ScrollableList/index.js +0 -1
  236. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  237. package/lib/components/checkout/locales.d.ts +3 -0
  238. package/lib/components/checkout/locales.js +3 -0
  239. package/lib/components/eftposPay/linkly/index.js +31 -1
  240. package/lib/components/eftposPay/tyro/index.js +12 -0
  241. package/lib/components/list/List.js +3 -0
  242. package/lib/components/pay/toB/components/MX51/index.js +12 -37
  243. package/lib/components/pay/toB/types/index.d.ts +0 -12
  244. package/lib/components/pisellSelectCustomerModal/RightPanel/serve.js +1 -8
  245. package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
  246. package/lib/components/shoppingCart/type.d.ts +1 -0
  247. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
  248. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
  249. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
  250. package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
  251. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
  252. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +281 -313
  253. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
  254. package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
  255. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
  256. package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
  257. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
  258. package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
  259. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
  260. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  261. package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
  262. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
  263. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
  264. package/lib/components/ticketBooking/index.d.ts +0 -1
  265. package/lib/components/ticketBooking/index.js +0 -2
  266. package/lib/components/ticketBooking/serve.js +15 -117
  267. package/lib/components/ticketBooking/utils/index.d.ts +7 -1
  268. package/lib/components/ticketBooking/utils/index.js +29 -23
  269. package/lib/hooks/useEngineContext.d.ts +0 -1
  270. package/lib/hooks/useEngineContext.js +2 -10
  271. package/lib/index.d.ts +4 -0
  272. package/lib/index.js +12 -0
  273. package/lib/plus/clientCard/locales.js +3 -3
  274. package/lib/plus/clinetSearch/index.js +17 -8
  275. package/lib/plus/clinetSearch/locales.d.ts +3 -0
  276. package/lib/plus/clinetSearch/locales.js +7 -4
  277. package/lib/plus/clinetSearch/types.d.ts +12 -0
  278. package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
  279. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  280. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  281. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  282. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  283. package/lib/plus/contactInfo/index.d.ts +6 -0
  284. package/lib/plus/contactInfo/index.js +226 -0
  285. package/lib/plus/contactInfo/index.less +621 -0
  286. package/lib/plus/contactInfo/locales.d.ts +15 -0
  287. package/lib/plus/contactInfo/locales.js +38 -0
  288. package/lib/plus/contactInfo/types.d.ts +91 -0
  289. package/lib/plus/contactInfo/types.js +17 -0
  290. package/lib/plus/contactInfo/utils.d.ts +7 -0
  291. package/lib/plus/contactInfo/utils.js +64 -0
  292. package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
  293. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  294. package/lib/plus/contactInfoModal/index.d.ts +41 -0
  295. package/lib/plus/contactInfoModal/index.js +139 -0
  296. package/lib/plus/contactInfoModal/index.less +19 -0
  297. package/lib/plus/contactInfoModal/locales.d.ts +66 -0
  298. package/lib/plus/contactInfoModal/locales.js +89 -0
  299. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
  300. package/lib/plus/productSelect/ProductCard/index.js +1 -1
  301. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  302. package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
  303. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  304. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  305. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  306. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  307. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  308. package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
  309. package/lib/plus/selectHolder/index.d.ts +7 -0
  310. package/lib/plus/selectHolder/index.js +223 -0
  311. package/lib/plus/selectHolder/index.less +137 -0
  312. package/lib/plus/selectHolder/locales.d.ts +24 -0
  313. package/lib/plus/selectHolder/locales.js +47 -0
  314. package/lib/plus/selectHolder/types.d.ts +104 -0
  315. package/lib/plus/selectHolder/types.js +17 -0
  316. package/lib/plus/selectHolder/utils.d.ts +9 -0
  317. package/lib/plus/selectHolder/utils.js +34 -0
  318. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
  319. package/lib/pro/comprehensiveSearch/locales.js +1 -1
  320. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
  321. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
  322. package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
  323. package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
  324. package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
  325. package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
  326. package/lib/pro/multiDayTimeSelect/types.js +17 -0
  327. package/lib/pro/skuDetailModal/types.d.ts +1 -0
  328. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  329. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  330. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  331. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  332. package/lowcode/contact-info/meta.ts +199 -0
  333. package/lowcode/contact-info-modal/meta.ts +98 -0
  334. package/lowcode/event-select-holder/meta.ts +2 -2
  335. package/lowcode/select-holder/meta.ts +220 -0
  336. package/lowcode/select-holder/snippets.ts +41 -0
  337. package/package.json +13 -11
  338. package/es/hooks/printer.d.ts +0 -4
  339. package/es/hooks/printer.js +0 -35
  340. package/lib/hooks/printer.d.ts +0 -4
@@ -0,0 +1,51 @@
1
+ .event-booking-error-tip {
2
+ margin-bottom: 16px;
3
+ display: flex;
4
+ align-items: center;
5
+ padding: 6px 16px 6px 6px;
6
+ gap: 16px;
7
+ align-self: stretch;
8
+ border-radius: 12px;
9
+ border: 1px solid var(--Error-300, #fda29b);
10
+ background: var(--Error-25, #fffbfa);
11
+ box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
12
+ color: var(--Error-700, #b42318);
13
+ font-size: 14px;
14
+ font-weight: 600;
15
+
16
+ .error-icon-wrapper {
17
+ position: relative;
18
+ width: 38px;
19
+ height: 38px;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+
24
+ &::before {
25
+ content: '';
26
+ position: absolute;
27
+ width: 38px;
28
+ height: 38px;
29
+ border-radius: 50%;
30
+ border: 2px solid var(--Error-600, #d92d20);
31
+ opacity: 0.1;
32
+ }
33
+
34
+ &::after {
35
+ content: '';
36
+ position: absolute;
37
+ width: 28px;
38
+ height: 28px;
39
+ border-radius: 50%;
40
+ border: 2px solid var(--Error-600, #d92d20);
41
+ opacity: 0.3;
42
+ }
43
+
44
+ .icon-warning {
45
+ position: relative;
46
+ z-index: 1;
47
+ font-size: 20px;
48
+ color: #ff4d4f;
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { HolderItemProps } from '../../types';
3
+ import './index.less';
4
+ export declare const PREFIX = "pisell-lowcode-holder-item";
5
+ declare const HolderItem: React.FC<HolderItemProps>;
6
+ export default HolderItem;
@@ -0,0 +1,77 @@
1
+ import React, { useMemo } from 'react';
2
+ import { PisellCard, PisellAvatar, Icon } from '@pisell/materials';
3
+ import { getAvatarText } from "../../utils";
4
+ import "./index.less";
5
+
6
+ // 类名前缀
7
+ export var PREFIX = 'pisell-lowcode-holder-item';
8
+ var HolderItem = function HolderItem(_ref) {
9
+ var item = _ref.item,
10
+ displayConfig = _ref.displayConfig,
11
+ value = _ref.value,
12
+ isAddItem = _ref.isAddItem;
13
+ var _ref2 = displayConfig || {},
14
+ _ref2$showAvatar = _ref2.showAvatar,
15
+ showAvatar = _ref2$showAvatar === void 0 ? true : _ref2$showAvatar,
16
+ _ref2$showTitle = _ref2.showTitle,
17
+ showTitle = _ref2$showTitle === void 0 ? true : _ref2$showTitle,
18
+ _ref2$showSubtitle = _ref2.showSubtitle,
19
+ showSubtitle = _ref2$showSubtitle === void 0 ? false : _ref2$showSubtitle,
20
+ _ref2$selectType = _ref2.selectType,
21
+ selectType = _ref2$selectType === void 0 ? 'single' : _ref2$selectType,
22
+ _ref2$direction = _ref2.direction,
23
+ direction = _ref2$direction === void 0 ? 'vertical' : _ref2$direction,
24
+ _ref2$showExtraFields = _ref2.showExtraFields,
25
+ showExtraFields = _ref2$showExtraFields === void 0 ? false : _ref2$showExtraFields,
26
+ _ref2$extraFields = _ref2.extraFields,
27
+ extraFields = _ref2$extraFields === void 0 ? [] : _ref2$extraFields;
28
+ var isSelected = useMemo(function () {
29
+ if (!(value !== null && value !== void 0 && value.length) || !(item !== null && item !== void 0 && item.value)) return false;
30
+ return value.includes(item.value);
31
+ }, [value, item === null || item === void 0 ? void 0 : item.value]);
32
+
33
+ /**
34
+ * @title: 渲染额外字段
35
+ * @description:
36
+ * @param {*} useMemo
37
+ * @return {*}
38
+ * @Author: WangHan
39
+ * @Date: 2025-10-11 14:24
40
+ */
41
+ var extraFieldsCom = useMemo(function () {
42
+ if (!showExtraFields || !(extraFields !== null && extraFields !== void 0 && extraFields.length)) return null;
43
+ return extraFields.map(function (field) {
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ className: "".concat(PREFIX, "-extra-field")
46
+ }, (field === null || field === void 0 ? void 0 : field.isShowLabel) && /*#__PURE__*/React.createElement("span", {
47
+ className: "".concat(PREFIX, "-extra-field-label")
48
+ }, field.label, ":"), (field === null || field === void 0 ? void 0 : field.isShowValue) && (field === null || field === void 0 ? void 0 : field.value) && /*#__PURE__*/React.createElement("span", {
49
+ className: "".concat(PREFIX, "-extra-field-value")
50
+ }, item === null || item === void 0 ? void 0 : item[field.value]));
51
+ });
52
+ }, [showExtraFields, extraFields, item]);
53
+ return /*#__PURE__*/React.createElement("div", {
54
+ className: "".concat(PREFIX, "-wrap ").concat(isSelected ? "".concat(PREFIX, "-wrap-selected") : '')
55
+ }, /*#__PURE__*/React.createElement(PisellCard, {
56
+ padding: 20,
57
+ selected: isSelected
58
+ }, /*#__PURE__*/React.createElement("div", {
59
+ className: "".concat(PREFIX, "-card ").concat(direction === 'horizontal' ? "".concat(PREFIX, "-card-horizontal") : '')
60
+ }, showAvatar ? /*#__PURE__*/React.createElement(PisellAvatar, {
61
+ src: item === null || item === void 0 ? void 0 : item.avatar,
62
+ useTextAvatar: !(item !== null && item !== void 0 && item.avatar) && !isAddItem,
63
+ className: "".concat(isAddItem ? "".concat(PREFIX, "-add-avatar") : ''),
64
+ size: 'xxl'
65
+ }, getAvatarText(item.label)) : null, (showTitle || showSubtitle) && /*#__PURE__*/React.createElement("div", {
66
+ className: "".concat(PREFIX, "-info")
67
+ }, showTitle && /*#__PURE__*/React.createElement("span", {
68
+ className: "".concat(PREFIX, "-name")
69
+ }, item.label), showSubtitle && item.subtitle && /*#__PURE__*/React.createElement("span", {
70
+ className: "".concat(PREFIX, "-subtitle")
71
+ }, item.subtitle), extraFieldsCom), selectType === 'multiple' && /*#__PURE__*/React.createElement("div", {
72
+ className: "".concat(PREFIX, "-check-icon ").concat(isSelected ? "".concat(PREFIX, "-check-icon-selected") : '')
73
+ }, /*#__PURE__*/React.createElement(Icon, {
74
+ type: "CheckCircleFilled"
75
+ })))));
76
+ };
77
+ export default HolderItem;
@@ -0,0 +1,105 @@
1
+ .pisell-lowcode-holder-item {
2
+ &-wrap {
3
+ height: 100%;
4
+ border: 1px solid transparent;
5
+
6
+ .pisell-lowcode-card-body {
7
+ height: 100%;
8
+ position: relative;
9
+ }
10
+ }
11
+
12
+ &-wrap-selected {
13
+ border: none;
14
+ }
15
+
16
+ &-card {
17
+ display: flex;
18
+ flex-direction: column;
19
+ justify-content: center;
20
+ align-items: center;
21
+ gap: 10px;
22
+ height: 100%;
23
+ color: var(--Text-Text_1, #1b1b1b);
24
+ font-size: 14px;
25
+ font-style: normal;
26
+ font-weight: 600;
27
+ line-height: 20px;
28
+ width: 100%;
29
+ text-align: center;
30
+
31
+ // 确保头像不变形
32
+ .pisell-lowcode-avatar {
33
+ flex-shrink: 0;
34
+ }
35
+ }
36
+
37
+ &-add-avatar {
38
+ background: #f4ebff !important;
39
+ }
40
+
41
+ &-card-horizontal {
42
+ flex-direction: row;
43
+ gap: 20px;
44
+
45
+ .pisell-lowcode-holder-item-info {
46
+ align-items: flex-start;
47
+ text-align: left;
48
+ flex: 1;
49
+ }
50
+ }
51
+
52
+ &-check-icon {
53
+ position: absolute;
54
+ right: 6px;
55
+ bottom: 6px;
56
+ color: #d0d5dd;
57
+ font-size: 14px;
58
+ }
59
+
60
+ &-check-icon-selected {
61
+ color: #7f56d9;
62
+ }
63
+
64
+ &-info {
65
+ display: flex;
66
+ flex-direction: column;
67
+ align-items: center;
68
+ justify-content: center;
69
+ gap: 10px;
70
+ width: 100%;
71
+ color: #1b1b1b;
72
+ font-size: 14px;
73
+ font-weight: 400;
74
+ word-wrap: break-word;
75
+ }
76
+
77
+ &-name {
78
+ width: 100%;
79
+ font-weight: 600;
80
+ overflow: hidden;
81
+ text-overflow: ellipsis;
82
+ display: -webkit-box;
83
+ -webkit-line-clamp: 1;
84
+ line-clamp: 1;
85
+ -webkit-box-orient: vertical;
86
+ word-break: break-word;
87
+ }
88
+
89
+ &-subtitle {
90
+ width: 100%;
91
+ overflow: hidden;
92
+ text-overflow: ellipsis;
93
+ display: -webkit-box;
94
+ -webkit-line-clamp: 2;
95
+ line-clamp: 2;
96
+ -webkit-box-orient: vertical;
97
+ word-break: break-word;
98
+ }
99
+
100
+ &-extra-field {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 10px;
104
+ }
105
+ }
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { HolderOption, HolderDisplayProps } from '../../types';
3
+ export interface HolderListProps {
4
+ /** 选项数据源 */
5
+ dataSource?: HolderOption[];
6
+ /** 当前选中的值数组 */
7
+ selectedValues?: any[];
8
+ /** 显示配置 */
9
+ displayConfig?: HolderDisplayProps;
10
+ /** 渲染添加项的函数 */
11
+ renderAddItem?: () => React.ReactNode;
12
+ /** 列数 */
13
+ columns?: number;
14
+ /** 水平间距 */
15
+ horizontalGap?: number;
16
+ /** 垂直间距 */
17
+ verticalGap?: number;
18
+ /** 是否允许添加 */
19
+ allowAdd?: boolean;
20
+ /** 点击事件处理函数 */
21
+ onClick?: (item: HolderOption) => void;
22
+ }
23
+ /**
24
+ * @title: HolderList 选项列表组件
25
+ * @description: 抽离的选项列表组件,可以在 Modal 外部独立使用
26
+ * @Author: WangHan
27
+ * @Date: 2025-01-XX
28
+ */
29
+ declare const HolderList: React.FC<HolderListProps>;
30
+ export default HolderList;
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { PisellCustomCheckboxGroup } from '@pisell/materials';
3
+ import HolderItem from "../HolderItem";
4
+ /**
5
+ * @title: HolderList 选项列表组件
6
+ * @description: 抽离的选项列表组件,可以在 Modal 外部独立使用
7
+ * @Author: WangHan
8
+ * @Date: 2025-01-XX
9
+ */
10
+ var HolderList = function HolderList(_ref) {
11
+ var _ref$dataSource = _ref.dataSource,
12
+ dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
13
+ _ref$selectedValues = _ref.selectedValues,
14
+ selectedValues = _ref$selectedValues === void 0 ? [] : _ref$selectedValues,
15
+ displayConfig = _ref.displayConfig,
16
+ renderAddItem = _ref.renderAddItem,
17
+ _ref$columns = _ref.columns,
18
+ columns = _ref$columns === void 0 ? 3 : _ref$columns,
19
+ _ref$horizontalGap = _ref.horizontalGap,
20
+ horizontalGap = _ref$horizontalGap === void 0 ? 16 : _ref$horizontalGap,
21
+ _ref$verticalGap = _ref.verticalGap,
22
+ verticalGap = _ref$verticalGap === void 0 ? 16 : _ref$verticalGap,
23
+ _ref$allowAdd = _ref.allowAdd,
24
+ allowAdd = _ref$allowAdd === void 0 ? true : _ref$allowAdd,
25
+ onClick = _ref.onClick;
26
+ return /*#__PURE__*/React.createElement(PisellCustomCheckboxGroup, {
27
+ dataSource: dataSource,
28
+ renderItem: function renderItem(item) {
29
+ return /*#__PURE__*/React.createElement(HolderItem, {
30
+ item: item,
31
+ displayConfig: displayConfig,
32
+ value: selectedValues
33
+ });
34
+ },
35
+ renderAddItem: renderAddItem,
36
+ columns: columns,
37
+ horizontalGap: horizontalGap,
38
+ verticalGap: verticalGap,
39
+ allowAdd: allowAdd,
40
+ onClick: onClick
41
+ });
42
+ };
43
+ export default HolderList;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { PisellSelectHolderProps } from './types';
3
+ import './index.less';
4
+ export declare const PREFIX = "pisell-lowcode-select-holder";
5
+ declare const PisellSelectHolder: React.FC<PisellSelectHolderProps>;
6
+ export default PisellSelectHolder;
7
+ export { default as HolderList } from './components/HolderList';
@@ -0,0 +1,273 @@
1
+ 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); }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ 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."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
7
+ 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."); }
8
+ 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); }
9
+ 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; }
10
+ 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; } }
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+ import React, { useEffect, useState, useMemo, useCallback } from 'react';
13
+ import { PisellModal, Button } from '@pisell/materials';
14
+ import { isMobile, locales } from '@pisell/utils';
15
+ import ErrorTip from "./components/ErrorTip";
16
+ import HolderItem from "./components/HolderItem";
17
+ import HolderList from "./components/HolderList";
18
+ import useEngineContext from "../../hooks/useEngineContext";
19
+ import localeTexts from "./locales";
20
+ import "./index.less";
21
+
22
+ // 类名前缀
23
+ export var PREFIX = 'pisell-lowcode-select-holder';
24
+ var PisellSelectHolder = function PisellSelectHolder(_ref) {
25
+ var _context$engine;
26
+ var dataSource = _ref.dataSource,
27
+ _ref$open = _ref.open,
28
+ open = _ref$open === void 0 ? true : _ref$open,
29
+ onClose = _ref.onClose,
30
+ onConfirm = _ref.onConfirm,
31
+ onSkip = _ref.onSkip,
32
+ onAdd = _ref.onAdd,
33
+ value = _ref.value,
34
+ modalConfig = _ref.modalConfig,
35
+ displayConfig = _ref.displayConfig,
36
+ _ref$allowAdd = _ref.allowAdd,
37
+ allowAdd = _ref$allowAdd === void 0 ? true : _ref$allowAdd,
38
+ _ref$horizontalGap = _ref.horizontalGap,
39
+ horizontalGap = _ref$horizontalGap === void 0 ? 16 : _ref$horizontalGap,
40
+ _ref$verticalGap = _ref.verticalGap,
41
+ verticalGap = _ref$verticalGap === void 0 ? 16 : _ref$verticalGap,
42
+ _ref$maxSelectedCount = _ref.maxSelectedCount,
43
+ maxSelectedCount = _ref$maxSelectedCount === void 0 ? 2 : _ref$maxSelectedCount,
44
+ _ref$isInline = _ref.isInline,
45
+ isInline = _ref$isInline === void 0 ? false : _ref$isInline,
46
+ className = _ref.className,
47
+ style = _ref.style;
48
+ var _useState = useState(''),
49
+ _useState2 = _slicedToArray(_useState, 2),
50
+ errorTip = _useState2[0],
51
+ setErrorTip = _useState2[1];
52
+ var _useState3 = useState([]),
53
+ _useState4 = _slicedToArray(_useState3, 2),
54
+ selectedValues = _useState4[0],
55
+ setSelectedValues = _useState4[1];
56
+ var mobile = useMemo(function () {
57
+ return isMobile();
58
+ }, []);
59
+ var context = useEngineContext();
60
+ locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
61
+ useEffect(function () {
62
+ var _value = [];
63
+ if (Array.isArray(value)) {
64
+ _value = value;
65
+ } else {
66
+ _value = value ? [value] : [];
67
+ }
68
+ setSelectedValues(_value);
69
+ }, [value]);
70
+
71
+ /**
72
+ * @title: 单选模式默认选中第一个有效选项
73
+ * @description: 当单选模式且没有选中值时,自动选中第一个带value的选项
74
+ * @Author: Auto
75
+ * @Date: 2025-01-XX
76
+ */
77
+ useEffect(function () {
78
+ // 只在单选模式下生效
79
+ if ((displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType) !== 'single') {
80
+ return;
81
+ }
82
+
83
+ // 如果已经有选中值,不执行默认选中
84
+ if (selectedValues.length > 0) {
85
+ return;
86
+ }
87
+
88
+ // 如果 value prop 有值,说明是外部传入的,不执行默认选中
89
+ // 只有当 value 为空(undefined/null)时,才执行默认选中
90
+ if (value !== undefined && value !== null && (value === null || value === void 0 ? void 0 : value.length) > 0) {
91
+ return;
92
+ }
93
+
94
+ // 查找第一个有效的选项(value不为null且不为undefined)
95
+ if (Array.isArray(dataSource) && dataSource.length > 0) {
96
+ var firstValidOption = dataSource.find(function (item) {
97
+ return (item === null || item === void 0 ? void 0 : item.value) !== null && (item === null || item === void 0 ? void 0 : item.value) !== undefined;
98
+ });
99
+
100
+ // 如果找到有效选项,自动选中
101
+ if (firstValidOption) {
102
+ handleClick(firstValidOption);
103
+ }
104
+ }
105
+ }, [dataSource, displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType, selectedValues.length, value]);
106
+
107
+ /**
108
+ * @title: 处理确认按钮点击
109
+ * @description:
110
+ * @param {*} useCallback
111
+ * @return {*}
112
+ * @Author: WangHan
113
+ * @Date: 2025-10-10 21:32
114
+ */
115
+ var handleOk = useCallback(function () {
116
+ onConfirm === null || onConfirm === void 0 || onConfirm(selectedValues);
117
+ }, [selectedValues]);
118
+
119
+ /**
120
+ * @title: 处理选项点击
121
+ * @description:
122
+ * @return {*}
123
+ * @Author: WangHan
124
+ * @Date: 2025-10-10 21:28
125
+ */
126
+ var handleClick = useCallback(function (item) {
127
+ if (!(item !== null && item !== void 0 && item.value)) {
128
+ return onAdd === null || onAdd === void 0 ? void 0 : onAdd();
129
+ }
130
+ var selectType = (displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType) || 'single';
131
+
132
+ // 单选模式:直接设置选中的值
133
+ if (selectType === 'single') {
134
+ setSelectedValues(function (prev) {
135
+ // 如果点击的是已选中的项,则取消选择(可选行为)
136
+ // 如果需要保持选中状态,可以改为:return [item.value];
137
+ return prev.includes(item.value) ? [] : [item.value];
138
+ });
139
+ } else {
140
+ // 多选模式:如果已选中,则移除,否则添加
141
+ setSelectedValues(function (prev) {
142
+ var newValues = prev.includes(item.value) ? prev.filter(function (v) {
143
+ return v !== item.value;
144
+ }) : [].concat(_toConsumableArray(prev), [item.value]);
145
+ return newValues;
146
+ });
147
+ }
148
+ }, [displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType]);
149
+ var handleSkip = useCallback(function () {
150
+ onSkip === null || onSkip === void 0 || onSkip();
151
+ }, [onSkip]);
152
+
153
+ /**
154
+ * @title: 渲染添加项
155
+ * @description:
156
+ * @param {*} useCallback
157
+ * @return {*}
158
+ * @Author: WangHan
159
+ * @Date: 2025-10-11 14:20
160
+ */
161
+ var addHolderLabel = locales.getText('pisell-select-holder-create');
162
+ var renderAddItem = useCallback(function () {
163
+ if (!allowAdd) return undefined;
164
+ return /*#__PURE__*/React.createElement(HolderItem, {
165
+ item: {
166
+ label: addHolderLabel,
167
+ value: null
168
+ },
169
+ isAddItem: true
170
+ });
171
+ }, [allowAdd]);
172
+
173
+ /**
174
+ * @title: 模态框样式类名
175
+ * @description:
176
+ * @param {*} useMemo
177
+ * @return {*}
178
+ * @Author: WangHan
179
+ * @Date: 2025-10-11 14:20
180
+ */
181
+ var modalClassName = useMemo(function () {
182
+ var classes = ["".concat(PREFIX, "-modal")];
183
+ if (mobile) {
184
+ classes.push("".concat(PREFIX, "-modal-mobile"));
185
+ }
186
+ return classes.join(' ');
187
+ }, [mobile]);
188
+ var okButtonProps = useMemo(function () {
189
+ // 多选模式,禁用按钮当已选数量大于最大可选数量
190
+ if ((displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType) === 'multiple') {
191
+ return {
192
+ disabled: (selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.length) > maxSelectedCount
193
+ };
194
+ }
195
+ return {
196
+ disabled: !(selectedValues !== null && selectedValues !== void 0 && selectedValues.length)
197
+ };
198
+ }, [selectedValues, maxSelectedCount, displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType]);
199
+
200
+ /**
201
+ * @title: 渲染底部按钮
202
+ * @description:
203
+ * @param {*} useMemo
204
+ * @return {*}
205
+ * @Author: WangHan
206
+ * @Date: 2025-10-10 21:51
207
+ */
208
+ var footerCom = useMemo(function () {
209
+ return /*#__PURE__*/React.createElement("div", {
210
+ className: "".concat(PREFIX, "-footer")
211
+ }, displayConfig !== null && displayConfig !== void 0 && displayConfig.isSkipable ? /*#__PURE__*/React.createElement(Button, {
212
+ onClick: handleSkip
213
+ }, locales.getText('pisell-select-holder-skip')) : null, /*#__PURE__*/React.createElement(Button, _extends({
214
+ onClick: handleOk
215
+ }, okButtonProps, {
216
+ type: "primary"
217
+ }), modalConfig === null || modalConfig === void 0 ? void 0 : modalConfig.confirmText));
218
+ }, [displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.isSkipable, modalConfig === null || modalConfig === void 0 ? void 0 : modalConfig.confirmText, okButtonProps]);
219
+
220
+ /**
221
+ * @description: 渲染内容
222
+ * @param {*} useMemo
223
+ * @return {*}
224
+ */
225
+ var renderContent = useMemo(function () {
226
+ return /*#__PURE__*/React.createElement(React.Fragment, null, mobile && modalConfig !== null && modalConfig !== void 0 && modalConfig.title ? /*#__PURE__*/React.createElement("div", {
227
+ className: "".concat(PREFIX, "-modal-title")
228
+ }, modalConfig === null || modalConfig === void 0 ? void 0 : modalConfig.title) : null, errorTip && /*#__PURE__*/React.createElement(ErrorTip, {
229
+ text: errorTip
230
+ }), (displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.selectType) === 'multiple' && maxSelectedCount ? /*#__PURE__*/React.createElement("div", {
231
+ className: "".concat(PREFIX, "-selected-info ").concat(selectedValues.length === maxSelectedCount ? "".concat(PREFIX, "-selected-info-max") : '')
232
+ }, locales.getText('pisell-select-holder-selected'), selectedValues.length, "/", maxSelectedCount, selectedValues.length > maxSelectedCount ? /*#__PURE__*/React.createElement("span", null, " ", locales.getText('pisell-select-holder-please-remove')(selectedValues.length - maxSelectedCount)) : null) : null, /*#__PURE__*/React.createElement(HolderList, {
233
+ dataSource: dataSource,
234
+ selectedValues: selectedValues,
235
+ displayConfig: displayConfig,
236
+ renderAddItem: renderAddItem,
237
+ columns: mobile ? 2 : 3,
238
+ horizontalGap: horizontalGap,
239
+ verticalGap: verticalGap,
240
+ allowAdd: allowAdd,
241
+ onClick: handleClick
242
+ }));
243
+ }, [isInline, modalConfig, dataSource, errorTip, maxSelectedCount, selectedValues, displayConfig, renderAddItem, mobile, horizontalGap, verticalGap, allowAdd, handleClick]);
244
+
245
+ // 直接页面上显示
246
+ if (isInline) {
247
+ return /*#__PURE__*/React.createElement("div", {
248
+ className: "".concat(PREFIX, "-inline-wrap ").concat(className),
249
+ style: style
250
+ }, renderContent);
251
+ }
252
+
253
+ // 弹窗打开
254
+ return /*#__PURE__*/React.createElement(PisellModal, {
255
+ open: open,
256
+ title: mobile ? '' : modalConfig === null || modalConfig === void 0 ? void 0 : modalConfig.title,
257
+ platform: mobile ? 'h5' : 'pc',
258
+ closable: modalConfig === null || modalConfig === void 0 ? void 0 : modalConfig.showClose,
259
+ bodyStyle: {
260
+ padding: mobile ? '0 16px 16px' : 20
261
+ },
262
+ mobileModalHeight: "auto",
263
+ destroyOnClose: true,
264
+ className: modalClassName,
265
+ headerDivider: false,
266
+ width: mobile ? '100%' : '640px',
267
+ footer: footerCom,
268
+ onCancel: onClose
269
+ }, renderContent);
270
+ };
271
+ export default PisellSelectHolder;
272
+ // 导出 HolderList 组件供外部使用
273
+ export { default as HolderList } from "./components/HolderList";