@pisell/private-materials 6.3.33 → 6.3.35

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 (175) 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 +23 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -8
  11. package/es/components/booking/addons/model.d.ts +10 -1
  12. package/es/components/booking/components/customSelect/index.js +18 -3
  13. package/es/components/booking/forms/model.d.ts +10 -1
  14. package/es/components/booking/info/model.d.ts +10 -1
  15. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  16. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  17. package/es/components/booking/model.d.ts +9 -1
  18. package/es/components/booking/notes/model.d.ts +10 -1
  19. package/es/components/booking/payments/model.d.ts +10 -1
  20. package/es/components/index.d.ts +1 -2
  21. package/es/components/index.js +1 -2
  22. package/es/components/pay/toC/model.d.ts +9 -1
  23. package/es/components/schedules/model.d.ts +9 -1
  24. package/es/components/wallet/Detail/model.d.ts +13 -1
  25. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  26. package/es/components/wallet/PointCard/model.d.ts +13 -1
  27. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  28. package/es/components/wallet/Voucher/model.d.ts +13 -1
  29. package/es/components/wallet/model.d.ts +9 -1
  30. package/es/components/walletList/index.d.ts +0 -25
  31. package/es/components/walletList/index.js +98 -66
  32. package/es/components/walletList/serve.d.ts +4 -0
  33. package/es/components/walletList/serve.js +46 -13
  34. package/es/components/walletList/types/index.d.ts +12 -12
  35. package/es/components/walletList/types/index.js +2 -2
  36. package/es/index.d.ts +2 -1
  37. package/es/index.js +2 -1
  38. package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  39. package/es/plus/productSelect/CategoryTabs/index.js +6 -3
  40. package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  41. package/es/plus/productSelect/utils.js +0 -1
  42. package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
  43. package/es/plus/walletEditor/WalletEditor.js +316 -0
  44. package/es/plus/walletEditor/WalletEditor.less +129 -0
  45. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  46. package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
  47. package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  48. package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
  49. package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
  50. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  51. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
  52. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  53. package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  54. package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
  55. package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
  56. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  57. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
  58. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  59. package/es/plus/walletEditor/index.d.ts +3 -0
  60. package/es/plus/walletEditor/index.js +3 -0
  61. package/es/plus/walletEditor/locales.d.ts +126 -0
  62. package/es/plus/walletEditor/locales.js +143 -0
  63. package/es/plus/walletEditor/types.d.ts +52 -0
  64. package/es/plus/walletEditor/types.js +1 -0
  65. package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  66. package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
  67. package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
  68. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  69. package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
  70. package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
  71. package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
  72. package/es/plus/walletPassGallery/components/passList/index.js +115 -0
  73. package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  74. package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
  75. package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
  76. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
  77. package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
  78. package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  79. package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  80. package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
  81. package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
  82. package/es/plus/walletPassGallery/index.d.ts +6 -0
  83. package/es/plus/walletPassGallery/index.js +602 -0
  84. package/es/plus/walletPassGallery/index.less +115 -0
  85. package/es/plus/walletPassGallery/locales.d.ts +270 -0
  86. package/es/plus/walletPassGallery/locales.js +279 -0
  87. package/es/plus/walletPassGallery/serve.d.ts +218 -0
  88. package/es/plus/walletPassGallery/serve.js +289 -0
  89. package/es/pro/Login2.0/Login2.js +8 -1
  90. package/es/pro/Login2.0/locales.js +93 -93
  91. package/lib/components/booking/addons/model.d.ts +10 -1
  92. package/lib/components/booking/components/customSelect/index.js +22 -3
  93. package/lib/components/booking/forms/model.d.ts +10 -1
  94. package/lib/components/booking/info/model.d.ts +10 -1
  95. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  96. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  97. package/lib/components/booking/model.d.ts +9 -1
  98. package/lib/components/booking/notes/model.d.ts +10 -1
  99. package/lib/components/booking/payments/model.d.ts +10 -1
  100. package/lib/components/index.d.ts +1 -2
  101. package/lib/components/index.js +0 -3
  102. package/lib/components/pay/toC/model.d.ts +9 -1
  103. package/lib/components/schedules/model.d.ts +9 -1
  104. package/lib/components/wallet/Detail/model.d.ts +13 -1
  105. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  106. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  107. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  108. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  109. package/lib/components/wallet/model.d.ts +9 -1
  110. package/lib/components/walletList/index.d.ts +0 -25
  111. package/lib/components/walletList/index.js +90 -51
  112. package/lib/components/walletList/serve.d.ts +4 -0
  113. package/lib/components/walletList/serve.js +12 -0
  114. package/lib/components/walletList/types/index.d.ts +12 -12
  115. package/lib/index.d.ts +2 -1
  116. package/lib/index.js +6 -3
  117. package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  118. package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
  119. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  120. package/lib/plus/productSelect/utils.js +0 -1
  121. package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
  122. package/lib/plus/walletEditor/WalletEditor.js +354 -0
  123. package/lib/plus/walletEditor/WalletEditor.less +129 -0
  124. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  125. package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
  126. package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  127. package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
  128. package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
  129. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  130. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
  131. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  132. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  133. package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
  134. package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
  135. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  136. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
  137. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  138. package/lib/plus/walletEditor/index.d.ts +3 -0
  139. package/lib/plus/walletEditor/index.js +42 -0
  140. package/lib/plus/walletEditor/locales.d.ts +126 -0
  141. package/lib/plus/walletEditor/locales.js +167 -0
  142. package/lib/plus/walletEditor/types.d.ts +52 -0
  143. package/lib/plus/walletEditor/types.js +17 -0
  144. package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  145. package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
  146. package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
  147. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  148. package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
  149. package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
  150. package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
  151. package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
  152. package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  153. package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
  154. package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
  155. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
  156. package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
  157. package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  158. package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  159. package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
  160. package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
  161. package/lib/plus/walletPassGallery/index.d.ts +6 -0
  162. package/lib/plus/walletPassGallery/index.js +498 -0
  163. package/lib/plus/walletPassGallery/index.less +115 -0
  164. package/lib/plus/walletPassGallery/locales.d.ts +270 -0
  165. package/lib/plus/walletPassGallery/locales.js +299 -0
  166. package/lib/plus/walletPassGallery/serve.d.ts +218 -0
  167. package/lib/plus/walletPassGallery/serve.js +98 -0
  168. package/lib/pro/Login2.0/Login2.js +6 -0
  169. package/lib/pro/Login2.0/locales.js +93 -93
  170. package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
  171. package/lowcode/wallet-editor/meta.ts +57 -0
  172. package/lowcode/wallet-editor/snippets.ts +13 -0
  173. package/lowcode/wallet-pass-gallery/meta.ts +35 -0
  174. package/package.json +3 -3
  175. package/lowcode/wallet/meta.ts +0 -79
@@ -0,0 +1,248 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React, { useMemo } from 'react';
8
+ import { Typography } from '@pisell/materials';
9
+ import { locales } from '@pisell/utils';
10
+ import "./index.less";
11
+ var Text = Typography.Text;
12
+ function UsageRules(_ref) {
13
+ var _ref$className = _ref.className,
14
+ className = _ref$className === void 0 ? '' : _ref$className,
15
+ style = _ref.style,
16
+ dataSource = _ref.dataSource;
17
+ var _ref2 = dataSource || {},
18
+ _ref2$extension_data = _ref2.extension_data,
19
+ extension_data = _ref2$extension_data === void 0 ? [] : _ref2$extension_data,
20
+ _ref2$customer_order_ = _ref2.customer_order_behavior_count,
21
+ customer_order_behavior_count = _ref2$customer_order_ === void 0 ? 0 : _ref2$customer_order_,
22
+ _ref2$total_order_beh = _ref2.total_order_behavior_count,
23
+ total_order_behavior_count = _ref2$total_order_beh === void 0 ? 0 : _ref2$total_order_beh;
24
+ var creditsData = useMemo(function () {
25
+ var usageCreditsItem = extension_data.find(function (item) {
26
+ return item.field_key === 'usage_credits';
27
+ });
28
+ return usageCreditsItem === null || usageCreditsItem === void 0 ? void 0 : usageCreditsItem.value;
29
+ }, [extension_data]);
30
+ var rules = useMemo(function () {
31
+ if (!creditsData) return [];
32
+ var rules = [];
33
+
34
+ // Add daily limit if exists
35
+ if (creditsData.max_per_day > 0) {
36
+ rules.push({
37
+ type: 'daily',
38
+ limit: creditsData.max_per_day,
39
+ description: '',
40
+ // Will be filled by localized text
41
+ resetTime: '' // Will be filled by localized text
42
+ });
43
+ }
44
+
45
+ // Add weekly limit if exists
46
+ if (creditsData.max_per_week > 0) {
47
+ rules.push({
48
+ type: 'weekly',
49
+ limit: creditsData.max_per_week,
50
+ description: '',
51
+ // Will be filled by localized text
52
+ resetTime: '' // Will be filled by localized text
53
+ });
54
+ }
55
+
56
+ // Add monthly limit if exists
57
+ if (creditsData.max_per_month > 0) {
58
+ rules.push({
59
+ type: 'monthly',
60
+ limit: creditsData.max_per_month,
61
+ description: '',
62
+ // Will be filled by localized text
63
+ resetTime: '' // Will be filled by localized text
64
+ });
65
+ }
66
+ return rules;
67
+ }, [creditsData]);
68
+
69
+ // Generate personal limit data
70
+ var personalLimit = useMemo(function () {
71
+ if (!creditsData) return undefined;
72
+ var totalCredits = creditsData.total_credits || 0;
73
+ var perUserLimit = creditsData.per_user_limit || 0;
74
+
75
+ // 使用 total_credits 和 per_user_limit 中的较小值且非 0 的值作为总数
76
+ // 如果 totalCredits 是 0,则使用 perUserLimit
77
+ var total = 0;
78
+ if (totalCredits > 0 && perUserLimit > 0) {
79
+ total = Math.min(totalCredits, perUserLimit);
80
+ } else {
81
+ total = Math.max(totalCredits, perUserLimit);
82
+ }
83
+
84
+ // 单张卡剩余多少
85
+ var total_remaining = 0;
86
+ if (totalCredits > 0) {
87
+ total_remaining = totalCredits - (total_order_behavior_count || 0);
88
+ }
89
+ // 个人剩余多少
90
+ var perUser_remaining = 0;
91
+ if (perUserLimit > 0) {
92
+ perUser_remaining = perUserLimit - (customer_order_behavior_count || 0);
93
+ }
94
+ var remaining = 0;
95
+ if (total_remaining > 0 && perUser_remaining > 0) {
96
+ remaining = Math.min(total_remaining, perUser_remaining);
97
+ } else {
98
+ // 如果有一个是 0,还需要看是否是因为配置是 0 才导致的 0
99
+ // 先看总次数是不是剩余 0,是因为什么剩余 0
100
+ if (total_remaining === 0) {
101
+ if (totalCredits === 0) {
102
+ // 代表不限制总使用次数
103
+ remaining = perUser_remaining;
104
+ } else {
105
+ // 代表限制总使用次数,但是总使用次数为 0,则 remaining 为 0
106
+ remaining = 0;
107
+ }
108
+ } else {
109
+ // 如果剩余总使用次数大于 0,个人使用次数为 0,则 remaining 为 0
110
+ if (perUser_remaining === 0) {
111
+ remaining = 0;
112
+ }
113
+ }
114
+ }
115
+ return {
116
+ total: total,
117
+ remaining: remaining,
118
+ note: '' // Will be filled by localized text
119
+ };
120
+ }, [creditsData, total_order_behavior_count, customer_order_behavior_count]);
121
+
122
+ // Helper function to interpolate text with variables
123
+ var interpolateText = function interpolateText(text, variables) {
124
+ var ret = text.replace(/\{(\w+)\}/g, function (match, key) {
125
+ return variables[key] !== undefined ? variables[key] : match;
126
+ });
127
+ return ret;
128
+ };
129
+
130
+ // Get localized text with fallback
131
+ var getText = function getText(key, fallback) {
132
+ return (locales === null || locales === void 0 ? void 0 : locales.getText(key)) || fallback || key;
133
+ };
134
+
135
+ // Generate rule description with limit value
136
+ var getRuleDescription = function getRuleDescription(type, limit) {
137
+ // Handle unlimited case (limit = 0 means unlimited)
138
+ if (limit === 0 && type === 'monthly') {
139
+ return getText('wallet-pass-gallery.monthlyLimitUnlimited', '无限制');
140
+ }
141
+ var templateKey = "wallet-pass-gallery.".concat(type, "LimitDesc");
142
+ var template = getText(templateKey, '');
143
+ return interpolateText(template, {
144
+ limit: limit
145
+ });
146
+ };
147
+
148
+ // Generate rule reset time text
149
+ var getRuleResetTime = function getRuleResetTime(type) {
150
+ var resetKey = "wallet-pass-gallery.".concat(type, "Reset");
151
+ return getText(resetKey, '');
152
+ };
153
+
154
+ // Default rules with localized text
155
+ var defaultRules = [{
156
+ type: 'daily',
157
+ limit: 3,
158
+ description: getRuleDescription('daily', 3),
159
+ resetTime: getRuleResetTime('daily')
160
+ }, {
161
+ type: 'weekly',
162
+ limit: 15,
163
+ description: getRuleDescription('weekly', 15),
164
+ resetTime: getRuleResetTime('weekly')
165
+ }, {
166
+ type: 'monthly',
167
+ limit: 60,
168
+ description: getRuleDescription('monthly', 60),
169
+ resetTime: getRuleResetTime('monthly')
170
+ }];
171
+
172
+ // Process rules to add localized descriptions
173
+ var processedRules = rules ? rules.map(function (rule) {
174
+ return _objectSpread(_objectSpread({}, rule), {}, {
175
+ description: getRuleDescription(rule.type, rule.limit),
176
+ resetTime: getRuleResetTime(rule.type)
177
+ });
178
+ }) : defaultRules;
179
+ var finalRules = processedRules;
180
+ var getRuleLabel = function getRuleLabel(type) {
181
+ switch (type) {
182
+ case 'daily':
183
+ return getText('wallet-pass-gallery.dailyLimit', '每日限制:');
184
+ case 'weekly':
185
+ return getText('wallet-pass-gallery.weeklyLimit', '每周限制:');
186
+ case 'monthly':
187
+ return getText('wallet-pass-gallery.monthlyLimit', '每月限制:');
188
+ default:
189
+ return getText('wallet-pass-gallery.dailyLimit', '限制:');
190
+ }
191
+ };
192
+ if (!creditsData) return null;
193
+ return /*#__PURE__*/React.createElement("div", {
194
+ className: "pisell-wallet-pass-gallery_usage-rules ".concat(className),
195
+ style: style
196
+ }, /*#__PURE__*/React.createElement(Text, {
197
+ className: "pisell-wallet-pass-gallery_usage-rules-title"
198
+ }, getText('wallet-pass-gallery.usageRules', '使用规则')), /*#__PURE__*/React.createElement(Text, {
199
+ className: "pisell-wallet-pass-gallery_usage-rules-subtitle"
200
+ }, getText('wallet-pass-gallery.usageRulesSubtitle', '请仔细阅读以下使用条件')), /*#__PURE__*/React.createElement("div", {
201
+ className: "pisell-wallet-pass-gallery_usage-rules-section"
202
+ }, /*#__PURE__*/React.createElement(Text, {
203
+ className: "pisell-wallet-pass-gallery_usage-rules-section-title"
204
+ }, getText('wallet-pass-gallery.timeUsageLimits', '时间使用限制')), /*#__PURE__*/React.createElement("div", {
205
+ className: "pisell-wallet-pass-gallery_usage-rules-list"
206
+ }, finalRules.length > 0 ? finalRules.map(function (rule, index) {
207
+ return /*#__PURE__*/React.createElement("div", {
208
+ key: index,
209
+ className: "pisell-wallet-pass-gallery_usage-rules-item"
210
+ }, /*#__PURE__*/React.createElement("div", {
211
+ className: "pisell-wallet-pass-gallery_usage-rules-item-content"
212
+ }, /*#__PURE__*/React.createElement("div", {
213
+ className: "pisell-wallet-pass-gallery_usage-rules-item-main-line"
214
+ }, /*#__PURE__*/React.createElement(Text, {
215
+ className: "pisell-wallet-pass-gallery_usage-rules-item-label"
216
+ }, getRuleLabel(rule.type)), /*#__PURE__*/React.createElement(Text, {
217
+ className: "pisell-wallet-pass-gallery_usage-rules-item-description"
218
+ }, rule.description)), rule.resetTime && /*#__PURE__*/React.createElement(Text, {
219
+ className: "pisell-wallet-pass-gallery_usage-rules-item-reset"
220
+ }, rule.resetTime)));
221
+ }) : /*#__PURE__*/React.createElement("div", {
222
+ className: "pisell-wallet-pass-gallery_usage-rules-item"
223
+ }, /*#__PURE__*/React.createElement("div", {
224
+ className: "pisell-wallet-pass-gallery_usage-rules-item-content"
225
+ }, /*#__PURE__*/React.createElement(Text, {
226
+ className: "pisell-wallet-pass-gallery_usage-rules-item-description"
227
+ }, getText('wallet-pass-gallery.monthlyLimitUnlimited', '无限制')))))), /*#__PURE__*/React.createElement("div", {
228
+ className: "pisell-wallet-pass-gallery_usage-rules-section"
229
+ }, /*#__PURE__*/React.createElement(Text, {
230
+ className: "pisell-wallet-pass-gallery_usage-rules-section-title"
231
+ }, getText('wallet-pass-gallery.totalQuantityControl', '总量控制')), /*#__PURE__*/React.createElement("div", {
232
+ className: "pisell-wallet-pass-gallery_usage-rules-item"
233
+ }, /*#__PURE__*/React.createElement("div", {
234
+ className: "pisell-wallet-pass-gallery_usage-rules-item-content"
235
+ }, personalLimit && personalLimit.total > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
236
+ className: "pisell-wallet-pass-gallery_usage-rules-item-label"
237
+ }, getText('wallet-pass-gallery.personalLimit', '个人限额:')), /*#__PURE__*/React.createElement(Text, {
238
+ className: "pisell-wallet-pass-gallery_usage-rules-item-description"
239
+ }, interpolateText(getText('wallet-pass-gallery.personalLimitDesc', '您最多可使用此券{total}次(剩余{remaining}次)'), {
240
+ total: personalLimit.total,
241
+ remaining: personalLimit.remaining
242
+ })), /*#__PURE__*/React.createElement(Text, {
243
+ className: "pisell-wallet-pass-gallery_usage-rules-item-note"
244
+ }, getText('wallet-pass-gallery.voucherExpireNote', '用完后此券将自动失效'))) : /*#__PURE__*/React.createElement(Text, {
245
+ className: "pisell-wallet-pass-gallery_usage-rules-item-description"
246
+ }, getText('wallet-pass-gallery.monthlyLimitUnlimited', '无限制'))))));
247
+ }
248
+ export default UsageRules;
@@ -0,0 +1,157 @@
1
+ .pisell-wallet-pass-gallery_usage-rules {
2
+ padding: 16px;
3
+ background: #ffffff;
4
+ border-radius: 8px;
5
+ border: 1px solid #f0f0f0;
6
+ margin-top: 16px;
7
+ margin-bottom: 20px;
8
+
9
+ // 确保所有Text组件都是块级元素
10
+ .ant-typography {
11
+ display: block !important;
12
+ width: 100% !important;
13
+ margin-bottom: 0 !important;
14
+ }
15
+
16
+ &-title {
17
+ font-size: 18px;
18
+ font-weight: 600;
19
+ color: #000000;
20
+ line-height: 24px;
21
+ margin-bottom: 8px;
22
+ display: block;
23
+ width: 100%;
24
+ }
25
+
26
+ &-subtitle {
27
+ font-size: 14px;
28
+ color: #6B7280;
29
+ line-height: 20px;
30
+ margin-bottom: 24px;
31
+ display: block;
32
+ width: 100%;
33
+ }
34
+
35
+ &-section {
36
+ margin-bottom: 24px;
37
+
38
+ &:last-child {
39
+ margin-bottom: 0;
40
+ }
41
+
42
+ &-title {
43
+ font-size: 16px;
44
+ font-weight: 500;
45
+ color: #6B7280;
46
+ line-height: 20px;
47
+ margin-bottom: 16px;
48
+ display: block;
49
+ width: 100%;
50
+ }
51
+ }
52
+
53
+ &-list {
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: 16px;
57
+ }
58
+
59
+ &-item {
60
+ position: relative;
61
+ display: flex;
62
+ align-items: flex-start;
63
+
64
+ &::before {
65
+ content: '•';
66
+ color: #697281;
67
+ font-size: 16px;
68
+ line-height: 20px;
69
+ font-weight: bold;
70
+ margin-right: 8px;
71
+ flex-shrink: 0;
72
+ margin-top: 0;
73
+ }
74
+
75
+ &-content {
76
+ flex: 1;
77
+ min-width: 0;
78
+ }
79
+
80
+ &-main-line {
81
+ margin-bottom: 4px;
82
+ }
83
+
84
+ &-label {
85
+ font-size: 14px;
86
+ font-weight: 600;
87
+ color: #000000;
88
+ line-height: 20px;
89
+ display: inline;
90
+ margin-right: 4px;
91
+ }
92
+
93
+ &-description {
94
+ font-size: 14px;
95
+ color: #000000;
96
+ line-height: 20px;
97
+ display: inline;
98
+ word-wrap: break-word;
99
+ }
100
+
101
+ &-reset {
102
+ font-size: 14px;
103
+ color: #000000;
104
+ line-height: 20px;
105
+ display: block;
106
+ width: 100%;
107
+ }
108
+
109
+ &-note {
110
+ font-size: 14px;
111
+ color: #000000;
112
+ line-height: 20px;
113
+ margin-top: 4px;
114
+ display: block;
115
+ width: 100%;
116
+ }
117
+ }
118
+
119
+ }
120
+
121
+ // 响应式设计
122
+ @media (max-width: 768px) {
123
+ .pisell-wallet-pass-gallery_usage-rules {
124
+ padding: 12px;
125
+ margin-top: 12px;
126
+
127
+ &-title {
128
+ font-size: 16px;
129
+ }
130
+
131
+ &-subtitle {
132
+ font-size: 13px;
133
+ }
134
+
135
+ &-section {
136
+ margin-bottom: 20px;
137
+
138
+ &-title {
139
+ font-size: 15px;
140
+ }
141
+ }
142
+
143
+ &-item {
144
+ &::before {
145
+ font-size: 14px;
146
+ margin-right: 6px;
147
+ }
148
+
149
+ &-label,
150
+ &-description,
151
+ &-reset,
152
+ &-note {
153
+ font-size: 13px;
154
+ }
155
+ }
156
+ }
157
+ }
@@ -0,0 +1,6 @@
1
+ import './index.less';
2
+ export interface WalletPassGalleryProps {
3
+ [key: string]: any;
4
+ }
5
+ declare const WalletPassGallery: (props: WalletPassGalleryProps) => JSX.Element;
6
+ export default WalletPassGallery;