@pisell/private-materials 3.3.5 → 3.3.6
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/components/voucher/index.js +3 -2
- package/es/components/booking/info/utils.js +1 -1
- package/lib/components/booking/components/voucher/index.js +3 -2
- package/lib/components/booking/info/utils.js +1 -1
- package/package.json +4 -4
- package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +0 -8
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
- package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -77
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Date/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -3
- package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +0 -3
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -3
- package/es/components/appointmentBooking/hooks.d.ts +0 -104
- package/es/components/appointmentBooking/index.d.ts +0 -3
- package/es/components/appointmentBooking/locales.d.ts +0 -345
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -5
- package/es/components/booking/utils.d.ts +0 -172
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +0 -8
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -77
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -3
- package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +0 -3
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -3
- package/lib/components/appointmentBooking/hooks.d.ts +0 -104
- package/lib/components/appointmentBooking/index.d.ts +0 -3
- package/lib/components/appointmentBooking/locales.d.ts +0 -345
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -5
- package/lib/components/booking/utils.d.ts +0 -172
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
|
|
3
|
-
declare class Request {
|
|
4
|
-
private request;
|
|
5
|
-
constructor();
|
|
6
|
-
setRequest(val: any): void;
|
|
7
|
-
getRequest(): {
|
|
8
|
-
get: RType;
|
|
9
|
-
post: RType;
|
|
10
|
-
put: RType;
|
|
11
|
-
remove: RType;
|
|
12
|
-
custom: RType;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare const request: Request;
|
|
16
|
-
/**
|
|
17
|
-
* @title: 格式化持续时长用于展示
|
|
18
|
-
* @description:
|
|
19
|
-
* @param {number} service_times
|
|
20
|
-
* @return {*}
|
|
21
|
-
* @Author: zhiwei.Wang
|
|
22
|
-
* @Date: 2024-04-26 14:00
|
|
23
|
-
*/
|
|
24
|
-
export declare const getDiscountTime: (service_times: number, isDay?: boolean) => string;
|
|
25
|
-
/**
|
|
26
|
-
* @title: 时间切片
|
|
27
|
-
* @description:
|
|
28
|
-
* @param {any} config
|
|
29
|
-
* @param {string} locale
|
|
30
|
-
* @return {*}
|
|
31
|
-
* @Author: zhiwei.Wang
|
|
32
|
-
* @Date: 2024-04-26 13:59
|
|
33
|
-
*/
|
|
34
|
-
export declare const sliceDayIntoFiveMinutes: (config: any, locale: string, isDay?: boolean) => {
|
|
35
|
-
timeSlices: {
|
|
36
|
-
label: string;
|
|
37
|
-
value: string;
|
|
38
|
-
}[];
|
|
39
|
-
durationSlicesBasedOnTime: {
|
|
40
|
-
label: string;
|
|
41
|
-
value: number;
|
|
42
|
-
}[];
|
|
43
|
-
};
|
|
44
|
-
export declare const getNowTime: () => string;
|
|
45
|
-
export declare const isNowTime: (time: string) => boolean;
|
|
46
|
-
/**
|
|
47
|
-
* @title: 获取服务的开始时间, 如果是now 转换为当前的时间
|
|
48
|
-
* @description:
|
|
49
|
-
* @param {string} start_time
|
|
50
|
-
* @return {*}
|
|
51
|
-
* @Author: zhiwei.Wang
|
|
52
|
-
* @Date: 2024-04-26 14:03
|
|
53
|
-
*/
|
|
54
|
-
export declare const getServeStartTime: (start_time: string) => string;
|
|
55
|
-
/**
|
|
56
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
57
|
-
* @description:
|
|
58
|
-
* @param {any} item
|
|
59
|
-
* @param {any} currentDate
|
|
60
|
-
* @return {*}
|
|
61
|
-
* @Author: zhiwei.Wang
|
|
62
|
-
* @Date: 2024-04-26 14:04
|
|
63
|
-
*/
|
|
64
|
-
export declare const getServiceTime: (item: any, currentDate: any) => string;
|
|
65
|
-
export declare const findNextSlice: ({ timeSlices, index, date, }: {
|
|
66
|
-
timeSlices: any[];
|
|
67
|
-
index?: number | undefined;
|
|
68
|
-
date?: string | undefined;
|
|
69
|
-
}) => any;
|
|
70
|
-
export declare const findNextDuration: (current: any, array: any, defaultValue?: any) => any;
|
|
71
|
-
export declare const formatProductListByCategory: (list: any, filterItem: any) => unknown[];
|
|
72
|
-
export declare const getResourceTimeIsUsable: (item: any, cacheItem: any) => any;
|
|
73
|
-
/**
|
|
74
|
-
* @title: 查找是否有可用的time
|
|
75
|
-
* @description:
|
|
76
|
-
* @param {any} resourceItem
|
|
77
|
-
* @return {*}
|
|
78
|
-
* @Author: zhiwei.Wang
|
|
79
|
-
* @Date: 2024-01-09 13:57
|
|
80
|
-
*/
|
|
81
|
-
export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
|
|
82
|
-
/**
|
|
83
|
-
* @title: 获取店铺的营业结束时间
|
|
84
|
-
* @description:
|
|
85
|
-
* @return {*}
|
|
86
|
-
* @Author: zhiwei.Wang
|
|
87
|
-
* @Date: 2024-02-23 10:00
|
|
88
|
-
*/
|
|
89
|
-
export declare const getShopOpeningHours: () => string;
|
|
90
|
-
/**
|
|
91
|
-
* @title: 对灵活时长进行处理
|
|
92
|
-
* @description:
|
|
93
|
-
* @return {*}
|
|
94
|
-
* @Author: zhiwei.Wang
|
|
95
|
-
* @Date: 2024-02-23 10:00
|
|
96
|
-
*/
|
|
97
|
-
export declare const flexibleObj: {
|
|
98
|
-
create: (num: number) => any;
|
|
99
|
-
getValue: (str: string | number) => number;
|
|
100
|
-
isFlexible: (str: string | number) => boolean;
|
|
101
|
-
add: (current: number | string, duration: number) => any;
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* @title: 获取结束时间
|
|
105
|
-
* @description: 取 endDate | 店铺营业时间 最小的那一个
|
|
106
|
-
* @param {any} startDate
|
|
107
|
-
* @param {string} duration
|
|
108
|
-
* @param {any} endDate
|
|
109
|
-
* @return {*}
|
|
110
|
-
* @Author: zhiwei.Wang
|
|
111
|
-
* @Date: 2024-02-23 10:01
|
|
112
|
-
*/
|
|
113
|
-
export declare const getEndDate: (startDate: any, duration: string | number, endDate: any) => any;
|
|
114
|
-
export declare const getServiceTimes: (service: any) => {
|
|
115
|
-
startDate: dayjs.Dayjs;
|
|
116
|
-
endDate: dayjs.Dayjs;
|
|
117
|
-
};
|
|
118
|
-
export declare const getErrorList: (resource: any, cacheItem: any, isDay?: boolean) => {
|
|
119
|
-
label: any;
|
|
120
|
-
type: string;
|
|
121
|
-
}[];
|
|
122
|
-
/**
|
|
123
|
-
* @title: 格式化资源, 添加自定义参数
|
|
124
|
-
* @description:
|
|
125
|
-
* @param {any} resourceItem
|
|
126
|
-
* @return {*}
|
|
127
|
-
* @Author: zhiwei.Wang
|
|
128
|
-
* @Date: 2024-01-09 13:40
|
|
129
|
-
*/
|
|
130
|
-
export declare const formatResource: (resourceItem: any, cacheItem?: any, formatLabel?: any) => any;
|
|
131
|
-
export declare const getLastServer: (list: any) => any;
|
|
132
|
-
export declare const getCacheParams: () => any;
|
|
133
|
-
export declare const deleteCacheParams: () => void;
|
|
134
|
-
/**
|
|
135
|
-
* @title: 获取跨日预约的时长
|
|
136
|
-
* @description:
|
|
137
|
-
* @param {any} cacheItem
|
|
138
|
-
* @return {*}
|
|
139
|
-
* @Author: WangHan
|
|
140
|
-
* @Date: 2024-12-01 22:43
|
|
141
|
-
*/
|
|
142
|
-
export declare const getDays: (cacheItem: any, type: 'minutes' | 'days') => any;
|
|
143
|
-
export declare const isSessionProduct: (cacheItem: any) => boolean;
|
|
144
|
-
/**
|
|
145
|
-
* @title: 创建一个服务商品
|
|
146
|
-
* @description:
|
|
147
|
-
* @param {any} state
|
|
148
|
-
* @param {any} item
|
|
149
|
-
* @return {*}
|
|
150
|
-
* @Author: zhiwei.Wang
|
|
151
|
-
* @Date: 2024-01-26 14:09
|
|
152
|
-
*/
|
|
153
|
-
export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
|
|
154
|
-
export declare const getProductTotalPrice: (item: any) => number;
|
|
155
|
-
/**
|
|
156
|
-
* @title: 判断 duration
|
|
157
|
-
* @description: 用于处理不同格式的duration
|
|
158
|
-
* @param {number} duration
|
|
159
|
-
* @return {*}
|
|
160
|
-
* @Author: zhiwei.Wang
|
|
161
|
-
* @Date: 2024-02-23 10:02
|
|
162
|
-
*/
|
|
163
|
-
export declare const getDuration: (duration: number | {
|
|
164
|
-
type: string;
|
|
165
|
-
value: number;
|
|
166
|
-
}) => number | "flexible" | {
|
|
167
|
-
type: string;
|
|
168
|
-
value: number;
|
|
169
|
-
};
|
|
170
|
-
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
171
|
-
export declare const getIsEdit: (state: any) => boolean;
|
|
172
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IWalletListItemProps } from '../serve';
|
|
3
|
-
export interface WalletCardProps {
|
|
4
|
-
item: IWalletListItemProps;
|
|
5
|
-
currentId?: string | number;
|
|
6
|
-
isDiscountCard?: boolean;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
balanceTitle?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: React.NamedExoticComponent<WalletCardProps>;
|
|
11
|
-
export default _default;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { locales } from '@pisell/utils';
|
|
2
|
-
interface CheckLoginParams {
|
|
3
|
-
isLogin: boolean;
|
|
4
|
-
openLoginModal: (params: {
|
|
5
|
-
callback: (status: string) => void;
|
|
6
|
-
}) => void;
|
|
7
|
-
isFormSubject: boolean;
|
|
8
|
-
utils: any;
|
|
9
|
-
accountLists: any[];
|
|
10
|
-
appointmentBooking: any;
|
|
11
|
-
getHolders: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const checkLogin: ({ isLogin, openLoginModal, isFormSubject, utils, accountLists, appointmentBooking, getHolders, }: CheckLoginParams) => Promise<boolean>;
|
|
14
|
-
interface CheckHolderParams {
|
|
15
|
-
isFormSubject: boolean;
|
|
16
|
-
checkAccount: (type: string) => boolean;
|
|
17
|
-
carts: any[];
|
|
18
|
-
}
|
|
19
|
-
export declare const checkHolder: ({ isFormSubject, checkAccount, carts }: CheckHolderParams) => false | any[];
|
|
20
|
-
interface CheckResourceParams {
|
|
21
|
-
carts: any[];
|
|
22
|
-
resources: any[];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @title: 检测资源数据
|
|
26
|
-
* @description:
|
|
27
|
-
* @param {CheckResourceParams} param1
|
|
28
|
-
* @return {*}
|
|
29
|
-
* @Author: WangHan
|
|
30
|
-
* @Date: 2025-04-29 18:02
|
|
31
|
-
*/
|
|
32
|
-
export declare const checkResource: ({ carts, resources }: CheckResourceParams) => false | any[];
|
|
33
|
-
interface CheckResourceParams {
|
|
34
|
-
carts: any[];
|
|
35
|
-
}
|
|
36
|
-
interface HandleFormStepParams {
|
|
37
|
-
newCarts: any[];
|
|
38
|
-
addStep: (params: {
|
|
39
|
-
index: number;
|
|
40
|
-
key: string;
|
|
41
|
-
description: string;
|
|
42
|
-
}) => void;
|
|
43
|
-
removeStep: (key: string) => void;
|
|
44
|
-
setResourceOtherParams: (params: any) => void;
|
|
45
|
-
resourceOtherParams: any;
|
|
46
|
-
index: number;
|
|
47
|
-
locales: typeof locales;
|
|
48
|
-
}
|
|
49
|
-
export declare const handleFormStep: ({ newCarts, addStep, removeStep, setResourceOtherParams, resourceOtherParams, index, locales, }: HandleFormStepParams) => void;
|
|
50
|
-
/**
|
|
51
|
-
* 滚动到第一个错误卡片
|
|
52
|
-
* @param {string} selector - 错误卡片的 class 选择器
|
|
53
|
-
*/
|
|
54
|
-
export declare const scrollToFirstErrorCard: (selector?: string) => void;
|
|
55
|
-
export declare type StepKey = 'select-resource' | 'fill-form' | 'select-time' | 'confirm-information' | 'select-service' | 'select-date' | 'select-guest';
|
|
56
|
-
interface HandleResourceParams {
|
|
57
|
-
handleCheckResource: () => boolean;
|
|
58
|
-
newCarts: any[];
|
|
59
|
-
locales: typeof locales;
|
|
60
|
-
addStep: (params: {
|
|
61
|
-
index: number;
|
|
62
|
-
key: string;
|
|
63
|
-
description: string;
|
|
64
|
-
}, key?: StepKey) => void;
|
|
65
|
-
removeStep: (key: string) => void;
|
|
66
|
-
setResourceOtherParams: (params: any) => void;
|
|
67
|
-
resourceOtherParams: any;
|
|
68
|
-
currentStep: any;
|
|
69
|
-
getResourceTimeSlot: () => void;
|
|
70
|
-
appointmentBooking: any;
|
|
71
|
-
onIsErrorResource?: (isError: boolean) => void;
|
|
72
|
-
stepList: any[];
|
|
73
|
-
}
|
|
74
|
-
export declare const handleResource: ({ handleCheckResource, newCarts, addStep, removeStep, setResourceOtherParams, resourceOtherParams, currentStep, getResourceTimeSlot, appointmentBooking, onIsErrorResource, stepList }: HandleResourceParams) => Promise<void>;
|
|
75
|
-
export declare const stepHandlers: Record<StepKey, (params: any) => Promise<any>>;
|
|
76
|
-
export declare const handleContinueStep: (key: StepKey, params: any) => Promise<any>;
|
|
77
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export declare const useAppointmentBooking: () => any;
|
|
2
|
-
export declare const useShopDiscount: () => any;
|
|
3
|
-
export declare const contextUtils: () => any;
|
|
4
|
-
/**
|
|
5
|
-
* @title: 监听步骤发生变化
|
|
6
|
-
* @description:
|
|
7
|
-
* @return {*}
|
|
8
|
-
* @Author: WangHan
|
|
9
|
-
* @Date: 2025-04-15 11:11
|
|
10
|
-
*/
|
|
11
|
-
export declare const useAppointmentBookingStep: () => {
|
|
12
|
-
getStepIndex: (type: string, skipNumber?: number) => any;
|
|
13
|
-
stepList: any;
|
|
14
|
-
removeStep: (key: string) => any;
|
|
15
|
-
addStep: (props: any, stepKey?: string) => any;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @title: 获取商品数据
|
|
19
|
-
* @description:
|
|
20
|
-
* @return {*}
|
|
21
|
-
* @Author: WangHan
|
|
22
|
-
* @Date: 2025-04-15 11:12
|
|
23
|
-
*/
|
|
24
|
-
export declare const useAppointmentBookingProduct: () => {
|
|
25
|
-
checkProductType: (productId: number) => Promise<any>;
|
|
26
|
-
getProducts: () => Promise<any>;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* @title: 更新购物车数据
|
|
30
|
-
* @description:
|
|
31
|
-
* @return {*}
|
|
32
|
-
* @Author: WangHan
|
|
33
|
-
* @Date: 2025-04-15 11:12
|
|
34
|
-
*/
|
|
35
|
-
export declare const useAppointmentBookingCart: () => void;
|
|
36
|
-
/**
|
|
37
|
-
* @title: 获取登录状态
|
|
38
|
-
* @description:
|
|
39
|
-
* @return {*}
|
|
40
|
-
* @Author: WangHan
|
|
41
|
-
* @Date: 2025-04-15 11:14
|
|
42
|
-
*/
|
|
43
|
-
export declare const useAppointmentBookingLogin: () => {
|
|
44
|
-
isLogin: boolean;
|
|
45
|
-
openLoginModal: (params: {
|
|
46
|
-
callback: any;
|
|
47
|
-
}) => void;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @title: 获取账户
|
|
51
|
-
* @description:
|
|
52
|
-
* @return {*}
|
|
53
|
-
* @Author: WangHan
|
|
54
|
-
* @Date: 2025-04-15 11:15
|
|
55
|
-
*/
|
|
56
|
-
export declare const useAppointmentBookingAccount: () => {
|
|
57
|
-
accountLists: any;
|
|
58
|
-
getHolders: () => Promise<any>;
|
|
59
|
-
form_id: any;
|
|
60
|
-
addAccount: (val: any, type?: string) => Promise<any>;
|
|
61
|
-
checkAccount: (type: any) => any;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* @title: 获取资源数据
|
|
65
|
-
* @description:
|
|
66
|
-
* @return {*}
|
|
67
|
-
* @Author: WangHan
|
|
68
|
-
* @Date: 2025-04-15 11:29
|
|
69
|
-
*/
|
|
70
|
-
export declare const useAppointmentBookingResource: () => {
|
|
71
|
-
getResourceTimeSlot: (index?: number) => Promise<void>;
|
|
72
|
-
getResourceList: () => {
|
|
73
|
-
resources: any;
|
|
74
|
-
resourceCodes: any;
|
|
75
|
-
};
|
|
76
|
-
autoSelectAllProductResources: (index?: number) => Promise<any>;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* @title: 是否跳过资源选择步骤
|
|
80
|
-
* @description:
|
|
81
|
-
* @return {*}
|
|
82
|
-
* @Author: WangHan
|
|
83
|
-
* @Date: 2025-04-21 11:47
|
|
84
|
-
*/
|
|
85
|
-
export declare const useIsSkipResourceStep: () => {
|
|
86
|
-
checkSkipResourceStep: () => Promise<boolean>;
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* @title: 获取预约配置
|
|
90
|
-
* @description:
|
|
91
|
-
* @return {*}
|
|
92
|
-
* @Author: WangHan
|
|
93
|
-
* @Date: 2025-04-24 18:15
|
|
94
|
-
*/
|
|
95
|
-
export declare const useAppointmentBookingSetting: () => {
|
|
96
|
-
isDateSelectedFirst: boolean;
|
|
97
|
-
isFormSubject: boolean;
|
|
98
|
-
customPageId: any;
|
|
99
|
-
getLoadAllSchedule: () => void;
|
|
100
|
-
bookingSubject: any;
|
|
101
|
-
setOtherData: (key: string, val: any) => any;
|
|
102
|
-
getOtherData: (key: string) => any;
|
|
103
|
-
formName: any;
|
|
104
|
-
};
|