@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.
- 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.js +3 -31
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +45 -64
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +1 -1
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +1 -25
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +5 -5
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +62 -107
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +65 -131
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/package.json +3 -3
- package/es/components/filter/components/FilterItem/index.d.ts +0 -5
- package/es/components/filter/components/QuickFilter/index.d.ts +0 -12
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +0 -39
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -11
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -60
- package/es/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
- package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -53
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -25
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -4
- package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
- package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -71
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +0 -89
- package/es/components/pisellFloorMapLayout/index.d.ts +0 -26
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -133
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -133
- package/es/components/pisellFloorMapLayout/locales.d.ts +0 -651
- package/es/components/pisellFloorMapLayout/types.d.ts +0 -641
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
- 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/recordBoardToolBarConstants.d.ts +0 -8
- 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/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
- package/es/components/pisellShellFrame/types.d.ts +0 -62
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +0 -10
- package/es/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -27
- package/es/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
- package/es/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
- package/es/index.d.ts +0 -265
- package/es/locales/en-US.d.ts +0 -557
- package/es/locales/ja.d.ts +0 -526
- package/es/locales/pt.d.ts +0 -526
- package/es/locales/zh-CN.d.ts +0 -552
- package/es/locales/zh-TW.d.ts +0 -552
- package/lib/components/filter/components/FilterItem/index.d.ts +0 -5
- package/lib/components/filter/components/QuickFilter/index.d.ts +0 -12
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +0 -39
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -11
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -60
- package/lib/components/pisellFloorMapLayout/components/HistoryIcons.d.ts +0 -39
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +0 -53
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -25
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -4
- package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.d.ts +0 -25
- package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.d.ts +0 -18
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -71
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +0 -89
- package/lib/components/pisellFloorMapLayout/index.d.ts +0 -26
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -133
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -133
- package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -651
- package/lib/components/pisellFloorMapLayout/types.d.ts +0 -641
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -50
- 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/recordBoardToolBarConstants.d.ts +0 -8
- 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/components/pisellShellFrame/PisellShellFrame.d.ts +0 -13
- package/lib/components/pisellShellFrame/types.d.ts +0 -62
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +0 -10
- package/lib/components/pisellTimeNavigator/components/CursorLayer.d.ts +0 -27
- package/lib/components/pisellTimeNavigator/components/GestureLayer.d.ts +0 -41
- package/lib/components/pisellTimeNavigator/timeNavigatorConstants.d.ts +0 -20
- package/lib/index.d.ts +0 -265
- package/lib/locales/en-US.d.ts +0 -557
- package/lib/locales/ja.d.ts +0 -526
- package/lib/locales/pt.d.ts +0 -526
- package/lib/locales/zh-CN.d.ts +0 -552
- package/lib/locales/zh-TW.d.ts +0 -552
|
@@ -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
|
}
|
|
@@ -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:
|
|
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} 一致)。
|
|
@@ -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(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.46",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"antd-mobile": "^5.38.1",
|
|
100
100
|
"vod-js-sdk-v6": "^1.4.11",
|
|
101
101
|
"@pisell/date-picker": "3.0.8",
|
|
102
|
-
"@pisell/
|
|
103
|
-
"@pisell/
|
|
102
|
+
"@pisell/utils": "3.0.2",
|
|
103
|
+
"@pisell/icon": "0.0.11"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": "^18.0.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { FilterItemProps } from "../../types";
|
|
3
|
-
interface QuickFilterProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
formFiltersPrefix: string;
|
|
6
|
-
value?: {
|
|
7
|
-
quickFilter?: FilterItemProps[];
|
|
8
|
-
notSortFilter?: FilterItemProps[];
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare const QuickFilter: React.FC<QuickFilterProps>;
|
|
12
|
-
export default QuickFilter;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PisellFloorMapLayout - 空间布局视图
|
|
3
|
-
* 支持两种用法:1) 仅传入 items + renderItem(原有用法);2) 传入 floorMapConfig + dataSources + mode 使用平面图视图(含多画布/编辑态)
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { FloorMapItemBase, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from './types';
|
|
7
|
-
import './PisellFloorMapLayout.less';
|
|
8
|
-
/** 空间布局根组件:阅读/编辑、列表与平面图双模式,ref 见 {@link PisellFloorMapLayoutRef} */
|
|
9
|
-
declare const PisellFloorMapLayout: <T extends FloorMapItemBase = FloorMapItemBase>(props: PisellFloorMapLayoutProps<T> & {
|
|
10
|
-
ref?: React.Ref<PisellFloorMapLayoutRef | null> | undefined;
|
|
11
|
-
}) => React.ReactElement;
|
|
12
|
-
export { PisellFloorMapLayout };
|
|
13
|
-
export default PisellFloorMapLayout;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { FloorMapMergedItem, FloorMapDataSources } from '../types';
|
|
3
|
-
export declare type FigmaTableStatus = 'available' | 'reserved' | 'waiting' | 'dining' | 'billed' | 'availableSoon';
|
|
4
|
-
/** 方桌/圆桌卡片展示用数据结构(与 Figma 设计一致,支持桌号/状态/人数/区域等) */
|
|
5
|
-
export interface FigmaTableCardItem {
|
|
6
|
-
id: string;
|
|
7
|
-
/**
|
|
8
|
-
* 无绑定或无可展示数据行时与蘸料摆台占位一致:浅灰底 + 虚线框 + 提示文案
|
|
9
|
-
* @see getRenderItemByKindCondimentStation(RecordBoard Story)
|
|
10
|
-
*/
|
|
11
|
-
isNoDataPlaceholder?: boolean;
|
|
12
|
-
placeholderBorderColor?: string;
|
|
13
|
-
placeholderHint?: string;
|
|
14
|
-
/** 占位主标题:优先图元名称,否则「餐桌」/「圆桌」 */
|
|
15
|
-
placeholderTitle?: string;
|
|
16
|
-
/** 桌号/名称,空闲态居中显示 */
|
|
17
|
-
displayName?: string;
|
|
18
|
-
status?: FigmaTableStatus;
|
|
19
|
-
customerName?: string;
|
|
20
|
-
reserveTime?: string;
|
|
21
|
-
/** 当前用餐人数(与 Figma 设计一致) */
|
|
22
|
-
guests?: number;
|
|
23
|
-
/** 可坐人数(与表格列「可坐人数」绑定) */
|
|
24
|
-
capacity?: number;
|
|
25
|
-
dishes?: string;
|
|
26
|
-
duration?: string;
|
|
27
|
-
/** 区域(与表格列「区域」绑定,如大厅/包厢A) */
|
|
28
|
-
area?: string;
|
|
29
|
-
}
|
|
30
|
-
/** 从 merged item + dataSources 得到卡片数据 */
|
|
31
|
-
export declare function getFigmaTableCardFromMerged(item: FloorMapMergedItem, dataSources: FloorMapDataSources): FigmaTableCardItem;
|
|
32
|
-
/** 渲染 Figma 样式的方桌卡片(上下小条 + 资源信息标题栏 + 白底卡片 + 状态色边框) */
|
|
33
|
-
export declare function renderFigmaStyleTableCard(cardItem: FigmaTableCardItem): JSX.Element;
|
|
34
|
-
/** 渲染 Figma 样式的圆桌卡片(顶部资源信息 chip + 圆形主体,圆形主体只展示状态相关内容) */
|
|
35
|
-
export declare function renderFigmaStyleRoundTableCard(cardItem: FigmaTableCardItem): JSX.Element;
|
|
36
|
-
/** 返回用于 renderItemByKind.table 的渲染函数(方桌) */
|
|
37
|
-
export declare function getRenderItemByKindTable(dataSources: FloorMapDataSources): (item: unknown) => JSX.Element;
|
|
38
|
-
/** 返回用于 renderItemByKind.roundTable 的渲染函数(圆桌) */
|
|
39
|
-
export declare function getRenderItemByKindRoundTable(dataSources: FloorMapDataSources): (item: unknown) => JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { FloorMapEditPanelParams, FloorMapViewConfig, FloorMapDataSources } from '../types';
|
|
3
|
-
import './FloorMapEditPanel.less';
|
|
4
|
-
export interface FloorMapEditPanelProps extends FloorMapEditPanelParams {
|
|
5
|
-
config: FloorMapViewConfig;
|
|
6
|
-
dataSources: FloorMapDataSources;
|
|
7
|
-
savingRecord?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function FloorMapEditPanel(props: FloorMapEditPanelProps): JSX.Element;
|
|
11
|
-
export default FloorMapEditPanel;
|