@pisell/private-materials 6.2.24 → 6.2.26

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 (433) 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 +9 -1
  6. package/build/lowcode/preview.js +8 -8
  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/businessModel/SalesModel/index.d.ts +0 -1
  12. package/es/components/Sales/Cart/index.js +1 -0
  13. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  15. package/es/components/booking/addons/index.js +4 -1
  16. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  17. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  18. package/es/components/booking/components/actionButtons/index.js +395 -0
  19. package/es/components/booking/components/actionButtons/index.less +148 -0
  20. package/es/components/booking/components/browserSelect/index.js +1 -1
  21. package/es/components/booking/components/clearCartModal/index.js +50 -0
  22. package/es/components/booking/components/clearCartModal/index.less +109 -0
  23. package/es/components/booking/components/customSelect/index.js +1 -0
  24. package/es/components/booking/components/customiseItemModal/index.js +294 -0
  25. package/es/components/booking/components/customiseItemModal/index.less +606 -0
  26. package/es/components/booking/components/footer/amount.d.ts +1 -0
  27. package/es/components/booking/components/footer/amount.js +15 -3
  28. package/es/components/booking/components/footer/index.js +106 -39
  29. package/es/components/booking/components/footer/utils.js +52 -24
  30. package/es/components/booking/components/tabPane/index.js +86 -5
  31. package/es/components/booking/components/tabPane/index.less +75 -1
  32. package/es/components/booking/components/voucher/index.js +19 -8
  33. package/es/components/booking/components/voucher/index.less +1 -1
  34. package/es/components/booking/dashboard/index.js +10 -3
  35. package/es/components/booking/forms/model.js +5 -5
  36. package/es/components/booking/hooks/useClearCart.js +11 -8
  37. package/es/components/booking/hooks/useQuotation.js +17 -7
  38. package/es/components/booking/info/client/index.js +3 -2
  39. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  40. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  41. package/es/components/booking/info/hooks/useInfoHolder.js +15 -7
  42. package/es/components/booking/info/index.less +18 -2
  43. package/es/components/booking/info/main.js +14 -15
  44. package/es/components/booking/info/service/Lists.js +41 -28
  45. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  46. package/es/components/booking/info/service/editService/constants.d.ts +1 -0
  47. package/es/components/booking/info/service/editService/constants.js +3 -0
  48. package/es/components/booking/info/service/editService/index.js +15 -10
  49. package/es/components/booking/info/service/like/index.js +1 -1
  50. package/es/components/booking/info/service/serviceItem/index.js +2 -2
  51. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  52. package/es/components/booking/info/service2/utils.d.ts +4 -0
  53. package/es/components/booking/info/service2/utils.js +32 -23
  54. package/es/components/booking/info2/cartClientCard/index.js +343 -0
  55. package/es/components/booking/info2/cartClientCard/index.less +6 -0
  56. package/es/components/booking/info2/cartClientCard/locales.js +26 -0
  57. package/es/components/booking/info2/cartClientCard/types.js +1 -0
  58. package/es/components/booking/info2/cartClientCard/utils.js +7 -0
  59. package/es/components/booking/info2/index.js +41 -18
  60. package/es/components/booking/info2/service/addService/utils.js +6 -3
  61. package/es/components/booking/info2/service/addTimeModal/index.js +5 -1
  62. package/es/components/booking/info2/service/editNormalService/index.js +67 -0
  63. package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
  64. package/es/components/booking/info2/service/editService/index.js +267 -171
  65. package/es/components/booking/info2/service/index.js +27 -18
  66. package/es/components/booking/info2/service/serviceItem/index.js +2 -2
  67. package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
  68. package/es/components/booking/info2/utilsByBooking.js +26 -3
  69. package/es/components/booking/locales.js +99 -3
  70. package/es/components/booking/materiels/duration/index.js +9 -2
  71. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  72. package/es/components/booking/materiels/startTime/index.js +1 -1
  73. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  74. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  75. package/es/components/booking/notes/addNote/index.js +52 -32
  76. package/es/components/booking/notes/addNote/index.less +53 -0
  77. package/es/components/booking/notes/model.js +5 -5
  78. package/es/components/booking/payments/model.js +5 -5
  79. package/es/components/eftposPay/amount.d.ts +1 -1
  80. package/es/components/eftposPay/device.d.ts +1 -1
  81. package/es/components/eftposPay/hooks.d.ts +2 -2
  82. package/es/components/eftposPay/store/index.d.ts +3 -3
  83. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  84. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  85. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  86. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  87. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  88. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  89. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  90. package/es/components/listComponent/index.js +5 -5
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  92. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  93. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  94. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  95. package/es/components/productExtension/card/index.js +3 -3
  96. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  97. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  98. package/es/components/productExtension/fields/Forms/index.js +12 -12
  99. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  100. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  101. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  102. package/es/components/productExtension/server.js +2 -2
  103. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  104. package/es/components/schedules/calendar/index.js +4 -4
  105. package/es/components/schedules/calendar/serve.js +2 -2
  106. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  107. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  108. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  109. package/es/components/schedules/components/ResourceList/index.js +1 -1
  110. package/es/components/schedules/components/Search/index.js +5 -5
  111. package/es/components/schedules/model.js +5 -5
  112. package/es/components/schedules/openHours/index.js +1 -1
  113. package/es/components/schedules/openHours/serve.js +2 -2
  114. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  115. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  116. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  117. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  118. package/es/components/schedules/products/serve.js +2 -2
  119. package/es/components/schedules/products/utils.js +5 -5
  120. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  121. package/es/components/schedules/resources/detail/index.js +10 -10
  122. package/es/components/schedules/resources/list/index.js +2 -2
  123. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  124. package/es/components/schedules/resources/serve.js +2 -2
  125. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  126. package/es/components/schedules/utils.js +4 -4
  127. package/es/components/selectModal/index.js +2 -2
  128. package/es/components/shoppingCart/components/Cart/Product.js +62 -41
  129. package/es/components/shoppingCart/components/Cart/index.js +21 -18
  130. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  131. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  132. package/es/components/subTotal/index.less +1 -1
  133. package/es/components/ticketBooking/components/addServiceVariant/addService.js +309 -351
  134. package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
  135. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
  136. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
  137. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
  138. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
  139. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
  140. package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
  141. package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
  142. package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
  143. package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
  144. package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
  145. package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
  146. package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
  147. package/es/components/ticketBooking/components/ticketBooking/index.js +208 -33
  148. package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
  149. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  150. package/es/components/ticketBooking/components/timeBar/index.js +79 -68
  151. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
  152. package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
  153. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
  154. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
  155. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
  156. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
  157. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
  158. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
  159. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
  160. package/es/components/ticketBooking/index.js +21 -3
  161. package/es/components/ticketBooking/locales.js +6 -3
  162. package/es/components/ticketBooking/serve.js +11 -11
  163. package/es/components/ticketBooking/utils/index.d.ts +39 -2
  164. package/es/components/ticketBooking/utils/index.js +104 -11
  165. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  166. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  167. package/es/hooks/useComponents.js +1 -1
  168. package/es/hooks/useToast.js +9 -0
  169. package/es/hooks/useTranslationOriginal.js +10 -0
  170. package/es/index.js +5 -1
  171. package/es/plus/clientCard/index.js +452 -0
  172. package/es/plus/clientCard/index.less +539 -0
  173. package/es/plus/clientCard/line/index.js +157 -0
  174. package/es/plus/clientCard/line/index.less +142 -0
  175. package/es/plus/clientCard/locales.js +17 -0
  176. package/es/plus/clientCard/types.js +1 -0
  177. package/es/plus/clientCard/utils.js +59 -0
  178. package/es/plus/clientName/index.js +18 -0
  179. package/es/plus/clientName/index.less +10 -0
  180. package/es/plus/clientName/type.js +1 -0
  181. package/es/plus/clientName/utils.js +18 -0
  182. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  183. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  184. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  185. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  186. package/es/plus/clinetSearch/Add/index.js +212 -0
  187. package/es/plus/clinetSearch/Add/index.less +30 -0
  188. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  189. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  190. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  191. package/es/plus/clinetSearch/index.js +214 -0
  192. package/es/plus/clinetSearch/index.less +91 -0
  193. package/es/plus/clinetSearch/locales.js +101 -0
  194. package/es/plus/clinetSearch/serve.js +31 -0
  195. package/es/plus/clinetSearch/types.js +1 -0
  196. package/es/plus/noteModal/AddTempModal.js +64 -0
  197. package/es/plus/noteModal/index.js +199 -0
  198. package/es/plus/noteModal/index.less +168 -0
  199. package/es/plus/noteModal/locales.js +32 -0
  200. package/es/plus/noteModal/types.js +1 -0
  201. package/es/pro/comprehensiveSearch/camera.svg +4 -0
  202. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
  203. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
  204. package/es/pro/comprehensiveSearch/index.js +342 -0
  205. package/es/pro/comprehensiveSearch/index.less +323 -0
  206. package/es/pro/comprehensiveSearch/locales.js +17 -0
  207. package/es/pro/comprehensiveSearch/types.js +1 -0
  208. package/es/pro/numberKeyboard/index.js +155 -0
  209. package/es/pro/numberKeyboard/index.less +25 -0
  210. package/es/pro/numberKeyboard/locales.js +11 -0
  211. package/es/pro/pisellNumberSelector/example.js +68 -0
  212. package/es/pro/pisellNumberSelector/index.js +231 -0
  213. package/es/pro/pisellNumberSelector/index.less +193 -0
  214. package/es/pro/pisellPhoneKeyboard/index.js +211 -0
  215. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  216. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  217. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
  218. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
  219. package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
  220. package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
  221. package/es/pro/pisellPriceRadio/index.js +113 -0
  222. package/es/pro/pisellPriceRadio/index.less +158 -0
  223. package/es/pro/skuDetailModal/index.js +352 -0
  224. package/es/pro/skuDetailModal/index.less +236 -0
  225. package/es/pro/skuDetailModal/locales.js +47 -0
  226. package/es/pro/skuDetailModal/types.js +1 -0
  227. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  228. package/lib/components/Sales/Cart/index.js +1 -0
  229. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  230. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  231. package/lib/components/booking/addons/index.js +4 -1
  232. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  233. package/lib/components/booking/components/actionButtons/index.js +325 -0
  234. package/lib/components/booking/components/actionButtons/index.less +148 -0
  235. package/lib/components/booking/components/clearCartModal/index.js +80 -0
  236. package/lib/components/booking/components/clearCartModal/index.less +109 -0
  237. package/lib/components/booking/components/customSelect/index.js +1 -0
  238. package/lib/components/booking/components/customiseItemModal/index.js +279 -0
  239. package/lib/components/booking/components/customiseItemModal/index.less +606 -0
  240. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  241. package/lib/components/booking/components/footer/amount.js +5 -3
  242. package/lib/components/booking/components/footer/index.js +93 -23
  243. package/lib/components/booking/components/footer/utils.js +38 -13
  244. package/lib/components/booking/components/tabPane/index.js +78 -4
  245. package/lib/components/booking/components/tabPane/index.less +75 -1
  246. package/lib/components/booking/components/voucher/index.js +18 -7
  247. package/lib/components/booking/components/voucher/index.less +1 -1
  248. package/lib/components/booking/dashboard/index.js +7 -2
  249. package/lib/components/booking/hooks/useClearCart.js +16 -13
  250. package/lib/components/booking/hooks/useQuotation.js +3 -1
  251. package/lib/components/booking/info/client/index.js +5 -4
  252. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  253. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  254. package/lib/components/booking/info/hooks/useInfoHolder.js +16 -9
  255. package/lib/components/booking/info/index.less +18 -2
  256. package/lib/components/booking/info/main.js +12 -5
  257. package/lib/components/booking/info/service/Lists.js +41 -25
  258. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  259. package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
  260. package/lib/components/booking/info/service/editService/constants.js +31 -0
  261. package/lib/components/booking/info/service/editService/index.js +7 -1
  262. package/lib/components/booking/info/service/serviceItem/index.js +2 -2
  263. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  264. package/lib/components/booking/info/service2/utils.d.ts +4 -0
  265. package/lib/components/booking/info/service2/utils.js +31 -19
  266. package/lib/components/booking/info2/cartClientCard/index.js +298 -0
  267. package/lib/components/booking/info2/cartClientCard/index.less +6 -0
  268. package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
  269. package/lib/components/booking/info2/cartClientCard/types.js +17 -0
  270. package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
  271. package/lib/components/booking/info2/index.js +30 -9
  272. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  273. package/lib/components/booking/info2/service/addTimeModal/index.js +4 -0
  274. package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
  275. package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
  276. package/lib/components/booking/info2/service/editService/index.js +139 -74
  277. package/lib/components/booking/info2/service/index.js +16 -12
  278. package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
  279. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
  280. package/lib/components/booking/info2/utilsByBooking.js +23 -4
  281. package/lib/components/booking/locales.js +93 -3
  282. package/lib/components/booking/materiels/duration/index.js +7 -2
  283. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  284. package/lib/components/booking/notes/addNote/index.js +41 -23
  285. package/lib/components/booking/notes/addNote/index.less +53 -0
  286. package/lib/components/eftposPay/amount.d.ts +1 -1
  287. package/lib/components/eftposPay/device.d.ts +1 -1
  288. package/lib/components/eftposPay/hooks.d.ts +2 -2
  289. package/lib/components/eftposPay/store/index.d.ts +3 -3
  290. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  291. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  292. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  293. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  294. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  295. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  296. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  297. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  298. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  299. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  300. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  301. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  302. package/lib/components/schedules/utils.js +1 -1
  303. package/lib/components/shoppingCart/components/Cart/Product.js +42 -21
  304. package/lib/components/shoppingCart/components/Cart/index.js +18 -15
  305. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  306. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  307. package/lib/components/subTotal/index.less +1 -1
  308. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +176 -248
  309. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
  310. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
  311. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
  312. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
  313. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
  314. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
  315. package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
  316. package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
  317. package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
  318. package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
  319. package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
  320. package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
  321. package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
  322. package/lib/components/ticketBooking/components/ticketBooking/index.js +228 -80
  323. package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
  324. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  325. package/lib/components/ticketBooking/components/timeBar/index.js +100 -86
  326. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
  327. package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
  328. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
  329. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
  330. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
  331. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
  332. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
  333. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
  334. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
  335. package/lib/components/ticketBooking/index.js +31 -4
  336. package/lib/components/ticketBooking/locales.js +6 -3
  337. package/lib/components/ticketBooking/serve.js +11 -11
  338. package/lib/components/ticketBooking/utils/index.d.ts +39 -2
  339. package/lib/components/ticketBooking/utils/index.js +71 -10
  340. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  341. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  342. package/lib/hooks/useToast.js +42 -0
  343. package/lib/hooks/useTranslationOriginal.js +42 -0
  344. package/lib/index.js +12 -0
  345. package/lib/plus/clientCard/index.js +442 -0
  346. package/lib/plus/clientCard/index.less +539 -0
  347. package/lib/plus/clientCard/line/index.js +153 -0
  348. package/lib/plus/clientCard/line/index.less +142 -0
  349. package/lib/plus/clientCard/locales.js +41 -0
  350. package/lib/plus/clientCard/types.js +17 -0
  351. package/lib/plus/clientCard/utils.js +75 -0
  352. package/lib/plus/clientName/index.js +53 -0
  353. package/lib/plus/clientName/index.less +10 -0
  354. package/lib/plus/clientName/type.js +17 -0
  355. package/lib/plus/clientName/utils.js +43 -0
  356. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  357. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  358. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  359. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  360. package/lib/plus/clinetSearch/Add/index.js +243 -0
  361. package/lib/plus/clinetSearch/Add/index.less +30 -0
  362. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  363. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  364. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  365. package/lib/plus/clinetSearch/index.js +205 -0
  366. package/lib/plus/clinetSearch/index.less +91 -0
  367. package/lib/plus/clinetSearch/locales.js +125 -0
  368. package/lib/plus/clinetSearch/serve.js +33 -0
  369. package/lib/plus/clinetSearch/types.js +17 -0
  370. package/lib/plus/noteModal/AddTempModal.js +95 -0
  371. package/lib/plus/noteModal/index.js +199 -0
  372. package/lib/plus/noteModal/index.less +168 -0
  373. package/lib/plus/noteModal/locales.js +56 -0
  374. package/lib/plus/noteModal/types.js +17 -0
  375. package/lib/pro/comprehensiveSearch/camera.svg +4 -0
  376. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
  377. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
  378. package/lib/pro/comprehensiveSearch/index.js +259 -0
  379. package/lib/pro/comprehensiveSearch/index.less +323 -0
  380. package/lib/pro/comprehensiveSearch/locales.js +41 -0
  381. package/lib/pro/comprehensiveSearch/types.js +17 -0
  382. package/lib/pro/numberKeyboard/index.js +182 -0
  383. package/lib/pro/numberKeyboard/index.less +25 -0
  384. package/lib/pro/numberKeyboard/locales.js +35 -0
  385. package/lib/pro/pisellNumberSelector/example.js +93 -0
  386. package/lib/pro/pisellNumberSelector/index.js +260 -0
  387. package/lib/pro/pisellNumberSelector/index.less +193 -0
  388. package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
  389. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  390. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  391. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
  392. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
  393. package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
  394. package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
  395. package/lib/pro/pisellPriceRadio/index.js +130 -0
  396. package/lib/pro/pisellPriceRadio/index.less +158 -0
  397. package/lib/pro/skuDetailModal/index.js +311 -0
  398. package/lib/pro/skuDetailModal/index.less +236 -0
  399. package/lib/pro/skuDetailModal/locales.js +71 -0
  400. package/lib/pro/skuDetailModal/types.js +17 -0
  401. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  402. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  403. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  404. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  405. package/lowcode/client-card/meta.ts +337 -0
  406. package/lowcode/comprehensive-search/meta.ts +261 -0
  407. package/package.json +26 -26
  408. package/es/components/Sales/Cart/index.d.ts +0 -53
  409. package/es/components/booking/addons/index.d.ts +0 -17
  410. package/es/components/booking/components/tabPane/index.d.ts +0 -4
  411. package/es/components/booking/components/voucher/index.d.ts +0 -3
  412. package/es/components/booking/dashboard/index.d.ts +0 -20
  413. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -3
  414. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -3
  415. package/es/components/booking/locales.d.ts +0 -828
  416. package/es/components/booking/notes/addNote/index.d.ts +0 -3
  417. package/es/components/shoppingCart/type.d.ts +0 -48
  418. package/es/components/ticketBooking/locales.d.ts +0 -174
  419. package/es/components/ticketBooking/serve.d.ts +0 -287
  420. package/es/index.d.ts +0 -47
  421. package/lib/components/Sales/Cart/index.d.ts +0 -53
  422. package/lib/components/booking/addons/index.d.ts +0 -17
  423. package/lib/components/booking/components/tabPane/index.d.ts +0 -4
  424. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  425. package/lib/components/booking/dashboard/index.d.ts +0 -20
  426. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -3
  427. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -3
  428. package/lib/components/booking/locales.d.ts +0 -828
  429. package/lib/components/booking/notes/addNote/index.d.ts +0 -3
  430. package/lib/components/shoppingCart/type.d.ts +0 -48
  431. package/lib/components/ticketBooking/locales.d.ts +0 -174
  432. package/lib/components/ticketBooking/serve.d.ts +0 -287
  433. package/lib/index.d.ts +0 -47
@@ -0,0 +1,142 @@
1
+ // Line类型特有样式 - 行内布局
2
+ .pisell-client-card--line {
3
+ padding: 8px 12px;
4
+ border: 1px solid #e5e7eb;
5
+ border-radius: 6px;
6
+ background: #ffffff;
7
+
8
+ // 内容容器 - 水平布局
9
+ .pisell-client-card__content {
10
+ display: flex;
11
+ align-items: center;
12
+ gap: 12px;
13
+ width: 100%;
14
+ min-width: 0; // 允许flex子元素收缩
15
+ }
16
+
17
+ // 插槽容器
18
+ .pisell-client-card__slot-left {
19
+ display: flex;
20
+ align-items: center;
21
+ flex-shrink: 0;
22
+ }
23
+
24
+ .pisell-client-card__slot-right {
25
+ display: flex;
26
+ align-items: center;
27
+ flex-shrink: 0;
28
+ }
29
+
30
+ // 头像样式
31
+ .pisell-client-card__avatar-wrapper {
32
+ position: relative;
33
+ flex-shrink: 0; // 头像不收缩
34
+ }
35
+
36
+ .pisell-client-card__avatar {
37
+ border: 1px solid #e5e7eb;
38
+
39
+ .ant-avatar-string {
40
+ font-weight: 600;
41
+ font-size: 12px;
42
+ }
43
+ }
44
+
45
+ // 状态指示器
46
+ .pisell-client-card__status-indicator {
47
+ position: absolute;
48
+ top: -2px;
49
+ right: -2px;
50
+ width: 8px;
51
+ height: 8px;
52
+ border-radius: 50%;
53
+ border: 2px solid #ffffff;
54
+ background-color: #17B26A;
55
+ }
56
+
57
+ // 客户名称样式
58
+ .pisell-client-card__name--line {
59
+ font-size: 14px;
60
+ font-weight: 500;
61
+ color: #1f2937;
62
+ white-space: nowrap;
63
+ overflow: hidden;
64
+ text-overflow: ellipsis;
65
+ flex-shrink: 1;
66
+ min-width: 0;
67
+ }
68
+
69
+ // 联系方式样式
70
+ .pisell-client-card__contact--line {
71
+ font-size: 13px;
72
+ color: #6b7280;
73
+ white-space: nowrap;
74
+ overflow: hidden;
75
+ text-overflow: ellipsis;
76
+ flex-shrink: 1;
77
+ min-width: 0;
78
+ }
79
+
80
+ // 标签容器样式
81
+ .pisell-client-card__tags--line {
82
+ display: flex;
83
+ gap: 6px;
84
+ flex-shrink: 0; // 标签不收缩
85
+ align-items: center;
86
+
87
+ .pisell-client-card__tag {
88
+ white-space: nowrap;
89
+ }
90
+ }
91
+
92
+ // 垂直布局样式
93
+ &.pisell-client-card--vertical {
94
+ .pisell-client-card__content {
95
+ flex-direction: column;
96
+ align-items: center;
97
+ text-align: center;
98
+ gap: 16px;
99
+ }
100
+
101
+ .pisell-client-card__name--line {
102
+ text-align: center;
103
+ }
104
+
105
+ .pisell-client-card__contact--line {
106
+ text-align: center;
107
+ }
108
+
109
+ .pisell-client-card__tags--line {
110
+ justify-content: center;
111
+ flex-wrap: wrap;
112
+ }
113
+ }
114
+
115
+ // Line类型空状态样式
116
+ &.pisell-client-card--empty {
117
+ cursor: pointer;
118
+ justify-content: center;
119
+ align-items: center;
120
+ border-style: dashed;
121
+ border-color: #d9d9d9;
122
+ background: #fafafa;
123
+
124
+ &:hover {
125
+ border-color: #1890ff;
126
+ background: #f0f8ff;
127
+ }
128
+
129
+ .pisell-client-card__empty-title {
130
+ font-size: 14px;
131
+ font-weight: 600;
132
+ color: #374151;
133
+ margin: 0;
134
+ }
135
+
136
+ .pisell-client-card__empty-subtitle {
137
+ font-size: 12px;
138
+ color: #6b7280;
139
+ margin: 0;
140
+ }
141
+ }
142
+ }
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/plus/clientCard/locales.ts
20
+ var locales_exports = {};
21
+ __export(locales_exports, {
22
+ default: () => locales_default
23
+ });
24
+ module.exports = __toCommonJS(locales_exports);
25
+ var locales_default = {
26
+ en: {
27
+ "pisell2.text.add-client": "Add client",
28
+ "pisell2.text.change-client": "Change Client",
29
+ "pisell2.text.remove-client": " Remove Client"
30
+ },
31
+ "zh-CN": {
32
+ "pisell2.text.add-client": "添加客户",
33
+ "pisell2.text.change-client": "更换客户",
34
+ "pisell2.text.remove-client": "移除客戶"
35
+ },
36
+ "zh-HK": {
37
+ "pisell2.text.add-client": "新增客戶",
38
+ "pisell2.text.change-client": "更換客戶",
39
+ "pisell2.text.remove-client": "移除客户"
40
+ }
41
+ };
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/plus/clientCard/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,75 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/plus/clientCard/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ getAvatarText: () => getAvatarText,
23
+ getFieldValue: () => getFieldValue,
24
+ isWalkIn: () => isWalkIn
25
+ });
26
+ module.exports = __toCommonJS(utils_exports);
27
+ var import_lodash = require("lodash");
28
+ function getFieldValue(data, fieldKey, mapping) {
29
+ if (!fieldKey || typeof fieldKey !== "string") {
30
+ console.warn("getFieldValue: fieldKey must be a non-empty string");
31
+ return void 0;
32
+ }
33
+ if (!data || typeof data !== "object") {
34
+ console.warn("getFieldValue: data must be a valid object");
35
+ return void 0;
36
+ }
37
+ const fieldMapping = mapping || {};
38
+ const mappingRule = fieldMapping[fieldKey];
39
+ try {
40
+ if (typeof mappingRule === "function") {
41
+ return mappingRule(data);
42
+ }
43
+ if (typeof mappingRule === "string") {
44
+ return (0, import_lodash.get)(data, mappingRule);
45
+ }
46
+ return (0, import_lodash.get)(data, fieldKey);
47
+ } catch (error) {
48
+ console.error(
49
+ `getFieldValue: Error processing field '${fieldKey}':`,
50
+ error
51
+ );
52
+ return void 0;
53
+ }
54
+ }
55
+ var getAvatarText = (name) => {
56
+ if (!name) return "";
57
+ const words = name.trim().split(/\s+/);
58
+ const initials = words.slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
59
+ return initials;
60
+ };
61
+ var isWalkIn = (customer_id) => {
62
+ if (customer_id === void 0) {
63
+ return true;
64
+ }
65
+ if (typeof customer_id === "string") {
66
+ return ["", "0", "1"].includes(customer_id);
67
+ }
68
+ return [0, 1].includes(customer_id);
69
+ };
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ getAvatarText,
73
+ getFieldValue,
74
+ isWalkIn
75
+ });
@@ -0,0 +1,53 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/plus/clientName/index.tsx
30
+ var clientName_exports = {};
31
+ __export(clientName_exports, {
32
+ default: () => clientName_default
33
+ });
34
+ module.exports = __toCommonJS(clientName_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_index = require("./index.less");
38
+ var import_utils = require("./utils");
39
+ var ClientName = ({ className, dataSource, style }) => {
40
+ const name = (0, import_react.useMemo)(() => {
41
+ return (0, import_utils.getClientName)(dataSource);
42
+ }, [dataSource]);
43
+ if (!dataSource) return null;
44
+ return /* @__PURE__ */ import_react.default.createElement(
45
+ "div",
46
+ {
47
+ className: (0, import_classnames.default)("pisell-client-name", className),
48
+ style: style || {}
49
+ },
50
+ name
51
+ );
52
+ };
53
+ var clientName_default = ClientName;
@@ -0,0 +1,10 @@
1
+ .pisell-client-name {
2
+ color: var(--Base-Black, #000);
3
+ font-size: 16px;
4
+ font-style: normal;
5
+ font-weight: 600;
6
+ line-height: 20px;
7
+ white-space: nowrap;
8
+ overflow: hidden;
9
+ text-overflow: ellipsis;
10
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/plus/clientName/type.ts
16
+ var type_exports = {};
17
+ module.exports = __toCommonJS(type_exports);
@@ -0,0 +1,43 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/plus/clientName/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ getClientName: () => getClientName
23
+ });
24
+ module.exports = __toCommonJS(utils_exports);
25
+ var getClientName = (dataSource) => {
26
+ if (!dataSource || typeof dataSource === "string") {
27
+ return dataSource;
28
+ }
29
+ const { first_name, last_name, display_name, nickname } = dataSource;
30
+ let finalName = "";
31
+ if (display_name) {
32
+ finalName = display_name;
33
+ } else if (nickname) {
34
+ finalName = nickname;
35
+ } else if (first_name || last_name) {
36
+ finalName = `${first_name} ${last_name}`.trim();
37
+ }
38
+ return finalName;
39
+ };
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ getClientName
43
+ });
@@ -0,0 +1,256 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/plus/clinetSearch/Add/BirthdayField/index.tsx
30
+ var BirthdayField_exports = {};
31
+ __export(BirthdayField_exports, {
32
+ default: () => BirthdayField_default
33
+ });
34
+ module.exports = __toCommonJS(BirthdayField_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_debounce = __toESM(require("lodash/debounce"));
38
+ var import_dayjs = __toESM(require("dayjs"));
39
+ var import_utils = require("@pisell/utils");
40
+ var { Option } = import_antd.Select;
41
+ var getSelectInput = (id) => {
42
+ const input = document.getElementById(id);
43
+ if (input) {
44
+ return input;
45
+ }
46
+ };
47
+ var setSelectInputType = ({
48
+ input,
49
+ type
50
+ }) => {
51
+ if (input) {
52
+ input.type = type;
53
+ }
54
+ };
55
+ var DateSectionCom = ({
56
+ value,
57
+ onChange,
58
+ showTime,
59
+ className = "",
60
+ style = {},
61
+ useSpace = true,
62
+ format,
63
+ itemStyle = {
64
+ width: 100
65
+ }
66
+ }) => {
67
+ const currentYear = (0, import_dayjs.default)().year();
68
+ const locale = import_utils.locales.locale;
69
+ const dayRef = (0, import_react.useRef)(null);
70
+ const monthRef = (0, import_react.useRef)(null);
71
+ const yearRef = (0, import_react.useRef)(null);
72
+ const [date, setDate] = (0, import_react.useState)({
73
+ year: value ? (0, import_dayjs.default)(value).year() : null,
74
+ month: value ? (0, import_dayjs.default)(value).month() + 1 : null,
75
+ day: value ? (0, import_dayjs.default)(value).date() : null
76
+ });
77
+ const [dayOptions, setDayOptions] = (0, import_react.useState)([]);
78
+ const [monthOptions, setMonthOptions] = (0, import_react.useState)([]);
79
+ const [yearOptions, setYearOptions] = (0, import_react.useState)([]);
80
+ const localeMap = {
81
+ year: import_utils.locales.getText("pisell2.text.date-year-text"),
82
+ month: import_utils.locales.getText("pisell2.text.date-month-text"),
83
+ day: import_utils.locales.getText("pisell2.text.date-day-text")
84
+ };
85
+ (0, import_react.useEffect)(() => {
86
+ setDate({
87
+ year: value ? (0, import_dayjs.default)(value).year() : null,
88
+ month: value ? (0, import_dayjs.default)(value).month() + 1 : null,
89
+ day: value ? (0, import_dayjs.default)(value).date() : null
90
+ });
91
+ }, [value]);
92
+ (0, import_react.useEffect)(() => {
93
+ setMonthOptions(renderOptions("month", 1, 12));
94
+ setYearOptions(renderOptions("year", currentYear - 100, currentYear + 50));
95
+ }, []);
96
+ (0, import_react.useEffect)(() => {
97
+ setDayOptions(
98
+ renderOptions(
99
+ "day",
100
+ 1,
101
+ date.month ? getDaysInMonth(date.year || currentYear, date.month) : 31
102
+ )
103
+ );
104
+ }, [date.month, date.year]);
105
+ const handleDateChange = (field, value2) => {
106
+ if (!value2) {
107
+ return;
108
+ }
109
+ let newDate = {
110
+ year: date.year,
111
+ month: date.month,
112
+ day: date.day,
113
+ [field]: value2
114
+ };
115
+ const foucsList = {
116
+ day: monthRef,
117
+ month: yearRef
118
+ };
119
+ if (field === "month" || field === "year") {
120
+ const daysInMonth = getDaysInMonth(
121
+ (newDate == null ? void 0 : newDate.year) || currentYear,
122
+ newDate == null ? void 0 : newDate.month
123
+ );
124
+ const newDay = (newDate == null ? void 0 : newDate.day) > daysInMonth ? daysInMonth : newDate.day;
125
+ newDate = {
126
+ ...newDate,
127
+ day: newDay
128
+ };
129
+ }
130
+ setDate(newDate);
131
+ if (foucsList[field]) {
132
+ foucsList[field].current.focus();
133
+ } else {
134
+ yearRef.current.blur();
135
+ }
136
+ const _format = format || "YYYY-MM-DD";
137
+ if (newDate.year && newDate.month && newDate.day) {
138
+ const _date = `${newDate.year}-${newDate.month.toString().padStart(2, "0")}-${newDate.day.toString().padStart(2, "0")}`;
139
+ onChange((0, import_dayjs.default)(_date).format(_format));
140
+ }
141
+ };
142
+ const getDaysInMonth = (year, month) => {
143
+ return (0, import_dayjs.default)(`${year}-${month}`, "YYYY-MM").daysInMonth();
144
+ };
145
+ const renderOptions = (field, start, end) => {
146
+ const options = [];
147
+ const _text = locale !== "en-US" && locale !== "en" ? localeMap[field] : "";
148
+ for (let i = start; i <= end; i++) {
149
+ options.push({
150
+ label: `${i}${_text}`,
151
+ value: i
152
+ });
153
+ }
154
+ return options;
155
+ };
156
+ const selectId = (0, import_react.useMemo)(() => {
157
+ return {
158
+ dayId: (0, import_utils.getUniqueId)("day"),
159
+ monthId: (0, import_utils.getUniqueId)("month"),
160
+ yearId: (0, import_utils.getUniqueId)("year")
161
+ };
162
+ }, []);
163
+ (0, import_react.useLayoutEffect)(() => {
164
+ setSelectInputType({
165
+ input: getSelectInput(selectId.dayId),
166
+ type: "number"
167
+ });
168
+ setSelectInputType({
169
+ input: getSelectInput(selectId.monthId),
170
+ type: "number"
171
+ });
172
+ setSelectInputType({
173
+ input: getSelectInput(selectId.yearId),
174
+ type: "number"
175
+ });
176
+ }, [selectId]);
177
+ const handleDateSearch = (0, import_react.useCallback)(
178
+ (0, import_debounce.default)((field, value2) => {
179
+ const dateOption = {
180
+ day: dayOptions,
181
+ month: monthOptions,
182
+ year: yearOptions
183
+ };
184
+ const _value = Number(value2);
185
+ const index = dateOption[field].findIndex((item) => {
186
+ return item.value === _value;
187
+ });
188
+ if (index !== -1) {
189
+ handleDateChange(field, _value);
190
+ } else {
191
+ handleDateChange(field, null);
192
+ }
193
+ }, 300),
194
+ [dayOptions, monthOptions, yearOptions, date]
195
+ );
196
+ const content = /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
197
+ import_antd.Select,
198
+ {
199
+ id: selectId.dayId,
200
+ value: date.day,
201
+ placeholder: import_utils.locales.getText("pisell2.text.date-day-text"),
202
+ onChange: (value2) => handleDateChange("day", value2),
203
+ style: itemStyle,
204
+ showSearch: true,
205
+ onSearch: (value2) => {
206
+ handleDateSearch("day", value2);
207
+ },
208
+ ref: dayRef,
209
+ size: "large"
210
+ },
211
+ dayOptions.map((item) => {
212
+ return /* @__PURE__ */ import_react.default.createElement(Option, { key: item.value, value: item.value }, item.label);
213
+ })
214
+ ), /* @__PURE__ */ import_react.default.createElement(
215
+ import_antd.Select,
216
+ {
217
+ id: selectId.monthId,
218
+ value: date.month,
219
+ placeholder: import_utils.locales.getText("pisell2.text.date-month-text"),
220
+ onChange: (value2) => handleDateChange("month", value2),
221
+ style: itemStyle,
222
+ showSearch: true,
223
+ onSearch: (value2) => {
224
+ handleDateSearch("month", value2);
225
+ },
226
+ ref: monthRef,
227
+ size: "large"
228
+ },
229
+ monthOptions.map((item) => {
230
+ return /* @__PURE__ */ import_react.default.createElement(Option, { key: item.value, value: item.value }, item.label);
231
+ })
232
+ ), /* @__PURE__ */ import_react.default.createElement(
233
+ import_antd.Select,
234
+ {
235
+ id: selectId.yearId,
236
+ value: date.year,
237
+ placeholder: import_utils.locales.getText("pisell2.text.date-year-text"),
238
+ onChange: (value2) => handleDateChange("year", value2),
239
+ style: itemStyle,
240
+ showSearch: true,
241
+ onSearch: (value2) => {
242
+ handleDateSearch("year", value2);
243
+ },
244
+ ref: yearRef,
245
+ size: "large"
246
+ },
247
+ yearOptions.map((item) => {
248
+ return /* @__PURE__ */ import_react.default.createElement(Option, { key: item.value, value: item.value }, item.label);
249
+ })
250
+ ));
251
+ if (useSpace) {
252
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: className || "", style: style || {} }, content);
253
+ }
254
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: className || "", style: style || {} }, content);
255
+ };
256
+ var BirthdayField_default = DateSectionCom;