@pisell/private-materials 6.3.32 → 6.3.34

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 (181) 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 +151 -146
  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 +1 -10
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/info/model.d.ts +1 -10
  14. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  15. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  16. package/es/components/booking/model.d.ts +1 -9
  17. package/es/components/booking/notes/model.d.ts +1 -10
  18. package/es/components/booking/payments/model.d.ts +1 -10
  19. package/es/components/index.d.ts +1 -2
  20. package/es/components/index.js +1 -2
  21. package/es/components/pay/toC/model.d.ts +1 -9
  22. package/es/components/schedules/model.d.ts +1 -9
  23. package/es/components/wallet/Detail/model.d.ts +1 -13
  24. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  25. package/es/components/wallet/PointCard/model.d.ts +1 -13
  26. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  27. package/es/components/wallet/Voucher/model.d.ts +1 -13
  28. package/es/components/wallet/model.d.ts +1 -9
  29. package/es/components/walletList/index.d.ts +0 -25
  30. package/es/components/walletList/index.js +98 -66
  31. package/es/components/walletList/serve.d.ts +4 -0
  32. package/es/components/walletList/serve.js +46 -13
  33. package/es/components/walletList/types/index.d.ts +12 -12
  34. package/es/components/walletList/types/index.js +2 -2
  35. package/es/index.d.ts +2 -1
  36. package/es/index.js +2 -1
  37. package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  38. package/es/plus/productSelect/CategoryTabs/index.js +6 -3
  39. package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  40. package/es/plus/productSelect/utils.js +0 -1
  41. package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
  42. package/es/plus/walletEditor/WalletEditor.js +316 -0
  43. package/es/plus/walletEditor/WalletEditor.less +129 -0
  44. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  45. package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
  46. package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  47. package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
  48. package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
  49. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  50. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
  51. package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  52. package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  53. package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
  54. package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
  55. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  56. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
  57. package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  58. package/es/plus/walletEditor/index.d.ts +3 -0
  59. package/es/plus/walletEditor/index.js +3 -0
  60. package/es/plus/walletEditor/locales.d.ts +126 -0
  61. package/es/plus/walletEditor/locales.js +143 -0
  62. package/es/plus/walletEditor/types.d.ts +52 -0
  63. package/es/plus/walletEditor/types.js +1 -0
  64. package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  65. package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
  66. package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
  67. package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  68. package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
  69. package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
  70. package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
  71. package/es/plus/walletPassGallery/components/passList/index.js +115 -0
  72. package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  73. package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
  74. package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
  75. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
  76. package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
  77. package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  78. package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  79. package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
  80. package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
  81. package/es/plus/walletPassGallery/index.d.ts +6 -0
  82. package/es/plus/walletPassGallery/index.js +602 -0
  83. package/es/plus/walletPassGallery/index.less +115 -0
  84. package/es/plus/walletPassGallery/locales.d.ts +270 -0
  85. package/es/plus/walletPassGallery/locales.js +279 -0
  86. package/es/plus/walletPassGallery/serve.d.ts +218 -0
  87. package/es/plus/walletPassGallery/serve.js +289 -0
  88. package/es/pro/Login2.0/AuthModal.js +14 -8
  89. package/es/pro/Login2.0/Login2.js +52 -28
  90. package/es/pro/Login2.0/Register2.js +1 -1
  91. package/es/pro/Login2.0/components/phoneValidation.js +1 -1
  92. package/es/pro/Login2.0/index.less +11 -2
  93. package/es/pro/Login2.0/locales.js +112 -112
  94. package/lib/components/booking/addons/model.d.ts +1 -10
  95. package/lib/components/booking/forms/model.d.ts +1 -10
  96. package/lib/components/booking/info/model.d.ts +1 -10
  97. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  98. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  99. package/lib/components/booking/model.d.ts +1 -9
  100. package/lib/components/booking/notes/model.d.ts +1 -10
  101. package/lib/components/booking/payments/model.d.ts +1 -10
  102. package/lib/components/index.d.ts +1 -2
  103. package/lib/components/index.js +0 -3
  104. package/lib/components/pay/toC/model.d.ts +1 -9
  105. package/lib/components/schedules/model.d.ts +1 -9
  106. package/lib/components/wallet/Detail/model.d.ts +1 -13
  107. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  108. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  109. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  110. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  111. package/lib/components/wallet/model.d.ts +1 -9
  112. package/lib/components/walletList/index.d.ts +0 -25
  113. package/lib/components/walletList/index.js +90 -51
  114. package/lib/components/walletList/serve.d.ts +4 -0
  115. package/lib/components/walletList/serve.js +12 -0
  116. package/lib/components/walletList/types/index.d.ts +12 -12
  117. package/lib/index.d.ts +2 -1
  118. package/lib/index.js +6 -3
  119. package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
  120. package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
  121. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
  122. package/lib/plus/productSelect/utils.js +0 -1
  123. package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
  124. package/lib/plus/walletEditor/WalletEditor.js +354 -0
  125. package/lib/plus/walletEditor/WalletEditor.less +129 -0
  126. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
  127. package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
  128. package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
  129. package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
  130. package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
  131. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
  132. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
  133. package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
  134. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
  135. package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
  136. package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
  137. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
  138. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
  139. package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
  140. package/lib/plus/walletEditor/index.d.ts +3 -0
  141. package/lib/plus/walletEditor/index.js +42 -0
  142. package/lib/plus/walletEditor/locales.d.ts +126 -0
  143. package/lib/plus/walletEditor/locales.js +167 -0
  144. package/lib/plus/walletEditor/types.d.ts +52 -0
  145. package/lib/plus/walletEditor/types.js +17 -0
  146. package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
  147. package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
  148. package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
  149. package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
  150. package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
  151. package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
  152. package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
  153. package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
  154. package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
  155. package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
  156. package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
  157. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
  158. package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
  159. package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
  160. package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
  161. package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
  162. package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
  163. package/lib/plus/walletPassGallery/index.d.ts +6 -0
  164. package/lib/plus/walletPassGallery/index.js +498 -0
  165. package/lib/plus/walletPassGallery/index.less +115 -0
  166. package/lib/plus/walletPassGallery/locales.d.ts +270 -0
  167. package/lib/plus/walletPassGallery/locales.js +299 -0
  168. package/lib/plus/walletPassGallery/serve.d.ts +218 -0
  169. package/lib/plus/walletPassGallery/serve.js +98 -0
  170. package/lib/pro/Login2.0/AuthModal.js +16 -11
  171. package/lib/pro/Login2.0/Login2.js +14 -4
  172. package/lib/pro/Login2.0/Register2.js +1 -1
  173. package/lib/pro/Login2.0/components/phoneValidation.js +1 -1
  174. package/lib/pro/Login2.0/index.less +11 -2
  175. package/lib/pro/Login2.0/locales.js +112 -112
  176. package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
  177. package/lowcode/wallet-editor/meta.ts +57 -0
  178. package/lowcode/wallet-editor/snippets.ts +13 -0
  179. package/lowcode/wallet-pass-gallery/meta.ts +35 -0
  180. package/package.json +4 -4
  181. package/lowcode/wallet/meta.ts +0 -79
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -110,11 +109,4 @@ export declare const walkInData: {
110
109
  id: number;
111
110
  nickname: string;
112
111
  };
113
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
- state: FormState;
115
- } & {
116
- dispatch: (params: {
117
- type: string;
118
- payload: any;
119
- }) => void;
120
- }>;
112
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -9,7 +9,6 @@ import ProductExtension from './productExtension';
9
9
  import RuleSetting from './ruleSetting';
10
10
  import TaxSelect from './taxSelect';
11
11
  import ToCPay from './pay/toC';
12
- import Wallet from './wallet';
13
12
  import WalletList from './walletList';
14
13
  import WorkspaceListDetail from './workSpaceListDetail/';
15
14
  import WorkspaceList from './workSpaceList';
@@ -19,4 +18,4 @@ import EditBookingModal from './booking/editBookingModal';
19
18
  import StepController from './stepController';
20
19
  import PinModal from './pinModal';
21
20
  import PinVerifyModal from './pinVerifyModal';
22
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, };
21
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, };
@@ -9,7 +9,6 @@ import ProductExtension from "./productExtension";
9
9
  import RuleSetting from "./ruleSetting";
10
10
  import TaxSelect from "./taxSelect";
11
11
  import ToCPay from "./pay/toC";
12
- import Wallet from "./wallet";
13
12
  import WalletList from "./walletList";
14
13
  import WorkspaceListDetail from "./workSpaceListDetail/";
15
14
  import WorkspaceList from "./workSpaceList";
@@ -19,4 +18,4 @@ import EditBookingModal from "./booking/editBookingModal";
19
18
  import StepController from "./stepController";
20
19
  import PinModal from "./pinModal";
21
20
  import PinVerifyModal from "./pinVerifyModal";
22
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal };
21
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  platform: 'pc' | 'h5' | '' | undefined;
4
3
  order: any;
@@ -30,11 +29,4 @@ export interface PayGroup {
30
29
  _order: any;
31
30
  front_order_uuid?: string;
32
31
  }
33
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
34
- state: FormState;
35
- } & {
36
- dispatch: (params: {
37
- type: string;
38
- payload: any;
39
- }) => void;
40
- }>;
32
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,11 +68,4 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
- state: FormState;
74
- } & {
75
- dispatch: (params: {
76
- type: string;
77
- payload: any;
78
- }) => void;
79
- }>;
71
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- addWalletCard: any;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- walletDetailState: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: number;
4
- setup?: 'menu' | 'list' | 'detail' | string;
5
- }
6
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
- state: RechargeState;
8
- } & {
9
- dispatch: (params: {
10
- type: string;
11
- payload: any;
12
- }) => void;
13
- }>;
14
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: number;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- state: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,29 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- selectedGiftOptionId: string | null;
4
- cardList: Array<{
5
- id: string;
6
- name: string;
7
- price: number;
8
- }>;
9
- selectedItem: {
10
- id?: string;
11
- gift_price?: number;
12
- price?: number;
13
- name?: string;
14
- variant_id?: string;
15
- };
16
- productId?: string;
17
- detailId?: string;
18
- total: string | number;
19
- rechargeModalOpen: boolean;
20
- }
21
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
- state: RechargeState;
23
- } & {
24
- dispatch: (params: {
25
- type: string;
26
- payload: any;
27
- }) => void;
28
- }>;
29
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: 0;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- state: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from './serve';
3
2
  export interface WalletCardItemProps {
4
3
  id: string;
@@ -27,11 +26,4 @@ export interface WalletListProps {
27
26
  currentSearchListItemCode?: string;
28
27
  [key: string]: any;
29
28
  }
30
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
- global_wallet: WalletListProps;
32
- } & {
33
- dispatch: (params: {
34
- type: string;
35
- payload: any;
36
- }) => void;
37
- }>;
29
+ export declare const Provider: any, Context: any;
@@ -1,28 +1,3 @@
1
- import React from 'react';
2
1
  import './index.less';
3
- declare module 'react' {
4
- interface HTMLAttributes<T> {
5
- role?: string;
6
- }
7
- }
8
- declare global {
9
- namespace JSX {
10
- interface IntrinsicElements {
11
- div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
12
- children?: React.ReactNode;
13
- onClick?: React.MouseEventHandler<HTMLDivElement>;
14
- onMouseDown?: React.MouseEventHandler<HTMLDivElement>;
15
- onMouseUp?: React.MouseEventHandler<HTMLDivElement>;
16
- onTouchStart?: React.TouchEventHandler<HTMLDivElement>;
17
- onTouchEnd?: React.TouchEventHandler<HTMLDivElement>;
18
- role?: string;
19
- };
20
- img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
21
- span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> & {
22
- children?: React.ReactNode;
23
- };
24
- }
25
- }
26
- }
27
2
  declare const WalletList: (props: any) => JSX.Element;
28
3
  export default WalletList;
@@ -21,7 +21,7 @@ import { Provider, Context } from "./model";
21
21
  import { WalletCard, Carousel } from '@pisell/materials';
22
22
  import { LeftOutlined, RightOutlined } from '@ant-design/icons';
23
23
  import useEngineContext from "./../../hooks/useEngineContext";
24
- import { getWalletList, getWalletBalance, getWalletShopList } from "./serve";
24
+ import { getWalletList, batchGetWalletBalance, getWalletShopList } from "./serve";
25
25
  import { locales, getUniqueId } from '@pisell/utils';
26
26
  import { request } from "./../../utils";
27
27
  import { defaultWalletGuideConfig } from "./status";
@@ -29,7 +29,7 @@ import localeTexts from "./locales";
29
29
  import "./index.less";
30
30
  import classNames from 'classnames';
31
31
  // 导入所有类型
32
- import { WalletCardItem, DEFAULT_CARD_CONFIG } from "./types";
32
+ import { DEFAULT_CARD_CONFIG } from "./types";
33
33
  import PinModal from "../pinModal";
34
34
 
35
35
  // 添加 localStorage 相关的操作函数
@@ -73,10 +73,6 @@ var getFromLocalStorage = function getFromLocalStorage(key) {
73
73
  }
74
74
  };
75
75
 
76
- // @ts-ignore
77
-
78
- // @ts-ignore
79
-
80
76
  // 定义轮播图配置
81
77
  var CAROUSEL_CONFIG = {
82
78
  className: 'pisell-lowcode__walletList',
@@ -126,8 +122,43 @@ var DEFAULT_WALLET_CARD = {
126
122
  en: 'Level'
127
123
  },
128
124
  metadata: {
129
- barcodetype: 'barCode',
130
- showcaseWalletPass: ['rechargeable', 'piont', 'voucher', 'discount'],
125
+ showcaseWalletPassNew: [{
126
+ type: 'rechargeable',
127
+ display: 1,
128
+ custom_title: {
129
+ original: 'Balance',
130
+ 'zh-CN': '充值卡',
131
+ 'zh-HK': '充值卡',
132
+ en: 'Balance'
133
+ }
134
+ }, {
135
+ type: 'point',
136
+ display: 1,
137
+ custom_title: {
138
+ original: 'Points',
139
+ 'zh-CN': '积分卡',
140
+ 'zh-HK': '積分卡',
141
+ en: 'Points'
142
+ }
143
+ }, {
144
+ type: 'voucher',
145
+ display: 1,
146
+ custom_title: {
147
+ original: 'Voucher',
148
+ 'zh-CN': '代金券',
149
+ 'zh-HK': '代金券',
150
+ en: 'Voucher'
151
+ }
152
+ }, {
153
+ type: 'discount',
154
+ display: 1,
155
+ custom_title: {
156
+ original: 'Discount',
157
+ 'zh-CN': '折扣卡',
158
+ 'zh-HK': '折扣卡',
159
+ en: 'Discount'
160
+ }
161
+ }],
131
162
  coverImage: '',
132
163
  icon: ''
133
164
  }
@@ -243,7 +274,7 @@ var WalletList = Provider(function (props) {
243
274
  if (isMountedRef.current) {
244
275
  setState({
245
276
  list: [DEFAULT_WALLET_CARD],
246
- balance: DEFAULT_BALANCE,
277
+ balance: [],
247
278
  hasAttempted: true,
248
279
  isLoggedIn: false
249
280
  });
@@ -392,7 +423,7 @@ var WalletList = Provider(function (props) {
392
423
  };
393
424
  var initData = /*#__PURE__*/function () {
394
425
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(requestId) {
395
- var cachedList, cachedBalance, _yield$Promise$all, _yield$Promise$all2, walletListData, walletBalanceData, _message, _data, isAuthError;
426
+ var cachedList, cachedBalance, walletListData, walletBalanceData, _message, _data, isAuthError;
396
427
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
397
428
  while (1) switch (_context3.prev = _context3.next) {
398
429
  case 0:
@@ -415,7 +446,7 @@ var WalletList = Provider(function (props) {
415
446
  // 设置状态为已尝试请求,提供默认数据而不是空列表
416
447
  setState({
417
448
  list: [DEFAULT_WALLET_CARD],
418
- balance: DEFAULT_BALANCE,
449
+ balance: [],
419
450
  hasAttempted: true,
420
451
  isLoggedIn: false
421
452
  });
@@ -433,6 +464,13 @@ var WalletList = Provider(function (props) {
433
464
  try {
434
465
  cachedList = getFromLocalStorage(STORAGE_KEY);
435
466
  cachedBalance = getFromLocalStorage(STORAGE_KEY_BALANCE);
467
+ // 避免使用旧版数据
468
+ if (!Array.isArray(cachedBalance) || !cachedBalance.some(function () {
469
+ var _items, _items$hasOwnProperty;
470
+ return (_items = items) === null || _items === void 0 || (_items$hasOwnProperty = _items.hasOwnProperty) === null || _items$hasOwnProperty === void 0 ? void 0 : _items$hasOwnProperty.call(_items, 'gift_card_balance');
471
+ })) {
472
+ cachedBalance = null;
473
+ }
436
474
  } catch (e) {
437
475
  console.error('Error fetching from localStorage:', e);
438
476
  }
@@ -453,12 +491,15 @@ var WalletList = Provider(function (props) {
453
491
  return _context3.abrupt("return");
454
492
  case 16:
455
493
  _context3.next = 18;
456
- return Promise.all([getWalletList(), getWalletBalance()]);
494
+ return getWalletList();
457
495
  case 18:
458
- _yield$Promise$all = _context3.sent;
459
- _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
460
- walletListData = _yield$Promise$all2[0];
461
- walletBalanceData = _yield$Promise$all2[1];
496
+ walletListData = _context3.sent;
497
+ _context3.next = 21;
498
+ return batchGetWalletBalance(walletListData.map(function (item) {
499
+ return item.wallet_id;
500
+ }));
501
+ case 21:
502
+ walletBalanceData = _context3.sent;
462
503
  if (!(!isMountedRef.current || requestIdRef.current !== requestId)) {
463
504
  _context3.next = 24;
464
505
  break;
@@ -498,36 +539,38 @@ var WalletList = Provider(function (props) {
498
539
  _context2.prev = 2;
499
540
  // 准备重试请求
500
541
  retryBalanceData = walletBalanceData;
501
- retryListData = walletListData; // 如果余额数据为空,重试请求余额
502
- if (walletBalanceData) {
542
+ retryListData = walletListData; // 如果列表数据为空,重试请求列表
543
+ if (!(Array.isArray(walletListData) && walletListData.length === 0)) {
503
544
  _context2.next = 10;
504
545
  break;
505
546
  }
506
547
  _context2.next = 8;
507
- return getWalletBalance();
548
+ return getWalletList();
508
549
  case 8:
509
- retryBalanceData = _context2.sent;
510
- if (retryBalanceData) {
550
+ retryListData = _context2.sent;
551
+ if (retryListData && retryListData.length > 0) {
511
552
  try {
512
- saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
553
+ saveToLocalStorage(STORAGE_KEY, retryListData);
513
554
  } catch (e) {
514
- console.error('Error saving retry balance to localStorage:', e);
555
+ console.error('Error saving retry list to localStorage:', e);
515
556
  }
516
557
  }
517
558
  case 10:
518
- if (!(Array.isArray(walletListData) && walletListData.length === 0)) {
559
+ if (walletBalanceData) {
519
560
  _context2.next = 15;
520
561
  break;
521
562
  }
522
563
  _context2.next = 13;
523
- return getWalletList({});
564
+ return batchGetWalletBalance(retryListData.map(function (item) {
565
+ return item.wallet_id;
566
+ }));
524
567
  case 13:
525
- retryListData = _context2.sent;
526
- if (retryListData && retryListData.length > 0) {
568
+ retryBalanceData = _context2.sent;
569
+ if (retryBalanceData) {
527
570
  try {
528
- saveToLocalStorage(STORAGE_KEY, retryListData);
571
+ saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
529
572
  } catch (e) {
530
- console.error('Error saving retry list to localStorage:', e);
573
+ console.error('Error saving retry balance to localStorage:', e);
531
574
  }
532
575
  }
533
576
  case 15:
@@ -598,67 +641,56 @@ var WalletList = Provider(function (props) {
598
641
  console.error('onViewPinClick方法需要传入wallet_detail_id');
599
642
  }
600
643
  };
601
- var renderWalletCard = function renderWalletCard(item) {
644
+ var renderWalletCard = function renderWalletCard(_walletItem) {
602
645
  var _dvaStore$core;
603
- var code = item.code,
604
- shop = item.shop,
605
- wallet = item.wallet,
606
- id = item.id;
646
+ var code = _walletItem.code,
647
+ shop = _walletItem.shop,
648
+ wallet = _walletItem.wallet,
649
+ id = _walletItem.id;
607
650
  var _ref5 = wallet || {},
608
651
  metadata = _ref5.metadata,
609
652
  name = _ref5.name;
610
653
  var _ref6 = metadata || {},
611
- _ref6$barcodetype = _ref6.barcodetype,
612
- barcodetype = _ref6$barcodetype === void 0 ? 'barCode' : _ref6$barcodetype,
613
- _ref6$showcaseWalletP = _ref6.showcaseWalletPass,
614
- showcaseWalletPass = _ref6$showcaseWalletP === void 0 ? [] : _ref6$showcaseWalletP,
654
+ _ref6$showcaseWalletP = _ref6.showcaseWalletPassNew,
655
+ showcaseWalletPassNew = _ref6$showcaseWalletP === void 0 ? [] : _ref6$showcaseWalletP,
615
656
  _ref6$coverImage = _ref6.coverImage,
616
657
  coverImage = _ref6$coverImage === void 0 ? '' : _ref6$coverImage,
617
658
  _ref6$icon = _ref6.icon,
618
659
  icon = _ref6$icon === void 0 ? '' : _ref6$icon;
619
660
  var shopName = shop.name;
620
- var balance = state.balance;
661
+ var _state$balance = state.balance,
662
+ balance = _state$balance === void 0 ? [] : _state$balance;
663
+ var balanceItem = balance.find(function (bi) {
664
+ return bi.wallet_id == _walletItem.wallet_id;
665
+ }) || DEFAULT_BALANCE;
621
666
 
622
667
  // 字段映射关系
623
- var balanceKeyMap = {
624
- gift_card_balance: 'rechargeable',
625
- point_card_balance: 'piont',
626
- voucher_count: 'voucher',
627
- discount_card_count: 'discount'
668
+ var _balanceKeyMap = {
669
+ rechargeable: 'gift_card_balance',
670
+ point: 'point_card_balance',
671
+ voucher: 'voucher_count',
672
+ discount: 'discount_card_count'
628
673
  };
629
-
630
- // 根据showcaseWalletPass生成items数组
631
- var cardItems = (showcaseWalletPass || []).map(function (key) {
632
- var _Object$entries$find;
633
- // 找到对应的balance字段
634
- var balanceKey = (_Object$entries$find = Object.entries(balanceKeyMap).find(function (_ref7) {
635
- var _ref8 = _slicedToArray(_ref7, 2),
636
- _ = _ref8[0],
637
- value = _ref8[1];
638
- return value === key;
639
- })) === null || _Object$entries$find === void 0 ? void 0 : _Object$entries$find[0];
640
- var value = balanceKey ? balance[balanceKey] || 0 : 0;
641
- if (balanceKey === 'voucher_count') {
642
- value += balance.good_pass_count;
643
- }
644
- return {
645
- key: key,
646
- label: key,
647
- hidden: false,
674
+ var cardItems = showcaseWalletPassNew.map(function (item) {
675
+ var balanceKey = _balanceKeyMap[item.type];
676
+ var value = balanceKey ? balanceItem[balanceKey] || 0 : 0;
677
+ return _objectSpread(_objectSpread({}, item), {}, {
648
678
  value: value
649
- };
679
+ });
650
680
  });
681
+
651
682
  // 构建WalletCard的props
652
683
  // 优先级:接口返回值 > globalState > DEFAULT_CARD_CONFIG
653
684
  var cardProps = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_CARD_CONFIG), globalState), {}, {
654
685
  // 最后应用API返回的数据,这些拥有最高优先级
686
+ id: wallet.id,
655
687
  iconImg: icon,
656
688
  symbol: symbol,
657
689
  cardNo: code,
658
690
  walletName: getLocalizedName(name, dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale),
659
691
  shopName: shopName,
660
- codeType: barcodetype,
661
- items: cardItems,
692
+ // codeType: barcodetype,
693
+ items: cardItems.slice(0, 4),
662
694
  customBackgroundImage: coverImage,
663
695
  isLogin: isUserLoggedIn // 添加登录状态
664
696
  });
@@ -10,6 +10,10 @@ export declare const getWalletList: () => Promise<WalletPass[]>;
10
10
  * @returns
11
11
  */
12
12
  export declare const getWalletBalance: () => Promise<WalletBalance | null>;
13
+ /**
14
+ * 批量获取钱包余额信息
15
+ */
16
+ export declare const batchGetWalletBalance: (walletIds: string[]) => Promise<Record<string, WalletBalance> | null>;
13
17
  /**
14
18
  * @title: 获取钱包店铺列表
15
19
  * @description: