@trops/dash-core 0.1.278 → 0.1.280
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 +229 -118
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +163 -70
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2775,9 +2775,9 @@ var LayoutContainer = function LayoutContainer(_ref) {
|
|
|
2775
2775
|
|
|
2776
2776
|
function ownKeys$H(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2777
2777
|
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$H(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$H(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2778
|
-
function _createForOfIteratorHelper$
|
|
2779
|
-
function _unsupportedIterableToArray$
|
|
2780
|
-
function _arrayLikeToArray$
|
|
2778
|
+
function _createForOfIteratorHelper$j(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$j(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
2779
|
+
function _unsupportedIterableToArray$j(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$j(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$j(r, a) : void 0; } }
|
|
2780
|
+
function _arrayLikeToArray$j(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; }
|
|
2781
2781
|
/**
|
|
2782
2782
|
* Layout template definitions for the dashboard template picker.
|
|
2783
2783
|
*
|
|
@@ -3051,7 +3051,7 @@ function createLayoutFromTemplate(template) {
|
|
|
3051
3051
|
cols: template.cols,
|
|
3052
3052
|
gap: "gap-2"
|
|
3053
3053
|
};
|
|
3054
|
-
var _iterator = _createForOfIteratorHelper$
|
|
3054
|
+
var _iterator = _createForOfIteratorHelper$j(template.cells),
|
|
3055
3055
|
_step;
|
|
3056
3056
|
try {
|
|
3057
3057
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -3982,9 +3982,9 @@ var RegistryAuthModal = function RegistryAuthModal(_ref) {
|
|
|
3982
3982
|
});
|
|
3983
3983
|
};
|
|
3984
3984
|
|
|
3985
|
-
function _createForOfIteratorHelper$
|
|
3986
|
-
function _unsupportedIterableToArray$
|
|
3987
|
-
function _arrayLikeToArray$
|
|
3985
|
+
function _createForOfIteratorHelper$i(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$i(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
3986
|
+
function _unsupportedIterableToArray$i(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$i(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$i(r, a) : void 0; } }
|
|
3987
|
+
function _arrayLikeToArray$i(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; }
|
|
3988
3988
|
function ownKeys$G(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3989
3989
|
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$G(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$G(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3990
3990
|
var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
|
|
@@ -4225,7 +4225,7 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
|
|
|
4225
4225
|
toInstall = 0,
|
|
4226
4226
|
unavailable = 0,
|
|
4227
4227
|
hasUnavailableRequired = false;
|
|
4228
|
-
var _iterator = _createForOfIteratorHelper$
|
|
4228
|
+
var _iterator = _createForOfIteratorHelper$i(widgetDeps),
|
|
4229
4229
|
_step;
|
|
4230
4230
|
try {
|
|
4231
4231
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -5893,9 +5893,9 @@ function cleanIpcError(message) {
|
|
|
5893
5893
|
return match ? match[1] : message;
|
|
5894
5894
|
}
|
|
5895
5895
|
|
|
5896
|
-
function _createForOfIteratorHelper$
|
|
5897
|
-
function _unsupportedIterableToArray$
|
|
5898
|
-
function _arrayLikeToArray$
|
|
5896
|
+
function _createForOfIteratorHelper$h(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$h(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
5897
|
+
function _unsupportedIterableToArray$h(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$h(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$h(r, a) : void 0; } }
|
|
5898
|
+
function _arrayLikeToArray$h(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; }
|
|
5899
5899
|
|
|
5900
5900
|
/**
|
|
5901
5901
|
* useRegistrySearch — shared hook for browsing and installing registry packages.
|
|
@@ -6006,13 +6006,13 @@ var useRegistrySearch = function useRegistrySearch() {
|
|
|
6006
6006
|
return c.toLowerCase();
|
|
6007
6007
|
}));
|
|
6008
6008
|
widgets = [];
|
|
6009
|
-
_iterator = _createForOfIteratorHelper$
|
|
6009
|
+
_iterator = _createForOfIteratorHelper$h(pkgs);
|
|
6010
6010
|
try {
|
|
6011
6011
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
6012
6012
|
pkg = _step.value;
|
|
6013
6013
|
// Compute missing APIs for the entire package
|
|
6014
6014
|
allApiProviders = [];
|
|
6015
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
6015
|
+
_iterator2 = _createForOfIteratorHelper$h(pkg.providers || []);
|
|
6016
6016
|
try {
|
|
6017
6017
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
6018
6018
|
p = _step2.value;
|
|
@@ -6025,11 +6025,11 @@ var useRegistrySearch = function useRegistrySearch() {
|
|
|
6025
6025
|
} finally {
|
|
6026
6026
|
_iterator2.f();
|
|
6027
6027
|
}
|
|
6028
|
-
_iterator3 = _createForOfIteratorHelper$
|
|
6028
|
+
_iterator3 = _createForOfIteratorHelper$h(pkg.widgets || []);
|
|
6029
6029
|
try {
|
|
6030
6030
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
6031
6031
|
w = _step3.value;
|
|
6032
|
-
_iterator5 = _createForOfIteratorHelper$
|
|
6032
|
+
_iterator5 = _createForOfIteratorHelper$h(w.providers || []);
|
|
6033
6033
|
try {
|
|
6034
6034
|
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
6035
6035
|
_p = _step5.value;
|
|
@@ -6051,7 +6051,7 @@ var useRegistrySearch = function useRegistrySearch() {
|
|
|
6051
6051
|
missingApis = _toConsumableArray(new Set(allApiProviders)).filter(function (api) {
|
|
6052
6052
|
return !capSet.has(api.toLowerCase());
|
|
6053
6053
|
});
|
|
6054
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
6054
|
+
_iterator4 = _createForOfIteratorHelper$h(pkg.widgets || []);
|
|
6055
6055
|
try {
|
|
6056
6056
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
6057
6057
|
widget = _step4.value;
|
|
@@ -6672,9 +6672,9 @@ function applyFilters(items, filters, mode) {
|
|
|
6672
6672
|
});
|
|
6673
6673
|
}
|
|
6674
6674
|
|
|
6675
|
-
function _createForOfIteratorHelper$
|
|
6676
|
-
function _unsupportedIterableToArray$
|
|
6677
|
-
function _arrayLikeToArray$
|
|
6675
|
+
function _createForOfIteratorHelper$g(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$g(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
6676
|
+
function _unsupportedIterableToArray$g(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$g(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$g(r, a) : void 0; } }
|
|
6677
|
+
function _arrayLikeToArray$g(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; }
|
|
6678
6678
|
function ownKeys$E(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6679
6679
|
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$E(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$E(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6680
6680
|
var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
|
|
@@ -6898,7 +6898,7 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
|
|
|
6898
6898
|
installedNames = new Set(installedList.map(function (w) {
|
|
6899
6899
|
return w.name;
|
|
6900
6900
|
}));
|
|
6901
|
-
_iterator = _createForOfIteratorHelper$
|
|
6901
|
+
_iterator = _createForOfIteratorHelper$g(state.selectedWidgets);
|
|
6902
6902
|
_context2.prev = 13;
|
|
6903
6903
|
_iterator.s();
|
|
6904
6904
|
case 14:
|
|
@@ -12604,9 +12604,9 @@ var PanelEditItem = function PanelEditItem(_ref) {
|
|
|
12604
12604
|
};
|
|
12605
12605
|
|
|
12606
12606
|
var _excluded$5 = ["rows", "cols"];
|
|
12607
|
-
function _createForOfIteratorHelper$
|
|
12608
|
-
function _unsupportedIterableToArray$
|
|
12609
|
-
function _arrayLikeToArray$
|
|
12607
|
+
function _createForOfIteratorHelper$f(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$f(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12608
|
+
function _unsupportedIterableToArray$f(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$f(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$f(r, a) : void 0; } }
|
|
12609
|
+
function _arrayLikeToArray$f(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; }
|
|
12610
12610
|
function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12611
12611
|
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12612
12612
|
var defaultGrid = {
|
|
@@ -12759,7 +12759,7 @@ function GridEditor(_ref) {
|
|
|
12759
12759
|
function sortObjectByKeys(obj) {
|
|
12760
12760
|
var sortedKeys = Object.keys(obj).sort();
|
|
12761
12761
|
var sortedObj = {};
|
|
12762
|
-
var _iterator = _createForOfIteratorHelper$
|
|
12762
|
+
var _iterator = _createForOfIteratorHelper$f(sortedKeys),
|
|
12763
12763
|
_step;
|
|
12764
12764
|
try {
|
|
12765
12765
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -13232,9 +13232,9 @@ var PanelEditItemNotifications = function PanelEditItemNotifications(_ref) {
|
|
|
13232
13232
|
});
|
|
13233
13233
|
};
|
|
13234
13234
|
|
|
13235
|
-
function _createForOfIteratorHelper$
|
|
13236
|
-
function _unsupportedIterableToArray$
|
|
13237
|
-
function _arrayLikeToArray$
|
|
13235
|
+
function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13236
|
+
function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$e(r, a) : void 0; } }
|
|
13237
|
+
function _arrayLikeToArray$e(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; }
|
|
13238
13238
|
function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13239
13239
|
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13240
13240
|
var DAYS = [{
|
|
@@ -13563,7 +13563,7 @@ var PanelEditItemSchedule = function PanelEditItemSchedule(_ref2) {
|
|
|
13563
13563
|
setIsLoading(true);
|
|
13564
13564
|
window.mainApi.scheduler.getTasks(widgetUuid).then(function (tasks) {
|
|
13565
13565
|
var stateMap = {};
|
|
13566
|
-
var _iterator = _createForOfIteratorHelper$
|
|
13566
|
+
var _iterator = _createForOfIteratorHelper$e(tasks || []),
|
|
13567
13567
|
_step;
|
|
13568
13568
|
try {
|
|
13569
13569
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -16413,9 +16413,9 @@ var getUserConfigurableProviders = function getUserConfigurableProviders(provide
|
|
|
16413
16413
|
});
|
|
16414
16414
|
};
|
|
16415
16415
|
|
|
16416
|
-
function _createForOfIteratorHelper$
|
|
16417
|
-
function _unsupportedIterableToArray$
|
|
16418
|
-
function _arrayLikeToArray$
|
|
16416
|
+
function _createForOfIteratorHelper$d(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$d(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
16417
|
+
function _unsupportedIterableToArray$d(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$d(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$d(r, a) : void 0; } }
|
|
16418
|
+
function _arrayLikeToArray$d(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; }
|
|
16419
16419
|
function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16420
16420
|
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16421
16421
|
var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
@@ -16700,11 +16700,11 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
16700
16700
|
|
|
16701
16701
|
// Flatten all widgets from all packages for the widget list
|
|
16702
16702
|
flatWidgets = [];
|
|
16703
|
-
_iterator = _createForOfIteratorHelper$
|
|
16703
|
+
_iterator = _createForOfIteratorHelper$d(result.packages || []);
|
|
16704
16704
|
try {
|
|
16705
16705
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
16706
16706
|
pkg = _step.value;
|
|
16707
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
16707
|
+
_iterator2 = _createForOfIteratorHelper$d(pkg.widgets || []);
|
|
16708
16708
|
try {
|
|
16709
16709
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
16710
16710
|
widget = _step2.value;
|
|
@@ -18350,9 +18350,9 @@ var ProviderBadge = function ProviderBadge(_ref) {
|
|
|
18350
18350
|
});
|
|
18351
18351
|
};
|
|
18352
18352
|
|
|
18353
|
-
function _createForOfIteratorHelper$
|
|
18354
|
-
function _unsupportedIterableToArray$
|
|
18355
|
-
function _arrayLikeToArray$
|
|
18353
|
+
function _createForOfIteratorHelper$c(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$c(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
18354
|
+
function _unsupportedIterableToArray$c(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$c(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$c(r, a) : void 0; } }
|
|
18355
|
+
function _arrayLikeToArray$c(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; }
|
|
18356
18356
|
var WidgetCardHeader = function WidgetCardHeader(_ref) {
|
|
18357
18357
|
var item = _ref.item,
|
|
18358
18358
|
widget = _ref.widget,
|
|
@@ -18396,7 +18396,7 @@ var WidgetCardHeader = function WidgetCardHeader(_ref) {
|
|
|
18396
18396
|
var el = headerRef.current;
|
|
18397
18397
|
if (!el) return;
|
|
18398
18398
|
var observer = new ResizeObserver(function (entries) {
|
|
18399
|
-
var _iterator = _createForOfIteratorHelper$
|
|
18399
|
+
var _iterator = _createForOfIteratorHelper$c(entries),
|
|
18400
18400
|
_step;
|
|
18401
18401
|
try {
|
|
18402
18402
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -18753,9 +18753,9 @@ var useWidgetSchedulerStatus = function useWidgetSchedulerStatus(widgetId) {
|
|
|
18753
18753
|
};
|
|
18754
18754
|
};
|
|
18755
18755
|
|
|
18756
|
-
function _createForOfIteratorHelper$
|
|
18757
|
-
function _unsupportedIterableToArray$
|
|
18758
|
-
function _arrayLikeToArray$
|
|
18756
|
+
function _createForOfIteratorHelper$b(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$b(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
18757
|
+
function _unsupportedIterableToArray$b(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$b(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$b(r, a) : void 0; } }
|
|
18758
|
+
function _arrayLikeToArray$b(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; }
|
|
18759
18759
|
function formatCountdown(ms) {
|
|
18760
18760
|
if (ms == null || ms < 0) return "--";
|
|
18761
18761
|
if (ms < 1000) return "< 1s";
|
|
@@ -18872,7 +18872,7 @@ var WidgetCardStatusBar = function WidgetCardStatusBar(_ref) {
|
|
|
18872
18872
|
|
|
18873
18873
|
// Find soonest countdown among enabled tasks
|
|
18874
18874
|
var soonestMs = null;
|
|
18875
|
-
var _iterator = _createForOfIteratorHelper$
|
|
18875
|
+
var _iterator = _createForOfIteratorHelper$b(enabledTasks),
|
|
18876
18876
|
_step;
|
|
18877
18877
|
try {
|
|
18878
18878
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -20897,13 +20897,28 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
20897
20897
|
}
|
|
20898
20898
|
function handleDropWidgetFromSidebar(gridContainerId, cellNumber, widgetKey) {
|
|
20899
20899
|
try {
|
|
20900
|
+
var _gridContainer$grid;
|
|
20900
20901
|
var config = ComponentManager.config(widgetKey);
|
|
20901
20902
|
if (!config) return;
|
|
20902
20903
|
var widgetItem = _objectSpread$t(_objectSpread$t({}, config), {}, {
|
|
20903
20904
|
component: widgetKey,
|
|
20904
20905
|
key: widgetKey
|
|
20905
20906
|
});
|
|
20906
|
-
|
|
20907
|
+
|
|
20908
|
+
// Remove old widget from layout if the target cell is already occupied
|
|
20909
|
+
var _workspace = currentWorkspace;
|
|
20910
|
+
var gridContainer = _workspace["layout"].find(function (item) {
|
|
20911
|
+
return item.id === gridContainerId;
|
|
20912
|
+
});
|
|
20913
|
+
if (gridContainer !== null && gridContainer !== void 0 && (_gridContainer$grid = gridContainer.grid) !== null && _gridContainer$grid !== void 0 && (_gridContainer$grid = _gridContainer$grid[cellNumber]) !== null && _gridContainer$grid !== void 0 && _gridContainer$grid.component) {
|
|
20914
|
+
var oldWidgetId = gridContainer.grid[cellNumber].component;
|
|
20915
|
+
var dashboard = new DashboardModel(_workspace);
|
|
20916
|
+
dashboard.removeItemFromLayout(oldWidgetId);
|
|
20917
|
+
// Clear the grid cell reference before adding the new widget
|
|
20918
|
+
gridContainer.grid[cellNumber].component = null;
|
|
20919
|
+
_workspace = dashboard.workspace();
|
|
20920
|
+
}
|
|
20921
|
+
var layout = _workspace["layout"];
|
|
20907
20922
|
var hasChildren = widgetItem["type"] === "workspace";
|
|
20908
20923
|
var newLayout = addItemToItemLayout(layout, gridContainerId, widgetItem, hasChildren);
|
|
20909
20924
|
var newWidgetId = newLayout[newLayout.length - 1].id;
|
|
@@ -20916,7 +20931,7 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
20916
20931
|
hide: false
|
|
20917
20932
|
};
|
|
20918
20933
|
}
|
|
20919
|
-
var newWorkspace = JSON.parse(JSON.stringify(
|
|
20934
|
+
var newWorkspace = JSON.parse(JSON.stringify(_workspace));
|
|
20920
20935
|
newWorkspace["layout"] = newLayout;
|
|
20921
20936
|
setCurrentWorkspace(newWorkspace);
|
|
20922
20937
|
} catch (e) {
|
|
@@ -23954,9 +23969,9 @@ var ExternalWidget = function ExternalWidget(_ref) {
|
|
|
23954
23969
|
var GRID_CELL_WIDGET_TYPE = "grid-cell-widget";
|
|
23955
23970
|
var SIDEBAR_WIDGET_TYPE = "sidebar-widget";
|
|
23956
23971
|
|
|
23957
|
-
function _createForOfIteratorHelper$
|
|
23958
|
-
function _unsupportedIterableToArray$
|
|
23959
|
-
function _arrayLikeToArray$
|
|
23972
|
+
function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
23973
|
+
function _unsupportedIterableToArray$a(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$a(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$a(r, a) : void 0; } }
|
|
23974
|
+
function _arrayLikeToArray$a(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; }
|
|
23960
23975
|
function ownKeys$p(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23961
23976
|
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$p(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23962
23977
|
var DraggableDroppableCellBody = function DraggableDroppableCellBody(_ref) {
|
|
@@ -24531,7 +24546,7 @@ var LayoutGridContainer = /*#__PURE__*/React.memo(function (_ref3) {
|
|
|
24531
24546
|
return selectable["delete"](cn);
|
|
24532
24547
|
});
|
|
24533
24548
|
var resolved = new Set();
|
|
24534
|
-
var _iterator = _createForOfIteratorHelper$
|
|
24549
|
+
var _iterator = _createForOfIteratorHelper$a(selectable),
|
|
24535
24550
|
_step;
|
|
24536
24551
|
try {
|
|
24537
24552
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -26669,9 +26684,9 @@ function isWidgetResolvable(componentKey) {
|
|
|
26669
26684
|
|
|
26670
26685
|
function ownKeys$o(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26671
26686
|
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$o(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$o(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26672
|
-
function _createForOfIteratorHelper$
|
|
26673
|
-
function _unsupportedIterableToArray$
|
|
26674
|
-
function _arrayLikeToArray$
|
|
26687
|
+
function _createForOfIteratorHelper$9(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$9(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
26688
|
+
function _unsupportedIterableToArray$9(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$9(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$9(r, a) : void 0; } }
|
|
26689
|
+
function _arrayLikeToArray$9(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; }
|
|
26675
26690
|
/**
|
|
26676
26691
|
* The model for all layout components used primarily in the renderLayout method
|
|
26677
26692
|
* @param {Object} layoutItem an object containing various attributes of the layout item
|
|
@@ -26683,7 +26698,7 @@ function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
26683
26698
|
function sortObjectByKeys(obj) {
|
|
26684
26699
|
var sortedKeys = Object.keys(obj).sort();
|
|
26685
26700
|
var sortedObj = {};
|
|
26686
|
-
var _iterator = _createForOfIteratorHelper$
|
|
26701
|
+
var _iterator = _createForOfIteratorHelper$9(sortedKeys),
|
|
26687
26702
|
_step;
|
|
26688
26703
|
try {
|
|
26689
26704
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -27352,6 +27367,9 @@ var MenuItemModel = function MenuItemModel() {
|
|
|
27352
27367
|
return m;
|
|
27353
27368
|
};
|
|
27354
27369
|
|
|
27370
|
+
function _createForOfIteratorHelper$8(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$8(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
27371
|
+
function _unsupportedIterableToArray$8(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$8(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$8(r, a) : void 0; } }
|
|
27372
|
+
function _arrayLikeToArray$8(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; }
|
|
27355
27373
|
function ownKeys$n(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27356
27374
|
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$n(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$n(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27357
27375
|
/**
|
|
@@ -29322,6 +29340,54 @@ var DashboardModel = /*#__PURE__*/function () {
|
|
|
29322
29340
|
return color;
|
|
29323
29341
|
}
|
|
29324
29342
|
}
|
|
29343
|
+
|
|
29344
|
+
/**
|
|
29345
|
+
* Remove orphaned layout items that are not referenced by any grid cell.
|
|
29346
|
+
* Call this during save to keep the workspace data clean.
|
|
29347
|
+
*/
|
|
29348
|
+
}, {
|
|
29349
|
+
key: "cleanOrphanedItems",
|
|
29350
|
+
value: function cleanOrphanedItems() {
|
|
29351
|
+
try {
|
|
29352
|
+
// Collect all item IDs actively referenced by grid cells
|
|
29353
|
+
var activeItemIds = new Set();
|
|
29354
|
+
var _iterator = _createForOfIteratorHelper$8(this.layout),
|
|
29355
|
+
_step;
|
|
29356
|
+
try {
|
|
29357
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
29358
|
+
var item = _step.value;
|
|
29359
|
+
if (item.grid && _typeof(item.grid) === "object") {
|
|
29360
|
+
for (var _i15 = 0, _Object$keys5 = Object.keys(item.grid); _i15 < _Object$keys5.length; _i15++) {
|
|
29361
|
+
var key = _Object$keys5[_i15];
|
|
29362
|
+
var cell = item.grid[key];
|
|
29363
|
+
if (cell && _typeof(cell) === "object" && cell.component) {
|
|
29364
|
+
activeItemIds.add(cell.component);
|
|
29365
|
+
}
|
|
29366
|
+
}
|
|
29367
|
+
// The grid container itself is active
|
|
29368
|
+
activeItemIds.add(item.id);
|
|
29369
|
+
}
|
|
29370
|
+
}
|
|
29371
|
+
|
|
29372
|
+
// If no grid containers exist, nothing to clean
|
|
29373
|
+
} catch (err) {
|
|
29374
|
+
_iterator.e(err);
|
|
29375
|
+
} finally {
|
|
29376
|
+
_iterator.f();
|
|
29377
|
+
}
|
|
29378
|
+
if (activeItemIds.size === 0) return;
|
|
29379
|
+
|
|
29380
|
+
// Keep root items (parent: 0) and items referenced by grid cells
|
|
29381
|
+
var before = this.layout.length;
|
|
29382
|
+
this.layout = this.layout.filter(function (item) {
|
|
29383
|
+
return item.parent === 0 || activeItemIds.has(item.id);
|
|
29384
|
+
});
|
|
29385
|
+
var removed = before - this.layout.length;
|
|
29386
|
+
if (removed > 0) {
|
|
29387
|
+
}
|
|
29388
|
+
} catch (e) {
|
|
29389
|
+
}
|
|
29390
|
+
}
|
|
29325
29391
|
}]);
|
|
29326
29392
|
}();
|
|
29327
29393
|
|
|
@@ -29446,15 +29512,10 @@ var ComponentManager = {
|
|
|
29446
29512
|
var tempComponentMap = this.componentMap();
|
|
29447
29513
|
// Handle both module exports (widgetConfig.default) and direct config objects
|
|
29448
29514
|
var config = widgetConfig["default"] || widgetConfig;
|
|
29449
|
-
//
|
|
29450
|
-
// otherwise
|
|
29515
|
+
// Register under a single canonical key: config.id (scoped widget ID) if
|
|
29516
|
+
// available, otherwise the provided widgetKey. No aliases — one widget, one key.
|
|
29451
29517
|
var registrationKey = config.id || widgetKey;
|
|
29452
29518
|
tempComponentMap[registrationKey] = ComponentConfigModel(config);
|
|
29453
|
-
// Also register under plain component name for backward compat
|
|
29454
|
-
// (dashboards may reference "SlackWidget" instead of "trops.slack.SlackWidget")
|
|
29455
|
-
if (config.id && config.id !== widgetKey && !tempComponentMap[widgetKey]) {
|
|
29456
|
-
tempComponentMap[widgetKey] = tempComponentMap[registrationKey];
|
|
29457
|
-
}
|
|
29458
29519
|
this.setComponentMap(tempComponentMap);
|
|
29459
29520
|
},
|
|
29460
29521
|
/**
|
|
@@ -33789,8 +33850,10 @@ function extractWidgetConfigs(bundleExports) {
|
|
|
33789
33850
|
|
|
33790
33851
|
// Must have a component function and a recognized type
|
|
33791
33852
|
if (typeof entry.component === "function" && (entry.type === "widget" || entry.type === "workspace")) {
|
|
33853
|
+
// Use the canonical widget ID from config if available,
|
|
33854
|
+
// otherwise fall back to the CJS export key
|
|
33792
33855
|
configs.push({
|
|
33793
|
-
key: key,
|
|
33856
|
+
key: entry.id || key,
|
|
33794
33857
|
config: entry
|
|
33795
33858
|
});
|
|
33796
33859
|
}
|
|
@@ -45079,20 +45142,30 @@ function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r
|
|
|
45079
45142
|
function _arrayLikeToArray$2(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; }
|
|
45080
45143
|
|
|
45081
45144
|
/**
|
|
45082
|
-
* Walk a workspace layout
|
|
45083
|
-
*
|
|
45145
|
+
* Walk a workspace layout and collect widget component keys that are
|
|
45146
|
+
* actively referenced by grid cells. Ignores orphaned layout items
|
|
45147
|
+
* (items not referenced by any grid cell) so they don't trigger false
|
|
45148
|
+
* "missing widget" warnings.
|
|
45084
45149
|
*/
|
|
45085
45150
|
function collectComponentsFromLayout(layout) {
|
|
45086
45151
|
var components = [];
|
|
45087
45152
|
if (!Array.isArray(layout)) return components;
|
|
45153
|
+
|
|
45154
|
+
// Collect IDs of layout items that are actively referenced by grid cells
|
|
45155
|
+
var activeItemIds = new Set();
|
|
45088
45156
|
var _iterator = _createForOfIteratorHelper$2(layout),
|
|
45089
45157
|
_step;
|
|
45090
45158
|
try {
|
|
45091
45159
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
45092
45160
|
var item = _step.value;
|
|
45093
|
-
if (item.
|
|
45094
|
-
|
|
45095
|
-
|
|
45161
|
+
if (item.grid && _typeof(item.grid) === "object") {
|
|
45162
|
+
for (var _i = 0, _Object$keys = Object.keys(item.grid); _i < _Object$keys.length; _i++) {
|
|
45163
|
+
var key = _Object$keys[_i];
|
|
45164
|
+
var cell = item.grid[key];
|
|
45165
|
+
if (cell && _typeof(cell) === "object" && cell.component) {
|
|
45166
|
+
activeItemIds.add(cell.component);
|
|
45167
|
+
}
|
|
45168
|
+
}
|
|
45096
45169
|
}
|
|
45097
45170
|
}
|
|
45098
45171
|
} catch (err) {
|
|
@@ -45100,6 +45173,26 @@ function collectComponentsFromLayout(layout) {
|
|
|
45100
45173
|
} finally {
|
|
45101
45174
|
_iterator.f();
|
|
45102
45175
|
}
|
|
45176
|
+
var _iterator2 = _createForOfIteratorHelper$2(layout),
|
|
45177
|
+
_step2;
|
|
45178
|
+
try {
|
|
45179
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
45180
|
+
var _item = _step2.value;
|
|
45181
|
+
if (!_item.component) continue;
|
|
45182
|
+
// Skip layout containers — they are always resolvable
|
|
45183
|
+
if (_item.component === "LayoutGridContainer" || _item.component === "Container" || _item.component === "LayoutContainer") continue;
|
|
45184
|
+
// When grid containers exist, only collect items referenced by a grid cell
|
|
45185
|
+
if (activeItemIds.size > 0 && !activeItemIds.has(_item.id)) continue;
|
|
45186
|
+
components.push(_item.component);
|
|
45187
|
+
if (Array.isArray(_item.children)) {
|
|
45188
|
+
components.push.apply(components, _toConsumableArray(collectComponentsFromLayout(_item.children)));
|
|
45189
|
+
}
|
|
45190
|
+
}
|
|
45191
|
+
} catch (err) {
|
|
45192
|
+
_iterator2.e(err);
|
|
45193
|
+
} finally {
|
|
45194
|
+
_iterator2.f();
|
|
45195
|
+
}
|
|
45103
45196
|
return components;
|
|
45104
45197
|
}
|
|
45105
45198
|
|
|
@@ -45114,11 +45207,11 @@ function findWidgetUsage(componentNames, workspaces) {
|
|
|
45114
45207
|
if (!(componentNames !== null && componentNames !== void 0 && componentNames.length) || !(workspaces !== null && workspaces !== void 0 && workspaces.length)) return [];
|
|
45115
45208
|
var nameSet = new Set(componentNames);
|
|
45116
45209
|
var results = [];
|
|
45117
|
-
var
|
|
45118
|
-
|
|
45210
|
+
var _iterator3 = _createForOfIteratorHelper$2(workspaces),
|
|
45211
|
+
_step3;
|
|
45119
45212
|
try {
|
|
45120
|
-
for (
|
|
45121
|
-
var ws =
|
|
45213
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
45214
|
+
var ws = _step3.value;
|
|
45122
45215
|
var comps = collectComponentsFromLayout(ws.layout);
|
|
45123
45216
|
var count = comps.filter(function (c) {
|
|
45124
45217
|
return nameSet.has(c);
|
|
@@ -45132,9 +45225,9 @@ function findWidgetUsage(componentNames, workspaces) {
|
|
|
45132
45225
|
}
|
|
45133
45226
|
}
|
|
45134
45227
|
} catch (err) {
|
|
45135
|
-
|
|
45228
|
+
_iterator3.e(err);
|
|
45136
45229
|
} finally {
|
|
45137
|
-
|
|
45230
|
+
_iterator3.f();
|
|
45138
45231
|
}
|
|
45139
45232
|
return results;
|
|
45140
45233
|
}
|