@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
@@ -47,6 +47,7 @@ declare const _default: {
47
47
  "pisell2.ticket-booking.add-to-cart": string;
48
48
  "pisell2.ticket-booking.not-available-title": string;
49
49
  "pisell2.ticket-booking.not-available-ok": string;
50
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
50
51
  };
51
52
  "zh-CN": {
52
53
  "pisell2.ticket-booking.info": string;
@@ -96,6 +97,7 @@ declare const _default: {
96
97
  "pisell2.ticket-booking.add-to-cart": string;
97
98
  "pisell2.ticket-booking.not-available-title": string;
98
99
  "pisell2.ticket-booking.not-available-ok": string;
100
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
99
101
  };
100
102
  "zh-HK": {
101
103
  "pisell2.ticket-booking.info": string;
@@ -145,6 +147,7 @@ declare const _default: {
145
147
  "pisell2.ticket-booking.add-to-cart": string;
146
148
  "pisell2.ticket-booking.not-available-title": string;
147
149
  "pisell2.ticket-booking.not-available-ok": string;
150
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
148
151
  };
149
152
  };
150
153
  export default _default;
@@ -70,7 +70,8 @@ var locales_default = {
70
70
  "pisell2.ticket-booking.create-new": "Create new",
71
71
  "pisell2.ticket-booking.add-to-cart": "Added to Cart",
72
72
  "pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
73
- "pisell2.ticket-booking.not-available-ok": "OK"
73
+ "pisell2.ticket-booking.not-available-ok": "OK",
74
+ "pisell2.ticket-booking.in-cart": (number) => `${number} in cart`
74
75
  },
75
76
  "zh-CN": {
76
77
  "pisell2.ticket-booking.info": "信息",
@@ -119,7 +120,8 @@ var locales_default = {
119
120
  "pisell2.ticket-booking.create-new": "新建",
120
121
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
121
122
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
122
- "pisell2.ticket-booking.not-available-ok": "好的"
123
+ "pisell2.ticket-booking.not-available-ok": "好的",
124
+ "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
123
125
  },
124
126
  "zh-HK": {
125
127
  "pisell2.ticket-booking.info": "資訊",
@@ -168,6 +170,7 @@ var locales_default = {
168
170
  "pisell2.ticket-booking.create-new": "新建",
169
171
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
170
172
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
171
- "pisell2.ticket-booking.not-available-ok": "好的"
173
+ "pisell2.ticket-booking.not-available-ok": "好的",
174
+ "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
172
175
  }
173
176
  };
@@ -12,4 +12,8 @@ export declare const restoreProductOtherData: (data: any) => {
12
12
  product_variant_id: number;
13
13
  quantity: number;
14
14
  } | undefined;
15
- export declare const addService: (list: any[], addItem: any) => any[];
15
+ export declare const addService: (list: any[], addItem: any) => {
16
+ list: any[];
17
+ quantity: any;
18
+ };
19
+ export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var utils_exports = {};
31
31
  __export(utils_exports, {
32
32
  addService: () => addService,
33
+ addServiceScroll: () => addServiceScroll,
33
34
  formatBookingList: () => formatBookingList,
34
35
  formatDateToStr: () => formatDateToStr,
35
36
  getDefaultStartParam: () => getDefaultStartParam,
@@ -128,19 +129,27 @@ var isSameProduct = (a, b) => {
128
129
  };
129
130
  var addService = (list, addItem) => {
130
131
  let value = list;
132
+ let count;
131
133
  if (!(0, import_utils.isNormalProductByDurationSchedule)(addItem)) {
132
134
  value.push(addItem);
135
+ count = addItem._extend.quantity;
133
136
  } else {
134
137
  let isNotSame = true;
135
138
  value = list.map((item) => {
136
- var _a, _b;
139
+ var _a, _b, _c;
137
140
  if (isSameProduct(item, addItem)) {
138
141
  isNotSame = false;
142
+ const quantity = (((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.quantity) || 1) + (((_b = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _b.quantity) || 1);
143
+ count = quantity;
139
144
  return {
140
145
  ...item,
141
146
  _extend: {
142
147
  ...item._extend,
143
- quantity: (((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.quantity) || 1) + (((_b = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _b.quantity) || 1)
148
+ quantity,
149
+ other: {
150
+ ...((_c = item._extend) == null ? void 0 : _c.other) || {},
151
+ quantity
152
+ }
144
153
  }
145
154
  };
146
155
  }
@@ -148,13 +157,36 @@ var addService = (list, addItem) => {
148
157
  });
149
158
  if (isNotSame) {
150
159
  value.push(addItem);
160
+ count = addItem._extend.quantity;
151
161
  }
152
162
  }
153
- return value;
163
+ return { list: value, quantity: count };
164
+ };
165
+ var addServiceScroll = (rowKey, cacheItem) => {
166
+ const list = document.querySelectorAll(`#rowKey-${rowKey}`);
167
+ setTimeout(() => {
168
+ if (list.length && (0, import_utils.isNormalProductByDurationSchedule)(cacheItem)) {
169
+ list[list.length - 1].scrollIntoView({
170
+ behavior: "smooth",
171
+ block: "center"
172
+ });
173
+ } else {
174
+ setTimeout(() => {
175
+ const bookingWrap = document.querySelectorAll(`.booking-info-warp`);
176
+ if (bookingWrap.length) {
177
+ bookingWrap[0].scrollTo({
178
+ top: 99999,
179
+ behavior: "smooth"
180
+ });
181
+ }
182
+ }, 100);
183
+ }
184
+ });
154
185
  };
155
186
  // Annotate the CommonJS export names for ESM import in node:
156
187
  0 && (module.exports = {
157
188
  addService,
189
+ addServiceScroll,
158
190
  formatBookingList,
159
191
  formatDateToStr,
160
192
  getDefaultStartParam,
@@ -239,9 +239,21 @@ var Wallet = (0, import_model.Provider)(() => {
239
239
  ]
240
240
  };
241
241
  const menuItem = ({ count = 0, title = "" }) => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-menu-item" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode-wallet-menu-title" }, title), count > 0 && /* @__PURE__ */ import_react.default.createElement(import_materials.Badge, { styleType: "default", count })), /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null));
242
+ const mergeSearch = (currentSearch, params) => {
243
+ const searchParams = new URLSearchParams(currentSearch);
244
+ Object.entries(params).forEach(([key, value]) => {
245
+ searchParams.set(key, value);
246
+ });
247
+ return searchParams.toString();
248
+ };
242
249
  const MenuProps = {
243
250
  className: "pisell-lowcode-wallet-menu",
244
251
  onClick: (e) => {
252
+ var _a2, _b2;
253
+ (_b2 = (_a2 = context.appHelper.utils) == null ? void 0 : _a2.history) == null ? void 0 : _b2.push({
254
+ hash: location.hash,
255
+ search: mergeSearch(location.search, { type: "list" })
256
+ });
245
257
  dispatch({
246
258
  type: "setState",
247
259
  payload: {
@@ -286,12 +298,22 @@ var Wallet = (0, import_model.Provider)(() => {
286
298
  }
287
299
  ]
288
300
  };
301
+ (0, import_react.useEffect)(() => {
302
+ const searchParams = new URLSearchParams(location.search);
303
+ const type = searchParams.get("type");
304
+ if (type) {
305
+ dispatch({ type: "setState", payload: { setup: type } });
306
+ } else {
307
+ dispatch({ type: "setState", payload: { setup: "menu" } });
308
+ }
309
+ }, [location.search]);
289
310
  const onBack = () => {
290
311
  if (setup === "menu") {
291
312
  history.back();
292
313
  } else {
293
314
  const prevSetup = setup === "detail" ? "list" : "menu";
294
315
  dispatch({ type: "setState", payload: { setup: prevSetup } });
316
+ history.back();
295
317
  }
296
318
  };
297
319
  const openAddModal = () => {
@@ -424,7 +446,10 @@ var Wallet = (0, import_model.Provider)(() => {
424
446
  }
425
447
  return null;
426
448
  };
427
- const renderMobileLayout = () => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-mobile" }, /* @__PURE__ */ import_react.default.createElement(import_WalletBar.default, { setup, onBack }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-content" }, renderMobileContent()), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-footer" }, renderMobileFooter()));
449
+ const renderMobileLayout = () => {
450
+ var _a2, _b2, _c2;
451
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-mobile" }, !((_c2 = (_b2 = (_a2 = utils == null ? void 0 : utils.interaction) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.isAppEnv) == null ? void 0 : _c2.call(_b2)) && /* @__PURE__ */ import_react.default.createElement(import_WalletBar.default, { setup, onBack }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-content" }, renderMobileContent()), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-footer" }, renderMobileFooter()));
452
+ };
428
453
  const renderSearchCard = (item) => {
429
454
  const {
430
455
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.3.55",
3
+ "version": "3.3.56",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,8 +59,8 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
+ "@pisell/materials": "3.3.22",
62
63
  "@pisell/utils": "1.0.42",
63
- "@pisell/materials": "3.3.18",
64
64
  "@pisell/date-picker": "3.0.2",
65
65
  "@pisell/icon": "0.0.11"
66
66
  },
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default _default;