@pisell/pisellos 0.0.35 → 0.0.36

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 (45) hide show
  1. package/dist/modules/Cart/types.d.ts +4 -0
  2. package/dist/modules/Cart/utils.js +3 -1
  3. package/dist/modules/Product/index.d.ts +10 -0
  4. package/dist/modules/Product/index.js +13 -0
  5. package/dist/modules/Product/types.d.ts +4 -0
  6. package/dist/modules/Resource/types.d.ts +1 -0
  7. package/dist/modules/Schedule/index.d.ts +10 -0
  8. package/dist/modules/Schedule/index.js +56 -0
  9. package/dist/modules/Schedule/type.d.ts +157 -0
  10. package/dist/modules/Schedule/type.js +1 -0
  11. package/dist/modules/Schedule/types.d.ts +177 -0
  12. package/dist/modules/Schedule/types.js +1 -0
  13. package/dist/modules/Schedule/utils.d.ts +61 -0
  14. package/dist/modules/Schedule/utils.js +700 -0
  15. package/dist/modules/index.d.ts +9 -0
  16. package/dist/modules/index.js +10 -1
  17. package/dist/solution/BookingByStep/index.d.ts +14 -5
  18. package/dist/solution/BookingByStep/index.js +284 -163
  19. package/dist/solution/BookingByStep/types.d.ts +2 -10
  20. package/dist/solution/BookingByStep/types.js +1 -7
  21. package/dist/solution/BookingByStep/utils/resources.d.ts +45 -4
  22. package/dist/solution/BookingByStep/utils/resources.js +153 -32
  23. package/lib/modules/Cart/types.d.ts +4 -0
  24. package/lib/modules/Cart/utils.js +4 -1
  25. package/lib/modules/Product/index.d.ts +10 -0
  26. package/lib/modules/Product/index.js +3 -0
  27. package/lib/modules/Product/types.d.ts +4 -0
  28. package/lib/modules/Resource/types.d.ts +1 -0
  29. package/lib/modules/Schedule/index.d.ts +10 -0
  30. package/lib/modules/Schedule/index.js +41 -0
  31. package/lib/modules/Schedule/type.d.ts +157 -0
  32. package/lib/modules/Schedule/type.js +17 -0
  33. package/lib/modules/Schedule/types.d.ts +177 -0
  34. package/lib/modules/Schedule/types.js +17 -0
  35. package/lib/modules/Schedule/utils.d.ts +61 -0
  36. package/lib/modules/Schedule/utils.js +572 -0
  37. package/lib/modules/index.d.ts +9 -0
  38. package/lib/modules/index.js +19 -1
  39. package/lib/solution/BookingByStep/index.d.ts +14 -5
  40. package/lib/solution/BookingByStep/index.js +84 -35
  41. package/lib/solution/BookingByStep/types.d.ts +2 -10
  42. package/lib/solution/BookingByStep/types.js +6 -12
  43. package/lib/solution/BookingByStep/utils/resources.d.ts +45 -4
  44. package/lib/solution/BookingByStep/utils/resources.js +101 -24
  45. package/package.json +1 -1
@@ -0,0 +1,572 @@
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/modules/Schedule/utils.ts
30
+ var utils_exports = {};
31
+ __export(utils_exports, {
32
+ calcCalendarDataByDesignation: () => calcCalendarDataByDesignation,
33
+ calcCalendarDataBySchedule: () => calcCalendarDataBySchedule,
34
+ calcCalendarDataByScheduleResult: () => calcCalendarDataByScheduleResult,
35
+ calcCalendarDataBySchedules: () => calcCalendarDataBySchedules,
36
+ calcCalendarDataByStandard: () => calcCalendarDataByStandard,
37
+ calcCalendarDataByTimeSlots: () => calcCalendarDataByTimeSlots,
38
+ calcMinTimeMaxTimeBySchedules: () => calcMinTimeMaxTimeBySchedules,
39
+ calcScheduleDateRange: () => calcScheduleDateRange,
40
+ formatScheduleData: () => formatScheduleData,
41
+ formatScheduleResult: () => formatScheduleResult,
42
+ getDaysByStartEnd: () => getDaysByStartEnd,
43
+ isAllDay: () => isAllDay
44
+ });
45
+ module.exports = __toCommonJS(utils_exports);
46
+ var import_dayjs = __toESM(require("dayjs"));
47
+ var calcCalendarDataBySchedule = (values, others, type) => {
48
+ if (type === "time-slots") {
49
+ return calcCalendarDataByTimeSlots(values, others);
50
+ }
51
+ if (type === "designation") {
52
+ return calcCalendarDataByDesignation(values, others);
53
+ }
54
+ return calcCalendarDataByStandard(values, others);
55
+ };
56
+ var getDaysByStartEnd = (startDate, endDate) => {
57
+ let start = (0, import_dayjs.default)(startDate);
58
+ const end = (0, import_dayjs.default)(endDate);
59
+ const daysArray = [];
60
+ while (start.isBefore(end, "day") || start.isSame(end, "day")) {
61
+ daysArray.push(start.format("YYYY-MM-DD"));
62
+ start = start.add(1, "day");
63
+ }
64
+ return daysArray;
65
+ };
66
+ var mergeDateTime = (date, time) => {
67
+ const dateStr = `${(0, import_dayjs.default)(date).format("YYYY-MM-DD")}${time ? (0, import_dayjs.default)(time).format(" HH:MM") : ""}`;
68
+ return (0, import_dayjs.default)(dateStr);
69
+ };
70
+ var getDataRange = ({
71
+ start,
72
+ end,
73
+ type,
74
+ time_slot
75
+ }) => {
76
+ if (type === "time-slots") {
77
+ let dateRange = [];
78
+ const dateStr = getDaysByStartEnd(start, end);
79
+ dateStr.forEach((str) => {
80
+ time_slot == null ? void 0 : time_slot.forEach((time) => {
81
+ dateRange.push({
82
+ start: `${str} ${time.start_time}`,
83
+ end: `${str} ${time.end_time}`
84
+ });
85
+ });
86
+ });
87
+ return dateRange;
88
+ }
89
+ return [
90
+ {
91
+ start: start.format("YYYY-MM-DD HH:mm:ss"),
92
+ end: end.format("YYYY-MM-DD HH:mm:ss")
93
+ }
94
+ ];
95
+ };
96
+ var getDaysByRepeatDay = (params, isGetRange) => {
97
+ const { start, end, deadline, frequency, type, time_slot, excludedDays } = params;
98
+ const scheduleDiff = end.diff(start, "second");
99
+ const excludedDaysMap = new Map(excludedDays.map((day) => [day, true]));
100
+ let startTmp = getMaxStart(start);
101
+ const daysArr = [];
102
+ while (startTmp.isBefore(deadline, "day") || startTmp.isSame(deadline, "day")) {
103
+ const e = startTmp.add(scheduleDiff, "second");
104
+ if (isGetRange) {
105
+ if (excludedDaysMap.has(startTmp.format("YYYY-MM-DD"))) {
106
+ startTmp = startTmp.add(frequency, "day");
107
+ continue;
108
+ }
109
+ const arr = getDataRange({
110
+ start: startTmp,
111
+ end: e,
112
+ type,
113
+ time_slot
114
+ });
115
+ daysArr.push(...arr);
116
+ } else {
117
+ daysArr.push(...getDaysByStartEnd(startTmp, e));
118
+ }
119
+ startTmp = startTmp.add(frequency, "day");
120
+ }
121
+ return Array.from(new Set(daysArr));
122
+ };
123
+ var getDaysByRepeatWeek = (params, isGetRange) => {
124
+ const {
125
+ start,
126
+ end,
127
+ deadline,
128
+ frequency,
129
+ frequency_date,
130
+ type,
131
+ time_slot,
132
+ excludedDays
133
+ } = params;
134
+ const scheduleDiff = end.diff(start, "second");
135
+ const excludedDaysMap = new Map(excludedDays.map((day) => [day, true]));
136
+ let startTmp = getMaxStart(start);
137
+ const daysArr = [];
138
+ while (startTmp.isBefore(deadline, "day") || startTmp.isSame(deadline, "day")) {
139
+ for (let i = 0; i < frequency_date.length; i++) {
140
+ const item = frequency_date[i];
141
+ const _start = startTmp.day(item);
142
+ const _end = _start.add(scheduleDiff, "second");
143
+ if (isGetRange) {
144
+ if (excludedDaysMap.has(_start.format("YYYY-MM-DD"))) {
145
+ startTmp = startTmp.day(1).add(frequency, "week");
146
+ continue;
147
+ }
148
+ const arr = getDataRange({
149
+ start: _start,
150
+ end: _end,
151
+ type,
152
+ time_slot
153
+ });
154
+ daysArr.push(...arr);
155
+ } else {
156
+ daysArr.push(...getDaysByStartEnd(_start, _end));
157
+ }
158
+ }
159
+ startTmp = startTmp.day(1).add(frequency, "week");
160
+ }
161
+ return Array.from(new Set(daysArr));
162
+ };
163
+ var formatDayColor = ({
164
+ days,
165
+ color,
166
+ excludedDays
167
+ }) => {
168
+ const excludedDaysSet = new Set(excludedDays);
169
+ return days.map((item) => ({
170
+ date: item,
171
+ color: [color],
172
+ isExcluded: excludedDaysSet.has(item)
173
+ }));
174
+ };
175
+ var getDaysByStartEndArr = (arr = []) => {
176
+ const daysArr = [];
177
+ arr.forEach((item) => {
178
+ if (item && item.start && item.end) {
179
+ daysArr.push(...getDaysByStartEnd(item.start, item.end));
180
+ }
181
+ });
182
+ return Array.from(new Set(daysArr));
183
+ };
184
+ var processDateRange = ({
185
+ repeat_type,
186
+ start,
187
+ end,
188
+ color,
189
+ endRadio,
190
+ end_date,
191
+ excluded_date,
192
+ included_date,
193
+ frequency,
194
+ excludedStatus,
195
+ includeStatus,
196
+ frequency_date,
197
+ type,
198
+ time_slot
199
+ }, isGetRange) => {
200
+ let days = [];
201
+ const excludedDays = getDaysByStartEndArr(excluded_date);
202
+ const includedDays = getDaysByStartEndArr(included_date);
203
+ if (repeat_type === "0") {
204
+ if (isGetRange) {
205
+ if (type === "time-slots") {
206
+ days = (time_slot == null ? void 0 : time_slot.map((item) => ({
207
+ start: start.format(`YYYY-MM-DD ${item.start_time}`),
208
+ end: end.format(`YYYY-MM-DD ${item.end_time}`)
209
+ }))) || [];
210
+ } else {
211
+ days = [
212
+ {
213
+ start: start.format("YYYY-MM-DD HH:mm:ss"),
214
+ end: end.format("YYYY-MM-DD HH:mm:ss")
215
+ }
216
+ ];
217
+ }
218
+ } else {
219
+ days = getDaysByStartEnd(start, end);
220
+ }
221
+ } else {
222
+ let endDate = (0, import_dayjs.default)(end_date);
223
+ if (endRadio === 1) {
224
+ endDate = isGetRange ? (0, import_dayjs.default)().add(12, "month") : (0, import_dayjs.default)().add(18, "month");
225
+ }
226
+ if (repeat_type === "1") {
227
+ days = getDaysByRepeatDay(
228
+ {
229
+ start,
230
+ end,
231
+ deadline: endDate,
232
+ frequency,
233
+ type,
234
+ time_slot,
235
+ excludedDays
236
+ },
237
+ isGetRange
238
+ );
239
+ } else if (repeat_type === "2") {
240
+ days = getDaysByRepeatWeek(
241
+ {
242
+ start,
243
+ end,
244
+ deadline: endDate,
245
+ frequency,
246
+ frequency_date,
247
+ type,
248
+ time_slot,
249
+ excludedDays
250
+ },
251
+ isGetRange
252
+ );
253
+ }
254
+ }
255
+ if (isGetRange) {
256
+ if (includedDays.length) {
257
+ for (let i = 0; i < includedDays.length; i++) {
258
+ const includedDay = includedDays[i];
259
+ days.push(
260
+ ...getDataRange({
261
+ start: (0, import_dayjs.default)(includedDay),
262
+ end: (0, import_dayjs.default)(includedDay),
263
+ type,
264
+ time_slot
265
+ })
266
+ );
267
+ }
268
+ }
269
+ return days;
270
+ }
271
+ if (includeStatus) {
272
+ days = days.concat(includedDays);
273
+ }
274
+ return formatDayColor({
275
+ days,
276
+ color,
277
+ excludedDays: excludedStatus ? excludedDays : []
278
+ });
279
+ };
280
+ var calcCalendarDataByStandard = (values, others, isGetRange) => {
281
+ const {
282
+ color,
283
+ excluded_date,
284
+ included_date,
285
+ end_date,
286
+ designation,
287
+ repeat_type,
288
+ frequency = 1,
289
+ frequency_date = [],
290
+ time_slot,
291
+ start_time,
292
+ end_time
293
+ } = values;
294
+ const { endRadio, isAllDay: isAllDay2, includeStatus, excludedStatus } = others;
295
+ if (Array.isArray(designation)) {
296
+ return [];
297
+ }
298
+ const start = designation ? mergeDateTime(
299
+ designation.start_date,
300
+ isAllDay2 ? designation.start_time : ""
301
+ ) : (0, import_dayjs.default)(start_time);
302
+ const end = designation ? mergeDateTime(designation.end_date, isAllDay2 ? designation.end_time : "") : (0, import_dayjs.default)(end_time);
303
+ return processDateRange(
304
+ {
305
+ repeat_type,
306
+ start,
307
+ end,
308
+ color,
309
+ endRadio,
310
+ end_date,
311
+ excluded_date,
312
+ excludedStatus,
313
+ frequency,
314
+ frequency_date,
315
+ included_date,
316
+ includeStatus,
317
+ time_slot,
318
+ type: "standard"
319
+ },
320
+ isGetRange
321
+ );
322
+ };
323
+ var getMaxStart = (start_time) => {
324
+ const valueStart = (0, import_dayjs.default)(start_time);
325
+ const currentYearStart = (0, import_dayjs.default)().startOf("year").set("hour", valueStart.get("hour")).set("minute", valueStart.get("minutes")).set("second", valueStart.get("second"));
326
+ const start = valueStart.isBefore(currentYearStart) ? currentYearStart : valueStart;
327
+ return start;
328
+ };
329
+ var calcCalendarDataByTimeSlots = (values, others, isGetRange) => {
330
+ const {
331
+ color,
332
+ excluded_date,
333
+ included_date,
334
+ end_date,
335
+ repeat_type,
336
+ frequency = 1,
337
+ frequency_date = [],
338
+ start_time,
339
+ time_slot
340
+ } = values;
341
+ const { endRadio, excludedStatus, includeStatus } = others;
342
+ if (!start_time)
343
+ return [];
344
+ const start = (0, import_dayjs.default)(start_time);
345
+ const end = (0, import_dayjs.default)(start_time);
346
+ return processDateRange(
347
+ {
348
+ repeat_type,
349
+ start,
350
+ end,
351
+ color,
352
+ endRadio,
353
+ end_date,
354
+ excluded_date,
355
+ excludedStatus,
356
+ frequency,
357
+ frequency_date,
358
+ included_date,
359
+ includeStatus,
360
+ time_slot,
361
+ type: "time-slots"
362
+ },
363
+ isGetRange
364
+ );
365
+ };
366
+ var calcCalendarDataByDesignation = (values, others, isGetRange) => {
367
+ const { designation, color } = values;
368
+ const days = [];
369
+ if (Array.isArray(designation)) {
370
+ designation.forEach((item) => {
371
+ const start = mergeDateTime(item.start_date, item.start_time);
372
+ const end = mergeDateTime(item.end_date, item.end_time);
373
+ if (isGetRange) {
374
+ days.push({
375
+ start: `${item.start_date} ${item.start_time}`,
376
+ end: `${item.end_date} ${item.end_time}`
377
+ });
378
+ } else {
379
+ days.push(...getDaysByStartEnd(start, end));
380
+ }
381
+ });
382
+ }
383
+ if (isGetRange) {
384
+ return days;
385
+ }
386
+ return formatDayColor({
387
+ days,
388
+ color,
389
+ excludedDays: []
390
+ });
391
+ };
392
+ var isAllDay = (value) => {
393
+ return (0, import_dayjs.default)(value.start_time).format("HH:mm:ss") === "00:00:00" && (0, import_dayjs.default)(value.end_time).format("HH:mm:ss") === "23:59:59";
394
+ };
395
+ var repeatTypeMap = {
396
+ none: "0",
397
+ daily: "1",
398
+ weekly: "2"
399
+ };
400
+ var endTypeMap = {
401
+ never: 1,
402
+ date: 2
403
+ };
404
+ var calcCalendarDataByScheduleResult = (schedule) => {
405
+ const { scheduleFormData, scheduleFormOtherValue } = formatScheduleResult(schedule);
406
+ return calcCalendarDataBySchedule(
407
+ scheduleFormData,
408
+ scheduleFormOtherValue,
409
+ schedule.type
410
+ );
411
+ };
412
+ var formatScheduleResult = (schedule) => {
413
+ const {
414
+ color,
415
+ name,
416
+ repeat_type,
417
+ designation,
418
+ repeat_rule,
419
+ start_time,
420
+ end_time,
421
+ is_all,
422
+ type,
423
+ time_slot
424
+ } = schedule;
425
+ const { frequency, end, frequency_date, included_date, excluded_date } = repeat_rule || {};
426
+ return {
427
+ scheduleFormData: {
428
+ color,
429
+ name,
430
+ repeat_type: repeatTypeMap[repeat_type],
431
+ designation,
432
+ frequency,
433
+ frequency_date,
434
+ end_time,
435
+ start_time,
436
+ excluded_date,
437
+ included_date,
438
+ time_slot,
439
+ end_date: end == null ? void 0 : end.end_date
440
+ },
441
+ scheduleFormOtherValue: {
442
+ endRadio: endTypeMap[(end == null ? void 0 : end.type) || "never"],
443
+ isAllDay: !!is_all,
444
+ type,
445
+ excludedStatus: !!(excluded_date == null ? void 0 : excluded_date.length),
446
+ includeStatus: !!(included_date == null ? void 0 : included_date.length)
447
+ }
448
+ };
449
+ };
450
+ var calcScheduleDateRange = (schedule) => {
451
+ const { scheduleFormData, scheduleFormOtherValue } = formatScheduleResult(schedule);
452
+ if (schedule.type === "time-slots") {
453
+ return calcCalendarDataByTimeSlots(
454
+ scheduleFormData,
455
+ scheduleFormOtherValue,
456
+ true
457
+ );
458
+ }
459
+ if (schedule.type === "designation") {
460
+ return calcCalendarDataByDesignation(
461
+ scheduleFormData,
462
+ scheduleFormOtherValue,
463
+ true
464
+ );
465
+ }
466
+ return calcCalendarDataByStandard(
467
+ scheduleFormData,
468
+ scheduleFormOtherValue,
469
+ true
470
+ );
471
+ };
472
+ var calcCalendarDataBySchedules = (schedules) => {
473
+ const allSchedules = [];
474
+ schedules.forEach((item) => {
475
+ allSchedules.push(...calcCalendarDataByScheduleResult(item));
476
+ });
477
+ const dateMap = allSchedules.reduce((pre, cur) => {
478
+ var _a, _b;
479
+ return {
480
+ ...pre,
481
+ [cur.date]: {
482
+ ...cur,
483
+ color: [...((_a = pre[cur.date]) == null ? void 0 : _a.color) || [], ...cur.color],
484
+ isExcluded: ((_b = pre[cur.date]) == null ? void 0 : _b.isExcluded) || cur.isExcluded
485
+ }
486
+ };
487
+ }, {});
488
+ return Object.values(dateMap);
489
+ };
490
+ var calcMinTimeMaxTimeBySchedules = (schedules, scheduleAllMap, selectDate) => {
491
+ return schedules.reduce((pre, cur) => {
492
+ var _a;
493
+ let dateRange = ((_a = scheduleAllMap[cur.id]) == null ? void 0 : _a.dateRange) || calcScheduleDateRange(cur);
494
+ let dateRangeFormat = [];
495
+ if (selectDate) {
496
+ const dateRangeTmp = [];
497
+ const dateRangeFormatTmp = [];
498
+ for (let i = 0; i < dateRange.length; i++) {
499
+ const range = dateRange[i];
500
+ const start = (0, import_dayjs.default)(range.start);
501
+ const end = (0, import_dayjs.default)(range.end);
502
+ const isSameStart = range.start.includes(selectDate);
503
+ const isSameEnd = range.end.includes(selectDate);
504
+ if (isSameStart || isSameEnd) {
505
+ dateRangeTmp.push(range);
506
+ if (isSameStart && !isSameEnd) {
507
+ dateRangeFormatTmp.push({
508
+ start: range.start,
509
+ end: end.format("YYYY-MM-DD 23:59:59")
510
+ });
511
+ } else if (!isSameStart && isSameEnd) {
512
+ dateRangeFormatTmp.push({
513
+ start: start.format("YYYY-MM-DD 00:00:00"),
514
+ end: range.end
515
+ });
516
+ } else {
517
+ dateRangeFormatTmp.push(range);
518
+ }
519
+ }
520
+ }
521
+ dateRange = dateRangeTmp;
522
+ dateRangeFormat = dateRangeFormatTmp;
523
+ }
524
+ let minTime = null;
525
+ let maxTime = null;
526
+ if (dateRange.length) {
527
+ minTime = (0, import_dayjs.default)(dateRange[0].start);
528
+ maxTime = (0, import_dayjs.default)(dateRange[dateRange.length - 1].end);
529
+ }
530
+ return {
531
+ ...pre,
532
+ [cur.id]: {
533
+ minTime,
534
+ maxTime,
535
+ minTimeStr: (minTime == null ? void 0 : minTime.format("YYYY-MM-DD HH:mm:ss")) || null,
536
+ maxTimeStr: (maxTime == null ? void 0 : maxTime.format("YYYY-MM-DD HH:mm:ss")) || null,
537
+ dateRange,
538
+ dateRangeFormat
539
+ }
540
+ };
541
+ }, {});
542
+ };
543
+ var formatScheduleData = (relation, table_type, item_type, isExcluded) => {
544
+ const _relation = relation || [];
545
+ if (table_type && item_type && isExcluded) {
546
+ return _relation.find((item) => (item == null ? void 0 : item.relation_table_type) === table_type && (item == null ? void 0 : item.item_type) !== item_type);
547
+ }
548
+ if (table_type && item_type) {
549
+ return _relation.find((item) => (item == null ? void 0 : item.relation_table_type) === table_type && (item == null ? void 0 : item.item_type) === item_type);
550
+ }
551
+ if (table_type) {
552
+ return _relation.some((item) => (item == null ? void 0 : item.relation_table_type) === table_type);
553
+ }
554
+ if (item_type) {
555
+ return _relation.find((item) => (item == null ? void 0 : item.item_type) === item_type);
556
+ }
557
+ };
558
+ // Annotate the CommonJS export names for ESM import in node:
559
+ 0 && (module.exports = {
560
+ calcCalendarDataByDesignation,
561
+ calcCalendarDataBySchedule,
562
+ calcCalendarDataByScheduleResult,
563
+ calcCalendarDataBySchedules,
564
+ calcCalendarDataByStandard,
565
+ calcCalendarDataByTimeSlots,
566
+ calcMinTimeMaxTimeBySchedules,
567
+ calcScheduleDateRange,
568
+ formatScheduleData,
569
+ formatScheduleResult,
570
+ getDaysByStartEnd,
571
+ isAllDay
572
+ });
@@ -1,3 +1,12 @@
1
1
  export * from './Product';
2
2
  export * from './ProductList';
3
3
  export * from './Cart';
4
+ export * from './Account';
5
+ export * from './AccountList';
6
+ export * from './Date';
7
+ export * from './Guests';
8
+ export * from './Order';
9
+ export * from './Payment';
10
+ export * from './Resource';
11
+ export * from './Step';
12
+ export * from './Summary';
@@ -19,9 +19,27 @@ module.exports = __toCommonJS(modules_exports);
19
19
  __reExport(modules_exports, require("./Product"), module.exports);
20
20
  __reExport(modules_exports, require("./ProductList"), module.exports);
21
21
  __reExport(modules_exports, require("./Cart"), module.exports);
22
+ __reExport(modules_exports, require("./Account"), module.exports);
23
+ __reExport(modules_exports, require("./AccountList"), module.exports);
24
+ __reExport(modules_exports, require("./Date"), module.exports);
25
+ __reExport(modules_exports, require("./Guests"), module.exports);
26
+ __reExport(modules_exports, require("./Order"), module.exports);
27
+ __reExport(modules_exports, require("./Payment"), module.exports);
28
+ __reExport(modules_exports, require("./Resource"), module.exports);
29
+ __reExport(modules_exports, require("./Step"), module.exports);
30
+ __reExport(modules_exports, require("./Summary"), module.exports);
22
31
  // Annotate the CommonJS export names for ESM import in node:
23
32
  0 && (module.exports = {
24
33
  ...require("./Product"),
25
34
  ...require("./ProductList"),
26
- ...require("./Cart")
35
+ ...require("./Cart"),
36
+ ...require("./Account"),
37
+ ...require("./AccountList"),
38
+ ...require("./Date"),
39
+ ...require("./Guests"),
40
+ ...require("./Order"),
41
+ ...require("./Payment"),
42
+ ...require("./Resource"),
43
+ ...require("./Step"),
44
+ ...require("./Summary")
27
45
  });
@@ -5,7 +5,7 @@ import { BookingByStepState } from "./types";
5
5
  import { CartItem, IUpdateItemParams, ProductData } from "../../modules";
6
6
  import { Account } from "../../modules/Account/types";
7
7
  import { IStep } from "../../modules/Step/tyeps";
8
- import { TimeSliceItem } from "./utils/resources";
8
+ import { TimeSliceItem, ResourceItem } from "./utils/resources";
9
9
  import { ITime } from "../../modules/Date/types";
10
10
  export declare class BookingByStepImpl extends BaseModule implements Module {
11
11
  protected defaultName: string;
@@ -27,10 +27,17 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
27
27
  back(): void;
28
28
  gotoStep(index: number): void;
29
29
  getStepList(): IStep[];
30
- loadProducts({ category_ids, product_ids, collection, }: {
30
+ loadProducts({ category_ids, product_ids, collection, schedule_ids }: {
31
31
  category_ids?: number[];
32
32
  product_ids?: number[];
33
33
  collection?: number | string[];
34
+ schedule_ids?: number[];
35
+ }): Promise<any>;
36
+ loadAllSchedule(): Promise<void>;
37
+ loadAvailableDate({ startDate, endDate, custom_page_id }: {
38
+ startDate: string;
39
+ endDate: string;
40
+ custom_page_id?: number;
34
41
  }): Promise<any>;
35
42
  storeProduct(productData: ProductData): Promise<void>;
36
43
  addAccount(accounts: Account[]): Promise<void>;
@@ -87,8 +94,8 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
87
94
  id: number | undefined;
88
95
  _id: string;
89
96
  product: ProductData | undefined;
90
- resources: import("./utils/resources").ResourceItem[];
91
- holder_id: string | number | undefined;
97
+ resources: ResourceItem[];
98
+ holder_id: string | number;
92
99
  holder_name: string | undefined;
93
100
  } | undefined;
94
101
  getResourceTimeSlot({ product, resources, currentResourceId, }: {
@@ -107,11 +114,12 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
107
114
  timeSlots: any[];
108
115
  selectedResource: any;
109
116
  } | undefined;
110
- autoSelectAccountResources({ holder_id, resources_code, timeSlots, countMap, }: {
117
+ autoSelectAccountResources({ holder_id, resources_code, timeSlots, countMap, capacity }: {
111
118
  holder_id: string;
112
119
  resources_code: string | number;
113
120
  timeSlots?: TimeSliceItem;
114
121
  countMap: Record<number, number>;
122
+ capacity?: number;
115
123
  }): {
116
124
  selectedResource: any;
117
125
  timeSlots?: undefined;
@@ -126,4 +134,5 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
126
134
  submitTimeSlot(timeSlots: TimeSliceItem): void;
127
135
  clearCache(): void;
128
136
  clearCacheByModule(module: string): void;
137
+ openProductDetail(productId: number): Promise<void>;
129
138
  }