@pisell/private-materials 3.0.203 → 3.0.205
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +27 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +33 -18
- package/es/components/booking/components/customSelect/index.d.ts +0 -1
- package/es/components/booking/components/customSelect/index.js +2 -6
- package/es/components/booking/components/footer/amount.js +22 -46
- package/es/components/booking/components/footer/index.js +40 -84
- package/es/components/booking/components/footer/utils.js +35 -266
- package/es/components/booking/forms/model.d.ts +1 -1
- package/es/components/booking/info/addServiceVariant/index.js +1 -8
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +9 -124
- package/es/components/booking/info/main.js +15 -28
- package/es/components/booking/info/model.js +0 -3
- package/es/components/booking/info/pet/index.js +5 -54
- package/es/components/booking/info/service/addService/index.js +96 -187
- package/es/components/booking/info/service/addService/index.less +3 -13
- package/es/components/booking/info/service/addService/utils.d.ts +2 -12
- package/es/components/booking/info/service/addService/utils.js +26 -103
- package/es/components/booking/info/service/editService/index.js +132 -435
- package/es/components/booking/info/service/editService/index.less +13 -18
- package/es/components/booking/info/service/serve.d.ts +0 -10
- package/es/components/booking/info/service/serve.js +0 -28
- package/es/components/booking/info/utils.d.ts +0 -20
- package/es/components/booking/info/utils.js +0 -37
- package/es/components/booking/locales.d.ts +0 -66
- package/es/components/booking/locales.js +3 -81
- package/es/components/booking/model.d.ts +1 -5
- package/es/components/booking/model.js +2 -4
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -1
- package/es/components/booking/utils.d.ts +3 -12
- package/es/components/booking/utils.js +26 -143
- package/es/components/eftpos/form/index.js +12 -6
- package/es/components/eftpos/group/index.d.ts +1 -2
- package/es/components/eftpos/group/index.js +1 -2
- package/es/components/eftpos/hooks.d.ts +4 -4
- package/es/components/eftpos/index.js +2 -2
- package/es/components/eftpos/receipt/index.d.ts +24 -0
- package/es/components/eftpos/receipt/index.js +96 -0
- package/es/components/eftposPay/app.d.ts +11 -0
- package/es/components/eftposPay/app.js +173 -0
- package/es/components/eftposPay/component/fail/failCustom.js +1 -0
- package/es/components/eftposPay/component/fail/index.js +1 -0
- package/es/components/eftposPay/component/manual/index.js +4 -1
- package/es/components/eftposPay/component/step/index.d.ts +6 -6
- package/es/components/eftposPay/component/step/step.d.ts +4 -4
- package/es/components/eftposPay/const.d.ts +27 -1
- package/es/components/eftposPay/const.js +22 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/device.js +2 -2
- package/es/components/eftposPay/helper.d.ts +6 -0
- package/es/components/eftposPay/helper.js +24 -4
- package/es/components/eftposPay/hooks.d.ts +2 -1
- package/es/components/eftposPay/hooks.js +22 -16
- package/es/components/eftposPay/index.d.ts +1 -1
- package/es/components/eftposPay/index.js +130 -179
- package/es/components/eftposPay/locales.d.ts +15 -0
- package/es/components/eftposPay/locales.js +15 -0
- package/es/components/eftposPay/payo/config.js +20 -8
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tip.d.ts +10 -0
- package/es/components/eftposPay/tip.js +177 -0
- package/es/components/eftposPay/tip.less +9 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/es/components/eftposPay/tyro/index.js +55 -22
- package/es/components/eftposPay/windcave/helper.d.ts +1 -1
- package/es/components/eftposPay/windcave/windcave.js +17 -6
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/booking/components/customSelect/index.d.ts +0 -1
- package/lib/components/booking/components/customSelect/index.js +2 -6
- package/lib/components/booking/components/footer/amount.js +8 -27
- package/lib/components/booking/components/footer/index.js +4 -25
- package/lib/components/booking/components/footer/utils.js +35 -161
- package/lib/components/booking/forms/model.d.ts +1 -1
- package/lib/components/booking/info/addServiceVariant/index.js +0 -5
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +7 -8
- package/lib/components/booking/info/clientVariant/vertical/index.js +11 -87
- package/lib/components/booking/info/main.js +9 -17
- package/lib/components/booking/info/model.js +0 -3
- package/lib/components/booking/info/pet/index.js +25 -61
- package/lib/components/booking/info/service/addService/index.js +84 -115
- package/lib/components/booking/info/service/addService/index.less +3 -13
- package/lib/components/booking/info/service/addService/utils.d.ts +2 -12
- package/lib/components/booking/info/service/addService/utils.js +10 -58
- package/lib/components/booking/info/service/editService/index.js +182 -425
- package/lib/components/booking/info/service/editService/index.less +13 -18
- package/lib/components/booking/info/service/serve.d.ts +0 -10
- package/lib/components/booking/info/service/serve.js +2 -7
- package/lib/components/booking/info/utils.d.ts +0 -20
- package/lib/components/booking/info/utils.js +0 -41
- package/lib/components/booking/locales.d.ts +0 -66
- package/lib/components/booking/locales.js +3 -69
- package/lib/components/booking/model.d.ts +1 -5
- package/lib/components/booking/model.js +2 -4
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +3 -12
- package/lib/components/booking/utils.js +18 -89
- package/lib/components/eftpos/form/index.js +12 -6
- package/lib/components/eftpos/group/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.js +0 -1
- package/lib/components/eftpos/hooks.d.ts +4 -4
- package/lib/components/eftpos/index.js +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +24 -0
- package/lib/components/eftpos/receipt/index.js +88 -0
- package/lib/components/eftposPay/app.d.ts +11 -0
- package/lib/components/eftposPay/app.js +166 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
- package/lib/components/eftposPay/component/fail/index.js +1 -1
- package/lib/components/eftposPay/component/manual/index.js +19 -5
- package/lib/components/eftposPay/component/step/index.d.ts +6 -6
- package/lib/components/eftposPay/component/step/step.d.ts +4 -4
- package/lib/components/eftposPay/const.d.ts +27 -1
- package/lib/components/eftposPay/const.js +18 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/device.js +2 -2
- package/lib/components/eftposPay/helper.d.ts +6 -0
- package/lib/components/eftposPay/helper.js +29 -4
- package/lib/components/eftposPay/hooks.d.ts +2 -1
- package/lib/components/eftposPay/hooks.js +8 -2
- package/lib/components/eftposPay/index.d.ts +1 -1
- package/lib/components/eftposPay/index.js +106 -144
- package/lib/components/eftposPay/locales.d.ts +15 -0
- package/lib/components/eftposPay/locales.js +15 -0
- package/lib/components/eftposPay/payo/config.js +33 -9
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tip.d.ts +10 -0
- package/lib/components/eftposPay/tip.js +159 -0
- package/lib/components/eftposPay/tip.less +9 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +2 -2
- package/lib/components/eftposPay/tyro/index.js +40 -9
- package/lib/components/eftposPay/windcave/helper.d.ts +1 -1
- package/lib/components/eftposPay/windcave/windcave.js +29 -6
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/package.json +5 -5
- package/es/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/es/components/booking/components/footer/AppointmentProductModal/index.js +0 -38
- package/es/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/es/components/booking/info/Provider.d.ts +0 -0
- package/es/components/booking/info/Provider.js +0 -54
- package/es/components/booking/info/dateRange/index.d.ts +0 -5
- package/es/components/booking/info/dateRange/index.js +0 -98
- package/es/components/booking/info/dateRange/index.less +0 -21
- package/es/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/es/components/booking/info/pet/ChangePetModal/index.js +0 -134
- package/es/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/es/components/booking/info/service/editService/BookingList/index.js +0 -39
- package/es/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/es/components/booking/info/service/editService/EditTabs/index.js +0 -35
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/es/components/booking/info/service/serviceManager/distributeDiscount.js +0 -55
- package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceManager/index.js +0 -277
- package/es/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/es/components/booking/info/service/serviceManager/utils.js +0 -0
- package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/es/components/booking/info/service2/Group/utils.js +0 -146
- package/es/components/booking/info/service2/Lists.d.ts +0 -3
- package/es/components/booking/info/service2/Lists.js +0 -152
- package/es/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/es/components/booking/info/service2/hooks/useSelectPet.js +0 -54
- package/es/components/booking/info/service2/index.d.ts +0 -6
- package/es/components/booking/info/service2/index.js +0 -57
- package/es/components/booking/info/service2/status.d.ts +0 -31
- package/es/components/booking/info/service2/status.js +0 -78
- package/es/components/booking/info/service2/utils.d.ts +0 -237
- package/es/components/booking/info/service2/utils.js +0 -1064
- package/es/components/booking/materiels/holder/index.d.ts +0 -7
- package/es/components/booking/materiels/holder/index.js +0 -51
- package/es/components/shoppingCart/Provider.d.ts +0 -3
- package/es/components/shoppingCart/Provider.js +0 -86
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +0 -68
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.js +0 -72
- package/es/components/shoppingCart/components/Cart/index.less +0 -68
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Empty/index.js +0 -14
- package/es/components/shoppingCart/components/Empty/index.less +0 -19
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/es/components/shoppingCart/components/Render/index.js +0 -69
- package/es/components/shoppingCart/components/Render/index.less +0 -2
- package/es/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/es/components/shoppingCart/components/SelectHolderModal/index.js +0 -132
- package/es/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useAddService.js +0 -23
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/es/components/shoppingCart/hooks/useClearCart.js +0 -59
- package/es/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useContext.js +0 -5
- package/es/components/shoppingCart/index.d.ts +0 -4
- package/es/components/shoppingCart/index.js +0 -24
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/locales.js +0 -38
- package/es/components/shoppingCart/mock.d.ts +0 -40
- package/es/components/shoppingCart/mock.js +0 -40
- package/es/components/shoppingCart/status.d.ts +0 -2
- package/es/components/shoppingCart/status.js +0 -22
- package/es/components/shoppingCart/type.d.ts +0 -39
- package/es/components/shoppingCart/type.js +0 -1
- package/es/components/shoppingCart/utils.d.ts +0 -63
- package/es/components/shoppingCart/utils.js +0 -116
- package/lib/components/booking/components/footer/AppointmentProductModal/index.d.ts +0 -3
- package/lib/components/booking/components/footer/AppointmentProductModal/index.js +0 -60
- package/lib/components/booking/components/footer/AppointmentProductModal/index.less +0 -0
- package/lib/components/booking/info/Provider.d.ts +0 -0
- package/lib/components/booking/info/Provider.js +0 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -5
- package/lib/components/booking/info/dateRange/index.js +0 -111
- package/lib/components/booking/info/dateRange/index.less +0 -21
- package/lib/components/booking/info/pet/ChangePetModal/index.d.ts +0 -4
- package/lib/components/booking/info/pet/ChangePetModal/index.js +0 -121
- package/lib/components/booking/info/pet/ChangePetModal/index.less +0 -4
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -5
- package/lib/components/booking/info/service/editService/BookingList/index.js +0 -55
- package/lib/components/booking/info/service/editService/EditTabs/index.d.ts +0 -3
- package/lib/components/booking/info/service/editService/EditTabs/index.js +0 -75
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +0 -11
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.js +0 -70
- package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceManager/index.js +0 -207
- package/lib/components/booking/info/service/serviceManager/utils.d.ts +0 -0
- package/lib/components/booking/info/service/serviceManager/utils.js +0 -0
- package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
- package/lib/components/booking/info/service2/Group/utils.js +0 -142
- package/lib/components/booking/info/service2/Lists.d.ts +0 -3
- package/lib/components/booking/info/service2/Lists.js +0 -115
- package/lib/components/booking/info/service2/hooks/useSelectPet.d.ts +0 -6
- package/lib/components/booking/info/service2/hooks/useSelectPet.js +0 -50
- package/lib/components/booking/info/service2/index.d.ts +0 -6
- package/lib/components/booking/info/service2/index.js +0 -75
- package/lib/components/booking/info/service2/status.d.ts +0 -31
- package/lib/components/booking/info/service2/status.js +0 -81
- package/lib/components/booking/info/service2/utils.d.ts +0 -237
- package/lib/components/booking/info/service2/utils.js +0 -678
- package/lib/components/booking/materiels/holder/index.d.ts +0 -7
- package/lib/components/booking/materiels/holder/index.js +0 -65
- package/lib/components/shoppingCart/Provider.d.ts +0 -3
- package/lib/components/shoppingCart/Provider.js +0 -110
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/Product.js +0 -73
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.js +0 -77
- package/lib/components/shoppingCart/components/Cart/index.less +0 -68
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Empty/index.js +0 -43
- package/lib/components/shoppingCart/components/Empty/index.less +0 -19
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/Render/index.js +0 -75
- package/lib/components/shoppingCart/components/Render/index.less +0 -2
- package/lib/components/shoppingCart/components/SelectHolderModal/index.d.ts +0 -4
- package/lib/components/shoppingCart/components/SelectHolderModal/index.js +0 -124
- package/lib/components/shoppingCart/components/SelectHolderModal/index.less +0 -32
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useAddService.js +0 -55
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -3
- package/lib/components/shoppingCart/hooks/useClearCart.js +0 -66
- package/lib/components/shoppingCart/hooks/useContext.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useContext.js +0 -31
- package/lib/components/shoppingCart/index.d.ts +0 -4
- package/lib/components/shoppingCart/index.js +0 -60
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/locales.js +0 -56
- package/lib/components/shoppingCart/mock.d.ts +0 -40
- package/lib/components/shoppingCart/mock.js +0 -76
- package/lib/components/shoppingCart/status.d.ts +0 -2
- package/lib/components/shoppingCart/status.js +0 -60
- package/lib/components/shoppingCart/type.d.ts +0 -39
- package/lib/components/shoppingCart/type.js +0 -17
- package/lib/components/shoppingCart/utils.d.ts +0 -63
- package/lib/components/shoppingCart/utils.js +0 -86
- package/lowcode/shopping-cart/meta.ts +0 -98
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { CollapseProps } from 'antd';
|
|
2
|
-
export interface productProps {
|
|
3
|
-
hideAddBtn?: boolean;
|
|
4
|
-
isShowNote?: boolean;
|
|
5
|
-
isShowPackageNote?: boolean;
|
|
6
|
-
products?: any[];
|
|
7
|
-
holders?: any[];
|
|
8
|
-
isEdit?: boolean;
|
|
9
|
-
disabledEdit?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface shoppingCartProps {
|
|
12
|
-
isOpenGroup?: boolean;
|
|
13
|
-
carts?: any[];
|
|
14
|
-
platform?: 'shop' | 'h5';
|
|
15
|
-
emptyText?: string;
|
|
16
|
-
activeKey?: string[] | number[];
|
|
17
|
-
defaultActiveKey?: string[] | number[];
|
|
18
|
-
className?: string;
|
|
19
|
-
onCard?: (e: any) => void;
|
|
20
|
-
onChange?: (items: any, type?: string, other?: any) => void;
|
|
21
|
-
onAddProduct?: (e?: any) => void;
|
|
22
|
-
onActiveKey?: (e: any) => void;
|
|
23
|
-
isShowImage?: boolean;
|
|
24
|
-
isShowHolder?: boolean;
|
|
25
|
-
isShowDelete?: boolean;
|
|
26
|
-
collapseParams?: CollapseProps;
|
|
27
|
-
productParams?: productProps;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @title: 商品卡片
|
|
31
|
-
* @description:
|
|
32
|
-
* @return {*}
|
|
33
|
-
* @Author: WangHan
|
|
34
|
-
* @Date: 2024-11-29 09:52
|
|
35
|
-
*/
|
|
36
|
-
export interface ProductProps {
|
|
37
|
-
id?: any;
|
|
38
|
-
lists: any[];
|
|
39
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
|
|
15
|
-
// src/components/shoppingCart/type.ts
|
|
16
|
-
var type_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(type_exports);
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @title: 格式化购物车列表
|
|
3
|
-
* @description:
|
|
4
|
-
* @param {any} state
|
|
5
|
-
* @return {*}
|
|
6
|
-
* @Author: WangHan
|
|
7
|
-
* @Date: 2024-11-28 16:52
|
|
8
|
-
*/
|
|
9
|
-
export declare const formatCartList: (state: any) => any;
|
|
10
|
-
/**
|
|
11
|
-
* @title: 是否是空页面
|
|
12
|
-
* @description:
|
|
13
|
-
* @param {any} state
|
|
14
|
-
* @return {*}
|
|
15
|
-
* @Author: WangHan
|
|
16
|
-
* @Date: 2024-11-28 16:47
|
|
17
|
-
*/
|
|
18
|
-
export declare const isEmptyStatus: (state: any) => boolean;
|
|
19
|
-
/**
|
|
20
|
-
* @title: 是否是商品列表页面
|
|
21
|
-
* @description:
|
|
22
|
-
* @param {any} state
|
|
23
|
-
* @return {*}
|
|
24
|
-
* @Author: WangHan
|
|
25
|
-
* @Date: 2024-11-28 17:23
|
|
26
|
-
*/
|
|
27
|
-
export declare const isProductList: (state: any) => boolean;
|
|
28
|
-
/**
|
|
29
|
-
* @title: 格式化数据最终结果
|
|
30
|
-
* @description:
|
|
31
|
-
* @param {any} state
|
|
32
|
-
* @return {*}
|
|
33
|
-
* @Author: WangHan
|
|
34
|
-
* @Date: 2024-11-28 18:35
|
|
35
|
-
*/
|
|
36
|
-
export declare const formatState: (state: any) => {
|
|
37
|
-
isEmpty: boolean;
|
|
38
|
-
isProductList: boolean;
|
|
39
|
-
carts: any;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* @title: 更新商品
|
|
43
|
-
* @description:
|
|
44
|
-
* @param {any} newState
|
|
45
|
-
* @param {any} state
|
|
46
|
-
* @return {*}
|
|
47
|
-
* @Author: WangHan
|
|
48
|
-
* @Date: 2024-11-28 22:30
|
|
49
|
-
*/
|
|
50
|
-
export declare const updateProduct: (state: any, newProducts: any[]) => {
|
|
51
|
-
products: any[];
|
|
52
|
-
carts: any;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* @title: 格式化服务
|
|
56
|
-
* @description:
|
|
57
|
-
* @param {any} service
|
|
58
|
-
* @param {number} id holder_id
|
|
59
|
-
* @return {*}
|
|
60
|
-
* @Author: WangHan
|
|
61
|
-
* @Date: 2024-12-09 22:47
|
|
62
|
-
*/
|
|
63
|
-
export declare const formatService: (service: any[], id: number) => any[];
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/shoppingCart/utils.ts
|
|
20
|
-
var utils_exports = {};
|
|
21
|
-
__export(utils_exports, {
|
|
22
|
-
formatCartList: () => formatCartList,
|
|
23
|
-
formatService: () => formatService,
|
|
24
|
-
formatState: () => formatState,
|
|
25
|
-
isEmptyStatus: () => isEmptyStatus,
|
|
26
|
-
isProductList: () => isProductList,
|
|
27
|
-
updateProduct: () => updateProduct
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(utils_exports);
|
|
30
|
-
var formatCartList = (state) => {
|
|
31
|
-
const { products, holders } = state;
|
|
32
|
-
return holders == null ? void 0 : holders.map((holder) => {
|
|
33
|
-
return {
|
|
34
|
-
...holder,
|
|
35
|
-
products: products == null ? void 0 : products.filter(
|
|
36
|
-
(product) => (product == null ? void 0 : product.holder_id) === (holder == null ? void 0 : holder.key)
|
|
37
|
-
)
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
var isEmptyStatus = (state) => {
|
|
42
|
-
const { products, holders, isOpenGroup } = state;
|
|
43
|
-
if (!isOpenGroup && !(products == null ? void 0 : products.length))
|
|
44
|
-
return true;
|
|
45
|
-
if (isOpenGroup && !(holders == null ? void 0 : holders.length))
|
|
46
|
-
return true;
|
|
47
|
-
return false;
|
|
48
|
-
};
|
|
49
|
-
var isProductList = (state) => {
|
|
50
|
-
const { holders, isOpenGroup } = state;
|
|
51
|
-
if (isOpenGroup && (holders == null ? void 0 : holders.length))
|
|
52
|
-
return false;
|
|
53
|
-
return true;
|
|
54
|
-
};
|
|
55
|
-
var formatState = (state) => {
|
|
56
|
-
const _default = { ...state };
|
|
57
|
-
const _carts = formatCartList(_default);
|
|
58
|
-
return {
|
|
59
|
-
isEmpty: isEmptyStatus(_default),
|
|
60
|
-
isProductList: isProductList(_default),
|
|
61
|
-
carts: _carts
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
var updateProduct = (state, newProducts) => {
|
|
65
|
-
return {
|
|
66
|
-
products: newProducts,
|
|
67
|
-
carts: formatCartList({ ...state, products: newProducts })
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
var formatService = (service, id) => {
|
|
71
|
-
return service.map((item) => {
|
|
72
|
-
return {
|
|
73
|
-
...item,
|
|
74
|
-
holder_id: id
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
-
0 && (module.exports = {
|
|
80
|
-
formatCartList,
|
|
81
|
-
formatService,
|
|
82
|
-
formatState,
|
|
83
|
-
isEmptyStatus,
|
|
84
|
-
isProductList,
|
|
85
|
-
updateProduct
|
|
86
|
-
});
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
2
|
-
|
|
3
|
-
const ShoppingCartMeta: ComponentMetadata = {
|
|
4
|
-
componentName: 'ShoppingCart',
|
|
5
|
-
title: 'ShoppingCart',
|
|
6
|
-
docUrl: '',
|
|
7
|
-
screenshot: '',
|
|
8
|
-
devMode: 'proCode',
|
|
9
|
-
npm: {
|
|
10
|
-
package: '@pisell/private-materials',
|
|
11
|
-
version: '1.0.4',
|
|
12
|
-
exportName: 'ShoppingCart',
|
|
13
|
-
main: 'src/index.ts',
|
|
14
|
-
destructuring: true,
|
|
15
|
-
subName: '',
|
|
16
|
-
},
|
|
17
|
-
configure: {
|
|
18
|
-
props: [
|
|
19
|
-
{
|
|
20
|
-
title: {
|
|
21
|
-
label: {
|
|
22
|
-
type: 'i18n',
|
|
23
|
-
'en-US': '卡片样式',
|
|
24
|
-
'zh-CN': '卡片样式',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
name: 'platform',
|
|
28
|
-
propType: {
|
|
29
|
-
type: "oneOf",
|
|
30
|
-
value: ["shop", "h5"],
|
|
31
|
-
},
|
|
32
|
-
setter: [
|
|
33
|
-
{
|
|
34
|
-
componentName: "RadioGroupSetter",
|
|
35
|
-
props: {
|
|
36
|
-
options: [
|
|
37
|
-
{
|
|
38
|
-
title: "管理端",
|
|
39
|
-
value: "shop",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
title: "用户端",
|
|
43
|
-
value: "h5",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
"VariableSetter",
|
|
49
|
-
],
|
|
50
|
-
defaultValue: "shop",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
title: {
|
|
54
|
-
label: {
|
|
55
|
-
type: 'i18n',
|
|
56
|
-
'en-US': '空数据提示',
|
|
57
|
-
'zh-CN': '空数据提示',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
name: 'emptyText',
|
|
61
|
-
setter: "StringSetter",
|
|
62
|
-
defaultValue: "No services selected",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
title: {
|
|
66
|
-
label: {
|
|
67
|
-
type: 'i18n',
|
|
68
|
-
'en-US': '是否开启分组',
|
|
69
|
-
'zh-CN': '是否开启分组',
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
name: 'isOpenGroup',
|
|
73
|
-
setter: "BoolSetter",
|
|
74
|
-
defaultValue: true,
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
supports: {
|
|
78
|
-
style: true,
|
|
79
|
-
events: [],
|
|
80
|
-
},
|
|
81
|
-
component: {},
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
const snippets: Snippet[] = [
|
|
85
|
-
{
|
|
86
|
-
title: 'ShoppingCart',
|
|
87
|
-
screenshot: '',
|
|
88
|
-
schema: {
|
|
89
|
-
componentName: 'ShoppingCart',
|
|
90
|
-
props: {},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
export default {
|
|
96
|
-
...ShoppingCartMeta,
|
|
97
|
-
snippets,
|
|
98
|
-
};
|