@pisell/private-materials 3.3.84 → 3.3.85

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 (169) 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 +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +5 -5
  11. package/es/businessModel/SalesModel/Sales/index.js +4 -37
  12. package/es/components/Sales/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +0 -7
  14. package/es/components/Sales/Resource/serve.js +0 -10
  15. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  16. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  17. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  18. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  19. package/es/components/appointmentBooking/index.js +0 -14
  20. package/es/components/appointmentBooking/index.less +1 -1
  21. package/es/components/appointmentBooking/locales.d.ts +3 -0
  22. package/es/components/appointmentBooking/locales.js +3 -0
  23. package/es/components/booking/components/footer/utils.d.ts +0 -1
  24. package/es/components/booking/components/footer/utils.js +1 -1
  25. package/es/components/booking/components/voucher/index.js +2 -2
  26. package/es/components/booking/info/service2/utils.js +2 -3
  27. package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
  28. package/es/components/booking/info2/service/addService/utils.js +13 -44
  29. package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
  30. package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
  31. package/es/components/booking/info2/utilsByBooking.js +0 -9
  32. package/es/components/booking/locales.d.ts +0 -3
  33. package/es/components/booking/locales.js +0 -3
  34. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  35. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
  36. package/es/components/eventBooking/index.js +7 -21
  37. package/es/components/eventBooking/locales.js +3 -3
  38. package/es/components/index.d.ts +1 -3
  39. package/es/components/index.js +1 -3
  40. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  41. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  42. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  43. package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
  44. package/es/components/ticketBooking/locales.d.ts +146 -164
  45. package/es/components/ticketBooking/locales.js +147 -195
  46. package/es/index.d.ts +0 -2
  47. package/es/index.js +1 -3
  48. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  49. package/lib/components/Sales/Resource/index.js +1 -1
  50. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  51. package/lib/components/Sales/Resource/serve.js +2 -9
  52. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  53. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  54. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  55. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
  56. package/lib/components/appointmentBooking/index.js +0 -11
  57. package/lib/components/appointmentBooking/index.less +1 -1
  58. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  59. package/lib/components/appointmentBooking/locales.js +3 -0
  60. package/lib/components/booking/components/footer/utils.d.ts +0 -1
  61. package/lib/components/booking/components/footer/utils.js +0 -2
  62. package/lib/components/booking/components/voucher/index.js +23 -11
  63. package/lib/components/booking/info/service2/utils.js +2 -2
  64. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
  65. package/lib/components/booking/info2/service/addService/utils.js +4 -27
  66. package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
  67. package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
  68. package/lib/components/booking/info2/utilsByBooking.js +0 -6
  69. package/lib/components/booking/locales.d.ts +0 -3
  70. package/lib/components/booking/locales.js +0 -3
  71. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  72. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
  73. package/lib/components/eventBooking/index.js +7 -11
  74. package/lib/components/eventBooking/locales.js +3 -3
  75. package/lib/components/index.d.ts +1 -3
  76. package/lib/components/index.js +0 -6
  77. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  78. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  79. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  80. package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
  81. package/lib/components/ticketBooking/locales.d.ts +146 -164
  82. package/lib/components/ticketBooking/locales.js +4 -22
  83. package/lib/index.d.ts +0 -2
  84. package/lib/index.js +0 -6
  85. package/package.json +1 -1
  86. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
  87. package/es/components/booking/editBookingModal/index.d.ts +0 -5
  88. package/es/components/booking/editBookingModal/index.js +0 -386
  89. package/es/components/booking/editBookingModal/index.less +0 -8
  90. package/es/components/booking/editBookingModal/locales.d.ts +0 -21
  91. package/es/components/booking/editBookingModal/locales.js +0 -20
  92. package/es/components/booking/editBookingModal/mock.d.ts +0 -807
  93. package/es/components/booking/editBookingModal/mock.js +0 -2993
  94. package/es/components/booking/editBookingModal/serve.d.ts +0 -51
  95. package/es/components/booking/editBookingModal/serve.js +0 -288
  96. package/es/components/booking/editBookingModal/type.d.ts +0 -12
  97. package/es/components/booking/editBookingModal/type.js +0 -1
  98. package/es/components/booking/editBookingModal/utils.d.ts +0 -12
  99. package/es/components/booking/editBookingModal/utils.js +0 -157
  100. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  101. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
  102. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  103. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
  104. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  105. package/es/components/stepController/components/Content/index.d.ts +0 -7
  106. package/es/components/stepController/components/Content/index.js +0 -9
  107. package/es/components/stepController/components/Content/index.less +0 -8
  108. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  109. package/es/components/stepController/components/Footer/index.js +0 -15
  110. package/es/components/stepController/components/Footer/index.less +0 -39
  111. package/es/components/stepController/components/Header/index.d.ts +0 -20
  112. package/es/components/stepController/components/Header/index.js +0 -97
  113. package/es/components/stepController/components/Header/index.less +0 -21
  114. package/es/components/stepController/index.d.ts +0 -5
  115. package/es/components/stepController/index.js +0 -64
  116. package/es/components/stepController/index.less +0 -11
  117. package/es/components/stepController/locales.d.ts +0 -27
  118. package/es/components/stepController/locales.js +0 -32
  119. package/es/components/stepController/types.d.ts +0 -23
  120. package/es/components/stepController/types.js +0 -1
  121. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  122. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  123. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  124. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  125. package/es/hooks/useWindowSize.d.ts +0 -5
  126. package/es/hooks/useWindowSize.js +0 -26
  127. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
  128. package/lib/components/booking/editBookingModal/index.d.ts +0 -5
  129. package/lib/components/booking/editBookingModal/index.js +0 -363
  130. package/lib/components/booking/editBookingModal/index.less +0 -8
  131. package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
  132. package/lib/components/booking/editBookingModal/locales.js +0 -44
  133. package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
  134. package/lib/components/booking/editBookingModal/mock.js +0 -3314
  135. package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
  136. package/lib/components/booking/editBookingModal/serve.js +0 -178
  137. package/lib/components/booking/editBookingModal/type.d.ts +0 -12
  138. package/lib/components/booking/editBookingModal/type.js +0 -17
  139. package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
  140. package/lib/components/booking/editBookingModal/utils.js +0 -158
  141. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
  142. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
  143. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
  144. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
  145. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
  146. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  147. package/lib/components/stepController/components/Content/index.js +0 -40
  148. package/lib/components/stepController/components/Content/index.less +0 -8
  149. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  150. package/lib/components/stepController/components/Footer/index.js +0 -49
  151. package/lib/components/stepController/components/Footer/index.less +0 -39
  152. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  153. package/lib/components/stepController/components/Header/index.js +0 -104
  154. package/lib/components/stepController/components/Header/index.less +0 -21
  155. package/lib/components/stepController/index.d.ts +0 -5
  156. package/lib/components/stepController/index.js +0 -89
  157. package/lib/components/stepController/index.less +0 -11
  158. package/lib/components/stepController/locales.d.ts +0 -27
  159. package/lib/components/stepController/locales.js +0 -50
  160. package/lib/components/stepController/types.d.ts +0 -23
  161. package/lib/components/stepController/types.js +0 -17
  162. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  163. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  164. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  165. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  166. package/lib/hooks/useWindowSize.d.ts +0 -5
  167. package/lib/hooks/useWindowSize.js +0 -51
  168. package/lowcode/edit-booking-modal/meta.ts +0 -53
  169. package/lowcode/step-controller/meta.ts +0 -88
@@ -1,311 +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/info2/service/editService/ResourcesV2/index.tsx
30
- var ResourcesV2_exports = {};
31
- __export(ResourcesV2_exports, {
32
- default: () => ResourcesV2_default
33
- });
34
- module.exports = __toCommonJS(ResourcesV2_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_antd = require("antd");
38
- var import_materials = require("@pisell/materials");
39
- var import_MaxLengthSelect = __toESM(require("./MaxLengthSelect"));
40
- var import_like = __toESM(require("../../../../info/service/like"));
41
- var import_index = require("./index.less");
42
- var import_utils = require("@pisell/utils");
43
- var import_utilsByBooking = require("../../../utilsByBooking");
44
- var import_lodash = require("lodash");
45
- var import_utils2 = require("../utils");
46
- var import_ahooks = require("ahooks");
47
- var import_icons = require("@ant-design/icons");
48
- var Resources = ({
49
- state,
50
- cacheItem,
51
- originCacheItem,
52
- getCurrentCacheItem,
53
- onChange,
54
- value,
55
- originValue,
56
- config = {
57
- // 是否显示自动分配
58
- autoAllocation: true,
59
- // 是否显示资源错误图标
60
- resourceErrorIcon: true,
61
- disabled: false,
62
- size: "large"
63
- }
64
- }, ref) => {
65
- var _a, _b, _c;
66
- const [showError, setShowError] = (0, import_react.useState)(false);
67
- const update = (0, import_ahooks.useUpdate)();
68
- const data = (0, import_react.useMemo)(() => {
69
- var _a2;
70
- return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resources) || [];
71
- }, [(_a = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a.resources]);
72
- const originData = (0, import_react.useMemo)(() => {
73
- var _a2;
74
- return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resources) || [];
75
- }, [(_b = originCacheItem == null ? void 0 : originCacheItem._data) == null ? void 0 : _b.resource]);
76
- const resourceMaps = (0, import_react.useMemo)(() => {
77
- var _a2;
78
- return ((_a2 = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _a2.resourceMaps) || [];
79
- }, [(_c = cacheItem == null ? void 0 : cacheItem._data) == null ? void 0 : _c.resourceMaps]);
80
- const defaultValue = (0, import_react.useMemo)(() => {
81
- return data.reduce((pre, cur2) => {
82
- pre[cur2.form_id] = [];
83
- return pre;
84
- }, {});
85
- }, [data]);
86
- const _value = (0, import_react.useMemo)(() => {
87
- return value || defaultValue;
88
- }, [value, defaultValue]);
89
- const handleCheckAutoAllocation = (id, checked) => {
90
- (0, import_utils2.setAutoAllocationStorage)({ [id]: checked });
91
- update();
92
- };
93
- const _onChange = (val, form_id, key) => {
94
- let _val = { ..._value };
95
- let maps = _val[form_id] ? _val[form_id].reduce((pre, cur2) => {
96
- pre[cur2.relation_id] = cur2;
97
- return pre;
98
- }, {}) : {};
99
- _val[form_id] = val.map((d) => {
100
- var _a2, _b2, _c2, _d2, _e, _f, _g, _h;
101
- let _d = maps[d];
102
- if (_d) {
103
- if (key === "like_status") {
104
- d[key].like_status = val;
105
- }
106
- }
107
- const currentForm = (resourceMaps == null ? void 0 : resourceMaps[form_id]) || {};
108
- return (
109
- // maps[d] 为真时, 说明是之前已选择, 否则为新增的值,补充数据
110
- maps[d] || {
111
- relation_type: ((_b2 = (_a2 = currentForm.renderListMaps[d]) == null ? void 0 : _a2.usable) == null ? void 0 : _b2.relation_type) || "form",
112
- form_id,
113
- relation_id: d,
114
- like_status: "common",
115
- children: (_d2 = (_c2 = currentForm.renderListMaps) == null ? void 0 : _c2[d]) == null ? void 0 : _d2.children,
116
- // 新添加的数据补充错误信息
117
- errors: (0, import_utilsByBooking.getErrorList)(
118
- (_e = currentForm.renderListMaps) == null ? void 0 : _e[d],
119
- getCurrentCacheItem()
120
- ),
121
- metadata: {
122
- ...(_g = (_f = currentForm.renderListMaps) == null ? void 0 : _f[d]) == null ? void 0 : _g.metadata,
123
- form_name: currentForm.title,
124
- resource_name: (_h = currentForm.renderListMaps[d]) == null ? void 0 : _h.main_field
125
- }
126
- }
127
- );
128
- });
129
- setShowError(false);
130
- onChange == null ? void 0 : onChange(_val);
131
- };
132
- const setLikeStatus = (val, form_id, key) => {
133
- var _a2;
134
- let _val = { ..._value };
135
- if ((_a2 = _val == null ? void 0 : _val[form_id]) == null ? void 0 : _a2[0]) {
136
- _val[form_id][0][key] = val;
137
- onChange == null ? void 0 : onChange(_val);
138
- }
139
- };
140
- const renderOptions = (0, import_react.useCallback)(
141
- (array, value2 = "value", label = "label", type) => {
142
- return array.map((d) => {
143
- let props = {};
144
- if (type === "resource") {
145
- props.labelText = d.labelText;
146
- }
147
- return /* @__PURE__ */ import_react.default.createElement(
148
- import_antd.Select.Option,
149
- {
150
- value: d[value2],
151
- key: d[value2],
152
- ...props,
153
- relation_type: d.relation_type
154
- },
155
- d[label]
156
- );
157
- });
158
- },
159
- [config == null ? void 0 : config.resourceErrorIcon]
160
- );
161
- const check = () => {
162
- var _a2;
163
- for (let item of data) {
164
- let _length = (_a2 = _value[item.form_id]) == null ? void 0 : _a2.length;
165
- if (item.select_type.min > _length) {
166
- setShowError(true);
167
- return false;
168
- }
169
- }
170
- return true;
171
- };
172
- (0, import_react.useImperativeHandle)(ref, () => {
173
- return {
174
- check
175
- };
176
- });
177
- const getIsAutoAllocation = (id) => {
178
- return (0, import_utils2.getAutoAllocationStorage)(id);
179
- };
180
- const renderItem = (item, isOrigin) => {
181
- var _a2;
182
- if (!item) return null;
183
- const disabled = isOrigin || (config == null ? void 0 : config.disabled);
184
- const cur2 = isOrigin ? originValue[item.form_id] : _value[item.form_id];
185
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { flex: "1 0" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "resource-v2 resource-col" }, item.select_type.type === "multiple" ? null : /* @__PURE__ */ import_react.default.createElement(
186
- import_antd.Button,
187
- {
188
- className: (0, import_classnames.default)(
189
- "resource-col-like-wrap",
190
- {
191
- "resource-col-like-wrap-disabled": disabled
192
- },
193
- (config == null ? void 0 : config.size) || "large"
194
- ),
195
- size: config == null ? void 0 : config.size,
196
- onClick: () => {
197
- var _a3;
198
- if (disabled) {
199
- return;
200
- }
201
- setLikeStatus(
202
- ((_a3 = cur2 == null ? void 0 : cur2[0]) == null ? void 0 : _a3.like_status) === "like" ? "common" : "like",
203
- item.form_id,
204
- "like_status"
205
- );
206
- }
207
- },
208
- /* @__PURE__ */ import_react.default.createElement(
209
- import_like.default,
210
- {
211
- status: (_a2 = cur2 == null ? void 0 : cur2[0]) == null ? void 0 : _a2.like_status,
212
- className: `${disabled ? "like-icon-disabled" : ""}`
213
- }
214
- )
215
- ), /* @__PURE__ */ import_react.default.createElement(
216
- import_MaxLengthSelect.default,
217
- {
218
- className: "resource-col-select",
219
- size: (config == null ? void 0 : config.size) || "large",
220
- maxLength: item.select_type.max,
221
- mode: item.select_type.type === "multiple" ? "multiple" : void 0,
222
- onChange: (e) => {
223
- let val = e;
224
- if (!(0, import_lodash.isArray)(e)) {
225
- if (e || e === 0) {
226
- val = [e];
227
- }
228
- }
229
- _onChange(val, item.form_id, "value");
230
- },
231
- value: cur2 == null ? void 0 : cur2.map((d) => d.relation_id),
232
- showSearch: true,
233
- filterOption: (str, option) => {
234
- return ((option == null ? void 0 : option.labelText) || "").toLowerCase().includes((str || "").toLowerCase());
235
- },
236
- disabled
237
- },
238
- renderOptions(
239
- item.renderList,
240
- "id",
241
- (config == null ? void 0 : config.resourceErrorIcon) ? "label" : "labelText",
242
- "resource"
243
- )
244
- ), (config == null ? void 0 : config.autoAllocation) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
245
- import_antd.Checkbox,
246
- {
247
- checked: getIsAutoAllocation(item.form_id),
248
- onChange: (e) => {
249
- handleCheckAutoAllocation(item.form_id, e.target.checked);
250
- }
251
- }
252
- ), /* @__PURE__ */ import_react.default.createElement(
253
- import_antd.Tooltip,
254
- {
255
- title: import_utils.locales.getText(
256
- "page.booking.text.resource.check-auto-allocation-tip"
257
- )
258
- },
259
- /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, null)
260
- )) : null)));
261
- };
262
- const renderErrors = (item) => {
263
- const cur2 = _value[item.form_id];
264
- const errors = (cur2 || []).reduce((pre, d) => {
265
- return pre.concat((d == null ? void 0 : d.errors) || []);
266
- }, []);
267
- return state.renderType !== "eventBooking" && (errors || []).map((d) => {
268
- return /* @__PURE__ */ import_react.default.createElement(
269
- import_antd.Alert,
270
- {
271
- key: d.type,
272
- message: d.label,
273
- type: "warning",
274
- showIcon: true,
275
- style: { marginBottom: 12 }
276
- }
277
- );
278
- });
279
- };
280
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
281
- const originItem = originData == null ? void 0 : originData.find(
282
- (originDataItem) => originDataItem.form_id === item.form_id
283
- );
284
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: item.form_id }, /* @__PURE__ */ import_react.default.createElement(
285
- import_antd.Form.Item,
286
- {
287
- label: item.title,
288
- required: true,
289
- labelCol: config == null ? void 0 : config.labelCol,
290
- extra: showError && item.select_type.min > (cur == null ? void 0 : cur.length) ? /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#ff4d4f" } }, import_utils.locales.getText(
291
- "page.booking.text.resource.min-length-error"
292
- )(item.select_type.min, item.title)) : void 0
293
- },
294
- /* @__PURE__ */ import_react.default.createElement(import_antd.Row, { gutter: [16, 16], wrap: false }, renderItem(originItem, true), !!originItem ? /* @__PURE__ */ import_react.default.createElement(
295
- import_antd.Col,
296
- {
297
- flex: "none",
298
- style: { display: "flex", alignItems: "center" }
299
- },
300
- /* @__PURE__ */ import_react.default.createElement(
301
- import_materials.Iconfont,
302
- {
303
- type: "pisell2-arrow-block-right",
304
- style: { fontSize: 24, color: "#1b1b1b" }
305
- }
306
- )
307
- ) : null, renderItem(item, false))
308
- ), renderErrors(item));
309
- }));
310
- };
311
- var ResourcesV2_default = (0, import_react.forwardRef)(Resources);
@@ -1,44 +0,0 @@
1
- .resource-col.resource-v2 {
2
- display: flex;
3
- align-items: center;
4
- justify-content: center;
5
- gap: 10px;
6
- width: 100%;
7
- overflow: hidden;
8
-
9
- .resource-col-like-wrap {
10
- width: 32px;
11
- height: 32px;
12
-
13
- &.large {
14
- width: 40px;
15
- height: 40px;
16
- }
17
-
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- padding: 0;
22
- flex-shrink: 0;
23
-
24
- .like-resource {
25
- }
26
- }
27
-
28
- .resource-col-like-wrap-disabled,
29
- .like-icon-disabled {
30
- opacity: 0.5;
31
- cursor: not-allowed;
32
- }
33
-
34
- .resource-col-select {
35
- flex: 1;
36
- overflow: hidden;
37
-
38
- .resource-option-label-text {
39
- display: inline-block;
40
- overflow: hidden;
41
- text-overflow: ellipsis;
42
- }
43
- }
44
- }
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface ContentProps {
4
- children?: React.ReactNode;
5
- }
6
- declare const Content: React.FC<ContentProps>;
7
- export default Content;
@@ -1,40 +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/stepController/components/Content/index.tsx
30
- var Content_exports = {};
31
- __export(Content_exports, {
32
- default: () => Content_default
33
- });
34
- module.exports = __toCommonJS(Content_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_index = require("./index.less");
37
- var Content = ({ children }) => {
38
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-step-controller-content" }, children);
39
- };
40
- var Content_default = Content;
@@ -1,8 +0,0 @@
1
- .pisell-step-controller-content {
2
- flex: 1;
3
- width: 1000px;
4
- max-width: 100%;
5
- border-right: 1px solid var(--Gray-100, #f2f4f7);
6
- border-left: 1px solid var(--Gray-100, #f2f4f7);
7
- background: #fff;
8
- }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface FooterProps {
4
- isMobile?: boolean;
5
- children?: React.ReactNode;
6
- }
7
- declare const Footer: React.FC<FooterProps>;
8
- export default Footer;
@@ -1,49 +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/stepController/components/Footer/index.tsx
30
- var Footer_exports = {};
31
- __export(Footer_exports, {
32
- default: () => Footer_default
33
- });
34
- module.exports = __toCommonJS(Footer_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_index = require("./index.less");
38
- var Footer = ({ isMobile, children }) => {
39
- return /* @__PURE__ */ import_react.default.createElement(
40
- "div",
41
- {
42
- className: (0, import_classnames.default)("pisell-step-controller-footer-wrap", {
43
- "pisell-step-controller-footer-wrap-mobile": isMobile
44
- })
45
- },
46
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-step-controller-footer" }, children)
47
- );
48
- };
49
- var Footer_default = Footer;
@@ -1,39 +0,0 @@
1
- .pisell-step-controller-footer-wrap {
2
- position: sticky;
3
- left: 0;
4
- right: 0;
5
- bottom: 0;
6
- width: 100%;
7
- background: #fff;
8
- // box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
9
- padding: 24px;
10
- z-index: 100;
11
- border-top: 1px solid var(--Gray-100, #f2f4f7);
12
-
13
- .pisell-step-controller-footer {
14
- width: 1000px;
15
- margin: 0 auto;
16
- max-width: 100%;
17
- display: flex;
18
- gap: 12px;
19
- justify-content: flex-end;
20
-
21
- .pisell-section-headers-main {
22
- color: var(--Gray-900, #101828);
23
- font-size: 14px;
24
- font-weight: 400;
25
- line-height: 20px;
26
- justify-content: start;
27
-
28
- .select-text {
29
- font-size: 18px;
30
- font-weight: 600;
31
- line-height: 24px;
32
- }
33
- }
34
- }
35
- }
36
-
37
- .pisell-step-controller-footer-wrap-mobile {
38
- border-top: 1px solid #eaecf0;
39
- }
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { Step } from '../../types';
3
- import './index.less';
4
- export interface HeaderProps {
5
- steps: Step[];
6
- currentStepIndex: number;
7
- className?: string;
8
- style?: React.CSSProperties;
9
- onBack?: (key: string) => void;
10
- onClose?: () => void;
11
- confirmCloseProps?: {
12
- isConfirmClose?: boolean;
13
- title?: string;
14
- content?: string;
15
- okText?: string;
16
- cancelText?: string;
17
- };
18
- }
19
- declare const Header: React.FC<HeaderProps>;
20
- export default Header;
@@ -1,104 +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/stepController/components/Header/index.tsx
30
- var Header_exports = {};
31
- __export(Header_exports, {
32
- default: () => Header_default
33
- });
34
- module.exports = __toCommonJS(Header_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_index = require("./index.less");
39
- var Header = ({
40
- steps,
41
- currentStepIndex,
42
- style,
43
- onBack,
44
- onClose,
45
- confirmCloseProps
46
- }) => {
47
- var _a;
48
- const [open, setOpen] = (0, import_react.useState)(false);
49
- const handleClose = () => {
50
- if (confirmCloseProps == null ? void 0 : confirmCloseProps.isConfirmClose) {
51
- setOpen(true);
52
- } else {
53
- onClose == null ? void 0 : onClose();
54
- }
55
- };
56
- const handleOk = () => {
57
- setOpen(false);
58
- onClose == null ? void 0 : onClose();
59
- };
60
- const handleBack = () => {
61
- if (!steps) return;
62
- if (currentStepIndex > 0) {
63
- const prevKey = steps[currentStepIndex - 1].key;
64
- onBack == null ? void 0 : onBack(prevKey);
65
- }
66
- };
67
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
68
- import_materials.PisellHeaderProgressBar,
69
- {
70
- className: "pisell-step-controller-header",
71
- style,
72
- stepText: import_utils.locales.getText("pisell2.step.controller.step")(
73
- currentStepIndex + 1
74
- ),
75
- title: (_a = steps == null ? void 0 : steps[currentStepIndex]) == null ? void 0 : _a.description,
76
- showClose: true,
77
- onBack: handleBack,
78
- onClose: handleClose,
79
- enableBorder: true,
80
- borderColor: "#EAECF0",
81
- showBack: currentStepIndex > 0 || false
82
- }
83
- ), /* @__PURE__ */ import_react.default.createElement(
84
- import_materials.PisellModal.Information,
85
- {
86
- open,
87
- title: (confirmCloseProps == null ? void 0 : confirmCloseProps.title) || "",
88
- describe: (confirmCloseProps == null ? void 0 : confirmCloseProps.content) || "",
89
- okText: (confirmCloseProps == null ? void 0 : confirmCloseProps.okText) || "",
90
- cancelText: (confirmCloseProps == null ? void 0 : confirmCloseProps.cancelText) || "",
91
- closable: true,
92
- okButtonProps: {
93
- style: {
94
- backgroundColor: "#D92D20"
95
- }
96
- },
97
- onCancel: () => {
98
- setOpen(false);
99
- },
100
- onOk: () => handleOk()
101
- }
102
- ));
103
- };
104
- var Header_default = Header;
@@ -1,21 +0,0 @@
1
- .pisell-step-controller-header {
2
- .pisell-section-headers-content {
3
- width: 1000px;
4
- margin: 0 auto;
5
- max-width: 100%;
6
-
7
- .pisell-section-headers-main {
8
- color: var(--Gray-900, #101828);
9
- font-size: 14px;
10
- font-weight: 400;
11
- line-height: 20px;
12
- justify-content: start;
13
-
14
- .select-text {
15
- font-size: 18px;
16
- font-weight: 600;
17
- line-height: 24px;
18
- }
19
- }
20
- }
21
- }
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { StepControllerProps } from './types';
3
- import './index.less';
4
- declare const StepController: React.FC<StepControllerProps>;
5
- export default StepController;