@industry-theme/principal-view-panels 0.12.100 → 0.12.102
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,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;
|
|
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;AAmDrE;;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,CAouD9D,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -190508,6 +190508,18 @@ function mapEventToNodeId(event, canvas) {
|
|
|
190508
190508
|
}
|
|
190509
190509
|
return null;
|
|
190510
190510
|
}
|
|
190511
|
+
const DEFAULT_LIBRARY = {
|
|
190512
|
+
version: "1.0.0",
|
|
190513
|
+
name: "Default Library",
|
|
190514
|
+
description: "Minimal default library for rendering",
|
|
190515
|
+
nodeComponents: {},
|
|
190516
|
+
edgeComponents: {},
|
|
190517
|
+
states: {
|
|
190518
|
+
draft: { color: "#f59e0b", label: "Draft" },
|
|
190519
|
+
approved: { color: "#10b981", label: "Approved" },
|
|
190520
|
+
implemented: { color: "#6366f1", label: "Implemented" }
|
|
190521
|
+
}
|
|
190522
|
+
};
|
|
190511
190523
|
const CanvasEditorPanel = ({
|
|
190512
190524
|
context: context2,
|
|
190513
190525
|
actions,
|
|
@@ -190533,7 +190545,7 @@ const CanvasEditorPanel = ({
|
|
|
190533
190545
|
const [containerDimensions, setContainerDimensions] = useState(null);
|
|
190534
190546
|
const [state, setState] = useState({
|
|
190535
190547
|
canvas: null,
|
|
190536
|
-
library:
|
|
190548
|
+
library: DEFAULT_LIBRARY,
|
|
190537
190549
|
spansCanvas: null,
|
|
190538
190550
|
loading: true,
|
|
190539
190551
|
error: null,
|
|
@@ -190626,7 +190638,7 @@ const CanvasEditorPanel = ({
|
|
|
190626
190638
|
const [currentSearchIndex, setCurrentSearchIndex] = useState(0);
|
|
190627
190639
|
const loadConfiguration = useCallback(async () => {
|
|
190628
190640
|
if (!canvasPath) {
|
|
190629
|
-
setState((prev) => ({ ...prev, canvas: null, library:
|
|
190641
|
+
setState((prev) => ({ ...prev, canvas: null, library: DEFAULT_LIBRARY, spansCanvas: null, loading: false, error: null }));
|
|
190630
190642
|
return;
|
|
190631
190643
|
}
|
|
190632
190644
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
@@ -190685,10 +190697,11 @@ const CanvasEditorPanel = ({
|
|
|
190685
190697
|
console.warn("[PrincipalView] Failed to load spans canvas:", spansError);
|
|
190686
190698
|
}
|
|
190687
190699
|
}
|
|
190700
|
+
const finalLibrary = library || DEFAULT_LIBRARY;
|
|
190688
190701
|
setState((prev) => ({
|
|
190689
190702
|
...prev,
|
|
190690
190703
|
canvas,
|
|
190691
|
-
library,
|
|
190704
|
+
library: finalLibrary,
|
|
190692
190705
|
spansCanvas,
|
|
190693
190706
|
loading: false,
|
|
190694
190707
|
error: null,
|
|
@@ -190699,7 +190712,7 @@ const CanvasEditorPanel = ({
|
|
|
190699
190712
|
setState((prev) => ({
|
|
190700
190713
|
...prev,
|
|
190701
190714
|
canvas: null,
|
|
190702
|
-
library:
|
|
190715
|
+
library: DEFAULT_LIBRARY,
|
|
190703
190716
|
spansCanvas: null,
|
|
190704
190717
|
loading: false,
|
|
190705
190718
|
error: error.message
|
|
@@ -191521,7 +191534,7 @@ const CanvasEditorPanel = ({
|
|
|
191521
191534
|
{
|
|
191522
191535
|
ref: graphRef,
|
|
191523
191536
|
canvas: state.canvas,
|
|
191524
|
-
library: state.library
|
|
191537
|
+
library: state.library,
|
|
191525
191538
|
spansCanvas: state.spansCanvas ?? void 0,
|
|
191526
191539
|
workflowSpanPattern: workflowSpanPattern ?? void 0,
|
|
191527
191540
|
width: "100%",
|