@pisell/private-materials 3.0.162-gray → 3.0.162

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 (111) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +1 -1
  3. package/build/lowcode/preview.js +8 -8
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +10 -10
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +11 -11
  8. package/es/components/booking/components/footer/index.js +5 -34
  9. package/es/components/booking/forms/forms.d.ts +0 -1
  10. package/es/components/booking/forms/forms.js +2 -4
  11. package/es/components/booking/forms/single/index.d.ts +1 -1
  12. package/es/components/booking/forms/single/index.js +6 -4
  13. package/es/components/booking/info/client/index.js +1 -1
  14. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  15. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
  16. package/es/components/booking/info/clientVariant/vertical/index.js +5 -6
  17. package/es/components/booking/info/clientVariant/vertical/index.less +0 -8
  18. package/es/components/booking/info/index.less +0 -19
  19. package/es/components/booking/info/main.js +5 -11
  20. package/es/components/booking/info/pet/index.js +1 -1
  21. package/es/components/booking/info/service/addService/index.d.ts +3 -9
  22. package/es/components/booking/info/service/addService/index.js +36 -82
  23. package/es/components/booking/info/service/addService/index.less +1 -27
  24. package/es/components/booking/info/service/editService/index.js +13 -11
  25. package/es/components/booking/info/service/index.js +2 -5
  26. package/es/components/booking/info/service/index.less +0 -18
  27. package/es/components/booking/info/service/serviceItem/index.d.ts +3 -3
  28. package/es/components/booking/info/service/serviceItem/index.js +8 -22
  29. package/es/components/booking/info/service/serviceItem/index.less +0 -8
  30. package/es/components/booking/info/service/serviceList/index.js +1 -20
  31. package/es/components/booking/info2/index.js +3 -9
  32. package/es/components/booking/info2/service/addService/index.d.ts +2 -8
  33. package/es/components/booking/info2/service/addService/index.js +36 -82
  34. package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
  35. package/es/components/booking/info2/service/editService/index.js +4 -11
  36. package/es/components/booking/info2/service/index.js +2 -5
  37. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -1
  38. package/es/components/booking/info2/service/serviceItem/index.js +3 -16
  39. package/es/components/booking/info2/service/serviceList/index.js +1 -20
  40. package/es/components/booking/info2/utilsByBooking.js +2 -6
  41. package/es/components/booking/locales.d.ts +0 -60
  42. package/es/components/booking/locales.js +3 -63
  43. package/es/components/booking/model.d.ts +0 -2
  44. package/es/components/booking/utils.d.ts +1 -1
  45. package/es/components/booking/utils.js +51 -54
  46. package/es/index.d.ts +0 -2
  47. package/es/index.js +1 -3
  48. package/lib/components/booking/components/footer/index.js +5 -30
  49. package/lib/components/booking/forms/forms.d.ts +0 -1
  50. package/lib/components/booking/forms/forms.js +2 -5
  51. package/lib/components/booking/forms/single/index.d.ts +1 -1
  52. package/lib/components/booking/forms/single/index.js +5 -4
  53. package/lib/components/booking/info/client/index.js +1 -1
  54. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -1
  55. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +2 -4
  56. package/lib/components/booking/info/clientVariant/vertical/index.js +76 -88
  57. package/lib/components/booking/info/clientVariant/vertical/index.less +0 -8
  58. package/lib/components/booking/info/index.less +0 -19
  59. package/lib/components/booking/info/main.js +3 -9
  60. package/lib/components/booking/info/pet/index.js +1 -2
  61. package/lib/components/booking/info/service/addService/index.d.ts +3 -9
  62. package/lib/components/booking/info/service/addService/index.js +29 -66
  63. package/lib/components/booking/info/service/addService/index.less +1 -27
  64. package/lib/components/booking/info/service/editService/index.js +6 -9
  65. package/lib/components/booking/info/service/index.js +2 -4
  66. package/lib/components/booking/info/service/index.less +0 -18
  67. package/lib/components/booking/info/service/serviceItem/index.d.ts +3 -3
  68. package/lib/components/booking/info/service/serviceItem/index.js +1 -15
  69. package/lib/components/booking/info/service/serviceItem/index.less +0 -8
  70. package/lib/components/booking/info/service/serviceList/index.js +1 -18
  71. package/lib/components/booking/info2/index.js +2 -8
  72. package/lib/components/booking/info2/service/addService/index.d.ts +2 -8
  73. package/lib/components/booking/info2/service/addService/index.js +29 -66
  74. package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
  75. package/lib/components/booking/info2/service/editService/index.js +1 -7
  76. package/lib/components/booking/info2/service/index.js +2 -4
  77. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -1
  78. package/lib/components/booking/info2/service/serviceItem/index.js +1 -14
  79. package/lib/components/booking/info2/service/serviceList/index.js +1 -18
  80. package/lib/components/booking/info2/utilsByBooking.js +1 -5
  81. package/lib/components/booking/locales.d.ts +0 -60
  82. package/lib/components/booking/locales.js +3 -63
  83. package/lib/components/booking/model.d.ts +0 -2
  84. package/lib/components/booking/utils.d.ts +1 -1
  85. package/lib/components/booking/utils.js +22 -57
  86. package/lib/index.d.ts +0 -2
  87. package/lib/index.js +0 -6
  88. package/package.json +4 -4
  89. package/es/components/booking/dashboard/index.d.ts +0 -20
  90. package/es/components/booking/dashboard/index.js +0 -298
  91. package/es/components/booking/dashboard/serve.d.ts +0 -1
  92. package/es/components/booking/dashboard/serve.js +0 -27
  93. package/es/components/booking/hooks/useClearCart.d.ts +0 -3
  94. package/es/components/booking/hooks/useClearCart.js +0 -27
  95. package/es/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
  96. package/es/components/booking/hooks/useCreateBookingPageHeader.js +0 -21
  97. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -7
  98. package/es/components/booking/info/addServiceVariant/index.js +0 -42
  99. package/lib/components/booking/dashboard/index.d.ts +0 -20
  100. package/lib/components/booking/dashboard/index.js +0 -279
  101. package/lib/components/booking/dashboard/serve.d.ts +0 -1
  102. package/lib/components/booking/dashboard/serve.js +0 -33
  103. package/lib/components/booking/hooks/useClearCart.d.ts +0 -3
  104. package/lib/components/booking/hooks/useClearCart.js +0 -62
  105. package/lib/components/booking/hooks/useCreateBookingPageHeader.d.ts +0 -6
  106. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +0 -53
  107. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -7
  108. package/lib/components/booking/info/addServiceVariant/index.js +0 -70
  109. package/lowcode/booking-dashboard/meta.ts +0 -137
  110. package/lowcode/booking-vertical-add-service/meta.ts +0 -124
  111. package/lowcode/vertical-add-service/meta.ts +0 -71
@@ -1,279 +0,0 @@
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/dashboard/index.tsx
30
- var dashboard_exports = {};
31
- __export(dashboard_exports, {
32
- default: () => dashboard_default
33
- });
34
- module.exports = __toCommonJS(dashboard_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_materials = require("@pisell/materials");
37
- var import_utils = require("@pisell/utils");
38
- var import_dayjs = __toESM(require("dayjs"));
39
- var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
40
- var import_utils2 = require("../utils");
41
- var import_serve = require("./serve");
42
- var import_locales = __toESM(require("../locales"));
43
- var translationOriginal = (text) => "";
44
- var formatCapacityToChildrenData = (data) => {
45
- const map = {};
46
- data.forEach((item) => {
47
- if (!map[item.id]) {
48
- map[item.id] = {
49
- label: !item.id ? import_utils.locales.getText("pisell2.booking.dashboard.default") : translationOriginal(item.name) || "",
50
- value: 0
51
- };
52
- }
53
- map[item.id].value = (map[item.id].value || 0) + (item.value || 0);
54
- });
55
- return Object.values(map).sort((a, b) => b.label.localeCompare(a.label));
56
- };
57
- import_utils.locales.init(import_locales.default, localStorage.getItem("umi_locale") || "en");
58
- var BookingDashboard = (props) => {
59
- const {
60
- otherParams = {},
61
- backgroundColors,
62
- labelColor,
63
- valueColor,
64
- refreshKey,
65
- onDataChange,
66
- ...others
67
- } = props;
68
- const context = (0, import_useEngineContext.default)();
69
- import_utils2.request.setRequest(context.appHelper.utils.request);
70
- translationOriginal = context.appHelper.utils.translationOriginal;
71
- const [data, setData] = (0, import_react.useState)([
72
- // 当前在场团体
73
- {
74
- label: import_utils.locales.getText("pisell2.booking.dashboard.groups-on-site-now"),
75
- value: "-",
76
- tip: import_utils.locales.getText("pisell2.booking.dashboard.groups-on-site-now-tip")
77
- },
78
- // 当前在场人数
79
- {
80
- label: import_utils.locales.getText("pisell2.booking.dashboard.people-on-site-now"),
81
- value: "-",
82
- tip: import_utils.locales.getText("pisell2.booking.dashboard.people-on-site-now-tip")
83
- },
84
- // 今日游客总数
85
- {
86
- label: import_utils.locales.getText("pisell2.booking.dashboard.total-visitors-today"),
87
- value: "-",
88
- tip: import_utils.locales.getText(
89
- "pisell2.booking.dashboard.total-visitors-today-tip"
90
- )
91
- },
92
- // 正在进行中的游客
93
- {
94
- label: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors"),
95
- value: "-",
96
- tip: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors-tip")
97
- },
98
- // 即将到达的游客
99
- {
100
- label: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors"),
101
- value: "-",
102
- tip: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors-tip")
103
- },
104
- // 超时的游客
105
- {
106
- label: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors"),
107
- value: "-",
108
- tip: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors-tip")
109
- },
110
- // 已完成的游客
111
- {
112
- label: import_utils.locales.getText("pisell2.booking.dashboard.completed-visitors"),
113
- value: "-",
114
- tip: import_utils.locales.getText("pisell2.booking.dashboard.completed-visitors-tip")
115
- },
116
- // 已离场的游客
117
- {
118
- label: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors"),
119
- value: "-",
120
- tip: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors-tip")
121
- }
122
- ]);
123
- const [bookingData, setBookingData] = (0, import_react.useState)([]);
124
- const getData = async () => {
125
- const data2 = await (0, import_serve.getBookingList)({
126
- ...otherParams,
127
- item_type: "appointment_booking",
128
- parent_id: 0,
129
- with: ["children"],
130
- child_booking: 0,
131
- skip: 1,
132
- num: 1e3
133
- });
134
- setBookingData(data2.list);
135
- };
136
- const calcBookingDataCount = (data2) => {
137
- let groupsOnSiteNow = "-";
138
- let peopleOnSiteNow = "-";
139
- let totalVisitorsToday = 0;
140
- let totalVisitorsTodayChildren = [];
141
- let ongoing = 0;
142
- let ongoingChildren = [];
143
- let upcoming = 0;
144
- let upcomingChildren = [];
145
- let overdue = "-";
146
- let completed = 0;
147
- let completedChildren = [];
148
- let departed = "-";
149
- data2.forEach((item) => {
150
- if ((0, import_utils.isArr)(item.children)) {
151
- item.children.forEach((child) => {
152
- var _a, _b, _c, _d;
153
- const start = (0, import_dayjs.default)(`${child.start_date} ${child.start_time}`);
154
- const end = (0, import_dayjs.default)(`${child.end_date} ${child.end_time}`);
155
- totalVisitorsToday += child.number;
156
- totalVisitorsTodayChildren.push(...((_a = child.metadata) == null ? void 0 : _a.capacity) || []);
157
- if (start < (0, import_dayjs.default)() && end > (0, import_dayjs.default)()) {
158
- ongoing += child.number || 1;
159
- ongoingChildren.push(...((_b = child.metadata) == null ? void 0 : _b.capacity) || []);
160
- }
161
- if ((0, import_dayjs.default)() < start) {
162
- upcoming += child.number || 1;
163
- upcomingChildren.push(...((_c = child.metadata) == null ? void 0 : _c.capacity) || []);
164
- }
165
- if ((0, import_dayjs.default)() > end) {
166
- completed += child.number || 1;
167
- completedChildren.push(...((_d = child.metadata) == null ? void 0 : _d.capacity) || []);
168
- }
169
- });
170
- }
171
- });
172
- onDataChange == null ? void 0 : onDataChange(
173
- {
174
- groupsOnSiteNow,
175
- peopleOnSiteNow,
176
- totalVisitorsToday,
177
- ongoing,
178
- upcoming,
179
- overdue,
180
- completed,
181
- departed
182
- },
183
- data2
184
- );
185
- setData([
186
- // 当前在场团体
187
- {
188
- label: import_utils.locales.getText("pisell2.booking.dashboard.groups-on-site-now"),
189
- tip: import_utils.locales.getText(
190
- "pisell2.booking.dashboard.groups-on-site-now-tip"
191
- ),
192
- value: `${groupsOnSiteNow}`
193
- },
194
- // 当前在场人数
195
- {
196
- label: import_utils.locales.getText("pisell2.booking.dashboard.people-on-site-now"),
197
- tip: import_utils.locales.getText(
198
- "pisell2.booking.dashboard.people-on-site-now-tip"
199
- ),
200
- value: `${peopleOnSiteNow}`
201
- },
202
- // 今日游客总数
203
- {
204
- label: import_utils.locales.getText(
205
- "pisell2.booking.dashboard.total-visitors-today"
206
- ),
207
- tip: import_utils.locales.getText(
208
- "pisell2.booking.dashboard.total-visitors-today-tip"
209
- ),
210
- value: `${totalVisitorsToday}`,
211
- children: formatCapacityToChildrenData(totalVisitorsTodayChildren)
212
- },
213
- // 正在进行中的游客
214
- {
215
- label: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors"),
216
- tip: import_utils.locales.getText("pisell2.booking.dashboard.ongoing-visitors-tip"),
217
- value: `${ongoing}`,
218
- children: formatCapacityToChildrenData(ongoingChildren)
219
- },
220
- // 即将到达的游客
221
- {
222
- label: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors"),
223
- tip: import_utils.locales.getText("pisell2.booking.dashboard.upcoming-visitors-tip"),
224
- value: `${upcoming}`,
225
- children: formatCapacityToChildrenData(upcomingChildren)
226
- },
227
- // 超时的游客
228
- {
229
- label: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors"),
230
- tip: import_utils.locales.getText("pisell2.booking.dashboard.overdue-visitors-tip"),
231
- value: `${overdue}`
232
- },
233
- // 已完成的游客
234
- {
235
- label: import_utils.locales.getText("pisell2.booking.dashboard.completed-visitors"),
236
- tip: import_utils.locales.getText(
237
- "pisell2.booking.dashboard.completed-visitors-tip"
238
- ),
239
- value: `${completed}`,
240
- children: formatCapacityToChildrenData(completedChildren)
241
- },
242
- // 已离场的游客
243
- {
244
- label: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors"),
245
- tip: import_utils.locales.getText("pisell2.booking.dashboard.departed-visitors-tip"),
246
- value: `${departed}`
247
- }
248
- ]);
249
- };
250
- (0, import_react.useEffect)(() => {
251
- calcBookingDataCount(bookingData);
252
- const timer = setInterval(() => {
253
- calcBookingDataCount(bookingData);
254
- }, 60 * 1e3);
255
- return () => {
256
- clearInterval(timer);
257
- };
258
- }, [bookingData]);
259
- (0, import_react.useEffect)(() => {
260
- getData();
261
- const timer = setInterval(() => {
262
- getData();
263
- }, 10 * 60 * 1e3);
264
- return () => {
265
- clearInterval(timer);
266
- };
267
- }, [JSON.stringify(otherParams), refreshKey]);
268
- return /* @__PURE__ */ import_react.default.createElement(
269
- import_materials.PisellStatisticList,
270
- {
271
- ...others,
272
- data,
273
- backgroundColors,
274
- labelColor,
275
- valueColor
276
- }
277
- );
278
- };
279
- var dashboard_default = BookingDashboard;
@@ -1 +0,0 @@
1
- export declare const getBookingList: (params: any) => Promise<any>;
@@ -1,33 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/booking/dashboard/serve.ts
20
- var serve_exports = {};
21
- __export(serve_exports, {
22
- getBookingList: () => getBookingList
23
- });
24
- module.exports = __toCommonJS(serve_exports);
25
- var import_utils = require("../utils");
26
- var getBookingList = async (params) => {
27
- let { data } = await import_utils.request.getRequest().get(`/shop/schedule/booking`, params);
28
- return data;
29
- };
30
- // Annotate the CommonJS export names for ESM import in node:
31
- 0 && (module.exports = {
32
- getBookingList
33
- });
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const useClearCart: (state: any, dispatch: any) => false | React.JSX.Element;
3
- export default useClearCart;
@@ -1,62 +0,0 @@
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/hooks/useClearCart.tsx
30
- var useClearCart_exports = {};
31
- __export(useClearCart_exports, {
32
- default: () => useClearCart_default
33
- });
34
- module.exports = __toCommonJS(useClearCart_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_materials = require("@pisell/materials");
38
- var import_utils = require("@pisell/utils");
39
- var useClearCart = (state, dispatch) => {
40
- var _a, _b, _c, _d;
41
- const handleClear = () => {
42
- dispatch({
43
- type: "setService",
44
- payload: {
45
- value: []
46
- }
47
- });
48
- };
49
- return !!((_b = (_a = state.service) == null ? void 0 : _a.value) == null ? void 0 : _b.length) && /* @__PURE__ */ import_react.default.createElement(
50
- "span",
51
- {
52
- className: (0, import_classnames.default)("pisell-lowcode__booking-service-clear-btn", {
53
- ["pisell-lowcode__booking-service-clear-btn-disabled"]: !((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length)
54
- }),
55
- onClick: handleClear
56
- },
57
- /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-trash-01" }),
58
- " ",
59
- /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.booking.info.text.clear-cart"))
60
- );
61
- };
62
- var useClearCart_default = useClearCart;
@@ -1,6 +0,0 @@
1
- declare const useCreateBookingPageHeader: (state: any) => {
2
- createHeader: any;
3
- isBookingCreatePage: any;
4
- isBookingCreatePageCreateMode: any;
5
- };
6
- export default useCreateBookingPageHeader;
@@ -1,53 +0,0 @@
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/hooks/useCreateBookingPageHeader.tsx
30
- var useCreateBookingPageHeader_exports = {};
31
- __export(useCreateBookingPageHeader_exports, {
32
- default: () => useCreateBookingPageHeader_default
33
- });
34
- module.exports = __toCommonJS(useCreateBookingPageHeader_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_utils = require("@pisell/utils");
37
- var useCreateBookingPageHeader = (state) => {
38
- const createHeader = (0, import_react.useMemo)(() => {
39
- return state.isBookingCreatePage && !state.bookingId && /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info-create-new" }, import_utils.locales.getText("pisell2.booking.info.text.create-new"));
40
- }, [state.isBookingCreatePage, state.bookingId]);
41
- const isBookingCreatePage = (0, import_react.useMemo)(() => {
42
- return state.isBookingCreatePage;
43
- }, [state.isBookingCreatePage]);
44
- const isBookingCreatePageCreateMode = (0, import_react.useMemo)(() => {
45
- return state.isBookingCreatePage && !state.bookingId;
46
- }, [state.isBookingCreatePage, state.bookingId]);
47
- return {
48
- createHeader,
49
- isBookingCreatePage,
50
- isBookingCreatePageCreateMode
51
- };
52
- };
53
- var useCreateBookingPageHeader_default = useCreateBookingPageHeader;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- interface AddServiceVariantProps {
3
- globalState: any;
4
- setGlobalState: any;
5
- }
6
- declare const AddServiceVariant: (props: AddServiceVariantProps) => React.JSX.Element;
7
- export default AddServiceVariant;
@@ -1,70 +0,0 @@
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/addServiceVariant/index.tsx
30
- var addServiceVariant_exports = {};
31
- __export(addServiceVariant_exports, {
32
- default: () => addServiceVariant_default
33
- });
34
- module.exports = __toCommonJS(addServiceVariant_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_addService = __toESM(require("../service/addService"));
37
- var import_addService2 = __toESM(require("../../info2/service/addService"));
38
- var import_utils = require("../utils");
39
- var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
- var AddServiceVariant = (props) => {
41
- var _a, _b, _c, _d, _e, _f;
42
- const { globalState, setGlobalState } = props;
43
- const context = (0, import_useEngineContext.default)();
44
- const stateRef = (0, import_react.useRef)(globalState);
45
- stateRef.current = globalState;
46
- const dispatch = ({ type, payload }) => {
47
- if (type === "setService") {
48
- setGlobalState({
49
- service: { ...stateRef.current.service, ...payload }
50
- });
51
- }
52
- };
53
- let Cpt = import_addService.default;
54
- if ((0, import_utils.isBooking4Shop)(
55
- (_e = (_d = (_c = (_b = (_a = context.appHelper.utils.store) == null ? void 0 : _a.getState) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.global) == null ? void 0 : _d.globalConfig) == null ? void 0 : _e.id,
56
- (_f = props == null ? void 0 : props.globalState) == null ? void 0 : _f.renderType
57
- )) {
58
- Cpt = import_addService2.default;
59
- }
60
- return /* @__PURE__ */ import_react.default.createElement(
61
- Cpt,
62
- {
63
- renderMode: "current",
64
- dispatch,
65
- state: globalState,
66
- drawerProps: { open: true, getContainer: false }
67
- }
68
- );
69
- };
70
- var addServiceVariant_default = AddServiceVariant;
@@ -1,137 +0,0 @@
1
- import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
2
-
3
- const BookingDashboardMeta: ComponentMetadata = {
4
- componentName: 'BookingDashboard',
5
- title: 'BookingDashboard',
6
- docUrl: '',
7
- screenshot: '',
8
- devMode: 'proCode',
9
- npm: {
10
- package: '@pisell/private-materials',
11
- version: '1.0.4',
12
- exportName: 'BookingDashboard',
13
- main: 'src/index.ts',
14
- destructuring: true,
15
- subName: '',
16
- },
17
- configure: {
18
- props: [
19
- {
20
- title: {
21
- label: {
22
- type: 'i18n',
23
- 'en-US': 'backgroundColors',
24
- 'zh-CN': 'backgroundColors',
25
- },
26
- },
27
- name: 'backgroundColors',
28
- setter: {
29
- componentName: 'MixedSetter',
30
- props: {
31
- setters: [
32
- {
33
- componentName: 'ArraySetter',
34
- props: {
35
- itemSetter: {
36
- componentName: 'StringSetter',
37
- isRequired: false,
38
- initialValue: '',
39
- },
40
- },
41
- initialValue: [],
42
- },
43
- ],
44
- },
45
- },
46
- },
47
- {
48
- title: {
49
- label: {
50
- type: 'i18n',
51
- 'en-US': 'labelColor',
52
- 'zh-CN': 'labelColor',
53
- },
54
- },
55
- name: 'labelColor',
56
- setter: {
57
- componentName: 'MixedSetter',
58
- props: {
59
- setters: [
60
- {
61
- componentName: 'StringSetter',
62
- isRequired: false,
63
- initialValue: '',
64
- },
65
- ],
66
- },
67
- },
68
- },
69
- {
70
- title: {
71
- label: {
72
- type: 'i18n',
73
- 'en-US': 'valueColor',
74
- 'zh-CN': 'valueColor',
75
- },
76
- },
77
- name: 'valueColor',
78
- setter: {
79
- componentName: 'MixedSetter',
80
- props: {
81
- setters: [
82
- {
83
- componentName: 'StringSetter',
84
- isRequired: false,
85
- initialValue: '',
86
- },
87
- ],
88
- },
89
- },
90
- },
91
- {
92
- title: {
93
- label: {
94
- type: 'i18n',
95
- 'en-US': 'otherParams',
96
- 'zh-CN': 'otherParams',
97
- },
98
- },
99
- name: 'otherParams',
100
- setter: ["JsonSetter","VariableSetter"],
101
- },
102
- {
103
- title: {
104
- label: 'refreshKey',
105
- },
106
- name: 'refreshKey',
107
- setter: ["StringSetter","VariableSetter"],
108
- },
109
- ],
110
- supports: {
111
- style: true,
112
- events: [
113
- {
114
- name: "onDataChange",
115
- template:
116
- "onDataChange(data,dataList,${extParams}){\n//console.log('onDataChange',data,dataList);}",
117
- },
118
- ],
119
- },
120
- component: {},
121
- },
122
- };
123
- const snippets: Snippet[] = [
124
- {
125
- title: 'BookingDashboard',
126
- screenshot: '',
127
- schema: {
128
- componentName: 'BookingDashboard',
129
- props: {},
130
- },
131
- },
132
- ];
133
-
134
- export default {
135
- ...BookingDashboardMeta,
136
- snippets,
137
- };