@industry-theme/principal-view-panels 0.12.74 → 0.12.76
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditorPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CanvasEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAI5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CanvasEditorPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CanvasEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAI5D,OAAO,KAAK,EAAqD,gBAAgB,EAA+C,MAAM,mCAAmC,CAAC;AAE1K,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAKxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAkCrE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,2BAA2B;IACzE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IAEH;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;;;OAIG;IACH,aAAa,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAE1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmrD9D,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -189158,10 +189158,13 @@ const CanvasEditorPanel = ({
|
|
|
189158
189158
|
observerRef.current = new ResizeObserver(([entry]) => {
|
|
189159
189159
|
const { width, height } = entry.contentRect;
|
|
189160
189160
|
if (width > 0 && height > 0) {
|
|
189161
|
+
console.info("[CanvasEditorPanel] ResizeObserver dimensions:", { width, height, canvasPath });
|
|
189161
189162
|
setContainerDimensions({ width, height });
|
|
189162
189163
|
}
|
|
189163
189164
|
});
|
|
189164
189165
|
observerRef.current.observe(node2);
|
|
189166
|
+
const rect = node2.getBoundingClientRect();
|
|
189167
|
+
console.info("[CanvasEditorPanel] Initial container rect:", { width: rect.width, height: rect.height, canvasPath });
|
|
189165
189168
|
}, []);
|
|
189166
189169
|
useEffect(() => {
|
|
189167
189170
|
return () => {
|
|
@@ -189427,12 +189430,6 @@ const CanvasEditorPanel = ({
|
|
|
189427
189430
|
loadConfiguration();
|
|
189428
189431
|
setState((prev) => ({ ...prev, hasUnsavedChanges: false }));
|
|
189429
189432
|
}, [loadConfiguration]);
|
|
189430
|
-
const getNodeEventName2 = useCallback((node2) => {
|
|
189431
|
-
var _a3, _b3;
|
|
189432
|
-
const nodePv = node2.pv;
|
|
189433
|
-
const topLevelEvent = (_a3 = node2.event) == null ? void 0 : _a3.name;
|
|
189434
|
-
return (nodePv == null ? void 0 : nodePv.eventRef) || ((_b3 = nodePv == null ? void 0 : nodePv.event) == null ? void 0 : _b3.name) || topLevelEvent || null;
|
|
189435
|
-
}, []);
|
|
189436
189433
|
const handleScenarioHover = useCallback((eventNames) => {
|
|
189437
189434
|
setState((prev) => ({
|
|
189438
189435
|
...prev,
|
|
@@ -189547,7 +189544,7 @@ const CanvasEditorPanel = ({
|
|
|
189547
189544
|
const activeIds = /* @__PURE__ */ new Set();
|
|
189548
189545
|
if (state.canvas.nodes) {
|
|
189549
189546
|
for (const node2 of state.canvas.nodes) {
|
|
189550
|
-
const nodeEventName =
|
|
189547
|
+
const nodeEventName = getNodeEventName(node2);
|
|
189551
189548
|
if (nodeEventName && state.hoveredScenarioEventNames.includes(nodeEventName)) {
|
|
189552
189549
|
activeIds.add(node2.id);
|
|
189553
189550
|
}
|
|
@@ -189560,7 +189557,7 @@ const CanvasEditorPanel = ({
|
|
|
189560
189557
|
const activeIds = /* @__PURE__ */ new Set();
|
|
189561
189558
|
if (state.canvas.nodes) {
|
|
189562
189559
|
for (const node2 of state.canvas.nodes) {
|
|
189563
|
-
const nodeEventName =
|
|
189560
|
+
const nodeEventName = getNodeEventName(node2);
|
|
189564
189561
|
if (nodeEventName && scenarioEventNames.includes(nodeEventName)) {
|
|
189565
189562
|
activeIds.add(node2.id);
|
|
189566
189563
|
}
|
|
@@ -189581,7 +189578,7 @@ const CanvasEditorPanel = ({
|
|
|
189581
189578
|
const activeIds = /* @__PURE__ */ new Set();
|
|
189582
189579
|
if (state.canvas.nodes) {
|
|
189583
189580
|
for (const node2 of state.canvas.nodes) {
|
|
189584
|
-
const nodeEventName =
|
|
189581
|
+
const nodeEventName = getNodeEventName(node2);
|
|
189585
189582
|
if (nodeEventName && allWorkflowEventNames.has(nodeEventName)) {
|
|
189586
189583
|
activeIds.add(node2.id);
|
|
189587
189584
|
}
|
|
@@ -189591,19 +189588,19 @@ const CanvasEditorPanel = ({
|
|
|
189591
189588
|
}
|
|
189592
189589
|
}
|
|
189593
189590
|
return null;
|
|
189594
|
-
}, [state.canvas, state.hoveredScenarioEventNames, state.selectedScenario, workflowTemplate,
|
|
189591
|
+
}, [state.canvas, state.hoveredScenarioEventNames, state.selectedScenario, workflowTemplate, state.isSearchOpen, searchMatchedNodeIds]);
|
|
189595
189592
|
const eventNameToNodeId = useMemo(() => {
|
|
189596
189593
|
var _a3;
|
|
189597
189594
|
const map2 = /* @__PURE__ */ new Map();
|
|
189598
189595
|
if (!((_a3 = state.canvas) == null ? void 0 : _a3.nodes)) return map2;
|
|
189599
189596
|
for (const node2 of state.canvas.nodes) {
|
|
189600
|
-
const eventName =
|
|
189597
|
+
const eventName = getNodeEventName(node2);
|
|
189601
189598
|
if (eventName) {
|
|
189602
189599
|
map2.set(eventName, node2.id);
|
|
189603
189600
|
}
|
|
189604
189601
|
}
|
|
189605
189602
|
return map2;
|
|
189606
|
-
}, [(_b2 = state.canvas) == null ? void 0 : _b2.nodes
|
|
189603
|
+
}, [(_b2 = state.canvas) == null ? void 0 : _b2.nodes]);
|
|
189607
189604
|
const scenarioEdges = useMemo(() => {
|
|
189608
189605
|
var _a3, _b3, _c2;
|
|
189609
189606
|
if (!((_b3 = (_a3 = state.selectedScenario) == null ? void 0 : _a3.template) == null ? void 0 : _b3.events) || !((_c2 = state.canvas) == null ? void 0 : _c2.nodes)) return void 0;
|
|
@@ -190078,33 +190075,41 @@ const CanvasEditorPanel = ({
|
|
|
190078
190075
|
) }) : /* @__PURE__ */ jsx("div", {}),
|
|
190079
190076
|
rightPanel: /* @__PURE__ */ jsxs("div", { ref: containerRefCallback, style: { height: "100%", width: "100%", background: theme2.colors.background, display: "flex", flexDirection: "column" }, children: [
|
|
190080
190077
|
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
|
|
190081
|
-
canvasContent ? /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center" }, children: canvasContent }) : state.canvas ?
|
|
190082
|
-
GraphRenderer,
|
|
190083
|
-
{
|
|
190084
|
-
ref: graphRef,
|
|
190085
|
-
canvas: state.canvas,
|
|
190086
|
-
library: state.library ?? void 0,
|
|
190087
|
-
spansCanvas: state.spansCanvas ?? void 0,
|
|
190088
|
-
workflowSpanPattern: workflowSpanPattern ?? void 0,
|
|
190089
|
-
width: "100%",
|
|
190090
|
-
height: "100%",
|
|
190091
|
-
editable: state.isEditMode,
|
|
190092
|
-
onPendingChangesChange: (hasChanges) => {
|
|
190093
|
-
setState((prev) => ({ ...prev, hasUnsavedChanges: hasChanges }));
|
|
190094
|
-
},
|
|
190095
|
-
onCopy: handleCopyNodes,
|
|
190096
|
-
showBackground: state.showGridLines,
|
|
190097
|
-
backgroundVariant: "lines",
|
|
190098
|
-
showControls: true,
|
|
190099
|
-
highlightedNodeId: state.highlightedNodeId,
|
|
190100
|
-
activeNodeIds,
|
|
190101
|
-
fitViewToNodeIds,
|
|
190102
|
-
fitViewPadding: 0.15,
|
|
190078
|
+
canvasContent ? /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center" }, children: canvasContent }) : state.canvas ? (() => {
|
|
190079
|
+
console.info("[CanvasEditorPanel] Rendering GraphRenderer with dimensions:", {
|
|
190103
190080
|
containerWidth: containerDimensions == null ? void 0 : containerDimensions.width,
|
|
190104
190081
|
containerHeight: containerDimensions == null ? void 0 : containerDimensions.height,
|
|
190105
|
-
|
|
190106
|
-
|
|
190107
|
-
|
|
190082
|
+
fitViewToNodeIds: fitViewToNodeIds == null ? void 0 : fitViewToNodeIds.length,
|
|
190083
|
+
canvasPath
|
|
190084
|
+
});
|
|
190085
|
+
return /* @__PURE__ */ jsx(
|
|
190086
|
+
GraphRenderer,
|
|
190087
|
+
{
|
|
190088
|
+
ref: graphRef,
|
|
190089
|
+
canvas: state.canvas,
|
|
190090
|
+
library: state.library ?? void 0,
|
|
190091
|
+
spansCanvas: state.spansCanvas ?? void 0,
|
|
190092
|
+
workflowSpanPattern: workflowSpanPattern ?? void 0,
|
|
190093
|
+
width: "100%",
|
|
190094
|
+
height: "100%",
|
|
190095
|
+
editable: state.isEditMode,
|
|
190096
|
+
onPendingChangesChange: (hasChanges) => {
|
|
190097
|
+
setState((prev) => ({ ...prev, hasUnsavedChanges: hasChanges }));
|
|
190098
|
+
},
|
|
190099
|
+
onCopy: handleCopyNodes,
|
|
190100
|
+
showBackground: state.showGridLines,
|
|
190101
|
+
backgroundVariant: "lines",
|
|
190102
|
+
showControls: true,
|
|
190103
|
+
highlightedNodeId: state.highlightedNodeId,
|
|
190104
|
+
activeNodeIds,
|
|
190105
|
+
fitViewToNodeIds,
|
|
190106
|
+
fitViewPadding: 0.15,
|
|
190107
|
+
containerWidth: containerDimensions == null ? void 0 : containerDimensions.width,
|
|
190108
|
+
containerHeight: containerDimensions == null ? void 0 : containerDimensions.height,
|
|
190109
|
+
scenarioEdges
|
|
190110
|
+
}
|
|
190111
|
+
);
|
|
190112
|
+
})() : null,
|
|
190108
190113
|
state.isEditMode && state.hasUnsavedChanges && /* @__PURE__ */ jsxs("div", { style: {
|
|
190109
190114
|
position: "absolute",
|
|
190110
190115
|
top: 0,
|