@pisell/private-materials 6.3.137 → 6.3.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- 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/booking/addons/model.d.ts +1 -10
- 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/footer/utils.d.ts +47 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/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/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.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/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +1489 -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 +112 -0
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/amount.d.ts +21 -0
- package/es/components/eftposPay/app.d.ts +11 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/es/components/eftposPay/component/fail/index.d.ts +3 -0
- package/es/components/eftposPay/component/fail/network.d.ts +8 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +9 -0
- package/es/components/eftposPay/component/manual/index.d.ts +9 -0
- package/es/components/eftposPay/component/signature/index.d.ts +8 -0
- package/es/components/eftposPay/device.d.ts +24 -0
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +5 -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 +3 -0
- package/es/components/eftposPay/pay.d.ts +21 -0
- package/es/components/eftposPay/payo/config.d.ts +12 -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 +9 -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 +22 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/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/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/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/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/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/model.d.ts +1 -9
- 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/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/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/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/locales.d.ts +78 -0
- package/es/components/scanOrder/components/Content/index.js +251 -69
- package/es/components/scanOrder/context.js +6 -18
- 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/model.d.ts +1 -9
- 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/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -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 +1 -1
- package/es/components/venueBooking/context.js +32 -6
- package/es/index.d.ts +87 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- 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/skuOptionsSelection/components/NormalCard/index.d.ts +5 -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/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/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/lib/businessModel/SalesModel/index.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/booking/addons/model.d.ts +1 -10
- 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/footer/utils.d.ts +47 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/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/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.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/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +1489 -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 +112 -0
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/amount.d.ts +21 -0
- package/lib/components/eftposPay/app.d.ts +11 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +3 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +8 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +9 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +9 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +8 -0
- package/lib/components/eftposPay/device.d.ts +24 -0
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +5 -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 +3 -0
- package/lib/components/eftposPay/pay.d.ts +21 -0
- package/lib/components/eftposPay/payo/config.d.ts +12 -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 +9 -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 +22 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/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/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/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/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/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/model.d.ts +1 -9
- 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/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/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/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/locales.d.ts +78 -0
- package/lib/components/scanOrder/components/Content/index.js +150 -41
- package/lib/components/scanOrder/context.js +0 -10
- 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/model.d.ts +1 -9
- 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/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -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 +1 -1
- package/lib/components/venueBooking/context.js +14 -6
- package/lib/index.d.ts +87 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
- 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/skuOptionsSelection/components/NormalCard/index.d.ts +5 -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/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/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/package.json +1 -1
|
@@ -37,19 +37,22 @@ function getDisplayName(product) {
|
|
|
37
37
|
const origin = (product == null ? void 0 : product._origin) || {};
|
|
38
38
|
const callbackData = (origin == null ? void 0 : origin.callbackData) || {};
|
|
39
39
|
const callbackOrigin = (callbackData == null ? void 0 : callbackData.origin) || {};
|
|
40
|
-
|
|
40
|
+
const sourceItem = (origin == null ? void 0 : origin.sourceItem) || {};
|
|
41
|
+
return (callbackData == null ? void 0 : callbackData.name) || (callbackData == null ? void 0 : callbackData.title) || (callbackOrigin == null ? void 0 : callbackOrigin.name) || (callbackOrigin == null ? void 0 : callbackOrigin.title) || (sourceItem == null ? void 0 : sourceItem.name) || (sourceItem == null ? void 0 : sourceItem.title) || (origin == null ? void 0 : origin.name) || (origin == null ? void 0 : origin.title) || ((_b = (_a = origin == null ? void 0 : origin.resources) == null ? void 0 : _a[0]) == null ? void 0 : _b.main_field) || ((_c = product == null ? void 0 : product.metadata) == null ? void 0 : _c.resource_name) || `Product #${product.product_id ?? "unknown"}`;
|
|
41
42
|
}
|
|
42
43
|
function getDisplayImage(product) {
|
|
43
44
|
const origin = (product == null ? void 0 : product._origin) || {};
|
|
44
45
|
const callbackData = (origin == null ? void 0 : origin.callbackData) || {};
|
|
45
46
|
const callbackOrigin = (callbackData == null ? void 0 : callbackData.origin) || {};
|
|
46
|
-
|
|
47
|
+
const sourceItem = (origin == null ? void 0 : origin.sourceItem) || {};
|
|
48
|
+
return (callbackData == null ? void 0 : callbackData.image) || (callbackData == null ? void 0 : callbackData.cover) || (callbackOrigin == null ? void 0 : callbackOrigin.image) || (callbackOrigin == null ? void 0 : callbackOrigin.cover) || (sourceItem == null ? void 0 : sourceItem.image) || (sourceItem == null ? void 0 : sourceItem.cover) || (origin == null ? void 0 : origin.image) || (origin == null ? void 0 : origin.cover) || "";
|
|
47
49
|
}
|
|
48
50
|
function getUnitPrice(product) {
|
|
49
|
-
|
|
50
|
-
const callbackData = (
|
|
51
|
+
var _a, _b;
|
|
52
|
+
const callbackData = ((_a = product == null ? void 0 : product._origin) == null ? void 0 : _a.callbackData) || {};
|
|
51
53
|
const callbackOrigin = (callbackData == null ? void 0 : callbackData.origin) || {};
|
|
52
|
-
|
|
54
|
+
const sourceItem = ((_b = product == null ? void 0 : product._origin) == null ? void 0 : _b.sourceItem) || {};
|
|
55
|
+
return toNumber(product.selling_price, NaN) || toNumber(product.original_price, NaN) || toNumber(callbackData == null ? void 0 : callbackData.price, NaN) || toNumber(callbackOrigin == null ? void 0 : callbackOrigin.price, NaN) || toNumber(sourceItem == null ? void 0 : sourceItem.price, 0);
|
|
53
56
|
}
|
|
54
57
|
function normalizeOptions(product) {
|
|
55
58
|
var _a;
|
|
@@ -43,9 +43,10 @@ export interface ScanOrderOrderProductInput {
|
|
|
43
43
|
price: number;
|
|
44
44
|
}>;
|
|
45
45
|
product_bundle: ProductDetailBundleItem[];
|
|
46
|
+
/** 券后单品单价;初次加购由入口置为 selling_price,之后由 SDK Rules 引擎维护。 */
|
|
46
47
|
selling_price: string;
|
|
48
|
+
/** 券前单品单价(店铺售价)。 */
|
|
47
49
|
original_price: string;
|
|
48
|
-
payment_price: string;
|
|
49
50
|
tax_fee: string;
|
|
50
51
|
is_charge_tax: number;
|
|
51
52
|
metadata: Record<string, any>;
|
|
@@ -83,14 +83,7 @@ function transformProductDetailToOrderProduct(params) {
|
|
|
83
83
|
(payload == null ? void 0 : payload.price) ?? (payload == null ? void 0 : payload.selling_price) ?? (callbackOrigin == null ? void 0 : callbackOrigin.price) ?? (sourceItem == null ? void 0 : sourceItem.price) ?? (sourceItem == null ? void 0 : sourceItem.selling_price) ?? (sourceItem == null ? void 0 : sourceItem.base_price),
|
|
84
84
|
"0.00"
|
|
85
85
|
);
|
|
86
|
-
const originalPrice =
|
|
87
|
-
(payload == null ? void 0 : payload.original_price) ?? (callbackOrigin == null ? void 0 : callbackOrigin.original_price) ?? (sourceItem == null ? void 0 : sourceItem.original_price) ?? sellingPrice,
|
|
88
|
-
sellingPrice
|
|
89
|
-
);
|
|
90
|
-
const paymentPrice = toPriceString(
|
|
91
|
-
(payload == null ? void 0 : payload.payment_price) ?? (callbackOrigin == null ? void 0 : callbackOrigin.payment_price) ?? (sourceItem == null ? void 0 : sourceItem.payment_price) ?? sellingPrice,
|
|
92
|
-
sellingPrice
|
|
93
|
-
);
|
|
86
|
+
const originalPrice = sellingPrice;
|
|
94
87
|
const taxFee = toPriceString(
|
|
95
88
|
(payload == null ? void 0 : payload.tax_fee) ?? (callbackOrigin == null ? void 0 : callbackOrigin.tax_fee) ?? (sourceItem == null ? void 0 : sourceItem.tax_fee),
|
|
96
89
|
"0.00"
|
|
@@ -111,7 +104,6 @@ function transformProductDetailToOrderProduct(params) {
|
|
|
111
104
|
),
|
|
112
105
|
selling_price: sellingPrice,
|
|
113
106
|
original_price: originalPrice,
|
|
114
|
-
payment_price: paymentPrice,
|
|
115
107
|
tax_fee: taxFee,
|
|
116
108
|
is_charge_tax: isChargeTax,
|
|
117
109
|
metadata: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ITimeBarProps {
|
|
4
|
+
globalState: any;
|
|
5
|
+
setGlobalState: any;
|
|
6
|
+
onDateChange: (date: Dayjs, dateString?: string) => void;
|
|
7
|
+
onDateTimeChange: (date: Dayjs, timeString: string) => void;
|
|
8
|
+
setIntervalTime: (value: boolean) => void;
|
|
9
|
+
locale: string;
|
|
10
|
+
}
|
|
11
|
+
declare const TimeBar: (props: ITimeBarProps) => JSX.Element;
|
|
12
|
+
export default TimeBar;
|
|
@@ -289,7 +289,7 @@ function TimeGrid() {
|
|
|
289
289
|
symbol,
|
|
290
290
|
precision: 2,
|
|
291
291
|
showCurrencySymbol: true,
|
|
292
|
-
hideDecimalForWholeNumbers:
|
|
292
|
+
hideDecimalForWholeNumbers: true,
|
|
293
293
|
className: `text-[13px] font-normal leading-4 ${priceClass} md:text-sm`
|
|
294
294
|
}
|
|
295
295
|
), tag ? /* @__PURE__ */ import_react.default.createElement("div", { className: `inline-flex rounded-full px-1.5 py-0 text-[8px] font-semibold leading-4 ring-1 md:text-[9px] ${tag.className}` }, tagText) : null)
|
|
@@ -122,6 +122,7 @@ function VenueBookingProvider({ entryContext, children }) {
|
|
|
122
122
|
const [isSubmittingOrder, setIsSubmittingOrder] = (0, import_react.useState)(false);
|
|
123
123
|
const anchorDateRef = (0, import_react.useRef)(anchorDate);
|
|
124
124
|
anchorDateRef.current = anchorDate;
|
|
125
|
+
const bootstrappedRef = (0, import_react.useRef)(false);
|
|
125
126
|
const canNext = (0, import_react.useMemo)(() => {
|
|
126
127
|
const allSelected = (0, import_hooks.getAllSelectedSlots)(venueBookingModule);
|
|
127
128
|
if (Array.isArray(allSelected) && allSelected.length > 0) return true;
|
|
@@ -303,6 +304,12 @@ function VenueBookingProvider({ entryContext, children }) {
|
|
|
303
304
|
console.warn("[venueBooking] handleLoginSuccess failed", error);
|
|
304
305
|
}
|
|
305
306
|
}, [syncCustomerLoginToModule, venueBookingModule, refreshViewModel]);
|
|
307
|
+
const syncCustomerLoginRef = (0, import_react.useRef)(syncCustomerLoginToModule);
|
|
308
|
+
syncCustomerLoginRef.current = syncCustomerLoginToModule;
|
|
309
|
+
const goToNearestAvailableDateRef = (0, import_react.useRef)(goToNearestAvailableDate);
|
|
310
|
+
goToNearestAvailableDateRef.current = goToNearestAvailableDate;
|
|
311
|
+
const handleLoginSuccessRef = (0, import_react.useRef)(handleLoginSuccess);
|
|
312
|
+
handleLoginSuccessRef.current = handleLoginSuccess;
|
|
306
313
|
const submitOrder = (0, import_react.useCallback)(async () => {
|
|
307
314
|
var _a2, _b2, _c2;
|
|
308
315
|
if (isSubmittingOrder) return;
|
|
@@ -414,7 +421,7 @@ function VenueBookingProvider({ entryContext, children }) {
|
|
|
414
421
|
if (!pubsub) return;
|
|
415
422
|
const onGlobalLoginSuccess = async (res) => {
|
|
416
423
|
if (res === "success" || (res == null ? void 0 : res.status) === "success") {
|
|
417
|
-
await
|
|
424
|
+
await handleLoginSuccessRef.current();
|
|
418
425
|
}
|
|
419
426
|
};
|
|
420
427
|
(_a2 = pubsub.subscribe) == null ? void 0 : _a2.call(pubsub, "pisell1.login.success", onGlobalLoginSuccess);
|
|
@@ -422,7 +429,7 @@ function VenueBookingProvider({ entryContext, children }) {
|
|
|
422
429
|
var _a3;
|
|
423
430
|
(_a3 = pubsub.unsubscribe) == null ? void 0 : _a3.call(pubsub, "pisell1.login.success", onGlobalLoginSuccess);
|
|
424
431
|
};
|
|
425
|
-
}, [utils == null ? void 0 : utils.pubsub
|
|
432
|
+
}, [utils == null ? void 0 : utils.pubsub]);
|
|
426
433
|
(0, import_react.useEffect)(() => {
|
|
427
434
|
if (!venueBookingModule) return;
|
|
428
435
|
setIsGridTransition(true);
|
|
@@ -463,15 +470,16 @@ function VenueBookingProvider({ entryContext, children }) {
|
|
|
463
470
|
};
|
|
464
471
|
}, [pisellOS, venueBookingModule]);
|
|
465
472
|
(0, import_react.useEffect)(() => {
|
|
466
|
-
if (!venueBookingModule) return;
|
|
473
|
+
if (bootstrappedRef.current || !venueBookingModule) return;
|
|
474
|
+
bootstrappedRef.current = true;
|
|
467
475
|
let unmounted = false;
|
|
468
476
|
const bootstrap = async () => {
|
|
469
477
|
try {
|
|
470
478
|
setIsLoading(true);
|
|
471
|
-
await
|
|
479
|
+
await syncCustomerLoginRef.current();
|
|
472
480
|
await (0, import_hooks.loadVenueProducts)(venueBookingModule, import_hooks.VENUE_PRODUCT_IDS);
|
|
473
481
|
const venueProducts = typeof (venueBookingModule == null ? void 0 : venueBookingModule.getVenueProducts) === "function" ? venueBookingModule.getVenueProducts() : [];
|
|
474
|
-
await
|
|
482
|
+
await goToNearestAvailableDateRef.current(anchorDateRef.current);
|
|
475
483
|
const moduleData = (0, import_hooks.createVenueBookingViewModel)(venueBookingModule);
|
|
476
484
|
if (!unmounted) {
|
|
477
485
|
setViewModel((prev) => ({
|
|
@@ -506,7 +514,7 @@ function VenueBookingProvider({ entryContext, children }) {
|
|
|
506
514
|
return () => {
|
|
507
515
|
unmounted = true;
|
|
508
516
|
};
|
|
509
|
-
}, [venueBookingModule
|
|
517
|
+
}, [venueBookingModule]);
|
|
510
518
|
const value = (0, import_react.useMemo)(() => ({
|
|
511
519
|
venueBookingModule,
|
|
512
520
|
currentStep,
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export { default as Login } from './components/login';
|
|
2
|
+
export type { LoginProps } from './components/login';
|
|
3
|
+
export { default as BookingInfo } from './components/booking/info/index';
|
|
4
|
+
export { default as BookingNotes } from './components/booking/notes';
|
|
5
|
+
export { default as BookingAddons } from './components/booking/addons';
|
|
6
|
+
export { default as BookingForms } from './components/booking/forms';
|
|
7
|
+
export { default as BookingPayment } from './components/booking/payments';
|
|
8
|
+
export { default as Booking } from './components/booking';
|
|
9
|
+
export { default as Schedules } from './components/schedules';
|
|
10
|
+
export { default as BookingResources } from './components/booking/materiels/resources';
|
|
11
|
+
export { default as BookingStartTime } from './components/booking/materiels/startTime';
|
|
12
|
+
export { default as BookingDuration } from './components/booking/materiels/duration';
|
|
13
|
+
export { default as BookingContacts } from './components/booking/materiels/contacts';
|
|
14
|
+
export { VerticalClient } from './components/booking/info/clientVariant';
|
|
15
|
+
export { default as VerticalAddService } from './components/booking/info/addServiceVariant';
|
|
16
|
+
export { default as ProductExtension } from './components/productExtension';
|
|
17
|
+
export { default as BookingDeposit } from './components/booking/deposit';
|
|
18
|
+
export { default as WorkspaceList } from './components/workSpaceList';
|
|
19
|
+
export { default as WorkspaceListDetail } from './components/workSpaceListDetail';
|
|
20
|
+
export { default as RuleSetting } from './components/ruleSetting';
|
|
21
|
+
export { default as TaxSelect } from './components/taxSelect';
|
|
22
|
+
export { default as EftposPay } from './components/eftposPay';
|
|
23
|
+
export { default as ToCPay } from './components/pay/toC';
|
|
24
|
+
export { default as Eftpos } from './components/eftpos';
|
|
25
|
+
export { default as WalletList } from './components/walletList';
|
|
26
|
+
export { default as BookingDashboard } from './components/booking/dashboard';
|
|
27
|
+
export { default as PisellSelectCustomerModal } from './components/pisellSelectCustomerModal';
|
|
28
|
+
export { default as EventBooking } from './components/eventBooking';
|
|
29
|
+
export { default as EventCard } from './components/eventBooking/components/eventCard';
|
|
30
|
+
export { default as EventResourceDisplay } from './components/eventBooking/components/resourceDisplay';
|
|
31
|
+
export { default as EventResourceUsability } from './components/eventBooking/components/resourceUsability';
|
|
32
|
+
export { default as EventProductCard } from './components/eventBooking/components/productCard';
|
|
33
|
+
export { default as EventTimeResourceSelector } from './components/eventBooking/components/timeResourceSelector';
|
|
34
|
+
export { default as EventSelectHolder } from './components/eventBooking/components/selectHolder';
|
|
35
|
+
export { default as EventBookingServiceList } from './components/eventBooking/components/bookingServiceList';
|
|
36
|
+
export { default as EventBookingAvailabilityCalendar } from './components/eventBooking/components/bookingAvailabilityCalendar';
|
|
37
|
+
export { default as EventScheduleCalendar } from './components/eventBooking/components/scheduleCalendar';
|
|
38
|
+
export { default as EventBookingDetailModal } from './components/eventBooking/components/bookingDetailModal';
|
|
39
|
+
export { default as EventProgressBar } from './components/eventBooking/components/progressBar';
|
|
40
|
+
export { default as ShoppingCart } from './components/shoppingCart';
|
|
41
|
+
export { default as AppointmentBooking } from './components/appointmentBooking';
|
|
42
|
+
export { default as AppointmentDeposit } from './components/appointmentBooking/deposit';
|
|
43
|
+
export { default as TicketBooking } from './components/ticketBooking';
|
|
44
|
+
export { default as ScanOrder } from './components/scanOrder';
|
|
45
|
+
export { default as VenueBooking } from './components/venueBooking';
|
|
46
|
+
export type { ScanOrderProps } from './components/scanOrder';
|
|
47
|
+
export { default as SubTotal } from './components/subTotal';
|
|
48
|
+
export { default as EditBookingModal } from './components/booking/editBookingModal';
|
|
49
|
+
export { default as StepController } from './components/stepController';
|
|
50
|
+
export { default as ClientCard } from './plus/clientCard';
|
|
51
|
+
export { default as ClientSearch } from './plus/clinetSearch';
|
|
52
|
+
export { default as ComprehensiveSearch } from './pro/comprehensiveSearch';
|
|
53
|
+
export { default as SaasLogin } from './plus/saasLogin';
|
|
54
|
+
export { default as SaasRegister } from './plus/saasRegister';
|
|
55
|
+
export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
|
|
56
|
+
export { default as PinModal } from './components/pinModal';
|
|
57
|
+
export { default as PinVerifyModal } from './components/pinVerifyModal';
|
|
58
|
+
export { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, } from './components/authentication/admin';
|
|
59
|
+
export type { SaaSAdminAuthProps, OrgAdminAuthProps, DeviceAuthProps, POSOperatorAuthProps, CustomerOAuthConfigProps, } from './components/authentication/admin';
|
|
60
|
+
export { default as ContactInfo } from './plus/contactInfo';
|
|
61
|
+
export { default as ContactInfoModal } from './plus/contactInfoModal';
|
|
62
|
+
export { Login2, Register2, AuthModal } from './pro/Login2.0';
|
|
63
|
+
export { default as WalletEditor } from './plus/walletEditor';
|
|
64
|
+
export { default as WalletPassGallery } from './plus/walletPassGallery';
|
|
65
|
+
export { default as WalletPassDetail } from './plus/walletPassGallery/components/passDetail';
|
|
66
|
+
export { default as SelectHolder } from './plus/selectHolder';
|
|
67
|
+
export { default as HolderList } from './plus/selectHolder/components/HolderList';
|
|
68
|
+
export { default as SettingsRegistry } from './components/systemSettings/registry';
|
|
69
|
+
export { default as SaasRole } from './plus/saasRole';
|
|
70
|
+
export { default as SaasTeamMembers } from './plus/saasTeamMembers';
|
|
71
|
+
export type { SaasTeamMembersProps } from './plus/saasTeamMembers/type';
|
|
72
|
+
export { default as KioskSkuDetail } from './components/kioskSkuDetail';
|
|
73
|
+
export { default as ProNumberSelector } from './pro/pisellNumberSelector';
|
|
74
|
+
export { default as SKUOptionsSelection } from './plus/skuOptionsSelection';
|
|
75
|
+
export { default as SaasAttendance } from './plus/saasAttendance';
|
|
76
|
+
export { default as Selector } from './pro/Selector';
|
|
77
|
+
export { default as PisellSalesGrid } from './plus/pisellSalesGrid';
|
|
78
|
+
export { PisellReservationCore, PisellReservationBookingPage, PisellReservation, PisellVenueControlPage, default, } from './plus/pisellReservation';
|
|
79
|
+
export type { FloorMapBookingClickArgs, FloorMapBookingClickMode, PisellReservationProps, PisellReservationTableRow, } from './plus/pisellReservation';
|
|
80
|
+
export { defaultReservationTableRows, getDefaultReservationFloorMapConfig, } from './plus/pisellReservation';
|
|
81
|
+
export { default as EcoCupProject } from './components/ecocup/cupProject';
|
|
82
|
+
export { default as EcoCupList } from './components/ecocup/cupList';
|
|
83
|
+
export { default as EcoCustomerList } from './components/ecocup/customerList';
|
|
84
|
+
export { default as OrderList } from './plus/orderList';
|
|
85
|
+
export { default as pisellSalesManagement } from './plus/pisellSalesManagement';
|
|
86
|
+
export { PisellFinancialSummary, financialSummaryLocales } from './plus/pisellFinancialSummary';
|
|
87
|
+
export type { PisellFinancialSummaryProps, FinancialSummaryData, FinancialSummaryLineItem, FinancialSummaryPaymentItem, FinancialSummaryRefundItem, FinancialSummaryTotalBlock, FinancialSummaryAmountFormatOptions, } from './plus/pisellFinancialSummary';
|
|
@@ -20,7 +20,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
20
20
|
}[];
|
|
21
21
|
minInputNumberProps?: undefined;
|
|
22
22
|
maxInputNumberProps?: undefined;
|
|
23
|
-
|
|
23
|
+
component?: undefined;
|
|
24
24
|
isSearchServer?: undefined;
|
|
25
25
|
showSearch?: undefined;
|
|
26
26
|
showTime?: undefined;
|
|
@@ -46,7 +46,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
46
46
|
mode?: undefined;
|
|
47
47
|
maxTagCount?: undefined;
|
|
48
48
|
options?: undefined;
|
|
49
|
-
|
|
49
|
+
component?: undefined;
|
|
50
50
|
isSearchServer?: undefined;
|
|
51
51
|
showSearch?: undefined;
|
|
52
52
|
showTime?: undefined;
|
|
@@ -91,7 +91,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
91
91
|
options: () => Promise<any>;
|
|
92
92
|
minInputNumberProps?: undefined;
|
|
93
93
|
maxInputNumberProps?: undefined;
|
|
94
|
-
|
|
94
|
+
component?: undefined;
|
|
95
95
|
isSearchServer?: undefined;
|
|
96
96
|
showSearch?: undefined;
|
|
97
97
|
showTime?: undefined;
|
|
@@ -111,7 +111,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
111
111
|
options?: undefined;
|
|
112
112
|
minInputNumberProps?: undefined;
|
|
113
113
|
maxInputNumberProps?: undefined;
|
|
114
|
-
|
|
114
|
+
component?: undefined;
|
|
115
115
|
isSearchServer?: undefined;
|
|
116
116
|
showSearch?: undefined;
|
|
117
117
|
showTime?: undefined;
|
|
@@ -133,7 +133,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
133
133
|
maxTagCount?: undefined;
|
|
134
134
|
minInputNumberProps?: undefined;
|
|
135
135
|
maxInputNumberProps?: undefined;
|
|
136
|
-
|
|
136
|
+
component?: undefined;
|
|
137
137
|
showTime?: undefined;
|
|
138
138
|
};
|
|
139
139
|
sort?: undefined;
|
|
@@ -152,7 +152,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
152
152
|
options?: undefined;
|
|
153
153
|
minInputNumberProps?: undefined;
|
|
154
154
|
maxInputNumberProps?: undefined;
|
|
155
|
-
|
|
155
|
+
component?: undefined;
|
|
156
156
|
isSearchServer?: undefined;
|
|
157
157
|
showSearch?: undefined;
|
|
158
158
|
};
|
|
@@ -181,6 +181,16 @@ var PisellSalesProductCard = ({
|
|
|
181
181
|
max: cardMaxQuantity,
|
|
182
182
|
step: (stepperProps == null ? void 0 : stepperProps.step) ?? 1,
|
|
183
183
|
disabled: mergedDisabled,
|
|
184
|
+
onLimitExceeded: (limitMeta) => {
|
|
185
|
+
const raw = stepperProps == null ? void 0 : stepperProps.limitMessage;
|
|
186
|
+
const limitMsg = typeof raw === "string" ? { max: raw } : raw || {};
|
|
187
|
+
const content = limitMeta.reason === "max" ? limitMsg.max : limitMsg.min;
|
|
188
|
+
if (!content) return;
|
|
189
|
+
(0, import_materials.PisellToast)({
|
|
190
|
+
content,
|
|
191
|
+
duration: 2
|
|
192
|
+
});
|
|
193
|
+
},
|
|
184
194
|
onChange: (next, stepperMeta) => {
|
|
185
195
|
const safeNext = Math.max(
|
|
186
196
|
(stepperProps == null ? void 0 : stepperProps.min) ?? 0,
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { BundleGroupItem, BundleItem, OptionGroupItem, SkuCardConfig, VariantProductItem, VariantGroupItem } from '../skuOptionsSelection/types';
|
|
3
3
|
import type { NumericStepperProps } from '../../pro/NumericStepper/index';
|
|
4
|
+
/**
|
|
5
|
+
* 达到 min / max 限制时希望展示的提示文案。
|
|
6
|
+
* 通常来自 item_rule_limit.maxValidationMessage / minValidationMessage。
|
|
7
|
+
* 对应字段为空时该方向不 toast(仍会走 locales 里的默认兑底,详见 PisellSalesProductCard)。
|
|
8
|
+
*/
|
|
9
|
+
export interface SalesProductLimitMessage {
|
|
10
|
+
max?: string;
|
|
11
|
+
min?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 商品卡使用的 stepper 配置,在 NumericStepperProps 基础上扩展业务字段。
|
|
15
|
+
*/
|
|
16
|
+
export declare type SalesProductStepperProps = NumericStepperProps & {
|
|
17
|
+
/**
|
|
18
|
+
* 达到限制时希望展示的提示文案。支持:
|
|
19
|
+
* - string:等价于 { max: string }(兼容旧用法);
|
|
20
|
+
* - { min?, max? }:min / max 分开配置。
|
|
21
|
+
*/
|
|
22
|
+
limitMessage?: string | SalesProductLimitMessage;
|
|
23
|
+
};
|
|
4
24
|
export declare type SalesProductText = string | Record<string, string>;
|
|
5
25
|
/**
|
|
6
26
|
* 从 SKUOptionsSelection 数据结构反推的完整商品定义。
|
|
@@ -103,7 +123,7 @@ export interface PisellSalesProductCardProps {
|
|
|
103
123
|
/** PRD products[i] value,组件会基于它进行增量更新并回传 */
|
|
104
124
|
value?: Partial<SalesProductValue>;
|
|
105
125
|
disabled?: boolean;
|
|
106
|
-
stepperProps?:
|
|
126
|
+
stepperProps?: SalesProductStepperProps;
|
|
107
127
|
optionsText?: string;
|
|
108
128
|
skuCardConfig?: SkuCardConfig;
|
|
109
129
|
cartElementId?: string;
|
|
@@ -48,7 +48,7 @@ var ProductCardV2 = (0, import_react.memo)(
|
|
|
48
48
|
decorateConfig = {},
|
|
49
49
|
cartElementId
|
|
50
50
|
}) => {
|
|
51
|
-
var _a, _b;
|
|
51
|
+
var _a, _b, _c, _d, _e;
|
|
52
52
|
const { __typename } = item;
|
|
53
53
|
if (__typename === "category") {
|
|
54
54
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -74,7 +74,11 @@ var ProductCardV2 = (0, import_react.memo)(
|
|
|
74
74
|
product: item,
|
|
75
75
|
stepperProps: {
|
|
76
76
|
min: (_a = item == null ? void 0 : item.item_rule_limit) == null ? void 0 : _a.min,
|
|
77
|
-
max: (_b = item == null ? void 0 : item.item_rule_limit) == null ? void 0 : _b.
|
|
77
|
+
max: (_b = item == null ? void 0 : item.item_rule_limit) == null ? void 0 : _b.remainingMax,
|
|
78
|
+
limitMessage: {
|
|
79
|
+
max: ((_c = item == null ? void 0 : item.item_rule_limit) == null ? void 0 : _c.maxValidationMessage) ?? ((_d = item == null ? void 0 : item.item_rule_limit) == null ? void 0 : _d.validationMessage),
|
|
80
|
+
min: (_e = item == null ? void 0 : item.item_rule_limit) == null ? void 0 : _e.minValidationMessage
|
|
81
|
+
}
|
|
78
82
|
},
|
|
79
83
|
value: itemValue,
|
|
80
84
|
skuCardConfig: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface OptionsModalProps {
|
|
2
|
+
parentDataSource: any;
|
|
3
|
+
dataSource: any;
|
|
4
|
+
modalDataSource: any;
|
|
5
|
+
values: any;
|
|
6
|
+
optionItemValue?: any;
|
|
7
|
+
modalValue: any;
|
|
8
|
+
remainingCount: number;
|
|
9
|
+
open: boolean;
|
|
10
|
+
title: string;
|
|
11
|
+
onCancel: () => void;
|
|
12
|
+
onConfirm: (v: any) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const OptionsModal: (props: OptionsModalProps) => JSX.Element;
|
|
15
|
+
export default OptionsModal;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.skuOptionsSelection.title': string;
|
|
4
|
+
'pisell2.skuOptionsSelection.titleExtra.alreadySelected': string;
|
|
5
|
+
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
6
|
+
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
7
|
+
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
8
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
9
|
+
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
10
|
+
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
11
|
+
'pisell2.skuOptionsSelection.optionItemCard.confirm': string;
|
|
12
|
+
};
|
|
13
|
+
'zh-CN': {
|
|
14
|
+
'pisell2.skuOptionsSelection.title': string;
|
|
15
|
+
'pisell2.skuOptionsSelection.titleExtra.alreadySelected': string;
|
|
16
|
+
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
17
|
+
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
18
|
+
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
19
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
20
|
+
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
21
|
+
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
22
|
+
'pisell2.skuOptionsSelection.optionItemCard.confirm': string;
|
|
23
|
+
};
|
|
24
|
+
'zh-HK': {
|
|
25
|
+
'pisell2.skuOptionsSelection.title': string;
|
|
26
|
+
'pisell2.skuOptionsSelection.titleExtra.alreadySelected': string;
|
|
27
|
+
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
28
|
+
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
29
|
+
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
30
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
31
|
+
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
32
|
+
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
33
|
+
'pisell2.skuOptionsSelection.optionItemCard.confirm': string;
|
|
34
|
+
};
|
|
35
|
+
ja: {
|
|
36
|
+
'pisell2.skuOptionsSelection.title': string;
|
|
37
|
+
'pisell2.skuOptionsSelection.titleExtra.alreadySelected': string;
|
|
38
|
+
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
39
|
+
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
40
|
+
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
41
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
42
|
+
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
43
|
+
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
44
|
+
'pisell2.skuOptionsSelection.optionItemCard.confirm': string;
|
|
45
|
+
};
|
|
46
|
+
pt: {
|
|
47
|
+
'pisell2.skuOptionsSelection.title': string;
|
|
48
|
+
'pisell2.skuOptionsSelection.titleExtra.alreadySelected': string;
|
|
49
|
+
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
50
|
+
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
51
|
+
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
52
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
53
|
+
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
54
|
+
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
55
|
+
'pisell2.skuOptionsSelection.optionItemCard.confirm': string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export default _default;
|