@pisell/materials 6.11.45 → 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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +3 -31
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +55 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +45 -64
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +1 -25
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +55 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +62 -107
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/package.json +3 -3
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +0 -8
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.d.ts +0 -13
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +0 -17
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +0 -30
- package/es/components/pisellRecordBoard/types.d.ts +0 -789
- package/es/index.d.ts +0 -265
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +0 -8
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.d.ts +0 -13
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +0 -17
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +0 -30
- package/lib/components/pisellRecordBoard/types.d.ts +0 -789
- package/lib/index.d.ts +0 -265
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FloorMapToolbar - 编辑态左侧侧边栏:按分类添加图元、绑定数据源与行;保存可选(默认用顶栏)
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { FloorMapViewConfig, FloorMapDataSources, FloorMapMergedItem, FloorMapSceneElement, FloorMapPlaceMode } from '../types';
|
|
6
|
+
import { type FloorMapPaletteDragPayload } from '../utils/floorMapDropUtils';
|
|
7
|
+
import './FloorMapToolbar.less';
|
|
8
|
+
export type { FloorMapPlaceMode as PlaceMode };
|
|
9
|
+
export interface FloorMapToolbarProps {
|
|
10
|
+
config: FloorMapViewConfig;
|
|
11
|
+
dataSources: FloorMapDataSources;
|
|
12
|
+
dataSourceLabels?: Record<string, string>;
|
|
13
|
+
canCreate: boolean;
|
|
14
|
+
placeMode: FloorMapPlaceMode;
|
|
15
|
+
onPlaceModeChange: (mode: FloorMapPlaceMode) => void;
|
|
16
|
+
renderPreviewItem?: (item: FloorMapMergedItem) => React.ReactNode;
|
|
17
|
+
placementPreviewSize?: {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
};
|
|
21
|
+
decorationPreviewSize?: number;
|
|
22
|
+
sceneElements?: FloorMapSceneElement[];
|
|
23
|
+
onSave?: () => void;
|
|
24
|
+
saving?: boolean;
|
|
25
|
+
saveError?: Error | string;
|
|
26
|
+
/** 布局草稿已相对持久化配置变更,提示用户点击本栏「保存」 */
|
|
27
|
+
layoutDirty?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
/** 触摸/笔:Pointer 拖拽落点(mouse 仍用 HTML5 DnD) */
|
|
30
|
+
onPaletteCardPointerDown?: (payload: FloorMapPaletteDragPayload, e: React.PointerEvent<HTMLButtonElement>) => void;
|
|
31
|
+
/** 触摸拖放结束后吞掉按钮 click,避免误触切换落点模式 */
|
|
32
|
+
consumeToolbarClickIfTouchDrag?: () => boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function FloorMapToolbar(props: FloorMapToolbarProps): JSX.Element;
|
|
35
|
+
export default FloorMapToolbar;
|
|
@@ -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
|
-
*
|
|
51
|
-
*
|
|
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
|
-
|
|
56
|
+
left: 100%;
|
|
57
|
+
right: auto;
|
|
58
58
|
transform: translateY(-50%);
|
|
59
59
|
width: 28px;
|
|
60
60
|
height: 72px;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ViewControls - 内置视图控制:默认仅缩放;可选复位、区域定位、全屏等
|
|
3
|
+
* 平面图(dockChrome):Dock 折叠入口 + 展开条(含业务插槽、空闲自动收起)
|
|
4
|
+
* 非平面图:单条横栏,缩放与工具始终同排(无 Menu 折叠)
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { FloorMapControlsConfig } from '../types';
|
|
8
|
+
import './ViewControls.less';
|
|
9
|
+
/** 从 react-zoom-pan-pinch 拿到的控制 API(由主组件传入) */
|
|
10
|
+
export interface ViewControlsApi {
|
|
11
|
+
zoomIn: () => void;
|
|
12
|
+
zoomOut: () => void;
|
|
13
|
+
resetTransform: () => void;
|
|
14
|
+
/** 区域定位,可能由主组件基于 items 计算后封装 */
|
|
15
|
+
fitBounds?: () => void;
|
|
16
|
+
/** 切换全屏(requestFullscreen / exitFullscreen) */
|
|
17
|
+
toggleFullscreen?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface ViewControlsProps {
|
|
20
|
+
/** 控制 API */
|
|
21
|
+
api: ViewControlsApi;
|
|
22
|
+
/** 显隐配置 */
|
|
23
|
+
config?: FloorMapControlsConfig;
|
|
24
|
+
/** 当前缩放比例(1 = 100%),用于 Stepper 展示 */
|
|
25
|
+
scale?: number;
|
|
26
|
+
/** 当前是否处于全屏 */
|
|
27
|
+
isFullscreen?: boolean;
|
|
28
|
+
/** 当前 transform 是否处于「适配视口」结果(用于按钮激活态) */
|
|
29
|
+
fitBoundsActive?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
/** 与 config.showGridToggle 联用:当前画布是否显示网格 */
|
|
32
|
+
mapGridVisible?: boolean;
|
|
33
|
+
/** 切换当前画布 draft 的 mapLayer.showGrid */
|
|
34
|
+
onToggleMapGrid?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* 视口锁定态:true 时显示「已锁定」图标,并禁用所有改变视角的按钮
|
|
37
|
+
* (zoom +/- / reset / fitBounds)。pan / wheel / pinch 由调用方在 TransformWrapper 上同步关闭。
|
|
38
|
+
*/
|
|
39
|
+
viewportLocked?: boolean;
|
|
40
|
+
/** 切换视口锁定;未传时不展示锁定按钮 */
|
|
41
|
+
onToggleViewportLock?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* 平面图 Dock:圆角浅底样式,默认折叠为单入口;展开后含缩放、工具、全屏与 dockExpandedTrailing
|
|
44
|
+
*/
|
|
45
|
+
dockChrome?: boolean;
|
|
46
|
+
/** Dock 展开区最右侧业务插槽(如「编辑画布」) */
|
|
47
|
+
dockExpandedTrailing?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Dock 展开后无操作自动收起(毫秒);0 表示不自动收起
|
|
50
|
+
* @default 10000
|
|
51
|
+
*/
|
|
52
|
+
autoCollapseDockMs?: number;
|
|
53
|
+
}
|
|
54
|
+
export declare function ViewControls(props: ViewControlsProps): JSX.Element | null;
|
|
55
|
+
export default ViewControls;
|
|
@@ -63,16 +63,12 @@ function ViewControls(props) {
|
|
|
63
63
|
const showGridToggle = config.showGridToggle === true && typeof onToggleMapGrid === "function";
|
|
64
64
|
const showViewportLock = config.showViewportLock === true && typeof onToggleViewportLock === "function";
|
|
65
65
|
const horizontalAlign = config.horizontalAlign ?? "start";
|
|
66
|
-
const isDockAlignEnd = horizontalAlign === "end";
|
|
67
66
|
const scalePercent = Math.round(scale * 100);
|
|
68
67
|
const showTools = showReset || showFitBounds || showFullscreen || showGridToggle || showViewportLock;
|
|
69
68
|
const hasTrailingSlot = dockExpandedTrailing != null && dockExpandedTrailing !== false;
|
|
70
69
|
const dockHasExpandable = dockChrome && (showTools || hasTrailingSlot);
|
|
71
70
|
const showBar = showZoom || showTools || dockChrome && hasTrailingSlot;
|
|
72
71
|
const [dockExpanded, setDockExpanded] = (0, import_react.useState)(false);
|
|
73
|
-
const [dockPanelMounted, setDockPanelMounted] = (0, import_react.useState)(false);
|
|
74
|
-
const dockExpandedRef = (0, import_react.useRef)(dockExpanded);
|
|
75
|
-
dockExpandedRef.current = dockExpanded;
|
|
76
72
|
const idleTimerRef = (0, import_react.useRef)(null);
|
|
77
73
|
const clearIdleTimer = (0, import_react.useCallback)(() => {
|
|
78
74
|
if (idleTimerRef.current != null) {
|
|
@@ -104,24 +100,8 @@ function ViewControls(props) {
|
|
|
104
100
|
scheduleDockCollapse();
|
|
105
101
|
}
|
|
106
102
|
}, [dockExpanded, dockHasExpandable, scheduleDockCollapse]);
|
|
107
|
-
const handleDockSlideTransitionEnd = (0, import_react.useCallback)(
|
|
108
|
-
(e) => {
|
|
109
|
-
if (e.propertyName !== "max-width" || e.target !== e.currentTarget) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if (!dockExpandedRef.current) {
|
|
113
|
-
setDockPanelMounted(false);
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
[]
|
|
117
|
-
);
|
|
118
103
|
const handleDockExpand = (0, import_react.useCallback)(() => {
|
|
119
|
-
|
|
120
|
-
requestAnimationFrame(() => {
|
|
121
|
-
requestAnimationFrame(() => {
|
|
122
|
-
setDockExpanded(true);
|
|
123
|
-
});
|
|
124
|
-
});
|
|
104
|
+
setDockExpanded(true);
|
|
125
105
|
}, []);
|
|
126
106
|
const handleDockCollapseClick = (0, import_react.useCallback)(() => {
|
|
127
107
|
clearIdleTimer();
|
|
@@ -207,8 +187,23 @@ function ViewControls(props) {
|
|
|
207
187
|
isFullscreen ? /* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenExitOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.FullscreenOutlined, null)
|
|
208
188
|
) : null);
|
|
209
189
|
};
|
|
210
|
-
const dockExpandedBarHasToolButtons = showReset ||
|
|
211
|
-
const
|
|
190
|
+
const dockExpandedBarHasToolButtons = showReset || showGridToggle || showFullscreen && Boolean(api.toggleFullscreen);
|
|
191
|
+
const renderDockToggleButton = () => /* @__PURE__ */ import_react.default.createElement(
|
|
192
|
+
"button",
|
|
193
|
+
{
|
|
194
|
+
type: "button",
|
|
195
|
+
className: (0, import_classnames.default)(`${PREFIX}-view-controls-dock-toggle-btn`, {
|
|
196
|
+
[`${PREFIX}-view-controls-dock-toggle-btn--panel-open`]: dockExpanded
|
|
197
|
+
}),
|
|
198
|
+
onClick: dockExpanded ? handleDockCollapseClick : handleDockExpand,
|
|
199
|
+
"aria-expanded": dockExpanded,
|
|
200
|
+
"aria-label": import_utils.locales.getText(
|
|
201
|
+
dockExpanded ? `${I18N_VC}.collapse-tools-aria` : `${I18N_VC}.expand-tools-aria`
|
|
202
|
+
)
|
|
203
|
+
},
|
|
204
|
+
dockExpanded ? /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null)
|
|
205
|
+
);
|
|
206
|
+
const renderDockExpandableBarContents = () => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderDockToggleButton(), showZoom ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
212
207
|
"button",
|
|
213
208
|
{
|
|
214
209
|
type: "button",
|
|
@@ -231,19 +226,9 @@ function ViewControls(props) {
|
|
|
231
226
|
},
|
|
232
227
|
/* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null)
|
|
233
228
|
)) : null, showZoom && (dockExpandedBarHasToolButtons || hasTrailingSlot) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-view-controls-bar-divider`, "aria-hidden": true }) : null, dockExpandedBarHasToolButtons ? renderToolButtons({
|
|
234
|
-
omitViewportLock:
|
|
235
|
-
omitFitBounds:
|
|
236
|
-
}) : null, hasTrailingSlot ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-view-controls-dock-trailing` }, dockExpandedTrailing) : null
|
|
237
|
-
"button",
|
|
238
|
-
{
|
|
239
|
-
type: "button",
|
|
240
|
-
className: `${PREFIX}-view-controls-tool-btn`,
|
|
241
|
-
onClick: handleDockCollapseClick,
|
|
242
|
-
"aria-expanded": dockExpanded,
|
|
243
|
-
"aria-label": import_utils.locales.getText(`${I18N_VC}.collapse-tools-aria`)
|
|
244
|
-
},
|
|
245
|
-
isDockAlignEnd ? /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null)
|
|
246
|
-
));
|
|
229
|
+
omitViewportLock: true,
|
|
230
|
+
omitFitBounds: true
|
|
231
|
+
}) : null, hasTrailingSlot ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-view-controls-dock-trailing` }, dockExpandedTrailing) : null);
|
|
247
232
|
if (!showBar) {
|
|
248
233
|
return null;
|
|
249
234
|
}
|
|
@@ -251,96 +236,66 @@ function ViewControls(props) {
|
|
|
251
236
|
const showLockChip = showViewportLock;
|
|
252
237
|
const showFitChip = showFitBounds && Boolean(api.fitBounds);
|
|
253
238
|
if (!showLockChip && !showFitChip) return null;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
"div",
|
|
239
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-view-controls-dock-collapsed-extras` }, showLockChip ? /* @__PURE__ */ import_react.default.createElement(
|
|
240
|
+
"button",
|
|
257
241
|
{
|
|
242
|
+
type: "button",
|
|
258
243
|
className: (0, import_classnames.default)(
|
|
259
|
-
`${PREFIX}-view-controls-
|
|
244
|
+
`${PREFIX}-view-controls-tool-btn`,
|
|
245
|
+
`${PREFIX}-view-controls-dock-collapsed-extras-btn`,
|
|
260
246
|
{
|
|
261
|
-
[`${PREFIX}-view-controls-
|
|
247
|
+
[`${PREFIX}-view-controls-tool-btn--active`]: viewportLocked
|
|
262
248
|
}
|
|
263
249
|
),
|
|
264
|
-
|
|
250
|
+
onClick: () => onToggleViewportLock(),
|
|
251
|
+
"aria-pressed": viewportLocked,
|
|
252
|
+
"aria-label": import_utils.locales.getText(
|
|
253
|
+
viewportLocked ? `${I18N_VC}.viewport-unlock-aria` : `${I18N_VC}.viewport-lock-aria`
|
|
254
|
+
),
|
|
255
|
+
title: import_utils.locales.getText(
|
|
256
|
+
viewportLocked ? `${I18N_VC}.viewport-unlock-aria` : `${I18N_VC}.viewport-lock-aria`
|
|
257
|
+
)
|
|
265
258
|
},
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
viewportLocked ? /* @__PURE__ */ import_react.default.createElement(import_icons.LockOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.UnlockOutlined, null)
|
|
288
|
-
) : null,
|
|
289
|
-
showFitChip ? /* @__PURE__ */ import_react.default.createElement(
|
|
290
|
-
"button",
|
|
291
|
-
{
|
|
292
|
-
type: "button",
|
|
293
|
-
className: (0, import_classnames.default)(
|
|
294
|
-
`${PREFIX}-view-controls-tool-btn`,
|
|
295
|
-
`${PREFIX}-view-controls-dock-collapsed-extras-btn`,
|
|
296
|
-
{
|
|
297
|
-
[`${PREFIX}-view-controls-tool-btn--active`]: fitBoundsActive && !viewportLocked
|
|
298
|
-
}
|
|
299
|
-
),
|
|
300
|
-
onClick: () => api.fitBounds(),
|
|
301
|
-
disabled: viewportLocked,
|
|
302
|
-
"aria-disabled": viewportLocked,
|
|
303
|
-
"aria-pressed": fitBoundsActive,
|
|
304
|
-
tabIndex: collapseExtras ? -1 : 0,
|
|
305
|
-
"aria-label": import_utils.locales.getText(`${I18N_VC}.fit-bounds-aria`),
|
|
306
|
-
title: import_utils.locales.getText(`${I18N_VC}.fit-bounds-aria`)
|
|
307
|
-
},
|
|
308
|
-
/* @__PURE__ */ import_react.default.createElement(import_icons.ExpandOutlined, null)
|
|
309
|
-
) : null
|
|
310
|
-
);
|
|
259
|
+
viewportLocked ? /* @__PURE__ */ import_react.default.createElement(import_icons.LockOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.UnlockOutlined, null)
|
|
260
|
+
) : null, showFitChip ? /* @__PURE__ */ import_react.default.createElement(
|
|
261
|
+
"button",
|
|
262
|
+
{
|
|
263
|
+
type: "button",
|
|
264
|
+
className: (0, import_classnames.default)(
|
|
265
|
+
`${PREFIX}-view-controls-tool-btn`,
|
|
266
|
+
`${PREFIX}-view-controls-dock-collapsed-extras-btn`,
|
|
267
|
+
{
|
|
268
|
+
[`${PREFIX}-view-controls-tool-btn--active`]: fitBoundsActive && !viewportLocked
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
onClick: () => api.fitBounds(),
|
|
272
|
+
disabled: viewportLocked,
|
|
273
|
+
"aria-disabled": viewportLocked,
|
|
274
|
+
"aria-pressed": fitBoundsActive,
|
|
275
|
+
"aria-label": import_utils.locales.getText(`${I18N_VC}.fit-bounds-aria`),
|
|
276
|
+
title: import_utils.locales.getText(`${I18N_VC}.fit-bounds-aria`)
|
|
277
|
+
},
|
|
278
|
+
/* @__PURE__ */ import_react.default.createElement(import_icons.ExpandOutlined, null)
|
|
279
|
+
) : null);
|
|
311
280
|
};
|
|
312
281
|
if (dockChrome && dockHasExpandable) {
|
|
313
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
282
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
314
283
|
"div",
|
|
315
284
|
{
|
|
316
285
|
className: (0, import_classnames.default)(
|
|
317
286
|
`${PREFIX}-view-controls`,
|
|
318
287
|
`${PREFIX}-view-controls--dock`,
|
|
319
|
-
|
|
288
|
+
/* dockChrome 始终右下;保留 --align-end 类以复用既有 CSS */
|
|
289
|
+
`${PREFIX}-view-controls--align-end`,
|
|
320
290
|
className
|
|
321
291
|
)
|
|
322
292
|
},
|
|
323
293
|
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}-view-controls-dock-row` }, renderDockCollapsedExtras(), /* @__PURE__ */ import_react.default.createElement(
|
|
324
|
-
"button",
|
|
325
|
-
{
|
|
326
|
-
type: "button",
|
|
327
|
-
className: (0, import_classnames.default)(`${PREFIX}-view-controls-dock-expand-btn`, {
|
|
328
|
-
[`${PREFIX}-view-controls-dock-expand-btn--panel-open`]: dockExpanded
|
|
329
|
-
}),
|
|
330
|
-
onClick: handleDockExpand,
|
|
331
|
-
"aria-expanded": dockExpanded,
|
|
332
|
-
"aria-hidden": dockExpanded,
|
|
333
|
-
tabIndex: dockExpanded ? -1 : 0,
|
|
334
|
-
"aria-label": import_utils.locales.getText(`${I18N_VC}.expand-tools-aria`)
|
|
335
|
-
},
|
|
336
|
-
isDockAlignEnd ? /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null)
|
|
337
|
-
), dockPanelMounted ? /* @__PURE__ */ import_react.default.createElement(
|
|
338
294
|
"div",
|
|
339
295
|
{
|
|
340
296
|
className: (0, import_classnames.default)(`${PREFIX}-view-controls-dock-slide`, {
|
|
341
297
|
[`${PREFIX}-view-controls-dock-slide--open`]: dockExpanded
|
|
342
|
-
})
|
|
343
|
-
onTransitionEnd: handleDockSlideTransitionEnd
|
|
298
|
+
})
|
|
344
299
|
},
|
|
345
300
|
/* @__PURE__ */ import_react.default.createElement(
|
|
346
301
|
"div",
|
|
@@ -354,8 +309,8 @@ function ViewControls(props) {
|
|
|
354
309
|
},
|
|
355
310
|
renderDockExpandableBarContents()
|
|
356
311
|
)
|
|
357
|
-
)
|
|
358
|
-
)
|
|
312
|
+
))
|
|
313
|
+
);
|
|
359
314
|
}
|
|
360
315
|
const barClass = (0, import_classnames.default)(`${PREFIX}-view-controls-bar`, {
|
|
361
316
|
[`${PREFIX}-view-controls-bar--dock`]: dockChrome
|
|
@@ -195,9 +195,15 @@
|
|
|
195
195
|
*/
|
|
196
196
|
.pisell-floor-map-layout-view-controls-dock-slide {
|
|
197
197
|
box-sizing: border-box;
|
|
198
|
-
|
|
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
|
-
*
|
|
354
|
-
* -
|
|
355
|
-
*
|
|
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][
|
|
308
|
+
* 右下 dock:row-reverse 后 DOM [extras][slide] 呈 [slide][extras],
|
|
386
309
|
* extras 贴右缘。本场景下整组按钮做成「连体 pill」:
|
|
387
310
|
*
|
|
388
|
-
* - 折叠态视觉:[
|
|
311
|
+
* - 折叠态视觉:[slide 内紫色 toggle][锁定/全览 extras]
|
|
389
312
|
* - 展开态视觉:[slide-bar 工具条][锁定/全览 extras]
|
|
390
|
-
* - 展开方向:slide max-width 由
|
|
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 /
|
|
317
|
+
* 内层 slide-bar / extras 全部去掉自己的边框圆角与投影,
|
|
395
318
|
* 由 `overflow: hidden` 的外壳负责整体裁剪。这样:
|
|
396
319
|
* - 整组只有一道阴影,无相邻拼接处的接缝阴影;
|
|
397
320
|
* - 子元素切换宽度(max-width / width)时阴影边界跟随容器自然增长,无需 clip-path 修补;
|
|
398
|
-
* - 紫色
|
|
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
|
-
*
|
|
439
|
-
*
|
|
354
|
+
* 合并入口:紫底白 icon,主题色与原 `dock-expand-btn` 一致。
|
|
355
|
+
* 尺寸对齐 dock 内其他工具按钮(@dock-btn-size),由外壳负责连体圆角与阴影。
|
|
440
356
|
*/
|
|
441
|
-
|
|
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
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
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
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
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-
|
|
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
|
}
|
|
@@ -213,7 +213,7 @@ var RecordBoardToolBar = (props) => {
|
|
|
213
213
|
String
|
|
214
214
|
) : [];
|
|
215
215
|
const allowedKeys = [
|
|
216
|
-
...DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS.map(String),
|
|
216
|
+
...import_venueWallUtils.DEFAULT_RESOURCE_WALL_STATUS_SORT_FIELD_KEYS.map(String),
|
|
217
217
|
...extraWallKeys
|
|
218
218
|
];
|
|
219
219
|
const filtered = base.filter(
|