@pisell/private-materials 6.3.117 → 6.3.119

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 (299) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +4 -4
  9. package/es/components/Sales/Cart/utils.d.ts +68 -0
  10. package/es/components/Sales/Checkout/utils.d.ts +41 -0
  11. package/es/components/Sales/Summary/utils.d.ts +58 -0
  12. package/es/components/appointmentBooking/locales.d.ts +606 -0
  13. package/es/components/booking/addons/model.d.ts +10 -1
  14. package/es/components/booking/components/tabPane/index.d.ts +4 -0
  15. package/es/components/booking/components/voucher/utils.d.ts +4 -0
  16. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  17. package/es/components/booking/forms/model.d.ts +10 -1
  18. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  19. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  20. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  21. package/es/components/booking/info/index.d.ts +4 -0
  22. package/es/components/booking/info/model.d.ts +10 -1
  23. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
  25. package/es/components/booking/info/service2/utils.d.ts +1 -1
  26. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  27. package/es/components/booking/model.d.ts +9 -1
  28. package/es/components/booking/notes/model.d.ts +10 -1
  29. package/es/components/booking/payments/model.d.ts +10 -1
  30. package/es/components/booking/utils.d.ts +2 -2
  31. package/es/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
  32. package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +36 -0
  33. package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
  34. package/es/components/ecocup/components/SearchBar/const.d.ts +4 -0
  35. package/es/components/ecocup/components/SettingModal/const.d.ts +6 -0
  36. package/es/components/ecocup/cupList/const.d.ts +140 -0
  37. package/es/components/ecocup/cupProject/const.d.ts +7 -0
  38. package/es/components/ecocup/customerList/const.d.ts +44 -0
  39. package/es/components/ecocup/customerList/hooks/index.d.ts +3 -0
  40. package/es/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
  41. package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
  42. package/es/components/ecocup/hooks.d.ts +57 -0
  43. package/es/components/ecocup/locales.d.ts +653 -0
  44. package/es/components/ecocup/types.d.ts +103 -0
  45. package/es/components/ecocup/utils/download.d.ts +7 -0
  46. package/es/components/ecocup/utils/index.d.ts +2 -0
  47. package/es/components/ecocup/utils/scanListener.d.ts +20 -0
  48. package/es/components/eftpos/const.d.ts +64 -0
  49. package/es/components/eftpos/hooks.d.ts +34 -0
  50. package/es/components/eftpos/locales.d.ts +163 -0
  51. package/es/components/eftposPay/amount.d.ts +1 -1
  52. package/es/components/eftposPay/const.d.ts +186 -0
  53. package/es/components/eftposPay/device.d.ts +1 -1
  54. package/es/components/eftposPay/hooks.d.ts +2 -2
  55. package/es/components/eftposPay/locales.d.ts +572 -0
  56. package/es/components/eftposPay/manufacturer.d.ts +7 -0
  57. package/es/components/eftposPay/store/index.d.ts +358 -0
  58. package/es/components/eventBooking/components/Voucher/components/locales.d.ts +61 -0
  59. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  60. package/es/components/pay/toC/PaymentList/utils.d.ts +36 -0
  61. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  62. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +2 -0
  63. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  64. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +2 -0
  65. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  66. package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  67. package/es/components/pay/toC/locales.d.ts +626 -0
  68. package/es/components/pay/toC/model.d.ts +9 -1
  69. package/es/components/pisellSelectCustomerModal/locales.d.ts +133 -0
  70. package/es/components/schedules/locales.d.ts +143 -0
  71. package/es/components/schedules/model.d.ts +9 -1
  72. package/es/components/shoppingCart/locales.d.ts +53 -0
  73. package/es/components/shoppingCart/type.d.ts +48 -0
  74. package/es/components/subTotal/locales.d.ts +68 -0
  75. package/es/components/systemSettings/registry/locales.d.ts +534 -0
  76. package/es/components/systemSettings/registry/services.d.ts +97 -0
  77. package/es/components/systemSettings/registry/types.d.ts +140 -0
  78. package/es/components/taxSelect/locales.d.ts +38 -0
  79. package/es/components/ticketBooking/locales.d.ts +304 -0
  80. package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
  81. package/es/components/workSpaceList/components/Card/constants.d.ts +2 -0
  82. package/es/hooks/useEngineContext.d.ts +11 -0
  83. package/es/hooks/useLocale.d.ts +2 -0
  84. package/es/hooks/usePaymentLogger.d.ts +1 -0
  85. package/es/hooks/useThemeTokens.d.ts +7 -0
  86. package/es/hooks/useWindowSize.d.ts +5 -0
  87. package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  88. package/es/plus/orderList/config.d.ts +2 -2
  89. package/es/plus/orderList/locales.d.ts +618 -0
  90. package/es/plus/pisellSalesGrid/locales.d.ts +9 -0
  91. package/es/plus/pisellSalesGrid/types.d.ts +170 -0
  92. package/es/plus/pisellSalesManagement/config/booking.d.ts +7 -6
  93. package/es/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +15 -0
  94. package/es/plus/pisellSalesManagement/locales.d.ts +303 -0
  95. package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
  96. package/es/plus/saasAttendance/locales.d.ts +591 -0
  97. package/es/plus/saasAttendance/settings/types.d.ts +136 -0
  98. package/es/plus/saasTeamMembers/locales.d.ts +546 -0
  99. package/es/plus/selectHolder/locales.d.ts +35 -0
  100. package/es/plus/skuOptionsSelection/components/NormalCard/index.js +10 -3
  101. package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.js +6 -2
  102. package/es/plus/skuOptionsSelection/components/OptionsCard/index.less +20 -7
  103. package/es/plus/skuOptionsSelection/components/OptionsModal/index.js +7 -10
  104. package/es/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
  105. package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
  106. package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
  107. package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
  108. package/es/plus/skuOptionsSelection/index.js +2 -1
  109. package/es/plus/skuOptionsSelection/locales.d.ts +58 -0
  110. package/es/plus/skuOptionsSelection/locales.js +10 -5
  111. package/es/plus/skuOptionsSelection/store/actions.d.ts +22 -0
  112. package/es/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
  113. package/es/plus/skuOptionsSelection/store/index.d.ts +2 -0
  114. package/es/plus/skuOptionsSelection/store/store.d.ts +4 -0
  115. package/es/plus/skuOptionsSelection/types.d.ts +458 -0
  116. package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
  117. package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
  118. package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +1 -1
  119. package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
  120. package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +1 -1
  121. package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +19 -6
  122. package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +45 -58
  123. package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
  124. package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +1 -1
  125. package/es/plus/walletPassGallery/locales.d.ts +483 -0
  126. package/es/pro/Cards/components/SKUCard/index.js +5 -2
  127. package/es/pro/Cards/components/SKUCard/index.less +18 -3
  128. package/es/pro/Cards/components/SKUCard/locales.d.ts +12 -0
  129. package/es/pro/Cards/components/SKUCard/types.d.ts +73 -0
  130. package/es/pro/Login2.0/locales.d.ts +908 -0
  131. package/es/pro/Login2.0/shared/types.d.ts +234 -0
  132. package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  133. package/es/pro/Selector/Item.d.ts +14 -0
  134. package/es/pro/Selector/Selector.stories.d.ts +78 -0
  135. package/es/pro/Selector/components/Card/index.d.ts +57 -0
  136. package/es/pro/Selector/components/Card/types.d.ts +1 -0
  137. package/es/pro/Selector/components/Indicator/index.d.ts +20 -0
  138. package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  139. package/es/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
  140. package/es/pro/Selector/components/Media/index.d.ts +6 -0
  141. package/es/pro/Selector/components/Media/types.d.ts +47 -0
  142. package/es/pro/Selector/components/index.d.ts +4 -0
  143. package/es/pro/Selector/demo.d.ts +3 -0
  144. package/es/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
  145. package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
  146. package/es/pro/Selector/index.d.ts +11 -0
  147. package/es/pro/Selector/locales.d.ts +58 -0
  148. package/es/pro/Selector/types.d.ts +223 -0
  149. package/es/pro/Selector/utils/index.d.ts +49 -0
  150. package/es/pro/keyboards/locales.d.ts +38 -0
  151. package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
  152. package/es/pro/pisellNumberSelector/example.d.ts +3 -0
  153. package/es/test/setup.d.ts +1 -0
  154. package/lib/components/Sales/Cart/utils.d.ts +68 -0
  155. package/lib/components/Sales/Checkout/utils.d.ts +41 -0
  156. package/lib/components/Sales/Summary/utils.d.ts +58 -0
  157. package/lib/components/appointmentBooking/locales.d.ts +606 -0
  158. package/lib/components/booking/addons/model.d.ts +10 -1
  159. package/lib/components/booking/components/tabPane/index.d.ts +4 -0
  160. package/lib/components/booking/components/voucher/utils.d.ts +4 -0
  161. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  162. package/lib/components/booking/forms/model.d.ts +10 -1
  163. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  164. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  165. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  166. package/lib/components/booking/info/index.d.ts +4 -0
  167. package/lib/components/booking/info/model.d.ts +10 -1
  168. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  169. package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
  170. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  171. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  172. package/lib/components/booking/model.d.ts +9 -1
  173. package/lib/components/booking/notes/model.d.ts +10 -1
  174. package/lib/components/booking/payments/model.d.ts +10 -1
  175. package/lib/components/booking/utils.d.ts +2 -2
  176. package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
  177. package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +36 -0
  178. package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
  179. package/lib/components/ecocup/components/SearchBar/const.d.ts +4 -0
  180. package/lib/components/ecocup/components/SettingModal/const.d.ts +6 -0
  181. package/lib/components/ecocup/cupList/const.d.ts +140 -0
  182. package/lib/components/ecocup/cupProject/const.d.ts +7 -0
  183. package/lib/components/ecocup/customerList/const.d.ts +44 -0
  184. package/lib/components/ecocup/customerList/hooks/index.d.ts +3 -0
  185. package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
  186. package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
  187. package/lib/components/ecocup/hooks.d.ts +57 -0
  188. package/lib/components/ecocup/locales.d.ts +653 -0
  189. package/lib/components/ecocup/types.d.ts +103 -0
  190. package/lib/components/ecocup/utils/download.d.ts +7 -0
  191. package/lib/components/ecocup/utils/index.d.ts +2 -0
  192. package/lib/components/ecocup/utils/scanListener.d.ts +20 -0
  193. package/lib/components/eftpos/const.d.ts +64 -0
  194. package/lib/components/eftpos/hooks.d.ts +34 -0
  195. package/lib/components/eftpos/locales.d.ts +163 -0
  196. package/lib/components/eftposPay/amount.d.ts +1 -1
  197. package/lib/components/eftposPay/const.d.ts +186 -0
  198. package/lib/components/eftposPay/device.d.ts +1 -1
  199. package/lib/components/eftposPay/hooks.d.ts +2 -2
  200. package/lib/components/eftposPay/locales.d.ts +572 -0
  201. package/lib/components/eftposPay/manufacturer.d.ts +7 -0
  202. package/lib/components/eftposPay/store/index.d.ts +358 -0
  203. package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +61 -0
  204. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  205. package/lib/components/pay/toC/PaymentList/utils.d.ts +36 -0
  206. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  207. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +2 -0
  208. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  209. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +2 -0
  210. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  211. package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  212. package/lib/components/pay/toC/locales.d.ts +626 -0
  213. package/lib/components/pay/toC/model.d.ts +9 -1
  214. package/lib/components/pisellSelectCustomerModal/locales.d.ts +133 -0
  215. package/lib/components/schedules/locales.d.ts +143 -0
  216. package/lib/components/schedules/model.d.ts +9 -1
  217. package/lib/components/shoppingCart/locales.d.ts +53 -0
  218. package/lib/components/shoppingCart/type.d.ts +48 -0
  219. package/lib/components/subTotal/locales.d.ts +68 -0
  220. package/lib/components/systemSettings/registry/locales.d.ts +534 -0
  221. package/lib/components/systemSettings/registry/services.d.ts +97 -0
  222. package/lib/components/systemSettings/registry/types.d.ts +140 -0
  223. package/lib/components/taxSelect/locales.d.ts +38 -0
  224. package/lib/components/ticketBooking/locales.d.ts +304 -0
  225. package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
  226. package/lib/components/workSpaceList/components/Card/constants.d.ts +2 -0
  227. package/lib/hooks/useEngineContext.d.ts +11 -0
  228. package/lib/hooks/useLocale.d.ts +2 -0
  229. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  230. package/lib/hooks/useThemeTokens.d.ts +7 -0
  231. package/lib/hooks/useWindowSize.d.ts +5 -0
  232. package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
  233. package/lib/plus/orderList/config.d.ts +2 -2
  234. package/lib/plus/orderList/locales.d.ts +618 -0
  235. package/lib/plus/pisellSalesGrid/locales.d.ts +9 -0
  236. package/lib/plus/pisellSalesGrid/types.d.ts +170 -0
  237. package/lib/plus/pisellSalesManagement/config/booking.d.ts +7 -6
  238. package/lib/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +15 -0
  239. package/lib/plus/pisellSalesManagement/locales.d.ts +303 -0
  240. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
  241. package/lib/plus/saasAttendance/locales.d.ts +591 -0
  242. package/lib/plus/saasAttendance/settings/types.d.ts +136 -0
  243. package/lib/plus/saasTeamMembers/locales.d.ts +546 -0
  244. package/lib/plus/selectHolder/locales.d.ts +35 -0
  245. package/lib/plus/skuOptionsSelection/components/NormalCard/index.js +15 -9
  246. package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.js +3 -3
  247. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.less +20 -7
  248. package/lib/plus/skuOptionsSelection/components/OptionsModal/index.js +7 -7
  249. package/lib/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
  250. package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
  251. package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
  252. package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
  253. package/lib/plus/skuOptionsSelection/index.js +2 -1
  254. package/lib/plus/skuOptionsSelection/locales.d.ts +58 -0
  255. package/lib/plus/skuOptionsSelection/locales.js +10 -5
  256. package/lib/plus/skuOptionsSelection/store/actions.d.ts +22 -0
  257. package/lib/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
  258. package/lib/plus/skuOptionsSelection/store/index.d.ts +2 -0
  259. package/lib/plus/skuOptionsSelection/store/store.d.ts +4 -0
  260. package/lib/plus/skuOptionsSelection/types.d.ts +458 -0
  261. package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
  262. package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
  263. package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +1 -1
  264. package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
  265. package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +1 -1
  266. package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +15 -4
  267. package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +39 -54
  268. package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
  269. package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +1 -1
  270. package/lib/plus/walletPassGallery/locales.d.ts +483 -0
  271. package/lib/pro/Cards/components/SKUCard/index.js +4 -7
  272. package/lib/pro/Cards/components/SKUCard/index.less +18 -3
  273. package/lib/pro/Cards/components/SKUCard/locales.d.ts +12 -0
  274. package/lib/pro/Cards/components/SKUCard/types.d.ts +73 -0
  275. package/lib/pro/Login2.0/locales.d.ts +908 -0
  276. package/lib/pro/Login2.0/shared/types.d.ts +234 -0
  277. package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  278. package/lib/pro/Selector/Item.d.ts +14 -0
  279. package/lib/pro/Selector/Selector.stories.d.ts +78 -0
  280. package/lib/pro/Selector/components/Card/index.d.ts +57 -0
  281. package/lib/pro/Selector/components/Card/types.d.ts +1 -0
  282. package/lib/pro/Selector/components/Indicator/index.d.ts +20 -0
  283. package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  284. package/lib/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
  285. package/lib/pro/Selector/components/Media/index.d.ts +6 -0
  286. package/lib/pro/Selector/components/Media/types.d.ts +47 -0
  287. package/lib/pro/Selector/components/index.d.ts +4 -0
  288. package/lib/pro/Selector/demo.d.ts +3 -0
  289. package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
  290. package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
  291. package/lib/pro/Selector/index.d.ts +11 -0
  292. package/lib/pro/Selector/locales.d.ts +58 -0
  293. package/lib/pro/Selector/types.d.ts +223 -0
  294. package/lib/pro/Selector/utils/index.d.ts +49 -0
  295. package/lib/pro/keyboards/locales.d.ts +38 -0
  296. package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
  297. package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
  298. package/lib/test/setup.d.ts +1 -0
  299. package/package.json +1 -1
@@ -0,0 +1,458 @@
1
+ /// <reference types="react" />
2
+ import { LayoutConfig } from '../../pro/Selector/types';
3
+ /**
4
+ * SKU Card 文本样式配置
5
+ */
6
+ export interface SkuCardTextConfig {
7
+ /** 是否显示 */
8
+ visible?: boolean;
9
+ /** 字体大小 */
10
+ fontSize?: number;
11
+ /** 颜色 */
12
+ color?: string;
13
+ /** 字体粗细 */
14
+ fontWeight?: 'normal' | 'bold' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
15
+ /** 展示行数 */
16
+ lineClamp?: number;
17
+ }
18
+ /**
19
+ * SKU Card 图片配置
20
+ */
21
+ export interface SkuCardImageConfig {
22
+ /** 是否显示 */
23
+ visible?: boolean;
24
+ /** 宽度 */
25
+ width?: number;
26
+ /** 高度 */
27
+ height?: number;
28
+ /** 圆角 */
29
+ borderRadius?: number | string;
30
+ /** 边框 */
31
+ border?: string;
32
+ }
33
+ /**
34
+ * SKU Card 禁用文本配置
35
+ */
36
+ export interface SkuCardDisabledTextConfig extends Omit<SkuCardTextConfig, 'lineClamp'> {
37
+ /** 文本(可能是多语言) */
38
+ text?: string;
39
+ }
40
+ /**
41
+ * SKU Card 配置
42
+ */
43
+ export interface SkuCardConfig {
44
+ /** 主标题配置 */
45
+ title?: SkuCardTextConfig;
46
+ /** 副标题配置 */
47
+ subTitle?: SkuCardTextConfig;
48
+ /** 价格配置 */
49
+ price?: Omit<SkuCardTextConfig, 'lineClamp'>;
50
+ /** 图片配置 */
51
+ image?: SkuCardImageConfig;
52
+ /**
53
+ * @description 是否在「组合规格选项卡片(VariantCard)」展示价格
54
+ * - 默认不展示,避免影响现有业务 UI
55
+ */
56
+ variantPriceVisible?: boolean;
57
+ /** 禁用文本配置 */
58
+ disabledText?: SkuCardDisabledTextConfig;
59
+ }
60
+ /**
61
+ * SKU store状态类型
62
+ */
63
+ export interface SkuSelectionState {
64
+ /** 数据源 */
65
+ dataSource: any;
66
+ /** 原始值 */
67
+ value: Record<string | number, any>;
68
+ /** 配置 */
69
+ config: {
70
+ overSold?: boolean;
71
+ };
72
+ /** 货币符号 */
73
+ symbol: string;
74
+ /** Selector数据源 */
75
+ selectorDataSource: any[];
76
+ /** Selector识别的值 */
77
+ selectorValue: Record<string | number, any>;
78
+ /** SKU Card 配置 */
79
+ skuCardConfig: SkuCardConfig;
80
+ /** 自定义样式 */
81
+ style?: React.CSSProperties;
82
+ /** 样式配置 */
83
+ customConfig?: {
84
+ /** 弹窗宽度 */
85
+ modalWidth?: number | string;
86
+ /** 选项布局 */
87
+ selectorLayout?: LayoutConfig | null;
88
+ };
89
+ /** 主题 */
90
+ theme?: {
91
+ token?: {
92
+ colorPrimary?: string;
93
+ };
94
+ };
95
+ }
96
+ /** SKU Card 默认配置 */
97
+ export declare const defaultSkuCardConfig: SkuCardConfig;
98
+ export interface IProps {
99
+ /** 数据源 */
100
+ dataSource: DataSource;
101
+ /** 原始值 */
102
+ value: SkuValue;
103
+ /** 配置 */
104
+ config?: {
105
+ /** 是否禁用 */
106
+ overSold?: 0 | 1;
107
+ };
108
+ /** SKU Card 配置 */
109
+ skuCardConfig?: SkuCardConfig;
110
+ /** 选中变更回调 */
111
+ onChange: (value: SkuValue) => void;
112
+ /** 自定义滚动容器 */
113
+ customScrollParent?: HTMLElement | string;
114
+ /** 自定义样式 */
115
+ style?: React.CSSProperties;
116
+ /** 自定义配置 */
117
+ customConfig?: {
118
+ /** 弹窗宽度 */
119
+ modalWidth?: number | string;
120
+ /** 选项布局 */
121
+ selectorLayout?: LayoutConfig | null;
122
+ };
123
+ /** 主题 */
124
+ theme: {
125
+ token?: {
126
+ colorPrimary?: string;
127
+ };
128
+ };
129
+ }
130
+ export interface DataSource {
131
+ /** 单规格组数据 */
132
+ option_group?: Array<OptionGroupItem>;
133
+ /** 组合规格组装后的数据 */
134
+ variant?: Array<VariantProductItem>;
135
+ /** 组合规格组数据 */
136
+ variant_group?: Array<VariantGroupItem>;
137
+ /** 套餐商品组数据 */
138
+ bundle_group?: Array<BundleItem>;
139
+ }
140
+ /**
141
+ * 单规格组数据
142
+ */
143
+ export interface OptionGroupItem {
144
+ /** 创建者id */
145
+ create_account_id?: number;
146
+ /** 创建时间 */
147
+ created_at?: string;
148
+ /** 删除时间 */
149
+ deleted_at?: string | null;
150
+ /** 模板id */
151
+ template_id?: number;
152
+ /** 更新者id */
153
+ update_account_id?: number;
154
+ /** 更新时间 */
155
+ updated_at?: string;
156
+ /** 单规格组id */
157
+ id?: number;
158
+ /** 是否启用 */
159
+ is_enabled?: 0 | 1;
160
+ /** 是否多选 */
161
+ is_multiple?: 0 | 1;
162
+ /** 最大选择数量 */
163
+ max_quantity?: number;
164
+ /** 最小选择数量 */
165
+ min_quantity?: number;
166
+ /** 单规格组名称 */
167
+ name?: string;
168
+ /** 单规格组下规格数据 */
169
+ option_item?: Array<OptionItem>;
170
+ /** 商品id */
171
+ product_id?: number;
172
+ /** 是否必选 */
173
+ required?: 0 | 1;
174
+ /** 店铺id */
175
+ shop_id?: number;
176
+ /** 排序 */
177
+ sort?: number;
178
+ /** 状态 */
179
+ status?: 0 | 1;
180
+ }
181
+ /**
182
+ * 单规格组下选项数据
183
+ */
184
+ export interface OptionItem {
185
+ /** 创建者id */
186
+ create_account_id?: number;
187
+ /** 创建时间 */
188
+ created_at?: string;
189
+ /** 删除时间 */
190
+ deleted_at?: string | null;
191
+ /** 模板id */
192
+ template_id?: number;
193
+ /** 更新者id */
194
+ update_account_id?: number;
195
+ /** 更新时间 */
196
+ updated_at?: string;
197
+ /** 加价 */
198
+ add_price?: string;
199
+ /** 封面 */
200
+ cover?: string;
201
+ /** 描述 */
202
+ description?: string;
203
+ /** 规格id */
204
+ id?: number;
205
+ /** 是否启用 */
206
+ is_enabled?: 0 | 1;
207
+ /** 最大选择数量 */
208
+ max_quantity?: number;
209
+ /** 规格名称 */
210
+ name?: string;
211
+ /** 规格组id */
212
+ option_group_id?: number;
213
+ /** 原价 */
214
+ original_price?: string;
215
+ /** 商品id */
216
+ product_id?: number;
217
+ /** 店铺id */
218
+ shop_id?: number;
219
+ /** 排序 */
220
+ sort?: number;
221
+ /** 状态 */
222
+ status?: 0 | 1;
223
+ }
224
+ /**
225
+ * 组合规格组数据
226
+ */
227
+ export interface VariantGroupItem {
228
+ /** 创建者id */
229
+ create_account_id?: number;
230
+ /** 创建时间 */
231
+ created_at?: string;
232
+ /** 删除时间 */
233
+ deleted_at?: string | null;
234
+ /** 更新者id */
235
+ update_account_id?: number;
236
+ /** 更新时间 */
237
+ updated_at?: string;
238
+ /** 组合规格组id */
239
+ id?: number;
240
+ /** 组合规格组名称 */
241
+ name?: string;
242
+ /** 位置id */
243
+ position_id?: number;
244
+ /** 商品id */
245
+ product_id?: number;
246
+ /** 店铺id */
247
+ shop_id?: number;
248
+ /** 排序 */
249
+ sort?: number;
250
+ /** 状态 */
251
+ status?: 0 | 1;
252
+ /** 组合规格组下选项数据 */
253
+ variant_item?: Array<VariantItem>;
254
+ }
255
+ /**
256
+ * 组合规格组下选项数据
257
+ */
258
+ export interface VariantItem {
259
+ /** 创建者id */
260
+ create_account_id?: number;
261
+ /** 创建时间 */
262
+ created_at?: string;
263
+ /** 删除时间 */
264
+ deleted_at?: string | null;
265
+ /** 更新者id */
266
+ update_account_id?: number;
267
+ /** 更新时间 */
268
+ updated_at?: string;
269
+ /** 店铺id */
270
+ shop_id?: number;
271
+ /** 排序 */
272
+ sort?: number;
273
+ /** 规格id */
274
+ id?: number;
275
+ /** 是否默认 */
276
+ is_default?: 0 | 1;
277
+ /** 变体名称 */
278
+ name?: string;
279
+ /** 位置id */
280
+ position_id?: number;
281
+ /** 商品id */
282
+ product_id?: number;
283
+ /** 状态 */
284
+ status?: 0 | 1;
285
+ /** 组合规格组id */
286
+ variant_group_id?: number;
287
+ }
288
+ /**
289
+ * 组合规格商品数据
290
+ */
291
+ export interface VariantProductItem {
292
+ /** 创建者id */
293
+ create_account_id?: number;
294
+ /** 创建时间 */
295
+ created_at?: string;
296
+ /** 更新者id */
297
+ update_account_id?: number;
298
+ /** 更新时间 */
299
+ updated_at?: string;
300
+ /** 条形码 */
301
+ barcode?: string;
302
+ /** 基础价格 */
303
+ base_price?: string;
304
+ /** 箱规数量 */
305
+ box_specification_quantity?: number;
306
+ /** 编码 */
307
+ code?: string;
308
+ /** 成本价格 */
309
+ cost_price?: string;
310
+ /** 封面 */
311
+ cover?: string;
312
+ /** 描述 */
313
+ description?: string | null;
314
+ /** 是否禁用 */
315
+ disabled?: 0 | 1;
316
+ /** 组合规格商品id */
317
+ id?: number;
318
+ /** 是否收税 */
319
+ is_charge_tax?: 0 | 1;
320
+ /** 是否发货 */
321
+ is_delivery?: 0 | 1;
322
+ /** 是否收税 */
323
+ is_gst?: 0 | 1;
324
+ /** 是否跟踪库存 */
325
+ is_track?: 0 | 1;
326
+ /** 名称 */
327
+ name?: Record<string, string>;
328
+ /** 开售重量 */
329
+ open_sold_weight?: number;
330
+ /** 原价 */
331
+ original_price?: string;
332
+ /** 是否超卖 */
333
+ over_sold?: 0 | 1;
334
+ /** 价格 */
335
+ price?: string;
336
+ /** 商品id */
337
+ product_id?: number;
338
+ /** 折扣类型 */
339
+ rebate_type?: string;
340
+ /** 折扣值 */
341
+ rebate_value?: number;
342
+ /** 标题 */
343
+ title?: Record<string, string>;
344
+ /** 单位 */
345
+ unit?: string;
346
+ /** 单位值 */
347
+ unit_value?: number;
348
+ /** 重量单位 */
349
+ weight_unit?: string;
350
+ /** 重量值 */
351
+ weight_value?: string;
352
+ }
353
+ /**
354
+ * 套餐商品组数据
355
+ */
356
+ export interface BundleGroupItem {
357
+ /** 店铺id */
358
+ shop_id?: number;
359
+ /** 排序 */
360
+ sort?: number;
361
+ /** 套餐id */
362
+ id?: number;
363
+ /** 最大选择数量 */
364
+ max_quantity?: number;
365
+ /** 最小选择数量 */
366
+ min_quantity?: number;
367
+ /** 套餐名称 */
368
+ name?: string;
369
+ /** 商品id */
370
+ product_id?: number;
371
+ /** 套餐商品组数据 */
372
+ bundle_item?: Array<BundleItem>;
373
+ }
374
+ /**
375
+ * 套餐商品组下选项数据
376
+ */
377
+ export interface BundleItem {
378
+ /** 店铺id */
379
+ shop_id?: number;
380
+ /** 排序 */
381
+ sort?: number;
382
+ /** 条形码 */
383
+ barcode?: string;
384
+ /** 套餐商品id */
385
+ bundle_product_id?: number;
386
+ /** 套餐商品变体id */
387
+ bundle_variant_id?: number;
388
+ /** 编码 */
389
+ code?: string;
390
+ /** 封面 */
391
+ cover?: string;
392
+ /** 扩展id */
393
+ extension_id?: number;
394
+ /** 扩展类型 */
395
+ extension_type?: string;
396
+ /** 套餐商品组id */
397
+ group_id?: number;
398
+ /** 套餐商品id */
399
+ id: string | number;
400
+ /** 是否跟踪库存 */
401
+ is_track?: 0 | 1;
402
+ /** 最大选择数量 */
403
+ max_quantity?: number;
404
+ /** 单规格组数据 */
405
+ option_group?: Array<OptionGroupItem>;
406
+ /** 是否允许超卖 */
407
+ over_sold?: 0 | 1;
408
+ /** 价格 */
409
+ price?: string;
410
+ /** 价格类型: mark_up==>加价 | mark_down==>减价 */
411
+ price_type?: 'mark_up' | 'mark_down';
412
+ /** 价格类型扩展: product_price==>商品价格 */
413
+ price_type_ext?: '' | 'product_price';
414
+ /** 商品id */
415
+ product_id?: number;
416
+ /** 商品价格 */
417
+ product_price?: string;
418
+ /** 商品副标题 */
419
+ product_subtitle?: string;
420
+ /** 库存数量 */
421
+ stock_quantity?: number;
422
+ /** 标题 */
423
+ title?: string;
424
+ }
425
+ /**
426
+ * sku value
427
+ */
428
+ export interface SkuValue {
429
+ /** 商品id */
430
+ product_id: number;
431
+ /** 多规格商品id */
432
+ product_variant_id: number;
433
+ /** 多规格商品选项字符串 */
434
+ product_option_string?: string;
435
+ /** 套餐商品组数据 */
436
+ bundle: Array<any>;
437
+ /** 价格 */
438
+ price?: string | number;
439
+ /** 单规格组数据 */
440
+ option: Array<OptionItem & {
441
+ num: number;
442
+ price: string;
443
+ product_option_item_id: number;
444
+ }>;
445
+ }
446
+ /**
447
+ * Selector值原子类型
448
+ */
449
+ export interface SelectorValueAtom {
450
+ /** 数据 */
451
+ data: Record<string, any>;
452
+ /** 数量 */
453
+ quantity: number;
454
+ /** 总价 */
455
+ totalPrice: string | number;
456
+ /** 值 */
457
+ value: number | string;
458
+ }
@@ -0,0 +1,6 @@
1
+ export declare const calculateOptionItem: (params: {
2
+ editIndex: number;
3
+ optionItemValue: any;
4
+ optionItemDataSource: any;
5
+ data: any;
6
+ }) => any[];
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @title 检查SKU库存是否可以售卖
3
+ * @description
4
+ * 首先受到 SKU 的 is_track 字段的影响,如果 is_track 为 0,表示不跟踪库存,则不检查库存
5
+ * 其次受到 SKU 的 over_sold 字段 和 config.overSold 配置的影响,如果 over_sold 为 1 或 config.overSold 为 true,表示允许超卖,则不检查库存
6
+ * 最后受到 SKU 的 stock_quantity 字段的影响,如果 stock_quantity 小于等于 0,表示库存不足
7
+ */
8
+ export declare const checkSkuStockCanSell: (sku: any) => {
9
+ canSell: boolean;
10
+ hasStock: boolean;
11
+ };
12
+ /**
13
+ * @title 检查SKU是否禁用
14
+ * @description 如果SKU被禁用,或者库存不足不能售卖,则返回 true
15
+ */
16
+ export declare const checkSkuDisabled: (sku: any, canSell?: boolean) => boolean;
17
+ /**
18
+ * @title 组合规格库存检查(初始化时使用)
19
+ * @description 检查包含该规格选项的所有组合商品的库存状态
20
+ */
21
+ export declare const checkVariantStockCanSell: (sku: any) => {
22
+ canSell: any;
23
+ hasStock: any;
24
+ };
25
+ /**
26
+ * @title 根据已经选择的规格选项,筛选出包含对应规格的商品并进行库存检查
27
+ * @description
28
+ * 1. 收集当前判断的规格 + 其他规格组已选的规格(排除当前规格组)
29
+ * 2. 根据收集的规格,筛选出包含对应规格的组合商品
30
+ * 3. 对筛选出的商品进行库存检查
31
+ * 4. 只要有一个匹配商品能售卖,则该选项可选
32
+ * 5. 只要有一个匹配商品有库存,则显示有库存
33
+ */
34
+ export declare const checkVariantStockByValue: (sku: any) => {
35
+ canSell: boolean;
36
+ hasStock: boolean;
37
+ };
@@ -85,7 +85,7 @@ var transformBundleGroup = (bundleGroup) => {
85
85
  }
86
86
  },
87
87
  stepperProps: {
88
- showInput: true
88
+ horizontalPadding: "8px"
89
89
  }
90
90
  };
91
91
  if (!!selectorLayout) {
@@ -0,0 +1 @@
1
+ export declare const transformOptionGroup: (optionGroup: any[]) => any[];
@@ -91,7 +91,7 @@ var transformOptionGroup = (optionGroup) => {
91
91
  }
92
92
  },
93
93
  stepperProps: {
94
- showInput: true
94
+ horizontalPadding: "8px"
95
95
  }
96
96
  };
97
97
  if (!!selectorLayout) {
@@ -68,16 +68,18 @@ var transformSelectorValueToValue = (selectorValue) => {
68
68
  let _newData = { ...rest, option: [] };
69
69
  let totalPrice = new import_decimal.default(0);
70
70
  Object.keys(_item == null ? void 0 : _item.data).forEach((key) => {
71
- var _a2;
71
+ var _a2, _b2;
72
72
  const _itemDataItem = (_a2 = _item == null ? void 0 : _item.data) == null ? void 0 : _a2[key];
73
73
  if (Array.isArray(_itemDataItem)) {
74
74
  _itemDataItem.forEach(
75
75
  (_itemDataItem_item) => {
76
+ var _a3;
76
77
  totalPrice = totalPrice.plus(
77
78
  new import_decimal.default((_itemDataItem_item == null ? void 0 : _itemDataItem_item.totalPrice) || 0)
78
79
  );
79
80
  _newData.option.push({
80
- ...(_itemDataItem_item == null ? void 0 : _itemDataItem_item.data) || {}
81
+ ...(_itemDataItem_item == null ? void 0 : _itemDataItem_item.data) || {},
82
+ product_option_item_id: (_a3 = _itemDataItem_item == null ? void 0 : _itemDataItem_item.data) == null ? void 0 : _a3.id
81
83
  });
82
84
  }
83
85
  );
@@ -85,7 +87,10 @@ var transformSelectorValueToValue = (selectorValue) => {
85
87
  totalPrice = totalPrice.plus(
86
88
  new import_decimal.default((_itemDataItem == null ? void 0 : _itemDataItem.totalPrice) || 0)
87
89
  );
88
- _newData.option.push({ ...(_itemDataItem == null ? void 0 : _itemDataItem.data) || {} });
90
+ _newData.option.push({
91
+ ...(_itemDataItem == null ? void 0 : _itemDataItem.data) || {},
92
+ product_option_item_id: (_b2 = _itemDataItem == null ? void 0 : _itemDataItem.data) == null ? void 0 : _b2.id
93
+ });
89
94
  }
90
95
  });
91
96
  const _restPricePrefix = (rest == null ? void 0 : rest.price_type) === "markdown" ? -1 : 1;
@@ -94,6 +99,7 @@ var transformSelectorValueToValue = (selectorValue) => {
94
99
  _newData.original_total = _newData == null ? void 0 : _newData.price;
95
100
  _newData.quantity = (_item == null ? void 0 : _item.quantity) || 0;
96
101
  _newData.num = (_item == null ? void 0 : _item.quantity) || 0;
102
+ _newData._bundle_product_id = _newData == null ? void 0 : _newData.bundle_product_id;
97
103
  transformValue.bundle.push(_newData);
98
104
  }
99
105
  });
@@ -103,6 +109,7 @@ var transformSelectorValueToValue = (selectorValue) => {
103
109
  _newData.price = new import_decimal.default((_newData == null ? void 0 : _newData.price) || 0).times(_pricePrefix).toString();
104
110
  _newData.original_price = _newData == null ? void 0 : _newData.price;
105
111
  _newData.original_total = _newData == null ? void 0 : _newData.price;
112
+ _newData._bundle_product_id = _newData == null ? void 0 : _newData.bundle_product_id;
106
113
  transformValue.bundle.push(_newData);
107
114
  }
108
115
  });
@@ -122,8 +129,12 @@ var transformSelectorValueToValue = (selectorValue) => {
122
129
  _groupItemValue = [groupItemValue];
123
130
  }
124
131
  _groupItemValue == null ? void 0 : _groupItemValue.forEach((item) => {
132
+ var _a2;
125
133
  if (item == null ? void 0 : item.data) {
126
- transformValue.option.push(item == null ? void 0 : item.data);
134
+ transformValue.option.push({
135
+ ...(item == null ? void 0 : item.data) || {},
136
+ product_option_item_id: (_a2 = item == null ? void 0 : item.data) == null ? void 0 : _a2.id
137
+ });
127
138
  }
128
139
  });
129
140
  });