@pisell/private-materials 3.3.55 → 3.3.56

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 (125) 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 +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/appointmentBooking/assets/resource.svg +1 -0
  12. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Resource/index.js +44 -5
  15. package/es/components/appointmentBooking/hooks.js +218 -177
  16. package/es/components/appointmentBooking/locales.d.ts +3 -0
  17. package/es/components/appointmentBooking/locales.js +9 -0
  18. package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
  19. package/es/components/booking/components/drawer/index.js +4 -2
  20. package/es/components/booking/components/footer/index.d.ts +1 -0
  21. package/es/components/booking/components/voucher/index.js +25 -17
  22. package/es/components/booking/info/client/index.js +2 -1
  23. package/es/components/booking/info/index.d.ts +1 -0
  24. package/es/components/booking/info/pet/index.js +3 -0
  25. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  26. package/es/components/booking/info/service2/utils.js +27 -27
  27. package/es/components/booking/info2/index.js +3 -3
  28. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  29. package/es/components/booking/info2/service/addService/utils.js +5 -2
  30. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  31. package/es/components/booking/info2/service/editService/index.js +1 -0
  32. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  33. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
  34. package/es/components/eventBooking/components/progressBar/index.js +16 -0
  35. package/es/components/eventBooking/index.d.ts +0 -1
  36. package/es/components/pay/toC/PaymentList/index.js +10 -4
  37. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  38. package/es/components/pay/toC/PaymentList/serve.js +7 -1
  39. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -13
  40. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +30 -13
  41. package/es/components/pay/toC/PaymentMethods/index.js +29 -2
  42. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  43. package/es/components/pay/toC/WalletPassBlock/index.less +4 -0
  44. package/es/components/pay/toC/index.js +38 -30
  45. package/es/components/pay/toC/utils.d.ts +6 -0
  46. package/es/components/pay/toC/utils.js +21 -0
  47. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  48. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
  49. package/es/components/productSelect/components/TabProduct/index.js +28 -10
  50. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  51. package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
  52. package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  53. package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  54. package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
  55. package/es/components/productSelect/components/productGroup/index.js +20 -7
  56. package/es/components/productSelect/components/productGroup/index.less +14 -1
  57. package/es/components/productSelect/index.less +1 -2
  58. package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
  59. package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  60. package/es/components/ticketBooking/components/ticketBooking/index.js +3 -1
  61. package/es/components/ticketBooking/index.js +2 -1
  62. package/es/components/ticketBooking/locales.d.ts +3 -0
  63. package/es/components/ticketBooking/locales.js +12 -3
  64. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  65. package/es/components/ticketBooking/utils/index.js +35 -3
  66. package/es/components/wallet/index.js +51 -5
  67. package/lib/components/appointmentBooking/assets/resource.svg +1 -0
  68. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  69. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  70. package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
  71. package/lib/components/appointmentBooking/hooks.js +12 -3
  72. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  73. package/lib/components/appointmentBooking/locales.js +3 -0
  74. package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
  75. package/lib/components/booking/components/drawer/index.js +2 -2
  76. package/lib/components/booking/components/footer/index.d.ts +1 -0
  77. package/lib/components/booking/components/voucher/index.js +31 -27
  78. package/lib/components/booking/info/client/index.js +2 -1
  79. package/lib/components/booking/info/index.d.ts +1 -0
  80. package/lib/components/booking/info/pet/index.js +3 -0
  81. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  82. package/lib/components/booking/info/service2/utils.js +2 -2
  83. package/lib/components/booking/info2/index.js +7 -4
  84. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  85. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  86. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  87. package/lib/components/booking/info2/service/editService/index.js +1 -0
  88. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  89. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
  90. package/lib/components/eventBooking/components/progressBar/index.js +15 -0
  91. package/lib/components/eventBooking/index.d.ts +0 -1
  92. package/lib/components/pay/toC/PaymentList/index.js +11 -6
  93. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  94. package/lib/components/pay/toC/PaymentList/serve.js +5 -2
  95. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +10 -1
  96. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +10 -1
  97. package/lib/components/pay/toC/PaymentMethods/index.js +28 -4
  98. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  99. package/lib/components/pay/toC/WalletPassBlock/index.less +4 -0
  100. package/lib/components/pay/toC/index.js +20 -13
  101. package/lib/components/pay/toC/utils.d.ts +6 -0
  102. package/lib/components/pay/toC/utils.js +15 -0
  103. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  104. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
  105. package/lib/components/productSelect/components/TabProduct/index.js +19 -6
  106. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  107. package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
  108. package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  109. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  110. package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
  111. package/lib/components/productSelect/components/productGroup/index.js +24 -4
  112. package/lib/components/productSelect/components/productGroup/index.less +14 -1
  113. package/lib/components/productSelect/index.less +1 -2
  114. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +25 -14
  115. package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  116. package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -1
  117. package/lib/components/ticketBooking/index.js +2 -1
  118. package/lib/components/ticketBooking/locales.d.ts +3 -0
  119. package/lib/components/ticketBooking/locales.js +6 -3
  120. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  121. package/lib/components/ticketBooking/utils/index.js +35 -3
  122. package/lib/components/wallet/index.js +26 -1
  123. package/package.json +2 -2
  124. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  125. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
@@ -0,0 +1,202 @@
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/productSelect/components/TabProduct/tabs/index.tsx
30
+ var tabs_exports = {};
31
+ __export(tabs_exports, {
32
+ default: () => tabs_default
33
+ });
34
+ module.exports = __toCommonJS(tabs_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_ahooks = require("ahooks");
38
+ var import_ChevronLeft = __toESM(require("@pisell/icon/es/ChevronLeft"));
39
+ var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
40
+ var import_index = require("./index.less");
41
+ var Tabs = ({ renderTab, rowKey, name = "tabs-", onChange, tab, className, options }, ref) => {
42
+ const [isShowButton, setIsShowButton] = (0, import_react.useState)(false);
43
+ (0, import_react.useImperativeHandle)(ref, () => {
44
+ return {
45
+ scroll: (tab2) => {
46
+ if (tab2) {
47
+ const dom = document.querySelector(`#${name}${tab2}`);
48
+ if (dom) {
49
+ setTabScroll(dom == null ? void 0 : dom.offsetLeft);
50
+ }
51
+ }
52
+ }
53
+ };
54
+ });
55
+ const _onChange = (_key, _item, e) => {
56
+ if (onChange) {
57
+ onChange(_key, _item);
58
+ }
59
+ setTabScroll(e.target.offsetLeft);
60
+ };
61
+ (0, import_react.useEffect)(() => {
62
+ if (options == null ? void 0 : options.length) {
63
+ calculateWidth();
64
+ }
65
+ }, [options]);
66
+ const calculateWidth = () => {
67
+ const tabsWrapper = document.querySelector("#pisell-tabs");
68
+ const tabsContent = document.querySelector("#pisell-tabs-content");
69
+ if ((tabsContent == null ? void 0 : tabsContent.offsetWidth) + 60 > (tabsWrapper == null ? void 0 : tabsWrapper.offsetWidth)) {
70
+ setIsShowButton(true);
71
+ }
72
+ };
73
+ const _options = (0, import_react.useMemo)(() => {
74
+ return options || [];
75
+ }, [options]);
76
+ const [leftWidth, setLeftWidth] = (0, import_react.useState)(40);
77
+ const [leftActive, setLeftActive] = (0, import_react.useState)(false);
78
+ const [rightWidth, setRightWidth] = (0, import_react.useState)(40);
79
+ const [rightActive, setRightActive] = (0, import_react.useState)(true);
80
+ const debounceChange = (0, import_ahooks.useDebounceFn)(
81
+ ({ current, total }) => {
82
+ if (current === 0) {
83
+ setLeftActive(false);
84
+ } else {
85
+ setLeftActive(true);
86
+ }
87
+ if (current + 10 >= total) {
88
+ setRightActive(false);
89
+ } else {
90
+ setRightActive(true);
91
+ }
92
+ },
93
+ {
94
+ wait: 200
95
+ }
96
+ );
97
+ const onScroll = (e) => {
98
+ let total = e.target.scrollWidth - e.target.clientWidth;
99
+ let current = e.target.scrollLeft;
100
+ debounceChange.run({ current, total });
101
+ };
102
+ const setTabScroll = (val) => {
103
+ let dom = document.querySelector("#pisell-tabs-content");
104
+ console.log("domdom", dom);
105
+ if (!dom) {
106
+ return;
107
+ }
108
+ dom.scrollLeft = val;
109
+ };
110
+ const onPageChange = (type) => {
111
+ let dom = document.querySelector("#pisell-tabs-content");
112
+ if (!dom) {
113
+ return;
114
+ }
115
+ if (type === "left") {
116
+ setTabScroll((dom == null ? void 0 : dom.scrollLeft) - dom.clientWidth / 2);
117
+ } else {
118
+ setTabScroll((dom == null ? void 0 : dom.scrollLeft) + dom.clientWidth / 2);
119
+ }
120
+ };
121
+ const leftBtn = (0, import_react.useMemo)(() => {
122
+ return /* @__PURE__ */ import_react.default.createElement(
123
+ "div",
124
+ {
125
+ className: "booking-pisell-tabs-btn-left",
126
+ style: {
127
+ width: leftWidth,
128
+ // marginLeft: !leftWidth ? '20px' : 0,
129
+ opacity: leftActive ? 1 : 0.3
130
+ },
131
+ onClick: () => {
132
+ onPageChange("left");
133
+ }
134
+ },
135
+ /* @__PURE__ */ import_react.default.createElement(import_ChevronRight.default, { className: "booking-pisell-tabs-btn-icon" })
136
+ );
137
+ }, [leftWidth, leftActive]);
138
+ const rightBtn = (0, import_react.useMemo)(() => {
139
+ return /* @__PURE__ */ import_react.default.createElement(
140
+ "div",
141
+ {
142
+ className: "booking-pisell-tabs-btn-right",
143
+ style: {
144
+ width: rightWidth,
145
+ // marginRight: !rightWidth ? '20px' : 0,
146
+ opacity: rightActive ? 1 : 0.3
147
+ },
148
+ onClick: () => {
149
+ onPageChange("right");
150
+ }
151
+ },
152
+ /* @__PURE__ */ import_react.default.createElement(
153
+ import_ChevronLeft.default,
154
+ {
155
+ type: "icona-iconArrowsLine",
156
+ className: "booking-pisell-tabs-btn-icon"
157
+ }
158
+ )
159
+ );
160
+ }, [rightWidth, rightActive]);
161
+ const content = (0, import_react.useMemo)(() => {
162
+ return /* @__PURE__ */ import_react.default.createElement(
163
+ "div",
164
+ {
165
+ className: "booking-pisell-tabs-content",
166
+ id: "pisell-tabs-content",
167
+ onScroll,
168
+ style: { width: "unset" }
169
+ },
170
+ !isShowButton ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 4 } }) : null,
171
+ _options.map((d, i) => {
172
+ let _key = rowKey ? d[rowKey] : i;
173
+ return /* @__PURE__ */ import_react.default.createElement(
174
+ "div",
175
+ {
176
+ className: (0, import_classnames.default)("booking-pisell-tabs-tab", {
177
+ "booking-pisell-tabs-tab-active": tab === _key
178
+ }),
179
+ key: _key,
180
+ id: name + "" + _key,
181
+ onClick: (e) => {
182
+ _onChange(_key, d, e);
183
+ }
184
+ },
185
+ renderTab ? renderTab(d) : /* @__PURE__ */ import_react.default.createElement("div", { className: "booking-pisell-tabs-tab-content" }, d.name)
186
+ );
187
+ })
188
+ );
189
+ }, [_options, rowKey, name, tab, isShowButton]);
190
+ console.log("isShow", isShowButton);
191
+ return /* @__PURE__ */ import_react.default.createElement(
192
+ "div",
193
+ {
194
+ className: (0, import_classnames.default)("booking-pisell-tabs", className),
195
+ id: "pisell-tabs"
196
+ },
197
+ isShowButton && leftBtn,
198
+ content,
199
+ isShowButton && rightBtn
200
+ );
201
+ };
202
+ var tabs_default = (0, import_react.forwardRef)(Tabs);
@@ -0,0 +1,126 @@
1
+ .booking-pisell-tabs {
2
+ display: flex;
3
+ -webkit-box-align: center;
4
+ align-items: center;
5
+ width: 100%;
6
+ height: 100%;
7
+ font-size: 17px;
8
+ font-weight: 400;
9
+ color: #0d1619;
10
+ cursor: default;
11
+
12
+ .booking-pisell-tabs-btn-left,
13
+ .booking-pisell-tabs-btn-right {
14
+ -webkit-box-flex: 0;
15
+ flex-grow: 0;
16
+ flex-shrink: 0;
17
+ transition: width 300ms ease 0s;
18
+ cursor: pointer;
19
+ overflow: visible;
20
+ background: #fff;
21
+ z-index: 1;
22
+ width: 40px;
23
+ height: 40px;
24
+ display: flex;
25
+ -webkit-box-align: center;
26
+ align-items: center;
27
+ -webkit-box-pack: center;
28
+ justify-content: center;
29
+ overflow: hidden;
30
+ user-select: none;
31
+
32
+ .booking-pisell-tabs-btn-icon {
33
+ width: 24px;
34
+ height: 24px;
35
+ background: #f1f1f1;
36
+ border-radius: 50%;
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ color: #262626;
41
+ font-size: 20px;
42
+ }
43
+ }
44
+
45
+ .booking-pisell-tabs-btn-left {
46
+ .booking-pisell-tabs-btn-icon {
47
+ transform: rotate(180deg);
48
+
49
+ }
50
+ }
51
+
52
+ .booking-pisell-tabs-btn-right {
53
+ /* White */
54
+
55
+ background: #ffffff;
56
+ /* shadow-lg */
57
+
58
+ // box-shadow: 0px 6px 15px -3px rgba(0, 0, 0, 0.15);
59
+
60
+ .booking-pisell-tabs-btn-icon {
61
+ transform: rotate(180deg);
62
+ }
63
+ }
64
+
65
+ .booking-pisell-tabs-content {
66
+ width: 100%;
67
+ max-width: none;
68
+ overflow: scroll hidden;
69
+ scroll-snap-type: x mandatory;
70
+ white-space: nowrap;
71
+ display: flex;
72
+ position: relative;
73
+ scroll-behavior: smooth;
74
+
75
+ /*滚动条样式*/
76
+ &::-webkit-scrollbar {
77
+ display: none;
78
+ }
79
+
80
+ &::-webkit-scrollbar-thumb {
81
+ display: none;
82
+ }
83
+
84
+ &::-webkit-scrollbar-track {
85
+ display: none;
86
+ }
87
+
88
+ .booking-pisell-tabs-tab {
89
+ scroll-snap-align: start;
90
+ white-space: initial;
91
+ flex-shrink: 0;
92
+ cursor: pointer;
93
+
94
+ .booking-pisell-tabs-tab-content {
95
+ display: inline-flex;
96
+ height: 40px;
97
+ padding: 0px 16px;
98
+ border-radius: 88px;
99
+ -webkit-box-align: center;
100
+ align-items: center;
101
+ transition: all 300ms ease 0s;
102
+ color: #1b1b1b;
103
+ letter-spacing: 0px;
104
+ min-width: 0px;
105
+ font-weight: 600;
106
+ font-size: 14px;
107
+ text-overflow: ellipsis;
108
+ overflow: hidden;
109
+ white-space: nowrap;
110
+ }
111
+
112
+ &:hover {
113
+ .booking-pisell-tabs-tab-content {
114
+ background-color: #f1f1f1;
115
+ }
116
+ }
117
+
118
+ &.booking-pisell-tabs-tab-active {
119
+ .booking-pisell-tabs-tab-content {
120
+ color: #fff;
121
+ background: var(--primary-600, #7F56D9);
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ value: string | number;
4
+ isMini?: boolean;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ prefix?: React.ReactElement;
8
+ suffix?: React.ReactElement;
9
+ }
10
+ declare const index: (props: IProps) => JSX.Element;
11
+ export default index;
@@ -0,0 +1,72 @@
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/productSelect/components/pisellPriceText/index.tsx
30
+ var pisellPriceText_exports = {};
31
+ __export(pisellPriceText_exports, {
32
+ default: () => pisellPriceText_default
33
+ });
34
+ module.exports = __toCommonJS(pisellPriceText_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_materials = require("@pisell/materials");
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
39
+ var index = (props) => {
40
+ var _a, _b;
41
+ const context = (0, import_useEngineContext.default)();
42
+ const { value } = props;
43
+ const locale = ((_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale")) || "en";
44
+ const [_prefix, _suffix] = (0, import_react.useMemo)(() => {
45
+ if (!props.isMini) return ["", ""];
46
+ if (!locale) return ["From", ""];
47
+ if (locale.toLowerCase().includes("zh")) return ["", "起"];
48
+ return ["From", ""];
49
+ }, [locale, props.isMini]);
50
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-price-text", props.className) }, props.prefix, _prefix ? /* @__PURE__ */ import_react.default.createElement(
51
+ "span",
52
+ {
53
+ className: "pisell-price-text-prefix-text",
54
+ style: {
55
+ fontSize: "0.65em",
56
+ marginRight: 4
57
+ }
58
+ },
59
+ _prefix
60
+ ) : null, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value }), _suffix ? /* @__PURE__ */ import_react.default.createElement(
61
+ "span",
62
+ {
63
+ style: {
64
+ fontSize: "0.65em",
65
+ marginLeft: 4
66
+ },
67
+ className: "pisell-price-text-suffix-text"
68
+ },
69
+ _suffix
70
+ ) : null, props.suffix);
71
+ };
72
+ var pisellPriceText_default = index;
@@ -36,10 +36,11 @@ module.exports = __toCommonJS(productGroup_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_classnames = __toESM(require("classnames"));
38
38
  var import_gridLayout = __toESM(require("../gridLayout"));
39
- var import_materials = require("@pisell/materials");
40
39
  var import_utils = require("@pisell/utils");
41
40
  var import_antd = require("antd");
41
+ var import_decimal = __toESM(require("decimal.js"));
42
42
  var import_index = require("./index.less");
43
+ var import_pisellPriceText = __toESM(require("../pisellPriceText"));
43
44
  var ProductGroup = ({
44
45
  data,
45
46
  layout = { grid: false },
@@ -71,8 +72,20 @@ var ProductGroup = ({
71
72
  return `${import_utils.locales.getText("pisell2.product-select.stock")}:${item.stock_quantity}`;
72
73
  };
73
74
  const renderPrice = (item) => {
74
- if (!showZeroPrice && !parseFloat(item.price)) return null;
75
- return !!isPrice || !!isOriginPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price-info" }, isPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.price })) : null, !!isOriginPrice && parseFloat(item.original_price) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "original-price" }, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: item.original_price })) : null) : null;
75
+ const {
76
+ price: _price,
77
+ original_price: _original_price,
78
+ is_bundle,
79
+ minimum_markup_price
80
+ } = item;
81
+ let price = _price;
82
+ let original_price = _original_price;
83
+ if (is_bundle) {
84
+ price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
85
+ original_price = new import_decimal.default(original_price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
86
+ }
87
+ if (!showZeroPrice && !parseFloat(price)) return null;
88
+ return !!isPrice || !!isOriginPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price-info" }, isPrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: "price" }, /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { value: price, isMini: is_bundle })) : null, !!isOriginPrice && parseFloat(original_price) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "original-price" }, /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { value: original_price, isMini: is_bundle })) : null) : null;
76
89
  };
77
90
  const renderItem = (item) => /* @__PURE__ */ import_react.default.createElement(
78
91
  "div",
@@ -93,7 +106,14 @@ var ProductGroup = ({
93
106
  height: imgHeight || "auto"
94
107
  }
95
108
  },
96
- /* @__PURE__ */ import_react.default.createElement("img", { loading: "lazy", src: item.cover, style: { borderRadius: radius } })
109
+ /* @__PURE__ */ import_react.default.createElement(
110
+ "img",
111
+ {
112
+ loading: "lazy",
113
+ src: item.cover,
114
+ style: { borderRadius: radius }
115
+ }
116
+ )
97
117
  ) : null,
98
118
  /* @__PURE__ */ import_react.default.createElement("div", { className: "card-right" }, !!isTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null, !!isSubtitle && item.subtitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "subtitle" }, item.subtitle) : null, !!isStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null, renderPrice(item))
99
119
  );
@@ -17,6 +17,7 @@
17
17
  }
18
18
 
19
19
  .product-card {
20
+ user-select: none;
20
21
  cursor: pointer;
21
22
  border-radius: 12px;
22
23
  background: var(--ps-card-bg, #fff);
@@ -195,7 +196,19 @@
195
196
  font-style: normal;
196
197
  font-weight: 400;
197
198
  line-height: 24px;
198
- text-decoration-line: line-through;
199
+ // text-decoration-line: line-through;
200
+ position: relative;
201
+ &::before {
202
+ content: '';
203
+ display: block;
204
+ position: absolute;
205
+ top: 50%;
206
+ left: 0;
207
+ width: 100%;
208
+ height: 1px;
209
+ background-color: #4e4e4e;
210
+ transform: translateY(-50%);
211
+ }
199
212
 
200
213
  > span {
201
214
  vertical-align: middle;
@@ -58,14 +58,13 @@
58
58
  .booking-pisell-tabs-tab {
59
59
  .booking-pisell-tabs-tab-content {
60
60
  background: var(--ps-tab-item-bg, #ffffff) !important;
61
- font-weight: 400;
61
+ font-weight: 600;
62
62
  }
63
63
  }
64
64
 
65
65
  .booking-pisell-tabs-tab-active {
66
66
  .booking-pisell-tabs-tab-content {
67
67
  background: var(--ps-tab-item-active-bg, #8157d5) !important;
68
- font-weight: 600;
69
68
  }
70
69
  }
71
70
  }
@@ -35,7 +35,6 @@ module.exports = __toCommonJS(addService_exports);
35
35
  var import_utils = require("@pisell/utils");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_ahooks = require("ahooks");
38
- var import_materials = require("@pisell/materials");
39
38
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
39
  var import_utils2 = require("../../../booking/utils");
41
40
  var import_utils3 = require("../../../booking/info2/service/addService/utils");
@@ -49,13 +48,14 @@ var import_index = require("./index.less");
49
48
  var import_utils6 = require("../../utils");
50
49
  var import_notAvailable = __toESM(require("../notAvailable"));
51
50
  var AddSerivce = (props) => {
52
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
53
52
  const { onEdit, state, dispatch, renderMode = "current" } = props;
54
- const [loading, setLoading] = (0, import_react.useState)(false);
53
+ const [loading, setLoading] = (0, import_react.useState)(true);
55
54
  const context = (0, import_useEngineContext.default)();
56
55
  const notAvailableRef = (0, import_react.useRef)(null);
57
56
  const isLoadedServiceRef = (0, import_react.useRef)(false);
58
57
  import_utils2.request.setRequest(context.appHelper.utils.request);
58
+ const Toast = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.Toast;
59
59
  const { createBookingData, createBooking } = (0, import_serviceManager.useService)({
60
60
  renderMode,
61
61
  onEdit,
@@ -63,18 +63,18 @@ var AddSerivce = (props) => {
63
63
  dispatch
64
64
  });
65
65
  const isBooking4 = (0, import_utils5.isBooking4Shop)(
66
- (_e = (_d = (_c = (_b = (_a = context.appHelper.utils.store) == null ? void 0 : _a.getState) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.global) == null ? void 0 : _d.globalConfig) == null ? void 0 : _e.id,
66
+ (_g = (_f = (_e = (_d = (_c = context.appHelper.utils.store) == null ? void 0 : _c.getState) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.global) == null ? void 0 : _f.globalConfig) == null ? void 0 : _g.id,
67
67
  state == null ? void 0 : state.renderType
68
68
  );
69
69
  const [currentProduct, setCurrentProduct] = (0, import_react.useState)(null);
70
70
  const menuList = (0, import_react.useMemo)(() => {
71
71
  var _a2, _b2, _c2;
72
72
  return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.menu_list_tab) == null ? void 0 : _c2.menu_list) || [];
73
- }, [(_f = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f.config]);
73
+ }, [(_h = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _h.config]);
74
74
  const customerId = (0, import_react.useMemo)(() => {
75
75
  var _a2, _b2;
76
76
  return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || void 0;
77
- }, [(_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id]);
77
+ }, [(_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.id]);
78
78
  const setDefaultService = async (list) => {
79
79
  if (state.renderType !== "eventBooking") {
80
80
  return;
@@ -229,7 +229,7 @@ var AddSerivce = (props) => {
229
229
  setCurrentProduct(null);
230
230
  },
231
231
  callback: async (e, extension_type, detail) => {
232
- var _a2;
232
+ var _a2, _b2;
233
233
  setCurrentProduct(null);
234
234
  if (lock) {
235
235
  return;
@@ -273,16 +273,27 @@ var AddSerivce = (props) => {
273
273
  if (renderMode === "current") {
274
274
  cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
275
275
  }
276
- cacheItem = (0, import_utils3.getProductExtend)({ cacheItem, state });
276
+ cacheItem = (0, import_utils3.getProductExtend)({
277
+ cacheItem,
278
+ state,
279
+ isDisabledTime: true
280
+ });
277
281
  if (state.renderType === "eventBooking") {
278
282
  cacheItem.autoClose = false;
279
283
  }
280
284
  if (cacheItem.autoClose) {
281
285
  cacheItem.autoClose = false;
282
- let _list = (0, import_utils6.addService)(state.service.value, cacheItem);
283
- (0, import_materials.PisellToast)({
284
- content: import_utils.locales.getText("pisell2.ticket-booking.add-to-cart")
285
- });
286
+ let { list: _list, quantity } = (0, import_utils6.addService)(
287
+ state.service.value,
288
+ cacheItem
289
+ );
290
+ (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
291
+ Toast,
292
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
293
+ quantity || 1
294
+ )))
295
+ );
296
+ (0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
286
297
  dispatch({
287
298
  type: "setService",
288
299
  payload: {
@@ -319,7 +330,7 @@ var AddSerivce = (props) => {
319
330
  }
320
331
  }
321
332
  return _list;
322
- }, [(_i = state.service) == null ? void 0 : _i.services, state == null ? void 0 : state.activeCartId]);
333
+ }, [(_k = state.service) == null ? void 0 : _k.services, state == null ? void 0 : state.activeCartId]);
323
334
  const currentDate = (0, import_react.useMemo)(() => {
324
335
  return state.date.value.format("YYYY-MM-DD");
325
336
  }, [state.date.value]);
@@ -362,7 +373,7 @@ var AddSerivce = (props) => {
362
373
  }
363
374
  return null;
364
375
  }, [
365
- (_k = (_j = state.service) == null ? void 0 : _j.cacheItem) == null ? void 0 : _k.autoClose,
376
+ (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m.autoClose,
366
377
  state.service.addModal,
367
378
  import_utils.locales,
368
379
  renderList,
@@ -0,0 +1,10 @@
1
+ .add-toast-wrap {
2
+ width: 190px;
3
+ .add-toast-title {
4
+ margin-bottom: 12px;
5
+ line-height: 22px;
6
+ }
7
+ .add-toast-quantity {
8
+ font-size: 14px;
9
+ }
10
+ }
@@ -277,6 +277,7 @@ var TicketBooking = () => {
277
277
  }
278
278
  }
279
279
  }
280
+ _modalState.service.value = [];
280
281
  _modalState.service.cacheItem = null;
281
282
  _modalState.service.addTimeModal = false;
282
283
  _modalState.service.changeService = false;
@@ -761,7 +762,8 @@ var TicketBooking = () => {
761
762
  locale: engineProps.locale,
762
763
  refreshData: _refreshData,
763
764
  setActiveTab: _setActiveTab,
764
- clearAllValue: _clearAllValue
765
+ clearAllValue: _clearAllValue,
766
+ drawerMask: true
765
767
  },
766
768
  setGlobalState: _setModalState,
767
769
  setState,
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_miniRedux = require("./miniRedux");
37
37
  var import_utils = require("@pisell/utils");
38
38
  var import_dayjs = __toESM(require("dayjs"));
39
+ var import_lodash = require("lodash");
39
40
  var import_ticketBooking = __toESM(require("./components/ticketBooking/index"));
40
41
  var import_utils2 = require("../../utils");
41
42
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
@@ -186,7 +187,7 @@ var ticketBooking_default = (props) => {
186
187
  import_utils2.request.setRequest(context.appHelper.utils.request);
187
188
  }, []);
188
189
  (0, import_react.useMemo)(() => {
189
- const store = (0, import_miniRedux.createStore)({ ...initialState, bookingConfigParams, productExtensionType });
190
+ const store = (0, import_miniRedux.createStore)({ ...(0, import_lodash.cloneDeep)(initialState), bookingConfigParams, productExtensionType });
190
191
  storeRef.current = store;
191
192
  }, []);
192
193
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-ticket-booking-wrapper" }, /* @__PURE__ */ import_react.default.createElement(import_menuBar.default, null), /* @__PURE__ */ import_react.default.createElement(import_miniRedux.Provider, { store: storeRef.current }, /* @__PURE__ */ import_react.default.createElement(import_ticketBooking.default, null)));