@pisell/private-materials 3.0.163 → 3.0.164

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 (128) 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 +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/addons/model.d.ts +2 -1
  12. package/es/components/booking/components/footer/index.js +34 -5
  13. package/es/components/booking/dashboard/index.d.ts +20 -0
  14. package/es/components/booking/dashboard/index.js +298 -0
  15. package/es/components/booking/dashboard/serve.d.ts +1 -0
  16. package/es/components/booking/dashboard/serve.js +27 -0
  17. package/es/components/booking/forms/forms.d.ts +1 -0
  18. package/es/components/booking/forms/forms.js +4 -2
  19. package/es/components/booking/forms/model.d.ts +2 -1
  20. package/es/components/booking/forms/single/index.d.ts +1 -1
  21. package/es/components/booking/forms/single/index.js +4 -3
  22. package/es/components/booking/hooks/useClearCart.d.ts +3 -0
  23. package/es/components/booking/hooks/useClearCart.js +27 -0
  24. package/es/components/booking/hooks/useCreateBookingPageHeader.d.ts +6 -0
  25. package/es/components/booking/hooks/useCreateBookingPageHeader.js +21 -0
  26. package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
  27. package/es/components/booking/info/addServiceVariant/index.js +42 -0
  28. package/es/components/booking/info/client/index.js +1 -1
  29. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  30. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +4 -2
  31. package/es/components/booking/info/clientVariant/vertical/index.js +6 -5
  32. package/es/components/booking/info/clientVariant/vertical/index.less +8 -0
  33. package/es/components/booking/info/index.less +19 -0
  34. package/es/components/booking/info/main.js +11 -5
  35. package/es/components/booking/info/pet/index.js +1 -1
  36. package/es/components/booking/info/service/addService/index.d.ts +9 -3
  37. package/es/components/booking/info/service/addService/index.js +82 -36
  38. package/es/components/booking/info/service/addService/index.less +27 -1
  39. package/es/components/booking/info/service/editService/index.js +11 -13
  40. package/es/components/booking/info/service/index.js +5 -2
  41. package/es/components/booking/info/service/index.less +18 -0
  42. package/es/components/booking/info/service/serviceItem/index.d.ts +3 -3
  43. package/es/components/booking/info/service/serviceItem/index.js +22 -8
  44. package/es/components/booking/info/service/serviceItem/index.less +8 -0
  45. package/es/components/booking/info/service/serviceList/index.js +20 -1
  46. package/es/components/booking/info2/index.js +9 -3
  47. package/es/components/booking/info2/service/addService/index.d.ts +8 -2
  48. package/es/components/booking/info2/service/addService/index.js +82 -36
  49. package/es/components/booking/info2/service/addTimeModal/index.js +1 -0
  50. package/es/components/booking/info2/service/editService/index.js +11 -4
  51. package/es/components/booking/info2/service/index.js +5 -2
  52. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -1
  53. package/es/components/booking/info2/service/serviceItem/index.js +16 -3
  54. package/es/components/booking/info2/service/serviceList/index.js +20 -1
  55. package/es/components/booking/info2/utilsByBooking.js +6 -2
  56. package/es/components/booking/locales.d.ts +60 -0
  57. package/es/components/booking/locales.js +63 -3
  58. package/es/components/booking/model.d.ts +2 -0
  59. package/es/components/booking/notes/index.d.ts +1 -1
  60. package/es/components/booking/notes/model.d.ts +2 -1
  61. package/es/components/booking/payments/model.d.ts +2 -1
  62. package/es/components/booking/utils.d.ts +1 -1
  63. package/es/components/booking/utils.js +54 -51
  64. package/es/components/schedules/index.d.ts +1 -1
  65. package/es/components/schedules/model.d.ts +2 -1
  66. package/es/index.d.ts +2 -0
  67. package/es/index.js +3 -1
  68. package/lib/components/booking/addons/model.d.ts +2 -1
  69. package/lib/components/booking/components/footer/index.js +30 -5
  70. package/lib/components/booking/dashboard/index.d.ts +20 -0
  71. package/lib/components/booking/dashboard/index.js +279 -0
  72. package/lib/components/booking/dashboard/serve.d.ts +1 -0
  73. package/lib/components/booking/dashboard/serve.js +33 -0
  74. package/lib/components/booking/forms/forms.d.ts +1 -0
  75. package/lib/components/booking/forms/forms.js +5 -2
  76. package/lib/components/booking/forms/model.d.ts +2 -1
  77. package/lib/components/booking/forms/single/index.d.ts +1 -1
  78. package/lib/components/booking/forms/single/index.js +4 -2
  79. package/lib/components/booking/hooks/useClearCart.d.ts +3 -0
  80. package/lib/components/booking/hooks/useClearCart.js +62 -0
  81. package/lib/components/booking/hooks/useCreateBookingPageHeader.d.ts +6 -0
  82. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +53 -0
  83. package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
  84. package/lib/components/booking/info/addServiceVariant/index.js +70 -0
  85. package/lib/components/booking/info/client/index.js +1 -1
  86. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +1 -0
  87. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +4 -2
  88. package/lib/components/booking/info/clientVariant/vertical/index.js +88 -76
  89. package/lib/components/booking/info/clientVariant/vertical/index.less +8 -0
  90. package/lib/components/booking/info/index.less +19 -0
  91. package/lib/components/booking/info/main.js +9 -3
  92. package/lib/components/booking/info/pet/index.js +2 -1
  93. package/lib/components/booking/info/service/addService/index.d.ts +9 -3
  94. package/lib/components/booking/info/service/addService/index.js +66 -29
  95. package/lib/components/booking/info/service/addService/index.less +27 -1
  96. package/lib/components/booking/info/service/editService/index.js +9 -6
  97. package/lib/components/booking/info/service/index.js +4 -2
  98. package/lib/components/booking/info/service/index.less +18 -0
  99. package/lib/components/booking/info/service/serviceItem/index.d.ts +3 -3
  100. package/lib/components/booking/info/service/serviceItem/index.js +15 -1
  101. package/lib/components/booking/info/service/serviceItem/index.less +8 -0
  102. package/lib/components/booking/info/service/serviceList/index.js +18 -1
  103. package/lib/components/booking/info2/index.js +8 -2
  104. package/lib/components/booking/info2/service/addService/index.d.ts +8 -2
  105. package/lib/components/booking/info2/service/addService/index.js +66 -29
  106. package/lib/components/booking/info2/service/addTimeModal/index.js +1 -0
  107. package/lib/components/booking/info2/service/editService/index.js +7 -1
  108. package/lib/components/booking/info2/service/index.js +4 -2
  109. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -1
  110. package/lib/components/booking/info2/service/serviceItem/index.js +14 -1
  111. package/lib/components/booking/info2/service/serviceList/index.js +18 -1
  112. package/lib/components/booking/info2/utilsByBooking.js +5 -1
  113. package/lib/components/booking/locales.d.ts +60 -0
  114. package/lib/components/booking/locales.js +63 -3
  115. package/lib/components/booking/model.d.ts +2 -0
  116. package/lib/components/booking/notes/index.d.ts +1 -1
  117. package/lib/components/booking/notes/model.d.ts +2 -1
  118. package/lib/components/booking/payments/model.d.ts +2 -1
  119. package/lib/components/booking/utils.d.ts +1 -1
  120. package/lib/components/booking/utils.js +57 -22
  121. package/lib/components/schedules/index.d.ts +1 -1
  122. package/lib/components/schedules/model.d.ts +2 -1
  123. package/lib/index.d.ts +2 -0
  124. package/lib/index.js +6 -0
  125. package/lowcode/booking-dashboard/meta.ts +137 -0
  126. package/lowcode/booking-vertical-add-service/meta.ts +124 -0
  127. package/lowcode/vertical-add-service/meta.ts +71 -0
  128. package/package.json +3 -3
@@ -196,6 +196,26 @@ declare const _default: {
196
196
  'page.booking.text.please-choose-an-option-2': string;
197
197
  'page.booking.text.resource.min-length-error': (x: number, y: string) => string;
198
198
  'page.booking.text.price-extra': (origin: string, current: string) => string;
199
+ 'pisell2.booking.dashboard.groups-on-site-now': string;
200
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': string;
201
+ 'pisell2.booking.dashboard.people-on-site-now': string;
202
+ 'pisell2.booking.dashboard.people-on-site-now-tip': string;
203
+ 'pisell2.booking.dashboard.total-visitors-today': string;
204
+ 'pisell2.booking.dashboard.total-visitors-today-tip': string;
205
+ 'pisell2.booking.dashboard.ongoing-visitors': string;
206
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': string;
207
+ 'pisell2.booking.dashboard.upcoming-visitors': string;
208
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': string;
209
+ 'pisell2.booking.dashboard.overdue-visitors': string;
210
+ 'pisell2.booking.dashboard.overdue-visitors-tip': string;
211
+ 'pisell2.booking.dashboard.completed-visitors': string;
212
+ 'pisell2.booking.dashboard.completed-visitors-tip': string;
213
+ 'pisell2.booking.dashboard.departed-visitors': string;
214
+ 'pisell2.booking.dashboard.departed-visitors-tip': string;
215
+ 'pisell2.booking.dashboard.default': string;
216
+ 'pisell2.booking.info.text.clear-cart': string;
217
+ 'pisell2.booking.info.text.clear-all': string;
218
+ 'pisell2.booking.info.text.create-new': string;
199
219
  };
200
220
  'zh-CN': {
201
221
  'pisell2.text.refunded-amount': string;
@@ -394,6 +414,26 @@ declare const _default: {
394
414
  'page.booking.text.please-choose-an-option-2': string;
395
415
  'page.booking.text.resource.min-length-error': (x: number, y: string) => string;
396
416
  'page.booking.text.price-extra': (origin: string, current: string) => string;
417
+ 'pisell2.booking.dashboard.groups-on-site-now': string;
418
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': string;
419
+ 'pisell2.booking.dashboard.people-on-site-now': string;
420
+ 'pisell2.booking.dashboard.people-on-site-now-tip': string;
421
+ 'pisell2.booking.dashboard.total-visitors-today': string;
422
+ 'pisell2.booking.dashboard.total-visitors-today-tip': string;
423
+ 'pisell2.booking.dashboard.ongoing-visitors': string;
424
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': string;
425
+ 'pisell2.booking.dashboard.upcoming-visitors': string;
426
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': string;
427
+ 'pisell2.booking.dashboard.overdue-visitors': string;
428
+ 'pisell2.booking.dashboard.overdue-visitors-tip': string;
429
+ 'pisell2.booking.dashboard.completed-visitors': string;
430
+ 'pisell2.booking.dashboard.completed-visitors-tip': string;
431
+ 'pisell2.booking.dashboard.departed-visitors': string;
432
+ 'pisell2.booking.dashboard.departed-visitors-tip': string;
433
+ 'pisell2.booking.dashboard.default': string;
434
+ 'pisell2.booking.info.text.clear-cart': string;
435
+ 'pisell2.booking.info.text.clear-all': string;
436
+ 'pisell2.booking.info.text.create-new': string;
397
437
  };
398
438
  'zh-HK': {
399
439
  'pisell2.text.refunded-amount': string;
@@ -592,6 +632,26 @@ declare const _default: {
592
632
  'page.booking.text.please-choose-an-option-2': string;
593
633
  'page.booking.text.resource.min-length-error': (x: number, y: string) => string;
594
634
  'page.booking.text.price-extra': (origin: string, current: string) => string;
635
+ 'pisell2.booking.dashboard.groups-on-site-now': string;
636
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': string;
637
+ 'pisell2.booking.dashboard.people-on-site-now': string;
638
+ 'pisell2.booking.dashboard.people-on-site-now-tip': string;
639
+ 'pisell2.booking.dashboard.total-visitors-today': string;
640
+ 'pisell2.booking.dashboard.total-visitors-today-tip': string;
641
+ 'pisell2.booking.dashboard.ongoing-visitors': string;
642
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': string;
643
+ 'pisell2.booking.dashboard.upcoming-visitors': string;
644
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': string;
645
+ 'pisell2.booking.dashboard.overdue-visitors': string;
646
+ 'pisell2.booking.dashboard.overdue-visitors-tip': string;
647
+ 'pisell2.booking.dashboard.completed-visitors': string;
648
+ 'pisell2.booking.dashboard.completed-visitors-tip': string;
649
+ 'pisell2.booking.dashboard.departed-visitors': string;
650
+ 'pisell2.booking.dashboard.departed-visitors-tip': string;
651
+ 'pisell2.booking.dashboard.default': string;
652
+ 'pisell2.booking.info.text.clear-cart': string;
653
+ 'pisell2.booking.info.text.clear-all': string;
654
+ 'pisell2.booking.info.text.create-new': string;
595
655
  };
596
656
  };
597
657
  export default _default;
@@ -228,7 +228,27 @@ export default {
228
228
  },
229
229
  'page.booking.text.price-extra': function pageBookingTextPriceExtra(origin, current) {
230
230
  return "Original price of the item:".concat(origin, ",Current price of the item:").concat(current);
231
- }
231
+ },
232
+ 'pisell2.booking.dashboard.groups-on-site-now': "Groups on-site now",
233
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': "Tip: Total number of groups who have checked in and are currently on-site",
234
+ 'pisell2.booking.dashboard.people-on-site-now': "People on-site now",
235
+ 'pisell2.booking.dashboard.people-on-site-now-tip': "Tip: Total number of people who have checked in and are currently on-site",
236
+ 'pisell2.booking.dashboard.total-visitors-today': "Total visitors today",
237
+ 'pisell2.booking.dashboard.total-visitors-today-tip': "Tip: Total number of visitors today, regardless of check-in status",
238
+ 'pisell2.booking.dashboard.ongoing-visitors': "Ongoing visitors",
239
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': "Tip: Total number of visitors who have passed the start time, regardless of check-in status",
240
+ 'pisell2.booking.dashboard.upcoming-visitors': "Upcoming visitors",
241
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': "Tip: Total number of visitors expected to arrive in the near future",
242
+ 'pisell2.booking.dashboard.overdue-visitors': "Overdue visitors",
243
+ 'pisell2.booking.dashboard.overdue-visitors-tip': "Tip: Total number of visitors whose playtime has expired but have not yet left the venue",
244
+ 'pisell2.booking.dashboard.completed-visitors': "Completed visitors",
245
+ 'pisell2.booking.dashboard.completed-visitors-tip': "Tip: Total number of visitors whose playtime has ended, regardless of whether they have left the venue",
246
+ 'pisell2.booking.dashboard.departed-visitors': "Departed visitors",
247
+ 'pisell2.booking.dashboard.departed-visitors-tip': "Tip: Total number of visitors who checked in and have left the venue today",
248
+ 'pisell2.booking.dashboard.default': "Default",
249
+ 'pisell2.booking.info.text.clear-cart': "Clear cart",
250
+ 'pisell2.booking.info.text.clear-all': "Clear all",
251
+ 'pisell2.booking.info.text.create-new': "Create new"
232
252
  },
233
253
  'zh-CN': {
234
254
  'pisell2.text.refunded-amount': '已退金额',
@@ -463,7 +483,27 @@ export default {
463
483
  },
464
484
  'page.booking.text.price-extra': function pageBookingTextPriceExtra(origin, current) {
465
485
  return "\u5546\u54C1\u539F\u4EF7:".concat(origin, ",\u5546\u54C1\u73B0\u4EF7:").concat(current);
466
- }
486
+ },
487
+ 'pisell2.booking.dashboard.groups-on-site-now': "当前在场团体",
488
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': "提示:已检票并在场内的团体总数",
489
+ 'pisell2.booking.dashboard.people-on-site-now': "当前在场人数",
490
+ 'pisell2.booking.dashboard.people-on-site-now-tip': "提示:已检票并在场内的总人数",
491
+ 'pisell2.booking.dashboard.total-visitors-today': "今日游客总数",
492
+ 'pisell2.booking.dashboard.total-visitors-today-tip': "提示:今日的游客总人数,无论是否检票入场",
493
+ 'pisell2.booking.dashboard.ongoing-visitors': "进行中的游客",
494
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': "提示:已过开始时间的游客总数,无论是否检票",
495
+ 'pisell2.booking.dashboard.upcoming-visitors': "即将到达的游客",
496
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': "提示:预计将在未来到场的游客总人数",
497
+ 'pisell2.booking.dashboard.overdue-visitors': "超时的游客",
498
+ 'pisell2.booking.dashboard.overdue-visitors-tip': "提示:游玩时间已过,但尚未离场的游客总人数",
499
+ 'pisell2.booking.dashboard.completed-visitors': "已完成的游客",
500
+ 'pisell2.booking.dashboard.completed-visitors-tip': "提示:游玩时长已结束的游客总人数,无论是否离场",
501
+ 'pisell2.booking.dashboard.departed-visitors': "已离场的游客",
502
+ 'pisell2.booking.dashboard.departed-visitors-tip': "提示:今日已检票并离场的游客总人数",
503
+ 'pisell2.booking.dashboard.default': "默认",
504
+ 'pisell2.booking.info.text.clear-cart': "清空购物车",
505
+ 'pisell2.booking.info.text.clear-all': "清空",
506
+ 'pisell2.booking.info.text.create-new': "新建"
467
507
  },
468
508
  'zh-HK': {
469
509
  'pisell2.text.refunded-amount': '已退金額',
@@ -698,6 +738,26 @@ export default {
698
738
  },
699
739
  'page.booking.text.price-extra': function pageBookingTextPriceExtra(origin, current) {
700
740
  return "\u5546\u54C1\u539F\u50F9:".concat(origin, ",\u5546\u54C1\u73FE\u50F9:").concat(current);
701
- }
741
+ },
742
+ 'pisell2.booking.dashboard.groups-on-site-now': "當前在場團體",
743
+ 'pisell2.booking.dashboard.groups-on-site-now-tip': "提示:已檢票並在場內的團體總數",
744
+ 'pisell2.booking.dashboard.people-on-site-now': "當前在場人數",
745
+ 'pisell2.booking.dashboard.people-on-site-now-tip': "提示:已檢票並在場內的總人數",
746
+ 'pisell2.booking.dashboard.total-visitors-today': "今日遊客總數",
747
+ 'pisell2.booking.dashboard.total-visitors-today-tip': "提示:今日的遊客總人數,無論是否檢票入場",
748
+ 'pisell2.booking.dashboard.ongoing-visitors': "進行中的遊客",
749
+ 'pisell2.booking.dashboard.ongoing-visitors-tip': "提示:已過開始時間的遊客總數,無論是否檢票",
750
+ 'pisell2.booking.dashboard.upcoming-visitors': "即將到達的遊客",
751
+ 'pisell2.booking.dashboard.upcoming-visitors-tip': "提示:預計將在未來到場的遊客總人數",
752
+ 'pisell2.booking.dashboard.overdue-visitors': "超時的遊客",
753
+ 'pisell2.booking.dashboard.overdue-visitors-tip': "提示:遊玩時間已過,但尚未離場的遊客總人數",
754
+ 'pisell2.booking.dashboard.completed-visitors': "已完成的遊客",
755
+ 'pisell2.booking.dashboard.completed-visitors-tip': "提示:遊玩時長已結束的遊客總人數,無論是否離場",
756
+ 'pisell2.booking.dashboard.departed-visitors': "已離場的遊客",
757
+ 'pisell2.booking.dashboard.departed-visitors-tip': "提示:今日已檢票並離場的遊客總人數",
758
+ 'pisell2.booking.dashboard.default': "默认",
759
+ 'pisell2.booking.info.text.clear-cart': "清空購物車",
760
+ 'pisell2.booking.info.text.clear-all': "清空",
761
+ 'pisell2.booking.info.text.create-new': "新建"
702
762
  }
703
763
  };
@@ -93,6 +93,8 @@ export interface FormState {
93
93
  disableEventBookingEdit?: boolean;
94
94
  /** 关闭自动打开选择服务弹窗 */
95
95
  closeAutoOpenService?: boolean;
96
+ /** 是否terminal创建booking页面 */
97
+ isBookingCreatePage?: boolean;
96
98
  loading: boolean;
97
99
  }
98
100
  export declare const walkInData: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: any;
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: {
@@ -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: {
@@ -62,7 +62,7 @@ export declare const getServeStartTime: (start_time: string) => string;
62
62
  * @Date: 2024-04-26 14:04
63
63
  */
64
64
  export declare const getServiceTime: (item: any, currentDate: any) => string;
65
- export declare const findNextSlice: ({ timeSlices, index, date }: {
65
+ export declare const findNextSlice: ({ timeSlices, index, date, }: {
66
66
  timeSlices: any[];
67
67
  index?: number | undefined;
68
68
  date?: string | undefined;
@@ -14,7 +14,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
16
  import dayjs from 'dayjs';
17
- import { locales } from "@pisell/utils";
17
+ import { locales } from '@pisell/utils';
18
18
  import { intersectionBy } from 'lodash';
19
19
  var Request = /*#__PURE__*/function () {
20
20
  function Request() {
@@ -38,7 +38,7 @@ export var request = new Request();
38
38
 
39
39
  /**
40
40
  * @title: 格式化持续时长用于展示
41
- * @description:
41
+ * @description:
42
42
  * @param {number} service_times
43
43
  * @return {*}
44
44
  * @Author: zhiwei.Wang
@@ -46,12 +46,12 @@ export var request = new Request();
46
46
  */
47
47
  export var getDiscountTime = function getDiscountTime(service_times) {
48
48
  if (!service_times) {
49
- return "";
49
+ return '';
50
50
  }
51
51
  if (service_times < 60) {
52
52
  return "".concat(service_times, " ").concat(locales.getText('pisell2.text.min'));
53
53
  } else {
54
- var str = "";
54
+ var str = '';
55
55
  var hours = Math.floor(service_times / 60);
56
56
  var minutes = service_times % 60;
57
57
  str += "".concat(hours).concat(locales.getText('pisell2.text.h'));
@@ -64,7 +64,7 @@ export var getDiscountTime = function getDiscountTime(service_times) {
64
64
 
65
65
  /**
66
66
  * @title: 时间切片
67
- * @description:
67
+ * @description:
68
68
  * @param {any} config
69
69
  * @param {string} locale
70
70
  * @return {*}
@@ -75,22 +75,22 @@ export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, lo
75
75
  var _locale = locale;
76
76
  var dayjsLocale = _locale === 'en-US' || _locale === 'en' ? 'en' : 'zh-cn';
77
77
  dayjs.locale(dayjsLocale);
78
- var startTime = dayjs().startOf("day");
79
- var endTime = dayjs().endOf("day");
78
+ var startTime = dayjs().startOf('day');
79
+ var endTime = dayjs().endOf('day');
80
80
  var timeSlice = (config === null || config === void 0 ? void 0 : config.value) || 5; // 切片时间间隔(分钟)
81
81
 
82
82
  var timeSlices = [];
83
83
  var durationSlicesBasedOnTime = [];
84
84
  var currentTime = startTime;
85
85
  while (currentTime.isBefore(endTime)) {
86
- var timeLabel = currentTime.format("hh:mm A");
87
- var timeValue = currentTime.format("HH:mm");
86
+ var timeLabel = currentTime.format('hh:mm A');
87
+ var timeValue = currentTime.format('HH:mm');
88
88
  timeSlices.push({
89
89
  label: timeLabel,
90
90
  value: timeValue
91
91
  });
92
- var nextTime = currentTime.add(timeSlice, "minute");
93
- var durationValue = nextTime.diff(startTime, "minute");
92
+ var nextTime = currentTime.add(timeSlice, 'minute');
93
+ var durationValue = nextTime.diff(startTime, 'minute');
94
94
  if (durationValue > 60) {
95
95
  var durationLabel = getDiscountTime(durationValue);
96
96
  durationSlicesBasedOnTime.push({
@@ -114,7 +114,7 @@ export var sliceDayIntoFiveMinutes = function sliceDayIntoFiveMinutes(config, lo
114
114
 
115
115
  // 获取当前时间
116
116
  export var getNowTime = function getNowTime() {
117
- return dayjs().format("HH:mm");
117
+ return dayjs().format('HH:mm');
118
118
  };
119
119
  export var isNowTime = function isNowTime(time) {
120
120
  return time === 'now';
@@ -122,7 +122,7 @@ export var isNowTime = function isNowTime(time) {
122
122
 
123
123
  /**
124
124
  * @title: 获取服务的开始时间, 如果是now 转换为当前的时间
125
- * @description:
125
+ * @description:
126
126
  * @param {string} start_time
127
127
  * @return {*}
128
128
  * @Author: zhiwei.Wang
@@ -137,7 +137,7 @@ export var getServeStartTime = function getServeStartTime(start_time) {
137
137
 
138
138
  /**
139
139
  * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
140
- * @description:
140
+ * @description:
141
141
  * @param {any} item
142
142
  * @param {any} currentDate
143
143
  * @return {*}
@@ -146,8 +146,8 @@ export var getServeStartTime = function getServeStartTime(start_time) {
146
146
  */
147
147
  export var getServiceTime = function getServiceTime(item, currentDate) {
148
148
  var startDate = dayjs(currentDate.format('YYYY-MM-DD') + ' ' + getServeStartTime(item._extend.start_time));
149
- var startTime = startDate.format("HH:mm");
150
- var endTime = startDate.add(flexibleObj.getValue(item._extend.duration), "minute").format("HH:mm");
149
+ var startTime = startDate.format('HH:mm');
150
+ var endTime = startDate.add(flexibleObj.getValue(item._extend.duration), 'minute').format('HH:mm');
151
151
  var duration = getDiscountTime(flexibleObj.getValue(item._extend.duration));
152
152
  return "".concat(startTime, " - ").concat(endTime, " ( ").concat(duration, " )");
153
153
  };
@@ -203,17 +203,17 @@ export var formatProductListByCategory = function formatProductListByCategory(li
203
203
  });
204
204
  }
205
205
  } else {
206
- if (!categoryObject["other"]) {
207
- categoryObject["other"] = {
206
+ if (!categoryObject['other']) {
207
+ categoryObject['other'] = {
208
208
  id: 0,
209
209
  title: locales.getText('pisell2.text.other'),
210
210
  name: locales.getText('pisell2.text.other'),
211
- cover: "",
211
+ cover: '',
212
212
  products: []
213
213
  };
214
214
  }
215
- categoryObject["other"] = _objectSpread(_objectSpread({}, categoryObject["other"]), {}, {
216
- products: [].concat(_toConsumableArray(categoryObject["other"].products), [productItem])
215
+ categoryObject['other'] = _objectSpread(_objectSpread({}, categoryObject['other']), {}, {
216
+ products: [].concat(_toConsumableArray(categoryObject['other'].products), [productItem])
217
217
  });
218
218
  }
219
219
  }
@@ -222,7 +222,7 @@ export var formatProductListByCategory = function formatProductListByCategory(li
222
222
  });
223
223
  };
224
224
  export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cacheItem) {
225
- var startDate = dayjs(cacheItem._extend.start_date.format("YYYY-MM-DD") + ' ' + getServeStartTime(cacheItem._extend.start_time));
225
+ var startDate = dayjs(cacheItem._extend.start_date.format('YYYY-MM-DD') + ' ' + getServeStartTime(cacheItem._extend.start_time));
226
226
  var isFlexible = flexibleObj.isFlexible(cacheItem._extend.duration);
227
227
 
228
228
  // 是否在最大预约数量的区间内
@@ -236,10 +236,10 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
236
236
  isMaxLimitRange = true;
237
237
  } else {
238
238
  // unknown 为 未知的, 需要掉接口确认是否可用
239
- isMaxLimitRange = "unknown";
239
+ isMaxLimitRange = 'unknown';
240
240
  }
241
- var timeStartDate = dayjs(time.start_date + " " + time.start_time).subtract(1, "second");
242
- var timeEndDate = dayjs(time.end_date + " " + time.end_time).add(1, "second");
241
+ var timeStartDate = dayjs(time.start_date + ' ' + time.start_time).subtract(1, 'second');
242
+ var timeEndDate = dayjs(time.end_date + ' ' + time.end_time).add(1, 'second');
243
243
  var bol;
244
244
 
245
245
  // 灵活时长的 只判断开始时间是否在范围内
@@ -247,7 +247,7 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
247
247
  bol = startDate.isAfter(timeStartDate) && startDate.isBefore(timeEndDate);
248
248
  } else {
249
249
  // 其余判断 开始时间 和 结束时间 是否都在范围内
250
- var endDate = startDate.add(flexibleObj.getValue(cacheItem._extend.duration), "minute");
250
+ var endDate = startDate.add(flexibleObj.getValue(cacheItem._extend.duration), 'minute');
251
251
  bol = startDate.isAfter(timeStartDate) && endDate.isBefore(timeEndDate);
252
252
  }
253
253
 
@@ -291,8 +291,8 @@ export var formatTimes = function formatTimes(resourceItem, cacheItem) {
291
291
 
292
292
  // 获取第一个最佳的time
293
293
  var _time = (usableTimes || []).sort(function (a, b) {
294
- var aEndDate = dayjs(a.end_date + " " + a.end_time).valueOf();
295
- var bEndDate = dayjs(b.end_date + " " + b.end_time).valueOf();
294
+ var aEndDate = dayjs(a.end_date + ' ' + a.end_time).valueOf();
295
+ var bEndDate = dayjs(b.end_date + ' ' + b.end_time).valueOf();
296
296
  return aEndDate - bEndDate;
297
297
  })[0];
298
298
  resourceItem._extend = _objectSpread(_objectSpread({}, resourceItem._extend), {}, {
@@ -317,21 +317,21 @@ var formatResourceProducts = function formatResourceProducts(resourceItem, curre
317
317
  var type = _resourceItem.partyroom_package.type;
318
318
 
319
319
  // 全部商品
320
- if (type === "product_all") {
320
+ if (type === 'product_all') {
321
321
  usableProduct = true;
322
322
  } else {
323
- if (type === "product_collection") {
323
+ if (type === 'product_collection') {
324
324
  var _resourceItem$partyro;
325
325
  // 取交集 intersectionBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); // => [{ 'x': 2 }]
326
326
  usableProduct = !!intersectionBy(((_resourceItem$partyro = _resourceItem.partyroom_package) === null || _resourceItem$partyro === void 0 ? void 0 : _resourceItem$partyro.products.map(function (item) {
327
327
  return _objectSpread(_objectSpread({}, item), {}, {
328
328
  id: item.product_collection_id
329
329
  });
330
- })) || [], currentItem.collection || [], "id").length;
330
+ })) || [], currentItem.collection || [], 'id').length;
331
331
  } else {
332
332
  usableProduct = _resourceItem.partyroom_package.products.some(function (item) {
333
333
  // 判断商品
334
- if (type === "products") {
334
+ if (type === 'products') {
335
335
  if (item.product_id == currentItem.product_id) {
336
336
  return true;
337
337
  }
@@ -348,7 +348,7 @@ var formatResourceProducts = function formatResourceProducts(resourceItem, curre
348
348
 
349
349
  /**
350
350
  * @title: 获取店铺的营业结束时间
351
- * @description:
351
+ * @description:
352
352
  * @return {*}
353
353
  * @Author: zhiwei.Wang
354
354
  * @Date: 2024-02-23 10:00
@@ -359,7 +359,7 @@ export var getShopOpeningHours = function getShopOpeningHours() {
359
359
 
360
360
  /**
361
361
  * @title: 对灵活时长进行处理
362
- * @description:
362
+ * @description:
363
363
  * @return {*}
364
364
  * @Author: zhiwei.Wang
365
365
  * @Date: 2024-02-23 10:00
@@ -405,7 +405,7 @@ export var flexibleObj = {
405
405
  export var getEndDate = function getEndDate(startDate, duration, endDate) {
406
406
  if (duration === 'flexible') {
407
407
  // 店铺营业结束时间
408
- var openingDate = dayjs(startDate.format("YYYY-MM-DD") + ' ' + getShopOpeningHours());
408
+ var openingDate = dayjs(startDate.format('YYYY-MM-DD') + ' ' + getShopOpeningHours());
409
409
 
410
410
  // 如果选择的开始时间 > 店铺的营业时间, 店铺营业时间向后推一天
411
411
  if (dayjs(startDate).isAfter(openingDate)) {
@@ -421,14 +421,14 @@ export var getEndDate = function getEndDate(startDate, duration, endDate) {
421
421
  }
422
422
  return endDate;
423
423
  }
424
- return startDate.add(duration, "minute");
424
+ return startDate.add(duration, 'minute');
425
425
  };
426
426
 
427
427
  // export const get
428
428
 
429
429
  export var getServiceTimes = function getServiceTimes(service) {
430
- var startDate = dayjs(dayjs(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time));
431
- var endDate = startDate.add(flexibleObj.getValue(service._extend.duration), "minute");
430
+ var startDate = dayjs(dayjs(service._extend.start_date).format('YYYY-MM-DD ') + getServeStartTime(service._extend.start_time));
431
+ var endDate = startDate.add(flexibleObj.getValue(service._extend.duration), 'minute');
432
432
  return {
433
433
  startDate: startDate,
434
434
  endDate: endDate
@@ -438,7 +438,7 @@ export var getErrorList = function getErrorList(resource, cacheItem) {
438
438
  if (!(cacheItem !== null && cacheItem !== void 0 && cacheItem.id)) {
439
439
  return [{
440
440
  label: locales.getText('pisell2.text.no-product-added'),
441
- type: "products"
441
+ type: 'products'
442
442
  }];
443
443
  }
444
444
  if (!resource || !resource._extend || !cacheItem) {
@@ -452,29 +452,29 @@ export var getErrorList = function getErrorList(resource, cacheItem) {
452
452
  if (!(resource !== null && resource !== void 0 && (_resource$_extend = resource._extend) !== null && _resource$_extend !== void 0 && _resource$_extend.usableProduct)) {
453
453
  list.push({
454
454
  label: locales.getText('pisell1.text.resource-error-message-1')(resource.labelText, cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.title),
455
- type: "product"
455
+ type: 'product'
456
456
  });
457
457
  }
458
458
  var _getServiceTimes = getServiceTimes(cacheItem),
459
459
  startDate = _getServiceTimes.startDate,
460
460
  endDate = _getServiceTimes.endDate;
461
461
  // 如果跨天 结束时间前面加一个明天
462
- var startText = startDate.format("hh:mm A");
463
- var endText = endDate.format("hh:mm A");
464
- if (dayjs(endDate).isAfter(startDate, "day")) {
462
+ var startText = startDate.format('hh:mm A');
463
+ var endText = endDate.format('hh:mm A');
464
+ if (dayjs(endDate).isAfter(startDate, 'day')) {
465
465
  endText = locales.getText('pisell1.text.tomorrow') + endText;
466
466
  }
467
467
  if (!((_resource$_extend2 = resource._extend) !== null && _resource$_extend2 !== void 0 && _resource$_extend2.usableTime)) {
468
468
  list.push({
469
469
  label: locales.getText('pisell1.text.resource-error-message-2')(resource.labelText, startText, endText),
470
- type: "time"
470
+ type: 'time'
471
471
  });
472
472
  } else {
473
473
  var _resource$_extend3;
474
474
  if (!((_resource$_extend3 = resource._extend) !== null && _resource$_extend3 !== void 0 && _resource$_extend3.usableTime._extend.isMaxLimitRange)) {
475
475
  list.push({
476
476
  label: locales.getText('pisell1.text.resource-error-message-3')(resource.labelText, startText, endText),
477
- type: "limit"
477
+ type: 'limit'
478
478
  });
479
479
  }
480
480
  }
@@ -526,7 +526,7 @@ export var deleteCacheParams = function deleteCacheParams() {
526
526
 
527
527
  /**
528
528
  * @title: 创建一个服务商品
529
- * @description:
529
+ * @description:
530
530
  * @param {any} state
531
531
  * @param {any} item
532
532
  * @return {*}
@@ -555,10 +555,10 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
555
555
  var lastServerStartDate = lastServer._extend.startDate;
556
556
  var lastServerEndDate = lastServer._extend.endDate;
557
557
  // 如果上个服务商品的结束时间跨天, 那么设置为最后一个时间段, 不跨天则取上一个的结束时间
558
- if (dayjs(lastServerEndDate).isAfter(lastServerStartDate, "day")) {
558
+ if (dayjs(lastServerEndDate).isAfter(lastServerStartDate, 'day')) {
559
559
  _extend.start_time = timeObj.timeSlices[timeObj.timeSlices.length - 1].value;
560
560
  } else {
561
- _extend.start_time = lastServerEndDate.format("HH:mm");
561
+ _extend.start_time = lastServerEndDate.format('HH:mm');
562
562
  }
563
563
  } else {
564
564
  // 没有上一个商品 资源为 0
@@ -584,14 +584,17 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
584
584
  _extend.resource = resourceId;
585
585
  }
586
586
  }
587
- console.log("_extend", findNextSliceProps);
588
587
 
589
588
  // 只有选择了带 HH:mm的日期才选中, 否则使用当前日期
590
589
  if (findNextSliceProps.date && findNextSliceProps.date !== '00:00') {
591
590
  _extend.start_time = findNextSlice(findNextSliceProps);
592
591
  } else {
593
- // 没有预设日期, 则使用当前 https://www.yuque.com/feg4xm/manual/tzvrnt05ifihkndg
594
- _extend.start_time = dayjs().format('HH:mm');
592
+ if (cacheItem.currentDefaultTime) {
593
+ _extend.start_time = cacheItem.currentDefaultTime;
594
+ } else {
595
+ // 没有预设日期, 则使用当前 https://www.yuque.com/feg4xm/manual/tzvrnt05ifihkndg
596
+ _extend.start_time = dayjs().format('HH:mm');
597
+ }
595
598
  }
596
599
  }
597
600
  _extend = _objectSpread(_objectSpread({}, _extend), cacheItem._extend);
@@ -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/es/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export { default as BookingStartTime } from './components/booking/materiels/star
12
12
  export { default as BookingDuration } from './components/booking/materiels/duration';
13
13
  export { default as BookingContacts } from './components/booking/materiels/contacts';
14
14
  export { VerticalClient } from './components/booking/info/clientVariant';
15
+ export { default as VerticalAddService } from './components/booking/info/addServiceVariant';
15
16
  export { default as ProductExtension } from './components/productExtension';
16
17
  export { default as BookingDeposit } from './components/booking/deposit';
17
18
  export { default as RuleSetting } from './components/ruleSetting';
@@ -19,3 +20,4 @@ export { default as TaxSelect } from './components/taxSelect';
19
20
  export { default as ToCPay } from './components/pay/toC';
20
21
  export { default as Eftpos } from './components/eftpos';
21
22
  export { default as EftposPay } from './components/eftposPay';
23
+ export { default as BookingDashboard } from './components/booking/dashboard';
package/es/index.js CHANGED
@@ -16,10 +16,12 @@ export { default as BookingStartTime } from "./components/booking/materiels/star
16
16
  export { default as BookingDuration } from "./components/booking/materiels/duration";
17
17
  export { default as BookingContacts } from "./components/booking/materiels/contacts";
18
18
  export { VerticalClient } from "./components/booking/info/clientVariant";
19
+ export { default as VerticalAddService } from "./components/booking/info/addServiceVariant";
19
20
  export { default as ProductExtension } from "./components/productExtension";
20
21
  export { default as BookingDeposit } from "./components/booking/deposit";
21
22
  export { default as RuleSetting } from "./components/ruleSetting";
22
23
  export { default as TaxSelect } from "./components/taxSelect";
23
24
  export { default as ToCPay } from "./components/pay/toC";
24
25
  export { default as Eftpos } from "./components/eftpos";
25
- export { default as EftposPay } from "./components/eftposPay";
26
+ export { default as EftposPay } from "./components/eftposPay";
27
+ export { default as BookingDashboard } from "./components/booking/dashboard";
@@ -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) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {