@pisell/private-materials 3.0.13 → 3.0.15

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 (204) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +2 -1
  13. package/es/components/booking/components/addButton/index.d.ts +8 -8
  14. package/es/components/booking/components/addButton/index.js +1 -1
  15. package/es/components/booking/components/drawer/index.d.ts +1 -1
  16. package/es/components/booking/components/footer/FooterMenus/index.js +1 -1
  17. package/es/components/booking/components/footer/index.js +25 -23
  18. package/es/components/booking/components/footer/utils.js +4 -3
  19. package/es/components/booking/forms/forms.d.ts +1 -1
  20. package/es/components/booking/forms/forms.js +2 -1
  21. package/es/components/booking/forms/index.d.ts +1 -1
  22. package/es/components/booking/forms/model.d.ts +2 -1
  23. package/es/components/booking/index.d.ts +1 -1
  24. package/es/components/booking/info/client/index.js +0 -1
  25. package/es/components/booking/info/date/index.less +1 -1
  26. package/es/components/booking/info/index.d.ts +1 -1
  27. package/es/components/booking/info/index.js +23 -9
  28. package/es/components/booking/info/model.d.ts +2 -1
  29. package/es/components/booking/info/notes/index.d.ts +3 -0
  30. package/es/components/booking/info/notes/index.js +83 -0
  31. package/es/components/booking/info/pet/index.js +5 -7
  32. package/es/components/booking/info/service/addService/index.js +74 -15
  33. package/es/components/booking/info/service/editService/index.js +8 -7
  34. package/es/components/booking/info/service/index.js +1 -1
  35. package/es/components/booking/info/service/index.less +3 -0
  36. package/es/components/booking/locales.d.ts +3 -0
  37. package/es/components/booking/locales.js +3 -0
  38. package/es/components/booking/model.d.ts +13 -1
  39. package/es/components/booking/notes/index.d.ts +1 -1
  40. package/es/components/booking/notes/model.d.ts +2 -1
  41. package/es/components/booking/payments/index.d.ts +1 -1
  42. package/es/components/booking/payments/model.d.ts +2 -1
  43. package/es/components/booking/utils.js +2 -1
  44. package/es/components/index.d.ts +2 -1
  45. package/es/components/index.js +2 -1
  46. package/es/components/productExtension/card/index.d.ts +10 -0
  47. package/es/components/productExtension/card/index.js +20 -0
  48. package/es/components/productExtension/card/index.less +34 -0
  49. package/es/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
  50. package/es/components/productExtension/fields/Actor/Container/index.js +34 -0
  51. package/es/components/productExtension/fields/Actor/Container/index.less +19 -0
  52. package/es/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
  53. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +94 -0
  54. package/es/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
  55. package/es/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
  56. package/es/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
  57. package/es/components/productExtension/fields/Actor/index.d.ts +5 -0
  58. package/es/components/productExtension/fields/Actor/index.js +23 -0
  59. package/es/components/productExtension/fields/Forms/index.d.ts +10 -0
  60. package/es/components/productExtension/fields/Forms/index.js +184 -0
  61. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
  62. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +30 -0
  63. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
  64. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +4 -0
  65. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +39 -0
  66. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.less +62 -0
  67. package/es/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
  68. package/es/components/productExtension/fields/SelectProducts/index.js +99 -0
  69. package/es/components/productExtension/fields/SelectProducts/index.less +30 -0
  70. package/es/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
  71. package/es/components/productExtension/fields/SelectProducts/mock.js +0 -0
  72. package/es/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
  73. package/es/components/productExtension/fields/SelectProducts/server.js +29 -0
  74. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
  75. package/es/components/productExtension/fields/SelectResourcesTable/index.js +200 -0
  76. package/es/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
  77. package/es/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
  78. package/es/components/productExtension/fields/SelectResourcesTable/mock.js +5072 -0
  79. package/es/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
  80. package/es/components/productExtension/fields/SelectResourcesTable/server.js +49 -0
  81. package/es/components/productExtension/fields/index.d.ts +1 -0
  82. package/es/components/productExtension/fields/index.js +33 -0
  83. package/es/components/productExtension/index.d.ts +7 -0
  84. package/es/components/productExtension/index.js +78 -0
  85. package/es/components/productExtension/index.less +0 -0
  86. package/es/components/productExtension/locales.d.ts +48 -0
  87. package/es/components/productExtension/locales.js +47 -0
  88. package/es/components/productExtension/server.d.ts +1 -0
  89. package/es/components/productExtension/server.js +29 -0
  90. package/es/components/schedules/index.d.ts +1 -1
  91. package/es/components/schedules/model.d.ts +2 -1
  92. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -1
  93. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +21 -5
  94. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +5 -2
  95. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +20 -5
  96. package/es/components/selectModal/index.d.ts +24 -0
  97. package/es/components/selectModal/index.js +108 -0
  98. package/es/components/selectModal/index.less +0 -0
  99. package/es/components/tabProduct/card/index.d.ts +2 -2
  100. package/es/components/tabProduct/card/index.js +3 -4
  101. package/es/components/tabProduct/index.d.ts +4 -2
  102. package/es/components/tabProduct/index.js +10 -9
  103. package/es/index.d.ts +1 -0
  104. package/es/index.js +2 -1
  105. package/es/utils/index.d.ts +22 -0
  106. package/es/utils/index.js +56 -0
  107. package/lib/components/booking/addons/index.d.ts +1 -1
  108. package/lib/components/booking/addons/model.d.ts +2 -1
  109. package/lib/components/booking/components/addButton/index.d.ts +8 -8
  110. package/lib/components/booking/components/addButton/index.js +1 -1
  111. package/lib/components/booking/components/drawer/index.d.ts +1 -1
  112. package/lib/components/booking/components/footer/FooterMenus/index.js +1 -1
  113. package/lib/components/booking/components/footer/index.js +5 -3
  114. package/lib/components/booking/components/footer/utils.js +4 -2
  115. package/lib/components/booking/forms/forms.d.ts +1 -1
  116. package/lib/components/booking/forms/forms.js +1 -1
  117. package/lib/components/booking/forms/index.d.ts +1 -1
  118. package/lib/components/booking/forms/model.d.ts +2 -1
  119. package/lib/components/booking/index.d.ts +1 -1
  120. package/lib/components/booking/info/client/index.js +0 -1
  121. package/lib/components/booking/info/date/index.less +1 -1
  122. package/lib/components/booking/info/index.d.ts +1 -1
  123. package/lib/components/booking/info/index.js +27 -9
  124. package/lib/components/booking/info/model.d.ts +2 -1
  125. package/lib/components/booking/info/notes/index.d.ts +3 -0
  126. package/lib/components/booking/info/notes/index.js +111 -0
  127. package/lib/components/booking/info/pet/index.js +5 -7
  128. package/lib/components/booking/info/service/addService/index.js +65 -10
  129. package/lib/components/booking/info/service/editService/index.js +7 -5
  130. package/lib/components/booking/info/service/index.js +1 -1
  131. package/lib/components/booking/info/service/index.less +3 -0
  132. package/lib/components/booking/locales.d.ts +3 -0
  133. package/lib/components/booking/locales.js +3 -0
  134. package/lib/components/booking/model.d.ts +13 -1
  135. package/lib/components/booking/notes/index.d.ts +1 -1
  136. package/lib/components/booking/notes/model.d.ts +2 -1
  137. package/lib/components/booking/payments/index.d.ts +1 -1
  138. package/lib/components/booking/payments/model.d.ts +2 -1
  139. package/lib/components/booking/utils.js +2 -1
  140. package/lib/components/index.d.ts +2 -1
  141. package/lib/components/index.js +3 -0
  142. package/lib/components/productExtension/card/index.d.ts +10 -0
  143. package/lib/components/productExtension/card/index.js +57 -0
  144. package/lib/components/productExtension/card/index.less +34 -0
  145. package/lib/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
  146. package/lib/components/productExtension/fields/Actor/Container/index.js +64 -0
  147. package/lib/components/productExtension/fields/Actor/Container/index.less +19 -0
  148. package/lib/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
  149. package/lib/components/productExtension/fields/Actor/CutOffTime/index.js +128 -0
  150. package/lib/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
  151. package/lib/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
  152. package/lib/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
  153. package/lib/components/productExtension/fields/Actor/index.d.ts +5 -0
  154. package/lib/components/productExtension/fields/Actor/index.js +56 -0
  155. package/lib/components/productExtension/fields/Forms/index.d.ts +10 -0
  156. package/lib/components/productExtension/fields/Forms/index.js +108 -0
  157. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
  158. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +65 -0
  159. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
  160. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +4 -0
  161. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +79 -0
  162. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.less +62 -0
  163. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
  164. package/lib/components/productExtension/fields/SelectProducts/index.js +126 -0
  165. package/lib/components/productExtension/fields/SelectProducts/index.less +30 -0
  166. package/lib/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
  167. package/lib/components/productExtension/fields/SelectProducts/mock.js +0 -0
  168. package/lib/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
  169. package/lib/components/productExtension/fields/SelectProducts/server.js +33 -0
  170. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
  171. package/lib/components/productExtension/fields/SelectResourcesTable/index.js +178 -0
  172. package/lib/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
  173. package/lib/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
  174. package/lib/components/productExtension/fields/SelectResourcesTable/mock.js +12723 -0
  175. package/lib/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
  176. package/lib/components/productExtension/fields/SelectResourcesTable/server.js +39 -0
  177. package/lib/components/productExtension/fields/index.d.ts +1 -0
  178. package/lib/components/productExtension/fields/index.js +69 -0
  179. package/lib/components/productExtension/index.d.ts +7 -0
  180. package/lib/components/productExtension/index.js +109 -0
  181. package/lib/components/productExtension/index.less +0 -0
  182. package/lib/components/productExtension/locales.d.ts +48 -0
  183. package/lib/components/productExtension/locales.js +71 -0
  184. package/lib/components/productExtension/server.d.ts +1 -0
  185. package/lib/components/productExtension/server.js +33 -0
  186. package/lib/components/schedules/index.d.ts +1 -1
  187. package/lib/components/schedules/model.d.ts +2 -1
  188. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -1
  189. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +11 -6
  190. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +5 -2
  191. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +18 -4
  192. package/lib/components/selectModal/index.d.ts +24 -0
  193. package/lib/components/selectModal/index.js +133 -0
  194. package/lib/components/selectModal/index.less +0 -0
  195. package/lib/components/tabProduct/card/index.d.ts +2 -2
  196. package/lib/components/tabProduct/card/index.js +1 -2
  197. package/lib/components/tabProduct/index.d.ts +4 -2
  198. package/lib/components/tabProduct/index.js +7 -8
  199. package/lib/index.d.ts +1 -0
  200. package/lib/index.js +3 -0
  201. package/lib/utils/index.d.ts +22 -0
  202. package/lib/utils/index.js +59 -0
  203. package/lowcode/product-extension/meta.ts +120 -0
  204. package/package.json +3 -3
@@ -0,0 +1,111 @@
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/info/notes/index.tsx
30
+ var notes_exports = {};
31
+ __export(notes_exports, {
32
+ default: () => notes_default
33
+ });
34
+ module.exports = __toCommonJS(notes_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_model = require("../model");
37
+ var import_utils = require("@pisell/utils");
38
+ var import_NoteBlock = __toESM(require("../../notes/NoteBlock"));
39
+ var Notes = () => {
40
+ var _a, _b, _c;
41
+ const modal = (0, import_react.useContext)(import_model.Context);
42
+ const orderNote = (0, import_react.useMemo)(() => {
43
+ var _a2, _b2, _c2, _d;
44
+ if (!((_b2 = (_a2 = modal.state) == null ? void 0 : _a2.notes) == null ? void 0 : _b2.orderNote)) {
45
+ return [];
46
+ }
47
+ return [
48
+ {
49
+ id: 0,
50
+ content: ((_d = (_c2 = modal.state) == null ? void 0 : _c2.notes) == null ? void 0 : _d.orderNote) || ""
51
+ }
52
+ ];
53
+ }, [(_b = (_a = modal.state) == null ? void 0 : _a.notes) == null ? void 0 : _b.orderNote]);
54
+ const noteChange = ({ note, status, noteType }) => {
55
+ var _a2;
56
+ if (noteType === "internal") {
57
+ let _list = [...(_a2 = modal.state) == null ? void 0 : _a2.notes.internalNotes];
58
+ if (status == "add") {
59
+ _list.push(note);
60
+ }
61
+ if (status == "remove") {
62
+ _list = _list.filter((item) => item.id != note.id);
63
+ }
64
+ if (status == "edit") {
65
+ _list = _list.map((item) => {
66
+ if (item.id == note.id) {
67
+ return note;
68
+ }
69
+ return item;
70
+ });
71
+ }
72
+ modal.dispatch({
73
+ type: "setNotes",
74
+ payload: {
75
+ internalNotes: _list
76
+ }
77
+ });
78
+ return;
79
+ }
80
+ if (noteType === "order") {
81
+ modal.dispatch({
82
+ type: "setNotes",
83
+ payload: {
84
+ orderNote: note.content || "",
85
+ edit: false
86
+ }
87
+ });
88
+ }
89
+ };
90
+ return /* @__PURE__ */ import_react.default.createElement(
91
+ import_NoteBlock.default,
92
+ {
93
+ noteType: "order",
94
+ maxLength: 1,
95
+ title: `${import_utils.locales.getText("pisell2.text.order-notes")}:`,
96
+ describe: "",
97
+ notes: orderNote,
98
+ apis: (_c = modal == null ? void 0 : modal.state) == null ? void 0 : _c.apis,
99
+ placeholder: import_utils.locales.getText("pisell2.text.add-order-notes"),
100
+ isEdit: true,
101
+ onChange: (e, type, noteType) => {
102
+ noteChange({
103
+ note: e,
104
+ status: type,
105
+ noteType
106
+ });
107
+ }
108
+ }
109
+ );
110
+ };
111
+ var notes_default = Notes;
@@ -42,7 +42,7 @@ var import_forms = __toESM(require("../../forms/forms"));
42
42
  var import_format = require("../../forms/format");
43
43
  var import_utils2 = require("../../utils");
44
44
  var Pet = () => {
45
- var _a, _b, _c, _d, _e, _f, _g, _h;
45
+ var _a, _b, _c, _d, _e, _f, _g;
46
46
  const [loading, setLoading] = (0, import_react.useState)(false);
47
47
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
48
48
  const [valueLoading, setValueLoading] = (0, import_react.useState)(false);
@@ -87,7 +87,6 @@ var Pet = () => {
87
87
  });
88
88
  setLoading(false);
89
89
  };
90
- console.log("values", (_d = state.pet) == null ? void 0 : _d.value);
91
90
  const getForms = async (isUpdateValue = true) => {
92
91
  var _a2, _b2;
93
92
  setLoading(true);
@@ -100,7 +99,7 @@ var Pet = () => {
100
99
  }
101
100
  try {
102
101
  let formData = await state.apis.getForms({
103
- relation_type: "appointment_booking",
102
+ relation_type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
104
103
  relation_id: ((_b2 = (_a2 = state.bookingDetail) == null ? void 0 : _a2.bookings) == null ? void 0 : _b2.id) || 0
105
104
  // _config: { useCache: true },
106
105
  });
@@ -197,7 +196,7 @@ var Pet = () => {
197
196
  type: "setPet",
198
197
  payload: { value: changeFormValuesData }
199
198
  });
200
- }, [(_e = state.client.value) == null ? void 0 : _e.id]);
199
+ }, [(_d = state.client.value) == null ? void 0 : _d.id]);
201
200
  (0, import_react.useEffect)(() => {
202
201
  if (state.bookingId) {
203
202
  if (!state.bookingDetail) {
@@ -212,9 +211,8 @@ var Pet = () => {
212
211
  state.bookingDetail,
213
212
  params.form_id,
214
213
  params.type,
215
- (_g = (_f = state.client) == null ? void 0 : _f.value) == null ? void 0 : _g.id
214
+ (_f = (_e = state.client) == null ? void 0 : _e.value) == null ? void 0 : _f.id
216
215
  ]);
217
- console.log("state.pet.formData", state.pet.formData);
218
216
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-wraps" }, /* @__PURE__ */ import_react.default.createElement(
219
217
  import_forms.default,
220
218
  {
@@ -229,7 +227,7 @@ var Pet = () => {
229
227
  modalOpen: state.modalOpen,
230
228
  value: state.pet.value,
231
229
  onChange: onValueChange,
232
- client: (_h = state.client) == null ? void 0 : _h.value,
230
+ client: (_g = state.client) == null ? void 0 : _g.value,
233
231
  customSelectProps: {
234
232
  // loading: loading,
235
233
  handleViewItem,
@@ -46,19 +46,61 @@ var Info = () => {
46
46
  var _a;
47
47
  const [search, setSearch] = (0, import_react.useState)("");
48
48
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
49
+ const setDefaultService = (list) => {
50
+ if (state.renderType !== "eventBooking") {
51
+ return;
52
+ }
53
+ if (state.bookingId) {
54
+ return;
55
+ }
56
+ if (list.length !== 1) {
57
+ return;
58
+ }
59
+ let _list = [...state.service.value];
60
+ if (_list.length !== 0) {
61
+ return;
62
+ }
63
+ let product = list[0];
64
+ let _item = {
65
+ ...product,
66
+ product_id: product.id,
67
+ _id: (0, import_utils2.getUniqueId)(),
68
+ _extend: {
69
+ start_date: state.date.value,
70
+ startDate: state.date.value,
71
+ endDate: state.date.value,
72
+ start_time: "00:00:00",
73
+ duration: 10,
74
+ quantity: 1,
75
+ price: product.price,
76
+ product_name: product.title
77
+ }
78
+ };
79
+ _list.push(_item);
80
+ dispatch({
81
+ type: "setService",
82
+ payload: {
83
+ value: _list,
84
+ edit: true
85
+ }
86
+ });
87
+ };
49
88
  const getServices = async () => {
89
+ var _a2;
50
90
  let data = await state.apis.getServices({
51
91
  skip: 1,
52
92
  num: 500,
53
- extension_type: ["product_appointment"],
93
+ extension_type: state.renderType === "eventBooking" ? void 0 : ["product_appointment"],
54
94
  with: ["category"],
55
95
  // include_formula: "no",
56
96
  // include_bundle: "no",
57
97
  // include_option: "no",
58
98
  // include_variant: "no",
99
+ ids: state.renderType === "eventBooking" ? (_a2 = state.eventOtherParams) == null ? void 0 : _a2.productIds : void 0,
59
100
  open_quotation: 1,
60
101
  with_schedule: 0
61
102
  });
103
+ setDefaultService(data == null ? void 0 : data.list);
62
104
  dispatch({
63
105
  type: "setService",
64
106
  payload: {
@@ -113,7 +155,6 @@ var Info = () => {
113
155
  search ? (item) => isIncludes(item.title) : void 0
114
156
  );
115
157
  }, [search, (_a = state.service) == null ? void 0 : _a.services]);
116
- console.log("renderList", renderList);
117
158
  const isService = (0, import_react.useMemo)(() => {
118
159
  return state.service.value.length > 0;
119
160
  }, [state.service.value]);
@@ -128,15 +169,29 @@ var Info = () => {
128
169
  const showAddButton = (0, import_react.useMemo)(() => {
129
170
  return !state.disabledEdit && !state.channelDisabledEdit;
130
171
  }, [state.disabledEdit, state.channelDisabledEdit]);
131
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showAddButton ? /* @__PURE__ */ import_react.default.createElement(
132
- import_addButton.default,
133
- {
134
- showSub: isService,
135
- title: import_utils2.locales.getText("pisell2.text.add-a-service"),
136
- subTitle: import_utils2.locales.getText("pisell2.text.add-another-service"),
137
- onClick: handleSelectService
172
+ const addButton = (0, import_react.useMemo)(() => {
173
+ if (state.renderType === "eventBooking") {
174
+ return isService ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }) : /* @__PURE__ */ import_react.default.createElement(
175
+ import_addButton.default,
176
+ {
177
+ showSub: false,
178
+ title: import_utils2.locales.getText("pisell2.text.add-a-service"),
179
+ subTitle: import_utils2.locales.getText("pisell2.text.add-another-service"),
180
+ onClick: handleSelectService
181
+ }
182
+ );
138
183
  }
139
- ) : /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } }), /* @__PURE__ */ import_react.default.createElement(
184
+ return showAddButton ? /* @__PURE__ */ import_react.default.createElement(
185
+ import_addButton.default,
186
+ {
187
+ showSub: isService,
188
+ title: import_utils2.locales.getText("pisell2.text.add-a-service"),
189
+ subTitle: import_utils2.locales.getText("pisell2.text.add-another-service"),
190
+ onClick: handleSelectService
191
+ }
192
+ ) : /* @__PURE__ */ import_react.default.createElement("div", { style: { height: 20 } });
193
+ }, [state.renderType, showAddButton, isService, state.service.value]);
194
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, addButton, /* @__PURE__ */ import_react.default.createElement(
140
195
  import_drawer.default,
141
196
  {
142
197
  open: state.service.addModal,
@@ -277,7 +277,9 @@ var Info = () => {
277
277
  if (state.service.editModal) {
278
278
  let cacheItem = state.service.cacheItem;
279
279
  form.setFieldsValue((0, import_utils2.getServerItemExtend)(state, cacheItem, timeObj));
280
- getResources();
280
+ if (state.renderType !== "eventBooking") {
281
+ getResources();
282
+ }
281
283
  } else {
282
284
  form.resetFields();
283
285
  }
@@ -292,10 +294,10 @@ var Info = () => {
292
294
  return (0, import_utils2.getErrorList)(currentResource, getCurrentCacheItem());
293
295
  }, [currentResource, useDuration, useStartTime]);
294
296
  (0, import_ahooks.useUpdateEffect)(() => {
295
- if (useStartTime && useDuration) {
297
+ if (useStartTime && useDuration && state.renderType !== "eventBooking") {
296
298
  getResources();
297
299
  }
298
- }, [useStartTime, useDuration]);
300
+ }, [useStartTime, useDuration, state.renderType]);
299
301
  (0, import_react.useEffect)(() => {
300
302
  setEditData();
301
303
  }, [state.service.editModal, setEditData]);
@@ -398,7 +400,7 @@ var Info = () => {
398
400
  name: "discount_reason"
399
401
  },
400
402
  /* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { size: "large" })
401
- )) : null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
403
+ )) : null, state.renderType !== "eventBooking" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 12 }, /* @__PURE__ */ import_react.default.createElement(
402
404
  import_antd.Form.Item,
403
405
  {
404
406
  label: import_utils.locales.getText("pisell2.text.start_time"),
@@ -463,7 +465,7 @@ var Info = () => {
463
465
  )
464
466
  )
465
467
  ))
466
- )), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "like_status" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)))), errorList.map((d, i) => {
468
+ )), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null)), /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "like_status" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null))))), state.renderType !== "eventBooking" && errorList.map((d, i) => {
467
469
  return /* @__PURE__ */ import_react.default.createElement(
468
470
  import_antd.Alert,
469
471
  {
@@ -128,7 +128,7 @@ var Info = () => {
128
128
  }
129
129
  },
130
130
  d.id ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-title" }, d.title) : null,
131
- d._extend ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-date" }, (0, import_utils2.getServiceTime)(d, state.date.value)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-technician" }, d._extend.resource ? /* @__PURE__ */ import_react.default.createElement(
131
+ d._extend ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, state.renderType !== "eventBooking" && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-date" }, (0, import_utils2.getServiceTime)(d, state.date.value)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-item-technician" }, d._extend.resource ? /* @__PURE__ */ import_react.default.createElement(
132
132
  import_like.default,
133
133
  {
134
134
  style: { marginRight: 4 },
@@ -1,3 +1,6 @@
1
+ .pisell-lowcode__booking-service-wrap {
2
+ margin-top: 16px;
3
+ }
1
4
  .pisell-lowcode__booking-service-item {
2
5
  width: 100%;
3
6
  border-radius: 8px;
@@ -40,6 +40,7 @@ declare const _default: {
40
40
  'pisell2.text.add-notes': string;
41
41
  'pisell2.text.notes': string;
42
42
  'pisell2.text.new-appointment': string;
43
+ 'pisell2.text.enroll': string;
43
44
  'pisell2.text.add-products-successfully': string;
44
45
  'pisell2.text.add': string;
45
46
  'pisell2.text.created-successfully': string;
@@ -168,6 +169,7 @@ declare const _default: {
168
169
  'pisell2.text.add-notes': string;
169
170
  'pisell2.text.notes': string;
170
171
  'pisell2.text.new-appointment': string;
172
+ 'pisell2.text.enroll': string;
171
173
  'pisell2.text.add-products-successfully': string;
172
174
  'pisell2.text.refund': string;
173
175
  'pisell2.text.refund-amount': string;
@@ -291,6 +293,7 @@ declare const _default: {
291
293
  'pisell2.text.add-notes': string;
292
294
  'pisell2.text.notes': string;
293
295
  'pisell2.text.new-appointment': string;
296
+ 'pisell2.text.enroll': string;
294
297
  'pisell2.text.add-products-successfully': string;
295
298
  'pisell2.text.add': string;
296
299
  'pisell2.text.created-successfully': string;
@@ -64,6 +64,7 @@ var locales_default = {
64
64
  "pisell2.text.add-notes": "Add Notes",
65
65
  "pisell2.text.notes": "Notes",
66
66
  "pisell2.text.new-appointment": "New appointment",
67
+ "pisell2.text.enroll": "Enroll",
67
68
  "pisell2.text.add-products-successfully": "Add products successfully",
68
69
  "pisell2.text.add": "Add",
69
70
  "pisell2.text.created-successfully": "Appointment created",
@@ -201,6 +202,7 @@ var locales_default = {
201
202
  "pisell2.text.add-notes": "添加备注",
202
203
  "pisell2.text.notes": "备注",
203
204
  "pisell2.text.new-appointment": "新预约",
205
+ "pisell2.text.enroll": "报名",
204
206
  "pisell2.text.add-products-successfully": "添加商品成功",
205
207
  "pisell2.text.refund": "退款",
206
208
  "pisell2.text.refund-amount": "退款金额",
@@ -338,6 +340,7 @@ var locales_default = {
338
340
  "pisell2.text.add-notes": "添加備注",
339
341
  "pisell2.text.notes": "備注",
340
342
  "pisell2.text.new-appointment": "新預約",
343
+ "pisell2.text.enroll": "报名",
341
344
  "pisell2.text.add-products-successfully": "添加商品成功",
342
345
  //
343
346
  "pisell2.text.add": "添加",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -70,12 +71,23 @@ export interface FormState {
70
71
  bookingId: string | number;
71
72
  bookingDetail: any;
72
73
  channelDisabledEdit: boolean;
74
+ renderType?: 'eventBooking';
75
+ eventOtherParams?: {
76
+ relation_id: number;
77
+ number: number;
78
+ registration_type: 'single' | 'all' | 'extra_include';
79
+ start_date: string;
80
+ start_time: string;
81
+ end_date: string;
82
+ end_time: string;
83
+ productIds: number[];
84
+ };
73
85
  }
74
86
  export declare const walkInData: {
75
87
  id: number;
76
88
  nickname: string;
77
89
  };
78
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
90
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
79
91
  state: FormState;
80
92
  } & {
81
93
  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: {
@@ -368,6 +368,7 @@ var deleteCacheParams = () => {
368
368
  sessionStorage.removeItem("pisell2.booking.serviceParams");
369
369
  };
370
370
  var getServerItemExtend = (state, cacheItem, timeObj) => {
371
+ var _a;
371
372
  if (!cacheItem.new && cacheItem._extend.endDate) {
372
373
  return cacheItem._extend;
373
374
  }
@@ -376,7 +377,7 @@ var getServerItemExtend = (state, cacheItem, timeObj) => {
376
377
  duration: findNextDuration(
377
378
  cacheItem.duration,
378
379
  timeObj.durationSlicesBasedOnTime,
379
- cacheItem.duration.value
380
+ (_a = cacheItem == null ? void 0 : cacheItem.duration) == null ? void 0 : _a.value
380
381
  )
381
382
  };
382
383
  if (lastServer) {
@@ -5,4 +5,5 @@ import BookingNotes from './booking/notes';
5
5
  import BookingAddons from './booking/addons';
6
6
  import BookingForms from './booking/forms';
7
7
  import Schedules from './schedules';
8
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules };
8
+ import ProductExtension from './productExtension';
9
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension };
@@ -35,6 +35,7 @@ __export(components_exports, {
35
35
  BookingInfo: () => import_info.default,
36
36
  BookingNotes: () => import_notes.default,
37
37
  Login: () => import_login.default,
38
+ ProductExtension: () => import_productExtension.default,
38
39
  Schedules: () => import_schedules.default
39
40
  });
40
41
  module.exports = __toCommonJS(components_exports);
@@ -45,6 +46,7 @@ var import_notes = __toESM(require("./booking/notes"));
45
46
  var import_addons = __toESM(require("./booking/addons"));
46
47
  var import_forms = __toESM(require("./booking/forms"));
47
48
  var import_schedules = __toESM(require("./schedules"));
49
+ var import_productExtension = __toESM(require("./productExtension"));
48
50
  // Annotate the CommonJS export names for ESM import in node:
49
51
  0 && (module.exports = {
50
52
  Booking,
@@ -53,5 +55,6 @@ var import_schedules = __toESM(require("./schedules"));
53
55
  BookingInfo,
54
56
  BookingNotes,
55
57
  Login,
58
+ ProductExtension,
56
59
  Schedules
57
60
  });
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface LmCardProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
4
+ header: React.ReactNode;
5
+ headerClassName: string;
6
+ extra: React.ReactNode;
7
+ hidden?: boolean;
8
+ }
9
+ declare const LmCard: React.FC<Partial<LmCardProps>>;
10
+ export default LmCard;
@@ -0,0 +1,57 @@
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/productExtension/card/index.tsx
30
+ var card_exports = {};
31
+ __export(card_exports, {
32
+ default: () => card_default
33
+ });
34
+ module.exports = __toCommonJS(card_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_index = require("./index.less");
38
+ var LmCard = (props) => {
39
+ return /* @__PURE__ */ import_react.default.createElement(
40
+ "div",
41
+ {
42
+ className: (0, import_classnames.default)("pisell_card", props.className, {
43
+ ["pisell_card-hidden"]: props.hidden
44
+ }),
45
+ style: props.style
46
+ },
47
+ props.header ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell_card-header" }, /* @__PURE__ */ import_react.default.createElement(
48
+ "div",
49
+ {
50
+ className: (0, import_classnames.default)("pisell_card-title", props.headerClassName)
51
+ },
52
+ props.header
53
+ ), props.extra) : null,
54
+ /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell_card-content") }, props.children)
55
+ );
56
+ };
57
+ var card_default = LmCard;
@@ -0,0 +1,34 @@
1
+ .pisell_card {
2
+ width: 100%;
3
+ background: #ffffff;
4
+ opacity: 1;
5
+ border-radius: 12px;
6
+ padding: 20px;
7
+ box-sizing: border-box;
8
+ margin-bottom: 20px;
9
+ // overflow: hidden;
10
+
11
+ &.pisell_card-hidden {
12
+ height: 0;
13
+ width: 0;
14
+ overflow: hidden;
15
+ padding: 0;
16
+ margin: 0
17
+ }
18
+
19
+ .pisell_card-header {
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: space-between;
23
+ margin-bottom: 20px;
24
+
25
+ .pisell_card-title {
26
+ height: 28px;
27
+ font-size: 16px;
28
+ // font-weight: 650;
29
+ line-height: 28px;
30
+ color: #252a2d;
31
+ font-weight: bold;
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,12 @@
1
+ import React, { ReactElement } from "react";
2
+ import "./index.less";
3
+ interface ContainerProps {
4
+ title: string;
5
+ children: any;
6
+ desc: string | ReactElement;
7
+ isMargin: boolean;
8
+ hint: string | ReactElement;
9
+ hintProps: object;
10
+ }
11
+ declare const Container: React.FC<Partial<ContainerProps>>;
12
+ export default Container;