@pisell/private-materials 3.0.203 → 3.0.204
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,32 +0,0 @@
|
|
|
1
|
-
.pisell-lowcode__booking-select-pet-modal-wrap {
|
|
2
|
-
.pisell-lowcode-modal-body {
|
|
3
|
-
padding: 24px !important;
|
|
4
|
-
overflow-y: auto !important;
|
|
5
|
-
max-height: 80vh;
|
|
6
|
-
|
|
7
|
-
.pisell-lowcode__booking-select-pet-content {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 20px;
|
|
11
|
-
|
|
12
|
-
.pisell-lowcode__booking-select-pet-item {
|
|
13
|
-
display: flex;
|
|
14
|
-
padding: 8px 16px;
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
align-items: center;
|
|
17
|
-
align-self: stretch;
|
|
18
|
-
border-radius: 12px;
|
|
19
|
-
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
20
|
-
|
|
21
|
-
.pisell-lowcode-select-selector {
|
|
22
|
-
display: flex;
|
|
23
|
-
padding: 6px 16px;
|
|
24
|
-
align-items: center;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
border-radius: 20px;
|
|
27
|
-
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Iconfont } from '@pisell/materials';
|
|
4
|
-
import { useContext } from "./useContext";
|
|
5
|
-
import { locales } from '@pisell/utils';
|
|
6
|
-
var useAddService = function useAddService(id, type) {
|
|
7
|
-
var _useContext = useContext(),
|
|
8
|
-
state = _useContext.state,
|
|
9
|
-
onAddProduct = _useContext.onAddProduct;
|
|
10
|
-
var isProductList = state.isProductList,
|
|
11
|
-
disabledEdit = state.disabledEdit;
|
|
12
|
-
return !disabledEdit ? /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: classNames('pisell-lowcode__shopping-cart-add-service', {
|
|
14
|
-
'pisell-lowcode__shopping-cart-add-service-products': isProductList
|
|
15
|
-
}),
|
|
16
|
-
onClick: function onClick() {
|
|
17
|
-
return onAddProduct(id);
|
|
18
|
-
}
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
20
|
-
type: "pisell2-plus-circle"
|
|
21
|
-
}), /*#__PURE__*/React.createElement("span", null, type === 'more' ? locales.getText('pisell2.text.shopping-cart.add.more') : locales.getText('pisell2.text.shopping-cart.add.service'))) : null;
|
|
22
|
-
};
|
|
23
|
-
export default useAddService;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import classNames from 'classnames';
|
|
9
|
-
import { Iconfont } from '@pisell/materials';
|
|
10
|
-
import { useContext } from "./useContext";
|
|
11
|
-
import { locales } from '@pisell/utils';
|
|
12
|
-
var useClearCart = function useClearCart(key) {
|
|
13
|
-
var _useContext = useContext(),
|
|
14
|
-
state = _useContext.state,
|
|
15
|
-
updateState = _useContext.updateState,
|
|
16
|
-
onChange = _useContext.onChange;
|
|
17
|
-
var isProductList = state.isProductList,
|
|
18
|
-
disabledEdit = state.disabledEdit;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @title: 清空购物车
|
|
22
|
-
* @description:
|
|
23
|
-
* @return {*}
|
|
24
|
-
* @Author: WangHan
|
|
25
|
-
* @Date: 2024-11-28 22:47
|
|
26
|
-
*/
|
|
27
|
-
var handleClear = function handleClear() {
|
|
28
|
-
var products = _toConsumableArray((state === null || state === void 0 ? void 0 : state.products) || []);
|
|
29
|
-
|
|
30
|
-
// 没传递key则清空所有的商品
|
|
31
|
-
if (typeof key === 'undefined') {
|
|
32
|
-
products = [];
|
|
33
|
-
} else {
|
|
34
|
-
var _products;
|
|
35
|
-
var ids = (_products = products) === null || _products === void 0 ? void 0 : _products.map(function (item) {
|
|
36
|
-
return item === null || item === void 0 ? void 0 : item._id;
|
|
37
|
-
});
|
|
38
|
-
onChange(ids, 'delete_holders', key);
|
|
39
|
-
return;
|
|
40
|
-
products = products.filter(function (item) {
|
|
41
|
-
return (item === null || item === void 0 ? void 0 : item.holder_id) !== key;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// 更新state
|
|
46
|
-
// updateState(updateProduct(state, products));
|
|
47
|
-
// onChange(products);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return !disabledEdit ? /*#__PURE__*/React.createElement("span", {
|
|
51
|
-
className: classNames('pisell-lowcode__shopping-cart-clear-btn', {
|
|
52
|
-
'pisell-lowcode__shopping-cart-clear-btn-empty': isProductList
|
|
53
|
-
}),
|
|
54
|
-
onClick: handleClear
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
56
|
-
type: "pisell2-trash-01"
|
|
57
|
-
}), /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart'))) : null;
|
|
58
|
-
};
|
|
59
|
-
export default useClearCart;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useContext: () => any;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var _excluded = ["onCard", "onChange", "onAddProduct", "onActiveKey"];
|
|
2
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import Render from "./components/Render";
|
|
6
|
-
import { CartProvider } from "./Provider";
|
|
7
|
-
import { locales } from '@pisell/utils';
|
|
8
|
-
import localeTexts from "./locales";
|
|
9
|
-
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
10
|
-
var shoppingCart = function shoppingCart(_ref) {
|
|
11
|
-
var onCard = _ref.onCard,
|
|
12
|
-
onChange = _ref.onChange,
|
|
13
|
-
onAddProduct = _ref.onAddProduct,
|
|
14
|
-
onActiveKey = _ref.onActiveKey,
|
|
15
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
-
return /*#__PURE__*/React.createElement(CartProvider, {
|
|
17
|
-
props: props,
|
|
18
|
-
onCard: onCard,
|
|
19
|
-
onChange: onChange,
|
|
20
|
-
onAddProduct: onAddProduct,
|
|
21
|
-
onActiveKey: onActiveKey
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Render, null));
|
|
23
|
-
};
|
|
24
|
-
export default shoppingCart;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.text.shopping-cart.item': (num: number) => string;
|
|
4
|
-
'pisell2.text.shopping-cart.clear.cart': string;
|
|
5
|
-
'pisell2.text.shopping-cart.add.service': string;
|
|
6
|
-
'pisell2.text.shopping-cart.add.more': string;
|
|
7
|
-
'pisell2.text.shopping-cart.no.selected': string;
|
|
8
|
-
'pisell2.text.shopping-cart.confirm': string;
|
|
9
|
-
'pisell2.text.shopping-cart.cancel': string;
|
|
10
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': string;
|
|
11
|
-
};
|
|
12
|
-
'zh-CN': {
|
|
13
|
-
'pisell2.text.shopping-cart.item': (num: number) => string;
|
|
14
|
-
'pisell2.text.shopping-cart.clear.cart': string;
|
|
15
|
-
'pisell2.text.shopping-cart.add.service': string;
|
|
16
|
-
'pisell2.text.shopping-cart.add.more': string;
|
|
17
|
-
'pisell2.text.shopping-cart.no.selected': string;
|
|
18
|
-
'pisell2.text.shopping-cart.confirm': string;
|
|
19
|
-
'pisell2.text.shopping-cart.cancel': string;
|
|
20
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': string;
|
|
21
|
-
};
|
|
22
|
-
'zh-HK': {
|
|
23
|
-
'pisell2.text.shopping-cart.item': (num: number) => string;
|
|
24
|
-
'pisell2.text.shopping-cart.clear.cart': string;
|
|
25
|
-
'pisell2.text.shopping-cart.add.service': string;
|
|
26
|
-
'pisell2.text.shopping-cart.add.more': string;
|
|
27
|
-
'pisell2.text.shopping-cart.no.selected': string;
|
|
28
|
-
'pisell2.text.shopping-cart.confirm': string;
|
|
29
|
-
'pisell2.text.shopping-cart.cancel': string;
|
|
30
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export default _default;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"en": {
|
|
3
|
-
'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
|
|
4
|
-
return "(".concat(num, " ").concat(num > 1 ? 'items' : 'item', ")");
|
|
5
|
-
},
|
|
6
|
-
'pisell2.text.shopping-cart.clear.cart': 'Clear cart',
|
|
7
|
-
'pisell2.text.shopping-cart.add.service': 'Add items',
|
|
8
|
-
'pisell2.text.shopping-cart.add.more': 'Add more',
|
|
9
|
-
'pisell2.text.shopping-cart.no.selected': 'No items selected',
|
|
10
|
-
'pisell2.text.shopping-cart.confirm': 'Confirm',
|
|
11
|
-
'pisell2.text.shopping-cart.cancel': 'Cancel',
|
|
12
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': 'Item Assignment'
|
|
13
|
-
},
|
|
14
|
-
'zh-CN': {
|
|
15
|
-
'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
|
|
16
|
-
return "(".concat(num, " \u9879)");
|
|
17
|
-
},
|
|
18
|
-
'pisell2.text.shopping-cart.clear.cart': '清空购物车',
|
|
19
|
-
'pisell2.text.shopping-cart.add.service': '添加项目',
|
|
20
|
-
'pisell2.text.shopping-cart.add.more': '添加更多',
|
|
21
|
-
'pisell2.text.shopping-cart.no.selected': '未选择任何项目',
|
|
22
|
-
'pisell2.text.shopping-cart.confirm': '确定',
|
|
23
|
-
'pisell2.text.shopping-cart.cancel': '取消',
|
|
24
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配'
|
|
25
|
-
},
|
|
26
|
-
'zh-HK': {
|
|
27
|
-
'pisell2.text.shopping-cart.item': function pisell2TextShoppingCartItem(num) {
|
|
28
|
-
return "(".concat(num, " \u9805)");
|
|
29
|
-
},
|
|
30
|
-
'pisell2.text.shopping-cart.clear.cart': '清空購物車',
|
|
31
|
-
'pisell2.text.shopping-cart.add.service': '添加項目',
|
|
32
|
-
'pisell2.text.shopping-cart.add.more': '添加更多',
|
|
33
|
-
'pisell2.text.shopping-cart.no.selected': '未選擇任何項目',
|
|
34
|
-
'pisell2.text.shopping-cart.confirm': '確定',
|
|
35
|
-
'pisell2.text.shopping-cart.cancel': '取消',
|
|
36
|
-
'pisell2.text.shopping-cart.select.holder.modal.title': '商品分配'
|
|
37
|
-
}
|
|
38
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare const holder: {
|
|
2
|
-
key: number;
|
|
3
|
-
label: string;
|
|
4
|
-
tip: string;
|
|
5
|
-
img: string;
|
|
6
|
-
}[];
|
|
7
|
-
export declare const products: ({
|
|
8
|
-
id: number;
|
|
9
|
-
title: string;
|
|
10
|
-
from_id: number;
|
|
11
|
-
holder: string;
|
|
12
|
-
price: number;
|
|
13
|
-
total: number;
|
|
14
|
-
num: number;
|
|
15
|
-
origin_price: number;
|
|
16
|
-
symbol: string;
|
|
17
|
-
relation_form_name: string;
|
|
18
|
-
like_status: string;
|
|
19
|
-
_extend: {
|
|
20
|
-
start_time: string;
|
|
21
|
-
duration: number;
|
|
22
|
-
date: string;
|
|
23
|
-
like_status: string;
|
|
24
|
-
};
|
|
25
|
-
product_cover: string;
|
|
26
|
-
} | {
|
|
27
|
-
id: number;
|
|
28
|
-
title: string;
|
|
29
|
-
from_id: number;
|
|
30
|
-
holder: string;
|
|
31
|
-
price: number;
|
|
32
|
-
total: number;
|
|
33
|
-
num: number;
|
|
34
|
-
symbol: string;
|
|
35
|
-
origin_price?: undefined;
|
|
36
|
-
relation_form_name?: undefined;
|
|
37
|
-
like_status?: undefined;
|
|
38
|
-
_extend?: undefined;
|
|
39
|
-
product_cover?: undefined;
|
|
40
|
-
})[];
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export var holder = [{
|
|
2
|
-
key: 1,
|
|
3
|
-
label: '旺旺',
|
|
4
|
-
tip: 'french',
|
|
5
|
-
img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg'
|
|
6
|
-
}, {
|
|
7
|
-
key: 2,
|
|
8
|
-
label: '咪咪',
|
|
9
|
-
tip: 'french',
|
|
10
|
-
img: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg'
|
|
11
|
-
}];
|
|
12
|
-
export var products = [{
|
|
13
|
-
id: 1,
|
|
14
|
-
title: '旺旺1',
|
|
15
|
-
from_id: 1,
|
|
16
|
-
holder: 'holder1',
|
|
17
|
-
price: 4,
|
|
18
|
-
total: 5,
|
|
19
|
-
num: 2,
|
|
20
|
-
origin_price: 6,
|
|
21
|
-
symbol: '&',
|
|
22
|
-
relation_form_name: 'Room1',
|
|
23
|
-
like_status: 'like',
|
|
24
|
-
_extend: {
|
|
25
|
-
start_time: '2024-10-23 18:40:00',
|
|
26
|
-
duration: 120,
|
|
27
|
-
date: '2024-10-27 18:40:00',
|
|
28
|
-
like_status: 'like'
|
|
29
|
-
},
|
|
30
|
-
product_cover: 'https://file.mypisell.com/pisel/manual/janedeer/2024-2-8/25.png'
|
|
31
|
-
}, {
|
|
32
|
-
id: 2,
|
|
33
|
-
title: '旺旺2',
|
|
34
|
-
from_id: 1,
|
|
35
|
-
holder: 'Room2',
|
|
36
|
-
price: 4,
|
|
37
|
-
total: 4,
|
|
38
|
-
num: 2,
|
|
39
|
-
symbol: '&'
|
|
40
|
-
}];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { locales } from '@pisell/utils';
|
|
2
|
-
import localeTexts from "./locales";
|
|
3
|
-
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
4
|
-
var productDefault = {
|
|
5
|
-
hideAddBtn: false,
|
|
6
|
-
isShowNote: true,
|
|
7
|
-
isShowPackageNote: true,
|
|
8
|
-
holders: [],
|
|
9
|
-
products: [],
|
|
10
|
-
isEdit: false,
|
|
11
|
-
disabledEdit: false
|
|
12
|
-
};
|
|
13
|
-
export var defaultData = {
|
|
14
|
-
isOpenGroup: true,
|
|
15
|
-
carts: [],
|
|
16
|
-
platform: 'shop',
|
|
17
|
-
emptyText: locales.getText('pisell2.text.shopping-cart.no.selected'),
|
|
18
|
-
activeKey: [],
|
|
19
|
-
defaultActiveKey: [],
|
|
20
|
-
className: '',
|
|
21
|
-
productParams: productDefault
|
|
22
|
-
};
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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,116 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
/**
|
|
8
|
-
* @title: 格式化购物车列表
|
|
9
|
-
* @description:
|
|
10
|
-
* @param {any} state
|
|
11
|
-
* @return {*}
|
|
12
|
-
* @Author: WangHan
|
|
13
|
-
* @Date: 2024-11-28 16:52
|
|
14
|
-
*/
|
|
15
|
-
export var formatCartList = function formatCartList(state) {
|
|
16
|
-
var products = state.products,
|
|
17
|
-
holders = state.holders;
|
|
18
|
-
return holders === null || holders === void 0 ? void 0 : holders.map(function (holder) {
|
|
19
|
-
return _objectSpread(_objectSpread({}, holder), {}, {
|
|
20
|
-
products: products === null || products === void 0 ? void 0 : products.filter(function (product) {
|
|
21
|
-
return (product === null || product === void 0 ? void 0 : product.holder_id) === (holder === null || holder === void 0 ? void 0 : holder.key);
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @title: 是否是空页面
|
|
29
|
-
* @description:
|
|
30
|
-
* @param {any} state
|
|
31
|
-
* @return {*}
|
|
32
|
-
* @Author: WangHan
|
|
33
|
-
* @Date: 2024-11-28 16:47
|
|
34
|
-
*/
|
|
35
|
-
export var isEmptyStatus = function isEmptyStatus(state) {
|
|
36
|
-
var products = state.products,
|
|
37
|
-
holders = state.holders,
|
|
38
|
-
isOpenGroup = state.isOpenGroup;
|
|
39
|
-
// 没开启分组并且没有商品数据
|
|
40
|
-
if (!isOpenGroup && !(products !== null && products !== void 0 && products.length)) return true;
|
|
41
|
-
|
|
42
|
-
// 开启分组没有holders
|
|
43
|
-
if (isOpenGroup && !(holders !== null && holders !== void 0 && holders.length)) return true;
|
|
44
|
-
return false;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @title: 是否是商品列表页面
|
|
49
|
-
* @description:
|
|
50
|
-
* @param {any} state
|
|
51
|
-
* @return {*}
|
|
52
|
-
* @Author: WangHan
|
|
53
|
-
* @Date: 2024-11-28 17:23
|
|
54
|
-
*/
|
|
55
|
-
export var isProductList = function isProductList(state) {
|
|
56
|
-
var holders = state.holders,
|
|
57
|
-
isOpenGroup = state.isOpenGroup;
|
|
58
|
-
|
|
59
|
-
// 开启分组并且有holders, 则是购物车列表
|
|
60
|
-
if (isOpenGroup && holders !== null && holders !== void 0 && holders.length) return false;
|
|
61
|
-
return true;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @title: 格式化数据最终结果
|
|
66
|
-
* @description:
|
|
67
|
-
* @param {any} state
|
|
68
|
-
* @return {*}
|
|
69
|
-
* @Author: WangHan
|
|
70
|
-
* @Date: 2024-11-28 18:35
|
|
71
|
-
*/
|
|
72
|
-
export var formatState = function formatState(state) {
|
|
73
|
-
// 默认数据格式化holder数据
|
|
74
|
-
var _default = _objectSpread({}, state);
|
|
75
|
-
var _carts = formatCartList(_default);
|
|
76
|
-
return {
|
|
77
|
-
isEmpty: isEmptyStatus(_default),
|
|
78
|
-
isProductList: isProductList(_default),
|
|
79
|
-
carts: _carts
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @title: 更新商品
|
|
85
|
-
* @description:
|
|
86
|
-
* @param {any} newState
|
|
87
|
-
* @param {any} state
|
|
88
|
-
* @return {*}
|
|
89
|
-
* @Author: WangHan
|
|
90
|
-
* @Date: 2024-11-28 22:30
|
|
91
|
-
*/
|
|
92
|
-
export var updateProduct = function updateProduct(state, newProducts) {
|
|
93
|
-
return {
|
|
94
|
-
products: newProducts,
|
|
95
|
-
carts: formatCartList(_objectSpread(_objectSpread({}, state), {}, {
|
|
96
|
-
products: newProducts
|
|
97
|
-
}))
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @title: 格式化服务
|
|
103
|
-
* @description:
|
|
104
|
-
* @param {any} service
|
|
105
|
-
* @param {number} id holder_id
|
|
106
|
-
* @return {*}
|
|
107
|
-
* @Author: WangHan
|
|
108
|
-
* @Date: 2024-12-09 22:47
|
|
109
|
-
*/
|
|
110
|
-
export var formatService = function formatService(service, id) {
|
|
111
|
-
return service.map(function (item) {
|
|
112
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
113
|
-
holder_id: id
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/booking/components/footer/AppointmentProductModal/index.tsx
|
|
30
|
-
var AppointmentProductModal_exports = {};
|
|
31
|
-
__export(AppointmentProductModal_exports, {
|
|
32
|
-
default: () => AppointmentProductModal_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(AppointmentProductModal_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_utils = require("@pisell/utils");
|
|
37
|
-
var import_materials = require("@pisell/materials");
|
|
38
|
-
var AppointmentProductModal = (props, ref) => {
|
|
39
|
-
const [open, setOpen] = (0, import_react.useState)(false);
|
|
40
|
-
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
41
|
-
open: () => {
|
|
42
|
-
setOpen(true);
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
|
-
import_materials.PisellModal.Information,
|
|
47
|
-
{
|
|
48
|
-
open,
|
|
49
|
-
platform: "pc",
|
|
50
|
-
title: import_utils.locales.getText("pisell2.text.missing.reservation.title"),
|
|
51
|
-
describe: import_utils.locales.getText("pisell2.text.missing.reservation.content"),
|
|
52
|
-
cancelText: import_utils.locales.getText("pisell2.text.cancel"),
|
|
53
|
-
okText: import_utils.locales.getText("pisell2.text.confirm"),
|
|
54
|
-
closable: true,
|
|
55
|
-
onOk: () => setOpen(false),
|
|
56
|
-
onCancel: () => setOpen(false)
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
var AppointmentProductModal_default = (0, import_react.forwardRef)(AppointmentProductModal);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|