@pisell/private-materials 3.4.55 → 3.4.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 (134) 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 +9 -9
  11. package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
  12. package/es/components/booking/addons/index.js +20 -17
  13. package/es/components/booking/components/footer/utils.d.ts +6 -0
  14. package/es/components/booking/components/footer/utils.js +117 -53
  15. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  16. package/es/components/booking/components/voucher/index.js +27 -12
  17. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  18. package/es/components/booking/info/service/like/index.d.ts +1 -0
  19. package/es/components/booking/info/service2/utils.d.ts +1 -1
  20. package/es/components/booking/info/service2/utils.js +1 -0
  21. package/es/components/booking/info2/service/addService/index.js +3 -3
  22. package/es/components/booking/utils.d.ts +3 -2
  23. package/es/components/booking/utils.js +16 -2
  24. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  25. package/es/components/eftpos/form/index.d.ts +1 -0
  26. package/es/components/eftpos/group/index.d.ts +1 -0
  27. package/es/components/eftpos/hooks.d.ts +1 -0
  28. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  29. package/es/components/eftpos/icon/device.d.ts +1 -0
  30. package/es/components/eftpos/receipt/index.d.ts +1 -0
  31. package/es/components/eftposPay/amount.d.ts +1 -1
  32. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  33. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  34. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  35. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  36. package/es/components/eftposPay/device.d.ts +1 -1
  37. package/es/components/eftposPay/hooks.d.ts +2 -2
  38. package/es/components/eftposPay/store/index.d.ts +6 -6
  39. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  40. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  41. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  42. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  43. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  44. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  45. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  46. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  47. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  48. package/es/components/systemSettings/registry/components/SectionList.js +5 -1
  49. package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
  50. package/es/components/ticketBooking/utils/index.js +23 -8
  51. package/es/components/wallet/Detail/index.js +34 -2
  52. package/es/components/wallet/Detail/index.less +11 -0
  53. package/es/components/wallet/Detail/locales.d.ts +6 -0
  54. package/es/components/wallet/Detail/locales.js +14 -2
  55. package/es/components/wallet/Voucher/index.js +11 -10
  56. package/es/components/wallet/components/WalletCard.js +5 -1
  57. package/es/components/wallet/index.js +4 -2
  58. package/es/components/wallet/serve.d.ts +7 -0
  59. package/es/components/wallet/utils.d.ts +48 -0
  60. package/es/components/wallet/utils.js +342 -0
  61. package/es/index.d.ts +1 -0
  62. package/es/index.js +1 -0
  63. package/es/plus/clientName/index.d.ts +1 -0
  64. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  65. package/es/plus/walletPassGallery/components/passDetail/index.js +79 -30
  66. package/es/plus/walletPassGallery/index.js +4 -2
  67. package/es/plus/walletPassGallery/serve.d.ts +3 -0
  68. package/es/plus/walletPassGallery/serve.js +4 -2
  69. package/es/pro/Login2.0/AuthModal.js +12 -4
  70. package/es/pro/Login2.0/index.less +7 -7
  71. package/es/pro/pisellPaymentList/example.d.ts +1 -0
  72. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  73. package/lib/components/booking/addons/index.js +10 -7
  74. package/lib/components/booking/components/footer/utils.d.ts +6 -0
  75. package/lib/components/booking/components/footer/utils.js +86 -36
  76. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  77. package/lib/components/booking/components/voucher/index.js +23 -7
  78. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  79. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  80. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  81. package/lib/components/booking/info/service2/utils.js +1 -0
  82. package/lib/components/booking/info2/service/addService/index.js +2 -2
  83. package/lib/components/booking/utils.d.ts +3 -2
  84. package/lib/components/booking/utils.js +12 -0
  85. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  86. package/lib/components/eftpos/form/index.d.ts +1 -0
  87. package/lib/components/eftpos/group/index.d.ts +1 -0
  88. package/lib/components/eftpos/hooks.d.ts +1 -0
  89. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  90. package/lib/components/eftpos/icon/device.d.ts +1 -0
  91. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  92. package/lib/components/eftposPay/amount.d.ts +1 -1
  93. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  94. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  95. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  96. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  97. package/lib/components/eftposPay/device.d.ts +1 -1
  98. package/lib/components/eftposPay/hooks.d.ts +2 -2
  99. package/lib/components/eftposPay/store/index.d.ts +6 -6
  100. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  101. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  102. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  103. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  104. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  105. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  106. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  107. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
  108. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  109. package/lib/components/systemSettings/registry/components/SectionList.js +4 -1
  110. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  111. package/lib/components/ticketBooking/utils/index.js +9 -4
  112. package/lib/components/wallet/Detail/index.js +31 -3
  113. package/lib/components/wallet/Detail/index.less +11 -0
  114. package/lib/components/wallet/Detail/locales.d.ts +6 -0
  115. package/lib/components/wallet/Detail/locales.js +14 -2
  116. package/lib/components/wallet/Voucher/index.js +8 -8
  117. package/lib/components/wallet/components/WalletCard.js +4 -0
  118. package/lib/components/wallet/index.js +2 -2
  119. package/lib/components/wallet/serve.d.ts +7 -0
  120. package/lib/components/wallet/utils.d.ts +48 -0
  121. package/lib/components/wallet/utils.js +287 -0
  122. package/lib/index.d.ts +1 -0
  123. package/lib/index.js +3 -0
  124. package/lib/plus/clientName/index.d.ts +1 -0
  125. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
  126. package/lib/plus/walletPassGallery/components/passDetail/index.js +50 -14
  127. package/lib/plus/walletPassGallery/index.js +4 -2
  128. package/lib/plus/walletPassGallery/serve.d.ts +3 -0
  129. package/lib/plus/walletPassGallery/serve.js +3 -2
  130. package/lib/pro/Login2.0/AuthModal.js +15 -7
  131. package/lib/pro/Login2.0/index.less +7 -7
  132. package/lib/pro/pisellPaymentList/example.d.ts +1 -0
  133. package/lowcode/wallet-pass-detail/meta.ts +89 -0
  134. package/package.json +3 -3
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
- action?: "amount" | "deviceList" | "pay" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
+ action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 获取 Tyro 资源
3
4
  * @description:
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Deposit: () => JSX.Element;
2
3
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const DayItem: (props: any) => JSX.Element;
3
4
  export default DayItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  import { CalendarItemProps } from '../../../../../type';
3
4
  declare const Item: (props: CalendarItemProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
2
3
  public_key: string;
3
4
  client_secret?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.module.less';
2
3
  declare const StripePayment: () => JSX.Element;
3
4
  export default StripePayment;
@@ -50,6 +50,12 @@ export declare type WalletPassDataType = {
50
50
  shop: Shop;
51
51
  wallet_pass_usage?: any;
52
52
  balance_par_value: string;
53
+ custom_schedule_snapshot?: {
54
+ data: any[];
55
+ };
56
+ metadata?: {
57
+ validity_type: string;
58
+ };
53
59
  };
54
60
  declare type Shop = {
55
61
  id: number;
@@ -39,7 +39,7 @@ var voucherTime = (data) => {
39
39
  };
40
40
  var formatMachineCodeServer2CardList = (data, selectId = []) => {
41
41
  return (data || []).map((item) => {
42
- var _a, _b, _c;
42
+ var _a, _b, _c, _d, _e;
43
43
  return {
44
44
  id: item.id,
45
45
  name: item.product_name,
@@ -58,7 +58,9 @@ var formatMachineCodeServer2CardList = (data, selectId = []) => {
58
58
  cover: (_c = item.product) == null ? void 0 : _c.cover,
59
59
  qrCode: item.code,
60
60
  validDate: voucherTime(item),
61
- originData: item
61
+ originData: item,
62
+ scheduleList: ((_d = item.custom_schedule_snapshot) == null ? void 0 : _d.data) || [],
63
+ validDateBySchedule: ((_e = item.metadata) == null ? void 0 : _e.validity_type) === "custom_schedule_validity"
62
64
  };
63
65
  });
64
66
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const RelationProduct: ({ value, onChange, }: {
3
4
  value?: any;
@@ -37,6 +37,7 @@ var import_antd = require("antd");
37
37
  var import_icons = require("@ant-design/icons");
38
38
  var import_icon = require("@pisell/icon");
39
39
  var import_utils = require("@pisell/utils");
40
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
41
  var getLocalizedText = (text, locale = "zh-CN") => {
41
42
  if (typeof text === "string") {
42
43
  return text;
@@ -66,9 +67,11 @@ var SectionList = ({
66
67
  hasMore = false,
67
68
  onLoadMore
68
69
  }) => {
70
+ var _a, _b;
69
71
  const scrollContainerRef = (0, import_react.useRef)(null);
70
72
  const loadingRef = (0, import_react.useRef)(null);
71
- const currentLocale = localStorage.getItem("umi_locale") || "zh-CN";
73
+ const context = (0, import_useEngineContext.default)();
74
+ const currentLocale = ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || localStorage.getItem("umi_locale") || "en";
72
75
  const handleScroll = (0, import_react.useCallback)(() => {
73
76
  if (!scrollContainerRef.current || !hasMore || loading || !onLoadMore) {
74
77
  return;
@@ -288,12 +288,12 @@ var AddSerivce = (props) => {
288
288
  _extend: {
289
289
  start_date: state.date.value,
290
290
  quantity: (e == null ? void 0 : e.quantity) || 1,
291
- price: _detail.price,
292
291
  product_name: item.title,
293
292
  other
294
293
  },
295
294
  new: 1
296
295
  };
296
+ cacheItem._extend.price = (0, import_utils2.getMainPrice)(_detail, _detail.price);
297
297
  let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
298
298
  cacheItem._extend.total = _total;
299
299
  cacheItem._extend.origin_total = _total;
@@ -148,11 +148,16 @@ var addService = (list, addItem, state) => {
148
148
  let isNotSame = true;
149
149
  let isSetCount = false;
150
150
  value = list.map((item) => {
151
- var _a, _b, _c;
151
+ var _a, _b, _c, _d, _e;
152
152
  const isGoodPassDiscountProduct = (item.discount_list || []).some((item2) => item2.type === "good_pass");
153
- if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct) {
153
+ const bundleDiscountList = [];
154
+ (((_b = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.bundle) || []).forEach((item2) => {
155
+ bundleDiscountList.push(...(item2 == null ? void 0 : item2.discount_list) || []);
156
+ });
157
+ const isGoodPassBundleProduct = bundleDiscountList.some((item2) => item2.type === "good_pass");
158
+ if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct && !isGoodPassBundleProduct) {
154
159
  isNotSame = false;
155
- 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);
160
+ const quantity = (((_c = item == null ? void 0 : item._extend) == null ? void 0 : _c.quantity) || 1) + (((_d = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _d.quantity) || 1);
156
161
  count = quantity;
157
162
  isSetCount = true;
158
163
  return {
@@ -161,7 +166,7 @@ var addService = (list, addItem, state) => {
161
166
  ...item._extend,
162
167
  quantity,
163
168
  other: {
164
- ...((_c = item._extend) == null ? void 0 : _c.other) || {},
169
+ ...((_e = item._extend) == null ? void 0 : _e.other) || {},
165
170
  quantity
166
171
  }
167
172
  }
@@ -45,6 +45,7 @@ var import_locales = __toESM(require("./locales"));
45
45
  var import_serve = require("./serve");
46
46
  var import_utils2 = require("./../../../utils");
47
47
  var import_components = require("../components");
48
+ var import_utils3 = require("../utils");
48
49
  var import_index = require("./index.less");
49
50
  var { Text } = import_materials2.Typography;
50
51
  import_dayjs.default.extend(import_timezone.default);
@@ -65,8 +66,10 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
65
66
  encoded = "",
66
67
  balance,
67
68
  expire_date = "",
68
- product = {}
69
+ product = {},
70
+ custom_schedule_snapshot
69
71
  } = detail;
72
+ console.log(detail, "detail22");
70
73
  const {
71
74
  description = "",
72
75
  extension_data = [],
@@ -212,8 +215,33 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
212
215
  onGoogleClick();
213
216
  }
214
217
  };
218
+ const scheduleList = (0, import_react.useMemo)(() => {
219
+ return (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [];
220
+ }, [custom_schedule_snapshot]);
215
221
  (0, import_react.useEffect)(() => {
216
222
  var _a2;
223
+ const detail2 = (0, import_utils3.formatScheduleText)(scheduleList, "zh-CN");
224
+ let expireText = expire_date ? expire_date : import_utils.locales.getText("page.wallet.expireDate");
225
+ if (scheduleList.length > 0) {
226
+ let validityTexts = "";
227
+ let excludedText = "";
228
+ let includedText = "";
229
+ detail2.forEach((item) => {
230
+ if (item.validityTexts.length > 0) {
231
+ validityTexts = `${validityTexts}${item.validityTexts.join("\n")}
232
+ `;
233
+ }
234
+ if (item.excluded_date.length > 0) {
235
+ excludedText = `${excludedText}${item.excluded_date.join("\n")}
236
+ `;
237
+ }
238
+ if (item.included_date.length > 0) {
239
+ includedText = `${includedText}${item.included_date.join("\n")}
240
+ `;
241
+ }
242
+ });
243
+ expireText = /* @__PURE__ */ import_react.default.createElement("span", { className: "wallet-detail-expire-text" }, validityTexts, excludedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.notValidDate")), excludedText, includedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.includedDate")), includedText);
244
+ }
217
245
  let data = [
218
246
  {
219
247
  label: import_utils.locales.getText("page.wallet.cardName"),
@@ -226,11 +254,11 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
226
254
  },
227
255
  {
228
256
  label: import_utils.locales.getText("page.wallet.validDate"),
229
- value: expire_date ? expire_date : import_utils.locales.getText("page.wallet.expireDate")
257
+ value: expireText
230
258
  }
231
259
  ];
232
260
  if (tag === "product_discount_card") {
233
- const isFixedAmount = ((_a2 = detail.metadata) == null ? void 0 : _a2.discount_card_type) === "fixed_amount";
261
+ const isFixedAmount = ((_a2 = detail2.metadata) == null ? void 0 : _a2.discount_card_type) === "fixed_amount";
234
262
  data.splice(2, 0, {
235
263
  label: import_utils.locales.getText("page.wallet.discount"),
236
264
  value: balance ? isFixedAmount ? `${symbol}${Number(balance)}` : `${Number(balance)}%` : ""
@@ -373,3 +373,14 @@
373
373
  font-weight: 500;
374
374
  line-height: 24px;
375
375
  }
376
+
377
+ .wallet-detail-expire-text {
378
+ white-space: pre-wrap;
379
+ }
380
+
381
+ .wallet-detail-expire-text-title {
382
+ font-size: 14px;
383
+ font-weight: 500;
384
+ line-height: 20px;
385
+ color: #667085;
386
+ }
@@ -21,6 +21,8 @@ declare const _default: {
21
21
  'page.wallet.addGoogle': string;
22
22
  'page.wallet.viewDetails': string;
23
23
  'page.wallet.expireDate': string;
24
+ 'page.wallet.notValidDate': string;
25
+ 'page.wallet.includedDate': string;
24
26
  'page.wallet.urlEmpty': string;
25
27
  'page.wallet.notIOS': string;
26
28
  'page.wallet.addSuccess': string;
@@ -69,6 +71,8 @@ declare const _default: {
69
71
  'page.wallet.addGoogle': string;
70
72
  'page.wallet.viewDetails': string;
71
73
  'page.wallet.expireDate': string;
74
+ 'page.wallet.notValidDate': string;
75
+ 'page.wallet.includedDate': string;
72
76
  'page.wallet.urlEmpty': string;
73
77
  'page.wallet.notIOS': string;
74
78
  'page.wallet.addSuccess': string;
@@ -117,6 +121,8 @@ declare const _default: {
117
121
  'page.wallet.addGoogle': string;
118
122
  'page.wallet.viewDetails': string;
119
123
  'page.wallet.expireDate': string;
124
+ 'page.wallet.notValidDate': string;
125
+ 'page.wallet.includedDate': string;
120
126
  'page.wallet.urlEmpty': string;
121
127
  'page.wallet.notIOS': string;
122
128
  'page.wallet.addSuccess': string;
@@ -48,6 +48,10 @@ var locales_default = {
48
48
  "page.wallet.addGoogle": "Add to Google Wallet",
49
49
  "page.wallet.viewDetails": "See details",
50
50
  "page.wallet.expireDate": "Long term",
51
+ "page.wallet.notValidDate": "Not valid on",
52
+ // 不可用日期
53
+ "page.wallet.includedDate": "Included dates",
54
+ // 包含日期
51
55
  "page.wallet.urlEmpty": "Wallet link is empty",
52
56
  "page.wallet.notIOS": "Apple Wallet is not supported on non-iOS devices",
53
57
  "page.wallet.addSuccess": "Successfully added to wallet",
@@ -100,6 +104,10 @@ var locales_default = {
100
104
  "page.wallet.addGoogle": "添加到谷歌钱包",
101
105
  "page.wallet.viewDetails": "查看详情",
102
106
  "page.wallet.expireDate": "长期",
107
+ "page.wallet.notValidDate": "不可用日期",
108
+ // 不可用日期
109
+ "page.wallet.includedDate": "包含日期",
110
+ // 包含日期
103
111
  "page.wallet.urlEmpty": "钱包链接为空",
104
112
  "page.wallet.notIOS": "非iOS设备不支持Apple Wallet",
105
113
  "page.wallet.addSuccess": "已成功添加到钱包",
@@ -111,7 +119,7 @@ var locales_default = {
111
119
  // Usage Rules
112
120
  "page.wallet.usageRules": "使用规则",
113
121
  "page.wallet.usageRulesSubtitle": "请仔细阅读以下使用条件",
114
- "page.wallet.timeUsageLimits": "时间使用限制",
122
+ "page.wallet.timeUsageLimits": "使用频次限制",
115
123
  "page.wallet.totalQuantityControl": "总量控制",
116
124
  "page.wallet.dailyLimit": "每日限制:",
117
125
  "page.wallet.weeklyLimit": "每周限制:",
@@ -152,6 +160,10 @@ var locales_default = {
152
160
  "page.wallet.addGoogle": "添加到谷歌錢包",
153
161
  "page.wallet.viewDetails": "查看詳情",
154
162
  "page.wallet.expireDate": "長期",
163
+ "page.wallet.notValidDate": "不可用日期",
164
+ // 不可用日期
165
+ "page.wallet.includedDate": "包含日期",
166
+ // 包含日期
155
167
  "page.wallet.urlEmpty": "錢包連結為空",
156
168
  "page.wallet.notIOS": "非iOS設備不支持Apple Wallet",
157
169
  "page.wallet.addSuccess": "已成功添加到錢包",
@@ -163,7 +175,7 @@ var locales_default = {
163
175
  // Usage Rules
164
176
  "page.wallet.usageRules": "使用規則",
165
177
  "page.wallet.usageRulesSubtitle": "請仔細閱讀以下使用條件",
166
- "page.wallet.timeUsageLimits": "時間使用限制",
178
+ "page.wallet.timeUsageLimits": "使用頻次限制",
167
179
  "page.wallet.totalQuantityControl": "總量控制",
168
180
  "page.wallet.dailyLimit": "每日限制:",
169
181
  "page.wallet.weeklyLimit": "每週限制:",
@@ -65,6 +65,14 @@ var Voucher = (0, import_model.Provider)((props) => {
65
65
  recordViewRef.current.closeDetailModal();
66
66
  }
67
67
  }, [globalState.setup]);
68
+ const handleBack = (0, import_react.useCallback)(() => {
69
+ if (recordViewRef.current) {
70
+ recordViewRef.current.closeDetailModal();
71
+ }
72
+ setGlobalState({
73
+ setup: "list"
74
+ });
75
+ }, [recordViewRef, setGlobalState]);
68
76
  const renderItem = (item) => /* @__PURE__ */ import_react.default.createElement(
69
77
  import_WalletCard.default,
70
78
  {
@@ -82,14 +90,6 @@ var Voucher = (0, import_model.Provider)((props) => {
82
90
  if (isEmpty) {
83
91
  return /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null);
84
92
  }
85
- const handleBack = (0, import_react.useCallback)(() => {
86
- if (recordViewRef.current) {
87
- recordViewRef.current.closeDetailModal();
88
- }
89
- setGlobalState({
90
- setup: "list"
91
- });
92
- }, [recordViewRef, setGlobalState]);
93
93
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, platform !== "pc" && /* @__PURE__ */ import_react.default.createElement(Title, { className: "wallet-voucher-title" }, import_utils.locales.getText("page.wallet.voucher")), /* @__PURE__ */ import_react.default.createElement(
94
94
  import_materials.CardMetricItem,
95
95
  {
@@ -55,6 +55,8 @@ var WalletCard = ({
55
55
  product_cover = "",
56
56
  par_value = "",
57
57
  unified_messages = {},
58
+ custom_schedule_snapshot,
59
+ metadata,
58
60
  ...rest
59
61
  } = item;
60
62
  const platform = (0, import_react.useMemo)(() => (0, import_utils.isMobile)() ? "h5" : "pc", []);
@@ -66,6 +68,8 @@ var WalletCard = ({
66
68
  import_materials.PisellWalletPassCard,
67
69
  {
68
70
  ...rest,
71
+ scheduleList: (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [],
72
+ validDateBySchedule: (metadata == null ? void 0 : metadata.validity_type) === "custom_schedule_validity",
69
73
  balanceTitle,
70
74
  showDetail: false,
71
75
  showRedeem: false,
@@ -88,7 +88,7 @@ var Wallet = (0, import_model.Provider)(() => {
88
88
  import_utils2.request.setRequest(utils == null ? void 0 : utils.request);
89
89
  (0, import_react.useEffect)(() => {
90
90
  document.body.id = "body";
91
- getList({ num: 999, skip: 1 });
91
+ getList({ num: 999, skip: 1, with: ["customScheduleSnapshot"] });
92
92
  }, []);
93
93
  const transformData = (data) => {
94
94
  const result = {};
@@ -353,7 +353,7 @@ var Wallet = (0, import_model.Provider)(() => {
353
353
  content: successMessage,
354
354
  duration: 2
355
355
  });
356
- getList({ num: 999, skip: 1 }, code);
356
+ getList({ num: 999, skip: 1, with: ["customScheduleSnapshot"] }, code);
357
357
  }
358
358
  dispatch({
359
359
  type: "setState",
@@ -15,6 +15,7 @@ export interface IWalletListParmsProps {
15
15
  used_status?: string;
16
16
  num?: number;
17
17
  skip?: number;
18
+ with?: string[];
18
19
  }
19
20
  /**
20
21
  * 钱包列表项属性接口
@@ -48,6 +49,12 @@ export interface IWalletListItemProps {
48
49
  machinecode_config?: {
49
50
  hide_recharge?: number;
50
51
  };
52
+ metadata: {
53
+ validity_type: string;
54
+ };
55
+ custom_schedule_snapshot: {
56
+ data: any[];
57
+ };
51
58
  }
52
59
  /**
53
60
  * 商店信息接口
@@ -0,0 +1,48 @@
1
+ interface ScheduleTextResult {
2
+ validityTexts: string[];
3
+ excluded_date: string[];
4
+ included_date: string[];
5
+ }
6
+ declare type Locale = 'en' | 'zh-CN' | 'zh-HK';
7
+ interface ScheduleItem {
8
+ id: number;
9
+ name: string | {
10
+ [key: string]: string;
11
+ };
12
+ type: 'standard' | 'time-slots' | 'designation';
13
+ start_time: string | null;
14
+ end_time: string | null;
15
+ repeat_type: 'none' | 'daily' | 'weekly';
16
+ repeat_rule: {
17
+ end: {
18
+ type: 'never' | 'date' | 'occurrence';
19
+ end_date: string | null;
20
+ occurrence: number | null;
21
+ };
22
+ frequency: number;
23
+ excluded_date: Array<{
24
+ start: string;
25
+ end: string;
26
+ }>;
27
+ included_date: any[];
28
+ frequency_date: number[];
29
+ } | null;
30
+ designation: Array<{
31
+ start_date: string;
32
+ start_time: string;
33
+ end_date: string;
34
+ end_time: string;
35
+ }> | null;
36
+ is_all: number;
37
+ time_slot: Array<{
38
+ start_time: string;
39
+ end_time: string;
40
+ }>;
41
+ }
42
+ /**
43
+ * 根据scheduleList格式化文案展示
44
+ * @param scheduleList 日程列表
45
+ * @returns 格式化后的文案结果数组,每个日程对应一个结果
46
+ */
47
+ export declare function formatScheduleText(scheduleList: ScheduleItem[], locale?: Locale): ScheduleTextResult[];
48
+ export {};