@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
@@ -12,7 +12,7 @@ import PlusCircle from "@pisell/icon/es/PlusCircle";
12
12
  import "./index.less";
13
13
  import classNames from "classnames";
14
14
  import { message, Skeleton } from "antd";
15
- import { isFunction, locales } from "@pisell/utils";
15
+ import { locales } from "@pisell/utils";
16
16
  var AddButton = function AddButton(_ref) {
17
17
  var onClick = _ref.onClick,
18
18
  showSub = _ref.showSub,
@@ -48,7 +48,7 @@ var AddButton = function AddButton(_ref) {
48
48
  return /*#__PURE__*/React.createElement(React.Fragment, null, showSub ? /*#__PURE__*/React.createElement("div", {
49
49
  className: "pisell-lowcode__booking-add-button-add-row",
50
50
  onClick: _onClick,
51
- style: isFunction(style) ? style(showSub) : style
51
+ style: style
52
52
  }, /*#__PURE__*/React.createElement(PlusCircle, {
53
53
  className: "pisell-lowcode__booking-add-button-add-row-icon"
54
54
  }), /*#__PURE__*/React.createElement("span", {
@@ -58,7 +58,7 @@ var AddButton = function AddButton(_ref) {
58
58
  "pisell-lowcode__booking-add-button-add-disabled": disabled
59
59
  }),
60
60
  onClick: _onClick,
61
- style: isFunction(style) ? style(showSub) : style
61
+ style: style
62
62
  }, /*#__PURE__*/React.createElement("span", {
63
63
  className: "pisell-lowcode__booking-add-button-add-label"
64
64
  }, title), /*#__PURE__*/React.createElement(ChevronRight, {
@@ -29,8 +29,6 @@ interface CustomSelectProps {
29
29
  modalOpen?: boolean;
30
30
  closeCallback?: () => any;
31
31
  autoFocus?: boolean;
32
- showDropDown?: boolean;
33
- handleOpenModal: () => void;
34
32
  }
35
33
  declare const _default: React.ForwardRefExoticComponent<CustomSelectProps & React.RefAttributes<unknown>>;
36
34
  export default _default;
@@ -70,8 +70,7 @@ var CustomSelect = function CustomSelect(props, ref) {
70
70
  closeCallback = props.closeCallback,
71
71
  autoFocus = props.autoFocus,
72
72
  _props$showDropDown = props.showDropDown,
73
- showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown,
74
- propsHandleOpenModal = props.handleOpenModal;
73
+ showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown;
75
74
  var searchRef = useRef();
76
75
 
77
76
  // 当前选择的值
@@ -153,10 +152,6 @@ var CustomSelect = function CustomSelect(props, ref) {
153
152
  if (disabled) {
154
153
  return;
155
154
  }
156
- if (propsHandleOpenModal) {
157
- propsHandleOpenModal();
158
- return;
159
- }
160
155
  if (addButtonProps !== null && addButtonProps !== void 0 && addButtonProps.addCallback) {
161
156
  addButtonProps === null || addButtonProps === void 0 ? void 0 : addButtonProps.addCallback();
162
157
  }
@@ -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: 自定义抽屉
@@ -14,9 +14,7 @@ import classNames from "classnames";
14
14
  */
15
15
  var Drawer = function Drawer(props) {
16
16
  var _props$hideScrollBar = props.hideScrollBar,
17
- hideScrollBar = _props$hideScrollBar === void 0 ? true : _props$hideScrollBar,
18
- _props$showGoBack = props.showGoBack,
19
- showGoBack = _props$showGoBack === void 0 ? true : _props$showGoBack;
17
+ hideScrollBar = _props$hideScrollBar === void 0 ? true : _props$hideScrollBar;
20
18
  return /*#__PURE__*/React.createElement(OriginDrawer, _extends({
21
19
  width: "600px",
22
20
  closable: false,
@@ -33,7 +31,7 @@ var Drawer = function Drawer(props) {
33
31
  mask: false
34
32
  }), /*#__PURE__*/React.createElement("div", {
35
33
  className: classNames("pisell-lowcode__booking-drawer-title-wrap")
36
- }, showGoBack && /*#__PURE__*/React.createElement(ArrowLeft, {
34
+ }, /*#__PURE__*/React.createElement(ArrowLeft, {
37
35
  className: "pisell-lowcode__booking-drawer-back",
38
36
  onClick: function onClick(e) {
39
37
  var _props$onClose;
@@ -547,6 +547,7 @@ var Footer = function Footer(props) {
547
547
  } : state.bookingDetail.customer;
548
548
  case 8:
549
549
  if (e.key === "sendMail") {
550
+ console.log(e);
550
551
  state.action({
551
552
  type: "pisell1.sendPayLinkEmail",
552
553
  data: {
@@ -371,9 +371,6 @@ var Info = function Info() {
371
371
  return;
372
372
  }
373
373
  handleOpenClientModal();
374
- },
375
- style: state.bookingId ? {} : {
376
- marginTop: 16
377
374
  }
378
375
  }, /*#__PURE__*/React.createElement(Avatar, {
379
376
  className: "pisell-lowcode__booking-client-list-item-avatar",
@@ -93,7 +93,7 @@ var Info = Provider(function (props) {
93
93
  }) : /*#__PURE__*/React.createElement("div", {
94
94
  className: "",
95
95
  style: {
96
- height: 0
96
+ height: 20
97
97
  }
98
98
  });
99
99
  }, [globalState === null || globalState === void 0 ? void 0 : globalState.bookingId, modal.state, modal.dispatch, globalState === null || globalState === void 0 ? void 0 : globalState.renderType]);
@@ -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;
@@ -34,12 +34,8 @@ var defaultParams = {
34
34
  total: 0,
35
35
  keyword: ""
36
36
  };
37
- var Pet = function Pet(props) {
38
- var _context$appHelper, _state2, _state2$bookingConfig, _state2$bookingConfig2, _state2$bookingConfig3, _state$bookingConfig3, _state$client$value2, _state$client8, _state$client8$value, _state$pet5, _state$pet5$formData, _state$pet5$formData$, _state$pet5$formData$2, _state$client9;
39
- var hideTitle = props.hideTitle,
40
- addButtonProps = props.addButtonProps,
41
- handleOpenModal = props.handleOpenModal,
42
- clientChangeNotSetPet = props.clientChangeNotSetPet;
37
+ var Pet = function Pet() {
38
+ var _context$appHelper, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$bookingConfig6, _state$client$value2, _state$client8, _state$client8$value, _state$pet5, _state$pet5$formData, _state$pet5$formData$, _state$pet5$formData$2, _state$client9;
43
39
  var _useState = useState(false),
44
40
  _useState2 = _slicedToArray(_useState, 2),
45
41
  loadLoading = _useState2[0],
@@ -62,13 +58,11 @@ var Pet = function Pet(props) {
62
58
  _useState8 = _slicedToArray(_useState7, 2),
63
59
  params = _useState8[0],
64
60
  setParams = _useState8[1];
65
- state = state || (props === null || props === void 0 ? void 0 : props.state);
66
- dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
67
61
  // board设置, 获取预约主体
68
62
  var boardParams = useMemo(function () {
69
- var _state, _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
70
- return ((_state = state) === null || _state === void 0 ? void 0 : (_state$bookingConfig = _state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : _state$bookingConfig$2.appointment_subject) || {};
71
- }, [(_state2 = state) === null || _state2 === void 0 ? void 0 : (_state2$bookingConfig = _state2.bookingConfig) === null || _state2$bookingConfig === void 0 ? void 0 : (_state2$bookingConfig2 = _state2$bookingConfig.config) === null || _state2$bookingConfig2 === void 0 ? void 0 : (_state2$bookingConfig3 = _state2$bookingConfig2.basic) === null || _state2$bookingConfig3 === void 0 ? void 0 : _state2$bookingConfig3.appointment_subject]);
63
+ var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
64
+ return (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : _state$bookingConfig$2.appointment_subject) || {};
65
+ }, [state === null || state === void 0 ? void 0 : (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : (_state$bookingConfig3 = _state$bookingConfig2.config) === null || _state$bookingConfig3 === void 0 ? void 0 : (_state$bookingConfig4 = _state$bookingConfig3.basic) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.appointment_subject]);
72
66
 
73
67
  /**
74
68
  * @title: 预约主体
@@ -79,8 +73,8 @@ var Pet = function Pet(props) {
79
73
  * @Date: 2024-01-27 14:22
80
74
  */
81
75
  var petForm = useMemo(function () {
82
- var _state$bookingConfig2;
83
- var _holder = (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.holder;
76
+ var _state$bookingConfig5;
77
+ var _holder = (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : _state$bookingConfig5.holder;
84
78
  if (!_holder) {
85
79
  return null;
86
80
  }
@@ -91,7 +85,7 @@ var Pet = function Pet(props) {
91
85
  relation_type: "appointment_booking",
92
86
  form_record: []
93
87
  });
94
- }, [(_state$bookingConfig3 = state.bookingConfig) === null || _state$bookingConfig3 === void 0 ? void 0 : _state$bookingConfig3.holder]);
88
+ }, [(_state$bookingConfig6 = state.bookingConfig) === null || _state$bookingConfig6 === void 0 ? void 0 : _state$bookingConfig6.holder]);
95
89
 
96
90
  /**
97
91
  * @title: 获取表单数据
@@ -351,7 +345,6 @@ var Pet = function Pet(props) {
351
345
  // 当客户id 发生改变时, 检测当前表单是否是该客户的, 如果不是则移除
352
346
  useEffect(function () {
353
347
  var _state$pet, _state$client7, _state$client7$value, _state$pet2;
354
- if (clientChangeNotSetPet) return;
355
348
  var changeFormValuesData = changeFormValues({
356
349
  values: ((_state$pet = state.pet) === null || _state$pet === void 0 ? void 0 : _state$pet.value) || {},
357
350
  clientId: (_state$client7 = state.client) === null || _state$client7 === void 0 ? void 0 : (_state$client7$value = _state$client7.value) === null || _state$client7$value === void 0 ? void 0 : _state$client7$value.id,
@@ -365,7 +358,7 @@ var Pet = function Pet(props) {
365
358
  }
366
359
  });
367
360
  });
368
- }, [(_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id, clientChangeNotSetPet]);
361
+ }, [(_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id]);
369
362
  var handleUpdateForm = function handleUpdateForm() {
370
363
  if (state.bookingId) {
371
364
  // 编辑时 必须获取详情后在获取预约主体信息
@@ -383,7 +376,7 @@ var Pet = function Pet(props) {
383
376
  setTimeout(function () {
384
377
  handleUpdateForm();
385
378
  }, 10);
386
- }, [state.bookingId, state.bookingDetail, boardParams.form_id, boardParams.type, state.renderType, petForm, clientChangeNotSetPet ? (_state$client8 = state.client) === null || _state$client8 === void 0 ? void 0 : (_state$client8$value = _state$client8.value) === null || _state$client8$value === void 0 ? void 0 : _state$client8$value.id : undefined]);
379
+ }, [state.bookingId, state.bookingDetail, boardParams.form_id, boardParams.type, (_state$client8 = state.client) === null || _state$client8 === void 0 ? void 0 : (_state$client8$value = _state$client8.value) === null || _state$client8$value === void 0 ? void 0 : _state$client8$value.id, state.renderType, petForm]);
387
380
  var _addCallback = function addCallback(_params) {
388
381
  var _state$pet3, _state$pet3$formData;
389
382
  var _formData = (_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : (_state$pet3$formData = _state$pet3.formData) === null || _state$pet3$formData === void 0 ? void 0 : _state$pet3$formData[0];
@@ -427,7 +420,7 @@ var Pet = function Pet(props) {
427
420
  active: true,
428
421
  round: true
429
422
  }, /*#__PURE__*/React.createElement(FormsCom, {
430
- hideTitle: hideTitle,
423
+ hideTitle: true,
431
424
  watch: {
432
425
  value: state.pet.value
433
426
  },
@@ -456,8 +449,7 @@ var Pet = function Pet(props) {
456
449
  loadMore: loadMore,
457
450
  filterItem: function filterItem() {
458
451
  return true;
459
- },
460
- handleOpenModal: handleOpenModal
452
+ }
461
453
  },
462
454
  optionRender: function optionRender(item) {
463
455
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
@@ -492,7 +484,7 @@ var Pet = function Pet(props) {
492
484
  }
493
485
  }, locales.getText("pisell2.text.edit"))));
494
486
  },
495
- addButtonProps: _objectSpread({
487
+ addButtonProps: {
496
488
  style: {
497
489
  margin: 0
498
490
  },
@@ -515,7 +507,7 @@ var Pet = function Pet(props) {
515
507
  }
516
508
  return addCallback;
517
509
  }()
518
- }, addButtonProps)
510
+ }
519
511
  })));
520
512
  };
521
513
  export default Pet;
@@ -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;
@@ -17,25 +17,25 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
17
17
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
18
18
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
- import React, { useContext, useEffect, useMemo, useState, useRef } from "react";
21
- import SearchLg from "@pisell/icon/es/SearchLg";
20
+ import React, { useContext, useEffect, useMemo, useState, useRef } from 'react';
21
+ import SearchLg from '@pisell/icon/es/SearchLg';
22
22
  import Drawer from "../../../components/drawer";
23
23
  import TabProduct from "../../../components/TabProduct";
24
24
  import { Context } from "../../model";
25
25
  import AddButton from "../../../components/addButton";
26
- import { Input, Skeleton } from "antd";
26
+ import { Input, Skeleton } from 'antd';
27
27
  import "./index.less";
28
28
  import useEngineContext from "../../../../../hooks/useEngineContext";
29
29
  import { getProductDetail } from "../serve";
30
30
  import { getIsBundleOrCombination } from "../../utils";
31
31
  import { getProductExtend } from "./utils";
32
32
  import { formatProductListByCategory, getProductTotalPrice, request } from "../../../utils";
33
- import { locales, getUniqueId } from "@pisell/utils";
34
- import { useUpdateEffect } from "ahooks";
35
- var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978];
33
+ import { locales, getUniqueId } from '@pisell/utils';
34
+ import { useUpdateEffect } from 'ahooks';
35
+ var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848];
36
36
  var Info = function Info() {
37
37
  var _state$service3, _state$service5, _state$service6, _state$service6$cache;
38
- var _useState = useState(""),
38
+ var _useState = useState(''),
39
39
  _useState2 = _slicedToArray(_useState, 2),
40
40
  search = _useState2[0],
41
41
  setSearch = _useState2[1];
@@ -64,7 +64,7 @@ var Info = function Info() {
64
64
  return _regeneratorRuntime().wrap(function _callee$(_context) {
65
65
  while (1) switch (_context.prev = _context.next) {
66
66
  case 0:
67
- if (!(state.renderType !== "eventBooking")) {
67
+ if (!(state.renderType !== 'eventBooking')) {
68
68
  _context.next = 2;
69
69
  break;
70
70
  }
@@ -93,7 +93,7 @@ var Info = function Info() {
93
93
  product = list[0];
94
94
  _context.next = 13;
95
95
  return getProductDetail(product.id, {
96
- schedule_date: state.date.value.format("YYYY-MM-DD")
96
+ schedule_date: state.date.value.format('YYYY-MM-DD')
97
97
  });
98
98
  case 13:
99
99
  detail = _context.sent;
@@ -115,7 +115,7 @@ var Info = function Info() {
115
115
  start_date: state.date.value,
116
116
  startDate: state.date.value,
117
117
  endDate: state.date.value,
118
- start_time: "00:00:00",
118
+ start_time: '00:00:00',
119
119
  duration: 10,
120
120
  quantity: 1,
121
121
  price: product.price,
@@ -126,7 +126,7 @@ var Info = function Info() {
126
126
  });
127
127
  _list.push(_item);
128
128
  dispatch({
129
- type: "setService",
129
+ type: 'setService',
130
130
  payload: {
131
131
  value: _list,
132
132
  edit: true
@@ -154,12 +154,12 @@ var Info = function Info() {
154
154
  return state.apis.getServices({
155
155
  skip: 1,
156
156
  num: 500,
157
- extension_type: state.renderType === "eventBooking" ? undefined : ["product_appointment", "appointment_ticket"],
158
- with: ["category"],
159
- ids: state.renderType === "eventBooking" ? (_state$eventOtherPara = state.eventOtherParams) === null || _state$eventOtherPara === void 0 ? void 0 : _state$eventOtherPara.productIds : undefined,
157
+ extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket'],
158
+ with: ['category'],
159
+ ids: state.renderType === 'eventBooking' ? (_state$eventOtherPara = state.eventOtherParams) === null || _state$eventOtherPara === void 0 ? void 0 : _state$eventOtherPara.productIds : undefined,
160
160
  open_quotation: 1,
161
161
  with_schedule: 1,
162
- with_count: ["bundleGroup", "optionGroup"],
162
+ with_count: ['bundleGroup', 'optionGroup'],
163
163
  _config: {
164
164
  useCache: true
165
165
  }
@@ -173,7 +173,7 @@ var Info = function Info() {
173
173
  setDefaultService(data === null || data === void 0 ? void 0 : data.list);
174
174
  }
175
175
  dispatch({
176
- type: "setService",
176
+ type: 'setService',
177
177
  payload: {
178
178
  services: (data === null || data === void 0 ? void 0 : data.list) || []
179
179
  }
@@ -190,7 +190,7 @@ var Info = function Info() {
190
190
  }();
191
191
  var handleSelectService = function handleSelectService() {
192
192
  dispatch({
193
- type: "setService",
193
+ type: 'setService',
194
194
  payload: {
195
195
  addModal: true
196
196
  }
@@ -204,12 +204,12 @@ var Info = function Info() {
204
204
  };
205
205
  var handleSelectProduct = function handleSelectProduct(item, type) {
206
206
  // 是否有单规格 组合规格 套餐, 如果没有不需要打开弹窗
207
- var isEject = type === "detail" || item.bundle_group_count > 0;
207
+ var isEject = type === 'detail' || item.bundle_group_count > 0;
208
208
  state.action({
209
- type: "pisell1.handleOpenProductModal",
209
+ type: 'pisell1.handleOpenProductModal',
210
210
  data: {
211
211
  id: item.id,
212
- date: state.date.value.format("YYYY-MM-DD"),
212
+ date: state.date.value.format('YYYY-MM-DD'),
213
213
  showConfig: {
214
214
  option: false,
215
215
  session: false,
@@ -247,14 +247,14 @@ var Info = function Info() {
247
247
  cacheItem: cacheItem,
248
248
  state: state
249
249
  });
250
- if (state.renderType === "eventBooking") {
250
+ if (state.renderType === 'eventBooking') {
251
251
  cacheItem.autoClose = false;
252
252
  } else {
253
253
  var _state$service;
254
254
  cacheItem.autoClose = !_isEdit && (cacheItem._extend.resource || cacheItem._extend.resource === 0 || (((_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.resourcesOrigin) || []).length === 1);
255
255
  }
256
256
  dispatch({
257
- type: "setService",
257
+ type: 'setService',
258
258
  payload: {
259
259
  editModal: true,
260
260
  cacheItem: cacheItem,
@@ -264,7 +264,7 @@ var Info = function Info() {
264
264
  }
265
265
  });
266
266
  };
267
- console.log("state.service.cacheItem", state.service.cacheItem);
267
+ console.log('state.service.cacheItem', state.service.cacheItem);
268
268
  var renderList = useMemo(function () {
269
269
  var _state$service2;
270
270
  var _list = ((_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.services) || [];
@@ -282,12 +282,12 @@ var Info = function Info() {
282
282
  var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _state$service4, _state$service4$value;
283
283
  // Salonip 不要这个
284
284
 
285
- if (shopList.includes((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.global) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id) || state.closeAutoOpenService) {
285
+ if (shopList.includes((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut3 === void 0 ? void 0 : (_context$appHelper$ut4 = _context$appHelper$ut3.global) === null || _context$appHelper$ut4 === void 0 ? void 0 : (_context$appHelper$ut5 = _context$appHelper$ut4.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id)) {
286
286
  return;
287
287
  }
288
288
 
289
289
  // 如果弹窗打开,并且是创建, 则自动打开选择服务的弹窗
290
- if (state.modalOpen && !state.bookingId && state.renderType !== "eventBooking" && ((_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : (_state$service4$value = _state$service4.value) === null || _state$service4$value === void 0 ? void 0 : _state$service4$value.length) === 0) {
290
+ if (state.modalOpen && !state.bookingId && state.renderType !== 'eventBooking' && ((_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : (_state$service4$value = _state$service4.value) === null || _state$service4$value === void 0 ? void 0 : _state$service4$value.length) === 0) {
291
291
  handleSelectService();
292
292
  }
293
293
  }, [state.modalOpen, state.bookingId, (_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : _state$service5.value]);
@@ -297,16 +297,16 @@ var Info = function Info() {
297
297
  useUpdateEffect(function () {
298
298
  if (state.service.addModal) {
299
299
  getServices();
300
- setSearch("");
300
+ setSearch('');
301
301
  }
302
302
  }, [state.service.addModal]);
303
303
  useEffect(function () {
304
- if (state.renderType === "eventBooking" && state.modalOpen) {
304
+ if (state.renderType === 'eventBooking' && state.modalOpen) {
305
305
  getServices();
306
306
  }
307
307
  }, [state.renderType, state.modalOpen]);
308
308
  var addButton = useMemo(function () {
309
- if (state.renderType === "eventBooking") {
309
+ if (state.renderType === 'eventBooking') {
310
310
  return isService ? /*#__PURE__*/React.createElement("div", {
311
311
  style: {
312
312
  height: 20
@@ -314,15 +314,15 @@ var Info = function Info() {
314
314
  }) : /*#__PURE__*/React.createElement(AddButton, {
315
315
  loading: loading,
316
316
  showSub: false,
317
- title: locales.getText("pisell2.text.add-a-service"),
318
- subTitle: locales.getText("pisell2.text.add-another-service"),
317
+ title: locales.getText('pisell2.text.add-a-service'),
318
+ subTitle: locales.getText('pisell2.text.add-another-service'),
319
319
  onClick: handleSelectService
320
320
  });
321
321
  }
322
322
  return showAddButton ? /*#__PURE__*/React.createElement(AddButton, {
323
323
  showSub: isService,
324
- title: locales.getText("pisell2.text.add-a-service"),
325
- subTitle: locales.getText("pisell2.text.add-another-service"),
324
+ title: locales.getText('pisell2.text.add-a-service'),
325
+ subTitle: locales.getText('pisell2.text.add-another-service'),
326
326
  onClick: handleSelectService
327
327
  }) : /*#__PURE__*/React.createElement("div", {
328
328
  style: {
@@ -336,11 +336,11 @@ var Info = function Info() {
336
336
  round: true
337
337
  }), addButton, /*#__PURE__*/React.createElement(Drawer, {
338
338
  open: state.service.addModal,
339
- title: locales.getText("pisell2.text.select-service"),
339
+ title: locales.getText('pisell2.text.select-service'),
340
340
  rootClassName: "booking-server-wrap",
341
341
  onClose: function onClose() {
342
342
  dispatch({
343
- type: "setService",
343
+ type: 'setService',
344
344
  payload: {
345
345
  addModal: false
346
346
  }
@@ -355,7 +355,7 @@ var Info = function Info() {
355
355
  marginTop: 16,
356
356
  height: 44
357
357
  },
358
- placeholder: locales.getText("pisell2.text.search"),
358
+ placeholder: locales.getText('pisell2.text.search'),
359
359
  allowClear: true,
360
360
  value: search,
361
361
  onChange: function onChange(e) {
@@ -1,2 +1 @@
1
1
  export declare const getIsBundleOrCombination: (productDetail: any) => boolean;
2
- export declare const uniqueByField: (arr: any[], field: string) => any[];
@@ -5,16 +5,4 @@ export var getIsBundleOrCombination = function getIsBundleOrCombination(productD
5
5
  return true;
6
6
  }
7
7
  return false;
8
- };
9
- export var uniqueByField = function uniqueByField(arr, field) {
10
- var seen = new Set();
11
- return arr.filter(function (item) {
12
- var fieldValue = item[field];
13
- if (seen.has(fieldValue)) {
14
- return false;
15
- } else {
16
- seen.add(fieldValue);
17
- return true;
18
- }
19
- });
20
8
  };
@@ -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;
@@ -171,9 +171,7 @@ export default {
171
171
  'page.booking.text.available': 'Available',
172
172
  'page.booking.text.fully-booked': 'Fully booked',
173
173
  'page.booking.text.unlimited': 'Unlimited',
174
- 'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the Pisell Terminal.",
175
- "pisell2.text.actions": "Actions",
176
- "pisell2.text.add-client": "Add customer"
174
+ 'pisell2.text.terminal-edit-message': "This operation cannot be performed. To proceed, please use the Pisell Terminal."
177
175
  },
178
176
  'zh-CN': {
179
177
  'pisell2.text.refunded-amount': '已退金额',
@@ -352,9 +350,7 @@ export default {
352
350
  'page.booking.text.unavailable': '不可用',
353
351
  'page.booking.text.available': '可用',
354
352
  'page.booking.text.fully-booked': '已约满',
355
- 'page.booking.text.unlimited': '无限制',
356
- "pisell2.text.actions": "操作选项",
357
- "pisell2.text.add-client": "添加客户"
353
+ 'page.booking.text.unlimited': '无限制'
358
354
  },
359
355
  'zh-HK': {
360
356
  'pisell2.text.refunded-amount': '已退金額',
@@ -533,8 +529,6 @@ export default {
533
529
  'page.booking.text.unavailable': '不可用',
534
530
  'page.booking.text.available': '可用',
535
531
  'page.booking.text.fully-booked': '已約滿',
536
- 'page.booking.text.unlimited': '無限制',
537
- "pisell2.text.actions": "操作選項",
538
- "pisell2.text.add-client": "添加客戶"
532
+ 'page.booking.text.unlimited': '無限制'
539
533
  }
540
534
  };
@@ -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/es/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/es/index.js CHANGED
@@ -15,7 +15,6 @@ export { default as BookingResources } from "./components/booking/materiels/reso
15
15
  export { default as BookingStartTime } from "./components/booking/materiels/startTime";
16
16
  export { default as BookingDuration } from "./components/booking/materiels/duration";
17
17
  export { default as BookingContacts } from "./components/booking/materiels/contacts";
18
- export { VerticalClient } from "./components/booking/info/clientVariant";
19
18
  export { default as ProductExtension } from "./components/productExtension";
20
19
  export { default as BookingDeposit } from "./components/booking/deposit";
21
20
  export { default as RuleSetting } from "./components/ruleSetting";
@@ -68,7 +68,7 @@ var AddButton = ({
68
68
  {
69
69
  className: "pisell-lowcode__booking-add-button-add-row",
70
70
  onClick: _onClick,
71
- style: (0, import_utils.isFunction)(style) ? style(showSub) : style
71
+ style
72
72
  },
73
73
  /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__booking-add-button-add-row-icon" }),
74
74
  /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-add-button-add-row-txt" }, subTitle)
@@ -79,7 +79,7 @@ var AddButton = ({
79
79
  "pisell-lowcode__booking-add-button-add-disabled": disabled
80
80
  }),
81
81
  onClick: _onClick,
82
- style: (0, import_utils.isFunction)(style) ? style(showSub) : style
82
+ style
83
83
  },
84
84
  /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-add-button-add-label" }, title),
85
85
  /* @__PURE__ */ import_react.default.createElement(import_ChevronRight.default, { className: "pisell-lowcode__booking-add-button-add-icon" })
@@ -29,8 +29,6 @@ interface CustomSelectProps {
29
29
  modalOpen?: boolean;
30
30
  closeCallback?: () => any;
31
31
  autoFocus?: boolean;
32
- showDropDown?: boolean;
33
- handleOpenModal: () => void;
34
32
  }
35
33
  declare const _default: React.ForwardRefExoticComponent<CustomSelectProps & React.RefAttributes<unknown>>;
36
34
  export default _default;
@@ -73,8 +73,7 @@ var CustomSelect = (props, ref) => {
73
73
  modalOpen,
74
74
  closeCallback,
75
75
  autoFocus,
76
- showDropDown = true,
77
- handleOpenModal: propsHandleOpenModal
76
+ showDropDown = true
78
77
  } = props;
79
78
  const searchRef = (0, import_react.useRef)();
80
79
  const [_value, set_value] = (0, import_react.useState)([]);
@@ -111,10 +110,6 @@ var CustomSelect = (props, ref) => {
111
110
  if (disabled) {
112
111
  return;
113
112
  }
114
- if (propsHandleOpenModal) {
115
- propsHandleOpenModal();
116
- return;
117
- }
118
113
  if (addButtonProps == null ? void 0 : addButtonProps.addCallback) {
119
114
  addButtonProps == null ? void 0 : addButtonProps.addCallback();
120
115
  }