@pisell/private-materials 6.3.77 → 6.3.79
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 +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Sales/Cart/index.d.ts +1 -1
- package/es/components/Sales/Cart/index.js +18 -3
- package/es/components/Sales/Cart/utils.d.ts +68 -0
- package/es/components/Sales/Checkout/utils.js +57 -1
- package/es/components/Sales/Summary/index.d.ts +2 -0
- package/es/components/Sales/Summary/index.js +7 -2
- package/es/components/Sales/Summary/utils.d.ts +10 -3
- package/es/components/Sales/Summary/utils.js +57 -10
- package/es/components/appointmentBooking/components/Cart/Item/index.js +62 -4
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +5 -1
- package/es/components/appointmentBooking/components/Deposit/index.js +9 -4
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/es/components/appointmentBooking/locales.d.ts +366 -0
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -0
- package/es/components/booking/info/service2/utils.js +4 -4
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/locales.d.ts +330 -0
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +4 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +4 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +79 -6
- package/es/components/eventBooking/components/Provider/Cart/Item/index.less +7 -6
- package/es/components/eventBooking/components/Provider/Cart/index.js +2 -7
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.less +1 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
- package/es/components/eventBooking/components/Voucher/index.js +1 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -3
- package/es/components/subTotal/index.d.ts +2 -0
- package/es/components/subTotal/index.js +42 -20
- package/es/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
- package/es/components/systemSettings/registry/components/docs/images/image.png +0 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/types.d.ts +429 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/pro/NumericStepper/index.d.ts +43 -0
- package/es/pro/Selector/components/Card/index.d.ts +57 -0
- package/es/pro/Selector/components/Indicator/index.d.ts +19 -0
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +16 -0
- package/es/pro/Selector/demo.d.ts +0 -1
- package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/es/pro/Selector/types.d.ts +173 -0
- package/lib/components/Sales/Cart/index.d.ts +1 -1
- package/lib/components/Sales/Cart/index.js +20 -7
- package/lib/components/Sales/Cart/utils.d.ts +68 -0
- package/lib/components/Sales/Checkout/utils.js +64 -1
- package/lib/components/Sales/Summary/index.d.ts +2 -0
- package/lib/components/Sales/Summary/index.js +8 -2
- package/lib/components/Sales/Summary/utils.d.ts +10 -3
- package/lib/components/Sales/Summary/utils.js +38 -13
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +52 -4
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +5 -1
- package/lib/components/appointmentBooking/components/Deposit/index.js +7 -4
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/lib/components/appointmentBooking/locales.d.ts +366 -0
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.js +4 -4
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/locales.d.ts +330 -0
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +4 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +3 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +77 -5
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.less +7 -6
- package/lib/components/eventBooking/components/Provider/Cart/index.js +2 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.less +1 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
- package/lib/components/eventBooking/components/Voucher/index.js +1 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -1
- package/lib/components/subTotal/index.d.ts +2 -0
- package/lib/components/subTotal/index.js +34 -20
- package/lib/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
- package/lib/components/systemSettings/registry/components/docs/images/image.png +0 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/types.d.ts +429 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/pro/NumericStepper/index.d.ts +43 -0
- package/lib/pro/Selector/components/Card/index.d.ts +57 -0
- package/lib/pro/Selector/components/Indicator/index.d.ts +19 -0
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +16 -0
- package/lib/pro/Selector/demo.d.ts +0 -1
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/lib/pro/Selector/types.d.ts +173 -0
- package/package.json +3 -3
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* SKU Card 文本样式配置
|
|
4
|
+
*/
|
|
5
|
+
export interface SkuCardTextConfig {
|
|
6
|
+
/** 是否显示 */
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
/** 字体大小 */
|
|
9
|
+
fontSize?: number;
|
|
10
|
+
/** 颜色 */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** 字体粗细 */
|
|
13
|
+
fontWeight?: 'normal' | 'bold' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
14
|
+
/** 展示行数 */
|
|
15
|
+
lineClamp?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* SKU Card 图片配置
|
|
19
|
+
*/
|
|
20
|
+
export interface SkuCardImageConfig {
|
|
21
|
+
/** 是否显示 */
|
|
22
|
+
visible?: boolean;
|
|
23
|
+
/** 宽度 */
|
|
24
|
+
width?: number;
|
|
25
|
+
/** 高度 */
|
|
26
|
+
height?: number;
|
|
27
|
+
/** 圆角 */
|
|
28
|
+
borderRadius?: number | string;
|
|
29
|
+
/** 边框 */
|
|
30
|
+
border?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* SKU Card 配置
|
|
34
|
+
*/
|
|
35
|
+
export interface SkuCardConfig {
|
|
36
|
+
/** 主标题配置 */
|
|
37
|
+
title?: SkuCardTextConfig;
|
|
38
|
+
/** 副标题配置 */
|
|
39
|
+
subTitle?: SkuCardTextConfig;
|
|
40
|
+
/** 价格配置 */
|
|
41
|
+
price?: Omit<SkuCardTextConfig, 'lineClamp'>;
|
|
42
|
+
/** 图片配置 */
|
|
43
|
+
image?: SkuCardImageConfig;
|
|
44
|
+
/**
|
|
45
|
+
* @description 是否在「组合规格选项卡片(VariantCard)」展示价格
|
|
46
|
+
* - 默认不展示,避免影响现有业务 UI
|
|
47
|
+
*/
|
|
48
|
+
variantPriceVisible?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* SKU store状态类型
|
|
52
|
+
*/
|
|
53
|
+
export interface SkuSelectionState {
|
|
54
|
+
/** 数据源 */
|
|
55
|
+
dataSource: any;
|
|
56
|
+
/** 原始值 */
|
|
57
|
+
value: Record<string | number, any>;
|
|
58
|
+
/** 配置 */
|
|
59
|
+
config: {
|
|
60
|
+
overSold?: boolean;
|
|
61
|
+
};
|
|
62
|
+
/** 货币符号 */
|
|
63
|
+
symbol: string;
|
|
64
|
+
/** Selector数据源 */
|
|
65
|
+
selectorDataSource: any[];
|
|
66
|
+
/** Selector识别的值 */
|
|
67
|
+
selectorValue: Record<string | number, any>;
|
|
68
|
+
/** SKU Card 配置 */
|
|
69
|
+
skuCardConfig: SkuCardConfig;
|
|
70
|
+
style?: React.CSSProperties;
|
|
71
|
+
/** 样式配置 */
|
|
72
|
+
customConfig?: {
|
|
73
|
+
/** 弹窗宽度 */
|
|
74
|
+
modalWidth?: number | string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** SKU Card 默认配置 */
|
|
78
|
+
export declare const defaultSkuCardConfig: SkuCardConfig;
|
|
79
|
+
export interface IProps {
|
|
80
|
+
/** 数据源 */
|
|
81
|
+
dataSource: DataSource;
|
|
82
|
+
/** 原始值 */
|
|
83
|
+
value: SkuValue;
|
|
84
|
+
/** 配置 */
|
|
85
|
+
config?: {
|
|
86
|
+
/** 是否禁用 */
|
|
87
|
+
overSold?: 0 | 1;
|
|
88
|
+
};
|
|
89
|
+
/** SKU Card 配置 */
|
|
90
|
+
skuCardConfig?: SkuCardConfig;
|
|
91
|
+
/** 选中变更回调 */
|
|
92
|
+
onChange: (value: SkuValue) => void;
|
|
93
|
+
/** 自定义滚动容器 */
|
|
94
|
+
customScrollParent?: HTMLElement | string;
|
|
95
|
+
/** 自定义样式 */
|
|
96
|
+
style?: React.CSSProperties;
|
|
97
|
+
/** 自定义配置 */
|
|
98
|
+
customConfig?: {
|
|
99
|
+
/** 弹窗宽度 */
|
|
100
|
+
modalWidth?: number | string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface DataSource {
|
|
104
|
+
/** 单规格组数据 */
|
|
105
|
+
option_group?: Array<OptionGroupItem>;
|
|
106
|
+
/** 组合规格组装后的数据 */
|
|
107
|
+
variant?: Array<VariantProductItem>;
|
|
108
|
+
/** 组合规格组数据 */
|
|
109
|
+
variant_group?: Array<VariantGroupItem>;
|
|
110
|
+
/** 套餐商品组数据 */
|
|
111
|
+
bundle_group?: Array<BundleItem>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* 单规格组数据
|
|
115
|
+
*/
|
|
116
|
+
export interface OptionGroupItem {
|
|
117
|
+
/** 创建者id */
|
|
118
|
+
create_account_id?: number;
|
|
119
|
+
/** 创建时间 */
|
|
120
|
+
created_at?: string;
|
|
121
|
+
/** 删除时间 */
|
|
122
|
+
deleted_at?: string | null;
|
|
123
|
+
/** 模板id */
|
|
124
|
+
template_id?: number;
|
|
125
|
+
/** 更新者id */
|
|
126
|
+
update_account_id?: number;
|
|
127
|
+
/** 更新时间 */
|
|
128
|
+
updated_at?: string;
|
|
129
|
+
/** 单规格组id */
|
|
130
|
+
id?: number;
|
|
131
|
+
/** 是否启用 */
|
|
132
|
+
is_enabled?: 0 | 1;
|
|
133
|
+
/** 是否多选 */
|
|
134
|
+
is_multiple?: 0 | 1;
|
|
135
|
+
/** 最大选择数量 */
|
|
136
|
+
max_quantity?: number;
|
|
137
|
+
/** 最小选择数量 */
|
|
138
|
+
min_quantity?: number;
|
|
139
|
+
/** 单规格组名称 */
|
|
140
|
+
name?: string;
|
|
141
|
+
/** 单规格组下规格数据 */
|
|
142
|
+
option_item?: Array<OptionItem>;
|
|
143
|
+
/** 商品id */
|
|
144
|
+
product_id?: number;
|
|
145
|
+
/** 是否必选 */
|
|
146
|
+
required?: 0 | 1;
|
|
147
|
+
/** 店铺id */
|
|
148
|
+
shop_id?: number;
|
|
149
|
+
/** 排序 */
|
|
150
|
+
sort?: number;
|
|
151
|
+
/** 状态 */
|
|
152
|
+
status?: 0 | 1;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* 单规格组下选项数据
|
|
156
|
+
*/
|
|
157
|
+
export interface OptionItem {
|
|
158
|
+
/** 创建者id */
|
|
159
|
+
create_account_id?: number;
|
|
160
|
+
/** 创建时间 */
|
|
161
|
+
created_at?: string;
|
|
162
|
+
/** 删除时间 */
|
|
163
|
+
deleted_at?: string | null;
|
|
164
|
+
/** 模板id */
|
|
165
|
+
template_id?: number;
|
|
166
|
+
/** 更新者id */
|
|
167
|
+
update_account_id?: number;
|
|
168
|
+
/** 更新时间 */
|
|
169
|
+
updated_at?: string;
|
|
170
|
+
/** 加价 */
|
|
171
|
+
add_price?: string;
|
|
172
|
+
/** 封面 */
|
|
173
|
+
cover?: string;
|
|
174
|
+
/** 描述 */
|
|
175
|
+
description?: string;
|
|
176
|
+
/** 规格id */
|
|
177
|
+
id?: number;
|
|
178
|
+
/** 是否启用 */
|
|
179
|
+
is_enabled?: 0 | 1;
|
|
180
|
+
/** 最大选择数量 */
|
|
181
|
+
max_quantity?: number;
|
|
182
|
+
/** 规格名称 */
|
|
183
|
+
name?: string;
|
|
184
|
+
/** 规格组id */
|
|
185
|
+
option_group_id?: number;
|
|
186
|
+
/** 原价 */
|
|
187
|
+
original_price?: string;
|
|
188
|
+
/** 商品id */
|
|
189
|
+
product_id?: number;
|
|
190
|
+
/** 店铺id */
|
|
191
|
+
shop_id?: number;
|
|
192
|
+
/** 排序 */
|
|
193
|
+
sort?: number;
|
|
194
|
+
/** 状态 */
|
|
195
|
+
status?: 0 | 1;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* 组合规格组数据
|
|
199
|
+
*/
|
|
200
|
+
export interface VariantGroupItem {
|
|
201
|
+
/** 创建者id */
|
|
202
|
+
create_account_id?: number;
|
|
203
|
+
/** 创建时间 */
|
|
204
|
+
created_at?: string;
|
|
205
|
+
/** 删除时间 */
|
|
206
|
+
deleted_at?: string | null;
|
|
207
|
+
/** 更新者id */
|
|
208
|
+
update_account_id?: number;
|
|
209
|
+
/** 更新时间 */
|
|
210
|
+
updated_at?: string;
|
|
211
|
+
/** 组合规格组id */
|
|
212
|
+
id?: number;
|
|
213
|
+
/** 组合规格组名称 */
|
|
214
|
+
name?: string;
|
|
215
|
+
/** 位置id */
|
|
216
|
+
position_id?: number;
|
|
217
|
+
/** 商品id */
|
|
218
|
+
product_id?: number;
|
|
219
|
+
/** 店铺id */
|
|
220
|
+
shop_id?: number;
|
|
221
|
+
/** 排序 */
|
|
222
|
+
sort?: number;
|
|
223
|
+
/** 状态 */
|
|
224
|
+
status?: 0 | 1;
|
|
225
|
+
/** 组合规格组下选项数据 */
|
|
226
|
+
variant_item?: Array<VariantItem>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* 组合规格组下选项数据
|
|
230
|
+
*/
|
|
231
|
+
export interface VariantItem {
|
|
232
|
+
/** 创建者id */
|
|
233
|
+
create_account_id?: number;
|
|
234
|
+
/** 创建时间 */
|
|
235
|
+
created_at?: string;
|
|
236
|
+
/** 删除时间 */
|
|
237
|
+
deleted_at?: string | null;
|
|
238
|
+
/** 更新者id */
|
|
239
|
+
update_account_id?: number;
|
|
240
|
+
/** 更新时间 */
|
|
241
|
+
updated_at?: string;
|
|
242
|
+
/** 店铺id */
|
|
243
|
+
shop_id?: number;
|
|
244
|
+
/** 排序 */
|
|
245
|
+
sort?: number;
|
|
246
|
+
/** 规格id */
|
|
247
|
+
id?: number;
|
|
248
|
+
/** 是否默认 */
|
|
249
|
+
is_default?: 0 | 1;
|
|
250
|
+
/** 变体名称 */
|
|
251
|
+
name?: string;
|
|
252
|
+
/** 位置id */
|
|
253
|
+
position_id?: number;
|
|
254
|
+
/** 商品id */
|
|
255
|
+
product_id?: number;
|
|
256
|
+
/** 状态 */
|
|
257
|
+
status?: 0 | 1;
|
|
258
|
+
/** 组合规格组id */
|
|
259
|
+
variant_group_id?: number;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* 组合规格商品数据
|
|
263
|
+
*/
|
|
264
|
+
export interface VariantProductItem {
|
|
265
|
+
/** 创建者id */
|
|
266
|
+
create_account_id?: number;
|
|
267
|
+
/** 创建时间 */
|
|
268
|
+
created_at?: string;
|
|
269
|
+
/** 更新者id */
|
|
270
|
+
update_account_id?: number;
|
|
271
|
+
/** 更新时间 */
|
|
272
|
+
updated_at?: string;
|
|
273
|
+
/** 条形码 */
|
|
274
|
+
barcode?: string;
|
|
275
|
+
/** 基础价格 */
|
|
276
|
+
base_price?: string;
|
|
277
|
+
/** 箱规数量 */
|
|
278
|
+
box_specification_quantity?: number;
|
|
279
|
+
/** 编码 */
|
|
280
|
+
code?: string;
|
|
281
|
+
/** 成本价格 */
|
|
282
|
+
cost_price?: string;
|
|
283
|
+
/** 封面 */
|
|
284
|
+
cover?: string;
|
|
285
|
+
/** 描述 */
|
|
286
|
+
description?: string | null;
|
|
287
|
+
/** 是否禁用 */
|
|
288
|
+
disabled?: 0 | 1;
|
|
289
|
+
/** 组合规格商品id */
|
|
290
|
+
id?: number;
|
|
291
|
+
/** 是否收税 */
|
|
292
|
+
is_charge_tax?: 0 | 1;
|
|
293
|
+
/** 是否发货 */
|
|
294
|
+
is_delivery?: 0 | 1;
|
|
295
|
+
/** 是否收税 */
|
|
296
|
+
is_gst?: 0 | 1;
|
|
297
|
+
/** 是否跟踪库存 */
|
|
298
|
+
is_track?: 0 | 1;
|
|
299
|
+
/** 名称 */
|
|
300
|
+
name?: Record<string, string>;
|
|
301
|
+
/** 开售重量 */
|
|
302
|
+
open_sold_weight?: number;
|
|
303
|
+
/** 原价 */
|
|
304
|
+
original_price?: string;
|
|
305
|
+
/** 是否超卖 */
|
|
306
|
+
over_sold?: 0 | 1;
|
|
307
|
+
/** 价格 */
|
|
308
|
+
price?: string;
|
|
309
|
+
/** 商品id */
|
|
310
|
+
product_id?: number;
|
|
311
|
+
/** 折扣类型 */
|
|
312
|
+
rebate_type?: string;
|
|
313
|
+
/** 折扣值 */
|
|
314
|
+
rebate_value?: number;
|
|
315
|
+
/** 标题 */
|
|
316
|
+
title?: Record<string, string>;
|
|
317
|
+
/** 单位 */
|
|
318
|
+
unit?: string;
|
|
319
|
+
/** 单位值 */
|
|
320
|
+
unit_value?: number;
|
|
321
|
+
/** 重量单位 */
|
|
322
|
+
weight_unit?: string;
|
|
323
|
+
/** 重量值 */
|
|
324
|
+
weight_value?: string;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* 套餐商品组数据
|
|
328
|
+
*/
|
|
329
|
+
export interface BundleGroupItem {
|
|
330
|
+
/** 店铺id */
|
|
331
|
+
shop_id?: number;
|
|
332
|
+
/** 排序 */
|
|
333
|
+
sort?: number;
|
|
334
|
+
/** 套餐id */
|
|
335
|
+
id?: number;
|
|
336
|
+
/** 最大选择数量 */
|
|
337
|
+
max_quantity?: number;
|
|
338
|
+
/** 最小选择数量 */
|
|
339
|
+
min_quantity?: number;
|
|
340
|
+
/** 套餐名称 */
|
|
341
|
+
name?: string;
|
|
342
|
+
/** 商品id */
|
|
343
|
+
product_id?: number;
|
|
344
|
+
/** 套餐商品组数据 */
|
|
345
|
+
bundle_item?: Array<BundleItem>;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* 套餐商品组下选项数据
|
|
349
|
+
*/
|
|
350
|
+
export interface BundleItem {
|
|
351
|
+
/** 店铺id */
|
|
352
|
+
shop_id?: number;
|
|
353
|
+
/** 排序 */
|
|
354
|
+
sort?: number;
|
|
355
|
+
/** 条形码 */
|
|
356
|
+
barcode?: string;
|
|
357
|
+
/** 套餐商品id */
|
|
358
|
+
bundle_product_id?: number;
|
|
359
|
+
/** 套餐商品变体id */
|
|
360
|
+
bundle_variant_id?: number;
|
|
361
|
+
/** 编码 */
|
|
362
|
+
code?: string;
|
|
363
|
+
/** 封面 */
|
|
364
|
+
cover?: string;
|
|
365
|
+
/** 扩展id */
|
|
366
|
+
extension_id?: number;
|
|
367
|
+
/** 扩展类型 */
|
|
368
|
+
extension_type?: string;
|
|
369
|
+
/** 套餐商品组id */
|
|
370
|
+
group_id?: number;
|
|
371
|
+
/** 套餐商品id */
|
|
372
|
+
id: string | number;
|
|
373
|
+
/** 是否跟踪库存 */
|
|
374
|
+
is_track?: 0 | 1;
|
|
375
|
+
/** 最大选择数量 */
|
|
376
|
+
max_quantity?: number;
|
|
377
|
+
/** 单规格组数据 */
|
|
378
|
+
option_group?: Array<OptionGroupItem>;
|
|
379
|
+
/** 是否允许超卖 */
|
|
380
|
+
over_sold?: 0 | 1;
|
|
381
|
+
/** 价格 */
|
|
382
|
+
price?: string;
|
|
383
|
+
/** 价格类型: mark_up==>加价 | mark_down==>减价 */
|
|
384
|
+
price_type?: 'mark_up' | 'mark_down';
|
|
385
|
+
/** 价格类型扩展: product_price==>商品价格 */
|
|
386
|
+
price_type_ext?: '' | 'product_price';
|
|
387
|
+
/** 商品id */
|
|
388
|
+
product_id?: number;
|
|
389
|
+
/** 商品价格 */
|
|
390
|
+
product_price?: string;
|
|
391
|
+
/** 商品副标题 */
|
|
392
|
+
product_subtitle?: string;
|
|
393
|
+
/** 库存数量 */
|
|
394
|
+
stock_quantity?: number;
|
|
395
|
+
/** 标题 */
|
|
396
|
+
title?: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* sku value
|
|
400
|
+
*/
|
|
401
|
+
export interface SkuValue {
|
|
402
|
+
/** 商品id */
|
|
403
|
+
product_id: number;
|
|
404
|
+
/** 多规格商品id */
|
|
405
|
+
product_variant_id: number;
|
|
406
|
+
/** 多规格商品选项字符串 */
|
|
407
|
+
product_option_string?: string;
|
|
408
|
+
/** 套餐商品组数据 */
|
|
409
|
+
bundle: Array<any>;
|
|
410
|
+
/** 单规格组数据 */
|
|
411
|
+
option: Array<OptionItem & {
|
|
412
|
+
num: number;
|
|
413
|
+
price: string;
|
|
414
|
+
product_option_item_id: number;
|
|
415
|
+
}>;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Selector值原子类型
|
|
419
|
+
*/
|
|
420
|
+
export interface SelectorValueAtom {
|
|
421
|
+
/** 数据 */
|
|
422
|
+
data: Record<string, any>;
|
|
423
|
+
/** 数量 */
|
|
424
|
+
quantity: number;
|
|
425
|
+
/** 总价 */
|
|
426
|
+
totalPrice: string | number;
|
|
427
|
+
/** 值 */
|
|
428
|
+
value: number | string;
|
|
429
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace JSX {
|
|
5
|
+
interface IntrinsicElements {
|
|
6
|
+
[elemName: string]: any;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export interface NumericStepperProps {
|
|
11
|
+
/** 当前值 */
|
|
12
|
+
value?: number;
|
|
13
|
+
/** 默认值 */
|
|
14
|
+
defaultValue?: number;
|
|
15
|
+
/** 最小值 */
|
|
16
|
+
min?: number;
|
|
17
|
+
/** 最大值 */
|
|
18
|
+
max?: number;
|
|
19
|
+
/** 步长 */
|
|
20
|
+
step?: number;
|
|
21
|
+
/** 是否禁用 */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** 值变化回调 */
|
|
24
|
+
onChange?: (value: number) => void;
|
|
25
|
+
/** 自定义类名 */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** 自定义样式 */
|
|
28
|
+
styles?: {
|
|
29
|
+
container?: React.CSSProperties;
|
|
30
|
+
};
|
|
31
|
+
/** 尺寸 */
|
|
32
|
+
size?: 'small' | 'middle' | 'large';
|
|
33
|
+
/** 按钮形状 */
|
|
34
|
+
shape?: 'round' | 'square';
|
|
35
|
+
/** 是否显示输入框 */
|
|
36
|
+
showInput?: boolean;
|
|
37
|
+
/** 减号按钮的自定义内容 */
|
|
38
|
+
minusIcon?: React.ReactNode;
|
|
39
|
+
/** 加号按钮的自定义内容 */
|
|
40
|
+
plusIcon?: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
declare const NumericStepper: React.FC<NumericStepperProps>;
|
|
43
|
+
export default NumericStepper;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type CardVariant = 'outlined' | 'borderless';
|
|
4
|
+
export declare type CardLayout = 'vertical' | 'horizontal';
|
|
5
|
+
export declare type SelectedType = 'none' | 'outlined' | 'outlined-bold' | 'filled';
|
|
6
|
+
export declare type ActionsPosition = 'left' | 'right';
|
|
7
|
+
export interface CardStyles {
|
|
8
|
+
container?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
|
|
9
|
+
content?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
|
|
10
|
+
actions?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
|
|
11
|
+
corner?: React.CSSProperties | ((props: CardStyleProps) => React.CSSProperties);
|
|
12
|
+
}
|
|
13
|
+
export interface CardStyleProps {
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
hoverable?: boolean;
|
|
17
|
+
variant?: CardVariant;
|
|
18
|
+
layout?: CardLayout;
|
|
19
|
+
}
|
|
20
|
+
export interface CardProps {
|
|
21
|
+
/** 卡片变体样式 */
|
|
22
|
+
variant?: CardVariant;
|
|
23
|
+
/** 布局方向 */
|
|
24
|
+
layout?: CardLayout;
|
|
25
|
+
/** 操作按钮区域,水平模式在右侧,垂直模式在底部 */
|
|
26
|
+
actions?: React.ReactNode[];
|
|
27
|
+
/** 水平模式下,操作按钮的位置 */
|
|
28
|
+
actionsPosition?: ActionsPosition;
|
|
29
|
+
/** 垂直模式下,右上角绝对定位展示的组件 */
|
|
30
|
+
corner?: React.ReactNode;
|
|
31
|
+
/** 子内容 */
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
/** 选中状态 */
|
|
34
|
+
selected?: boolean;
|
|
35
|
+
/** 禁用状态 */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** 是否可悬停 */
|
|
38
|
+
hoverable?: boolean;
|
|
39
|
+
/** 点击事件 */
|
|
40
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
41
|
+
/** 自定义样式 */
|
|
42
|
+
styles?: CardStyles;
|
|
43
|
+
/**
|
|
44
|
+
* 选中时的样式类型
|
|
45
|
+
* - none: 无样式
|
|
46
|
+
* - outlined: 边框高亮
|
|
47
|
+
* - outlined-bold: 边框高亮 + 加粗(使用 outline 实现,不影响布局)
|
|
48
|
+
* - filled: 填充背景色
|
|
49
|
+
*/
|
|
50
|
+
selectedType?: SelectedType;
|
|
51
|
+
/** 自定义类名 */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** 自定义样式 */
|
|
54
|
+
style?: React.CSSProperties;
|
|
55
|
+
}
|
|
56
|
+
declare const Card: React.FC<CardProps>;
|
|
57
|
+
export default Card;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface IndicatorProps {
|
|
4
|
+
mode?: 'single' | 'multiple';
|
|
5
|
+
variant?: 'outlined' | 'filled';
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
styles?: {
|
|
12
|
+
container?: React.CSSProperties;
|
|
13
|
+
indicator?: React.CSSProperties;
|
|
14
|
+
};
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
size?: 'small' | 'middle' | 'large' | number;
|
|
17
|
+
}
|
|
18
|
+
declare const Indicator: React.FC<IndicatorProps>;
|
|
19
|
+
export default Indicator;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LayoutConfig } from '../../types';
|
|
3
|
+
interface LayoutContainerProps {
|
|
4
|
+
className: string;
|
|
5
|
+
config: LayoutConfig | null;
|
|
6
|
+
children: React.ReactNode[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 统一的布局容器组件
|
|
10
|
+
*
|
|
11
|
+
* 支持两种布局模式:
|
|
12
|
+
* 1. Custom 布局(推荐):通过 className 使用预设样式,containerStyle
|
|
13
|
+
* 2. Ant Design Grid 布局:基础的栅格布局,用于简单场景
|
|
14
|
+
*/
|
|
15
|
+
declare function LayoutContainer({ className: containerClassName, config, children, }: LayoutContainerProps): React.ReactElement | null;
|
|
16
|
+
export default LayoutContainer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LayoutConfig, ItemLayout, PresetConfig, SelectorVariant, SelectorProps } from '../types';
|
|
2
|
+
interface UsePresetPropsParams {
|
|
3
|
+
layout?: LayoutConfig;
|
|
4
|
+
mode?: 'single' | 'multiple';
|
|
5
|
+
preset?: PresetConfig;
|
|
6
|
+
itemLayout?: ItemLayout;
|
|
7
|
+
variant?: SelectorVariant;
|
|
8
|
+
indicatorProps?: SelectorProps['indicatorProps'];
|
|
9
|
+
}
|
|
10
|
+
interface UsePresetPropsResult {
|
|
11
|
+
layout: LayoutConfig | null;
|
|
12
|
+
indicatorProps: SelectorProps['indicatorProps'];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 根据预设配置生成 layout 和 indicatorProps
|
|
16
|
+
* Layout 规则:
|
|
17
|
+
* - 根据 variant 和 preset.variant 计算布局样式
|
|
18
|
+
* IndicatorProps 规则:
|
|
19
|
+
* 1. 当 variant='card' 且 preset.variant='2' 时,indicator 默认 variant='filled'
|
|
20
|
+
* 2. 当 variant='media' 时,indicator 默认 variant='filled'
|
|
21
|
+
* 3. 外部传入的 indicatorProps 优先级更高(会合并到预设配置中)
|
|
22
|
+
*/
|
|
23
|
+
declare const usePresetProps: ({ layout, mode, preset, itemLayout, variant, indicatorProps, }: UsePresetPropsParams) => UsePresetPropsResult;
|
|
24
|
+
export default usePresetProps;
|