@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.
Files changed (61) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/booking/addons/model.d.ts +10 -1
  10. package/es/components/booking/forms/model.d.ts +10 -1
  11. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  12. package/es/components/booking/hooks/useClearCart.d.ts +1 -1
  13. package/es/components/booking/hooks/useClearCart.js +39 -9
  14. package/es/components/booking/info/model.d.ts +10 -1
  15. package/es/components/booking/info/service/index.less +4 -2
  16. package/es/components/booking/info2/cartClientCard/index.js +82 -2
  17. package/es/components/booking/info2/serve.d.ts +8 -0
  18. package/es/components/booking/info2/serve.js +52 -0
  19. package/es/components/booking/info2/service/editService/index.js +1 -1
  20. package/es/components/booking/info2/service/index.js +4 -5
  21. package/es/components/booking/locales.d.ts +20 -0
  22. package/es/components/booking/locales.js +20 -0
  23. package/es/components/booking/model.d.ts +9 -1
  24. package/es/components/booking/notes/model.d.ts +10 -1
  25. package/es/components/booking/payments/model.d.ts +10 -1
  26. package/es/components/pay/toC/model.d.ts +9 -1
  27. package/es/components/schedules/model.d.ts +9 -1
  28. package/es/components/shoppingCart/components/Cart/index.less +1 -0
  29. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  30. package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
  31. package/es/components/ticketBooking/index.js +5 -2
  32. package/es/plus/clinetSearch/index.d.ts +1 -0
  33. package/es/plus/clinetSearch/index.js +9 -3
  34. package/es/plus/clinetSearch/index.less +13 -0
  35. package/lib/components/booking/addons/model.d.ts +10 -1
  36. package/lib/components/booking/forms/model.d.ts +10 -1
  37. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  38. package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
  39. package/lib/components/booking/hooks/useClearCart.js +28 -6
  40. package/lib/components/booking/info/model.d.ts +10 -1
  41. package/lib/components/booking/info/service/index.less +4 -2
  42. package/lib/components/booking/info2/cartClientCard/index.js +46 -2
  43. package/lib/components/booking/info2/serve.d.ts +8 -0
  44. package/lib/components/booking/info2/serve.js +12 -0
  45. package/lib/components/booking/info2/service/editService/index.js +1 -1
  46. package/lib/components/booking/info2/service/index.js +4 -2
  47. package/lib/components/booking/locales.d.ts +20 -0
  48. package/lib/components/booking/locales.js +20 -0
  49. package/lib/components/booking/model.d.ts +9 -1
  50. package/lib/components/booking/notes/model.d.ts +10 -1
  51. package/lib/components/booking/payments/model.d.ts +10 -1
  52. package/lib/components/pay/toC/model.d.ts +9 -1
  53. package/lib/components/schedules/model.d.ts +9 -1
  54. package/lib/components/shoppingCart/components/Cart/index.less +1 -0
  55. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  56. package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
  57. package/lib/components/ticketBooking/index.js +4 -2
  58. package/lib/plus/clinetSearch/index.d.ts +1 -0
  59. package/lib/plus/clinetSearch/index.js +10 -0
  60. package/lib/plus/clinetSearch/index.less +13 -0
  61. 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: any;
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
+ }>;
@@ -71,6 +71,7 @@
71
71
  line-height: 24px; /* 150% */
72
72
  display: flex;
73
73
  align-items: center;
74
+ width: max-content;
74
75
  .anticon {
75
76
  font-size: 18px;
76
77
  margin-right: 6px;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const useClearCart: (key?: number | undefined) => React.JSX.Element | null;
2
+ declare const useClearCart: (key?: number | undefined) => React.JSX.Element;
3
3
  export default useClearCart;
@@ -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
- return !disabledEdit && (holders == null ? void 0 : holders.length) > 0 && !isHideClearCart ? /* @__PURE__ */ import_react.default.createElement(
55
- "span",
56
- {
57
- className: (0, import_classnames.default)("pisell-lowcode__shopping-cart-clear-btn", {
58
- "pisell-lowcode__shopping-cart-clear-btn-empty": isProductList
59
- }),
60
- onClick: handleClear
61
- },
62
- /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }),
63
- /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
64
- ) : null;
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
  }
@@ -10,6 +10,7 @@ interface ClientSearchProps extends Omit<ComprehensiveSearchProps, 'resultDispla
10
10
  hasMore?: boolean;
11
11
  onLoadMore?: () => void;
12
12
  state?: any;
13
+ resultLoading?: boolean;
13
14
  }
14
15
  export declare type ClientSearchRef = {
15
16
  resetScrollPosition: () => void;
@@ -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.48",
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/materials": "6.6.14"
67
+ "@pisell/date-picker": "3.0.7"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "react": "^18.0.0",