@pisell/private-materials 6.3.69 → 6.3.71
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/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/voucher/index.js +8 -7
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/hooks/useQuotation.js +2 -2
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/kioskSkuDetail/index.d.ts +39 -0
- package/es/components/kioskSkuDetail/index.js +531 -0
- package/es/components/kioskSkuDetail/index.less +196 -0
- package/es/components/kioskSkuDetail/locales.d.ts +27 -0
- package/es/components/kioskSkuDetail/locales.js +26 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +5 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/walletList/index.js +7 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +30 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.less +10 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +3 -0
- package/es/plus/skuOptionsSelection/locales.js +3 -0
- package/es/plus/skuOptionsSelection/store/actions.js +17 -2
- package/es/plus/skuOptionsSelection/types.d.ts +5 -0
- package/es/plus/skuOptionsSelection/types.js +2 -1
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +70 -3
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletPassGallery/index.js +2 -2
- package/es/pro/numberKeyboard/index.d.ts +28 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.d.ts +12 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.d.ts +3 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.d.ts +29 -0
- package/es/pro/pisellNumberSelector/index.js +257 -0
- package/es/pro/pisellNumberSelector/index.less +235 -0
- package/es/pro/skuDetailModal/index.d.ts +4 -0
- package/es/pro/skuDetailModal/index.js +1031 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/voucher/index.js +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/hooks/useQuotation.js +3 -3
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/kioskSkuDetail/index.d.ts +39 -0
- package/lib/components/kioskSkuDetail/index.js +393 -0
- package/lib/components/kioskSkuDetail/index.less +196 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +27 -0
- package/lib/components/kioskSkuDetail/locales.js +50 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +5 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/walletList/index.js +5 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.js +7 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +32 -3
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.less +10 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/locales.js +3 -0
- package/lib/plus/skuOptionsSelection/store/actions.js +25 -1
- package/lib/plus/skuOptionsSelection/types.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/types.js +2 -1
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +51 -5
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/index.js +2 -2
- package/lib/pro/numberKeyboard/index.d.ts +28 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.d.ts +12 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.d.ts +29 -0
- package/lib/pro/pisellNumberSelector/index.js +275 -0
- package/lib/pro/pisellNumberSelector/index.less +235 -0
- package/lib/pro/skuDetailModal/index.d.ts +4 -0
- package/lib/pro/skuDetailModal/index.js +736 -0
- package/lowcode/kiosk-sku-detail/meta.ts +264 -0
- package/package.json +4 -4
- package/es/components/Sales/Cart/utils.d.ts +0 -63
- package/es/components/Sales/Summary/utils.d.ts +0 -51
- package/es/components/appointmentBooking/locales.d.ts +0 -363
- package/es/components/booking/components/tabPane/index.d.ts +0 -4
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/forms/serve.d.ts +0 -18
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/es/components/booking/info/client/serve.d.ts +0 -2
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +0 -9
- package/es/components/booking/info/pet/serve.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/booking/info/service/serve.d.ts +0 -20
- package/es/components/booking/info2/serve.d.ts +0 -6
- package/es/components/booking/locales.d.ts +0 -843
- package/es/components/eftposPay/const.d.ts +0 -184
- package/es/components/eftposPay/locales.d.ts +0 -330
- package/es/components/eftposPay/manufacturer.d.ts +0 -7
- package/es/components/eftposPay/payo/payment.d.ts +0 -66
- package/es/components/pay/toC/PaymentList/utils.d.ts +0 -36
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -2
- package/es/components/pay/toC/locales.d.ts +0 -307
- package/es/components/pay/toC/status.d.ts +0 -13
- package/es/components/ruleSetting/locales.d.ts +0 -48
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/type.d.ts +0 -48
- package/es/components/subTotal/locales.d.ts +0 -42
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/ticketBooking/locales.d.ts +0 -174
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/walletList/locales.d.ts +0 -27
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/es/hooks/useEngineContext.d.ts +0 -10
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +0 -30
- package/es/plus/selectHolder/locales.d.ts +0 -21
- package/es/plus/selectHolder/types.d.ts +0 -104
- package/es/plus/selectHolder/utils.d.ts +0 -9
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +0 -2
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +0 -2
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +0 -15
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +0 -6
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
- package/es/plus/walletEditor/locales.d.ts +0 -135
- package/es/plus/walletPassGallery/locales.d.ts +0 -285
- package/es/plus/walletPassGallery/utils.d.ts +0 -48
- package/es/pro/Login2.0/shared/types.d.ts +0 -232
- package/es/pro/NumericStepper/index.d.ts +0 -43
- package/es/pro/Selector/BatchSelectorDemo.d.ts +0 -3
- package/es/pro/Selector/Item.d.ts +0 -14
- package/es/pro/Selector/Selector.stories.d.ts +0 -78
- package/es/pro/Selector/components/Card/index.d.ts +0 -57
- package/es/pro/Selector/components/Card/types.d.ts +0 -1
- package/es/pro/Selector/components/Indicator/index.d.ts +0 -19
- package/es/pro/Selector/components/IntersectionObserver.d.ts +0 -105
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +0 -16
- package/es/pro/Selector/components/Media/index.d.ts +0 -6
- package/es/pro/Selector/components/Media/types.d.ts +0 -47
- package/es/pro/Selector/components/index.d.ts +0 -4
- package/es/pro/Selector/demo.d.ts +0 -2
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +0 -43
- package/es/pro/Selector/hooks/usePresetProps.d.ts +0 -24
- package/es/pro/Selector/index.d.ts +0 -11
- package/es/pro/Selector/locales.d.ts +0 -36
- package/es/pro/Selector/types.d.ts +0 -173
- package/es/pro/Selector/utils/index.d.ts +0 -49
- package/es/test/setup.d.ts +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +0 -63
- package/lib/components/Sales/Summary/utils.d.ts +0 -51
- package/lib/components/appointmentBooking/locales.d.ts +0 -363
- package/lib/components/booking/components/tabPane/index.d.ts +0 -4
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/forms/serve.d.ts +0 -18
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/lib/components/booking/info/client/serve.d.ts +0 -2
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +0 -9
- package/lib/components/booking/info/pet/serve.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/booking/info/service/serve.d.ts +0 -20
- package/lib/components/booking/info2/serve.d.ts +0 -6
- package/lib/components/booking/locales.d.ts +0 -843
- package/lib/components/eftposPay/const.d.ts +0 -184
- package/lib/components/eftposPay/locales.d.ts +0 -330
- package/lib/components/eftposPay/manufacturer.d.ts +0 -7
- package/lib/components/eftposPay/payo/payment.d.ts +0 -66
- package/lib/components/pay/toC/PaymentList/utils.d.ts +0 -36
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -2
- package/lib/components/pay/toC/locales.d.ts +0 -307
- package/lib/components/pay/toC/status.d.ts +0 -13
- package/lib/components/ruleSetting/locales.d.ts +0 -48
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/type.d.ts +0 -48
- package/lib/components/subTotal/locales.d.ts +0 -42
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/ticketBooking/locales.d.ts +0 -174
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/walletList/locales.d.ts +0 -27
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/lib/hooks/useEngineContext.d.ts +0 -10
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +0 -30
- package/lib/plus/selectHolder/locales.d.ts +0 -21
- package/lib/plus/selectHolder/types.d.ts +0 -104
- package/lib/plus/selectHolder/utils.d.ts +0 -9
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +0 -15
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +0 -6
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
- package/lib/plus/walletEditor/locales.d.ts +0 -135
- package/lib/plus/walletPassGallery/locales.d.ts +0 -285
- package/lib/plus/walletPassGallery/utils.d.ts +0 -48
- package/lib/pro/Login2.0/shared/types.d.ts +0 -232
- package/lib/pro/NumericStepper/index.d.ts +0 -43
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +0 -3
- package/lib/pro/Selector/Item.d.ts +0 -14
- package/lib/pro/Selector/Selector.stories.d.ts +0 -78
- package/lib/pro/Selector/components/Card/index.d.ts +0 -57
- package/lib/pro/Selector/components/Card/types.d.ts +0 -1
- package/lib/pro/Selector/components/Indicator/index.d.ts +0 -19
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +0 -105
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +0 -16
- package/lib/pro/Selector/components/Media/index.d.ts +0 -6
- package/lib/pro/Selector/components/Media/types.d.ts +0 -47
- package/lib/pro/Selector/components/index.d.ts +0 -4
- package/lib/pro/Selector/demo.d.ts +0 -2
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +0 -43
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +0 -24
- package/lib/pro/Selector/index.d.ts +0 -11
- package/lib/pro/Selector/locales.d.ts +0 -36
- package/lib/pro/Selector/types.d.ts +0 -173
- package/lib/pro/Selector/utils/index.d.ts +0 -49
- package/lib/test/setup.d.ts +0 -1
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/kioskSkuDetail/index.tsx
|
|
30
|
+
var kioskSkuDetail_exports = {};
|
|
31
|
+
__export(kioskSkuDetail_exports, {
|
|
32
|
+
default: () => kioskSkuDetail_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(kioskSkuDetail_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_materials = require("@pisell/materials");
|
|
39
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
40
|
+
var import_utils = require("@pisell/utils");
|
|
41
|
+
var import_skuOptionsSelection = __toESM(require("../../plus/skuOptionsSelection"));
|
|
42
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
43
|
+
var import_serve = require("../booking/info/service/serve");
|
|
44
|
+
var import_locales = __toESM(require("./locales"));
|
|
45
|
+
var import_index = require("./index.less");
|
|
46
|
+
var import_utils2 = require("../booking/utils");
|
|
47
|
+
function KioskSkuDetail(props) {
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
49
|
+
const { className, style, onAddToCart } = props;
|
|
50
|
+
const productIdFromUrl = (0, import_react.useMemo)(() => {
|
|
51
|
+
return getQueryFirstMatch({ keys: ["productId", "product_id", "id"] });
|
|
52
|
+
}, []);
|
|
53
|
+
const initialProductId = productIdFromUrl ?? props.productId ?? null;
|
|
54
|
+
const scheduleDate = (0, import_react.useMemo)(() => (0, import_dayjs.default)().format("YYYY-MM-DD"), []);
|
|
55
|
+
const stageScale = useDesignStageScale({ designWidth: 1080, designHeight: 1800 });
|
|
56
|
+
const context = (0, import_useEngineContext.default)();
|
|
57
|
+
const { interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
58
|
+
import_utils.locales.init(import_locales.default, ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en");
|
|
59
|
+
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
60
|
+
const { store, getData, Toast } = ((_d = context.appHelper) == null ? void 0 : _d.utils) || {};
|
|
61
|
+
const state = (_e = store == null ? void 0 : store.getState) == null ? void 0 : _e.call(store);
|
|
62
|
+
const symbol = ((_h = (_g = (_f = store == null ? void 0 : store.getState) == null ? void 0 : _f.call(store)) == null ? void 0 : _g.global) == null ? void 0 : _h.symbol) || "$";
|
|
63
|
+
const currency_code = ((_k = (_j = (_i = store == null ? void 0 : store.getState) == null ? void 0 : _i.call(store)) == null ? void 0 : _j.global) == null ? void 0 : _k.currency_code) || "AUD";
|
|
64
|
+
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
65
|
+
const [errorText, setErrorText] = (0, import_react.useState)(null);
|
|
66
|
+
const [productData, setProductData] = (0, import_react.useState)(null);
|
|
67
|
+
const [quantity, setQuantity] = (0, import_react.useState)(1);
|
|
68
|
+
const [skuValue, setSkuValue] = (0, import_react.useState)({
|
|
69
|
+
product_id: 0,
|
|
70
|
+
product_variant_id: 0,
|
|
71
|
+
bundle: [],
|
|
72
|
+
option: []
|
|
73
|
+
});
|
|
74
|
+
const [skuDefaultValue, setSkuDefaultValue] = (0, import_react.useState)({
|
|
75
|
+
product_id: 0,
|
|
76
|
+
product_variant_id: 0,
|
|
77
|
+
bundle: [],
|
|
78
|
+
option: []
|
|
79
|
+
});
|
|
80
|
+
const [isEdit, setIsEdit] = (0, import_react.useState)(false);
|
|
81
|
+
const skuOptionsSelectionRef = (0, import_react.useRef)(null);
|
|
82
|
+
const requestSeqRef = (0, import_react.useRef)(0);
|
|
83
|
+
const resetForInit = (0, import_react.useCallback)(() => {
|
|
84
|
+
setProductData(null);
|
|
85
|
+
setErrorText(null);
|
|
86
|
+
setQuantity(1);
|
|
87
|
+
setSkuValue({
|
|
88
|
+
product_id: 0,
|
|
89
|
+
product_variant_id: 0,
|
|
90
|
+
bundle: [],
|
|
91
|
+
option: []
|
|
92
|
+
});
|
|
93
|
+
setSkuDefaultValue({
|
|
94
|
+
product_id: 0,
|
|
95
|
+
product_variant_id: 0,
|
|
96
|
+
bundle: [],
|
|
97
|
+
option: []
|
|
98
|
+
});
|
|
99
|
+
}, []);
|
|
100
|
+
const loadByProductId = (0, import_react.useCallback)(async (productId, options = {}) => {
|
|
101
|
+
var _a2, _b2;
|
|
102
|
+
console.log("准备 load", productId);
|
|
103
|
+
if (productId === null || typeof productId === "undefined" || productId === "") return;
|
|
104
|
+
const reqId = ++requestSeqRef.current;
|
|
105
|
+
setIsLoading(true);
|
|
106
|
+
setErrorText(null);
|
|
107
|
+
try {
|
|
108
|
+
const open_deposit = (getData == null ? void 0 : getData("bookingv2_deposit")) || 0;
|
|
109
|
+
const params = { open_deposit, "translate-locale": ((_b2 = (_a2 = context == null ? void 0 : context.engine) == null ? void 0 : _a2.props) == null ? void 0 : _b2.locale) || "en" };
|
|
110
|
+
params.schedule_date = scheduleDate;
|
|
111
|
+
const res = await (0, import_serve.getProductDetail)(String(productId), params);
|
|
112
|
+
console.log("详情接口");
|
|
113
|
+
console.log(JSON.stringify(res));
|
|
114
|
+
const apiData = ((res == null ? void 0 : res.id) ? res : res == null ? void 0 : res.data) || {};
|
|
115
|
+
if (reqId !== requestSeqRef.current) return;
|
|
116
|
+
setProductData(apiData);
|
|
117
|
+
console.log("已设置 productData");
|
|
118
|
+
const normalizedProductId = Number(
|
|
119
|
+
(apiData == null ? void 0 : apiData.product_id) || (apiData == null ? void 0 : apiData.id) || productId || 0
|
|
120
|
+
);
|
|
121
|
+
const minNumUnit = Number((apiData == null ? void 0 : apiData.min_num_unit) || 1);
|
|
122
|
+
if (options.shouldInitQuantity !== false) {
|
|
123
|
+
setQuantity(minNumUnit > 0 ? minNumUnit : 1);
|
|
124
|
+
}
|
|
125
|
+
const defaultVariantId = (() => {
|
|
126
|
+
var _a3, _b3;
|
|
127
|
+
const firstVariantId = Array.isArray(apiData == null ? void 0 : apiData.variant) ? Number(((_b3 = (_a3 = apiData == null ? void 0 : apiData.variant) == null ? void 0 : _a3[0]) == null ? void 0 : _b3.id) || 0) : 0;
|
|
128
|
+
return Number.isFinite(firstVariantId) ? firstVariantId : 0;
|
|
129
|
+
})();
|
|
130
|
+
const initialSkuValue = {
|
|
131
|
+
product_id: normalizedProductId,
|
|
132
|
+
product_variant_id: defaultVariantId,
|
|
133
|
+
bundle: [],
|
|
134
|
+
option: []
|
|
135
|
+
};
|
|
136
|
+
if (options.shouldInitSku !== false) {
|
|
137
|
+
setSkuValue(initialSkuValue);
|
|
138
|
+
setSkuDefaultValue(initialSkuValue);
|
|
139
|
+
setTimeout(() => {
|
|
140
|
+
var _a3;
|
|
141
|
+
if (initialSkuValue.product_variant_id) {
|
|
142
|
+
(_a3 = skuOptionsSelectionRef.current) == null ? void 0 : _a3.validate();
|
|
143
|
+
}
|
|
144
|
+
}, 0);
|
|
145
|
+
}
|
|
146
|
+
} catch (error) {
|
|
147
|
+
console.error(error);
|
|
148
|
+
setErrorText("Failed to load product detail");
|
|
149
|
+
} finally {
|
|
150
|
+
if (reqId !== requestSeqRef.current) return;
|
|
151
|
+
setIsLoading(false);
|
|
152
|
+
}
|
|
153
|
+
}, [getData, scheduleDate]);
|
|
154
|
+
const loadRef = (0, import_react.useRef)(loadByProductId);
|
|
155
|
+
loadRef.current = loadByProductId;
|
|
156
|
+
(0, import_react.useEffect)(() => {
|
|
157
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
158
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
159
|
+
module: "wallet_pass",
|
|
160
|
+
key: "page_load"
|
|
161
|
+
});
|
|
162
|
+
(_d2 = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.mountFunction) == null ? void 0 : _d2.call(
|
|
163
|
+
_c2,
|
|
164
|
+
"wallet_pass",
|
|
165
|
+
"restore_buy_wallet_pass",
|
|
166
|
+
(id) => {
|
|
167
|
+
console.log("重置状态", id);
|
|
168
|
+
console.log("宽", window.innerWidth);
|
|
169
|
+
console.log("高", window.innerHeight);
|
|
170
|
+
console.log("设备像素比", window.devicePixelRatio);
|
|
171
|
+
resetForInit();
|
|
172
|
+
if (id || id === 0) loadRef.current(id);
|
|
173
|
+
setIsEdit(false);
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
(_f2 = (_e2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e2.mountFunction) == null ? void 0 : _f2.call(
|
|
177
|
+
_e2,
|
|
178
|
+
"wallet_pass",
|
|
179
|
+
"edit_buy_wallet_pass",
|
|
180
|
+
(data) => {
|
|
181
|
+
console.log("编辑状态", data);
|
|
182
|
+
const productData2 = JSON.parse(data);
|
|
183
|
+
loadRef.current(productData2.productId, {
|
|
184
|
+
shouldInitSku: false,
|
|
185
|
+
shouldInitQuantity: false
|
|
186
|
+
});
|
|
187
|
+
setSkuValue({
|
|
188
|
+
product_id: productData2.productId,
|
|
189
|
+
product_variant_id: Number(productData2.variantId),
|
|
190
|
+
bundle: [],
|
|
191
|
+
option: []
|
|
192
|
+
});
|
|
193
|
+
setSkuDefaultValue({
|
|
194
|
+
product_id: productData2.productId,
|
|
195
|
+
product_variant_id: Number(productData2.variantId),
|
|
196
|
+
bundle: [],
|
|
197
|
+
option: []
|
|
198
|
+
});
|
|
199
|
+
setIsEdit(true);
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
if (initialProductId || initialProductId === 0) loadRef.current(initialProductId);
|
|
203
|
+
}, []);
|
|
204
|
+
const coverUrl = (0, import_react.useMemo)(() => {
|
|
205
|
+
return (productData == null ? void 0 : productData.cover) || (productData == null ? void 0 : productData.image) || "";
|
|
206
|
+
}, [productData]);
|
|
207
|
+
const titleText = (0, import_react.useMemo)(() => {
|
|
208
|
+
var _a2;
|
|
209
|
+
return (productData == null ? void 0 : productData.title) || ((_a2 = productData == null ? void 0 : productData._extend) == null ? void 0 : _a2.product_name) || (productData == null ? void 0 : productData.product_name) || "";
|
|
210
|
+
}, [productData]);
|
|
211
|
+
const descriptionText = (0, import_react.useMemo)(() => {
|
|
212
|
+
var _a2;
|
|
213
|
+
return (productData == null ? void 0 : productData.description) || (productData == null ? void 0 : productData.sub_title) || ((_a2 = productData == null ? void 0 : productData._extend) == null ? void 0 : _a2.sub_title) || "";
|
|
214
|
+
}, [productData]);
|
|
215
|
+
const unitPrice = (0, import_react.useMemo)(() => {
|
|
216
|
+
const selectedVariantId = Number((skuValue == null ? void 0 : skuValue.product_variant_id) || 0);
|
|
217
|
+
if (selectedVariantId && Array.isArray(productData == null ? void 0 : productData.variant)) {
|
|
218
|
+
const matched = productData.variant.find(
|
|
219
|
+
(item) => Number(item == null ? void 0 : item.id) === selectedVariantId
|
|
220
|
+
);
|
|
221
|
+
const vPrice = Number((matched == null ? void 0 : matched.price) || 0);
|
|
222
|
+
if (!Number.isNaN(vPrice) && vPrice !== 0) return vPrice;
|
|
223
|
+
}
|
|
224
|
+
return Number((productData == null ? void 0 : productData.price) || 0);
|
|
225
|
+
}, [productData, skuValue == null ? void 0 : skuValue.product_variant_id]);
|
|
226
|
+
const priceRangeText = (0, import_react.useMemo)(() => {
|
|
227
|
+
const variantPrices = Array.isArray(productData == null ? void 0 : productData.variant) ? productData.variant.map((v) => Number((v == null ? void 0 : v.price) || 0)).filter((n) => !Number.isNaN(n) && n > 0) : [];
|
|
228
|
+
const base = Number((productData == null ? void 0 : productData.price) || 0);
|
|
229
|
+
const all = [...variantPrices, ...base > 0 ? [base] : []];
|
|
230
|
+
if (all.length === 0) return "";
|
|
231
|
+
const min = Math.min(...all);
|
|
232
|
+
const max = Math.max(...all);
|
|
233
|
+
if (min === max) return `${symbol}${min.toFixed(2)}`;
|
|
234
|
+
return `${symbol}${min.toFixed(2)}-${symbol}${max.toFixed(2)}`;
|
|
235
|
+
}, [productData, symbol]);
|
|
236
|
+
const itemTotal = (0, import_react.useMemo)(() => {
|
|
237
|
+
const deUnit = new import_decimal.default(unitPrice || 0);
|
|
238
|
+
const deQty = new import_decimal.default(quantity || 0);
|
|
239
|
+
return deUnit.mul(deQty).toNumber();
|
|
240
|
+
}, [quantity, unitPrice]);
|
|
241
|
+
const itemTotalText = (0, import_react.useMemo)(() => {
|
|
242
|
+
const deTotal = new import_decimal.default(itemTotal || 0);
|
|
243
|
+
const priceSign = deTotal.toNumber() < 0 ? "-" : "";
|
|
244
|
+
return `${priceSign}${symbol}${deTotal.abs().toNumber().toFixed(2)}`;
|
|
245
|
+
}, [itemTotal, symbol]);
|
|
246
|
+
const handleAddToCart = () => {
|
|
247
|
+
var _a2;
|
|
248
|
+
if (!productData) return;
|
|
249
|
+
(_a2 = skuOptionsSelectionRef.current) == null ? void 0 : _a2.validate();
|
|
250
|
+
if (!skuValue.product_variant_id) {
|
|
251
|
+
Toast.info(import_utils.locales.getText("pisell2.text.kiosk.sku.detail.toast.select.variant"));
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
;
|
|
255
|
+
const obj = {
|
|
256
|
+
productDetail: productData,
|
|
257
|
+
quantity,
|
|
258
|
+
variantId: skuValue.product_variant_id,
|
|
259
|
+
pricePerUnit: unitPrice,
|
|
260
|
+
isWebBuyWalletPass: true
|
|
261
|
+
};
|
|
262
|
+
interaction.utils.postMessageToApp({
|
|
263
|
+
module: "wallet_pass",
|
|
264
|
+
key: "buy_wallet_pass",
|
|
265
|
+
data: {
|
|
266
|
+
// 把洗好的数据放这里
|
|
267
|
+
productData: obj,
|
|
268
|
+
isEdit
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
};
|
|
272
|
+
const onBack = () => {
|
|
273
|
+
interaction.utils.postMessageToApp({
|
|
274
|
+
module: "wallet_pass",
|
|
275
|
+
key: "back"
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
const stageStyle = (0, import_react.useMemo)(() => {
|
|
279
|
+
return {
|
|
280
|
+
...style || {},
|
|
281
|
+
width: 1080,
|
|
282
|
+
height: 1800,
|
|
283
|
+
transform: `translateX(-50%) scale(${stageScale})`,
|
|
284
|
+
transformOrigin: "top center"
|
|
285
|
+
};
|
|
286
|
+
}, [stageScale, style]);
|
|
287
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail-viewport" }, /* @__PURE__ */ import_react.default.createElement(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
className: (0, import_classnames.default)("pisell-kiosk-sku-detail", className),
|
|
291
|
+
style: stageStyle
|
|
292
|
+
},
|
|
293
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__hero" }, coverUrl ? /* @__PURE__ */ import_react.default.createElement(
|
|
294
|
+
"img",
|
|
295
|
+
{
|
|
296
|
+
className: "pisell-kiosk-sku-detail__hero-img",
|
|
297
|
+
src: coverUrl,
|
|
298
|
+
alt: titleText || "product"
|
|
299
|
+
}
|
|
300
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__hero-placeholder" })), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__title" }, titleText || (isLoading ? "Loading…" : "")), !!descriptionText && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__desc" }, /* @__PURE__ */ import_react.default.createElement(
|
|
301
|
+
"div",
|
|
302
|
+
{
|
|
303
|
+
dangerouslySetInnerHTML: {
|
|
304
|
+
__html: descriptionText
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
)), !!priceRangeText && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__price-range" }, priceRangeText, " ", currency_code), !!errorText && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__error" }, errorText)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__options-card" }, productData && Array.isArray(productData == null ? void 0 : productData.variant) && productData.variant.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
308
|
+
import_skuOptionsSelection.default,
|
|
309
|
+
{
|
|
310
|
+
ref: skuOptionsSelectionRef,
|
|
311
|
+
dataSource: productData,
|
|
312
|
+
value: skuDefaultValue,
|
|
313
|
+
skuCardConfig: {
|
|
314
|
+
price: {
|
|
315
|
+
visible: true
|
|
316
|
+
},
|
|
317
|
+
variantPriceVisible: true
|
|
318
|
+
},
|
|
319
|
+
onChange: (v) => {
|
|
320
|
+
setSkuValue(v);
|
|
321
|
+
},
|
|
322
|
+
customScrollParent: ".pisell-kiosk-sku-detail"
|
|
323
|
+
}
|
|
324
|
+
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__options-loading" }, isLoading ? import_utils.locales.getText(
|
|
325
|
+
"pisell2.text.kiosk.sku.detail.loading.options"
|
|
326
|
+
) : ""))),
|
|
327
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__footer" }, /* @__PURE__ */ import_react.default.createElement(
|
|
328
|
+
import_materials.Button,
|
|
329
|
+
{
|
|
330
|
+
className: "pisell-kiosk-sku-detail__back-btn",
|
|
331
|
+
size: "large",
|
|
332
|
+
onClick: onBack
|
|
333
|
+
},
|
|
334
|
+
import_utils.locales.getText("pisell2.text.kiosk.sku.detail.btn.back")
|
|
335
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__footer-center" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-kiosk-sku-detail__item-total" }, import_utils.locales.getText("pisell2.text.kiosk.sku.detail.item.total"), ":", " ", itemTotalText)), /* @__PURE__ */ import_react.default.createElement(
|
|
336
|
+
import_materials.Button,
|
|
337
|
+
{
|
|
338
|
+
type: "primary",
|
|
339
|
+
className: "pisell-kiosk-sku-detail__add-btn",
|
|
340
|
+
size: "large",
|
|
341
|
+
onClick: handleAddToCart,
|
|
342
|
+
disabled: !productData || isLoading
|
|
343
|
+
},
|
|
344
|
+
import_utils.locales.getText(
|
|
345
|
+
isEdit ? "pisell2.text.kiosk.sku.detail.btn.update" : "pisell2.text.kiosk.sku.detail.btn.add.to.cart"
|
|
346
|
+
)
|
|
347
|
+
))
|
|
348
|
+
));
|
|
349
|
+
}
|
|
350
|
+
var kioskSkuDetail_default = KioskSkuDetail;
|
|
351
|
+
function getQueryFirstMatch(params) {
|
|
352
|
+
var _a;
|
|
353
|
+
if (typeof window === "undefined") return null;
|
|
354
|
+
if (!((_a = params == null ? void 0 : params.keys) == null ? void 0 : _a.length)) return null;
|
|
355
|
+
const keys = params.keys;
|
|
356
|
+
const tryRead = (raw) => {
|
|
357
|
+
if (!raw) return null;
|
|
358
|
+
const normalized = raw.startsWith("?") ? raw.slice(1) : raw;
|
|
359
|
+
const searchParams = new URLSearchParams(normalized);
|
|
360
|
+
for (const key of keys) {
|
|
361
|
+
const value = searchParams.get(key);
|
|
362
|
+
if (value) return value;
|
|
363
|
+
}
|
|
364
|
+
return null;
|
|
365
|
+
};
|
|
366
|
+
const fromSearch = tryRead(window.location.search || "");
|
|
367
|
+
if (fromSearch) return fromSearch;
|
|
368
|
+
const hash = window.location.hash || "";
|
|
369
|
+
const queryIndex = hash.indexOf("?");
|
|
370
|
+
if (queryIndex === -1) return null;
|
|
371
|
+
return tryRead(hash.slice(queryIndex + 1));
|
|
372
|
+
}
|
|
373
|
+
function useDesignStageScale(params) {
|
|
374
|
+
const designWidth = params.designWidth;
|
|
375
|
+
const designHeight = params.designHeight;
|
|
376
|
+
const [scale, setScale] = (0, import_react.useState)(1);
|
|
377
|
+
(0, import_react.useEffect)(() => {
|
|
378
|
+
const update = () => {
|
|
379
|
+
const viewportWidth = window.innerWidth || designWidth;
|
|
380
|
+
const viewportHeight = window.innerHeight || designHeight;
|
|
381
|
+
const nextScale = Math.min(
|
|
382
|
+
viewportWidth / designWidth,
|
|
383
|
+
viewportHeight / designHeight,
|
|
384
|
+
1
|
|
385
|
+
);
|
|
386
|
+
setScale(nextScale);
|
|
387
|
+
};
|
|
388
|
+
update();
|
|
389
|
+
window.addEventListener("resize", update);
|
|
390
|
+
return () => window.removeEventListener("resize", update);
|
|
391
|
+
}, [designHeight, designWidth]);
|
|
392
|
+
return scale;
|
|
393
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
.pisell-kiosk-sku-detail-viewport {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100vw;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
background: #f2f4f7;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pisell-kiosk-sku-detail {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 50%;
|
|
13
|
+
width: 1080px;
|
|
14
|
+
height: 1800px;
|
|
15
|
+
overflow-y: auto;
|
|
16
|
+
background: #f2f4f7;
|
|
17
|
+
background-size: cover;
|
|
18
|
+
background-position: center;
|
|
19
|
+
padding: 40px;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pisell-kiosk-sku-detail__content {
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
gap: 40px;
|
|
29
|
+
padding-bottom: 220px; // avoid overlap with footer
|
|
30
|
+
.pisell-pro-selector_header-content {
|
|
31
|
+
.pisell-pro-selector_header-content-title {
|
|
32
|
+
color: #101828;
|
|
33
|
+
font-size: 36px !important;
|
|
34
|
+
}
|
|
35
|
+
.pisell-lowcode-tag {
|
|
36
|
+
font-size: 22px !important;
|
|
37
|
+
margin-left: 20px !important;
|
|
38
|
+
padding-top: 5px !important;
|
|
39
|
+
padding-bottom: 5px !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.pisell-pro-selector_tip {
|
|
43
|
+
font-size: 36px !important;
|
|
44
|
+
color: #667085;
|
|
45
|
+
}
|
|
46
|
+
.pisell-sku-options-selection-variant-card__title {
|
|
47
|
+
font-size: 36px !important;
|
|
48
|
+
font-weight: 600 !important;
|
|
49
|
+
color: #101828;
|
|
50
|
+
}
|
|
51
|
+
.pisell-sku-options-selection-variant-card__price {
|
|
52
|
+
font-size: 30px !important;
|
|
53
|
+
}
|
|
54
|
+
.pisell-sku-options-selection-variant-card {
|
|
55
|
+
padding-top: 30px !important;
|
|
56
|
+
padding-bottom: 30px !important;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pisell-kiosk-sku-detail__hero {
|
|
61
|
+
width: 100%;
|
|
62
|
+
border-radius: 40px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
background: #ffffff;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pisell-kiosk-sku-detail__hero-img {
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 633px;
|
|
70
|
+
object-fit: cover;
|
|
71
|
+
display: block;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pisell-kiosk-sku-detail__hero-placeholder {
|
|
75
|
+
width: 100%;
|
|
76
|
+
height: 633px;
|
|
77
|
+
background: #f2f4f7;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.pisell-kiosk-sku-detail__header {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 20px;
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pisell-kiosk-sku-detail__title {
|
|
89
|
+
font-size: 60px;
|
|
90
|
+
line-height: 72px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
color: #000;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.pisell-kiosk-sku-detail__desc {
|
|
96
|
+
font-size: 36px;
|
|
97
|
+
line-height: 44px;
|
|
98
|
+
font-weight: 400;
|
|
99
|
+
color: #475467;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.pisell-kiosk-sku-detail__price-range {
|
|
103
|
+
font-size: 48px;
|
|
104
|
+
line-height: 60px;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
color: #f79009;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.pisell-kiosk-sku-detail__error {
|
|
110
|
+
font-size: 20px;
|
|
111
|
+
line-height: 30px;
|
|
112
|
+
color: #b42318;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.pisell-kiosk-sku-detail__options-card {
|
|
116
|
+
background: #fff;
|
|
117
|
+
border-radius: 40px;
|
|
118
|
+
padding: 40px;
|
|
119
|
+
.pisell-pro-selector_options-container {
|
|
120
|
+
grid-template-columns: 1fr 1fr !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.pisell-kiosk-sku-detail__options-loading {
|
|
125
|
+
font-size: 20px;
|
|
126
|
+
color: #667085;
|
|
127
|
+
padding: 20px 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.pisell-kiosk-sku-detail__footer {
|
|
131
|
+
// 注意:父容器有 transform(scale),fixed 会相对该容器定位(适配小分辨率缩放舞台)
|
|
132
|
+
position: fixed;
|
|
133
|
+
left: 30px;
|
|
134
|
+
right: 30px;
|
|
135
|
+
bottom: 30px;
|
|
136
|
+
transform: none;
|
|
137
|
+
width: auto;
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
gap: 20px;
|
|
142
|
+
padding: 30px;
|
|
143
|
+
background: #fff;
|
|
144
|
+
border: 1px solid #d0d5dd;
|
|
145
|
+
border-radius: 80px;
|
|
146
|
+
box-shadow:
|
|
147
|
+
0px 4px 6px -2px rgba(16, 24, 40, 0.03),
|
|
148
|
+
0px 12px 16px -4px rgba(16, 24, 40, 0.08);
|
|
149
|
+
box-sizing: border-box;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.pisell-kiosk-sku-detail__back-btn {
|
|
153
|
+
border-radius: 80px;
|
|
154
|
+
border: 1px solid #98a2b3 !important;
|
|
155
|
+
background: #fff !important;
|
|
156
|
+
color: #101828 !important;
|
|
157
|
+
height: 72px;
|
|
158
|
+
padding: 0 24px;
|
|
159
|
+
font-size: 20px;
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.pisell-kiosk-sku-detail__footer-center {
|
|
164
|
+
display: flex;
|
|
165
|
+
align-items: center;
|
|
166
|
+
gap: 20px;
|
|
167
|
+
// 靠右,并与右侧主按钮保持 20px 间距
|
|
168
|
+
margin-left: auto;
|
|
169
|
+
margin-right: 20px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.pisell-kiosk-sku-detail__item-total {
|
|
173
|
+
font-size: 20px;
|
|
174
|
+
line-height: 30px;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
color: #101828;
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.pisell-kiosk-sku-detail__qty {
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.pisell-kiosk-sku-detail__add-btn {
|
|
186
|
+
border-radius: 80px !important;
|
|
187
|
+
height: 72px;
|
|
188
|
+
padding: 0 36px !important;
|
|
189
|
+
font-size: 24px !important;
|
|
190
|
+
font-weight: 600 !important;
|
|
191
|
+
background: #ffbc0d !important;
|
|
192
|
+
border-color: #ffbc0d !important;
|
|
193
|
+
color: #fff !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.text.kiosk.sku.detail.btn.back': string;
|
|
4
|
+
'pisell2.text.kiosk.sku.detail.item.total': string;
|
|
5
|
+
'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
|
|
6
|
+
'pisell2.text.kiosk.sku.detail.btn.update': string;
|
|
7
|
+
'pisell2.text.kiosk.sku.detail.loading.options': string;
|
|
8
|
+
'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
|
|
9
|
+
};
|
|
10
|
+
'zh-CN': {
|
|
11
|
+
'pisell2.text.kiosk.sku.detail.btn.back': string;
|
|
12
|
+
'pisell2.text.kiosk.sku.detail.item.total': string;
|
|
13
|
+
'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
|
|
14
|
+
'pisell2.text.kiosk.sku.detail.btn.update': string;
|
|
15
|
+
'pisell2.text.kiosk.sku.detail.loading.options': string;
|
|
16
|
+
'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
|
|
17
|
+
};
|
|
18
|
+
'zh-TW': {
|
|
19
|
+
'pisell2.text.kiosk.sku.detail.btn.back': string;
|
|
20
|
+
'pisell2.text.kiosk.sku.detail.item.total': string;
|
|
21
|
+
'pisell2.text.kiosk.sku.detail.btn.add.to.cart': string;
|
|
22
|
+
'pisell2.text.kiosk.sku.detail.btn.update': string;
|
|
23
|
+
'pisell2.text.kiosk.sku.detail.loading.options': string;
|
|
24
|
+
'pisell2.text.kiosk.sku.detail.toast.select.variant': string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/kioskSkuDetail/locales.ts
|
|
20
|
+
var locales_exports = {};
|
|
21
|
+
__export(locales_exports, {
|
|
22
|
+
default: () => locales_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(locales_exports);
|
|
25
|
+
var locales_default = {
|
|
26
|
+
en: {
|
|
27
|
+
"pisell2.text.kiosk.sku.detail.btn.back": "Back",
|
|
28
|
+
"pisell2.text.kiosk.sku.detail.item.total": "Item total",
|
|
29
|
+
"pisell2.text.kiosk.sku.detail.btn.add.to.cart": "Add to cart",
|
|
30
|
+
"pisell2.text.kiosk.sku.detail.btn.update": "Update",
|
|
31
|
+
"pisell2.text.kiosk.sku.detail.loading.options": "Loading options…",
|
|
32
|
+
"pisell2.text.kiosk.sku.detail.toast.select.variant": "Please select a top-up option"
|
|
33
|
+
},
|
|
34
|
+
"zh-CN": {
|
|
35
|
+
"pisell2.text.kiosk.sku.detail.btn.back": "返回",
|
|
36
|
+
"pisell2.text.kiosk.sku.detail.item.total": "小计",
|
|
37
|
+
"pisell2.text.kiosk.sku.detail.btn.add.to.cart": "加入购物车",
|
|
38
|
+
"pisell2.text.kiosk.sku.detail.btn.update": "更新",
|
|
39
|
+
"pisell2.text.kiosk.sku.detail.loading.options": "正在加载选项…",
|
|
40
|
+
"pisell2.text.kiosk.sku.detail.toast.select.variant": "请选择充值选项"
|
|
41
|
+
},
|
|
42
|
+
"zh-TW": {
|
|
43
|
+
"pisell2.text.kiosk.sku.detail.btn.back": "返回",
|
|
44
|
+
"pisell2.text.kiosk.sku.detail.item.total": "小計",
|
|
45
|
+
"pisell2.text.kiosk.sku.detail.btn.add.to.cart": "加入購物車",
|
|
46
|
+
"pisell2.text.kiosk.sku.detail.btn.update": "更新",
|
|
47
|
+
"pisell2.text.kiosk.sku.detail.loading.options": "正在載入選項…",
|
|
48
|
+
"pisell2.text.kiosk.sku.detail.toast.select.variant": "請選擇充值選項"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
@@ -275,6 +275,11 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
|
|
|
275
275
|
(event) => {
|
|
276
276
|
if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf("securesuite") !== -1) {
|
|
277
277
|
if (typeof event.data.threeDSServerTransID == "string") {
|
|
278
|
+
setHistoryLog({
|
|
279
|
+
msg: "第三步: message 返回 threeDSServerTransID",
|
|
280
|
+
time: getCurrentTime(),
|
|
281
|
+
threeDSServerTransID: event.data.threeDSServerTransID
|
|
282
|
+
});
|
|
278
283
|
if (timer) {
|
|
279
284
|
clearTimeout(timer);
|
|
280
285
|
}
|