@trops/dash-core 0.1.234 → 0.1.237
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 +37 -2
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +169 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +169 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -29114,9 +29114,14 @@ function extractEventWiring$1(layout) {
|
|
|
29114
29114
|
*
|
|
29115
29115
|
* @param {string[]} componentNames - Widget component names from layout
|
|
29116
29116
|
* @param {Object} widgetRegistry - WidgetRegistry instance (optional, needs getWidgets())
|
|
29117
|
+
* @param {Object} componentConfigs - Map of component name → .dash.js config (optional, for built-in widgets)
|
|
29117
29118
|
* @returns {Array} Widget dependency objects for the dashboard config
|
|
29118
29119
|
*/
|
|
29119
|
-
function buildWidgetDependencies$1(
|
|
29120
|
+
function buildWidgetDependencies$1(
|
|
29121
|
+
componentNames,
|
|
29122
|
+
widgetRegistry = null,
|
|
29123
|
+
componentConfigs = null,
|
|
29124
|
+
) {
|
|
29120
29125
|
const widgets = [];
|
|
29121
29126
|
const seen = new Set();
|
|
29122
29127
|
|
|
@@ -29153,6 +29158,21 @@ function buildWidgetDependencies$1(componentNames, widgetRegistry = null) {
|
|
|
29153
29158
|
}
|
|
29154
29159
|
}
|
|
29155
29160
|
|
|
29161
|
+
// Fallback: resolve from component configs (built-in widgets)
|
|
29162
|
+
if (componentConfigs && componentConfigs[name]) {
|
|
29163
|
+
const config = componentConfigs[name];
|
|
29164
|
+
if (!scope && config.scope) scope = config.scope;
|
|
29165
|
+
if ((!packageName || packageName === name) && config.packageName)
|
|
29166
|
+
packageName = config.packageName;
|
|
29167
|
+
if (config.id && !scope) {
|
|
29168
|
+
const idParts = config.id.split(".");
|
|
29169
|
+
if (idParts.length === 3) {
|
|
29170
|
+
scope = idParts[0];
|
|
29171
|
+
packageName = idParts[1];
|
|
29172
|
+
}
|
|
29173
|
+
}
|
|
29174
|
+
}
|
|
29175
|
+
|
|
29156
29176
|
const id =
|
|
29157
29177
|
scope && packageName && widgetName
|
|
29158
29178
|
? `${scope}.${packageName}.${widgetName}`
|
|
@@ -33384,7 +33404,22 @@ async function prepareDashboardForPublish$1(
|
|
|
33384
33404
|
// 3. Build the dashboard config (reuse export logic)
|
|
33385
33405
|
const componentNames = collectComponentNames(layout);
|
|
33386
33406
|
const eventWiring = extractEventWiring(layout);
|
|
33387
|
-
|
|
33407
|
+
|
|
33408
|
+
// Build componentConfigs map from renderer-supplied data
|
|
33409
|
+
// This resolves scope/packageName for built-in widgets that aren't in widgetRegistry
|
|
33410
|
+
let componentConfigs = null;
|
|
33411
|
+
if (options.componentConfigs) {
|
|
33412
|
+
componentConfigs = {};
|
|
33413
|
+
for (const [key, config] of Object.entries(options.componentConfigs)) {
|
|
33414
|
+
componentConfigs[key] = config;
|
|
33415
|
+
}
|
|
33416
|
+
}
|
|
33417
|
+
|
|
33418
|
+
const widgets = buildWidgetDependencies(
|
|
33419
|
+
componentNames,
|
|
33420
|
+
widgetRegistry,
|
|
33421
|
+
componentConfigs,
|
|
33422
|
+
);
|
|
33388
33423
|
const providers = buildProviderRequirements(componentNames, widgetRegistry);
|
|
33389
33424
|
|
|
33390
33425
|
const dashboardConfig = applyDefaults({
|