@pisell/materials 6.11.65 → 6.11.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/es/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/es/components/pisellReservationScheduleBand/types.d.ts +61 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +11 -3
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +40 -0
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +37 -6
- package/es/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +37 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +49 -25
- package/es/components/pisellTimeNavigator/index.d.ts +5 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +65 -0
- package/es/components/pisellTimeNavigator/utils/index.js +66 -6
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +10 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.stories.d.ts +16 -0
- package/lib/components/pisellReservationScheduleBand/index.d.ts +2 -0
- package/lib/components/pisellReservationScheduleBand/types.d.ts +61 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +10 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +6 -2
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.stories.d.ts +79 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +40 -0
- package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +32 -4
- package/lib/components/pisellTimeNavigator/components/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +37 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.js +27 -15
- package/lib/components/pisellTimeNavigator/index.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +65 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +32 -4
- package/package.json +1 -1
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +0 -59
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -15
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +0 -57
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -26
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +0 -5
- package/es/components/pisellFloorMapLayout/types.d.ts +0 -666
- package/es/components/pisellRecordBoard/index.d.ts +0 -51
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -73
- package/es/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.d.ts +0 -18
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.d.ts +0 -26
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.d.ts +0 -7
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.d.ts +0 -21
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +0 -49
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +0 -57
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.d.ts +0 -10
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.d.ts +0 -11
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.d.ts +0 -3
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.d.ts +0 -8
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.d.ts +0 -3
- package/es/components/pisellRecordBoard/types.d.ts +0 -835
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +0 -10
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.d.ts +0 -59
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -15
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +0 -57
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -26
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +0 -5
- package/lib/components/pisellFloorMapLayout/types.d.ts +0 -666
- package/lib/components/pisellRecordBoard/index.d.ts +0 -51
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -73
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.d.ts +0 -18
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.d.ts +0 -26
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.d.ts +0 -7
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.d.ts +0 -21
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +0 -49
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +0 -57
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.d.ts +0 -10
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.d.ts +0 -11
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.d.ts +0 -3
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.d.ts +0 -8
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.d.ts +0 -3
- package/lib/components/pisellRecordBoard/types.d.ts +0 -835
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +0 -10
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import GridLayout from './layouts/GridLayout';
|
|
3
|
-
import CardLayout from './layouts/CardLayout';
|
|
4
|
-
import RecordBoardShellFrame, { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, RecordBoardFloorMap, RecordBoardCalendar, RecordBoardResourceWall } from './shellFrame';
|
|
5
|
-
import RecordBoardGridView from './layouts/GridLayout/Grid';
|
|
6
|
-
import RecordBoardCardList from './layouts/CardLayout/CardList';
|
|
7
|
-
import { useRecordBoardContext } from './hooks/useRecordBoardContext';
|
|
8
|
-
import type { RecordBoardProps } from './types';
|
|
9
|
-
/** RecordBoard 复合组件类型 */
|
|
10
|
-
interface PisellRecordBoardType extends React.FC<RecordBoardProps> {
|
|
11
|
-
/** Shell Frame:对 Layout 的扩展,提供 ToolBar + BatchActionBar + children(Layout) */
|
|
12
|
-
ShellFrame: typeof RecordBoardShellFrame;
|
|
13
|
-
/** Grid 布局:仅内容区(表格 + 分页),需配合 ShellFrame 使用 */
|
|
14
|
-
GridLayout: typeof GridLayout;
|
|
15
|
-
/** 卡片布局:仅内容区(卡片列表 + 分页),需配合 ShellFrame 使用 */
|
|
16
|
-
CardLayout: typeof CardLayout;
|
|
17
|
-
/**
|
|
18
|
-
* 平面图槽位:仅在 ShellFrame 内声明,无 DOM; props 与 PisellFloorMapLayout 对齐。
|
|
19
|
-
* 与 GridLayout 同时存在时出现「表格 / 平面图」切换。
|
|
20
|
-
*/
|
|
21
|
-
FloorMap: typeof RecordBoardFloorMap;
|
|
22
|
-
/**
|
|
23
|
-
* 日历槽位:仅在 ShellFrame 内声明,无 DOM;与 GridLayout / FloorMap 并存时出现「表格 / 平面图 / 日历」切换。
|
|
24
|
-
*/
|
|
25
|
-
Calendar: typeof RecordBoardCalendar;
|
|
26
|
-
/**
|
|
27
|
-
* 大屏资源墙槽位:仅在 ShellFrame 内声明,无 DOM;与其它主区并存时出现视图切换。
|
|
28
|
-
*/
|
|
29
|
-
ResourceWall: typeof RecordBoardResourceWall;
|
|
30
|
-
/** 单独使用:搜索槽(PisellFind,绑定 searchParams.keyword / onSearch) */
|
|
31
|
-
Search: typeof RecordBoardSearch;
|
|
32
|
-
/** 单独使用:工具栏(PisellToolBar,含搜索/导出,可透传 topLeft/topRight 等) */
|
|
33
|
-
ToolBar: typeof RecordBoardToolBar;
|
|
34
|
-
/** 单独使用:分页槽 */
|
|
35
|
-
Pagination: typeof RecordBoardPagination;
|
|
36
|
-
/** 单独使用:Grid 视图(表格) */
|
|
37
|
-
Grid: typeof RecordBoardGridView;
|
|
38
|
-
/** 单独使用:卡片列表视图 */
|
|
39
|
-
CardList: typeof RecordBoardCardList;
|
|
40
|
-
/** 多选操作栏(基于 PisellBatchActionBar,有选中项时展示) */
|
|
41
|
-
BatchActionBar: typeof RecordBoardBatchActionBar;
|
|
42
|
-
/** 消费 RecordBoard 上下文 */
|
|
43
|
-
useRecordBoardContext: typeof useRecordBoardContext;
|
|
44
|
-
}
|
|
45
|
-
declare const PisellRecordBoard: PisellRecordBoardType;
|
|
46
|
-
export default PisellRecordBoard;
|
|
47
|
-
export type { RecordBoardProps, RecordBoardLayoutType, RecordBoardContextValue, RecordBoardChildComponentProps, RecordBoardGridProps, RecordBoardColumnType, RecordBoardFieldType, RecordBoardColumnFilterConfig, RecordBoardOptionItem, RecordBoardGetOptions, RecordBoardBodyView, RecordBoardFloorMapProps, RecordBoardCalendarProps, RecordBoardCalendarBlockedTimePayload, RecordBoardCalendarResource, RecordBoardCalendarBookingLike, RecordBoardCalendarDayOverlayBooking, RecordBoardCalendarTimelineHeaderGroup, RecordBoardCalendarTimelineHeaderRenderContext, RecordBoardCalendarResourceRenderArgs, RecordBoardCalendarBookingRenderArgs, RecordBoardBookingMoveDraft, RecordBoardBlockedTimeMergedRange, RecordBoardBlockedTimePanelPayload, RecordBoardCreateBookingDayGroup, RecordBoardCreateBookingFromSelectionPayload, RecordBoardCalendarSelectedFreeSlot, RecordBoardToolBarProps, RecordBoardResourceWallProps, RecordBoardResourceWallCardModel, RecordBoardResourceWallLayoutPersist, } from './types';
|
|
48
|
-
export { DEFAULT_RESOURCE_WALL_LAYOUT_PERSIST } from './types';
|
|
49
|
-
export { useRecordBoardContext } from './hooks/useRecordBoardContext';
|
|
50
|
-
export { useRecordBoardShellBodyMeta } from './shellFrame';
|
|
51
|
-
export { DEFAULT_RESOURCE_WALL_FILTER_FIELD_KEY } from './shellFrame/ResourceWall/PisellRecordBoardResourceWallView';
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BookingCalendar 专用类型(不放入全局 RecordBoard types,避免对外膨胀)。
|
|
3
|
-
*/
|
|
4
|
-
import type { RecordBoardCalendarBookingLike } from '../../types';
|
|
5
|
-
import type { CalendarBookingSegmentInput, SelectedSlotLike } from './utils/bookingCalendarDateUtils';
|
|
6
|
-
import type { Dayjs } from 'dayjs';
|
|
7
|
-
/** 资源视图格子选中:仅记 court + 日 */
|
|
8
|
-
export declare type ResourceCellPick = {
|
|
9
|
-
courtId: string;
|
|
10
|
-
dateKey: string;
|
|
11
|
-
};
|
|
12
|
-
/** 顶栏粒度切换 */
|
|
13
|
-
export declare type CalendarViewMode = 'resource' | 'day' | 'week' | 'month';
|
|
14
|
-
export declare type FreeSlotSelection = SelectedSlotLike & {
|
|
15
|
-
court?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare type OverflowListModalState = {
|
|
18
|
-
scope: string;
|
|
19
|
-
date: string;
|
|
20
|
-
title: string;
|
|
21
|
-
items: CalendarBookingSegmentInput[];
|
|
22
|
-
};
|
|
23
|
-
export declare type OverflowPopoverState = {
|
|
24
|
-
courtId: string;
|
|
25
|
-
date: string;
|
|
26
|
-
items: CalendarBookingSegmentInput[];
|
|
27
|
-
pinned?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export declare type MoveConfirmState = {
|
|
30
|
-
item: RecordBoardCalendarBookingLike;
|
|
31
|
-
targetCourtId: string;
|
|
32
|
-
targetDate: string;
|
|
33
|
-
targetHour: number;
|
|
34
|
-
};
|
|
35
|
-
export declare type MoveDraftState = {
|
|
36
|
-
targetCourtId: string;
|
|
37
|
-
targetDate: string;
|
|
38
|
-
targetHour: number;
|
|
39
|
-
};
|
|
40
|
-
export declare type TransitioningToDayState = {
|
|
41
|
-
source: string;
|
|
42
|
-
};
|
|
43
|
-
export declare type BlockTimeRange = [Dayjs, Dayjs] | null;
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/** BookingCalendarDemo:布局数值与虚拟列表高度等(无演示种子数据)。 */
|
|
2
|
-
export declare const timeSliceMinutes = 60;
|
|
3
|
-
/** 未传 timelineRange 时默认营业日界钟 */
|
|
4
|
-
export declare const DEFAULT_CALENDAR_TIMELINE: {
|
|
5
|
-
start: string;
|
|
6
|
-
end: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const frozenColWidth = 132;
|
|
9
|
-
export declare const dayColWidth = 92;
|
|
10
|
-
/**
|
|
11
|
-
* 日历「资源视图」横向每一「日」列宽度(按月天数铺开)。
|
|
12
|
-
* 略大于 {@link dayColWidth},仅作用于资源视图;日视图时间轴仍用 dayColWidth。
|
|
13
|
-
*/
|
|
14
|
-
export declare const resourceViewDayColWidth = 102;
|
|
15
|
-
/**
|
|
16
|
-
* 日/周视图空档虚线框:在父级为 column flex 且占满格高时 `flex-1 min-h-0` 纵向铺满剩余区域。
|
|
17
|
-
*/
|
|
18
|
-
export declare const CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME = "flex min-h-0 flex-1 w-full flex-col items-center justify-center rounded-lg border border-dashed px-2 py-1 text-xs";
|
|
19
|
-
/** 日视图无 overlay 时资源行默认高度;周视图 court 行与各日期格 `minHeight` 与之对齐 */
|
|
20
|
-
export declare const dayRowHeight = 44;
|
|
21
|
-
/**
|
|
22
|
-
* 资源视图月格:单条预约卡片**实际 min-height** 与「行高估算」共用此值。
|
|
23
|
-
* 调整此常量即可同步改变卡片显示高度与父行预留高度,避免行高与卡片高度不一致导致的截断 / 留白。
|
|
24
|
-
*/
|
|
25
|
-
export declare const RESOURCE_VIEW_BOOKING_CARD_EST_PX = 48;
|
|
26
|
-
/** 资源视图「+N」tile 的 min-height */
|
|
27
|
-
export declare const RESOURCE_VIEW_MORE_TILE_MIN_PX = 48;
|
|
28
|
-
/** 资源视图单元格 p-1 上下合计 */
|
|
29
|
-
export declare const RESOURCE_VIEW_CELL_PADDING_Y_PX = 8;
|
|
30
|
-
/** 资源视图 fullyBooked 占位块 min-height */
|
|
31
|
-
export declare const RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX = 28;
|
|
32
|
-
/** 日视图分组行默认高度(须容纳左侧折叠按钮等) */
|
|
33
|
-
export declare const groupRowHeight = 38;
|
|
34
|
-
export declare const dayHeaderHeight = 56;
|
|
35
|
-
/** 日视图 overlay 内单条预约卡片区最小高度(与 BookingCard、行高计算一致) */
|
|
36
|
-
export declare const DAY_BOOKING_CARD_MIN_PX = 64;
|
|
37
|
-
/** 日视图同一资源行内每条 lane 的最小高度(须 ≥ DAY_BOOKING_CARD_MIN_PX);并行时抬高该行 */
|
|
38
|
-
export declare const DAY_OVERLAY_LANE_MIN_PX = 64;
|
|
39
|
-
export declare const DAY_OVERLAY_INNER_TOP = 8;
|
|
40
|
-
export declare const DAY_OVERLAY_INNER_BOTTOM = 8;
|
|
41
|
-
export declare const DAY_OVERLAY_LANE_GAP = 2;
|
|
42
|
-
/** 同一重叠簇内最多展示的预约条数;超出合并为第 4 行的 +N(与日/周时间轴 overlay 一致) */
|
|
43
|
-
export declare const DAY_OVERLAY_VISIBLE_BOOKING_CAP = 3;
|
|
44
|
-
/**
|
|
45
|
-
* 日视图:某 court 行在「有预约 overlay」时的总高度(px),随并行展示条数 `displayLaneCount` 变高而变高(非固定常数)。
|
|
46
|
-
* `displayLaneCount` 由 `effectiveDayOverlayDisplayLaneCount(最大并行数)` 得到,与 3+N 截断规则一致。
|
|
47
|
-
*/
|
|
48
|
-
export declare function dayCourtOverlayRowHeightPx(displayLaneCount: number): number;
|
|
49
|
-
/**
|
|
50
|
-
* 资源视图:按某一格「courtDaySummary」结果估算该格所需最小高度(px)。
|
|
51
|
-
* 用于横向虚拟化仅挂载可见日期列时,仍按**全月**最大内容撑开行高,避免日程只在屏幕外列时出现行高塌陷。
|
|
52
|
-
*/
|
|
53
|
-
export declare function estimateResourceViewCourtCellHeightPx(summary: {
|
|
54
|
-
fullyBooked: boolean;
|
|
55
|
-
items: unknown[];
|
|
56
|
-
}): number;
|
|
57
|
-
/** 低于该宽度时日视图预约条内难以排下两行文案,默认用 Tooltip 展示完整信息 */
|
|
58
|
-
export declare const DAY_BOOKING_NARROW_PX = 88;
|
|
59
|
-
/** 低于该宽度时条内仅保留居中首字/圆点,避免文字竖排或完全不可读 */
|
|
60
|
-
export declare const DAY_BOOKING_MICRO_PX = 32;
|
|
61
|
-
/** 日视图横向:视口外多渲染的槽列数(减轻快速滚动白边) */
|
|
62
|
-
export declare const DAY_VIEW_COL_BUFFER = 5;
|
|
63
|
-
/** 日视图纵向:视口外多渲染的像素边距 */
|
|
64
|
-
export declare const DAY_VIEW_ROW_BUFFER_PX = 240;
|
|
65
|
-
/** 月格「+N」悬停层:卡片区约 64px + 行间 8px,与 react-window itemSize 一致 */
|
|
66
|
-
export declare const MONTH_OVERFLOW_POPOVER_CARD_H = 64;
|
|
67
|
-
export declare const MONTH_OVERFLOW_POPOVER_ROW_GAP = 8;
|
|
68
|
-
export declare const MONTH_OVERFLOW_POPOVER_ITEM_H: number;
|
|
69
|
-
export declare const MONTH_OVERFLOW_POPOVER_LIST_MAX_H = 280;
|
|
70
|
-
export declare const OVERFLOW_MODAL_CARD_H = 100;
|
|
71
|
-
export declare const OVERFLOW_MODAL_ROW_GAP = 8;
|
|
72
|
-
export declare const OVERFLOW_MODAL_ROW_H: number;
|
|
73
|
-
export declare const OVERFLOW_MODAL_LIST_MAX_H = 420;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type CalendarBookingSegmentInput } from '../utils/bookingCalendarDateUtils';
|
|
2
|
-
export declare function useBookingCalendarDayOverlayLayout(visibleCourtRows: unknown[], dayKey: string, bookings: CalendarBookingSegmentInput[], hourSlots: number[], slotStepHours: number): {
|
|
3
|
-
dayRowHeights: number[];
|
|
4
|
-
dayRowTopMap: Record<string, number>;
|
|
5
|
-
overlayBookings: import("../utils/bookingCalendarDateUtils").BuiltDayOverlay[];
|
|
6
|
-
courtDayDisplayLaneCount: Record<string, number>;
|
|
7
|
-
hiddenDayOverlayIdSet: Set<string>;
|
|
8
|
-
dayOverlayOverflowPluses: {
|
|
9
|
-
key: string;
|
|
10
|
-
courtId: string;
|
|
11
|
-
rowTop: number;
|
|
12
|
-
rowHeight: number;
|
|
13
|
-
start: number;
|
|
14
|
-
span: number;
|
|
15
|
-
plusCount: number;
|
|
16
|
-
overflowItems: CalendarBookingSegmentInput[];
|
|
17
|
-
}[];
|
|
18
|
-
};
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { BlockTimeRange } from '../bookingCalendarInternalTypes';
|
|
3
|
-
export declare type BookingCalendarBlockPanelProps = {
|
|
4
|
-
blockPanelRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
-
isLight: boolean;
|
|
6
|
-
blockFormName: string;
|
|
7
|
-
setBlockFormName: (v: string) => void;
|
|
8
|
-
blockModalNote: string;
|
|
9
|
-
setBlockModalNote: (v: string) => void;
|
|
10
|
-
blockResourceId: string;
|
|
11
|
-
setBlockResourceId: (v: string) => void;
|
|
12
|
-
blockTimeRange: BlockTimeRange;
|
|
13
|
-
setBlockTimeRange: (v: BlockTimeRange) => void;
|
|
14
|
-
resolvedSlotMinutes: number;
|
|
15
|
-
visibleCourts: Array<{
|
|
16
|
-
id: string;
|
|
17
|
-
name: string;
|
|
18
|
-
}>;
|
|
19
|
-
blockSaving: boolean;
|
|
20
|
-
onClose: () => void;
|
|
21
|
-
onSave: () => void;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* 内置锁台 / 屏蔽时间表单(宿主未传 `onBlockedTimePanelRequest` 时使用)。
|
|
25
|
-
*/
|
|
26
|
-
export declare function BookingCalendarBlockPanel({ blockPanelRef, isLight, blockFormName, setBlockFormName, blockModalNote, setBlockModalNote, blockResourceId, setBlockResourceId, blockTimeRange, setBlockTimeRange, resolvedSlotMinutes, visibleCourts, blockSaving, onClose, onSave, }: BookingCalendarBlockPanelProps): React.JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RecordBoardCalendarBookingLike } from '../../../types';
|
|
3
|
-
import type { OverflowListModalState } from '../bookingCalendarInternalTypes';
|
|
4
|
-
export declare type BookingCalendarOverflowListLayerProps = {
|
|
5
|
-
overflowPanelRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
-
isLight: boolean;
|
|
7
|
-
modal: OverflowListModalState;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
onPickItem: (item: RecordBoardCalendarBookingLike) => void;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* 全局溢出预约列表弹层(月/周/资源格 `+N` 点开后)。
|
|
13
|
-
*/
|
|
14
|
-
export declare function BookingCalendarOverflowListLayer({ overflowPanelRef, isLight, modal, onClose, onPickItem, }: BookingCalendarOverflowListLayerProps): React.JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ResourceCellPick } from '../bookingCalendarInternalTypes';
|
|
2
|
-
/**
|
|
3
|
-
* 资源视图选区是否「同一 court + 连续多天」:
|
|
4
|
-
* 仅当满足时才允许 Block / Create Booking(与日视图「同 court 连续多小时」语义对应)。
|
|
5
|
-
* 单天选中(n === 1)也算连续。
|
|
6
|
-
*/
|
|
7
|
-
export declare function isResourceSelectionContiguousSameCourt(selections: ResourceCellPick[]): boolean;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type SelectedSlotLike } from '../utils/bookingCalendarDateUtils';
|
|
3
|
-
export declare type BookingCalendarDaySelectionBarProps = {
|
|
4
|
-
slotStepHours: number;
|
|
5
|
-
selectedFreeSlots: SelectedSlotLike[];
|
|
6
|
-
/**
|
|
7
|
-
* 资源视图:真实选中记在「按日格子」上,不向栏传入展开后的小时槽数组(避免与格数等价的巨数组 + 栏内重复排序)。
|
|
8
|
-
* 传此对象时,用其字段驱动显隐与锁台按钮,忽略 selected*Slots 的长度(传 [] 即可)。
|
|
9
|
-
*/
|
|
10
|
-
resourceSelectionSummary?: {
|
|
11
|
-
freePickCount: number;
|
|
12
|
-
blockPickCount: number;
|
|
13
|
-
/** 资源视图:仅单选时可点「屏蔽」 */
|
|
14
|
-
freeAllowsBlockPanel: boolean;
|
|
15
|
-
} | null;
|
|
16
|
-
deselectAll: () => void;
|
|
17
|
-
onOpenBlockPanel: () => void;
|
|
18
|
-
createBookingFromSelection: () => void;
|
|
19
|
-
};
|
|
20
|
-
/** 日视图底部:多选空闲 / 锁台后的固定操作条 */
|
|
21
|
-
export declare function BookingCalendarDaySelectionBar({ slotStepHours, selectedFreeSlots, resourceSelectionSummary, deselectAll, onOpenBlockPanel, createBookingFromSelection, }: BookingCalendarDaySelectionBarProps): React.JSX.Element | null;
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** 日视图:横向虚拟滚动时间轴 + 资源行,预约条按 lane 叠放与 +N 溢出 */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { RecordBoardCalendarProps } from '../../../types';
|
|
4
|
-
/** 日视图(含底部多选操作条) */
|
|
5
|
-
export declare function BookingCalendarDayView(dayProps: {
|
|
6
|
-
calendarProps: RecordBoardCalendarProps;
|
|
7
|
-
isLight: boolean;
|
|
8
|
-
view: string;
|
|
9
|
-
anchorDate: Date;
|
|
10
|
-
dayKey: string;
|
|
11
|
-
hourSlots: number[];
|
|
12
|
-
resolvedSlotMinutes: number;
|
|
13
|
-
slotColWidth: number;
|
|
14
|
-
firstTimelineHour: number;
|
|
15
|
-
endTimelineExclusive: number;
|
|
16
|
-
isBusinessHour: (h: number) => boolean;
|
|
17
|
-
dayHourRemaining: Record<number, {
|
|
18
|
-
remaining: number;
|
|
19
|
-
total: number;
|
|
20
|
-
ratio: number;
|
|
21
|
-
}>;
|
|
22
|
-
timelinePxPerHour: number;
|
|
23
|
-
dayContentHeight: number;
|
|
24
|
-
dayRowHeights: number[];
|
|
25
|
-
visibleCourtRows: any[];
|
|
26
|
-
overlayBookings: any[];
|
|
27
|
-
dayOverlayOverflowPluses: any[];
|
|
28
|
-
setCollapsedGroups: React.Dispatch<React.SetStateAction<any>>;
|
|
29
|
-
visibleCourts: any[];
|
|
30
|
-
bookings: any[];
|
|
31
|
-
slotStepHours: number;
|
|
32
|
-
isFreeSelected: (courtId: string, hour: number) => boolean;
|
|
33
|
-
isBlockSelected: (courtId: string, hour: number) => boolean;
|
|
34
|
-
toggleSlot: (courtId: string, hour: number) => void;
|
|
35
|
-
handleDropMove: (courtId: string, date: string, hour: number) => void;
|
|
36
|
-
hiddenDayOverlayIdSet: Set<string>;
|
|
37
|
-
courtDayDisplayLaneCount: Record<string, number>;
|
|
38
|
-
openBookingDetail: (item: any) => void;
|
|
39
|
-
setDraggingItem: (item: any) => void;
|
|
40
|
-
setNavDirection: (n: number) => void;
|
|
41
|
-
commitAnchor: (d: Date) => void;
|
|
42
|
-
setFocusedCourtId: (id: string | null) => void;
|
|
43
|
-
setOverflowListModal: React.Dispatch<React.SetStateAction<any>>;
|
|
44
|
-
selectedFreeSlots: any[];
|
|
45
|
-
selectedBlockSlots: any[];
|
|
46
|
-
focusedCourtId: string | null;
|
|
47
|
-
/** >0 表示刚从周/月切入日视图,需将横向滚动对准「当前时间」(仅当 dayKey 为今天时生效) */
|
|
48
|
-
dayTimelineScrollToNowToken: number;
|
|
49
|
-
}): React.JSX.Element;
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 资源视图(按月):与日视图同款骨架——冻结左列 + 横向滚动 + sticky 顶部表头。
|
|
3
|
-
*
|
|
4
|
-
* 与日视图的唯一差异:
|
|
5
|
-
* - 日视图:横轴 = 营业小时槽,cell = 一个小时;booking 通过 overlay 跨 cell 横铺。
|
|
6
|
-
* - 资源视图:横轴 = 当月每一天,cell = 一个 (court, date);booking 通过 overlay 在 cell 内
|
|
7
|
-
* 垂直 stack 渲染(最多 3 条 + `+N` 溢出 tile)。
|
|
8
|
-
*
|
|
9
|
-
* 性能策略(与日视图对齐):
|
|
10
|
-
* - cell 是「轻 placeholder」:只渲染背景色 + selected ring + 空 dashed slot/Selected 文本。
|
|
11
|
-
* - 所有 booking 卡片 / `+N` tile 由 `BookingOverlay` 单独 absolute 渲染,独立于 grid。
|
|
12
|
-
* - 这样 grid 内 DOM 极轻,浏览器每帧 paint/layout 与日视图同档(cell 内含复杂 booking
|
|
13
|
-
* 卡片时实测每列 ~7ms paint 成本,整月 30 列 → ~150ms;overlay 化后接近零)。
|
|
14
|
-
*
|
|
15
|
-
* 选中:与日视图 `toggleSlot(courtId, hour)` 等价的「`toggleResourceCell(courtId, dateKey)`」。
|
|
16
|
-
* 选中态合并到 cell 自身 className(与日视图一致),不插入额外 grid item,避免 CSS Grid 整表 reflow。
|
|
17
|
-
*/
|
|
18
|
-
import React from 'react';
|
|
19
|
-
import type { RecordBoardCalendarProps } from '../../../types';
|
|
20
|
-
declare type ResourceCellPick = {
|
|
21
|
-
courtId: string;
|
|
22
|
-
dateKey: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const BookingCalendarResourceView: React.MemoExoticComponent<typeof BookingCalendarResourceViewInner>;
|
|
25
|
-
declare function BookingCalendarResourceViewInner({ calendarProps, isLight, anchorDate, monthDays, slotColWidth, bookings, visibleCourts, visibleCourtRows, hourSlots, slotStepHours, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, overflowPopover, setOverflowPopover, setOverflowListModal, overflowPanelRef, resourceMonthScrollToTodayToken, resourceDayHeaderRemaining, toggleResourceCell, selectedResourceCells, }: {
|
|
26
|
-
calendarProps: RecordBoardCalendarProps;
|
|
27
|
-
isLight: boolean;
|
|
28
|
-
anchorDate: Date;
|
|
29
|
-
monthDays: Date[];
|
|
30
|
-
slotColWidth: number;
|
|
31
|
-
bookings: any[];
|
|
32
|
-
visibleCourts: any[];
|
|
33
|
-
visibleCourtRows: any[];
|
|
34
|
-
hourSlots: number[];
|
|
35
|
-
slotStepHours: number;
|
|
36
|
-
handleGridDropMove: (dateKey: string, courtId?: string | null) => void;
|
|
37
|
-
openBookingDetail: (item: any) => void;
|
|
38
|
-
setDraggingItem: (item: any) => void;
|
|
39
|
-
setCollapsedGroups: React.Dispatch<React.SetStateAction<any>>;
|
|
40
|
-
overflowPopover: any;
|
|
41
|
-
setOverflowPopover: React.Dispatch<React.SetStateAction<any>>;
|
|
42
|
-
setOverflowListModal: React.Dispatch<React.SetStateAction<any>>;
|
|
43
|
-
overflowPanelRef: React.RefObject<HTMLDivElement | null>;
|
|
44
|
-
/** 切入资源视图时递增,用于将横向滚动对准「今天」列 */
|
|
45
|
-
resourceMonthScrollToTodayToken: number;
|
|
46
|
-
/** 顶部表头当日空闲率(与日视图 freeRatio 同口径) */
|
|
47
|
-
resourceDayHeaderRemaining: Record<string, {
|
|
48
|
-
remaining: number;
|
|
49
|
-
total: number;
|
|
50
|
-
ratio: number;
|
|
51
|
-
}>;
|
|
52
|
-
/** 与日视图 `toggleSlot` 同义:点击 cell 切换 (court, date) 的整天选中态 */
|
|
53
|
-
toggleResourceCell: (courtId: string, dateKey: string) => void;
|
|
54
|
-
/** 当前所有「资源月视图」选中的 cell(同 court 连续多天 → SelectionBar 显示 Block/Create) */
|
|
55
|
-
selectedResourceCells: ResourceCellPick[];
|
|
56
|
-
}): React.JSX.Element;
|
|
57
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CalendarBookingSegmentInput } from '../../utils/bookingCalendarDateUtils';
|
|
2
|
-
export declare function useBookingCalendarDayHourRemaining(visibleCourts: Array<{
|
|
3
|
-
id: string;
|
|
4
|
-
}>, dayKey: string, bookings: CalendarBookingSegmentInput[], hourSlots: number[], slotStepHours: number, isBusinessHour: (h: number) => boolean): {
|
|
5
|
-
[k: string]: {
|
|
6
|
-
remaining: number;
|
|
7
|
-
total: number;
|
|
8
|
-
ratio: number;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import { type CalendarBookingSegmentInput } from '../../utils/bookingCalendarDateUtils';
|
|
3
|
-
import type { FreeSlotSelection } from '../../bookingCalendarInternalTypes';
|
|
4
|
-
export declare function useBookingCalendarDaySelection(dayKey: string, bookings: CalendarBookingSegmentInput[], hourSlots: number[], slotStepHours: number, courts: Array<{
|
|
5
|
-
id: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
}>, selectedFreeSlots: FreeSlotSelection[], selectedBlockSlots: FreeSlotSelection[], setSelectedFreeSlots: Dispatch<SetStateAction<FreeSlotSelection[]>>, setSelectedBlockSlots: Dispatch<SetStateAction<FreeSlotSelection[]>>): {
|
|
8
|
-
isFreeSelected: (courtId: string, hour: number) => boolean;
|
|
9
|
-
isBlockSelected: (courtId: string, hour: number) => boolean;
|
|
10
|
-
toggleSlot: (courtId: string, hour: number) => void;
|
|
11
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import type { ResourceCellPick } from '../../bookingCalendarInternalTypes';
|
|
3
|
-
export declare function useBookingCalendarResourceCellToggle(setSelectedResourceCells: Dispatch<SetStateAction<ResourceCellPick[]>>): (courtId: string, dateKey: string) => void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CalendarBookingSegmentInput } from '../../utils/bookingCalendarDateUtils';
|
|
2
|
-
export declare function useBookingCalendarResourceDayHeaderRemaining(resourceMonthDays: Date[], visibleCourts: Array<{
|
|
3
|
-
id: string;
|
|
4
|
-
}>, bookings: CalendarBookingSegmentInput[], hourSlots: number[], slotStepHours: number): Record<string, {
|
|
5
|
-
remaining: number;
|
|
6
|
-
total: number;
|
|
7
|
-
ratio: number;
|
|
8
|
-
}>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import type { CalendarViewMode, FreeSlotSelection, ResourceCellPick, TransitioningToDayState } from '../bookingCalendarInternalTypes';
|
|
3
|
-
export declare function useBookingCalendarGoToDayFromCell(anchorDate: Date, commitAnchor: (d: Date) => void, commitView: (v: CalendarViewMode) => void, setNavDirection: Dispatch<SetStateAction<number>>, setTransitioningToDay: Dispatch<SetStateAction<TransitioningToDayState | null>>, setSelectedFreeSlots: Dispatch<SetStateAction<FreeSlotSelection[]>>, setSelectedBlockSlots: Dispatch<SetStateAction<FreeSlotSelection[]>>, setSelectedResourceCells: Dispatch<SetStateAction<ResourceCellPick[]>>, setFocusedCourtId: Dispatch<SetStateAction<string | null>>): (day: Date, courtId: string | null, source: string) => void;
|