@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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +151 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -8
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/walletList/index.d.ts +0 -25
- package/es/components/walletList/index.js +98 -66
- package/es/components/walletList/serve.d.ts +4 -0
- package/es/components/walletList/serve.js +46 -13
- package/es/components/walletList/types/index.d.ts +12 -12
- package/es/components/walletList/types/index.js +2 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/es/plus/productSelect/CategoryTabs/index.js +6 -3
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/es/plus/productSelect/utils.js +0 -1
- package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/es/plus/walletEditor/WalletEditor.js +316 -0
- package/es/plus/walletEditor/WalletEditor.less +129 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
- package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
- package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/es/plus/walletEditor/index.d.ts +3 -0
- package/es/plus/walletEditor/index.js +3 -0
- package/es/plus/walletEditor/locales.d.ts +126 -0
- package/es/plus/walletEditor/locales.js +143 -0
- package/es/plus/walletEditor/types.d.ts +52 -0
- package/es/plus/walletEditor/types.js +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
- package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
- package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/passList/index.js +115 -0
- package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
- package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
- package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/es/plus/walletPassGallery/index.d.ts +6 -0
- package/es/plus/walletPassGallery/index.js +602 -0
- package/es/plus/walletPassGallery/index.less +115 -0
- package/es/plus/walletPassGallery/locales.d.ts +270 -0
- package/es/plus/walletPassGallery/locales.js +279 -0
- package/es/plus/walletPassGallery/serve.d.ts +218 -0
- package/es/plus/walletPassGallery/serve.js +289 -0
- package/es/pro/Login2.0/AuthModal.js +14 -8
- package/es/pro/Login2.0/Login2.js +52 -28
- package/es/pro/Login2.0/Register2.js +1 -1
- package/es/pro/Login2.0/components/phoneValidation.js +1 -1
- package/es/pro/Login2.0/index.less +11 -2
- package/es/pro/Login2.0/locales.js +112 -112
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/walletList/index.d.ts +0 -25
- package/lib/components/walletList/index.js +90 -51
- package/lib/components/walletList/serve.d.ts +4 -0
- package/lib/components/walletList/serve.js +12 -0
- package/lib/components/walletList/types/index.d.ts +12 -12
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/lib/plus/productSelect/utils.js +0 -1
- package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/lib/plus/walletEditor/WalletEditor.js +354 -0
- package/lib/plus/walletEditor/WalletEditor.less +129 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
- package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/lib/plus/walletEditor/index.d.ts +3 -0
- package/lib/plus/walletEditor/index.js +42 -0
- package/lib/plus/walletEditor/locales.d.ts +126 -0
- package/lib/plus/walletEditor/locales.js +167 -0
- package/lib/plus/walletEditor/types.d.ts +52 -0
- package/lib/plus/walletEditor/types.js +17 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
- package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
- package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/lib/plus/walletPassGallery/index.d.ts +6 -0
- package/lib/plus/walletPassGallery/index.js +498 -0
- package/lib/plus/walletPassGallery/index.less +115 -0
- package/lib/plus/walletPassGallery/locales.d.ts +270 -0
- package/lib/plus/walletPassGallery/locales.js +299 -0
- package/lib/plus/walletPassGallery/serve.d.ts +218 -0
- package/lib/plus/walletPassGallery/serve.js +98 -0
- package/lib/pro/Login2.0/AuthModal.js +16 -11
- package/lib/pro/Login2.0/Login2.js +14 -4
- package/lib/pro/Login2.0/Register2.js +1 -1
- package/lib/pro/Login2.0/components/phoneValidation.js +1 -1
- package/lib/pro/Login2.0/index.less +11 -2
- package/lib/pro/Login2.0/locales.js +112 -112
- package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
- package/lowcode/wallet-editor/meta.ts +57 -0
- package/lowcode/wallet-editor/snippets.ts +13 -0
- package/lowcode/wallet-pass-gallery/meta.ts +35 -0
- package/package.json +4 -4
- package/lowcode/wallet/meta.ts +0 -79
|
@@ -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,
|
|
21
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, };
|
package/lib/components/index.js
CHANGED
|
@@ -46,7 +46,6 @@ __export(components_exports, {
|
|
|
46
46
|
SubTotal: () => import_subTotal.default,
|
|
47
47
|
TaxSelect: () => import_taxSelect.default,
|
|
48
48
|
ToCPay: () => import_toC.default,
|
|
49
|
-
Wallet: () => import_wallet.default,
|
|
50
49
|
WalletList: () => import_walletList.default,
|
|
51
50
|
WorkspaceList: () => import_workSpaceList.default,
|
|
52
51
|
WorkspaceListDetail: () => import_workSpaceListDetail.default
|
|
@@ -63,7 +62,6 @@ var import_productExtension = __toESM(require("./productExtension"));
|
|
|
63
62
|
var import_ruleSetting = __toESM(require("./ruleSetting"));
|
|
64
63
|
var import_taxSelect = __toESM(require("./taxSelect"));
|
|
65
64
|
var import_toC = __toESM(require("./pay/toC"));
|
|
66
|
-
var import_wallet = __toESM(require("./wallet"));
|
|
67
65
|
var import_walletList = __toESM(require("./walletList"));
|
|
68
66
|
var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
|
|
69
67
|
var import_workSpaceList = __toESM(require("./workSpaceList"));
|
|
@@ -92,7 +90,6 @@ var import_pinVerifyModal = __toESM(require("./pinVerifyModal"));
|
|
|
92
90
|
SubTotal,
|
|
93
91
|
TaxSelect,
|
|
94
92
|
ToCPay,
|
|
95
|
-
Wallet,
|
|
96
93
|
WalletList,
|
|
97
94
|
WorkspaceList,
|
|
98
95
|
WorkspaceListDetail
|
|
@@ -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:
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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;
|
|
@@ -104,8 +104,48 @@ var DEFAULT_WALLET_CARD = {
|
|
|
104
104
|
en: "Level"
|
|
105
105
|
},
|
|
106
106
|
metadata: {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
showcaseWalletPassNew: [
|
|
108
|
+
{
|
|
109
|
+
type: "rechargeable",
|
|
110
|
+
display: 1,
|
|
111
|
+
custom_title: {
|
|
112
|
+
original: "Balance",
|
|
113
|
+
"zh-CN": "充值卡",
|
|
114
|
+
"zh-HK": "充值卡",
|
|
115
|
+
en: "Balance"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: "point",
|
|
120
|
+
display: 1,
|
|
121
|
+
custom_title: {
|
|
122
|
+
original: "Points",
|
|
123
|
+
"zh-CN": "积分卡",
|
|
124
|
+
"zh-HK": "積分卡",
|
|
125
|
+
en: "Points"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: "voucher",
|
|
130
|
+
display: 1,
|
|
131
|
+
custom_title: {
|
|
132
|
+
original: "Voucher",
|
|
133
|
+
"zh-CN": "代金券",
|
|
134
|
+
"zh-HK": "代金券",
|
|
135
|
+
en: "Voucher"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: "discount",
|
|
140
|
+
display: 1,
|
|
141
|
+
custom_title: {
|
|
142
|
+
original: "Discount",
|
|
143
|
+
"zh-CN": "折扣卡",
|
|
144
|
+
"zh-HK": "折扣卡",
|
|
145
|
+
en: "Discount"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
109
149
|
coverImage: "",
|
|
110
150
|
icon: ""
|
|
111
151
|
}
|
|
@@ -171,7 +211,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
171
211
|
if (isMountedRef.current) {
|
|
172
212
|
setState({
|
|
173
213
|
list: [DEFAULT_WALLET_CARD],
|
|
174
|
-
balance:
|
|
214
|
+
balance: [],
|
|
175
215
|
hasAttempted: true,
|
|
176
216
|
isLoggedIn: false
|
|
177
217
|
});
|
|
@@ -269,7 +309,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
269
309
|
if (!isUserLoggedIn) {
|
|
270
310
|
setState({
|
|
271
311
|
list: [DEFAULT_WALLET_CARD],
|
|
272
|
-
balance:
|
|
312
|
+
balance: [],
|
|
273
313
|
hasAttempted: true,
|
|
274
314
|
isLoggedIn: false
|
|
275
315
|
});
|
|
@@ -281,6 +321,12 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
281
321
|
try {
|
|
282
322
|
cachedList = getFromLocalStorage(STORAGE_KEY);
|
|
283
323
|
cachedBalance = getFromLocalStorage(STORAGE_KEY_BALANCE);
|
|
324
|
+
if (!Array.isArray(cachedBalance) || !cachedBalance.some(() => {
|
|
325
|
+
var _a3;
|
|
326
|
+
return (_a3 = items == null ? void 0 : items.hasOwnProperty) == null ? void 0 : _a3.call(items, "gift_card_balance");
|
|
327
|
+
})) {
|
|
328
|
+
cachedBalance = null;
|
|
329
|
+
}
|
|
284
330
|
} catch (e) {
|
|
285
331
|
console.error("Error fetching from localStorage:", e);
|
|
286
332
|
}
|
|
@@ -293,10 +339,10 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
293
339
|
}
|
|
294
340
|
try {
|
|
295
341
|
if (!isMountedRef.current) return;
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
(
|
|
299
|
-
|
|
342
|
+
const walletListData = await (0, import_serve.getWalletList)();
|
|
343
|
+
const walletBalanceData = await (0, import_serve.batchGetWalletBalance)(
|
|
344
|
+
walletListData.map((item2) => item2.wallet_id)
|
|
345
|
+
);
|
|
300
346
|
if (!isMountedRef.current || requestIdRef.current !== requestId) return;
|
|
301
347
|
if (walletListData) {
|
|
302
348
|
try {
|
|
@@ -319,8 +365,20 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
319
365
|
try {
|
|
320
366
|
let retryBalanceData = walletBalanceData;
|
|
321
367
|
let retryListData = walletListData;
|
|
368
|
+
if (Array.isArray(walletListData) && walletListData.length === 0) {
|
|
369
|
+
retryListData = await (0, import_serve.getWalletList)();
|
|
370
|
+
if (retryListData && retryListData.length > 0) {
|
|
371
|
+
try {
|
|
372
|
+
saveToLocalStorage(STORAGE_KEY, retryListData);
|
|
373
|
+
} catch (e) {
|
|
374
|
+
console.error("Error saving retry list to localStorage:", e);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
322
378
|
if (!walletBalanceData) {
|
|
323
|
-
retryBalanceData = await (0, import_serve.
|
|
379
|
+
retryBalanceData = await (0, import_serve.batchGetWalletBalance)(
|
|
380
|
+
retryListData.map((item2) => item2.wallet_id)
|
|
381
|
+
);
|
|
324
382
|
if (retryBalanceData) {
|
|
325
383
|
try {
|
|
326
384
|
saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
|
|
@@ -332,16 +390,6 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
332
390
|
}
|
|
333
391
|
}
|
|
334
392
|
}
|
|
335
|
-
if (Array.isArray(walletListData) && walletListData.length === 0) {
|
|
336
|
-
retryListData = await (0, import_serve.getWalletList)({});
|
|
337
|
-
if (retryListData && retryListData.length > 0) {
|
|
338
|
-
try {
|
|
339
|
-
saveToLocalStorage(STORAGE_KEY, retryListData);
|
|
340
|
-
} catch (e) {
|
|
341
|
-
console.error("Error saving retry list to localStorage:", e);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
393
|
setState({
|
|
346
394
|
list: retryListData || [],
|
|
347
395
|
balance: retryBalanceData,
|
|
@@ -380,55 +428,46 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
380
428
|
console.error("onViewPinClick方法需要传入wallet_detail_id");
|
|
381
429
|
}
|
|
382
430
|
};
|
|
383
|
-
const renderWalletCard = (
|
|
431
|
+
const renderWalletCard = (_walletItem) => {
|
|
384
432
|
var _a2;
|
|
385
|
-
const { code, shop, wallet, id } =
|
|
433
|
+
const { code, shop, wallet, id } = _walletItem;
|
|
386
434
|
const { metadata, name } = wallet || {};
|
|
387
435
|
const {
|
|
388
|
-
|
|
389
|
-
showcaseWalletPass = [],
|
|
436
|
+
showcaseWalletPassNew = [],
|
|
390
437
|
coverImage = "",
|
|
391
438
|
icon = ""
|
|
392
439
|
} = metadata || {};
|
|
393
440
|
const { name: shopName } = shop;
|
|
394
|
-
const { balance } = state;
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
441
|
+
const { balance = [] } = state;
|
|
442
|
+
const balanceItem = balance.find((bi) => bi.wallet_id == _walletItem.wallet_id) || DEFAULT_BALANCE;
|
|
443
|
+
const _balanceKeyMap = {
|
|
444
|
+
rechargeable: "gift_card_balance",
|
|
445
|
+
point: "point_card_balance",
|
|
446
|
+
voucher: "voucher_count",
|
|
447
|
+
discount: "discount_card_count"
|
|
400
448
|
};
|
|
401
|
-
const cardItems = (
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
value += balance.good_pass_count;
|
|
410
|
-
}
|
|
411
|
-
return {
|
|
412
|
-
key,
|
|
413
|
-
label: key,
|
|
414
|
-
hidden: false,
|
|
415
|
-
value
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
);
|
|
449
|
+
const cardItems = showcaseWalletPassNew.map((item2) => {
|
|
450
|
+
const balanceKey = _balanceKeyMap[item2.type];
|
|
451
|
+
let value = balanceKey ? balanceItem[balanceKey] || 0 : 0;
|
|
452
|
+
return {
|
|
453
|
+
...item2,
|
|
454
|
+
value
|
|
455
|
+
};
|
|
456
|
+
});
|
|
419
457
|
const cardProps = {
|
|
420
458
|
// 先应用默认配置
|
|
421
459
|
...import_types.DEFAULT_CARD_CONFIG,
|
|
422
460
|
// 再应用globalState作为兜底
|
|
423
461
|
...globalState,
|
|
424
462
|
// 最后应用API返回的数据,这些拥有最高优先级
|
|
463
|
+
id: wallet.id,
|
|
425
464
|
iconImg: icon,
|
|
426
465
|
symbol,
|
|
427
466
|
cardNo: code,
|
|
428
467
|
walletName: getLocalizedName(name, (_a2 = dvaStore == null ? void 0 : dvaStore.core) == null ? void 0 : _a2.translateLocale),
|
|
429
468
|
shopName,
|
|
430
|
-
codeType: barcodetype,
|
|
431
|
-
items: cardItems,
|
|
469
|
+
// codeType: barcodetype,
|
|
470
|
+
items: cardItems.slice(0, 4),
|
|
432
471
|
customBackgroundImage: coverImage,
|
|
433
472
|
isLogin: isUserLoggedIn
|
|
434
473
|
// 添加登录状态
|
|
@@ -499,7 +538,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
499
538
|
]
|
|
500
539
|
};
|
|
501
540
|
const renderBalanceCard = (0, import_react.useCallback)((balance) => {
|
|
502
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-balance-card", key: balance.id }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-title" }, balance.name), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-value" }, balance.value)), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-content" }, balance.items && balance.items.map((
|
|
541
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-balance-card", key: balance.id }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-title" }, balance.name), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-value" }, balance.value)), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-card-content" }, balance.items && balance.items.map((item2) => /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-item", key: item2.key }, /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-item-label" }, item2.label), /* @__PURE__ */ import_react.default.createElement("div", { className: "balance-item-value" }, item2.value)))));
|
|
503
542
|
}, []);
|
|
504
543
|
const isShowGuide = (0, import_react.useMemo)(() => {
|
|
505
544
|
var _a2;
|
|
@@ -518,7 +557,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
|
518
557
|
...globalState,
|
|
519
558
|
walletGuideConfig: (globalState == null ? void 0 : globalState.walletGuideConfig) || (0, import_status.defaultWalletGuideConfig)()
|
|
520
559
|
}
|
|
521
|
-
) : /* @__PURE__ */ import_react.default.createElement(import_materials.Carousel, { ref: carouselRef, ...carouselProps }, list.map((
|
|
560
|
+
) : /* @__PURE__ */ import_react.default.createElement(import_materials.Carousel, { ref: carouselRef, ...carouselProps }, list.map((item2) => renderWalletCard(item2)))), list && list.length > 1 && isUserLoggedIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-navigation" }, /* @__PURE__ */ import_react.default.createElement(
|
|
522
561
|
"div",
|
|
523
562
|
{
|
|
524
563
|
className: `wallet-nav-button wallet-prev ${currentIndex === 0 ? "disabled" : ""}`,
|
|
@@ -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:
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/walletList/serve.ts
|
|
20
20
|
var serve_exports = {};
|
|
21
21
|
__export(serve_exports, {
|
|
22
|
+
batchGetWalletBalance: () => batchGetWalletBalance,
|
|
22
23
|
getWalletBalance: () => getWalletBalance,
|
|
23
24
|
getWalletList: () => getWalletList,
|
|
24
25
|
getWalletShopList: () => getWalletShopList
|
|
@@ -41,6 +42,16 @@ var getWalletBalance = async () => {
|
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
44
|
};
|
|
45
|
+
var batchGetWalletBalance = async (walletIds) => {
|
|
46
|
+
try {
|
|
47
|
+
const { data } = await import_utils.request.getRequest().get("/h5/wallet/wallet-pass/balance/batch", {
|
|
48
|
+
wallet_id: walletIds
|
|
49
|
+
});
|
|
50
|
+
return data || {};
|
|
51
|
+
} catch (error) {
|
|
52
|
+
return {};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
44
55
|
var getWalletShopList = async (params) => {
|
|
45
56
|
try {
|
|
46
57
|
const { data } = await import_utils.request.getRequest().get("/h5/wallet/shop/list", params || {}, {
|
|
@@ -54,6 +65,7 @@ var getWalletShopList = async (params) => {
|
|
|
54
65
|
};
|
|
55
66
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
67
|
0 && (module.exports = {
|
|
68
|
+
batchGetWalletBalance,
|
|
57
69
|
getWalletBalance,
|
|
58
70
|
getWalletList,
|
|
59
71
|
getWalletShopList
|
|
@@ -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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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' | '
|
|
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' | '
|
|
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 {};
|
package/lib/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/lib/index.js
CHANGED
|
@@ -81,8 +81,9 @@ __export(src_exports, {
|
|
|
81
81
|
ToCPay: () => import_toC.default,
|
|
82
82
|
VerticalAddService: () => import_addServiceVariant.default,
|
|
83
83
|
VerticalClient: () => import_clientVariant.VerticalClient,
|
|
84
|
-
|
|
84
|
+
WalletEditor: () => import_walletEditor.default,
|
|
85
85
|
WalletList: () => import_walletList.default,
|
|
86
|
+
WalletPassGallery: () => import_walletPassGallery.default,
|
|
86
87
|
WorkspaceList: () => import_workSpaceList.default,
|
|
87
88
|
WorkspaceListDetail: () => import_workSpaceListDetail.default
|
|
88
89
|
});
|
|
@@ -113,7 +114,6 @@ var import_taxSelect = __toESM(require("./components/taxSelect"));
|
|
|
113
114
|
var import_eftposPay = __toESM(require("./components/eftposPay"));
|
|
114
115
|
var import_toC = __toESM(require("./components/pay/toC"));
|
|
115
116
|
var import_eftpos = __toESM(require("./components/eftpos"));
|
|
116
|
-
var import_wallet = __toESM(require("./components/wallet"));
|
|
117
117
|
var import_walletList = __toESM(require("./components/walletList"));
|
|
118
118
|
var import_dashboard = __toESM(require("./components/booking/dashboard"));
|
|
119
119
|
var import_pisellSelectCustomerModal = __toESM(require("./components/pisellSelectCustomerModal"));
|
|
@@ -139,6 +139,8 @@ var import_stepController = __toESM(require("./components/stepController"));
|
|
|
139
139
|
var import_saasLogin = __toESM(require("./plus/saasLogin"));
|
|
140
140
|
var import_saasRegister = __toESM(require("./plus/saasRegister"));
|
|
141
141
|
var import_saasCreateOrganization = __toESM(require("./plus/saasCreateOrganization"));
|
|
142
|
+
var import_walletEditor = __toESM(require("./plus/walletEditor"));
|
|
143
|
+
var import_walletPassGallery = __toESM(require("./plus/walletPassGallery"));
|
|
142
144
|
var import_pinModal = __toESM(require("./components/pinModal"));
|
|
143
145
|
var import_pinVerifyModal = __toESM(require("./components/pinVerifyModal"));
|
|
144
146
|
var import_contactInfo = __toESM(require("./plus/contactInfo"));
|
|
@@ -200,8 +202,9 @@ import_dayjs.default.extend(import_localeData.default);
|
|
|
200
202
|
ToCPay,
|
|
201
203
|
VerticalAddService,
|
|
202
204
|
VerticalClient,
|
|
203
|
-
|
|
205
|
+
WalletEditor,
|
|
204
206
|
WalletList,
|
|
207
|
+
WalletPassGallery,
|
|
205
208
|
WorkspaceList,
|
|
206
209
|
WorkspaceListDetail
|
|
207
210
|
});
|
|
@@ -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;
|