@pisell/materials 6.11.241 → 6.11.243

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 (177) 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 +4 -4
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +7 -7
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +24 -24
  9. package/es/components/PisellCards/index.d.ts +1 -0
  10. package/es/components/PisellFields/index.d.ts +1 -0
  11. package/es/components/PisellGroupView/PisellGroupView.d.ts +9 -0
  12. package/es/components/PisellGroupView/PisellGroupView.stories.d.ts +27 -0
  13. package/es/components/PisellGroupView/index.d.ts +6 -0
  14. package/es/components/PisellGroupView/types.d.ts +124 -0
  15. package/es/components/PisellGroupView/utils/index.d.ts +20 -0
  16. package/es/components/PisellLayouts/index.d.ts +1 -0
  17. package/es/components/PisellMetrics/index.d.ts +1 -0
  18. package/es/components/PisellTabbar/PisellTabbar.js +3 -4
  19. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  20. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
  21. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  22. package/es/components/dataSourceComponents/fields/index.d.ts +5 -4
  23. package/es/components/date-picker/index.d.ts +1 -0
  24. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
  25. package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
  26. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +89 -0
  27. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
  28. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +64 -0
  29. package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +49 -0
  30. package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +13 -0
  31. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
  32. package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
  33. package/es/components/pisellFloorMapLayout/index.d.ts +39 -0
  34. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +10 -0
  35. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +22 -0
  36. package/es/components/pisellFloorMapLayout/types.d.ts +769 -0
  37. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +27 -0
  38. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  39. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  40. package/es/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +24 -0
  41. package/es/components/pisellModal/components/index.d.ts +1 -0
  42. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  43. package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +9 -0
  44. package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +34 -0
  45. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +18 -0
  46. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +30 -0
  47. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +330 -0
  48. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +52 -0
  49. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +22 -0
  50. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +57 -0
  51. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +26 -0
  52. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  53. package/es/components/pisellRecordBoard/types.d.ts +899 -0
  54. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
  55. package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
  56. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
  57. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -3
  58. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  59. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -5
  60. package/es/components/productCard/cartSkuCard/components/inlineActions/index.js +3 -1
  61. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +22 -0
  62. package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +9 -0
  63. package/es/components/productCard/cartSkuCard/components/weighing/index.js +12 -14
  64. package/es/components/productCard/cartSkuCard/index.less +8 -1
  65. package/es/components/productCard/lineItem/components/Holders/index.d.ts +10 -0
  66. package/es/components/table/Table/fields/date/index.d.ts +1 -0
  67. package/es/components/table/Table/fields/index.d.ts +3 -2
  68. package/es/components/table/Table/fields/link/index.d.ts +1 -0
  69. package/es/components/table/Table/fields/number/index.d.ts +1 -0
  70. package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
  71. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  72. package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  73. package/es/components/table/Table/fields/search/index.d.ts +1 -0
  74. package/es/components/table/Table/fields/select/index.d.ts +1 -0
  75. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  76. package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  77. package/es/components/table/Table/utils.d.ts +1 -1
  78. package/es/components/virtual-keyboard/Time/index.d.ts +14 -0
  79. package/es/components/virtual-keyboard/index.d.ts +25 -0
  80. package/es/pisell-materials.tw.css +1 -1
  81. package/lib/components/PisellCards/index.d.ts +1 -0
  82. package/lib/components/PisellFields/index.d.ts +1 -0
  83. package/lib/components/PisellGroupView/PisellGroupView.d.ts +9 -0
  84. package/lib/components/PisellGroupView/PisellGroupView.stories.d.ts +27 -0
  85. package/lib/components/PisellGroupView/index.d.ts +6 -0
  86. package/lib/components/PisellGroupView/types.d.ts +124 -0
  87. package/lib/components/PisellGroupView/utils/index.d.ts +20 -0
  88. package/lib/components/PisellLayouts/index.d.ts +1 -0
  89. package/lib/components/PisellMetrics/index.d.ts +1 -0
  90. package/lib/components/PisellTabbar/PisellTabbar.js +2 -2
  91. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  92. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
  93. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  94. package/lib/components/dataSourceComponents/fields/index.d.ts +5 -4
  95. package/lib/components/date-picker/index.d.ts +1 -0
  96. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
  97. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
  98. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +89 -0
  99. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
  100. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +64 -0
  101. package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +49 -0
  102. package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +13 -0
  103. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
  104. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
  105. package/lib/components/pisellFloorMapLayout/index.d.ts +39 -0
  106. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +10 -0
  107. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +22 -0
  108. package/lib/components/pisellFloorMapLayout/types.d.ts +769 -0
  109. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +27 -0
  110. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  111. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  112. package/lib/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +24 -0
  113. package/lib/components/pisellModal/components/index.d.ts +1 -0
  114. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  115. package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +9 -0
  116. package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +34 -0
  117. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +18 -0
  118. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +30 -0
  119. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +330 -0
  120. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +52 -0
  121. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +22 -0
  122. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +57 -0
  123. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +26 -0
  124. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  125. package/lib/components/pisellRecordBoard/types.d.ts +899 -0
  126. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
  127. package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
  128. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
  129. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +1 -2
  130. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  131. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -6
  132. package/lib/components/productCard/cartSkuCard/components/inlineActions/index.js +2 -1
  133. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +22 -0
  134. package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +9 -0
  135. package/lib/components/productCard/cartSkuCard/components/weighing/index.js +11 -14
  136. package/lib/components/productCard/cartSkuCard/index.less +8 -1
  137. package/lib/components/productCard/lineItem/components/Holders/index.d.ts +10 -0
  138. package/lib/components/table/Table/fields/date/index.d.ts +1 -0
  139. package/lib/components/table/Table/fields/index.d.ts +3 -2
  140. package/lib/components/table/Table/fields/link/index.d.ts +1 -0
  141. package/lib/components/table/Table/fields/number/index.d.ts +1 -0
  142. package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
  143. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  144. package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  145. package/lib/components/table/Table/fields/search/index.d.ts +1 -0
  146. package/lib/components/table/Table/fields/select/index.d.ts +1 -0
  147. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  148. package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  149. package/lib/components/table/Table/utils.d.ts +1 -1
  150. package/lib/components/virtual-keyboard/Time/index.d.ts +14 -0
  151. package/lib/components/virtual-keyboard/index.d.ts +25 -0
  152. package/lib/pisell-materials.tw.css +1 -1
  153. package/package.json +3 -3
  154. package/es/components/PisellTabbar/index.d.ts +0 -10
  155. package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -12
  156. package/es/components/PisellTabbar/template/Template1/index.d.ts +0 -7
  157. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +0 -48
  158. package/es/components/pisellFind/index.d.ts +0 -69
  159. package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
  160. package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  161. package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  162. package/es/components/pisellLookup/types.d.ts +0 -797
  163. package/es/components/pisellRecordBoard/index.d.ts +0 -55
  164. package/es/components/pisellTimeRangeDisplay/index.d.ts +0 -3
  165. package/es/index.d.ts +0 -271
  166. package/lib/components/PisellTabbar/index.d.ts +0 -10
  167. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -12
  168. package/lib/components/PisellTabbar/template/Template1/index.d.ts +0 -7
  169. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +0 -48
  170. package/lib/components/pisellFind/index.d.ts +0 -69
  171. package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
  172. package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  173. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  174. package/lib/components/pisellLookup/types.d.ts +0 -797
  175. package/lib/components/pisellRecordBoard/index.d.ts +0 -55
  176. package/lib/components/pisellTimeRangeDisplay/index.d.ts +0 -3
  177. package/lib/index.d.ts +0 -271
@@ -0,0 +1,27 @@
1
+ import type { FloorMapCanvas, FloorMapCanvasNameI18n } from '../types';
2
+ /**
3
+ * 合并平面图 Tab 用多语言包(与业务侧 `locales.init` 可叠加)。
4
+ */
5
+ export declare function initFloorMapLayoutLocales(engineLocale: string): void;
6
+ /** 与 List / 预约等物料一致:storage → 宿主 getLocale → native_locale → materials 当前语言 */
7
+ export declare function getFloorMapDisplayLocale(engineCtx?: unknown): string;
8
+ /**
9
+ * 按当前语言(或显式传入语言)从平面图语言包取文案,**不依赖全局激活语言**
10
+ * (避免多组件 init 竞态),缺失时回退英文,再回退 key 本身。
11
+ */
12
+ export declare function getFloorMapLayoutText(id: string, displayLocale?: string): string;
13
+ /**
14
+ * 从多语言对象中取当前 locale 下展示字符串,缺省按 en → 其余首个非空。
15
+ */
16
+ export declare function pickFloorMapCanvasI18nString(obj: FloorMapCanvasNameI18n, engineLocale: string): string;
17
+ /**
18
+ * 画布在 Tab / 下拉中的展示名:
19
+ * 1. `name` 为多语言对象时 **优先** 按引擎 locale 取字段(与配置内嵌文案一致);
20
+ * 2. 否则 `nameKey` + `locales.getText`(需业务侧已 init 对应语言包);
21
+ * 3. 否则 `name` 字符串。
22
+ */
23
+ export declare function getFloorMapCanvasDisplayName(canvas: FloorMapCanvas, engineLocale: string): string;
24
+ /**
25
+ * 打开重命名弹层时的初始多语言值(与 Translation 表单一致)。
26
+ */
27
+ export declare function seedFloorMapCanvasNameI18n(canvas: FloorMapCanvas, displayFallback: string): FloorMapCanvasNameI18n;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 将当前画布的 sceneElements 合并为 Layout 使用的 FloorMapMergedItem[]
3
+ */
4
+ import type { FloorMapViewConfig, FloorMapMergedItem } from '../types';
5
+ /**
6
+ * 合并指定画布下的 sceneElements 为一份 items(用于 ItemLayer / EditableItemLayer)
7
+ */
8
+ export declare function mergeCanvasItems(canvasId: string, config: Pick<FloorMapViewConfig, 'sceneElements' | 'elementKinds'>, defaultCellSize?: number): FloorMapMergedItem[];
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 无 renderItemByKind 时的占位渲染(装饰、舞台等),避免画布上不显示
3
+ */
4
+ import React from 'react';
5
+ import type { FloorMapMergedItem } from '../types';
6
+ /**
7
+ * @returns 与 PisellFloorMapLayout 内联 fallback 一致的渲染函数(useCallback 由调用方包裹)
8
+ */
9
+ /** 绑定校验失败或 renderItemByKind 抛错时的占位 */
10
+ export declare function renderFloorMapRenderError(message: string): React.ReactNode;
11
+ export declare function renderFloorMapFallbackPlaceholder(item: FloorMapMergedItem): React.ReactNode;
@@ -0,0 +1,24 @@
1
+ import type { FloorMapMergedItem } from '../types';
2
+ export interface SelectionZoneRect {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ /** 该图元是否为选区 */
9
+ export declare function isSelectionZoneItem(item: {
10
+ elementKind?: string;
11
+ }): boolean;
12
+ /** zoneRect 是否「完全包含」itemRect(含边界,允许 1px 容差以抵消取整误差) */
13
+ export declare function rectFullyContains(zoneRect: SelectionZoneRect, itemRect: SelectionZoneRect, tolerance?: number): boolean;
14
+ /**
15
+ * 计算选区成员 id 列表(输入为像素矩形坐标系)。
16
+ *
17
+ * @param zoneId 选区自身 id(排除自身)
18
+ * @param zoneRect 选区矩形(像素)
19
+ * @param itemRects 画布上全部图元及其像素矩形
20
+ */
21
+ export declare function computeSelectionZoneMemberIds(zoneId: string, zoneRect: SelectionZoneRect, itemRects: Array<{
22
+ item: FloorMapMergedItem;
23
+ rect: SelectionZoneRect;
24
+ }>): string[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import IpadModal from './IpadModal';
2
3
  import MobileModal from './MobileModal';
3
4
  import PcModal from './PcModal';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { TableProps } from 'antd';
3
+ import type { RecordBoardContextValue } from '../../types';
4
+ import './Grid.less';
5
+ export interface RecordBoardGridViewProps extends Omit<TableProps<any>, 'dataSource' | 'loading' | 'pagination'>, Partial<Pick<RecordBoardContextValue, 'data' | 'loading'>> {
6
+ /** 列配置,同 antd Table columns */
7
+ columns?: TableProps<any>['columns'];
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ /** 自定义渲染,传入后不再使用内置 Table */
11
+ render?: (ctx: RecordBoardContextValue) => React.ReactNode;
12
+ }
13
+ declare const RecordBoardGridView: React.FC<RecordBoardGridViewProps>;
14
+ export default RecordBoardGridView;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * RecordBoard 预约日历:月 / 周 / 日三视图,资源分组与折叠、锁台、拖拽改期、日视图多 lane overlay。
3
+ * 受控:`calendarView`、`anchorDate`、`bookings` 等见 {@link RecordBoardCalendarProps};未传时由内部 state 驱动(便于 Story)。
4
+ */
5
+ import React from 'react';
6
+ import type { RecordBoardCalendarProps } from '../../types';
7
+ import './BookingCalendar.less';
8
+ /** 看板日历根组件:内含主题 CSS 与 Spin,按 `view` 挂载月 / 周 / 日子组件 */
9
+ export default function BookingCalendar(props?: RecordBoardCalendarProps): React.JSX.Element;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ /** UI 层:状态徽标文案走 i18n(utils 侧为 {@link statusTagMetaParts}) */
3
+ export declare function statusTagMeta(tag: string | null | undefined): {
4
+ label: string;
5
+ className: string;
6
+ } | null;
7
+ /** 锁台卡片副标题:操作人、锁台时间等拼接一行 */
8
+ export declare function getBlockMetaLine(item: any): string;
9
+ export declare function getRemainingToneClass(ratio: any, isLight?: boolean): "theme-text-muted" | "text-zinc-400" | "text-red-600" | "text-red-300" | "text-amber-600" | "text-amber-300";
10
+ /**
11
+ * @param options.flattenWhenAllGroupsCollapsed
12
+ * 若为 `true`:全部分组折叠时仅有 group 头、无 court 行,会退化为平铺 court(易与「全部展开」混淆)。
13
+ * 日/周/月日历统一为默认 `false`,保留分组头行与折叠态(与底部「全部关闭」预期一致)。
14
+ *
15
+ * 若全部资源只属于**一个**分组(含仅 VIP、仅 Standard、或仅一种自定义 type),日/周视图不展示分组头行,
16
+ * 直接平铺资源行(单组折叠时也同样平铺资源,避免只剩一条分组栏)。
17
+ */
18
+ export declare function buildGroupedCourtRows(courts: any, collapsedGroups?: {}, options?: {}): any;
19
+ /** 周/月/资源跨窗口 pill 左右续画标记(◀/▶);自定义 `renderMonthWeekBooking` 时由格容器包裹渲染 */
20
+ export declare function CalendarGridBookingClipMarkers({ clippedLeft, clippedRight, size, }: {
21
+ clippedLeft?: boolean;
22
+ clippedRight?: boolean;
23
+ /** `xs` 月视图 banner;`sm` 周/资源 pill */
24
+ size?: 'xs' | 'sm';
25
+ }): React.JSX.Element;
26
+ /** 日视图 overlay 内单条预约/锁台:窄宽自适应与 Tooltip */
27
+ export declare function BookingCard({ booking, dayKey, onOpenDetail, onDragStart, onJumpNext, overlayWidthPx, }: {
28
+ booking: any;
29
+ dayKey: any;
30
+ onOpenDetail: any;
31
+ onDragStart: any;
32
+ onJumpNext: any;
33
+ overlayWidthPx: any;
34
+ }): any;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { RecordBoardCalendarBookingLike, RecordBoardCalendarBookingRenderArgs } 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
+ /** 仅日视图 lane 溢出:透传宿主 `renderBooking`(RoomCard) */
11
+ renderBooking?: (args: RecordBoardCalendarBookingRenderArgs) => React.ReactNode;
12
+ onDragStart?: (item: RecordBoardCalendarBookingLike) => void;
13
+ };
14
+ /**
15
+ * 全局溢出预约列表弹层(日视图 lane 与月/周/资源 `+N` 点开后)。
16
+ * 日视图列表行可走宿主 RoomCard;其它视图使用内置列表行。
17
+ */
18
+ export declare function BookingCalendarOverflowListLayer({ overflowPanelRef, isLight, modal, onClose, onPickItem, renderBooking, onDragStart, }: BookingCalendarOverflowListLayerProps): React.JSX.Element;
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { type CalendarBookingSegmentInput } from '../utils/bookingCalendarDateUtils';
3
+ import type { RecordBoardCalendarBookingLike, RecordBoardCalendarBookingRenderArgs } from '../../../types';
4
+ export declare type OverflowListModalVirtualListProps = {
5
+ items: CalendarBookingSegmentInput[];
6
+ dateKey: string;
7
+ onPickItem: (item: CalendarBookingSegmentInput) => void;
8
+ onClose: () => void;
9
+ /**
10
+ * 为 true 时按日视图逻辑展示状态徽标与状态底色(日视图 lane 溢出列表)。
11
+ * 月 / 周 / 资源 +N 弹层为 false,使用内置列表行(名称 + 时间)。
12
+ * @default true
13
+ */
14
+ showStatusUi?: boolean;
15
+ /**
16
+ * 为 true 且宿主提供 `renderBooking` 时,列表行复用日视图 RoomCard;
17
+ * 月 / 周 / 资源 +N 弹层恒为 false,不走宿主格内卡片。
18
+ */
19
+ isDayLaneOverflow?: boolean;
20
+ isLight?: boolean;
21
+ /** 仅日视图 lane 溢出:透传宿主 `renderBooking` */
22
+ renderBooking?: (args: RecordBoardCalendarBookingRenderArgs) => React.ReactNode;
23
+ onDragStart?: (item: RecordBoardCalendarBookingLike) => void;
24
+ };
25
+ /**
26
+ * 溢出预约列表弹层:`FixedSizeList` 虚拟列表。
27
+ * - 日视图 lane +N:宿主 `renderBooking`(RoomCard)
28
+ * - 月 / 周 / 资源 +N:内置列表行(名称 + 时间),不用格内自定义卡片
29
+ */
30
+ export declare function OverflowListModalVirtualList({ items, dateKey, onPickItem, onClose, showStatusUi, isDayLaneOverflow, isLight, renderBooking, onDragStart, }: OverflowListModalVirtualListProps): React.JSX.Element | null;
@@ -0,0 +1,330 @@
1
+ import type { Dayjs } from 'dayjs';
2
+ import type { RecordBoardCalendarBookingLike } from '../../../types';
3
+ /**
4
+ * 日历日期与时间轴纯函数:`fmtDate`、占用矩阵、月格、overlay 分段、周范围等,供 BookingCalendar 三视图共用。
5
+ */
6
+ /** 与 {@link RecordBoardCalendarBookingLike} 一致,并支持跨日 endDate */
7
+ export declare type CalendarBookingSegmentInput = RecordBoardCalendarBookingLike & {
8
+ endDate?: string;
9
+ };
10
+ export interface BookingSegmentForDate {
11
+ startHour: number;
12
+ endHour: number;
13
+ continuesPrev: boolean;
14
+ continuesNext: boolean;
15
+ }
16
+ export interface ViewNowReference {
17
+ dateKey: string;
18
+ hourFloat: number;
19
+ }
20
+ export declare function fmtDate(date: Date): string;
21
+ /** 本地当前日期键与「日历时」小数小时,用于状态徽标与当前时刻线 */
22
+ export declare function getViewNowReference(): ViewNowReference;
23
+ export declare function parseDate(str: string): Date;
24
+ export declare function addDays(date: Date, n: number): Date;
25
+ export declare function startOfWeek(date: Date): Date;
26
+ export declare function rangeDays(anchor: Date): Date[];
27
+ /**
28
+ * 锚定日所在自然月的每一天(1 号至月末),用于资源视图横向「日」列。
29
+ */
30
+ export declare function monthCalendarDays(anchor: Date): Date[];
31
+ export declare function isHourInTimelineSlots(hour: number, hourSlots: number[] | undefined): boolean;
32
+ export declare function formatHourLabel(hour: number): string;
33
+ /**
34
+ * `YYYY-MM-DD` → `M/D`,跨日 booking 的 pill 内时间行用这个短日期前缀,
35
+ * 视觉上不挤占 pill 宽度(24px 左右)。
36
+ */
37
+ export declare function formatShortMonthDay(dateKey: string): string;
38
+ export declare function buildTimeOptions(start?: number, end?: number, sliceMinutes?: number): number[];
39
+ export declare function monthGrid(date: Date, bookings: CalendarBookingSegmentInput[], courtsList: {
40
+ id: string;
41
+ }[] | undefined, hourSlotsIn: number[] | undefined, slotStepHours?: number): {
42
+ date: Date;
43
+ key: string;
44
+ inMonth: boolean;
45
+ bookingCount: number;
46
+ blockCount: number;
47
+ fullyBooked: boolean;
48
+ }[];
49
+ export declare function getBookingSegmentForDate(item: CalendarBookingSegmentInput, dateKey: string): BookingSegmentForDate | null;
50
+ /**
51
+ * 是否跨自然日(`endDate` 存在且与 `date` 不同)。单日 booking 返回 false。
52
+ */
53
+ export declare function isCrossDayBooking(item: CalendarBookingSegmentInput): boolean;
54
+ /**
55
+ * 把 booking 整段转成绝对毫秒区间:
56
+ * - `startMs = parseDate(date).setHours(...)`,按浮点小时拆出小时 / 分钟(30 min 步进)
57
+ * - `endMs` 同理;`endHour = 24` 时归一为「次日 00:00」
58
+ *
59
+ * 用于跨视图统一的 lane 抢占与重叠判定,避免「按格切」假设。
60
+ */
61
+ export declare function getBookingFullSpanMs(item: CalendarBookingSegmentInput): {
62
+ startMs: number;
63
+ endMs: number;
64
+ };
65
+ /**
66
+ * 同 court 内两条 booking 的时间区间是否相交(`[startMs, endMs)` 半开区间,端点相邻不算交)。
67
+ * 跨 court 永远不算冲突(不同资源各画各的)。
68
+ */
69
+ export declare function bookingsOverlap(a: CalendarBookingSegmentInput, b: CalendarBookingSegmentInput): boolean;
70
+ /**
71
+ * 把 booking 整段转成「按日」的毫秒区间:
72
+ * - `startMs = parseDate(date).getTime()`
73
+ * - `endMs = parseDate(endDate ?? date).getTime() + 1 day`
74
+ *
75
+ * 用于资源 / 月视图这类「一格 = 一天」的视图:同一天内不同小时的两条 booking
76
+ * 视觉上需要垂直 stack(占两个 lane),即使时间不重叠也不能合并到同一 lane。
77
+ */
78
+ export declare function getBookingDaySpanMs(item: CalendarBookingSegmentInput): {
79
+ startMs: number;
80
+ endMs: number;
81
+ };
82
+ /**
83
+ * booking 的 day-span `[date, endDate]` 是否与 `[windowFirstKey, windowLastKey]` 相交。
84
+ *
85
+ * 用于 lane 抢占 / 行高计算阶段过滤掉与当前视口不相交的 booking:
86
+ * 后端为支持跨日 banner 续画把 `booking_time_start_between` 的下界外推 30 天,
87
+ * 这会把上月/前周的 booking 也带回 `bookings` 列表;视图层若直接用全量算 lane,
88
+ * 切到「当月没数据但上月有」的资源行时会保留上月 lane 数 → 行高被撑高。
89
+ *
90
+ * 只比较 `YYYY-MM-DD` 字符串(同 `monthGrid` 的 key 格式),不构造 Date 对象。
91
+ */
92
+ export declare function bookingIntersectsDateWindow(item: {
93
+ date?: unknown;
94
+ endDate?: unknown;
95
+ } | null | undefined, windowFirstKey: string, windowLastKey: string): boolean;
96
+ /**
97
+ * 将 booking 的 day-span 截断到窗口 `[windowFirstKey, windowLastKey]`,超出窗口的部分裁掉,
98
+ * 用于月视图「按周独立 lane 抢占 + 跨周续画」:
99
+ * - 与窗口完全不相交 → 返回 `null`;
100
+ * - `date` 早于窗口 → 起点截到 `windowFirstKey`(视觉上 `clippedLeft`);
101
+ * - `endDate` 晚于窗口 → 终点截到 `windowLastKey`(视觉上 `clippedRight`);
102
+ * - 截断后只占一天的,回退为单日(`endDate` 设为 `undefined`)。
103
+ *
104
+ * 截断后的对象保留原 `id`、`courtId` 等字段,让 lane 抢占在窗口内独立判断重叠。
105
+ */
106
+ export declare function clipBookingDaySpanToWindow(item: CalendarBookingSegmentInput, windowFirstKey: string, windowLastKey: string): CalendarBookingSegmentInput | null;
107
+ /**
108
+ * 月 / 资源视图按日 lane:跨日 booking 在命中各日占**同一** lane;单日 booking 再逐日找空位。
109
+ *
110
+ * 1. 跨日优先(跨度长的先占),在 span 覆盖的每个自然日上取同一最小可用 lane;
111
+ * 2. 单日 booking 仅在各自命中日抢剩余 lane,不影响跨日条的纵向对齐。
112
+ */
113
+ export declare function assignPerDateLanesCrossDayUnified(items: CalendarBookingSegmentInput[], dateKeysInOrder: string[]): {
114
+ perDateLanes: Map<string, Map<string, number>>;
115
+ laneCount: number;
116
+ };
117
+ /**
118
+ * 通用 lane 分配:返回 `Map<itemId, laneIndex>` 与 `laneCount`。
119
+ *
120
+ * @param granularity
121
+ * - `'hour'`(默认,周 / 日视图):用 `getBookingFullSpanMs`,同小时内不重叠的两条
122
+ * booking 可以共享同一 lane(`bookingTime` 紧排)。
123
+ * - `'day'`(资源 / 月视图):用 `getBookingDaySpanMs`,同一天的两条 booking 一定占两 lane,
124
+ * 即使小时不重叠也要垂直 stack(一格只有一天宽,无法在水平方向区分)。
125
+ *
126
+ * 排序优先级(与设计约定一致):
127
+ * 1. 跨日 booking 优先(先排,整段占顶 lane);
128
+ * 2. 同类内按「跨度(endMs - startMs)降序」:跨度更长的先占 lane 0/1,
129
+ * 保证视觉上"长 pill 顶贴",避免短 pill 把长 pill 推到下方造成"上方一周空白";
130
+ * 3. 同跨度按 `startMs` 升序(更早开始的先占);
131
+ * 4. 仍相同则按 `id` 字典序,保证渲染稳定。
132
+ *
133
+ * 然后逐条分配到第一个 `lastEndMs <= 当前 startMs` 的 lane(贪心区间着色)。
134
+ */
135
+ export declare function assignLanesByInterval(items: CalendarBookingSegmentInput[], granularity?: 'hour' | 'day'): {
136
+ lanes: Map<string, number>;
137
+ laneCount: number;
138
+ };
139
+ export declare function dayOccupancy(courtId: string, dateKey: string, bookings: CalendarBookingSegmentInput[], hourSlots: number[] | undefined, slotStepHours: number): Record<number, CalendarBookingSegmentInput | null>;
140
+ export interface SelectedSlotLike {
141
+ courtId: string;
142
+ date: string;
143
+ hour: number;
144
+ }
145
+ export declare function groupSelectedSlots(slots: SelectedSlotLike[], slotStepHours?: number): Array<{
146
+ courtId: string;
147
+ date: string;
148
+ startHour: number;
149
+ endHour: number;
150
+ }>;
151
+ /**
152
+ * 日视图空闲格:仅当全部为同一 court、同一日,且时间上首尾相接成一段时返回 true(与 {@link groupSelectedSlots} 合并规则一致)。
153
+ */
154
+ export declare function isFreeSelectionContiguousSameResource(slots: SelectedSlotLike[], slotStepHours?: number): boolean;
155
+ export declare function hasConflict(bookings: CalendarBookingSegmentInput[], courtId: string, date: string, startHour: number, endHour: number, ignoreId?: string | null): boolean;
156
+ export declare function overlappingBookings(bookings: CalendarBookingSegmentInput[], courtId: string, date: string, startHour: number, endHour: number): CalendarBookingSegmentInput[];
157
+ export declare function courtDaySummary(courtId: string, dateKey: string, bookings: CalendarBookingSegmentInput[], hourSlots: number[] | undefined, slotStepHours: number): {
158
+ occupiedHours: number[];
159
+ hasBlock: boolean;
160
+ fullyBooked: boolean;
161
+ items: CalendarBookingSegmentInput[];
162
+ };
163
+ export declare function sameSlot(a: SelectedSlotLike, b: SelectedSlotLike): boolean;
164
+ /** 营业日 `dateStr` + 浮点小时(含半格)→ dayjs */
165
+ export declare function dayAndHourToDayjs(dateStr: string, hourFloat: number): Dayjs;
166
+ export declare function getDisplayStatusTag(item: CalendarBookingSegmentInput, dateKey: string): string | null;
167
+ export declare function getLateMinutes(item: CalendarBookingSegmentInput, dateKey: string): number | null;
168
+ export declare function currentTimeLabel(): string;
169
+ export declare function formatDateLoose(str: string | undefined): string;
170
+ export declare function formatTimelineStamp(value: string | undefined | null): {
171
+ date: string;
172
+ time: string;
173
+ };
174
+ /** 日视图 overlay 条(可原地写入 lane) */
175
+ export declare type DayOverlayLaneMutable = {
176
+ courtId: string;
177
+ start: number;
178
+ span: number;
179
+ lane?: number;
180
+ laneCount?: number;
181
+ };
182
+ /**
183
+ * 同一 court 上时间重叠的 overlay 分配纵向 lane,避免多张卡片完全叠在同一矩形里。
184
+ * 使用按开始时间排序 + 贪心:每条预约放入「上一条已结束时间不晚于本段开始」的最小编号线。
185
+ */
186
+ export declare function assignDayOverlapLanesInPlace(overlays: DayOverlayLaneMutable[]): void;
187
+ /** 扫描时间轴:同一 court 在任一时刻的最大并行条数(用于行高,与分 lane 一致) */
188
+ export declare function maxConcurrentBookingsOnCourt(overlays: Array<{
189
+ courtId: string;
190
+ start: number;
191
+ span: number;
192
+ }>, courtId: string): number;
193
+ /** 并行超过 cap 时:cap 条内容 + 1 行「+N」占位 */
194
+ export declare function effectiveDayOverlayDisplayLaneCount(rawConcurrent: number): number;
195
+ /** 同一 court 下时间轴区间相交的 overlay 归为一簇(用于 3+N 合并展示) */
196
+ export declare function clusterDayCourtOverlaysByOverlap<T extends {
197
+ courtId: string;
198
+ start: number;
199
+ span: number;
200
+ }>(overlays: T[], courtId: string): T[][];
201
+ export declare function dayOverlayHiddenKey(item: {
202
+ id?: string | number;
203
+ } | null | undefined, dayKey: string, courtId: string): string;
204
+ /**
205
+ * 将 totalInner 像素整数分给 n 条竖向 lane(含缝),保证 Σheight + Σgap === totalInner,消除底部留白缝。
206
+ */
207
+ export declare function dayOverlayLaneMetrics(totalInner: number, laneCount: number, gap: number): {
208
+ topFor: (lane: number) => number;
209
+ heightFor: (lane: number) => number;
210
+ };
211
+ export interface BuildOverlayBookingRow {
212
+ kind: string;
213
+ id: string;
214
+ }
215
+ export interface BuiltDayOverlay {
216
+ item: CalendarBookingSegmentInput;
217
+ rowIndex: number;
218
+ rowTop: number;
219
+ rowHeight: number;
220
+ courtId: string;
221
+ start: number;
222
+ end: number;
223
+ span: number;
224
+ continuesNext?: boolean;
225
+ continuesPrev?: boolean;
226
+ lane?: number;
227
+ laneCount?: number;
228
+ }
229
+ export declare function buildOverlayBookings(visibleCourtRows: BuildOverlayBookingRow[], dayKey: string, bookings: CalendarBookingSegmentInput[], rowTopMap: Record<string, number> | undefined, hourSlots: number[] | undefined, dayRowHeights: number[], slotStepHours?: number): BuiltDayOverlay[];
230
+ /** 日视图:按行高累加每行 rowTop(court / group) */
231
+ export declare function buildDayRowTopMap(visibleCourtRows: Array<{
232
+ id: string;
233
+ }>, heights: number[]): Record<string, number>;
234
+ /** 日历状态徽标:返回 i18n key + className;文案在 UI 层通过 tCal 解析,便于 utils 单测 */
235
+ export declare function statusTagMetaParts(tag: string | null | undefined): {
236
+ labelI18nKey: string;
237
+ className: string;
238
+ } | null;
239
+ export declare type CalendarCourtNameRow = {
240
+ id: string;
241
+ name?: string | null;
242
+ };
243
+ export declare function getBookingDetailData(item: CalendarBookingSegmentInput, courtsList?: CalendarCourtNameRow[]): {
244
+ rawSales: null;
245
+ bookingId: string;
246
+ orderNumber: string;
247
+ shopOrderNumber: string;
248
+ orderStatus: string;
249
+ appointmentStatus: string;
250
+ paymentStatus: string;
251
+ customer: {
252
+ id: null;
253
+ name: string;
254
+ email: string;
255
+ phone: string;
256
+ };
257
+ guestCount: number;
258
+ checkedInCount: number;
259
+ guests: never[];
260
+ schedule: {
261
+ startDate: string;
262
+ startTime: string;
263
+ endDate: string;
264
+ endTime: string;
265
+ duration: number;
266
+ arrivedAt: null;
267
+ completedAt: null;
268
+ };
269
+ resources: never[];
270
+ summaryItems: never[];
271
+ items: never[];
272
+ note: string;
273
+ files: {
274
+ form: never[];
275
+ uploaded: never[];
276
+ invoice: never[];
277
+ };
278
+ payments: never[];
279
+ history: never[];
280
+ summary: {};
281
+ paymentSummary: {
282
+ totalAmount: number;
283
+ paidAmount: number;
284
+ balanceAmount: number;
285
+ currencySymbol: string;
286
+ isFullyPaid: boolean;
287
+ };
288
+ itemSummary: {
289
+ itemCount: number;
290
+ itemQtyTotal: number;
291
+ };
292
+ headerSummary: {
293
+ customerName: string;
294
+ guestCount: number;
295
+ checkedInCount: number;
296
+ timeLabel: string;
297
+ resourceLabel: string;
298
+ };
299
+ headerTags: {
300
+ paymentTag: string;
301
+ fulfillmentTag: string;
302
+ hasNote: boolean;
303
+ paymentStatus: string;
304
+ orderStatus: string;
305
+ };
306
+ fileCount: number;
307
+ canChangeCustomer: boolean;
308
+ noteCount: number;
309
+ noteGroups: {
310
+ internal: never[];
311
+ order: {
312
+ id: string;
313
+ label: string;
314
+ text: string;
315
+ }[];
316
+ item: never[];
317
+ };
318
+ metaFlags: {
319
+ itemsChanged: boolean;
320
+ paymentsChanged: boolean;
321
+ guestChanged: boolean;
322
+ filesChanged: boolean;
323
+ notesChanged: boolean;
324
+ formChanged: boolean;
325
+ uploadedChanged: boolean;
326
+ invoiceChanged: boolean;
327
+ historyChanged: boolean;
328
+ };
329
+ actions: never[];
330
+ };
@@ -0,0 +1,52 @@
1
+ /** 日视图:横向虚拟滚动时间轴 + 资源行,预约条按 lane 叠放与 +N 溢出 */
2
+ import React from 'react';
3
+ import { type TickFillMode } from '../utils/bookingCalendarAxis';
4
+ import type { RecordBoardCalendarProps } from '../../../types';
5
+ /** 日视图(含底部多选操作条) */
6
+ export declare function BookingCalendarDayView(dayProps: {
7
+ calendarProps: RecordBoardCalendarProps;
8
+ isLight: boolean;
9
+ view: string;
10
+ anchorDate: Date;
11
+ dayKey: string;
12
+ hourSlots: number[];
13
+ resolvedSlotMinutes: number;
14
+ slotColWidth: number;
15
+ firstTimelineHour: number;
16
+ endTimelineExclusive: number;
17
+ isBusinessHour: (h: number) => boolean;
18
+ dayHourRemaining: Record<number, {
19
+ remaining: number;
20
+ total: number;
21
+ ratio: number;
22
+ }>;
23
+ timelinePxPerHour: number;
24
+ dayContentHeight: number;
25
+ dayRowHeights: number[];
26
+ visibleCourtRows: any[];
27
+ overlayBookings: any[];
28
+ dayOverlayOverflowPluses: any[];
29
+ setCollapsedGroups: React.Dispatch<React.SetStateAction<any>>;
30
+ visibleCourts: any[];
31
+ bookings: any[];
32
+ slotStepHours: number;
33
+ isFreeSelected: (courtId: string, hour: number) => boolean;
34
+ isBlockSelected: (courtId: string, hour: number) => boolean;
35
+ toggleSlot: (courtId: string, hour: number) => void;
36
+ handleDropMove: (courtId: string, date: string, hour: number) => void;
37
+ hiddenDayOverlayIdSet: Set<string>;
38
+ courtDayDisplayLaneCount: Record<string, number>;
39
+ openBookingDetail: (item: any) => void;
40
+ setDraggingItem: (item: any) => void;
41
+ setNavDirection: (n: number) => void;
42
+ commitAnchor: (d: Date) => void;
43
+ setFocusedCourtId: (id: string | null) => void;
44
+ setOverflowListModal: React.Dispatch<React.SetStateAction<any>>;
45
+ selectedFreeSlots: any[];
46
+ selectedBlockSlots: any[];
47
+ focusedCourtId: string | null;
48
+ /** >0 表示刚从周/月切入日视图,需将横向滚动对准「当前时间」(仅当 dayKey 为今天时生效) */
49
+ dayTimelineScrollToNowToken: number;
50
+ /** 预约条在主轴刻度上的填充方式(由 BookingCalendar 按视图默认解析后传入) */
51
+ tickFillMode: TickFillMode;
52
+ }): React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ /**
3
+ * 月视图:5 行 × 7 列。
4
+ *
5
+ * 跨日 booking 用 absolute overlay 跨日列 banner 渲染(M1:跨自然周边界续画 + 端部 ◀/▶):
6
+ * - 每周内跨日 booking 占统一 lane,单日 booking 逐日填剩余空位;
7
+ * - 行高内自适应 effectiveMaxLane,超出 → cell 级 `+N` tile;
8
+ * - cell 层只负责日期 header / 点击跳日 / drop 改期,不再渲染 booking 列表(被 overlay 替代)。
9
+ */
10
+ export declare function BookingCalendarMonthView({ isLight, anchorDate, monthDays, bookings, goToDayFromCell, handleGridDropMove, setDraggingItem, openBookingDetail, setOverflowListModal, renderMonthWeekBooking, tickFillMode, }: {
11
+ isLight: any;
12
+ anchorDate: any;
13
+ monthDays: any;
14
+ bookings: any;
15
+ goToDayFromCell: any;
16
+ handleGridDropMove: any;
17
+ setDraggingItem: any;
18
+ openBookingDetail: any;
19
+ setOverflowListModal: any;
20
+ renderMonthWeekBooking: any;
21
+ tickFillMode: any;
22
+ }): React.JSX.Element;
@@ -0,0 +1,57 @@
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 TickFillMode } from '../utils/bookingCalendarAxis';
20
+ import type { RecordBoardCalendarProps } from '../../../types';
21
+ declare type ResourceCellPick = {
22
+ courtId: string;
23
+ dateKey: string;
24
+ };
25
+ export declare const BookingCalendarResourceView: React.MemoExoticComponent<typeof BookingCalendarResourceViewInner>;
26
+ declare function BookingCalendarResourceViewInner({ calendarProps, isLight, anchorDate, monthDays, slotColWidth, bookings, visibleCourts, visibleCourtRows, hourSlots, slotStepHours, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, setOverflowListModal, resourceMonthScrollToTodayToken, resourceDayHeaderRemaining, toggleResourceCell, selectedResourceCells, tickFillMode, }: {
27
+ calendarProps: RecordBoardCalendarProps;
28
+ isLight: boolean;
29
+ anchorDate: Date;
30
+ monthDays: Date[];
31
+ slotColWidth: number;
32
+ bookings: any[];
33
+ visibleCourts: any[];
34
+ visibleCourtRows: any[];
35
+ hourSlots: number[];
36
+ slotStepHours: number;
37
+ handleGridDropMove: (dateKey: string, courtId?: string | null) => void;
38
+ openBookingDetail: (item: any) => void;
39
+ setDraggingItem: (item: any) => void;
40
+ setCollapsedGroups: React.Dispatch<React.SetStateAction<any>>;
41
+ setOverflowListModal: React.Dispatch<React.SetStateAction<any>>;
42
+ /** 切入资源视图时递增,用于将横向滚动对准「今天」列 */
43
+ resourceMonthScrollToTodayToken: number;
44
+ /** 顶部表头当日空闲率(与日视图 freeRatio 同口径) */
45
+ resourceDayHeaderRemaining: Record<string, {
46
+ remaining: number;
47
+ total: number;
48
+ ratio: number;
49
+ }>;
50
+ /** 与日视图 `toggleSlot` 同义:点击 cell 切换 (court, date) 的整天选中态 */
51
+ toggleResourceCell: (courtId: string, dateKey: string) => void;
52
+ /** 当前所有「资源月视图」选中的 cell(同 court 连续多天 → SelectionBar 显示 Block/Create) */
53
+ selectedResourceCells: ResourceCellPick[];
54
+ /** 预约条在主轴刻度上的填充方式(由 BookingCalendar 按视图默认解析后传入) */
55
+ tickFillMode: TickFillMode;
56
+ }): React.JSX.Element;
57
+ export {};