@pisell/private-materials 3.3.66 → 3.3.67

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 (129) 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 +13 -13
  7. package/build/lowcode/render/default/view.js +7 -7
  8. package/build/lowcode/view.js +7 -7
  9. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  15. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  16. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  17. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  18. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  19. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  20. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  21. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  22. package/es/components/eftposPay/amount.d.ts +1 -1
  23. package/es/components/eftposPay/device.d.ts +1 -1
  24. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  25. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  26. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  27. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  28. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  29. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  30. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  31. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  32. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  33. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  34. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  35. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  36. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  37. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  38. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  39. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  40. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  41. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  42. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  43. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  44. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  45. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  46. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  47. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  48. package/es/components/schedules/utils.d.ts +1 -1
  49. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  50. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  51. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  52. package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
  53. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  54. package/es/components/ticketBooking/locales.d.ts +146 -164
  55. package/es/components/ticketBooking/locales.js +147 -195
  56. package/es/components/walletList/index.js +7 -55
  57. package/es/components/walletList/serve.d.ts +0 -8
  58. package/es/components/walletList/serve.js +0 -38
  59. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  60. package/es/utils/index.d.ts +1 -1
  61. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  62. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  63. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  64. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  65. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  66. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  67. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  68. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  69. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  70. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  71. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  72. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  73. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  74. package/lib/components/eftposPay/amount.d.ts +1 -1
  75. package/lib/components/eftposPay/device.d.ts +1 -1
  76. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  77. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  78. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  79. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  80. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  81. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  82. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  83. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  84. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  85. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  86. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  87. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  88. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  89. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  90. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  91. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  92. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  93. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  94. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  95. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  96. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  97. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  98. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  99. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  100. package/lib/components/schedules/utils.d.ts +1 -1
  101. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  102. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  103. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  104. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
  105. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  106. package/lib/components/ticketBooking/locales.d.ts +146 -164
  107. package/lib/components/ticketBooking/locales.js +4 -22
  108. package/lib/components/walletList/index.js +14 -42
  109. package/lib/components/walletList/serve.d.ts +0 -8
  110. package/lib/components/walletList/serve.js +2 -15
  111. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  112. package/lib/utils/index.d.ts +1 -1
  113. package/package.json +3 -3
  114. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  115. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -53
  116. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  117. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  118. package/es/components/walletList/locales.d.ts +0 -18
  119. package/es/components/walletList/locales.js +0 -17
  120. package/es/components/walletList/status.d.ts +0 -38
  121. package/es/components/walletList/status.js +0 -47
  122. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  123. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -76
  124. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  125. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  126. package/lib/components/walletList/locales.d.ts +0 -18
  127. package/lib/components/walletList/locales.js +0 -41
  128. package/lib/components/walletList/status.d.ts +0 -38
  129. package/lib/components/walletList/status.js +0 -66
@@ -1,53 +0,0 @@
1
- import { formatAmount } from '@pisell/utils';
2
- import { getServiceTime } from "./formatTime";
3
- var formatProductMessage = function formatProductMessage(product, utils) {
4
- var product_option_string = product.product_option_string,
5
- options = product.options,
6
- bundle = product.bundle,
7
- currency_symbol = product.currency_symbol,
8
- start_date = product.start_date,
9
- end_date = product.end_date,
10
- holder_id = product.holder_id,
11
- holders = product.holders,
12
- multiResources = product.multiResources;
13
- var str = '';
14
- if (start_date && end_date) {
15
- str += "".concat(getServiceTime(product, start_date, utils), " \n");
16
- }
17
- if (holder_id && Array.isArray(holders)) {
18
- var targetHolder = holders.find(function (holder) {
19
- return holder.id === holder_id;
20
- });
21
- if (targetHolder !== null && targetHolder !== void 0 && targetHolder.label) {
22
- str += "".concat(targetHolder.label, " \n");
23
- }
24
- }
25
- if (Array.isArray(multiResources) && multiResources.length > 0) {
26
- multiResources.forEach(function (resource) {
27
- var id = resource.id,
28
- list = resource.list;
29
- var targetRes = list.find(function (l) {
30
- return l.id === id;
31
- });
32
- if (targetRes !== null && targetRes !== void 0 && targetRes.label) str += "".concat(targetRes === null || targetRes === void 0 ? void 0 : targetRes.label, " \n");
33
- });
34
- }
35
-
36
- // 组合规格 单规格
37
- if (product_option_string) str += "".concat(product_option_string, "\n");
38
- if (Array.isArray(options) && options.length) {
39
- options.forEach(function (opt) {
40
- str += "".concat(opt.name, " ").concat(formatAmount(opt === null || opt === void 0 ? void 0 : opt.price, 2, currency_symbol), " x ").concat(opt.num, "\n");
41
- });
42
- }
43
-
44
- // 套餐
45
- if (Array.isArray(bundle) && bundle.length) {
46
- bundle.forEach(function (item) {
47
- str += "".concat(item.title, " \n");
48
- str += "".concat(formatAmount(item.price, 2, currency_symbol), " x ").concat(item.num);
49
- });
50
- }
51
- return str;
52
- };
53
- export default formatProductMessage;
@@ -1,31 +0,0 @@
1
- import 'dayjs/locale/zh-cn';
2
- import 'dayjs/locale/en';
3
- import 'dayjs/locale/zh-tw';
4
- /**
5
- * @title: 是否英文
6
- * @description:
7
- * @param {any} item
8
- * @return {*}
9
- * @Author: WangHan
10
- * @Date: 2024-12-28 22:49
11
- */
12
- export declare const isEn: (item: any) => boolean;
13
- /**
14
- * @title: 跨日预约时间
15
- * @description:
16
- * @param {any} item
17
- * @return {*}
18
- * @Author: WangHan
19
- * @Date: 2024-12-28 22:50
20
- */
21
- export declare const formatMultiDayDate: (item: any) => string;
22
- /**
23
- * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
24
- * @description:
25
- * @param {any} item
26
- * @param {any} currentDate
27
- * @return {*}
28
- * @Author: zhiwei.Wang
29
- * @Date: 2024-04-26 14:04
30
- */
31
- export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
@@ -1,144 +0,0 @@
1
- import dayjs from 'dayjs';
2
- import { locales } from '@pisell/utils';
3
- import 'dayjs/locale/zh-cn';
4
- import 'dayjs/locale/en';
5
- import 'dayjs/locale/zh-tw';
6
-
7
- /**
8
- * @title: 是否英文
9
- * @description:
10
- * @param {any} item
11
- * @return {*}
12
- * @Author: WangHan
13
- * @Date: 2024-12-28 22:49
14
- */
15
- export var isEn = function isEn(item) {
16
- var locale = (item === null || item === void 0 ? void 0 : item.locale) || 'en-US';
17
- var _isEn = locale === 'en-US' || locale === 'en';
18
- var localeTypes = {
19
- 'en-US': 'en',
20
- 'zh-CN': 'zh-cn',
21
- 'zh-HK': 'zh-tw'
22
- };
23
- dayjs.locale(localeTypes[locale]);
24
- return _isEn;
25
- };
26
-
27
- /**
28
- * @title: 跨日预约时间
29
- * @description:
30
- * @param {any} item
31
- * @return {*}
32
- * @Author: WangHan
33
- * @Date: 2024-12-28 22:50
34
- */
35
- export var formatMultiDayDate = function formatMultiDayDate(item) {
36
- var _isEn = isEn(item);
37
-
38
- // 跨日
39
- var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
40
- var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
41
- var _format = _isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
42
- var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
43
- return date;
44
- };
45
-
46
- /**
47
- * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
48
- * @description:
49
- * @param {any} item
50
- * @param {any} currentDate
51
- * @return {*}
52
- * @Author: zhiwei.Wang
53
- * @Date: 2024-04-26 14:04
54
- */
55
- export var getServiceTime = function getServiceTime(item, currentDate, utils) {
56
- var _utils$storage, _item$format;
57
- if (!dayjs(currentDate).isValid()) return '';
58
- var locale = (item === null || item === void 0 ? void 0 : item.locale) || (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
59
- var isEn = locale === 'en-US' || locale === 'en';
60
- var localeTypes = {
61
- 'en-US': 'en',
62
- 'zh-CN': 'zh-cn',
63
- 'zh-HK': 'zh-tw'
64
- };
65
- dayjs.locale(localeTypes[locale]);
66
- var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
67
- var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
68
- var diffInDays = (item === null || item === void 0 ? void 0 : item.custom_day_count) || endDate.diff(startDate, 'day');
69
-
70
- // 1.2时间格式, 同天显示 年月日 开始 - 结束, 不同天 年月日 开始 - 年月日 结束
71
- if (item !== null && item !== void 0 && item.duration_type) {
72
- var sameDay = startDate.isSame(endDate, 'day');
73
- var dateFormat = isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
74
- var timeFormat = 'HH:mm';
75
- var startTime = (item === null || item === void 0 ? void 0 : item.start_time) || startDate.format(timeFormat);
76
- var endTime = (item === null || item === void 0 ? void 0 : item.end_time) || endDate.format(timeFormat);
77
- var dateTime = '';
78
- if (sameDay) {
79
- if (isEn) {
80
- // 英文:开始时间 - 结束时间 年月日
81
- dateTime = "".concat(startTime, " ~ ").concat(endTime, " ").concat(startDate.format(dateFormat));
82
- } else {
83
- // 中文:年月日 开始时间 - 结束时间
84
- dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endTime);
85
- }
86
- } else {
87
- // 不同天
88
- if (isEn) {
89
- // 英文:开始时间 年月日 - 结束时间 年月日
90
- dateTime = "".concat(startTime, " ").concat(startDate.format(dateFormat), " ~ ").concat(endTime, " ").concat(endDate.format(dateFormat));
91
- } else {
92
- // 中文:年月日 开始时间 - 年月日 结束时间
93
- dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endDate.format(dateFormat), " ").concat(endTime);
94
- }
95
- }
96
- var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
97
- var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
98
- var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), item === null || item === void 0 ? void 0 : item.duration_type);
99
- var durationText = '';
100
- if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
101
- // 转为小时+分钟
102
- var hours = Math.floor(_duration / 60);
103
- var minutes = _duration % 60;
104
- durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
105
- } else if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'days') {
106
- durationText = locales.getText('pisell2.product.card.day')(_duration);
107
- } else {
108
- durationText = "".concat(_duration);
109
- }
110
- return "".concat(dateTime, " (").concat(durationText, ")");
111
- }
112
- var _format = isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
113
-
114
- // 是否自定义格式
115
- if (item !== null && item !== void 0 && item.hasOwnProperty('format') && (item === null || item === void 0 || (_item$format = item.format) === null || _item$format === void 0 ? void 0 : _item$format.length) > 0) {
116
- var _item$format2, _item$format3;
117
- _format = isEn ? item === null || item === void 0 || (_item$format2 = item.format) === null || _item$format2 === void 0 ? void 0 : _item$format2[0] : item === null || item === void 0 || (_item$format3 = item.format) === null || _item$format3 === void 0 ? void 0 : _item$format3[1];
118
- }
119
-
120
- // 是否显示时间
121
- if (item !== null && item !== void 0 && item.show_time) {
122
- startDate = dayjs(item !== null && item !== void 0 && item.start_time ? "".concat(item === null || item === void 0 ? void 0 : item.start_date, " ").concat(item === null || item === void 0 ? void 0 : item.start_time) : startDate.format('YYYY-MM-DD HH:mm'));
123
- endDate = dayjs(item !== null && item !== void 0 && item.end_time ? "".concat(item === null || item === void 0 ? void 0 : item.end_date, " ").concat(item === null || item === void 0 ? void 0 : item.end_time) : endDate.format('YYYY-MM-DD HH:mm'));
124
- }
125
-
126
- // 显示时长分钟
127
- if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
128
- diffInDays = endDate.diff(startDate, 'minute');
129
- }
130
- var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
131
-
132
- // 自定义文案
133
- var text = locales.getText('pisell2.product.card.day')(diffInDays);
134
- if (item !== null && item !== void 0 && item.custom_day_count) {
135
- text = locales.getText('pisell2.product.card.day.event')(diffInDays);
136
- }
137
- var textTypes = {
138
- 'minutes': locales.getText('pisell2.product.card.minute')(diffInDays),
139
- 'event': locales.getText('pisell2.product.card.day.event')(diffInDays)
140
- };
141
- text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[item === null || item === void 0 ? void 0 : item.duration_type]) || text;
142
- var duration = "".concat(diffInDays).concat(text);
143
- return "".concat(date, " (").concat(duration, ")");
144
- };
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- en: {
3
- 'page.wallet.guide.title': string;
4
- 'page.wallet.guide.subtitle': string;
5
- 'page.wallet.guide.button': string;
6
- };
7
- 'zh-CN': {
8
- 'page.wallet.guide.title': string;
9
- 'page.wallet.guide.subtitle': string;
10
- 'page.wallet.guide.button': string;
11
- };
12
- 'zh-HK': {
13
- 'page.wallet.guide.title': string;
14
- 'page.wallet.guide.subtitle': string;
15
- 'page.wallet.guide.button': string;
16
- };
17
- };
18
- export default _default;
@@ -1,17 +0,0 @@
1
- export default {
2
- "en": {
3
- 'page.wallet.guide.title': 'Activate Now!',
4
- 'page.wallet.guide.subtitle': 'Unlock membership benefits now',
5
- 'page.wallet.guide.button': 'Get Your Reward'
6
- },
7
- 'zh-CN': {
8
- 'page.wallet.guide.title': '待解锁权益',
9
- 'page.wallet.guide.subtitle': '成为专属会员,即可享受更多权益',
10
- 'page.wallet.guide.button': '点击获取'
11
- },
12
- 'zh-HK': {
13
- 'page.wallet.guide.title': '待解鎖權益',
14
- 'page.wallet.guide.subtitle': '成為專屬會員,即可享受更多權益',
15
- 'page.wallet.guide.button': '點擊獲取'
16
- }
17
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * @title: 默认引导页配置
3
- * @description:
4
- * @param {any} locales
5
- * @return {any}
6
- * @Author: WangHan
7
- * @Date: 2025-06-09 14:22
8
- */
9
- export declare const defaultWalletGuideConfig: () => {
10
- show: number;
11
- align: string;
12
- backgroundColor: string;
13
- backgroundImage: string;
14
- backgroundImageAlt: string;
15
- buttonColor: string;
16
- buttonBorderColor: string;
17
- titleConfig: {
18
- size: number;
19
- color: string;
20
- weight: number;
21
- style: string;
22
- text: any;
23
- };
24
- subtitleConfig: {
25
- size: number;
26
- color: string;
27
- weight: number;
28
- style: string;
29
- text: any;
30
- };
31
- buttonConfig: {
32
- size: number;
33
- color: string;
34
- weight: number;
35
- style: string;
36
- text: any;
37
- };
38
- };
@@ -1,47 +0,0 @@
1
- import { locales } from '@pisell/utils';
2
-
3
- /**
4
- * @title: 默认引导页配置
5
- * @description:
6
- * @param {any} locales
7
- * @return {any}
8
- * @Author: WangHan
9
- * @Date: 2025-06-09 14:22
10
- */
11
- export var defaultWalletGuideConfig = function defaultWalletGuideConfig() {
12
- return {
13
- show: 1,
14
- //文字居中
15
- align: 'center',
16
- //背景颜色
17
- backgroundColor: '',
18
- backgroundImage: '',
19
- backgroundImageAlt: '',
20
- buttonColor: 'rgba(127,86,217,1)',
21
- buttonBorderColor: 'rgba(127,86,217,1)',
22
- // 标题配置
23
- titleConfig: {
24
- size: 18,
25
- color: 'rgba(255,255,255,1)',
26
- weight: 600,
27
- style: 'normal',
28
- text: locales.getText('page.wallet.guide.title')
29
- },
30
- // 副标题配置
31
- subtitleConfig: {
32
- size: 14,
33
- color: 'rgba(208,213,221,1)',
34
- weight: 400,
35
- style: 'normal',
36
- text: locales.getText('page.wallet.guide.subtitle')
37
- },
38
- // 按钮配置
39
- buttonConfig: {
40
- size: 14,
41
- color: 'rgba(255,255,255,1)',
42
- weight: 600,
43
- style: 'normal',
44
- text: locales.getText('page.wallet.guide.button')
45
- }
46
- };
47
- };
@@ -1,2 +0,0 @@
1
- declare const formatProductMessage: (product: any, utils: any) => string;
2
- export default formatProductMessage;
@@ -1,76 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/ticketBooking/utils/formatProductMessage.ts
20
- var formatProductMessage_exports = {};
21
- __export(formatProductMessage_exports, {
22
- default: () => formatProductMessage_default
23
- });
24
- module.exports = __toCommonJS(formatProductMessage_exports);
25
- var import_utils = require("@pisell/utils");
26
- var import_formatTime = require("./formatTime");
27
- var formatProductMessage = (product, utils) => {
28
- const {
29
- product_option_string,
30
- options,
31
- bundle,
32
- currency_symbol,
33
- start_date,
34
- end_date,
35
- holder_id,
36
- holders,
37
- multiResources
38
- } = product;
39
- let str = "";
40
- if (start_date && end_date) {
41
- str += `${(0, import_formatTime.getServiceTime)(product, start_date, utils)}
42
- `;
43
- }
44
- if (holder_id && Array.isArray(holders)) {
45
- const targetHolder = holders.find((holder) => holder.id === holder_id);
46
- if (targetHolder == null ? void 0 : targetHolder.label) {
47
- str += `${targetHolder.label}
48
- `;
49
- }
50
- }
51
- if (Array.isArray(multiResources) && multiResources.length > 0) {
52
- multiResources.forEach((resource) => {
53
- const { id, list } = resource;
54
- const targetRes = list.find((l) => l.id === id);
55
- if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
56
- `;
57
- });
58
- }
59
- if (product_option_string) str += `${product_option_string}
60
- `;
61
- if (Array.isArray(options) && options.length) {
62
- options.forEach((opt) => {
63
- str += `${opt.name} ${(0, import_utils.formatAmount)(opt == null ? void 0 : opt.price, 2, currency_symbol)} x ${opt.num}
64
- `;
65
- });
66
- }
67
- if (Array.isArray(bundle) && bundle.length) {
68
- bundle.forEach((item) => {
69
- str += `${item.title}
70
- `;
71
- str += `${(0, import_utils.formatAmount)(item.price, 2, currency_symbol)} x ${item.num}`;
72
- });
73
- }
74
- return str;
75
- };
76
- var formatProductMessage_default = formatProductMessage;
@@ -1,31 +0,0 @@
1
- import 'dayjs/locale/zh-cn';
2
- import 'dayjs/locale/en';
3
- import 'dayjs/locale/zh-tw';
4
- /**
5
- * @title: 是否英文
6
- * @description:
7
- * @param {any} item
8
- * @return {*}
9
- * @Author: WangHan
10
- * @Date: 2024-12-28 22:49
11
- */
12
- export declare const isEn: (item: any) => boolean;
13
- /**
14
- * @title: 跨日预约时间
15
- * @description:
16
- * @param {any} item
17
- * @return {*}
18
- * @Author: WangHan
19
- * @Date: 2024-12-28 22:50
20
- */
21
- export declare const formatMultiDayDate: (item: any) => string;
22
- /**
23
- * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
24
- * @description:
25
- * @param {any} item
26
- * @param {any} currentDate
27
- * @return {*}
28
- * @Author: zhiwei.Wang
29
- * @Date: 2024-04-26 14:04
30
- */
31
- export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
@@ -1,139 +0,0 @@
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/ticketBooking/utils/formatTime.ts
30
- var formatTime_exports = {};
31
- __export(formatTime_exports, {
32
- formatMultiDayDate: () => formatMultiDayDate,
33
- getServiceTime: () => getServiceTime,
34
- isEn: () => isEn
35
- });
36
- module.exports = __toCommonJS(formatTime_exports);
37
- var import_dayjs = __toESM(require("dayjs"));
38
- var import_utils = require("@pisell/utils");
39
- var import_zh_cn = require("dayjs/locale/zh-cn");
40
- var import_en = require("dayjs/locale/en");
41
- var import_zh_tw = require("dayjs/locale/zh-tw");
42
- var isEn = (item) => {
43
- const locale = (item == null ? void 0 : item.locale) || "en-US";
44
- const _isEn = locale === "en-US" || locale === "en";
45
- const localeTypes = {
46
- "en-US": "en",
47
- "zh-CN": "zh-cn",
48
- "zh-HK": "zh-tw"
49
- };
50
- import_dayjs.default.locale(localeTypes[locale]);
51
- return _isEn;
52
- };
53
- var formatMultiDayDate = (item) => {
54
- const _isEn = isEn(item);
55
- const startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
56
- const endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
57
- const _format = _isEn ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
58
- const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
59
- return date;
60
- };
61
- var getServiceTime = (item, currentDate, utils) => {
62
- var _a, _b, _c, _d;
63
- if (!(0, import_dayjs.default)(currentDate).isValid()) return "";
64
- const locale = (item == null ? void 0 : item.locale) || ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en-US";
65
- const isEn2 = locale === "en-US" || locale === "en";
66
- const localeTypes = {
67
- "en-US": "en",
68
- "zh-CN": "zh-cn",
69
- "zh-HK": "zh-tw"
70
- };
71
- import_dayjs.default.locale(localeTypes[locale]);
72
- let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
73
- let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
74
- let diffInDays = (item == null ? void 0 : item.custom_day_count) || endDate.diff(startDate, "day");
75
- if (item == null ? void 0 : item.duration_type) {
76
- const sameDay = startDate.isSame(endDate, "day");
77
- const dateFormat = isEn2 ? "DD/MM/YYYY" : "YYYY-MM-DD";
78
- const timeFormat = "HH:mm";
79
- const startTime = (item == null ? void 0 : item.start_time) || startDate.format(timeFormat);
80
- const endTime = (item == null ? void 0 : item.end_time) || endDate.format(timeFormat);
81
- let dateTime = "";
82
- if (sameDay) {
83
- if (isEn2) {
84
- dateTime = `${startTime} ~ ${endTime} ${startDate.format(dateFormat)}`;
85
- } else {
86
- dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endTime}`;
87
- }
88
- } else {
89
- if (isEn2) {
90
- dateTime = `${startTime} ${startDate.format(dateFormat)} ~ ${endTime} ${endDate.format(dateFormat)}`;
91
- } else {
92
- dateTime = `${startDate.format(dateFormat)} ${startTime} ~ ${endDate.format(dateFormat)} ${endTime}`;
93
- }
94
- }
95
- const startDateTime = `${startDate.format("YYYY-MM-DD")} ${startTime}`;
96
- const endDateTime = `${endDate.format("YYYY-MM-DD")} ${endTime}`;
97
- let _duration = (0, import_dayjs.default)(endDateTime).diff((0, import_dayjs.default)(startDateTime), item == null ? void 0 : item.duration_type);
98
- let durationText = "";
99
- if ((item == null ? void 0 : item.duration_type) === "minutes") {
100
- const hours = Math.floor(_duration / 60);
101
- const minutes = _duration % 60;
102
- durationText = import_utils.locales.getText("pisell2.product.card.hour.minute")(hours, minutes);
103
- } else if ((item == null ? void 0 : item.duration_type) === "days") {
104
- durationText = import_utils.locales.getText("pisell2.product.card.day")(_duration);
105
- } else {
106
- durationText = `${_duration}`;
107
- }
108
- return `${dateTime} (${durationText})`;
109
- }
110
- let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
111
- if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
112
- _format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
113
- }
114
- if (item == null ? void 0 : item.show_time) {
115
- startDate = (0, import_dayjs.default)((item == null ? void 0 : item.start_time) ? `${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}` : startDate.format("YYYY-MM-DD HH:mm"));
116
- endDate = (0, import_dayjs.default)((item == null ? void 0 : item.end_time) ? `${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}` : endDate.format("YYYY-MM-DD HH:mm"));
117
- }
118
- if ((item == null ? void 0 : item.duration_type) === "minutes") {
119
- diffInDays = endDate.diff(startDate, "minute");
120
- }
121
- const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
122
- let text = import_utils.locales.getText("pisell2.product.card.day")(diffInDays);
123
- if (item == null ? void 0 : item.custom_day_count) {
124
- text = import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays);
125
- }
126
- const textTypes = {
127
- "minutes": import_utils.locales.getText("pisell2.product.card.minute")(diffInDays),
128
- "event": import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays)
129
- };
130
- text = (textTypes == null ? void 0 : textTypes[item == null ? void 0 : item.duration_type]) || text;
131
- let duration = `${diffInDays}${text}`;
132
- return `${date} (${duration})`;
133
- };
134
- // Annotate the CommonJS export names for ESM import in node:
135
- 0 && (module.exports = {
136
- formatMultiDayDate,
137
- getServiceTime,
138
- isEn
139
- });
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- en: {
3
- 'page.wallet.guide.title': string;
4
- 'page.wallet.guide.subtitle': string;
5
- 'page.wallet.guide.button': string;
6
- };
7
- 'zh-CN': {
8
- 'page.wallet.guide.title': string;
9
- 'page.wallet.guide.subtitle': string;
10
- 'page.wallet.guide.button': string;
11
- };
12
- 'zh-HK': {
13
- 'page.wallet.guide.title': string;
14
- 'page.wallet.guide.subtitle': string;
15
- 'page.wallet.guide.button': string;
16
- };
17
- };
18
- export default _default;
@@ -1,41 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/walletList/locales.ts
20
- var locales_exports = {};
21
- __export(locales_exports, {
22
- default: () => locales_default
23
- });
24
- module.exports = __toCommonJS(locales_exports);
25
- var locales_default = {
26
- "en": {
27
- "page.wallet.guide.title": "Activate Now!",
28
- "page.wallet.guide.subtitle": "Unlock membership benefits now",
29
- "page.wallet.guide.button": "Get Your Reward"
30
- },
31
- "zh-CN": {
32
- "page.wallet.guide.title": "待解锁权益",
33
- "page.wallet.guide.subtitle": "成为专属会员,即可享受更多权益",
34
- "page.wallet.guide.button": "点击获取"
35
- },
36
- "zh-HK": {
37
- "page.wallet.guide.title": "待解鎖權益",
38
- "page.wallet.guide.subtitle": "成為專屬會員,即可享受更多權益",
39
- "page.wallet.guide.button": "點擊獲取"
40
- }
41
- };