@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
@@ -42,7 +42,7 @@ import { initFloorMapLayoutLocales } from "./utils/floorMapCanvasDisplay";
42
42
  import "./PisellFloorMapLayout.less";
43
43
  var PREFIX = 'pisell-floor-map-layout';
44
44
  function PisellFloorMapLayoutInner(props, ref) {
45
- var _engineCtx$engine, _config$sceneElements, _mapLayer$boundingPad;
45
+ var _engineCtx$engine, _config$sceneElements;
46
46
  var layoutCtx = useFloorMapLayoutContext();
47
47
  var p = mergeFloorMapLayoutPropsFromContext(props, layoutCtx);
48
48
  var className = p.className,
@@ -124,7 +124,30 @@ function PisellFloorMapLayoutInner(props, ref) {
124
124
  placeSceneElementFromPaletteDrop = edit.placeSceneElementFromPaletteDrop,
125
125
  editPanelParams = edit.editPanelParams,
126
126
  placeOverlayClass = edit.placeOverlayClass,
127
- isLayoutDirty = edit.isLayoutDirty;
127
+ isLayoutDirty = edit.isLayoutDirty,
128
+ toggleDraftCanvasShowGrid = edit.toggleDraftCanvasShowGrid;
129
+ var effectiveMapLayer = useMemo(function () {
130
+ var _canvas$mapLayer;
131
+ if (!isFloorMapView || !config || !currentCanvasId) {
132
+ return mapLayer;
133
+ }
134
+ var canvas = config.canvases.find(function (c) {
135
+ return c.id === currentCanvasId;
136
+ });
137
+ return _objectSpread(_objectSpread({}, mapLayer !== null && mapLayer !== void 0 ? mapLayer : {}), (_canvas$mapLayer = canvas === null || canvas === void 0 ? void 0 : canvas.mapLayer) !== null && _canvas$mapLayer !== void 0 ? _canvas$mapLayer : {});
138
+ }, [isFloorMapView, config, currentCanvasId, mapLayer]);
139
+
140
+ /**
141
+ * 必须与下方 TransformWrapper 的 `key` 完全一致。
142
+ * 远程/合并配置落地后 boundingPadding 等会变 → Wrapper 重挂载 → 若 autoFit 仍按旧「仅 canvasId」帧认为已 done,首屏会停在初始 transform;切换画布才因 id 变化再次 fit。
143
+ */
144
+ var transformWrapperKey = useMemo(function () {
145
+ var _effectiveMapLayer$bo, _zoom$defaultScale;
146
+ if (!isFloorMapView) return 'fmap-layout';
147
+ var bp = (_effectiveMapLayer$bo = effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.boundingPadding) !== null && _effectiveMapLayer$bo !== void 0 ? _effectiveMapLayer$bo : 'd';
148
+ var z = (_zoom$defaultScale = zoom.defaultScale) !== null && _zoom$defaultScale !== void 0 ? _zoom$defaultScale : 1;
149
+ return "fmap-".concat(currentCanvasId !== null && currentCanvasId !== void 0 ? currentCanvasId : 'na', "-bp").concat(bp, "-z").concat(z);
150
+ }, [isFloorMapView, currentCanvasId, effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.boundingPadding, zoom.defaultScale]);
128
151
  var canvasesForTabs = useMemo(function () {
129
152
  return config ? mergeCanvasesForTabs(config) : [];
130
153
  }, [config]);
@@ -146,8 +169,8 @@ function PisellFloorMapLayoutInner(props, ref) {
146
169
  }, [engineLocale]);
147
170
  var cellSize = cellSizeProp !== null && cellSizeProp !== void 0 ? cellSizeProp : DEFAULT_CELL_SIZE;
148
171
  var itemGap = useMemo(function () {
149
- return gapToPx(mapLayer === null || mapLayer === void 0 ? void 0 : mapLayer.gap);
150
- }, [mapLayer === null || mapLayer === void 0 ? void 0 : mapLayer.gap]);
172
+ return gapToPx(effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.gap);
173
+ }, [effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.gap]);
151
174
  var effectiveItemUnit = isFloorMapView ? 'pixel' : itemUnit;
152
175
  var metrics = useFloorMapTransformMetrics({
153
176
  items: items,
@@ -159,8 +182,8 @@ function PisellFloorMapLayoutInner(props, ref) {
159
182
  zoom: zoom,
160
183
  transformRef: transformRef,
161
184
  contentOffsetRef: contentOffsetRef,
162
- boundingPadding: mapLayer === null || mapLayer === void 0 ? void 0 : mapLayer.boundingPadding,
163
- frameResetKey: isFloorMapView ? currentCanvasId !== null && currentCanvasId !== void 0 ? currentCanvasId : '' : undefined
185
+ boundingPadding: effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.boundingPadding,
186
+ frameResetKey: isFloorMapView ? transformWrapperKey : undefined
164
187
  });
165
188
  var containerRef = metrics.containerRef,
166
189
  mapAreaRef = metrics.mapAreaRef,
@@ -189,23 +212,10 @@ function PisellFloorMapLayoutInner(props, ref) {
189
212
  var viewControlsConfig = useMemo(function () {
190
213
  if (!isFloorMapView || mode !== 'edit') return controls;
191
214
  return _objectSpread(_objectSpread({}, controls), {}, {
192
- showFullscreen: false,
193
- showFitBounds: false
215
+ showFullscreen: false
194
216
  });
195
217
  }, [isFloorMapView, mode, controls]);
196
- var topBarExtraActions = useMemo(function () {
197
- if (!isFloorMapView || mode !== 'edit') return null;
198
- if (controls.showFitBounds !== true) return null;
199
- return /*#__PURE__*/React.createElement("button", {
200
- type: "button",
201
- className: classNames("".concat(PREFIX, "-edit-top-bar-btn"), "".concat(PREFIX, "-edit-top-bar-btn-ghost")),
202
- onClick: function onClick() {
203
- return fitBounds();
204
- },
205
- "aria-label": "\u533A\u57DF\u5B9A\u4F4D",
206
- title: "\u533A\u57DF\u5B9A\u4F4D"
207
- }, "\u229E");
208
- }, [isFloorMapView, mode, controls.showFitBounds, fitBounds]);
218
+ var topBarExtraActions = null;
209
219
  var _useState = useState(false),
210
220
  _useState2 = _slicedToArray(_useState, 2),
211
221
  mapPaletteDragActive = _useState2[0],
@@ -233,7 +243,8 @@ function PisellFloorMapLayoutInner(props, ref) {
233
243
  type: 'scene',
234
244
  elementKind: payload.elementKind,
235
245
  dataSourceKey: payload.dataSourceKey,
236
- recordId: payload.recordId
246
+ recordId: payload.recordId,
247
+ recordIds: payload.recordIds
237
248
  });
238
249
  }, [isFloorMapView, mode, placeSceneElementFromPaletteDrop]);
239
250
  var applyPaletteTouchDropInScene = useCallback(function (payload, cx, cy) {
@@ -242,7 +253,8 @@ function PisellFloorMapLayoutInner(props, ref) {
242
253
  type: 'scene',
243
254
  elementKind: payload.elementKind,
244
255
  dataSourceKey: payload.dataSourceKey,
245
- recordId: payload.recordId
256
+ recordId: payload.recordId,
257
+ recordIds: payload.recordIds
246
258
  });
247
259
  }, [isFloorMapView, mode, placeSceneElementFromPaletteDrop]);
248
260
  var paletteTouchDrag = useFloorMapPaletteTouchDrag({
@@ -431,7 +443,7 @@ function PisellFloorMapLayoutInner(props, ref) {
431
443
  }
432
444
  }
433
445
  }, /*#__PURE__*/React.createElement(TransformWrapper, {
434
- key: isFloorMapView ? "fmap-".concat(currentCanvasId !== null && currentCanvasId !== void 0 ? currentCanvasId : 'na', "-bp").concat((_mapLayer$boundingPad = mapLayer === null || mapLayer === void 0 ? void 0 : mapLayer.boundingPadding) !== null && _mapLayer$boundingPad !== void 0 ? _mapLayer$boundingPad : 'd', "-z").concat(zoomConfig.initialScale) : 'fmap-layout',
446
+ key: transformWrapperKey,
435
447
  centerOnInit: false,
436
448
  initialScale: zoomConfig.initialScale,
437
449
  initialPositionX: initialPositionX,
@@ -457,7 +469,7 @@ function PisellFloorMapLayoutInner(props, ref) {
457
469
  };
458
470
  }
459
471
  }, function (ctx) {
460
- var _mapLayer$snapStep;
472
+ var _effectiveMapLayer$sn;
461
473
  transformRef.current = ctx;
462
474
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TransformComponent, {
463
475
  wrapperStyle: {
@@ -473,12 +485,10 @@ function PisellFloorMapLayoutInner(props, ref) {
473
485
  minHeight: contentHeight,
474
486
  position: 'relative',
475
487
  overflow: 'visible',
476
- backgroundColor: '#F2F4F7',
477
- backgroundImage: ['linear-gradient(to right, rgba(0,0,0,0.08) 1px, transparent 1px)', 'linear-gradient(to bottom, rgba(0,0,0,0.08) 1px, transparent 1px)'].join(', '),
478
- backgroundSize: '50px 50px'
488
+ backgroundColor: '#F2F4F7'
479
489
  }
480
490
  }, /*#__PURE__*/React.createElement(MapLayer, {
481
- config: mapLayer,
491
+ config: effectiveMapLayer,
482
492
  contentWidth: contentWidth,
483
493
  contentHeight: contentHeight,
484
494
  cellSize: cellSize,
@@ -498,7 +508,7 @@ function PisellFloorMapLayoutInner(props, ref) {
498
508
  selectedId: selectedId,
499
509
  onSelect: setSelectedId,
500
510
  onUpdateItem: handleUpdateItem,
501
- snapStep: (_mapLayer$snapStep = mapLayer === null || mapLayer === void 0 ? void 0 : mapLayer.snapStep) !== null && _mapLayer$snapStep !== void 0 ? _mapLayer$snapStep : 0,
511
+ snapStep: (_effectiveMapLayer$sn = effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.snapStep) !== null && _effectiveMapLayer$sn !== void 0 ? _effectiveMapLayer$sn : 0,
502
512
  scale: scale,
503
513
  onInteractionChange: setIsInteractingWithElement,
504
514
  getMergedItemWrapperStyle: getMergedItemWrapperStyle
@@ -542,7 +552,9 @@ function PisellFloorMapLayoutInner(props, ref) {
542
552
  scale: scale,
543
553
  isFullscreen: isFullscreen,
544
554
  fitBounds: fitBounds,
545
- toggleFullscreen: editToggleFullscreen
555
+ toggleFullscreen: editToggleFullscreen,
556
+ mapGridVisible: Boolean(effectiveMapLayer === null || effectiveMapLayer === void 0 ? void 0 : effectiveMapLayer.showGrid),
557
+ onToggleMapGrid: isFloorMapView ? toggleDraftCanvasShowGrid : undefined
546
558
  }), isFloorMapView && mode === 'edit' && editPanelParams && config && dataSources && /*#__PURE__*/React.createElement("div", {
547
559
  className: classNames("".concat(PREFIX, "-edit-panel-wrap"), mapAreaSize.height > 0 && "".concat(PREFIX, "-edit-panel-wrap-constrained")),
548
560
  style: mapAreaSize.height > 0 ? {
@@ -11,9 +11,9 @@ import React, { useCallback, useMemo, useRef, useState } from 'react';
11
11
  import { locales } from '@pisell/utils';
12
12
  import classNames from 'classnames';
13
13
  import { CloseOutlined, LockOutlined, UnlockOutlined } from '@ant-design/icons';
14
- import { Input, InputNumber, Select, Button, Form, Popconfirm } from 'antd';
15
- import { FLOOR_MAP_IMAGE_ELEMENT_KIND, FLOOR_MAP_STAGE_ELEMENT_KIND } from "../types";
16
- import { getElementKindConfig, resolveDataBindingPolicy } from "../utils/floorMapElementKindUtils";
14
+ import { Input, InputNumber, Select, Button, Form, Popconfirm, message } from 'antd';
15
+ import { FLOOR_MAP_STAGE_ELEMENT_KIND } from "../types";
16
+ import { getElementKindConfig, resolveDataBindingPolicy, isFloorMapImageElementKind, getSwappableElementKindsInSameCategory, patchSceneElementForKindSwitch } from "../utils/floorMapElementKindUtils";
17
17
  import { FloorMapDataForm } from "./FloorMapDataForm";
18
18
  import useEngineContext from "../../../hooks/useEngineContext";
19
19
  import { getFloorMapCanvasDisplayName, initFloorMapLayoutLocales } from "../utils/floorMapCanvasDisplay";
@@ -98,9 +98,23 @@ export function FloorMapEditPanel(props) {
98
98
  popDesc: locales.getText("".concat(I18N_EP, ".pop-desc")),
99
99
  btnDelete: locales.getText("".concat(I18N_EP, ".btn-delete")),
100
100
  btnCancel: locales.getText("".concat(I18N_EP, ".btn-cancel")),
101
- btnOkDelete: locales.getText("".concat(I18N_EP, ".btn-ok-delete"))
101
+ btnOkDelete: locales.getText("".concat(I18N_EP, ".btn-ok-delete")),
102
+ labelElementKind: locales.getText("".concat(I18N_EP, ".label-element-kind")),
103
+ hintKindBindingCleared: locales.getText("".concat(I18N_EP, ".hint-kind-binding-cleared"))
102
104
  };
103
105
  }, [engineLocale]);
106
+ var swappableKinds = useMemo(function () {
107
+ return getSwappableElementKindsInSameCategory(config, sceneElement.elementKind);
108
+ }, [config, sceneElement.elementKind]);
109
+ var handleElementKindChange = useCallback(function (nextKind) {
110
+ if (nextKind === sceneElement.elementKind) return;
111
+ var hadBinding = Boolean(sceneElement.dataBinding);
112
+ var patch = patchSceneElementForKindSwitch(config, sceneElement, nextKind);
113
+ if (hadBinding && patch.dataBinding === undefined) {
114
+ message.info(ep.hintKindBindingCleared);
115
+ }
116
+ onUpdate(patch);
117
+ }, [config, sceneElement, onUpdate, ep.hintKindBindingCleared]);
104
118
  var canvasOptions = config.canvases.filter(function (c) {
105
119
  return c.enabled;
106
120
  }).sort(function (a, b) {
@@ -112,7 +126,9 @@ export function FloorMapEditPanel(props) {
112
126
  var allowedKeys = kindConfig !== null && kindConfig !== void 0 && (_kindConfig$allowedDa = kindConfig.allowedDataSourceKeys) !== null && _kindConfig$allowedDa !== void 0 && _kindConfig$allowedDa.length ? kindConfig.allowedDataSourceKeys.filter(function (k) {
113
127
  return allKeys.includes(k);
114
128
  }) : allKeys;
115
- var isImageKind = sceneElement.elementKind === FLOOR_MAP_IMAGE_ELEMENT_KIND;
129
+
130
+ /** 与 RecordBoard Story 图片图元一致:`floorMapImage` */
131
+ var isImageKind = isFloorMapImageElementKind(sceneElement.elementKind);
116
132
  var layoutLocked = Boolean(sceneElement.layoutTransformLocked);
117
133
  var initialValues = React.useMemo(function () {
118
134
  var _sceneElement$name, _sceneElement$zIndex, _sceneElement$width, _sceneElement$height, _sceneElement$imageUr;
@@ -220,6 +236,10 @@ export function FloorMapEditPanel(props) {
220
236
  });
221
237
  };
222
238
  var panelScrollRef = useRef(null);
239
+ var getSelectPopupContainer = useCallback(function (node) {
240
+ var _ref, _node$parentElement;
241
+ return (_ref = (_node$parentElement = node.parentElement) !== null && _node$parentElement !== void 0 ? _node$parentElement : panelScrollRef.current) !== null && _ref !== void 0 ? _ref : document.body;
242
+ }, []);
223
243
  var dragScrollRef = useRef({
224
244
  active: false,
225
245
  pointerId: -1,
@@ -274,9 +294,11 @@ export function FloorMapEditPanel(props) {
274
294
  onPointerCancel: endPanelDragScroll
275
295
  }, /*#__PURE__*/React.createElement("div", {
276
296
  className: "".concat(PREFIX, "-edit-panel-header")
277
- }, /*#__PURE__*/React.createElement("span", null, ep.elementProps), /*#__PURE__*/React.createElement(Button, {
297
+ }, /*#__PURE__*/React.createElement("span", {
298
+ className: "".concat(PREFIX, "-edit-panel-header-title")
299
+ }, ep.elementProps), /*#__PURE__*/React.createElement(Button, {
278
300
  type: "text",
279
- size: "small",
301
+ size: "large",
280
302
  className: "".concat(PREFIX, "-edit-panel-close"),
281
303
  icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
282
304
  "aria-label": ep.closeAria,
@@ -288,10 +310,29 @@ export function FloorMapEditPanel(props) {
288
310
  className: "".concat(PREFIX, "-edit-panel-hint warn")
289
311
  }, ep.hintApply) : null, layoutDraftDirty ? /*#__PURE__*/React.createElement("p", {
290
312
  className: "".concat(PREFIX, "-edit-panel-hint muted")
291
- }, ep.hintSave) : null), /*#__PURE__*/React.createElement(Form, {
313
+ }, ep.hintSave) : null), swappableKinds.length > 1 ? /*#__PURE__*/React.createElement("div", {
314
+ className: "".concat(PREFIX, "-edit-panel-kind-row")
315
+ }, /*#__PURE__*/React.createElement("div", {
316
+ className: "".concat(PREFIX, "-edit-panel-record-bind-label")
317
+ }, ep.labelElementKind), /*#__PURE__*/React.createElement(Select, {
318
+ size: "large",
319
+ value: sceneElement.elementKind,
320
+ options: swappableKinds.map(function (k) {
321
+ return {
322
+ value: k.value,
323
+ label: k.label
324
+ };
325
+ }),
326
+ onChange: handleElementKindChange,
327
+ getPopupContainer: getSelectPopupContainer,
328
+ style: {
329
+ width: '100%',
330
+ marginBottom: 12
331
+ }
332
+ })) : null, /*#__PURE__*/React.createElement(Form, {
292
333
  form: form,
293
334
  layout: "vertical",
294
- size: "small",
335
+ size: "large",
295
336
  onFinish: handleFinish,
296
337
  initialValues: initialValues,
297
338
  onValuesChange: function onValuesChange() {
@@ -304,7 +345,7 @@ export function FloorMapEditPanel(props) {
304
345
  className: "".concat(PREFIX, "-edit-panel-layout-lock-title")
305
346
  }, ep.sectionLayout), /*#__PURE__*/React.createElement(Button, {
306
347
  type: "text",
307
- size: "small",
348
+ size: "large",
308
349
  className: "".concat(PREFIX, "-edit-panel-layout-lock-btn"),
309
350
  icon: layoutLocked ? /*#__PURE__*/React.createElement(LockOutlined, null) : /*#__PURE__*/React.createElement(UnlockOutlined, null),
310
351
  "aria-pressed": layoutLocked,
@@ -381,11 +422,12 @@ export function FloorMapEditPanel(props) {
381
422
  label: getFloorMapCanvasDisplayName(c, engineLocale)
382
423
  };
383
424
  }),
384
- allowClear: false
425
+ allowClear: false,
426
+ getPopupContainer: getSelectPopupContainer
385
427
  })), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
386
428
  type: "primary",
387
429
  htmlType: "submit",
388
- size: "small"
430
+ size: "large"
389
431
  }, ep.apply))), showDataBindingSection && /*#__PURE__*/React.createElement("div", {
390
432
  className: "".concat(PREFIX, "-edit-panel-record")
391
433
  }, /*#__PURE__*/React.createElement("div", {
@@ -397,7 +439,7 @@ export function FloorMapEditPanel(props) {
397
439
  }, /*#__PURE__*/React.createElement("div", {
398
440
  className: "".concat(PREFIX, "-edit-panel-record-bind-label")
399
441
  }, ep.labelDataSource), /*#__PURE__*/React.createElement(Select, {
400
- size: "small",
442
+ size: "large",
401
443
  style: {
402
444
  width: '100%'
403
445
  },
@@ -425,13 +467,14 @@ export function FloorMapEditPanel(props) {
425
467
  }
426
468
  });
427
469
  },
428
- allowClear: bindingPolicy === 'optional'
470
+ allowClear: bindingPolicy === 'optional',
471
+ getPopupContainer: getSelectPopupContainer
429
472
  })) : null, allowedKeys.length >= 1 && /*#__PURE__*/React.createElement("div", {
430
473
  className: "".concat(PREFIX, "-edit-panel-record-bind")
431
474
  }, /*#__PURE__*/React.createElement("div", {
432
475
  className: "".concat(PREFIX, "-edit-panel-record-bind-label")
433
476
  }, ep.labelPickRow), /*#__PURE__*/React.createElement(Select, {
434
- size: "small",
477
+ size: "large",
435
478
  placeholder: dataRecordBindOptions.length ? ep.phPickRow : ep.phNoRows,
436
479
  style: {
437
480
  width: '100%'
@@ -439,6 +482,7 @@ export function FloorMapEditPanel(props) {
439
482
  value: hasBoundDataRecord ? binding === null || binding === void 0 ? void 0 : binding.recordId : undefined,
440
483
  allowClear: bindingPolicy === 'optional',
441
484
  options: dataRecordBindOptions,
485
+ getPopupContainer: getSelectPopupContainer,
442
486
  onChange: function onChange(newId) {
443
487
  var _binding$dataSourceKe2, _dataSources$key2, _name;
444
488
  var key = (_binding$dataSourceKe2 = binding === null || binding === void 0 ? void 0 : binding.dataSourceKey) !== null && _binding$dataSourceKe2 !== void 0 ? _binding$dataSourceKe2 : allowedKeys[0];
@@ -491,7 +535,7 @@ export function FloorMapEditPanel(props) {
491
535
  type: "default",
492
536
  danger: true,
493
537
  block: true,
494
- size: "small"
538
+ size: "large"
495
539
  }, ep.btnDelete))) : null);
496
540
  }
497
541
  export default FloorMapEditPanel;
@@ -15,7 +15,15 @@
15
15
  justify-content: space-between;
16
16
  gap: 8px;
17
17
  margin-bottom: 12px;
18
+ }
19
+
20
+ /** 与下方分组标题(如「数据绑定」「数据源记录」)统一的标题样式 */
21
+
22
+ &-header-title {
23
+ font-size: 14px;
18
24
  font-weight: 500;
25
+ color: #262626;
26
+ line-height: 1.4;
19
27
  }
20
28
 
21
29
  &-close {
@@ -173,12 +173,16 @@ export function FloorMapToolbar(props) {
173
173
  var handleDsChange = function handleDsChange(mode, key) {
174
174
  onPlaceModeChange(_objectSpread(_objectSpread({}, mode), {}, {
175
175
  dataSourceKey: key,
176
- recordId: undefined
176
+ recordId: undefined,
177
+ recordIds: undefined
177
178
  }));
178
179
  };
179
- var handleRecordChange = function handleRecordChange(mode, recordId) {
180
+ var handleRecordsChange = function handleRecordsChange(mode, ids) {
181
+ var _ids$filter;
182
+ var list = (_ids$filter = ids === null || ids === void 0 ? void 0 : ids.filter(Boolean)) !== null && _ids$filter !== void 0 ? _ids$filter : [];
180
183
  onPlaceModeChange(_objectSpread(_objectSpread({}, mode), {}, {
181
- recordId: recordId || undefined
184
+ recordIds: list.length > 0 ? list : undefined,
185
+ recordId: undefined
182
186
  }));
183
187
  };
184
188
  var cancelPlaceMode = function cancelPlaceMode() {
@@ -209,10 +213,13 @@ export function FloorMapToolbar(props) {
209
213
  }) : allKeys;
210
214
  var paletteDragPayload = _objectSpread({
211
215
  elementKind: k.value
212
- }, (placeMode === null || placeMode === void 0 ? void 0 : placeMode.type) === 'scene' && placeMode.elementKind === k.value ? {
213
- dataSourceKey: placeMode.dataSourceKey,
216
+ }, (placeMode === null || placeMode === void 0 ? void 0 : placeMode.type) === 'scene' && placeMode.elementKind === k.value ? _objectSpread({
217
+ dataSourceKey: placeMode.dataSourceKey
218
+ }, placeMode.recordIds && placeMode.recordIds.length > 0 ? {
219
+ recordIds: placeMode.recordIds
220
+ } : placeMode.recordId ? {
214
221
  recordId: placeMode.recordId
215
- } : {});
222
+ } : {}) : {});
216
223
  return /*#__PURE__*/React.createElement("div", {
217
224
  key: k.value,
218
225
  className: "".concat(PREFIX, "-toolbar-preview-card-wrap")
@@ -273,7 +280,7 @@ export function FloorMapToolbar(props) {
273
280
  onChange: function onChange(v) {
274
281
  if ((placeMode === null || placeMode === void 0 ? void 0 : placeMode.type) === 'scene') handleDsChange(placeMode, v);
275
282
  },
276
- size: "small",
283
+ size: "large",
277
284
  style: {
278
285
  width: '100%'
279
286
  }
@@ -291,10 +298,13 @@ export function FloorMapToolbar(props) {
291
298
  className: "".concat(PREFIX, "-toolbar-record-pick-hint")
292
299
  }, "\u5F53\u524D\u6570\u636E\u6E90\u65E0\u672A\u7ED1\u5B9A\u8BB0\u5F55\uFF0C\u6216\u5217\u8868\u4E3A\u7A7A\uFF1B\u53EF\u76F4\u63A5\u5728\u753B\u5E03\u843D\u70B9\u5360\u4F4D\u3002");
293
300
  }
301
+ var recordValue = mode !== null && mode !== void 0 && mode.recordIds && mode.recordIds.length > 0 ? mode.recordIds : mode !== null && mode !== void 0 && mode.recordId ? [mode.recordId] : undefined;
294
302
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
295
- placeholder: "\u9009\u62E9\u8981\u5C55\u793A\u7684\u8BB0\u5F55\uFF08\u53EF\u9009\uFF09",
303
+ mode: "multiple",
304
+ placeholder: "\u9009\u62E9\u8981\u5C55\u793A\u7684\u8BB0\u5F55\uFF08\u53EF\u9009\uFF0C\u53EF\u591A\u9009\uFF09",
296
305
  allowClear: true,
297
- value: mode === null || mode === void 0 ? void 0 : mode.recordId,
306
+ maxTagCount: "responsive",
307
+ value: recordValue,
298
308
  options: unplaced.map(function (r) {
299
309
  return {
300
310
  value: r.id,
@@ -302,16 +312,16 @@ export function FloorMapToolbar(props) {
302
312
  };
303
313
  }),
304
314
  onChange: function onChange(v) {
305
- if (mode) handleRecordChange(mode, v);
315
+ if (mode) handleRecordsChange(mode, v);
306
316
  },
307
- size: "small",
317
+ size: "large",
308
318
  style: {
309
319
  width: '100%',
310
320
  marginTop: 4
311
321
  }
312
322
  }), /*#__PURE__*/React.createElement("div", {
313
323
  className: "".concat(PREFIX, "-toolbar-record-pick-hint")
314
- }, "\u9009\u4E2D\u540E\u5728\u753B\u5E03\u70B9\u51FB\u5B8C\u6210\u843D\u4F4D\uFF1B\u7559\u7A7A\u5219\u5148\u5360\u4F4D\uFF0C\u7A0D\u540E\u5728\u4FA7\u680F\u7ED1\u5B9A\u3002"));
324
+ }, "\u53EF\u9009\u591A\u6761\uFF0C\u5728\u753B\u5E03\u70B9\u51FB\u4E00\u6B21\u5C06\u6309\u9636\u68AF\u504F\u79FB\u843D\u591A\u6761\uFF1B\u7559\u7A7A\u5219\u5148\u5360\u4F4D\uFF0C\u7A0D\u540E\u5728\u4FA7\u680F\u7ED1\u5B9A\u3002"));
315
325
  }()), allowedKeys.length === 0 && /*#__PURE__*/React.createElement("div", {
316
326
  className: "".concat(PREFIX, "-toolbar-record-hint")
317
327
  }, "\u65E0\u53EF\u7528\u6570\u636E\u6E90"), /*#__PURE__*/React.createElement("button", {
@@ -2,7 +2,7 @@
2
2
  .pisell-floor-map-layout-toolbar {
3
3
  &.pisell-floor-map-layout-toolbar-sidebar {
4
4
  position: relative;
5
- width: 220px;
5
+ width: 248px;
6
6
  flex-shrink: 0;
7
7
  display: flex;
8
8
  flex-direction: column;
@@ -131,8 +131,9 @@
131
131
  display: block;
132
132
  width: 100%;
133
133
  margin-top: 8px;
134
- padding: 8px 12px;
135
- font-size: 13px;
134
+ padding: 10px 16px;
135
+ font-size: 15px;
136
+ min-height: 40px;
136
137
  color: #333;
137
138
  background: #f5f5f5;
138
139
  border: 1px solid #d9d9d9;
@@ -152,8 +153,9 @@
152
153
 
153
154
  &.cancel-inline {
154
155
  margin-top: 0;
155
- padding: 4px 8px;
156
- font-size: 12px;
156
+ padding: 8px 12px;
157
+ font-size: 14px;
158
+ min-height: 40px;
157
159
  color: #8c8c8c;
158
160
  }
159
161
 
@@ -20,6 +20,7 @@ function toCssSize(v) {
20
20
  return typeof v === 'number' ? "".concat(v, "px") : v;
21
21
  }
22
22
  export function MapLayer(props) {
23
+ var _config$snapStep;
23
24
  var _props$config = props.config,
24
25
  config = _props$config === void 0 ? {} : _props$config,
25
26
  _props$contentWidth = props.contentWidth,
@@ -69,10 +70,12 @@ export function MapLayer(props) {
69
70
  pointerEvents: 'none'
70
71
  } : {});
71
72
 
72
- /** 网格线:用 CSS 线性渐变模拟 */
73
+ /** 网格线:用 CSS 线性渐变模拟(默认不小于 50px,避免像素模式下格线过密) */
74
+ var snapStep = Math.max(1, Number((_config$snapStep = config.snapStep) !== null && _config$snapStep !== void 0 ? _config$snapStep : 1) || 1);
75
+ var gridSize = Math.max(50, Math.round(cellSize * snapStep));
73
76
  var gridStyle = showGrid ? {
74
77
  backgroundImage: "\n linear-gradient(to right, rgba(0,0,0,0.08) 1px, transparent 1px),\n linear-gradient(to bottom, rgba(0,0,0,0.08) 1px, transparent 1px)\n ",
75
- backgroundSize: "".concat(cellSize, "px ").concat(cellSize, "px")
78
+ backgroundSize: "".concat(gridSize, "px ").concat(gridSize, "px")
76
79
  } : {};
77
80
  return /*#__PURE__*/React.createElement("div", {
78
81
  className: classNames("".concat(PREFIX, "-map-layer"), className),
@@ -21,6 +21,10 @@ export interface ViewControlsProps {
21
21
  /** 当前是否处于全屏 */
22
22
  isFullscreen?: boolean;
23
23
  className?: string;
24
+ /** 与 config.showGridToggle 联用:当前画布是否显示网格 */
25
+ mapGridVisible?: boolean;
26
+ /** 切换当前画布 draft 的 mapLayer.showGrid */
27
+ onToggleMapGrid?: () => void;
24
28
  }
25
29
  export declare function ViewControls(props: ViewControlsProps): JSX.Element;
26
30
  export default ViewControls;
@@ -1,9 +1,13 @@
1
- /**
2
- * ViewControls - 内置视图控制按钮:缩放(Stepper)、复位、区域定位
1
+ 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); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ 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); }
5
+ /**
6
+ * ViewControls - 内置视图控制按钮:缩放(Stepper)、复位、区域定位
3
7
  */
4
8
  import React from 'react';
5
9
  import classNames from 'classnames';
6
- import { MinusOutlined, PlusOutlined, FullscreenOutlined, FullscreenExitOutlined } from '@ant-design/icons';
10
+ import { MinusOutlined, PlusOutlined, FullscreenOutlined, FullscreenExitOutlined, BorderInnerOutlined } from '@ant-design/icons';
7
11
  import "./ViewControls.less";
8
12
  var PREFIX = 'pisell-floor-map-layout';
9
13
 
@@ -17,12 +21,17 @@ export function ViewControls(props) {
17
21
  scale = _props$scale === void 0 ? 1 : _props$scale,
18
22
  _props$isFullscreen = props.isFullscreen,
19
23
  isFullscreen = _props$isFullscreen === void 0 ? false : _props$isFullscreen,
20
- className = props.className;
24
+ className = props.className,
25
+ _props$mapGridVisible = props.mapGridVisible,
26
+ mapGridVisible = _props$mapGridVisible === void 0 ? false : _props$mapGridVisible,
27
+ onToggleMapGrid = props.onToggleMapGrid;
21
28
  var showZoom = config.showZoom !== false;
22
29
  var showReset = config.showReset === true;
23
30
  var showFitBounds = config.showFitBounds === true;
24
31
  var showFullscreen = config.showFullscreen === true;
32
+ var showGridToggle = config.showGridToggle === true && typeof onToggleMapGrid === 'function';
25
33
  var scalePercent = Math.round(scale * 100);
34
+ var showToolsCapsule = showReset || showFitBounds || showFullscreen || showGridToggle;
26
35
  return /*#__PURE__*/React.createElement("div", {
27
36
  className: classNames("".concat(PREFIX, "-view-controls"), className)
28
37
  }, showZoom && /*#__PURE__*/React.createElement("div", {
@@ -43,27 +52,37 @@ export function ViewControls(props) {
43
52
  return api.zoomIn();
44
53
  },
45
54
  "aria-label": "\u653E\u5927"
46
- }, /*#__PURE__*/React.createElement(PlusOutlined, null))), showReset && /*#__PURE__*/React.createElement("button", {
55
+ }, /*#__PURE__*/React.createElement(PlusOutlined, null))), showToolsCapsule && /*#__PURE__*/React.createElement("div", {
56
+ className: "".concat(PREFIX, "-view-controls-tools-capsule")
57
+ }, showReset && /*#__PURE__*/React.createElement("button", {
47
58
  type: "button",
48
- className: "".concat(PREFIX, "-view-controls-btn"),
59
+ className: "".concat(PREFIX, "-view-controls-tool-btn"),
49
60
  onClick: function onClick() {
50
61
  return api.resetTransform();
51
62
  },
52
63
  "aria-label": "\u590D\u4F4D"
53
64
  }, "\u27F2"), showFitBounds && api.fitBounds && /*#__PURE__*/React.createElement("button", {
54
65
  type: "button",
55
- className: "".concat(PREFIX, "-view-controls-btn"),
66
+ className: "".concat(PREFIX, "-view-controls-tool-btn"),
56
67
  onClick: function onClick() {
57
68
  return api.fitBounds();
58
69
  },
59
70
  "aria-label": "\u533A\u57DF\u5B9A\u4F4D"
60
- }, "\u229E"), showFullscreen && api.toggleFullscreen && /*#__PURE__*/React.createElement("button", {
71
+ }, "\u229E"), showGridToggle && /*#__PURE__*/React.createElement("button", {
61
72
  type: "button",
62
- className: "".concat(PREFIX, "-view-controls-btn"),
73
+ className: classNames("".concat(PREFIX, "-view-controls-tool-btn"), _defineProperty({}, "".concat(PREFIX, "-view-controls-tool-btn--active"), mapGridVisible)),
74
+ onClick: function onClick() {
75
+ return onToggleMapGrid();
76
+ },
77
+ "aria-pressed": mapGridVisible,
78
+ "aria-label": mapGridVisible ? '隐藏网格' : '显示网格'
79
+ }, /*#__PURE__*/React.createElement(BorderInnerOutlined, null)), showFullscreen && api.toggleFullscreen && /*#__PURE__*/React.createElement("button", {
80
+ type: "button",
81
+ className: "".concat(PREFIX, "-view-controls-tool-btn"),
63
82
  onClick: function onClick() {
64
83
  return api.toggleFullscreen();
65
84
  },
66
85
  "aria-label": isFullscreen ? '退出全屏' : '全屏'
67
- }, isFullscreen ? /*#__PURE__*/React.createElement(FullscreenExitOutlined, null) : /*#__PURE__*/React.createElement(FullscreenOutlined, null)));
86
+ }, isFullscreen ? /*#__PURE__*/React.createElement(FullscreenExitOutlined, null) : /*#__PURE__*/React.createElement(FullscreenOutlined, null))));
68
87
  }
69
88
  export default ViewControls;
@@ -10,6 +10,7 @@
10
10
  gap: 6px;
11
11
 
12
12
  /* Stepper:胶囊形 [减] 数值% [加] */
13
+
13
14
  &-zoom-stepper {
14
15
  display: flex;
15
16
  align-items: center;
@@ -52,26 +53,49 @@
52
53
  color: #101828;
53
54
  }
54
55
 
55
- &-btn {
56
- width: 32px;
57
- height: 32px;
56
+ /* 复位 / 区域定位 / 全屏 / 网格:与 Stepper 同系胶囊条 */
57
+
58
+ &-tools-capsule {
59
+ display: flex;
60
+ align-items: center;
61
+ flex-wrap: wrap;
62
+ gap: 4px;
63
+ min-height: 56px;
64
+ padding: 2px 6px;
65
+ background: #fff;
66
+ border: 1px solid #98a2b3;
67
+ border-radius: 100px;
68
+ box-shadow: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
69
+ }
70
+
71
+ &-tool-btn {
72
+ width: 52px;
73
+ height: 52px;
58
74
  display: flex;
59
75
  align-items: center;
60
76
  justify-content: center;
61
77
  padding: 0;
62
- border: 1px solid rgba(0, 0, 0, 0.1);
63
- border-radius: 4px;
64
- background: #fff;
78
+ border: none;
79
+ border-radius: 50%;
80
+ background: transparent;
65
81
  cursor: pointer;
66
- font-size: 18px;
82
+ color: #101828;
83
+ font-size: 20px;
67
84
  line-height: 1;
68
- color: rgba(0, 0, 0, 0.65);
69
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
70
85
 
71
86
  &:hover {
72
- color: #1890ff;
73
- border-color: #1890ff;
74
- background: #e6f7ff;
87
+ background: #f2f4f7;
88
+ color: #101828;
89
+ }
90
+ }
91
+
92
+ &-tool-btn--active {
93
+ background: #fff4ed;
94
+ color: #ff692e;
95
+
96
+ &:hover {
97
+ background: #ffe8d9;
98
+ color: #ff692e;
75
99
  }
76
100
  }
77
101
  }
@@ -7,5 +7,7 @@ export interface ViewControlsWithZoomProps {
7
7
  fitBounds: () => void;
8
8
  /** 未传时不展示全屏按钮(如编辑态 floorMapFullscreenMode 为 disabled) */
9
9
  toggleFullscreen?: () => void;
10
+ mapGridVisible?: boolean;
11
+ onToggleMapGrid?: () => void;
10
12
  }
11
13
  export declare function ViewControlsWithZoom(props: ViewControlsWithZoomProps): JSX.Element;