@pisell/materials 1.0.1062 → 1.0.1064

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 (111) 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 +22 -22
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +26 -26
  11. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +43 -31
  12. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +60 -16
  13. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +8 -0
  14. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +22 -12
  15. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +7 -5
  16. package/es/components/pisellFloorMapLayout/components/MapLayer.js +5 -2
  17. package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  18. package/es/components/pisellFloorMapLayout/components/ViewControls.js +29 -10
  19. package/es/components/pisellFloorMapLayout/components/ViewControls.less +36 -12
  20. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +2 -0
  21. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +3 -1
  22. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +2 -2
  23. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +1 -0
  24. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +166 -43
  25. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +1 -1
  26. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +90 -13
  27. package/es/components/pisellFloorMapLayout/index.d.ts +2 -0
  28. package/es/components/pisellFloorMapLayout/index.js +2 -0
  29. package/es/components/pisellFloorMapLayout/locales.d.ts +6 -0
  30. package/es/components/pisellFloorMapLayout/locales.js +9 -3
  31. package/es/components/pisellFloorMapLayout/types.d.ts +9 -2
  32. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +1 -0
  33. package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +10 -1
  34. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
  35. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +86 -0
  36. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +3 -2
  37. package/es/components/pisellRecordBoard/PisellRecordBoard.js +6 -3
  38. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
  39. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +21 -10
  40. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
  41. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +2 -0
  42. package/es/components/pisellRecordBoard/shellFrame/index.js +9 -3
  43. package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
  44. package/es/components/pisellRecordBoard/types.d.ts +6 -0
  45. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +4 -1
  46. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +18 -1
  47. package/es/components/pisellReservationScheduleBand/types.d.ts +4 -0
  48. package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +187 -29
  49. package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +11 -0
  50. package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +7 -1
  51. package/es/components/pisellTimeNavigator/components/CursorLayer.js +27 -7
  52. package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +3 -1
  53. package/es/components/pisellTimeNavigator/components/GestureLayer.js +14 -5
  54. package/es/components/pisellTimeNavigator/components/ScaleLayer.d.ts +6 -1
  55. package/es/components/pisellTimeNavigator/components/ScaleLayer.js +28 -6
  56. package/es/components/pisellTimeNavigator/types.d.ts +11 -0
  57. package/es/index.d.ts +1 -1
  58. package/es/index.js +1 -1
  59. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +39 -36
  60. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +56 -12
  61. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +8 -0
  62. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +19 -10
  63. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +7 -5
  64. package/lib/components/pisellFloorMapLayout/components/MapLayer.js +3 -1
  65. package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
  66. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +28 -6
  67. package/lib/components/pisellFloorMapLayout/components/ViewControls.less +36 -12
  68. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +2 -0
  69. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +3 -1
  70. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +1 -0
  71. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +143 -29
  72. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +1 -1
  73. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +86 -13
  74. package/lib/components/pisellFloorMapLayout/index.d.ts +2 -0
  75. package/lib/components/pisellFloorMapLayout/index.js +6 -0
  76. package/lib/components/pisellFloorMapLayout/locales.d.ts +6 -0
  77. package/lib/components/pisellFloorMapLayout/locales.js +9 -3
  78. package/lib/components/pisellFloorMapLayout/types.d.ts +9 -2
  79. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +1 -0
  80. package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +7 -1
  81. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
  82. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +69 -0
  83. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +2 -1
  84. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +5 -1
  85. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
  86. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +13 -5
  87. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
  88. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +2 -0
  89. package/lib/components/pisellRecordBoard/shellFrame/index.js +11 -4
  90. package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
  91. package/lib/components/pisellRecordBoard/types.d.ts +6 -0
  92. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -1
  93. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +18 -1
  94. package/lib/components/pisellReservationScheduleBand/types.d.ts +4 -0
  95. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +176 -8
  96. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +11 -0
  97. package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +7 -1
  98. package/lib/components/pisellTimeNavigator/components/CursorLayer.js +24 -3
  99. package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +3 -1
  100. package/lib/components/pisellTimeNavigator/components/GestureLayer.js +16 -5
  101. package/lib/components/pisellTimeNavigator/components/ScaleLayer.d.ts +6 -1
  102. package/lib/components/pisellTimeNavigator/components/ScaleLayer.js +24 -3
  103. package/lib/components/pisellTimeNavigator/types.d.ts +11 -0
  104. package/lib/index.d.ts +1 -1
  105. package/lib/index.js +8 -0
  106. package/lowcode/floor-map-image-element/meta.ts +113 -0
  107. package/lowcode/floor-map-layout-provider/meta.ts +1 -1
  108. package/lowcode/pisell-floor-map-layout/meta.ts +37 -1
  109. package/lowcode/render-figma-style-round-table-card/meta.ts +1 -1
  110. package/lowcode/render-figma-style-table-card/meta.ts +1 -1
  111. package/package.json +3 -3
@@ -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);
@@ -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';
@@ -0,0 +1,23 @@
1
+ /**
2
+ * 平面视图:工具栏常仅一行(ScheduleBand),去掉 GridPro 默认底内边距。
3
+ * 不用仅依赖 #body:Story/本地预览可能没有 id=body,低代码若再包一层 #body 会导致双前缀失效。
4
+ * !important:确保晚于 @pisellGridPro/ToolBar 中单类 .pisell-grid-pro-toolbar 的 padding-bottom。
5
+ */
6
+ .pisell-grid-pro-toolbar.pisell-record-board-toolbar--floor-map {
7
+ padding-bottom: 0 !important;
8
+ }
9
+
10
+ #body .pisell-grid-pro-toolbar.pisell-record-board-toolbar--floor-map {
11
+ padding-bottom: 0 !important;
12
+ }
13
+
14
+ /* 表格态工具栏与内容对齐:左右留白 16;平面图态不加此内边距 */
15
+ .pisell-grid-pro-toolbar.pisell-record-board-toolbar--grid {
16
+ padding-left: 16px;
17
+ padding-right: 16px;
18
+ }
19
+
20
+ #body .pisell-grid-pro-toolbar.pisell-record-board-toolbar--grid {
21
+ padding-left: 16px;
22
+ padding-right: 16px;
23
+ }
@@ -3,6 +3,7 @@ import RecordBoardToolBar from './ToolBar';
3
3
  import RecordBoardBatchActionBar from './BatchActionBar';
4
4
  import RecordBoardPagination from './Pagination';
5
5
  import RecordBoardSearch from './Search';
6
+ import './shellFrameFloorMap.less';
6
7
  import ToolBarReset from './ToolBarReset';
7
8
  import ToolBarQuickFilter from './ToolBarQuickFilter';
8
9
  import RecordBoardFloorMap from './FloorMap';
@@ -18,3 +19,4 @@ declare const RecordBoardShellFrame: React.FC<{
18
19
  }>;
19
20
  export default RecordBoardShellFrame;
20
21
  export { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, ToolBarReset, ToolBarQuickFilter, RecordBoardFloorMap };
22
+ export { useRecordBoardShellBodyMeta } from './ShellBodyMetaContext';
@@ -14,6 +14,7 @@ import RecordBoardToolBar from "./ToolBar";
14
14
  import RecordBoardBatchActionBar from "./BatchActionBar";
15
15
  import RecordBoardPagination from "./Pagination";
16
16
  import RecordBoardSearch from "./Search";
17
+ import "./shellFrameFloorMap.less";
17
18
  import ToolBarReset from "./ToolBarReset";
18
19
  import ToolBarQuickFilter from "./ToolBarQuickFilter";
19
20
  import RecordBoardFloorMap from "./FloorMap";
@@ -134,12 +135,14 @@ var RecordBoardShellFrame = function RecordBoardShellFrame(_ref2) {
134
135
  return (_ctx$floorMapLayoutCo = ctx.floorMapLayoutContext) !== null && _ctx$floorMapLayoutCo !== void 0 ? _ctx$floorMapLayoutCo : EMPTY_FLOOR_MAP_LAYOUT_CONTEXT;
135
136
  }, [ctx.floorMapLayoutContext]);
136
137
  var floorMapNode = effectiveFloorMapProps && !showGrid ? /*#__PURE__*/React.createElement("div", {
138
+ className: "pisell-record-board-floor-map-viewport",
137
139
  style: {
138
140
  flex: 1,
139
141
  minHeight: 0,
140
142
  display: 'flex',
141
143
  flexDirection: 'column',
142
- overflow: 'hidden'
144
+ overflow: 'hidden',
145
+ position: 'relative'
143
146
  }
144
147
  }, /*#__PURE__*/React.createElement(FloorMapLayoutProvider, {
145
148
  value: floorMapLayoutProviderValue
@@ -156,7 +159,9 @@ var RecordBoardShellFrame = function RecordBoardShellFrame(_ref2) {
156
159
  flex: 1,
157
160
  minHeight: 0
158
161
  }, (_effectiveFloorMapPro3 = effectiveFloorMapProps.style) !== null && _effectiveFloorMapPro3 !== void 0 ? _effectiveFloorMapPro3 : {})
159
- })))) : null;
162
+ }))), ctx.floorMapFooter ? /*#__PURE__*/React.createElement("div", {
163
+ className: "pisell-record-board-floor-map-floating-slot"
164
+ }, ctx.floorMapFooter) : null) : null;
160
165
  var bodyContent = fillHeight ? /*#__PURE__*/React.createElement(React.Fragment, null, showGrid ? /*#__PURE__*/React.createElement(ScrollAreaMeasurer, {
161
166
  onHeight: (_ctx$setScrollAreaHei = ctx === null || ctx === void 0 ? void 0 : ctx.setScrollAreaHeight) !== null && _ctx$setScrollAreaHei !== void 0 ? _ctx$setScrollAreaHei : function () {},
162
167
  autoCalc: ctx === null || ctx === void 0 || (_ctx$childComponentPr = ctx.childComponentProps) === null || _ctx$childComponentPr === void 0 || (_ctx$childComponentPr = _ctx$childComponentPr.grid) === null || _ctx$childComponentPr === void 0 || (_ctx$childComponentPr = _ctx$childComponentPr.scroll) === null || _ctx$childComponentPr === void 0 ? void 0 : _ctx$childComponentPr.autoCalc
@@ -183,4 +188,5 @@ var RecordBoardShellFrame = function RecordBoardShellFrame(_ref2) {
183
188
  };
184
189
  RecordBoardShellFrame.displayName = 'RecordBoard.ShellFrame';
185
190
  export default RecordBoardShellFrame;
186
- export { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, ToolBarReset, ToolBarQuickFilter, RecordBoardFloorMap };
191
+ export { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, ToolBarReset, ToolBarQuickFilter, RecordBoardFloorMap };
192
+ export { useRecordBoardShellBodyMeta } from "./ShellBodyMetaContext";
@@ -0,0 +1,25 @@
1
+ /** 平面图区域:画布 + 悬浮层共用,便于底部按钮叠在画布上 */
2
+ .pisell-record-board-floor-map-viewport {
3
+ box-sizing: border-box;
4
+ }
5
+
6
+ /**
7
+ * 画布内底部居中悬浮插槽(如「编辑平面图」)。
8
+ * 容器不接收指针事件,避免挡画布拖拽/缩放;子节点恢复可点。
9
+ */
10
+ .pisell-record-board-floor-map-floating-slot {
11
+ position: absolute;
12
+ left: 0;
13
+ right: 0;
14
+ bottom: 20px;
15
+ display: flex;
16
+ justify-content: center;
17
+ align-items: center;
18
+ pointer-events: none;
19
+ /* 高于 PisellFloorMapLayout 内 ViewControls(20),避免与左下角控件叠次序模糊 */
20
+ z-index: 25;
21
+
22
+ > * {
23
+ pointer-events: auto;
24
+ }
25
+ }
@@ -204,6 +204,10 @@ export interface RecordBoardContextValue {
204
204
  defaultBodyView?: RecordBoardBodyView;
205
205
  /** 挂到 ShellFrame 内 PisellFloorMapLayout,供外部 imperative 调用(如 saveLayout / fitBounds) */
206
206
  floorMapLayoutRef?: Ref<PisellFloorMapLayoutRef | null>;
207
+ /**
208
+ * 平面图视图下叠在画布内的底部居中悬浮区(如「编辑平面图」),不单独占一行 footer。
209
+ */
210
+ floorMapFooter?: ReactNode;
207
211
  }
208
212
  /**
209
213
  * 各 layout 下子组件的可选透传配置(类似 ChildComponentProps)
@@ -370,6 +374,8 @@ export interface RecordBoardProps {
370
374
  bodyViewStorageKey?: string;
371
375
  /** 平面图 Layout 实例 ref,由 ShellFrame 注入 */
372
376
  floorMapLayoutRef?: Ref<PisellFloorMapLayoutRef | null>;
377
+ /** 平面图画布内底部悬浮插槽(如编辑入口),注入 Context 供 ShellFrame 渲染 */
378
+ floorMapFooter?: ReactNode;
373
379
  /** 其他 */
374
380
  [key: string]: any;
375
381
  }
@@ -29,6 +29,7 @@ export function PisellReservationScheduleBand(props) {
29
29
  timeNavigatorProps = props.timeNavigatorProps,
30
30
  scheduleStartSlot = props.scheduleStartSlot,
31
31
  scheduleEndSlot = props.scheduleEndSlot,
32
+ scheduleAfterDateSlot = props.scheduleAfterDateSlot,
32
33
  className = props.className,
33
34
  style = props.style;
34
35
  var isControlled = valueProp !== undefined;
@@ -78,7 +79,9 @@ export function PisellReservationScheduleBand(props) {
78
79
  }, /*#__PURE__*/React.createElement(PisellReservationSchedule, _extends({
79
80
  value: effective.date,
80
81
  onChange: handleDateChange
81
- }, scheduleProps))), /*#__PURE__*/React.createElement("div", {
82
+ }, scheduleProps)), scheduleAfterDateSlot ? /*#__PURE__*/React.createElement("div", {
83
+ className: "pisell-reservation-schedule-band-after-date"
84
+ }, scheduleAfterDateSlot) : null), /*#__PURE__*/React.createElement("div", {
82
85
  className: "pisell-reservation-schedule-band-slot-end"
83
86
  }, scheduleEndSlot)), /*#__PURE__*/React.createElement("div", {
84
87
  className: "pisell-reservation-schedule-band-navigator"
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  align-items: stretch;
5
5
  width: 100%;
6
- gap: 12px;
6
+ gap: 0;
7
7
  box-sizing: border-box;
8
8
  }
9
9
 
@@ -40,7 +40,24 @@
40
40
  justify-self: center;
41
41
  min-width: 0;
42
42
  display: flex;
43
+ flex-direction: row;
44
+ flex-wrap: nowrap;
45
+ align-items: center;
43
46
  justify-content: center;
47
+ gap: 8px;
48
+ }
49
+
50
+ /** 日程组件根节点默认 width:100%,在中间栏会与「日期右侧」插槽分两行;此处收窄为内容宽,保证与 after-date 同一行 */
51
+ .pisell-reservation-schedule-band-schedule > .pisell-reservation-schedule {
52
+ width: auto;
53
+ flex: 0 0 auto;
54
+ min-width: 0;
55
+ }
56
+
57
+ .pisell-reservation-schedule-band-after-date {
58
+ display: flex;
59
+ align-items: center;
60
+ flex-shrink: 0;
44
61
  }
45
62
 
46
63
  .pisell-reservation-schedule-band-navigator {
@@ -40,6 +40,10 @@ export interface PisellReservationScheduleBandProps {
40
40
  * 顶栏日程行:PisellReservationSchedule 右侧自定义内容(如状态、主按钮)
41
41
  */
42
42
  scheduleEndSlot?: ReactNode;
43
+ /**
44
+ * 顶栏日程行:紧挨在选日组件之后(如「跟随当前」),与中间列同一 flex 区
45
+ */
46
+ scheduleAfterDateSlot?: ReactNode;
43
47
  className?: string;
44
48
  style?: CSSProperties;
45
49
  }