@pisell/private-materials 6.11.144 → 6.11.145

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 (65) 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/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  8. package/es/components/booking/components/footer/index.js +5 -2
  9. package/es/components/checkout/PaymentModal.d.ts +1 -1
  10. package/es/components/checkout/PaymentModal.js +10 -5
  11. package/es/plus/pisellReservation/floorMap/reservationMock.d.ts +2 -0
  12. package/es/plus/pisellReservation/floorMap/reservationMock.js +17 -5
  13. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  14. package/lib/components/booking/components/footer/index.js +8 -2
  15. package/lib/components/checkout/PaymentModal.d.ts +1 -1
  16. package/lib/components/checkout/PaymentModal.js +10 -5
  17. package/lib/plus/pisellReservation/floorMap/reservationMock.d.ts +2 -0
  18. package/lib/plus/pisellReservation/floorMap/reservationMock.js +10 -1
  19. package/package.json +4 -4
  20. package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
  21. package/es/components/pay/toB/paymentMethods/index.d.ts +0 -11
  22. package/es/components/pay/toB/types/index.d.ts +0 -82
  23. package/es/plus/pisellReservation/PisellReservation.d.ts +0 -11
  24. package/es/plus/pisellReservation/components/BucketButtonGroup.d.ts +0 -33
  25. package/es/plus/pisellReservation/components/PisellReservationSubcomponents.d.ts +0 -80
  26. package/es/plus/pisellReservation/components/ReservationBookingStatusButtonFilter.d.ts +0 -21
  27. package/es/plus/pisellReservation/components/ReservationHudDrawerQuickFilters.d.ts +0 -7
  28. package/es/plus/pisellReservation/components/ReservationHudDrawerResourceRail.d.ts +0 -19
  29. package/es/plus/pisellReservation/components/ReservationPaymentStatusButtonFilter.d.ts +0 -19
  30. package/es/plus/pisellReservation/data/hudDrawerLocalListQuery.d.ts +0 -20
  31. package/es/plus/pisellReservation/data/reservationTablesMerge.d.ts +0 -27
  32. package/es/plus/pisellReservation/floorMap/ReservationFloorMapHud.d.ts +0 -49
  33. package/es/plus/pisellReservation/floorMap/ReservationHudDrawerHandle.d.ts +0 -30
  34. package/es/plus/pisellReservation/floorMap/reservationHudResourceRootBuckets.d.ts +0 -16
  35. package/es/plus/pisellReservation/floorRoomCard/FloorRoomCardFromData.d.ts +0 -17
  36. package/es/plus/pisellReservation/floorRoomCard/floorRoomCardUtils.d.ts +0 -110
  37. package/es/plus/pisellReservation/hooks/usePisellReservationBookingData.d.ts +0 -65
  38. package/es/plus/pisellReservation/hooks/useReservationSalesHostData.d.ts +0 -37
  39. package/es/plus/pisellReservation/locales/locales-ja.d.ts +0 -150
  40. package/es/plus/pisellReservation/locales/locales-pt.d.ts +0 -150
  41. package/es/plus/pisellReservation/locales/locales.d.ts +0 -743
  42. package/es/plus/pisellReservation/reservationConstants.d.ts +0 -1190
  43. package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
  44. package/lib/components/pay/toB/paymentMethods/index.d.ts +0 -11
  45. package/lib/components/pay/toB/types/index.d.ts +0 -82
  46. package/lib/plus/pisellReservation/PisellReservation.d.ts +0 -11
  47. package/lib/plus/pisellReservation/components/BucketButtonGroup.d.ts +0 -33
  48. package/lib/plus/pisellReservation/components/PisellReservationSubcomponents.d.ts +0 -80
  49. package/lib/plus/pisellReservation/components/ReservationBookingStatusButtonFilter.d.ts +0 -21
  50. package/lib/plus/pisellReservation/components/ReservationHudDrawerQuickFilters.d.ts +0 -7
  51. package/lib/plus/pisellReservation/components/ReservationHudDrawerResourceRail.d.ts +0 -19
  52. package/lib/plus/pisellReservation/components/ReservationPaymentStatusButtonFilter.d.ts +0 -19
  53. package/lib/plus/pisellReservation/data/hudDrawerLocalListQuery.d.ts +0 -20
  54. package/lib/plus/pisellReservation/data/reservationTablesMerge.d.ts +0 -27
  55. package/lib/plus/pisellReservation/floorMap/ReservationFloorMapHud.d.ts +0 -49
  56. package/lib/plus/pisellReservation/floorMap/ReservationHudDrawerHandle.d.ts +0 -30
  57. package/lib/plus/pisellReservation/floorMap/reservationHudResourceRootBuckets.d.ts +0 -16
  58. package/lib/plus/pisellReservation/floorRoomCard/FloorRoomCardFromData.d.ts +0 -17
  59. package/lib/plus/pisellReservation/floorRoomCard/floorRoomCardUtils.d.ts +0 -110
  60. package/lib/plus/pisellReservation/hooks/usePisellReservationBookingData.d.ts +0 -65
  61. package/lib/plus/pisellReservation/hooks/useReservationSalesHostData.d.ts +0 -37
  62. package/lib/plus/pisellReservation/locales/locales-ja.d.ts +0 -150
  63. package/lib/plus/pisellReservation/locales/locales-pt.d.ts +0 -150
  64. package/lib/plus/pisellReservation/locales/locales.d.ts +0 -743
  65. package/lib/plus/pisellReservation/reservationConstants.d.ts +0 -1190
@@ -1,27 +0,0 @@
1
- /**
2
- * 内置列表模式下:资源台位行(每张桌 id=平面图 dataBinding.recordId) +
3
- * 当日预约列表(宿主 getResourceBookingList 或 `floorDayBookingList`)→ merge 成平面图 dataSources.tables。
4
- * 预约子集由接口侧 `form_record_ids`(画布绑定资源)与 `booking_time_start_between`(营业日窗)约束,
5
- * **不再**按顶栏日程 `at` 游标做「当前时刻可见」二次筛选。
6
- */
7
- import type { ReservationScheduleBandValue } from '@pisell/materials';
8
- import type { PisellReservationTableRow } from '../types';
9
- /**
10
- * 将宿主 `sales.getResourceBookingList` 的返回值规范为 booking 项数组(便于走 bookingListToReservationTableRows)
11
- */
12
- export declare function normalizeSalesResourceBookingListResult(raw: unknown): unknown[];
13
- export declare function buildReservationMergedTableRows(options: {
14
- dataSourcesProp?: Record<string, unknown>;
15
- gridDataSourceKey: string;
16
- isInternalListData: boolean;
17
- resourceList: unknown[];
18
- floorDayBookingList: unknown[];
19
- schedule: ReservationScheduleBandValue;
20
- dataProp: unknown[] | null | undefined;
21
- /**
22
- * 若宿主存在 `sales.getResourceBookingList`,其解析后的列表将写入此处;
23
- * 有值时优先用于与资源桌合并(每张桌按其资源 id 对应预约)。
24
- * `null` / `undefined` 表示使用 `floorDayBookingList` 全量(已由接口按画布资源等筛过)。
25
- */
26
- salesResourceBookings?: unknown[] | null;
27
- }): PisellReservationTableRow[];
@@ -1,49 +0,0 @@
1
- /**
2
- * 预约平面图视口悬浮:当前画布桌位总数与各状态数量(空闲 / 预约 / 使用中等)
3
- */
4
- import React from 'react';
5
- import { type FloorMapDataSources, type FloorMapMergedItem } from '@pisell/materials';
6
- import './ReservationFloorMapHud.less';
7
- /** 场控左下抽屉:无台位且未展开时可隐藏整块 */
8
- export declare function reservationFloorMapHudSeatStatsTotal(items: FloorMapMergedItem[], dataSources: FloorMapDataSources | undefined): number;
9
- export declare type ReservationFloorMapHudStatsBarProps = {
10
- items: FloorMapMergedItem[];
11
- dataSources: FloorMapDataSources | undefined;
12
- /** 右侧操作(overlay 下箭头 / Sheet 关闭等) */
13
- rightSlot: React.ReactNode;
14
- /**
15
- * true:无台位时不渲染(与底栏 HUD 一致);
16
- * false:Sheet 顶栏无台位时仍保留一行,仅展示右侧 slot
17
- */
18
- hideWhenNoSeats?: boolean;
19
- className?: string;
20
- };
21
- /**
22
- * 横向状态统计 + 右侧 slot:底栏 HUD 与 Sheet 顶栏共用(方案 A:两处可同时展示相同统计)。
23
- */
24
- export declare function ReservationFloorMapHudStatsBar(props: ReservationFloorMapHudStatsBarProps): JSX.Element | null;
25
- export declare type ReservationFloorMapHudTitleBarProps = {
26
- items: FloorMapMergedItem[];
27
- dataSources: FloorMapDataSources | undefined;
28
- /** 收起态:展开画布列表;展开态:收起 */
29
- actionMode: 'expand' | 'collapse';
30
- onAction: () => void;
31
- /** 嵌入 Sheet 顶栏时不画浮层卡片(避免双边线) */
32
- embedded?: boolean;
33
- className?: string;
34
- };
35
- /**
36
- * 场控:单行标题栏 = 标题 + 内联统计 + 展开/收起,与 Sheet 顶栏共用。
37
- */
38
- export declare function ReservationFloorMapHudTitleBar(props: ReservationFloorMapHudTitleBarProps): JSX.Element | null;
39
- export interface ReservationFloorMapHudProps {
40
- items: FloorMapMergedItem[];
41
- dataSources: FloorMapDataSources | undefined;
42
- /** 为 true 时左下标题栏:标题 + 统计 + 展开/收起(抽屉打开时仍保留,不「整块消失」) */
43
- interactive?: boolean;
44
- onRequestOpenTable?: () => void;
45
- onRequestCloseTable?: () => void;
46
- /** 画布资源列表抽屉是否已打开 */
47
- tableDrawerOpen?: boolean;
48
- }
49
- export declare function ReservationFloorMapHud(props: ReservationFloorMapHudProps): JSX.Element | null;
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- export interface ReservationHudDrawerHandleProps {
3
- /** 关闭抽屉。点击或下拖超过阈值时调用。 */
4
- onClose: () => void;
5
- /**
6
- * 触发关闭的下拖位移阈值(px)。短促的微小拖动不算关闭,避免误触;
7
- * 用户从手柄向下「甩一下」即可关。默认 80px ≈ 一个手指节。
8
- */
9
- closeOffsetPx?: number;
10
- /**
11
- * 抽屉根节点 ref:拖动时给它实时打 transform: translateY,让面板跟着手指走;
12
- * 松手后再决定「滑回原位」或「滑出关闭」。可不传——不传则只做关闭决策、不做跟随动画。
13
- */
14
- drawerRef?: React.RefObject<HTMLElement | null>;
15
- }
16
- /**
17
- * 抽屉顶端的「抓手 + 拍击区」:
18
- * - 视觉上是一条居中的胶囊形 bar,给用户一个「这里可以拖 / 可以点」的暗示;
19
- * - 点击:直接关闭抽屉;
20
- * - 指针下拖:传入 drawerRef 时,面板会实时跟随手指下移;
21
- * • 松手时位移 ≥ closeOffsetPx → 平滑滑出底部并关闭;
22
- * • 否则回弹到原位。
23
- *
24
- * 直接 mutate `drawerRef.current.style.transform` 而不是走 React state,是因为
25
- * 拖动每一帧都重渲染整个抽屉(PisellRecordBoard + 表格)开销太大。命令式风格
26
- * 把动画限制在 DOM 层、React 树不参与,掉帧风险最小。组件卸载 / 关闭后由抽屉
27
- * 节点本身被 unmount 一并清理,不留残留 inline style。
28
- */
29
- export declare const ReservationHudDrawerHandle: React.FC<ReservationHudDrawerHandleProps>;
30
- export default ReservationHudDrawerHandle;
@@ -1,16 +0,0 @@
1
- /**
2
- * HUD 抽屉右侧竖栏:与 Filter「Resource」同源,写入 `filter.values.form_record_ids`。
3
- * 资源列表来自 GET /shop/form/resource/page。
4
- *
5
- * 优先按列表内 `parent_id` 推断树的第一层节点;若父链缺失会导致「每条记录都是根」、按钮爆炸,
6
- * 则回退为按 `form_id`(资源所属表单)聚合——对应 Filter 里顶层资源类型/主类,而非单个 form_record。
7
- */
8
- import type { BucketDef } from '../components/BucketButtonGroup';
9
- /** 与抽屉 / Filter 共用的 `searchParams.filter.values.form_record_ids` 读取 */
10
- export declare function extractFilterFormRecordIds(searchParams: Record<string, unknown>): string[];
11
- /**
12
- * 从 form/resource/page 扁平 list 构建第一层桶。
13
- * - 列表内父子链完整时:与 TreeSelect 第一层语义一致(根及其子树 id);
14
- * - 父链缺失导致伪根过多时:按 `form_id` 聚合为「主类」桶,避免竖栏铺满具体资源名。
15
- */
16
- export declare function buildResourceRootBuckets(rawList: unknown[]): BucketDef[];
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- import type { FloorRoomCardData } from './floorRoomCardModel';
3
- import './ReservationFloorRoomCard.less';
4
- export declare type FloorRoomCardFromDataProps = {
5
- data: FloorRoomCardData;
6
- shellShape?: 'rect' | 'circle';
7
- elementLayoutHeightPx?: number;
8
- hideHeaderCapacity?: boolean;
9
- /**
10
- * 覆盖顶栏左侧主标题(如详情弹窗用 `order_id`);不传则用 `data.main_field`。
11
- */
12
- headerMainFieldOverride?: string;
13
- };
14
- /**
15
- * 与 {@link ReservationFloorRoomCard} 同款 DOM 与分支,无外层主题根、无定时刷新。
16
- */
17
- export declare function FloorRoomCardFromData(props: FloorRoomCardFromDataProps): JSX.Element;
@@ -1,110 +0,0 @@
1
- import type { PisellReservationTableRow } from '../types';
2
- import type { FloorRoomCardBooking, FloorRoomCardData } from './floorRoomCardModel';
3
- /** 统一的起止毫秒(供资源墙/卡片兼容层复用,避免重复推断) */
4
- export declare function floorRoomCardBookingStartEndMs(booking: Pick<FloorRoomCardBooking, 'start_date' | 'start_time' | 'end_date' | 'end_time'>): {
5
- start: number;
6
- end: number;
7
- };
8
- /**
9
- * 预留态时间行:图元内仅展示时刻 + 文案后缀,不展示开始日期。
10
- */
11
- export declare function formatFloorRoomCardBookingStartLine(booking: Pick<FloorRoomCardBooking, 'start_date' | 'start_time'>, endSuffix: string): string;
12
- /**
13
- * 占用态时间行:图元内仅展示结束时刻 + 后缀,不展示结束日期。
14
- */
15
- export declare function formatFloorRoomCardBookingEndLine(booking: Pick<FloorRoomCardBooking, 'end_date' | 'end_time'>, endSuffix: string): string;
16
- /**
17
- * 「下一条」等时段:图元内只写起止时刻,不写日期。
18
- */
19
- export declare function formatFloorRoomCardBookingTimeRange(booking: Pick<FloorRoomCardBooking, 'start_date' | 'start_time' | 'end_date' | 'end_time'>): string;
20
- /** 预约时段内进度 0–100(与 demo getProgressPercent 一致,使用真实时间) */
21
- export declare function getFloorRoomCardProgressPercent(startDate: string, startTime: string, endDate: string, endTime: string, nowMs?: number): number;
22
- /**
23
- * 进度条百分比:优先宿主 `progressPercent`(0–100),否则按起止时间与当前时刻推算。
24
- */
25
- export declare function resolveFloorRoomCardProgressPercent(booking: Pick<FloorRoomCardBooking, 'start_date' | 'start_time' | 'end_date' | 'end_time' | 'progressPercent'>, nowMs?: number): number;
26
- /** 将分钟数格式化为「10m」「1h 5m」等(图元迟到/超时展示) */
27
- export declare function formatFloorRoomCardDurationMinutes(totalMin: number): string;
28
- /** 已超过结束时刻的加时时长文案 */
29
- export declare function getFloorRoomCardOvertime(endDate: string, endTime: string, nowMs?: number): string | null;
30
- /** 已逾开始时刻的「迟到」时长 */
31
- export declare function getFloorRoomCardLateTime(startDate: string, startTime: string, nowMs?: number): string | null;
32
- /** 距开始时刻的倒计时分钟(不含文案前缀);仅本地起止时间推算 */
33
- export declare function getFloorRoomCardArrivalMinutes(room: FloorRoomCardData, nowMs?: number): number | null;
34
- /**
35
- * 预留态「还有 n 分钟」:优先宿主 `remainingReserveTime`(分钟,>0),否则 {@link getFloorRoomCardArrivalMinutes}
36
- */
37
- export declare function resolveFloorRoomCardReservedCountdownMinutes(room: FloorRoomCardData, nowMs?: number): number | null;
38
- /**
39
- * 多预约列表中单条:与 {@link resolveFloorRoomCardReservedCountdownMinutes} 一致,但针对当前行 booking。
40
- */
41
- export declare function resolveFloorRoomCardReservedCountdownMinutesForBooking(booking: FloorRoomCardBooking, nowMs?: number): number | null;
42
- /**
43
- * 紧凑多预约行:仅当该条 booking 有宿主 `lateTime`(分钟)时为 late,否则 not_arrived(不按本地时刻推算迟到)。
44
- */
45
- export declare function getFloorRoomCardReservedRowBodyType(booking: FloorRoomCardBooking, _nowMs?: number): 'not_arrived' | 'late';
46
- declare type BookingTimeFields = Pick<FloorRoomCardBooking, 'start_date' | 'start_time' | 'end_date' | 'end_time'>;
47
- /** 当前时刻是否落在预约时段内 [start, end)(进行中) */
48
- export declare function isFloorRoomCardBookingInProgress(booking: BookingTimeFields, nowMs?: number): boolean;
49
- /** 当前时刻是否在预约开始之前(未开始) */
50
- export declare function isFloorRoomCardBookingNotStarted(booking: BookingTimeFields, nowMs?: number): boolean;
51
- /**
52
- * 第一条预约进行中且其后仍有未开始的时段:返回第一条「未开始」预约,用于 Next 行。
53
- * 不依赖 cardType(不必 late/timeout)。
54
- */
55
- export declare function getFloorRoomCardNextNotStartedBooking(data: FloorRoomCardData, nowMs?: number): FloorRoomCardBooking | null;
56
- /**
57
- * 多条预约里恰好一条 `hostBookingStatus === 'occupied'` 时:把该条排到首位,便于标准占用卡用 bookings[0] 展示。
58
- * 多条同时为 occupied 或未标记 host 时不改顺序。
59
- */
60
- export declare function reorderBookingsForSingleOccupiedPrimary(list: FloorRoomCardBooking[]): FloorRoomCardBooking[];
61
- /**
62
- * 多条预约且仅一条为 occupied:按开始时间排序后,取占用段之后的下一条(用于 Next 行)。
63
- */
64
- export declare function getFloorRoomCardNextAfterSingleOccupiedBooking(data: FloorRoomCardData): FloorRoomCardBooking | null;
65
- /**
66
- * 多条均为预留(无 occupied):`bookings` 已按开始时间排好,主卡为 [0],Next 为紧邻的下一条。
67
- */
68
- export declare function getFloorRoomCardNextAfterPrimaryReserved(data: FloorRoomCardData): FloorRoomCardBooking | null;
69
- /**
70
- * 接口标记 `isNext` 的预约:按开始时间取第一条,供 Next 行展示。
71
- */
72
- export declare function getFloorRoomCardExplicitNextBooking(data: FloorRoomCardData): FloorRoomCardBooking | null;
73
- /**
74
- * 与 {@link buildCardBodyViewModel} Next 行同一套优先级:接口 `is_next`/`isNext` →
75
- * 单 occupied 后一条 → 多条 reserved 第二条 →「进行中」后首条未开始。
76
- */
77
- export declare function resolveFloorRoomCardNextBookingLikeBodyModel(data: FloorRoomCardData, nowMs?: number): FloorRoomCardBooking | null;
78
- /** Next 条客人一行:与 FloorRoomCardFromData `nextGuestLineForStrip` 一致 */
79
- export declare function formatFloorRoomCardNextGuestStripLine(b: FloorRoomCardBooking): string;
80
- /**
81
- * 联系人展示一行:与 `buildCardBodyViewModel` 的 `guestDisplayLine` 一致。
82
- * - 优先姓名
83
- * - 预留态可展示手机号尾号(脱敏)
84
- */
85
- export declare function formatFloorRoomCardGuestDisplayLine(holder: FloorRoomCardBooking['holder'], showPhone: boolean): string;
86
- /**
87
- * 主区域展示用:第一条非 `isNext`;若全部为 next 则回退首条。
88
- */
89
- export declare function getFloorRoomCardPrimaryBooking(data: FloorRoomCardData): FloorRoomCardBooking | undefined;
90
- /**
91
- * 多条预约且均为预留态(host 为 reserved 或未标):按开始时间排序,主卡只展示最近一档,其余走 Next。
92
- */
93
- export declare function reorderBookingsAllReservedChronological(list: FloorRoomCardBooking[]): FloorRoomCardBooking[];
94
- /** 与 demo getCardType 一致 */
95
- export declare function getFloorRoomCardType(room: FloorRoomCardData): 'empty' | 'locked' | 'multi_occupied' | 'multi_reserved' | 'not_arrived' | 'late' | 'payed' | 'payment_required' | 'timeout';
96
- /**
97
- * 平面图 RoomCard 联系人手机号展示:与 {@link ReservationFloorRoomCard} ContactInfo 一致。
98
- */
99
- export declare function maskPisellReservationPhoneTail(phone: string): string | null;
100
- /**
101
- * 房间标题:优先数据行 `main_field` 展示名(` ## ` 前为主名称),其次 `code`,最后图元编辑名。
102
- * 与平面图 `reservationCards` 绑定桌位卡一致。
103
- */
104
- export declare function displayRoomTitleFromRow(row: PisellReservationTableRow, sceneElementName: string | undefined): string;
105
- /**
106
- * 展示用名称:`main_field` 按 ` ## ` 分段且有两段及以上时取**第二段**(常见「内部码 ## 展示名」),
107
- * 否则取第一段;再无则回退 {@link displayRoomTitleFromRow}。
108
- */
109
- export declare function displayRoomShowNameFromRow(row: PisellReservationTableRow, sceneElementName: string | undefined): string;
110
- export {};
@@ -1,65 +0,0 @@
1
- import { type Dayjs } from 'dayjs';
2
- /** 避免 `?? []` 每次 render 新数组引用,触发依赖 list 的 effect 死循环 */
3
- export declare const EMPTY_RESERVATION_LIST: unknown[];
4
- export declare function bookingWindowClockOrDefault(operatingDayBoundary?: unknown): string;
5
- /**
6
- * 营业日锚定:`core.operating_day_boundary`(`start_time`/`end_time`)界钟当日 — 次日同钟;
7
- * 无有效配置时与 {@link RESERVATION_TIMELINE_BUSINESS_RANGE} 一致(02:00)。
8
- */
9
- export declare function bookingTimeWindowForAnchorDay(anchorDay: Dayjs, operatingDayBoundary?: unknown): [Dayjs, Dayjs];
10
- /**
11
- * 日历跨日视口:从 rangeStart 所在自然日界钟到 rangeEnd 的次日界钟(与单日营业窗首尾相接)。
12
- */
13
- export declare function bookingTimeWindowForCalendarRange(rangeStart: Date, rangeEnd: Date, operatingDayBoundary?: unknown): [Dayjs, Dayjs];
14
- /**
15
- * Monitor / 平面图列表初始筛:支付态 + 锚定营业日 `booking_time_start_between`。
16
- */
17
- export declare function getDefaultMonitorSearchParams(anchorDay?: Dayjs, operatingDayBoundary?: unknown): Record<string, unknown>;
18
- /**
19
- * 表格视图初始筛选项:与 Sales Monitor 一致——支付态 + **今日营业日窗口**。
20
- * 传入店铺 `operating_day_boundary` 时与时间轴界钟一致。
21
- */
22
- export declare function getGridTableBookingSearchParams(operatingDayBoundary?: unknown): Record<string, unknown>;
23
- export interface UsePisellReservationBookingDataOptions {
24
- /** 列表单页条数;平面图按日合并台位时宜用大页 */
25
- listPageSize?: number;
26
- /** 初始筛选项;不传则与 Sales Monitor 一致(含当前营业日预约窗口) */
27
- getInitialSearchParams?: () => Record<string, unknown>;
28
- /**
29
- * 合并进每次请求的扁平参数(在 `filter.values` 展开之后),如平面图
30
- * `form_record_ids: number[]` 按当前资源桌筛选预约。
31
- */
32
- extraRequestParams?: Record<string, unknown>;
33
- /**
34
- * 是否启用列表 WebSocket 推送并用 `mutate` 覆盖当前数据(`osServer` + `subscriberId`)。
35
- * 表格全量/分页必须与接口 HTTP 结果一致,应设为 `false`:推送常为平面图子集(如仅绑定桌),
36
- * 会覆盖刚返回的整页列表,表现为「请求 50 条只显示几条且像平面图资源」。
37
- * 平面图合并用 booking 请求可保持默认 `true`。
38
- */
39
- subscribeRealtimePush?: boolean;
40
- }
41
- /** 内置列表数据 hook 返回结构(booking / resource 页共用) */
42
- export interface UsePisellReservationBookingDataResult {
43
- data: unknown[];
44
- loading: boolean;
45
- total: number;
46
- pagination: {
47
- pageNumber: number;
48
- pageSize: number;
49
- };
50
- onPageChange: (pageNumber: number, pageSize: number) => void;
51
- searchParams: Record<string, unknown>;
52
- onSearch: (params: Record<string, unknown>) => void;
53
- onReset: () => void;
54
- refresh: () => void;
55
- refreshAsync: () => Promise<unknown>;
56
- /** 函数式合并 searchParams 并重置到第一页(用于日程变更) */
57
- patchSearchParams: (updater: (prev: Record<string, unknown>) => Record<string, unknown>) => void;
58
- /**
59
- * WS 推送 mutate 后的累计版本号;下游 hook(如 `useReservationSalesHostData`)
60
- * 把它作为 effect dep,可保证「即使 booking 内容字段未触发 cheap hash 变化,
61
- * 也能在每次推送后重新拉取宿主 sales 列表」,避免画布在 push 后不刷新。
62
- */
63
- pushDataVersion: number;
64
- }
65
- export declare function usePisellReservationBookingData(enabled: boolean, options?: UsePisellReservationBookingDataOptions): UsePisellReservationBookingDataResult;
@@ -1,37 +0,0 @@
1
- import { type MutableRefObject } from 'react';
2
- import { type Dayjs } from 'dayjs';
3
- import type { ReservationScheduleBandValue } from '@pisell/materials';
4
- import type { TimeRangeOption } from '@pisell/materials';
5
- import type { PisellReservationProps } from '../types';
6
- declare type PisellOSLike = {
7
- getModule?: (name: string) => unknown;
8
- } | null | undefined;
9
- /**
10
- * 内置列表且资源台 + floorDayBooking 均就绪后,向宿主 sales 拉两套数据:
11
- * - `getResourceBookingList`:游标时刻下的预约子集,参与合并进平面图 dataSources;
12
- * - `getTimelineHighlights`:时间轴密度折线(无则退回 PisellReservation 内本地计算)。
13
- */
14
- export declare function useReservationSalesHostData(options: {
15
- isInternalListData: boolean;
16
- pisellosRef: MutableRefObject<PisellOSLike>;
17
- hasPisellosGetModule: boolean;
18
- debouncedSchedule: ReservationScheduleBandValue;
19
- resourceBoardLoading: boolean;
20
- floorDayBookingLoading: boolean;
21
- floorDayBookingData: unknown[];
22
- /**
23
- * `usePisellReservationBookingData` 在每次 WS 推送 mutate 后递增的版本号。
24
- * 加进 effect deps 是为了兜底 `floorDayBookingDepKey` cheap hash 漏判的字段
25
- * (如 customer / notes / relation_id 换桌等):只要有推送到达,就一定刷新
26
- * 宿主 sales 列表,避免画布在 push 之后看上去不更新。
27
- */
28
- floorDayBookingDataVersion: number;
29
- scheduleDate: Dayjs;
30
- timeNavigatorPropsProp?: PisellReservationProps['timeNavigatorProps'];
31
- /** 与顶栏 TimeNavigator、日历日列对齐的营业区间(已含 props 覆盖与 core 回退) */
32
- timelineRange: TimeRangeOption;
33
- }): {
34
- salesResourceBookings: unknown[] | null;
35
- salesTimelineHighlights: number[] | null;
36
- };
37
- export {};
@@ -1,150 +0,0 @@
1
- /** PisellReservation — 日本語 */
2
- declare const _default: {
3
- 'pisell-reservation.page-title': string;
4
- 'pisell-reservation.page-title-venue': string;
5
- 'pisell-reservation.new': string;
6
- 'pisell-reservation.new-modal-title': string;
7
- 'pisell-reservation.new-modal-placeholder': string;
8
- 'pisell-reservation.cancel': string;
9
- 'pisell-reservation.edit-map': string;
10
- 'pisell-reservation.edit-map-done': string;
11
- 'pisell-reservation.follow-current': string;
12
- 'pisell-reservation.view-grid': string;
13
- 'pisell-reservation.view-floor': string;
14
- 'pisell-reservation.view-calendar': string;
15
- 'pisell-reservation.view-resource-wall': string;
16
- 'pisell-reservation.resource-wall-resources': string;
17
- 'pisell-reservation.payment-status-bucket-unpaid': string;
18
- 'pisell-reservation.payment-status-bucket-paid': string;
19
- 'pisell-reservation.booking-status-bucket-on-site': string;
20
- 'pisell-reservation.booking-status-bucket-no-show': string;
21
- 'pisell-reservation.booking-status-bucket-completed': string;
22
- 'pisell-reservation.calendar-granularity-day': string;
23
- 'pisell-reservation.calendar-granularity-week': string;
24
- 'pisell-reservation.calendar-granularity-month': string;
25
- 'pisell-reservation.calendar-write-not-available': string;
26
- 'pisell-reservation.follow-live-time': string;
27
- 'pisell-reservation.follow-custom-time': string;
28
- 'pisell-reservation.follow-live-hint': string;
29
- 'pisell-reservation.follow-custom-hint': string;
30
- 'pisell-reservation.switch-to-custom-time': string;
31
- 'pisell-reservation.switch-to-live-time': string;
32
- 'pisell-reservation.non-current-hint': string;
33
- 'pisell-reservation.at-current-time': string;
34
- 'pisell-reservation.go-current': string;
35
- 'pisell-reservation.schedule-data-loading': string;
36
- 'pisell-reservation.hud-open-table-aria': string;
37
- 'pisell-reservation.hud-table-drawer-title': string;
38
- 'pisell-reservation.hud-drawer-resource-canvas-placeholder': string;
39
- 'pisell-reservation.hud-sheet-close-aria': string;
40
- 'pisell-reservation.hud-expand-aria': string;
41
- 'pisell-reservation.hud-collapse-aria': string;
42
- 'pisell-reservation.grid.code': string;
43
- 'pisell-reservation.grid.area': string;
44
- 'pisell-reservation.grid.status': string;
45
- 'pisell-reservation.grid.guest': string;
46
- 'pisell-reservation.grid.time': string;
47
- 'pisell-reservation.grid.party': string;
48
- 'pisell-reservation.canvas.main': string;
49
- 'pisell-reservation.canvas.secondary': string;
50
- 'pisell-reservation.canvas.vip': string;
51
- 'pisell-reservation.maintenance': string;
52
- 'pisell-reservation.next': string;
53
- 'pisell-reservation.party': string;
54
- 'pisell-reservation.more': string;
55
- 'pisell-reservation.late': string;
56
- 'pisell-reservation.floor-hud.total': string;
57
- 'pisell-reservation.floor-hud.interactive-title': string;
58
- 'pisell-reservation.floor-map.data-source-label': string;
59
- 'pisell-reservation.floor-map.category-background': string;
60
- 'pisell-reservation.floor-map.palette-image-bg': string;
61
- 'pisell-reservation.floor-plan.save-failed': string;
62
- 'pisell-reservation.card-placeholder.hint-select-row': string;
63
- 'pisell-reservation.card-placeholder.hint-bind-datasource': string;
64
- 'pisell-reservation.card-placeholder.hint-new-slot': string;
65
- 'pisell-reservation.card-placeholder.hint-row-not-found': string;
66
- 'pisell-reservation.resource-grid.id': string;
67
- 'pisell-reservation.resource-grid.name': string;
68
- 'pisell-reservation.resource-grid.form-code': string;
69
- 'pisell-reservation.resource-grid.capacity': string;
70
- 'pisell-reservation.resource-grid.schedule': string;
71
- 'pisell-reservation.resource-grid.form-id': string;
72
- 'pisell-reservation.resource-grid.card-status': string;
73
- 'pisell-reservation.room-kind-bound': string;
74
- 'pisell-reservation.room-kind-bound-round': string;
75
- 'pisell-reservation.room-status-occupied': string;
76
- 'pisell-reservation.room-status-reserved': string;
77
- 'pisell-reservation.room-status-empty': string;
78
- 'pisell-reservation.room-status-locked': string;
79
- 'pisell-reservation.room-empty-body': string;
80
- 'pisell-reservation.room-status-unbound': string;
81
- 'pisell-reservation.room-paid': string;
82
- 'pisell-reservation.room-unpaid': string;
83
- 'pisell-reservation.room-payment-needed': string;
84
- 'pisell-reservation.room-items-total': string;
85
- 'pisell-reservation.room-modal-bookings': string;
86
- 'pisell-reservation.room-cap-prefix': string;
87
- 'pisell-reservation.room-time-end': string;
88
- 'pisell-reservation.room-time-start': string;
89
- 'pisell-reservation.room-in-minutes': string;
90
- 'pisell-reservation.room-view-all': string;
91
- 'pisell-reservation.room-occupancy-sum': string;
92
- 'pisell-reservation.room-next-prefix': string;
93
- 'pisell-reservation.room-guest-unknown': string;
94
- 'pisell-reservation.room-collapse': string;
95
- 'pisell-reservation.booking-detail.modal-title': string;
96
- 'pisell-reservation.booking-detail.booking-id': string;
97
- 'pisell-reservation.booking-detail.status': string;
98
- 'pisell-reservation.booking-detail.contact': string;
99
- 'pisell-reservation.booking-detail.phone': string;
100
- 'pisell-reservation.booking-detail.time': string;
101
- 'pisell-reservation.booking-detail.staff': string;
102
- 'pisell-reservation.booking-detail.staff-unassigned': string;
103
- 'pisell-reservation.booking-detail.table': string;
104
- 'pisell-reservation.booking-detail.payment': string;
105
- 'pisell-reservation.booking-detail.total': string;
106
- 'pisell-reservation.booking-detail.tab-info': string;
107
- 'pisell-reservation.booking-detail.tab-notes': string;
108
- 'pisell-reservation.booking-detail.tab-form': string;
109
- 'pisell-reservation.booking-detail.empty-notes': string;
110
- 'pisell-reservation.booking-detail.empty-items': string;
111
- 'pisell-reservation.booking-detail.empty-form': string;
112
- 'pisell-reservation.booking-detail.booking-label': string;
113
- 'pisell-reservation.booking-detail.strip-items-total': string;
114
- 'pisell-reservation.booking-detail.strip-due-label': string;
115
- 'pisell-reservation.booking-detail.see-all': string;
116
- 'pisell-reservation.booking-detail.header-mode-aria': string;
117
- 'pisell-reservation.booking-detail.header-mode-order-strip': string;
118
- 'pisell-reservation.booking-detail.header-mode-room-card': string;
119
- 'pisell-reservation.booking-detail.action-grid-aria': string;
120
- 'pisell-reservation.booking-detail.action-edit': string;
121
- 'pisell-reservation.booking-detail.action-cart': string;
122
- 'pisell-reservation.booking-detail.action-print': string;
123
- 'pisell-reservation.booking-detail.action-form': string;
124
- 'pisell-reservation.booking-detail.action-list': string;
125
- 'pisell-reservation.booking-detail.action-close': string;
126
- 'pisell-reservation.booking-detail.to-pay': string;
127
- 'pisell-reservation.booking-detail.order-open': string;
128
- 'pisell-reservation.booking-detail.order-already-paid': string;
129
- 'pisell-reservation.booking-detail.meta-host-status': string;
130
- 'pisell-reservation.booking-detail.meta-line-amount': string;
131
- 'pisell-reservation.booking-detail.meta-timeout': string;
132
- 'pisell-reservation.booking-detail.meta-progress': string;
133
- 'pisell-reservation.booking-detail.meta-arrival': string;
134
- 'pisell-reservation.booking-detail.status-enum.started': string;
135
- 'pisell-reservation.booking-detail.status-enum.confirmed': string;
136
- 'pisell-reservation.booking-detail.status-enum.active': string;
137
- 'pisell-reservation.booking-detail.status-enum.checked_in': string;
138
- 'pisell-reservation.booking-detail.status-enum.checkin': string;
139
- 'pisell-reservation.booking-detail.status-enum.in_progress': string;
140
- 'pisell-reservation.booking-detail.status-enum.pending': string;
141
- 'pisell-reservation.booking-detail.status-enum.pending_payment': string;
142
- 'pisell-reservation.booking-detail.status-enum.draft': string;
143
- 'pisell-reservation.booking-detail.status-enum.waiting': string;
144
- 'pisell-reservation.booking-detail.status-enum.hold': string;
145
- 'pisell-reservation.booking-detail.status-enum.cancelled': string;
146
- 'pisell-reservation.booking-detail.status-enum.canceled': string;
147
- 'pisell-reservation.booking-detail.status-enum.void': string;
148
- 'pisell-reservation.booking-detail.status-enum.refunded': string;
149
- };
150
- export default _default;