@pisell/materials 6.11.212 → 6.11.214
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.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +5 -5
- package/es/components/PisellTabbar/PisellTabbar.js +35 -8
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +35 -8
- package/es/components/PisellTabbar/types.d.ts +2 -0
- package/es/components/pisellFind/index.d.ts +9 -4
- package/es/components/pisellFind/index.js +46 -13
- package/es/components/pisellLookup/PisellLookup.js +7 -2
- package/es/components/pisellLookup/components/LookupTrigger.js +36 -9
- package/es/components/pisellLookup/types.d.ts +63 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +9 -2
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +33 -9
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +86 -11
- package/es/components/pisellRecordBoard/shellFrame/index.js +1 -0
- package/es/components/pisellRecordBoard/types.d.ts +7 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +5 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -1
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.js +53 -20
- package/es/components/productCard/lineItem/BookingLineItem.js +95 -32
- package/es/components/productCard/lineItem/index.js +9 -1
- package/es/components/productCard/lineItem/index.less +33 -0
- package/es/components/productCard/lineItem/locales.js +20 -5
- package/es/index.d.ts +1 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +16 -4
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +16 -4
- package/lib/components/PisellTabbar/types.d.ts +2 -0
- package/lib/components/pisellFind/index.d.ts +9 -4
- package/lib/components/pisellFind/index.js +29 -10
- package/lib/components/pisellLookup/PisellLookup.js +9 -1
- package/lib/components/pisellLookup/components/LookupTrigger.js +17 -0
- package/lib/components/pisellLookup/types.d.ts +63 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +9 -2
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +21 -6
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +86 -11
- package/lib/components/pisellRecordBoard/shellFrame/index.js +1 -0
- package/lib/components/pisellRecordBoard/types.d.ts +7 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +5 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -1
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.js +37 -20
- package/lib/components/productCard/lineItem/BookingLineItem.js +93 -43
- package/lib/components/productCard/lineItem/index.js +9 -1
- package/lib/components/productCard/lineItem/index.less +33 -0
- package/lib/components/productCard/lineItem/locales.js +20 -5
- package/lib/index.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +0 -30
- package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -137
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +0 -19
- package/es/components/productCard/lineItem/index.d.ts +0 -69
- package/es/components/productCard/lineItem/locales.d.ts +0 -23
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +0 -30
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -137
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +0 -19
- package/lib/components/productCard/lineItem/index.d.ts +0 -69
- package/lib/components/productCard/lineItem/locales.d.ts +0 -23
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Dayjs } from 'dayjs';
|
|
3
|
-
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
-
export interface TimeRangeBlockProps {
|
|
5
|
-
/** 开始时间 */
|
|
6
|
-
start: Dayjs;
|
|
7
|
-
/** 结束时间 */
|
|
8
|
-
end: Dayjs;
|
|
9
|
-
/** 是否同一天 */
|
|
10
|
-
isSameDay: boolean;
|
|
11
|
-
/** 时间格式配置 */
|
|
12
|
-
timeFormat?: TimeFormatConfig;
|
|
13
|
-
/** 日期格式配置(跨天时用于起止日期,含 showRelativeDay) */
|
|
14
|
-
dateFormat?: DateFormatConfig;
|
|
15
|
-
/** 星期格式配置(跨天时用于「Sat, 22 Jan」) */
|
|
16
|
-
weekdayFormat?: WeekdayFormatConfig;
|
|
17
|
-
/** 参考日期,用于相对日判定,默认 dayjs() */
|
|
18
|
-
referenceDate?: Dayjs;
|
|
19
|
-
/** 文本样式 */
|
|
20
|
-
style?: TextStyleConfig;
|
|
21
|
-
/** 自定义类名 */
|
|
22
|
-
className?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 时间区间展示块
|
|
26
|
-
* - 同一天:HH:mm-HH:mm
|
|
27
|
-
* - 跨天:起止完整日期时间;若某端为相对日(今天/昨天/明天)则只显示「时间 相对日」,不显示星期+日期
|
|
28
|
-
*/
|
|
29
|
-
export declare const TimeRangeBlock: React.FC<TimeRangeBlockProps>;
|
|
30
|
-
export default TimeRangeBlock;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { Dayjs } from 'dayjs';
|
|
3
|
-
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign } from '../pisellDateTimeDisplay/types';
|
|
4
|
-
export type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign, };
|
|
5
|
-
/**
|
|
6
|
-
* 字段类型(时间区间、日期、星期、持续时长)
|
|
7
|
-
* - time: 时间区间块(HH:mm-HH:mm 或跨天起止)
|
|
8
|
-
* - date: 日期块
|
|
9
|
-
* - weekday: 星期块
|
|
10
|
-
* - duration: 持续时长块
|
|
11
|
-
*/
|
|
12
|
-
export declare type TimeRangeFieldType = 'time' | 'date' | 'weekday' | 'duration';
|
|
13
|
-
/**
|
|
14
|
-
* 持续时长格式配置
|
|
15
|
-
*/
|
|
16
|
-
export interface DurationFormatConfig {
|
|
17
|
-
/**
|
|
18
|
-
* 是否显示秒
|
|
19
|
-
* @default false
|
|
20
|
-
* @example true -> "2h30m23s" | false -> "2h30m"
|
|
21
|
-
*/
|
|
22
|
-
showSeconds?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 字段配置
|
|
26
|
-
*/
|
|
27
|
-
export interface TimeRangeFieldConfig {
|
|
28
|
-
/**
|
|
29
|
-
* 是否显示时间区间块
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
showTimeRange?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 是否显示日期块
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
|
-
showDate?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 是否显示星期块
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
|
-
showWeekday?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 是否显示持续时长块
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
showDuration?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 字段顺序(四类块可任意排序;默认 时间 日期 星期 持续时长,可实现「持续时间在前」等)
|
|
50
|
-
* @default ['weekday', 'date', 'time', 'duration'] 换行顺序:先持续时间 → 结束时间(跨天)→ 开始/结束时间与日期 → 星期
|
|
51
|
-
*/
|
|
52
|
-
fieldOrder?: TimeRangeFieldType[];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* startAt / endAt 的 dayjs 兼容值
|
|
56
|
-
*/
|
|
57
|
-
export declare type DayjsLike = Dayjs | string | number;
|
|
58
|
-
/**
|
|
59
|
-
* PisellTimeRangeDisplay 组件 Props
|
|
60
|
-
*/
|
|
61
|
-
export interface PisellTimeRangeDisplayProps {
|
|
62
|
-
/**
|
|
63
|
-
* 开始时间(dayjs 兼容值)
|
|
64
|
-
*/
|
|
65
|
-
startAt: DayjsLike;
|
|
66
|
-
/**
|
|
67
|
-
* 结束时间(dayjs 兼容值)
|
|
68
|
-
*/
|
|
69
|
-
endAt: DayjsLike;
|
|
70
|
-
/**
|
|
71
|
-
* 文本对齐方式(单行/多行均生效)
|
|
72
|
-
* @default 'center'
|
|
73
|
-
*/
|
|
74
|
-
textAlign?: TextAlign;
|
|
75
|
-
/**
|
|
76
|
-
* 字段显示与排序配置
|
|
77
|
-
*/
|
|
78
|
-
fields?: TimeRangeFieldConfig;
|
|
79
|
-
/**
|
|
80
|
-
* 同一天时是否显示具体日期
|
|
81
|
-
* @default true
|
|
82
|
-
*/
|
|
83
|
-
showDateForSameDay?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* 时间格式配置(复用 PisellDateTimeDisplay)
|
|
86
|
-
*/
|
|
87
|
-
timeFormat?: TimeFormatConfig;
|
|
88
|
-
/**
|
|
89
|
-
* 日期格式配置(复用 PisellDateTimeDisplay)
|
|
90
|
-
*/
|
|
91
|
-
dateFormat?: DateFormatConfig;
|
|
92
|
-
/**
|
|
93
|
-
* 星期格式配置(复用 PisellDateTimeDisplay)
|
|
94
|
-
*/
|
|
95
|
-
weekdayFormat?: WeekdayFormatConfig;
|
|
96
|
-
/**
|
|
97
|
-
* 持续时长格式配置
|
|
98
|
-
*/
|
|
99
|
-
durationFormat?: DurationFormatConfig;
|
|
100
|
-
/**
|
|
101
|
-
* 容器样式
|
|
102
|
-
*/
|
|
103
|
-
containerStyle?: ContainerStyleConfig;
|
|
104
|
-
/**
|
|
105
|
-
* 时间区间文本样式
|
|
106
|
-
*/
|
|
107
|
-
timeStyle?: TextStyleConfig;
|
|
108
|
-
/**
|
|
109
|
-
* 日期文本样式
|
|
110
|
-
*/
|
|
111
|
-
dateStyle?: TextStyleConfig;
|
|
112
|
-
/**
|
|
113
|
-
* 星期文本样式
|
|
114
|
-
*/
|
|
115
|
-
weekdayStyle?: TextStyleConfig;
|
|
116
|
-
/**
|
|
117
|
-
* 持续时长文本样式
|
|
118
|
-
*/
|
|
119
|
-
durationStyle?: TextStyleConfig;
|
|
120
|
-
/**
|
|
121
|
-
* dayjs locale(语言代码)
|
|
122
|
-
* @default 优先使用全局配置,其次浏览器语言
|
|
123
|
-
*/
|
|
124
|
-
locale?: string;
|
|
125
|
-
/**
|
|
126
|
-
* 自定义类名
|
|
127
|
-
*/
|
|
128
|
-
className?: string;
|
|
129
|
-
/**
|
|
130
|
-
* 自定义样式
|
|
131
|
-
*/
|
|
132
|
-
style?: CSSProperties;
|
|
133
|
-
/**
|
|
134
|
-
* 点击回调
|
|
135
|
-
*/
|
|
136
|
-
onClick?: () => void;
|
|
137
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ProductCardTypes } from '../types';
|
|
2
|
-
import type { LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
3
|
-
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
4
|
-
dataSource: any;
|
|
5
|
-
type: LineItemType;
|
|
6
|
-
cartSkuType: 'a2' | 'a5' | 'a9';
|
|
7
|
-
isShowBookingHeader: boolean;
|
|
8
|
-
relatedProductDataSource?: any;
|
|
9
|
-
rightActions?: any[];
|
|
10
|
-
escapeDom?: string;
|
|
11
|
-
statusOptions?: LineItemStatusOption[];
|
|
12
|
-
statusLoading?: boolean;
|
|
13
|
-
statusDisabled?: boolean;
|
|
14
|
-
isShowRelatedProduct?: boolean;
|
|
15
|
-
holderOptions?: LineItemHolderOption[];
|
|
16
|
-
onBookingStatusChange?: (status: string, item: any) => void;
|
|
17
|
-
}
|
|
18
|
-
declare const BookingLineItem: (props: BookingLineItemProps) => JSX.Element | null;
|
|
19
|
-
export default BookingLineItem;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { ProductCardTypes } from '../types';
|
|
2
|
-
import type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export declare const PREFIX = "pisell-line-item";
|
|
5
|
-
export type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType, } from './types';
|
|
6
|
-
declare type LocalizedText = string | Record<string, unknown> | null | undefined;
|
|
7
|
-
export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
8
|
-
dataSource: any;
|
|
9
|
-
itemType?: itemType;
|
|
10
|
-
type?: LineItemType;
|
|
11
|
-
isShowBookingHeader: boolean;
|
|
12
|
-
rightActions?: any[];
|
|
13
|
-
escapeDom?: string;
|
|
14
|
-
statusOptions?: LineItemStatusOption[];
|
|
15
|
-
statusLoading?: boolean;
|
|
16
|
-
statusDisabled?: boolean;
|
|
17
|
-
isShowRelatedProduct?: boolean;
|
|
18
|
-
holderOptions?: LineItemHolderOption[];
|
|
19
|
-
onBookingStatusChange?: (status: string, item: any) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
|
|
22
|
-
_id: any;
|
|
23
|
-
id: any;
|
|
24
|
-
product_id: any;
|
|
25
|
-
product_variant_id: any;
|
|
26
|
-
title: string;
|
|
27
|
-
product_title: string;
|
|
28
|
-
name: string;
|
|
29
|
-
cover: any;
|
|
30
|
-
image: any;
|
|
31
|
-
num: any;
|
|
32
|
-
quantity: any;
|
|
33
|
-
price: any;
|
|
34
|
-
total: any;
|
|
35
|
-
origin_total: string | number | undefined;
|
|
36
|
-
original_total: string | number | undefined;
|
|
37
|
-
source_product_price: any;
|
|
38
|
-
selling_price: any;
|
|
39
|
-
payment_price: any;
|
|
40
|
-
tax_fee: any;
|
|
41
|
-
symbol: string;
|
|
42
|
-
note: any;
|
|
43
|
-
product_sku: any;
|
|
44
|
-
product_bundle: any;
|
|
45
|
-
bundle: any;
|
|
46
|
-
product_option_string: any;
|
|
47
|
-
options: any[];
|
|
48
|
-
discount_list: any;
|
|
49
|
-
promotions: any;
|
|
50
|
-
discount_reason: any;
|
|
51
|
-
isGift: boolean;
|
|
52
|
-
giftData: any;
|
|
53
|
-
_origin: any;
|
|
54
|
-
_extend: {
|
|
55
|
-
other: {
|
|
56
|
-
product_id: any;
|
|
57
|
-
option: any[];
|
|
58
|
-
bundle: any;
|
|
59
|
-
product_variant_id: any;
|
|
60
|
-
quantity: any;
|
|
61
|
-
};
|
|
62
|
-
note: any;
|
|
63
|
-
total: any;
|
|
64
|
-
origin_total: string | number | undefined;
|
|
65
|
-
payment_price: any;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
declare const LineItem: (props: LineItemProps) => JSX.Element;
|
|
69
|
-
export default LineItem;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.line-item.resource': string;
|
|
4
|
-
'pisell2.line-item.time': string;
|
|
5
|
-
};
|
|
6
|
-
'zh-CN': {
|
|
7
|
-
'pisell2.line-item.resource': string;
|
|
8
|
-
'pisell2.line-item.time': string;
|
|
9
|
-
};
|
|
10
|
-
'zh-HK': {
|
|
11
|
-
'pisell2.line-item.resource': string;
|
|
12
|
-
'pisell2.line-item.time': string;
|
|
13
|
-
};
|
|
14
|
-
ja: {
|
|
15
|
-
'pisell2.line-item.resource': string;
|
|
16
|
-
'pisell2.line-item.time': string;
|
|
17
|
-
};
|
|
18
|
-
pt: {
|
|
19
|
-
'pisell2.line-item.resource': string;
|
|
20
|
-
'pisell2.line-item.time': string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import 'dayjs/locale/zh-cn';
|
|
3
|
-
import 'dayjs/locale/en';
|
|
4
|
-
import type { PisellTimeRangeDisplayProps } from './types';
|
|
5
|
-
import './PisellTimeRangeDisplay.less';
|
|
6
|
-
/**
|
|
7
|
-
* PisellTimeRangeDisplay 组件
|
|
8
|
-
*
|
|
9
|
-
* @description
|
|
10
|
-
* 纯展示型时间区间组件,将 startAt / endAt 格式化为「时间区间 + 持续时间」。
|
|
11
|
-
* - 同一天:HH:mm-HH:mm,可选显示日期/星期
|
|
12
|
-
* - 跨天:起止日期时间
|
|
13
|
-
* - 持续时间:d h m s 格式
|
|
14
|
-
* - 字段顺序由 fieldOrder 控制,可将 duration 放在中间
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* <PisellTimeRangeDisplay
|
|
18
|
-
* startAt="2026-02-04 09:00"
|
|
19
|
-
* endAt="2026-02-04 18:00"
|
|
20
|
-
* />
|
|
21
|
-
* // => "09:00-18:00" + "9h"
|
|
22
|
-
*
|
|
23
|
-
* <PisellTimeRangeDisplay
|
|
24
|
-
* startAt={start}
|
|
25
|
-
* endAt={end}
|
|
26
|
-
* fields={{ fieldOrder: ['time', 'duration', 'date', 'weekday'] }}
|
|
27
|
-
* showDateForSameDay
|
|
28
|
-
* />
|
|
29
|
-
*/
|
|
30
|
-
export declare const PisellTimeRangeDisplay: React.FC<PisellTimeRangeDisplayProps>;
|
|
31
|
-
declare const _default: React.NamedExoticComponent<PisellTimeRangeDisplayProps>;
|
|
32
|
-
export default _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Dayjs } from 'dayjs';
|
|
3
|
-
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
-
export interface TimeRangeBlockProps {
|
|
5
|
-
/** 开始时间 */
|
|
6
|
-
start: Dayjs;
|
|
7
|
-
/** 结束时间 */
|
|
8
|
-
end: Dayjs;
|
|
9
|
-
/** 是否同一天 */
|
|
10
|
-
isSameDay: boolean;
|
|
11
|
-
/** 时间格式配置 */
|
|
12
|
-
timeFormat?: TimeFormatConfig;
|
|
13
|
-
/** 日期格式配置(跨天时用于起止日期,含 showRelativeDay) */
|
|
14
|
-
dateFormat?: DateFormatConfig;
|
|
15
|
-
/** 星期格式配置(跨天时用于「Sat, 22 Jan」) */
|
|
16
|
-
weekdayFormat?: WeekdayFormatConfig;
|
|
17
|
-
/** 参考日期,用于相对日判定,默认 dayjs() */
|
|
18
|
-
referenceDate?: Dayjs;
|
|
19
|
-
/** 文本样式 */
|
|
20
|
-
style?: TextStyleConfig;
|
|
21
|
-
/** 自定义类名 */
|
|
22
|
-
className?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 时间区间展示块
|
|
26
|
-
* - 同一天:HH:mm-HH:mm
|
|
27
|
-
* - 跨天:起止完整日期时间;若某端为相对日(今天/昨天/明天)则只显示「时间 相对日」,不显示星期+日期
|
|
28
|
-
*/
|
|
29
|
-
export declare const TimeRangeBlock: React.FC<TimeRangeBlockProps>;
|
|
30
|
-
export default TimeRangeBlock;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
|
-
import type { Dayjs } from 'dayjs';
|
|
3
|
-
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign } from '../pisellDateTimeDisplay/types';
|
|
4
|
-
export type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign, };
|
|
5
|
-
/**
|
|
6
|
-
* 字段类型(时间区间、日期、星期、持续时长)
|
|
7
|
-
* - time: 时间区间块(HH:mm-HH:mm 或跨天起止)
|
|
8
|
-
* - date: 日期块
|
|
9
|
-
* - weekday: 星期块
|
|
10
|
-
* - duration: 持续时长块
|
|
11
|
-
*/
|
|
12
|
-
export declare type TimeRangeFieldType = 'time' | 'date' | 'weekday' | 'duration';
|
|
13
|
-
/**
|
|
14
|
-
* 持续时长格式配置
|
|
15
|
-
*/
|
|
16
|
-
export interface DurationFormatConfig {
|
|
17
|
-
/**
|
|
18
|
-
* 是否显示秒
|
|
19
|
-
* @default false
|
|
20
|
-
* @example true -> "2h30m23s" | false -> "2h30m"
|
|
21
|
-
*/
|
|
22
|
-
showSeconds?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 字段配置
|
|
26
|
-
*/
|
|
27
|
-
export interface TimeRangeFieldConfig {
|
|
28
|
-
/**
|
|
29
|
-
* 是否显示时间区间块
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
showTimeRange?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 是否显示日期块
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
|
-
showDate?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 是否显示星期块
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
|
-
showWeekday?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 是否显示持续时长块
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
showDuration?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* 字段顺序(四类块可任意排序;默认 时间 日期 星期 持续时长,可实现「持续时间在前」等)
|
|
50
|
-
* @default ['weekday', 'date', 'time', 'duration'] 换行顺序:先持续时间 → 结束时间(跨天)→ 开始/结束时间与日期 → 星期
|
|
51
|
-
*/
|
|
52
|
-
fieldOrder?: TimeRangeFieldType[];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* startAt / endAt 的 dayjs 兼容值
|
|
56
|
-
*/
|
|
57
|
-
export declare type DayjsLike = Dayjs | string | number;
|
|
58
|
-
/**
|
|
59
|
-
* PisellTimeRangeDisplay 组件 Props
|
|
60
|
-
*/
|
|
61
|
-
export interface PisellTimeRangeDisplayProps {
|
|
62
|
-
/**
|
|
63
|
-
* 开始时间(dayjs 兼容值)
|
|
64
|
-
*/
|
|
65
|
-
startAt: DayjsLike;
|
|
66
|
-
/**
|
|
67
|
-
* 结束时间(dayjs 兼容值)
|
|
68
|
-
*/
|
|
69
|
-
endAt: DayjsLike;
|
|
70
|
-
/**
|
|
71
|
-
* 文本对齐方式(单行/多行均生效)
|
|
72
|
-
* @default 'center'
|
|
73
|
-
*/
|
|
74
|
-
textAlign?: TextAlign;
|
|
75
|
-
/**
|
|
76
|
-
* 字段显示与排序配置
|
|
77
|
-
*/
|
|
78
|
-
fields?: TimeRangeFieldConfig;
|
|
79
|
-
/**
|
|
80
|
-
* 同一天时是否显示具体日期
|
|
81
|
-
* @default true
|
|
82
|
-
*/
|
|
83
|
-
showDateForSameDay?: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* 时间格式配置(复用 PisellDateTimeDisplay)
|
|
86
|
-
*/
|
|
87
|
-
timeFormat?: TimeFormatConfig;
|
|
88
|
-
/**
|
|
89
|
-
* 日期格式配置(复用 PisellDateTimeDisplay)
|
|
90
|
-
*/
|
|
91
|
-
dateFormat?: DateFormatConfig;
|
|
92
|
-
/**
|
|
93
|
-
* 星期格式配置(复用 PisellDateTimeDisplay)
|
|
94
|
-
*/
|
|
95
|
-
weekdayFormat?: WeekdayFormatConfig;
|
|
96
|
-
/**
|
|
97
|
-
* 持续时长格式配置
|
|
98
|
-
*/
|
|
99
|
-
durationFormat?: DurationFormatConfig;
|
|
100
|
-
/**
|
|
101
|
-
* 容器样式
|
|
102
|
-
*/
|
|
103
|
-
containerStyle?: ContainerStyleConfig;
|
|
104
|
-
/**
|
|
105
|
-
* 时间区间文本样式
|
|
106
|
-
*/
|
|
107
|
-
timeStyle?: TextStyleConfig;
|
|
108
|
-
/**
|
|
109
|
-
* 日期文本样式
|
|
110
|
-
*/
|
|
111
|
-
dateStyle?: TextStyleConfig;
|
|
112
|
-
/**
|
|
113
|
-
* 星期文本样式
|
|
114
|
-
*/
|
|
115
|
-
weekdayStyle?: TextStyleConfig;
|
|
116
|
-
/**
|
|
117
|
-
* 持续时长文本样式
|
|
118
|
-
*/
|
|
119
|
-
durationStyle?: TextStyleConfig;
|
|
120
|
-
/**
|
|
121
|
-
* dayjs locale(语言代码)
|
|
122
|
-
* @default 优先使用全局配置,其次浏览器语言
|
|
123
|
-
*/
|
|
124
|
-
locale?: string;
|
|
125
|
-
/**
|
|
126
|
-
* 自定义类名
|
|
127
|
-
*/
|
|
128
|
-
className?: string;
|
|
129
|
-
/**
|
|
130
|
-
* 自定义样式
|
|
131
|
-
*/
|
|
132
|
-
style?: CSSProperties;
|
|
133
|
-
/**
|
|
134
|
-
* 点击回调
|
|
135
|
-
*/
|
|
136
|
-
onClick?: () => void;
|
|
137
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ProductCardTypes } from '../types';
|
|
2
|
-
import type { LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
3
|
-
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
4
|
-
dataSource: any;
|
|
5
|
-
type: LineItemType;
|
|
6
|
-
cartSkuType: 'a2' | 'a5' | 'a9';
|
|
7
|
-
isShowBookingHeader: boolean;
|
|
8
|
-
relatedProductDataSource?: any;
|
|
9
|
-
rightActions?: any[];
|
|
10
|
-
escapeDom?: string;
|
|
11
|
-
statusOptions?: LineItemStatusOption[];
|
|
12
|
-
statusLoading?: boolean;
|
|
13
|
-
statusDisabled?: boolean;
|
|
14
|
-
isShowRelatedProduct?: boolean;
|
|
15
|
-
holderOptions?: LineItemHolderOption[];
|
|
16
|
-
onBookingStatusChange?: (status: string, item: any) => void;
|
|
17
|
-
}
|
|
18
|
-
declare const BookingLineItem: (props: BookingLineItemProps) => JSX.Element | null;
|
|
19
|
-
export default BookingLineItem;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { ProductCardTypes } from '../types';
|
|
2
|
-
import type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export declare const PREFIX = "pisell-line-item";
|
|
5
|
-
export type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType, } from './types';
|
|
6
|
-
declare type LocalizedText = string | Record<string, unknown> | null | undefined;
|
|
7
|
-
export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
8
|
-
dataSource: any;
|
|
9
|
-
itemType?: itemType;
|
|
10
|
-
type?: LineItemType;
|
|
11
|
-
isShowBookingHeader: boolean;
|
|
12
|
-
rightActions?: any[];
|
|
13
|
-
escapeDom?: string;
|
|
14
|
-
statusOptions?: LineItemStatusOption[];
|
|
15
|
-
statusLoading?: boolean;
|
|
16
|
-
statusDisabled?: boolean;
|
|
17
|
-
isShowRelatedProduct?: boolean;
|
|
18
|
-
holderOptions?: LineItemHolderOption[];
|
|
19
|
-
onBookingStatusChange?: (status: string, item: any) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
|
|
22
|
-
_id: any;
|
|
23
|
-
id: any;
|
|
24
|
-
product_id: any;
|
|
25
|
-
product_variant_id: any;
|
|
26
|
-
title: string;
|
|
27
|
-
product_title: string;
|
|
28
|
-
name: string;
|
|
29
|
-
cover: any;
|
|
30
|
-
image: any;
|
|
31
|
-
num: any;
|
|
32
|
-
quantity: any;
|
|
33
|
-
price: any;
|
|
34
|
-
total: any;
|
|
35
|
-
origin_total: string | number | undefined;
|
|
36
|
-
original_total: string | number | undefined;
|
|
37
|
-
source_product_price: any;
|
|
38
|
-
selling_price: any;
|
|
39
|
-
payment_price: any;
|
|
40
|
-
tax_fee: any;
|
|
41
|
-
symbol: string;
|
|
42
|
-
note: any;
|
|
43
|
-
product_sku: any;
|
|
44
|
-
product_bundle: any;
|
|
45
|
-
bundle: any;
|
|
46
|
-
product_option_string: any;
|
|
47
|
-
options: any[];
|
|
48
|
-
discount_list: any;
|
|
49
|
-
promotions: any;
|
|
50
|
-
discount_reason: any;
|
|
51
|
-
isGift: boolean;
|
|
52
|
-
giftData: any;
|
|
53
|
-
_origin: any;
|
|
54
|
-
_extend: {
|
|
55
|
-
other: {
|
|
56
|
-
product_id: any;
|
|
57
|
-
option: any[];
|
|
58
|
-
bundle: any;
|
|
59
|
-
product_variant_id: any;
|
|
60
|
-
quantity: any;
|
|
61
|
-
};
|
|
62
|
-
note: any;
|
|
63
|
-
total: any;
|
|
64
|
-
origin_total: string | number | undefined;
|
|
65
|
-
payment_price: any;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
declare const LineItem: (props: LineItemProps) => JSX.Element;
|
|
69
|
-
export default LineItem;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.line-item.resource': string;
|
|
4
|
-
'pisell2.line-item.time': string;
|
|
5
|
-
};
|
|
6
|
-
'zh-CN': {
|
|
7
|
-
'pisell2.line-item.resource': string;
|
|
8
|
-
'pisell2.line-item.time': string;
|
|
9
|
-
};
|
|
10
|
-
'zh-HK': {
|
|
11
|
-
'pisell2.line-item.resource': string;
|
|
12
|
-
'pisell2.line-item.time': string;
|
|
13
|
-
};
|
|
14
|
-
ja: {
|
|
15
|
-
'pisell2.line-item.resource': string;
|
|
16
|
-
'pisell2.line-item.time': string;
|
|
17
|
-
};
|
|
18
|
-
pt: {
|
|
19
|
-
'pisell2.line-item.resource': string;
|
|
20
|
-
'pisell2.line-item.time': string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default _default;
|