@pisell/private-materials 6.3.87 → 6.3.89

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 (513) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
  15. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  16. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  17. package/es/components/booking/forms/footer.d.ts +0 -1
  18. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  19. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  20. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  21. package/es/components/booking/info/date/index.d.ts +1 -0
  22. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  23. package/es/components/booking/info/service/like/index.d.ts +1 -0
  24. package/es/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
  25. package/es/components/ecocup/components/AddCustomerModal/index.js +216 -0
  26. package/es/components/ecocup/components/AddCustomerModal/index.less +9 -0
  27. package/es/components/ecocup/components/CupActionList/index.d.ts +13 -0
  28. package/es/components/ecocup/components/CupActionList/index.js +91 -0
  29. package/es/components/ecocup/components/CupActionList/index.less +102 -0
  30. package/es/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
  31. package/es/components/ecocup/components/CupActionModal/hooks.js +68 -0
  32. package/es/components/ecocup/components/CupActionModal/index.d.ts +14 -0
  33. package/es/components/ecocup/components/CupActionModal/index.js +92 -0
  34. package/es/components/ecocup/components/CupActionModal/index.less +38 -0
  35. package/es/components/ecocup/components/CupInfoCard/index.d.ts +7 -0
  36. package/es/components/ecocup/components/CupInfoCard/index.js +12 -0
  37. package/es/components/ecocup/components/CupInfoCard/index.less +11 -0
  38. package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
  39. package/es/components/ecocup/components/CupStatusModal/hooks.js +68 -0
  40. package/es/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
  41. package/es/components/ecocup/components/CupStatusModal/index.js +147 -0
  42. package/es/components/ecocup/components/CupStatusModal/index.less +35 -0
  43. package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
  44. package/es/components/ecocup/components/CustomerAndCupModal/hooks.js +133 -0
  45. package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
  46. package/es/components/ecocup/components/CustomerAndCupModal/index.js +227 -0
  47. package/es/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
  48. package/es/components/ecocup/components/CustomerCard/index.d.ts +6 -0
  49. package/es/components/ecocup/components/CustomerCard/index.js +34 -0
  50. package/es/components/ecocup/components/CustomerCard/index.less +50 -0
  51. package/es/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
  52. package/es/components/ecocup/components/MoreDropdown/index.js +33 -0
  53. package/es/components/ecocup/components/PageHeader/index.d.ts +6 -0
  54. package/es/components/ecocup/components/PageHeader/index.js +37 -0
  55. package/es/components/ecocup/components/PageHeader/index.less +19 -0
  56. package/es/components/ecocup/components/SearchBar/const.d.ts +4 -0
  57. package/es/components/ecocup/components/SearchBar/const.js +16 -0
  58. package/es/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
  59. package/es/components/ecocup/components/SearchBar/hooks.js +184 -0
  60. package/es/components/ecocup/components/SearchBar/index.d.ts +12 -0
  61. package/es/components/ecocup/components/SearchBar/index.js +218 -0
  62. package/es/components/ecocup/components/SearchBar/index.less +88 -0
  63. package/es/components/ecocup/cupList/const.d.ts +133 -0
  64. package/es/components/ecocup/cupList/const.js +306 -0
  65. package/es/components/ecocup/cupList/hooks/index.d.ts +4 -0
  66. package/es/components/ecocup/cupList/hooks/index.js +4 -0
  67. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
  68. package/es/components/ecocup/cupList/hooks/useColumns.js +168 -0
  69. package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
  70. package/es/components/ecocup/cupList/hooks/useCupApi.js +172 -0
  71. package/es/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
  72. package/es/components/ecocup/cupList/hooks/useSummary.js +40 -0
  73. package/es/components/ecocup/cupList/index.d.ts +6 -0
  74. package/es/components/ecocup/cupList/index.js +220 -0
  75. package/es/components/ecocup/cupList/index.less +113 -0
  76. package/es/components/ecocup/cupProject/const.d.ts +7 -0
  77. package/es/components/ecocup/cupProject/const.js +27 -0
  78. package/es/components/ecocup/cupProject/index.d.ts +3 -0
  79. package/es/components/ecocup/cupProject/index.js +103 -0
  80. package/es/components/ecocup/cupProject/index.less +41 -0
  81. package/es/components/ecocup/customerList/const.d.ts +44 -0
  82. package/es/components/ecocup/customerList/const.js +67 -0
  83. package/es/components/ecocup/customerList/hooks/index.d.ts +3 -0
  84. package/es/components/ecocup/customerList/hooks/index.js +3 -0
  85. package/es/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
  86. package/es/components/ecocup/customerList/hooks/useColumns.js +44 -0
  87. package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
  88. package/es/components/ecocup/customerList/hooks/useCustomerApi.js +70 -0
  89. package/es/components/ecocup/customerList/index.d.ts +7 -0
  90. package/es/components/ecocup/customerList/index.js +127 -0
  91. package/es/components/ecocup/customerList/index.less +15 -0
  92. package/es/components/ecocup/hooks.d.ts +49 -0
  93. package/es/components/ecocup/hooks.js +151 -0
  94. package/es/components/ecocup/locales.d.ts +339 -0
  95. package/es/components/ecocup/locales.js +372 -0
  96. package/es/components/ecocup/types.d.ts +103 -0
  97. package/es/components/ecocup/types.js +36 -0
  98. package/es/components/ecocup/utils/scanListener.d.ts +20 -0
  99. package/es/components/ecocup/utils/scanListener.js +107 -0
  100. package/es/components/eftpos/const.d.ts +1 -3
  101. package/es/components/eftpos/const.js +0 -2
  102. package/es/components/eftpos/device.d.ts +1 -3
  103. package/es/components/eftpos/device.js +3 -5
  104. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  105. package/es/components/eftpos/form/index.d.ts +1 -0
  106. package/es/components/eftpos/group/index.d.ts +1 -0
  107. package/es/components/eftpos/hooks.d.ts +1 -0
  108. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  109. package/es/components/eftpos/icon/device.d.ts +1 -0
  110. package/es/components/eftpos/index.d.ts +1 -0
  111. package/es/components/eftpos/index.js +11 -34
  112. package/es/components/eftpos/index.less +1 -26
  113. package/es/components/eftpos/locales.d.ts +0 -3
  114. package/es/components/eftpos/locales.js +0 -3
  115. package/es/components/eftpos/receipt/index.d.ts +1 -0
  116. package/es/components/eftposPay/amount.d.ts +1 -0
  117. package/es/components/eftposPay/app.d.ts +1 -1
  118. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  119. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  120. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  121. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  122. package/es/components/eftposPay/const.d.ts +1 -6
  123. package/es/components/eftposPay/const.js +0 -2
  124. package/es/components/eftposPay/device.js +208 -36
  125. package/es/components/eftposPay/hooks.d.ts +1 -2
  126. package/es/components/eftposPay/hooks.js +0 -12
  127. package/es/components/eftposPay/linkly/index.js +0 -1
  128. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  129. package/es/components/eftposPay/manufacturer.js +0 -4
  130. package/es/components/eftposPay/pay.js +2 -7
  131. package/es/components/eftposPay/store/index.d.ts +1 -1
  132. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  133. package/es/components/eftposPay/windcave/windcave.js +9 -9
  134. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  135. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  136. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  137. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  138. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  139. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  140. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  141. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  142. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  143. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  144. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  145. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -1
  146. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  147. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  148. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  149. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  150. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  151. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  152. package/es/hooks/useEngineContext.d.ts +1 -0
  153. package/es/hooks/useEngineContext.js +7 -0
  154. package/es/index.d.ts +5 -1
  155. package/es/index.js +5 -1
  156. package/es/plus/clientName/index.d.ts +1 -0
  157. package/es/plus/orderList/components/BatchActionBar.d.ts +9 -0
  158. package/es/plus/orderList/components/BatchActionBar.js +835 -0
  159. package/es/plus/orderList/components/FilterList.d.ts +8 -0
  160. package/es/plus/orderList/components/FilterList.js +78 -0
  161. package/es/plus/orderList/components/HandleActions.d.ts +4 -0
  162. package/es/plus/orderList/components/HandleActions.js +24 -0
  163. package/es/plus/orderList/components/QuickFilter.d.ts +4 -0
  164. package/es/plus/orderList/components/QuickFilter.js +14 -0
  165. package/es/plus/orderList/components/Reset.d.ts +6 -0
  166. package/es/plus/orderList/components/Reset.js +23 -0
  167. package/es/plus/orderList/components/Toolbar.d.ts +5 -0
  168. package/es/plus/orderList/components/Toolbar.js +57 -0
  169. package/es/plus/orderList/config.d.ts +154 -0
  170. package/es/plus/orderList/config.js +786 -0
  171. package/es/plus/orderList/index.d.ts +9 -0
  172. package/es/plus/orderList/index.js +128 -0
  173. package/es/plus/orderList/index.less +125 -0
  174. package/es/plus/orderList/locales.d.ts +372 -0
  175. package/es/plus/orderList/locales.js +459 -0
  176. package/es/plus/orderList/serve.d.ts +42 -0
  177. package/es/plus/orderList/serve.js +351 -0
  178. package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
  179. package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
  180. package/es/plus/skuOptionsSelection/components/OptionsCard/index.less +2 -0
  181. package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
  182. package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
  183. package/es/plus/skuOptionsSelection/index.js +2 -2
  184. package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +9 -2
  185. package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +8 -4
  186. package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
  187. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
  188. package/es/pro/NumericStepper/index.d.ts +28 -3
  189. package/es/pro/NumericStepper/index.js +175 -107
  190. package/es/pro/NumericStepper/index.less +295 -143
  191. package/es/pro/Selector/Selector.js +33 -26
  192. package/es/pro/Selector/components/Card/index.js +2 -3
  193. package/es/pro/Selector/components/Card/index.less +11 -4
  194. package/es/pro/Selector/components/Indicator/index.d.ts +1 -0
  195. package/es/pro/Selector/components/Indicator/index.js +2 -1
  196. package/es/pro/Selector/components/Indicator/index.less +4 -1
  197. package/es/pro/Selector/components/LayoutContainer/index.d.ts +5 -3
  198. package/es/pro/Selector/components/LayoutContainer/index.js +226 -9
  199. package/es/pro/Selector/components/LayoutContainer/index.less +19 -0
  200. package/es/pro/Selector/demo.js +1 -1
  201. package/es/pro/Selector/hooks/usePresetItemProps.js +2 -0
  202. package/es/pro/Selector/hooks/usePresetProps.js +60 -6
  203. package/es/pro/Selector/selector.less +0 -64
  204. package/es/pro/Selector/types.d.ts +40 -0
  205. package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
  206. package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.js +54 -0
  207. package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
  208. package/es/pro/comprehensiveSearch/components/index.d.ts +2 -0
  209. package/es/pro/comprehensiveSearch/components/index.js +2 -0
  210. package/es/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
  211. package/es/pro/comprehensiveSearch/components/searchSection/index.js +140 -0
  212. package/es/pro/comprehensiveSearch/components/searchSection/index.less +100 -0
  213. package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
  214. package/es/pro/comprehensiveSearch/components/searchSection/locales.js +14 -0
  215. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
  216. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
  217. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
  218. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
  219. package/es/pro/comprehensiveSearch/index.d.ts +7 -0
  220. package/es/pro/comprehensiveSearch/index.js +207 -0
  221. package/es/pro/comprehensiveSearch/index.less +196 -0
  222. package/es/pro/comprehensiveSearch/locales.d.ts +15 -0
  223. package/es/pro/comprehensiveSearch/locales.js +14 -0
  224. package/es/pro/comprehensiveSearch/types.d.ts +32 -0
  225. package/es/pro/comprehensiveSearch/types.js +1 -0
  226. package/es/pro/keyboards/index.d.ts +2 -0
  227. package/es/pro/keyboards/index.js +1 -0
  228. package/es/pro/keyboards/locales.d.ts +24 -0
  229. package/es/pro/keyboards/locales.js +35 -0
  230. package/es/pro/keyboards/numberKeyboard/index.d.ts +16 -0
  231. package/es/pro/keyboards/numberKeyboard/index.js +523 -0
  232. package/es/pro/keyboards/numberKeyboard/index.less +59 -0
  233. package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
  234. package/es/pro/keyboards/numberKeyboard/types.js +1 -0
  235. package/es/pro/pisellPaymentList/example.d.ts +1 -0
  236. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  237. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  238. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  239. package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
  240. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  241. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  242. package/lib/components/booking/forms/footer.d.ts +0 -1
  243. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  244. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  245. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  246. package/lib/components/booking/info/date/index.d.ts +1 -0
  247. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  248. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  249. package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
  250. package/lib/components/ecocup/components/AddCustomerModal/index.js +212 -0
  251. package/lib/components/ecocup/components/AddCustomerModal/index.less +9 -0
  252. package/lib/components/ecocup/components/CupActionList/index.d.ts +13 -0
  253. package/lib/components/ecocup/components/CupActionList/index.js +116 -0
  254. package/lib/components/ecocup/components/CupActionList/index.less +102 -0
  255. package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
  256. package/lib/components/ecocup/components/CupActionModal/hooks.js +55 -0
  257. package/lib/components/ecocup/components/CupActionModal/index.d.ts +14 -0
  258. package/lib/components/ecocup/components/CupActionModal/index.js +125 -0
  259. package/lib/components/ecocup/components/CupActionModal/index.less +38 -0
  260. package/lib/components/ecocup/components/CupInfoCard/index.d.ts +7 -0
  261. package/lib/components/ecocup/components/CupInfoCard/index.js +43 -0
  262. package/lib/components/ecocup/components/CupInfoCard/index.less +11 -0
  263. package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
  264. package/lib/components/ecocup/components/CupStatusModal/hooks.js +55 -0
  265. package/lib/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
  266. package/lib/components/ecocup/components/CupStatusModal/index.js +140 -0
  267. package/lib/components/ecocup/components/CupStatusModal/index.less +35 -0
  268. package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
  269. package/lib/components/ecocup/components/CustomerAndCupModal/hooks.js +89 -0
  270. package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
  271. package/lib/components/ecocup/components/CustomerAndCupModal/index.js +178 -0
  272. package/lib/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
  273. package/lib/components/ecocup/components/CustomerCard/index.d.ts +6 -0
  274. package/lib/components/ecocup/components/CustomerCard/index.js +48 -0
  275. package/lib/components/ecocup/components/CustomerCard/index.less +50 -0
  276. package/lib/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
  277. package/lib/components/ecocup/components/MoreDropdown/index.js +68 -0
  278. package/lib/components/ecocup/components/PageHeader/index.d.ts +6 -0
  279. package/lib/components/ecocup/components/PageHeader/index.js +59 -0
  280. package/lib/components/ecocup/components/PageHeader/index.less +19 -0
  281. package/lib/components/ecocup/components/SearchBar/const.d.ts +4 -0
  282. package/lib/components/{eftposPay/mx51/types.js → ecocup/components/SearchBar/const.js} +28 -17
  283. package/lib/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
  284. package/lib/components/ecocup/components/SearchBar/hooks.js +135 -0
  285. package/lib/components/ecocup/components/SearchBar/index.d.ts +12 -0
  286. package/lib/components/ecocup/components/SearchBar/index.js +213 -0
  287. package/lib/components/ecocup/components/SearchBar/index.less +88 -0
  288. package/lib/components/ecocup/cupList/const.d.ts +133 -0
  289. package/lib/components/ecocup/cupList/const.js +326 -0
  290. package/lib/components/ecocup/cupList/hooks/index.d.ts +4 -0
  291. package/lib/components/ecocup/cupList/hooks/index.js +39 -0
  292. package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
  293. package/lib/components/ecocup/cupList/hooks/useColumns.js +202 -0
  294. package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
  295. package/lib/components/ecocup/cupList/hooks/useCupApi.js +112 -0
  296. package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
  297. package/lib/components/ecocup/cupList/hooks/useSummary.js +75 -0
  298. package/lib/components/ecocup/cupList/index.d.ts +6 -0
  299. package/lib/components/ecocup/cupList/index.js +208 -0
  300. package/lib/components/ecocup/cupList/index.less +113 -0
  301. package/lib/components/ecocup/cupProject/const.d.ts +7 -0
  302. package/lib/components/ecocup/cupProject/const.js +58 -0
  303. package/lib/components/ecocup/cupProject/index.d.ts +3 -0
  304. package/lib/components/ecocup/cupProject/index.js +126 -0
  305. package/lib/components/ecocup/cupProject/index.less +41 -0
  306. package/lib/components/ecocup/customerList/const.d.ts +44 -0
  307. package/lib/components/ecocup/customerList/const.js +93 -0
  308. package/lib/components/ecocup/customerList/hooks/index.d.ts +3 -0
  309. package/lib/components/{eftposPay/aggregatePayment → ecocup/customerList/hooks}/index.js +10 -10
  310. package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
  311. package/lib/components/ecocup/customerList/hooks/useColumns.js +89 -0
  312. package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
  313. package/lib/components/ecocup/customerList/hooks/useCustomerApi.js +56 -0
  314. package/lib/components/ecocup/customerList/index.d.ts +7 -0
  315. package/lib/components/ecocup/customerList/index.js +138 -0
  316. package/lib/components/ecocup/customerList/index.less +15 -0
  317. package/lib/components/ecocup/hooks.d.ts +49 -0
  318. package/lib/components/ecocup/hooks.js +155 -0
  319. package/lib/components/ecocup/locales.d.ts +339 -0
  320. package/lib/components/ecocup/locales.js +389 -0
  321. package/lib/components/ecocup/types.d.ts +103 -0
  322. package/lib/components/ecocup/types.js +57 -0
  323. package/lib/components/ecocup/utils/scanListener.d.ts +20 -0
  324. package/lib/components/ecocup/utils/scanListener.js +90 -0
  325. package/lib/components/eftpos/const.d.ts +1 -3
  326. package/lib/components/eftpos/const.js +0 -2
  327. package/lib/components/eftpos/device.d.ts +1 -3
  328. package/lib/components/eftpos/device.js +3 -3
  329. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  330. package/lib/components/eftpos/form/index.d.ts +1 -0
  331. package/lib/components/eftpos/group/index.d.ts +1 -0
  332. package/lib/components/eftpos/hooks.d.ts +1 -0
  333. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  334. package/lib/components/eftpos/icon/device.d.ts +1 -0
  335. package/lib/components/eftpos/index.d.ts +1 -0
  336. package/lib/components/eftpos/index.js +5 -20
  337. package/lib/components/eftpos/index.less +1 -26
  338. package/lib/components/eftpos/locales.d.ts +0 -3
  339. package/lib/components/eftpos/locales.js +0 -3
  340. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  341. package/lib/components/eftposPay/amount.d.ts +1 -0
  342. package/lib/components/eftposPay/app.d.ts +1 -1
  343. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  344. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  345. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  346. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  347. package/lib/components/eftposPay/const.d.ts +1 -6
  348. package/lib/components/eftposPay/const.js +0 -2
  349. package/lib/components/eftposPay/device.js +108 -23
  350. package/lib/components/eftposPay/hooks.d.ts +1 -2
  351. package/lib/components/eftposPay/hooks.js +0 -16
  352. package/lib/components/eftposPay/linkly/index.js +0 -1
  353. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  354. package/lib/components/eftposPay/manufacturer.js +0 -6
  355. package/lib/components/eftposPay/pay.js +2 -4
  356. package/lib/components/eftposPay/store/index.d.ts +1 -1
  357. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  358. package/lib/components/eftposPay/windcave/windcave.js +9 -9
  359. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  360. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  361. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  362. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  363. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  364. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  365. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  366. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  367. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  368. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  369. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
  370. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -1
  371. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  372. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  373. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  374. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  375. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  376. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  377. package/lib/hooks/useEngineContext.d.ts +1 -0
  378. package/lib/hooks/useEngineContext.js +10 -2
  379. package/lib/index.d.ts +5 -1
  380. package/lib/index.js +13 -1
  381. package/lib/plus/clientName/index.d.ts +1 -0
  382. package/lib/plus/orderList/components/BatchActionBar.d.ts +9 -0
  383. package/lib/plus/orderList/components/BatchActionBar.js +567 -0
  384. package/lib/plus/orderList/components/FilterList.d.ts +8 -0
  385. package/lib/plus/orderList/components/FilterList.js +121 -0
  386. package/lib/plus/orderList/components/HandleActions.d.ts +4 -0
  387. package/lib/plus/orderList/components/HandleActions.js +52 -0
  388. package/lib/plus/orderList/components/QuickFilter.d.ts +4 -0
  389. package/lib/plus/orderList/components/QuickFilter.js +43 -0
  390. package/lib/plus/orderList/components/Reset.d.ts +6 -0
  391. package/lib/plus/orderList/components/Reset.js +58 -0
  392. package/lib/plus/orderList/components/Toolbar.d.ts +5 -0
  393. package/lib/plus/orderList/components/Toolbar.js +68 -0
  394. package/lib/plus/orderList/config.d.ts +154 -0
  395. package/lib/plus/orderList/config.js +764 -0
  396. package/lib/plus/orderList/index.d.ts +9 -0
  397. package/lib/plus/orderList/index.js +132 -0
  398. package/lib/plus/orderList/index.less +125 -0
  399. package/lib/plus/orderList/locales.d.ts +372 -0
  400. package/lib/plus/orderList/locales.js +471 -0
  401. package/lib/plus/orderList/serve.d.ts +42 -0
  402. package/lib/plus/orderList/serve.js +177 -0
  403. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
  404. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
  405. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.less +2 -0
  406. package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
  407. package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
  408. package/lib/plus/skuOptionsSelection/index.js +2 -2
  409. package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +9 -2
  410. package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +7 -3
  411. package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
  412. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
  413. package/lib/pro/NumericStepper/index.d.ts +28 -3
  414. package/lib/pro/NumericStepper/index.js +176 -88
  415. package/lib/pro/NumericStepper/index.less +295 -143
  416. package/lib/pro/Selector/Selector.js +27 -16
  417. package/lib/pro/Selector/components/Card/index.js +9 -1
  418. package/lib/pro/Selector/components/Card/index.less +11 -4
  419. package/lib/pro/Selector/components/Indicator/index.d.ts +1 -0
  420. package/lib/pro/Selector/components/Indicator/index.js +1 -1
  421. package/lib/pro/Selector/components/Indicator/index.less +4 -1
  422. package/lib/pro/Selector/components/LayoutContainer/index.d.ts +5 -3
  423. package/lib/pro/Selector/components/LayoutContainer/index.js +130 -2
  424. package/lib/pro/Selector/components/LayoutContainer/index.less +19 -0
  425. package/lib/pro/Selector/demo.js +1 -1
  426. package/lib/pro/Selector/hooks/usePresetItemProps.js +2 -0
  427. package/lib/pro/Selector/hooks/usePresetProps.js +28 -6
  428. package/lib/pro/Selector/selector.less +0 -64
  429. package/lib/pro/Selector/types.d.ts +40 -0
  430. package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
  431. package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.js +64 -0
  432. package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
  433. package/lib/pro/comprehensiveSearch/components/index.d.ts +2 -0
  434. package/lib/pro/comprehensiveSearch/components/index.js +42 -0
  435. package/lib/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
  436. package/lib/pro/comprehensiveSearch/components/searchSection/index.js +153 -0
  437. package/lib/pro/comprehensiveSearch/components/searchSection/index.less +100 -0
  438. package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
  439. package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +38 -0
  440. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
  441. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
  442. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
  443. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
  444. package/lib/pro/comprehensiveSearch/index.d.ts +7 -0
  445. package/lib/pro/comprehensiveSearch/index.js +190 -0
  446. package/lib/pro/comprehensiveSearch/index.less +196 -0
  447. package/lib/pro/comprehensiveSearch/locales.d.ts +15 -0
  448. package/lib/pro/comprehensiveSearch/locales.js +38 -0
  449. package/lib/pro/comprehensiveSearch/types.d.ts +32 -0
  450. package/lib/pro/comprehensiveSearch/types.js +17 -0
  451. package/lib/pro/keyboards/index.d.ts +2 -0
  452. package/lib/pro/keyboards/index.js +39 -0
  453. package/lib/pro/keyboards/locales.d.ts +24 -0
  454. package/lib/pro/keyboards/locales.js +47 -0
  455. package/lib/pro/keyboards/numberKeyboard/index.d.ts +16 -0
  456. package/lib/pro/keyboards/numberKeyboard/index.js +400 -0
  457. package/lib/pro/keyboards/numberKeyboard/index.less +59 -0
  458. package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
  459. package/lib/pro/keyboards/numberKeyboard/types.js +17 -0
  460. package/lib/pro/pisellPaymentList/example.d.ts +1 -0
  461. package/lowcode/eco-cup-list/meta.ts +63 -0
  462. package/lowcode/eco-customer-list/meta.ts +63 -0
  463. package/lowcode/ecocup-cup-list/meta.ts +38 -0
  464. package/lowcode/ecocup-cup-project/meta.ts +35 -0
  465. package/lowcode/ecocup-customer-list/meta.ts +38 -0
  466. package/lowcode/order-list/meta.ts +87 -0
  467. package/package.json +4 -4
  468. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +0 -6
  469. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +0 -125
  470. package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
  471. package/es/components/eftposPay/aggregatePayment/index.js +0 -3
  472. package/es/components/eftposPay/aggregatePayment/mock.d.ts +0 -495
  473. package/es/components/eftposPay/aggregatePayment/mock.js +0 -567
  474. package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
  475. package/es/components/eftposPay/aggregatePayment/service.js +0 -70
  476. package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -96
  477. package/es/components/eftposPay/aggregatePayment/types.js +0 -61
  478. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
  479. package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -385
  480. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -132
  481. package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1127
  482. package/es/components/eftposPay/mx51/Action.d.ts +0 -6
  483. package/es/components/eftposPay/mx51/Action.js +0 -91
  484. package/es/components/eftposPay/mx51/const.d.ts +0 -5
  485. package/es/components/eftposPay/mx51/const.js +0 -69
  486. package/es/components/eftposPay/mx51/index.d.ts +0 -6
  487. package/es/components/eftposPay/mx51/index.js +0 -362
  488. package/es/components/eftposPay/mx51/types.d.ts +0 -136
  489. package/es/components/eftposPay/mx51/types.js +0 -29
  490. package/es/components/eftposPay/mx51/utils.d.ts +0 -10
  491. package/es/components/eftposPay/mx51/utils.js +0 -120
  492. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +0 -6
  493. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +0 -152
  494. package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
  495. package/lib/components/eftposPay/aggregatePayment/mock.d.ts +0 -495
  496. package/lib/components/eftposPay/aggregatePayment/mock.js +0 -679
  497. package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
  498. package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
  499. package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -96
  500. package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
  501. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
  502. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -302
  503. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -132
  504. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -746
  505. package/lib/components/eftposPay/mx51/Action.d.ts +0 -6
  506. package/lib/components/eftposPay/mx51/Action.js +0 -127
  507. package/lib/components/eftposPay/mx51/const.d.ts +0 -5
  508. package/lib/components/eftposPay/mx51/const.js +0 -85
  509. package/lib/components/eftposPay/mx51/index.d.ts +0 -6
  510. package/lib/components/eftposPay/mx51/index.js +0 -330
  511. package/lib/components/eftposPay/mx51/types.d.ts +0 -136
  512. package/lib/components/eftposPay/mx51/utils.d.ts +0 -10
  513. package/lib/components/eftposPay/mx51/utils.js +0 -114
@@ -0,0 +1,135 @@
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/components/ecocup/components/SearchBar/hooks.ts
20
+ var hooks_exports = {};
21
+ __export(hooks_exports, {
22
+ useCupScanStatus: () => useCupScanStatus,
23
+ useSearch: () => useSearch,
24
+ useSearchCup: () => useSearchCup,
25
+ useSearchCustomer: () => useSearchCustomer
26
+ });
27
+ module.exports = __toCommonJS(hooks_exports);
28
+ var import_react = require("react");
29
+ var import_utils = require("@pisell/utils");
30
+ var import_hooks = require("../../hooks");
31
+ var import_types = require("../../types");
32
+ var import_hooks2 = require("../../hooks");
33
+ var useSearchCustomer = () => {
34
+ const { get } = (0, import_hooks.useRequest)();
35
+ const { goalShopId } = (0, import_hooks2.useGetGoalShopInfo)();
36
+ const run = (text) => {
37
+ if (!text) return;
38
+ return get("/shop/wallet/eco/customer", {
39
+ search: text,
40
+ with: ["tags"],
41
+ goal_shop_id: goalShopId
42
+ });
43
+ };
44
+ return {
45
+ run
46
+ };
47
+ };
48
+ var useSearchCup = () => {
49
+ const { get } = (0, import_hooks.useRequest)();
50
+ const { goalShopId } = (0, import_hooks2.useGetGoalShopInfo)();
51
+ const run = (text) => {
52
+ if (!text) return;
53
+ return get("/shop/wallet/eco", {
54
+ type: "eco",
55
+ code: text,
56
+ with: [
57
+ "customer:id,display_name,cover,phone,country_calling_code,nickname",
58
+ "rentShop:id,name",
59
+ "returnShop:id,name",
60
+ "currentShop:id,name"
61
+ ],
62
+ num: 1,
63
+ goal_shop_id: goalShopId
64
+ });
65
+ };
66
+ return {
67
+ run
68
+ };
69
+ };
70
+ var useSearch = () => {
71
+ const searchCustomer = useSearchCustomer();
72
+ const searchCup = useSearchCup();
73
+ const [loading, setLoading] = (0, import_react.useState)(false);
74
+ const run = async (params) => {
75
+ var _a, _b;
76
+ const { searchType, searchText = "" } = params;
77
+ const isCupCode = /^EC[a-zA-Z0-9]{8}$/.test(searchText);
78
+ if (searchType === "cup" && !isCupCode) {
79
+ return {
80
+ status: "failed",
81
+ message: import_utils.locales.getText("pisell2.text.ecocup.search-bar.search-tip")
82
+ };
83
+ }
84
+ const type = !!searchType ? searchType : isCupCode ? "cup" : "customer";
85
+ const runFn = type === "cup" ? searchCup.run : searchCustomer.run;
86
+ try {
87
+ setLoading(true);
88
+ const res = await runFn(searchText);
89
+ if ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.list) {
90
+ return { status: "success", type, data: ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.list) || [] };
91
+ } else {
92
+ return { status: "failed", type, message: (res == null ? void 0 : res.message) || "" };
93
+ }
94
+ } catch (error) {
95
+ return { status: "failed", type, message: (error == null ? void 0 : error.message) || "" };
96
+ } finally {
97
+ setLoading(false);
98
+ }
99
+ };
100
+ return { loading, run };
101
+ };
102
+ var useCupScanStatus = () => {
103
+ const shopId = (0, import_hooks.useGetShopId)();
104
+ const getCupScanStatus = (cup, customerId) => {
105
+ if (!cup) {
106
+ return import_types.ECupScanStatus.NOT_FOUND;
107
+ }
108
+ if ((cup == null ? void 0 : cup.status) == import_types.ECupStatus.IN_STOCK) {
109
+ if ((cup == null ? void 0 : cup.current_shop_id) != shopId) {
110
+ return import_types.ECupScanStatus.OTHER_IN_STOCK;
111
+ }
112
+ }
113
+ if ((cup == null ? void 0 : cup.status) == import_types.ECupStatus.RENT) {
114
+ if ((cup == null ? void 0 : cup.customer_id) != customerId) {
115
+ return import_types.ECupScanStatus.OTHER_RENT;
116
+ }
117
+ }
118
+ if ((cup == null ? void 0 : cup.status) == import_types.ECupStatus.MISSING) {
119
+ return import_types.ECupScanStatus.MISSING;
120
+ }
121
+ if ((cup == null ? void 0 : cup.status) == import_types.ECupStatus.BROKEN) {
122
+ return import_types.ECupScanStatus.BROKEN;
123
+ }
124
+ };
125
+ return {
126
+ getCupScanStatus
127
+ };
128
+ };
129
+ // Annotate the CommonJS export names for ESM import in node:
130
+ 0 && (module.exports = {
131
+ useCupScanStatus,
132
+ useSearch,
133
+ useSearchCup,
134
+ useSearchCustomer
135
+ });
@@ -0,0 +1,12 @@
1
+ import './index.less';
2
+ interface SearchBarProps {
3
+ scanListenerKey: string;
4
+ size?: 'large' | 'small';
5
+ placeholder?: string;
6
+ onSearch?: (value: string) => void;
7
+ searchType?: 'customer' | 'cup';
8
+ onSearchResult?: (v: any) => void;
9
+ customerId?: string;
10
+ }
11
+ declare const SearchBar: (props: SearchBarProps) => JSX.Element;
12
+ export default SearchBar;
@@ -0,0 +1,213 @@
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/components/ecocup/components/SearchBar/index.tsx
30
+ var SearchBar_exports = {};
31
+ __export(SearchBar_exports, {
32
+ default: () => SearchBar_default
33
+ });
34
+ module.exports = __toCommonJS(SearchBar_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_ahooks = require("ahooks");
37
+ var import_utils = require("@pisell/utils");
38
+ var import_materials = require("@pisell/materials");
39
+ var import_index = require("./index.less");
40
+ var import_searchSection = __toESM(require("../../../../pro/comprehensiveSearch/components/searchSection"));
41
+ var import_hooks = require("../../hooks");
42
+ var import_const = require("./const");
43
+ var import_hooks2 = require("./hooks");
44
+ var import_CupStatusModal = __toESM(require("../CupStatusModal"));
45
+ var import_dayjs = __toESM(require("dayjs"));
46
+ var SearchBar = (props) => {
47
+ var _a;
48
+ const {
49
+ scanListenerKey,
50
+ size = "large",
51
+ placeholder,
52
+ onSearch,
53
+ searchType,
54
+ onSearchResult,
55
+ customerId
56
+ } = props;
57
+ const [value, setValue] = (0, import_react.useState)("");
58
+ const [searchResult, setSearchResult] = (0, import_react.useState)(null);
59
+ const containerRef = (0, import_react.useRef)(null);
60
+ const { addListener, removeListener, setActiveListener } = (0, import_hooks.useScanListener)();
61
+ const searchHook = (0, import_hooks2.useSearch)();
62
+ const { getCupScanStatus } = (0, import_hooks2.useCupScanStatus)();
63
+ const cupStatusModal = (0, import_hooks.useModal)("ecocup-cup-status-modal");
64
+ const onSelectResult = (0, import_ahooks.useMemoizedFn)(
65
+ (type, item) => {
66
+ setSearchResult(null);
67
+ setValue("");
68
+ onSearchResult == null ? void 0 : onSearchResult({ type, data: item });
69
+ }
70
+ );
71
+ const scanSearchCallback = (0, import_ahooks.useMemoizedFn)((str) => {
72
+ console.log("scanSearchCallback>>>>>>>", str);
73
+ if (onSearch) {
74
+ onSearch(str || "");
75
+ return;
76
+ }
77
+ if (!str) {
78
+ setValue("");
79
+ setSearchResult(null);
80
+ return;
81
+ }
82
+ searchHook.run({ searchType, searchText: str }).then((res) => {
83
+ var _a2, _b, _c;
84
+ if ((res == null ? void 0 : res.status) === "success") {
85
+ if ((res == null ? void 0 : res.type) === "cup") {
86
+ const _cupData = ((_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2[0]) || null;
87
+ const scanStatus = getCupScanStatus(_cupData, customerId);
88
+ if (scanStatus) {
89
+ cupStatusModal.open({
90
+ data: {
91
+ scanStatus,
92
+ cupData: _cupData || { code: str }
93
+ }
94
+ });
95
+ return;
96
+ }
97
+ }
98
+ const dataLength = ((_b = res == null ? void 0 : res.data) == null ? void 0 : _b.length) || 0;
99
+ if (dataLength === 1) {
100
+ setValue("");
101
+ setSearchResult(null);
102
+ onSelectResult(res == null ? void 0 : res.type, (_c = res == null ? void 0 : res.data) == null ? void 0 : _c[0]);
103
+ return;
104
+ }
105
+ if (dataLength === 0 && (res == null ? void 0 : res.type) === "customer") {
106
+ (0, import_materials.PisellToast)({
107
+ content: import_utils.locales.getText(
108
+ "pisell2.text.ecocup.toast.fail-no-match-customer"
109
+ )
110
+ });
111
+ setSearchResult(null);
112
+ return;
113
+ }
114
+ setSearchResult(res == null ? void 0 : res.data);
115
+ } else {
116
+ if (res == null ? void 0 : res.message) {
117
+ (0, import_materials.PisellToast)({ content: res == null ? void 0 : res.message });
118
+ }
119
+ setSearchResult(null);
120
+ }
121
+ });
122
+ });
123
+ (0, import_react.useEffect)(() => {
124
+ addListener(scanListenerKey, (result) => {
125
+ setValue("");
126
+ setSearchResult(null);
127
+ scanSearchCallback((result == null ? void 0 : result.value) || "");
128
+ });
129
+ return () => {
130
+ removeListener(scanListenerKey);
131
+ };
132
+ }, [scanListenerKey, scanSearchCallback]);
133
+ (0, import_react.useEffect)(() => {
134
+ const handleClickOutside = (event) => {
135
+ const target = event.target;
136
+ if (!containerRef.current || !target) {
137
+ return;
138
+ }
139
+ if (!containerRef.current.contains(target) && (searchResult == null ? void 0 : searchResult.length) > 1) {
140
+ setSearchResult(null);
141
+ }
142
+ };
143
+ document.addEventListener("mousedown", handleClickOutside);
144
+ return () => {
145
+ document.removeEventListener("mousedown", handleClickOutside);
146
+ };
147
+ }, [searchResult]);
148
+ return /* @__PURE__ */ import_react.default.createElement("div", { ref: containerRef, className: "ecocup-cup-search-bar" }, /* @__PURE__ */ import_react.default.createElement(
149
+ "div",
150
+ {
151
+ style: { flex: 1 },
152
+ onClick: () => {
153
+ console.log("onClick>>>>>>>", scanListenerKey);
154
+ setActiveListener(scanListenerKey);
155
+ }
156
+ },
157
+ /* @__PURE__ */ import_react.default.createElement(
158
+ import_searchSection.default,
159
+ {
160
+ value,
161
+ onChange: setValue,
162
+ loading: searchHook.loading,
163
+ style: {
164
+ flex: 1,
165
+ height: size === "large" ? "60px" : "48px",
166
+ padding: 0
167
+ },
168
+ placeholder: placeholder || import_utils.locales.getText("pisell2.text.cup-project.search-bar.placeholder"),
169
+ searchButtonProps: {
170
+ placement: "inside",
171
+ style: size === "large" ? {
172
+ height: 48,
173
+ padding: 8,
174
+ minWidth: 160
175
+ } : {
176
+ height: 32,
177
+ padding: 8,
178
+ minWidth: 120
179
+ }
180
+ },
181
+ cameraButtonProps: {
182
+ icon: ["pisell2-camera-01", "pisell2-qr-code-02"]
183
+ },
184
+ onSearch: () => scanSearchCallback(value)
185
+ }
186
+ )
187
+ ), (searchResult == null ? void 0 : searchResult.length) > 1 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "ecocup-cup-search-bar-result" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "ecocup-cup-search-bar-result-header" }, (_a = import_const.SEARCH_BAR_RESULT_HEADER_CONFIG) == null ? void 0 : _a.map((item) => /* @__PURE__ */ import_react.default.createElement("div", { key: item.key }, import_utils.locales.getText(item.label)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "ecocup-cup-search-bar-result-content" }, searchResult == null ? void 0 : searchResult.map((item) => {
188
+ var _a2, _b;
189
+ const {
190
+ nickname,
191
+ display_name,
192
+ create_time,
193
+ country_calling_code,
194
+ phone,
195
+ email,
196
+ tags
197
+ } = item;
198
+ return /* @__PURE__ */ import_react.default.createElement(
199
+ "div",
200
+ {
201
+ key: item.id,
202
+ className: "ecocup-cup-search-bar-result-content-item",
203
+ onClick: () => onSelectResult("customer", item)
204
+ },
205
+ /* @__PURE__ */ import_react.default.createElement("div", null, display_name || nickname || "-"),
206
+ /* @__PURE__ */ import_react.default.createElement("div", null, create_time ? (0, import_dayjs.default)(create_time).format("DD/MM/YYYY") : "-"),
207
+ /* @__PURE__ */ import_react.default.createElement("div", null, phone ? `(${country_calling_code}) ${phone}` : "-"),
208
+ /* @__PURE__ */ import_react.default.createElement("div", null, email || "-"),
209
+ /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", { className: "ecocup-cup-search-bar-result-content-item-membership" }, ((_a2 = tags == null ? void 0 : tags.find) == null ? void 0 : _a2.call(tags, (v) => (v == null ? void 0 : v.name) == "admin")) ? "Admin" : ((_b = tags == null ? void 0 : tags.find) == null ? void 0 : _b.call(tags, (v) => (v == null ? void 0 : v.name) == "business")) ? "Business" : "Normal"))
210
+ );
211
+ }))) : null, cupStatusModal.visible && /* @__PURE__ */ import_react.default.createElement(import_CupStatusModal.default, { ...cupStatusModal.modalProps }));
212
+ };
213
+ var SearchBar_default = SearchBar;
@@ -0,0 +1,88 @@
1
+ .ecocup-cup-search-bar {
2
+ position: relative;
3
+ width: 100%;
4
+ display: flex;
5
+ flex: 1;
6
+
7
+ .comprehensive-search__search-section
8
+ .comprehensive-search__camera-activator.disabled {
9
+ width: fit-content;
10
+ }
11
+
12
+ .comprehensive-search__search-section
13
+ .comprehensive-search__camera-activator {
14
+ width: fit-content;
15
+ }
16
+
17
+ .comprehensive-search__search-section
18
+ .comprehensive-search__search-input-wrapper {
19
+ padding: 8px;
20
+ }
21
+
22
+ &-result {
23
+ position: absolute;
24
+ top: 100%;
25
+ left: 0;
26
+ right: 0;
27
+ background-color: #fff;
28
+ border: 1px solid #d9d9d9;
29
+ border-radius: 6px;
30
+ z-index: 9;
31
+
32
+ &-header {
33
+ height: 44px;
34
+ display: flex;
35
+ align-items: center;
36
+ border-bottom: 1px solid #eaecf0;
37
+ background: #f9fafb;
38
+
39
+ & > div {
40
+ flex: 1;
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ color: #475467;
45
+ font-size: 12px;
46
+ font-weight: 500;
47
+ }
48
+ }
49
+
50
+ &-content {
51
+ max-height: 220px;
52
+ display: flex;
53
+ flex-direction: column;
54
+ overflow-y: auto;
55
+
56
+ &-item {
57
+ min-height: 44px;
58
+ height: 44px;
59
+ display: flex;
60
+ align-items: center;
61
+ cursor: pointer;
62
+ border-bottom: 1px solid #eaecf0;
63
+
64
+ & > div {
65
+ flex: 1;
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ color: #101828;
70
+ font-size: 12px;
71
+ font-weight: 500;
72
+ }
73
+
74
+ &-membership {
75
+ display: flex;
76
+ padding: 2px 8px;
77
+ border-radius: 16px;
78
+ border: 1px solid #fedf89;
79
+ background: #fffcf5;
80
+ color: #b54708;
81
+ text-align: center;
82
+ font-size: 12px;
83
+ font-weight: 500;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,133 @@
1
+ declare const STATUS_TEXT_MAP: {
2
+ in_stock: string;
3
+ rent: string;
4
+ return: string;
5
+ missing: string;
6
+ broken: string;
7
+ shop_changed: string;
8
+ };
9
+ declare const STATUS_COLOR_MAP: {
10
+ in_stock: {
11
+ backgroundColor: string;
12
+ color: string;
13
+ border: string;
14
+ };
15
+ rent: {
16
+ backgroundColor: string;
17
+ color: string;
18
+ border: string;
19
+ };
20
+ return: {
21
+ backgroundColor: string;
22
+ color: string;
23
+ border: string;
24
+ };
25
+ shop_changed: {
26
+ backgroundColor: string;
27
+ color: string;
28
+ border: string;
29
+ };
30
+ overtime: {
31
+ backgroundColor: string;
32
+ color: string;
33
+ border: string;
34
+ };
35
+ expire_soon: {
36
+ backgroundColor: string;
37
+ color: string;
38
+ border: string;
39
+ };
40
+ borrowing: {
41
+ backgroundColor: string;
42
+ color: string;
43
+ border: string;
44
+ };
45
+ missing: {
46
+ backgroundColor: string;
47
+ color: string;
48
+ border: string;
49
+ };
50
+ broken: {
51
+ backgroundColor: string;
52
+ color: string;
53
+ border: string;
54
+ };
55
+ };
56
+ /**
57
+ * @description: 排序设置
58
+ * @return {*}
59
+ */
60
+ declare const SORT_SETTINGS: {
61
+ show: boolean;
62
+ list: {
63
+ columnKey: string;
64
+ key: string;
65
+ type: string;
66
+ localFilter: boolean;
67
+ }[];
68
+ };
69
+ /**
70
+ * @description: 列配置
71
+ * @return {*}
72
+ */
73
+ declare const COLUMN_SETTING: {
74
+ show: boolean;
75
+ storageMode: string;
76
+ };
77
+ /**
78
+ * @description: 过滤选项
79
+ * @return {*}
80
+ */
81
+ declare const FILTER: (locales: any, isNormalShop: boolean, ecoShopLists?: any, isPartner?: boolean, currentPagination?: number) => {
82
+ show: boolean;
83
+ quickFilterMaxLength: number;
84
+ currentPagination: number;
85
+ list: ({
86
+ key: string;
87
+ type: string;
88
+ columnKey: string;
89
+ isCustom: boolean;
90
+ name: string;
91
+ sort: boolean;
92
+ localFilter: boolean;
93
+ other: {
94
+ size: string;
95
+ allowClear: boolean;
96
+ showSearch: boolean;
97
+ placeholder: any;
98
+ defaultValue: number;
99
+ options: {
100
+ label: any;
101
+ value: string | number;
102
+ }[];
103
+ style: {
104
+ width: number;
105
+ };
106
+ };
107
+ isHidden?: undefined;
108
+ } | {
109
+ key: string;
110
+ type: string;
111
+ columnKey: string;
112
+ isCustom: boolean;
113
+ name: string;
114
+ sort: boolean;
115
+ localFilter: boolean;
116
+ isHidden: boolean;
117
+ other: {
118
+ size: string;
119
+ allowClear: boolean;
120
+ showSearch: boolean;
121
+ placeholder: any;
122
+ defaultValue: number;
123
+ options: {
124
+ label: any;
125
+ value: any;
126
+ }[];
127
+ style: {
128
+ width: number;
129
+ };
130
+ };
131
+ })[];
132
+ };
133
+ export { STATUS_TEXT_MAP, STATUS_COLOR_MAP, SORT_SETTINGS, COLUMN_SETTING, FILTER, };