@pisell/private-materials 3.4.22 → 3.4.23

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 (151) 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 +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +27 -3
  14. package/es/components/appointmentBooking/components/Content/index.js +3 -3
  15. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Voucher/index.js +6 -5
  18. package/es/components/appointmentBooking/hooks.js +4 -2
  19. package/es/components/appointmentBooking/index.js +10 -0
  20. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  21. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  22. package/es/components/booking/components/voucher/index.js +8 -5
  23. package/es/components/booking/forms/single/index.d.ts +1 -0
  24. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  25. package/es/components/eftpos/form/index.d.ts +1 -0
  26. package/es/components/eftpos/hooks.d.ts +1 -0
  27. package/es/components/eftpos/index.d.ts +1 -0
  28. package/es/components/eftpos/pos.d.ts +1 -0
  29. package/es/components/eftposPay/amount.d.ts +1 -0
  30. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  31. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  32. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  33. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  34. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  35. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  36. package/es/components/eftposPay/hooks.d.ts +1 -1
  37. package/es/components/eftposPay/pay.d.ts +1 -0
  38. package/es/components/eftposPay/store/index.d.ts +1 -1
  39. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +34 -8
  40. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  41. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  42. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  43. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  44. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  45. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  46. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  47. package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  48. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  49. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  50. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  51. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  52. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  53. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  54. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  55. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  56. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  57. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  58. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  59. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  60. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  61. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  62. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  63. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  64. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  65. package/es/components/schedules/products/index.d.ts +1 -0
  66. package/es/components/schedules/resources/index.d.ts +1 -0
  67. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  68. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  69. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  70. package/es/components/schedules/schedules/index.d.ts +1 -0
  71. package/es/components/wallet/Detail/index.js +248 -62
  72. package/es/components/wallet/Detail/locales.d.ts +51 -0
  73. package/es/components/wallet/Detail/locales.js +57 -3
  74. package/es/components/wallet/Detail/serve.js +5 -1
  75. package/es/components/wallet/components/UsageRules/index.d.ts +23 -0
  76. package/es/components/wallet/components/UsageRules/index.js +147 -0
  77. package/es/components/wallet/components/UsageRules/index.less +157 -0
  78. package/es/components/wallet/components/index.d.ts +1 -0
  79. package/es/components/wallet/components/index.js +2 -1
  80. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  81. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  82. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  83. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +22 -2
  84. package/lib/components/appointmentBooking/components/Content/index.js +2 -2
  85. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  86. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  87. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  88. package/lib/components/appointmentBooking/hooks.js +4 -2
  89. package/lib/components/appointmentBooking/index.js +6 -0
  90. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  91. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  92. package/lib/components/booking/components/voucher/index.js +3 -1
  93. package/lib/components/booking/forms/single/index.d.ts +1 -0
  94. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  95. package/lib/components/eftpos/form/index.d.ts +1 -0
  96. package/lib/components/eftpos/hooks.d.ts +1 -0
  97. package/lib/components/eftpos/index.d.ts +1 -0
  98. package/lib/components/eftpos/pos.d.ts +1 -0
  99. package/lib/components/eftposPay/amount.d.ts +1 -0
  100. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  101. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  102. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  103. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  104. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  105. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  106. package/lib/components/eftposPay/hooks.d.ts +1 -1
  107. package/lib/components/eftposPay/pay.d.ts +1 -0
  108. package/lib/components/eftposPay/store/index.d.ts +1 -1
  109. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +30 -8
  110. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  111. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  112. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  113. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  114. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  115. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  116. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  117. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
  118. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  119. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  120. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  121. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  122. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  123. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  124. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  125. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  126. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  127. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  128. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  129. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  130. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  131. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  132. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  133. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  134. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  135. package/lib/components/schedules/products/index.d.ts +1 -0
  136. package/lib/components/schedules/resources/index.d.ts +1 -0
  137. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  138. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  139. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  140. package/lib/components/schedules/schedules/index.d.ts +1 -0
  141. package/lib/components/wallet/Detail/index.js +125 -6
  142. package/lib/components/wallet/Detail/locales.d.ts +51 -0
  143. package/lib/components/wallet/Detail/locales.js +57 -3
  144. package/lib/components/wallet/Detail/serve.js +6 -1
  145. package/lib/components/wallet/components/UsageRules/index.d.ts +23 -0
  146. package/lib/components/wallet/components/UsageRules/index.js +113 -0
  147. package/lib/components/wallet/components/UsageRules/index.less +157 -0
  148. package/lib/components/wallet/components/index.d.ts +1 -0
  149. package/lib/components/wallet/components/index.js +3 -0
  150. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  151. package/package.json +1 -1
@@ -0,0 +1,147 @@
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 from 'react';
8
+ import { Typography } from '@pisell/materials';
9
+ import "./index.less";
10
+ var Text = Typography.Text;
11
+ function UsageRules(_ref) {
12
+ var _ref$className = _ref.className,
13
+ className = _ref$className === void 0 ? '' : _ref$className,
14
+ style = _ref.style,
15
+ rules = _ref.rules,
16
+ _ref$personalLimit = _ref.personalLimit,
17
+ personalLimit = _ref$personalLimit === void 0 ? {
18
+ total: 5,
19
+ remaining: 3,
20
+ note: '用完后此券将自动失效'
21
+ } : _ref$personalLimit,
22
+ locales = _ref.locales;
23
+ // Helper function to interpolate text with variables
24
+ var interpolateText = function interpolateText(text, variables) {
25
+ return text.replace(/\{(\w+)\}/g, function (match, key) {
26
+ return variables[key] !== undefined ? variables[key] : match;
27
+ });
28
+ };
29
+
30
+ // Get localized text with fallback
31
+ var getText = function getText(key, fallback) {
32
+ return (locales === null || locales === void 0 ? void 0 : locales.getText(key)) || fallback || key;
33
+ };
34
+
35
+ // Generate rule description with limit value
36
+ var getRuleDescription = function getRuleDescription(type, limit) {
37
+ // Handle unlimited case (limit = 0 means unlimited)
38
+ if (limit === 0 && type === 'monthly') {
39
+ return getText('page.wallet.monthlyLimitUnlimited', '无限制');
40
+ }
41
+ var templateKey = "page.wallet.".concat(type, "LimitDesc");
42
+ var template = getText(templateKey, '');
43
+ return interpolateText(template, {
44
+ limit: limit
45
+ });
46
+ };
47
+
48
+ // Generate rule reset time text
49
+ var getRuleResetTime = function getRuleResetTime(type) {
50
+ var resetKey = "page.wallet.".concat(type, "Reset");
51
+ return getText(resetKey, '');
52
+ };
53
+
54
+ // Default rules with localized text
55
+ var defaultRules = [{
56
+ type: 'daily',
57
+ limit: 3,
58
+ description: getRuleDescription('daily', 3),
59
+ resetTime: getRuleResetTime('daily')
60
+ }, {
61
+ type: 'weekly',
62
+ limit: 15,
63
+ description: getRuleDescription('weekly', 15),
64
+ resetTime: getRuleResetTime('weekly')
65
+ }, {
66
+ type: 'monthly',
67
+ limit: 60,
68
+ description: getRuleDescription('monthly', 60),
69
+ resetTime: getRuleResetTime('monthly')
70
+ }];
71
+
72
+ // Process rules to add localized descriptions
73
+ var processedRules = rules ? rules.map(function (rule) {
74
+ return _objectSpread(_objectSpread({}, rule), {}, {
75
+ description: getRuleDescription(rule.type, rule.limit),
76
+ resetTime: getRuleResetTime(rule.type)
77
+ });
78
+ }) : defaultRules;
79
+ var finalRules = processedRules;
80
+ var getRuleLabel = function getRuleLabel(type) {
81
+ switch (type) {
82
+ case 'daily':
83
+ return getText('page.wallet.dailyLimit', '每日限制:');
84
+ case 'weekly':
85
+ return getText('page.wallet.weeklyLimit', '每周限制:');
86
+ case 'monthly':
87
+ return getText('page.wallet.monthlyLimit', '每月限制:');
88
+ default:
89
+ return getText('page.wallet.dailyLimit', '限制:');
90
+ }
91
+ };
92
+ return /*#__PURE__*/React.createElement("div", {
93
+ className: "usage-rules ".concat(className),
94
+ style: style
95
+ }, /*#__PURE__*/React.createElement(Text, {
96
+ className: "usage-rules-title"
97
+ }, getText('page.wallet.usageRules', '使用规则')), /*#__PURE__*/React.createElement(Text, {
98
+ className: "usage-rules-subtitle"
99
+ }, getText('page.wallet.usageRulesSubtitle', '请仔细阅读以下使用条件')), /*#__PURE__*/React.createElement("div", {
100
+ className: "usage-rules-section"
101
+ }, /*#__PURE__*/React.createElement(Text, {
102
+ className: "usage-rules-section-title"
103
+ }, getText('page.wallet.timeUsageLimits', '时间使用限制')), /*#__PURE__*/React.createElement("div", {
104
+ className: "usage-rules-list"
105
+ }, finalRules.length > 0 ? finalRules.map(function (rule, index) {
106
+ return /*#__PURE__*/React.createElement("div", {
107
+ key: index,
108
+ className: "usage-rules-item"
109
+ }, /*#__PURE__*/React.createElement("div", {
110
+ className: "usage-rules-item-content"
111
+ }, /*#__PURE__*/React.createElement("div", {
112
+ className: "usage-rules-item-main-line"
113
+ }, /*#__PURE__*/React.createElement(Text, {
114
+ className: "usage-rules-item-label"
115
+ }, getRuleLabel(rule.type)), /*#__PURE__*/React.createElement(Text, {
116
+ className: "usage-rules-item-description"
117
+ }, rule.description)), rule.resetTime && /*#__PURE__*/React.createElement(Text, {
118
+ className: "usage-rules-item-reset"
119
+ }, rule.resetTime)));
120
+ }) : /*#__PURE__*/React.createElement("div", {
121
+ className: "usage-rules-item"
122
+ }, /*#__PURE__*/React.createElement("div", {
123
+ className: "usage-rules-item-content"
124
+ }, /*#__PURE__*/React.createElement(Text, {
125
+ className: "usage-rules-item-description"
126
+ }, getText('page.wallet.monthlyLimitUnlimited', '无限制')))))), /*#__PURE__*/React.createElement("div", {
127
+ className: "usage-rules-section"
128
+ }, /*#__PURE__*/React.createElement(Text, {
129
+ className: "usage-rules-section-title"
130
+ }, getText('page.wallet.totalQuantityControl', '总量控制')), /*#__PURE__*/React.createElement("div", {
131
+ className: "usage-rules-item"
132
+ }, /*#__PURE__*/React.createElement("div", {
133
+ className: "usage-rules-item-content"
134
+ }, personalLimit.total > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
135
+ className: "usage-rules-item-label"
136
+ }, getText('page.wallet.personalLimit', '个人限额:')), /*#__PURE__*/React.createElement(Text, {
137
+ className: "usage-rules-item-description"
138
+ }, interpolateText(getText('page.wallet.personalLimitDesc', '您最多可使用此券{total}次(剩余{remaining}次)'), {
139
+ total: personalLimit.total,
140
+ remaining: personalLimit.remaining
141
+ })), /*#__PURE__*/React.createElement(Text, {
142
+ className: "usage-rules-item-note"
143
+ }, getText('page.wallet.voucherExpireNote', '用完后此券将自动失效'))) : /*#__PURE__*/React.createElement(Text, {
144
+ className: "usage-rules-item-description"
145
+ }, getText('page.wallet.monthlyLimitUnlimited', '无限制'))))));
146
+ }
147
+ export default UsageRules;
@@ -0,0 +1,157 @@
1
+ .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
+ .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
+ }
@@ -1,2 +1,3 @@
1
1
  export { default as WalletBar } from './WalletBar';
2
2
  export { default as FooterButtons } from './FooterButtons';
3
+ export { default as UsageRules } from './UsageRules';
@@ -1,3 +1,4 @@
1
1
  // 导出所有公共组件
2
2
  export { default as WalletBar } from "./WalletBar";
3
- export { default as FooterButtons } from "./FooterButtons";
3
+ export { default as FooterButtons } from "./FooterButtons";
4
+ export { default as UsageRules } from "./UsageRules";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IWalletListItemProps } from '../serve';
2
3
  /**
3
4
  * 钱包卡片Hook的参数
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
4
  export default Total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: ({ onNext }: any) => JSX.Element;
3
4
  export default CartItem;
@@ -43,9 +43,11 @@ var import_utils3 = require("./utils");
43
43
  var import_index = require("./index.less");
44
44
  var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
45
45
  var _a, _b;
46
+ const hasSubscribedRef = (0, import_react.useRef)(false);
46
47
  const context = (0, import_useEngineContext.default)();
47
48
  const config = ((_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.constants) == null ? void 0 : _b.config) || {};
48
49
  const utils = (0, import_hooks.contextUtils)();
50
+ const { pubsub } = context.appHelper.utils;
49
51
  const { appointmentBooking, summary, isAgreeDepositPolicy, setLoading } = (0, import_context.useAppointmentBookingContext)();
50
52
  const { isRetailTemplate } = (0, import_hooks.useAppointmentBookingSetting)();
51
53
  const goPaymentFinish = (order_id, amount) => {
@@ -141,10 +143,28 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
141
143
  }, 50);
142
144
  }
143
145
  };
146
+ const handleSubmit = () => {
147
+ var _a2, _b2, _c, _d;
148
+ if ((_b2 = (_a2 = utils == null ? void 0 : utils.businessUtils) == null ? void 0 : _a2.isGuestUser) == null ? void 0 : _b2.call(_a2)) {
149
+ if (!hasSubscribedRef.current) {
150
+ pubsub.subscribe("bind.guest.user", handleNext);
151
+ hasSubscribedRef.current = true;
152
+ }
153
+ (_d = (_c = utils == null ? void 0 : utils.businessUtils) == null ? void 0 : _c.openRegisterModal) == null ? void 0 : _d.call(_c, true);
154
+ return;
155
+ }
156
+ handleNext();
157
+ };
158
+ (0, import_react.useEffect)(() => {
159
+ return () => {
160
+ pubsub.unsubscribe("bind.guest.user", handleNext);
161
+ hasSubscribedRef.current = false;
162
+ };
163
+ }, []);
144
164
  (0, import_react.useImperativeHandle)(ref, () => ({
145
- next: handleNext
165
+ next: handleSubmit
146
166
  }));
147
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onNext: handleNext }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement(
167
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onNext: handleSubmit }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement(
148
168
  "img",
149
169
  {
150
170
  src: `${config == null ? void 0 : config.awsStatic}/checkout_confirm.png`,
@@ -84,7 +84,7 @@ var Layout = () => {
84
84
  const context = (0, import_useEngineContext.default)();
85
85
  const { pubsub } = context.appHelper.utils;
86
86
  (0, import_react.useEffect)(() => {
87
- const handleLoginSuccess = async () => {
87
+ const handleLoginSuccess = async (res) => {
88
88
  var _a2;
89
89
  if (!isFormSubject) {
90
90
  const user = JSON.parse(((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("customer")) || "{}");
@@ -100,7 +100,7 @@ var Layout = () => {
100
100
  };
101
101
  pubsub.subscribe("pisell1.login.success", handleLoginSuccess);
102
102
  return () => {
103
- pubsub.unsubscribe("pisell1.login.success");
103
+ pubsub.unsubscribe("pisell1.login.success", handleLoginSuccess);
104
104
  };
105
105
  }, []);
106
106
  (0, import_react.useEffect)(() => {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const DepositContent: (props: {
3
4
  isAgreeDepositPolicy: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -133,7 +133,8 @@ var VoucherCard = (props) => {
133
133
  );
134
134
  }, []);
135
135
  const onScanCode = async () => {
136
- const val = await shopDiscount.scanCode(code);
136
+ const customerId = currentUser.id;
137
+ const val = await shopDiscount.scanCode(code, customerId);
137
138
  if (val == null ? void 0 : val.isAvailable) {
138
139
  batchUpdateCart(val.productList);
139
140
  setCode("");
@@ -266,8 +266,10 @@ var useAppointmentBookingStep = () => {
266
266
  const checkLogin = async () => {
267
267
  if (!isLogin) {
268
268
  const { pubsub } = utils;
269
- pubsub.once("pisell1.login.success", () => {
270
- checkHolder();
269
+ pubsub.once("pisell1.login.success", (res) => {
270
+ if (res === "success") {
271
+ checkHolder();
272
+ }
271
273
  });
272
274
  return openLoginModal({
273
275
  callback: (status) => {
@@ -55,6 +55,12 @@ var AppointmentBooking = () => {
55
55
  if (!data.length) {
56
56
  const currentUser = (0, import_utils2.formatCurrentUser)(utils);
57
57
  appointmentBooking.addAccounts([currentUser]);
58
+ } else if (data.length >= 1) {
59
+ const meAccount = data == null ? void 0 : data.find((d) => !(d == null ? void 0 : d.isGuest));
60
+ const currentUser = (0, import_utils2.formatCurrentUser)(utils);
61
+ if (currentUser && meAccount.id !== currentUser.id) {
62
+ appointmentBooking.setLoginAccount(meAccount.id, currentUser);
63
+ }
58
64
  }
59
65
  });
60
66
  }, []);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface TabProductProps {
3
4
  list: any[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItem;
@@ -216,7 +216,9 @@ var VoucherCard = (props) => {
216
216
  });
217
217
  });
218
218
  const onScanCode = async () => {
219
- const val = await shopDiscount.scanCode(code);
219
+ var _a2;
220
+ const customerId = (_a2 = state.client.value) == null ? void 0 : _a2.id;
221
+ const val = await shopDiscount.scanCode(code, customerId);
220
222
  console.log(val);
221
223
  if (val == null ? void 0 : val.isAvailable) {
222
224
  productListToValue(val.productList, true);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 表单选择器
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type ContactType = {
3
4
  country_calling_code: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 递归循环表单数据
3
4
  * @Author: hongbing.wang
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos } from './const';
2
3
  /**
3
4
  * @title: tyro 设备连接
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos, DeviceStatus } from './const';
2
3
  import './index.less';
3
4
  interface PosProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DeviceProp } from "./const";
2
3
  interface PosProps {
3
4
  eftposName: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ onChange, className, isMobile }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 断网(客户端)提示页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  import './index.less';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 取消签名确认页
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
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<"stripe" | "tyro" | "windcave" | "payo" | "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
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PayProps } from './const';
2
3
  import './index.less';
3
4
  /**
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;