@trops/dash-core 0.1.415 → 0.1.416
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 +116 -14
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +29 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +70 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -54366,6 +54366,24 @@ function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r
|
|
|
54366
54366
|
function _arrayLikeToArray$5(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
54367
54367
|
var ALL_WIDGETS_ID = "__ALL__";
|
|
54368
54368
|
|
|
54369
|
+
/**
|
|
54370
|
+
* Build the scoped registry identifier for a widget. Surfaces the
|
|
54371
|
+
* `scope.packageName.component` triple in the settings UI so users
|
|
54372
|
+
* can verify what a widget's registry identity is — useful when
|
|
54373
|
+
* diagnosing dashboard-install warnings ("why didn't this widget
|
|
54374
|
+
* install?" → scoped id in the warning vs scoped id shown here).
|
|
54375
|
+
* Returns just the component name when scope/package metadata is
|
|
54376
|
+
* unavailable (e.g. bare built-ins).
|
|
54377
|
+
*/
|
|
54378
|
+
function buildScopedId(widget) {
|
|
54379
|
+
if (!(widget !== null && widget !== void 0 && widget.component)) return null;
|
|
54380
|
+
var scope = widget.scope ? String(widget.scope).replace(/^@/, "") : null;
|
|
54381
|
+
var pkg = widget.packageName ? scope ? String(widget.packageName).replace(new RegExp("^@?".concat(scope, "/")), "") : String(widget.packageName).replace(/^@/, "") : null;
|
|
54382
|
+
if (scope && pkg) return "".concat(scope, ".").concat(pkg, ".").concat(widget.component);
|
|
54383
|
+
if (pkg) return "".concat(pkg, ".").concat(widget.component);
|
|
54384
|
+
return widget.component;
|
|
54385
|
+
}
|
|
54386
|
+
|
|
54369
54387
|
/**
|
|
54370
54388
|
* WidgetsTab
|
|
54371
54389
|
*
|
|
@@ -54413,7 +54431,12 @@ var WidgetsTab = function WidgetsTab(_ref) {
|
|
|
54413
54431
|
displayName: item.name || cfg.name || cfg.displayName || item.component,
|
|
54414
54432
|
section: section,
|
|
54415
54433
|
userConfig: cfg.userConfig || {},
|
|
54416
|
-
userPrefs: item.userPrefs || {}
|
|
54434
|
+
userPrefs: item.userPrefs || {},
|
|
54435
|
+
// Identity fields for the registry-identifier label. Prefer
|
|
54436
|
+
// values from the widget's component manager entry since the
|
|
54437
|
+
// layout item itself often doesn't carry scope/packageName.
|
|
54438
|
+
scope: cfg.scope || item.scope || null,
|
|
54439
|
+
packageName: cfg.packageName || cfg.name || item.packageName || null
|
|
54417
54440
|
});
|
|
54418
54441
|
};
|
|
54419
54442
|
};
|
|
@@ -54581,6 +54604,7 @@ function SingleWidgetPane(_ref4) {
|
|
|
54581
54604
|
effectivePrefs = _ref4.effectivePrefs,
|
|
54582
54605
|
onFieldChange = _ref4.onFieldChange;
|
|
54583
54606
|
var hasFields = Object.keys(widget.userConfig).length > 0;
|
|
54607
|
+
var scopedId = buildScopedId(widget);
|
|
54584
54608
|
return /*#__PURE__*/jsxs("div", {
|
|
54585
54609
|
children: [/*#__PURE__*/jsxs("div", {
|
|
54586
54610
|
className: "mb-3",
|
|
@@ -54590,6 +54614,10 @@ function SingleWidgetPane(_ref4) {
|
|
|
54590
54614
|
}), /*#__PURE__*/jsxs("div", {
|
|
54591
54615
|
className: "text-xs text-gray-500",
|
|
54592
54616
|
children: [widget.component, " \xB7 ", widget.section]
|
|
54617
|
+
}), scopedId && scopedId !== widget.component && /*#__PURE__*/jsx("code", {
|
|
54618
|
+
className: "block mt-1 text-[11px] text-gray-500 font-mono truncate",
|
|
54619
|
+
title: scopedId,
|
|
54620
|
+
children: scopedId
|
|
54593
54621
|
})]
|
|
54594
54622
|
}), hasFields ? /*#__PURE__*/jsx(PanelEditForm, {
|
|
54595
54623
|
userConfig: widget.userConfig,
|