@pisell/private-materials 6.8.84 → 6.8.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +150 -164
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/dashboard/serve.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/serve.d.ts +18 -0
- package/es/components/booking/info/client/serve.d.ts +2 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +11 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/pet/serve.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +3 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
- package/es/components/booking/info/service/serve.d.ts +34 -0
- package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/es/components/booking/info/service2/utils.d.ts +219 -0
- package/es/components/booking/info2/serve.d.ts +6 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +106 -0
- package/es/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +28 -0
- package/es/components/booking/info2/service/openNormalService.d.ts +34 -0
- package/es/components/booking/info2/utilsByBooking.d.ts +36 -0
- package/es/components/booking/model.d.ts +121 -0
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +182 -0
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +26 -0
- package/es/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +85 -0
- package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +32 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +2 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/list/types.d.ts +178 -0
- package/es/components/list/utils/index.d.ts +19 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +0 -1
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +3 -0
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Cart/Product.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +84 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +11 -0
- package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +9 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +16 -0
- package/es/components/ticketBooking/locales.d.ts +201 -0
- package/es/components/ticketBooking/serve.d.ts +288 -0
- package/es/components/ticketBooking/utils/index.d.ts +101 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/useEngineContext.d.ts +4 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +21 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +47 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +4 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/es/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/es/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/es/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/es/plus/skuOptionsSelection/types.d.ts +431 -0
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/es/plus/skuOptionsSelection/utils/index.d.ts +7 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/es/plus/webPosLogin/WebPosLoginCpt.d.ts +9 -0
- package/es/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
- package/es/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
- package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/es/plus/webPosLogin/index.d.ts +12 -0
- package/es/plus/webPosLogin/locales.d.ts +49 -0
- package/es/plus/webPosLogin/types.d.ts +286 -0
- package/es/pro/Cards/index.d.ts +1 -0
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/Item.d.ts +14 -0
- package/es/pro/Selector/Selector.d.ts +14 -0
- package/es/pro/Selector/Selector.stories.d.ts +78 -0
- package/es/pro/Selector/SelectorGroup.d.ts +11 -0
- package/es/pro/Selector/components/Card/index.d.ts +57 -0
- package/es/pro/Selector/components/Card/types.d.ts +1 -0
- package/es/pro/Selector/components/Indicator/index.d.ts +20 -0
- package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
- package/es/pro/Selector/components/Media/index.d.ts +6 -0
- package/es/pro/Selector/components/Media/types.d.ts +47 -0
- package/es/pro/Selector/components/index.d.ts +4 -0
- package/es/pro/Selector/demo.d.ts +3 -0
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/es/pro/Selector/hooks/useSelectionController.d.ts +49 -0
- package/es/pro/Selector/index.d.ts +11 -0
- package/es/pro/Selector/locales.d.ts +36 -0
- package/es/pro/Selector/types.d.ts +212 -0
- package/es/pro/Selector/utils/index.d.ts +49 -0
- package/es/pro/skuDetailModal/locales.d.ts +103 -0
- package/es/pro/skuDetailModal/types.d.ts +354 -0
- package/es/pro/skuDetailModal/utils.d.ts +4 -0
- package/es/test/setup.d.ts +1 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/dashboard/serve.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/serve.d.ts +18 -0
- package/lib/components/booking/info/client/serve.d.ts +2 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +11 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/pet/serve.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +3 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
- package/lib/components/booking/info/service/serve.d.ts +34 -0
- package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
- package/lib/components/booking/info/service2/utils.d.ts +219 -0
- package/lib/components/booking/info2/serve.d.ts +6 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +106 -0
- package/lib/components/booking/info2/service/editNormalService/index.d.ts +3 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +28 -0
- package/lib/components/booking/info2/service/openNormalService.d.ts +34 -0
- package/lib/components/booking/info2/utilsByBooking.d.ts +36 -0
- package/lib/components/booking/model.d.ts +121 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +182 -0
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +26 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +85 -0
- package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +32 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +2 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/list/types.d.ts +178 -0
- package/lib/components/list/utils/index.d.ts +19 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +0 -1
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +3 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +84 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +11 -0
- package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +9 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +16 -0
- package/lib/components/ticketBooking/locales.d.ts +201 -0
- package/lib/components/ticketBooking/serve.d.ts +288 -0
- package/lib/components/ticketBooking/utils/index.d.ts +101 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/useEngineContext.d.ts +4 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +21 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +47 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +431 -0
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/lib/plus/skuOptionsSelection/utils/index.d.ts +7 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/lib/plus/webPosLogin/WebPosLoginCpt.d.ts +9 -0
- package/lib/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
- package/lib/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
- package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/lib/plus/webPosLogin/index.d.ts +12 -0
- package/lib/plus/webPosLogin/locales.d.ts +49 -0
- package/lib/plus/webPosLogin/types.d.ts +286 -0
- package/lib/pro/Cards/index.d.ts +1 -0
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/Item.d.ts +14 -0
- package/lib/pro/Selector/Selector.d.ts +14 -0
- package/lib/pro/Selector/Selector.stories.d.ts +78 -0
- package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
- package/lib/pro/Selector/components/Card/index.d.ts +57 -0
- package/lib/pro/Selector/components/Card/types.d.ts +1 -0
- package/lib/pro/Selector/components/Indicator/index.d.ts +20 -0
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
- package/lib/pro/Selector/components/Media/index.d.ts +6 -0
- package/lib/pro/Selector/components/Media/types.d.ts +47 -0
- package/lib/pro/Selector/components/index.d.ts +4 -0
- package/lib/pro/Selector/demo.d.ts +3 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/lib/pro/Selector/hooks/useSelectionController.d.ts +49 -0
- package/lib/pro/Selector/index.d.ts +11 -0
- package/lib/pro/Selector/locales.d.ts +36 -0
- package/lib/pro/Selector/types.d.ts +212 -0
- package/lib/pro/Selector/utils/index.d.ts +49 -0
- package/lib/pro/skuDetailModal/locales.d.ts +103 -0
- package/lib/pro/skuDetailModal/types.d.ts +354 -0
- package/lib/pro/skuDetailModal/utils.d.ts +4 -0
- package/lib/test/setup.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ProductCardSkeleton from './ProductCardSkeleton';
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare type BoolConfigVal = 0 | 1;
|
|
5
|
+
export interface ProductCardConfig {
|
|
6
|
+
isProductCover?: BoolConfigVal;
|
|
7
|
+
imgWidth?: string;
|
|
8
|
+
imgHeight?: string;
|
|
9
|
+
radius?: number;
|
|
10
|
+
isTitle?: BoolConfigVal;
|
|
11
|
+
isSubtitle?: BoolConfigVal;
|
|
12
|
+
showSpec?: boolean;
|
|
13
|
+
isTag?: BoolConfigVal;
|
|
14
|
+
isPrice?: BoolConfigVal;
|
|
15
|
+
isOriginPrice?: BoolConfigVal;
|
|
16
|
+
showZeroPrice?: boolean;
|
|
17
|
+
showMarketingTag?: boolean;
|
|
18
|
+
showRemark?: boolean;
|
|
19
|
+
isStock?: BoolConfigVal;
|
|
20
|
+
}
|
|
21
|
+
export interface ProductCardProps {
|
|
22
|
+
item: any;
|
|
23
|
+
index: number;
|
|
24
|
+
context?: {
|
|
25
|
+
onItemIntersectionIn: (item: any) => void;
|
|
26
|
+
onItemIntersectionOut: (item: any) => void;
|
|
27
|
+
};
|
|
28
|
+
className?: string;
|
|
29
|
+
onSelectProduct?: (item: any) => void;
|
|
30
|
+
currentProductId?: number;
|
|
31
|
+
onSelect?: (item: any) => void;
|
|
32
|
+
onSelectCover?: (item: any) => void;
|
|
33
|
+
onSelectInfo?: (item: any) => void;
|
|
34
|
+
isSelected?: boolean;
|
|
35
|
+
decorateConfig?: ProductCardConfig;
|
|
36
|
+
}
|
|
37
|
+
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, onSelectCover, onSelectInfo, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
38
|
+
export declare const DefaultItemContent: React.MemoExoticComponent<(props: {
|
|
39
|
+
item: any;
|
|
40
|
+
index: number;
|
|
41
|
+
context?: {
|
|
42
|
+
onItemIntersectionIn: (item: any) => void;
|
|
43
|
+
onItemIntersectionOut: (item: any) => void;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}) => JSX.Element>;
|
|
46
|
+
export default ProductCard;
|
|
47
|
+
export { ProductCardSkeleton };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface GridConfig {
|
|
3
|
+
grid: boolean;
|
|
4
|
+
config: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const parseGridConfig: (config: string) => number[];
|
|
7
|
+
export declare const createGridComponents: (layout?: GridConfig | null, { tabSwitchMode }?: {
|
|
8
|
+
tabSwitchMode?: "anchor" | "switch" | undefined;
|
|
9
|
+
}) => {
|
|
10
|
+
List: React.MemoExoticComponent<({ children, ...props }: any) => JSX.Element>;
|
|
11
|
+
Item: React.MemoExoticComponent<({ children, index, item, ...props }: any) => JSX.Element | null>;
|
|
12
|
+
};
|
|
13
|
+
export declare const GRID_LAYOUTS: {
|
|
14
|
+
readonly SINGLE_COLUMN: {
|
|
15
|
+
readonly grid: false;
|
|
16
|
+
readonly config: "12";
|
|
17
|
+
};
|
|
18
|
+
readonly TWO_COLUMNS: {
|
|
19
|
+
readonly grid: true;
|
|
20
|
+
readonly config: "12:12";
|
|
21
|
+
};
|
|
22
|
+
readonly THREE_COLUMNS: {
|
|
23
|
+
readonly grid: true;
|
|
24
|
+
readonly config: "8:8:8";
|
|
25
|
+
};
|
|
26
|
+
readonly FOUR_COLUMNS: {
|
|
27
|
+
readonly grid: true;
|
|
28
|
+
readonly config: "6:6:6:6";
|
|
29
|
+
};
|
|
30
|
+
readonly UNEQUAL_TWO: {
|
|
31
|
+
readonly grid: true;
|
|
32
|
+
readonly config: "8:16";
|
|
33
|
+
};
|
|
34
|
+
readonly UNEQUAL_THREE: {
|
|
35
|
+
readonly grid: true;
|
|
36
|
+
readonly config: "6:12:6";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const createTwoColumnGrid: () => {
|
|
40
|
+
List: React.MemoExoticComponent<({ children, ...props }: any) => JSX.Element>;
|
|
41
|
+
Item: React.MemoExoticComponent<({ children, index, item, ...props }: any) => JSX.Element | null>;
|
|
42
|
+
};
|
|
43
|
+
export declare const createCustomGrid: (config: string) => {
|
|
44
|
+
List: React.MemoExoticComponent<({ children, ...props }: any) => JSX.Element>;
|
|
45
|
+
Item: React.MemoExoticComponent<({ children, index, item, ...props }: any) => JSX.Element | null>;
|
|
46
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TabsStructureProps, TabListContainerProps, TabItemProps, RailProps, SelectionIndicatorProps, ScrollShadowProps, ChevronControlsProps, ChevronButtonProps } from './types';
|
|
3
|
+
declare global {
|
|
4
|
+
interface WeakRef<T extends object> {
|
|
5
|
+
deref(): T | undefined;
|
|
6
|
+
}
|
|
7
|
+
interface WeakRefConstructor {
|
|
8
|
+
new <T extends object>(target: T): WeakRef<T>;
|
|
9
|
+
}
|
|
10
|
+
const WeakRef: WeakRefConstructor | undefined;
|
|
11
|
+
}
|
|
12
|
+
declare const TabListContainer: React.ForwardRefExoticComponent<Omit<TabListContainerProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
13
|
+
declare const TabItem: React.ForwardRefExoticComponent<Omit<TabItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const Rail: React.ForwardRefExoticComponent<Omit<RailProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const SelectionIndicator: React.ForwardRefExoticComponent<Omit<SelectionIndicatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const ScrollShadow: React.ForwardRefExoticComponent<Omit<ScrollShadowProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const ChevronButton: React.ForwardRefExoticComponent<Omit<ChevronButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
declare const ChevronControls: React.FC<ChevronControlsProps>;
|
|
19
|
+
declare type TabsStructureComponent = React.FC<TabsStructureProps> & {
|
|
20
|
+
Rail: typeof Rail;
|
|
21
|
+
ListContainer: typeof TabListContainer;
|
|
22
|
+
Item: typeof TabItem;
|
|
23
|
+
SelectionIndicator: typeof SelectionIndicator;
|
|
24
|
+
ScrollShadow: typeof ScrollShadow;
|
|
25
|
+
ChevronControls: typeof ChevronControls;
|
|
26
|
+
ChevronButton: typeof ChevronButton;
|
|
27
|
+
};
|
|
28
|
+
declare const TabsStructureWithSubComponents: TabsStructureComponent;
|
|
29
|
+
export default TabsStructureWithSubComponents;
|
|
30
|
+
export { TabListContainer, TabItem, Rail, SelectionIndicator, ScrollShadow, ChevronControls, ChevronButton, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SkuCardConfig, SkuSelectionState } from '../types';
|
|
2
|
+
declare const actions: {
|
|
3
|
+
/** 更新数据源 */
|
|
4
|
+
updateDataSource: (dataSource: any) => void;
|
|
5
|
+
/** 更新原始值 */
|
|
6
|
+
updateValue: (value: Record<string | number, any>) => void;
|
|
7
|
+
/** 更新配置 */
|
|
8
|
+
updateConfig: (config: any) => void;
|
|
9
|
+
/** 更新符号 */
|
|
10
|
+
updateSymbol: (symbol: string) => void;
|
|
11
|
+
/** 更新Selector数据源 */
|
|
12
|
+
updateSelectorDataSource: (selectorDataSource: any[]) => void;
|
|
13
|
+
/** 更新Selector识别的值 */
|
|
14
|
+
updateSelectorValue: (selectorValue: Record<string | number, any>) => void;
|
|
15
|
+
/** 更新 SKU Card 配置 */
|
|
16
|
+
updateSkuCardConfig: (skuCardConfig: SkuCardConfig) => void;
|
|
17
|
+
/** 更新自定义配置 */
|
|
18
|
+
updateCustomConfig: (customConfig: Partial<SkuSelectionState['customConfig']>) => void;
|
|
19
|
+
/** 清空整个store的值 */
|
|
20
|
+
clearStore: () => void;
|
|
21
|
+
};
|
|
22
|
+
export default actions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface StoreApi<T> {
|
|
2
|
+
setState: (partial: Partial<T> | ((prev: T) => Partial<T>)) => void;
|
|
3
|
+
getState: () => T;
|
|
4
|
+
subscribe: (listener: () => void) => () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface UseStore<T> extends StoreApi<T> {
|
|
7
|
+
<S>(selector?: (state: T) => S): S;
|
|
8
|
+
<S = T>(): S;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 创建一个跨 React 版本兼容的 Store
|
|
12
|
+
* 支持自动浅合并 (Auto Shallow Merge)
|
|
13
|
+
* @param initialState 初始状态
|
|
14
|
+
*/
|
|
15
|
+
export default function createStore<T extends object>(initialState: T): UseStore<T>;
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* SKU Card 文本样式配置
|
|
4
|
+
*/
|
|
5
|
+
export interface SkuCardTextConfig {
|
|
6
|
+
/** 是否显示 */
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
/** 字体大小 */
|
|
9
|
+
fontSize?: number;
|
|
10
|
+
/** 颜色 */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** 字体粗细 */
|
|
13
|
+
fontWeight?: 'normal' | 'bold' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
14
|
+
/** 展示行数 */
|
|
15
|
+
lineClamp?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* SKU Card 图片配置
|
|
19
|
+
*/
|
|
20
|
+
export interface SkuCardImageConfig {
|
|
21
|
+
/** 是否显示 */
|
|
22
|
+
visible?: boolean;
|
|
23
|
+
/** 宽度 */
|
|
24
|
+
width?: number;
|
|
25
|
+
/** 高度 */
|
|
26
|
+
height?: number;
|
|
27
|
+
/** 圆角 */
|
|
28
|
+
borderRadius?: number | string;
|
|
29
|
+
/** 边框 */
|
|
30
|
+
border?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* SKU Card 配置
|
|
34
|
+
*/
|
|
35
|
+
export interface SkuCardConfig {
|
|
36
|
+
/** 主标题配置 */
|
|
37
|
+
title?: SkuCardTextConfig;
|
|
38
|
+
/** 副标题配置 */
|
|
39
|
+
subTitle?: SkuCardTextConfig;
|
|
40
|
+
/** 价格配置 */
|
|
41
|
+
price?: Omit<SkuCardTextConfig, 'lineClamp'>;
|
|
42
|
+
/** 图片配置 */
|
|
43
|
+
image?: SkuCardImageConfig;
|
|
44
|
+
/**
|
|
45
|
+
* @description 是否在「组合规格选项卡片(VariantCard)」展示价格
|
|
46
|
+
* - 默认不展示,避免影响现有业务 UI
|
|
47
|
+
*/
|
|
48
|
+
variantPriceVisible?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* SKU store状态类型
|
|
52
|
+
*/
|
|
53
|
+
export interface SkuSelectionState {
|
|
54
|
+
/** 数据源 */
|
|
55
|
+
dataSource: any;
|
|
56
|
+
/** 原始值 */
|
|
57
|
+
value: Record<string | number, any>;
|
|
58
|
+
/** 配置 */
|
|
59
|
+
config: {
|
|
60
|
+
overSold?: boolean;
|
|
61
|
+
};
|
|
62
|
+
/** 货币符号 */
|
|
63
|
+
symbol: string;
|
|
64
|
+
/** Selector数据源 */
|
|
65
|
+
selectorDataSource: any[];
|
|
66
|
+
/** Selector识别的值 */
|
|
67
|
+
selectorValue: Record<string | number, any>;
|
|
68
|
+
/** SKU Card 配置 */
|
|
69
|
+
skuCardConfig: SkuCardConfig;
|
|
70
|
+
style?: React.CSSProperties;
|
|
71
|
+
/** 样式配置 */
|
|
72
|
+
customConfig?: {
|
|
73
|
+
/** 弹窗宽度 */
|
|
74
|
+
modalWidth?: number | string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** SKU Card 默认配置 */
|
|
78
|
+
export declare const defaultSkuCardConfig: SkuCardConfig;
|
|
79
|
+
export interface IProps {
|
|
80
|
+
/** 数据源 */
|
|
81
|
+
dataSource: DataSource;
|
|
82
|
+
/** 原始值 */
|
|
83
|
+
value: SkuValue;
|
|
84
|
+
/** 配置 */
|
|
85
|
+
config?: {
|
|
86
|
+
/** 是否禁用 */
|
|
87
|
+
overSold?: 0 | 1;
|
|
88
|
+
};
|
|
89
|
+
/** SKU Card 配置 */
|
|
90
|
+
skuCardConfig?: SkuCardConfig;
|
|
91
|
+
/** 选中变更回调 */
|
|
92
|
+
onChange: (value: SkuValue) => void;
|
|
93
|
+
/** 自定义滚动容器 */
|
|
94
|
+
customScrollParent?: HTMLElement | string;
|
|
95
|
+
/** 自定义样式 */
|
|
96
|
+
style?: React.CSSProperties;
|
|
97
|
+
/** 自定义配置 */
|
|
98
|
+
customConfig?: {
|
|
99
|
+
/** 弹窗宽度 */
|
|
100
|
+
modalWidth?: number | string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface DataSource {
|
|
104
|
+
/** 单规格组数据 */
|
|
105
|
+
option_group?: Array<OptionGroupItem>;
|
|
106
|
+
/** 组合规格组装后的数据 */
|
|
107
|
+
variant?: Array<VariantProductItem>;
|
|
108
|
+
/** 组合规格组数据 */
|
|
109
|
+
variant_group?: Array<VariantGroupItem>;
|
|
110
|
+
/** 套餐商品组数据 */
|
|
111
|
+
bundle_group?: Array<BundleItem>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* 单规格组数据
|
|
115
|
+
*/
|
|
116
|
+
export interface OptionGroupItem {
|
|
117
|
+
/** 创建者id */
|
|
118
|
+
create_account_id?: number;
|
|
119
|
+
/** 创建时间 */
|
|
120
|
+
created_at?: string;
|
|
121
|
+
/** 删除时间 */
|
|
122
|
+
deleted_at?: string | null;
|
|
123
|
+
/** 模板id */
|
|
124
|
+
template_id?: number;
|
|
125
|
+
/** 更新者id */
|
|
126
|
+
update_account_id?: number;
|
|
127
|
+
/** 更新时间 */
|
|
128
|
+
updated_at?: string;
|
|
129
|
+
/** 单规格组id */
|
|
130
|
+
id?: number;
|
|
131
|
+
/** 是否启用 */
|
|
132
|
+
is_enabled?: 0 | 1;
|
|
133
|
+
/** 是否多选 */
|
|
134
|
+
is_multiple?: 0 | 1;
|
|
135
|
+
/** 最大选择数量 */
|
|
136
|
+
max_quantity?: number;
|
|
137
|
+
/** 最小选择数量 */
|
|
138
|
+
min_quantity?: number;
|
|
139
|
+
/** 单规格组名称 */
|
|
140
|
+
name?: string;
|
|
141
|
+
/** 单规格组下规格数据 */
|
|
142
|
+
option_item?: Array<OptionItem>;
|
|
143
|
+
/** 商品id */
|
|
144
|
+
product_id?: number;
|
|
145
|
+
/** 是否必选 */
|
|
146
|
+
required?: 0 | 1;
|
|
147
|
+
/** 店铺id */
|
|
148
|
+
shop_id?: number;
|
|
149
|
+
/** 排序 */
|
|
150
|
+
sort?: number;
|
|
151
|
+
/** 状态 */
|
|
152
|
+
status?: 0 | 1;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* 单规格组下选项数据
|
|
156
|
+
*/
|
|
157
|
+
export interface OptionItem {
|
|
158
|
+
/** 创建者id */
|
|
159
|
+
create_account_id?: number;
|
|
160
|
+
/** 创建时间 */
|
|
161
|
+
created_at?: string;
|
|
162
|
+
/** 删除时间 */
|
|
163
|
+
deleted_at?: string | null;
|
|
164
|
+
/** 模板id */
|
|
165
|
+
template_id?: number;
|
|
166
|
+
/** 更新者id */
|
|
167
|
+
update_account_id?: number;
|
|
168
|
+
/** 更新时间 */
|
|
169
|
+
updated_at?: string;
|
|
170
|
+
/** 加价 */
|
|
171
|
+
add_price?: string;
|
|
172
|
+
/** 封面 */
|
|
173
|
+
cover?: string;
|
|
174
|
+
/** 描述 */
|
|
175
|
+
description?: string;
|
|
176
|
+
/** 规格id */
|
|
177
|
+
id?: number;
|
|
178
|
+
/** 是否启用 */
|
|
179
|
+
is_enabled?: 0 | 1;
|
|
180
|
+
/** 最大选择数量 */
|
|
181
|
+
max_quantity?: number;
|
|
182
|
+
/** 规格名称 */
|
|
183
|
+
name?: string;
|
|
184
|
+
/** 规格组id */
|
|
185
|
+
option_group_id?: number;
|
|
186
|
+
/** 原价 */
|
|
187
|
+
original_price?: string;
|
|
188
|
+
/** 商品id */
|
|
189
|
+
product_id?: number;
|
|
190
|
+
/** 店铺id */
|
|
191
|
+
shop_id?: number;
|
|
192
|
+
/** 排序 */
|
|
193
|
+
sort?: number;
|
|
194
|
+
/** 状态 */
|
|
195
|
+
status?: 0 | 1;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* 组合规格组数据
|
|
199
|
+
*/
|
|
200
|
+
export interface VariantGroupItem {
|
|
201
|
+
/** 创建者id */
|
|
202
|
+
create_account_id?: number;
|
|
203
|
+
/** 创建时间 */
|
|
204
|
+
created_at?: string;
|
|
205
|
+
/** 删除时间 */
|
|
206
|
+
deleted_at?: string | null;
|
|
207
|
+
/** 更新者id */
|
|
208
|
+
update_account_id?: number;
|
|
209
|
+
/** 更新时间 */
|
|
210
|
+
updated_at?: string;
|
|
211
|
+
/** 组合规格组id */
|
|
212
|
+
id?: number;
|
|
213
|
+
/** 组合规格组名称 */
|
|
214
|
+
name?: string;
|
|
215
|
+
/** 位置id */
|
|
216
|
+
position_id?: number;
|
|
217
|
+
/** 商品id */
|
|
218
|
+
product_id?: number;
|
|
219
|
+
/** 店铺id */
|
|
220
|
+
shop_id?: number;
|
|
221
|
+
/** 排序 */
|
|
222
|
+
sort?: number;
|
|
223
|
+
/** 状态 */
|
|
224
|
+
status?: 0 | 1;
|
|
225
|
+
/** 组合规格组下选项数据 */
|
|
226
|
+
variant_item?: Array<VariantItem>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* 组合规格组下选项数据
|
|
230
|
+
*/
|
|
231
|
+
export interface VariantItem {
|
|
232
|
+
/** 创建者id */
|
|
233
|
+
create_account_id?: number;
|
|
234
|
+
/** 创建时间 */
|
|
235
|
+
created_at?: string;
|
|
236
|
+
/** 删除时间 */
|
|
237
|
+
deleted_at?: string | null;
|
|
238
|
+
/** 更新者id */
|
|
239
|
+
update_account_id?: number;
|
|
240
|
+
/** 更新时间 */
|
|
241
|
+
updated_at?: string;
|
|
242
|
+
/** 店铺id */
|
|
243
|
+
shop_id?: number;
|
|
244
|
+
/** 排序 */
|
|
245
|
+
sort?: number;
|
|
246
|
+
/** 规格id */
|
|
247
|
+
id?: number;
|
|
248
|
+
/** 是否默认 */
|
|
249
|
+
is_default?: 0 | 1;
|
|
250
|
+
/** 变体名称 */
|
|
251
|
+
name?: string;
|
|
252
|
+
/** 位置id */
|
|
253
|
+
position_id?: number;
|
|
254
|
+
/** 商品id */
|
|
255
|
+
product_id?: number;
|
|
256
|
+
/** 状态 */
|
|
257
|
+
status?: 0 | 1;
|
|
258
|
+
/** 组合规格组id */
|
|
259
|
+
variant_group_id?: number;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* 组合规格商品数据
|
|
263
|
+
*/
|
|
264
|
+
export interface VariantProductItem {
|
|
265
|
+
/** 创建者id */
|
|
266
|
+
create_account_id?: number;
|
|
267
|
+
/** 创建时间 */
|
|
268
|
+
created_at?: string;
|
|
269
|
+
/** 更新者id */
|
|
270
|
+
update_account_id?: number;
|
|
271
|
+
/** 更新时间 */
|
|
272
|
+
updated_at?: string;
|
|
273
|
+
/** 条形码 */
|
|
274
|
+
barcode?: string;
|
|
275
|
+
/** 基础价格 */
|
|
276
|
+
base_price?: string;
|
|
277
|
+
/** 箱规数量 */
|
|
278
|
+
box_specification_quantity?: number;
|
|
279
|
+
/** 编码 */
|
|
280
|
+
code?: string;
|
|
281
|
+
/** 成本价格 */
|
|
282
|
+
cost_price?: string;
|
|
283
|
+
/** 封面 */
|
|
284
|
+
cover?: string;
|
|
285
|
+
/** 描述 */
|
|
286
|
+
description?: string | null;
|
|
287
|
+
/** 是否禁用 */
|
|
288
|
+
disabled?: 0 | 1;
|
|
289
|
+
/** 组合规格商品id */
|
|
290
|
+
id?: number;
|
|
291
|
+
/** 是否收税 */
|
|
292
|
+
is_charge_tax?: 0 | 1;
|
|
293
|
+
/** 是否发货 */
|
|
294
|
+
is_delivery?: 0 | 1;
|
|
295
|
+
/** 是否收税 */
|
|
296
|
+
is_gst?: 0 | 1;
|
|
297
|
+
/** 是否跟踪库存 */
|
|
298
|
+
is_track?: 0 | 1;
|
|
299
|
+
/** 名称 */
|
|
300
|
+
name?: Record<string, string>;
|
|
301
|
+
/** 开售重量 */
|
|
302
|
+
open_sold_weight?: number;
|
|
303
|
+
/** 原价 */
|
|
304
|
+
original_price?: string;
|
|
305
|
+
/** 是否超卖 */
|
|
306
|
+
over_sold?: 0 | 1;
|
|
307
|
+
/** 价格 */
|
|
308
|
+
price?: string;
|
|
309
|
+
/** 商品id */
|
|
310
|
+
product_id?: number;
|
|
311
|
+
/** 折扣类型 */
|
|
312
|
+
rebate_type?: string;
|
|
313
|
+
/** 折扣值 */
|
|
314
|
+
rebate_value?: number;
|
|
315
|
+
/** 标题 */
|
|
316
|
+
title?: Record<string, string>;
|
|
317
|
+
/** 单位 */
|
|
318
|
+
unit?: string;
|
|
319
|
+
/** 单位值 */
|
|
320
|
+
unit_value?: number;
|
|
321
|
+
/** 重量单位 */
|
|
322
|
+
weight_unit?: string;
|
|
323
|
+
/** 重量值 */
|
|
324
|
+
weight_value?: string;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* 套餐商品组数据
|
|
328
|
+
*/
|
|
329
|
+
export interface BundleGroupItem {
|
|
330
|
+
/** 店铺id */
|
|
331
|
+
shop_id?: number;
|
|
332
|
+
/** 排序 */
|
|
333
|
+
sort?: number;
|
|
334
|
+
/** 套餐id */
|
|
335
|
+
id?: number;
|
|
336
|
+
/** 最大选择数量 */
|
|
337
|
+
max_quantity?: number;
|
|
338
|
+
/** 最小选择数量 */
|
|
339
|
+
min_quantity?: number;
|
|
340
|
+
/** 套餐名称 */
|
|
341
|
+
name?: string;
|
|
342
|
+
/** 商品id */
|
|
343
|
+
product_id?: number;
|
|
344
|
+
/** 套餐商品组数据 */
|
|
345
|
+
bundle_item?: Array<BundleItem>;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* 套餐商品组下选项数据
|
|
349
|
+
*/
|
|
350
|
+
export interface BundleItem {
|
|
351
|
+
/** 店铺id */
|
|
352
|
+
shop_id?: number;
|
|
353
|
+
/** 排序 */
|
|
354
|
+
sort?: number;
|
|
355
|
+
/** 条形码 */
|
|
356
|
+
barcode?: string;
|
|
357
|
+
/** 套餐商品id */
|
|
358
|
+
bundle_product_id?: number;
|
|
359
|
+
/** 套餐商品变体id */
|
|
360
|
+
bundle_variant_id?: number;
|
|
361
|
+
/** 编码 */
|
|
362
|
+
code?: string;
|
|
363
|
+
/** 封面 */
|
|
364
|
+
cover?: string;
|
|
365
|
+
/** 扩展id */
|
|
366
|
+
extension_id?: number;
|
|
367
|
+
/** 扩展类型 */
|
|
368
|
+
extension_type?: string;
|
|
369
|
+
/** 套餐商品组id */
|
|
370
|
+
group_id?: number;
|
|
371
|
+
/** 套餐商品id */
|
|
372
|
+
id: string | number;
|
|
373
|
+
/** 是否跟踪库存 */
|
|
374
|
+
is_track?: 0 | 1;
|
|
375
|
+
/** 最大选择数量 */
|
|
376
|
+
max_quantity?: number;
|
|
377
|
+
/** 单规格组数据 */
|
|
378
|
+
option_group?: Array<OptionGroupItem>;
|
|
379
|
+
/** 是否允许超卖 */
|
|
380
|
+
over_sold?: 0 | 1;
|
|
381
|
+
/** 价格 */
|
|
382
|
+
price?: string;
|
|
383
|
+
/** 价格类型: mark_up==>加价 | mark_down==>减价 */
|
|
384
|
+
price_type?: 'mark_up' | 'mark_down';
|
|
385
|
+
/** 价格类型扩展: product_price==>商品价格 */
|
|
386
|
+
price_type_ext?: '' | 'product_price';
|
|
387
|
+
/** 商品id */
|
|
388
|
+
product_id?: number;
|
|
389
|
+
/** 商品价格 */
|
|
390
|
+
product_price?: string;
|
|
391
|
+
/** 商品副标题 */
|
|
392
|
+
product_subtitle?: string;
|
|
393
|
+
/** 库存数量 */
|
|
394
|
+
stock_quantity?: number;
|
|
395
|
+
/** 标题 */
|
|
396
|
+
title?: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* sku value
|
|
400
|
+
*/
|
|
401
|
+
export interface SkuValue {
|
|
402
|
+
/** 商品id */
|
|
403
|
+
product_id: number;
|
|
404
|
+
/** 多规格商品id */
|
|
405
|
+
product_variant_id: number;
|
|
406
|
+
/** 多规格商品选项字符串 */
|
|
407
|
+
product_option_string?: string;
|
|
408
|
+
/** 套餐商品组数据 */
|
|
409
|
+
bundle: Array<any>;
|
|
410
|
+
/** 价格 */
|
|
411
|
+
price?: string | number;
|
|
412
|
+
/** 单规格组数据 */
|
|
413
|
+
option: Array<OptionItem & {
|
|
414
|
+
num: number;
|
|
415
|
+
price: string;
|
|
416
|
+
product_option_item_id: number;
|
|
417
|
+
}>;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Selector值原子类型
|
|
421
|
+
*/
|
|
422
|
+
export interface SelectorValueAtom {
|
|
423
|
+
/** 数据 */
|
|
424
|
+
data: Record<string, any>;
|
|
425
|
+
/** 数量 */
|
|
426
|
+
quantity: number;
|
|
427
|
+
/** 总价 */
|
|
428
|
+
totalPrice: string | number;
|
|
429
|
+
/** 值 */
|
|
430
|
+
value: number | string;
|
|
431
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title 检查SKU库存是否可以售卖
|
|
3
|
+
* @description
|
|
4
|
+
* 首先受到 SKU 的 is_track 字段的影响,如果 is_track 为 0,表示不跟踪库存,则不检查库存
|
|
5
|
+
* 其次受到 SKU 的 over_sold 字段 和 config.overSold 配置的影响,如果 over_sold 为 1 或 config.overSold 为 true,表示允许超卖,则不检查库存
|
|
6
|
+
* 最后受到 SKU 的 stock_quantity 字段的影响,如果 stock_quantity 小于等于 0,表示库存不足
|
|
7
|
+
*/
|
|
8
|
+
export declare const checkSkuStockCanSell: (sku: any) => {
|
|
9
|
+
canSell: boolean;
|
|
10
|
+
hasStock: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @title 检查SKU是否禁用
|
|
14
|
+
* @description 如果SKU被禁用,或者库存不足不能售卖,则返回 true
|
|
15
|
+
*/
|
|
16
|
+
export declare const checkSkuDisabled: (sku: any, canSell?: boolean) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @title 组合规格库存检查(初始化时使用)
|
|
19
|
+
* @description 检查包含该规格选项的所有组合商品的库存状态
|
|
20
|
+
*/
|
|
21
|
+
export declare const checkVariantStockCanSell: (sku: any) => {
|
|
22
|
+
canSell: any;
|
|
23
|
+
hasStock: any;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @title 根据已经选择的规格选项,筛选出包含对应规格的商品并进行库存检查
|
|
27
|
+
* @description
|
|
28
|
+
* 1. 收集当前判断的规格 + 其他规格组已选的规格(排除当前规格组)
|
|
29
|
+
* 2. 根据收集的规格,筛选出包含对应规格的组合商品
|
|
30
|
+
* 3. 对筛选出的商品进行库存检查
|
|
31
|
+
* 4. 只要有一个匹配商品能售卖,则该选项可选
|
|
32
|
+
* 5. 只要有一个匹配商品有库存,则显示有库存
|
|
33
|
+
*/
|
|
34
|
+
export declare const checkVariantStockByValue: (sku: any) => {
|
|
35
|
+
canSell: boolean;
|
|
36
|
+
hasStock: boolean;
|
|
37
|
+
};
|