@pisell/private-materials 3.0.78 → 3.0.80

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 (67) 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 +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/booking/components/addButton/index.js +3 -3
  12. package/es/components/booking/components/customSelect/index.d.ts +2 -0
  13. package/es/components/booking/components/customSelect/index.js +6 -1
  14. package/es/components/booking/components/drawer/index.d.ts +1 -0
  15. package/es/components/booking/components/drawer/index.js +4 -2
  16. package/es/components/booking/components/footer/index.js +0 -1
  17. package/es/components/booking/info/client/index.js +3 -0
  18. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +39 -0
  19. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +378 -0
  20. package/es/components/booking/info/clientVariant/index.d.ts +1 -0
  21. package/es/components/booking/info/clientVariant/index.js +1 -0
  22. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +22 -0
  23. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +321 -0
  24. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.less +66 -0
  25. package/es/components/booking/info/clientVariant/vertical/index.d.ts +8 -0
  26. package/es/components/booking/info/clientVariant/vertical/index.js +205 -0
  27. package/es/components/booking/info/clientVariant/vertical/index.less +61 -0
  28. package/es/components/booking/info/index.js +1 -1
  29. package/es/components/booking/info/pet/index.d.ts +10 -1
  30. package/es/components/booking/info/pet/index.js +22 -14
  31. package/es/components/booking/info/service/addService/index.js +1 -1
  32. package/es/components/booking/info/utils.d.ts +1 -0
  33. package/es/components/booking/info/utils.js +12 -0
  34. package/es/components/booking/locales.d.ts +6 -0
  35. package/es/components/booking/locales.js +9 -3
  36. package/es/components/booking/model.d.ts +2 -0
  37. package/es/index.d.ts +1 -0
  38. package/es/index.js +1 -0
  39. package/lib/components/booking/components/addButton/index.js +2 -2
  40. package/lib/components/booking/components/customSelect/index.d.ts +2 -0
  41. package/lib/components/booking/components/customSelect/index.js +6 -1
  42. package/lib/components/booking/components/drawer/index.d.ts +1 -0
  43. package/lib/components/booking/components/drawer/index.js +2 -2
  44. package/lib/components/booking/components/footer/index.js +0 -1
  45. package/lib/components/booking/info/client/index.js +2 -1
  46. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +39 -0
  47. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +308 -0
  48. package/lib/components/booking/info/clientVariant/index.d.ts +1 -0
  49. package/lib/components/booking/info/clientVariant/index.js +39 -0
  50. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +22 -0
  51. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +344 -0
  52. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.less +66 -0
  53. package/lib/components/booking/info/clientVariant/vertical/index.d.ts +8 -0
  54. package/lib/components/booking/info/clientVariant/vertical/index.js +230 -0
  55. package/lib/components/booking/info/clientVariant/vertical/index.less +61 -0
  56. package/lib/components/booking/info/index.js +1 -1
  57. package/lib/components/booking/info/pet/index.d.ts +10 -1
  58. package/lib/components/booking/info/pet/index.js +15 -8
  59. package/lib/components/booking/info/service/addService/index.js +1 -1
  60. package/lib/components/booking/info/utils.d.ts +1 -0
  61. package/lib/components/booking/info/utils.js +16 -2
  62. package/lib/components/booking/locales.d.ts +6 -0
  63. package/lib/components/booking/locales.js +9 -3
  64. package/lib/components/booking/model.d.ts +2 -0
  65. package/lib/index.d.ts +1 -0
  66. package/lib/index.js +5 -2
  67. package/package.json +2 -2
@@ -0,0 +1,61 @@
1
+ .pisell-lowcode__booking-vertical-client-wrap {
2
+ position: relative;
3
+ overflow: hidden;
4
+ height: 100%;
5
+ width: 100%;
6
+ border-right: 1px solid var(--Gray-200, #EAECF0);
7
+ background: var(--Gray-50, #F9FAFB);
8
+ display: flex;
9
+ flex-direction: column;
10
+ .pisell-lowcode-drawer-content {
11
+ border-right: 1px solid var(--Gray-200, #EAECF0);
12
+ }
13
+ .pisell-lowcode__booking-drawer-title-wrap {
14
+ padding: 24px 24px 0;
15
+ }
16
+ .pisell-lowcode__booking-drawer-back {
17
+ margin-right: 6px;
18
+ }
19
+ .pisell-lowcode__booking-drawer-back, .pisell-lowcode__booking-drawer-title {
20
+ font-size: 18px;
21
+ }
22
+ }
23
+ .pisell-lowcode__booking-vertical-client {
24
+ padding: 24px 16px;
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ width: 100%;
29
+ border-bottom: 1px solid var(--Gray-200, #EAECF0);
30
+ .pisell-lowcode__booking-client-avatar {
31
+ margin-bottom: 16px;
32
+ }
33
+ .pisell-lowcode__booking-client-title {
34
+ color: var(--Gray-900, #101828);
35
+ font-size: 16px;
36
+ font-style: normal;
37
+ font-weight: 600;
38
+ line-height: 24px; /* 150% */
39
+ text-align: center;
40
+ }
41
+ .pisell-lowcode__booking-client-desc-item {
42
+ color: var(--Gray-400, #98A2B3);
43
+ font-size: 14px;
44
+ font-style: normal;
45
+ font-weight: 400;
46
+ line-height: 20px; /* 142.857% */
47
+ text-align: center;
48
+ }
49
+ .pisell-lowcode__booking-client-action-wrap {
50
+ display: flex;
51
+ gap: 16px;
52
+ justify-content: center;
53
+ margin-top: 16px;
54
+ }
55
+ }
56
+
57
+ .pisell-lowcode__booking-vertical-pet {
58
+ padding: 0 24px 24px;
59
+ flex:1;
60
+ overflow: auto;
61
+ }
@@ -109,7 +109,7 @@ var Info = (0, import_model.Provider)((props) => {
109
109
  if ((globalState == null ? void 0 : globalState.renderType) === "eventBooking") {
110
110
  return import_utils.locales.getText("pisell2.text.enroll.detail");
111
111
  }
112
- return (globalState == null ? void 0 : globalState.bookingId) ? /* @__PURE__ */ import_react.default.createElement(import_header.default, { state: modal.state, dispatch: modal.dispatch }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { height: 20 } });
112
+ return (globalState == null ? void 0 : globalState.bookingId) ? /* @__PURE__ */ import_react.default.createElement(import_header.default, { state: modal.state, dispatch: modal.dispatch }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "", style: { height: 0 } });
113
113
  }, [
114
114
  globalState == null ? void 0 : globalState.bookingId,
115
115
  modal.state,
@@ -1,4 +1,13 @@
1
1
  import React from "react";
2
2
  import "./index.less";
3
- declare const Pet: () => React.JSX.Element;
3
+ import { InfoProps } from "../../forms/forms";
4
+ interface PetProps {
5
+ state?: any;
6
+ dispatch?: any;
7
+ hideTitle?: boolean;
8
+ addButtonProps?: InfoProps['addButtonProps'];
9
+ handleOpenModal?: () => void;
10
+ clientChangeNotSetPet?: boolean;
11
+ }
12
+ declare const Pet: (props: PetProps) => React.JSX.Element;
4
13
  export default Pet;
@@ -48,15 +48,18 @@ var defaultParams = {
48
48
  total: 0,
49
49
  keyword: ""
50
50
  };
51
- var Pet = () => {
51
+ var Pet = (props) => {
52
52
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
53
+ const { hideTitle, addButtonProps, handleOpenModal, clientChangeNotSetPet } = props;
53
54
  const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
54
55
  const [loading, setLoading] = (0, import_react.useState)(false);
55
- const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
56
+ let { state, dispatch } = (0, import_react.useContext)(import_model.Context);
56
57
  const [valueLoading, setValueLoading] = (0, import_react.useState)(false);
57
58
  const context = (0, import_useEngineContext.default)();
58
59
  const { isTerminal } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
59
60
  const [params, setParams] = (0, import_react.useState)(defaultParams);
61
+ state = state || (props == null ? void 0 : props.state);
62
+ dispatch = dispatch || (props == null ? void 0 : props.dispatch);
60
63
  const boardParams = (0, import_react.useMemo)(() => {
61
64
  var _a2, _b2, _c2;
62
65
  return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
@@ -232,6 +235,8 @@ var Pet = () => {
232
235
  };
233
236
  (0, import_react.useEffect)(() => {
234
237
  var _a2, _b2, _c2, _d2;
238
+ if (clientChangeNotSetPet)
239
+ return;
235
240
  let changeFormValuesData = (0, import_format.changeFormValues)({
236
241
  values: ((_a2 = state.pet) == null ? void 0 : _a2.value) || {},
237
242
  clientId: (_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id,
@@ -243,7 +248,7 @@ var Pet = () => {
243
248
  payload: { value: changeFormValuesData }
244
249
  });
245
250
  });
246
- }, [(_f = state.client.value) == null ? void 0 : _f.id]);
251
+ }, [(_f = state.client.value) == null ? void 0 : _f.id, clientChangeNotSetPet]);
247
252
  const handleUpdateForm = () => {
248
253
  if (state.bookingId) {
249
254
  if (!state.bookingDetail) {
@@ -263,9 +268,9 @@ var Pet = () => {
263
268
  state.bookingDetail,
264
269
  boardParams.form_id,
265
270
  boardParams.type,
266
- (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id,
267
271
  state.renderType,
268
- petForm
272
+ petForm,
273
+ clientChangeNotSetPet ? (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id : void 0
269
274
  ]);
270
275
  const addCallback = (_params) => {
271
276
  var _a2, _b2;
@@ -301,7 +306,7 @@ var Pet = () => {
301
306
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-pet-wraps" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { loading: valueLoading, active: true, round: true }, /* @__PURE__ */ import_react.default.createElement(
302
307
  import_forms.default,
303
308
  {
304
- hideTitle: true,
309
+ hideTitle,
305
310
  watch: { value: state.pet.value },
306
311
  addCallback: () => {
307
312
  addCallback();
@@ -328,7 +333,8 @@ var Pet = () => {
328
333
  loadMore,
329
334
  filterItem: () => {
330
335
  return true;
331
- }
336
+ },
337
+ handleOpenModal
332
338
  },
333
339
  optionRender: (item) => {
334
340
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -368,7 +374,8 @@ var Pet = () => {
368
374
  showDisabledMessage: !state.disableEventBookingEdit,
369
375
  addCallback: async () => {
370
376
  addCallback();
371
- }
377
+ },
378
+ ...addButtonProps
372
379
  }
373
380
  }
374
381
  )));
@@ -233,7 +233,7 @@ var Info = () => {
233
233
  var _a2, _b2, _c2, _d2, _e, _f, _g;
234
234
  if (shopList.includes(
235
235
  (_e = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e.id
236
- )) {
236
+ ) || state.closeAutoOpenService) {
237
237
  return;
238
238
  }
239
239
  if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f = state.service) == null ? void 0 : _f.value) == null ? void 0 : _g.length) === 0) {
@@ -1 +1,2 @@
1
1
  export declare const getIsBundleOrCombination: (productDetail: any) => boolean;
2
+ export declare const uniqueByField: (arr: any[], field: string) => any[];
@@ -19,7 +19,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/components/booking/info/utils.ts
20
20
  var utils_exports = {};
21
21
  __export(utils_exports, {
22
- getIsBundleOrCombination: () => getIsBundleOrCombination
22
+ getIsBundleOrCombination: () => getIsBundleOrCombination,
23
+ uniqueByField: () => uniqueByField
23
24
  });
24
25
  module.exports = __toCommonJS(utils_exports);
25
26
  var getIsBundleOrCombination = (productDetail) => {
@@ -29,7 +30,20 @@ var getIsBundleOrCombination = (productDetail) => {
29
30
  }
30
31
  return false;
31
32
  };
33
+ var uniqueByField = (arr, field) => {
34
+ const seen = /* @__PURE__ */ new Set();
35
+ return arr.filter((item) => {
36
+ const fieldValue = item[field];
37
+ if (seen.has(fieldValue)) {
38
+ return false;
39
+ } else {
40
+ seen.add(fieldValue);
41
+ return true;
42
+ }
43
+ });
44
+ };
32
45
  // Annotate the CommonJS export names for ESM import in node:
33
46
  0 && (module.exports = {
34
- getIsBundleOrCombination
47
+ getIsBundleOrCombination,
48
+ uniqueByField
35
49
  });
@@ -157,6 +157,8 @@ declare const _default: {
157
157
  'page.booking.text.fully-booked': string;
158
158
  'page.booking.text.unlimited': string;
159
159
  'pisell2.text.terminal-edit-message': string;
160
+ "pisell2.text.actions": string;
161
+ "pisell2.text.add-client": string;
160
162
  };
161
163
  'zh-CN': {
162
164
  'pisell2.text.refunded-amount': string;
@@ -316,6 +318,8 @@ declare const _default: {
316
318
  'page.booking.text.available': string;
317
319
  'page.booking.text.fully-booked': string;
318
320
  'page.booking.text.unlimited': string;
321
+ "pisell2.text.actions": string;
322
+ "pisell2.text.add-client": string;
319
323
  };
320
324
  'zh-HK': {
321
325
  'pisell2.text.refunded-amount': string;
@@ -475,6 +479,8 @@ declare const _default: {
475
479
  'page.booking.text.available': string;
476
480
  'page.booking.text.fully-booked': string;
477
481
  'page.booking.text.unlimited': string;
482
+ "pisell2.text.actions": string;
483
+ "pisell2.text.add-client": string;
478
484
  };
479
485
  };
480
486
  export default _default;
@@ -189,7 +189,9 @@ var locales_default = {
189
189
  "page.booking.text.available": "Available",
190
190
  "page.booking.text.fully-booked": "Fully booked",
191
191
  "page.booking.text.unlimited": "Unlimited",
192
- "pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Pisell Terminal."
192
+ "pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Pisell Terminal.",
193
+ "pisell2.text.actions": "Actions",
194
+ "pisell2.text.add-client": "Add customer"
193
195
  },
194
196
  "zh-CN": {
195
197
  "pisell2.text.refunded-amount": "已退金额",
@@ -362,7 +364,9 @@ var locales_default = {
362
364
  "page.booking.text.unavailable": "不可用",
363
365
  "page.booking.text.available": "可用",
364
366
  "page.booking.text.fully-booked": "已约满",
365
- "page.booking.text.unlimited": "无限制"
367
+ "page.booking.text.unlimited": "无限制",
368
+ "pisell2.text.actions": "操作选项",
369
+ "pisell2.text.add-client": "添加客户"
366
370
  },
367
371
  "zh-HK": {
368
372
  "pisell2.text.refunded-amount": "已退金額",
@@ -535,6 +539,8 @@ var locales_default = {
535
539
  "page.booking.text.unavailable": "不可用",
536
540
  "page.booking.text.available": "可用",
537
541
  "page.booking.text.fully-booked": "已約滿",
538
- "page.booking.text.unlimited": "無限制"
542
+ "page.booking.text.unlimited": "無限制",
543
+ "pisell2.text.actions": "操作選項",
544
+ "pisell2.text.add-client": "添加客戶"
539
545
  }
540
546
  };
@@ -89,6 +89,8 @@ export interface FormState {
89
89
  productIds: number[];
90
90
  };
91
91
  disableEventBookingEdit?: boolean;
92
+ /** 关闭自动打开选择服务弹窗 */
93
+ closeAutoOpenService?: boolean;
92
94
  }
93
95
  export declare const walkInData: {
94
96
  id: number;
package/lib/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export { default as BookingResources } from './components/booking/materiels/reso
11
11
  export { default as BookingStartTime } from './components/booking/materiels/startTime';
12
12
  export { default as BookingDuration } from './components/booking/materiels/duration';
13
13
  export { default as BookingContacts } from './components/booking/materiels/contacts';
14
+ export { VerticalClient } from './components/booking/info/clientVariant';
14
15
  export { default as ProductExtension } from './components/productExtension';
15
16
  export { default as BookingDeposit } from './components/booking/deposit';
16
17
  export { default as RuleSetting } from './components/ruleSetting';
package/lib/index.js CHANGED
@@ -44,7 +44,8 @@ __export(src_exports, {
44
44
  ProductExtension: () => import_productExtension.default,
45
45
  RuleSetting: () => import_ruleSetting.default,
46
46
  Schedules: () => import_schedules.default,
47
- TaxSelect: () => import_taxSelect.default
47
+ TaxSelect: () => import_taxSelect.default,
48
+ VerticalClient: () => import_clientVariant.VerticalClient
48
49
  });
49
50
  module.exports = __toCommonJS(src_exports);
50
51
  var import_weekday = __toESM(require("dayjs/plugin/weekday"));
@@ -62,6 +63,7 @@ var import_resources = __toESM(require("./components/booking/materiels/resources
62
63
  var import_startTime = __toESM(require("./components/booking/materiels/startTime"));
63
64
  var import_duration = __toESM(require("./components/booking/materiels/duration"));
64
65
  var import_contacts = __toESM(require("./components/booking/materiels/contacts"));
66
+ var import_clientVariant = require("./components/booking/info/clientVariant");
65
67
  var import_productExtension = __toESM(require("./components/productExtension"));
66
68
  var import_deposit = __toESM(require("./components/booking/deposit"));
67
69
  var import_ruleSetting = __toESM(require("./components/ruleSetting"));
@@ -85,5 +87,6 @@ import_dayjs.default.extend(import_localeData.default);
85
87
  ProductExtension,
86
88
  RuleSetting,
87
89
  Schedules,
88
- TaxSelect
90
+ TaxSelect,
91
+ VerticalClient
89
92
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.78",
3
+ "version": "3.0.80",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -58,7 +58,7 @@
58
58
  "ahooks": "^3.7.6",
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
- "@pisell/icon": "0.0.8",
61
+ "@pisell/icon": "0.0.11",
62
62
  "@pisell/utils": "1.0.25",
63
63
  "@pisell/date-picker": "1.0.74"
64
64
  },