@pisell/private-materials 3.3.55 → 3.3.57

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 (123) 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.js +1 -1
  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/pet/index.js +3 -0
  24. package/es/components/booking/info/service2/utils.js +27 -27
  25. package/es/components/booking/info2/index.js +3 -3
  26. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  27. package/es/components/booking/info2/service/addService/utils.js +5 -2
  28. package/es/components/booking/info2/service/editService/index.js +1 -0
  29. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  30. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
  31. package/es/components/eventBooking/components/progressBar/index.js +16 -0
  32. package/es/components/eventBooking/index.d.ts +0 -1
  33. package/es/components/pay/toC/PaymentList/index.js +10 -4
  34. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  35. package/es/components/pay/toC/PaymentList/serve.js +7 -1
  36. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -13
  37. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +30 -13
  38. package/es/components/pay/toC/PaymentMethods/index.js +29 -2
  39. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  40. package/es/components/pay/toC/WalletPassBlock/index.less +4 -0
  41. package/es/components/pay/toC/index.js +38 -30
  42. package/es/components/pay/toC/utils.d.ts +6 -0
  43. package/es/components/pay/toC/utils.js +21 -0
  44. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  45. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
  46. package/es/components/productSelect/components/TabProduct/index.js +28 -10
  47. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  48. package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
  49. package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  50. package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  51. package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
  52. package/es/components/productSelect/components/productGroup/index.js +20 -7
  53. package/es/components/productSelect/components/productGroup/index.less +14 -1
  54. package/es/components/productSelect/index.less +1 -2
  55. package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
  56. package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  57. package/es/components/ticketBooking/components/ticketBooking/index.js +18 -9
  58. package/es/components/ticketBooking/index.js +2 -1
  59. package/es/components/ticketBooking/locales.d.ts +3 -0
  60. package/es/components/ticketBooking/locales.js +12 -3
  61. package/es/components/ticketBooking/serve.d.ts +5 -0
  62. package/es/components/ticketBooking/serve.js +27 -0
  63. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  64. package/es/components/ticketBooking/utils/index.js +35 -3
  65. package/es/components/wallet/index.js +51 -5
  66. package/lib/components/appointmentBooking/assets/resource.svg +1 -0
  67. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  68. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  69. package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
  70. package/lib/components/appointmentBooking/hooks.js +12 -3
  71. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  72. package/lib/components/appointmentBooking/locales.js +3 -0
  73. package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
  74. package/lib/components/booking/components/drawer/index.js +2 -2
  75. package/lib/components/booking/components/footer/index.js +1 -1
  76. package/lib/components/booking/components/voucher/index.js +31 -27
  77. package/lib/components/booking/info/client/index.js +2 -1
  78. package/lib/components/booking/info/pet/index.js +3 -0
  79. package/lib/components/booking/info/service2/utils.js +2 -2
  80. package/lib/components/booking/info2/index.js +7 -4
  81. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  82. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  83. package/lib/components/booking/info2/service/editService/index.js +1 -0
  84. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  85. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
  86. package/lib/components/eventBooking/components/progressBar/index.js +15 -0
  87. package/lib/components/eventBooking/index.d.ts +0 -1
  88. package/lib/components/pay/toC/PaymentList/index.js +11 -6
  89. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  90. package/lib/components/pay/toC/PaymentList/serve.js +5 -2
  91. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +10 -1
  92. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +10 -1
  93. package/lib/components/pay/toC/PaymentMethods/index.js +28 -4
  94. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  95. package/lib/components/pay/toC/WalletPassBlock/index.less +4 -0
  96. package/lib/components/pay/toC/index.js +20 -13
  97. package/lib/components/pay/toC/utils.d.ts +6 -0
  98. package/lib/components/pay/toC/utils.js +15 -0
  99. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  100. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
  101. package/lib/components/productSelect/components/TabProduct/index.js +19 -6
  102. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  103. package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
  104. package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  105. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  106. package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
  107. package/lib/components/productSelect/components/productGroup/index.js +24 -4
  108. package/lib/components/productSelect/components/productGroup/index.less +14 -1
  109. package/lib/components/productSelect/index.less +1 -2
  110. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +25 -14
  111. package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  112. package/lib/components/ticketBooking/components/ticketBooking/index.js +17 -8
  113. package/lib/components/ticketBooking/index.js +2 -1
  114. package/lib/components/ticketBooking/locales.d.ts +3 -0
  115. package/lib/components/ticketBooking/locales.js +6 -3
  116. package/lib/components/ticketBooking/serve.d.ts +5 -0
  117. package/lib/components/ticketBooking/serve.js +8 -2
  118. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  119. package/lib/components/ticketBooking/utils/index.js +35 -3
  120. package/lib/components/wallet/index.js +26 -1
  121. package/package.json +4 -4
  122. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  123. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
@@ -35,6 +35,8 @@ module.exports = __toCommonJS(ProductItem_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import_classnames = __toESM(require("classnames"));
38
+ var import_decimal = __toESM(require("decimal.js"));
39
+ var import_pisellPriceText = __toESM(require("../../../../productSelect/components/pisellPriceText"));
38
40
  var import_index = require("./index.less");
39
41
  var ProductItem = ({
40
42
  item = {},
@@ -43,6 +45,11 @@ var ProductItem = ({
43
45
  style,
44
46
  className
45
47
  }) => {
48
+ const { price, is_bundle, minimum_markup_price } = item;
49
+ let _price = price;
50
+ if (is_bundle) {
51
+ _price = new import_decimal.default(price).plus(new import_decimal.default(minimum_markup_price)).toFixed(2);
52
+ }
46
53
  return /* @__PURE__ */ import_react.default.createElement(
47
54
  "div",
48
55
  {
@@ -59,7 +66,7 @@ var ProductItem = ({
59
66
  className: "product-item-card-cover"
60
67
  }
61
68
  ) : null,
62
- /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-price" }, (0, import_utils.formatAmount)(item.price, 2, amountSymbol)))
69
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-item-card-price" }, /* @__PURE__ */ import_react.default.createElement(import_pisellPriceText.default, { value: _price, isMini: is_bundle })))
63
70
  );
64
71
  };
65
72
  var ProductItem_default = ProductItem;
@@ -37,7 +37,7 @@ var import_antd = require("antd");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_ahooks = require("ahooks");
39
39
  var import_utils = require("@pisell/utils");
40
- var import_tabs = __toESM(require("../../../booking/components/TabProduct/tabs"));
40
+ var import_tabs = __toESM(require("./tabs"));
41
41
  var import_productGroup = __toESM(require("../productGroup"));
42
42
  var io = null;
43
43
  var TabProduct = (props) => {
@@ -63,17 +63,30 @@ var TabProduct = (props) => {
63
63
  });
64
64
  }
65
65
  }, [list]);
66
+ const debouncedScroll = (0, import_ahooks.useDebounceFn)(
67
+ (id) => {
68
+ var _a;
69
+ (_a = tabsRef == null ? void 0 : tabsRef.current) == null ? void 0 : _a.scroll(id);
70
+ },
71
+ { wait: 100 }
72
+ // 100ms防抖
73
+ );
66
74
  const handleObserver = (0, import_ahooks.useMemoizedFn)(() => {
67
75
  const _marginTop = 270;
68
76
  const _marginBottom = window.innerHeight - 70 - 200 - 70;
69
77
  const _rootMargin = `${_marginTop * -1}px 0px ${_marginBottom * -1}px 0px`;
70
78
  io = new IntersectionObserver(
71
79
  (entries) => {
72
- var _a, _b, _c, _d;
73
- if (entries[0].isIntersecting) {
74
- const [name, id] = (_c = (_b = (_a = entries[0]) == null ? void 0 : _a.target) == null ? void 0 : _b.id) == null ? void 0 : _c.split("-");
75
- setCurrentGroupId(Number(id));
76
- (_d = tabsRef == null ? void 0 : tabsRef.current) == null ? void 0 : _d.scroll(id);
80
+ var _a, _b;
81
+ const enteringEntries = entries.filter((entry) => entry.isIntersecting);
82
+ if (enteringEntries.length > 0) {
83
+ const topMostEntry = enteringEntries.reduce((top, current) => {
84
+ return current.boundingClientRect.top < top.boundingClientRect.top ? current : top;
85
+ });
86
+ const [name, id] = (_b = (_a = topMostEntry == null ? void 0 : topMostEntry.target) == null ? void 0 : _a.id) == null ? void 0 : _b.split("-");
87
+ const newGroupId = Number(id);
88
+ setCurrentGroupId(newGroupId);
89
+ debouncedScroll.run(id);
77
90
  }
78
91
  },
79
92
  {
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface Com<T> extends React.FC<T> {
4
+ }
5
+ export declare type RowKey = string | number;
6
+ export interface Option {
7
+ id: number | string;
8
+ name: React.ReactNode;
9
+ }
10
+ export interface TabsProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'onChange'> {
11
+ renderTab: (item: any) => React.ReactNode;
12
+ rowKey: RowKey;
13
+ name: RowKey;
14
+ onChange: (key: RowKey, _item: any) => void;
15
+ tab: RowKey;
16
+ className: string;
17
+ tabsRef: any;
18
+ options: Option[];
19
+ }
20
+ declare const _default: React.ForwardRefExoticComponent<Omit<Partial<TabsProps>, "ref"> & React.RefAttributes<unknown>>;
21
+ export default _default;
@@ -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
  }