@pisell/private-materials 6.8.83 → 6.8.85
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 +1 -1
- package/build/lowcode/preview.js +150 -164
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/dashboard/serve.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/serve.d.ts +18 -0
- package/es/components/booking/info/client/serve.d.ts +2 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +11 -0
- package/es/components/booking/info/index.d.ts +1 -0
- 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.d.ts +3 -0
- 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/serve.d.ts +34 -0
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service2/utils.d.ts +219 -0
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +106 -0
- package/es/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +28 -0
- package/es/components/booking/info2/service/openNormalService.d.ts +34 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +36 -0
- package/es/components/booking/model.d.ts +121 -0
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +182 -0
- package/es/components/checkout/PaymentModal.js +4 -2
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +26 -0
- package/es/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +85 -0
- package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +32 -0
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +120 -0
- package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
- package/es/components/eftposPay/aggregatePayment/index.js +3 -0
- package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
- package/es/components/eftposPay/aggregatePayment/service.js +69 -0
- package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
- package/es/components/eftposPay/aggregatePayment/types.js +65 -0
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
- package/es/components/eftposPay/aggregatePayment/utils/logs.js +371 -0
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +1138 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/app.js +5 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.js +16 -12
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.js +12 -5
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/const.d.ts +6 -1
- package/es/components/eftposPay/const.js +3 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +3 -2
- package/es/components/eftposPay/hooks.js +12 -0
- package/es/components/eftposPay/huifu/Action.d.ts +8 -0
- package/es/components/eftposPay/huifu/Action.js +146 -0
- package/es/components/eftposPay/huifu/const.d.ts +5 -0
- package/es/components/eftposPay/huifu/const.js +70 -0
- package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/es/components/eftposPay/huifu/hooks.js +184 -0
- package/es/components/eftposPay/huifu/index.d.ts +5 -0
- package/es/components/eftposPay/huifu/index.js +196 -0
- package/es/components/eftposPay/huifu/index.less +180 -0
- package/es/components/eftposPay/huifu/types.d.ts +14 -0
- package/es/components/eftposPay/huifu/types.js +1 -0
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/index.js +5 -1
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/locales.d.ts +36 -0
- package/es/components/eftposPay/locales.js +42 -3
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +5 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/pay.js +6 -2
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +13 -6
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/kioskSkuDetail/index.d.ts +3 -0
- package/es/components/kioskSkuDetail/index.js +266 -173
- package/es/components/kioskSkuDetail/index.less +49 -7
- package/es/components/kioskSkuDetail/locales.d.ts +6 -0
- package/es/components/kioskSkuDetail/locales.js +9 -3
- package/es/components/list/types.d.ts +178 -0
- package/es/components/list/utils/index.d.ts +19 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/EFTPOS/index.js +8 -1
- package/es/components/pay/toB/types/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentList/serve.js +14 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +3 -0
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Cart/Product.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +84 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +11 -0
- package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +9 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -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/index.d.ts +16 -0
- package/es/components/ticketBooking/locales.d.ts +201 -0
- package/es/components/ticketBooking/serve.d.ts +288 -0
- package/es/components/ticketBooking/utils/index.d.ts +101 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/useEngineContext.d.ts +4 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +21 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +47 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +4 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
- 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 +3 -0
- package/es/plus/skuOptionsSelection/locales.js +3 -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 +431 -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/transformBundleGroup.d.ts +19 -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/WebPosLoginCpt.d.ts +9 -0
- package/es/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
- package/es/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
- package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/es/plus/webPosLogin/index.d.ts +12 -0
- package/es/plus/webPosLogin/locales.d.ts +49 -0
- package/es/plus/webPosLogin/types.d.ts +286 -0
- package/es/pro/Cards/index.d.ts +1 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +36 -3
- package/es/pro/Login2.0/steps/CodeInput.js +37 -7
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/Item.d.ts +14 -0
- package/es/pro/Selector/Selector.d.ts +14 -0
- package/es/pro/Selector/Selector.stories.d.ts +78 -0
- package/es/pro/Selector/SelectorGroup.d.ts +11 -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/hooks/useSelectionController.d.ts +49 -0
- package/es/pro/Selector/index.d.ts +11 -0
- package/es/pro/Selector/locales.d.ts +36 -0
- package/es/pro/Selector/types.d.ts +212 -0
- package/es/pro/Selector/utils/index.d.ts +49 -0
- package/es/pro/skuDetailModal/locales.d.ts +103 -0
- package/es/pro/skuDetailModal/types.d.ts +354 -0
- package/es/pro/skuDetailModal/utils.d.ts +4 -0
- package/es/test/setup.d.ts +1 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/dashboard/serve.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/serve.d.ts +18 -0
- package/lib/components/booking/info/client/serve.d.ts +2 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +11 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- 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.d.ts +3 -0
- 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/serve.d.ts +34 -0
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service2/utils.d.ts +219 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +106 -0
- package/lib/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +28 -0
- package/lib/components/booking/info2/service/openNormalService.d.ts +34 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +36 -0
- package/lib/components/booking/model.d.ts +121 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +182 -0
- package/lib/components/checkout/PaymentModal.js +5 -2
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +26 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +2 -1
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +85 -0
- package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +32 -0
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +133 -0
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
- package/lib/components/eftposPay/aggregatePayment/index.js +42 -0
- package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
- package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
- package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
- package/lib/components/eftposPay/aggregatePayment/utils/logs.js +294 -0
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +752 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/app.js +5 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.js +4 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/const.d.ts +6 -1
- package/lib/components/eftposPay/const.js +3 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +3 -2
- package/lib/components/eftposPay/hooks.js +16 -0
- package/lib/components/eftposPay/huifu/Action.d.ts +8 -0
- package/lib/components/eftposPay/huifu/Action.js +174 -0
- package/lib/components/eftposPay/huifu/const.d.ts +5 -0
- package/lib/components/eftposPay/huifu/const.js +86 -0
- package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/lib/components/eftposPay/huifu/hooks.js +186 -0
- package/lib/components/eftposPay/huifu/index.d.ts +5 -0
- package/lib/components/eftposPay/huifu/index.js +200 -0
- package/lib/components/eftposPay/huifu/index.less +180 -0
- package/lib/components/eftposPay/huifu/types.d.ts +14 -0
- package/lib/components/eftposPay/huifu/types.js +17 -0
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/index.js +5 -1
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/locales.d.ts +36 -0
- package/lib/components/eftposPay/locales.js +42 -3
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +7 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/pay.js +3 -2
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +13 -6
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/kioskSkuDetail/index.d.ts +3 -0
- package/lib/components/kioskSkuDetail/index.js +180 -113
- package/lib/components/kioskSkuDetail/index.less +49 -7
- package/lib/components/kioskSkuDetail/locales.d.ts +6 -0
- package/lib/components/kioskSkuDetail/locales.js +9 -3
- package/lib/components/list/types.d.ts +178 -0
- package/lib/components/list/utils/index.d.ts +19 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/EFTPOS/index.js +8 -1
- package/lib/components/pay/toB/types/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentList/serve.js +15 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +3 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +84 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +9 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -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/index.d.ts +16 -0
- package/lib/components/ticketBooking/locales.d.ts +201 -0
- package/lib/components/ticketBooking/serve.d.ts +288 -0
- package/lib/components/ticketBooking/utils/index.d.ts +101 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/useEngineContext.d.ts +4 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +21 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +47 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +2 -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 +3 -0
- package/lib/plus/skuOptionsSelection/locales.js +3 -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 +431 -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/transformBundleGroup.d.ts +19 -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/WebPosLoginCpt.d.ts +9 -0
- package/lib/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
- package/lib/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
- package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/lib/plus/webPosLogin/index.d.ts +12 -0
- package/lib/plus/webPosLogin/locales.d.ts +49 -0
- package/lib/plus/webPosLogin/types.d.ts +286 -0
- package/lib/pro/Cards/index.d.ts +1 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +26 -4
- package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/Item.d.ts +14 -0
- package/lib/pro/Selector/Selector.d.ts +14 -0
- package/lib/pro/Selector/Selector.stories.d.ts +78 -0
- package/lib/pro/Selector/SelectorGroup.d.ts +11 -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/hooks/useSelectionController.d.ts +49 -0
- package/lib/pro/Selector/index.d.ts +11 -0
- package/lib/pro/Selector/locales.d.ts +36 -0
- package/lib/pro/Selector/types.d.ts +212 -0
- package/lib/pro/Selector/utils/index.d.ts +49 -0
- package/lib/pro/skuDetailModal/locales.d.ts +103 -0
- package/lib/pro/skuDetailModal/types.d.ts +354 -0
- package/lib/pro/skuDetailModal/utils.d.ts +4 -0
- package/lib/test/setup.d.ts +1 -0
- package/lowcode/kiosk-sku-detail/meta.ts +229 -94
- package/package.json +1 -1
|
@@ -135,7 +135,20 @@ var locales_default = {
|
|
|
135
135
|
},
|
|
136
136
|
"page.eftpos-pay.text.tyro": (key) => {
|
|
137
137
|
return key;
|
|
138
|
-
}
|
|
138
|
+
},
|
|
139
|
+
// 汇付天下定制文案
|
|
140
|
+
"page.eftpos-pay.text.huifu.scan.title": "Scan to Pay (Alipay · WeChat Pay · UnionPay)",
|
|
141
|
+
"page.eftpos-pay.text.huifu.scan.gun.connected": "Scanner Connected",
|
|
142
|
+
"page.eftpos-pay.text.huifu.scan.gun.connected-desc": "Scan the customer’s payment code to collect payment",
|
|
143
|
+
"page.eftpos-pay.text.huifu.scan.gun.not-connected": "Scanner Not Connected",
|
|
144
|
+
"page.eftpos-pay.text.huifu.scan.gun.not-connected-desc": "Connect the scanner to scan the customer’s payment code",
|
|
145
|
+
"page.eftpos-pay.text.huifu.scan.camera-title": "Click to use the camera",
|
|
146
|
+
"page.eftpos-pay.text.huifu.scan.camera-desc": "Align the customer’s payment code within the frame",
|
|
147
|
+
"page.eftpos-pay.text.huifu.scan.input-title": "Or enter the payment code manually",
|
|
148
|
+
"page.eftpos-pay.text.huifu.scan.input-placeholder": "Enter payment code",
|
|
149
|
+
"page.eftpos-pay.text.huifu.scan.input-tip": "Tip: The payment code is 18 digits",
|
|
150
|
+
"page.eftpos-pay.text.huifu.scan.cancel": "Cancel",
|
|
151
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "Confirm Payment"
|
|
139
152
|
},
|
|
140
153
|
"zh-CN": {
|
|
141
154
|
"page.eftpos-pay.text.loading": (mode) => `${mode === "pay" || mode === "fullPay" ? "支付" : "退款"}进行中...`,
|
|
@@ -402,7 +415,20 @@ var locales_default = {
|
|
|
402
415
|
return "请使用以下选项之一回答此问题";
|
|
403
416
|
}
|
|
404
417
|
return key;
|
|
405
|
-
}
|
|
418
|
+
},
|
|
419
|
+
// 汇付天下定制文案
|
|
420
|
+
"page.eftpos-pay.text.huifu.scan.title": "扫码支付(支付宝 · 微信支付 · 银联)",
|
|
421
|
+
"page.eftpos-pay.text.huifu.scan.gun.connected": "扫码枪已连接",
|
|
422
|
+
"page.eftpos-pay.text.huifu.scan.gun.connected-desc": "直接扫描消费者付款码即可",
|
|
423
|
+
"page.eftpos-pay.text.huifu.scan.gun.not-connected": "未连接扫码枪",
|
|
424
|
+
"page.eftpos-pay.text.huifu.scan.gun.not-connected-desc": "连接扫码枪后可直接扫码消费者付款码",
|
|
425
|
+
"page.eftpos-pay.text.huifu.scan.camera-title": "点击可使用设备摄像头",
|
|
426
|
+
"page.eftpos-pay.text.huifu.scan.camera-desc": "将消费者付款码对准扫描框",
|
|
427
|
+
"page.eftpos-pay.text.huifu.scan.input-title": "或手动输入付款码",
|
|
428
|
+
"page.eftpos-pay.text.huifu.scan.input-placeholder": "请输入",
|
|
429
|
+
"page.eftpos-pay.text.huifu.scan.input-tip": "提示:付款码为18位数字",
|
|
430
|
+
"page.eftpos-pay.text.huifu.scan.cancel": "取消",
|
|
431
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "确认支付"
|
|
406
432
|
},
|
|
407
433
|
"zh-HK": {
|
|
408
434
|
"page.eftpos-pay.text.loading": (mode) => `${mode === "pay" || mode === "fullPay" ? "支付" : "退款"}進行中...`,
|
|
@@ -669,6 +695,19 @@ var locales_default = {
|
|
|
669
695
|
return "請使用以下選項之一回答此問題";
|
|
670
696
|
}
|
|
671
697
|
return key;
|
|
672
|
-
}
|
|
698
|
+
},
|
|
699
|
+
// 汇付天下定制文案
|
|
700
|
+
"page.eftpos-pay.text.huifu.scan.title": "掃碼支付(支付寶 · 微信支付 · 銀聯)",
|
|
701
|
+
"page.eftpos-pay.text.huifu.scan.gun.connected": "掃碼槍已連接",
|
|
702
|
+
"page.eftpos-pay.text.huifu.scan.gun.connected-desc": "直接掃描消費者付款碼即可",
|
|
703
|
+
"page.eftpos-pay.text.huifu.scan.gun.not-connected": "未連接掃碼槍",
|
|
704
|
+
"page.eftpos-pay.text.huifu.scan.gun.not-connected-desc": "連接掃碼槍後可直接掃碼消費者付款碼",
|
|
705
|
+
"page.eftpos-pay.text.huifu.scan.camera-title": "點擊可使用設備攝像頭",
|
|
706
|
+
"page.eftpos-pay.text.huifu.scan.camera-desc": "將消費者付款碼對準掃描框",
|
|
707
|
+
"page.eftpos-pay.text.huifu.scan.input-title": "或手動輸入付款碼",
|
|
708
|
+
"page.eftpos-pay.text.huifu.scan.input-placeholder": "請輸入",
|
|
709
|
+
"page.eftpos-pay.text.huifu.scan.input-tip": "提示:付款碼為18位數字",
|
|
710
|
+
"page.eftpos-pay.text.huifu.scan.cancel": "取消",
|
|
711
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "確認支付"
|
|
673
712
|
}
|
|
674
713
|
};
|
|
@@ -4,4 +4,5 @@ export { default as Payo } from './payo';
|
|
|
4
4
|
export { default as Windcave } from './windcave/windcave';
|
|
5
5
|
export { default as Tyro } from './tyro';
|
|
6
6
|
export { default as Linkly } from './linkly';
|
|
7
|
+
export { default as Huifu } from './huifu';
|
|
7
8
|
export declare const getInitState: (type: string, params?: any) => State;
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/eftposPay/manufacturer.tsx
|
|
30
30
|
var manufacturer_exports = {};
|
|
31
31
|
__export(manufacturer_exports, {
|
|
32
|
+
Huifu: () => import_huifu.default,
|
|
32
33
|
Linkly: () => import_linkly.default,
|
|
33
34
|
Payo: () => import_payo.default,
|
|
34
35
|
Tyro: () => import_tyro.default,
|
|
@@ -42,12 +43,15 @@ var import_const2 = __toESM(require("./payo/const"));
|
|
|
42
43
|
var import_const3 = __toESM(require("./tyro/const"));
|
|
43
44
|
var import_const4 = __toESM(require("./windcave/const"));
|
|
44
45
|
var import_const5 = __toESM(require("./linkly/const"));
|
|
46
|
+
var import_const6 = __toESM(require("./huifu/const"));
|
|
45
47
|
var import_helper = require("./helper");
|
|
46
48
|
var import_payo = __toESM(require("./payo"));
|
|
47
49
|
var import_windcave = __toESM(require("./windcave/windcave"));
|
|
48
50
|
var import_tyro = __toESM(require("./tyro"));
|
|
49
51
|
var import_linkly = __toESM(require("./linkly"));
|
|
52
|
+
var import_huifu = __toESM(require("./huifu"));
|
|
50
53
|
var getInitState = (type, params) => {
|
|
54
|
+
console.log("type = ", type);
|
|
51
55
|
switch (type) {
|
|
52
56
|
case import_const.EftposEnum.Payo:
|
|
53
57
|
return (0, import_const2.default)(params);
|
|
@@ -57,12 +61,15 @@ var getInitState = (type, params) => {
|
|
|
57
61
|
return (0, import_const3.default)(params);
|
|
58
62
|
case import_const.EftposEnum.Linkly:
|
|
59
63
|
return (0, import_const5.default)(params);
|
|
64
|
+
case import_const.EftposEnum.Huifu:
|
|
65
|
+
return (0, import_const6.default)(params);
|
|
60
66
|
default:
|
|
61
67
|
throw new Error("未知的厂商类型");
|
|
62
68
|
}
|
|
63
69
|
};
|
|
64
70
|
// Annotate the CommonJS export names for ESM import in node:
|
|
65
71
|
0 && (module.exports = {
|
|
72
|
+
Huifu,
|
|
66
73
|
Linkly,
|
|
67
74
|
Payo,
|
|
68
75
|
Tyro,
|
|
@@ -152,7 +152,7 @@ var Pay = ({
|
|
|
152
152
|
className: `pisell-lowcode__eft-pay-box ${className}`,
|
|
153
153
|
style: data.type === "step" ? {} : { display: "none" }
|
|
154
154
|
},
|
|
155
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
155
|
+
data.status !== import_const.StatusEnum.Init && /* @__PURE__ */ import_react.default.createElement(
|
|
156
156
|
import_header.default,
|
|
157
157
|
{
|
|
158
158
|
status: data.status,
|
|
@@ -180,7 +180,8 @@ var Pay = ({
|
|
|
180
180
|
formatAmount
|
|
181
181
|
}
|
|
182
182
|
) : null,
|
|
183
|
-
data.eftpos === "linkly" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Linkly, { key: data.key, api, onChange }) : null
|
|
183
|
+
data.eftpos === "linkly" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Linkly, { key: data.key, api, onChange }) : null,
|
|
184
|
+
data.eftpos === "huifu" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Huifu, { key: data.key, onChange, isNativeApp: isMobile }) : null
|
|
184
185
|
) : null, data.type === import_const.PayRouteEnum.Unset && Comm ? /* @__PURE__ */ import_react.default.createElement(
|
|
185
186
|
Comm,
|
|
186
187
|
{
|
|
@@ -91,6 +91,10 @@ export declare type State = {
|
|
|
91
91
|
};
|
|
92
92
|
backup?: Omit<State, 'backup'>;
|
|
93
93
|
client: ClientEnum;
|
|
94
|
+
/** 原始参数 - 用于 retry 时完整恢复 */
|
|
95
|
+
originalParams?: {
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
};
|
|
94
98
|
};
|
|
95
99
|
export declare type Action = {
|
|
96
100
|
type: EActionTypes;
|
|
@@ -174,7 +178,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
178
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
179
|
type: EActionTypes;
|
|
176
180
|
payload: {
|
|
177
|
-
status: "
|
|
181
|
+
status: "loading" | "warn" | "success" | "fail" | "question";
|
|
178
182
|
};
|
|
179
183
|
};
|
|
180
184
|
/**
|
|
@@ -295,20 +299,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
299
|
name?: string | undefined;
|
|
296
300
|
symbol?: string | undefined;
|
|
297
301
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
302
|
+
mode?: "refund" | "fullPay" | "pay" | "query" | undefined;
|
|
299
303
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
|
301
|
-
action?: "amount" | "
|
|
304
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu" | undefined;
|
|
305
|
+
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
306
|
key?: number | undefined;
|
|
303
307
|
step?: number | undefined;
|
|
304
308
|
title?: string | undefined;
|
|
305
309
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
310
|
+
type?: "step" | "unset" | undefined;
|
|
307
311
|
render?: boolean | undefined;
|
|
308
312
|
net?: boolean | undefined;
|
|
309
313
|
component?: string | undefined;
|
|
310
314
|
form?: string | undefined;
|
|
311
|
-
status?: "
|
|
315
|
+
status?: "loading" | "warn" | "success" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
316
|
warn?: string | undefined;
|
|
313
317
|
steps?: {
|
|
314
318
|
/** 用于重置当前步骤 */
|
|
@@ -344,6 +348,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
344
348
|
} | undefined;
|
|
345
349
|
backup?: Omit<State, "backup"> | undefined;
|
|
346
350
|
client?: ClientEnum | undefined;
|
|
351
|
+
originalParams?: {
|
|
352
|
+
[key: string]: unknown;
|
|
353
|
+
} | undefined;
|
|
347
354
|
};
|
|
348
355
|
};
|
|
349
356
|
export declare function reducers(state: State, action: Action): State;
|
|
@@ -9,6 +9,9 @@ import './index.less';
|
|
|
9
9
|
*/
|
|
10
10
|
declare function KioskSkuDetail(props: KioskSkuDetailProps): JSX.Element;
|
|
11
11
|
export default KioskSkuDetail;
|
|
12
|
+
/**
|
|
13
|
+
* @description 从原生回调 payload 中提取 productId
|
|
14
|
+
*/
|
|
12
15
|
export interface KioskSkuDetailProps {
|
|
13
16
|
/** 商品 id(可选:目前默认从 URL 读取,props 仅作为兜底以兼容老用法) */
|
|
14
17
|
productId?: number | string;
|
|
@@ -39,7 +39,6 @@ var import_materials = require("@pisell/materials");
|
|
|
39
39
|
var import_dayjs = __toESM(require("dayjs"));
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
41
|
var import_skuOptionsSelection = __toESM(require("../../plus/skuOptionsSelection"));
|
|
42
|
-
var import_pisellNumberSelector = __toESM(require("../../pro/pisellNumberSelector"));
|
|
43
42
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
44
43
|
var import_serve = require("../booking/info/service/serve");
|
|
45
44
|
var import_locales = __toESM(require("./locales"));
|
|
@@ -47,41 +46,21 @@ var import_index = require("./index.less");
|
|
|
47
46
|
var import_utils2 = require("../booking/utils");
|
|
48
47
|
function KioskSkuDetail(props) {
|
|
49
48
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
50
|
-
const { className, style,
|
|
49
|
+
const { className, style, onAddToCart } = props;
|
|
51
50
|
const productIdFromUrl = (0, import_react.useMemo)(() => {
|
|
52
51
|
return getQueryFirstMatch({ keys: ["productId", "product_id", "id"] });
|
|
53
52
|
}, []);
|
|
54
|
-
const
|
|
53
|
+
const initialProductId = productIdFromUrl ?? props.productId ?? null;
|
|
55
54
|
const scheduleDate = (0, import_react.useMemo)(() => (0, import_dayjs.default)().format("YYYY-MM-DD"), []);
|
|
55
|
+
const stageScale = useDesignStageScale({ designWidth: 1080, designHeight: 1800 });
|
|
56
56
|
const context = (0, import_useEngineContext.default)();
|
|
57
57
|
const { interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
58
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
59
|
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
60
|
-
const { store, getData } = ((_d = context.appHelper) == null ? void 0 : _d.utils) || {};
|
|
60
|
+
const { store, getData, Toast } = ((_d = context.appHelper) == null ? void 0 : _d.utils) || {};
|
|
61
61
|
const state = (_e = store == null ? void 0 : store.getState) == null ? void 0 : _e.call(store);
|
|
62
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
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
|
-
(0, import_react.useEffect)(() => {
|
|
65
|
-
var _a2, _b2;
|
|
66
|
-
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
67
|
-
module: "tickets",
|
|
68
|
-
key: "page_load"
|
|
69
|
-
});
|
|
70
|
-
interaction.utils.mountFunction(
|
|
71
|
-
"tickets",
|
|
72
|
-
"restore_buy_wallet_pass",
|
|
73
|
-
(data) => {
|
|
74
|
-
console.log("重置状态", data);
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
interaction.utils.mountFunction(
|
|
78
|
-
"tickets",
|
|
79
|
-
"edit_buy_wallet_pass",
|
|
80
|
-
(data) => {
|
|
81
|
-
console.log("编辑状态", data);
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}, []);
|
|
85
64
|
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
86
65
|
const [errorText, setErrorText] = (0, import_react.useState)(null);
|
|
87
66
|
const [productData, setProductData] = (0, import_react.useState)(null);
|
|
@@ -98,47 +77,130 @@ function KioskSkuDetail(props) {
|
|
|
98
77
|
bundle: [],
|
|
99
78
|
option: []
|
|
100
79
|
});
|
|
101
|
-
(0, import_react.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
+
console.log("准备 load", productId);
|
|
102
|
+
if (productId === null || typeof productId === "undefined" || productId === "") return;
|
|
103
|
+
const reqId = ++requestSeqRef.current;
|
|
104
|
+
setIsLoading(true);
|
|
105
|
+
setErrorText(null);
|
|
106
|
+
try {
|
|
107
|
+
const open_deposit = (getData == null ? void 0 : getData("bookingv2_deposit")) || 0;
|
|
108
|
+
const params = { open_deposit };
|
|
109
|
+
params.schedule_date = scheduleDate;
|
|
110
|
+
const res = await (0, import_serve.getProductDetail)(String(productId), params);
|
|
111
|
+
console.log("详情接口");
|
|
112
|
+
console.log(JSON.stringify(res));
|
|
113
|
+
const apiData = ((res == null ? void 0 : res.id) ? res : res == null ? void 0 : res.data) || {};
|
|
114
|
+
if (reqId !== requestSeqRef.current) return;
|
|
115
|
+
setProductData(apiData);
|
|
116
|
+
console.log("已设置 productData");
|
|
117
|
+
const normalizedProductId = Number(
|
|
118
|
+
(apiData == null ? void 0 : apiData.product_id) || (apiData == null ? void 0 : apiData.id) || productId || 0
|
|
119
|
+
);
|
|
120
|
+
const minNumUnit = Number((apiData == null ? void 0 : apiData.min_num_unit) || 1);
|
|
121
|
+
if (options.shouldInitQuantity !== false) {
|
|
119
122
|
setQuantity(minNumUnit > 0 ? minNumUnit : 1);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
}
|
|
124
|
+
const defaultVariantId = (() => {
|
|
125
|
+
var _a2, _b2;
|
|
126
|
+
const firstVariantId = Array.isArray(apiData == null ? void 0 : apiData.variant) ? Number(((_b2 = (_a2 = apiData == null ? void 0 : apiData.variant) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.id) || 0) : 0;
|
|
127
|
+
return Number.isFinite(firstVariantId) ? firstVariantId : 0;
|
|
128
|
+
})();
|
|
129
|
+
const initialSkuValue = {
|
|
130
|
+
product_id: normalizedProductId,
|
|
131
|
+
product_variant_id: defaultVariantId,
|
|
132
|
+
bundle: [],
|
|
133
|
+
option: []
|
|
134
|
+
};
|
|
135
|
+
if (options.shouldInitSku !== false) {
|
|
126
136
|
setSkuValue(initialSkuValue);
|
|
127
137
|
setSkuDefaultValue(initialSkuValue);
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
setIsLoading(false);
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
var _a2;
|
|
140
|
+
if (initialSkuValue.product_variant_id) {
|
|
141
|
+
(_a2 = skuOptionsSelectionRef.current) == null ? void 0 : _a2.validate();
|
|
142
|
+
}
|
|
143
|
+
}, 0);
|
|
135
144
|
}
|
|
145
|
+
} catch (error) {
|
|
146
|
+
console.error(error);
|
|
147
|
+
setErrorText("Failed to load product detail");
|
|
148
|
+
} finally {
|
|
149
|
+
if (reqId !== requestSeqRef.current) return;
|
|
150
|
+
setIsLoading(false);
|
|
136
151
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
152
|
+
}, [getData, scheduleDate]);
|
|
153
|
+
const loadRef = (0, import_react.useRef)(loadByProductId);
|
|
154
|
+
loadRef.current = loadByProductId;
|
|
155
|
+
(0, import_react.useEffect)(() => {
|
|
156
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
157
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
158
|
+
module: "wallet_pass",
|
|
159
|
+
key: "page_load"
|
|
160
|
+
});
|
|
161
|
+
(_d2 = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.mountFunction) == null ? void 0 : _d2.call(
|
|
162
|
+
_c2,
|
|
163
|
+
"wallet_pass",
|
|
164
|
+
"restore_buy_wallet_pass",
|
|
165
|
+
(id) => {
|
|
166
|
+
console.log("重置状态", id);
|
|
167
|
+
console.log("宽", window.innerWidth);
|
|
168
|
+
console.log("高", window.innerHeight);
|
|
169
|
+
console.log("设备像素比", window.devicePixelRatio);
|
|
170
|
+
resetForInit();
|
|
171
|
+
if (id || id === 0) loadRef.current(id);
|
|
172
|
+
setIsEdit(false);
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
(_f2 = (_e2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e2.mountFunction) == null ? void 0 : _f2.call(
|
|
176
|
+
_e2,
|
|
177
|
+
"wallet_pass",
|
|
178
|
+
"edit_buy_wallet_pass",
|
|
179
|
+
(data) => {
|
|
180
|
+
console.log("编辑状态", data);
|
|
181
|
+
const productData2 = JSON.parse(data);
|
|
182
|
+
setProductData(productData2.productDetail);
|
|
183
|
+
loadRef.current(productData2.productDetail.id, {
|
|
184
|
+
shouldInitSku: false,
|
|
185
|
+
shouldInitQuantity: false
|
|
186
|
+
});
|
|
187
|
+
setSkuValue({
|
|
188
|
+
product_id: productData2.productDetail.id,
|
|
189
|
+
product_variant_id: Number(productData2.variantId),
|
|
190
|
+
bundle: [],
|
|
191
|
+
option: []
|
|
192
|
+
});
|
|
193
|
+
setSkuDefaultValue({
|
|
194
|
+
product_id: productData2.productDetail.id,
|
|
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
|
+
}, []);
|
|
142
204
|
const coverUrl = (0, import_react.useMemo)(() => {
|
|
143
205
|
return (productData == null ? void 0 : productData.cover) || (productData == null ? void 0 : productData.image) || "";
|
|
144
206
|
}, [productData]);
|
|
@@ -182,55 +244,51 @@ function KioskSkuDetail(props) {
|
|
|
182
244
|
return `${priceSign}${symbol}${deTotal.abs().toNumber().toFixed(2)}`;
|
|
183
245
|
}, [itemTotal, symbol]);
|
|
184
246
|
const handleAddToCart = () => {
|
|
247
|
+
var _a2;
|
|
185
248
|
if (!productData) return;
|
|
186
|
-
|
|
187
|
-
skuValue.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const { id, bundle_item = [] } = productData.bundle_group[i];
|
|
193
|
-
for (let j = 0; j < bundle_item.length; j++) {
|
|
194
|
-
if (item.id === bundle_item[j].bundle_product_id) {
|
|
195
|
-
bundle_group_id = id;
|
|
196
|
-
targetBundleData = bundle_item[j];
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
productBundle.push({
|
|
202
|
-
bundle_group_id,
|
|
203
|
-
bundle_id: targetBundleData.id,
|
|
204
|
-
bundle_product_id: item.id,
|
|
205
|
-
bundle_variant_id: targetBundleData.bundle_variant_id,
|
|
206
|
-
num: item.num,
|
|
207
|
-
extension_id: targetBundleData.extension_id,
|
|
208
|
-
extension_type: targetBundleData.extension_type
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
productData.option_group = [];
|
|
212
|
-
productData.variant_group = [];
|
|
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
|
+
;
|
|
213
255
|
const obj = {
|
|
214
256
|
productDetail: productData,
|
|
215
257
|
quantity,
|
|
258
|
+
variantId: skuValue.product_variant_id,
|
|
216
259
|
pricePerUnit: unitPrice,
|
|
217
|
-
|
|
218
|
-
productBundle
|
|
260
|
+
isWebBuyWalletPass: true
|
|
219
261
|
};
|
|
220
262
|
interaction.utils.postMessageToApp({
|
|
221
|
-
module: "
|
|
263
|
+
module: "wallet_pass",
|
|
222
264
|
key: "buy_wallet_pass",
|
|
223
265
|
data: {
|
|
224
266
|
// 把洗好的数据放这里
|
|
225
|
-
productData:
|
|
267
|
+
productData: obj,
|
|
268
|
+
isEdit
|
|
226
269
|
}
|
|
227
270
|
});
|
|
228
271
|
};
|
|
229
|
-
|
|
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(
|
|
230
288
|
"div",
|
|
231
289
|
{
|
|
232
290
|
className: (0, import_classnames.default)("pisell-kiosk-sku-detail", className),
|
|
233
|
-
style
|
|
291
|
+
style: stageStyle
|
|
234
292
|
},
|
|
235
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(
|
|
236
294
|
"img",
|
|
@@ -246,9 +304,10 @@ function KioskSkuDetail(props) {
|
|
|
246
304
|
__html: descriptionText
|
|
247
305
|
}
|
|
248
306
|
}
|
|
249
|
-
)), !!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 ? /* @__PURE__ */ import_react.default.createElement(
|
|
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(
|
|
250
308
|
import_skuOptionsSelection.default,
|
|
251
309
|
{
|
|
310
|
+
ref: skuOptionsSelectionRef,
|
|
252
311
|
dataSource: productData,
|
|
253
312
|
value: skuDefaultValue,
|
|
254
313
|
skuCardConfig: {
|
|
@@ -273,22 +332,7 @@ function KioskSkuDetail(props) {
|
|
|
273
332
|
onClick: onBack
|
|
274
333
|
},
|
|
275
334
|
import_utils.locales.getText("pisell2.text.kiosk.sku.detail.btn.back")
|
|
276
|
-
), /* @__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(
|
|
277
|
-
import_pisellNumberSelector.default,
|
|
278
|
-
{
|
|
279
|
-
value: quantity,
|
|
280
|
-
width: "140px",
|
|
281
|
-
onChange: (v) => {
|
|
282
|
-
if (!v) return;
|
|
283
|
-
setQuantity(v);
|
|
284
|
-
},
|
|
285
|
-
min: 1,
|
|
286
|
-
max: 99999,
|
|
287
|
-
step: 1,
|
|
288
|
-
size: "large",
|
|
289
|
-
enablePriceAdjust: false
|
|
290
|
-
}
|
|
291
|
-
))), /* @__PURE__ */ import_react.default.createElement(
|
|
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(
|
|
292
336
|
import_materials.Button,
|
|
293
337
|
{
|
|
294
338
|
type: "primary",
|
|
@@ -297,9 +341,11 @@ function KioskSkuDetail(props) {
|
|
|
297
341
|
onClick: handleAddToCart,
|
|
298
342
|
disabled: !productData || isLoading
|
|
299
343
|
},
|
|
300
|
-
import_utils.locales.getText(
|
|
344
|
+
import_utils.locales.getText(
|
|
345
|
+
isEdit ? "pisell2.text.kiosk.sku.detail.btn.update" : "pisell2.text.kiosk.sku.detail.btn.add.to.cart"
|
|
346
|
+
)
|
|
301
347
|
))
|
|
302
|
-
);
|
|
348
|
+
));
|
|
303
349
|
}
|
|
304
350
|
var kioskSkuDetail_default = KioskSkuDetail;
|
|
305
351
|
function getQueryFirstMatch(params) {
|
|
@@ -324,3 +370,24 @@ function getQueryFirstMatch(params) {
|
|
|
324
370
|
if (queryIndex === -1) return null;
|
|
325
371
|
return tryRead(hash.slice(queryIndex + 1));
|
|
326
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
|
+
}
|