seat-editor 3.2.24 → 3.2.26
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/dist/components/layer-v4/constant.js +9 -4
- package/dist/components/layer-v4/index.jsx +3 -3
- package/dist/features/board-v3/index.d.ts +5 -2
- package/dist/features/board-v3/index.jsx +2 -2
- package/dist/features/package/index.d.ts +4 -1
- package/dist/features/package/index.jsx +1 -1
- package/dist/features/view-only-3/index.d.ts +4 -1
- package/dist/features/view-only-3/index.jsx +3 -3
- package/package.json +1 -1
|
@@ -45,10 +45,6 @@ export const tagsDummy = (name, icon) => [
|
|
|
45
45
|
type: "text",
|
|
46
46
|
value: "19:00",
|
|
47
47
|
},
|
|
48
|
-
{
|
|
49
|
-
type: "text",
|
|
50
|
-
value: "22:00",
|
|
51
|
-
},
|
|
52
48
|
{
|
|
53
49
|
type: "text",
|
|
54
50
|
value: "22:00",
|
|
@@ -58,6 +54,15 @@ export const tagsDummy = (name, icon) => [
|
|
|
58
54
|
position: "right-top", // right | right-top | right-bottom | left | left-top | left-bottom | top | bottom
|
|
59
55
|
},
|
|
60
56
|
},
|
|
57
|
+
// {
|
|
58
|
+
// type: "text",
|
|
59
|
+
// value: "23:00",
|
|
60
|
+
// symbol: {
|
|
61
|
+
// value: "+1",
|
|
62
|
+
// gap: 1,
|
|
63
|
+
// position: "right-top" as Position, // right | right-top | right-bottom | left | left-top | left-bottom | top | bottom
|
|
64
|
+
// },
|
|
65
|
+
// },
|
|
61
66
|
],
|
|
62
67
|
direction: "column",
|
|
63
68
|
offsetY: -35,
|
|
@@ -41,7 +41,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
41
41
|
const isColumn = (_a = tag.direction) === null || _a === void 0 ? void 0 : _a.includes("column");
|
|
42
42
|
const tagHeight = isColumn
|
|
43
43
|
? items.length * defaultFontSize +
|
|
44
|
-
(
|
|
44
|
+
(2) * (Number(tag.gap) || 2)
|
|
45
45
|
: defaultFontSize; // horizontal = 1 line
|
|
46
46
|
return sum + tagHeight + gapBetweenTags;
|
|
47
47
|
}, 0)) - gapBetweenTags;
|
|
@@ -60,7 +60,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
60
60
|
const fontSize = Number(defaultFontSize);
|
|
61
61
|
const isColumn = direction === "column";
|
|
62
62
|
const groupHeight = isColumn
|
|
63
|
-
? items.length * fontSize + (
|
|
63
|
+
? items.length * fontSize + (2) * gap
|
|
64
64
|
: fontSize;
|
|
65
65
|
const centerX = width / 2;
|
|
66
66
|
const centerY = currentY + groupHeight;
|
|
@@ -75,7 +75,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
75
75
|
: 0;
|
|
76
76
|
const offsetX = !isColumn
|
|
77
77
|
? i * (fontSize + gap) -
|
|
78
|
-
((
|
|
78
|
+
((1) * (fontSize + gap)) / 2
|
|
79
79
|
: 0;
|
|
80
80
|
const posX = centerX + offsetX + Number((_a = tag.offsetX) !== null && _a !== void 0 ? _a : 0);
|
|
81
81
|
const posY = centerY + offsetY + Number((_b = tag.offsetY) !== null && _b !== void 0 ? _b : 0);
|
|
@@ -7,7 +7,10 @@ export type RefsType = {
|
|
|
7
7
|
};
|
|
8
8
|
interface BoardTemplateProps {
|
|
9
9
|
refs?: React.ForwardedRef<RefsType>;
|
|
10
|
-
|
|
10
|
+
loadingRender?: {
|
|
11
|
+
state: boolean;
|
|
12
|
+
element: React.JSX.Element;
|
|
13
|
+
};
|
|
11
14
|
}
|
|
12
|
-
declare const BoardTemplate: ({ refs,
|
|
15
|
+
declare const BoardTemplate: ({ refs, loadingRender }: BoardTemplateProps) => React.JSX.Element;
|
|
13
16
|
export default BoardTemplate;
|
|
@@ -14,7 +14,7 @@ import { applyResizeToSvgElement, arrayToSvgPointsAttr, createTableGhost, getGlo
|
|
|
14
14
|
const toolElement = ["square", "circle", "table-seat-circle"];
|
|
15
15
|
const idSelectionBoxGhost = "selection-box-ghost";
|
|
16
16
|
const nameShapeSelectionBoxGhost = "selection-box";
|
|
17
|
-
const BoardTemplate = ({ refs,
|
|
17
|
+
const BoardTemplate = ({ refs, loadingRender }) => {
|
|
18
18
|
const dispatch = useAppDispatch();
|
|
19
19
|
const backgroundColor = useAppSelector((state) => state.board.backgroundColor);
|
|
20
20
|
const selectedComponentProps = useAppSelector((state) => state.panel.selectedComponent);
|
|
@@ -1501,7 +1501,7 @@ const BoardTemplate = ({ refs, loadingComponent }) => {
|
|
|
1501
1501
|
};
|
|
1502
1502
|
return (<>
|
|
1503
1503
|
<ModalPreview>
|
|
1504
|
-
<LayerView statusKey="status"
|
|
1504
|
+
<LayerView statusKey="status" loadingRender={loadingRender}/>
|
|
1505
1505
|
<div className="flex gap-2 mt-2">
|
|
1506
1506
|
<Radio.Group value={isShowTagType} onChange={handleCheckPreview}>
|
|
1507
1507
|
<Radio value="default">Default</Radio>
|
|
@@ -39,7 +39,10 @@ export interface TableEditorProps {
|
|
|
39
39
|
paddingRight?: number;
|
|
40
40
|
paddingBottom?: number;
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
loadingRender?: {
|
|
43
|
+
state: boolean;
|
|
44
|
+
element: React.JSX.Element;
|
|
45
|
+
};
|
|
43
46
|
}
|
|
44
47
|
declare const TableEditor: (props: TableEditorProps) => import("react").JSX.Element;
|
|
45
48
|
export default TableEditor;
|
|
@@ -128,7 +128,7 @@ const TableEditor = (props) => {
|
|
|
128
128
|
<LayerView statusKey="status"/>
|
|
129
129
|
</div>) : (<div key={`${viewOnly}`} className="w-full h-full flex relative">
|
|
130
130
|
<SideTool dragOnly={dragOnly} deleteAutorized={deleteAutorized}/>
|
|
131
|
-
<Board key={`${viewOnly}`} refs={refsBoard}
|
|
131
|
+
<Board key={`${viewOnly}`} refs={refsBoard} loadingRender={props === null || props === void 0 ? void 0 : props.loadingRender}/>
|
|
132
132
|
<ControlPanels action={props.action} transform={(_a = refsBoard === null || refsBoard === void 0 ? void 0 : refsBoard.current) === null || _a === void 0 ? void 0 : _a.transformRef}/>
|
|
133
133
|
</div>)}
|
|
134
134
|
</div>
|
|
@@ -78,7 +78,10 @@ export interface LayerViewProps<TMeta = undefined> {
|
|
|
78
78
|
paddingBottom?: number;
|
|
79
79
|
};
|
|
80
80
|
disabled?: boolean;
|
|
81
|
-
|
|
81
|
+
loadingRender?: {
|
|
82
|
+
state: boolean;
|
|
83
|
+
element: React.JSX.Element;
|
|
84
|
+
};
|
|
82
85
|
}
|
|
83
86
|
declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
|
|
84
87
|
export default LayerView;
|
|
@@ -6,7 +6,7 @@ import Layers from "../../components/layer-v4";
|
|
|
6
6
|
import { getTranslate } from "../board-v3/utils";
|
|
7
7
|
import { Spin } from "antd";
|
|
8
8
|
const LayerView = (props) => {
|
|
9
|
-
const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, statusKey, defaultBackground, iconTags, tooltipProps, onRightClick, allowTooltip = true, tableMatchKey, eventMatchTable, ghostAttributes, onDrop, onSwitch, refs, privilegedTags, disabled,
|
|
9
|
+
const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, statusKey, defaultBackground, iconTags, tooltipProps, onRightClick, allowTooltip = true, tableMatchKey, eventMatchTable, ghostAttributes, onDrop, onSwitch, refs, privilegedTags, disabled, loadingRender, } = props;
|
|
10
10
|
const widthTooltip = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.minWidth) || 168;
|
|
11
11
|
const tableGhost = useRef(null);
|
|
12
12
|
const hoverUnderghostId = useRef(null);
|
|
@@ -38,7 +38,7 @@ const LayerView = (props) => {
|
|
|
38
38
|
}));
|
|
39
39
|
const dispatch = useAppDispatch();
|
|
40
40
|
useEffect(() => {
|
|
41
|
-
if (!loading) {
|
|
41
|
+
if (!(loading && (loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.state))) {
|
|
42
42
|
dispatch({ type: "panel/setLoading", payload: true });
|
|
43
43
|
}
|
|
44
44
|
if ((componentProps === null || componentProps === void 0 ? void 0 : componentProps.length) > 0) {
|
|
@@ -526,7 +526,7 @@ const LayerView = (props) => {
|
|
|
526
526
|
pointerEvents: disabled ? "none" : "auto",
|
|
527
527
|
}} {...props.containerProps}>
|
|
528
528
|
{loading && (<div className="absolute z-10 top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-opacity-50 bg-white w-full h-full flex items-center justify-center">
|
|
529
|
-
{
|
|
529
|
+
{(loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.element) || <Spin />}
|
|
530
530
|
</div>)}
|
|
531
531
|
|
|
532
532
|
{/* {isDragging?.current && (
|