seat-editor 3.6.14 → 3.6.16

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.
@@ -602,7 +602,7 @@ const LayerView = (props) => {
602
602
  const viewBox = isValidBoundingBox
603
603
  ? `${boundingBox.minX - (((_a = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _a === void 0 ? void 0 : _a.paddingLeft) || 0)} ${boundingBox.minY - (((_b = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _b === void 0 ? void 0 : _b.paddingTop) || 0)} ${boundingBox.width + (((_c = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _c === void 0 ? void 0 : _c.paddingRight) || 0)} ${boundingBox.height + (((_d = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _d === void 0 ? void 0 : _d.paddingBottom) || 0)}`
604
604
  : "0 0 1000 1000";
605
- const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection), [componentsEditor, mappingKey, tableMatchKey, statusKey, graph.connecting, groupSelection]);
605
+ const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection), [componentsEditor, mappingKey, tableMatchKey, statusKey, graph.connecting, groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey, groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection]);
606
606
  return (_jsxs("div", Object.assign({ className: "relative w-full h-full flex-1", ref: containerRef, style: { overflow: "auto", WebkitOverflowScrolling: "touch" } }, props.containerProps, { children: [loading && (_jsx("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", children: (loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.element) || _jsx(Spin, {}) })), _jsx(TransformWrapper, Object.assign({ ref: transformRef, disablePadding: true, centerZoomedOut: true, panning: { disabled: panningGroup, wheelPanning: true }, wheel: { disabled: false }, onTransformed: ({ state: { scale } }) => setScale(scale), minScale: 1, maxScale: 1000, initialScale: 1, smooth: true, centerOnInit: true }, props.transformProps, { children: _jsxs(TransformComponent, { wrapperStyle: { width: "100%", height: "100%" }, contentStyle: { width: "100%", height: "100%" }, children: [_jsxs("svg", Object.assign({ id: "workspace", ref: svgRef, width: "100%", height: "100%", overflow: "hidden", viewBox: viewBox, className: "h-full", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid meet", onContextMenu: (e) => e.preventDefault(),
607
607
  // onDrop={(e) => handleTableEvent(e, "drop")}
608
608
  onPointerDown: handlePointerDown, onPointerUp: handleMouseUp, onMouseMove: (e) => graph.onMouseMove(e), onMouseUp: () => graph.onMouseUp(), onClick: (e) => {
@@ -601,7 +601,7 @@ const LayerView = (props) => {
601
601
  const viewBox = isValidBoundingBox
602
602
  ? `${boundingBox.minX - (((_a = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _a === void 0 ? void 0 : _a.paddingLeft) || 0)} ${boundingBox.minY - (((_b = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _b === void 0 ? void 0 : _b.paddingTop) || 0)} ${boundingBox.width + (((_c = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _c === void 0 ? void 0 : _c.paddingRight) || 0)} ${boundingBox.height + (((_d = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _d === void 0 ? void 0 : _d.paddingBottom) || 0)}`
603
603
  : "0 0 1000 1000";
604
- const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection), [componentsEditor, mappingKey, tableMatchKey, statusKey, graph.connecting, groupSelection]);
604
+ const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection), [componentsEditor, mappingKey, tableMatchKey, statusKey, graph.connecting, groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey, groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection]);
605
605
  return (<div className="relative w-full h-full flex-1" ref={containerRef} style={{ overflow: "auto", WebkitOverflowScrolling: "touch" }} {...props.containerProps}>
606
606
  {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">
607
607
  {(loadingRender === null || loadingRender === void 0 ? void 0 : loadingRender.element) || <Spin />}
@@ -69,7 +69,6 @@ const findIndexByValue = (obj, targetValue) => {
69
69
  if (!obj || !targetValue)
70
70
  return undefined;
71
71
  const foundEntry = Object.entries(obj).find(([_, values]) => values.includes(targetValue));
72
- console.log({ foundEntry });
73
72
  return foundEntry ? Number(foundEntry[0]) : undefined;
74
73
  };
75
74
  export const renderElements = (elementEditor, mappingKey, tableMatchKey, connecting, groupSelection) => {
@@ -88,8 +87,7 @@ export const renderElements = (elementEditor, mappingKey, tableMatchKey, connect
88
87
  // console.log({ finalProps })
89
88
  const findIndexSelection = findIndexByValue(groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]);
90
89
  let fill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
91
- console.log({ findIndexSelection }, { tableMatch }, { connecting });
92
- if (findIndexSelection) {
90
+ if (findIndexSelection !== undefined) {
93
91
  fill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
94
92
  }
95
93
  if ((_a = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _a === void 0 ? void 0 : _a.fill) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.6.14",
3
+ "version": "3.6.16",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",