@pisell/private-materials 6.3.137 → 6.3.139
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 +153 -426
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/hooks.d.ts +107 -0
- package/es/components/appointmentBooking/utils.d.ts +227 -0
- package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +24 -5
- package/es/components/authentication/admin/ChannelAuthSetting/index.js +1 -1
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/utils.d.ts +47 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +9 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.d.ts +7 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +248 -0
- package/es/components/booking/info2/index.d.ts +12 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +11 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +1489 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +120 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
- package/es/components/ecocup/components/CustomerCard/index.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +21 -0
- package/es/components/eftposPay/app.d.ts +10 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +3 -0
- package/es/components/eftposPay/component/fail/index.d.ts +3 -0
- package/es/components/eftposPay/component/fail/network.d.ts +9 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +10 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +9 -0
- package/es/components/eftposPay/component/signature/index.d.ts +9 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +23 -0
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +4 -0
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/index.d.ts +2 -0
- package/es/components/eftposPay/pay.d.ts +20 -0
- package/es/components/eftposPay/payo/config.d.ts +13 -0
- package/es/components/eftposPay/payo/hooks.d.ts +10 -0
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tip.d.ts +10 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/tyro/index.d.ts +9 -0
- package/es/components/eftposPay/utils/payLog.d.ts +81 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +23 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +7 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/kioskSkuDetail/index.d.ts +39 -0
- package/es/components/kioskSkuDetail/locales.d.ts +48 -0
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +16 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +15 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +83 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +22 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +25 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +16 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/pay/toC/locales.d.ts +631 -0
- package/es/components/pay/toC/payGroup.d.ts +59 -0
- package/es/components/pay/toC/serve.d.ts +87 -0
- package/es/components/pay/toC/utils.d.ts +65 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/ruleSetting/locales.d.ts +78 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/scanOrder/components/Cart/index.d.ts +2 -0
- package/es/components/scanOrder/components/Cart/index.js +58 -24
- package/es/components/scanOrder/components/Cart/index.less +61 -8
- package/es/components/scanOrder/components/Check/index.js +232 -51
- package/es/components/scanOrder/components/Check/index.less +30 -0
- package/es/components/scanOrder/components/Content/index.js +358 -121
- package/es/components/scanOrder/components/Footer/index.d.ts +2 -0
- package/es/components/scanOrder/components/Footer/index.js +4 -2
- package/es/components/scanOrder/components/Footer/index.less +16 -7
- package/es/components/scanOrder/components/FulfillmentMode/index.d.ts +11 -0
- package/es/components/scanOrder/components/FulfillmentMode/index.js +90 -0
- package/es/components/scanOrder/components/FulfillmentMode/index.less +40 -0
- package/es/components/scanOrder/components/ManualPickupRefModal/index.d.ts +16 -0
- package/es/components/scanOrder/components/ManualPickupRefModal/index.js +87 -0
- package/es/components/scanOrder/components/ManualPickupRefModal/index.less +61 -0
- package/es/components/scanOrder/context.js +104 -21
- package/es/components/scanOrder/locales.d.ts +55 -0
- package/es/components/scanOrder/locales.js +55 -0
- package/es/components/scanOrder/types.d.ts +23 -0
- package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +2 -1
- package/es/components/scanOrder/utils/toShoppingCartProducts.js +15 -9
- package/es/components/scanOrder/utils/transformProductDetail.d.ts +2 -1
- package/es/components/scanOrder/utils/transformProductDetail.js +7 -6
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- 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/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.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/shoppingCart/index.d.ts +1 -0
- package/es/components/systemSettings/registry/components/GroupModal.js +8 -1
- package/es/components/systemSettings/registry/components/ItemModal.js +3 -0
- package/es/components/systemSettings/registry/index.js +3 -1
- package/es/components/systemSettings/registry/services.d.ts +2 -0
- package/es/components/systemSettings/registry/types.d.ts +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/es/components/ticketBooking/index.d.ts +7 -0
- package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.js +130 -18
- package/es/components/venueBooking/context.js +38 -12
- package/es/components/venueBooking/hooks.d.ts +16 -3
- package/es/components/venueBooking/hooks.js +16 -4
- package/es/components/venueBooking/types.d.ts +19 -2
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/index.d.ts +87 -0
- package/es/index.js +1 -1
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/es/plus/pisellSalesProductCard/index.js +16 -1
- package/es/plus/pisellSalesProductCard/types.d.ts +21 -1
- package/es/plus/productSelect/ProductCard/ProductCardV2.js +6 -2
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +3 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +15 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/index.d.ts +5 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +58 -0
- package/es/plus/skuOptionsSelection/types.d.ts +458 -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/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/es/pro/Cards/components/SKUCard/index.d.ts +5 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/NumericStepper/index.d.ts +19 -0
- package/es/pro/NumericStepper/index.js +37 -6
- package/es/pro/Selector/demo.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/hooks.d.ts +107 -0
- package/lib/components/appointmentBooking/utils.d.ts +227 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +19 -4
- package/lib/components/authentication/admin/ChannelAuthSetting/index.js +1 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/utils.d.ts +47 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +9 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.d.ts +7 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +248 -0
- package/lib/components/booking/info2/index.d.ts +12 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +1489 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +120 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +21 -0
- package/lib/components/eftposPay/app.d.ts +10 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +3 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +3 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +9 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +10 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +9 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +9 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +23 -0
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +4 -0
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/index.d.ts +2 -0
- package/lib/components/eftposPay/pay.d.ts +20 -0
- package/lib/components/eftposPay/payo/config.d.ts +13 -0
- package/lib/components/eftposPay/payo/hooks.d.ts +10 -0
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tip.d.ts +10 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/tyro/index.d.ts +9 -0
- package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +23 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +7 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/kioskSkuDetail/index.d.ts +39 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +48 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +16 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +15 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +83 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +22 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +25 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +16 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/pay/toC/locales.d.ts +631 -0
- package/lib/components/pay/toC/payGroup.d.ts +59 -0
- package/lib/components/pay/toC/serve.d.ts +87 -0
- package/lib/components/pay/toC/utils.d.ts +65 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/ruleSetting/locales.d.ts +78 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/scanOrder/components/Cart/index.d.ts +2 -0
- package/lib/components/scanOrder/components/Cart/index.js +43 -9
- package/lib/components/scanOrder/components/Cart/index.less +61 -8
- package/lib/components/scanOrder/components/Check/index.js +97 -8
- package/lib/components/scanOrder/components/Check/index.less +30 -0
- package/lib/components/scanOrder/components/Content/index.js +215 -69
- package/lib/components/scanOrder/components/Footer/index.d.ts +2 -0
- package/lib/components/scanOrder/components/Footer/index.js +2 -2
- package/lib/components/scanOrder/components/Footer/index.less +16 -7
- package/lib/components/scanOrder/components/FulfillmentMode/index.d.ts +11 -0
- package/lib/components/scanOrder/components/FulfillmentMode/index.js +96 -0
- package/lib/components/scanOrder/components/FulfillmentMode/index.less +40 -0
- package/lib/components/scanOrder/components/ManualPickupRefModal/index.d.ts +16 -0
- package/lib/components/scanOrder/components/ManualPickupRefModal/index.js +116 -0
- package/lib/components/scanOrder/components/ManualPickupRefModal/index.less +61 -0
- package/lib/components/scanOrder/context.js +80 -12
- package/lib/components/scanOrder/locales.d.ts +55 -0
- package/lib/components/scanOrder/locales.js +55 -0
- package/lib/components/scanOrder/types.d.ts +23 -0
- package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +2 -1
- package/lib/components/scanOrder/utils/toShoppingCartProducts.js +8 -5
- package/lib/components/scanOrder/utils/transformProductDetail.d.ts +2 -1
- package/lib/components/scanOrder/utils/transformProductDetail.js +1 -9
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- 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/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.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/shoppingCart/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/components/GroupModal.js +71 -72
- package/lib/components/systemSettings/registry/components/ItemModal.js +2 -1
- package/lib/components/systemSettings/registry/index.js +3 -1
- package/lib/components/systemSettings/registry/services.d.ts +2 -0
- package/lib/components/systemSettings/registry/types.d.ts +3 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +12 -0
- package/lib/components/ticketBooking/index.d.ts +7 -0
- package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.js +119 -19
- package/lib/components/venueBooking/context.js +16 -7
- package/lib/components/venueBooking/hooks.d.ts +16 -3
- package/lib/components/venueBooking/hooks.js +8 -2
- package/lib/components/venueBooking/types.d.ts +19 -2
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/index.d.ts +87 -0
- package/lib/index.js +2 -0
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/lib/plus/pisellSalesProductCard/index.js +10 -0
- package/lib/plus/pisellSalesProductCard/types.d.ts +21 -1
- package/lib/plus/productSelect/ProductCard/ProductCardV2.js +6 -2
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/index.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +58 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +458 -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/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
- package/lib/pro/Cards/components/SKUCard/index.d.ts +5 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/NumericStepper/index.d.ts +19 -0
- package/lib/pro/NumericStepper/index.js +21 -4
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lowcode/admin-auth-channel-auth/meta.ts +116 -0
- package/lowcode/admin-auth-online-shop-auth/meta.ts +81 -5
- package/package.json +1 -1
|
@@ -14,7 +14,9 @@ export default function Footer(props) {
|
|
|
14
14
|
var cartItems = props.cartItems,
|
|
15
15
|
summary = props.summary,
|
|
16
16
|
actionText = props.actionText,
|
|
17
|
-
onAction = props.onAction
|
|
17
|
+
onAction = props.onAction,
|
|
18
|
+
_props$disabled = props.disabled,
|
|
19
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
18
20
|
var _useState = useState(false),
|
|
19
21
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
22
|
cartOpen = _useState2[0],
|
|
@@ -51,7 +53,7 @@ export default function Footer(props) {
|
|
|
51
53
|
}))), /*#__PURE__*/React.createElement(Button, {
|
|
52
54
|
type: "primary",
|
|
53
55
|
size: "large",
|
|
54
|
-
className: "pisell-scan-order-footer-btn",
|
|
56
|
+
className: "pisell-scan-order-footer-btn".concat(disabled ? ' pisell-scan-order-footer-btn-disabled' : ''),
|
|
55
57
|
onClick: onAction
|
|
56
58
|
}, actionText))), /*#__PURE__*/React.createElement(Cart, {
|
|
57
59
|
open: cartOpen,
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
justify-content: space-between;
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: 12px;
|
|
9
|
-
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
height: 70px;
|
|
11
|
+
padding: 0 16px;
|
|
10
12
|
border-top: 1px solid #eaecf0;
|
|
11
13
|
background: #f9fafb;
|
|
12
|
-
border-radius:
|
|
14
|
+
border-radius: 0;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.pisell-scan-order-footer-left {
|
|
@@ -33,8 +35,13 @@
|
|
|
33
35
|
|
|
34
36
|
.pisell-scan-order-footer-btn {
|
|
35
37
|
min-width: 128px;
|
|
36
|
-
height:
|
|
37
|
-
border-radius:
|
|
38
|
+
height: 48px;
|
|
39
|
+
border-radius: 12px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pisell-scan-order-footer-btn-disabled {
|
|
43
|
+
opacity: 0.45;
|
|
44
|
+
cursor: not-allowed;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
.pisell-scan-order-footer-right {
|
|
@@ -57,8 +64,10 @@
|
|
|
57
64
|
right: 0;
|
|
58
65
|
bottom: 0;
|
|
59
66
|
z-index: 30;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
padding-bottom:
|
|
67
|
+
height: calc(70px + constant(safe-area-inset-bottom));
|
|
68
|
+
height: calc(70px + env(safe-area-inset-bottom, 0px));
|
|
69
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
70
|
+
padding-bottom: env(safe-area-inset-bottom, 0px);
|
|
71
|
+
border-radius: 0;
|
|
63
72
|
}
|
|
64
73
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
/**
|
|
4
|
+
* FulfillmentMode
|
|
5
|
+
*
|
|
6
|
+
* 通过 scanOrder module 读取 getFulfillmentModes() 返回的 { enableTableService, enablePickup }:
|
|
7
|
+
* - 两个都开启:渲染可切换的 Radio.Group,默认 Table service,挂载即同步一次 setPickupReferenceMode。
|
|
8
|
+
* - 只开启一个:仅渲染单行文案提示当前取餐方式,并同步一次 setPickupReferenceMode。
|
|
9
|
+
* - 都未开启:不渲染。
|
|
10
|
+
*/
|
|
11
|
+
export default function FulfillmentMode(): JSX.Element | null;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import { Radio } from 'antd';
|
|
9
|
+
import { locales } from '@pisell/utils';
|
|
10
|
+
import { useScanOrderContext } from "../../context";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
/**
|
|
13
|
+
* FulfillmentMode
|
|
14
|
+
*
|
|
15
|
+
* 通过 scanOrder module 读取 getFulfillmentModes() 返回的 { enableTableService, enablePickup }:
|
|
16
|
+
* - 两个都开启:渲染可切换的 Radio.Group,默认 Table service,挂载即同步一次 setPickupReferenceMode。
|
|
17
|
+
* - 只开启一个:仅渲染单行文案提示当前取餐方式,并同步一次 setPickupReferenceMode。
|
|
18
|
+
* - 都未开启:不渲染。
|
|
19
|
+
*/
|
|
20
|
+
export default function FulfillmentMode() {
|
|
21
|
+
var _useScanOrderContext = useScanOrderContext(),
|
|
22
|
+
scanOrderModule = _useScanOrderContext.scanOrderModule;
|
|
23
|
+
var _useState = useState({}),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
modes = _useState2[0],
|
|
26
|
+
setModes = _useState2[1];
|
|
27
|
+
var _useState3 = useState('table_service'),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
mode = _useState4[0],
|
|
30
|
+
setMode = _useState4[1];
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
if (!scanOrderModule) return;
|
|
33
|
+
var next = (typeof scanOrderModule.getFulfillmentModes === 'function' ? scanOrderModule.getFulfillmentModes() : undefined) || {};
|
|
34
|
+
setModes(next);
|
|
35
|
+
var onlyTable = !!next.enableTableService && !next.enablePickup;
|
|
36
|
+
var onlyPickup = !next.enableTableService && !!next.enablePickup;
|
|
37
|
+
var initial = onlyPickup ? 'counter_pickup' : onlyTable ? 'table_service' : 'table_service';
|
|
38
|
+
setMode(initial);
|
|
39
|
+
if ((next.enableTableService || next.enablePickup) && typeof scanOrderModule.setPickupReferenceMode === 'function') {
|
|
40
|
+
scanOrderModule.setPickupReferenceMode(initial);
|
|
41
|
+
}
|
|
42
|
+
}, [scanOrderModule]);
|
|
43
|
+
var enableTableService = modes.enableTableService,
|
|
44
|
+
enablePickup = modes.enablePickup;
|
|
45
|
+
var labelTitle = useMemo(function () {
|
|
46
|
+
return String(locales.getText('pisell2.scan.order.fulfillment.title'));
|
|
47
|
+
}, []);
|
|
48
|
+
var tableServiceText = useMemo(function () {
|
|
49
|
+
return String(locales.getText('pisell2.scan.order.fulfillment.table_service'));
|
|
50
|
+
}, []);
|
|
51
|
+
var pickupText = useMemo(function () {
|
|
52
|
+
return String(locales.getText('pisell2.scan.order.fulfillment.pickup'));
|
|
53
|
+
}, []);
|
|
54
|
+
if (!enableTableService && !enablePickup) return null;
|
|
55
|
+
if (!enableTableService || !enablePickup) {
|
|
56
|
+
var singleLabel = enablePickup ? pickupText : tableServiceText;
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "pisell-scan-order-fulfillment pisell-scan-order-fulfillment-single"
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
60
|
+
className: "pisell-scan-order-fulfillment-title"
|
|
61
|
+
}, labelTitle), /*#__PURE__*/React.createElement("span", {
|
|
62
|
+
className: "pisell-scan-order-fulfillment-value"
|
|
63
|
+
}, singleLabel));
|
|
64
|
+
}
|
|
65
|
+
var handleChange = function handleChange(next) {
|
|
66
|
+
if (next === mode) return;
|
|
67
|
+
setMode(next);
|
|
68
|
+
if (typeof (scanOrderModule === null || scanOrderModule === void 0 ? void 0 : scanOrderModule.setPickupReferenceMode) === 'function') {
|
|
69
|
+
scanOrderModule.setPickupReferenceMode(next);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
className: "pisell-scan-order-fulfillment"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: "pisell-scan-order-fulfillment-title"
|
|
76
|
+
}, labelTitle), /*#__PURE__*/React.createElement(Radio.Group, {
|
|
77
|
+
className: "pisell-scan-order-fulfillment-group",
|
|
78
|
+
optionType: "button",
|
|
79
|
+
buttonStyle: "solid",
|
|
80
|
+
value: mode,
|
|
81
|
+
onChange: function onChange(event) {
|
|
82
|
+
var _event$target;
|
|
83
|
+
return handleChange(event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value);
|
|
84
|
+
}
|
|
85
|
+
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
|
86
|
+
value: "table_service"
|
|
87
|
+
}, tableServiceText), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
88
|
+
value: "counter_pickup"
|
|
89
|
+
}, pickupText)));
|
|
90
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.pisell-scan-order-fulfillment {
|
|
2
|
+
padding: 4px 16px;
|
|
3
|
+
margin-bottom: 12px;
|
|
4
|
+
background: #fff;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
|
|
7
|
+
.pisell-scan-order-fulfillment-title {
|
|
8
|
+
color: #101828;
|
|
9
|
+
font-size: 16px;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
margin-bottom: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pisell-scan-order-fulfillment-group {
|
|
15
|
+
display: flex;
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
.pisell-lowcode-radio-button-wrapper {
|
|
19
|
+
flex: 1;
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pisell-scan-order-fulfillment-single {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
gap: 12px;
|
|
30
|
+
|
|
31
|
+
.pisell-scan-order-fulfillment-title {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pisell-scan-order-fulfillment-value {
|
|
36
|
+
color: #344054;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
font-weight: 500;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ManualPickupRefModalProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
confirmLoading?: boolean;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
onConfirm: (value: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* ManualPickupRefModal
|
|
11
|
+
*
|
|
12
|
+
* 当 scanOrder.checkManualPickupRef() 返回 enabled=true 时,弹出让用户输入
|
|
13
|
+
* 昵称/buzzer 的弹窗。确认时回调 onConfirm(value),由外部负责 setPickupRef 与下单。
|
|
14
|
+
*/
|
|
15
|
+
export default function ManualPickupRefModal({ open, confirmLoading, onCancel, onConfirm, }: ManualPickupRefModalProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
8
|
+
import { Input, Modal } from 'antd';
|
|
9
|
+
import { Button } from '@pisell/materials';
|
|
10
|
+
import { locales } from '@pisell/utils';
|
|
11
|
+
import "./index.less";
|
|
12
|
+
/**
|
|
13
|
+
* ManualPickupRefModal
|
|
14
|
+
*
|
|
15
|
+
* 当 scanOrder.checkManualPickupRef() 返回 enabled=true 时,弹出让用户输入
|
|
16
|
+
* 昵称/buzzer 的弹窗。确认时回调 onConfirm(value),由外部负责 setPickupRef 与下单。
|
|
17
|
+
*/
|
|
18
|
+
export default function ManualPickupRefModal(_ref) {
|
|
19
|
+
var open = _ref.open,
|
|
20
|
+
_ref$confirmLoading = _ref.confirmLoading,
|
|
21
|
+
confirmLoading = _ref$confirmLoading === void 0 ? false : _ref$confirmLoading,
|
|
22
|
+
onCancel = _ref.onCancel,
|
|
23
|
+
onConfirm = _ref.onConfirm;
|
|
24
|
+
var _useState = useState(''),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
value = _useState2[0],
|
|
27
|
+
setValue = _useState2[1];
|
|
28
|
+
useEffect(function () {
|
|
29
|
+
if (open) setValue('');
|
|
30
|
+
}, [open]);
|
|
31
|
+
var title = useMemo(function () {
|
|
32
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.title'));
|
|
33
|
+
}, []);
|
|
34
|
+
var heading = useMemo(function () {
|
|
35
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.heading'));
|
|
36
|
+
}, []);
|
|
37
|
+
var description = useMemo(function () {
|
|
38
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.description'));
|
|
39
|
+
}, []);
|
|
40
|
+
var placeholder = useMemo(function () {
|
|
41
|
+
return String(locales.getText('pisell2.scan.order.pickup.ref.placeholder'));
|
|
42
|
+
}, []);
|
|
43
|
+
var confirmText = useMemo(function () {
|
|
44
|
+
return String(locales.getText('pisell2.event.confirm') || 'Confirm');
|
|
45
|
+
}, []);
|
|
46
|
+
var trimmed = value.trim();
|
|
47
|
+
var canConfirm = !!trimmed && !confirmLoading;
|
|
48
|
+
var handleConfirm = function handleConfirm() {
|
|
49
|
+
if (!canConfirm) return;
|
|
50
|
+
onConfirm(trimmed);
|
|
51
|
+
};
|
|
52
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
53
|
+
open: open,
|
|
54
|
+
title: title,
|
|
55
|
+
footer: null,
|
|
56
|
+
onCancel: onCancel,
|
|
57
|
+
maskClosable: false,
|
|
58
|
+
destroyOnClose: true,
|
|
59
|
+
centered: true,
|
|
60
|
+
className: "pisell-scan-order-pickup-ref-modal"
|
|
61
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "pisell-scan-order-pickup-ref-body"
|
|
63
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: "pisell-scan-order-pickup-ref-heading"
|
|
65
|
+
}, heading), /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "pisell-scan-order-pickup-ref-desc"
|
|
67
|
+
}, description), /*#__PURE__*/React.createElement(Input, {
|
|
68
|
+
size: "large",
|
|
69
|
+
placeholder: placeholder,
|
|
70
|
+
value: value,
|
|
71
|
+
onChange: function onChange(event) {
|
|
72
|
+
var _event$target;
|
|
73
|
+
return setValue((event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value) || '');
|
|
74
|
+
},
|
|
75
|
+
onPressEnter: handleConfirm,
|
|
76
|
+
className: "pisell-scan-order-pickup-ref-input",
|
|
77
|
+
maxLength: 32,
|
|
78
|
+
allowClear: true
|
|
79
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
type: "primary",
|
|
81
|
+
block: true,
|
|
82
|
+
size: "large",
|
|
83
|
+
disabled: !canConfirm,
|
|
84
|
+
loading: confirmLoading,
|
|
85
|
+
onClick: handleConfirm
|
|
86
|
+
}, confirmText)));
|
|
87
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.pisell-scan-order-pickup-ref-modal {
|
|
2
|
+
.pisell-lowcode-modal-content {
|
|
3
|
+
border-radius: 16px;
|
|
4
|
+
padding: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pisell-lowcode-modal-header {
|
|
8
|
+
padding: 16px 20px;
|
|
9
|
+
border-bottom: 1px solid #eaecf0;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pisell-lowcode-modal-title {
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
color: #101828;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-lowcode-modal-body {
|
|
20
|
+
padding: 24px 20px 28px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pisell-lowcode-modal-close {
|
|
24
|
+
top: 14px;
|
|
25
|
+
inset-inline-end: 16px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pisell-scan-order-pickup-ref-body {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
align-items: stretch;
|
|
34
|
+
|
|
35
|
+
.pisell-scan-order-pickup-ref-heading {
|
|
36
|
+
text-align: center;
|
|
37
|
+
color: #101828;
|
|
38
|
+
font-size: 24px;
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
line-height: 1.3;
|
|
41
|
+
margin-top: 4px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pisell-scan-order-pickup-ref-desc {
|
|
45
|
+
text-align: center;
|
|
46
|
+
color: #667085;
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
margin-bottom: 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pisell-scan-order-pickup-ref-input {
|
|
53
|
+
height: 48px;
|
|
54
|
+
border-radius: 10px;
|
|
55
|
+
|
|
56
|
+
input {
|
|
57
|
+
text-align: center;
|
|
58
|
+
font-size: 16px;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -2,6 +2,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
10
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
11
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
12
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -12,7 +17,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
17
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
18
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
import React, { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
|
20
|
+
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
21
|
import { locales } from '@pisell/utils';
|
|
17
22
|
import { useScanOrderModule, safeRunModuleAction, SCAN_ORDER_STEPS, createScanOrderViewModel } from "./hooks";
|
|
18
23
|
import { usePisellOS } from "../../hooks/useEngineContext";
|
|
@@ -55,7 +60,41 @@ export function ScanOrderProvider(_ref) {
|
|
|
55
60
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
56
61
|
footerActionText = _useState12[0],
|
|
57
62
|
setFooterActionText = _useState12[1];
|
|
63
|
+
var _useState13 = useState(''),
|
|
64
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
65
|
+
tableName = _useState14[0],
|
|
66
|
+
setTableName = _useState14[1];
|
|
67
|
+
var _useState15 = useState('default'),
|
|
68
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
69
|
+
entryMode = _useState16[0],
|
|
70
|
+
setEntryMode = _useState16[1];
|
|
71
|
+
var _useState17 = useState(''),
|
|
72
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
73
|
+
submitDisabledTips = _useState18[0],
|
|
74
|
+
setSubmitDisabledTips = _useState18[1];
|
|
75
|
+
var _useState19 = useState(false),
|
|
76
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
77
|
+
isCacheHydrated = _useState20[0],
|
|
78
|
+
setIsCacheHydrated = _useState20[1];
|
|
79
|
+
var hydratedRef = useRef(false);
|
|
58
80
|
var stepList = _toConsumableArray(SCAN_ORDER_STEPS);
|
|
81
|
+
|
|
82
|
+
// ─── 步骤缓存:gate 标记读写 ───
|
|
83
|
+
var isGatePassed = useCallback(function (flag) {
|
|
84
|
+
var _scanOrderModule$getU;
|
|
85
|
+
var gate = scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$getU = scanOrderModule.getUIState) === null || _scanOrderModule$getU === void 0 ? void 0 : _scanOrderModule$getU.call(scanOrderModule, 'gate');
|
|
86
|
+
return Boolean(gate === null || gate === void 0 ? void 0 : gate[flag]);
|
|
87
|
+
}, [scanOrderModule]);
|
|
88
|
+
var markGate = useCallback(function (flag) {
|
|
89
|
+
var _scanOrderModule$getU2;
|
|
90
|
+
if (!(scanOrderModule !== null && scanOrderModule !== void 0 && scanOrderModule.setUIState)) return;
|
|
91
|
+
var prev = ((_scanOrderModule$getU2 = scanOrderModule.getUIState) === null || _scanOrderModule$getU2 === void 0 ? void 0 : _scanOrderModule$getU2.call(scanOrderModule, 'gate')) || {};
|
|
92
|
+
scanOrderModule.setUIState('gate', _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, flag, true)));
|
|
93
|
+
}, [scanOrderModule]);
|
|
94
|
+
var clearStepCache = useCallback(function () {
|
|
95
|
+
var _scanOrderModule$clea;
|
|
96
|
+
scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$clea = scanOrderModule.clearUIState) === null || _scanOrderModule$clea === void 0 || _scanOrderModule$clea.call(scanOrderModule);
|
|
97
|
+
}, [scanOrderModule]);
|
|
59
98
|
var refreshViewModel = /*#__PURE__*/function () {
|
|
60
99
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
61
100
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -149,6 +188,52 @@ export function ScanOrderProvider(_ref) {
|
|
|
149
188
|
return _ref4.apply(this, arguments);
|
|
150
189
|
};
|
|
151
190
|
}();
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* 步骤缓存 hydrate:首次 module 就绪时读取 SDK UI 缓存
|
|
194
|
+
* - 若缓存里的 entryContext.resourceId 与本次入参不一致,整桶作废(clearUIState)后仅写入新 entryContext
|
|
195
|
+
* - 一致则按 pendingStep > step 的顺序恢复 currentStep;pendingStep 命中后立即消费
|
|
196
|
+
* - 基于 cacheId 分桶,无 cacheId 时 SDK 层降级为 no-op
|
|
197
|
+
*/
|
|
198
|
+
useEffect(function () {
|
|
199
|
+
var _scanOrderModule$getU3, _scanOrderModule$getU4, _scanOrderModule$getU5;
|
|
200
|
+
if (hydratedRef.current || !scanOrderModule) return;
|
|
201
|
+
hydratedRef.current = true;
|
|
202
|
+
var currentResourceId = entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id;
|
|
203
|
+
var currentHasOrderId = Boolean(entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id);
|
|
204
|
+
var currentBiz = entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz;
|
|
205
|
+
var cachedEntry = (_scanOrderModule$getU3 = scanOrderModule.getUIState) === null || _scanOrderModule$getU3 === void 0 ? void 0 : _scanOrderModule$getU3.call(scanOrderModule, 'entryContext');
|
|
206
|
+
var entrySame = cachedEntry && cachedEntry.resourceId === currentResourceId && cachedEntry.biz === currentBiz;
|
|
207
|
+
if (!entrySame) {
|
|
208
|
+
var _scanOrderModule$clea2, _scanOrderModule$setU;
|
|
209
|
+
(_scanOrderModule$clea2 = scanOrderModule.clearUIState) === null || _scanOrderModule$clea2 === void 0 || _scanOrderModule$clea2.call(scanOrderModule);
|
|
210
|
+
(_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'entryContext', {
|
|
211
|
+
resourceId: currentResourceId,
|
|
212
|
+
hasOrderId: currentHasOrderId,
|
|
213
|
+
biz: currentBiz
|
|
214
|
+
});
|
|
215
|
+
setIsCacheHydrated(true);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
var pending = (_scanOrderModule$getU4 = scanOrderModule.getUIState) === null || _scanOrderModule$getU4 === void 0 ? void 0 : _scanOrderModule$getU4.call(scanOrderModule, 'pendingStep');
|
|
219
|
+
if (pending && stepList.includes(pending)) {
|
|
220
|
+
var _scanOrderModule$dele;
|
|
221
|
+
(_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
|
|
222
|
+
setCurrentStep(pending);
|
|
223
|
+
setIsCacheHydrated(true);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
var cached = (_scanOrderModule$getU5 = scanOrderModule.getUIState) === null || _scanOrderModule$getU5 === void 0 ? void 0 : _scanOrderModule$getU5.call(scanOrderModule, 'step');
|
|
227
|
+
if (cached && stepList.includes(cached)) setCurrentStep(cached);
|
|
228
|
+
setIsCacheHydrated(true);
|
|
229
|
+
}, [scanOrderModule, entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id, entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id, entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz]);
|
|
230
|
+
|
|
231
|
+
/** hydrate 完成后,currentStep 变化即写回缓存 */
|
|
232
|
+
useEffect(function () {
|
|
233
|
+
var _scanOrderModule$setU2;
|
|
234
|
+
if (!hydratedRef.current || !isCacheHydrated || !scanOrderModule) return;
|
|
235
|
+
(_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'step', currentStep);
|
|
236
|
+
}, [currentStep, isCacheHydrated, scanOrderModule]);
|
|
152
237
|
useEffect(function () {
|
|
153
238
|
var _pisellOS$effects, _pisellOS$effects$on;
|
|
154
239
|
if (!scanOrderModule) return;
|
|
@@ -251,38 +336,26 @@ export function ScanOrderProvider(_ref) {
|
|
|
251
336
|
return scanOrderModule.getPageConfig(entryContext);
|
|
252
337
|
case 18:
|
|
253
338
|
_context5.next = 20;
|
|
254
|
-
return safeRunModuleAction(scanOrderModule, 'setItemRuleRuntimeConfig', {
|
|
255
|
-
pax: {
|
|
256
|
-
total: 2,
|
|
257
|
-
adult: 2,
|
|
258
|
-
child: 0
|
|
259
|
-
},
|
|
260
|
-
serviceType: 'dine-in',
|
|
261
|
-
submissionIndex: 0,
|
|
262
|
-
historicalItems: []
|
|
263
|
-
});
|
|
264
|
-
case 20:
|
|
265
|
-
_context5.next = 22;
|
|
266
339
|
return refreshViewModel();
|
|
267
|
-
case
|
|
340
|
+
case 20:
|
|
268
341
|
if (!unmounted) {
|
|
269
342
|
setErrorMessage('');
|
|
270
343
|
setIsLoading(false);
|
|
271
344
|
}
|
|
272
|
-
_context5.next =
|
|
345
|
+
_context5.next = 26;
|
|
273
346
|
break;
|
|
274
|
-
case
|
|
275
|
-
_context5.prev =
|
|
347
|
+
case 23:
|
|
348
|
+
_context5.prev = 23;
|
|
276
349
|
_context5.t1 = _context5["catch"](0);
|
|
277
350
|
if (!unmounted) {
|
|
278
351
|
setErrorMessage((_context5.t1 === null || _context5.t1 === void 0 ? void 0 : _context5.t1.message) || 'scanOrder load failed');
|
|
279
352
|
setIsLoading(false);
|
|
280
353
|
}
|
|
281
|
-
case
|
|
354
|
+
case 26:
|
|
282
355
|
case "end":
|
|
283
356
|
return _context5.stop();
|
|
284
357
|
}
|
|
285
|
-
}, _callee5, null, [[0,
|
|
358
|
+
}, _callee5, null, [[0, 23]]);
|
|
286
359
|
}));
|
|
287
360
|
return function bootstrap() {
|
|
288
361
|
return _ref6.apply(this, arguments);
|
|
@@ -304,6 +377,9 @@ export function ScanOrderProvider(_ref) {
|
|
|
304
377
|
stepList: stepList,
|
|
305
378
|
viewModel: viewModel,
|
|
306
379
|
footerActionText: footerActionText,
|
|
380
|
+
tableName: tableName,
|
|
381
|
+
entryMode: entryMode,
|
|
382
|
+
submitDisabledTips: submitDisabledTips,
|
|
307
383
|
isReady: !isLoading && !errorMessage,
|
|
308
384
|
setCurrentStep: setCurrentStep,
|
|
309
385
|
goToStep: goToStep,
|
|
@@ -312,9 +388,16 @@ export function ScanOrderProvider(_ref) {
|
|
|
312
388
|
refreshViewModel: refreshViewModel,
|
|
313
389
|
runModuleAction: runModuleAction,
|
|
314
390
|
setFooterActionText: setFooterActionText,
|
|
315
|
-
|
|
391
|
+
setTableName: setTableName,
|
|
392
|
+
setEntryMode: setEntryMode,
|
|
393
|
+
setSubmitDisabledTips: setSubmitDisabledTips,
|
|
394
|
+
updateOrderNote: updateOrderNote,
|
|
395
|
+
isCacheHydrated: isCacheHydrated,
|
|
396
|
+
markGate: markGate,
|
|
397
|
+
isGatePassed: isGatePassed,
|
|
398
|
+
clearStepCache: clearStepCache
|
|
316
399
|
};
|
|
317
|
-
}, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText]);
|
|
400
|
+
}, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText, tableName, entryMode, submitDisabledTips, isCacheHydrated, markGate, isGatePassed, clearStepCache]);
|
|
318
401
|
return /*#__PURE__*/React.createElement(ScanOrderContext.Provider, {
|
|
319
402
|
value: value
|
|
320
403
|
}, children);
|