@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
@@ -69,39 +69,72 @@ export var getWalletBalance = /*#__PURE__*/function () {
69
69
  }();
70
70
 
71
71
  /**
72
- * @title: 获取钱包店铺列表
73
- * @description:
74
- * @return {*}
75
- * @Author: WangHan
76
- * @Date: 2025-06-09 11:12
72
+ * 批量获取钱包余额信息
77
73
  */
78
- export var getWalletShopList = /*#__PURE__*/function () {
79
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
74
+ export var batchGetWalletBalance = /*#__PURE__*/function () {
75
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(walletIds) {
80
76
  var _yield$request$getReq3, data;
81
77
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
82
78
  while (1) switch (_context3.prev = _context3.next) {
83
79
  case 0:
84
80
  _context3.prev = 0;
85
81
  _context3.next = 3;
86
- return request.getRequest().get('/h5/wallet/shop/list', params || {}, {
87
- // abort: true,
88
- useCache: true
82
+ return request.getRequest().get('/h5/wallet/wallet-pass/balance/batch', {
83
+ wallet_id: walletIds
89
84
  });
90
85
  case 3:
91
86
  _yield$request$getReq3 = _context3.sent;
92
87
  data = _yield$request$getReq3.data;
93
- return _context3.abrupt("return", data || null);
88
+ return _context3.abrupt("return", data || {});
94
89
  case 8:
95
90
  _context3.prev = 8;
96
91
  _context3.t0 = _context3["catch"](0);
97
- return _context3.abrupt("return", null);
92
+ return _context3.abrupt("return", {});
98
93
  case 11:
99
94
  case "end":
100
95
  return _context3.stop();
101
96
  }
102
97
  }, _callee3, null, [[0, 8]]);
103
98
  }));
104
- return function getWalletShopList(_x) {
99
+ return function batchGetWalletBalance(_x) {
105
100
  return _ref3.apply(this, arguments);
106
101
  };
102
+ }();
103
+
104
+ /**
105
+ * @title: 获取钱包店铺列表
106
+ * @description:
107
+ * @return {*}
108
+ * @Author: WangHan
109
+ * @Date: 2025-06-09 11:12
110
+ */
111
+ export var getWalletShopList = /*#__PURE__*/function () {
112
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
113
+ var _yield$request$getReq4, data;
114
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
115
+ while (1) switch (_context4.prev = _context4.next) {
116
+ case 0:
117
+ _context4.prev = 0;
118
+ _context4.next = 3;
119
+ return request.getRequest().get('/h5/wallet/shop/list', params || {}, {
120
+ // abort: true,
121
+ useCache: true
122
+ });
123
+ case 3:
124
+ _yield$request$getReq4 = _context4.sent;
125
+ data = _yield$request$getReq4.data;
126
+ return _context4.abrupt("return", data || null);
127
+ case 8:
128
+ _context4.prev = 8;
129
+ _context4.t0 = _context4["catch"](0);
130
+ return _context4.abrupt("return", null);
131
+ case 11:
132
+ case "end":
133
+ return _context4.stop();
134
+ }
135
+ }, _callee4, null, [[0, 8]]);
136
+ }));
137
+ return function getWalletShopList(_x2) {
138
+ return _ref4.apply(this, arguments);
139
+ };
107
140
  }();
@@ -6,14 +6,18 @@ export interface MultiLanguageName {
6
6
  en: string;
7
7
  [key: string]: string;
8
8
  }
9
+ declare type WalletPassType = 'rechargeable' | 'point' | 'voucher' | 'discount';
9
10
  export interface WalletMetadata {
10
11
  name: MultiLanguageName;
11
12
  welcomeText?: string | MultiLanguageName;
12
13
  customerName?: string;
13
14
  coverImage?: string;
14
15
  icon?: string;
15
- barcodetype: 'barCode' | 'orCode';
16
- showcaseWalletPass?: ('rechargeable' | 'piont' | 'voucher' | 'discount')[];
16
+ showcaseWalletPassNew?: Array<{
17
+ type: WalletPassType;
18
+ custom_title?: string | MultiLanguageName;
19
+ display?: 0 | 1;
20
+ }>;
17
21
  }
18
22
  export interface Shop {
19
23
  id: number;
@@ -56,15 +60,10 @@ export interface WalletBalance {
56
60
  voucher_count: number;
57
61
  discount_card_count: number;
58
62
  }
59
- export interface WalletBalanceItem {
60
- key: string;
61
- label: string;
62
- value: number;
63
- }
64
63
  export interface WalletCardItem {
65
- key: string;
66
- label: string;
67
- hidden: boolean;
64
+ type: WalletPassType;
65
+ custom_title?: string | MultiLanguageName;
66
+ display: 0 | 1;
68
67
  value?: number;
69
68
  }
70
69
  export interface State {
@@ -106,7 +105,7 @@ export interface WalletListProps {
106
105
  platform?: 'pc' | 'h5' | 'ipad';
107
106
  mode?: 'dark' | 'light';
108
107
  cardStyle?: 'normal' | 'full';
109
- codeType?: 'barCode' | 'orCode';
108
+ codeType?: 'barCode' | 'qrCode';
110
109
  codeDirection?: 'bottom' | 'top';
111
110
  shopName?: boolean;
112
111
  showWalletName?: boolean;
@@ -131,7 +130,7 @@ export interface WalletCardProps {
131
130
  platform?: 'pc' | 'h5' | 'ipad';
132
131
  mode?: 'dark' | 'light';
133
132
  cardStyle?: 'normal' | 'full';
134
- codeType?: 'barCode' | 'orCode';
133
+ codeType?: 'barCode' | 'qrCode';
135
134
  codeDirection?: 'bottom' | 'top';
136
135
  shopName?: boolean;
137
136
  showIcon?: boolean;
@@ -192,3 +191,4 @@ export interface CarouselSettings {
192
191
  };
193
192
  }>;
194
193
  }
194
+ export {};
@@ -1,5 +1,7 @@
1
1
  // 多语言名称接口
2
2
 
3
+ //rechargeable:充值卡 point:积分卡 voucher:优惠券 discountCard:折扣卡
4
+
3
5
  // 钱包元数据接口
4
6
 
5
7
  // 商店接口
@@ -10,8 +12,6 @@
10
12
 
11
13
  // 钱包余额接口
12
14
 
13
- // 钱包余额项接口
14
-
15
15
  // 卡片项接口
16
16
 
17
17
  // 应用状态接口
package/es/index.d.ts CHANGED
@@ -22,7 +22,6 @@ export { default as TaxSelect } from './components/taxSelect';
22
22
  export { default as EftposPay } from './components/eftposPay';
23
23
  export { default as ToCPay } from './components/pay/toC';
24
24
  export { default as Eftpos } from './components/eftpos';
25
- export { default as Wallet } from './components/wallet';
26
25
  export { default as WalletList } from './components/walletList';
27
26
  export { default as BookingDashboard } from './components/booking/dashboard';
28
27
  export { default as PisellSelectCustomerModal } from './components/pisellSelectCustomerModal';
@@ -48,6 +47,8 @@ export { default as StepController } from './components/stepController';
48
47
  export { default as SaasLogin } from './plus/saasLogin';
49
48
  export { default as SaasRegister } from './plus/saasRegister';
50
49
  export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
50
+ export { default as WalletEditor } from './plus/walletEditor';
51
+ export { default as WalletPassGallery } from './plus/walletPassGallery';
51
52
  export { default as PinModal } from './components/pinModal';
52
53
  export { default as PinVerifyModal } from './components/pinVerifyModal';
53
54
  export { default as ContactInfo } from './plus/contactInfo';
package/es/index.js CHANGED
@@ -26,7 +26,6 @@ export { default as TaxSelect } from "./components/taxSelect";
26
26
  export { default as EftposPay } from "./components/eftposPay";
27
27
  export { default as ToCPay } from "./components/pay/toC";
28
28
  export { default as Eftpos } from "./components/eftpos";
29
- export { default as Wallet } from "./components/wallet";
30
29
  export { default as WalletList } from "./components/walletList";
31
30
  export { default as BookingDashboard } from "./components/booking/dashboard";
32
31
  export { default as PisellSelectCustomerModal } from "./components/pisellSelectCustomerModal";
@@ -52,6 +51,8 @@ export { default as StepController } from "./components/stepController";
52
51
  export { default as SaasLogin } from "./plus/saasLogin";
53
52
  export { default as SaasRegister } from "./plus/saasRegister";
54
53
  export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
54
+ export { default as WalletEditor } from "./plus/walletEditor";
55
+ export { default as WalletPassGallery } from "./plus/walletPassGallery";
55
56
  export { default as PinModal } from "./components/pinModal";
56
57
  export { default as PinVerifyModal } from "./components/pinVerifyModal";
57
58
  export { default as ContactInfo } from "./plus/contactInfo";
@@ -7,11 +7,13 @@ declare type TabItem = {
7
7
  icon?: React.ReactNode;
8
8
  };
9
9
  interface IProps {
10
+ className?: string;
10
11
  items: TabItem[];
11
12
  activeKey: string;
12
13
  onChange: (key: string) => void;
13
14
  loading?: boolean;
14
15
  skeleton?: React.ReactNode;
16
+ style?: React.CSSProperties;
15
17
  }
16
18
  declare const CategoryTabs: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
17
19
  export default CategoryTabs;
@@ -11,12 +11,14 @@ import "../components/TabsStructure/TabsStructure.less";
11
11
  import CategorySkeleton from "./CategorySkeleton";
12
12
  import { PREFIX } from "../index";
13
13
  var CategoryTabs = /*#__PURE__*/forwardRef(function (props, ref) {
14
- var items = props.items,
14
+ var className = props.className,
15
+ items = props.items,
15
16
  activeKey = props.activeKey,
16
17
  onChange = props.onChange,
17
18
  _props$loading = props.loading,
18
19
  loading = _props$loading === void 0 ? false : _props$loading,
19
- skeleton = props.skeleton;
20
+ skeleton = props.skeleton,
21
+ style = props.style;
20
22
  var railRef = useRef(null);
21
23
 
22
24
  // 使用IntersectionTrigger来优雅地控制滚动状态
@@ -102,7 +104,8 @@ var CategoryTabs = /*#__PURE__*/forwardRef(function (props, ref) {
102
104
  return /*#__PURE__*/React.createElement(React.Fragment, null, skeleton);
103
105
  }
104
106
  return /*#__PURE__*/React.createElement(IntersectionObserverProvider, null, items.length > 0 && /*#__PURE__*/React.createElement("div", {
105
- className: "".concat(PREFIX, "__tabs-wrapper")
107
+ className: "".concat(PREFIX, "__tabs-wrapper ").concat(className || ''),
108
+ style: style
106
109
  }, /*#__PURE__*/React.createElement(TabsStructure, {
107
110
  variant: "pill",
108
111
  backgroundVariant: "onPage",
@@ -129,17 +129,6 @@
129
129
  border-radius: calc(20px - 2px);
130
130
  }
131
131
 
132
- &::after {
133
- content: '';
134
- position: absolute;
135
- inset-block-start: 1px;
136
- inset-inline-start: 1px;
137
- inset-inline-end: 1px;
138
- block-size: 50%;
139
- background-color: var(--ps-color-primary, #7f56d9);
140
- border-radius: 20px 20px 0 0;
141
- }
142
-
143
132
  &--focused {
144
133
  .pisell-tabstruct-focus-ring();
145
134
  }
@@ -101,7 +101,6 @@ export function groupProductsByCategory(products) {
101
101
  });
102
102
  result.push.apply(result, _toConsumableArray(sortedUncategorizedProducts));
103
103
  }
104
- console.log('xxxxxx', result);
105
104
  return result;
106
105
  }
107
106
 
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { WalletEditorProps, WalletEditorRef } from './types';
3
+ import './WalletEditor.less';
4
+ declare const WalletEditor: React.ForwardRefExoticComponent<WalletEditorProps & React.RefAttributes<WalletEditorRef>>;
5
+ export default WalletEditor;
@@ -0,0 +1,316 @@
1
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
2
+ 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); }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ 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; }
6
+ 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; }
7
+ 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; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ 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); }
10
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+ import React, { useCallback, useMemo, useState, useEffect, forwardRef, useImperativeHandle } from 'react';
17
+ import { locales } from '@pisell/utils';
18
+ import { Radio, Form, InputNumber } from 'antd';
19
+ import { Icon, PisellModal, WalletCard, Translation } from '@pisell/materials';
20
+ import ImageUpload from "./components/ImageUpload";
21
+ import JsonEditor from "./components/JsonEditor";
22
+ import useEngineContext from "../../hooks/useEngineContext";
23
+ import localeTexts from "./locales";
24
+ import SortableWalletPassTypes, { DEFAULT_WALLET_PASS_TYPES_CONFIG } from "./components/sortableWalletPassTypes";
25
+ import ValidityPeriodSelector from "./components/ValidityPeriodSelector";
26
+ import RelationProduct from "./components/relationProduct";
27
+ import "./WalletEditor.less";
28
+ var WalletEditor = /*#__PURE__*/forwardRef(function (props, ref) {
29
+ var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _context$appHelper$ut6, _store$global;
30
+ var value = props.value,
31
+ onChange = props.onChange,
32
+ _props$disabled = props.disabled,
33
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
34
+ className = props.className,
35
+ style = props.style;
36
+ var context = useEngineContext();
37
+ locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
38
+ // request.setRequest(context.appHelper?.utils?.request);
39
+
40
+ var amountSymbol = ((_context$appHelper$ut2 = (_context$appHelper$ut3 = context.appHelper.utils).getData) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.call(_context$appHelper$ut3, 'shop_symbol')) || '';
41
+ var store = ((_context$appHelper$ut4 = (_context$appHelper$ut5 = context.appHelper.utils).getStore) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.call(_context$appHelper$ut5)) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut6 = _context$appHelper$ut4.getState) === null || _context$appHelper$ut6 === void 0 ? void 0 : _context$appHelper$ut6.call(_context$appHelper$ut4)) || {};
42
+ var shopName = ((_store$global = store.global) === null || _store$global === void 0 || (_store$global = _store$global.shopDetail) === null || _store$global === void 0 ? void 0 : _store$global.name) || '';
43
+ var _useState = useState(true),
44
+ _useState2 = _slicedToArray(_useState, 2),
45
+ sendConfigVisible = _useState2[0],
46
+ setSendConfigVisible = _useState2[1];
47
+ var _useState3 = useState(false),
48
+ _useState4 = _slicedToArray(_useState3, 2),
49
+ previewVisible = _useState4[0],
50
+ setPreviewVisible = _useState4[1];
51
+ var _Form$useForm = Form.useForm(),
52
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
53
+ form = _Form$useForm2[0];
54
+ var isControlled = value !== undefined;
55
+
56
+ // 默认值
57
+ var defaultValue = useMemo(function () {
58
+ return {
59
+ status: 'enable',
60
+ valid_for: {
61
+ unit: '1',
62
+ unit_type: 'year',
63
+ type: 'normal'
64
+ },
65
+ metadata: {
66
+ showcaseWalletPassNew: DEFAULT_WALLET_PASS_TYPES_CONFIG.map(function (item) {
67
+ return _objectSpread(_objectSpread({}, item), {}, {
68
+ display: 1
69
+ });
70
+ }),
71
+ coverImage: '',
72
+ send_config: {
73
+ type: 'register'
74
+ }
75
+ }
76
+ };
77
+ }, []);
78
+ var currentValue = useMemo(function () {
79
+ return _objectSpread(_objectSpread({}, defaultValue), value);
80
+ }, [value, defaultValue]);
81
+
82
+ // 暴露ref方法
83
+ useImperativeHandle(ref, function () {
84
+ return {
85
+ form: form,
86
+ setInitialValues: function setInitialValues(values) {
87
+ form.setFieldsValue(_objectSpread(_objectSpread({}, defaultValue), values));
88
+ },
89
+ getValues: function getValues() {
90
+ var _formValues$metadata;
91
+ var formValues = form.getFieldsValue();
92
+ var processedValues = _objectSpread(_objectSpread({}, formValues), {}, {
93
+ metadata: _objectSpread(_objectSpread({}, formValues.metadata), {}, {
94
+ showcaseWalletPass: convertShowcaseWalletPass((_formValues$metadata = formValues.metadata) === null || _formValues$metadata === void 0 ? void 0 : _formValues$metadata.showcaseWalletPassNew)
95
+ })
96
+ });
97
+ return processedValues;
98
+ }
99
+ };
100
+ }, [form, defaultValue]);
101
+
102
+ // 受控模式:同步外部value到form
103
+ useEffect(function () {
104
+ if (isControlled && currentValue) {
105
+ form.setFieldsValue(currentValue);
106
+ }
107
+ }, [currentValue, form, isControlled]);
108
+ var convertShowcaseWalletPass = function convertShowcaseWalletPass(showcaseWalletPassNew) {
109
+ if (!showcaseWalletPassNew) return [];
110
+ return showcaseWalletPassNew.filter(function (item) {
111
+ return item.display === 1;
112
+ }).map(function (item) {
113
+ return item.type;
114
+ });
115
+ };
116
+ var toggleSendConfig = useCallback(function () {
117
+ setSendConfigVisible(function (prev) {
118
+ return !prev;
119
+ });
120
+ }, []);
121
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
122
+ className: "wallet-editor ".concat(className || ''),
123
+ style: style
124
+ }, /*#__PURE__*/React.createElement(Form, {
125
+ size: "large",
126
+ form: form,
127
+ layout: "vertical",
128
+ initialValues: isControlled ? currentValue : _objectSpread({}, defaultValue),
129
+ onValuesChange: function onValuesChange() {
130
+ var _props$onValuesChange;
131
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
132
+ args[_key] = arguments[_key];
133
+ }
134
+ (_props$onValuesChange = props.onValuesChange) === null || _props$onValuesChange === void 0 || _props$onValuesChange.call.apply(_props$onValuesChange, [props].concat(args));
135
+ },
136
+ onFinish: function onFinish(values) {
137
+ if (onChange) {
138
+ var _values$metadata;
139
+ var processedValues = _objectSpread(_objectSpread({}, values), {}, {
140
+ metadata: _objectSpread(_objectSpread({}, values.metadata), {}, {
141
+ showcaseWalletPass: convertShowcaseWalletPass((_values$metadata = values.metadata) === null || _values$metadata === void 0 ? void 0 : _values$metadata.showcaseWalletPassNew)
142
+ })
143
+ });
144
+ onChange(processedValues);
145
+ }
146
+ },
147
+ disabled: disabled
148
+ }, /*#__PURE__*/React.createElement("div", {
149
+ style: {
150
+ padding: '20px 20px 0px 20px',
151
+ borderRadius: 10,
152
+ marginTop: 24,
153
+ border: '1px solid var(--Gray-300,#d0d5dd)'
154
+ }
155
+ }, /*#__PURE__*/React.createElement(Form.Item, {
156
+ label: locales.getText('walletName'),
157
+ name: "name",
158
+ rules: [{
159
+ validator: function () {
160
+ var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
161
+ var msg, keys, hasNonEmpty;
162
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
163
+ while (1) switch (_context.prev = _context.next) {
164
+ case 0:
165
+ msg = locales.getText('pleaseInputWalletName'); // value 为多语言对象:可能包含 original, en, zh-CN 等字段
166
+ if (!(value == null || _typeof(value) !== 'object')) {
167
+ _context.next = 3;
168
+ break;
169
+ }
170
+ return _context.abrupt("return", Promise.reject(new Error(msg)));
171
+ case 3:
172
+ keys = Object.keys(value);
173
+ if (!(keys.length === 0)) {
174
+ _context.next = 6;
175
+ break;
176
+ }
177
+ return _context.abrupt("return", Promise.reject(new Error(msg)));
178
+ case 6:
179
+ hasNonEmpty = keys.some(function (k) {
180
+ var v = value[k];
181
+ return typeof v === 'string' && v.trim() !== '';
182
+ });
183
+ return _context.abrupt("return", hasNonEmpty ? Promise.resolve() : Promise.reject(new Error(msg)));
184
+ case 8:
185
+ case "end":
186
+ return _context.stop();
187
+ }
188
+ }, _callee);
189
+ }));
190
+ function validator(_x, _x2) {
191
+ return _validator.apply(this, arguments);
192
+ }
193
+ return validator;
194
+ }()
195
+ }]
196
+ }, /*#__PURE__*/React.createElement(Translation, null)), /*#__PURE__*/React.createElement(Form.Item, {
197
+ label: locales.getText('validityPeriod'),
198
+ name: "valid_for"
199
+ }, /*#__PURE__*/React.createElement(ValidityPeriodSelector, null)), /*#__PURE__*/React.createElement(Form.Item, {
200
+ label: locales.getText('linkedPasses'),
201
+ name: "relation_id",
202
+ initialValue: []
203
+ }, /*#__PURE__*/React.createElement(RelationProduct, null)), /*#__PURE__*/React.createElement(Form.Item, {
204
+ label: locales.getText('sort'),
205
+ name: "sort"
206
+ }, /*#__PURE__*/React.createElement(InputNumber, {
207
+ style: {
208
+ width: '100%'
209
+ }
210
+ })), /*#__PURE__*/React.createElement(Form.Item, {
211
+ label: locales.getText('status'),
212
+ name: "status",
213
+ initialValue: 'enable'
214
+ }, /*#__PURE__*/React.createElement(Radio.Group, null, /*#__PURE__*/React.createElement(Radio, {
215
+ value: "enable"
216
+ }, locales.getText('enable')), /*#__PURE__*/React.createElement(Radio, {
217
+ value: "disable"
218
+ }, locales.getText('disable')))), /*#__PURE__*/React.createElement(Form.Item, {
219
+ label: locales.getText('distributionConditions')
220
+ }, /*#__PURE__*/React.createElement("div", {
221
+ style: {
222
+ color: '#8c5cff',
223
+ cursor: 'pointer',
224
+ height: 40,
225
+ display: 'flex',
226
+ alignItems: 'center',
227
+ border: 'none',
228
+ background: 'transparent',
229
+ padding: 0
230
+ },
231
+ onClick: toggleSendConfig
232
+ }, locales.getText('advancedSettings'), ' ', /*#__PURE__*/React.createElement(Icon, {
233
+ type: "pisell2-chevron-down",
234
+ size: 18,
235
+ style: {
236
+ transform: sendConfigVisible ? 'rotate(0deg)' : 'rotate(180deg)'
237
+ }
238
+ })), /*#__PURE__*/React.createElement(Form.Item, {
239
+ noStyle: true,
240
+ name: ['metadata', 'send_config'],
241
+ initialValue: {
242
+ type: 'register'
243
+ }
244
+ }, /*#__PURE__*/React.createElement(JsonEditor, {
245
+ placeholder: locales.getText('enterJSONConfig'),
246
+ rows: 4,
247
+ disabled: disabled,
248
+ style: {
249
+ display: sendConfigVisible ? 'block' : 'none'
250
+ }
251
+ })))), /*#__PURE__*/React.createElement("div", {
252
+ style: {
253
+ padding: '20px 20px 0px 20px',
254
+ borderRadius: 10,
255
+ margin: '24px 0',
256
+ border: '1px solid var(--Gray-300,#d0d5dd)'
257
+ }
258
+ }, /*#__PURE__*/React.createElement("div", {
259
+ style: {
260
+ marginBottom: '8px',
261
+ display: 'flex',
262
+ justifyContent: 'space-between',
263
+ alignItems: 'center'
264
+ }
265
+ }, /*#__PURE__*/React.createElement("span", {
266
+ style: {
267
+ fontWeight: 'bold',
268
+ fontSize: 16
269
+ }
270
+ }, locales.getText('displaySettings')), /*#__PURE__*/React.createElement("span", {
271
+ style: {
272
+ color: '#8c5cff',
273
+ cursor: 'pointer'
274
+ },
275
+ onClick: function onClick() {
276
+ return setPreviewVisible(true);
277
+ }
278
+ }, locales.getText('viewPreview'))), /*#__PURE__*/React.createElement(Form.Item, {
279
+ label: "",
280
+ name: ['metadata', 'showcaseWalletPassNew'],
281
+ initialValue: DEFAULT_WALLET_PASS_TYPES_CONFIG.map(function (item) {
282
+ return _objectSpread(_objectSpread({}, item), {}, {
283
+ display: 1
284
+ });
285
+ })
286
+ }, /*#__PURE__*/React.createElement(SortableWalletPassTypes, null)), /*#__PURE__*/React.createElement(Form.Item, {
287
+ label: locales.getText('icon'),
288
+ name: ['metadata', 'icon']
289
+ }, /*#__PURE__*/React.createElement(ImageUpload, null)), /*#__PURE__*/React.createElement(Form.Item, {
290
+ label: locales.getText('coverImage'),
291
+ name: ['metadata', 'coverImage']
292
+ }, /*#__PURE__*/React.createElement(ImageUpload, null))))), /*#__PURE__*/React.createElement(PisellModal, {
293
+ open: previewVisible,
294
+ onCancel: function onCancel() {
295
+ return setPreviewVisible(false);
296
+ },
297
+ title: locales.getText('preview'),
298
+ width: "auto",
299
+ footer: false,
300
+ header: false,
301
+ className: "pisell-wallet-editor_preview-modal"
302
+ }, /*#__PURE__*/React.createElement(WalletCard, {
303
+ mode: "dark",
304
+ shopName: shopName,
305
+ cardStyle: "normal",
306
+ codeType: "qrCode",
307
+ symbol: amountSymbol,
308
+ items: form.getFieldValue(['metadata', 'showcaseWalletPassNew']),
309
+ customBackgroundImage: form.getFieldValue(['metadata', 'coverImage']),
310
+ iconImg: form.getFieldValue(['metadata', 'icon']),
311
+ style: {
312
+ minWidth: 368
313
+ }
314
+ })));
315
+ });
316
+ export default WalletEditor;