@pisell/private-materials 3.0.80 → 3.0.82

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 (69) 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 +0 -2
  13. package/es/components/booking/components/customSelect/index.js +1 -6
  14. package/es/components/booking/components/drawer/index.d.ts +0 -1
  15. package/es/components/booking/components/drawer/index.js +2 -4
  16. package/es/components/booking/components/footer/index.js +1 -0
  17. package/es/components/booking/info/client/index.js +0 -3
  18. package/es/components/booking/info/index.js +1 -1
  19. package/es/components/booking/info/pet/index.d.ts +1 -10
  20. package/es/components/booking/info/pet/index.js +14 -22
  21. package/es/components/booking/info/service/addService/index.d.ts +2 -2
  22. package/es/components/booking/info/service/addService/index.js +35 -35
  23. package/es/components/booking/info/utils.d.ts +0 -1
  24. package/es/components/booking/info/utils.js +0 -12
  25. package/es/components/booking/locales.d.ts +0 -6
  26. package/es/components/booking/locales.js +3 -9
  27. package/es/components/booking/model.d.ts +0 -2
  28. package/es/index.d.ts +0 -1
  29. package/es/index.js +0 -1
  30. package/lib/components/booking/components/addButton/index.js +2 -2
  31. package/lib/components/booking/components/customSelect/index.d.ts +0 -2
  32. package/lib/components/booking/components/customSelect/index.js +1 -6
  33. package/lib/components/booking/components/drawer/index.d.ts +0 -1
  34. package/lib/components/booking/components/drawer/index.js +2 -2
  35. package/lib/components/booking/components/footer/index.js +1 -0
  36. package/lib/components/booking/info/client/index.js +1 -2
  37. package/lib/components/booking/info/index.js +1 -1
  38. package/lib/components/booking/info/pet/index.d.ts +1 -10
  39. package/lib/components/booking/info/pet/index.js +8 -15
  40. package/lib/components/booking/info/service/addService/index.d.ts +2 -2
  41. package/lib/components/booking/info/service/addService/index.js +4 -2
  42. package/lib/components/booking/info/utils.d.ts +0 -1
  43. package/lib/components/booking/info/utils.js +2 -16
  44. package/lib/components/booking/locales.d.ts +0 -6
  45. package/lib/components/booking/locales.js +3 -9
  46. package/lib/components/booking/model.d.ts +0 -2
  47. package/lib/index.d.ts +0 -1
  48. package/lib/index.js +2 -5
  49. package/package.json +1 -1
  50. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -39
  51. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +0 -378
  52. package/es/components/booking/info/clientVariant/index.d.ts +0 -1
  53. package/es/components/booking/info/clientVariant/index.js +0 -1
  54. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -22
  55. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +0 -321
  56. package/es/components/booking/info/clientVariant/vertical/SelectDrawer.less +0 -66
  57. package/es/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
  58. package/es/components/booking/info/clientVariant/vertical/index.js +0 -205
  59. package/es/components/booking/info/clientVariant/vertical/index.less +0 -61
  60. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -39
  61. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +0 -308
  62. package/lib/components/booking/info/clientVariant/index.d.ts +0 -1
  63. package/lib/components/booking/info/clientVariant/index.js +0 -39
  64. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.d.ts +0 -22
  65. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +0 -344
  66. package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.less +0 -66
  67. package/lib/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
  68. package/lib/components/booking/info/clientVariant/vertical/index.js +0 -230
  69. package/lib/components/booking/info/clientVariant/vertical/index.less +0 -61
@@ -5,7 +5,6 @@ export interface PisellDrawerProps extends DrawerProps {
5
5
  header?: React.ReactNode;
6
6
  titleNoWrap?: boolean;
7
7
  hideScrollBar?: boolean;
8
- showGoBack?: boolean;
9
8
  }
10
9
  /**
11
10
  * @title: 自定义抽屉
@@ -38,7 +38,7 @@ var import_ArrowLeft = __toESM(require("@pisell/icon/es/ArrowLeft"));
38
38
  var import_index = require("./index.less");
39
39
  var import_classnames = __toESM(require("classnames"));
40
40
  var Drawer = (props) => {
41
- const { hideScrollBar = true, showGoBack = true } = props;
41
+ const { hideScrollBar = true } = props;
42
42
  return /* @__PURE__ */ import_react.default.createElement(
43
43
  import_antd.Drawer,
44
44
  {
@@ -54,7 +54,7 @@ var Drawer = (props) => {
54
54
  push: false,
55
55
  mask: false
56
56
  },
57
- /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__booking-drawer-title-wrap") }, showGoBack && /* @__PURE__ */ import_react.default.createElement(
57
+ /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__booking-drawer-title-wrap") }, /* @__PURE__ */ import_react.default.createElement(
58
58
  import_ArrowLeft.default,
59
59
  {
60
60
  className: "pisell-lowcode__booking-drawer-back",
@@ -330,6 +330,7 @@ var Footer = (props) => {
330
330
  customer = (res == null ? void 0 : res.customer_id) ? { id: res == null ? void 0 : res.customer_id } : state.bookingDetail.customer;
331
331
  }
332
332
  if (e.key === "sendMail") {
333
+ console.log(e);
333
334
  state.action({
334
335
  type: "pisell1.sendPayLinkEmail",
335
336
  data: {
@@ -276,8 +276,7 @@ var Info = () => {
276
276
  return;
277
277
  }
278
278
  handleOpenClientModal();
279
- },
280
- style: state.bookingId ? {} : { marginTop: 16 }
279
+ }
281
280
  },
282
281
  /* @__PURE__ */ import_react.default.createElement(
283
282
  import_antd.Avatar,
@@ -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: 0 } });
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 } });
113
113
  }, [
114
114
  globalState == null ? void 0 : globalState.bookingId,
115
115
  modal.state,
@@ -1,13 +1,4 @@
1
1
  import React from "react";
2
2
  import "./index.less";
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;
3
+ declare const Pet: () => React.JSX.Element;
13
4
  export default Pet;
@@ -48,18 +48,15 @@ var defaultParams = {
48
48
  total: 0,
49
49
  keyword: ""
50
50
  };
51
- var Pet = (props) => {
51
+ var Pet = () => {
52
52
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
53
- const { hideTitle, addButtonProps, handleOpenModal, clientChangeNotSetPet } = props;
54
53
  const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
55
54
  const [loading, setLoading] = (0, import_react.useState)(false);
56
- let { state, dispatch } = (0, import_react.useContext)(import_model.Context);
55
+ const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
57
56
  const [valueLoading, setValueLoading] = (0, import_react.useState)(false);
58
57
  const context = (0, import_useEngineContext.default)();
59
58
  const { isTerminal } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
60
59
  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);
63
60
  const boardParams = (0, import_react.useMemo)(() => {
64
61
  var _a2, _b2, _c2;
65
62
  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) || {};
@@ -235,8 +232,6 @@ var Pet = (props) => {
235
232
  };
236
233
  (0, import_react.useEffect)(() => {
237
234
  var _a2, _b2, _c2, _d2;
238
- if (clientChangeNotSetPet)
239
- return;
240
235
  let changeFormValuesData = (0, import_format.changeFormValues)({
241
236
  values: ((_a2 = state.pet) == null ? void 0 : _a2.value) || {},
242
237
  clientId: (_c2 = (_b2 = state.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id,
@@ -248,7 +243,7 @@ var Pet = (props) => {
248
243
  payload: { value: changeFormValuesData }
249
244
  });
250
245
  });
251
- }, [(_f = state.client.value) == null ? void 0 : _f.id, clientChangeNotSetPet]);
246
+ }, [(_f = state.client.value) == null ? void 0 : _f.id]);
252
247
  const handleUpdateForm = () => {
253
248
  if (state.bookingId) {
254
249
  if (!state.bookingDetail) {
@@ -268,9 +263,9 @@ var Pet = (props) => {
268
263
  state.bookingDetail,
269
264
  boardParams.form_id,
270
265
  boardParams.type,
266
+ (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id,
271
267
  state.renderType,
272
- petForm,
273
- clientChangeNotSetPet ? (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id : void 0
268
+ petForm
274
269
  ]);
275
270
  const addCallback = (_params) => {
276
271
  var _a2, _b2;
@@ -306,7 +301,7 @@ var Pet = (props) => {
306
301
  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(
307
302
  import_forms.default,
308
303
  {
309
- hideTitle,
304
+ hideTitle: true,
310
305
  watch: { value: state.pet.value },
311
306
  addCallback: () => {
312
307
  addCallback();
@@ -333,8 +328,7 @@ var Pet = (props) => {
333
328
  loadMore,
334
329
  filterItem: () => {
335
330
  return true;
336
- },
337
- handleOpenModal
331
+ }
338
332
  },
339
333
  optionRender: (item) => {
340
334
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
@@ -374,8 +368,7 @@ var Pet = (props) => {
374
368
  showDisabledMessage: !state.disableEventBookingEdit,
375
369
  addCallback: async () => {
376
370
  addCallback();
377
- },
378
- ...addButtonProps
371
+ }
379
372
  }
380
373
  }
381
374
  )));
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  declare const Info: () => React.JSX.Element;
4
4
  export default Info;
@@ -58,7 +58,9 @@ var shopList = [
58
58
  6087,
59
59
  6303,
60
60
  6080,
61
- 6978
61
+ 6978,
62
+ 7386,
63
+ 6848
62
64
  ];
63
65
  var Info = () => {
64
66
  var _a, _b, _c, _d;
@@ -233,7 +235,7 @@ var Info = () => {
233
235
  var _a2, _b2, _c2, _d2, _e, _f, _g;
234
236
  if (shopList.includes(
235
237
  (_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
- ) || state.closeAutoOpenService) {
238
+ )) {
237
239
  return;
238
240
  }
239
241
  if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_g = (_f = state.service) == null ? void 0 : _f.value) == null ? void 0 : _g.length) === 0) {
@@ -1,2 +1 @@
1
1
  export declare const getIsBundleOrCombination: (productDetail: any) => boolean;
2
- export declare const uniqueByField: (arr: any[], field: string) => any[];
@@ -19,8 +19,7 @@ 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,
23
- uniqueByField: () => uniqueByField
22
+ getIsBundleOrCombination: () => getIsBundleOrCombination
24
23
  });
25
24
  module.exports = __toCommonJS(utils_exports);
26
25
  var getIsBundleOrCombination = (productDetail) => {
@@ -30,20 +29,7 @@ var getIsBundleOrCombination = (productDetail) => {
30
29
  }
31
30
  return false;
32
31
  };
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
- };
45
32
  // Annotate the CommonJS export names for ESM import in node:
46
33
  0 && (module.exports = {
47
- getIsBundleOrCombination,
48
- uniqueByField
34
+ getIsBundleOrCombination
49
35
  });
@@ -157,8 +157,6 @@ 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;
162
160
  };
163
161
  'zh-CN': {
164
162
  'pisell2.text.refunded-amount': string;
@@ -318,8 +316,6 @@ declare const _default: {
318
316
  'page.booking.text.available': string;
319
317
  'page.booking.text.fully-booked': string;
320
318
  'page.booking.text.unlimited': string;
321
- "pisell2.text.actions": string;
322
- "pisell2.text.add-client": string;
323
319
  };
324
320
  'zh-HK': {
325
321
  'pisell2.text.refunded-amount': string;
@@ -479,8 +475,6 @@ declare const _default: {
479
475
  'page.booking.text.available': string;
480
476
  'page.booking.text.fully-booked': string;
481
477
  'page.booking.text.unlimited': string;
482
- "pisell2.text.actions": string;
483
- "pisell2.text.add-client": string;
484
478
  };
485
479
  };
486
480
  export default _default;
@@ -189,9 +189,7 @@ 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.",
193
- "pisell2.text.actions": "Actions",
194
- "pisell2.text.add-client": "Add customer"
192
+ "pisell2.text.terminal-edit-message": "This operation cannot be performed. To proceed, please use the Pisell Terminal."
195
193
  },
196
194
  "zh-CN": {
197
195
  "pisell2.text.refunded-amount": "已退金额",
@@ -364,9 +362,7 @@ var locales_default = {
364
362
  "page.booking.text.unavailable": "不可用",
365
363
  "page.booking.text.available": "可用",
366
364
  "page.booking.text.fully-booked": "已约满",
367
- "page.booking.text.unlimited": "无限制",
368
- "pisell2.text.actions": "操作选项",
369
- "pisell2.text.add-client": "添加客户"
365
+ "page.booking.text.unlimited": "无限制"
370
366
  },
371
367
  "zh-HK": {
372
368
  "pisell2.text.refunded-amount": "已退金額",
@@ -539,8 +535,6 @@ var locales_default = {
539
535
  "page.booking.text.unavailable": "不可用",
540
536
  "page.booking.text.available": "可用",
541
537
  "page.booking.text.fully-booked": "已約滿",
542
- "page.booking.text.unlimited": "無限制",
543
- "pisell2.text.actions": "操作選項",
544
- "pisell2.text.add-client": "添加客戶"
538
+ "page.booking.text.unlimited": "無限制"
545
539
  }
546
540
  };
@@ -89,8 +89,6 @@ export interface FormState {
89
89
  productIds: number[];
90
90
  };
91
91
  disableEventBookingEdit?: boolean;
92
- /** 关闭自动打开选择服务弹窗 */
93
- closeAutoOpenService?: boolean;
94
92
  }
95
93
  export declare const walkInData: {
96
94
  id: number;
package/lib/index.d.ts CHANGED
@@ -11,7 +11,6 @@ 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';
15
14
  export { default as ProductExtension } from './components/productExtension';
16
15
  export { default as BookingDeposit } from './components/booking/deposit';
17
16
  export { default as RuleSetting } from './components/ruleSetting';
package/lib/index.js CHANGED
@@ -44,8 +44,7 @@ __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,
48
- VerticalClient: () => import_clientVariant.VerticalClient
47
+ TaxSelect: () => import_taxSelect.default
49
48
  });
50
49
  module.exports = __toCommonJS(src_exports);
51
50
  var import_weekday = __toESM(require("dayjs/plugin/weekday"));
@@ -63,7 +62,6 @@ var import_resources = __toESM(require("./components/booking/materiels/resources
63
62
  var import_startTime = __toESM(require("./components/booking/materiels/startTime"));
64
63
  var import_duration = __toESM(require("./components/booking/materiels/duration"));
65
64
  var import_contacts = __toESM(require("./components/booking/materiels/contacts"));
66
- var import_clientVariant = require("./components/booking/info/clientVariant");
67
65
  var import_productExtension = __toESM(require("./components/productExtension"));
68
66
  var import_deposit = __toESM(require("./components/booking/deposit"));
69
67
  var import_ruleSetting = __toESM(require("./components/ruleSetting"));
@@ -87,6 +85,5 @@ import_dayjs.default.extend(import_localeData.default);
87
85
  ProductExtension,
88
86
  RuleSetting,
89
87
  Schedules,
90
- TaxSelect,
91
- VerticalClient
88
+ TaxSelect
92
89
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.0.80",
3
+ "version": "3.0.82",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- import { FormState } from "../../../model";
3
- interface useClientFnParams {
4
- state: any;
5
- setGlobalState: (val: any) => void;
6
- modalRef: any;
7
- }
8
- declare const useClientFn: (_params: useClientFnParams) => {
9
- setClient: (client: Partial<FormState["client"]>) => void;
10
- isWalkIn: boolean;
11
- handleSelectClient: (value: any) => Promise<unknown>;
12
- menuChange: (e: any) => void;
13
- handleViewClient: () => void;
14
- menus: {
15
- key: string;
16
- label: any;
17
- }[];
18
- handleCreateItem: () => void;
19
- getClients: ({ customer_id, ...resetParams }: {
20
- customer_id?: number | undefined;
21
- skip?: number | undefined;
22
- search?: string | undefined;
23
- with?: string[] | undefined;
24
- relation_form_id?: number | undefined;
25
- }) => Promise<{}>;
26
- params: {
27
- skip: number;
28
- num: number;
29
- total: number;
30
- search: string;
31
- with: string[];
32
- relation_form_id: any;
33
- };
34
- searchChange: (search: string) => void;
35
- loading: boolean;
36
- loadMore: React.JSX.Element | null;
37
- handleOpenClientModal: () => void;
38
- };
39
- export default useClientFn;