@trops/dash-core 0.1.432 → 0.1.433
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/index.esm.js +152 -80
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +111 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8967,7 +8967,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
8967
8967
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
8968
8968
|
|
|
8969
8969
|
var keys = objectKeys$2;
|
|
8970
|
-
var hasSymbols$
|
|
8970
|
+
var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
8971
8971
|
|
|
8972
8972
|
var toStr$4 = Object.prototype.toString;
|
|
8973
8973
|
var concat = Array.prototype.concat;
|
|
@@ -9000,7 +9000,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
|
|
|
9000
9000
|
var defineProperties$1 = function (object, map) {
|
|
9001
9001
|
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
9002
9002
|
var props = keys(map);
|
|
9003
|
-
if (hasSymbols$
|
|
9003
|
+
if (hasSymbols$4) {
|
|
9004
9004
|
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
9005
9005
|
}
|
|
9006
9006
|
for (var i = 0; i < props.length; i += 1) {
|
|
@@ -9066,11 +9066,11 @@ var sign$1 = function sign(number) {
|
|
|
9066
9066
|
};
|
|
9067
9067
|
|
|
9068
9068
|
var shams$1;
|
|
9069
|
-
var hasRequiredShams;
|
|
9069
|
+
var hasRequiredShams$1;
|
|
9070
9070
|
|
|
9071
|
-
function requireShams () {
|
|
9072
|
-
if (hasRequiredShams) return shams$1;
|
|
9073
|
-
hasRequiredShams = 1;
|
|
9071
|
+
function requireShams$1 () {
|
|
9072
|
+
if (hasRequiredShams$1) return shams$1;
|
|
9073
|
+
hasRequiredShams$1 = 1;
|
|
9074
9074
|
|
|
9075
9075
|
/** @type {import('./shams')} */
|
|
9076
9076
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
@@ -9119,10 +9119,10 @@ function requireShams () {
|
|
|
9119
9119
|
}
|
|
9120
9120
|
|
|
9121
9121
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
9122
|
-
var hasSymbolSham = requireShams();
|
|
9122
|
+
var hasSymbolSham = requireShams$1();
|
|
9123
9123
|
|
|
9124
9124
|
/** @type {import('.')} */
|
|
9125
|
-
var hasSymbols$
|
|
9125
|
+
var hasSymbols$3 = function hasNativeSymbols() {
|
|
9126
9126
|
if (typeof origSymbol !== 'function') { return false; }
|
|
9127
9127
|
if (typeof Symbol !== 'function') { return false; }
|
|
9128
9128
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -9426,7 +9426,7 @@ var ThrowTypeError = $gOPD$1
|
|
|
9426
9426
|
}())
|
|
9427
9427
|
: throwTypeError;
|
|
9428
9428
|
|
|
9429
|
-
var hasSymbols$
|
|
9429
|
+
var hasSymbols$2 = hasSymbols$3();
|
|
9430
9430
|
|
|
9431
9431
|
var getProto$2 = getProto$3;
|
|
9432
9432
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
@@ -9444,7 +9444,7 @@ var INTRINSICS = {
|
|
|
9444
9444
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
9445
9445
|
'%Array%': Array,
|
|
9446
9446
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
9447
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
9447
|
+
'%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
|
|
9448
9448
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
9449
9449
|
'%AsyncFunction%': needsEval,
|
|
9450
9450
|
'%AsyncGenerator%': needsEval,
|
|
@@ -9475,10 +9475,10 @@ var INTRINSICS = {
|
|
|
9475
9475
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
9476
9476
|
'%isFinite%': isFinite,
|
|
9477
9477
|
'%isNaN%': isNaN,
|
|
9478
|
-
'%IteratorPrototype%': hasSymbols$
|
|
9478
|
+
'%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
|
|
9479
9479
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
9480
9480
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
9481
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
9481
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
|
|
9482
9482
|
'%Math%': Math,
|
|
9483
9483
|
'%Number%': Number,
|
|
9484
9484
|
'%Object%': $Object$2,
|
|
@@ -9492,11 +9492,11 @@ var INTRINSICS = {
|
|
|
9492
9492
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
9493
9493
|
'%RegExp%': RegExp,
|
|
9494
9494
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
9495
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
9495
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
|
|
9496
9496
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
9497
9497
|
'%String%': String,
|
|
9498
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
9499
|
-
'%Symbol%': hasSymbols$
|
|
9498
|
+
'%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
|
|
9499
|
+
'%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
|
|
9500
9500
|
'%SyntaxError%': $SyntaxError$1,
|
|
9501
9501
|
'%ThrowTypeError%': ThrowTypeError,
|
|
9502
9502
|
'%TypedArray%': TypedArray,
|
|
@@ -9849,12 +9849,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
|
|
|
9849
9849
|
|
|
9850
9850
|
// modified from https://github.com/es-shims/es6-shim
|
|
9851
9851
|
var objectKeys$1 = objectKeys$2;
|
|
9852
|
-
var hasSymbols$
|
|
9852
|
+
var hasSymbols$1 = requireShams$1()();
|
|
9853
9853
|
var callBound$h = callBound$i;
|
|
9854
9854
|
var $Object$1 = esObjectAtoms;
|
|
9855
9855
|
var $push = callBound$h('Array.prototype.push');
|
|
9856
9856
|
var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
|
|
9857
|
-
var originalGetSymbols = hasSymbols$
|
|
9857
|
+
var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
|
|
9858
9858
|
|
|
9859
9859
|
// eslint-disable-next-line no-unused-vars
|
|
9860
9860
|
var implementation$8 = function assign(target, source1) {
|
|
@@ -9868,7 +9868,7 @@ var implementation$8 = function assign(target, source1) {
|
|
|
9868
9868
|
|
|
9869
9869
|
// step 3.a.ii:
|
|
9870
9870
|
var keys = objectKeys$1(from);
|
|
9871
|
-
var getSymbols = hasSymbols$
|
|
9871
|
+
var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
|
|
9872
9872
|
if (getSymbols) {
|
|
9873
9873
|
var syms = getSymbols(from);
|
|
9874
9874
|
for (var j = 0; j < syms.length; ++j) {
|
|
@@ -10165,14 +10165,23 @@ var regexp_prototype_flags = flagsBound;
|
|
|
10165
10165
|
|
|
10166
10166
|
var esGetIterator = {exports: {}};
|
|
10167
10167
|
|
|
10168
|
-
var
|
|
10168
|
+
var shams;
|
|
10169
|
+
var hasRequiredShams;
|
|
10169
10170
|
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
};
|
|
10171
|
+
function requireShams () {
|
|
10172
|
+
if (hasRequiredShams) return shams;
|
|
10173
|
+
hasRequiredShams = 1;
|
|
10174
10174
|
|
|
10175
|
-
var
|
|
10175
|
+
var hasSymbols = requireShams$1();
|
|
10176
|
+
|
|
10177
|
+
/** @type {import('.')} */
|
|
10178
|
+
shams = function hasToStringTagShams() {
|
|
10179
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
10180
|
+
};
|
|
10181
|
+
return shams;
|
|
10182
|
+
}
|
|
10183
|
+
|
|
10184
|
+
var hasToStringTag$7 = requireShams()();
|
|
10176
10185
|
var callBound$f = callBound$i;
|
|
10177
10186
|
|
|
10178
10187
|
var $toString$7 = callBound$f('Object.prototype.toString');
|
|
@@ -11209,7 +11218,7 @@ var tryStringObject = function tryStringObject(value) {
|
|
|
11209
11218
|
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
11210
11219
|
var $toString$6 = callBound$c('Object.prototype.toString');
|
|
11211
11220
|
var strClass = '[object String]';
|
|
11212
|
-
var hasToStringTag$6 =
|
|
11221
|
+
var hasToStringTag$6 = requireShams()();
|
|
11213
11222
|
|
|
11214
11223
|
/** @type {import('.')} */
|
|
11215
11224
|
var isString$2 = function isString(value) {
|
|
@@ -11325,7 +11334,7 @@ var isSet$2 = exported$1 || function isSet(x) {
|
|
|
11325
11334
|
var isArguments$1 = isArguments$2;
|
|
11326
11335
|
var getStopIterationIterator = stopIterationIterator;
|
|
11327
11336
|
|
|
11328
|
-
if (hasSymbols$
|
|
11337
|
+
if (hasSymbols$3() || requireShams$1()()) {
|
|
11329
11338
|
var $iterator = Symbol.iterator;
|
|
11330
11339
|
// Symbol is available natively or shammed
|
|
11331
11340
|
// natively:
|
|
@@ -11614,7 +11623,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
|
|
|
11614
11623
|
/** @type {(value: unknown) => string} */
|
|
11615
11624
|
var toStr$2 = callBound$9('Object.prototype.toString');
|
|
11616
11625
|
var dateClass = '[object Date]';
|
|
11617
|
-
var hasToStringTag$5 =
|
|
11626
|
+
var hasToStringTag$5 = requireShams()();
|
|
11618
11627
|
|
|
11619
11628
|
/** @type {import('.')} */
|
|
11620
11629
|
var isDateObject = function isDateObject(value) {
|
|
@@ -11625,7 +11634,7 @@ var isDateObject = function isDateObject(value) {
|
|
|
11625
11634
|
};
|
|
11626
11635
|
|
|
11627
11636
|
var callBound$8 = callBound$i;
|
|
11628
|
-
var hasToStringTag$4 =
|
|
11637
|
+
var hasToStringTag$4 = requireShams()();
|
|
11629
11638
|
var hasOwn = hasown;
|
|
11630
11639
|
var gOPD$1 = gopd$1;
|
|
11631
11640
|
|
|
@@ -11730,7 +11739,7 @@ var tryNumberObject = function tryNumberObject(value) {
|
|
|
11730
11739
|
};
|
|
11731
11740
|
var $toString$3 = callBound$6('Object.prototype.toString');
|
|
11732
11741
|
var numClass = '[object Number]';
|
|
11733
|
-
var hasToStringTag$3 =
|
|
11742
|
+
var hasToStringTag$3 = requireShams()();
|
|
11734
11743
|
|
|
11735
11744
|
/** @type {import('.')} */
|
|
11736
11745
|
var isNumberObject = function isNumberObject(value) {
|
|
@@ -11757,7 +11766,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
|
|
|
11757
11766
|
}
|
|
11758
11767
|
};
|
|
11759
11768
|
var boolClass = '[object Boolean]';
|
|
11760
|
-
var hasToStringTag$2 =
|
|
11769
|
+
var hasToStringTag$2 = requireShams()();
|
|
11761
11770
|
|
|
11762
11771
|
/** @type {import('.')} */
|
|
11763
11772
|
var isBooleanObject = function isBoolean(value) {
|
|
@@ -11799,7 +11808,7 @@ function requireSafeRegexTest () {
|
|
|
11799
11808
|
|
|
11800
11809
|
var callBound$4 = callBound$i;
|
|
11801
11810
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
11802
|
-
var hasSymbols = hasSymbols$
|
|
11811
|
+
var hasSymbols = hasSymbols$3();
|
|
11803
11812
|
var safeRegexTest = requireSafeRegexTest();
|
|
11804
11813
|
|
|
11805
11814
|
if (hasSymbols) {
|
|
@@ -12245,7 +12254,7 @@ var gOPD = gopd$1;
|
|
|
12245
12254
|
var getProto = getProto$3;
|
|
12246
12255
|
|
|
12247
12256
|
var $toString = callBound$2('Object.prototype.toString');
|
|
12248
|
-
var hasToStringTag =
|
|
12257
|
+
var hasToStringTag = requireShams()();
|
|
12249
12258
|
|
|
12250
12259
|
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
12251
12260
|
var typedArrays = availableTypedArrays();
|
|
@@ -18036,7 +18045,6 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
18036
18045
|
padding: true,
|
|
18037
18046
|
height: "h-full",
|
|
18038
18047
|
children: filteredWidgets.map(function (widget) {
|
|
18039
|
-
var _widget$providers;
|
|
18040
18048
|
return /*#__PURE__*/jsx(MenuItem3, {
|
|
18041
18049
|
onClick: function onClick() {
|
|
18042
18050
|
return handleWidgetSelect(widget);
|
|
@@ -18056,15 +18064,22 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
18056
18064
|
}), widget.description && /*#__PURE__*/jsx("div", {
|
|
18057
18065
|
className: "text-xs opacity-50 truncate",
|
|
18058
18066
|
children: widget.description
|
|
18059
|
-
}), (
|
|
18060
|
-
|
|
18061
|
-
|
|
18062
|
-
|
|
18063
|
-
|
|
18064
|
-
|
|
18065
|
-
|
|
18066
|
-
|
|
18067
|
-
|
|
18067
|
+
}), function () {
|
|
18068
|
+
// Same defensive null-safe iteration as WidgetSidebar:
|
|
18069
|
+
// a sparse `providers` array (null entries from a
|
|
18070
|
+
// malformed `.dash.js`) used to crash the chip render.
|
|
18071
|
+
var provs = getUserConfigurableProviders(widget.providers);
|
|
18072
|
+
if (provs.length === 0) return null;
|
|
18073
|
+
return /*#__PURE__*/jsx("div", {
|
|
18074
|
+
className: "flex flex-wrap gap-1 mt-0.5",
|
|
18075
|
+
children: provs.map(function (p) {
|
|
18076
|
+
return /*#__PURE__*/jsx("span", {
|
|
18077
|
+
className: "text-[10px] px-1.5 py-0.5 rounded bg-blue-500/20 text-blue-300",
|
|
18078
|
+
children: p.type
|
|
18079
|
+
}, p.type);
|
|
18080
|
+
})
|
|
18081
|
+
});
|
|
18082
|
+
}()]
|
|
18068
18083
|
}), /*#__PURE__*/jsxs("div", {
|
|
18069
18084
|
className: "flex items-center gap-1.5 flex-shrink-0",
|
|
18070
18085
|
children: [installedPackageNames.has(widget.packageName) && /*#__PURE__*/jsx("span", {
|
|
@@ -26668,7 +26683,11 @@ function renderComponent(component, id) {
|
|
|
26668
26683
|
// Check if widget exists before attempting render —
|
|
26669
26684
|
// WidgetFactory.render() always returns a React element (truthy),
|
|
26670
26685
|
// so the old ternary fallback could never fire.
|
|
26671
|
-
|
|
26686
|
+
// Pass `params` (the layout item) so `packageId` /
|
|
26687
|
+
// `_sourcePackage` can disambiguate when a legacy layout
|
|
26688
|
+
// references a bare component name and multiple installed
|
|
26689
|
+
// packages register a widget with the same trailing name.
|
|
26690
|
+
if (!isWidgetResolvable(component, params)) {
|
|
26672
26691
|
return /*#__PURE__*/jsx(WidgetNotFound, {
|
|
26673
26692
|
component: component
|
|
26674
26693
|
});
|
|
@@ -27473,20 +27492,25 @@ function addChildToLayoutItem(childComponent, layoutItem, workspace) {
|
|
|
27473
27492
|
}
|
|
27474
27493
|
|
|
27475
27494
|
/**
|
|
27476
|
-
* Check if a widget component key is resolvable in ComponentManager
|
|
27495
|
+
* Check if a widget component key is resolvable in ComponentManager.
|
|
27496
|
+
* Routes through `ComponentManager.resolve` so a legacy bare component
|
|
27497
|
+
* key (e.g. `"ProspectWorkspace"`) finds its registered scoped form
|
|
27498
|
+
* (`"ai-built.pipeline.ProspectWorkspace"`). Without this routing the
|
|
27499
|
+
* function would return false for every legacy-layout widget after the
|
|
27500
|
+
* scoped-IDs migration, and the renderer would show `WidgetNotFound`
|
|
27501
|
+
* for working dashboards.
|
|
27502
|
+
*
|
|
27477
27503
|
* @param {string} componentKey the component key to check
|
|
27504
|
+
* @param {object} [data] the layout item — used for `packageId`
|
|
27505
|
+
* disambiguation when multiple registered
|
|
27506
|
+
* widgets share the same bare name
|
|
27478
27507
|
* @returns {boolean} true if the widget can be rendered
|
|
27479
27508
|
*/
|
|
27480
|
-
function isWidgetResolvable(componentKey) {
|
|
27509
|
+
function isWidgetResolvable(componentKey, data) {
|
|
27481
27510
|
// Layout containers are always resolvable (handled specially by WidgetFactory)
|
|
27482
27511
|
if (ComponentManager.isLayoutContainer(componentKey)) return true;
|
|
27483
|
-
var
|
|
27484
|
-
|
|
27485
|
-
// Exact key match (scoped id)
|
|
27486
|
-
if (m[componentKey] && typeof m[componentKey].component === "function") {
|
|
27487
|
-
return true;
|
|
27488
|
-
}
|
|
27489
|
-
return false;
|
|
27512
|
+
var config = ComponentManager.resolve(componentKey, data);
|
|
27513
|
+
return !!(config && typeof config.component === "function");
|
|
27490
27514
|
}
|
|
27491
27515
|
|
|
27492
27516
|
// export {
|
|
@@ -31429,31 +31453,33 @@ function bareComponentName(idOrName) {
|
|
|
31429
31453
|
return parts[parts.length - 1] || "";
|
|
31430
31454
|
}
|
|
31431
31455
|
|
|
31432
|
-
var _componentMap = {};
|
|
31433
|
-
|
|
31434
31456
|
/**
|
|
31435
|
-
* Resolve
|
|
31457
|
+
* Resolve a component name to a registry key. Returns null if no
|
|
31436
31458
|
* match exists.
|
|
31437
31459
|
*
|
|
31460
|
+
* Pure function — depends only on the passed-in `componentMap` and
|
|
31461
|
+
* `data`. Lives outside ComponentManager so it can be tested without
|
|
31462
|
+
* pulling in the full Component/Layout import chain (and so other
|
|
31463
|
+
* call sites can route through it without circular deps).
|
|
31464
|
+
*
|
|
31438
31465
|
* Lookup order (the LAYOUT ITEM is the source of truth):
|
|
31439
31466
|
* 1. EXACT match on `component` — covers the new scoped form
|
|
31440
|
-
* (`scope.package.X`) and any legacy `.dash.js` that already
|
|
31441
|
-
* `config.id` to a scoped value.
|
|
31467
|
+
* (`scope.package.X`) and any legacy `.dash.js` that already
|
|
31468
|
+
* set `config.id` to a scoped value.
|
|
31442
31469
|
* 2. If `component` is bare (no dots) AND we have a packageId hint
|
|
31443
31470
|
* on the layout item, build the scoped id and try that.
|
|
31444
31471
|
* 3. Bare-name fallback: scan the map for any key ending in
|
|
31445
31472
|
* `.${component}`. If exactly one matches, use it. If multiple
|
|
31446
|
-
* match (the collision case), prefer the one matching the
|
|
31447
|
-
* item's `packageId` / `_sourcePackage`; otherwise fall
|
|
31448
|
-
* to the first match (deterministic, but also logs a
|
|
31449
|
-
* callers can spot the ambiguity).
|
|
31473
|
+
* match (the collision case), prefer the one matching the
|
|
31474
|
+
* layout item's `packageId` / `_sourcePackage`; otherwise fall
|
|
31475
|
+
* through to the first match (deterministic, but also logs a
|
|
31476
|
+
* warning so callers can spot the ambiguity).
|
|
31450
31477
|
*
|
|
31451
|
-
* Step (3) is the back-compat path for layouts authored before
|
|
31452
|
-
* registration landed. New layouts ALWAYS resolve via step (1)
|
|
31453
|
-
* `component` field is already scoped.
|
|
31478
|
+
* Step (3) is the back-compat path for layouts authored before
|
|
31479
|
+
* scoped registration landed. New layouts ALWAYS resolve via step (1).
|
|
31454
31480
|
*/
|
|
31455
31481
|
function resolveComponentKey(componentMap, component, data) {
|
|
31456
|
-
if (!component) return null;
|
|
31482
|
+
if (!componentMap || !component) return null;
|
|
31457
31483
|
if (component in componentMap) return component;
|
|
31458
31484
|
if (typeof component !== "string") return null;
|
|
31459
31485
|
if (component.includes(".")) return null;
|
|
@@ -31474,6 +31500,8 @@ function resolveComponentKey(componentMap, component, data) {
|
|
|
31474
31500
|
}
|
|
31475
31501
|
return matches[0];
|
|
31476
31502
|
}
|
|
31503
|
+
|
|
31504
|
+
var _componentMap = {};
|
|
31477
31505
|
var _containerComponent = null;
|
|
31478
31506
|
var _gridContainerComponent = null;
|
|
31479
31507
|
var ComponentManager = {
|
|
@@ -31509,6 +31537,25 @@ var ComponentManager = {
|
|
|
31509
31537
|
componentMap: function componentMap() {
|
|
31510
31538
|
return _componentMap;
|
|
31511
31539
|
},
|
|
31540
|
+
/**
|
|
31541
|
+
* Resolve a component name to its registered config — single source
|
|
31542
|
+
* of truth for every render-path lookup. Routes through
|
|
31543
|
+
* `resolveComponentKey` so legacy bare names (`"ProspectWorkspace"`)
|
|
31544
|
+
* still find their registered scoped counterpart
|
|
31545
|
+
* (`"ai-built.pipeline.ProspectWorkspace"`). Returns null when the
|
|
31546
|
+
* widget isn't registered. Pass the layout item as `data` to use
|
|
31547
|
+
* its `packageId` / `_sourcePackage` for disambiguation.
|
|
31548
|
+
*
|
|
31549
|
+
* @param {string} component
|
|
31550
|
+
* @param {object} [data]
|
|
31551
|
+
* @returns {object|null} the live registered config, or null
|
|
31552
|
+
*/
|
|
31553
|
+
resolve: function resolve(component, data) {
|
|
31554
|
+
var m = _componentMap;
|
|
31555
|
+
if (!m) return null;
|
|
31556
|
+
var key = resolveComponentKey(m, component, data);
|
|
31557
|
+
return key ? m[key] || null : null;
|
|
31558
|
+
},
|
|
31512
31559
|
/**
|
|
31513
31560
|
* The method for registering the widget into the Dashboard application
|
|
31514
31561
|
* This is a requirement for the widget to be included into the Dash
|
|
@@ -51415,14 +51462,17 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
51415
51462
|
});
|
|
51416
51463
|
}, []);
|
|
51417
51464
|
|
|
51418
|
-
// Collect all widget instances with notifications from workspaces
|
|
51465
|
+
// Collect all widget instances with notifications from workspaces.
|
|
51466
|
+
// Route through `ComponentManager.resolve` so a legacy layout
|
|
51467
|
+
// referencing a bare component name still finds its registered
|
|
51468
|
+
// scoped form (post-v0.1.432). Direct `componentMap[item.component]`
|
|
51469
|
+
// returns undefined for bare names after the migration.
|
|
51419
51470
|
var widgetInstances = [];
|
|
51420
|
-
var componentMap = ComponentManager.componentMap() || {};
|
|
51421
51471
|
workspaces.forEach(function (ws) {
|
|
51422
51472
|
var items = flattenLayout(ws.layout);
|
|
51423
51473
|
items.forEach(function (item) {
|
|
51424
51474
|
var _config$notifications;
|
|
51425
|
-
var config =
|
|
51475
|
+
var config = ComponentManager.resolve(item.component, item);
|
|
51426
51476
|
if ((config === null || config === void 0 || (_config$notifications = config.notifications) === null || _config$notifications === void 0 ? void 0 : _config$notifications.length) > 0) {
|
|
51427
51477
|
var _item$userPrefs;
|
|
51428
51478
|
widgetInstances.push({
|
|
@@ -53639,7 +53689,13 @@ var DraggableWidgetItem = function DraggableWidgetItem(_ref) {
|
|
|
53639
53689
|
_useDrag2 = _slicedToArray(_useDrag, 2),
|
|
53640
53690
|
isDragging = _useDrag2[0].isDragging,
|
|
53641
53691
|
drag = _useDrag2[1];
|
|
53642
|
-
|
|
53692
|
+
|
|
53693
|
+
// Route through getUserConfigurableProviders — drops the `api`
|
|
53694
|
+
// class AND null/undefined entries that occasionally appear in
|
|
53695
|
+
// sparse `widget.providers` arrays. Without this, a single null
|
|
53696
|
+
// slot crashes the whole sidebar with `Cannot read properties of
|
|
53697
|
+
// null (reading 'type')`.
|
|
53698
|
+
var providerTypes = getUserConfigurableProviders(widget.providers).map(function (p) {
|
|
53643
53699
|
return p.type;
|
|
53644
53700
|
});
|
|
53645
53701
|
var eventCount = (widget.events || []).length;
|
|
@@ -54213,12 +54269,18 @@ var WidgetSidebar = function WidgetSidebar(_ref4) {
|
|
|
54213
54269
|
}))).sort();
|
|
54214
54270
|
}, [allWidgets]);
|
|
54215
54271
|
|
|
54216
|
-
// Derive unique provider types for dropdown
|
|
54272
|
+
// Derive unique provider types for the filter dropdown. Route
|
|
54273
|
+
// through getUserConfigurableProviders so a single null entry in
|
|
54274
|
+
// any widget's `providers` array doesn't crash the whole sidebar
|
|
54275
|
+
// (it filters non-objects AND drops the `api` provider class that
|
|
54276
|
+
// isn't user-configurable). Observed prod crash:
|
|
54277
|
+
// `TypeError: Cannot read properties of null (reading 'type')` →
|
|
54278
|
+
// unmounted WidgetSidebar via React error boundary.
|
|
54217
54279
|
var uniqueProviders = useMemo(function () {
|
|
54218
54280
|
var types = new Set();
|
|
54219
54281
|
allWidgets.forEach(function (_ref7) {
|
|
54220
54282
|
var widget = _ref7.widget;
|
|
54221
|
-
return (widget
|
|
54283
|
+
return getUserConfigurableProviders(widget === null || widget === void 0 ? void 0 : widget.providers).forEach(function (p) {
|
|
54222
54284
|
return types.add(p.type);
|
|
54223
54285
|
});
|
|
54224
54286
|
});
|
|
@@ -54240,12 +54302,13 @@ var WidgetSidebar = function WidgetSidebar(_ref4) {
|
|
|
54240
54302
|
if (filterAuthor !== "all") {
|
|
54241
54303
|
if ((widget["package"] || widget.author || "Other") !== filterAuthor) return false;
|
|
54242
54304
|
}
|
|
54243
|
-
// Provider filter
|
|
54305
|
+
// Provider filter — same null-safety as `uniqueProviders` above.
|
|
54244
54306
|
if (filterProvider !== "all") {
|
|
54307
|
+
var configurable = getUserConfigurableProviders(widget === null || widget === void 0 ? void 0 : widget.providers);
|
|
54245
54308
|
if (filterProvider === "none") {
|
|
54246
|
-
if (
|
|
54309
|
+
if (configurable.length > 0) return false;
|
|
54247
54310
|
} else {
|
|
54248
|
-
if (!
|
|
54311
|
+
if (!configurable.some(function (p) {
|
|
54249
54312
|
return p.type === filterProvider;
|
|
54250
54313
|
})) return false;
|
|
54251
54314
|
}
|
|
@@ -57823,9 +57886,13 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
|
|
|
57823
57886
|
return getUnresolvedProviders({
|
|
57824
57887
|
workspace: workspaceSelected,
|
|
57825
57888
|
appProviders: (appContext === null || appContext === void 0 ? void 0 : appContext.providers) || {},
|
|
57889
|
+
// Use ComponentManager.config so a legacy layout referencing
|
|
57890
|
+
// a bare component name (`"PipelineKanban"`) still resolves
|
|
57891
|
+
// to its scoped registration. Direct `componentMap[name]`
|
|
57892
|
+
// returns undefined after the v0.1.432 scoped-IDs migration.
|
|
57826
57893
|
getWidgetRequirements: function getWidgetRequirements(name) {
|
|
57827
|
-
var _ComponentManager$
|
|
57828
|
-
return name && ((_ComponentManager$
|
|
57894
|
+
var _ComponentManager$con;
|
|
57895
|
+
return name && ((_ComponentManager$con = ComponentManager.config(name)) === null || _ComponentManager$con === void 0 ? void 0 : _ComponentManager$con.providers) || [];
|
|
57829
57896
|
}
|
|
57830
57897
|
});
|
|
57831
57898
|
}, [workspaceSelected, appContext === null || appContext === void 0 ? void 0 : appContext.providers]);
|
|
@@ -58827,13 +58894,18 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
|
|
|
58827
58894
|
isOpen: isConfigModalOpen,
|
|
58828
58895
|
setIsOpen: setIsConfigModalOpen,
|
|
58829
58896
|
workspace: workspaceSelected,
|
|
58830
|
-
appProviders: (appContext === null || appContext === void 0 ? void 0 : appContext.providers) || {}
|
|
58897
|
+
appProviders: (appContext === null || appContext === void 0 ? void 0 : appContext.providers) || {}
|
|
58898
|
+
// Use ComponentManager.config so legacy bare component
|
|
58899
|
+
// refs in `workspaceSelected.layout` still resolve to
|
|
58900
|
+
// their registered scoped form (post-v0.1.432). Direct
|
|
58901
|
+
// `componentMap[name]` returns undefined for those.
|
|
58902
|
+
,
|
|
58831
58903
|
getWidgetRequirements: function getWidgetRequirements(name) {
|
|
58832
|
-
var _ComponentManager$
|
|
58833
|
-
return name && ((_ComponentManager$
|
|
58904
|
+
var _ComponentManager$con2;
|
|
58905
|
+
return name && ((_ComponentManager$con2 = ComponentManager.config(name)) === null || _ComponentManager$con2 === void 0 ? void 0 : _ComponentManager$con2.providers) || [];
|
|
58834
58906
|
},
|
|
58835
58907
|
getWidgetConfig: function getWidgetConfig(name) {
|
|
58836
|
-
return name && ComponentManager.
|
|
58908
|
+
return name && ComponentManager.config(name) || null;
|
|
58837
58909
|
},
|
|
58838
58910
|
onSaveBindings: handleBulkProviderBindings,
|
|
58839
58911
|
onSaveListeners: handleBulkListenerBindings,
|