@pisell/private-materials 6.11.49 → 6.11.51
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Cart/utils.d.ts +68 -0
- package/es/components/Sales/Checkout/utils.d.ts +41 -0
- package/es/components/Sales/Summary/index.d.ts +37 -0
- package/es/components/Sales/Summary/utils.d.ts +58 -0
- package/es/components/appointmentBooking/locales.d.ts +606 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/voucher/utils.d.ts +4 -0
- package/es/components/booking/dashboard/serve.d.ts +2 -0
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/serve.d.ts +18 -0
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/hooks/usePromotion.js +25 -20
- package/es/components/booking/info/client/serve.d.ts +2 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +10 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/pet/serve.d.ts +1 -0
- package/es/components/booking/info/service/Lists.js +11 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/serve.d.ts +34 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -5
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +3 -26
- package/es/components/booking/info/service2/Group/utils.js +0 -8
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/locales.d.ts +33 -0
- package/es/components/booking/info2/cartClientCard/types.d.ts +19 -0
- package/es/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/es/components/booking/info2/model/index.d.ts +1 -0
- package/es/components/booking/info2/model/strategy/adapter/index.d.ts +7 -0
- package/es/components/booking/info2/model/strategy/adapter/promotion/evaluator.d.ts +185 -0
- package/es/components/booking/info2/model/strategy/adapter/promotion/type.d.ts +420 -0
- package/es/components/booking/info2/model/strategy/adapter/type.d.ts +28 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/evaluator.d.ts +84 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/example.d.ts +4 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/index.d.ts +32 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/locales.d.ts +1 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/type.d.ts +165 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/utils.d.ts +50 -0
- package/es/components/booking/info2/model/strategy/index.d.ts +107 -0
- package/es/components/booking/info2/model/strategy/strategy-example.d.ts +5 -0
- package/es/components/booking/info2/model/strategy/type.d.ts +228 -0
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +23 -2
- package/es/components/booking/info2/service/openNormalService.d.ts +37 -0
- package/es/components/booking/locales.d.ts +1586 -0
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +58 -0
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +59 -0
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +44 -0
- package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/es/components/checkout/components/ScrollableList/types.d.ts +53 -0
- package/es/components/checkout/components/WalletPassModule/types.d.ts +134 -0
- package/es/components/checkout/constants.d.ts +2 -0
- package/es/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
- package/es/components/checkout/locales.d.ts +856 -0
- package/es/components/checkout/styles.d.ts +67 -0
- package/es/components/checkout/types.d.ts +130 -0
- package/es/components/checkout/utils.d.ts +3 -0
- package/es/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +36 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/es/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/es/components/ecocup/components/SettingModal/const.d.ts +6 -0
- package/es/components/ecocup/cupList/const.d.ts +144 -0
- package/es/components/ecocup/cupProject/const.d.ts +7 -0
- package/es/components/ecocup/customerList/const.d.ts +44 -0
- package/es/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/es/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/es/components/ecocup/hooks.d.ts +57 -0
- package/es/components/ecocup/locales.d.ts +653 -0
- package/es/components/ecocup/types.d.ts +103 -0
- package/es/components/ecocup/utils/download.d.ts +7 -0
- package/es/components/ecocup/utils/index.d.ts +2 -0
- package/es/components/ecocup/utils/scanListener.d.ts +20 -0
- package/es/components/eftpos/const.d.ts +64 -0
- package/es/components/eftpos/hooks.d.ts +34 -0
- package/es/components/eftpos/locales.d.ts +163 -0
- package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
- package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/const.d.ts +195 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/es/components/eftposPay/huifu/types.d.ts +14 -0
- package/es/components/eftposPay/locales.d.ts +608 -0
- package/es/components/eftposPay/manufacturer.d.ts +8 -0
- package/es/components/eftposPay/store/index.d.ts +362 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/Voucher/components/locales.d.ts +61 -0
- package/es/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/kioskSkuDetail/locales.d.ts +43 -0
- package/es/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/es/components/list/components/Tab/Tab.d.ts +5 -0
- package/es/components/list/components/Tab/index.d.ts +2 -0
- package/es/components/list/components/Tab/types.d.ts +14 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/es/components/list/components/WaterfallList/index.d.ts +2 -0
- package/es/components/list/hooks/useDevice.d.ts +24 -0
- package/es/components/list/hooks/useWaterfall.d.ts +34 -0
- package/es/components/list/locales.d.ts +108 -0
- package/es/components/list/types.d.ts +181 -0
- package/es/components/list/utils/getText.d.ts +53 -0
- package/es/components/list/utils/index.d.ts +19 -0
- package/es/components/pay/toB/components/Content/utils.d.ts +16 -0
- package/es/components/pay/toB/components/MX51/index.d.ts +3 -0
- package/es/components/pay/toB/hooks.d.ts +12 -0
- package/es/components/pay/toB/locales.d.ts +88 -0
- package/es/components/pay/toB/store/context.d.ts +3 -0
- package/es/components/pay/toB/store/hooks.d.ts +15 -0
- package/es/components/pay/toB/store/index.d.ts +3 -0
- package/es/components/pay/toB/store/provider.d.ts +4 -0
- package/es/components/pay/toB/types/index.d.ts +81 -0
- package/es/components/pay/toB/types/storeTypes.d.ts +143 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +36 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +7 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/es/components/pay/toC/locales.d.ts +511 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pisellSelectCustomerModal/locales.d.ts +133 -0
- package/es/components/ruleSetting/locales.d.ts +78 -0
- package/es/components/schedules/locales.d.ts +143 -0
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/Provider.d.ts +3 -0
- package/es/components/shoppingCart/locales.d.ts +93 -0
- package/es/components/shoppingCart/mock.d.ts +54 -0
- package/es/components/shoppingCart/type.d.ts +58 -0
- package/es/components/subTotal/locales.d.ts +71 -0
- package/es/components/systemSettings/registry/locales.d.ts +525 -0
- package/es/components/systemSettings/registry/services.d.ts +97 -0
- package/es/components/systemSettings/registry/types.d.ts +139 -0
- package/es/components/taxSelect/locales.d.ts +38 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +29 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -0
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +4 -0
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/es/components/ticketBooking/hooks/pisellos/useCartChangeEffect.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +16 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
- package/es/components/ticketBooking/locales.d.ts +340 -0
- package/es/components/ticketBooking/utils/edit.d.ts +1 -0
- package/es/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
- package/es/components/workSpaceList/components/Card/constants.d.ts +2 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/useEngineContext.d.ts +4 -0
- package/es/hooks/useLocale.d.ts +2 -0
- package/es/hooks/useLogger.d.ts +2 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/hooks/useThemeTokens.d.ts +7 -0
- package/es/hooks/useToast.d.ts +2 -0
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/plus/clientCard/types.d.ts +135 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/noteModal/locales.d.ts +53 -0
- package/es/plus/noteModal/types.d.ts +19 -0
- package/es/plus/orderList/config.d.ts +2 -2
- package/es/plus/orderList/locales.d.ts +618 -0
- package/es/plus/pisellSalesGrid/locales.d.ts +9 -0
- package/es/plus/pisellSalesGrid/types.d.ts +170 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +7 -6
- package/es/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +15 -0
- package/es/plus/pisellSalesManagement/locales.d.ts +303 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +68 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +173 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/utils.d.ts +49 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/es/plus/productSelect/ProductList/index.d.ts +22 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/saasAttendance/locales.d.ts +591 -0
- package/es/plus/saasAttendance/settings/types.d.ts +136 -0
- package/es/plus/saasTeamMembers/locales.d.ts +546 -0
- package/es/plus/selectHolder/locales.d.ts +38 -0
- package/es/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +53 -0
- package/es/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/es/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/es/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/es/plus/skuOptionsSelection/types.d.ts +445 -0
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/es/plus/skuOptionsSelection/utils/index.d.ts +7 -0
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/es/plus/webPosLogin/locales.d.ts +92 -0
- package/es/plus/webPosLogin/types.d.ts +288 -0
- package/es/pro/Cards/components/SKUCard/locales.d.ts +12 -0
- package/es/pro/Cards/components/SKUCard/types.d.ts +73 -0
- package/es/pro/Login2.0/locales.d.ts +903 -0
- package/es/pro/Login2.0/shared/types.d.ts +234 -0
- package/es/pro/NumberKeyboardPopover/types.d.ts +31 -0
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/Selector.d.ts +1 -1
- package/es/pro/Selector/Selector.stories.d.ts +78 -0
- package/es/pro/Selector/components/Card/index.d.ts +57 -0
- package/es/pro/Selector/components/Card/types.d.ts +1 -0
- package/es/pro/Selector/components/Indicator/index.d.ts +20 -0
- package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
- package/es/pro/Selector/components/Media/index.d.ts +6 -0
- package/es/pro/Selector/components/Media/types.d.ts +47 -0
- package/es/pro/Selector/components/index.d.ts +4 -0
- package/es/pro/Selector/demo.d.ts +3 -0
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/es/pro/Selector/locales.d.ts +58 -0
- package/es/pro/Selector/types.d.ts +223 -0
- package/es/pro/Selector/utils/index.d.ts +49 -0
- package/es/pro/keyboards/locales.d.ts +38 -0
- package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/es/pro/pisellPriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +63 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +98 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +68 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +73 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +18 -0
- package/es/pro/skuDetailModal/locales.d.ts +159 -0
- package/es/pro/skuDetailModal/types.d.ts +395 -0
- package/es/pro/skuDetailModal/utils.d.ts +4 -0
- package/es/test/setup.d.ts +1 -0
- package/lib/components/Sales/Cart/utils.d.ts +68 -0
- package/lib/components/Sales/Checkout/utils.d.ts +41 -0
- package/lib/components/Sales/Summary/index.d.ts +37 -0
- package/lib/components/Sales/Summary/utils.d.ts +58 -0
- package/lib/components/appointmentBooking/locales.d.ts +606 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/voucher/utils.d.ts +4 -0
- package/lib/components/booking/dashboard/serve.d.ts +2 -0
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/serve.d.ts +18 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/hooks/usePromotion.js +16 -13
- package/lib/components/booking/info/client/serve.d.ts +2 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +10 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/pet/serve.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.js +11 -3
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/serve.d.ts +34 -0
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -5
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +6 -29
- package/lib/components/booking/info/service2/Group/utils.js +0 -8
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/locales.d.ts +33 -0
- package/lib/components/booking/info2/cartClientCard/types.d.ts +19 -0
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/lib/components/booking/info2/model/index.d.ts +1 -0
- package/lib/components/booking/info2/model/strategy/adapter/index.d.ts +7 -0
- package/lib/components/booking/info2/model/strategy/adapter/promotion/evaluator.d.ts +185 -0
- package/lib/components/booking/info2/model/strategy/adapter/promotion/type.d.ts +420 -0
- package/lib/components/booking/info2/model/strategy/adapter/type.d.ts +28 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/evaluator.d.ts +84 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/example.d.ts +4 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/index.d.ts +32 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/locales.d.ts +1 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/type.d.ts +165 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/utils.d.ts +50 -0
- package/lib/components/booking/info2/model/strategy/index.d.ts +107 -0
- package/lib/components/booking/info2/model/strategy/strategy-example.d.ts +5 -0
- package/lib/components/booking/info2/model/strategy/type.d.ts +228 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +22 -8
- package/lib/components/booking/info2/service/openNormalService.d.ts +37 -0
- package/lib/components/booking/locales.d.ts +1586 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +58 -0
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +59 -0
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +44 -0
- package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/lib/components/checkout/components/ScrollableList/types.d.ts +53 -0
- package/lib/components/checkout/components/WalletPassModule/types.d.ts +134 -0
- package/lib/components/checkout/constants.d.ts +2 -0
- package/lib/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
- package/lib/components/checkout/locales.d.ts +856 -0
- package/lib/components/checkout/styles.d.ts +67 -0
- package/lib/components/checkout/types.d.ts +130 -0
- package/lib/components/checkout/utils.d.ts +3 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +36 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/lib/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/lib/components/ecocup/components/SettingModal/const.d.ts +6 -0
- package/lib/components/ecocup/cupList/const.d.ts +144 -0
- package/lib/components/ecocup/cupProject/const.d.ts +7 -0
- package/lib/components/ecocup/customerList/const.d.ts +44 -0
- package/lib/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/lib/components/ecocup/hooks.d.ts +57 -0
- package/lib/components/ecocup/locales.d.ts +653 -0
- package/lib/components/ecocup/types.d.ts +103 -0
- package/lib/components/ecocup/utils/download.d.ts +7 -0
- package/lib/components/ecocup/utils/index.d.ts +2 -0
- package/lib/components/ecocup/utils/scanListener.d.ts +20 -0
- package/lib/components/eftpos/const.d.ts +64 -0
- package/lib/components/eftpos/hooks.d.ts +34 -0
- package/lib/components/eftpos/locales.d.ts +163 -0
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/const.d.ts +195 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/lib/components/eftposPay/huifu/types.d.ts +14 -0
- package/lib/components/eftposPay/locales.d.ts +608 -0
- package/lib/components/eftposPay/manufacturer.d.ts +8 -0
- package/lib/components/eftposPay/store/index.d.ts +362 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +61 -0
- package/lib/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +43 -0
- package/lib/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/lib/components/list/components/Tab/Tab.d.ts +5 -0
- package/lib/components/list/components/Tab/index.d.ts +2 -0
- package/lib/components/list/components/Tab/types.d.ts +14 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
- package/lib/components/list/hooks/useDevice.d.ts +24 -0
- package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
- package/lib/components/list/locales.d.ts +108 -0
- package/lib/components/list/types.d.ts +181 -0
- package/lib/components/list/utils/getText.d.ts +53 -0
- package/lib/components/list/utils/index.d.ts +19 -0
- package/lib/components/pay/toB/components/Content/utils.d.ts +16 -0
- package/lib/components/pay/toB/components/MX51/index.d.ts +3 -0
- package/lib/components/pay/toB/hooks.d.ts +12 -0
- package/lib/components/pay/toB/locales.d.ts +88 -0
- package/lib/components/pay/toB/store/context.d.ts +3 -0
- package/lib/components/pay/toB/store/hooks.d.ts +15 -0
- package/lib/components/pay/toB/store/index.d.ts +3 -0
- package/lib/components/pay/toB/store/provider.d.ts +4 -0
- package/lib/components/pay/toB/types/index.d.ts +81 -0
- package/lib/components/pay/toB/types/storeTypes.d.ts +143 -0
- package/lib/components/pay/toC/PaymentList/utils.d.ts +36 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +7 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/lib/components/pay/toC/locales.d.ts +511 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pisellSelectCustomerModal/locales.d.ts +133 -0
- package/lib/components/ruleSetting/locales.d.ts +78 -0
- package/lib/components/schedules/locales.d.ts +143 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/Provider.d.ts +3 -0
- package/lib/components/shoppingCart/locales.d.ts +93 -0
- package/lib/components/shoppingCart/mock.d.ts +54 -0
- package/lib/components/shoppingCart/type.d.ts +58 -0
- package/lib/components/subTotal/locales.d.ts +71 -0
- package/lib/components/systemSettings/registry/locales.d.ts +525 -0
- package/lib/components/systemSettings/registry/services.d.ts +97 -0
- package/lib/components/systemSettings/registry/types.d.ts +139 -0
- package/lib/components/taxSelect/locales.d.ts +38 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +29 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +4 -0
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCartChangeEffect.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +16 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
- package/lib/components/ticketBooking/locales.d.ts +340 -0
- package/lib/components/ticketBooking/utils/edit.d.ts +1 -0
- package/lib/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
- package/lib/components/workSpaceList/components/Card/constants.d.ts +2 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/useEngineContext.d.ts +4 -0
- package/lib/hooks/useLocale.d.ts +2 -0
- package/lib/hooks/useLogger.d.ts +2 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/hooks/useThemeTokens.d.ts +7 -0
- package/lib/hooks/useToast.d.ts +2 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/plus/clientCard/types.d.ts +135 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/noteModal/locales.d.ts +53 -0
- package/lib/plus/noteModal/types.d.ts +19 -0
- package/lib/plus/orderList/config.d.ts +2 -2
- package/lib/plus/orderList/locales.d.ts +618 -0
- package/lib/plus/pisellSalesGrid/locales.d.ts +9 -0
- package/lib/plus/pisellSalesGrid/types.d.ts +170 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +7 -6
- package/lib/plus/pisellSalesManagement/hooks/perspectiveUtils.d.ts +15 -0
- package/lib/plus/pisellSalesManagement/locales.d.ts +303 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +173 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/utils.d.ts +49 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/lib/plus/productSelect/ProductList/index.d.ts +22 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/saasAttendance/locales.d.ts +591 -0
- package/lib/plus/saasAttendance/settings/types.d.ts +136 -0
- package/lib/plus/saasTeamMembers/locales.d.ts +546 -0
- package/lib/plus/selectHolder/locales.d.ts +38 -0
- package/lib/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +53 -0
- package/lib/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +445 -0
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/lib/plus/skuOptionsSelection/utils/index.d.ts +7 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/lib/plus/webPosLogin/locales.d.ts +92 -0
- package/lib/plus/webPosLogin/types.d.ts +288 -0
- package/lib/pro/Cards/components/SKUCard/locales.d.ts +12 -0
- package/lib/pro/Cards/components/SKUCard/types.d.ts +73 -0
- package/lib/pro/Login2.0/locales.d.ts +903 -0
- package/lib/pro/Login2.0/shared/types.d.ts +234 -0
- package/lib/pro/NumberKeyboardPopover/types.d.ts +31 -0
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/Selector.d.ts +1 -1
- package/lib/pro/Selector/Selector.stories.d.ts +78 -0
- package/lib/pro/Selector/components/Card/index.d.ts +57 -0
- package/lib/pro/Selector/components/Card/types.d.ts +1 -0
- package/lib/pro/Selector/components/Indicator/index.d.ts +20 -0
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
- package/lib/pro/Selector/components/Media/index.d.ts +6 -0
- package/lib/pro/Selector/components/Media/types.d.ts +47 -0
- package/lib/pro/Selector/components/index.d.ts +4 -0
- package/lib/pro/Selector/demo.d.ts +3 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/lib/pro/Selector/locales.d.ts +58 -0
- package/lib/pro/Selector/types.d.ts +223 -0
- package/lib/pro/Selector/utils/index.d.ts +49 -0
- package/lib/pro/keyboards/locales.d.ts +38 -0
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/lib/pro/pisellPriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +63 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +98 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +73 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +18 -0
- package/lib/pro/skuDetailModal/locales.d.ts +159 -0
- package/lib/pro/skuDetailModal/types.d.ts +395 -0
- package/lib/pro/skuDetailModal/utils.d.ts +4 -0
- package/lib/test/setup.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取表单数据
|
|
3
|
+
*/
|
|
4
|
+
export declare const getFormData: (params: {
|
|
5
|
+
form_id: number;
|
|
6
|
+
form_record_ids: number[];
|
|
7
|
+
num: number;
|
|
8
|
+
skip: number;
|
|
9
|
+
}) => Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* 发送表单填写提醒
|
|
12
|
+
*/
|
|
13
|
+
export declare const sendFormReminder: (params: {
|
|
14
|
+
email?: string;
|
|
15
|
+
phone?: string;
|
|
16
|
+
order_id: number;
|
|
17
|
+
country_calling_code?: string;
|
|
18
|
+
}) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsBooking4Shop: (state: any) => any;
|
|
@@ -637,6 +637,11 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
637
637
|
return x.item;
|
|
638
638
|
});
|
|
639
639
|
if (mainProducts.length === 0) {
|
|
640
|
+
// 将编辑商品(带 booking_id)原样保留在结果中
|
|
641
|
+
var editProducts = editProductsWithIndex.map(function (x) {
|
|
642
|
+
return x.item;
|
|
643
|
+
});
|
|
644
|
+
|
|
640
645
|
// 如果没有主商品,但有已存在的赠品,需要删除所有赠品
|
|
641
646
|
if (existingGifts.length > 0) {
|
|
642
647
|
var toRemove = [];
|
|
@@ -644,11 +649,9 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
644
649
|
_step8;
|
|
645
650
|
try {
|
|
646
651
|
for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
|
|
647
|
-
var _gift$_giftInfo2;
|
|
648
652
|
var gift = _step8.value;
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
toRemove.push(strategyId);
|
|
653
|
+
if (gift._id) {
|
|
654
|
+
toRemove.push(gift._id);
|
|
652
655
|
}
|
|
653
656
|
}
|
|
654
657
|
} catch (err) {
|
|
@@ -657,7 +660,7 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
657
660
|
_iterator8.f();
|
|
658
661
|
}
|
|
659
662
|
return {
|
|
660
|
-
products:
|
|
663
|
+
products: editProducts,
|
|
661
664
|
totalDiscount: 0,
|
|
662
665
|
gifts: [],
|
|
663
666
|
giftActions: {
|
|
@@ -668,7 +671,9 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
668
671
|
unfulfilledPromotions: []
|
|
669
672
|
};
|
|
670
673
|
}
|
|
671
|
-
return emptyResult
|
|
674
|
+
return _objectSpread(_objectSpread({}, emptyResult), {}, {
|
|
675
|
+
products: editProducts.length > 0 ? editProducts : list || []
|
|
676
|
+
});
|
|
672
677
|
}
|
|
673
678
|
|
|
674
679
|
// 1. 转换为 PromotionProduct 格式,记录原始索引
|
|
@@ -725,16 +730,16 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
725
730
|
var pricedProduct = _step9.value;
|
|
726
731
|
if (pricedProduct.inPromotion && pricedProduct.strategyId) {
|
|
727
732
|
var _pricedProduct$origin2;
|
|
728
|
-
var
|
|
733
|
+
var _strategyId3 = pricedProduct.strategyId;
|
|
729
734
|
var sourceId = (_pricedProduct$origin2 = pricedProduct.originalId) !== null && _pricedProduct$origin2 !== void 0 ? _pricedProduct$origin2 : pricedProduct.id;
|
|
730
735
|
var originalData = originalItemMap.get(sourceId);
|
|
731
736
|
if (originalData) {
|
|
732
737
|
var productId = originalData.item._id;
|
|
733
|
-
var ids = strategySourceProductIds.get(
|
|
738
|
+
var ids = strategySourceProductIds.get(_strategyId3) || [];
|
|
734
739
|
if (!ids.includes(productId)) {
|
|
735
740
|
ids.push(productId);
|
|
736
741
|
}
|
|
737
|
-
strategySourceProductIds.set(
|
|
742
|
+
strategySourceProductIds.set(_strategyId3, ids);
|
|
738
743
|
}
|
|
739
744
|
}
|
|
740
745
|
}
|
|
@@ -780,11 +785,11 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
780
785
|
if (mappedItem) {
|
|
781
786
|
// 如果该商品参与了"买X送Y"促销,且该策略还没有添加过 giftInfo
|
|
782
787
|
if (_pricedProduct.inPromotion && _pricedProduct.strategyId) {
|
|
783
|
-
var
|
|
784
|
-
var giftInfo = strategyGiftInfoMap.get(
|
|
788
|
+
var _strategyId4 = _pricedProduct.strategyId;
|
|
789
|
+
var giftInfo = strategyGiftInfoMap.get(_strategyId4);
|
|
785
790
|
|
|
786
791
|
// 只给第一个参与该策略的商品添加 giftInfo
|
|
787
|
-
if (giftInfo && giftInfo.giftOptions && giftInfo.giftOptions.length > 0 && !strategyGiftInfoOwner.has(
|
|
792
|
+
if (giftInfo && giftInfo.giftOptions && giftInfo.giftOptions.length > 0 && !strategyGiftInfoOwner.has(_strategyId4)) {
|
|
788
793
|
var _mappedItem$_extend, _mappedItem$_extend2;
|
|
789
794
|
// 这是一个"买X送Y"促销,为第一个主商品的 _promotion 添加 giftInfo
|
|
790
795
|
var giftInfoData = {
|
|
@@ -804,7 +809,7 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
804
809
|
}
|
|
805
810
|
|
|
806
811
|
// 记录该策略 giftInfo 挂载的主商品 _id
|
|
807
|
-
strategyGiftInfoOwner.set(
|
|
812
|
+
strategyGiftInfoOwner.set(_strategyId4, mappedItem._id);
|
|
808
813
|
}
|
|
809
814
|
}
|
|
810
815
|
processedProducts.push(mappedItem);
|
|
@@ -826,10 +831,10 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
826
831
|
_item2._sortSubIndex = 0; // 赠品不会被拆分,使用 0
|
|
827
832
|
|
|
828
833
|
// 同步更新赠品的 sourceProductId(s),确保与当前促销计算结果一致
|
|
829
|
-
var
|
|
830
|
-
if (
|
|
831
|
-
var latestGiftInfo = strategyGiftInfoMap.get(
|
|
832
|
-
var ownerId = strategyGiftInfoOwner.get(
|
|
834
|
+
var strategyId = (_item2$_giftInfo = _item2._giftInfo) === null || _item2$_giftInfo === void 0 ? void 0 : _item2$_giftInfo.strategyId;
|
|
835
|
+
if (strategyId) {
|
|
836
|
+
var latestGiftInfo = strategyGiftInfoMap.get(strategyId);
|
|
837
|
+
var ownerId = strategyGiftInfoOwner.get(strategyId);
|
|
833
838
|
if (latestGiftInfo) {
|
|
834
839
|
var _item2$_extend;
|
|
835
840
|
// 更新 sourceProductIds 为最新的参与该策略的所有主商品 _id 列表
|
|
@@ -938,9 +943,9 @@ var processCartPromotion = function processCartPromotion(list, promotionEvaluato
|
|
|
938
943
|
for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
|
|
939
944
|
var _gift2$_giftInfo;
|
|
940
945
|
var _gift2 = _step12.value;
|
|
941
|
-
var
|
|
942
|
-
if (
|
|
943
|
-
var _latestGiftInfo = strategyGiftInfoMap.get(
|
|
946
|
+
var _strategyId5 = (_gift2$_giftInfo = _gift2._giftInfo) === null || _gift2$_giftInfo === void 0 ? void 0 : _gift2$_giftInfo.strategyId;
|
|
947
|
+
if (_strategyId5) {
|
|
948
|
+
var _latestGiftInfo = strategyGiftInfoMap.get(_strategyId5);
|
|
944
949
|
if (_latestGiftInfo) {
|
|
945
950
|
var _gift2$_extend;
|
|
946
951
|
_gift2._giftInfo.lastEvaluatedGiftCount = _latestGiftInfo.giftCount;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const useHolderConfig: (state: any) => {
|
|
2
|
+
appointment_subject: any;
|
|
3
|
+
holder: any;
|
|
4
|
+
isFormSubject: boolean;
|
|
5
|
+
isCustomerSubject: boolean;
|
|
6
|
+
isWalkInBol: boolean;
|
|
7
|
+
isShowChangeHolder: boolean;
|
|
8
|
+
holderType: any;
|
|
9
|
+
};
|
|
10
|
+
export default useHolderConfig;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFormDetail: (id: number) => Promise<any>;
|
|
@@ -21,6 +21,7 @@ import { getProductExtend } from "../../info2/service/addService/utils";
|
|
|
21
21
|
import useAddHolder from "../hooks/useAddHolder";
|
|
22
22
|
import useTranslationOriginal from "../../../../hooks/useTranslationOriginal";
|
|
23
23
|
import useCartChangeEffect from "../../../ticketBooking/hooks/pisellos/useCartChangeEffect";
|
|
24
|
+
import { addService } from "../../../ticketBooking/utils/index";
|
|
24
25
|
import { locales } from "@pisell/utils";
|
|
25
26
|
var Lists = function Lists(_ref) {
|
|
26
27
|
var _state$service2;
|
|
@@ -92,7 +93,16 @@ var Lists = function Lists(_ref) {
|
|
|
92
93
|
sourceProductId = _ref2.sourceProductId,
|
|
93
94
|
selectedProducts = _ref2.selectedProducts;
|
|
94
95
|
var _products = getSelectedGiftBySourceProductId(sourceProductId, products);
|
|
95
|
-
|
|
96
|
+
var newProducts = _toConsumableArray(_products);
|
|
97
|
+
// 数量合并
|
|
98
|
+
if ((selectedProducts === null || selectedProducts === void 0 ? void 0 : selectedProducts.length) > 0) {
|
|
99
|
+
selectedProducts.forEach(function (item) {
|
|
100
|
+
var _addService = addService(_products, item, state, false),
|
|
101
|
+
list = _addService.list;
|
|
102
|
+
newProducts = _toConsumableArray(list);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
products = _toConsumableArray(newProducts);
|
|
96
106
|
}
|
|
97
107
|
(_window$closeBookingE = (_window2 = window).closeBookingEditModal) === null || _window$closeBookingE === void 0 || _window$closeBookingE.call(_window2);
|
|
98
108
|
var params = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getIsPartyRoomResourceShop: (id: number) => boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const getProductDetail: (id: string, params: any) => Promise<any>;
|
|
2
|
+
/**
|
|
3
|
+
* @title: 跨日预约获取预约商品报价单
|
|
4
|
+
* @description:
|
|
5
|
+
* @param {string} id
|
|
6
|
+
* @param {any} params
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: WangHan
|
|
9
|
+
* @Date: 2024-12-23 17:06
|
|
10
|
+
*/
|
|
11
|
+
export declare const postMultiDay: (id: string, params: any) => Promise<any>;
|
|
12
|
+
/**
|
|
13
|
+
* 批量查询指定商品的最新价格
|
|
14
|
+
* @param params
|
|
15
|
+
*/
|
|
16
|
+
export declare const getProductPrice: (params: {
|
|
17
|
+
ids: number[];
|
|
18
|
+
customer_id: number;
|
|
19
|
+
schedule_date: string;
|
|
20
|
+
}) => Promise<any>;
|
|
21
|
+
declare type MultiDayProductPriceParams = {
|
|
22
|
+
customer_id: number;
|
|
23
|
+
data: {
|
|
24
|
+
product_id: number;
|
|
25
|
+
schedule_date: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 获取普通商品和跨日预约的价格
|
|
30
|
+
* @param params
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export declare const getNormalAndMultiDayProductPrice: (params: MultiDayProductPriceParams) => Promise<any>;
|
|
34
|
+
export {};
|
|
@@ -5,11 +5,6 @@ interface Product {
|
|
|
5
5
|
total: number;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* 根据 total 与 origin_total 的折扣比例,重新计算主商品单价 main_product_selling_price
|
|
10
|
-
* 如果存在子商品(bundle),会先按折扣比例计算子商品总价,再用总价减去子商品总价得到主商品总价
|
|
11
|
-
*/
|
|
12
|
-
export declare function updateMainProductSellingPrice(extend: any): void;
|
|
13
8
|
export declare function distributeDiscountOrIncrease(products: Product[], // 商品列表
|
|
14
9
|
totalAdjustment: number, // 总折扣或加价金额,可能为负数(折扣)或正数(加价)
|
|
15
10
|
totalPrice: number): Product[];
|
|
@@ -5,26 +5,6 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import Decimal from 'decimal.js';
|
|
8
|
-
/**
|
|
9
|
-
* 根据 total 与 origin_total 的折扣比例,重新计算主商品单价 main_product_selling_price
|
|
10
|
-
* 如果存在子商品(bundle),会先按折扣比例计算子商品总价,再用总价减去子商品总价得到主商品总价
|
|
11
|
-
*/
|
|
12
|
-
export function updateMainProductSellingPrice(extend) {
|
|
13
|
-
var _extend$other, _extend$other2;
|
|
14
|
-
var bundles = (extend === null || extend === void 0 || (_extend$other = extend.other) === null || _extend$other === void 0 ? void 0 : _extend$other.bundle) || [];
|
|
15
|
-
var childProductsTotal = new Decimal(0);
|
|
16
|
-
if (bundles.length > 0) {
|
|
17
|
-
var discountRatio = new Decimal(extend.total).div(extend.origin_total);
|
|
18
|
-
bundles.forEach(function (bundle) {
|
|
19
|
-
var discountedPrice = new Decimal(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
|
|
20
|
-
bundle.bundle_selling_price = discountedPrice.toNumber();
|
|
21
|
-
childProductsTotal = childProductsTotal.add(discountedPrice.mul(bundle.quantity));
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
var mainProductTotal = new Decimal(extend.total).sub(childProductsTotal);
|
|
25
|
-
var mainProductQuantity = ((_extend$other2 = extend.other) === null || _extend$other2 === void 0 ? void 0 : _extend$other2.quantity) || extend.quantity || 1;
|
|
26
|
-
extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
|
|
27
|
-
}
|
|
28
8
|
export function distributeDiscountOrIncrease(products,
|
|
29
9
|
// 商品列表
|
|
30
10
|
totalAdjustment,
|
|
@@ -47,12 +27,10 @@ totalPrice) {
|
|
|
47
27
|
// 防止价格变负,调整均摊金额
|
|
48
28
|
var newPrice = productPrice.plus(adjustmentAmount).toFixed(2, Decimal.ROUND_HALF_UP);
|
|
49
29
|
var adjustedPrice = new Decimal(newPrice).lessThan(0) ? '0.00' : newPrice;
|
|
50
|
-
var newExtend = _objectSpread(_objectSpread({}, product._extend), {}, {
|
|
51
|
-
total: parseFloat(adjustedPrice)
|
|
52
|
-
});
|
|
53
|
-
updateMainProductSellingPrice(newExtend);
|
|
54
30
|
adjustedProducts.push(_objectSpread(_objectSpread({}, product), {}, {
|
|
55
|
-
_extend:
|
|
31
|
+
_extend: _objectSpread(_objectSpread({}, product._extend), {}, {
|
|
32
|
+
total: parseFloat(adjustedPrice)
|
|
33
|
+
})
|
|
56
34
|
}));
|
|
57
35
|
totalAdjustmentApplied = totalAdjustmentApplied.plus(new Decimal(adjustmentAmount));
|
|
58
36
|
});
|
|
@@ -70,7 +48,6 @@ totalPrice) {
|
|
|
70
48
|
// 确保最后调整后的价格不为负数
|
|
71
49
|
lastPrice = new Decimal(lastPrice).lessThan(0) ? '0.00' : lastPrice;
|
|
72
50
|
lastProduct._extend.total = parseFloat(lastPrice);
|
|
73
|
-
updateMainProductSellingPrice(lastProduct._extend);
|
|
74
51
|
}
|
|
75
52
|
|
|
76
53
|
// 将结果格式化为以 _id 为键的对象
|
|
@@ -8,7 +8,6 @@ import { getUniqueId } from "@pisell/utils";
|
|
|
8
8
|
import { getProductTotalPrice } from "../../../utils";
|
|
9
9
|
import { distributeDiscountOrIncrease } from "../../service/serviceManager/distributeDiscount";
|
|
10
10
|
import { genServiceKey } from "../../../../ticketBooking/utils";
|
|
11
|
-
import { setProductPrice } from "../../../info2/service/editService/utils";
|
|
12
11
|
|
|
13
12
|
// 创建group
|
|
14
13
|
|
|
@@ -121,13 +120,6 @@ export var createBookingItemsByGroup = function createBookingItemsByGroup(item,
|
|
|
121
120
|
var discountAmount = (groupOriginTotalPrice - groupTotalPrice) * -1;
|
|
122
121
|
if (discountAmount !== 0) {
|
|
123
122
|
bookings = distributeDiscountOrIncrease(bookings, discountAmount, groupOriginTotalPrice);
|
|
124
|
-
bookings = bookings.map(function (booking) {
|
|
125
|
-
var _booking$_extend, _booking$_extend2;
|
|
126
|
-
return setProductPrice(booking, {
|
|
127
|
-
newTotal: booking === null || booking === void 0 || (_booking$_extend = booking._extend) === null || _booking$_extend === void 0 ? void 0 : _booking$_extend.total,
|
|
128
|
-
origin_total: booking === null || booking === void 0 || (_booking$_extend2 = booking._extend) === null || _booking$_extend2 === void 0 ? void 0 : _booking$_extend2.origin_total
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
123
|
}
|
|
132
124
|
}
|
|
133
125
|
console.log('bookings', bookings);
|
|
@@ -216,7 +216,7 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
216
216
|
* @Author: WangHan
|
|
217
217
|
* @Date: 2024-12-24 11:32
|
|
218
218
|
*/
|
|
219
|
-
export declare const updateServicePrice: (state: any) => Promise<any
|
|
219
|
+
export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
|
|
220
220
|
/**
|
|
221
221
|
* @description: 根据_id和sourceProductId来获取主商品已选择的赠品
|
|
222
222
|
* @param {string} productId 主商品_id
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.switch-account': string;
|
|
4
|
+
'pisell2.text.cancel': string;
|
|
5
|
+
'pisell2.text.cart-client-card': (name: string) => string;
|
|
6
|
+
'pisell2.text.add-client-success': string;
|
|
7
|
+
};
|
|
8
|
+
'zh-CN': {
|
|
9
|
+
'pisell2.text.switch-account': string;
|
|
10
|
+
'pisell2.text.cancel': string;
|
|
11
|
+
'pisell2.text.cart-client-card': (name: string) => string;
|
|
12
|
+
'pisell2.text.add-client-success': string;
|
|
13
|
+
};
|
|
14
|
+
'zh-HK': {
|
|
15
|
+
'pisell2.text.switch-account': string;
|
|
16
|
+
'pisell2.text.cancel': string;
|
|
17
|
+
'pisell2.text.cart-client-card': (name: string) => string;
|
|
18
|
+
'pisell2.text.add-client-success': string;
|
|
19
|
+
};
|
|
20
|
+
ja: {
|
|
21
|
+
'pisell2.text.switch-account': string;
|
|
22
|
+
'pisell2.text.cancel': string;
|
|
23
|
+
'pisell2.text.cart-client-card': (name: string) => string;
|
|
24
|
+
'pisell2.text.add-client-success': string;
|
|
25
|
+
};
|
|
26
|
+
pt: {
|
|
27
|
+
'pisell2.text.switch-account': string;
|
|
28
|
+
'pisell2.text.cancel': string;
|
|
29
|
+
'pisell2.text.cart-client-card': (name: string) => string;
|
|
30
|
+
'pisell2.text.add-client-success': string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ClientData as ClientCardData, ClientCardProps } from '../../../../plus/clientCard/types';
|
|
2
|
+
import type { ClientData as ClientSearchData } from '../../../../plus/clinetSearch/types';
|
|
3
|
+
export interface ClientData extends ClientCardData {
|
|
4
|
+
latest_wallet_detail?: any;
|
|
5
|
+
}
|
|
6
|
+
export interface CartClientCardState {
|
|
7
|
+
clientData?: ClientData;
|
|
8
|
+
searchModalVisible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare type ClientDataConverter = (searchData: ClientSearchData) => ClientData;
|
|
11
|
+
export declare type ClientCardRef = {
|
|
12
|
+
handleSetClient: (record: ClientData) => void;
|
|
13
|
+
};
|
|
14
|
+
export interface CartClientCardProps {
|
|
15
|
+
clientCardProps?: ClientCardProps;
|
|
16
|
+
disabledSwitch?: boolean;
|
|
17
|
+
beforeSwitchModalOpen?: () => void | boolean | Promise<undefined | boolean>;
|
|
18
|
+
onClientChange?: (newClient: ClientData, originClient?: ClientData | null) => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './strategy';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './type';
|
|
2
|
+
export { default as WalletPassAdapter } from './walletPass';
|
|
3
|
+
export { WalletPassEvaluator } from './walletPass/evaluator';
|
|
4
|
+
export * from './promotion/type';
|
|
5
|
+
export { PromotionAdapter, PromotionEvaluator, X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY, } from './promotion';
|
|
6
|
+
export type { PromotionEvaluatorInput, ProductPromotionResult, ApplicablePromotion, CartEvaluationResult, CartApplicablePromotion, PromotionGroup, } from './promotion';
|
|
7
|
+
export { default as PromotionAdapterDefault } from './promotion';
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { StrategyConfig } from '../../type';
|
|
2
|
+
import { type PromotionProduct, type PromotionActionDetail, type PromotionEvaluatorInput, type ProductPromotionResult, type ApplicablePromotion, type CartEvaluationResult, type CartWithPricingResult } from './type';
|
|
3
|
+
/**
|
|
4
|
+
* Promotion 评估器
|
|
5
|
+
*
|
|
6
|
+
* 用于评估商品适用的促销活动
|
|
7
|
+
* 封装了 StrategyEngine 和 PromotionAdapter 的调用逻辑
|
|
8
|
+
*/
|
|
9
|
+
export declare class PromotionEvaluator {
|
|
10
|
+
private engine;
|
|
11
|
+
private adapter;
|
|
12
|
+
private strategyConfigs;
|
|
13
|
+
private locale;
|
|
14
|
+
private locales;
|
|
15
|
+
constructor();
|
|
16
|
+
/**
|
|
17
|
+
* 设置策略配置列表
|
|
18
|
+
*/
|
|
19
|
+
setStrategyConfigs(strategyConfigs: StrategyConfig[]): void;
|
|
20
|
+
/**
|
|
21
|
+
* 获取策略配置列表
|
|
22
|
+
*/
|
|
23
|
+
getStrategyConfigs(): StrategyConfig[];
|
|
24
|
+
/**
|
|
25
|
+
* 添加策略配置
|
|
26
|
+
*/
|
|
27
|
+
addStrategyConfig(strategyConfig: StrategyConfig): void;
|
|
28
|
+
/**
|
|
29
|
+
* 设置语言
|
|
30
|
+
*/
|
|
31
|
+
setLocale(locale: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* 设置自定义多语言文案
|
|
34
|
+
*/
|
|
35
|
+
setLocales(locales: Record<string, Record<string, string>>): void;
|
|
36
|
+
/**
|
|
37
|
+
* 获取多语言文案
|
|
38
|
+
*/
|
|
39
|
+
getText(key: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* 获取多语言名称
|
|
42
|
+
*/
|
|
43
|
+
getLocalizedName(name: string | Record<string, string>): string;
|
|
44
|
+
/**
|
|
45
|
+
* 评估商品列表
|
|
46
|
+
*
|
|
47
|
+
* 判断每个商品适用哪些促销活动
|
|
48
|
+
*
|
|
49
|
+
* @param input 评估输入
|
|
50
|
+
* @returns 每个商品的促销评估结果
|
|
51
|
+
*/
|
|
52
|
+
evaluateProducts(input: PromotionEvaluatorInput): ProductPromotionResult[];
|
|
53
|
+
/**
|
|
54
|
+
* 评估购物车
|
|
55
|
+
*
|
|
56
|
+
* 返回所有适用的促销及按促销分组的商品
|
|
57
|
+
*
|
|
58
|
+
* @param input 评估输入
|
|
59
|
+
* @returns 购物车评估结果
|
|
60
|
+
*/
|
|
61
|
+
evaluateCart(input: PromotionEvaluatorInput): CartEvaluationResult;
|
|
62
|
+
/**
|
|
63
|
+
* 评估购物车并计算定价
|
|
64
|
+
*
|
|
65
|
+
* 返回处理后的商品数组(包含拆分、finalPrice)和赠品信息
|
|
66
|
+
* - 对于 X_ITEMS_FOR_Y_PRICE:按原价比例均摊价格,优先使用高价商品
|
|
67
|
+
* - 对于 BUY_X_GET_Y_FREE:计算赠品数量和可选赠品列表
|
|
68
|
+
*
|
|
69
|
+
* @param input 评估输入
|
|
70
|
+
* @returns 带定价的购物车评估结果
|
|
71
|
+
*/
|
|
72
|
+
evaluateCartWithPricing(input: PromotionEvaluatorInput): CartWithPricingResult;
|
|
73
|
+
/**
|
|
74
|
+
* 获取商品适用的促销列表
|
|
75
|
+
*
|
|
76
|
+
* 简化方法,用于商品卡片展示
|
|
77
|
+
*
|
|
78
|
+
* @param product 商品
|
|
79
|
+
* @param strategyConfigs 策略配置(可选)
|
|
80
|
+
* @returns 适用的促销列表
|
|
81
|
+
*/
|
|
82
|
+
getProductPromotions(product: PromotionProduct, strategyConfigs?: StrategyConfig[]): ApplicablePromotion[];
|
|
83
|
+
/**
|
|
84
|
+
* 获取商品的促销标签
|
|
85
|
+
*
|
|
86
|
+
* 用于商品卡片展示
|
|
87
|
+
*
|
|
88
|
+
* @param product 商品
|
|
89
|
+
* @param strategyConfigs 策略配置(可选)
|
|
90
|
+
* @returns 促销标签列表
|
|
91
|
+
*/
|
|
92
|
+
getProductPromotionTags(product: PromotionProduct, strategyConfigs?: StrategyConfig[]): Array<{
|
|
93
|
+
text: string;
|
|
94
|
+
type: string;
|
|
95
|
+
strategyId: string;
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* 查找商品适用的策略配置
|
|
99
|
+
*
|
|
100
|
+
* @param product 商品
|
|
101
|
+
* @param strategyConfigs 策略配置列表(可选)
|
|
102
|
+
* @returns 适用的策略配置列表
|
|
103
|
+
*/
|
|
104
|
+
findApplicableStrategies(product: PromotionProduct, strategyConfigs?: StrategyConfig[]): StrategyConfig[];
|
|
105
|
+
/**
|
|
106
|
+
* 批量获取商品列表的适用策略信息
|
|
107
|
+
*
|
|
108
|
+
* 用于给商品列表追加策略标签信息
|
|
109
|
+
* 只检查商品 ID 匹配和策略时间范围
|
|
110
|
+
*
|
|
111
|
+
* @param input 评估输入(商品列表)
|
|
112
|
+
* @returns 每个商品的适用策略完整数据
|
|
113
|
+
*/
|
|
114
|
+
getProductsApplicableStrategies(input: PromotionEvaluatorInput): Array<{
|
|
115
|
+
product: PromotionProduct;
|
|
116
|
+
applicableStrategies: Array<{
|
|
117
|
+
strategyId: string;
|
|
118
|
+
strategyName: string | Record<string, string>;
|
|
119
|
+
strategyMetadata: any;
|
|
120
|
+
actionType: string;
|
|
121
|
+
actionDetail: PromotionActionDetail;
|
|
122
|
+
display?: {
|
|
123
|
+
text: string | Record<string, string>;
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
strategyConfig: StrategyConfig;
|
|
127
|
+
}>;
|
|
128
|
+
hasApplicableStrategy: boolean;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* 按优先级排序促销组
|
|
132
|
+
* 优先级从 strategyConfig.actions[0].priority 获取,数值越小优先级越高
|
|
133
|
+
*/
|
|
134
|
+
private sortPromotionGroupsByPriority;
|
|
135
|
+
/**
|
|
136
|
+
* 处理 X件Y元 促销
|
|
137
|
+
*
|
|
138
|
+
* 1. 展开商品为单件列表,按价格从高到低排序
|
|
139
|
+
* 2. 计算可凑成的组数
|
|
140
|
+
* 3. 按原价比例均摊价格
|
|
141
|
+
* 4. 拆分商品(部分参与促销、部分原价)
|
|
142
|
+
*
|
|
143
|
+
* 注意:每个商品按 id 独立处理,不会合并不同 id 的商品
|
|
144
|
+
*/
|
|
145
|
+
private processXItemsForYPrice;
|
|
146
|
+
/**
|
|
147
|
+
* 处理 买X送Y 促销
|
|
148
|
+
*
|
|
149
|
+
* 计算赠品数量,商品本身价格不变
|
|
150
|
+
*/
|
|
151
|
+
private processBuyXGetYFree;
|
|
152
|
+
/**
|
|
153
|
+
* 获取未参与任何促销的商品
|
|
154
|
+
*/
|
|
155
|
+
private getRemainingProducts;
|
|
156
|
+
/**
|
|
157
|
+
* 价格统一保留两位小数
|
|
158
|
+
*/
|
|
159
|
+
private formatPrice;
|
|
160
|
+
/**
|
|
161
|
+
* 获取商品唯一标识 key
|
|
162
|
+
* 使用商品的 id 作为唯一标识,不同 id 的商品不会被合并
|
|
163
|
+
*/
|
|
164
|
+
private getProductKey;
|
|
165
|
+
/**
|
|
166
|
+
* 生成随机ID
|
|
167
|
+
*/
|
|
168
|
+
private generateRandomId;
|
|
169
|
+
/**
|
|
170
|
+
* 检查商品是否在策略的适用范围内
|
|
171
|
+
*/
|
|
172
|
+
private isProductInStrategy;
|
|
173
|
+
/**
|
|
174
|
+
* 查找商品匹配规则
|
|
175
|
+
*/
|
|
176
|
+
private findProductMatchRule;
|
|
177
|
+
/**
|
|
178
|
+
* 检查商品是否匹配配置
|
|
179
|
+
*/
|
|
180
|
+
private isProductMatch;
|
|
181
|
+
/**
|
|
182
|
+
* 获取展示配置
|
|
183
|
+
*/
|
|
184
|
+
private getDisplayConfig;
|
|
185
|
+
}
|