@pisell/private-materials 6.8.31 → 6.8.33
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/info2/service/editService/index.d.ts +8 -0
- package/es/components/checkout/plugin.d.ts +2 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +31 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.d.ts +15 -0
- package/es/components/ticketBooking/utils/index.d.ts +101 -0
- package/es/components/ticketBooking/utils/index.js +5 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/index.d.ts +8 -0
- package/lib/components/checkout/plugin.d.ts +2 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +31 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.d.ts +15 -0
- package/lib/components/ticketBooking/utils/index.d.ts +101 -0
- package/lib/components/ticketBooking/utils/index.js +4 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +0 -1
- package/package.json +3 -3
- package/es/components/booking/components/footer/index.d.ts +0 -12
- package/es/components/kioskSkuDetail/index.d.ts +0 -36
- package/lib/components/booking/components/footer/index.d.ts +0 -12
- package/lib/components/kioskSkuDetail/index.d.ts +0 -36
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface EditServiceRef {
|
|
5
|
+
init: (cacheItem?: any) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
8
|
+
export default _default;
|
package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProductDisplayConfig } from './types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface ProductDisplayAdapterProps {
|
|
5
|
+
/** 展示配置 */
|
|
6
|
+
config: ProductDisplayConfig;
|
|
7
|
+
/** 数据源 */
|
|
8
|
+
dataSource: any[];
|
|
9
|
+
/** 加载状态 */
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
/** 当前选中的产品ID */
|
|
12
|
+
currentProductId?: number;
|
|
13
|
+
/** 选择产品回调 */
|
|
14
|
+
onSelectProduct: (item: any, type?: 'select' | 'detail') => void;
|
|
15
|
+
/** 空状态描述 */
|
|
16
|
+
emptyDescription?: string;
|
|
17
|
+
/** 自定义样式 */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** 自定义类名 */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 产品展示适配器组件
|
|
24
|
+
* 统一管理 ProductSelect 和 SkuList 两种展示模式
|
|
25
|
+
*/
|
|
26
|
+
declare const ProductDisplayAdapter: React.FC<ProductDisplayAdapterProps>;
|
|
27
|
+
export default ProductDisplayAdapter;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface AddServiceProps {
|
|
4
|
+
onEdit?: any;
|
|
5
|
+
dispatch?: any;
|
|
6
|
+
state?: any;
|
|
7
|
+
renderMode?: 'current' | 'drawer';
|
|
8
|
+
onPrerenderComplete?: () => void;
|
|
9
|
+
onGetProductsReady?: (getProducts: any) => void;
|
|
10
|
+
/**
|
|
11
|
+
* 产品展示配置
|
|
12
|
+
*
|
|
13
|
+
* 支持两种方式:
|
|
14
|
+
* 1. 简易模式:传入预设字符串,如 'product-select', 'sku-list-a1', 'sku-list-a2', 'sku-list-a5'
|
|
15
|
+
* 2. 完整配置模式:传入完整的配置对象
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // 简易模式
|
|
19
|
+
* <AddService productDisplayConfig="sku-list-a1" />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // 完整配置模式
|
|
23
|
+
* <AddService productDisplayConfig={{
|
|
24
|
+
* displayMode: 'sku-list',
|
|
25
|
+
* skuListConfig: { ... }
|
|
26
|
+
* }} />
|
|
27
|
+
*/
|
|
28
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
29
|
+
}
|
|
30
|
+
declare const AddSerivce: (props: AddServiceProps) => JSX.Element | null;
|
|
31
|
+
export default AddSerivce;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface TicketBookingProps {
|
|
4
|
+
productExtensionType: string[];
|
|
5
|
+
bookingConfigParams: Record<string, any>;
|
|
6
|
+
isShowMenuBar?: boolean;
|
|
7
|
+
onPrerenderComplete?: () => void;
|
|
8
|
+
isShowTimeBar?: boolean;
|
|
9
|
+
isShowFloatButtons?: boolean;
|
|
10
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
rulesHooks?: any;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: (props: TicketBookingProps) => JSX.Element;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
/** dayjs对象格式化为字符串时间 */
|
|
3
|
+
export declare const formatDateToStr: (date: Dayjs[]) => string | string[];
|
|
4
|
+
export declare const getDefaultStartParam: () => string | string[];
|
|
5
|
+
export declare const formatBookingList: (bookingList: any[]) => any[];
|
|
6
|
+
export declare const getNextTimeSlice: (sliceMinutes: number) => Dayjs;
|
|
7
|
+
export declare const getDisabledEdit: ({ shop_discount, bookings, payment_status }: any) => boolean;
|
|
8
|
+
export declare const formatOptions: (detail: any) => any;
|
|
9
|
+
export declare const formatHolder: (detail: any) => any;
|
|
10
|
+
export declare const restoreProductOtherData: (data: any) => {
|
|
11
|
+
product_id: any;
|
|
12
|
+
option: any;
|
|
13
|
+
bundle: any;
|
|
14
|
+
product_variant_id: any;
|
|
15
|
+
quantity: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export declare const isSameProduct: (a: any, b: any) => boolean;
|
|
18
|
+
export declare const addService: (list: any[], addItem: any, state: any, isMultiDay?: boolean) => {
|
|
19
|
+
list: any[];
|
|
20
|
+
count: number;
|
|
21
|
+
quantity?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
list: any[];
|
|
24
|
+
quantity: any;
|
|
25
|
+
count?: undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
28
|
+
export declare const getCartProductOverlay: (state: any) => any;
|
|
29
|
+
export declare const getIsOverlayProduct: (item: any, state: any) => any;
|
|
30
|
+
export declare const getIsShowNumber: (item: any, state: any) => any;
|
|
31
|
+
export declare const genServiceKey: (item: any) => string;
|
|
32
|
+
export declare const genHolderKey: (item: any) => string;
|
|
33
|
+
export declare const getIsParallelResourcesBooking: (record: any) => boolean;
|
|
34
|
+
declare type ScanData = {
|
|
35
|
+
type: string;
|
|
36
|
+
status: 'success' | 'failed';
|
|
37
|
+
scanType: 'nfc' | 'scanner';
|
|
38
|
+
scanCode: string;
|
|
39
|
+
result: {
|
|
40
|
+
searchType: 'customer' | 'wallet' | 'walletPass' | 'product' | 'local_product';
|
|
41
|
+
response: {
|
|
42
|
+
status: boolean;
|
|
43
|
+
code: number;
|
|
44
|
+
message: string;
|
|
45
|
+
data: any;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
+
searchType: "customer" | "wallet" | "walletPass" | "product" | "local_product";
|
|
51
|
+
data: any;
|
|
52
|
+
scanCode: string;
|
|
53
|
+
} | null;
|
|
54
|
+
export declare const formatScanGlobal: (data: ScanData) => {
|
|
55
|
+
searchType: "wallet";
|
|
56
|
+
data: any;
|
|
57
|
+
scanCode: string;
|
|
58
|
+
} | {
|
|
59
|
+
searchType: "walletPass";
|
|
60
|
+
data: any;
|
|
61
|
+
scanCode: string;
|
|
62
|
+
} | {
|
|
63
|
+
searchType: "product" | "local_product";
|
|
64
|
+
data: any;
|
|
65
|
+
scanCode: string;
|
|
66
|
+
} | null | undefined;
|
|
67
|
+
export declare const createSimpleCacheItem: (item: any, e: any, state: any) => any;
|
|
68
|
+
export declare const getBookingTicketKey: (osKey: string) => string;
|
|
69
|
+
export declare const getShopDiscountKey: (osKey: string) => string;
|
|
70
|
+
export declare const rulesHooks: {
|
|
71
|
+
getProduct(product: Record<string, any>): {
|
|
72
|
+
booking_id: any;
|
|
73
|
+
id: any;
|
|
74
|
+
_id: any;
|
|
75
|
+
price: any;
|
|
76
|
+
total: any;
|
|
77
|
+
discount_list: any;
|
|
78
|
+
origin_total: any;
|
|
79
|
+
num: any;
|
|
80
|
+
quantity: any;
|
|
81
|
+
vouchersApplicable: any;
|
|
82
|
+
holder_id: any;
|
|
83
|
+
isNormalProduct: any;
|
|
84
|
+
startDate: any;
|
|
85
|
+
bundle: any;
|
|
86
|
+
options: any;
|
|
87
|
+
};
|
|
88
|
+
setProduct(product: Record<string, any>, values: {
|
|
89
|
+
total: number;
|
|
90
|
+
discount_list: any[];
|
|
91
|
+
price: number;
|
|
92
|
+
quantity: number;
|
|
93
|
+
_id?: string;
|
|
94
|
+
}): {
|
|
95
|
+
_id: any;
|
|
96
|
+
discount_list: any[];
|
|
97
|
+
_extend: any;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export { getCache, setCache, clearCache, clearAllCache, clearAllCacheByOsKey, getProductCache, setProductCache, clearProductCache, clearAllProductCache, getBoardConfigCache, setBoardConfigCache, clearBoardConfigCache, } from './productCache';
|
|
101
|
+
export type { CacheType } from './productCache';
|
|
@@ -106,6 +106,8 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
|
106
106
|
product_id: detail.product_id,
|
|
107
107
|
option: formatOptions(detail),
|
|
108
108
|
bundle: (detail.product_bundle || []).map(function (bundleItem) {
|
|
109
|
+
var _bundleItem$bundle_se, _bundleItem$bundle_se2;
|
|
110
|
+
var price = (bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.bundle_sum_type) === 'markdown' ? "-".concat(Number(bundleItem.bundle_sum_price)) : Number(bundleItem.bundle_sum_price);
|
|
109
111
|
return _objectSpread(_objectSpread({}, bundleItem), {}, {
|
|
110
112
|
title: bundleItem.bundle_title,
|
|
111
113
|
group_id: bundleItem.bundle_group_id,
|
|
@@ -121,7 +123,9 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
|
121
123
|
product_option_item_id: optionItem.option_group_item_id
|
|
122
124
|
});
|
|
123
125
|
}),
|
|
124
|
-
price:
|
|
126
|
+
price: price,
|
|
127
|
+
original_total: (_bundleItem$bundle_se = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se !== void 0 ? _bundleItem$bundle_se : price,
|
|
128
|
+
original_price: (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : price
|
|
125
129
|
});
|
|
126
130
|
}),
|
|
127
131
|
product_variant_id: detail.product_variant_id || 0,
|
|
@@ -106,7 +106,7 @@ var Price = function Price(_ref) {
|
|
|
106
106
|
}, "(".concat(locales.getText('pisell2.sku-card.gst'), " : "), /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
107
107
|
value: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.tax_fee) || 0,
|
|
108
108
|
isMini: isMiniPrice
|
|
109
|
-
}), ")") : null, isOriginPrice && parseFloat(String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.original_price) || 0)) ? /*#__PURE__*/React.createElement("div", {
|
|
109
|
+
}), ")") : null, isOriginPrice && parseFloat(String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.original_price) || 0)) > 0 && parseFloat(String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.original_price) || 0)) !== parseFloat(String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.price) || 0)) ? /*#__PURE__*/React.createElement("div", {
|
|
110
110
|
className: "".concat(PREFIX, "__card-original-price"),
|
|
111
111
|
style: {
|
|
112
112
|
fontSize: originPriceFontSize,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface EditServiceRef {
|
|
5
|
+
init: (cacheItem?: any) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
|
|
8
|
+
export default _default;
|
package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProductDisplayConfig } from './types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface ProductDisplayAdapterProps {
|
|
5
|
+
/** 展示配置 */
|
|
6
|
+
config: ProductDisplayConfig;
|
|
7
|
+
/** 数据源 */
|
|
8
|
+
dataSource: any[];
|
|
9
|
+
/** 加载状态 */
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
/** 当前选中的产品ID */
|
|
12
|
+
currentProductId?: number;
|
|
13
|
+
/** 选择产品回调 */
|
|
14
|
+
onSelectProduct: (item: any, type?: 'select' | 'detail') => void;
|
|
15
|
+
/** 空状态描述 */
|
|
16
|
+
emptyDescription?: string;
|
|
17
|
+
/** 自定义样式 */
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** 自定义类名 */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 产品展示适配器组件
|
|
24
|
+
* 统一管理 ProductSelect 和 SkuList 两种展示模式
|
|
25
|
+
*/
|
|
26
|
+
declare const ProductDisplayAdapter: React.FC<ProductDisplayAdapterProps>;
|
|
27
|
+
export default ProductDisplayAdapter;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface AddServiceProps {
|
|
4
|
+
onEdit?: any;
|
|
5
|
+
dispatch?: any;
|
|
6
|
+
state?: any;
|
|
7
|
+
renderMode?: 'current' | 'drawer';
|
|
8
|
+
onPrerenderComplete?: () => void;
|
|
9
|
+
onGetProductsReady?: (getProducts: any) => void;
|
|
10
|
+
/**
|
|
11
|
+
* 产品展示配置
|
|
12
|
+
*
|
|
13
|
+
* 支持两种方式:
|
|
14
|
+
* 1. 简易模式:传入预设字符串,如 'product-select', 'sku-list-a1', 'sku-list-a2', 'sku-list-a5'
|
|
15
|
+
* 2. 完整配置模式:传入完整的配置对象
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // 简易模式
|
|
19
|
+
* <AddService productDisplayConfig="sku-list-a1" />
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // 完整配置模式
|
|
23
|
+
* <AddService productDisplayConfig={{
|
|
24
|
+
* displayMode: 'sku-list',
|
|
25
|
+
* skuListConfig: { ... }
|
|
26
|
+
* }} />
|
|
27
|
+
*/
|
|
28
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
29
|
+
}
|
|
30
|
+
declare const AddSerivce: (props: AddServiceProps) => JSX.Element | null;
|
|
31
|
+
export default AddSerivce;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface TicketBookingProps {
|
|
4
|
+
productExtensionType: string[];
|
|
5
|
+
bookingConfigParams: Record<string, any>;
|
|
6
|
+
isShowMenuBar?: boolean;
|
|
7
|
+
onPrerenderComplete?: () => void;
|
|
8
|
+
isShowTimeBar?: boolean;
|
|
9
|
+
isShowFloatButtons?: boolean;
|
|
10
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
rulesHooks?: any;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: (props: TicketBookingProps) => JSX.Element;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
/** dayjs对象格式化为字符串时间 */
|
|
3
|
+
export declare const formatDateToStr: (date: Dayjs[]) => string | string[];
|
|
4
|
+
export declare const getDefaultStartParam: () => string | string[];
|
|
5
|
+
export declare const formatBookingList: (bookingList: any[]) => any[];
|
|
6
|
+
export declare const getNextTimeSlice: (sliceMinutes: number) => Dayjs;
|
|
7
|
+
export declare const getDisabledEdit: ({ shop_discount, bookings, payment_status }: any) => boolean;
|
|
8
|
+
export declare const formatOptions: (detail: any) => any;
|
|
9
|
+
export declare const formatHolder: (detail: any) => any;
|
|
10
|
+
export declare const restoreProductOtherData: (data: any) => {
|
|
11
|
+
product_id: any;
|
|
12
|
+
option: any;
|
|
13
|
+
bundle: any;
|
|
14
|
+
product_variant_id: any;
|
|
15
|
+
quantity: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
export declare const isSameProduct: (a: any, b: any) => boolean;
|
|
18
|
+
export declare const addService: (list: any[], addItem: any, state: any, isMultiDay?: boolean) => {
|
|
19
|
+
list: any[];
|
|
20
|
+
count: number;
|
|
21
|
+
quantity?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
list: any[];
|
|
24
|
+
quantity: any;
|
|
25
|
+
count?: undefined;
|
|
26
|
+
};
|
|
27
|
+
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
28
|
+
export declare const getCartProductOverlay: (state: any) => any;
|
|
29
|
+
export declare const getIsOverlayProduct: (item: any, state: any) => any;
|
|
30
|
+
export declare const getIsShowNumber: (item: any, state: any) => any;
|
|
31
|
+
export declare const genServiceKey: (item: any) => string;
|
|
32
|
+
export declare const genHolderKey: (item: any) => string;
|
|
33
|
+
export declare const getIsParallelResourcesBooking: (record: any) => boolean;
|
|
34
|
+
declare type ScanData = {
|
|
35
|
+
type: string;
|
|
36
|
+
status: 'success' | 'failed';
|
|
37
|
+
scanType: 'nfc' | 'scanner';
|
|
38
|
+
scanCode: string;
|
|
39
|
+
result: {
|
|
40
|
+
searchType: 'customer' | 'wallet' | 'walletPass' | 'product' | 'local_product';
|
|
41
|
+
response: {
|
|
42
|
+
status: boolean;
|
|
43
|
+
code: number;
|
|
44
|
+
message: string;
|
|
45
|
+
data: any;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
+
searchType: "customer" | "wallet" | "walletPass" | "product" | "local_product";
|
|
51
|
+
data: any;
|
|
52
|
+
scanCode: string;
|
|
53
|
+
} | null;
|
|
54
|
+
export declare const formatScanGlobal: (data: ScanData) => {
|
|
55
|
+
searchType: "wallet";
|
|
56
|
+
data: any;
|
|
57
|
+
scanCode: string;
|
|
58
|
+
} | {
|
|
59
|
+
searchType: "walletPass";
|
|
60
|
+
data: any;
|
|
61
|
+
scanCode: string;
|
|
62
|
+
} | {
|
|
63
|
+
searchType: "product" | "local_product";
|
|
64
|
+
data: any;
|
|
65
|
+
scanCode: string;
|
|
66
|
+
} | null | undefined;
|
|
67
|
+
export declare const createSimpleCacheItem: (item: any, e: any, state: any) => any;
|
|
68
|
+
export declare const getBookingTicketKey: (osKey: string) => string;
|
|
69
|
+
export declare const getShopDiscountKey: (osKey: string) => string;
|
|
70
|
+
export declare const rulesHooks: {
|
|
71
|
+
getProduct(product: Record<string, any>): {
|
|
72
|
+
booking_id: any;
|
|
73
|
+
id: any;
|
|
74
|
+
_id: any;
|
|
75
|
+
price: any;
|
|
76
|
+
total: any;
|
|
77
|
+
discount_list: any;
|
|
78
|
+
origin_total: any;
|
|
79
|
+
num: any;
|
|
80
|
+
quantity: any;
|
|
81
|
+
vouchersApplicable: any;
|
|
82
|
+
holder_id: any;
|
|
83
|
+
isNormalProduct: any;
|
|
84
|
+
startDate: any;
|
|
85
|
+
bundle: any;
|
|
86
|
+
options: any;
|
|
87
|
+
};
|
|
88
|
+
setProduct(product: Record<string, any>, values: {
|
|
89
|
+
total: number;
|
|
90
|
+
discount_list: any[];
|
|
91
|
+
price: number;
|
|
92
|
+
quantity: number;
|
|
93
|
+
_id?: string;
|
|
94
|
+
}): {
|
|
95
|
+
_id: any;
|
|
96
|
+
discount_list: any[];
|
|
97
|
+
_extend: any;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
export { getCache, setCache, clearCache, clearAllCache, clearAllCacheByOsKey, getProductCache, setProductCache, clearProductCache, clearAllProductCache, getBoardConfigCache, setBoardConfigCache, clearBoardConfigCache, } from './productCache';
|
|
101
|
+
export type { CacheType } from './productCache';
|
|
@@ -141,6 +141,7 @@ var restoreProductOtherData = (data) => {
|
|
|
141
141
|
product_id: detail.product_id,
|
|
142
142
|
option: formatOptions(detail),
|
|
143
143
|
bundle: (detail.product_bundle || []).map((bundleItem) => {
|
|
144
|
+
const price = (bundleItem == null ? void 0 : bundleItem.bundle_sum_type) === "markdown" ? `-${Number(bundleItem.bundle_sum_price)}` : Number(bundleItem.bundle_sum_price);
|
|
144
145
|
return {
|
|
145
146
|
...bundleItem,
|
|
146
147
|
title: bundleItem.bundle_title,
|
|
@@ -158,7 +159,9 @@ var restoreProductOtherData = (data) => {
|
|
|
158
159
|
product_option_item_id: optionItem.option_group_item_id
|
|
159
160
|
};
|
|
160
161
|
}),
|
|
161
|
-
price
|
|
162
|
+
price,
|
|
163
|
+
original_total: bundleItem.bundle_selling_price ?? price,
|
|
164
|
+
original_price: bundleItem.bundle_selling_price ?? price
|
|
162
165
|
};
|
|
163
166
|
}),
|
|
164
167
|
product_variant_id: detail.product_variant_id || 0,
|
|
@@ -117,7 +117,7 @@ var Price = ({ props }) => {
|
|
|
117
117
|
value: (dataSource == null ? void 0 : dataSource.tax_fee) || 0,
|
|
118
118
|
isMini: isMiniPrice
|
|
119
119
|
}
|
|
120
|
-
), `)`) : null, isOriginPrice && parseFloat(String((dataSource == null ? void 0 : dataSource.original_price) || 0)) ? /* @__PURE__ */ import_react.default.createElement(
|
|
120
|
+
), `)`) : null, isOriginPrice && parseFloat(String((dataSource == null ? void 0 : dataSource.original_price) || 0)) > 0 && parseFloat(String((dataSource == null ? void 0 : dataSource.original_price) || 0)) !== parseFloat(String((dataSource == null ? void 0 : dataSource.price) || 0)) ? /* @__PURE__ */ import_react.default.createElement(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
123
123
|
className: `${import_status.PREFIX}__card-original-price`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.33",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"react-resizable": "^3.0.5",
|
|
78
78
|
"styled-components": "^6.0.0-rc.3",
|
|
79
79
|
"@pisell/date-picker": "3.0.7",
|
|
80
|
-
"@pisell/
|
|
80
|
+
"@pisell/materials": "6.8.7",
|
|
81
81
|
"@pisell/icon": "0.0.11",
|
|
82
|
-
"@pisell/
|
|
82
|
+
"@pisell/utils": "3.0.2"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"react": "^18.0.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './index.less';
|
|
3
|
-
/**
|
|
4
|
-
* @title: 底部
|
|
5
|
-
* @description:
|
|
6
|
-
* @param {any} props
|
|
7
|
-
* @return {*}
|
|
8
|
-
* @Author: zhiwei.Wang
|
|
9
|
-
* @Date: 2024-01-30 16:51
|
|
10
|
-
*/
|
|
11
|
-
declare const Footer: (props: any) => JSX.Element;
|
|
12
|
-
export default Footer;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { SkuValue } from '../../plus/skuOptionsSelection/types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
/**
|
|
5
|
-
* @description Kiosk 商品详情(参考 Figma: Kiosk / Launchpad screen)
|
|
6
|
-
* - 默认从 URL query 读取商品 id(productId / product_id / id),内部通过 getProductDetail 拉取详情
|
|
7
|
-
* - 中间区域用 SKUOptionsSelection 做 SKU 选择
|
|
8
|
-
* - 底部用 PisellNumberSelector 做数量编辑
|
|
9
|
-
*/
|
|
10
|
-
declare function KioskSkuDetail(props: KioskSkuDetailProps): JSX.Element;
|
|
11
|
-
export default KioskSkuDetail;
|
|
12
|
-
export interface KioskSkuDetailProps {
|
|
13
|
-
/** 商品 id(可选:目前默认从 URL 读取,props 仅作为兜底以兼容老用法) */
|
|
14
|
-
productId?: number | string;
|
|
15
|
-
/**
|
|
16
|
-
* 可选:用于商品报价的日期(预约类商品)
|
|
17
|
-
* @deprecated 目前 kiosk 详情暂时固定取当天,这个参数暂不生效
|
|
18
|
-
*/
|
|
19
|
-
scheduleDate?: string;
|
|
20
|
-
/** 自定义类名 */
|
|
21
|
-
className?: string;
|
|
22
|
-
/** 自定义样式 */
|
|
23
|
-
style?: React.CSSProperties;
|
|
24
|
-
/** 返回 */
|
|
25
|
-
onBack?: () => void;
|
|
26
|
-
/** 加入购物车 */
|
|
27
|
-
onAddToCart?: (params: {
|
|
28
|
-
product: any;
|
|
29
|
-
skuValue: SkuValue;
|
|
30
|
-
quantity: number;
|
|
31
|
-
unitPrice: number;
|
|
32
|
-
total: number;
|
|
33
|
-
currencySymbol: string;
|
|
34
|
-
bookingConfig?: any;
|
|
35
|
-
}) => void;
|
|
36
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import './index.less';
|
|
3
|
-
/**
|
|
4
|
-
* @title: 底部
|
|
5
|
-
* @description:
|
|
6
|
-
* @param {any} props
|
|
7
|
-
* @return {*}
|
|
8
|
-
* @Author: zhiwei.Wang
|
|
9
|
-
* @Date: 2024-01-30 16:51
|
|
10
|
-
*/
|
|
11
|
-
declare const Footer: (props: any) => JSX.Element;
|
|
12
|
-
export default Footer;
|