@trops/dash-core 0.1.365 → 0.1.366
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/electron/index.js +56 -8
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +32 -41
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +41 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -63033,10 +63033,36 @@ function collectComponentNamesFromWorkspace$1(workspace) {
|
|
|
63033
63033
|
return Array.from(names);
|
|
63034
63034
|
}
|
|
63035
63035
|
|
|
63036
|
+
/**
|
|
63037
|
+
* Extract event wiring across a workspace's main layout, every page
|
|
63038
|
+
* layout, and the sidebar layout. Mirrors collectComponentNamesFromWorkspace
|
|
63039
|
+
* — the single-layout `extractEventWiring` misses widgets on non-active
|
|
63040
|
+
* pages or in the sidebar.
|
|
63041
|
+
*
|
|
63042
|
+
* @param {Object} workspace - Workspace object
|
|
63043
|
+
* @returns {Array} Event wiring array
|
|
63044
|
+
*/
|
|
63045
|
+
function extractEventWiringFromWorkspace$1(workspace) {
|
|
63046
|
+
const wiring = [];
|
|
63047
|
+
const pushAll = (layout) => {
|
|
63048
|
+
if (!Array.isArray(layout)) return;
|
|
63049
|
+
for (const entry of extractEventWiring$1(layout)) wiring.push(entry);
|
|
63050
|
+
};
|
|
63051
|
+
|
|
63052
|
+
pushAll(workspace?.layout);
|
|
63053
|
+
pushAll(workspace?.sidebarLayout);
|
|
63054
|
+
if (Array.isArray(workspace?.pages)) {
|
|
63055
|
+
for (const page of workspace.pages) pushAll(page?.layout);
|
|
63056
|
+
}
|
|
63057
|
+
|
|
63058
|
+
return wiring;
|
|
63059
|
+
}
|
|
63060
|
+
|
|
63036
63061
|
var dashboardConfigUtils$1 = {
|
|
63037
63062
|
collectComponentNames: collectComponentNames$1,
|
|
63038
63063
|
collectComponentNamesFromWorkspace: collectComponentNamesFromWorkspace$1,
|
|
63039
63064
|
extractEventWiring: extractEventWiring$1,
|
|
63065
|
+
extractEventWiringFromWorkspace: extractEventWiringFromWorkspace$1,
|
|
63040
63066
|
buildWidgetDependencies: buildWidgetDependencies$1,
|
|
63041
63067
|
buildProviderRequirements: buildProviderRequirements$1,
|
|
63042
63068
|
applyEventWiringToLayout: applyEventWiringToLayout$1,
|
|
@@ -63787,6 +63813,7 @@ const {
|
|
|
63787
63813
|
collectComponentNames,
|
|
63788
63814
|
collectComponentNamesFromWorkspace,
|
|
63789
63815
|
extractEventWiring,
|
|
63816
|
+
extractEventWiringFromWorkspace,
|
|
63790
63817
|
buildWidgetDependencies,
|
|
63791
63818
|
buildProviderRequirements,
|
|
63792
63819
|
applyEventWiringToLayout,
|
|
@@ -63839,9 +63866,11 @@ async function exportDashboardConfig$1(
|
|
|
63839
63866
|
|
|
63840
63867
|
const layout = workspace.layout || [];
|
|
63841
63868
|
|
|
63842
|
-
// 2. Collect components, extract wiring, resolve deps
|
|
63843
|
-
|
|
63844
|
-
|
|
63869
|
+
// 2. Collect components, extract wiring, resolve deps — walk main
|
|
63870
|
+
// layout, every page, and the sidebar so multi-page / sidebar
|
|
63871
|
+
// dashboards export the full picture.
|
|
63872
|
+
const componentNames = collectComponentNamesFromWorkspace(workspace);
|
|
63873
|
+
const eventWiring = extractEventWiringFromWorkspace(workspace);
|
|
63845
63874
|
const widgets = buildWidgetDependencies(componentNames, widgetRegistry);
|
|
63846
63875
|
const providers = buildProviderRequirements(componentNames, widgetRegistry);
|
|
63847
63876
|
|
|
@@ -63863,6 +63892,16 @@ async function exportDashboardConfig$1(
|
|
|
63863
63892
|
label: workspace.label || workspace.name,
|
|
63864
63893
|
version: workspace.version || 1,
|
|
63865
63894
|
layout,
|
|
63895
|
+
...(Array.isArray(workspace.pages) && workspace.pages.length > 0
|
|
63896
|
+
? { pages: workspace.pages, activePageId: workspace.activePageId }
|
|
63897
|
+
: {}),
|
|
63898
|
+
...(Array.isArray(workspace.sidebarLayout) &&
|
|
63899
|
+
workspace.sidebarLayout.length > 0
|
|
63900
|
+
? {
|
|
63901
|
+
sidebarLayout: workspace.sidebarLayout,
|
|
63902
|
+
sidebarEnabled: workspace.sidebarEnabled !== false,
|
|
63903
|
+
}
|
|
63904
|
+
: {}),
|
|
63866
63905
|
menuId: workspace.menuId || 1,
|
|
63867
63906
|
},
|
|
63868
63907
|
widgets,
|
|
@@ -65072,9 +65111,9 @@ async function prepareDashboardForPublish$1(
|
|
|
65072
65111
|
|
|
65073
65112
|
const layout = workspace.layout || [];
|
|
65074
65113
|
|
|
65075
|
-
// 3. Build the dashboard config
|
|
65076
|
-
const componentNames =
|
|
65077
|
-
const eventWiring =
|
|
65114
|
+
// 3. Build the dashboard config — walk main + pages + sidebar
|
|
65115
|
+
const componentNames = collectComponentNamesFromWorkspace(workspace);
|
|
65116
|
+
const eventWiring = extractEventWiringFromWorkspace(workspace);
|
|
65078
65117
|
|
|
65079
65118
|
// Build componentConfigs map from renderer-supplied data
|
|
65080
65119
|
// This resolves scope/packageName for built-in widgets that aren't in widgetRegistry
|
|
@@ -65110,6 +65149,16 @@ async function prepareDashboardForPublish$1(
|
|
|
65110
65149
|
label: workspace.label || workspace.name,
|
|
65111
65150
|
version: workspace.version || 1,
|
|
65112
65151
|
layout,
|
|
65152
|
+
...(Array.isArray(workspace.pages) && workspace.pages.length > 0
|
|
65153
|
+
? { pages: workspace.pages, activePageId: workspace.activePageId }
|
|
65154
|
+
: {}),
|
|
65155
|
+
...(Array.isArray(workspace.sidebarLayout) &&
|
|
65156
|
+
workspace.sidebarLayout.length > 0
|
|
65157
|
+
? {
|
|
65158
|
+
sidebarLayout: workspace.sidebarLayout,
|
|
65159
|
+
sidebarEnabled: workspace.sidebarEnabled !== false,
|
|
65160
|
+
}
|
|
65161
|
+
: {}),
|
|
65113
65162
|
menuId: workspace.menuId || 1,
|
|
65114
65163
|
},
|
|
65115
65164
|
widgets,
|
|
@@ -65446,8 +65495,7 @@ function getDashboardPublishPreview$1(appId, workspaceId, widgetRegistry = null)
|
|
|
65446
65495
|
return { success: false, error: `Workspace not found: ${workspaceId}` };
|
|
65447
65496
|
}
|
|
65448
65497
|
|
|
65449
|
-
const
|
|
65450
|
-
const componentNames = collectComponentNames(layout);
|
|
65498
|
+
const componentNames = collectComponentNamesFromWorkspace(workspace);
|
|
65451
65499
|
const widgets = buildWidgetDependencies(componentNames, widgetRegistry);
|
|
65452
65500
|
|
|
65453
65501
|
return {
|