seat-editor 3.3.40 → 3.3.42

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.
@@ -11,6 +11,7 @@ interface BoardTemplateProps {
11
11
  state: boolean;
12
12
  element: React.JSX.Element;
13
13
  };
14
+ disabled?: boolean;
14
15
  }
15
- declare const BoardTemplate: ({ refs, loadingRender }: BoardTemplateProps) => React.JSX.Element;
16
+ declare const BoardTemplate: ({ refs, loadingRender, disabled }: BoardTemplateProps) => React.JSX.Element;
16
17
  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, loadingRender }) => {
17
+ const BoardTemplate = ({ refs, loadingRender, disabled = false }) => {
18
18
  const dispatch = useAppDispatch();
19
19
  const backgroundColor = useAppSelector((state) => state.board.backgroundColor);
20
20
  const selectedComponentProps = useAppSelector((state) => state.panel.selectedComponent);
@@ -1548,7 +1548,7 @@ const BoardTemplate = ({ refs, loadingRender }) => {
1548
1548
  };
1549
1549
  return (<>
1550
1550
  <ModalPreview>
1551
- <LayerView statusKey="status" loadingRender={loadingRender}/>
1551
+ <LayerView statusKey="status" loadingRender={loadingRender} disabled={disabled}/>
1552
1552
  <div className="flex gap-2 mt-2">
1553
1553
  <Radio.Group value={isShowTagType} onChange={handleCheckPreview}>
1554
1554
  <Radio value="default">Default</Radio>
@@ -42,6 +42,7 @@ export interface TableEditorProps<TMeta = undefined> {
42
42
  state: boolean;
43
43
  element: React.JSX.Element;
44
44
  };
45
+ disabledView?: boolean;
45
46
  }
46
47
  declare const TableEditor: <TMeta>(props: TableEditorProps<TMeta>) => import("react").JSX.Element;
47
48
  export default TableEditor;
@@ -169,7 +169,7 @@ const TableEditor = (props) => {
169
169
  {(loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.element) || <Spin />}
170
170
  </div>)}
171
171
  <SideTool dragOnly={dragOnly} deleteAutorized={deleteAutorized}/>
172
- <Board key={`${viewOnly}`} refs={refsBoard} loadingRender={props === null || props === void 0 ? void 0 : props.loadingRender}/>
172
+ <Board key={`${viewOnly}`} refs={refsBoard} loadingRender={props === null || props === void 0 ? void 0 : props.loadingRender} disabled={props === null || props === void 0 ? void 0 : props.disabledView}/>
173
173
  <ControlPanels action={props.action} transform={(_a = refsBoard === null || refsBoard === void 0 ? void 0 : refsBoard.current) === null || _a === void 0 ? void 0 : _a.transformRef}/>
174
174
  </div>)}
175
175
  </div>
@@ -5,7 +5,7 @@ import Layers from "../../components/layer-v4";
5
5
  import { getTranslate } from "../board-v3/utils";
6
6
  import { Spin } from "antd";
7
7
  const LayerView = (props) => {
8
- const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, statusKey, defaultBackground, defaultBoundingBox, iconTags, tooltipProps, onRightClick, allowTooltip = true, tableMatchKey, eventMatchTable, ghostAttributes, onDrop, onSwitch, refs, privilegedTags, disabled, loadingRender, } = props;
8
+ const { componentProps, extraComponentProps, onSelectComponent, onCurrentStateChange, mappingKey, statusKey, defaultBackground, defaultBoundingBox, iconTags, tooltipProps, onRightClick, allowTooltip = true, tableMatchKey, eventMatchTable, ghostAttributes, onDrop, onSwitch, refs, privilegedTags, disabled = true, loadingRender, } = props;
9
9
  const widthTooltip = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.minWidth) || 168;
10
10
  const tableGhost = useRef(null);
11
11
  const hoverUnderghostId = useRef(null);
@@ -551,8 +551,6 @@ const LayerView = (props) => {
551
551
  return (<div className="relative w-full h-full flex-1" ref={containerRef} style={{
552
552
  overflow: "auto",
553
553
  WebkitOverflowScrolling: "touch",
554
- filter: disabled ? "grayscale(100%)" : "none",
555
- pointerEvents: disabled ? "none" : "auto",
556
554
  }} {...props.containerProps}>
557
555
  {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">
558
556
  {(loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.element) || <Spin />}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.3.40",
3
+ "version": "3.3.42",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",