@pisell/private-materials 6.6.40 → 6.6.42
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 +2 -2
- package/build/lowcode/preview.js +16 -16
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +13 -13
- 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/info/service2/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/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/ticketBooking/utils/index.d.ts +2 -1
- package/es/components/ticketBooking/utils/index.js +3 -2
- package/es/plus/clientCard/index.js +6 -4
- package/es/plus/clientCard/index.less +6 -2
- package/es/plus/clientCard/types.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +85 -43
- package/es/plus/walletPassGallery/components/passList/index.js +12 -4
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +3 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +26 -3
- package/es/plus/walletPassGallery/index.d.ts +4 -0
- package/es/plus/walletPassGallery/index.js +95 -46
- package/es/plus/walletPassGallery/serve.d.ts +11 -1
- package/es/plus/walletPassGallery/serve.js +85 -59
- 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/info/service2/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/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/ticketBooking/utils/index.d.ts +2 -1
- package/lib/components/ticketBooking/utils/index.js +3 -2
- package/lib/plus/clientCard/index.js +5 -4
- package/lib/plus/clientCard/index.less +6 -2
- package/lib/plus/clientCard/types.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +65 -10
- package/lib/plus/walletPassGallery/components/passList/index.js +12 -5
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +3 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +32 -10
- package/lib/plus/walletPassGallery/index.d.ts +4 -0
- package/lib/plus/walletPassGallery/index.js +116 -45
- package/lib/plus/walletPassGallery/serve.d.ts +11 -1
- package/lib/plus/walletPassGallery/serve.js +25 -12
- package/lowcode/client-card/meta.ts +9 -3
- package/lowcode/client-search/meta.ts +316 -0
- package/lowcode/wallet-pass-gallery/meta.ts +66 -1
- package/package.json +3 -3
|
@@ -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:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -216,4 +216,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
|
|
|
216
216
|
* @Author: WangHan
|
|
217
217
|
* @Date: 2024-12-24 11:32
|
|
218
218
|
*/
|
|
219
|
-
export declare const updateServicePrice: (state: any) => never[]
|
|
219
|
+
export declare const updateServicePrice: (state: any) => Promise<any> | never[];
|
|
@@ -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:
|
|
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
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -175,10 +175,10 @@ export declare const getProductOriginTotalPrice: (item: any) => number;
|
|
|
175
175
|
export declare const getDuration: (duration: number | {
|
|
176
176
|
type: string;
|
|
177
177
|
value: number;
|
|
178
|
-
}) => number |
|
|
178
|
+
}) => number | {
|
|
179
179
|
type: string;
|
|
180
180
|
value: number;
|
|
181
|
-
};
|
|
181
|
+
} | "flexible";
|
|
182
182
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
183
183
|
export declare const getIsEdit: (state: any) => boolean;
|
|
184
184
|
export {};
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "success" | "print" | "page" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "success" | "print" | "page" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "init" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -178,7 +178,7 @@ export declare const updateCustom: (payload: {
|
|
|
178
178
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
179
179
|
type: EActionTypes;
|
|
180
180
|
payload: {
|
|
181
|
-
status: "
|
|
181
|
+
status: "success" | "warn" | "loading" | "fail" | "question";
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
184
|
/**
|
|
@@ -299,10 +299,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
299
299
|
name?: string | undefined;
|
|
300
300
|
symbol?: string | undefined;
|
|
301
301
|
amount?: string | number | undefined;
|
|
302
|
-
mode?: "
|
|
302
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
303
303
|
order_id?: string | number | undefined;
|
|
304
|
-
eftpos?: "
|
|
305
|
-
action?: "
|
|
304
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu" | undefined;
|
|
305
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
306
306
|
key?: number | undefined;
|
|
307
307
|
step?: number | undefined;
|
|
308
308
|
title?: string | undefined;
|
|
@@ -312,7 +312,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
312
312
|
net?: boolean | undefined;
|
|
313
313
|
component?: string | undefined;
|
|
314
314
|
form?: string | undefined;
|
|
315
|
-
status?: "
|
|
315
|
+
status?: "success" | "warn" | "loading" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
316
316
|
warn?: string | undefined;
|
|
317
317
|
steps?: {
|
|
318
318
|
/** 用于重置当前步骤 */
|
|
@@ -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;
|
|
@@ -47,7 +47,7 @@ declare type ScanData = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
-
searchType: "
|
|
50
|
+
searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
|
|
51
51
|
data: any;
|
|
52
52
|
scanCode: string;
|
|
53
53
|
} | null;
|
|
@@ -84,6 +84,7 @@ export declare const rulesHooks: {
|
|
|
84
84
|
startDate: any;
|
|
85
85
|
bundle: any;
|
|
86
86
|
options: any;
|
|
87
|
+
main_product_selling_price: any;
|
|
87
88
|
};
|
|
88
89
|
setProduct(product: Record<string, any>, values: {
|
|
89
90
|
total: number;
|
|
@@ -352,7 +352,7 @@ var getShopDiscountKey = (osKey) => {
|
|
|
352
352
|
var rulesHooks = {
|
|
353
353
|
// 获取商品关键信息
|
|
354
354
|
getProduct(product) {
|
|
355
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
356
356
|
const detail = {
|
|
357
357
|
booking_id: product.booking_id,
|
|
358
358
|
id: product.id,
|
|
@@ -368,7 +368,8 @@ var rulesHooks = {
|
|
|
368
368
|
isNormalProduct: (_b = product._extend) == null ? void 0 : _b.isNormalProduct,
|
|
369
369
|
startDate: (_c = product._extend) == null ? void 0 : _c.startDate,
|
|
370
370
|
bundle: ((_e = (_d = product._extend) == null ? void 0 : _d.other) == null ? void 0 : _e.bundle) || [],
|
|
371
|
-
options: ((_g = (_f = product._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option) || []
|
|
371
|
+
options: ((_g = (_f = product._extend) == null ? void 0 : _f.other) == null ? void 0 : _g.option) || [],
|
|
372
|
+
main_product_selling_price: (_h = product._extend) == null ? void 0 : _h.main_product_selling_price
|
|
372
373
|
};
|
|
373
374
|
return detail;
|
|
374
375
|
},
|
|
@@ -94,7 +94,7 @@ var renderAvatar = (processedData, avatarConfig = {}, isShowAvatar = true, isSho
|
|
|
94
94
|
{
|
|
95
95
|
className: `${PREFIX}__avatar`,
|
|
96
96
|
...avatarConfig,
|
|
97
|
-
icon: /* @__PURE__ */ import_react.default.createElement(
|
|
97
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: icon })
|
|
98
98
|
}
|
|
99
99
|
), statusIndicator);
|
|
100
100
|
}
|
|
@@ -177,7 +177,7 @@ var renderExtraFields = (extraFields = [], gap) => {
|
|
|
177
177
|
if (!extraFields.length) return null;
|
|
178
178
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__extra-fields`, style: { gap } }, extraFields.map((field, index) => {
|
|
179
179
|
return /* @__PURE__ */ import_react.default.createElement("div", { key: index, className: `${PREFIX}__extra-field` }, field.icon && /* @__PURE__ */ import_react.default.createElement(
|
|
180
|
-
|
|
180
|
+
import_materials.Icon,
|
|
181
181
|
{
|
|
182
182
|
type: field.icon,
|
|
183
183
|
className: `${PREFIX}__extra-field-icon`,
|
|
@@ -208,6 +208,7 @@ var ClientCard = ({
|
|
|
208
208
|
isShowAddress = true,
|
|
209
209
|
isShowTag = true,
|
|
210
210
|
isShowStatus = false,
|
|
211
|
+
isShowEmptyDescription = true,
|
|
211
212
|
// 头像配置
|
|
212
213
|
avatar = {},
|
|
213
214
|
status = {},
|
|
@@ -287,7 +288,7 @@ var ClientCard = ({
|
|
|
287
288
|
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__content` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__info` }, isShowAvatar && /* @__PURE__ */ import_react.default.createElement(
|
|
288
289
|
import_materials.PisellAvatar,
|
|
289
290
|
{
|
|
290
|
-
icon: avatar.icon ? /* @__PURE__ */ import_react.default.createElement(
|
|
291
|
+
icon: avatar.icon ? /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: avatar.icon }) : /* @__PURE__ */ import_react.default.createElement(
|
|
291
292
|
import_icon.User01,
|
|
292
293
|
{
|
|
293
294
|
style: {
|
|
@@ -303,7 +304,7 @@ var ClientCard = ({
|
|
|
303
304
|
dataSource: defaultName || import_utils.locales.getText("pisell2.text.add-client"),
|
|
304
305
|
style: nameStyle
|
|
305
306
|
}
|
|
306
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__empty-description` }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")))), /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__actions` }, /* @__PURE__ */ import_react.default.createElement("span", { className: `${PREFIX}__plugin-icon` }, /* @__PURE__ */ import_react.default.createElement(
|
|
307
|
+
), isShowEmptyDescription && /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__empty-description` }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")))), /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__actions` }, /* @__PURE__ */ import_react.default.createElement("span", { className: `${PREFIX}__plugin-icon` }, /* @__PURE__ */ import_react.default.createElement(
|
|
307
308
|
import_icon.PlusCircle,
|
|
308
309
|
{
|
|
309
310
|
style: {
|
|
@@ -49,12 +49,16 @@
|
|
|
49
49
|
overflow: hidden;
|
|
50
50
|
|
|
51
51
|
.pisell-client-card__name {
|
|
52
|
-
flex
|
|
52
|
+
flex: 0 1 auto;
|
|
53
53
|
min-width: 0;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
white-space: nowrap;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
.pisell-client-card__tags {
|
|
57
|
-
flex:
|
|
60
|
+
flex: 0 100 auto;
|
|
61
|
+
min-width: 42px;
|
|
58
62
|
overflow: hidden;
|
|
59
63
|
|
|
60
64
|
&--nowrap {
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Capacity: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Capacity;
|
|
@@ -3,5 +3,5 @@ import { SkuStatusOverlayConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const CardMask: ({ props }: {
|
|
5
5
|
props: SkuStatusOverlayConfig;
|
|
6
|
-
}) => string | number | true | React.
|
|
6
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
7
7
|
export default CardMask;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const Countdown: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true | React.
|
|
6
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
7
7
|
export default Countdown;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Duration: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Duration;
|
|
@@ -3,5 +3,5 @@ import { ProductCardConfig } from '../../type';
|
|
|
3
3
|
import './index.less';
|
|
4
4
|
declare const MemberPrice: ({ props }: {
|
|
5
5
|
props: ProductCardConfig;
|
|
6
|
-
}) => string | number | true | React.
|
|
6
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
7
7
|
export default MemberPrice;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Resource: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Resource;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Stock: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Stock;
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { ProductCardConfig } from '../../type';
|
|
3
3
|
declare const Time: ({ props }: {
|
|
4
4
|
props: ProductCardConfig;
|
|
5
|
-
}) => string | number | true | React.
|
|
5
|
+
}) => string | number | true | Iterable<React.ReactNode> | React.JSX.Element | null;
|
|
6
6
|
export default Time;
|
|
@@ -55,15 +55,21 @@ var { Text } = import_antd.Typography;
|
|
|
55
55
|
var PassDetail = (props) => {
|
|
56
56
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
57
57
|
const { symbol = "$" } = (0, import_materials.usePisellConfig)();
|
|
58
|
-
const {
|
|
58
|
+
const {
|
|
59
|
+
dataSource,
|
|
60
|
+
platform = "pc",
|
|
61
|
+
showTimeLine = true,
|
|
62
|
+
onListRefresh
|
|
63
|
+
} = props;
|
|
59
64
|
const [activeKey, setActiveKey] = (0, import_react.useState)("detail");
|
|
60
65
|
const [rechargeOpen, setRechargeOpen] = (0, import_react.useState)(false);
|
|
61
66
|
const containerRef = (0, import_react.useRef)(null);
|
|
62
67
|
const isIndicatorVisibleRef = (0, import_react.useRef)(false);
|
|
63
68
|
const context = (0, import_useEngineContext.default)();
|
|
64
|
-
const { store } = (
|
|
69
|
+
const { store, isTerminal, interaction, isApp } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
65
70
|
const { apiPrefix } = ((_b = context.appHelper) == null ? void 0 : _b.constants) || { apiPrefix: "/h5" };
|
|
66
71
|
const timezone = ((_g = (_f = (_e = (_d = (_c = store == null ? void 0 : store.getState) == null ? void 0 : _c.call(store)) == null ? void 0 : _d.global) == null ? void 0 : _e.symbol) == null ? void 0 : _f.shop) == null ? void 0 : _g.timezone) || "Asia/Shanghai";
|
|
72
|
+
const isTerminalEnv = (typeof isTerminal === "function" ? isTerminal() : !!isTerminal) || (isApp == null ? void 0 : isApp());
|
|
67
73
|
import_utils.locales.init(import_locales.default, ((_i = (_h = context == null ? void 0 : context.engine) == null ? void 0 : _h.props) == null ? void 0 : _i.locale) || "en");
|
|
68
74
|
if ((_k = (_j = context.appHelper) == null ? void 0 : _j.utils) == null ? void 0 : _k.request) {
|
|
69
75
|
import_utils4.request.setRequest((_m = (_l = context.appHelper) == null ? void 0 : _l.utils) == null ? void 0 : _m.request);
|
|
@@ -85,10 +91,28 @@ var PassDetail = (props) => {
|
|
|
85
91
|
extension_data = [],
|
|
86
92
|
customer_order_behavior_count = 0
|
|
87
93
|
} = product || {};
|
|
88
|
-
const _getDetail = (0, import_ahooks.useRequest)(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
const _getDetail = (0, import_ahooks.useRequest)(
|
|
95
|
+
() => (0, import_serve.getDetailApi)({
|
|
96
|
+
id,
|
|
97
|
+
apiPrefix,
|
|
98
|
+
order_behavior_count_customer_id: customer_id
|
|
99
|
+
}),
|
|
100
|
+
{
|
|
101
|
+
ready: !!id,
|
|
102
|
+
refreshDeps: [id, customer_id]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
(0, import_react.useEffect)(() => {
|
|
106
|
+
var _a2, _b2;
|
|
107
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.mountFunction) == null ? void 0 : _b2.call(
|
|
108
|
+
_a2,
|
|
109
|
+
"customer",
|
|
110
|
+
"recharge",
|
|
111
|
+
async (strVal) => {
|
|
112
|
+
return onListRefresh == null ? void 0 : onListRefresh();
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}, [id]);
|
|
92
116
|
const scheduleList = (0, import_react.useMemo)(() => {
|
|
93
117
|
return (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [];
|
|
94
118
|
}, [custom_schedule_snapshot]);
|
|
@@ -124,7 +148,10 @@ var PassDetail = (props) => {
|
|
|
124
148
|
}, []);
|
|
125
149
|
const descs = (0, import_react.useMemo)(() => {
|
|
126
150
|
var _a2, _b2, _c2;
|
|
127
|
-
const detail = (0, import_utils3.formatScheduleText)(
|
|
151
|
+
const detail = (0, import_utils3.formatScheduleText)(
|
|
152
|
+
scheduleList,
|
|
153
|
+
(_b2 = (_a2 = context == null ? void 0 : context.engine) == null ? void 0 : _a2.props) == null ? void 0 : _b2.locale
|
|
154
|
+
);
|
|
128
155
|
let expireText = expire_date ? expire_date : import_utils.locales.getText("wallet-pass-gallery.expireDate");
|
|
129
156
|
if (scheduleList.length > 0) {
|
|
130
157
|
let validityTexts = "";
|
|
@@ -190,6 +217,24 @@ var PassDetail = (props) => {
|
|
|
190
217
|
setActiveKey(_key);
|
|
191
218
|
}
|
|
192
219
|
}, []);
|
|
220
|
+
const handleRechargeClick = (0, import_react.useCallback)(() => {
|
|
221
|
+
var _a2, _b2;
|
|
222
|
+
if (isTerminalEnv) {
|
|
223
|
+
const productId = (product == null ? void 0 : product.id) || (dataSource == null ? void 0 : dataSource.product_id) || "";
|
|
224
|
+
(_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b2.call(_a2, {
|
|
225
|
+
module: "customer",
|
|
226
|
+
key: "recharge",
|
|
227
|
+
data: {
|
|
228
|
+
product_id: String(productId || ""),
|
|
229
|
+
card_id: String(id || ""),
|
|
230
|
+
card_code: String(code || ""),
|
|
231
|
+
customer_id: String(customer_id || "")
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
setRechargeOpen(true);
|
|
237
|
+
}, [isTerminalEnv, id, code, customer_id, product, dataSource]);
|
|
193
238
|
if (!dataSource) {
|
|
194
239
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, null);
|
|
195
240
|
}
|
|
@@ -230,7 +275,17 @@ var PassDetail = (props) => {
|
|
|
230
275
|
const renderTimeLine = () => {
|
|
231
276
|
if (tag === "product_discount_card") return null;
|
|
232
277
|
if (!showTimeLine) return null;
|
|
233
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
278
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
279
|
+
import_timelineSection.default,
|
|
280
|
+
{
|
|
281
|
+
code,
|
|
282
|
+
tag,
|
|
283
|
+
timezone,
|
|
284
|
+
apiPrefix,
|
|
285
|
+
isTerminalEnv,
|
|
286
|
+
interaction
|
|
287
|
+
}
|
|
288
|
+
);
|
|
234
289
|
};
|
|
235
290
|
if (!props.dataSource) return null;
|
|
236
291
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -281,7 +336,7 @@ var PassDetail = (props) => {
|
|
|
281
336
|
{
|
|
282
337
|
type: "primary",
|
|
283
338
|
size: "large",
|
|
284
|
-
onClick:
|
|
339
|
+
onClick: handleRechargeClick
|
|
285
340
|
},
|
|
286
341
|
import_utils.locales.getText("wallet-pass-gallery.recharge")
|
|
287
342
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -310,7 +365,7 @@ var PassDetail = (props) => {
|
|
|
310
365
|
{
|
|
311
366
|
appleWalletUrl: (_o = _getDetail.data) == null ? void 0 : _o.apple_wallet_url,
|
|
312
367
|
googleWalletUrl: (_p = _getDetail.data) == null ? void 0 : _p.google_wallet_url,
|
|
313
|
-
onRechargeClick: ((_q = dataSource == null ? void 0 : dataSource.machinecode_config) == null ? void 0 : _q.hide_recharge) === 0 ?
|
|
368
|
+
onRechargeClick: ((_q = dataSource == null ? void 0 : dataSource.machinecode_config) == null ? void 0 : _q.hide_recharge) === 0 ? handleRechargeClick : void 0,
|
|
314
369
|
platform
|
|
315
370
|
}
|
|
316
371
|
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -36,7 +36,9 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_antd = require("antd");
|
|
37
37
|
var import_materials = require("@pisell/materials");
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
39
40
|
var PassList = (props) => {
|
|
41
|
+
var _a;
|
|
40
42
|
const {
|
|
41
43
|
dataSource = [],
|
|
42
44
|
value,
|
|
@@ -47,6 +49,10 @@ var PassList = (props) => {
|
|
|
47
49
|
loading,
|
|
48
50
|
onEditHolder
|
|
49
51
|
} = props;
|
|
52
|
+
const context = (0, import_useEngineContext.default)();
|
|
53
|
+
const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
54
|
+
const { isTerminal, isApp } = utils;
|
|
55
|
+
const isTerminalEnv = (typeof isTerminal === "function" ? isTerminal() : !!isTerminal) || (isApp == null ? void 0 : isApp());
|
|
50
56
|
const _loadMore = /* @__PURE__ */ import_react.default.createElement(
|
|
51
57
|
"div",
|
|
52
58
|
{
|
|
@@ -89,6 +95,7 @@ var PassList = (props) => {
|
|
|
89
95
|
limit_status,
|
|
90
96
|
product_cover = "",
|
|
91
97
|
par_value = "",
|
|
98
|
+
unified_available_status,
|
|
92
99
|
unified_messages = {},
|
|
93
100
|
holder,
|
|
94
101
|
metadata,
|
|
@@ -115,8 +122,8 @@ var PassList = (props) => {
|
|
|
115
122
|
showQrCode: true,
|
|
116
123
|
showBalance: !isDiscountCard,
|
|
117
124
|
cover: product_cover,
|
|
118
|
-
disabled:
|
|
119
|
-
showDisabledReason:
|
|
125
|
+
disabled: unified_available_status === 0,
|
|
126
|
+
showDisabledReason: unified_available_status === 0,
|
|
120
127
|
disabledReason,
|
|
121
128
|
style: { marginBottom: 16, width: "100%" },
|
|
122
129
|
showBalanceSymbol: !["point_card", "good_pass"].includes(tag),
|
|
@@ -130,12 +137,12 @@ var PassList = (props) => {
|
|
|
130
137
|
code: encoded,
|
|
131
138
|
validDate: expire_date,
|
|
132
139
|
holder,
|
|
133
|
-
onSetHolder: () => {
|
|
134
|
-
var
|
|
140
|
+
onSetHolder: isTerminalEnv ? void 0 : () => {
|
|
141
|
+
var _a2;
|
|
135
142
|
onEditHolder == null ? void 0 : onEditHolder({
|
|
136
143
|
wallet_pass_detail_id: id,
|
|
137
144
|
customer_id: holder == null ? void 0 : holder.customer_id,
|
|
138
|
-
form_id: (
|
|
145
|
+
form_id: (_a2 = holder == null ? void 0 : holder.metadata) == null ? void 0 : _a2.custom_id
|
|
139
146
|
});
|
|
140
147
|
}
|
|
141
148
|
}
|
|
@@ -4,6 +4,9 @@ interface TimelineSectionProps {
|
|
|
4
4
|
code: string;
|
|
5
5
|
tag: string;
|
|
6
6
|
timezone: string;
|
|
7
|
+
apiPrefix?: '/shop' | '/h5';
|
|
8
|
+
isTerminalEnv?: boolean;
|
|
9
|
+
interaction?: any;
|
|
7
10
|
}
|
|
8
11
|
declare const TimelineSection: (props: TimelineSectionProps) => React.JSX.Element;
|
|
9
12
|
export default TimelineSection;
|