@pisell/materials 1.0.1063 → 1.0.1065
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/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +26 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +26 -26
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +43 -31
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +60 -16
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +8 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +22 -12
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +7 -5
- package/es/components/pisellFloorMapLayout/components/MapLayer.js +5 -2
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +29 -10
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +36 -12
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +2 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +3 -1
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +2 -2
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +1 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +166 -43
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +1 -1
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +90 -13
- package/es/components/pisellFloorMapLayout/index.d.ts +2 -0
- package/es/components/pisellFloorMapLayout/index.js +2 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +6 -0
- package/es/components/pisellFloorMapLayout/locales.js +9 -3
- package/es/components/pisellFloorMapLayout/types.d.ts +9 -2
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +1 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +10 -1
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +86 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +3 -2
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +6 -3
- package/es/components/pisellRecordBoard/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/index.js +2 -1
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +21 -10
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +2 -0
- package/es/components/pisellRecordBoard/shellFrame/index.js +9 -3
- package/es/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/es/components/pisellRecordBoard/types.d.ts +6 -0
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +4 -1
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +18 -1
- package/es/components/pisellReservationScheduleBand/types.d.ts +4 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +180 -22
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +11 -0
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +4 -4
- package/es/components/pisellTimeNavigator/components/ScaleLayer.js +3 -3
- package/es/components/pisellTimeNavigator/types.d.ts +11 -0
- package/es/hooks/useResponsive.d.ts +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +39 -36
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +56 -12
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +8 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +19 -10
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +7 -5
- package/lib/components/pisellFloorMapLayout/components/MapLayer.js +3 -1
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +28 -6
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +36 -12
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +2 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +3 -1
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +1 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +143 -29
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +1 -1
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +86 -13
- package/lib/components/pisellFloorMapLayout/index.d.ts +2 -0
- package/lib/components/pisellFloorMapLayout/index.js +6 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +6 -0
- package/lib/components/pisellFloorMapLayout/locales.js +9 -3
- package/lib/components/pisellFloorMapLayout/types.d.ts +9 -2
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.d.ts +1 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapDropUtils.js +7 -1
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +69 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +2 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +5 -1
- package/lib/components/pisellRecordBoard/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/index.js +5 -2
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +13 -5
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +23 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +2 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.js +11 -4
- package/lib/components/pisellRecordBoard/shellFrame/shellFrameFloorMap.less +25 -0
- package/lib/components/pisellRecordBoard/types.d.ts +6 -0
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -1
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +18 -1
- package/lib/components/pisellReservationScheduleBand/types.d.ts +4 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +177 -12
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +11 -0
- package/lib/components/pisellTimeNavigator/types.d.ts +11 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +10 -0
- package/lowcode/floor-map-image-element/meta.ts +113 -0
- package/lowcode/floor-map-layout-provider/meta.ts +1 -1
- package/lowcode/pisell-floor-map-layout/meta.ts +37 -1
- 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 +3 -3
|
@@ -48,6 +48,7 @@ var CELL_SIZE_V = 20;
|
|
|
48
48
|
var CURSOR_MOVES_NOW_RESERVE_PX = 56;
|
|
49
49
|
var CURSOR_MOVES_H_PADDING_PX = 8;
|
|
50
50
|
var CURSOR_MOVES_MIN_CELL_PX = 8;
|
|
51
|
+
var DENSITY_LAYER_HEIGHT = 46;
|
|
51
52
|
function PisellTimeNavigator(props) {
|
|
52
53
|
var _a, _b;
|
|
53
54
|
const {
|
|
@@ -77,7 +78,9 @@ function PisellTimeNavigator(props) {
|
|
|
77
78
|
locale,
|
|
78
79
|
timeFormat = "HH:mm",
|
|
79
80
|
renderNowButton,
|
|
80
|
-
onUserInteraction
|
|
81
|
+
onUserInteraction,
|
|
82
|
+
densitySeries: densitySeriesProp,
|
|
83
|
+
loadDensity: loadDensityProp
|
|
81
84
|
} = props;
|
|
82
85
|
const context = (0, import_useEngineContext.default)();
|
|
83
86
|
import_utils2.locales.init(
|
|
@@ -91,6 +94,38 @@ function PisellTimeNavigator(props) {
|
|
|
91
94
|
}, [referenceDateProp]);
|
|
92
95
|
const referenceDate = referenceDateFromProp ?? (0, import_dayjs.default)().startOf("day");
|
|
93
96
|
const isHorizontal = orientation === "horizontal";
|
|
97
|
+
const referenceDayKey = referenceDateFromProp != null ? referenceDateFromProp.format("YYYY-MM-DD") : (0, import_dayjs.default)().format("YYYY-MM-DD");
|
|
98
|
+
const [densityLoaded, setDensityLoaded] = (0, import_react.useState)();
|
|
99
|
+
const densityReqId = (0, import_react.useRef)(0);
|
|
100
|
+
const densityGradientId = (0, import_react.useMemo)(
|
|
101
|
+
() => `pisell-time-density-fill-${Math.random().toString(36).slice(2, 8)}`,
|
|
102
|
+
[]
|
|
103
|
+
);
|
|
104
|
+
(0, import_react.useEffect)(() => {
|
|
105
|
+
if (densitySeriesProp !== void 0) {
|
|
106
|
+
setDensityLoaded(void 0);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (!loadDensityProp) {
|
|
110
|
+
setDensityLoaded(void 0);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const req = ++densityReqId.current;
|
|
114
|
+
let cancelled = false;
|
|
115
|
+
setDensityLoaded(void 0);
|
|
116
|
+
const refDay = (0, import_dayjs.default)(referenceDayKey).startOf("day");
|
|
117
|
+
void loadDensityProp({ referenceDate: refDay, stepMinutes }).then((arr) => {
|
|
118
|
+
if (cancelled || req !== densityReqId.current) return;
|
|
119
|
+
setDensityLoaded(Array.isArray(arr) ? arr : []);
|
|
120
|
+
}).catch(() => {
|
|
121
|
+
if (cancelled || req !== densityReqId.current) return;
|
|
122
|
+
setDensityLoaded(void 0);
|
|
123
|
+
});
|
|
124
|
+
return () => {
|
|
125
|
+
cancelled = true;
|
|
126
|
+
};
|
|
127
|
+
}, [referenceDayKey, stepMinutes, loadDensityProp, densitySeriesProp]);
|
|
128
|
+
const resolvedDensity = densitySeriesProp !== void 0 ? densitySeriesProp : densityLoaded;
|
|
94
129
|
const isAxisMoves = cursorMode === "axis-moves";
|
|
95
130
|
const [viewportSize, setViewportSize] = (0, import_react.useState)({ w: 0, h: 0 });
|
|
96
131
|
const viewportWrapRef = (0, import_react.useRef)(null);
|
|
@@ -122,10 +157,7 @@ function PisellTimeNavigator(props) {
|
|
|
122
157
|
const reserve = showNowButton ? CURSOR_MOVES_NOW_RESERVE_PX : 0;
|
|
123
158
|
const usable = Math.max(40, vpW - reserve - CURSOR_MOVES_H_PADDING_PX * 2);
|
|
124
159
|
const raw = Math.floor(usable / n);
|
|
125
|
-
return Math.max(
|
|
126
|
-
CURSOR_MOVES_MIN_CELL_PX,
|
|
127
|
-
Math.min(CELL_SIZE_H, raw)
|
|
128
|
-
);
|
|
160
|
+
return Math.max(CURSOR_MOVES_MIN_CELL_PX, Math.min(CELL_SIZE_H, raw));
|
|
129
161
|
}, [
|
|
130
162
|
isHorizontal,
|
|
131
163
|
isAxisMoves,
|
|
@@ -140,6 +172,48 @@ function PisellTimeNavigator(props) {
|
|
|
140
172
|
orientation,
|
|
141
173
|
cellSizePx
|
|
142
174
|
});
|
|
175
|
+
const horizontalDensityCurve = (0, import_react.useMemo)(() => {
|
|
176
|
+
if (!isHorizontal || !(resolvedDensity == null ? void 0 : resolvedDensity.length)) return null;
|
|
177
|
+
const ticksN = axis.ticks.length;
|
|
178
|
+
const n = Math.min(resolvedDensity.length, ticksN);
|
|
179
|
+
if (n < 2) return null;
|
|
180
|
+
const slice = resolvedDensity.slice(0, n);
|
|
181
|
+
const maxV = Math.max(...slice, 0);
|
|
182
|
+
const minV = Math.min(...slice, 0);
|
|
183
|
+
const span = Math.max(1, maxV - minV);
|
|
184
|
+
const h = DENSITY_LAYER_HEIGHT;
|
|
185
|
+
const points = slice.map((v, i) => {
|
|
186
|
+
const x = i * cellSizePx + cellSizePx / 2;
|
|
187
|
+
const t = (v - minV) / span;
|
|
188
|
+
const y = h - 1 - t * (h - 3);
|
|
189
|
+
return { x, y };
|
|
190
|
+
});
|
|
191
|
+
const first = points[0];
|
|
192
|
+
const last = points[points.length - 1];
|
|
193
|
+
let linePath = `M ${first.x} ${first.y}`;
|
|
194
|
+
for (let i = 0; i < points.length - 1; i += 1) {
|
|
195
|
+
const p0 = points[i];
|
|
196
|
+
const p1 = points[i + 1];
|
|
197
|
+
const cx = (p0.x + p1.x) / 2;
|
|
198
|
+
const cy = (p0.y + p1.y) / 2;
|
|
199
|
+
linePath += ` Q ${p0.x} ${p0.y} ${cx} ${cy}`;
|
|
200
|
+
}
|
|
201
|
+
linePath += ` T ${last.x} ${last.y}`;
|
|
202
|
+
const areaPath = `${linePath} L ${last.x} ${h} L ${first.x} ${h} Z`;
|
|
203
|
+
return {
|
|
204
|
+
points,
|
|
205
|
+
linePath,
|
|
206
|
+
areaPath,
|
|
207
|
+
h,
|
|
208
|
+
w: axis.totalLengthPx
|
|
209
|
+
};
|
|
210
|
+
}, [
|
|
211
|
+
isHorizontal,
|
|
212
|
+
resolvedDensity,
|
|
213
|
+
axis.ticks,
|
|
214
|
+
axis.totalLengthPx,
|
|
215
|
+
cellSizePx
|
|
216
|
+
]);
|
|
143
217
|
const isControlled = valueProp !== void 0;
|
|
144
218
|
const [internalValue, setInternalValue] = (0, import_react.useState)(() => {
|
|
145
219
|
const v = valueProp ?? defaultValue;
|
|
@@ -181,6 +255,39 @@ function PisellTimeNavigator(props) {
|
|
|
181
255
|
const dotOffsetPx = isHorizontal ? cellSizePx / 2 : 0;
|
|
182
256
|
const axisStartMarginW = isHorizontal && !isAxisMoves ? CURSOR_MOVES_H_PADDING_PX : Math.max(0, halfViewportW - dotOffsetPx);
|
|
183
257
|
const axisStartMarginH = Math.max(0, halfViewportH - dotOffsetPx);
|
|
258
|
+
const horizontalAxisWrapStyle = (0, import_react.useMemo)(() => {
|
|
259
|
+
if (!isHorizontal) return null;
|
|
260
|
+
const minHeight = 48;
|
|
261
|
+
if (isAxisMoves) {
|
|
262
|
+
const natural2 = axis.totalLengthPx + (effectiveViewportW - cellSizePx);
|
|
263
|
+
if (!showNowButton) {
|
|
264
|
+
return {
|
|
265
|
+
width: "100%",
|
|
266
|
+
minWidth: natural2,
|
|
267
|
+
minHeight,
|
|
268
|
+
boxSizing: "border-box"
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
return { width: natural2, minHeight };
|
|
272
|
+
}
|
|
273
|
+
const natural = CURSOR_MOVES_H_PADDING_PX + axis.totalLengthPx + CURSOR_MOVES_H_PADDING_PX;
|
|
274
|
+
if (!showNowButton) {
|
|
275
|
+
return {
|
|
276
|
+
width: "100%",
|
|
277
|
+
minWidth: natural,
|
|
278
|
+
minHeight,
|
|
279
|
+
boxSizing: "border-box"
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
return { width: natural, minHeight };
|
|
283
|
+
}, [
|
|
284
|
+
isHorizontal,
|
|
285
|
+
isAxisMoves,
|
|
286
|
+
axis.totalLengthPx,
|
|
287
|
+
effectiveViewportW,
|
|
288
|
+
cellSizePx,
|
|
289
|
+
showNowButton
|
|
290
|
+
]);
|
|
184
291
|
const handleScroll = (0, import_react.useCallback)(
|
|
185
292
|
(data) => {
|
|
186
293
|
if (scrollToCenterInProgressRef.current) return;
|
|
@@ -577,13 +684,7 @@ function PisellTimeNavigator(props) {
|
|
|
577
684
|
"div",
|
|
578
685
|
{
|
|
579
686
|
className: "pisell-time-navigator-axis-wrap",
|
|
580
|
-
style: isHorizontal ?
|
|
581
|
-
width: axis.totalLengthPx + (effectiveViewportW - cellSizePx),
|
|
582
|
-
minHeight: 48
|
|
583
|
-
} : {
|
|
584
|
-
width: CURSOR_MOVES_H_PADDING_PX + axis.totalLengthPx + CURSOR_MOVES_H_PADDING_PX,
|
|
585
|
-
minHeight: 48
|
|
586
|
-
} : {
|
|
687
|
+
style: isHorizontal ? horizontalAxisWrapStyle ?? { minHeight: 48 } : {
|
|
587
688
|
width: "100%"
|
|
588
689
|
/* 不设 height,由轴(marginTop + 内容 + marginBottom)自然撑开,避免固定高度与 margin 的 CSS 盒模型歧义 */
|
|
589
690
|
}
|
|
@@ -628,6 +729,70 @@ function PisellTimeNavigator(props) {
|
|
|
628
729
|
businessHoursPx
|
|
629
730
|
}
|
|
630
731
|
),
|
|
732
|
+
horizontalDensityCurve ? /* @__PURE__ */ import_react.default.createElement(
|
|
733
|
+
"svg",
|
|
734
|
+
{
|
|
735
|
+
className: "pisell-time-navigator-density-layer",
|
|
736
|
+
width: horizontalDensityCurve.w,
|
|
737
|
+
height: horizontalDensityCurve.h,
|
|
738
|
+
viewBox: `0 0 ${horizontalDensityCurve.w} ${horizontalDensityCurve.h}`,
|
|
739
|
+
preserveAspectRatio: "none",
|
|
740
|
+
"aria-hidden": true
|
|
741
|
+
},
|
|
742
|
+
/* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement(
|
|
743
|
+
"linearGradient",
|
|
744
|
+
{
|
|
745
|
+
id: densityGradientId,
|
|
746
|
+
x1: "0",
|
|
747
|
+
y1: "0",
|
|
748
|
+
x2: "0",
|
|
749
|
+
y2: "1"
|
|
750
|
+
},
|
|
751
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
752
|
+
"stop",
|
|
753
|
+
{
|
|
754
|
+
offset: "0%",
|
|
755
|
+
stopColor: "#ff9c66",
|
|
756
|
+
stopOpacity: "0.32"
|
|
757
|
+
}
|
|
758
|
+
),
|
|
759
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
760
|
+
"stop",
|
|
761
|
+
{
|
|
762
|
+
offset: "100%",
|
|
763
|
+
stopColor: "#ff9c66",
|
|
764
|
+
stopOpacity: "0.02"
|
|
765
|
+
}
|
|
766
|
+
)
|
|
767
|
+
)),
|
|
768
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
769
|
+
"path",
|
|
770
|
+
{
|
|
771
|
+
d: horizontalDensityCurve.areaPath,
|
|
772
|
+
fill: `url(#${densityGradientId})`
|
|
773
|
+
}
|
|
774
|
+
),
|
|
775
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
776
|
+
"path",
|
|
777
|
+
{
|
|
778
|
+
d: horizontalDensityCurve.linePath,
|
|
779
|
+
fill: "none",
|
|
780
|
+
stroke: "#ff8a4a",
|
|
781
|
+
strokeWidth: 1.8,
|
|
782
|
+
vectorEffect: "non-scaling-stroke"
|
|
783
|
+
}
|
|
784
|
+
),
|
|
785
|
+
horizontalDensityCurve.points.map((p, i) => /* @__PURE__ */ import_react.default.createElement(
|
|
786
|
+
"circle",
|
|
787
|
+
{
|
|
788
|
+
key: i,
|
|
789
|
+
cx: p.x,
|
|
790
|
+
cy: p.y,
|
|
791
|
+
r: 1.4,
|
|
792
|
+
fill: "#ff8a4a"
|
|
793
|
+
}
|
|
794
|
+
))
|
|
795
|
+
) : null,
|
|
631
796
|
/* @__PURE__ */ import_react.default.createElement(
|
|
632
797
|
import_components.ScaleLayer,
|
|
633
798
|
{
|
|
@@ -128,6 +128,15 @@
|
|
|
128
128
|
flex-shrink: 0;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
.pisell-time-navigator-density-layer {
|
|
132
|
+
position: absolute;
|
|
133
|
+
left: 0;
|
|
134
|
+
top: 1px;
|
|
135
|
+
z-index: 0;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
overflow: visible;
|
|
138
|
+
}
|
|
139
|
+
|
|
131
140
|
/* 背景层(营业时间、过去时间淡化等;当前时间渐变已拆出为独立块) */
|
|
132
141
|
.pisell-time-navigator-background {
|
|
133
142
|
position: absolute;
|
|
@@ -369,6 +378,8 @@
|
|
|
369
378
|
|
|
370
379
|
&--horizontal {
|
|
371
380
|
height: 100%;
|
|
381
|
+
width: 100%;
|
|
382
|
+
box-sizing: border-box;
|
|
372
383
|
}
|
|
373
384
|
|
|
374
385
|
&--vertical {
|
|
@@ -142,6 +142,17 @@ export interface PisellTimeNavigatorProps {
|
|
|
142
142
|
* 自定义 Now 按钮内容(覆盖默认文案与图标时使用)
|
|
143
143
|
*/
|
|
144
144
|
renderNowButton?: () => ReactNode;
|
|
145
|
+
/**
|
|
146
|
+
* 横向轴上与刻度槽位数一致的密度序列(任意正数,内部按最大值归一化折线高度)
|
|
147
|
+
*/
|
|
148
|
+
densitySeries?: number[];
|
|
149
|
+
/**
|
|
150
|
+
* 未传 `densitySeries` 时按 `referenceDate` 拉取;日历日变更会重新请求,过期响应丢弃
|
|
151
|
+
*/
|
|
152
|
+
loadDensity?: (params: {
|
|
153
|
+
referenceDate: Dayjs;
|
|
154
|
+
stepMinutes: number;
|
|
155
|
+
}) => Promise<number[]>;
|
|
145
156
|
/**
|
|
146
157
|
* 用户开始操作时间轴(拖轴、点刻度、键盘、拖指针等)时回调;用于上层关闭「跟随当前」等。
|
|
147
158
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ export { default as PisellRow } from './components/pisellRow';
|
|
|
129
129
|
export { default as Div } from './components/div';
|
|
130
130
|
export { default as PisellBasicGrid } from './components/PisellBasicGrid';
|
|
131
131
|
export { default as PisellScrollView } from './components/PisellScrollView';
|
|
132
|
-
export { PisellFloorMapLayout, FloorMapLayoutProvider, useFloorMapLayoutContext, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, mergeFloorMapLayoutPropsFromContext, getFigmaTableCardFromMerged, renderFigmaStyleTableCard, renderFigmaStyleRoundTableCard, getRenderItemByKindTable, getRenderItemByKindRoundTable, } from './components/pisellFloorMapLayout';
|
|
132
|
+
export { PisellFloorMapLayout, FloorMapLayoutProvider, useFloorMapLayoutContext, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, mergeFloorMapLayoutPropsFromContext, getFigmaTableCardFromMerged, renderFigmaStyleTableCard, renderFigmaStyleRoundTableCard, getRenderItemByKindTable, getRenderItemByKindRoundTable, FloorMapImageElement, FLOOR_MAP_IMAGE_ELEMENT_KIND, renderFloorMapFallbackPlaceholder, isFloorMapImageElementKind, } from './components/pisellFloorMapLayout';
|
|
133
133
|
export type { FloorMapViewConfig, FloorMapSceneElement, FloorMapCanvasNameI18n, FloorMapMergedItem, FloorMapDataSources, FloorMapItemBase, FloorMapRenderOptions, } from './components/pisellFloorMapLayout';
|
|
134
134
|
/** PisellLayouts 命名空间另含 PisellFloorMapLayoutProps 等;平面图场景细粒度类型见上方 */
|
|
135
135
|
export { default as PisellViewGrid } from './components/pisellViewGrid';
|
|
@@ -141,7 +141,7 @@ export type { ToolBarProps } from './components/pisellGridPro/ToolBar';
|
|
|
141
141
|
export { default as PisellGridPro } from './components/pisellGridPro';
|
|
142
142
|
export type { GridProProps } from './components/pisellGridPro';
|
|
143
143
|
export { default as RecordView } from './components/record-view';
|
|
144
|
-
export { default as PisellRecordBoard, useRecordBoardContext, } from './components/pisellRecordBoard';
|
|
144
|
+
export { default as PisellRecordBoard, useRecordBoardContext, useRecordBoardShellBodyMeta } from './components/pisellRecordBoard';
|
|
145
145
|
export type { RecordBoardProps, RecordBoardLayoutType, RecordBoardContextValue, RecordBoardChildComponentProps, RecordBoardGridProps, RecordBoardColumnType, RecordBoardFieldType, RecordBoardColumnFilterConfig, RecordBoardOptionItem, RecordBoardGetOptions, RecordBoardBodyView, RecordBoardFloorMapProps, RecordBoardToolBarProps, } from './components/pisellRecordBoard';
|
|
146
146
|
export { PisellShellFrame } from './components/pisellShellFrame';
|
|
147
147
|
export type { PisellShellFrameProps, PisellShellFrameConfig, PisellShellFrameScrollConfig, } from './components/pisellShellFrame';
|
package/lib/index.js
CHANGED
|
@@ -76,7 +76,9 @@ __export(src_exports, {
|
|
|
76
76
|
Dropdown: () => import_dropdown.default,
|
|
77
77
|
EMPTY_FLOOR_MAP_LAYOUT_CONTEXT: () => import_pisellFloorMapLayout.EMPTY_FLOOR_MAP_LAYOUT_CONTEXT,
|
|
78
78
|
Empty: () => import_antd.Empty,
|
|
79
|
+
FLOOR_MAP_IMAGE_ELEMENT_KIND: () => import_pisellFloorMapLayout.FLOOR_MAP_IMAGE_ELEMENT_KIND,
|
|
79
80
|
Filter: () => import_filter.default,
|
|
81
|
+
FloorMapImageElement: () => import_pisellFloorMapLayout.FloorMapImageElement,
|
|
80
82
|
FloorMapLayoutProvider: () => import_pisellFloorMapLayout.FloorMapLayoutProvider,
|
|
81
83
|
Form: () => import_form.default,
|
|
82
84
|
FormGroup: () => import_group.default,
|
|
@@ -267,6 +269,7 @@ __export(src_exports, {
|
|
|
267
269
|
getRenderItemByKindRoundTable: () => import_pisellFloorMapLayout.getRenderItemByKindRoundTable,
|
|
268
270
|
getRenderItemByKindTable: () => import_pisellFloorMapLayout.getRenderItemByKindTable,
|
|
269
271
|
globalConfig: () => import_context.globalConfig,
|
|
272
|
+
isFloorMapImageElementKind: () => import_pisellFloorMapLayout.isFloorMapImageElementKind,
|
|
270
273
|
loginAndRegister: () => import_login_and_register.default,
|
|
271
274
|
mergeFloorMapLayoutPropsFromContext: () => import_pisellFloorMapLayout.mergeFloorMapLayoutPropsFromContext,
|
|
272
275
|
message: () => import_antd.message,
|
|
@@ -274,9 +277,11 @@ __export(src_exports, {
|
|
|
274
277
|
pisellTimeNavigatorLocales: () => import_pisellTimeNavigator2.pisellTimeNavigatorLocales,
|
|
275
278
|
renderFigmaStyleRoundTableCard: () => import_pisellFloorMapLayout.renderFigmaStyleRoundTableCard,
|
|
276
279
|
renderFigmaStyleTableCard: () => import_pisellFloorMapLayout.renderFigmaStyleTableCard,
|
|
280
|
+
renderFloorMapFallbackPlaceholder: () => import_pisellFloorMapLayout.renderFloorMapFallbackPlaceholder,
|
|
277
281
|
useFloorMapLayoutContext: () => import_pisellFloorMapLayout.useFloorMapLayoutContext,
|
|
278
282
|
usePisellConfig: () => import_usePisellConfig.default,
|
|
279
283
|
useRecordBoardContext: () => import_pisellRecordBoard.useRecordBoardContext,
|
|
284
|
+
useRecordBoardShellBodyMeta: () => import_pisellRecordBoard.useRecordBoardShellBodyMeta,
|
|
280
285
|
useToast: () => import_pisellToast.useToast,
|
|
281
286
|
version: () => import_antd.version
|
|
282
287
|
});
|
|
@@ -532,7 +537,9 @@ var import_usePisellConfig = __toESM(require("./components/pisell-config-provide
|
|
|
532
537
|
Dropdown,
|
|
533
538
|
EMPTY_FLOOR_MAP_LAYOUT_CONTEXT,
|
|
534
539
|
Empty,
|
|
540
|
+
FLOOR_MAP_IMAGE_ELEMENT_KIND,
|
|
535
541
|
Filter,
|
|
542
|
+
FloorMapImageElement,
|
|
536
543
|
FloorMapLayoutProvider,
|
|
537
544
|
Form,
|
|
538
545
|
FormGroup,
|
|
@@ -723,6 +730,7 @@ var import_usePisellConfig = __toESM(require("./components/pisell-config-provide
|
|
|
723
730
|
getRenderItemByKindRoundTable,
|
|
724
731
|
getRenderItemByKindTable,
|
|
725
732
|
globalConfig,
|
|
733
|
+
isFloorMapImageElementKind,
|
|
726
734
|
loginAndRegister,
|
|
727
735
|
mergeFloorMapLayoutPropsFromContext,
|
|
728
736
|
message,
|
|
@@ -730,9 +738,11 @@ var import_usePisellConfig = __toESM(require("./components/pisell-config-provide
|
|
|
730
738
|
pisellTimeNavigatorLocales,
|
|
731
739
|
renderFigmaStyleRoundTableCard,
|
|
732
740
|
renderFigmaStyleTableCard,
|
|
741
|
+
renderFloorMapFallbackPlaceholder,
|
|
733
742
|
useFloorMapLayoutContext,
|
|
734
743
|
usePisellConfig,
|
|
735
744
|
useRecordBoardContext,
|
|
745
|
+
useRecordBoardShellBodyMeta,
|
|
736
746
|
useToast,
|
|
737
747
|
version
|
|
738
748
|
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
|
|
4
|
+
const FloorMapImageElementMeta: ComponentMetadata = {
|
|
5
|
+
"componentName": "FloorMapImageElement",
|
|
6
|
+
"title": "FloorMapImageElement",
|
|
7
|
+
"docUrl": "",
|
|
8
|
+
"screenshot": "",
|
|
9
|
+
"devMode": "proCode",
|
|
10
|
+
"npm": {
|
|
11
|
+
"package": "@pisell/materials",
|
|
12
|
+
"version": "1.0.1064",
|
|
13
|
+
"exportName": "FloorMapImageElement",
|
|
14
|
+
"main": "src\\index.tsx",
|
|
15
|
+
"destructuring": true,
|
|
16
|
+
"subName": ""
|
|
17
|
+
},
|
|
18
|
+
"configure": {
|
|
19
|
+
"props": [
|
|
20
|
+
{
|
|
21
|
+
"title": {
|
|
22
|
+
"label": {
|
|
23
|
+
"type": "i18n",
|
|
24
|
+
"en-US": "imageUrl",
|
|
25
|
+
"zh-CN": "imageUrl"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"name": "imageUrl",
|
|
29
|
+
"setter": {
|
|
30
|
+
"componentName": "MixedSetter",
|
|
31
|
+
"props": {
|
|
32
|
+
"setters": [
|
|
33
|
+
{
|
|
34
|
+
"componentName": "ObjectSetter",
|
|
35
|
+
"props": {
|
|
36
|
+
"config": {
|
|
37
|
+
"extraSetter": {
|
|
38
|
+
"componentName": "MixedSetter",
|
|
39
|
+
"isRequired": false,
|
|
40
|
+
"props": {}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"isRequired": false,
|
|
45
|
+
"initialValue": {}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"componentName": "StringSetter",
|
|
49
|
+
"isRequired": false,
|
|
50
|
+
"initialValue": ""
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"title": {
|
|
58
|
+
"label": {
|
|
59
|
+
"type": "i18n",
|
|
60
|
+
"en-US": "name",
|
|
61
|
+
"zh-CN": "name"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"name": "name",
|
|
65
|
+
"setter": {
|
|
66
|
+
"componentName": "MixedSetter",
|
|
67
|
+
"props": {
|
|
68
|
+
"setters": [
|
|
69
|
+
{
|
|
70
|
+
"componentName": "ObjectSetter",
|
|
71
|
+
"props": {
|
|
72
|
+
"config": {
|
|
73
|
+
"extraSetter": {
|
|
74
|
+
"componentName": "MixedSetter",
|
|
75
|
+
"isRequired": false,
|
|
76
|
+
"props": {}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"isRequired": false,
|
|
81
|
+
"initialValue": {}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"componentName": "StringSetter",
|
|
85
|
+
"isRequired": false,
|
|
86
|
+
"initialValue": ""
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"supports": {
|
|
94
|
+
"style": true
|
|
95
|
+
},
|
|
96
|
+
"component": {}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const snippets: Snippet[] = [
|
|
100
|
+
{
|
|
101
|
+
"title": "FloorMapImageElement",
|
|
102
|
+
"screenshot": "",
|
|
103
|
+
"schema": {
|
|
104
|
+
"componentName": "FloorMapImageElement",
|
|
105
|
+
"props": {}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
export default {
|
|
111
|
+
...FloorMapImageElementMeta,
|
|
112
|
+
snippets
|
|
113
|
+
};
|
|
@@ -9,7 +9,7 @@ const FloorMapLayoutProviderMeta: ComponentMetadata = {
|
|
|
9
9
|
"devMode": "proCode",
|
|
10
10
|
"npm": {
|
|
11
11
|
"package": "@pisell/materials",
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.1064",
|
|
13
13
|
"exportName": "FloorMapLayoutProvider",
|
|
14
14
|
"main": "src\\index.tsx",
|
|
15
15
|
"destructuring": true,
|
|
@@ -9,7 +9,7 @@ const PisellFloorMapLayoutMeta: ComponentMetadata = {
|
|
|
9
9
|
"devMode": "proCode",
|
|
10
10
|
"npm": {
|
|
11
11
|
"package": "@pisell/materials",
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.1064",
|
|
13
13
|
"exportName": "PisellFloorMapLayout",
|
|
14
14
|
"main": "src\\index.tsx",
|
|
15
15
|
"destructuring": true,
|
|
@@ -1473,6 +1473,42 @@ const PisellFloorMapLayoutMeta: ComponentMetadata = {
|
|
|
1473
1473
|
]
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
"title": {
|
|
1479
|
+
"label": {
|
|
1480
|
+
"type": "i18n",
|
|
1481
|
+
"en-US": "showGridToggle",
|
|
1482
|
+
"zh-CN": "showGridToggle"
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
"name": "showGridToggle",
|
|
1486
|
+
"setter": {
|
|
1487
|
+
"componentName": "MixedSetter",
|
|
1488
|
+
"props": {
|
|
1489
|
+
"setters": [
|
|
1490
|
+
{
|
|
1491
|
+
"componentName": "ObjectSetter",
|
|
1492
|
+
"props": {
|
|
1493
|
+
"config": {
|
|
1494
|
+
"extraSetter": {
|
|
1495
|
+
"componentName": "MixedSetter",
|
|
1496
|
+
"isRequired": false,
|
|
1497
|
+
"props": {}
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
"isRequired": false,
|
|
1502
|
+
"initialValue": {}
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"componentName": "BoolSetter",
|
|
1506
|
+
"isRequired": false,
|
|
1507
|
+
"initialValue": false
|
|
1508
|
+
}
|
|
1509
|
+
]
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1476
1512
|
}
|
|
1477
1513
|
],
|
|
1478
1514
|
"extraSetter": {
|
|
@@ -9,7 +9,7 @@ const renderFigmaStyleRoundTableCardMeta: ComponentMetadata = {
|
|
|
9
9
|
"devMode": "proCode",
|
|
10
10
|
"npm": {
|
|
11
11
|
"package": "@pisell/materials",
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.1064",
|
|
13
13
|
"exportName": "renderFigmaStyleRoundTableCard",
|
|
14
14
|
"main": "src\\index.tsx",
|
|
15
15
|
"destructuring": true,
|
|
@@ -9,7 +9,7 @@ const renderFigmaStyleTableCardMeta: ComponentMetadata = {
|
|
|
9
9
|
"devMode": "proCode",
|
|
10
10
|
"npm": {
|
|
11
11
|
"package": "@pisell/materials",
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.1064",
|
|
13
13
|
"exportName": "renderFigmaStyleTableCard",
|
|
14
14
|
"main": "src\\index.tsx",
|
|
15
15
|
"destructuring": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1065",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
"swiper": "^8.4.7",
|
|
91
91
|
"antd-mobile": "^5.38.1",
|
|
92
92
|
"vod-js-sdk-v6": "^1.4.11",
|
|
93
|
-
"@pisell/date-picker": "1.0.
|
|
93
|
+
"@pisell/date-picker": "1.0.141",
|
|
94
94
|
"@pisell/icon": "0.0.10",
|
|
95
|
-
"@pisell/utils": "1.0.
|
|
95
|
+
"@pisell/utils": "1.0.68"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"react": "^18.0.0",
|