@pisell/private-materials 3.0.45 → 3.0.47

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 (43) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +2 -2
  7. package/build/lowcode/render/default/view.js +1 -1
  8. package/build/lowcode/view.js +6 -6
  9. package/es/components/booking/addons/index.d.ts +1 -1
  10. package/es/components/booking/addons/model.d.ts +2 -1
  11. package/es/components/booking/forms/forms.d.ts +1 -1
  12. package/es/components/booking/forms/index.d.ts +1 -1
  13. package/es/components/booking/forms/model.d.ts +2 -1
  14. package/es/components/booking/index.d.ts +1 -1
  15. package/es/components/booking/info/index.d.ts +1 -1
  16. package/es/components/booking/info/model.d.ts +2 -1
  17. package/es/components/booking/info/service/addService/index.js +14 -3
  18. package/es/components/booking/info/utils.js +2 -2
  19. package/es/components/booking/model.d.ts +2 -1
  20. package/es/components/booking/notes/index.d.ts +1 -1
  21. package/es/components/booking/notes/model.d.ts +2 -1
  22. package/es/components/booking/payments/index.d.ts +1 -1
  23. package/es/components/booking/payments/model.d.ts +2 -1
  24. package/es/components/schedules/index.d.ts +1 -1
  25. package/es/components/schedules/model.d.ts +2 -1
  26. package/lib/components/booking/addons/index.d.ts +1 -1
  27. package/lib/components/booking/addons/model.d.ts +2 -1
  28. package/lib/components/booking/forms/forms.d.ts +1 -1
  29. package/lib/components/booking/forms/index.d.ts +1 -1
  30. package/lib/components/booking/forms/model.d.ts +2 -1
  31. package/lib/components/booking/index.d.ts +1 -1
  32. package/lib/components/booking/info/index.d.ts +1 -1
  33. package/lib/components/booking/info/model.d.ts +2 -1
  34. package/lib/components/booking/info/service/addService/index.js +14 -3
  35. package/lib/components/booking/info/utils.js +2 -2
  36. package/lib/components/booking/model.d.ts +2 -1
  37. package/lib/components/booking/notes/index.d.ts +1 -1
  38. package/lib/components/booking/notes/model.d.ts +2 -1
  39. package/lib/components/booking/payments/index.d.ts +1 -1
  40. package/lib/components/booking/payments/model.d.ts +2 -1
  41. package/lib/components/schedules/index.d.ts +1 -1
  42. package/lib/components/schedules/model.d.ts +2 -1
  43. package/package.json +2 -2
@@ -13,5 +13,5 @@ export interface InfoProps {
13
13
  setGlobalState: any;
14
14
  }
15
15
  export declare const formatProducts: (values: any) => any;
16
- declare const Addons: (props: any) => JSX.Element;
16
+ declare const Addons: (props: any) => any;
17
17
  export default Addons;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => JSX.Element;
24
+ declare const Forms: (props: any) => any;
25
25
  export default Forms;
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Forms: (props: any) => JSX.Element;
8
+ declare const Forms: (props: any) => any;
9
9
  export default Forms;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,2 +1,2 @@
1
- declare const Booking: (props: any) => JSX.Element;
1
+ declare const Booking: (props: any) => any;
2
2
  export default Booking;
@@ -8,5 +8,5 @@ export interface InfoProps {
8
8
  slot: any;
9
9
  setState: any;
10
10
  }
11
- declare const Info: (props: any) => JSX.Element;
11
+ declare const Info: (props: any) => any;
12
12
  export default Info;
@@ -1,9 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
3
  export declare const walkInData: {
3
4
  id: number;
4
5
  nickname: string;
5
6
  };
6
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
7
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
7
8
  state: FormState;
8
9
  } & {
9
10
  dispatch: (params: {
@@ -30,6 +30,7 @@ import { getProductDetail } from "../serve";
30
30
  import { getIsBundleOrCombination } from "../../utils";
31
31
  import { formatProductListByCategory, getProductTotalPrice, request, getCacheParams, deleteCacheParams } from "../../../utils";
32
32
  import { locales, getUniqueId } from "@pisell/utils";
33
+ import { useUpdateEffect } from "ahooks";
33
34
  var shopList = [2886, 4422, 5538, 6930];
34
35
  var getCacheResourceId = function getCacheResourceId() {
35
36
  var serviceParams = getCacheParams();
@@ -217,8 +218,6 @@ var Info = function Info() {
217
218
  };
218
219
  }();
219
220
  var handleSelectService = function handleSelectService() {
220
- getServices();
221
- setSearch("");
222
221
  dispatch({
223
222
  type: "setService",
224
223
  payload: {
@@ -314,13 +313,24 @@ var Info = function Info() {
314
313
  return;
315
314
  }
316
315
  // 如果弹窗打开,并且是创建, 则自动打开选择服务的弹窗
317
- if (state.modalOpen && !state.bookingId) {
316
+ if (state.modalOpen && !state.bookingId && state.renderType !== 'eventBooking') {
318
317
  handleSelectService();
319
318
  }
320
319
  }, [state.modalOpen, state.bookingId]);
321
320
  var showAddButton = useMemo(function () {
322
321
  return !state.disabledEdit && !state.channelDisabledEdit;
323
322
  }, [state.disabledEdit, state.channelDisabledEdit]);
323
+ useUpdateEffect(function () {
324
+ if (state.service.addModal) {
325
+ getServices();
326
+ setSearch("");
327
+ }
328
+ }, [state.service.addModal]);
329
+ useEffect(function () {
330
+ if (state.renderType === "eventBooking" && state.modalOpen) {
331
+ getServices();
332
+ }
333
+ }, [state.renderType, state.modalOpen]);
324
334
  var addButton = useMemo(function () {
325
335
  if (state.renderType === "eventBooking") {
326
336
  return isService ? /*#__PURE__*/React.createElement("div", {
@@ -346,6 +356,7 @@ var Info = function Info() {
346
356
  }
347
357
  });
348
358
  }, [state.renderType, showAddButton, isService, state.service.value, loading]);
359
+ console.log(state.service.addModal, 'state.service.addModal');
349
360
  return /*#__PURE__*/React.createElement(React.Fragment, null, ((_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : (_state$service3$cache = _state$service3.cacheItem) === null || _state$service3$cache === void 0 ? void 0 : _state$service3$cache.autoClose) && /*#__PURE__*/React.createElement(Skeleton, {
350
361
  loading: true,
351
362
  active: true,
@@ -1,7 +1,7 @@
1
1
  // 商品是套餐或单规格多规格
2
2
  export var getIsBundleOrCombination = function getIsBundleOrCombination(productDetail) {
3
- var _productDetail$bundle, _productDetail$option, _productDetail$varian;
4
- if (productDetail !== null && productDetail !== void 0 && (_productDetail$bundle = productDetail.bundle_group) !== null && _productDetail$bundle !== void 0 && _productDetail$bundle.length || productDetail !== null && productDetail !== void 0 && (_productDetail$option = productDetail.option_group) !== null && _productDetail$option !== void 0 && _productDetail$option.length || productDetail !== null && productDetail !== void 0 && (_productDetail$varian = productDetail.variant) !== null && _productDetail$varian !== void 0 && _productDetail$varian.length) {
3
+ var _productDetail$bundle;
4
+ if (productDetail !== null && productDetail !== void 0 && (_productDetail$bundle = productDetail.bundle_group) !== null && _productDetail$bundle !== void 0 && _productDetail$bundle.length) {
5
5
  return true;
6
6
  }
7
7
  return false;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -88,7 +89,7 @@ export declare const walkInData: {
88
89
  id: number;
89
90
  nickname: string;
90
91
  };
91
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
92
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
92
93
  state: FormState;
93
94
  } & {
94
95
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => JSX.Element;
7
+ declare const Notes: (props: any) => any;
8
8
  export default Notes;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => JSX.Element;
8
+ declare const Payments: (props: any) => any;
9
9
  export default Payments;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => JSX.Element;
2
+ declare const Schedules: (props: any) => any;
3
3
  export default Schedules;
@@ -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,7 +69,7 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
72
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
72
73
  state: FormState;
73
74
  } & {
74
75
  dispatch: (params: {
@@ -13,5 +13,5 @@ export interface InfoProps {
13
13
  setGlobalState: any;
14
14
  }
15
15
  export declare const formatProducts: (values: any) => any;
16
- declare const Addons: (props: any) => JSX.Element;
16
+ declare const Addons: (props: any) => any;
17
17
  export default Addons;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => JSX.Element;
24
+ declare const Forms: (props: any) => any;
25
25
  export default Forms;
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Forms: (props: any) => JSX.Element;
8
+ declare const Forms: (props: any) => any;
9
9
  export default Forms;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,2 +1,2 @@
1
- declare const Booking: (props: any) => JSX.Element;
1
+ declare const Booking: (props: any) => any;
2
2
  export default Booking;
@@ -8,5 +8,5 @@ export interface InfoProps {
8
8
  slot: any;
9
9
  setState: any;
10
10
  }
11
- declare const Info: (props: any) => JSX.Element;
11
+ declare const Info: (props: any) => any;
12
12
  export default Info;
@@ -1,9 +1,10 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
3
  export declare const walkInData: {
3
4
  id: number;
4
5
  nickname: string;
5
6
  };
6
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
7
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
7
8
  state: FormState;
8
9
  } & {
9
10
  dispatch: (params: {
@@ -45,6 +45,7 @@ var import_serve = require("../serve");
45
45
  var import_utils = require("../../utils");
46
46
  var import_utils2 = require("../../../utils");
47
47
  var import_utils3 = require("@pisell/utils");
48
+ var import_ahooks = require("ahooks");
48
49
  var shopList = [2886, 4422, 5538, 6930];
49
50
  var getCacheResourceId = () => {
50
51
  const serviceParams = (0, import_utils2.getCacheParams)();
@@ -140,8 +141,6 @@ var Info = () => {
140
141
  });
141
142
  };
142
143
  const handleSelectService = () => {
143
- getServices();
144
- setSearch("");
145
144
  dispatch({
146
145
  type: "setService",
147
146
  payload: {
@@ -229,13 +228,24 @@ var Info = () => {
229
228
  )) {
230
229
  return;
231
230
  }
232
- if (state.modalOpen && !state.bookingId) {
231
+ if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking") {
233
232
  handleSelectService();
234
233
  }
235
234
  }, [state.modalOpen, state.bookingId]);
236
235
  const showAddButton = (0, import_react.useMemo)(() => {
237
236
  return !state.disabledEdit && !state.channelDisabledEdit;
238
237
  }, [state.disabledEdit, state.channelDisabledEdit]);
238
+ (0, import_ahooks.useUpdateEffect)(() => {
239
+ if (state.service.addModal) {
240
+ getServices();
241
+ setSearch("");
242
+ }
243
+ }, [state.service.addModal]);
244
+ (0, import_react.useEffect)(() => {
245
+ if (state.renderType === "eventBooking" && state.modalOpen) {
246
+ getServices();
247
+ }
248
+ }, [state.renderType, state.modalOpen]);
239
249
  const addButton = (0, import_react.useMemo)(() => {
240
250
  if (state.renderType === "eventBooking") {
241
251
  return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
@@ -265,6 +275,7 @@ var Info = () => {
265
275
  state.service.value,
266
276
  loading
267
277
  ]);
278
+ console.log(state.service.addModal, "state.service.addModal");
268
279
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = (_b = state.service) == null ? void 0 : _b.cacheItem) == null ? void 0 : _c.autoClose) && /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }), addButton, /* @__PURE__ */ import_react.default.createElement(
269
280
  import_drawer.default,
270
281
  {
@@ -23,8 +23,8 @@ __export(utils_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(utils_exports);
25
25
  var getIsBundleOrCombination = (productDetail) => {
26
- var _a, _b, _c;
27
- if (((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) || ((_b = productDetail == null ? void 0 : productDetail.option_group) == null ? void 0 : _b.length) || ((_c = productDetail == null ? void 0 : productDetail.variant) == null ? void 0 : _c.length)) {
26
+ var _a;
27
+ if ((_a = productDetail == null ? void 0 : productDetail.bundle_group) == null ? void 0 : _a.length) {
28
28
  return true;
29
29
  }
30
30
  return false;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -88,7 +89,7 @@ export declare const walkInData: {
88
89
  id: number;
89
90
  nickname: string;
90
91
  };
91
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
92
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
92
93
  state: FormState;
93
94
  } & {
94
95
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => JSX.Element;
7
+ declare const Notes: (props: any) => any;
8
8
  export default Notes;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => JSX.Element;
8
+ declare const Payments: (props: any) => any;
9
9
  export default Payments;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => JSX.Element;
2
+ declare const Schedules: (props: any) => any;
3
3
  export default Schedules;
@@ -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,7 +69,7 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
72
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
72
73
  state: FormState;
73
74
  } & {
74
75
  dispatch: (params: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.45",
3
+ "version": "3.0.47",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -58,8 +58,8 @@
58
58
  "ahooks": "^3.7.6",
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
- "@pisell/utils": "1.0.24",
62
61
  "@pisell/icon": "0.0.8",
62
+ "@pisell/utils": "1.0.24",
63
63
  "@pisell/date-picker": "1.0.69"
64
64
  },
65
65
  "peerDependencies": {