@pisell/materials 1.0.1063 → 1.0.1065

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 (112) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +26 -26
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +26 -26
  11. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  13. package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
  14. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  15. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -1
  16. package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
  17. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +43 -31
  18. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +60 -16
  19. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +8 -0
  20. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +22 -12
  21. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +7 -5
  22. package/es/components/pisellFloorMapLayout/components/MapLayer.js +5 -2
  23. package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  24. package/es/components/pisellFloorMapLayout/components/ViewControls.js +29 -10
  25. package/es/components/pisellFloorMapLayout/components/ViewControls.less +36 -12
  26. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +2 -0
  27. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +3 -1
  28. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +2 -2
  29. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +1 -0
  30. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +166 -43
  31. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +1 -1
  32. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +90 -13
  33. package/es/components/pisellFloorMapLayout/index.d.ts +2 -0
  34. package/es/components/pisellFloorMapLayout/index.js +2 -0
  35. package/es/components/pisellFloorMapLayout/locales.d.ts +6 -0
  36. package/es/components/pisellFloorMapLayout/locales.js +9 -3
  37. package/es/components/pisellFloorMapLayout/types.d.ts +9 -2
  38. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +1 -0
  39. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +10 -1
  40. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
  41. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +86 -0
  42. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +3 -2
  43. package/es/components/pisellRecordBoard/PisellRecordBoard.js +6 -3
  44. package/es/components/pisellRecordBoard/index.d.ts +1 -0
  45. package/es/components/pisellRecordBoard/index.js +2 -1
  46. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
  47. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +21 -10
  48. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
  49. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +2 -0
  50. package/es/components/pisellRecordBoard/shellFrame/index.js +9 -3
  51. package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
  52. package/es/components/pisellRecordBoard/types.d.ts +6 -0
  53. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +4 -1
  54. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +18 -1
  55. package/es/components/pisellReservationScheduleBand/types.d.ts +4 -0
  56. package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +180 -22
  57. package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +11 -0
  58. package/es/components/pisellTimeNavigator/components/CursorLayer.js +4 -4
  59. package/es/components/pisellTimeNavigator/components/ScaleLayer.js +3 -3
  60. package/es/components/pisellTimeNavigator/types.d.ts +11 -0
  61. package/es/hooks/useResponsive.d.ts +1 -1
  62. package/es/index.d.ts +2 -2
  63. package/es/index.js +2 -2
  64. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +39 -36
  65. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +56 -12
  66. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +8 -0
  67. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +19 -10
  68. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +7 -5
  69. package/lib/components/pisellFloorMapLayout/components/MapLayer.js +3 -1
  70. package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  71. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +28 -6
  72. package/lib/components/pisellFloorMapLayout/components/ViewControls.less +36 -12
  73. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +2 -0
  74. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +3 -1
  75. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +1 -0
  76. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +143 -29
  77. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +1 -1
  78. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +86 -13
  79. package/lib/components/pisellFloorMapLayout/index.d.ts +2 -0
  80. package/lib/components/pisellFloorMapLayout/index.js +6 -0
  81. package/lib/components/pisellFloorMapLayout/locales.d.ts +6 -0
  82. package/lib/components/pisellFloorMapLayout/locales.js +9 -3
  83. package/lib/components/pisellFloorMapLayout/types.d.ts +9 -2
  84. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +1 -0
  85. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +7 -1
  86. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
  87. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +69 -0
  88. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +2 -1
  89. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +5 -1
  90. package/lib/components/pisellRecordBoard/index.d.ts +1 -0
  91. package/lib/components/pisellRecordBoard/index.js +5 -2
  92. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
  93. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +13 -5
  94. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
  95. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +2 -0
  96. package/lib/components/pisellRecordBoard/shellFrame/index.js +11 -4
  97. package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
  98. package/lib/components/pisellRecordBoard/types.d.ts +6 -0
  99. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -1
  100. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +18 -1
  101. package/lib/components/pisellReservationScheduleBand/types.d.ts +4 -0
  102. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +177 -12
  103. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +11 -0
  104. package/lib/components/pisellTimeNavigator/types.d.ts +11 -0
  105. package/lib/index.d.ts +2 -2
  106. package/lib/index.js +10 -0
  107. package/lowcode/floor-map-image-element/meta.ts +113 -0
  108. package/lowcode/floor-map-layout-provider/meta.ts +1 -1
  109. package/lowcode/pisell-floor-map-layout/meta.ts +37 -1
  110. package/lowcode/render-figma-style-round-table-card/meta.ts +1 -1
  111. package/lowcode/render-figma-style-table-card/meta.ts +1 -1
  112. package/package.json +3 -3
@@ -13,7 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  /**
14
14
  * 视口 / 地图区尺寸、内容区宽高与偏移、缩放与全屏、fitBounds、拖拽图元后恢复 transform
15
15
  */
16
- import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16
+ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
17
17
  import { getContentSize, getPixelBoundingBox } from "../utils/layoutMeasurements";
18
18
 
19
19
  /** 平面图包围盒单侧默认外扩(像素);过大会导致首屏大量空白 */
@@ -89,7 +89,9 @@ export function useFloorMapTransformMetrics(params) {
89
89
  return ro.disconnect();
90
90
  };
91
91
  }, []);
92
- var autoFitOnMount = zoom.autoFitOnMount === true;
92
+
93
+ /** 默认开启:有空图元时首屏 fit 全图;仅 `autoFitOnMount: false` 关闭 */
94
+ var autoFitOnMount = zoom.autoFitOnMount !== false;
93
95
  var zoomConfig = useMemo(function () {
94
96
  var _zoom$defaultScale, _zoom$min, _zoom$max, _zoom$step;
95
97
  return {
@@ -222,27 +224,66 @@ export function useFloorMapTransformMetrics(params) {
222
224
  (_el$requestFullscreen = el.requestFullscreen) === null || _el$requestFullscreen === void 0 || _el$requestFullscreen.call(el);
223
225
  }
224
226
  }, []);
227
+
228
+ /** @returns 是否已调用 setTransform(用于首屏 autoFit:避免空跑仍标记 done) */
225
229
  var fitBounds = useCallback(function () {
226
- var _zoom$max2;
230
+ var _zoom$max3;
227
231
  var ctx = transformRef.current;
228
232
  var container = containerRef.current;
229
- if (!ctx || !container) return;
233
+ if (!ctx || !container) return false;
230
234
  var wrapper = container.querySelector('.react-transform-wrapper');
231
- if (!wrapper) return;
235
+ if (!wrapper) return false;
232
236
  var wrapperRect = wrapper.getBoundingClientRect();
233
- var nextScale = Math.min(wrapperRect.width / contentWidth, wrapperRect.height / contentHeight, (_zoom$max2 = zoom.max) !== null && _zoom$max2 !== void 0 ? _zoom$max2 : 2);
237
+ if (wrapperRect.width <= 0 || wrapperRect.height <= 0) return false;
238
+
239
+ /**
240
+ * 平面图像素模式:按「图元轴对齐包围盒」缩放并居中,不按整块 content(含编辑态撑满视口的空白)适配。
241
+ * 画布 DOM 尺寸与网格空白不变,仅改变视口 transform;视口边可贴边(edgePx=0)。
242
+ */
243
+ var pixelBox = isFloorMapView && effectiveItemUnit === 'pixel' && items.length > 0 ? getPixelBoundingBox(items, cellSize) : null;
244
+ if (pixelBox) {
245
+ var _zoom$max2;
246
+ var bw = Math.max(1, pixelBox.maxRight - pixelBox.minLeft);
247
+ var bh = Math.max(1, pixelBox.maxBottom - pixelBox.minTop);
248
+ var edgePx = 0;
249
+ var availW = Math.max(1, wrapperRect.width - 2 * edgePx);
250
+ var availH = Math.max(1, wrapperRect.height - 2 * edgePx);
251
+ var _raw = Math.min(availW / bw, availH / bh);
252
+ var _nextScale = Math.min(_raw, (_zoom$max2 = zoom.max) !== null && _zoom$max2 !== void 0 ? _zoom$max2 : 2);
253
+ var ap = alignPadSingle !== null && alignPadSingle !== void 0 ? alignPadSingle : padSingle;
254
+ var bboxCx = ap + bw / 2;
255
+ var bboxCy = ap + bh / 2;
256
+ var _x = wrapperRect.width / 2 - bboxCx * _nextScale;
257
+ var _y = wrapperRect.height / 2 - bboxCy * _nextScale;
258
+ ctx.setTransform(_x, _y, _nextScale);
259
+ return true;
260
+ }
261
+ if (contentWidth <= 0 || contentHeight <= 0) return false;
262
+ /** 非平面图或无图元:仍按整块 content 适配 */
263
+ var raw = Math.min(wrapperRect.width / contentWidth, wrapperRect.height / contentHeight);
264
+ var nextScale = Math.min(raw, (_zoom$max3 = zoom.max) !== null && _zoom$max3 !== void 0 ? _zoom$max3 : 2);
234
265
  var padA = alignPadSingle !== null && alignPadSingle !== void 0 ? alignPadSingle : 0;
235
266
  var x = VIEWPORT_TOP_LEFT_MARGIN - padA * nextScale;
236
267
  var y = VIEWPORT_TOP_LEFT_MARGIN - padA * nextScale;
237
268
  ctx.setTransform(x, y, nextScale);
238
- }, [contentWidth, contentHeight, zoom.max, transformRef, alignPadSingle]);
269
+ return true;
270
+ }, [contentWidth, contentHeight, zoom.max, transformRef, alignPadSingle, isFloorMapView, effectiveItemUnit, items, cellSize, padSingle]);
239
271
 
240
- /** autoFitOnMount:每画布一次 fitBounds(在 TransformWrapper 就绪后) */
272
+ /**
273
+ * autoFitOnMount:每个画布在「有图元且 content 尺寸已按包围盒算好」后执行一次 fitBounds。
274
+ * 避免首帧 items 仍为空时用占位尺寸 fit 完并标记 done,导致异步图元加载后不再适配。
275
+ */
241
276
  var autoFitOnceRef = useRef({
242
277
  frame: '',
243
278
  done: false
244
279
  });
245
- useEffect(function () {
280
+ var prevItemsCountForAutoFitRef = useRef(null);
281
+ /**
282
+ * 首屏 auto fit:时序上易出现「Transform 未挂载 / wrapper 尺寸为 0 / 内容区尚未提交」,
283
+ * 用 layoutEffect + 双 rAF 贴近浏览器布局完成时刻;仅 fitBounds 真正 setTransform 后才记 done;
284
+ * viewportSize 纳入依赖以便父级 flex 迟到的尺寸更新后重试(超次不伪造 done)。
285
+ */
286
+ useLayoutEffect(function () {
246
287
  if (!isFloorMapView || !autoFitOnMount || frameResetKey === undefined) return;
247
288
  var frame = String(frameResetKey);
248
289
  if (autoFitOnceRef.current.frame !== frame) {
@@ -250,28 +291,64 @@ export function useFloorMapTransformMetrics(params) {
250
291
  frame: frame,
251
292
  done: false
252
293
  };
294
+ prevItemsCountForAutoFitRef.current = null;
295
+ }
296
+ var itemCount = items.length;
297
+ var prevN = prevItemsCountForAutoFitRef.current;
298
+ if (prevN !== null && prevN === 0 && itemCount > 0) {
299
+ autoFitOnceRef.current.done = false;
253
300
  }
301
+ prevItemsCountForAutoFitRef.current = itemCount;
254
302
  if (autoFitOnceRef.current.done) return;
303
+ if (effectiveItemUnit === 'pixel' && itemCount === 0) {
304
+ return;
305
+ }
255
306
  if (contentWidth <= 0 || contentHeight <= 0) return;
256
307
  var cancelled = false;
257
308
  var raf = 0;
309
+ var attempts = 0;
310
+ var MAX_AUTO_FIT_ATTEMPTS = 160;
258
311
  var tick = function tick() {
259
312
  if (cancelled) return;
313
+ if (attempts >= MAX_AUTO_FIT_ATTEMPTS) return;
260
314
  var ctx = transformRef.current;
261
315
  var container = containerRef.current;
262
- if (!ctx || !(container !== null && container !== void 0 && container.querySelector('.react-transform-wrapper'))) {
316
+ var wrapper = container === null || container === void 0 ? void 0 : container.querySelector('.react-transform-wrapper');
317
+ if (!ctx || !wrapper) {
318
+ attempts += 1;
319
+ raf = requestAnimationFrame(tick);
320
+ return;
321
+ }
322
+ var rect = wrapper.getBoundingClientRect();
323
+ if (rect.width <= 0 || rect.height <= 0) {
324
+ attempts += 1;
263
325
  raf = requestAnimationFrame(tick);
264
326
  return;
265
327
  }
266
- fitBounds();
267
- autoFitOnceRef.current.done = true;
328
+
329
+ /** 再等两帧:react-zoom-pan-pinch 与 TransformComponent 常在本帧之后才把可测布局写稳 */
330
+ raf = requestAnimationFrame(function () {
331
+ if (cancelled) return;
332
+ raf = requestAnimationFrame(function () {
333
+ if (cancelled) return;
334
+ var ok = fitBounds();
335
+ if (ok) {
336
+ autoFitOnceRef.current.done = true;
337
+ return;
338
+ }
339
+ attempts += 1;
340
+ if (attempts < MAX_AUTO_FIT_ATTEMPTS) {
341
+ raf = requestAnimationFrame(tick);
342
+ }
343
+ });
344
+ });
268
345
  };
269
346
  raf = requestAnimationFrame(tick);
270
347
  return function () {
271
348
  cancelled = true;
272
349
  cancelAnimationFrame(raf);
273
350
  };
274
- }, [isFloorMapView, autoFitOnMount, frameResetKey, contentWidth, contentHeight, fitBounds, transformRef]);
351
+ }, [isFloorMapView, autoFitOnMount, frameResetKey, effectiveItemUnit, items.length, contentWidth, contentHeight, viewportSize.width, viewportSize.height, mapAreaSize.width, mapAreaSize.height, fitBounds, transformRef]);
275
352
  var lastTransformRef = useRef({
276
353
  x: 0,
277
354
  y: 0,
@@ -5,6 +5,8 @@
5
5
  export { PisellFloorMapLayout } from './PisellFloorMapLayout';
6
6
  export type { PisellFloorMapLayoutProps, PisellFloorMapLayoutRef, FloorMapItemBase, FloorMapItemUnit, FloorMapLayerConfig, FloorMapZoomConfig, FloorMapPanConfig, FloorMapControlsConfig, FloorMapItemShape, FloorMapBackgroundType, FloorMapPanBoundary, FloorMapLayoutMode, FloorMapGridLayoutConfig, FloorMapCanvas, FloorMapCanvasNameI18n, FloorMapElement, FloorMapData, FloorMapViewConfig, FloorMapCanvasUiConfig, FloorMapSceneElement, FloorMapSceneElementDataBinding, FloorMapPlaceMode, FloorMapElementKindCategory, FloorMapElementDataBindingPolicy, FloorMapElementDefaultPresentation, FloorMapEdge, FloorMapElementKindConfig, FloorMapElementType, FloorMapTextSlot, FloorMapDataSources, FloorMapRenderOptions, FloorMapEditPanelParams, DataSourceFormColumn, FloorMapMergedItem, FloorMapRecordFormRenderContext, FloorMapDataSourceRecordFormContent, FloorMapFullscreenMode, FloorMapLayoutContextValue, } from './types';
7
7
  export { FLOOR_MAP_STAGE_ELEMENT_KIND, FLOOR_MAP_IMAGE_ELEMENT_KIND, } from './types';
8
+ export { renderFloorMapFallbackPlaceholder } from './utils/floorMapFallbackRender';
9
+ export { isFloorMapImageElementKind } from './utils/floorMapElementKindUtils';
8
10
  export { FloorMapLayoutProvider, useFloorMapLayoutContext, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, } from './context/FloorMapLayoutContext';
9
11
  export type { FloorMapLayoutProviderProps } from './context/FloorMapLayoutContext';
10
12
  export { mergeFloorMapLayoutPropsFromContext } from './context/mergeFloorMapLayoutContext';
@@ -4,6 +4,8 @@
4
4
  */
5
5
  export { PisellFloorMapLayout } from "./PisellFloorMapLayout";
6
6
  export { FLOOR_MAP_STAGE_ELEMENT_KIND, FLOOR_MAP_IMAGE_ELEMENT_KIND } from "./types";
7
+ export { renderFloorMapFallbackPlaceholder } from "./utils/floorMapFallbackRender";
8
+ export { isFloorMapImageElementKind } from "./utils/floorMapElementKindUtils";
7
9
  export { FloorMapLayoutProvider, useFloorMapLayoutContext, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT } from "./context/FloorMapLayoutContext";
8
10
  export { mergeFloorMapLayoutPropsFromContext } from "./context/mergeFloorMapLayoutContext";
9
11
  export { FloorMapImageElement } from "./components/FloorMapImageElement";
@@ -46,6 +46,8 @@ declare const _default: {
46
46
  'pisell-floor-map-layout.edit-panel.extra-image-url': string;
47
47
  'pisell-floor-map-layout.edit-panel.ph-https': string;
48
48
  'pisell-floor-map-layout.edit-panel.label-canvas': string;
49
+ 'pisell-floor-map-layout.edit-panel.label-element-kind': string;
50
+ 'pisell-floor-map-layout.edit-panel.hint-kind-binding-cleared': string;
49
51
  'pisell-floor-map-layout.edit-panel.apply': string;
50
52
  'pisell-floor-map-layout.edit-panel.data-binding': string;
51
53
  'pisell-floor-map-layout.edit-panel.data-binding-note': string;
@@ -106,6 +108,8 @@ declare const _default: {
106
108
  'pisell-floor-map-layout.edit-panel.extra-image-url': string;
107
109
  'pisell-floor-map-layout.edit-panel.ph-https': string;
108
110
  'pisell-floor-map-layout.edit-panel.label-canvas': string;
111
+ 'pisell-floor-map-layout.edit-panel.label-element-kind': string;
112
+ 'pisell-floor-map-layout.edit-panel.hint-kind-binding-cleared': string;
109
113
  'pisell-floor-map-layout.edit-panel.apply': string;
110
114
  'pisell-floor-map-layout.edit-panel.data-binding': string;
111
115
  'pisell-floor-map-layout.edit-panel.data-binding-note': string;
@@ -166,6 +170,8 @@ declare const _default: {
166
170
  'pisell-floor-map-layout.edit-panel.extra-image-url': string;
167
171
  'pisell-floor-map-layout.edit-panel.ph-https': string;
168
172
  'pisell-floor-map-layout.edit-panel.label-canvas': string;
173
+ 'pisell-floor-map-layout.edit-panel.label-element-kind': string;
174
+ 'pisell-floor-map-layout.edit-panel.hint-kind-binding-cleared': string;
169
175
  'pisell-floor-map-layout.edit-panel.apply': string;
170
176
  'pisell-floor-map-layout.edit-panel.data-binding': string;
171
177
  'pisell-floor-map-layout.edit-panel.data-binding-note': string;
@@ -29,7 +29,7 @@ export default {
29
29
  'pisell-floor-map-layout.edit-panel.element-props': 'Element',
30
30
  'pisell-floor-map-layout.edit-panel.close-aria': 'Close',
31
31
  'pisell-floor-map-layout.edit-panel.hint-apply': 'Position or size changed — click Apply to update the canvas.',
32
- 'pisell-floor-map-layout.edit-panel.hint-save': 'Layout draft is not saved — click Save at the top.',
32
+ 'pisell-floor-map-layout.edit-panel.hint-save': 'Layout draft is not saved — click Done editing to save.',
33
33
  'pisell-floor-map-layout.edit-panel.section-layout': 'Position · Layer · Size',
34
34
  'pisell-floor-map-layout.edit-panel.lock-on': 'Locked: drag/resize disabled on canvas; click to unlock',
35
35
  'pisell-floor-map-layout.edit-panel.lock-off': 'Lock to disable drag and resize on canvas',
@@ -46,6 +46,8 @@ export default {
46
46
  'pisell-floor-map-layout.edit-panel.extra-image-url': 'Use a network image URL; lower layer to place under tables.',
47
47
  'pisell-floor-map-layout.edit-panel.ph-https': 'https://...',
48
48
  'pisell-floor-map-layout.edit-panel.label-canvas': 'Canvas',
49
+ 'pisell-floor-map-layout.edit-panel.label-element-kind': 'Element type',
50
+ 'pisell-floor-map-layout.edit-panel.hint-kind-binding-cleared': 'Data binding was cleared because it does not apply to the new type.',
49
51
  'pisell-floor-map-layout.edit-panel.apply': 'Apply',
50
52
  'pisell-floor-map-layout.edit-panel.data-binding': 'Data binding',
51
53
  'pisell-floor-map-layout.edit-panel.data-binding-note': 'Changing data source or row writes to the layout draft; click Save at the top to persist.',
@@ -89,7 +91,7 @@ export default {
89
91
  'pisell-floor-map-layout.edit-panel.element-props': '图元属性',
90
92
  'pisell-floor-map-layout.edit-panel.close-aria': '关闭',
91
93
  'pisell-floor-map-layout.edit-panel.hint-apply': '位置、尺寸等已修改,请点击「应用」同步到画布。',
92
- 'pisell-floor-map-layout.edit-panel.hint-save': '布局草稿未持久化,请点击顶部「保存」。',
94
+ 'pisell-floor-map-layout.edit-panel.hint-save': '布局草稿未持久化,请点击「完成编辑」保存。',
93
95
  'pisell-floor-map-layout.edit-panel.section-layout': '位置 · 层级 · 尺寸',
94
96
  'pisell-floor-map-layout.edit-panel.lock-on': '已锁定:画布不可拖拽/缩放;点击解锁',
95
97
  'pisell-floor-map-layout.edit-panel.lock-off': '锁定后画布不可拖拽与改尺寸',
@@ -106,6 +108,8 @@ export default {
106
108
  'pisell-floor-map-layout.edit-panel.extra-image-url': '可填网络图片地址;将层级调低可铺在桌位下方作底图。',
107
109
  'pisell-floor-map-layout.edit-panel.ph-https': 'https://...',
108
110
  'pisell-floor-map-layout.edit-panel.label-canvas': '所属画布',
111
+ 'pisell-floor-map-layout.edit-panel.label-element-kind': '图元类型',
112
+ 'pisell-floor-map-layout.edit-panel.hint-kind-binding-cleared': '新类型与原先绑定不兼容,已清除数据绑定。',
109
113
  'pisell-floor-map-layout.edit-panel.apply': '应用',
110
114
  'pisell-floor-map-layout.edit-panel.data-binding': '数据绑定',
111
115
  'pisell-floor-map-layout.edit-panel.data-binding-note': '修改数据源或绑定行会立即写入布局草稿;持久化请点击顶部「保存」。',
@@ -149,7 +153,7 @@ export default {
149
153
  'pisell-floor-map-layout.edit-panel.element-props': '圖元屬性',
150
154
  'pisell-floor-map-layout.edit-panel.close-aria': '關閉',
151
155
  'pisell-floor-map-layout.edit-panel.hint-apply': '位置、尺寸等已修改,請點擊「套用」同步到畫布。',
152
- 'pisell-floor-map-layout.edit-panel.hint-save': '佈局草稿未持久化,請點擊頂部「儲存」。',
156
+ 'pisell-floor-map-layout.edit-panel.hint-save': '佈局草稿未持久化,請點擊「完成編輯」儲存。',
153
157
  'pisell-floor-map-layout.edit-panel.section-layout': '位置 · 層級 · 尺寸',
154
158
  'pisell-floor-map-layout.edit-panel.lock-on': '已鎖定:畫布不可拖曳/縮放;點擊解鎖',
155
159
  'pisell-floor-map-layout.edit-panel.lock-off': '鎖定後畫布不可拖曳與改尺寸',
@@ -166,6 +170,8 @@ export default {
166
170
  'pisell-floor-map-layout.edit-panel.extra-image-url': '可填網絡圖片地址;將層級調低可鋪在桌位下方作底圖。',
167
171
  'pisell-floor-map-layout.edit-panel.ph-https': 'https://...',
168
172
  'pisell-floor-map-layout.edit-panel.label-canvas': '所屬畫布',
173
+ 'pisell-floor-map-layout.edit-panel.label-element-kind': '圖元類型',
174
+ 'pisell-floor-map-layout.edit-panel.hint-kind-binding-cleared': '新類型與原先綁定不相容,已清除數據綁定。',
169
175
  'pisell-floor-map-layout.edit-panel.apply': '套用',
170
176
  'pisell-floor-map-layout.edit-panel.data-binding': '數據綁定',
171
177
  'pisell-floor-map-layout.edit-panel.data-binding-note': '修改數據源或綁定行會立即寫入佈局草稿;持久化請點擊頂部「儲存」。',
@@ -82,8 +82,8 @@ export interface FloorMapZoomConfig {
82
82
  /** 缩放步进,默认 0.1 (10%) */
83
83
  step?: number;
84
84
  /**
85
- * 为 true 时:挂载后每个画布(frameResetKey)自动执行一次 fitBounds,使图元落在视口内。
86
- * true 时跳过「首帧 defaultScale 左上对齐」,避免与 fit 闪动叠加。
85
+ * 为 false 时关闭;未传或其它值时默认开启(平面图像素模式且当前画布有图元时,每画布自动 fitBounds 一次,可视区域刚好容纳全部图元)。
86
+ * 开启时跳过「首帧 defaultScale 左上对齐」,避免与 fit 闪动叠加。
87
87
  */
88
88
  autoFitOnMount?: boolean;
89
89
  }
@@ -108,6 +108,10 @@ export interface FloorMapControlsConfig {
108
108
  showFitBounds?: boolean;
109
109
  /** 是否显示全屏按钮,默认 false */
110
110
  showFullscreen?: boolean;
111
+ /**
112
+ * 是否显示网格开关(写入当前画布 draft 的 mapLayer.showGrid),默认 false
113
+ */
114
+ showGridToggle?: boolean;
111
115
  }
112
116
  /**
113
117
  * 布局模式(规则网格 vs 完全自由坐标)
@@ -317,7 +321,10 @@ export declare type FloorMapPlaceMode = null | {
317
321
  type: 'scene';
318
322
  elementKind: string;
319
323
  dataSourceKey?: string;
324
+ /** 单选落一条;与 {@link recordIds} 二选一,多选时优先 {@link recordIds} */
320
325
  recordId?: string;
326
+ /** 多选后在画布一次落多条,按锚点阶梯偏移 */
327
+ recordIds?: string[];
321
328
  };
322
329
  /** 阅读态 renderItem 可选第三参数 */
323
330
  export interface FloorMapRenderOptions {
@@ -7,6 +7,7 @@ export interface FloorMapPaletteDragPayload {
7
7
  elementKind: string;
8
8
  dataSourceKey?: string;
9
9
  recordId?: string;
10
+ recordIds?: string[];
10
11
  }
11
12
  /**
12
13
  * 与 {@link useFloorMapEditState} 落点一致:内容区 drop 的 offset 减去内容区 padding 偏移
@@ -36,10 +36,19 @@ export function parsePaletteDragPayload(dt) {
36
36
  if (typeof elementKind !== 'string' || !elementKind) return null;
37
37
  var dataSourceKey = typeof rec.dataSourceKey === 'string' ? rec.dataSourceKey : undefined;
38
38
  var recordId = typeof rec.recordId === 'string' ? rec.recordId : undefined;
39
+ var recordIds;
40
+ var rawIds = rec.recordIds;
41
+ if (Array.isArray(rawIds)) {
42
+ recordIds = rawIds.filter(function (x) {
43
+ return typeof x === 'string' && x;
44
+ });
45
+ if (recordIds.length === 0) recordIds = undefined;
46
+ }
39
47
  return {
40
48
  elementKind: elementKind,
41
49
  dataSourceKey: dataSourceKey,
42
- recordId: recordId
50
+ recordId: recordId,
51
+ recordIds: recordIds
43
52
  };
44
53
  } catch (_unused) {
45
54
  return null;
@@ -2,9 +2,20 @@
2
2
  * 图元种类解析与绑定展示前校验(供合并项渲染、工具栏逻辑复用)
3
3
  */
4
4
  import type { FloorMapElementKindConfig, FloorMapViewConfig, FloorMapSceneElement, FloorMapDataSources, FloorMapElementDataBindingPolicy } from '../types';
5
+ /** 与 RecordBoard Story 一致:`floorMapImage` */
6
+ export declare function isFloorMapImageElementKind(kind: string | undefined): boolean;
5
7
  /** dataBindingPolicy 缺省视为 none */
6
8
  export declare function resolveDataBindingPolicy(kind: FloorMapElementKindConfig | undefined): FloorMapElementDataBindingPolicy;
7
9
  export declare function getElementKindConfig(config: Pick<FloorMapViewConfig, 'elementKinds'> | undefined, elementKind: string | undefined): FloorMapElementKindConfig | undefined;
10
+ /**
11
+ * 与调色板分组一致:取与当前图元 **同一 categoryId**(含未填 categoryId 时落到首个分类)下的可切换种类,
12
+ * 排除舞台、底图。若仅有一种则编辑面板可不展示切换器。
13
+ */
14
+ export declare function getSwappableElementKindsInSameCategory(config: FloorMapViewConfig, elementKind: string | undefined): FloorMapElementKindConfig[];
15
+ /**
16
+ * 在右侧编辑面板将图元改为同分类下的另一种 kind 时的草稿 patch(绑定不兼容则清空)
17
+ */
18
+ export declare function patchSceneElementForKindSwitch(config: FloorMapViewConfig, element: FloorMapSceneElement, nextKindValue: string): Partial<FloorMapSceneElement>;
8
19
  /**
9
20
  * @returns 人类可读错误文案;无问题时返回 null
10
21
  */
@@ -1,10 +1,22 @@
1
1
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
8
  /**
5
9
  * 图元种类解析与绑定展示前校验(供合并项渲染、工具栏逻辑复用)
6
10
  */
7
11
 
12
+ import { FLOOR_MAP_IMAGE_ELEMENT_KIND, FLOOR_MAP_STAGE_ELEMENT_KIND } from "../types";
13
+ import { STAGE_DECO_DEFAULT } from "./floorMapStageDefaults";
14
+
15
+ /** 与 RecordBoard Story 一致:`floorMapImage` */
16
+ export function isFloorMapImageElementKind(kind) {
17
+ return kind === FLOOR_MAP_IMAGE_ELEMENT_KIND;
18
+ }
19
+
8
20
  /** dataBindingPolicy 缺省视为 none */
9
21
  export function resolveDataBindingPolicy(kind) {
10
22
  var _kind$dataBindingPoli;
@@ -18,6 +30,80 @@ export function getElementKindConfig(config, elementKind) {
18
30
  });
19
31
  }
20
32
 
33
+ /**
34
+ * 与调色板分组一致:取与当前图元 **同一 categoryId**(含未填 categoryId 时落到首个分类)下的可切换种类,
35
+ * 排除舞台、底图。若仅有一种则编辑面板可不展示切换器。
36
+ */
37
+ export function getSwappableElementKindsInSameCategory(config, elementKind) {
38
+ var _config$elementKinds2, _config$elementKindCa, _sorted$0$id, _sorted$, _self$categoryId;
39
+ if (!elementKind || !((_config$elementKinds2 = config.elementKinds) !== null && _config$elementKinds2 !== void 0 && _config$elementKinds2.length)) return [];
40
+ var rawCats = (_config$elementKindCa = config.elementKindCategories) !== null && _config$elementKindCa !== void 0 ? _config$elementKindCa : [];
41
+ var sorted = _toConsumableArray(rawCats).sort(function (a, b) {
42
+ var _a$order, _b$order;
43
+ return ((_a$order = a.order) !== null && _a$order !== void 0 ? _a$order : 0) - ((_b$order = b.order) !== null && _b$order !== void 0 ? _b$order : 0);
44
+ });
45
+ var fallbackId = (_sorted$0$id = (_sorted$ = sorted[0]) === null || _sorted$ === void 0 ? void 0 : _sorted$.id) !== null && _sorted$0$id !== void 0 ? _sorted$0$id : '_uncat';
46
+ var self = config.elementKinds.find(function (k) {
47
+ return k.value === elementKind;
48
+ });
49
+ if (!self) return [];
50
+ var cid = (_self$categoryId = self.categoryId) !== null && _self$categoryId !== void 0 ? _self$categoryId : fallbackId;
51
+ return config.elementKinds.filter(function (k) {
52
+ var _k$categoryId;
53
+ if (k.showInPalette === false) return false;
54
+ if (k.value === FLOOR_MAP_STAGE_ELEMENT_KIND) return false;
55
+ if (k.value === FLOOR_MAP_IMAGE_ELEMENT_KIND) return false;
56
+ return ((_k$categoryId = k.categoryId) !== null && _k$categoryId !== void 0 ? _k$categoryId : fallbackId) === cid;
57
+ });
58
+ }
59
+ var DEFAULT_PLACE_W = 180;
60
+ var DEFAULT_PLACE_H = 120;
61
+ var IMAGE_PLACE_W = 400;
62
+ var IMAGE_PLACE_H = 240;
63
+ var DECO_SIZE = 48;
64
+
65
+ /**
66
+ * 在右侧编辑面板将图元改为同分类下的另一种 kind 时的草稿 patch(绑定不兼容则清空)
67
+ */
68
+ export function patchSceneElementForKindSwitch(config, element, nextKindValue) {
69
+ var _nextCfg$allowedDataS, _element$width, _element$width2, _element$height, _element$height2, _nextCfg$defaultPrese;
70
+ var nextCfg = getElementKindConfig(config, nextKindValue);
71
+ var nextPol = resolveDataBindingPolicy(nextCfg);
72
+ var binding = element.dataBinding;
73
+ var isNextImage = isFloorMapImageElementKind(nextKindValue);
74
+ var isNextStage = nextKindValue === FLOOR_MAP_STAGE_ELEMENT_KIND;
75
+ var clearBinding = false;
76
+ if (nextPol === 'none') {
77
+ clearBinding = true;
78
+ } else if (binding && nextCfg !== null && nextCfg !== void 0 && (_nextCfg$allowedDataS = nextCfg.allowedDataSourceKeys) !== null && _nextCfg$allowedDataS !== void 0 && _nextCfg$allowedDataS.length) {
79
+ if (!nextCfg.allowedDataSourceKeys.includes(binding.dataSourceKey)) {
80
+ clearBinding = true;
81
+ }
82
+ }
83
+ var nextW = isNextImage ? IMAGE_PLACE_W : isNextStage ? STAGE_DECO_DEFAULT.width : DEFAULT_PLACE_W;
84
+ var nextH = isNextImage ? IMAGE_PLACE_H : isNextStage ? STAGE_DECO_DEFAULT.height : DEFAULT_PLACE_H;
85
+ var useDecoSize = nextPol === 'none' && nextKindValue !== FLOOR_MAP_STAGE_ELEMENT_KIND && !isNextImage;
86
+ var width = useDecoSize ? Math.max((_element$width = element.width) !== null && _element$width !== void 0 ? _element$width : DECO_SIZE, DECO_SIZE) : Math.max((_element$width2 = element.width) !== null && _element$width2 !== void 0 ? _element$width2 : nextW, nextW);
87
+ var height = useDecoSize ? Math.max((_element$height = element.height) !== null && _element$height !== void 0 ? _element$height : DECO_SIZE, DECO_SIZE) : Math.max((_element$height2 = element.height) !== null && _element$height2 !== void 0 ? _element$height2 : nextH, nextH);
88
+ var patch = {
89
+ elementKind: nextKindValue,
90
+ shape: isNextStage || isNextImage ? 'rect' : nextCfg === null || nextCfg === void 0 ? void 0 : nextCfg.defaultShape,
91
+ width: width,
92
+ height: height,
93
+ name: (nextCfg === null || nextCfg === void 0 || (_nextCfg$defaultPrese = nextCfg.defaultPresentation) === null || _nextCfg$defaultPrese === void 0 ? void 0 : _nextCfg$defaultPrese.title) != null && String(nextCfg.defaultPresentation.title).trim() !== '' ? String(nextCfg.defaultPresentation.title) : element.name
94
+ };
95
+ if (clearBinding) {
96
+ patch.dataBinding = undefined;
97
+ }
98
+ if (isNextImage) {
99
+ var _element$imageUrl;
100
+ patch.imageUrl = (_element$imageUrl = element.imageUrl) !== null && _element$imageUrl !== void 0 ? _element$imageUrl : '';
101
+ } else {
102
+ patch.imageUrl = undefined;
103
+ }
104
+ return patch;
105
+ }
106
+
21
107
  /**
22
108
  * @returns 人类可读错误文案;无问题时返回 null
23
109
  */
@@ -2,7 +2,8 @@
2
2
  * 无 renderItemByKind 时的占位渲染(装饰、舞台等),避免画布上不显示
3
3
  */
4
4
  import React from 'react';
5
- import { FLOOR_MAP_IMAGE_ELEMENT_KIND, FLOOR_MAP_STAGE_ELEMENT_KIND } from "../types";
5
+ import { FLOOR_MAP_STAGE_ELEMENT_KIND } from "../types";
6
+ import { isFloorMapImageElementKind } from "./floorMapElementKindUtils";
6
7
  import { FloorMapImageElement } from "../components/FloorMapImageElement";
7
8
  import { STAGE_DECO_DEFAULT } from "./floorMapStageDefaults";
8
9
 
@@ -35,7 +36,7 @@ export function renderFloorMapFallbackPlaceholder(item) {
35
36
  var isStage = kind === FLOOR_MAP_STAGE_ELEMENT_KIND;
36
37
  var nameText = (item === null || item === void 0 ? void 0 : item.name) != null ? String(item.name).trim() : '';
37
38
  var fallbackLabel = nameText || kind;
38
- if (kind === FLOOR_MAP_IMAGE_ELEMENT_KIND) {
39
+ if (isFloorMapImageElementKind(kind)) {
39
40
  var _item$_sceneElement, _item$name, _item$_sceneElement2;
40
41
  var url = (_item$_sceneElement = item._sceneElement) === null || _item$_sceneElement === void 0 ? void 0 : _item$_sceneElement.imageUrl;
41
42
  return /*#__PURE__*/React.createElement(FloorMapImageElement, {
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "layoutType", "rowKey", "data", "dataSources", "gridDataSourceKey", "loading", "total", "pagination", "onPageChange", "searchParams", "onSearch", "onReset", "floorMap", "floorMapLayoutContext", "defaultBodyView", "bodyViewStorageKey", "floorMapLayoutRef", "className", "style"];
1
+ var _excluded = ["children", "layoutType", "rowKey", "data", "dataSources", "gridDataSourceKey", "loading", "total", "pagination", "onPageChange", "searchParams", "onSearch", "onReset", "floorMap", "floorMapLayoutContext", "defaultBodyView", "bodyViewStorageKey", "floorMapLayoutRef", "floorMapFooter", "className", "style"];
2
2
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -86,6 +86,7 @@ function getDefaultRecordBoardContext(layoutType, selection, rowKey) {
86
86
  floorMapLayoutContext: undefined,
87
87
  defaultBodyView: undefined,
88
88
  floorMapLayoutRef: undefined,
89
+ floorMapFooter: undefined,
89
90
  dataSources: undefined,
90
91
  gridDataSourceKey: undefined
91
92
  };
@@ -117,6 +118,7 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
117
118
  defaultBodyView = props.defaultBodyView,
118
119
  bodyViewStorageKey = props.bodyViewStorageKey,
119
120
  floorMapLayoutRef = props.floorMapLayoutRef,
121
+ floorMapFooter = props.floorMapFooter,
120
122
  classNameProp = props.className,
121
123
  styleProp = props.style,
122
124
  rest = _objectWithoutProperties(props, _excluded);
@@ -301,9 +303,10 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
301
303
  floorMapProps: floorMapProp,
302
304
  floorMapLayoutContext: floorMapLayoutContextProp,
303
305
  defaultBodyView: defaultBodyView,
304
- floorMapLayoutRef: floorMapLayoutRef
306
+ floorMapLayoutRef: floorMapLayoutRef,
307
+ floorMapFooter: floorMapFooter
305
308
  });
306
- }, [layoutType, rowKeyProp, dataProp, dataSourcesProp, gridDataSourceKeyProp, loadingProp, totalProp, paginationProp, onPageChangeProp, searchParamsProp, onSearchProp, onResetProp, mergedChildComponentProps, internalSelectedKeys, internalSelectedRows, onSelectionChangeInternal, internalColumnVisibility, onColumnVisibilityChangeInternal, internalColumnOrder, onColumnOrderChangeInternal, fillHeight, scrollAreaHeight, filterResetKey, floorMapProp, floorMapLayoutContextProp, defaultBodyView, floorMapLayoutRef, bodyView, setBodyView]);
309
+ }, [layoutType, rowKeyProp, dataProp, dataSourcesProp, gridDataSourceKeyProp, loadingProp, totalProp, paginationProp, onPageChangeProp, searchParamsProp, onSearchProp, onResetProp, mergedChildComponentProps, internalSelectedKeys, internalSelectedRows, onSelectionChangeInternal, internalColumnVisibility, onColumnVisibilityChangeInternal, internalColumnOrder, onColumnOrderChangeInternal, fillHeight, scrollAreaHeight, filterResetKey, floorMapProp, floorMapLayoutContextProp, defaultBodyView, floorMapLayoutRef, floorMapFooter, bodyView, setBodyView]);
307
310
  var content = /*#__PURE__*/React.createElement(RecordBoardProvider, {
308
311
  value: contextValue
309
312
  }, children);
@@ -38,3 +38,4 @@ declare const PisellRecordBoard: PisellRecordBoardType;
38
38
  export default PisellRecordBoard;
39
39
  export type { RecordBoardProps, RecordBoardLayoutType, RecordBoardContextValue, RecordBoardChildComponentProps, RecordBoardGridProps, RecordBoardColumnType, RecordBoardFieldType, RecordBoardColumnFilterConfig, RecordBoardOptionItem, RecordBoardGetOptions, RecordBoardBodyView, RecordBoardFloorMapProps, RecordBoardToolBarProps, } from './types';
40
40
  export { useRecordBoardContext } from './hooks/useRecordBoardContext';
41
+ export { useRecordBoardShellBodyMeta } from './shellFrame';
@@ -21,4 +21,5 @@ PisellRecordBoard.CardList = RecordBoardCardList;
21
21
  PisellRecordBoard.BatchActionBar = RecordBoardBatchActionBar;
22
22
  PisellRecordBoard.useRecordBoardContext = useRecordBoardContext;
23
23
  export default PisellRecordBoard;
24
- export { useRecordBoardContext } from "./hooks/useRecordBoardContext";
24
+ export { useRecordBoardContext } from "./hooks/useRecordBoardContext";
25
+ export { useRecordBoardShellBodyMeta } from "./shellFrame";
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { RecordBoardToolBarProps as ToolBarPropsType } from '../../types';
3
3
  import './ToolBarFilter.less';
4
+ import './recordBoardToolbar.less';
4
5
  /**
5
6
  * RecordBoard 下的工具栏:使用 PisellToolBar。
6
7
  * 左侧默认 PisellFind(inline);右侧默认 PisellFilter。通过 childComponentProps.toolBar.search / toolBar.filter 为对象时透传对应组件 props,为 false 时不渲染。
@@ -6,6 +6,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  import React, { useCallback, useMemo } from 'react';
9
+ import classNames from 'classnames';
9
10
  import { Button, Space, Segmented } from 'antd';
10
11
  import SwitchVertical01 from '@pisell/icon/es/SwitchVertical01';
11
12
  import PisellToolBar from "../../../pisellGridPro/ToolBar";
@@ -20,6 +21,7 @@ import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
20
21
  import { locales as utilsLocales } from '@pisell/utils';
21
22
  import { getText } from "../../../../locales";
22
23
  import "./ToolBarFilter.less";
24
+ import "./recordBoardToolbar.less";
23
25
 
24
26
  /** 与 Quick Filter 同源:优先 utils,若 utils 返回 key(未命中)则用 materials 再回退 */
25
27
  function getSortButtonText() {
@@ -61,10 +63,10 @@ function getDefaultFilterValue() {
61
63
  };
62
64
  }
63
65
 
64
- /**
65
- * RecordBoard 下的工具栏:使用 PisellToolBar。
66
- * 左侧默认 PisellFind(inline);右侧默认 PisellFilter。通过 childComponentProps.toolBar.search / toolBar.filter 为对象时透传对应组件 props,为 false 时不渲染。
67
- * 可透传 topLeft、topRight、bottomLeft、bottomRight、tabs。
66
+ /**
67
+ * RecordBoard 下的工具栏:使用 PisellToolBar。
68
+ * 左侧默认 PisellFind(inline);右侧默认 PisellFilter。通过 childComponentProps.toolBar.search / toolBar.filter 为对象时透传对应组件 props,为 false 时不渲染。
69
+ * 可透传 topLeft、topRight、bottomLeft、bottomRight、tabs。
68
70
  */
69
71
  var RecordBoardToolBar = function RecordBoardToolBar(props) {
70
72
  var _shellMeta$hasGridCon, _shellMeta$hasFloorMa, _shellMeta$effectiveF, _ctx$childComponentPr, _ctx$childComponentPr2, _searchParams$DEFAULT, _ctx$childComponentPr3, _formFiltersPrefix, _size, _filterResetKey;
@@ -150,9 +152,18 @@ var RecordBoardToolBar = function RecordBoardToolBar(props) {
150
152
  marginRight: 8
151
153
  }
152
154
  }) : null;
153
- var topLeft = /*#__PURE__*/React.createElement("div", {
155
+
156
+ /** 平面图模式:第二行工具(搜索/筛选等)收起;切换器在业务方 tabs 内(如预约 ScheduleBand) */
157
+ var compactFloorMapToolbar = bodyView === 'floorMap' && showTableFloorToggle;
158
+
159
+ /**
160
+ * 仅平面图且 tabs 内含 ScheduleBand 时隐藏顶行切换器;表格视图 tabs 无 ScheduleBand,
161
+ * 切换器回到 Find 左侧(与 PisellReservation 表格态一致)。
162
+ */
163
+ var hideBodyViewToggleInToolbarRow = showTableFloorToggle && Boolean(slots.tabs) && bodyView === 'floorMap';
164
+ var topLeft = compactFloorMapToolbar ? null : /*#__PURE__*/React.createElement("div", {
154
165
  className: "record-board-toolbar-top-left"
155
- }, bodyViewToggle, quickFilterNode, searchNode ? /*#__PURE__*/React.createElement("div", {
166
+ }, !hideBodyViewToggleInToolbarRow ? bodyViewToggle : null, quickFilterNode, searchNode ? /*#__PURE__*/React.createElement("div", {
156
167
  className: "record-board-toolbar-find-wrap"
157
168
  }, searchNode) : null, slots.topLeft);
158
169
  var sortConfig = slots.sort;
@@ -245,17 +256,17 @@ var RecordBoardToolBar = function RecordBoardToolBar(props) {
245
256
  placement: "bottomLeft"
246
257
  }, _typeof(filterConfig) === 'object' && filterConfig !== null ? filterConfig : {}));
247
258
  var showColumnSetting = slots.columnSetting !== false && Array.isArray(gridColumns) && gridColumns.length > 0;
248
- var topRight = /*#__PURE__*/React.createElement(Space, null, showColumnSetting ? /*#__PURE__*/React.createElement(RecordBoardColumnSetting, null) : null, sortNode, filterNode, /*#__PURE__*/React.createElement(ToolBarReset, {
259
+ var topRight = compactFloorMapToolbar ? null : /*#__PURE__*/React.createElement(Space, null, showColumnSetting ? /*#__PURE__*/React.createElement(RecordBoardColumnSetting, null) : null, sortNode, filterNode, /*#__PURE__*/React.createElement(ToolBarReset, {
249
260
  size: "large"
250
261
  }), slots.topRight);
251
262
  return /*#__PURE__*/React.createElement(PisellToolBar, {
252
- className: slots.className,
263
+ className: classNames(bodyView === 'floorMap' && 'pisell-record-board-toolbar--floor-map', bodyView === 'grid' && 'pisell-record-board-toolbar--grid', slots.className),
253
264
  style: slots.style,
254
265
  tabs: slots.tabs,
255
266
  topLeft: topLeft,
256
267
  topRight: topRight,
257
- bottomLeft: slots.bottomLeft,
258
- bottomRight: slots.bottomRight
268
+ bottomLeft: compactFloorMapToolbar ? null : slots.bottomLeft,
269
+ bottomRight: compactFloorMapToolbar ? null : slots.bottomRight
259
270
  });
260
271
  };
261
272
  RecordBoardToolBar.displayName = 'RecordBoard.ToolBar';