@pisell/private-materials 6.6.48 → 6.6.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- 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/hooks/useClearCart.d.ts +1 -1
- package/es/components/booking/hooks/useClearCart.js +39 -9
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/index.less +4 -2
- package/es/components/booking/info2/cartClientCard/index.js +82 -2
- package/es/components/booking/info2/serve.d.ts +8 -0
- package/es/components/booking/info2/serve.js +52 -0
- package/es/components/booking/info2/service/editService/index.js +1 -1
- package/es/components/booking/info2/service/index.js +4 -5
- package/es/components/booking/locales.d.ts +20 -0
- package/es/components/booking/locales.js +20 -0
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Cart/index.less +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
- package/es/components/ticketBooking/index.js +5 -2
- package/es/plus/clinetSearch/index.d.ts +1 -0
- package/es/plus/clinetSearch/index.js +9 -3
- package/es/plus/clinetSearch/index.less +13 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- 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/hooks/useClearCart.d.ts +1 -1
- package/lib/components/booking/hooks/useClearCart.js +28 -6
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/index.less +4 -2
- package/lib/components/booking/info2/cartClientCard/index.js +46 -2
- package/lib/components/booking/info2/serve.d.ts +8 -0
- package/lib/components/booking/info2/serve.js +12 -0
- package/lib/components/booking/info2/service/editService/index.js +1 -1
- package/lib/components/booking/info2/service/index.js +4 -2
- package/lib/components/booking/locales.d.ts +20 -0
- package/lib/components/booking/locales.js +20 -0
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Cart/index.less +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
- package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
- package/lib/components/ticketBooking/index.js +4 -2
- package/lib/plus/clinetSearch/index.d.ts +1 -0
- package/lib/plus/clinetSearch/index.js +10 -0
- package/lib/plus/clinetSearch/index.less +13 -0
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -38,6 +38,7 @@ var import_materials = require("@pisell/materials");
|
|
|
38
38
|
var import_useContext = require("./useContext");
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var useClearCart = (key) => {
|
|
41
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
41
42
|
const { state, onChange } = (0, import_useContext.useContext)();
|
|
42
43
|
const { isProductList, disabledEdit, holders, isHideClearCart } = state;
|
|
43
44
|
const handleClear = () => {
|
|
@@ -47,20 +48,50 @@ var useClearCart = (key) => {
|
|
|
47
48
|
} else {
|
|
48
49
|
const ids = products == null ? void 0 : products.map((item) => item == null ? void 0 : item._id);
|
|
49
50
|
onChange(ids, "delete_holders", key);
|
|
51
|
+
setOpen(false);
|
|
50
52
|
return;
|
|
51
53
|
products = products.filter((item) => (item == null ? void 0 : item.holder_id) !== key);
|
|
52
54
|
}
|
|
53
55
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
const handleOpenModal = (0, import_react.useCallback)(() => {
|
|
57
|
+
setOpen(true);
|
|
58
|
+
}, []);
|
|
59
|
+
const handleCancel = (0, import_react.useCallback)(() => {
|
|
60
|
+
setOpen(false);
|
|
61
|
+
}, []);
|
|
62
|
+
return (0, import_react.useMemo)(() => {
|
|
63
|
+
const showClearBtn = !disabledEdit && (holders == null ? void 0 : holders.length) > 0 && !isHideClearCart;
|
|
64
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showClearBtn ? /* @__PURE__ */ import_react.default.createElement(
|
|
65
|
+
"span",
|
|
66
|
+
{
|
|
67
|
+
className: (0, import_classnames.default)("pisell-lowcode__shopping-cart-clear-btn", {
|
|
68
|
+
"pisell-lowcode__shopping-cart-clear-btn-empty": isProductList
|
|
69
|
+
}),
|
|
70
|
+
onClick: handleOpenModal
|
|
71
|
+
},
|
|
72
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }),
|
|
73
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
|
|
74
|
+
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
import_materials.PisellModal,
|
|
76
|
+
{
|
|
77
|
+
open,
|
|
78
|
+
title: import_utils.locales.getText(
|
|
79
|
+
"pisell2.booking.info.text.clear-cart-modal.title"
|
|
80
|
+
),
|
|
81
|
+
onOk: handleClear,
|
|
82
|
+
onCancel: handleCancel,
|
|
83
|
+
okText: import_utils.locales.getText(
|
|
84
|
+
"pisell2.booking.info.text.clear-cart-modal.confirm"
|
|
85
|
+
),
|
|
86
|
+
cancelText: import_utils.locales.getText(
|
|
87
|
+
"pisell2.booking.info.text.clear-cart-modal.cancel"
|
|
88
|
+
),
|
|
89
|
+
destroyOnClose: true
|
|
90
|
+
},
|
|
91
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { margin: "24px 0" } }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText(
|
|
92
|
+
"pisell2.booking.info.text.clear-cart-modal.content"
|
|
93
|
+
)))
|
|
94
|
+
));
|
|
95
|
+
}, [open, disabledEdit, holders == null ? void 0 : holders.length, isHideClearCart, isProductList]);
|
|
65
96
|
};
|
|
66
97
|
var useClearCart_default = useClearCart;
|
|
@@ -233,7 +233,7 @@ var ticketBooking_default = (props) => {
|
|
|
233
233
|
}, [isShowMenuBar, activeNavKey, propsProductDisplayConfig]);
|
|
234
234
|
const storeRef = (0, import_react.useRef)(null);
|
|
235
235
|
const context = (0, import_useEngineContext.default)();
|
|
236
|
-
const { pisellos, pisellosAllModule } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
236
|
+
const { pisellos, pisellosAllModule, businessUtils } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
237
237
|
const { BookingTicket, ShopDiscountImpl } = pisellosAllModule || {};
|
|
238
238
|
import_utils.locales.init(
|
|
239
239
|
import_locales.default,
|
|
@@ -251,12 +251,14 @@ var ticketBooking_default = (props) => {
|
|
|
251
251
|
storeRef.current = store;
|
|
252
252
|
}, [bookingConfigParams, productExtensionType]);
|
|
253
253
|
(0, import_react.useMemo)(() => {
|
|
254
|
+
var _a2;
|
|
254
255
|
if (BookingTicket) {
|
|
255
256
|
pisellos == null ? void 0 : pisellos.registerModule(new BookingTicket((0, import_utils3.getBookingTicketKey)(osKey)), {
|
|
256
257
|
initialState: {},
|
|
257
258
|
otherParams: {
|
|
258
259
|
cacheId: (0, import_utils3.getBookingTicketKey)(osKey),
|
|
259
|
-
platform: "shop"
|
|
260
|
+
platform: "shop",
|
|
261
|
+
isFranchisee: (_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "franchisee")
|
|
260
262
|
}
|
|
261
263
|
});
|
|
262
264
|
}
|
|
@@ -52,6 +52,7 @@ var ClientSearch = (0, import_react.forwardRef)(
|
|
|
52
52
|
hasMore,
|
|
53
53
|
onLoadMore,
|
|
54
54
|
state,
|
|
55
|
+
resultLoading,
|
|
55
56
|
...props
|
|
56
57
|
}, ref) => {
|
|
57
58
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -85,12 +86,21 @@ var ClientSearch = (0, import_react.forwardRef)(
|
|
|
85
86
|
ref: scrollContainerRef,
|
|
86
87
|
id: "client-search_infinite-scroll",
|
|
87
88
|
style: {
|
|
89
|
+
position: "relative",
|
|
88
90
|
height: "calc(100% - 40px)",
|
|
89
91
|
overflowY: "auto",
|
|
90
92
|
overflowX: "hidden",
|
|
91
93
|
display: "flex"
|
|
92
94
|
}
|
|
93
95
|
},
|
|
96
|
+
resultLoading && /* @__PURE__ */ import_react.default.createElement(
|
|
97
|
+
import_antd.Spin,
|
|
98
|
+
{
|
|
99
|
+
spinning: resultLoading || false,
|
|
100
|
+
className: "pisell-client-search-result-loading",
|
|
101
|
+
size: "large"
|
|
102
|
+
}
|
|
103
|
+
),
|
|
94
104
|
/* @__PURE__ */ import_react.default.createElement(
|
|
95
105
|
import_InfiniteScroll.default,
|
|
96
106
|
{
|
|
@@ -93,3 +93,16 @@
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
+
|
|
97
|
+
.pisell-client-search-result-loading {
|
|
98
|
+
position: absolute;
|
|
99
|
+
top: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
align-items: center;
|
|
106
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
107
|
+
z-index: 10;
|
|
108
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.50",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"styled-components": "^6.0.0-rc.3",
|
|
62
62
|
"@react-spring/web": "^9.6.1",
|
|
63
63
|
"@use-gesture/react": "^10.3.1",
|
|
64
|
-
"@pisell/date-picker": "3.0.7",
|
|
65
64
|
"@pisell/utils": "3.0.2",
|
|
65
|
+
"@pisell/materials": "6.6.14",
|
|
66
66
|
"@pisell/icon": "0.0.11",
|
|
67
|
-
"@pisell/
|
|
67
|
+
"@pisell/date-picker": "3.0.7"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|