@pisell/private-materials 3.0.117 → 3.0.119

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 (70) 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 +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +1 -2
  13. package/es/components/booking/components/footer/index.js +48 -13
  14. package/es/components/booking/components/footer/serve.d.ts +1 -0
  15. package/es/components/booking/components/footer/serve.js +21 -0
  16. package/es/components/booking/forms/forms.d.ts +1 -1
  17. package/es/components/booking/forms/index.d.ts +1 -1
  18. package/es/components/booking/forms/model.d.ts +1 -2
  19. package/es/components/booking/index.d.ts +1 -1
  20. package/es/components/booking/info/index.d.ts +1 -1
  21. package/es/components/booking/info/model.js +9 -7
  22. package/es/components/booking/info/service/addService/index.d.ts +3 -1
  23. package/es/components/booking/info/service/addService/index.js +11 -7
  24. package/es/components/booking/info/service/editService/index.d.ts +5 -2
  25. package/es/components/booking/info/service/editService/index.js +152 -65
  26. package/es/components/booking/info/service/editService/index.less +15 -5
  27. package/es/components/booking/info/service/index.js +15 -2
  28. package/es/components/booking/info/service/serviceList/index.d.ts +5 -3
  29. package/es/components/booking/info/service/serviceList/index.js +15 -11
  30. package/es/components/booking/info/utils.js +1 -1
  31. package/es/components/booking/locales.d.ts +21 -0
  32. package/es/components/booking/locales.js +55 -3
  33. package/es/components/booking/model.d.ts +4 -3
  34. package/es/components/booking/model.js +9 -9
  35. package/es/components/booking/notes/index.d.ts +1 -1
  36. package/es/components/booking/notes/model.d.ts +1 -2
  37. package/es/components/booking/payments/index.d.ts +1 -1
  38. package/es/components/booking/payments/model.d.ts +1 -2
  39. package/es/components/schedules/index.d.ts +1 -1
  40. package/es/components/schedules/model.d.ts +1 -2
  41. package/lib/components/booking/addons/index.d.ts +1 -1
  42. package/lib/components/booking/addons/model.d.ts +1 -2
  43. package/lib/components/booking/components/footer/index.js +23 -0
  44. package/lib/components/booking/components/footer/serve.d.ts +1 -0
  45. package/lib/components/booking/components/footer/serve.js +30 -0
  46. package/lib/components/booking/forms/forms.d.ts +1 -1
  47. package/lib/components/booking/forms/index.d.ts +1 -1
  48. package/lib/components/booking/forms/model.d.ts +1 -2
  49. package/lib/components/booking/index.d.ts +1 -1
  50. package/lib/components/booking/info/index.d.ts +1 -1
  51. package/lib/components/booking/info/model.js +9 -7
  52. package/lib/components/booking/info/service/addService/index.d.ts +3 -1
  53. package/lib/components/booking/info/service/addService/index.js +6 -3
  54. package/lib/components/booking/info/service/editService/index.d.ts +5 -2
  55. package/lib/components/booking/info/service/editService/index.js +104 -61
  56. package/lib/components/booking/info/service/editService/index.less +15 -5
  57. package/lib/components/booking/info/service/index.js +8 -1
  58. package/lib/components/booking/info/service/serviceList/index.d.ts +5 -3
  59. package/lib/components/booking/info/service/serviceList/index.js +2 -1
  60. package/lib/components/booking/info/utils.js +1 -1
  61. package/lib/components/booking/locales.d.ts +21 -0
  62. package/lib/components/booking/locales.js +68 -3
  63. package/lib/components/booking/model.d.ts +4 -3
  64. package/lib/components/booking/notes/index.d.ts +1 -1
  65. package/lib/components/booking/notes/model.d.ts +1 -2
  66. package/lib/components/booking/payments/index.d.ts +1 -1
  67. package/lib/components/booking/payments/model.d.ts +1 -2
  68. package/lib/components/schedules/index.d.ts +1 -1
  69. package/lib/components/schedules/model.d.ts +1 -2
  70. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  .pisell-lowcode__booking-service-body-edit {
2
- padding: 24px 32px;
2
+ padding: 24px 32px 100px !important;
3
3
  }
4
4
 
5
5
 
@@ -14,6 +14,7 @@
14
14
  align-items: center;
15
15
  justify-content: center;
16
16
  gap: 12px;
17
+ background-color: #fff;
17
18
 
18
19
  .pisell-lowcode__booking-service-delete-wrap {
19
20
  height: 48px;
@@ -96,10 +97,19 @@
96
97
  overflow: hidden;
97
98
  padding: 11px;
98
99
 
99
- .current-service-info-name {
100
- font-size: 16px;
101
- color: #101828;
102
- font-weight: 650;
100
+ .current-service-info-name-wrap {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 12px;
104
+
105
+ .current-service-info-name {
106
+ font-size: 16px;
107
+ color: #101828;
108
+ font-weight: 650;
109
+ flex: 1;
110
+ }
111
+
112
+ .current-service-info-change-btn {}
103
113
  }
104
114
 
105
115
  &:hover {
@@ -42,6 +42,7 @@ var import_addTimeModal = __toESM(require("./addTimeModal"));
42
42
  var Service = () => {
43
43
  var _a, _b;
44
44
  const { state } = (0, import_react.useContext)(import_model.Context);
45
+ const detailRef = (0, import_react.useRef)();
45
46
  (0, import_react.useEffect)(() => {
46
47
  document.body.id = "body";
47
48
  }, []);
@@ -63,6 +64,12 @@ var Service = () => {
63
64
  }
64
65
  return true;
65
66
  }, [state, appointment_card.quick_time]);
66
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_serviceList.default, null), /* @__PURE__ */ import_react.default.createElement(import_addService.default, null)), /* @__PURE__ */ import_react.default.createElement(import_editService.default, null), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null));
67
+ const handleEdit = (cacheItem) => {
68
+ setTimeout(() => {
69
+ var _a2, _b2;
70
+ (_b2 = (_a2 = detailRef.current) == null ? void 0 : _a2.init) == null ? void 0 : _b2.call(_a2, cacheItem);
71
+ }, 100);
72
+ };
73
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-service-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_serviceList.default, { onEdit: handleEdit }), /* @__PURE__ */ import_react.default.createElement(import_addService.default, { onEdit: handleEdit })), /* @__PURE__ */ import_react.default.createElement(import_editService.default, { ref: detailRef }), showAddTimeModal && /* @__PURE__ */ import_react.default.createElement(import_addTimeModal.default, null));
67
74
  };
68
75
  var service_default = Service;
@@ -1,4 +1,6 @@
1
- import React from "react";
2
- import "./index.less";
3
- declare const ServiceList: () => React.JSX.Element;
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const ServiceList: ({ onEdit }: {
4
+ onEdit: any;
5
+ }) => React.JSX.Element;
4
6
  export default ServiceList;
@@ -39,7 +39,7 @@ var import_model = require("../../model");
39
39
  var import_mock = require("../../../mock");
40
40
  var import_utils2 = require("../../../utils");
41
41
  var import_serviceItem = __toESM(require("../serviceItem"));
42
- var ServiceList = () => {
42
+ var ServiceList = ({ onEdit }) => {
43
43
  const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
44
44
  const errorTypes = {
45
45
  product: import_utils.locales.getText("pisell2.text.status.service-error-1"),
@@ -57,6 +57,7 @@ var ServiceList = () => {
57
57
  cacheItem: { ...item, new: 0 }
58
58
  }
59
59
  });
60
+ onEdit == null ? void 0 : onEdit({ ...item, new: 0 });
60
61
  };
61
62
  const getResourceItem = (0, import_react.useCallback)(
62
63
  (id) => {
@@ -55,7 +55,7 @@ var moveItemToFront = (arr, targetId) => {
55
55
  return arr;
56
56
  };
57
57
  var isInterval = (time1, time2, interval = 1e3) => {
58
- return time2 - time1 < interval;
58
+ return Math.abs(time2 - time1) < interval;
59
59
  };
60
60
  var formatServiceListByTime = (list) => {
61
61
  var _a, _b;
@@ -165,6 +165,13 @@ declare const _default: {
165
165
  "pisell2.text.add-client": string;
166
166
  'pisell2.text.variant-client-change': string;
167
167
  'pisell2.text.variant-client-no-data': string;
168
+ 'page.event.booking.text.duplicate-enrollment': string;
169
+ 'page.event.booking.text.duplicate-enrollment-content': ({ customerName, title, list, }: {
170
+ customerName: string;
171
+ title: string;
172
+ list: any[];
173
+ }) => string;
174
+ 'page.event.booking.text.duplicate-enrollment-confirm': string;
168
175
  };
169
176
  'zh-CN': {
170
177
  'pisell2.text.refunded-amount': string;
@@ -332,6 +339,13 @@ declare const _default: {
332
339
  "pisell2.text.add-client": string;
333
340
  'pisell2.text.variant-client-change': string;
334
341
  'pisell2.text.variant-client-no-data': string;
342
+ 'page.event.booking.text.duplicate-enrollment': string;
343
+ 'page.event.booking.text.duplicate-enrollment-content': ({ customerName, title, list, }: {
344
+ customerName: string;
345
+ title: string;
346
+ list: any[];
347
+ }) => string;
348
+ 'page.event.booking.text.duplicate-enrollment-confirm': string;
335
349
  };
336
350
  'zh-HK': {
337
351
  'pisell2.text.refunded-amount': string;
@@ -499,6 +513,13 @@ declare const _default: {
499
513
  "pisell2.text.add-client": string;
500
514
  'pisell2.text.variant-client-change': string;
501
515
  'pisell2.text.variant-client-no-data': string;
516
+ 'page.event.booking.text.duplicate-enrollment': string;
517
+ 'page.event.booking.text.duplicate-enrollment-content': ({ customerName, title, list, }: {
518
+ customerName: string;
519
+ title: string;
520
+ list: any[];
521
+ }) => string;
522
+ 'page.event.booking.text.duplicate-enrollment-confirm': string;
502
523
  };
503
524
  };
504
525
  export default _default;
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
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
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
 
19
29
  // src/components/booking/locales.ts
@@ -22,6 +32,7 @@ __export(locales_exports, {
22
32
  default: () => locales_default
23
33
  });
24
34
  module.exports = __toCommonJS(locales_exports);
35
+ var import_dayjs = __toESM(require("dayjs"));
25
36
  var locales_default = {
26
37
  "en": {
27
38
  "pisell2.text.select-addons": "Select addons",
@@ -197,7 +208,25 @@ var locales_default = {
197
208
  "pisell2.text.actions": "Actions",
198
209
  "pisell2.text.add-client": "Add customer",
199
210
  "pisell2.text.variant-client-change": "Change",
200
- "pisell2.text.variant-client-no-data": "No record"
211
+ "pisell2.text.variant-client-no-data": "No record",
212
+ "page.event.booking.text.duplicate-enrollment": "Duplicate Enrollment",
213
+ "page.event.booking.text.duplicate-enrollment-content": ({
214
+ customerName,
215
+ title,
216
+ list
217
+ }) => {
218
+ const listStr = list.map((item) => {
219
+ if (item.registration_type === "single") {
220
+ return `(${item.start_time} ${(0, import_dayjs.default)(item.start_date).format("DD/MM/YYYY")})`;
221
+ } else if (item.registration_type === "extra_include") {
222
+ return `(${item.start_time} ${(0, import_dayjs.default)(item.start_date).format("DD/MM/YYYY")} this and all future events)`;
223
+ } else if (item.registration_type === "all") {
224
+ return `(All events)`;
225
+ }
226
+ });
227
+ return `${customerName || ""} has already enrolled in the ${title} ${listStr.join(",")}, Are you sure you want to enroll again?`;
228
+ },
229
+ "page.event.booking.text.duplicate-enrollment-confirm": "Confirm"
201
230
  },
202
231
  "zh-CN": {
203
232
  "pisell2.text.refunded-amount": "已退金额",
@@ -378,7 +407,25 @@ var locales_default = {
378
407
  "pisell2.text.actions": "操作选项",
379
408
  "pisell2.text.add-client": "添加客户",
380
409
  "pisell2.text.variant-client-change": "更改客户",
381
- "pisell2.text.variant-client-no-data": "暂无数据"
410
+ "pisell2.text.variant-client-no-data": "暂无数据",
411
+ "page.event.booking.text.duplicate-enrollment": "重复报名",
412
+ "page.event.booking.text.duplicate-enrollment-content": ({
413
+ customerName,
414
+ title,
415
+ list
416
+ }) => {
417
+ const listStr = list.map((item) => {
418
+ if (item.registration_type === "single") {
419
+ return `(${item.start_date} ${item.start_time})`;
420
+ } else if (item.registration_type === "extra_include") {
421
+ return `(${item.start_date} ${item.start_time} 此次及后续活动)`;
422
+ } else if (item.registration_type === "all") {
423
+ return `(所有活动)`;
424
+ }
425
+ });
426
+ return `${customerName || ""}已报名${title} ${listStr.join(",")}, 确定要再次报名吗?`;
427
+ },
428
+ "page.event.booking.text.duplicate-enrollment-confirm": "确认"
382
429
  },
383
430
  "zh-HK": {
384
431
  "pisell2.text.refunded-amount": "已退金額",
@@ -559,6 +606,24 @@ var locales_default = {
559
606
  "pisell2.text.actions": "操作選項",
560
607
  "pisell2.text.add-client": "添加客戶",
561
608
  "pisell2.text.variant-client-change": "更改客戶",
562
- "pisell2.text.variant-client-no-data": "暫無數據"
609
+ "pisell2.text.variant-client-no-data": "暫無數據",
610
+ "page.event.booking.text.duplicate-enrollment": "重複報名",
611
+ "page.event.booking.text.duplicate-enrollment-content": ({
612
+ customerName,
613
+ title,
614
+ list
615
+ }) => {
616
+ const listStr = list.map((item) => {
617
+ if (item.registration_type === "single") {
618
+ return `(${item.start_date} ${item.start_time})`;
619
+ } else if (item.registration_type === "extra_include") {
620
+ return `(${item.start_date} ${item.start_time} 此次及後續活動)`;
621
+ } else if (item.registration_type === "all") {
622
+ return `(所有活動)`;
623
+ }
624
+ });
625
+ return `${customerName || ""}已報名${title} ${listStr.join(",")}, 確定要再次報名嗎?`;
626
+ },
627
+ "page.event.booking.text.duplicate-enrollment-confirm": "確認"
563
628
  }
564
629
  };
@@ -40,6 +40,7 @@ export interface FormState {
40
40
  cacheItem: any;
41
41
  edit: boolean;
42
42
  addTimeModal: boolean;
43
+ changeService: any;
43
44
  };
44
45
  pet: {
45
46
  showModal: boolean;
@@ -73,7 +74,7 @@ export interface FormState {
73
74
  bookingId: string | number;
74
75
  bookingDetail: any;
75
76
  channelDisabledEdit: boolean;
76
- renderType?: "eventBooking";
77
+ renderType?: 'eventBooking';
77
78
  modalOpen?: boolean;
78
79
  isTerminal?: boolean;
79
80
  isFranchisee?: boolean;
@@ -81,7 +82,7 @@ export interface FormState {
81
82
  eventOtherParams?: {
82
83
  relation_id: number;
83
84
  number: number;
84
- registration_type: "single" | "all" | "extra_include";
85
+ registration_type: 'single' | 'all' | 'extra_include';
85
86
  start_date: string;
86
87
  start_time: string;
87
88
  end_date: string;
@@ -96,7 +97,7 @@ export declare const walkInData: {
96
97
  id: number;
97
98
  nickname: string;
98
99
  };
99
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
100
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
100
101
  state: FormState;
101
102
  } & {
102
103
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: (props: any) => JSX.Element;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => any;
8
+ declare const Payments: (props: any) => JSX.Element;
9
9
  export default Payments;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => any;
2
+ declare const Schedules: (props: any) => JSX.Element;
3
3
  export default Schedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,7 +68,7 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
73
72
  state: FormState;
74
73
  } & {
75
74
  dispatch: (params: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.117",
3
+ "version": "3.0.119",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
- "@pisell/utils": "1.0.28",
63
- "@pisell/materials": "3.0.38",
64
62
  "@pisell/icon": "0.0.11",
65
- "@pisell/date-picker": "1.0.97"
63
+ "@pisell/date-picker": "1.0.97",
64
+ "@pisell/utils": "1.0.28",
65
+ "@pisell/materials": "3.0.38"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",