@pisell/private-materials 3.0.32 → 3.0.34

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 (58) 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/render/default/view.js +3 -3
  7. package/build/lowcode/view.js +2 -2
  8. package/es/components/booking/addons/index.d.ts +1 -1
  9. package/es/components/booking/addons/index.js +8 -4
  10. package/es/components/booking/addons/model.d.ts +1 -2
  11. package/es/components/booking/components/TabProduct/index.d.ts +1 -1
  12. package/es/components/booking/components/TabProduct/index.js +2 -2
  13. package/es/components/booking/components/TabProduct/productItem/index.js +14 -4
  14. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -1
  15. package/es/components/booking/components/footer/FooterMenus/index.js +3 -3
  16. package/es/components/booking/components/footer/index.js +7 -6
  17. package/es/components/booking/forms/forms.d.ts +1 -1
  18. package/es/components/booking/forms/index.d.ts +1 -1
  19. package/es/components/booking/forms/index.js +8 -7
  20. package/es/components/booking/forms/model.d.ts +1 -2
  21. package/es/components/booking/index.d.ts +1 -1
  22. package/es/components/booking/info/index.d.ts +1 -1
  23. package/es/components/booking/info/model.d.ts +1 -2
  24. package/es/components/booking/info/service/addService/index.js +7 -3
  25. package/es/components/booking/model.d.ts +1 -2
  26. package/es/components/booking/notes/index.d.ts +1 -1
  27. package/es/components/booking/notes/index.js +4 -3
  28. package/es/components/booking/notes/model.d.ts +1 -2
  29. package/es/components/booking/payments/index.d.ts +1 -1
  30. package/es/components/booking/payments/model.d.ts +1 -2
  31. package/es/components/schedules/index.d.ts +1 -1
  32. package/es/components/schedules/model.d.ts +1 -2
  33. package/lib/components/booking/addons/index.d.ts +1 -1
  34. package/lib/components/booking/addons/index.js +6 -4
  35. package/lib/components/booking/addons/model.d.ts +1 -2
  36. package/lib/components/booking/components/TabProduct/index.d.ts +1 -1
  37. package/lib/components/booking/components/TabProduct/index.js +2 -2
  38. package/lib/components/booking/components/TabProduct/productItem/index.js +19 -3
  39. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -1
  40. package/lib/components/booking/components/footer/FooterMenus/index.js +3 -3
  41. package/lib/components/booking/components/footer/index.js +7 -2
  42. package/lib/components/booking/forms/forms.d.ts +1 -1
  43. package/lib/components/booking/forms/index.d.ts +1 -1
  44. package/lib/components/booking/forms/index.js +1 -0
  45. package/lib/components/booking/forms/model.d.ts +1 -2
  46. package/lib/components/booking/index.d.ts +1 -1
  47. package/lib/components/booking/info/index.d.ts +1 -1
  48. package/lib/components/booking/info/model.d.ts +1 -2
  49. package/lib/components/booking/info/service/addService/index.js +6 -3
  50. package/lib/components/booking/model.d.ts +1 -2
  51. package/lib/components/booking/notes/index.d.ts +1 -1
  52. package/lib/components/booking/notes/index.js +6 -5
  53. package/lib/components/booking/notes/model.d.ts +1 -2
  54. package/lib/components/booking/payments/index.d.ts +1 -1
  55. package/lib/components/booking/payments/model.d.ts +1 -2
  56. package/lib/components/schedules/index.d.ts +1 -1
  57. package/lib/components/schedules/model.d.ts +1 -2
  58. package/package.json +3 -3
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
2
  export declare const walkInData: {
4
3
  id: number;
5
4
  nickname: string;
6
5
  };
7
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
6
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
8
7
  state: FormState;
9
8
  } & {
10
9
  dispatch: (params: {
@@ -115,7 +115,8 @@ var Info = () => {
115
115
  // include_variant: "no",
116
116
  ids: state.renderType === "eventBooking" ? (_a2 = state.eventOtherParams) == null ? void 0 : _a2.productIds : void 0,
117
117
  open_quotation: 1,
118
- with_schedule: 1
118
+ with_schedule: 1,
119
+ with_count: ["bundleGroup", "optionGroup"]
119
120
  });
120
121
  setLoading(false);
121
122
  setDefaultService(data == null ? void 0 : data.list);
@@ -135,7 +136,8 @@ var Info = () => {
135
136
  }
136
137
  });
137
138
  };
138
- const handleSelectProduct = (item) => {
139
+ const handleSelectProduct = (item, type) => {
140
+ const isEject = type === "detail" || item.option_group_count > 0 || item.bundle_group_count > 0 || item.variant_count > 0;
139
141
  state.action({
140
142
  type: "pisell1.handleOpenProductModal",
141
143
  data: {
@@ -146,7 +148,8 @@ var Info = () => {
146
148
  session: false,
147
149
  variant: false,
148
150
  package: true
149
- }
151
+ },
152
+ is_eject: isEject ? 1 : 0
150
153
  },
151
154
  callback: (e) => {
152
155
  var _a2;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -87,7 +86,7 @@ export declare const walkInData: {
87
86
  id: number;
88
87
  nickname: string;
89
88
  };
90
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
89
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
91
90
  state: FormState;
92
91
  } & {
93
92
  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) => any;
7
+ declare const Notes: (props: any) => JSX.Element;
8
8
  export default Notes;
@@ -40,14 +40,15 @@ var import_emptyBooking = __toESM(require("../components/emptyBooking"));
40
40
  var import_index = require("./index.less");
41
41
  var import_utils = require("@pisell/utils");
42
42
  var Notes = (0, import_model.Provider)((props) => {
43
- var _a, _b, _c;
43
+ var _a, _b, _c, _d, _e;
44
44
  const { globalState } = props;
45
45
  const modal = (0, import_react.useContext)(import_model.Context);
46
46
  const [internalLoading, setInternalLoading] = (0, import_react.useState)(false);
47
47
  const getNotes = async () => {
48
+ var _a2, _b2;
48
49
  setInternalLoading(true);
49
50
  const data = await modal.state.apis.getNotesByOrder({
50
- schedule_event_id: modal.state.bookingId,
51
+ schedule_event_id: (_b2 = (_a2 = modal.state.bookingDetail) == null ? void 0 : _a2.bookings) == null ? void 0 : _b2.id,
51
52
  skip: 1,
52
53
  num: 99
53
54
  });
@@ -123,14 +124,14 @@ var Notes = (0, import_model.Provider)((props) => {
123
124
  ];
124
125
  }, [modal.state.bookingDetail]);
125
126
  const orderNote = (0, import_react.useMemo)(() => {
126
- var _a2, _b2, _c2, _d;
127
+ var _a2, _b2, _c2, _d2;
127
128
  if (!((_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote)) {
128
129
  return [];
129
130
  }
130
131
  return [
131
132
  {
132
133
  id: 0,
133
- content: ((_d = (_c2 = modal.state) == null ? void 0 : _c2.notes) == null ? void 0 : _d.orderNote) || ""
134
+ content: ((_d2 = (_c2 = modal.state) == null ? void 0 : _c2.notes) == null ? void 0 : _d2.orderNote) || ""
134
135
  }
135
136
  ];
136
137
  }, [(_b = (_a = modal.state) == null ? void 0 : _a.notes) == null ? void 0 : _b.orderNote]);
@@ -183,7 +184,7 @@ var Notes = (0, import_model.Provider)((props) => {
183
184
  notes: ((_c = modal.state) == null ? void 0 : _c.notes.internalNotes) || [],
184
185
  isEdit: true,
185
186
  apis: modal.state.apis,
186
- bookingId: modal.state.bookingId,
187
+ bookingId: (_e = (_d = modal.state.bookingDetail) == null ? void 0 : _d.bookings) == null ? void 0 : _e.id,
187
188
  onChange: (e, type, noteType) => {
188
189
  noteChange({
189
190
  note: e,
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  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) => any;
8
+ declare const Payments: (props: any) => JSX.Element;
9
9
  export default Payments;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => any;
2
+ declare const Schedules: (props: any) => JSX.Element;
3
3
  export default Schedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,7 +68,7 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
73
72
  state: FormState;
74
73
  } & {
75
74
  dispatch: (params: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.32",
3
+ "version": "3.0.34",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,8 +59,8 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "@pisell/utils": "1.0.23",
62
- "@pisell/date-picker": "1.0.68",
63
- "@pisell/icon": "0.0.8"
62
+ "@pisell/icon": "0.0.8",
63
+ "@pisell/date-picker": "1.0.68"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^18.0.0",