@pisell/materials 1.0.1060 → 1.0.1062
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/PisellLayouts/index.js +14 -14
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +9 -4
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +34 -34
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +55 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +1 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +5 -5
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +3 -2
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +2 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +4 -2
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +42 -1
- package/es/components/pisellFloorMapLayout/types.d.ts +17 -1
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.js +2 -2
- package/es/components/pisellHierarchicalSummaryList/index.js +2 -2
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +30 -5
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +51 -51
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +4 -4
- package/es/components/pisellRecordBoard/shellFrame/index.js +4 -2
- package/es/components/pisellRecordBoard/types.d.ts +8 -2
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +1 -1
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +148 -51
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +38 -4
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.js +2 -2
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +4 -4
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +2 -2
- package/es/components/pisellTimeNavigator/components/NowButton.js +3 -3
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +3 -3
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.js +2 -2
- package/es/components/pisellTimeNavigator/hooks/useRealtime.js +2 -2
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.js +8 -8
- package/es/components/pisellTimeNavigator/types.d.ts +4 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +4 -0
- package/es/components/pisellTimeNavigator/utils/index.js +28 -14
- package/es/index.js +16 -16
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +7 -4
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +231 -157
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +1 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +2 -1
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +2 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +4 -2
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +47 -1
- package/lib/components/pisellFloorMapLayout/types.d.ts +17 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +32 -4
- package/lib/components/pisellRecordBoard/shellFrame/index.js +1 -0
- package/lib/components/pisellRecordBoard/types.d.ts +8 -2
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +1 -1
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +143 -29
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +38 -4
- package/lib/components/pisellTimeNavigator/types.d.ts +4 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +4 -0
- package/lib/components/pisellTimeNavigator/utils/index.js +9 -0
- package/lowcode/floor-map-layout-provider/meta.ts +1 -1
- package/lowcode/pisell-floor-map-layout/meta.ts +75 -1
- package/lowcode/pisell-hierarchical-summary-list/meta.ts +244 -244
- package/lowcode/render-figma-style-round-table-card/meta.ts +1 -1
- package/lowcode/render-figma-style-table-card/meta.ts +1 -1
- package/package.json +4 -4
|
@@ -28,10 +28,6 @@
|
|
|
28
28
|
-webkit-user-select: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
&--vertical .pisell-time-navigator-viewport-wrap {
|
|
32
|
-
min-height: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
31
|
.pisell-time-navigator-cursor-fixed {
|
|
36
32
|
position: absolute;
|
|
37
33
|
left: 0;
|
|
@@ -65,6 +61,26 @@
|
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
&--vertical {
|
|
64
|
+
/* flex 子项内竖向轴须 min-height:0 + overflow,否则轴随内容无限增高、无法内部滚动 */
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
min-height: 0;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
|
|
70
|
+
.pisell-time-navigator-viewport-wrap {
|
|
71
|
+
flex: 1;
|
|
72
|
+
min-height: 0;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.pisell-time-navigator-scroll-host {
|
|
79
|
+
flex: 1;
|
|
80
|
+
min-height: 0;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
}
|
|
83
|
+
|
|
68
84
|
.pisell-time-navigator-axis {
|
|
69
85
|
flex-direction: column;
|
|
70
86
|
}
|
|
@@ -274,6 +290,24 @@
|
|
|
274
290
|
&--realtime .pisell-time-navigator-cursor-bubble {
|
|
275
291
|
background: #ff692e;
|
|
276
292
|
}
|
|
293
|
+
|
|
294
|
+
&--draggable {
|
|
295
|
+
pointer-events: auto;
|
|
296
|
+
touch-action: none;
|
|
297
|
+
cursor: grab;
|
|
298
|
+
|
|
299
|
+
&:active {
|
|
300
|
+
cursor: grabbing;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&--draggable.pisell-time-navigator-cursor--horizontal {
|
|
305
|
+
width: 36px;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
&--draggable.pisell-time-navigator-cursor--vertical {
|
|
309
|
+
height: 40px;
|
|
310
|
+
}
|
|
277
311
|
}
|
|
278
312
|
|
|
279
313
|
.pisell-time-navigator-cursor-line {
|
|
@@ -4,8 +4,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
4
4
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
/**
|
|
8
|
-
* 背景区间层:营业时间高亮、过去时间淡化等(当前时间渐变已拆为独立块,见 axis-wrap 内 .pisell-time-navigator-current-gradient)
|
|
7
|
+
/**
|
|
8
|
+
* 背景区间层:营业时间高亮、过去时间淡化等(当前时间渐变已拆为独立块,见 axis-wrap 内 .pisell-time-navigator-current-gradient)
|
|
9
9
|
*/
|
|
10
10
|
export function BackgroundLayer(_ref) {
|
|
11
11
|
var orientation = _ref.orientation,
|
|
@@ -10,10 +10,10 @@ import classNames from 'classnames';
|
|
|
10
10
|
var CURSOR_LINE_WIDTH_H = 3;
|
|
11
11
|
var CURSOR_LINE_HEIGHT_V = 2;
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* 时间指示器层:竖线/横线 + 时间气泡
|
|
15
|
-
* 对齐基准为内部的竖线/横线,不是整块(气泡)的边或中心。
|
|
16
|
-
* 横向:竖线 3px;竖向:横线 2px。Realtime 态 #FF692E,浏览态 #344054
|
|
13
|
+
/**
|
|
14
|
+
* 时间指示器层:竖线/横线 + 时间气泡
|
|
15
|
+
* 对齐基准为内部的竖线/横线,不是整块(气泡)的边或中心。
|
|
16
|
+
* 横向:竖线 3px;竖向:横线 2px。Realtime 态 #FF692E,浏览态 #344054
|
|
17
17
|
*/
|
|
18
18
|
export function CursorLayer(_ref) {
|
|
19
19
|
var orientation = _ref.orientation,
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { locales } from '@pisell/utils';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
var I18N_NOW = 'pisell-time-navigator.now';
|
|
5
|
-
/**
|
|
6
|
-
* Now 按钮:固定入口,点击跳回当前时间并进入 Realtime
|
|
7
|
-
* 横向:右侧,左箭头;竖向:底部,上箭头
|
|
5
|
+
/**
|
|
6
|
+
* Now 按钮:固定入口,点击跳回当前时间并进入 Realtime
|
|
7
|
+
* 横向:右侧,左箭头;竖向:底部,上箭头
|
|
8
8
|
*/
|
|
9
9
|
export function NowButton(_ref) {
|
|
10
10
|
var orientation = _ref.orientation,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
/**
|
|
4
|
-
* 刻度层:渲染时间刻度与标签
|
|
5
|
-
* 横向:整点数字 + 小圆点;竖向:整点/半点数字 + 分割线
|
|
3
|
+
/**
|
|
4
|
+
* 刻度层:渲染时间刻度与标签
|
|
5
|
+
* 横向:整点数字 + 小圆点;竖向:整点/半点数字 + 分割线
|
|
6
6
|
*/
|
|
7
7
|
export function ScaleLayer(_ref) {
|
|
8
8
|
var orientation = _ref.orientation,
|
|
@@ -2,8 +2,8 @@ import { useCallback, useRef } from 'react';
|
|
|
2
2
|
var DECAY = 0.95;
|
|
3
3
|
var MIN_VELOCITY = 0.5;
|
|
4
4
|
var SAMPLE_MS = 50;
|
|
5
|
-
/**
|
|
6
|
-
* 惯性滚动:根据拖动末段速度在松手后继续滚动并衰减
|
|
5
|
+
/**
|
|
6
|
+
* 惯性滚动:根据拖动末段速度在松手后继续滚动并衰减
|
|
7
7
|
*/
|
|
8
8
|
export function useDragInertia(options) {
|
|
9
9
|
var enabled = options.enabled,
|
|
@@ -6,8 +6,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { useMemo } from 'react';
|
|
8
8
|
import { getRangeBounds, getTicks } from "../utils";
|
|
9
|
-
/**
|
|
10
|
-
* 时间轴刻度与时间↔像素换算
|
|
9
|
+
/**
|
|
10
|
+
* 时间轴刻度与时间↔像素换算
|
|
11
11
|
*/
|
|
12
12
|
export function useTimeAxis(options) {
|
|
13
13
|
var range = options.range,
|
|
@@ -21,9 +21,9 @@ export function useTimeAxis(options) {
|
|
|
21
21
|
rangeStart = _getRangeBounds2[0],
|
|
22
22
|
rangeEnd = _getRangeBounds2[1];
|
|
23
23
|
var ticks = getTicks(rangeStart, rangeEnd, stepMinutes);
|
|
24
|
-
/**
|
|
25
|
-
* 仅当范围结束晚于最后一个刻度时(如全天 23:59)才多一格尾段,使最后一刻可滚到视口中心。
|
|
26
|
-
* 自定义范围如 08:00–20:00 的最后一格已是 20:00,不再多一格。
|
|
24
|
+
/**
|
|
25
|
+
* 仅当范围结束晚于最后一个刻度时(如全天 23:59)才多一格尾段,使最后一刻可滚到视口中心。
|
|
26
|
+
* 自定义范围如 08:00–20:00 的最后一格已是 20:00,不再多一格。
|
|
27
27
|
*/
|
|
28
28
|
var lastTick = ticks.length > 0 ? ticks[ticks.length - 1] : null;
|
|
29
29
|
/** 横向:仅当范围结束晚于最后刻度时多一格尾段 */
|
|
@@ -34,9 +34,9 @@ export function useTimeAxis(options) {
|
|
|
34
34
|
var rawTotalPx = orientation === 'vertical' ? effectiveTicks.length * cellSizePx : (ticks.length + (needTailCell ? 1 : 0)) * cellSizePx;
|
|
35
35
|
/** 防止异常 range/step 导致轴长爆炸(如竖向出现 33M 高度),上限约 2 天 15 分钟步进 */
|
|
36
36
|
var totalLengthPx = Math.min(rawTotalPx, 500000);
|
|
37
|
-
/**
|
|
38
|
-
* 横向:每格中心为「时间下面的点」,dotOffsetPx = cellSizePx/2。
|
|
39
|
-
* 竖向:对齐整点上面的粗线(格顶),dotOffsetPx = 0。
|
|
37
|
+
/**
|
|
38
|
+
* 横向:每格中心为「时间下面的点」,dotOffsetPx = cellSizePx/2。
|
|
39
|
+
* 竖向:对齐整点上面的粗线(格顶),dotOffsetPx = 0。
|
|
40
40
|
*/
|
|
41
41
|
var dotOffsetPx = orientation === 'vertical' ? 0 : cellSizePx / 2;
|
|
42
42
|
/** 最大偏移:竖向为最后一格顶;横向有尾格时为最后一格中心延伸,无尾格时为最后一格中心 */
|
|
@@ -24,3 +24,7 @@ export declare function isInDisabledRanges(t: Dayjs, disabledRanges: TimeRangeOp
|
|
|
24
24
|
* 在 [rangeStart, rangeEnd] 内按 stepMinutes 生成刻度时间列表(Dayjs)
|
|
25
25
|
*/
|
|
26
26
|
export declare function getTicks(rangeStart: Dayjs, rangeEnd: Dayjs, stepMinutes: number): Dayjs[];
|
|
27
|
+
/**
|
|
28
|
+
* 横向时间轴「格」数量,与 useTimeAxis 中 totalLengthPx 算法一致(含尾格)
|
|
29
|
+
*/
|
|
30
|
+
export declare function getHorizontalAxisSlotCount(range: TimeRangeOption | undefined, referenceDate: Dayjs, stepMinutes: number): number;
|
|
@@ -19,9 +19,9 @@ function parseTimeOfDay(timeStr, reference) {
|
|
|
19
19
|
/** 匹配 HH:mm 或 HH:mm:ss 这类纯时间字符串 */
|
|
20
20
|
var TIME_ONLY_REGEX = /^\s*\d{1,2}:\d{2}(:\d{2})?\s*$/;
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* 解析 value 为 Dayjs,无效则返回 null。
|
|
24
|
-
* 支持 dayjs 可解析的日期时间;纯时间字符串(如 '12:00'、'14:30')会基于 reference 的日期解析。
|
|
22
|
+
/**
|
|
23
|
+
* 解析 value 为 Dayjs,无效则返回 null。
|
|
24
|
+
* 支持 dayjs 可解析的日期时间;纯时间字符串(如 '12:00'、'14:30')会基于 reference 的日期解析。
|
|
25
25
|
*/
|
|
26
26
|
export function parseValue(value, reference) {
|
|
27
27
|
if (value == null) return null;
|
|
@@ -33,10 +33,10 @@ export function parseValue(value, reference) {
|
|
|
33
33
|
return d.isValid() ? d : null;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* 将 range 转为 [startDayjs, endDayjs](reference 为营业锚定日的 0 点)
|
|
38
|
-
* - 同日内:如 08:00–22:00
|
|
39
|
-
* - 跨日营业:结束钟面早于或等于开始(如 02:01–次日 02:00)时,end 解析为 reference 的次日同一时刻
|
|
36
|
+
/**
|
|
37
|
+
* 将 range 转为 [startDayjs, endDayjs](reference 为营业锚定日的 0 点)
|
|
38
|
+
* - 同日内:如 08:00–22:00
|
|
39
|
+
* - 跨日营业:结束钟面早于或等于开始(如 02:01–次日 02:00)时,end 解析为 reference 的次日同一时刻
|
|
40
40
|
*/
|
|
41
41
|
export function getRangeBounds(range, reference) {
|
|
42
42
|
if (!range) {
|
|
@@ -50,8 +50,8 @@ export function getRangeBounds(range, reference) {
|
|
|
50
50
|
return [start, end];
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
/**
|
|
54
|
-
* 将时间吸附到 step 分钟刻度(0、15、30、45 等):四舍五入到最近刻度。
|
|
53
|
+
/**
|
|
54
|
+
* 将时间吸附到 step 分钟刻度(0、15、30、45 等):四舍五入到最近刻度。
|
|
55
55
|
*/
|
|
56
56
|
export function snapToStepMinutes(t, stepMinutes) {
|
|
57
57
|
var m = t.minute();
|
|
@@ -62,9 +62,9 @@ export function snapToStepMinutes(t, stepMinutes) {
|
|
|
62
62
|
return t.minute(snapped).second(0).millisecond(0);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* 判断时间是否落在任一禁用区间内(按绝对时间与区间 [start,end) 比较)
|
|
67
|
-
* 注:与主时间轴同 reference 的跨日 range 一致时需传入同一营业锚定日解析出的区间。
|
|
65
|
+
/**
|
|
66
|
+
* 判断时间是否落在任一禁用区间内(按绝对时间与区间 [start,end) 比较)
|
|
67
|
+
* 注:与主时间轴同 reference 的跨日 range 一致时需传入同一营业锚定日解析出的区间。
|
|
68
68
|
*/
|
|
69
69
|
export function isInDisabledRanges(t, disabledRanges) {
|
|
70
70
|
if (!(disabledRanges !== null && disabledRanges !== void 0 && disabledRanges.length)) return false;
|
|
@@ -88,8 +88,8 @@ export function isInDisabledRanges(t, disabledRanges) {
|
|
|
88
88
|
return false;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
/**
|
|
92
|
-
* 在 [rangeStart, rangeEnd] 内按 stepMinutes 生成刻度时间列表(Dayjs)
|
|
91
|
+
/**
|
|
92
|
+
* 在 [rangeStart, rangeEnd] 内按 stepMinutes 生成刻度时间列表(Dayjs)
|
|
93
93
|
*/
|
|
94
94
|
export function getTicks(rangeStart, rangeEnd, stepMinutes) {
|
|
95
95
|
var out = [];
|
|
@@ -99,4 +99,18 @@ export function getTicks(rangeStart, rangeEnd, stepMinutes) {
|
|
|
99
99
|
cur = cur.add(stepMinutes, 'minute');
|
|
100
100
|
}
|
|
101
101
|
return out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* 横向时间轴「格」数量,与 useTimeAxis 中 totalLengthPx 算法一致(含尾格)
|
|
106
|
+
*/
|
|
107
|
+
export function getHorizontalAxisSlotCount(range, referenceDate, stepMinutes) {
|
|
108
|
+
var _getRangeBounds3 = getRangeBounds(range, referenceDate),
|
|
109
|
+
_getRangeBounds4 = _slicedToArray(_getRangeBounds3, 2),
|
|
110
|
+
rangeStart = _getRangeBounds4[0],
|
|
111
|
+
rangeEnd = _getRangeBounds4[1];
|
|
112
|
+
var ticks = getTicks(rangeStart, rangeEnd, stepMinutes);
|
|
113
|
+
var lastTick = ticks.length > 0 ? ticks[ticks.length - 1] : null;
|
|
114
|
+
var needTailCell = lastTick != null && rangeEnd.isAfter(lastTick);
|
|
115
|
+
return ticks.length + (needTailCell ? 1 : 0);
|
|
102
116
|
}
|
package/es/index.js
CHANGED
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
// 新的命名空间组织方式,提供更好的组件分组和查找体验
|
|
3
3
|
// 同时保留所有原有单独导出,确保向后兼容
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* PisellFields - 字段组件命名空间
|
|
7
|
-
* @example
|
|
8
|
-
* import { PisellFields } from '@pisell/materials';
|
|
9
|
-
* <PisellFields.SingleLineText value="hello" />
|
|
10
|
-
* <PisellFields.Currency value={1000} currencySymbol="$" />
|
|
5
|
+
/**
|
|
6
|
+
* PisellFields - 字段组件命名空间
|
|
7
|
+
* @example
|
|
8
|
+
* import { PisellFields } from '@pisell/materials';
|
|
9
|
+
* <PisellFields.SingleLineText value="hello" />
|
|
10
|
+
* <PisellFields.Currency value={1000} currencySymbol="$" />
|
|
11
11
|
*/
|
|
12
12
|
export { default as PisellFields } from "./components/PisellFields";
|
|
13
|
-
/**
|
|
14
|
-
* PisellMetrics - 指标展示组件命名空间
|
|
15
|
-
* @example
|
|
16
|
-
* import { PisellMetrics } from '@pisell/materials';
|
|
17
|
-
* <PisellMetrics.MetricCard title="Total Sales" value={1580} />
|
|
13
|
+
/**
|
|
14
|
+
* PisellMetrics - 指标展示组件命名空间
|
|
15
|
+
* @example
|
|
16
|
+
* import { PisellMetrics } from '@pisell/materials';
|
|
17
|
+
* <PisellMetrics.MetricCard title="Total Sales" value={1580} />
|
|
18
18
|
*/
|
|
19
19
|
export { default as PisellMetrics } from "./components/PisellMetrics";
|
|
20
|
-
/**
|
|
21
|
-
* PisellLayouts - 布局组件命名空间
|
|
22
|
-
* @example
|
|
23
|
-
* import { PisellLayouts } from '@pisell/materials';
|
|
24
|
-
* <PisellLayouts.BasicGrid columns={3}>{children}</PisellLayouts.BasicGrid>
|
|
20
|
+
/**
|
|
21
|
+
* PisellLayouts - 布局组件命名空间
|
|
22
|
+
* @example
|
|
23
|
+
* import { PisellLayouts } from '@pisell/materials';
|
|
24
|
+
* <PisellLayouts.BasicGrid columns={3}>{children}</PisellLayouts.BasicGrid>
|
|
25
25
|
*/
|
|
26
26
|
export { default as PisellLayouts } from "./components/PisellLayouts";
|
|
27
27
|
// ==================== Ant Design 组件重导出 ====================
|
|
@@ -93,7 +93,8 @@ function PisellFloorMapLayoutInner(props, ref) {
|
|
|
93
93
|
saveError,
|
|
94
94
|
onElementRenderError,
|
|
95
95
|
toolbarShowSave = true,
|
|
96
|
-
floorMapFullscreenMode
|
|
96
|
+
floorMapFullscreenMode,
|
|
97
|
+
showDataSourceRecordFormBlock
|
|
97
98
|
} = p;
|
|
98
99
|
const isFloorMapView = Boolean(floorMapConfigProp);
|
|
99
100
|
const contentOffsetRef = (0, import_react.useRef)({ x: 0, y: 0 });
|
|
@@ -111,7 +112,8 @@ function PisellFloorMapLayoutInner(props, ref) {
|
|
|
111
112
|
dataSourceRecordForm,
|
|
112
113
|
dataSourceLabels,
|
|
113
114
|
layoutPrefix: PREFIX,
|
|
114
|
-
contentOffsetRef
|
|
115
|
+
contentOffsetRef,
|
|
116
|
+
showDataSourceRecordFormBlock
|
|
115
117
|
});
|
|
116
118
|
const {
|
|
117
119
|
config,
|
|
@@ -336,9 +338,10 @@ function PisellFloorMapLayoutInner(props, ref) {
|
|
|
336
338
|
var _a2;
|
|
337
339
|
return (_a2 = transformRef.current) == null ? void 0 : _a2.resetTransform();
|
|
338
340
|
},
|
|
339
|
-
fitBounds
|
|
341
|
+
fitBounds,
|
|
342
|
+
saveLayout: () => handleSave()
|
|
340
343
|
}),
|
|
341
|
-
[fitBounds]
|
|
344
|
+
[fitBounds, handleSave]
|
|
342
345
|
);
|
|
343
346
|
const showSidebar = isFloorMapView && mode === "edit" && config && dataSources;
|
|
344
347
|
return /* @__PURE__ */ import_react.default.createElement(
|