@pisell/materials 6.11.44 → 6.11.46

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 (101) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +2 -2
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +2 -2
  9. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +3 -31
  10. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
  11. package/es/components/pisellFloorMapLayout/components/ViewControls.js +45 -64
  12. package/es/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
  13. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +1 -1
  14. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
  15. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +1 -25
  16. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
  17. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +62 -107
  18. package/lib/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
  19. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +1 -1
  20. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
  21. package/package.json +3 -3
  22. package/es/components/filter/components/FilterItem/index.d.ts +0 -5
  23. package/es/components/filter/components/QuickFilter/index.d.ts +0 -12
  24. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
  25. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +0 -39
  26. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -11
  27. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -60
  28. package/es/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
  29. package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -53
  30. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -25
  31. package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -4
  32. package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
  33. package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
  34. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -71
  35. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +0 -89
  36. package/es/components/pisellFloorMapLayout/index.d.ts +0 -26
  37. package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -133
  38. package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -133
  39. package/es/components/pisellFloorMapLayout/locales.d.ts +0 -651
  40. package/es/components/pisellFloorMapLayout/types.d.ts +0 -641
  41. package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
  42. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
  43. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +0 -8
  44. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
  45. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.d.ts +0 -8
  46. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.d.ts +0 -13
  47. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +0 -17
  48. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +0 -30
  49. package/es/components/pisellRecordBoard/types.d.ts +0 -789
  50. package/es/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
  51. package/es/components/pisellShellFrame/types.d.ts +0 -62
  52. package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +0 -10
  53. package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -27
  54. package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
  55. package/es/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
  56. package/es/index.d.ts +0 -265
  57. package/es/locales/en-US.d.ts +0 -557
  58. package/es/locales/ja.d.ts +0 -526
  59. package/es/locales/pt.d.ts +0 -526
  60. package/es/locales/zh-CN.d.ts +0 -552
  61. package/es/locales/zh-TW.d.ts +0 -552
  62. package/lib/components/filter/components/FilterItem/index.d.ts +0 -5
  63. package/lib/components/filter/components/QuickFilter/index.d.ts +0 -12
  64. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
  65. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +0 -39
  66. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -11
  67. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -60
  68. package/lib/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
  69. package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -53
  70. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -25
  71. package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -4
  72. package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
  73. package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
  74. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -71
  75. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +0 -89
  76. package/lib/components/pisellFloorMapLayout/index.d.ts +0 -26
  77. package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -133
  78. package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -133
  79. package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -651
  80. package/lib/components/pisellFloorMapLayout/types.d.ts +0 -641
  81. package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
  82. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
  83. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +0 -8
  84. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
  85. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.d.ts +0 -8
  86. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.d.ts +0 -13
  87. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +0 -17
  88. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +0 -30
  89. package/lib/components/pisellRecordBoard/types.d.ts +0 -789
  90. package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
  91. package/lib/components/pisellShellFrame/types.d.ts +0 -62
  92. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +0 -10
  93. package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -27
  94. package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
  95. package/lib/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
  96. package/lib/index.d.ts +0 -265
  97. package/lib/locales/en-US.d.ts +0 -557
  98. package/lib/locales/ja.d.ts +0 -526
  99. package/lib/locales/pt.d.ts +0 -526
  100. package/lib/locales/zh-CN.d.ts +0 -552
  101. package/lib/locales/zh-TW.d.ts +0 -552
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
18
18
  /**
19
19
  * FloorMapToolbar - 编辑态左侧侧边栏:按分类添加图元、绑定数据源与行;保存可选(默认用顶栏)
20
20
  */
21
- import React, { useMemo, useState, useCallback, useEffect } from 'react';
21
+ import React, { useMemo, useState, useCallback } from 'react';
22
22
  import classNames from 'classnames';
23
23
  import { Select } from 'antd';
24
24
  import { LeftOutlined, RightOutlined } from '@ant-design/icons';
@@ -86,29 +86,6 @@ var IMAGE_PREVIEW_SIZE = {
86
86
  width: 140,
87
87
  height: 80
88
88
  };
89
-
90
- /**
91
- * 侧栏收起态偏好持久化 key(跨画布/跨业务共享,仅是个人 UI 偏好)。
92
- * `1` = 收起;缺省、`0` = 展开(编辑态左侧栏默认展开)。
93
- * key 迭代后不再读旧 key,首次进入为展开;用户收起/展开后会写入新偏好。
94
- */
95
- var TOOLBAR_COLLAPSED_STORAGE_KEY = 'pisell-floor-map-layout.toolbar.leftbar-collapsed.v1';
96
- function readToolbarCollapsedPreference() {
97
- if (typeof window === 'undefined') return false;
98
- try {
99
- return window.localStorage.getItem(TOOLBAR_COLLAPSED_STORAGE_KEY) === '1';
100
- } catch (_unused) {
101
- return false;
102
- }
103
- }
104
- function writeToolbarCollapsedPreference(collapsed) {
105
- if (typeof window === 'undefined') return;
106
- try {
107
- window.localStorage.setItem(TOOLBAR_COLLAPSED_STORAGE_KEY, collapsed ? '1' : '0');
108
- } catch (_unused2) {
109
- /** 隐私模式 / quota 失败时静默:UI 偏好丢失对功能无影响 */
110
- }
111
- }
112
89
  export function FloorMapToolbar(props) {
113
90
  var config = props.config,
114
91
  dataSources = props.dataSources,
@@ -133,19 +110,14 @@ export function FloorMapToolbar(props) {
133
110
  consumeToolbarClickIfTouchDrag = props.consumeToolbarClickIfTouchDrag;
134
111
 
135
112
  /**
136
- * 侧栏收起 / 展开本地状态:默认展开;有持久化记录时恢复用户偏好。
113
+ * 侧栏收起 / 展开:仅会话内状态,**不写入 localStorage**;每次进入编辑(组件挂载)默认展开。
137
114
  * 收起后整个 body / footer 隐藏、容器宽度收缩到一条;
138
115
  * 切换按钮挂在容器右边垂直居中,外突半个按钮宽度。
139
116
  */
140
- var _useState = useState(function () {
141
- return readToolbarCollapsedPreference();
142
- }),
117
+ var _useState = useState(false),
143
118
  _useState2 = _slicedToArray(_useState, 2),
144
119
  collapsed = _useState2[0],
145
120
  setCollapsed = _useState2[1];
146
- useEffect(function () {
147
- writeToolbarCollapsedPreference(collapsed);
148
- }, [collapsed]);
149
121
  var handleToggleCollapsed = useCallback(function () {
150
122
  setCollapsed(function (prev) {
151
123
  return !prev;
@@ -46,15 +46,15 @@
46
46
  }
47
47
 
48
48
  /**
49
- * 收起 / 展开按钮:固定挂在容器右边垂直居中,外突大半个按钮宽度。
50
- * 124px 抽屉下整体视觉更宽松,handle 28×72 配合放大的箭头,
51
- * 在窄边栏旁仍然显眼、易点(之前 16×48 几乎看不见,参考用户截图)。
52
- * 收起态下容器宽度为 0,按钮仍能完整露出(z-index 高于地图区遮罩)。
49
+ * 收起 / 展开按钮:左缘与侧栏**右缘对齐**(`left: 100%`),整体仍在侧栏外,不与图元预览重叠;
50
+ * 旧写法 `right: -22px` + `width: 28` 会让按钮左缘落在侧栏内约 6px 压到卡片。
51
+ * 收起态下容器宽度为 0,100% 仍锚在右缘,按钮仍能完整露出(z-index 高于地图区遮罩)。
53
52
  */
54
53
  &-collapse-handle {
55
54
  position: absolute;
56
55
  top: 50%;
57
- right: -22px;
56
+ left: 100%;
57
+ right: auto;
58
58
  transform: translateY(-50%);
59
59
  width: 28px;
60
60
  height: 72px;
@@ -52,27 +52,26 @@ export function ViewControls(props) {
52
52
  var showFullscreen = config.showFullscreen === true;
53
53
  var showGridToggle = config.showGridToggle === true && typeof onToggleMapGrid === 'function';
54
54
  var showViewportLock = config.showViewportLock === true && typeof onToggleViewportLock === 'function';
55
+ /**
56
+ * `horizontalAlign` 仅作用于非 dockChrome 的普通横条(决定贴左下还是右下)。
57
+ * dockChrome(平面图)模式已统一固定在屏右下,不再读这个配置。
58
+ */
55
59
  var horizontalAlign = (_config$horizontalAli = config.horizontalAlign) !== null && _config$horizontalAli !== void 0 ? _config$horizontalAli : 'start';
56
- /** 右下 Dock:`row-reverse` 后入口在屏缘右侧,箭头与左下镜像(展开朝内左、收起朝外右) */
57
- var isDockAlignEnd = horizontalAlign === 'end';
58
60
  var scalePercent = Math.round(scale * 100);
59
61
  var showTools = showReset || showFitBounds || showFullscreen || showGridToggle || showViewportLock;
60
62
  var hasTrailingSlot = dockExpandedTrailing != null && dockExpandedTrailing !== false;
61
63
  var dockHasExpandable = dockChrome && (showTools || hasTrailingSlot);
62
64
  var showBar = showZoom || showTools || dockChrome && hasTrailingSlot;
63
65
 
64
- /** Dock:展开条是否拉宽(与 CSS max-width 过渡联动) */
66
+ /**
67
+ * Dock:展开条是否拉宽(与 CSS max-width 过渡联动)。
68
+ * dockChrome 下 slide 内嵌合并 toggle 按钮,slide 始终 mounted;
69
+ * 折叠态 max-width 仅露 toggle 宽,展开态拉满。
70
+ */
65
71
  var _useState = useState(false),
66
72
  _useState2 = _slicedToArray(_useState, 2),
67
73
  dockExpanded = _useState2[0],
68
74
  setDockExpanded = _useState2[1];
69
- /** 收起动画结束后再卸载展开条,保证 max-width 能从宽缩回 0 */
70
- var _useState3 = useState(false),
71
- _useState4 = _slicedToArray(_useState3, 2),
72
- dockPanelMounted = _useState4[0],
73
- setDockPanelMounted = _useState4[1];
74
- var dockExpandedRef = useRef(dockExpanded);
75
- dockExpandedRef.current = dockExpanded;
76
75
  var idleTimerRef = useRef(null);
77
76
  var clearIdleTimer = useCallback(function () {
78
77
  if (idleTimerRef.current != null) {
@@ -100,21 +99,8 @@ export function ViewControls(props) {
100
99
  scheduleDockCollapse();
101
100
  }
102
101
  }, [dockExpanded, dockHasExpandable, scheduleDockCollapse]);
103
- var handleDockSlideTransitionEnd = useCallback(function (e) {
104
- if (e.propertyName !== 'max-width' || e.target !== e.currentTarget) {
105
- return;
106
- }
107
- if (!dockExpandedRef.current) {
108
- setDockPanelMounted(false);
109
- }
110
- }, []);
111
102
  var handleDockExpand = useCallback(function () {
112
- setDockPanelMounted(true);
113
- requestAnimationFrame(function () {
114
- requestAnimationFrame(function () {
115
- setDockExpanded(true);
116
- });
117
- });
103
+ setDockExpanded(true);
118
104
  }, []);
119
105
  var handleDockCollapseClick = useCallback(function () {
120
106
  clearIdleTimer();
@@ -127,8 +113,8 @@ export function ViewControls(props) {
127
113
  }, [dockExpanded, autoCollapseDockMs, scheduleDockCollapse]);
128
114
 
129
115
  /**
130
- * 右下 Dock(align-end)收起态已在 `dock-collapsed-extras` 暴露锁 / 全览,
131
- * 展开后 extras 仍贴边可见,展开条内不再重复渲染这两项。
116
+ * dockChrome 下「锁 / 全览」常驻在 `dock-collapsed-extras` 屏右缘,展开条内不再重复渲染。
117
+ * dockChrome 普通横条不省略,所有按钮顺排。
132
118
  */
133
119
  var renderToolButtons = function renderToolButtons(opts) {
134
120
  var omitLock = (opts === null || opts === void 0 ? void 0 : opts.omitViewportLock) === true;
@@ -180,10 +166,29 @@ export function ViewControls(props) {
180
166
  }, isFullscreen ? /*#__PURE__*/React.createElement(FullscreenExitOutlined, null) : /*#__PURE__*/React.createElement(FullscreenOutlined, null)) : null);
181
167
  };
182
168
 
183
- /** Dock 展开条内是否还有「工具区」按钮(排除已在收起条 mirror 的锁 / 全览) */
184
- var dockExpandedBarHasToolButtons = showReset || showFitBounds && Boolean(api.fitBounds) && !isDockAlignEnd || showGridToggle || showViewportLock && !isDockAlignEnd || showFullscreen && Boolean(api.toggleFullscreen);
169
+ /**
170
+ * dockChrome 展开条内的「工具区」按钮:锁 / 全览 已常驻在 `dock-collapsed-extras` 屏右缘,
171
+ * 展开条内不再重复渲染,避免冗余。
172
+ */
173
+ var dockExpandedBarHasToolButtons = showReset || showGridToggle || showFullscreen && Boolean(api.toggleFullscreen);
174
+
175
+ /**
176
+ * dockChrome 合并入口:同一个 toggle 按钮承担展开/收起,常驻在 slide 内最左端。
177
+ * - 折叠态:箭头朝左,点一下展开(slide 由 toggle 宽撑成 max-width);
178
+ * - 展开态:箭头朝右,点一下收起;toggle 跟随 slide max-width 收缩"被推回"右侧屏缘。
179
+ * 主题色样式(紫底白 icon)由 `dock-toggle-btn` 类提供。
180
+ */
181
+ var renderDockToggleButton = function renderDockToggleButton() {
182
+ return /*#__PURE__*/React.createElement("button", {
183
+ type: "button",
184
+ className: classNames("".concat(PREFIX, "-view-controls-dock-toggle-btn"), _defineProperty({}, "".concat(PREFIX, "-view-controls-dock-toggle-btn--panel-open"), dockExpanded)),
185
+ onClick: dockExpanded ? handleDockCollapseClick : handleDockExpand,
186
+ "aria-expanded": dockExpanded,
187
+ "aria-label": locales.getText(dockExpanded ? "".concat(I18N_VC, ".collapse-tools-aria") : "".concat(I18N_VC, ".expand-tools-aria"))
188
+ }, dockExpanded ? /*#__PURE__*/React.createElement(RightOutlined, null) : /*#__PURE__*/React.createElement(LeftOutlined, null));
189
+ };
185
190
  var renderDockExpandableBarContents = function renderDockExpandableBarContents() {
186
- return /*#__PURE__*/React.createElement(React.Fragment, null, showZoom ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
191
+ return /*#__PURE__*/React.createElement(React.Fragment, null, renderDockToggleButton(), showZoom ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
187
192
  type: "button",
188
193
  className: "".concat(PREFIX, "-view-controls-tool-btn"),
189
194
  onClick: function onClick() {
@@ -207,46 +212,32 @@ export function ViewControls(props) {
207
212
  className: "".concat(PREFIX, "-view-controls-bar-divider"),
208
213
  "aria-hidden": true
209
214
  }) : null, dockExpandedBarHasToolButtons ? renderToolButtons({
210
- omitViewportLock: isDockAlignEnd,
211
- omitFitBounds: isDockAlignEnd
215
+ omitViewportLock: true,
216
+ omitFitBounds: true
212
217
  }) : null, hasTrailingSlot ? /*#__PURE__*/React.createElement("div", {
213
218
  className: "".concat(PREFIX, "-view-controls-dock-trailing")
214
- }, dockExpandedTrailing) : null, /*#__PURE__*/React.createElement("button", {
215
- type: "button",
216
- className: "".concat(PREFIX, "-view-controls-tool-btn"),
217
- onClick: handleDockCollapseClick,
218
- "aria-expanded": dockExpanded,
219
- "aria-label": locales.getText("".concat(I18N_VC, ".collapse-tools-aria"))
220
- }, isDockAlignEnd ? /*#__PURE__*/React.createElement(RightOutlined, null) : /*#__PURE__*/React.createElement(LeftOutlined, null)));
219
+ }, dockExpandedTrailing) : null);
221
220
  };
222
221
  if (!showBar) {
223
222
  return null;
224
223
  }
225
224
 
226
225
  /**
227
- * Dock 收起态额外暴露的高频按钮(不必先展开就能点)。
228
- * 当前包含「视口锁定」「适配视口(全览)」——两者都是单击操作,不依赖展开条里的状态展示。
229
- * 展开时这块和 expand-btn 一起 width→0 收掉,让位给 dock-slide。
226
+ * dockChrome 屏右缘常驻按钮:「锁 / 全览」。两者都是单击操作,与展开条解耦。
227
+ * dockChrome 模式下 extras 与 slide 共用同一外壳,无 panel-open 收起行为。
230
228
  */
231
229
  var renderDockCollapsedExtras = function renderDockCollapsedExtras() {
232
230
  var showLockChip = showViewportLock;
233
231
  var showFitChip = showFitBounds && Boolean(api.fitBounds);
234
232
  if (!showLockChip && !showFitChip) return null;
235
- /**
236
- * align-end(画布右下 dock)下 extras 与 expand-btn / slide 做"连体",
237
- * 展开态仍贴右缘可见,因此不参与 panel-open 收起,也保持可聚焦/无 aria-hidden。
238
- */
239
- var collapseExtras = dockExpanded && !isDockAlignEnd;
240
233
  return /*#__PURE__*/React.createElement("div", {
241
- className: classNames("".concat(PREFIX, "-view-controls-dock-collapsed-extras"), _defineProperty({}, "".concat(PREFIX, "-view-controls-dock-collapsed-extras--panel-open"), collapseExtras)),
242
- "aria-hidden": collapseExtras
234
+ className: "".concat(PREFIX, "-view-controls-dock-collapsed-extras")
243
235
  }, showLockChip ? /*#__PURE__*/React.createElement("button", {
244
236
  type: "button",
245
237
  className: classNames("".concat(PREFIX, "-view-controls-tool-btn"), "".concat(PREFIX, "-view-controls-dock-collapsed-extras-btn"), _defineProperty({}, "".concat(PREFIX, "-view-controls-tool-btn--active"), viewportLocked)),
246
238
  onClick: function onClick() {
247
239
  return onToggleViewportLock();
248
240
  },
249
- tabIndex: collapseExtras ? -1 : 0,
250
241
  "aria-pressed": viewportLocked,
251
242
  "aria-label": locales.getText(viewportLocked ? "".concat(I18N_VC, ".viewport-unlock-aria") : "".concat(I18N_VC, ".viewport-lock-aria")),
252
243
  title: locales.getText(viewportLocked ? "".concat(I18N_VC, ".viewport-unlock-aria") : "".concat(I18N_VC, ".viewport-lock-aria"))
@@ -259,32 +250,22 @@ export function ViewControls(props) {
259
250
  disabled: viewportLocked,
260
251
  "aria-disabled": viewportLocked,
261
252
  "aria-pressed": fitBoundsActive,
262
- tabIndex: collapseExtras ? -1 : 0,
263
253
  "aria-label": locales.getText("".concat(I18N_VC, ".fit-bounds-aria")),
264
254
  title: locales.getText("".concat(I18N_VC, ".fit-bounds-aria"))
265
255
  }, /*#__PURE__*/React.createElement(ExpandOutlined, null)) : null);
266
256
  };
267
257
  if (dockChrome && dockHasExpandable) {
268
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
269
- className: classNames("".concat(PREFIX, "-view-controls"), "".concat(PREFIX, "-view-controls--dock"), horizontalAlign === 'end' && "".concat(PREFIX, "-view-controls--align-end"), className)
258
+ return /*#__PURE__*/React.createElement("div", {
259
+ className: classNames("".concat(PREFIX, "-view-controls"), "".concat(PREFIX, "-view-controls--dock"), /* dockChrome 始终右下;保留 --align-end 类以复用既有 CSS */"".concat(PREFIX, "-view-controls--align-end"), className)
270
260
  }, /*#__PURE__*/React.createElement("div", {
271
261
  className: "".concat(PREFIX, "-view-controls-dock-row")
272
- }, renderDockCollapsedExtras(), /*#__PURE__*/React.createElement("button", {
273
- type: "button",
274
- className: classNames("".concat(PREFIX, "-view-controls-dock-expand-btn"), _defineProperty({}, "".concat(PREFIX, "-view-controls-dock-expand-btn--panel-open"), dockExpanded)),
275
- onClick: handleDockExpand,
276
- "aria-expanded": dockExpanded,
277
- "aria-hidden": dockExpanded,
278
- tabIndex: dockExpanded ? -1 : 0,
279
- "aria-label": locales.getText("".concat(I18N_VC, ".expand-tools-aria"))
280
- }, isDockAlignEnd ? /*#__PURE__*/React.createElement(LeftOutlined, null) : /*#__PURE__*/React.createElement(RightOutlined, null)), dockPanelMounted ? /*#__PURE__*/React.createElement("div", {
281
- className: classNames("".concat(PREFIX, "-view-controls-dock-slide"), _defineProperty({}, "".concat(PREFIX, "-view-controls-dock-slide--open"), dockExpanded)),
282
- onTransitionEnd: handleDockSlideTransitionEnd
262
+ }, renderDockCollapsedExtras(), /*#__PURE__*/React.createElement("div", {
263
+ className: classNames("".concat(PREFIX, "-view-controls-dock-slide"), _defineProperty({}, "".concat(PREFIX, "-view-controls-dock-slide--open"), dockExpanded))
283
264
  }, /*#__PURE__*/React.createElement("div", {
284
265
  className: classNames("".concat(PREFIX, "-view-controls-bar"), "".concat(PREFIX, "-view-controls-bar--dock")),
285
266
  role: "group",
286
267
  onPointerDown: handleDockBarPointerDown
287
- }, renderDockExpandableBarContents())) : null)));
268
+ }, renderDockExpandableBarContents()))));
288
269
  }
289
270
  var barClass = classNames("".concat(PREFIX, "-view-controls-bar"), _defineProperty({}, "".concat(PREFIX, "-view-controls-bar--dock"), dockChrome));
290
271
  return /*#__PURE__*/React.createElement("div", {
@@ -195,9 +195,15 @@
195
195
  */
196
196
  .pisell-floor-map-layout-view-controls-dock-slide {
197
197
  box-sizing: border-box;
198
- max-width: 0;
198
+ /**
199
+ * 折叠态必须露出 slide 内首位的合并 toggle(42px)+ bar 左 padding(12px)≈ 54px。
200
+ * 历史上曾用 max-width:0 + 外层覆写,但与 `&--align-end &-dock-slide` 同优先级时
201
+ * 打包顺序可能导致 0 压过 54px → slide 宽度为 0、toggle 整块被裁掉。
202
+ */
203
+ max-width: 54px;
199
204
  overflow: hidden;
200
205
  min-width: 0;
206
+ flex-shrink: 0;
201
207
  display: flex;
202
208
  flex-direction: row;
203
209
  align-items: center;
@@ -279,82 +285,10 @@
279
285
  }
280
286
  }
281
287
 
282
- &-dock-expand-btn {
283
- box-sizing: border-box;
284
- width: @dock-chrome-outer;
285
- height: @dock-chrome-outer;
286
- min-width: @dock-chrome-outer;
287
- min-height: @dock-chrome-outer;
288
- padding: 0;
289
- margin: 0;
290
- display: inline-flex;
291
- align-items: center;
292
- justify-content: center;
293
- border: 1px solid transparent;
294
- border-radius: 14px;
295
- /**
296
- * 主题色背景:与左下「Today sales」chip 同步走 antd primary 变量;
297
- * 兜底 #5d3f9f 跟随项目其它主色 token,主题改色时自动同步。
298
- * 边框透明保留圆角,避免主题色与浅灰描边混色。
299
- */
300
- background: var(--color-primary, var(--ant-color-primary, #5d3f9f));
301
- box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
302
- cursor: pointer;
303
- color: #fff;
304
- font-size: @dock-icon-px;
305
- line-height: 0;
306
- appearance: none;
307
- flex-shrink: 0;
308
- overflow: hidden;
309
- transition: width @dock-slide-ms linear,
310
- min-width @dock-slide-ms linear,
311
- max-width @dock-slide-ms linear,
312
- opacity @dock-slide-ms linear,
313
- border-color @dock-slide-ms linear,
314
- box-shadow @dock-slide-ms linear,
315
- filter @dock-slide-ms linear,
316
- margin @dock-slide-ms linear;
317
-
318
- /** 与右侧条带同时:条带变长时入口收起为 0 宽;收起条带时入口从 0 拉回到正方形 */
319
-
320
- &--panel-open {
321
- width: 0;
322
- min-width: 0;
323
- max-width: 0;
324
- margin: 0;
325
- opacity: 0;
326
- border-color: transparent;
327
- box-shadow: none;
328
- pointer-events: none;
329
- cursor: default;
330
- }
331
-
332
- &:hover {
333
- /** 与 Today chip 一致:主题色上用 brightness 让 hover 永远比静态色暗一档 */
334
- filter: brightness(0.92);
335
- }
336
-
337
- .anticon {
338
- font-size: @dock-icon-px !important;
339
- line-height: 0;
340
- display: inline-flex;
341
- align-items: center;
342
- justify-content: center;
343
- }
344
-
345
- .anticon svg {
346
- width: @dock-icon-px !important;
347
- height: @dock-icon-px !important;
348
- display: block;
349
- }
350
- }
351
-
352
288
  /**
353
- * Dock 收起态额外按钮 pill
354
- * - 折叠时 DOM expand-btn 之前(屏缘一侧),与展开入口并排;
355
- * - dockExpanded 时与 expand-btn 同步 width→0、opacity→0,让位给 dock-slide 横向展开;
356
- * - 默认 align(左下):extras 在左缘,用 margin-right:8px 与 expand-btn 留缝;
357
- * - align-end(右下)row-reverse 后 extras 贴右缘,用 margin-left:8px 与左侧 expand 留缝。
289
+ * dockChrome 屏右缘常驻 pill:「锁 / 全览」。
290
+ * 整组与 slide 共用同一外壳(dock-row 提供 border / radius / shadow),
291
+ * 左侧留 padding,与左侧展开条 / toggle 拉开,避免贴太紧;右侧保留与屏缘的呼吸。
358
292
  */
359
293
  &-dock-collapsed-extras {
360
294
  box-sizing: border-box;
@@ -364,38 +298,27 @@
364
298
  align-items: center;
365
299
  justify-content: center;
366
300
  gap: 5px;
367
- padding: 0 10px;
368
- margin-right: 8px;
369
- border: 1px solid #e8eaed;
370
- border-radius: 14px;
301
+ padding: 0 10px 0 10px;
371
302
  background: #fff;
372
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
373
303
  flex-shrink: 0;
374
- overflow: hidden;
375
- transition: max-width @dock-slide-ms linear,
376
- opacity @dock-slide-ms linear,
377
- border-color @dock-slide-ms linear,
378
- box-shadow @dock-slide-ms linear,
379
- margin @dock-slide-ms linear,
380
- padding @dock-slide-ms linear;
381
304
  max-width: 240px;
382
305
  }
383
306
 
384
307
  /**
385
- * 右下 dock:row-reverse 后 DOM [extras][expand][slide] 呈 [slide][expand][extras],
308
+ * 右下 dock:row-reverse 后 DOM [extras][slide] 呈 [slide][extras],
386
309
  * extras 贴右缘。本场景下整组按钮做成「连体 pill」:
387
310
  *
388
- * - 折叠态视觉:[紫色 expand-btn][锁定/全览 extras]
311
+ * - 折叠态视觉:[slide 内紫色 toggle][锁定/全览 extras]
389
312
  * - 展开态视觉:[slide-bar 工具条][锁定/全览 extras]
390
- * - 展开方向:slide max-width 由 0 → 720px,由于父级锚定 `right:14px`,
313
+ * - 展开方向:slide max-width 由 54 → 720px,由于父级锚定 `right:14px`,
391
314
  * 整组横向"从右往左"伸长,视觉上工具条从 extras 左侧扩出来。
392
315
  *
393
316
  * 实现方式:把 box-shadow / border / border-radius 统一挂到外层 `dock-row` 容器上,
394
- * 内层 slide-bar / expand-btn / extras 全部去掉自己的边框圆角与投影,
317
+ * 内层 slide-bar / extras 全部去掉自己的边框圆角与投影,
395
318
  * 由 `overflow: hidden` 的外壳负责整体裁剪。这样:
396
319
  * - 整组只有一道阴影,无相邻拼接处的接缝阴影;
397
320
  * - 子元素切换宽度(max-width / width)时阴影边界跟随容器自然增长,无需 clip-path 修补;
398
- * - 紫色 expand-btn / 白色 extras / 白色 slide-bar 在同一个外壳里平铺,自动呈现连体观感。
321
+ * - 紫色 toggle / 白色 extras / 白色 slide-bar 在同一个外壳里平铺,自动呈现连体观感。
399
322
  */
400
323
  &--align-end .pisell-floor-map-layout-view-controls-dock-row {
401
324
  border: 1px solid #e8eaed;
@@ -427,35 +350,58 @@
427
350
  padding-right: 0;
428
351
  }
429
352
 
430
- /** 紫色入口:去掉自身投影圆角与边框,仅保留紫色底色,由外壳裁出连体圆角 */
431
- &--align-end &-dock-expand-btn {
432
- border: 0;
433
- border-radius: 0;
434
- box-shadow: none;
435
- }
436
-
437
353
  /**
438
- * 锁定 / 全览 extras:去掉自身边框圆角阴影与外边距,背景仍为白,贴外壳右缘排布;
439
- * 贴邻 slide-bar / expand-btn 那一侧(DOM 内的左侧)padding 清零,避免接缝空隙。
354
+ * 合并入口:紫底白 icon,主题色与原 `dock-expand-btn` 一致。
355
+ * 尺寸对齐 dock 内其他工具按钮(@dock-btn-size),由外壳负责连体圆角与阴影。
440
356
  */
441
- &--align-end &-dock-collapsed-extras {
357
+ &-dock-toggle-btn {
358
+ box-sizing: border-box;
359
+ width: @dock-btn-size;
360
+ min-width: @dock-btn-size;
361
+ max-width: @dock-btn-size;
362
+ height: @dock-btn-size;
363
+ min-height: @dock-btn-size !important;
364
+ max-height: @dock-btn-size !important;
365
+ flex-shrink: 0;
366
+ padding: 0;
442
367
  margin: 0;
443
- border: 0;
444
- border-radius: 0;
445
- box-shadow: none;
446
- padding-left: 0;
447
- }
368
+ display: inline-flex;
369
+ align-items: center;
370
+ justify-content: center;
371
+ border: none;
372
+ border-radius: 8px;
373
+ background: var(--color-primary, var(--ant-color-primary, #5d3f9f));
374
+ color: #fff;
375
+ font-size: @dock-icon-px;
376
+ line-height: 0;
377
+ cursor: pointer;
378
+ appearance: none;
379
+ transition: filter @dock-slide-ms linear;
448
380
 
449
- /** 展开态保留 extras 显示在右侧(覆盖通用 panel-open 的收起规则) */
450
- &--align-end &-dock-collapsed-extras--panel-open {
451
- max-width: 240px;
452
- margin: 0;
453
- padding: 0 10px 0 0;
454
- opacity: 1;
455
- border: 0;
456
- border-radius: 0;
457
- box-shadow: none;
458
- pointer-events: auto;
381
+ &:hover {
382
+ /** 与原 expand-btn 一致:主题色上用 brightness 让 hover 暗一档 */
383
+ filter: brightness(0.92);
384
+ background: var(--color-primary, var(--ant-color-primary, #5d3f9f));
385
+ color: #fff;
386
+ }
387
+
388
+ .anticon,
389
+ .pisell-lowcode-icon,
390
+ span[role='img'] {
391
+ font-size: @dock-icon-px !important;
392
+ line-height: 0;
393
+ display: inline-flex;
394
+ align-items: center;
395
+ justify-content: center;
396
+ }
397
+
398
+ .anticon svg,
399
+ .pisell-lowcode-icon svg,
400
+ span[role='img'] svg {
401
+ width: @dock-icon-px !important;
402
+ height: @dock-icon-px !important;
403
+ display: block;
404
+ }
459
405
  }
460
406
 
461
407
  &-dock-collapsed-extras-btn {
@@ -488,17 +434,6 @@
488
434
  }
489
435
  }
490
436
 
491
- &-dock-collapsed-extras--panel-open {
492
- max-width: 0;
493
- margin-left: 0;
494
- margin-right: 0;
495
- padding: 0;
496
- opacity: 0;
497
- border-color: transparent;
498
- box-shadow: none;
499
- pointer-events: none;
500
- }
501
-
502
437
  &-dock-trailing {
503
438
  display: inline-flex;
504
439
  align-items: center;
@@ -521,8 +456,7 @@
521
456
 
522
457
  @media (prefers-reduced-motion: reduce) {
523
458
  .pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-slide,
524
- .pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-expand-btn,
525
- .pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-collapsed-extras {
459
+ .pisell-floor-map-layout-view-controls--dock .pisell-floor-map-layout-view-controls-dock-toggle-btn {
526
460
  transition-duration: 0.01ms;
527
461
  }
528
462
  }
@@ -42,7 +42,7 @@ export declare function parseRecordBoardToolbarSortParam(sort: unknown): {
42
42
  dir: 'asc' | 'desc';
43
43
  } | null;
44
44
  /** 当 Sort 字段名匹配这些 key(忽略大小写)时,资源墙按占用态重排卡片 */
45
- export declare const DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS: readonly ["status"];
45
+ export declare const DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS: string[];
46
46
  export declare function matchesResourceWallStatusSortField(sortField: string, keys: readonly string[]): boolean;
47
47
  /**
48
48
  * 用于资源墙排序:占用/将结/已结束为 1,其余为 0(与 {@link deriveVenueWallStatus} 一致)。
@@ -31,7 +31,7 @@ import { useRecordBoardShellBodyMeta } from "../ShellBodyMetaContext";
31
31
  import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
32
32
  import { getText } from "../../../../locales";
33
33
  import { deriveFilterFromColumns, deriveSortFromColumns } from "../../utils/recordBoardColumns";
34
- import { matchesResourceWallStatusSortField } from "../ResourceWall/venueWallUtils";
34
+ import { DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS, matchesResourceWallStatusSortField } from "../ResourceWall/venueWallUtils";
35
35
  import { DEFAULT_SEARCH_FIELD, FILTER_PARAMS_FIELD, RESOURCE_WALL_QUICK_FILTER_KEY, SORT_PARAMS_FIELD } from "./recordBoardToolBarConstants";
36
36
  import { buildResourceWallStatusSortFallbackItem, getDefaultFilterValue, getSortButtonText, getViewCalendarLabel, getViewFloorMapLabel, getViewGridLabel, getViewResourceWallLabel } from "./recordBoardToolBarI18n";
37
37
  import "./ToolBarFilter.less";
@@ -87,25 +87,6 @@ function buildScenePreviewMergedItem(kind, dataSourceKey, size) {
87
87
  }
88
88
  var STAGE_PREVIEW_SIZE = { width: 160, height: 64 };
89
89
  var IMAGE_PREVIEW_SIZE = { width: 140, height: 80 };
90
- var TOOLBAR_COLLAPSED_STORAGE_KEY = "pisell-floor-map-layout.toolbar.leftbar-collapsed.v1";
91
- function readToolbarCollapsedPreference() {
92
- if (typeof window === "undefined") return false;
93
- try {
94
- return window.localStorage.getItem(TOOLBAR_COLLAPSED_STORAGE_KEY) === "1";
95
- } catch {
96
- return false;
97
- }
98
- }
99
- function writeToolbarCollapsedPreference(collapsed) {
100
- if (typeof window === "undefined") return;
101
- try {
102
- window.localStorage.setItem(
103
- TOOLBAR_COLLAPSED_STORAGE_KEY,
104
- collapsed ? "1" : "0"
105
- );
106
- } catch {
107
- }
108
- }
109
90
  function FloorMapToolbar(props) {
110
91
  const {
111
92
  config,
@@ -126,12 +107,7 @@ function FloorMapToolbar(props) {
126
107
  onPaletteCardPointerDown,
127
108
  consumeToolbarClickIfTouchDrag
128
109
  } = props;
129
- const [collapsed, setCollapsed] = (0, import_react.useState)(
130
- () => readToolbarCollapsedPreference()
131
- );
132
- (0, import_react.useEffect)(() => {
133
- writeToolbarCollapsedPreference(collapsed);
134
- }, [collapsed]);
110
+ const [collapsed, setCollapsed] = (0, import_react.useState)(false);
135
111
  const handleToggleCollapsed = (0, import_react.useCallback)(() => {
136
112
  setCollapsed((prev) => !prev);
137
113
  }, []);
@@ -46,15 +46,15 @@
46
46
  }
47
47
 
48
48
  /**
49
- * 收起 / 展开按钮:固定挂在容器右边垂直居中,外突大半个按钮宽度。
50
- * 124px 抽屉下整体视觉更宽松,handle 28×72 配合放大的箭头,
51
- * 在窄边栏旁仍然显眼、易点(之前 16×48 几乎看不见,参考用户截图)。
52
- * 收起态下容器宽度为 0,按钮仍能完整露出(z-index 高于地图区遮罩)。
49
+ * 收起 / 展开按钮:左缘与侧栏**右缘对齐**(`left: 100%`),整体仍在侧栏外,不与图元预览重叠;
50
+ * 旧写法 `right: -22px` + `width: 28` 会让按钮左缘落在侧栏内约 6px 压到卡片。
51
+ * 收起态下容器宽度为 0,100% 仍锚在右缘,按钮仍能完整露出(z-index 高于地图区遮罩)。
53
52
  */
54
53
  &-collapse-handle {
55
54
  position: absolute;
56
55
  top: 50%;
57
- right: -22px;
56
+ left: 100%;
57
+ right: auto;
58
58
  transform: translateY(-50%);
59
59
  width: 28px;
60
60
  height: 72px;