@pisell/private-materials 6.3.142 → 6.3.144

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.
Files changed (49) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/scanOrder/components/Check/index.js +2 -1
  8. package/es/components/scanOrder/context.js +16 -8
  9. package/lib/components/scanOrder/components/Check/index.js +3 -1
  10. package/lib/components/scanOrder/context.js +6 -0
  11. package/package.json +1 -1
  12. package/es/components/scanOrder/components/Cart/index.d.ts +0 -16
  13. package/es/components/scanOrder/components/Check/index.d.ts +0 -3
  14. package/es/components/scanOrder/components/Content/index.d.ts +0 -3
  15. package/es/components/scanOrder/components/Footer/index.d.ts +0 -12
  16. package/es/components/scanOrder/components/Menu/index.d.ts +0 -18
  17. package/es/components/scanOrder/types.d.ts +0 -79
  18. package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +0 -21
  19. package/es/components/scanOrder/utils/transformProductDetail.d.ts +0 -59
  20. package/es/components/venueBooking/components/Addons/index.d.ts +0 -3
  21. package/es/components/venueBooking/components/Cart/index.d.ts +0 -28
  22. package/es/components/venueBooking/components/Checkout/index.d.ts +0 -2
  23. package/es/components/venueBooking/components/Footer/index.d.ts +0 -3
  24. package/es/components/venueBooking/components/Header/index.d.ts +0 -2
  25. package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.d.ts +0 -2
  26. package/es/components/venueBooking/context.d.ts +0 -9
  27. package/es/components/venueBooking/hooks.d.ts +0 -72
  28. package/es/components/venueBooking/index.d.ts +0 -6
  29. package/es/components/venueBooking/locales.d.ts +0 -627
  30. package/es/components/venueBooking/types.d.ts +0 -204
  31. package/lib/components/scanOrder/components/Cart/index.d.ts +0 -16
  32. package/lib/components/scanOrder/components/Check/index.d.ts +0 -3
  33. package/lib/components/scanOrder/components/Content/index.d.ts +0 -3
  34. package/lib/components/scanOrder/components/Footer/index.d.ts +0 -12
  35. package/lib/components/scanOrder/components/Menu/index.d.ts +0 -18
  36. package/lib/components/scanOrder/types.d.ts +0 -79
  37. package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +0 -21
  38. package/lib/components/scanOrder/utils/transformProductDetail.d.ts +0 -59
  39. package/lib/components/venueBooking/components/Addons/index.d.ts +0 -3
  40. package/lib/components/venueBooking/components/Cart/index.d.ts +0 -28
  41. package/lib/components/venueBooking/components/Checkout/index.d.ts +0 -2
  42. package/lib/components/venueBooking/components/Footer/index.d.ts +0 -3
  43. package/lib/components/venueBooking/components/Header/index.d.ts +0 -2
  44. package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.d.ts +0 -2
  45. package/lib/components/venueBooking/context.d.ts +0 -9
  46. package/lib/components/venueBooking/hooks.d.ts +0 -72
  47. package/lib/components/venueBooking/index.d.ts +0 -6
  48. package/lib/components/venueBooking/locales.d.ts +0 -627
  49. package/lib/components/venueBooking/types.d.ts +0 -204
@@ -1,204 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Dayjs } from 'dayjs';
3
- /** 场地预订步骤枚举 */
4
- export declare type VenueBookingStepKey = 'select-venue' | 'addons' | 'checkout';
5
- /** 场地预订组件入口 props */
6
- export interface VenueBookingProps {
7
- biz?: string;
8
- resource_id?: string;
9
- }
10
- /** 标准化后的入口上下文(从 engine props 提取) */
11
- export interface VenueBookingEntryContext {
12
- biz: string;
13
- resource_id?: string;
14
- }
15
- /** 单个时段(来自 getTimeSlotGrid) */
16
- export interface VenueResourceSlot {
17
- startTime: string;
18
- endTime: string;
19
- status: 'past' | 'occupied' | 'available' | 'partially_occupied' | 'unavailable';
20
- price: string | null;
21
- /** per-product 子行的 slot 带 productId;外层合并 slot 不带 */
22
- productId?: number;
23
- }
24
- /** 多商品共享一个 resource 时的子行 */
25
- export interface VenueResourceSubRow {
26
- productId: number;
27
- productTitle: string;
28
- price: string;
29
- slots: VenueResourceSlot[];
30
- }
31
- /** 单个资源/场地(来自 getTimeSlotGrid) */
32
- export interface VenueResource {
33
- resourceId: number;
34
- resourceName: string;
35
- /** 单商品时唯一;多商品时取第一个(兼容字段,请优先使用 products) */
36
- productId: number;
37
- productTitle: string;
38
- slots: VenueResourceSlot[];
39
- /** 多商品子行;仅当 hasMultipleProducts 时存在 */
40
- products?: VenueResourceSubRow[];
41
- hasMultipleProducts?: boolean;
42
- /** 组合资源元信息(combined_resource.status === 1) */
43
- combinedResource?: {
44
- resourceIds: Array<number | string>;
45
- };
46
- }
47
- /** 日期时段网格(来自 getTimeSlotGrid) */
48
- export interface VenueTimeSlotGrid {
49
- date: string;
50
- timeLabels: string[];
51
- resources: VenueResource[];
52
- }
53
- /** 日期概览(来自 getDateRangeSummary) */
54
- export interface VenueDateSummaryItem {
55
- date: string;
56
- status: 'available' | 'few_left' | 'sold_out' | 'unavailable';
57
- startingPrice: string | null;
58
- totalSlots: number;
59
- availableSlots: number;
60
- }
61
- /** 时段价格信息(用于 TimeGrid 渲染样式) */
62
- export interface SlotPriceInfo {
63
- price: number;
64
- originalPrice: number | null;
65
- label: string;
66
- highlight: boolean;
67
- }
68
- /** 时段标签(Off-Peak / Promo 等) */
69
- export interface SlotTag {
70
- text: string;
71
- className: string;
72
- }
73
- /** 日期元数据(用于 DayTabs 展示状态标签) */
74
- export interface DateMeta {
75
- topTag: string | null;
76
- startingPrice: string | null;
77
- fewLeft: boolean;
78
- soldOut: boolean;
79
- unavailable: boolean;
80
- }
81
- /** 场地维度的可用性概况 */
82
- export interface CourtMeta {
83
- soldOut: boolean;
84
- fewLeft: boolean;
85
- }
86
- /** 时段维度的可用性概况 */
87
- export interface TimeMeta {
88
- soldOut: boolean;
89
- fewLeft: boolean;
90
- }
91
- /**
92
- * 视图模型 -- 聚合场地数据 + OS 模块数据
93
- * dateSummary / timeSlotGrid 来自 PisellOS venueBooking 模块
94
- * cartItems / summary / note 从 OS 模块快照构建
95
- */
96
- export interface VenueBookingViewModel {
97
- /** 一周日期概览(状态 + 起步价) */
98
- dateSummary: VenueDateSummaryItem[];
99
- /** 当前选中日期的时段网格(资源 × 时段) */
100
- timeSlotGrid: VenueTimeSlotGrid | null;
101
- /** 购物车商品列表(ShoppingCart 组件所需格式) */
102
- cartItems: any[];
103
- /** 金额汇总对象(total_amount / tax_fee 等) */
104
- summary: Record<string, any>;
105
- /** 订单备注 */
106
- note: string;
107
- /** 联系人信息(tempOrder.contacts_info) */
108
- contactsInfo: any[];
109
- /** 场地商品列表(来自 loadVenueProducts / getVenueProducts) */
110
- venueProducts: any[];
111
- /** 附加商品列表(缓存在 context 中,避免步骤切换时丢失) */
112
- addonProductList: any[];
113
- }
114
- /** Context 暴露给所有子组件的完整值类型 */
115
- export interface VenueBookingContextValue {
116
- /** PisellOS venueBooking 模块实例 */
117
- venueBookingModule: any;
118
- /** 当前步骤 */
119
- currentStep: VenueBookingStepKey;
120
- /** 步骤列表 */
121
- stepList: VenueBookingStepKey[];
122
- /** 聚合视图模型 */
123
- viewModel: VenueBookingViewModel;
124
- /** 日历锚点日期 */
125
- anchorDate: Dayjs;
126
- /** 场地类型筛选器 */
127
- filter: string;
128
- /** 场地搜索关键字 */
129
- search: string;
130
- /** 数据加载中(初始 bootstrap) */
131
- isLoading: boolean;
132
- /** 周视图(dateSummary)加载中:拉取一周场地概览网络请求期间为 true */
133
- isWeekLoading: boolean;
134
- /** 时段网格(timeSlotGrid)加载中:切换日期 / 切换周时短暂为 true */
135
- isGridLoading: boolean;
136
- /** 预订上限提示信息 */
137
- limitMessage: string;
138
- /** 移动端购物车抽屉是否展开 */
139
- mobileCartOpen: boolean;
140
- /** 月份选择器是否展开 */
141
- monthPickerOpen: boolean;
142
- /** 月份选择器当前游标月份 */
143
- monthCursor: Dayjs;
144
- /** 是否满足进入下一步的条件 */
145
- canNext: boolean;
146
- /** 购物车校验状态(从 OS 事件同步) */
147
- cartValidation: {
148
- passed: boolean | null;
149
- failures: any[];
150
- };
151
- /** Footer 操作按钮文案 */
152
- footerActionText: string;
153
- /** 下单提交中状态 */
154
- isSubmittingOrder: boolean;
155
- /** 是否已登录 */
156
- isLogin: boolean;
157
- /** 打开登录弹窗 */
158
- openLoginModal: (params: {
159
- callback: (status: string) => void;
160
- }) => void;
161
- /** 当前折扣/优惠券列表 */
162
- discountList: any[];
163
- /** 定金协议是否已勾选 */
164
- isAgreeDepositPolicy: boolean;
165
- /** 设置定金协议勾选状态 */
166
- setIsAgreeDepositPolicy: (val: boolean) => void;
167
- /** 步骤导航:跳转到指定步骤 */
168
- goToStep: (step: VenueBookingStepKey) => void;
169
- /** 步骤导航:下一步 */
170
- nextStep: () => void;
171
- /** 步骤导航:上一步 */
172
- prevStep: () => void;
173
- setAnchorDate: (date: Dayjs) => void;
174
- setFilter: (filter: string) => void;
175
- setSearch: (search: string) => void;
176
- setLimitMessage: (msg: string) => void;
177
- setMobileCartOpen: (open: boolean) => void;
178
- setMonthPickerOpen: (open: boolean) => void;
179
- setMonthCursor: (cursor: Dayjs) => void;
180
- setFooterActionText: (text: string) => void;
181
- /** 切换选中/取消某个时段(调用 OS venueBooking.toggleSlot) */
182
- toggleSlot: (resourceId: number, productId: number, slot: VenueResourceSlot) => Promise<void>;
183
- /** 刷新 OS 模块视图模型(调用 getSummary + 重建 viewModel),可选传入额外字段合并 */
184
- refreshViewModel: (extraFields?: Partial<VenueBookingViewModel>) => Promise<void>;
185
- /** 拉取指定周的资源数据并刷新 dateSummary + timeSlotGrid */
186
- fetchWeekData: (startDate: string, endDate: string) => Promise<void>;
187
- /** 从指定日期开始自动跳转到最近可用日期(必要时自动滚到后续周) */
188
- goToNearestAvailableDate: (fromDate: Dayjs) => Promise<void>;
189
- /** 刷新当前日期的 timeSlotGrid */
190
- refreshTimeSlotGrid: (date?: string) => void;
191
- /** 安全调用 OS 模块方法的快捷入口 */
192
- runModuleAction: (actionName: string, ...args: any[]) => Promise<any>;
193
- /** 更新订单备注到 OS 模块 */
194
- updateOrderNote: (note: string) => Promise<void>;
195
- /** 主操作按钮行为(根据当前步骤不同执行不同逻辑) */
196
- handlePrimaryAction: () => void;
197
- /** 结账步骤提交订单 */
198
- handleSubmitOrder: () => Promise<void>;
199
- }
200
- /** Provider 组件的 props */
201
- export interface VenueBookingProviderProps {
202
- entryContext: VenueBookingEntryContext;
203
- children: React.ReactNode;
204
- }