@trops/dash-core 0.1.188 → 0.1.190
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 +1261 -605
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1260 -602
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import * as DashReact from '@trops/dash-react';
|
|
3
|
-
import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SearchInput, ButtonIcon, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, Sidebar, Paragraph, Modal, Panel, Stepper, SelectableCard, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorInline, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, DropdownPanel, MenuItem2, ButtonIcon2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, Button2, Button3, MenuItem, Tag2, Tag3, ButtonIcon3, DashPanel, colorNames, shades, themeVariants,
|
|
3
|
+
import { isObject, ThemeContext, deepCopy, MainSection, getUUID, getStylesForItem, themeObjects, Heading, SearchInput, ButtonIcon, SubHeading3, InputText, Button, FontAwesomeIcon, Tag, Sidebar, Paragraph, Modal, Panel, Stepper, SelectableCard, Tabs3, Heading3, MenuItem3, FormLabel, SelectMenu, Switch, SelectInput, CodeEditorInline, SettingsModal, SubHeading2, tailwindHeightFractions, Menu3, Panel3, DropdownPanel, MenuItem2, ButtonIcon2, DragComponent, ConfirmationModal, DropComponent, getStyleName, capitalizeFirstLetter, colorTypes, getCSSStyleForClassname, Panel2, Heading2, SubHeading, Paragraph2, Paragraph3, Button2, Button3, MenuItem, Tag2, Tag3, ButtonIcon3, DashPanel, colorNames, shades, themeVariants, DataList, Checkbox, StatCard, Card, Tabs, Accordion, Alert, Toast, ProgressBar, Toggle, Breadcrumbs, Card2, Tabs2, Accordion2, Alert2, Toast2, ProgressBar2, Toggle2, Breadcrumbs2, Card3, Accordion3, Alert3, Toast3, ProgressBar3, Toggle3, Breadcrumbs3, ThemeFromUrlPane, TextArea, Icon2, AlgoliaSearchBox, CommandPalette, EmptyState, Navbar, withRouter, Menu as Menu$1 } from '@trops/dash-react';
|
|
4
4
|
export * from '@trops/dash-react';
|
|
5
5
|
export { ThemeContext } from '@trops/dash-react';
|
|
6
6
|
import _typeof from '@babel/runtime/helpers/typeof';
|
|
7
7
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
8
8
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
9
9
|
import * as React from 'react';
|
|
10
|
-
import React__default, { createContext, useContext, useState, useEffect, useMemo, useCallback, Fragment as Fragment$1, useRef, Component, memo,
|
|
10
|
+
import React__default, { createContext, useContext, useState, useEffect, useMemo, useCallback, Fragment as Fragment$1, useReducer, useRef, Component, memo, Profiler } from 'react';
|
|
11
11
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
12
12
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
13
13
|
import * as jsxRuntime from 'react/jsx-runtime';
|
|
@@ -2927,6 +2927,44 @@ var layoutTemplates = [{
|
|
|
2927
2927
|
row: 2,
|
|
2928
2928
|
col: 2
|
|
2929
2929
|
}]
|
|
2930
|
+
}, {
|
|
2931
|
+
id: "two-by-three",
|
|
2932
|
+
name: "2x3 Grid",
|
|
2933
|
+
description: "Six panels in two rows of three. Good for medium-density dashboards.",
|
|
2934
|
+
rows: 2,
|
|
2935
|
+
cols: 3,
|
|
2936
|
+
cells: [{
|
|
2937
|
+
key: "1.1"
|
|
2938
|
+
}, {
|
|
2939
|
+
key: "1.2"
|
|
2940
|
+
}, {
|
|
2941
|
+
key: "1.3"
|
|
2942
|
+
}, {
|
|
2943
|
+
key: "2.1"
|
|
2944
|
+
}, {
|
|
2945
|
+
key: "2.2"
|
|
2946
|
+
}, {
|
|
2947
|
+
key: "2.3"
|
|
2948
|
+
}],
|
|
2949
|
+
previewCells: [{
|
|
2950
|
+
row: 1,
|
|
2951
|
+
col: 1
|
|
2952
|
+
}, {
|
|
2953
|
+
row: 1,
|
|
2954
|
+
col: 2
|
|
2955
|
+
}, {
|
|
2956
|
+
row: 1,
|
|
2957
|
+
col: 3
|
|
2958
|
+
}, {
|
|
2959
|
+
row: 2,
|
|
2960
|
+
col: 1
|
|
2961
|
+
}, {
|
|
2962
|
+
row: 2,
|
|
2963
|
+
col: 2
|
|
2964
|
+
}, {
|
|
2965
|
+
row: 2,
|
|
2966
|
+
col: 3
|
|
2967
|
+
}]
|
|
2930
2968
|
}, {
|
|
2931
2969
|
id: "three-by-three",
|
|
2932
2970
|
name: "3x3 Grid",
|
|
@@ -5390,6 +5428,1085 @@ var WizardProvidersStep = function WizardProvidersStep(_ref) {
|
|
|
5390
5428
|
});
|
|
5391
5429
|
};
|
|
5392
5430
|
|
|
5431
|
+
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; } } }; }
|
|
5432
|
+
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; } }
|
|
5433
|
+
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; }
|
|
5434
|
+
|
|
5435
|
+
/**
|
|
5436
|
+
* useRegistrySearch — shared hook for browsing and installing registry packages.
|
|
5437
|
+
*
|
|
5438
|
+
* Extracted from EnhancedWidgetDropdown so the same logic can power the
|
|
5439
|
+
* Discover tab inside AppSettingsModal (and anywhere else).
|
|
5440
|
+
*
|
|
5441
|
+
* Options:
|
|
5442
|
+
* filterByCapabilities – if true (default), only show packages compatible
|
|
5443
|
+
* with the app's API capabilities
|
|
5444
|
+
*
|
|
5445
|
+
* Returns:
|
|
5446
|
+
* packages – raw package objects from the registry
|
|
5447
|
+
* flatWidgets – flattened widget entries with `isRegistry: true`
|
|
5448
|
+
* isLoading – true while a search request is in flight
|
|
5449
|
+
* error – error message string (or null)
|
|
5450
|
+
* searchQuery / setSearchQuery – controlled search input
|
|
5451
|
+
* isInstalling – true during an install
|
|
5452
|
+
* installError – install error string (or null)
|
|
5453
|
+
* search() – manually trigger a search
|
|
5454
|
+
* installPackage(widget) – install a specific registry widget
|
|
5455
|
+
* showAllPackages / setShowAllPackages – toggle to show incompatible packages
|
|
5456
|
+
* appCapabilities – the app's API namespaces
|
|
5457
|
+
*/
|
|
5458
|
+
var useRegistrySearch = function useRegistrySearch() {
|
|
5459
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
5460
|
+
_ref$filterByCapabili = _ref.filterByCapabilities,
|
|
5461
|
+
filterByCapabilities = _ref$filterByCapabili === void 0 ? true : _ref$filterByCapabili;
|
|
5462
|
+
var _useState = useState(false),
|
|
5463
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5464
|
+
isLoading = _useState2[0],
|
|
5465
|
+
setIsLoading = _useState2[1];
|
|
5466
|
+
var _useState3 = useState(null),
|
|
5467
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5468
|
+
error = _useState4[0],
|
|
5469
|
+
setError = _useState4[1];
|
|
5470
|
+
var _useState5 = useState([]),
|
|
5471
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5472
|
+
packages = _useState6[0],
|
|
5473
|
+
setPackages = _useState6[1];
|
|
5474
|
+
var _useState7 = useState([]),
|
|
5475
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5476
|
+
flatWidgets = _useState8[0],
|
|
5477
|
+
setFlatWidgets = _useState8[1];
|
|
5478
|
+
var _useState9 = useState(""),
|
|
5479
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
5480
|
+
searchQuery = _useState0[0],
|
|
5481
|
+
setSearchQuery = _useState0[1];
|
|
5482
|
+
var _useState1 = useState(false),
|
|
5483
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
5484
|
+
isInstalling = _useState10[0],
|
|
5485
|
+
setIsInstalling = _useState10[1];
|
|
5486
|
+
var _useState11 = useState(null),
|
|
5487
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
5488
|
+
installError = _useState12[0],
|
|
5489
|
+
setInstallError = _useState12[1];
|
|
5490
|
+
var _useState13 = useState(false),
|
|
5491
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
5492
|
+
showAllPackages = _useState14[0],
|
|
5493
|
+
setShowAllPackages = _useState14[1];
|
|
5494
|
+
|
|
5495
|
+
// Discover app capabilities from window.mainApi
|
|
5496
|
+
var appCapabilities = useMemo(function () {
|
|
5497
|
+
if (typeof window !== "undefined" && window.mainApi) {
|
|
5498
|
+
return Object.keys(window.mainApi);
|
|
5499
|
+
}
|
|
5500
|
+
return [];
|
|
5501
|
+
}, []);
|
|
5502
|
+
var search = useCallback(/*#__PURE__*/function () {
|
|
5503
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(query) {
|
|
5504
|
+
var _window$mainApi;
|
|
5505
|
+
var filters, result, pkgs, capSet, widgets, _iterator, _step, pkg, allApiProviders, _iterator2, _step2, p, _iterator3, _step3, w, _iterator5, _step5, _p, missingApis, _iterator4, _step4, widget, _t;
|
|
5506
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
5507
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5508
|
+
case 0:
|
|
5509
|
+
if ((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && _window$mainApi.registry) {
|
|
5510
|
+
_context.next = 1;
|
|
5511
|
+
break;
|
|
5512
|
+
}
|
|
5513
|
+
setPackages([]);
|
|
5514
|
+
setFlatWidgets([]);
|
|
5515
|
+
return _context.abrupt("return");
|
|
5516
|
+
case 1:
|
|
5517
|
+
setIsLoading(true);
|
|
5518
|
+
setError(null);
|
|
5519
|
+
_context.prev = 2;
|
|
5520
|
+
filters = {};
|
|
5521
|
+
if (filterByCapabilities && !showAllPackages && appCapabilities.length) {
|
|
5522
|
+
filters.appCapabilities = appCapabilities;
|
|
5523
|
+
}
|
|
5524
|
+
_context.next = 3;
|
|
5525
|
+
return window.mainApi.registry.search(query !== null && query !== void 0 ? query : searchQuery, filters);
|
|
5526
|
+
case 3:
|
|
5527
|
+
result = _context.sent;
|
|
5528
|
+
// Only include packages that contain at least one widget
|
|
5529
|
+
// (filters out theme-only packages, etc.)
|
|
5530
|
+
pkgs = (result.packages || []).filter(function (pkg) {
|
|
5531
|
+
return pkg.widgets && pkg.widgets.length > 0;
|
|
5532
|
+
});
|
|
5533
|
+
setPackages(pkgs);
|
|
5534
|
+
|
|
5535
|
+
// Flatten packages into widget entries
|
|
5536
|
+
capSet = new Set(appCapabilities.map(function (c) {
|
|
5537
|
+
return c.toLowerCase();
|
|
5538
|
+
}));
|
|
5539
|
+
widgets = [];
|
|
5540
|
+
_iterator = _createForOfIteratorHelper$e(pkgs);
|
|
5541
|
+
try {
|
|
5542
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
5543
|
+
pkg = _step.value;
|
|
5544
|
+
// Compute missing APIs for the entire package
|
|
5545
|
+
allApiProviders = [];
|
|
5546
|
+
_iterator2 = _createForOfIteratorHelper$e(pkg.providers || []);
|
|
5547
|
+
try {
|
|
5548
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
5549
|
+
p = _step2.value;
|
|
5550
|
+
if (p.providerClass === "api" && p.required !== false) {
|
|
5551
|
+
allApiProviders.push(p.type);
|
|
5552
|
+
}
|
|
5553
|
+
}
|
|
5554
|
+
} catch (err) {
|
|
5555
|
+
_iterator2.e(err);
|
|
5556
|
+
} finally {
|
|
5557
|
+
_iterator2.f();
|
|
5558
|
+
}
|
|
5559
|
+
_iterator3 = _createForOfIteratorHelper$e(pkg.widgets || []);
|
|
5560
|
+
try {
|
|
5561
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
5562
|
+
w = _step3.value;
|
|
5563
|
+
_iterator5 = _createForOfIteratorHelper$e(w.providers || []);
|
|
5564
|
+
try {
|
|
5565
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
5566
|
+
_p = _step5.value;
|
|
5567
|
+
if (_p.providerClass === "api" && _p.required !== false) {
|
|
5568
|
+
allApiProviders.push(_p.type);
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
} catch (err) {
|
|
5572
|
+
_iterator5.e(err);
|
|
5573
|
+
} finally {
|
|
5574
|
+
_iterator5.f();
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5577
|
+
} catch (err) {
|
|
5578
|
+
_iterator3.e(err);
|
|
5579
|
+
} finally {
|
|
5580
|
+
_iterator3.f();
|
|
5581
|
+
}
|
|
5582
|
+
missingApis = _toConsumableArray(new Set(allApiProviders)).filter(function (api) {
|
|
5583
|
+
return !capSet.has(api.toLowerCase());
|
|
5584
|
+
});
|
|
5585
|
+
_iterator4 = _createForOfIteratorHelper$e(pkg.widgets || []);
|
|
5586
|
+
try {
|
|
5587
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
5588
|
+
widget = _step4.value;
|
|
5589
|
+
widgets.push({
|
|
5590
|
+
key: "".concat(pkg.name, "/").concat(widget.name),
|
|
5591
|
+
name: widget.displayName || widget.name,
|
|
5592
|
+
description: widget.description || "",
|
|
5593
|
+
icon: widget.icon || null,
|
|
5594
|
+
providers: widget.providers || [],
|
|
5595
|
+
isRegistry: true,
|
|
5596
|
+
packageName: pkg.name,
|
|
5597
|
+
packageDisplayName: pkg.displayName || pkg.name,
|
|
5598
|
+
packageVersion: pkg.version,
|
|
5599
|
+
packageAuthor: pkg.author || "",
|
|
5600
|
+
packageDescription: pkg.description || "",
|
|
5601
|
+
packageTags: pkg.tags || [],
|
|
5602
|
+
packageCategory: pkg.category || "",
|
|
5603
|
+
downloadUrl: pkg.downloadUrl || "",
|
|
5604
|
+
repository: pkg.repository || "",
|
|
5605
|
+
publishedAt: pkg.publishedAt || "",
|
|
5606
|
+
packageWidgets: pkg.widgets || [],
|
|
5607
|
+
appOrigin: pkg.appOrigin || null,
|
|
5608
|
+
packageProviders: pkg.providers || [],
|
|
5609
|
+
missingApis: missingApis
|
|
5610
|
+
});
|
|
5611
|
+
}
|
|
5612
|
+
} catch (err) {
|
|
5613
|
+
_iterator4.e(err);
|
|
5614
|
+
} finally {
|
|
5615
|
+
_iterator4.f();
|
|
5616
|
+
}
|
|
5617
|
+
}
|
|
5618
|
+
} catch (err) {
|
|
5619
|
+
_iterator.e(err);
|
|
5620
|
+
} finally {
|
|
5621
|
+
_iterator.f();
|
|
5622
|
+
}
|
|
5623
|
+
setFlatWidgets(widgets);
|
|
5624
|
+
_context.next = 5;
|
|
5625
|
+
break;
|
|
5626
|
+
case 4:
|
|
5627
|
+
_context.prev = 4;
|
|
5628
|
+
_t = _context["catch"](2);
|
|
5629
|
+
setError(_t.message || "Failed to load registry");
|
|
5630
|
+
setPackages([]);
|
|
5631
|
+
setFlatWidgets([]);
|
|
5632
|
+
case 5:
|
|
5633
|
+
_context.prev = 5;
|
|
5634
|
+
setIsLoading(false);
|
|
5635
|
+
return _context.finish(5);
|
|
5636
|
+
case 6:
|
|
5637
|
+
case "end":
|
|
5638
|
+
return _context.stop();
|
|
5639
|
+
}
|
|
5640
|
+
}, _callee, null, [[2, 4, 5, 6]]);
|
|
5641
|
+
}));
|
|
5642
|
+
return function (_x) {
|
|
5643
|
+
return _ref2.apply(this, arguments);
|
|
5644
|
+
};
|
|
5645
|
+
}(), [searchQuery, filterByCapabilities, showAllPackages, appCapabilities]);
|
|
5646
|
+
|
|
5647
|
+
// Debounce search on query changes (300ms)
|
|
5648
|
+
useEffect(function () {
|
|
5649
|
+
var timer = setTimeout(function () {
|
|
5650
|
+
search(searchQuery);
|
|
5651
|
+
}, 300);
|
|
5652
|
+
return function () {
|
|
5653
|
+
return clearTimeout(timer);
|
|
5654
|
+
};
|
|
5655
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5656
|
+
}, [searchQuery, showAllPackages]);
|
|
5657
|
+
var installPackage = useCallback(/*#__PURE__*/function () {
|
|
5658
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(widget) {
|
|
5659
|
+
var packageName, downloadUrl, packageVersion, resolvedUrl, _t2;
|
|
5660
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
5661
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
5662
|
+
case 0:
|
|
5663
|
+
if (!(!widget || !widget.isRegistry)) {
|
|
5664
|
+
_context2.next = 1;
|
|
5665
|
+
break;
|
|
5666
|
+
}
|
|
5667
|
+
return _context2.abrupt("return");
|
|
5668
|
+
case 1:
|
|
5669
|
+
setIsInstalling(true);
|
|
5670
|
+
setInstallError(null);
|
|
5671
|
+
_context2.prev = 2;
|
|
5672
|
+
packageName = widget.packageName, downloadUrl = widget.downloadUrl, packageVersion = widget.packageVersion; // Resolve placeholders in the download URL
|
|
5673
|
+
resolvedUrl = downloadUrl.replace(/\{version\}/g, packageVersion).replace(/\{name\}/g, packageName);
|
|
5674
|
+
_context2.next = 3;
|
|
5675
|
+
return window.mainApi.widgets.install(packageName, resolvedUrl);
|
|
5676
|
+
case 3:
|
|
5677
|
+
_context2.next = 5;
|
|
5678
|
+
break;
|
|
5679
|
+
case 4:
|
|
5680
|
+
_context2.prev = 4;
|
|
5681
|
+
_t2 = _context2["catch"](2);
|
|
5682
|
+
setInstallError(_t2.message || "Failed to install package");
|
|
5683
|
+
case 5:
|
|
5684
|
+
_context2.prev = 5;
|
|
5685
|
+
setIsInstalling(false);
|
|
5686
|
+
return _context2.finish(5);
|
|
5687
|
+
case 6:
|
|
5688
|
+
case "end":
|
|
5689
|
+
return _context2.stop();
|
|
5690
|
+
}
|
|
5691
|
+
}, _callee2, null, [[2, 4, 5, 6]]);
|
|
5692
|
+
}));
|
|
5693
|
+
return function (_x2) {
|
|
5694
|
+
return _ref3.apply(this, arguments);
|
|
5695
|
+
};
|
|
5696
|
+
}(), []);
|
|
5697
|
+
var retry = useCallback(function () {
|
|
5698
|
+
search(searchQuery);
|
|
5699
|
+
}, [search, searchQuery]);
|
|
5700
|
+
return {
|
|
5701
|
+
packages: packages,
|
|
5702
|
+
flatWidgets: flatWidgets,
|
|
5703
|
+
isLoading: isLoading,
|
|
5704
|
+
error: error,
|
|
5705
|
+
searchQuery: searchQuery,
|
|
5706
|
+
setSearchQuery: setSearchQuery,
|
|
5707
|
+
isInstalling: isInstalling,
|
|
5708
|
+
installError: installError,
|
|
5709
|
+
search: search,
|
|
5710
|
+
installPackage: installPackage,
|
|
5711
|
+
retry: retry,
|
|
5712
|
+
showAllPackages: showAllPackages,
|
|
5713
|
+
setShowAllPackages: setShowAllPackages,
|
|
5714
|
+
appCapabilities: appCapabilities
|
|
5715
|
+
};
|
|
5716
|
+
};
|
|
5717
|
+
|
|
5718
|
+
var WizardResultsStep = function WizardResultsStep(_ref) {
|
|
5719
|
+
var state = _ref.state,
|
|
5720
|
+
dispatch = _ref.dispatch;
|
|
5721
|
+
var _useState = useState("prebuilt"),
|
|
5722
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5723
|
+
activeTab = _useState2[0],
|
|
5724
|
+
setActiveTab = _useState2[1];
|
|
5725
|
+
|
|
5726
|
+
// --- Dashboard search (Tab A) ---
|
|
5727
|
+
var _useState3 = useState([]),
|
|
5728
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5729
|
+
dashboards = _useState4[0],
|
|
5730
|
+
setDashboards = _useState4[1];
|
|
5731
|
+
var _useState5 = useState(false),
|
|
5732
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5733
|
+
dashLoading = _useState6[0],
|
|
5734
|
+
setDashLoading = _useState6[1];
|
|
5735
|
+
var _useState7 = useState(null),
|
|
5736
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5737
|
+
dashError = _useState8[0],
|
|
5738
|
+
setDashError = _useState8[1];
|
|
5739
|
+
var dashFilters = useMemo(function () {
|
|
5740
|
+
return {
|
|
5741
|
+
category: state.intent.length ? state.intent.join(",") : undefined,
|
|
5742
|
+
providerTypes: state.providers.length ? state.providers : undefined
|
|
5743
|
+
};
|
|
5744
|
+
}, [state.intent, state.providers]);
|
|
5745
|
+
var searchDashboards = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
5746
|
+
var _window$mainApi;
|
|
5747
|
+
var result, _t;
|
|
5748
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
5749
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5750
|
+
case 0:
|
|
5751
|
+
if ((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && (_window$mainApi = _window$mainApi.registry) !== null && _window$mainApi !== void 0 && _window$mainApi.searchDashboards) {
|
|
5752
|
+
_context.next = 1;
|
|
5753
|
+
break;
|
|
5754
|
+
}
|
|
5755
|
+
setDashboards([]);
|
|
5756
|
+
return _context.abrupt("return");
|
|
5757
|
+
case 1:
|
|
5758
|
+
setDashLoading(true);
|
|
5759
|
+
setDashError(null);
|
|
5760
|
+
_context.prev = 2;
|
|
5761
|
+
_context.next = 3;
|
|
5762
|
+
return window.mainApi.registry.searchDashboards("", dashFilters);
|
|
5763
|
+
case 3:
|
|
5764
|
+
result = _context.sent;
|
|
5765
|
+
setDashboards(result.packages || []);
|
|
5766
|
+
_context.next = 5;
|
|
5767
|
+
break;
|
|
5768
|
+
case 4:
|
|
5769
|
+
_context.prev = 4;
|
|
5770
|
+
_t = _context["catch"](2);
|
|
5771
|
+
setDashError(_t.message || "Failed to search dashboards");
|
|
5772
|
+
setDashboards([]);
|
|
5773
|
+
case 5:
|
|
5774
|
+
_context.prev = 5;
|
|
5775
|
+
setDashLoading(false);
|
|
5776
|
+
return _context.finish(5);
|
|
5777
|
+
case 6:
|
|
5778
|
+
case "end":
|
|
5779
|
+
return _context.stop();
|
|
5780
|
+
}
|
|
5781
|
+
}, _callee, null, [[2, 4, 5, 6]]);
|
|
5782
|
+
})), [dashFilters]);
|
|
5783
|
+
useEffect(function () {
|
|
5784
|
+
searchDashboards();
|
|
5785
|
+
}, [searchDashboards]);
|
|
5786
|
+
|
|
5787
|
+
// --- Widget search (Tab B) ---
|
|
5788
|
+
var _useRegistrySearch = useRegistrySearch({
|
|
5789
|
+
filterByCapabilities: true
|
|
5790
|
+
}),
|
|
5791
|
+
flatWidgets = _useRegistrySearch.flatWidgets,
|
|
5792
|
+
widgetsLoading = _useRegistrySearch.isLoading,
|
|
5793
|
+
widgetsError = _useRegistrySearch.error;
|
|
5794
|
+
|
|
5795
|
+
// Filter widgets by selected categories + providers
|
|
5796
|
+
var filteredWidgets = useMemo(function () {
|
|
5797
|
+
return flatWidgets.filter(function (w) {
|
|
5798
|
+
// Category filter: match if widget's category overlaps user intent
|
|
5799
|
+
var catMatch = state.intent.length === 0 || state.intent.some(function (cat) {
|
|
5800
|
+
return (w.packageCategory || "").toLowerCase() === cat.toLowerCase();
|
|
5801
|
+
});
|
|
5802
|
+
|
|
5803
|
+
// Provider filter: match if widget requires any of the selected providers
|
|
5804
|
+
var providerMatch = state.providers.length === 0 || (w.providers || []).some(function (p) {
|
|
5805
|
+
return state.providers.includes(p.type);
|
|
5806
|
+
}) || (w.packageProviders || []).some(function (p) {
|
|
5807
|
+
return state.providers.includes(p.type);
|
|
5808
|
+
});
|
|
5809
|
+
return catMatch && providerMatch;
|
|
5810
|
+
});
|
|
5811
|
+
}, [flatWidgets, state.intent, state.providers]);
|
|
5812
|
+
|
|
5813
|
+
// --- Tab change: set wizard path ---
|
|
5814
|
+
var handleTabChange = useCallback(function (tab) {
|
|
5815
|
+
setActiveTab(tab);
|
|
5816
|
+
dispatch({
|
|
5817
|
+
type: "SET_PATH",
|
|
5818
|
+
payload: tab === "prebuilt" ? "prebuilt" : "custom"
|
|
5819
|
+
});
|
|
5820
|
+
}, [dispatch]);
|
|
5821
|
+
|
|
5822
|
+
// Set initial path on mount
|
|
5823
|
+
useEffect(function () {
|
|
5824
|
+
if (!state.path) {
|
|
5825
|
+
dispatch({
|
|
5826
|
+
type: "SET_PATH",
|
|
5827
|
+
payload: "prebuilt"
|
|
5828
|
+
});
|
|
5829
|
+
}
|
|
5830
|
+
}, [state.path, dispatch]);
|
|
5831
|
+
|
|
5832
|
+
// --- Dashboard selection (single-select) ---
|
|
5833
|
+
var handleSelectDashboard = useCallback(function (dashboard) {
|
|
5834
|
+
dispatch({
|
|
5835
|
+
type: "SET_SELECTED_DASHBOARD",
|
|
5836
|
+
payload: dashboard
|
|
5837
|
+
});
|
|
5838
|
+
}, [dispatch]);
|
|
5839
|
+
|
|
5840
|
+
// --- Widget selection (multi-select) ---
|
|
5841
|
+
var handleToggleWidget = useCallback(function (widget) {
|
|
5842
|
+
dispatch({
|
|
5843
|
+
type: "TOGGLE_WIDGET",
|
|
5844
|
+
payload: widget
|
|
5845
|
+
});
|
|
5846
|
+
}, [dispatch]);
|
|
5847
|
+
var isWidgetSelected = useCallback(function (widget) {
|
|
5848
|
+
return state.selectedWidgets.some(function (w) {
|
|
5849
|
+
return w.name === widget.name;
|
|
5850
|
+
});
|
|
5851
|
+
}, [state.selectedWidgets]);
|
|
5852
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5853
|
+
className: "wizard-results-step",
|
|
5854
|
+
children: [/*#__PURE__*/jsx("h3", {
|
|
5855
|
+
className: "wizard-step-header",
|
|
5856
|
+
children: "Choose your starting point"
|
|
5857
|
+
}), /*#__PURE__*/jsxs(Tabs3, {
|
|
5858
|
+
value: activeTab,
|
|
5859
|
+
onValueChange: handleTabChange,
|
|
5860
|
+
className: "wizard-results-tabs",
|
|
5861
|
+
children: [/*#__PURE__*/jsxs(Tabs3.List, {
|
|
5862
|
+
className: "wizard-results-tab-list",
|
|
5863
|
+
children: [/*#__PURE__*/jsx(Tabs3.Trigger, {
|
|
5864
|
+
value: "prebuilt",
|
|
5865
|
+
children: "Pre-built Dashboards"
|
|
5866
|
+
}), /*#__PURE__*/jsxs(Tabs3.Trigger, {
|
|
5867
|
+
value: "custom",
|
|
5868
|
+
children: ["Build Your Own", state.selectedWidgets.length > 0 && /*#__PURE__*/jsx("span", {
|
|
5869
|
+
className: "wizard-count-badge",
|
|
5870
|
+
children: state.selectedWidgets.length
|
|
5871
|
+
})]
|
|
5872
|
+
})]
|
|
5873
|
+
}), /*#__PURE__*/jsx(Tabs3.Content, {
|
|
5874
|
+
value: "prebuilt",
|
|
5875
|
+
children: /*#__PURE__*/jsx(DashboardList, {
|
|
5876
|
+
dashboards: dashboards,
|
|
5877
|
+
isLoading: dashLoading,
|
|
5878
|
+
error: dashError,
|
|
5879
|
+
selectedDashboard: state.selectedDashboard,
|
|
5880
|
+
onSelect: handleSelectDashboard
|
|
5881
|
+
})
|
|
5882
|
+
}), /*#__PURE__*/jsx(Tabs3.Content, {
|
|
5883
|
+
value: "custom",
|
|
5884
|
+
children: /*#__PURE__*/jsx(WidgetList, {
|
|
5885
|
+
widgets: filteredWidgets,
|
|
5886
|
+
isLoading: widgetsLoading,
|
|
5887
|
+
error: widgetsError,
|
|
5888
|
+
isSelected: isWidgetSelected,
|
|
5889
|
+
onToggle: handleToggleWidget,
|
|
5890
|
+
selectedCount: state.selectedWidgets.length
|
|
5891
|
+
})
|
|
5892
|
+
})]
|
|
5893
|
+
})]
|
|
5894
|
+
});
|
|
5895
|
+
};
|
|
5896
|
+
|
|
5897
|
+
// --- Sub-components ---
|
|
5898
|
+
|
|
5899
|
+
var DashboardList = function DashboardList(_ref3) {
|
|
5900
|
+
var dashboards = _ref3.dashboards,
|
|
5901
|
+
isLoading = _ref3.isLoading,
|
|
5902
|
+
error = _ref3.error,
|
|
5903
|
+
selectedDashboard = _ref3.selectedDashboard,
|
|
5904
|
+
onSelect = _ref3.onSelect;
|
|
5905
|
+
if (isLoading) {
|
|
5906
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5907
|
+
className: "wizard-loading",
|
|
5908
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5909
|
+
icon: "spinner",
|
|
5910
|
+
spin: true,
|
|
5911
|
+
fixedWidth: true,
|
|
5912
|
+
className: "wizard-loading-icon"
|
|
5913
|
+
}), /*#__PURE__*/jsx("span", {
|
|
5914
|
+
children: "Searching dashboards..."
|
|
5915
|
+
})]
|
|
5916
|
+
});
|
|
5917
|
+
}
|
|
5918
|
+
if (error) {
|
|
5919
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5920
|
+
className: "wizard-error",
|
|
5921
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5922
|
+
icon: "circle-exclamation",
|
|
5923
|
+
fixedWidth: true
|
|
5924
|
+
}), /*#__PURE__*/jsx("span", {
|
|
5925
|
+
children: error
|
|
5926
|
+
})]
|
|
5927
|
+
});
|
|
5928
|
+
}
|
|
5929
|
+
if (dashboards.length === 0) {
|
|
5930
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5931
|
+
className: "wizard-empty",
|
|
5932
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5933
|
+
icon: "box-open",
|
|
5934
|
+
fixedWidth: true,
|
|
5935
|
+
className: "wizard-empty-icon"
|
|
5936
|
+
}), /*#__PURE__*/jsx("p", {
|
|
5937
|
+
children: "No pre-built dashboards match your selections."
|
|
5938
|
+
}), /*#__PURE__*/jsx("p", {
|
|
5939
|
+
className: "wizard-empty-hint",
|
|
5940
|
+
children: "Try the \"Build Your Own\" tab to pick individual widgets."
|
|
5941
|
+
})]
|
|
5942
|
+
});
|
|
5943
|
+
}
|
|
5944
|
+
return /*#__PURE__*/jsx("div", {
|
|
5945
|
+
className: "wizard-dashboard-list",
|
|
5946
|
+
children: dashboards.map(function (dash) {
|
|
5947
|
+
var isSelected = selectedDashboard && selectedDashboard.name === dash.name;
|
|
5948
|
+
var widgetCount = (dash.widgets || []).length;
|
|
5949
|
+
var providerNames = (dash.providers || []).map(function (p) {
|
|
5950
|
+
return p.name || p.type;
|
|
5951
|
+
}).join(", ");
|
|
5952
|
+
return /*#__PURE__*/jsxs("button", {
|
|
5953
|
+
type: "button",
|
|
5954
|
+
className: "wizard-dashboard-card ".concat(isSelected ? "wizard-dashboard-card--selected" : ""),
|
|
5955
|
+
onClick: function onClick() {
|
|
5956
|
+
return onSelect(dash);
|
|
5957
|
+
},
|
|
5958
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
5959
|
+
className: "wizard-dashboard-card-header",
|
|
5960
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5961
|
+
icon: resolveIcon(dash.icon || "grid-2"),
|
|
5962
|
+
fixedWidth: true,
|
|
5963
|
+
className: "wizard-dashboard-card-icon"
|
|
5964
|
+
}), /*#__PURE__*/jsx("span", {
|
|
5965
|
+
className: "wizard-dashboard-card-name",
|
|
5966
|
+
children: dash.displayName || dash.name
|
|
5967
|
+
}), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5968
|
+
icon: "circle-check",
|
|
5969
|
+
className: "wizard-dashboard-card-check"
|
|
5970
|
+
})]
|
|
5971
|
+
}), dash.description && /*#__PURE__*/jsx("p", {
|
|
5972
|
+
className: "wizard-dashboard-card-desc",
|
|
5973
|
+
children: dash.description
|
|
5974
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
5975
|
+
className: "wizard-dashboard-card-meta",
|
|
5976
|
+
children: [/*#__PURE__*/jsxs("span", {
|
|
5977
|
+
children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
|
|
5978
|
+
}), providerNames && /*#__PURE__*/jsx("span", {
|
|
5979
|
+
children: providerNames
|
|
5980
|
+
})]
|
|
5981
|
+
})]
|
|
5982
|
+
}, dash.name);
|
|
5983
|
+
})
|
|
5984
|
+
});
|
|
5985
|
+
};
|
|
5986
|
+
var WidgetList = function WidgetList(_ref4) {
|
|
5987
|
+
var widgets = _ref4.widgets,
|
|
5988
|
+
isLoading = _ref4.isLoading,
|
|
5989
|
+
error = _ref4.error,
|
|
5990
|
+
isSelected = _ref4.isSelected,
|
|
5991
|
+
onToggle = _ref4.onToggle,
|
|
5992
|
+
selectedCount = _ref4.selectedCount;
|
|
5993
|
+
if (isLoading) {
|
|
5994
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5995
|
+
className: "wizard-loading",
|
|
5996
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5997
|
+
icon: "spinner",
|
|
5998
|
+
spin: true,
|
|
5999
|
+
fixedWidth: true,
|
|
6000
|
+
className: "wizard-loading-icon"
|
|
6001
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6002
|
+
children: "Searching widgets..."
|
|
6003
|
+
})]
|
|
6004
|
+
});
|
|
6005
|
+
}
|
|
6006
|
+
if (error) {
|
|
6007
|
+
return /*#__PURE__*/jsxs("div", {
|
|
6008
|
+
className: "wizard-error",
|
|
6009
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6010
|
+
icon: "circle-exclamation",
|
|
6011
|
+
fixedWidth: true
|
|
6012
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6013
|
+
children: error
|
|
6014
|
+
})]
|
|
6015
|
+
});
|
|
6016
|
+
}
|
|
6017
|
+
if (widgets.length === 0) {
|
|
6018
|
+
return /*#__PURE__*/jsxs("div", {
|
|
6019
|
+
className: "wizard-empty",
|
|
6020
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6021
|
+
icon: "puzzle-piece",
|
|
6022
|
+
fixedWidth: true,
|
|
6023
|
+
className: "wizard-empty-icon"
|
|
6024
|
+
}), /*#__PURE__*/jsx("p", {
|
|
6025
|
+
children: "No widgets match your selections."
|
|
6026
|
+
}), /*#__PURE__*/jsx("p", {
|
|
6027
|
+
className: "wizard-empty-hint",
|
|
6028
|
+
children: "Try adjusting your categories or providers in the previous steps."
|
|
6029
|
+
})]
|
|
6030
|
+
});
|
|
6031
|
+
}
|
|
6032
|
+
return /*#__PURE__*/jsxs("div", {
|
|
6033
|
+
className: "wizard-widget-list",
|
|
6034
|
+
children: [selectedCount > 0 && /*#__PURE__*/jsxs("p", {
|
|
6035
|
+
className: "wizard-widget-count",
|
|
6036
|
+
children: [selectedCount, " widget", selectedCount !== 1 ? "s" : "", " selected"]
|
|
6037
|
+
}), widgets.map(function (widget) {
|
|
6038
|
+
var checked = isSelected(widget);
|
|
6039
|
+
return /*#__PURE__*/jsxs("button", {
|
|
6040
|
+
type: "button",
|
|
6041
|
+
className: "wizard-widget-card ".concat(checked ? "wizard-widget-card--selected" : ""),
|
|
6042
|
+
onClick: function onClick() {
|
|
6043
|
+
return onToggle(widget);
|
|
6044
|
+
},
|
|
6045
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
6046
|
+
className: "wizard-widget-card-checkbox",
|
|
6047
|
+
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6048
|
+
icon: checked ? "square-check" : "square",
|
|
6049
|
+
fixedWidth: true
|
|
6050
|
+
})
|
|
6051
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6052
|
+
className: "wizard-widget-card-info",
|
|
6053
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6054
|
+
className: "wizard-widget-card-header",
|
|
6055
|
+
children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6056
|
+
icon: resolveIcon(widget.icon),
|
|
6057
|
+
fixedWidth: true,
|
|
6058
|
+
className: "wizard-widget-card-icon"
|
|
6059
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6060
|
+
className: "wizard-widget-card-name",
|
|
6061
|
+
children: widget.name
|
|
6062
|
+
})]
|
|
6063
|
+
}), widget.description && /*#__PURE__*/jsx("p", {
|
|
6064
|
+
className: "wizard-widget-card-desc",
|
|
6065
|
+
children: widget.description
|
|
6066
|
+
}), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
|
|
6067
|
+
className: "wizard-widget-card-package",
|
|
6068
|
+
children: widget.packageDisplayName
|
|
6069
|
+
})]
|
|
6070
|
+
})]
|
|
6071
|
+
}, widget.key);
|
|
6072
|
+
})]
|
|
6073
|
+
});
|
|
6074
|
+
};
|
|
6075
|
+
|
|
6076
|
+
function ownKeys$A(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; }
|
|
6077
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6078
|
+
var TOTAL_STEPS = 6; // Steps 0-5
|
|
6079
|
+
|
|
6080
|
+
var initialState = {
|
|
6081
|
+
step: 0,
|
|
6082
|
+
intent: [],
|
|
6083
|
+
providers: [],
|
|
6084
|
+
selectedWidgets: [],
|
|
6085
|
+
selectedDashboard: null,
|
|
6086
|
+
layout: {
|
|
6087
|
+
templateKey: null,
|
|
6088
|
+
widgetOrder: []
|
|
6089
|
+
},
|
|
6090
|
+
customization: {
|
|
6091
|
+
name: "",
|
|
6092
|
+
menuId: null,
|
|
6093
|
+
theme: null
|
|
6094
|
+
},
|
|
6095
|
+
path: null
|
|
6096
|
+
};
|
|
6097
|
+
function wizardReducer(state, action) {
|
|
6098
|
+
switch (action.type) {
|
|
6099
|
+
case "SET_STEP":
|
|
6100
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6101
|
+
step: action.payload
|
|
6102
|
+
});
|
|
6103
|
+
case "SET_INTENT":
|
|
6104
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6105
|
+
intent: action.payload
|
|
6106
|
+
});
|
|
6107
|
+
case "TOGGLE_INTENT":
|
|
6108
|
+
{
|
|
6109
|
+
var intent = state.intent.includes(action.payload) ? state.intent.filter(function (i) {
|
|
6110
|
+
return i !== action.payload;
|
|
6111
|
+
}) : [].concat(_toConsumableArray(state.intent), [action.payload]);
|
|
6112
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6113
|
+
intent: intent
|
|
6114
|
+
});
|
|
6115
|
+
}
|
|
6116
|
+
case "SET_PROVIDERS":
|
|
6117
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6118
|
+
providers: action.payload
|
|
6119
|
+
});
|
|
6120
|
+
case "TOGGLE_PROVIDER":
|
|
6121
|
+
{
|
|
6122
|
+
var providers = state.providers.includes(action.payload) ? state.providers.filter(function (p) {
|
|
6123
|
+
return p !== action.payload;
|
|
6124
|
+
}) : [].concat(_toConsumableArray(state.providers), [action.payload]);
|
|
6125
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6126
|
+
providers: providers
|
|
6127
|
+
});
|
|
6128
|
+
}
|
|
6129
|
+
case "SET_SELECTED_WIDGETS":
|
|
6130
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6131
|
+
selectedWidgets: action.payload
|
|
6132
|
+
});
|
|
6133
|
+
case "TOGGLE_WIDGET":
|
|
6134
|
+
{
|
|
6135
|
+
var exists = state.selectedWidgets.some(function (w) {
|
|
6136
|
+
return w.name === action.payload.name;
|
|
6137
|
+
});
|
|
6138
|
+
var selectedWidgets = exists ? state.selectedWidgets.filter(function (w) {
|
|
6139
|
+
return w.name !== action.payload.name;
|
|
6140
|
+
}) : [].concat(_toConsumableArray(state.selectedWidgets), [action.payload]);
|
|
6141
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6142
|
+
selectedWidgets: selectedWidgets
|
|
6143
|
+
});
|
|
6144
|
+
}
|
|
6145
|
+
case "SET_SELECTED_DASHBOARD":
|
|
6146
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6147
|
+
selectedDashboard: action.payload
|
|
6148
|
+
});
|
|
6149
|
+
case "SET_PATH":
|
|
6150
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6151
|
+
path: action.payload
|
|
6152
|
+
});
|
|
6153
|
+
case "SET_LAYOUT":
|
|
6154
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6155
|
+
layout: action.payload
|
|
6156
|
+
});
|
|
6157
|
+
case "REORDER_WIDGETS":
|
|
6158
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6159
|
+
layout: _objectSpread$A(_objectSpread$A({}, state.layout), {}, {
|
|
6160
|
+
widgetOrder: action.payload
|
|
6161
|
+
})
|
|
6162
|
+
});
|
|
6163
|
+
case "SET_CUSTOMIZATION":
|
|
6164
|
+
return _objectSpread$A(_objectSpread$A({}, state), {}, {
|
|
6165
|
+
customization: _objectSpread$A(_objectSpread$A({}, state.customization), action.payload)
|
|
6166
|
+
});
|
|
6167
|
+
case "RESET":
|
|
6168
|
+
return _objectSpread$A({}, initialState);
|
|
6169
|
+
default:
|
|
6170
|
+
return state;
|
|
6171
|
+
}
|
|
6172
|
+
}
|
|
6173
|
+
function widgetCountToTemplate(count) {
|
|
6174
|
+
if (count <= 1) return "single";
|
|
6175
|
+
if (count === 2) return "two-columns";
|
|
6176
|
+
if (count === 3) return "three-columns";
|
|
6177
|
+
if (count === 4) return "two-by-two";
|
|
6178
|
+
if (count <= 6) return "two-by-three";
|
|
6179
|
+
return "three-by-three";
|
|
6180
|
+
}
|
|
6181
|
+
function getCanProceed(state) {
|
|
6182
|
+
switch (state.step) {
|
|
6183
|
+
case 0:
|
|
6184
|
+
return state.intent.length > 0;
|
|
6185
|
+
case 1:
|
|
6186
|
+
return state.providers.length > 0;
|
|
6187
|
+
case 2:
|
|
6188
|
+
return state.path === "prebuilt" ? state.selectedDashboard !== null : state.selectedWidgets.length > 0;
|
|
6189
|
+
case 3:
|
|
6190
|
+
return state.layout.templateKey !== null;
|
|
6191
|
+
case 4:
|
|
6192
|
+
return state.customization.name.trim().length > 0;
|
|
6193
|
+
case 5:
|
|
6194
|
+
return true;
|
|
6195
|
+
default:
|
|
6196
|
+
return false;
|
|
6197
|
+
}
|
|
6198
|
+
}
|
|
6199
|
+
var useWizardState = function useWizardState() {
|
|
6200
|
+
var _useReducer = useReducer(wizardReducer, initialState),
|
|
6201
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
6202
|
+
state = _useReducer2[0],
|
|
6203
|
+
dispatch = _useReducer2[1];
|
|
6204
|
+
var canProceed = useMemo(function () {
|
|
6205
|
+
return getCanProceed(state);
|
|
6206
|
+
}, [state]);
|
|
6207
|
+
var selectedCount = useMemo(function () {
|
|
6208
|
+
return state.selectedWidgets.length;
|
|
6209
|
+
}, [state.selectedWidgets]);
|
|
6210
|
+
var isPrebuiltPath = state.path === "prebuilt";
|
|
6211
|
+
var isCustomPath = state.path === "custom";
|
|
6212
|
+
var nextStep = useCallback(function () {
|
|
6213
|
+
if (getCanProceed(state) && state.step < TOTAL_STEPS - 1) {
|
|
6214
|
+
dispatch({
|
|
6215
|
+
type: "SET_STEP",
|
|
6216
|
+
payload: state.step + 1
|
|
6217
|
+
});
|
|
6218
|
+
}
|
|
6219
|
+
}, [state]);
|
|
6220
|
+
var prevStep = useCallback(function () {
|
|
6221
|
+
if (state.step > 0) {
|
|
6222
|
+
dispatch({
|
|
6223
|
+
type: "SET_STEP",
|
|
6224
|
+
payload: state.step - 1
|
|
6225
|
+
});
|
|
6226
|
+
}
|
|
6227
|
+
}, [state.step]);
|
|
6228
|
+
var goToStep = useCallback(function (n) {
|
|
6229
|
+
if (n >= 0 && n < TOTAL_STEPS) {
|
|
6230
|
+
dispatch({
|
|
6231
|
+
type: "SET_STEP",
|
|
6232
|
+
payload: n
|
|
6233
|
+
});
|
|
6234
|
+
}
|
|
6235
|
+
}, []);
|
|
6236
|
+
return {
|
|
6237
|
+
state: state,
|
|
6238
|
+
dispatch: dispatch,
|
|
6239
|
+
nextStep: nextStep,
|
|
6240
|
+
prevStep: prevStep,
|
|
6241
|
+
goToStep: goToStep,
|
|
6242
|
+
canProceed: canProceed,
|
|
6243
|
+
selectedCount: selectedCount,
|
|
6244
|
+
isPrebuiltPath: isPrebuiltPath,
|
|
6245
|
+
isCustomPath: isCustomPath,
|
|
6246
|
+
widgetCountToTemplate: widgetCountToTemplate
|
|
6247
|
+
};
|
|
6248
|
+
};
|
|
6249
|
+
|
|
6250
|
+
var WizardLayoutPreviewStep = function WizardLayoutPreviewStep(_ref) {
|
|
6251
|
+
var state = _ref.state,
|
|
6252
|
+
dispatch = _ref.dispatch;
|
|
6253
|
+
var isPrebuilt = state.path === "prebuilt";
|
|
6254
|
+
|
|
6255
|
+
// Auto-select template and populate widget order on mount / widget change
|
|
6256
|
+
useEffect(function () {
|
|
6257
|
+
if (isPrebuilt) return;
|
|
6258
|
+
var templateKey = widgetCountToTemplate(state.selectedWidgets.length);
|
|
6259
|
+
var template = layoutTemplates.find(function (t) {
|
|
6260
|
+
return t.id === templateKey;
|
|
6261
|
+
});
|
|
6262
|
+
if (!template) return;
|
|
6263
|
+
|
|
6264
|
+
// Only update if template changed or widget order is empty
|
|
6265
|
+
if (state.layout.templateKey !== templateKey || state.layout.widgetOrder.length === 0) {
|
|
6266
|
+
var widgetOrder = state.selectedWidgets.map(function (w) {
|
|
6267
|
+
return w.name || w.key;
|
|
6268
|
+
});
|
|
6269
|
+
dispatch({
|
|
6270
|
+
type: "SET_LAYOUT",
|
|
6271
|
+
payload: {
|
|
6272
|
+
templateKey: templateKey,
|
|
6273
|
+
widgetOrder: widgetOrder
|
|
6274
|
+
}
|
|
6275
|
+
});
|
|
6276
|
+
}
|
|
6277
|
+
}, [isPrebuilt, state.selectedWidgets, state.layout.templateKey, state.layout.widgetOrder.length, dispatch]);
|
|
6278
|
+
if (isPrebuilt) {
|
|
6279
|
+
return /*#__PURE__*/jsx(PrebuiltPreview, {
|
|
6280
|
+
dashboard: state.selectedDashboard
|
|
6281
|
+
});
|
|
6282
|
+
}
|
|
6283
|
+
var template = layoutTemplates.find(function (t) {
|
|
6284
|
+
return t.id === state.layout.templateKey;
|
|
6285
|
+
});
|
|
6286
|
+
return /*#__PURE__*/jsxs("div", {
|
|
6287
|
+
className: "wizard-layout-step",
|
|
6288
|
+
children: [/*#__PURE__*/jsx("h3", {
|
|
6289
|
+
className: "wizard-step-header",
|
|
6290
|
+
children: "Preview your layout"
|
|
6291
|
+
}), /*#__PURE__*/jsx("p", {
|
|
6292
|
+
className: "wizard-step-description",
|
|
6293
|
+
children: "Drag widgets to rearrange their placement in the grid."
|
|
6294
|
+
}), template ? /*#__PURE__*/jsx(LayoutGrid, {
|
|
6295
|
+
template: template,
|
|
6296
|
+
widgetOrder: state.layout.widgetOrder,
|
|
6297
|
+
widgets: state.selectedWidgets,
|
|
6298
|
+
dispatch: dispatch
|
|
6299
|
+
}) : /*#__PURE__*/jsxs("div", {
|
|
6300
|
+
className: "wizard-empty",
|
|
6301
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6302
|
+
icon: "grid-2",
|
|
6303
|
+
fixedWidth: true,
|
|
6304
|
+
className: "wizard-empty-icon"
|
|
6305
|
+
}), /*#__PURE__*/jsx("p", {
|
|
6306
|
+
children: "No layout template available."
|
|
6307
|
+
})]
|
|
6308
|
+
})]
|
|
6309
|
+
});
|
|
6310
|
+
};
|
|
6311
|
+
|
|
6312
|
+
// --- Pre-built dashboard preview ---
|
|
6313
|
+
|
|
6314
|
+
var PrebuiltPreview = function PrebuiltPreview(_ref2) {
|
|
6315
|
+
var dashboard = _ref2.dashboard;
|
|
6316
|
+
if (!dashboard) {
|
|
6317
|
+
return /*#__PURE__*/jsxs("div", {
|
|
6318
|
+
className: "wizard-layout-step",
|
|
6319
|
+
children: [/*#__PURE__*/jsx("h3", {
|
|
6320
|
+
className: "wizard-step-header",
|
|
6321
|
+
children: "Dashboard preview"
|
|
6322
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6323
|
+
className: "wizard-empty",
|
|
6324
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6325
|
+
icon: "box-open",
|
|
6326
|
+
fixedWidth: true,
|
|
6327
|
+
className: "wizard-empty-icon"
|
|
6328
|
+
}), /*#__PURE__*/jsx("p", {
|
|
6329
|
+
children: "No dashboard selected."
|
|
6330
|
+
})]
|
|
6331
|
+
})]
|
|
6332
|
+
});
|
|
6333
|
+
}
|
|
6334
|
+
var widgets = dashboard.widgets || [];
|
|
6335
|
+
return /*#__PURE__*/jsxs("div", {
|
|
6336
|
+
className: "wizard-layout-step",
|
|
6337
|
+
children: [/*#__PURE__*/jsx("h3", {
|
|
6338
|
+
className: "wizard-step-header",
|
|
6339
|
+
children: "Dashboard preview"
|
|
6340
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6341
|
+
className: "wizard-prebuilt-preview",
|
|
6342
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6343
|
+
className: "wizard-prebuilt-header",
|
|
6344
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6345
|
+
icon: resolveIcon(dashboard.icon || "grid-2"),
|
|
6346
|
+
fixedWidth: true,
|
|
6347
|
+
className: "wizard-prebuilt-icon"
|
|
6348
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6349
|
+
className: "wizard-prebuilt-name",
|
|
6350
|
+
children: dashboard.displayName || dashboard.name
|
|
6351
|
+
})]
|
|
6352
|
+
}), dashboard.description && /*#__PURE__*/jsx("p", {
|
|
6353
|
+
className: "wizard-prebuilt-desc",
|
|
6354
|
+
children: dashboard.description
|
|
6355
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
6356
|
+
className: "wizard-prebuilt-widgets",
|
|
6357
|
+
children: [/*#__PURE__*/jsxs("span", {
|
|
6358
|
+
className: "wizard-prebuilt-widgets-label",
|
|
6359
|
+
children: ["Includes ", widgets.length, " widget", widgets.length !== 1 ? "s" : "", ":"]
|
|
6360
|
+
}), /*#__PURE__*/jsx("ul", {
|
|
6361
|
+
className: "wizard-prebuilt-widget-list",
|
|
6362
|
+
children: widgets.map(function (w, i) {
|
|
6363
|
+
return /*#__PURE__*/jsxs("li", {
|
|
6364
|
+
children: [w.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6365
|
+
icon: resolveIcon(w.icon),
|
|
6366
|
+
fixedWidth: true,
|
|
6367
|
+
className: "wizard-prebuilt-widget-icon"
|
|
6368
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6369
|
+
children: w.displayName || w.name
|
|
6370
|
+
})]
|
|
6371
|
+
}, w.name || i);
|
|
6372
|
+
})
|
|
6373
|
+
})]
|
|
6374
|
+
})]
|
|
6375
|
+
})]
|
|
6376
|
+
});
|
|
6377
|
+
};
|
|
6378
|
+
|
|
6379
|
+
// --- Drag-reorder grid ---
|
|
6380
|
+
|
|
6381
|
+
var LayoutGrid = function LayoutGrid(_ref3) {
|
|
6382
|
+
var template = _ref3.template,
|
|
6383
|
+
widgetOrder = _ref3.widgetOrder,
|
|
6384
|
+
widgets = _ref3.widgets,
|
|
6385
|
+
dispatch = _ref3.dispatch;
|
|
6386
|
+
var _useState = useState(null),
|
|
6387
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
6388
|
+
dragIndex = _useState2[0],
|
|
6389
|
+
setDragIndex = _useState2[1];
|
|
6390
|
+
var _useState3 = useState(null),
|
|
6391
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
6392
|
+
dragOverIndex = _useState4[0],
|
|
6393
|
+
setDragOverIndex = _useState4[1];
|
|
6394
|
+
var dragRef = useRef(null);
|
|
6395
|
+
var totalCells = template.previewCells.length;
|
|
6396
|
+
|
|
6397
|
+
// Build cell contents: widget names for filled cells, null for empty
|
|
6398
|
+
var cellContents = template.previewCells.map(function (_, i) {
|
|
6399
|
+
var widgetId = widgetOrder[i] || null;
|
|
6400
|
+
if (!widgetId) return null;
|
|
6401
|
+
var widget = widgets.find(function (w) {
|
|
6402
|
+
return (w.name || w.key) === widgetId;
|
|
6403
|
+
});
|
|
6404
|
+
return widget || {
|
|
6405
|
+
name: widgetId
|
|
6406
|
+
};
|
|
6407
|
+
});
|
|
6408
|
+
var handleDragStart = useCallback(function (e, index) {
|
|
6409
|
+
setDragIndex(index);
|
|
6410
|
+
dragRef.current = index;
|
|
6411
|
+
e.dataTransfer.effectAllowed = "move";
|
|
6412
|
+
e.dataTransfer.setData("text/plain", String(index));
|
|
6413
|
+
}, []);
|
|
6414
|
+
var handleDragOver = useCallback(function (e, index) {
|
|
6415
|
+
e.preventDefault();
|
|
6416
|
+
e.dataTransfer.dropEffect = "move";
|
|
6417
|
+
setDragOverIndex(index);
|
|
6418
|
+
}, []);
|
|
6419
|
+
var handleDragLeave = useCallback(function () {
|
|
6420
|
+
setDragOverIndex(null);
|
|
6421
|
+
}, []);
|
|
6422
|
+
var handleDrop = useCallback(function (e, dropIndex) {
|
|
6423
|
+
e.preventDefault();
|
|
6424
|
+
var fromIndex = dragRef.current;
|
|
6425
|
+
setDragIndex(null);
|
|
6426
|
+
setDragOverIndex(null);
|
|
6427
|
+
dragRef.current = null;
|
|
6428
|
+
if (fromIndex === null || fromIndex === dropIndex) return;
|
|
6429
|
+
|
|
6430
|
+
// Swap the two positions in widgetOrder
|
|
6431
|
+
var newOrder = _toConsumableArray(widgetOrder);
|
|
6432
|
+
// Pad array to cover all cells
|
|
6433
|
+
while (newOrder.length < totalCells) {
|
|
6434
|
+
newOrder.push(null);
|
|
6435
|
+
}
|
|
6436
|
+
var temp = newOrder[fromIndex];
|
|
6437
|
+
newOrder[fromIndex] = newOrder[dropIndex];
|
|
6438
|
+
newOrder[dropIndex] = temp;
|
|
6439
|
+
|
|
6440
|
+
// Trim trailing nulls
|
|
6441
|
+
while (newOrder.length > 0 && newOrder[newOrder.length - 1] === null) {
|
|
6442
|
+
newOrder.pop();
|
|
6443
|
+
}
|
|
6444
|
+
dispatch({
|
|
6445
|
+
type: "REORDER_WIDGETS",
|
|
6446
|
+
payload: newOrder
|
|
6447
|
+
});
|
|
6448
|
+
}, [widgetOrder, totalCells, dispatch]);
|
|
6449
|
+
var handleDragEnd = useCallback(function () {
|
|
6450
|
+
setDragIndex(null);
|
|
6451
|
+
setDragOverIndex(null);
|
|
6452
|
+
dragRef.current = null;
|
|
6453
|
+
}, []);
|
|
6454
|
+
return /*#__PURE__*/jsx("div", {
|
|
6455
|
+
className: "wizard-layout-grid",
|
|
6456
|
+
style: {
|
|
6457
|
+
display: "grid",
|
|
6458
|
+
gridTemplateRows: "repeat(".concat(template.rows, ", 1fr)"),
|
|
6459
|
+
gridTemplateColumns: "repeat(".concat(template.cols, ", 1fr)")
|
|
6460
|
+
},
|
|
6461
|
+
children: template.previewCells.map(function (cell, i) {
|
|
6462
|
+
var content = cellContents[i];
|
|
6463
|
+
var isDragging = dragIndex === i;
|
|
6464
|
+
var isDragOver = dragOverIndex === i;
|
|
6465
|
+
var hasWidget = content !== null;
|
|
6466
|
+
var cellStyle = {};
|
|
6467
|
+
if (cell.rowSpan) cellStyle.gridRow = "span ".concat(cell.rowSpan);
|
|
6468
|
+
if (cell.colSpan) cellStyle.gridColumn = "span ".concat(cell.colSpan);
|
|
6469
|
+
var classNames = ["wizard-layout-cell", hasWidget ? "wizard-layout-cell--filled" : "wizard-layout-cell--empty", isDragging ? "wizard-layout-cell--dragging" : "", isDragOver ? "wizard-layout-cell--drag-over" : ""].filter(Boolean).join(" ");
|
|
6470
|
+
return /*#__PURE__*/jsx("div", {
|
|
6471
|
+
className: classNames,
|
|
6472
|
+
style: cellStyle,
|
|
6473
|
+
draggable: hasWidget,
|
|
6474
|
+
onDragStart: hasWidget ? function (e) {
|
|
6475
|
+
return handleDragStart(e, i);
|
|
6476
|
+
} : undefined,
|
|
6477
|
+
onDragOver: function onDragOver(e) {
|
|
6478
|
+
return handleDragOver(e, i);
|
|
6479
|
+
},
|
|
6480
|
+
onDragLeave: handleDragLeave,
|
|
6481
|
+
onDrop: function onDrop(e) {
|
|
6482
|
+
return handleDrop(e, i);
|
|
6483
|
+
},
|
|
6484
|
+
onDragEnd: handleDragEnd,
|
|
6485
|
+
children: hasWidget ? /*#__PURE__*/jsxs("div", {
|
|
6486
|
+
className: "wizard-layout-cell-content",
|
|
6487
|
+
children: [content.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6488
|
+
icon: resolveIcon(content.icon),
|
|
6489
|
+
fixedWidth: true,
|
|
6490
|
+
className: "wizard-layout-cell-icon"
|
|
6491
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6492
|
+
className: "wizard-layout-cell-name",
|
|
6493
|
+
children: content.displayName || content.name || content.key
|
|
6494
|
+
}), /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6495
|
+
icon: "grip-vertical",
|
|
6496
|
+
className: "wizard-layout-cell-grip"
|
|
6497
|
+
})]
|
|
6498
|
+
}) : /*#__PURE__*/jsx("div", {
|
|
6499
|
+
className: "wizard-layout-cell-placeholder",
|
|
6500
|
+
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6501
|
+
icon: "plus",
|
|
6502
|
+
fixedWidth: true
|
|
6503
|
+
})
|
|
6504
|
+
})
|
|
6505
|
+
}, "".concat(cell.row, "-").concat(cell.col));
|
|
6506
|
+
})
|
|
6507
|
+
});
|
|
6508
|
+
};
|
|
6509
|
+
|
|
5393
6510
|
var LayoutBuilderAddItemModal = function LayoutBuilderAddItemModal(_ref) {
|
|
5394
6511
|
var workspace = _ref.workspace,
|
|
5395
6512
|
open = _ref.open,
|
|
@@ -9790,8 +10907,8 @@ var deepEqual = function deepEqual(a, b, opts) {
|
|
|
9790
10907
|
|
|
9791
10908
|
var deepEqual$1 = /*@__PURE__*/getDefaultExportFromCjs(deepEqual);
|
|
9792
10909
|
|
|
9793
|
-
function ownKeys$
|
|
9794
|
-
function _objectSpread$
|
|
10910
|
+
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; }
|
|
10911
|
+
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; }
|
|
9795
10912
|
var PanelEditItem = function PanelEditItem(_ref) {
|
|
9796
10913
|
var _ComponentManager$get;
|
|
9797
10914
|
var workspace = _ref.workspace,
|
|
@@ -9851,7 +10968,7 @@ var PanelEditItem = function PanelEditItem(_ref) {
|
|
|
9851
10968
|
var uuid = newItem.uuid || newItem.uuidString;
|
|
9852
10969
|
if (uuid) {
|
|
9853
10970
|
workspaceTemp.selectedProviders = workspaceTemp.selectedProviders || {};
|
|
9854
|
-
workspaceTemp.selectedProviders[uuid] = _objectSpread$
|
|
10971
|
+
workspaceTemp.selectedProviders[uuid] = _objectSpread$z(_objectSpread$z({}, workspaceTemp.selectedProviders[uuid] || {}), {}, _defineProperty({}, providerType, providerId));
|
|
9855
10972
|
}
|
|
9856
10973
|
onUpdate(newItem, workspaceTemp);
|
|
9857
10974
|
forceUpdate();
|
|
@@ -9980,7 +11097,7 @@ var PanelEditItem = function PanelEditItem(_ref) {
|
|
|
9980
11097
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
9981
11098
|
name = _ref5[0],
|
|
9982
11099
|
p = _ref5[1];
|
|
9983
|
-
return _objectSpread$
|
|
11100
|
+
return _objectSpread$z({
|
|
9984
11101
|
name: name
|
|
9985
11102
|
}, p);
|
|
9986
11103
|
});
|
|
@@ -10022,11 +11139,11 @@ var PanelEditItem = function PanelEditItem(_ref) {
|
|
|
10022
11139
|
};
|
|
10023
11140
|
|
|
10024
11141
|
var _excluded$5 = ["rows", "cols"];
|
|
10025
|
-
function _createForOfIteratorHelper$
|
|
10026
|
-
function _unsupportedIterableToArray$
|
|
10027
|
-
function _arrayLikeToArray$
|
|
10028
|
-
function ownKeys$
|
|
10029
|
-
function _objectSpread$
|
|
11142
|
+
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; } } }; }
|
|
11143
|
+
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; } }
|
|
11144
|
+
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; }
|
|
11145
|
+
function ownKeys$y(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; }
|
|
11146
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10030
11147
|
var defaultGrid = {
|
|
10031
11148
|
rows: 1,
|
|
10032
11149
|
cols: 1,
|
|
@@ -10047,7 +11164,7 @@ function GridEditor(_ref) {
|
|
|
10047
11164
|
setGrid = _useState2[1];
|
|
10048
11165
|
var addRow = function addRow() {
|
|
10049
11166
|
var newRow = grid.rows;
|
|
10050
|
-
var newGrid = _objectSpread$
|
|
11167
|
+
var newGrid = _objectSpread$y(_objectSpread$y({}, grid), {}, {
|
|
10051
11168
|
rows: grid.rows + 1
|
|
10052
11169
|
});
|
|
10053
11170
|
for (var col = 0; col < grid.cols; col++) {
|
|
@@ -10062,7 +11179,7 @@ function GridEditor(_ref) {
|
|
|
10062
11179
|
};
|
|
10063
11180
|
var addColumn = function addColumn() {
|
|
10064
11181
|
var newCol = grid.cols;
|
|
10065
|
-
var newGrid = _objectSpread$
|
|
11182
|
+
var newGrid = _objectSpread$y(_objectSpread$y({}, grid), {}, {
|
|
10066
11183
|
cols: grid.cols + 1
|
|
10067
11184
|
});
|
|
10068
11185
|
for (var row = 0; row < grid.rows; row++) {
|
|
@@ -10095,8 +11212,8 @@ function GridEditor(_ref) {
|
|
|
10095
11212
|
});
|
|
10096
11213
|
}
|
|
10097
11214
|
if (grid[nextKey]) {
|
|
10098
|
-
var newGrid = _objectSpread$
|
|
10099
|
-
newGrid[currentKey] = _objectSpread$
|
|
11215
|
+
var newGrid = _objectSpread$y({}, grid);
|
|
11216
|
+
newGrid[currentKey] = _objectSpread$y(_objectSpread$y({}, newGrid[currentKey]), {}, {
|
|
10100
11217
|
colSpan: newGrid[currentKey].colSpan + 1
|
|
10101
11218
|
});
|
|
10102
11219
|
delete newGrid[nextKey];
|
|
@@ -10109,8 +11226,8 @@ function GridEditor(_ref) {
|
|
|
10109
11226
|
var currentKey = "".concat(row, ".").concat(col);
|
|
10110
11227
|
var belowKey = "".concat(row + 1, ".").concat(col);
|
|
10111
11228
|
if (grid[belowKey]) {
|
|
10112
|
-
var newGrid = _objectSpread$
|
|
10113
|
-
newGrid[currentKey] = _objectSpread$
|
|
11229
|
+
var newGrid = _objectSpread$y({}, grid);
|
|
11230
|
+
newGrid[currentKey] = _objectSpread$y(_objectSpread$y({}, newGrid[currentKey]), {}, {
|
|
10114
11231
|
rowSpan: newGrid[currentKey].rowSpan + 1
|
|
10115
11232
|
});
|
|
10116
11233
|
delete newGrid[belowKey];
|
|
@@ -10127,7 +11244,7 @@ function GridEditor(_ref) {
|
|
|
10127
11244
|
var splitCell = function splitCell(row, col) {
|
|
10128
11245
|
var key = "".concat(row, ".").concat(col);
|
|
10129
11246
|
var cell = grid[key];
|
|
10130
|
-
var newGrid = _objectSpread$
|
|
11247
|
+
var newGrid = _objectSpread$y({}, grid);
|
|
10131
11248
|
|
|
10132
11249
|
// we have to check the colspan, and since the colspan is greater than 1
|
|
10133
11250
|
// Only handle horizontal split if colSpan > 1
|
|
@@ -10143,13 +11260,13 @@ function GridEditor(_ref) {
|
|
|
10143
11260
|
var oldKey = "".concat(row, ".").concat(c);
|
|
10144
11261
|
var newKey = "".concat(row, ".").concat(c + 1);
|
|
10145
11262
|
if (newGrid[oldKey]) {
|
|
10146
|
-
newGrid[newKey] = _objectSpread$
|
|
11263
|
+
newGrid[newKey] = _objectSpread$y({}, newGrid[oldKey]);
|
|
10147
11264
|
delete newGrid[oldKey];
|
|
10148
11265
|
}
|
|
10149
11266
|
}
|
|
10150
11267
|
|
|
10151
11268
|
// Update the original cell's colSpan
|
|
10152
|
-
newGrid[key] = _objectSpread$
|
|
11269
|
+
newGrid[key] = _objectSpread$y(_objectSpread$y({}, cell), {}, {
|
|
10153
11270
|
colSpan: cell.colSpan - 1
|
|
10154
11271
|
});
|
|
10155
11272
|
|
|
@@ -10161,7 +11278,7 @@ function GridEditor(_ref) {
|
|
|
10161
11278
|
};
|
|
10162
11279
|
}
|
|
10163
11280
|
if (cell.rowSpan > 1) {
|
|
10164
|
-
newGrid[key] = _objectSpread$
|
|
11281
|
+
newGrid[key] = _objectSpread$y(_objectSpread$y({}, newGrid[key]), {}, {
|
|
10165
11282
|
rowSpan: cell.rowSpan - 1
|
|
10166
11283
|
});
|
|
10167
11284
|
newGrid["".concat(row + 1, ".").concat(col)] = {
|
|
@@ -10177,7 +11294,7 @@ function GridEditor(_ref) {
|
|
|
10177
11294
|
function sortObjectByKeys(obj) {
|
|
10178
11295
|
var sortedKeys = Object.keys(obj).sort();
|
|
10179
11296
|
var sortedObj = {};
|
|
10180
|
-
var _iterator = _createForOfIteratorHelper$
|
|
11297
|
+
var _iterator = _createForOfIteratorHelper$d(sortedKeys),
|
|
10181
11298
|
_step;
|
|
10182
11299
|
try {
|
|
10183
11300
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -10280,7 +11397,7 @@ function GridEditor(_ref) {
|
|
|
10280
11397
|
var fromKey = "".concat(from.row, ".").concat(from.col);
|
|
10281
11398
|
var toKey = "".concat(to.row, ".").concat(to.col);
|
|
10282
11399
|
if (fromKey === toKey) return;
|
|
10283
|
-
var newGrid = _objectSpread$
|
|
11400
|
+
var newGrid = _objectSpread$y({}, grid);
|
|
10284
11401
|
|
|
10285
11402
|
// Swap the cells
|
|
10286
11403
|
var temp = newGrid[fromKey];
|
|
@@ -10306,7 +11423,7 @@ function GridEditor(_ref) {
|
|
|
10306
11423
|
// console.log("Grid updated:", sequencedGrid);
|
|
10307
11424
|
}
|
|
10308
11425
|
function resetGridLayout() {
|
|
10309
|
-
var newGrid = _objectSpread$
|
|
11426
|
+
var newGrid = _objectSpread$y({}, defaultGrid);
|
|
10310
11427
|
setGrid(newGrid);
|
|
10311
11428
|
onUpdate(newGrid);
|
|
10312
11429
|
}
|
|
@@ -10584,8 +11701,8 @@ var PanelEditItemGrid = function PanelEditItemGrid(_ref) {
|
|
|
10584
11701
|
});
|
|
10585
11702
|
};
|
|
10586
11703
|
|
|
10587
|
-
function ownKeys$
|
|
10588
|
-
function _objectSpread$
|
|
11704
|
+
function ownKeys$x(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; }
|
|
11705
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$x(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$x(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10589
11706
|
var PanelEditItemNotifications = function PanelEditItemNotifications(_ref) {
|
|
10590
11707
|
var item = _ref.item;
|
|
10591
11708
|
_ref.workspace;
|
|
@@ -10608,7 +11725,7 @@ var PanelEditItemNotifications = function PanelEditItemNotifications(_ref) {
|
|
|
10608
11725
|
}, [widgetUuid, notificationDefs.length]);
|
|
10609
11726
|
function handleNotifToggle(typeKey, value) {
|
|
10610
11727
|
var _window$mainApi2;
|
|
10611
|
-
var updated = _objectSpread$
|
|
11728
|
+
var updated = _objectSpread$x(_objectSpread$x({}, notifPrefs), {}, _defineProperty({}, typeKey, value));
|
|
10612
11729
|
setNotifPrefs(updated);
|
|
10613
11730
|
if ((_window$mainApi2 = window.mainApi) !== null && _window$mainApi2 !== void 0 && (_window$mainApi2 = _window$mainApi2.notifications) !== null && _window$mainApi2 !== void 0 && _window$mainApi2.setPreferences && widgetUuid) {
|
|
10614
11731
|
window.mainApi.notifications.setPreferences(widgetUuid, _defineProperty({}, typeKey, value));
|
|
@@ -10650,11 +11767,11 @@ var PanelEditItemNotifications = function PanelEditItemNotifications(_ref) {
|
|
|
10650
11767
|
});
|
|
10651
11768
|
};
|
|
10652
11769
|
|
|
10653
|
-
function _createForOfIteratorHelper$
|
|
10654
|
-
function _unsupportedIterableToArray$
|
|
10655
|
-
function _arrayLikeToArray$
|
|
10656
|
-
function ownKeys$
|
|
10657
|
-
function _objectSpread$
|
|
11770
|
+
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; } } }; }
|
|
11771
|
+
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; } }
|
|
11772
|
+
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; }
|
|
11773
|
+
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; }
|
|
11774
|
+
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; }
|
|
10658
11775
|
var DAYS = [{
|
|
10659
11776
|
key: "mon",
|
|
10660
11777
|
label: "Mon"
|
|
@@ -10755,7 +11872,7 @@ function TaskScheduleEditor(_ref) {
|
|
|
10755
11872
|
var _window$mainApi;
|
|
10756
11873
|
var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10757
11874
|
if (!((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && (_window$mainApi = _window$mainApi.scheduler) !== null && _window$mainApi !== void 0 && _window$mainApi.registerTask)) return;
|
|
10758
|
-
var payload = _objectSpread$
|
|
11875
|
+
var payload = _objectSpread$w({
|
|
10759
11876
|
widgetId: widgetId,
|
|
10760
11877
|
widgetName: widgetName,
|
|
10761
11878
|
workspaceId: workspaceId || "",
|
|
@@ -10981,7 +12098,7 @@ var PanelEditItemSchedule = function PanelEditItemSchedule(_ref2) {
|
|
|
10981
12098
|
setIsLoading(true);
|
|
10982
12099
|
window.mainApi.scheduler.getTasks(widgetUuid).then(function (tasks) {
|
|
10983
12100
|
var stateMap = {};
|
|
10984
|
-
var _iterator = _createForOfIteratorHelper$
|
|
12101
|
+
var _iterator = _createForOfIteratorHelper$c(tasks || []),
|
|
10985
12102
|
_step;
|
|
10986
12103
|
try {
|
|
10987
12104
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -13026,8 +14143,8 @@ var WidgetIcon = function WidgetIcon(_ref) {
|
|
|
13026
14143
|
});
|
|
13027
14144
|
};
|
|
13028
14145
|
|
|
13029
|
-
function ownKeys$
|
|
13030
|
-
function _objectSpread$
|
|
14146
|
+
function ownKeys$v(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; }
|
|
14147
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13031
14148
|
var ProviderForm = function ProviderForm(_ref) {
|
|
13032
14149
|
var credentialSchema = _ref.credentialSchema,
|
|
13033
14150
|
_ref$initialValues = _ref.initialValues,
|
|
@@ -13072,14 +14189,14 @@ var ProviderForm = function ProviderForm(_ref) {
|
|
|
13072
14189
|
var oldKey = f.key;
|
|
13073
14190
|
if (oldKey && formData[oldKey] !== undefined) {
|
|
13074
14191
|
setFormData(function (fd) {
|
|
13075
|
-
var updated = _objectSpread$
|
|
14192
|
+
var updated = _objectSpread$v({}, fd);
|
|
13076
14193
|
var val = updated[oldKey];
|
|
13077
14194
|
delete updated[oldKey];
|
|
13078
14195
|
if (newKey.trim()) updated[newKey] = val;
|
|
13079
14196
|
return updated;
|
|
13080
14197
|
});
|
|
13081
14198
|
}
|
|
13082
|
-
return _objectSpread$
|
|
14199
|
+
return _objectSpread$v(_objectSpread$v({}, f), {}, {
|
|
13083
14200
|
key: newKey
|
|
13084
14201
|
});
|
|
13085
14202
|
});
|
|
@@ -13091,14 +14208,14 @@ var ProviderForm = function ProviderForm(_ref) {
|
|
|
13091
14208
|
});
|
|
13092
14209
|
if (field !== null && field !== void 0 && field.key) {
|
|
13093
14210
|
setFormData(function (prev) {
|
|
13094
|
-
return _objectSpread$
|
|
14211
|
+
return _objectSpread$v(_objectSpread$v({}, prev), {}, _defineProperty({}, field.key, value));
|
|
13095
14212
|
});
|
|
13096
14213
|
}
|
|
13097
14214
|
};
|
|
13098
14215
|
var handleDynamicSecretToggle = function handleDynamicSecretToggle(id) {
|
|
13099
14216
|
setDynamicFields(function (prev) {
|
|
13100
14217
|
return prev.map(function (f) {
|
|
13101
|
-
return f.id === id ? _objectSpread$
|
|
14218
|
+
return f.id === id ? _objectSpread$v(_objectSpread$v({}, f), {}, {
|
|
13102
14219
|
secret: !f.secret
|
|
13103
14220
|
}) : f;
|
|
13104
14221
|
});
|
|
@@ -13120,7 +14237,7 @@ var ProviderForm = function ProviderForm(_ref) {
|
|
|
13120
14237
|
});
|
|
13121
14238
|
if (field !== null && field !== void 0 && field.key) {
|
|
13122
14239
|
setFormData(function (prev) {
|
|
13123
|
-
var updated = _objectSpread$
|
|
14240
|
+
var updated = _objectSpread$v({}, prev);
|
|
13124
14241
|
delete updated[field.key];
|
|
13125
14242
|
return updated;
|
|
13126
14243
|
});
|
|
@@ -13162,13 +14279,13 @@ var ProviderForm = function ProviderForm(_ref) {
|
|
|
13162
14279
|
*/
|
|
13163
14280
|
var handleInputChange = function handleInputChange(fieldName, value) {
|
|
13164
14281
|
setFormData(function (prev) {
|
|
13165
|
-
return _objectSpread$
|
|
14282
|
+
return _objectSpread$v(_objectSpread$v({}, prev), {}, _defineProperty({}, fieldName, value));
|
|
13166
14283
|
});
|
|
13167
14284
|
|
|
13168
14285
|
// Clear error for this field if it was filled
|
|
13169
14286
|
if (errors[fieldName] && value !== null && value !== void 0 && value.trim()) {
|
|
13170
14287
|
setErrors(function (prev) {
|
|
13171
|
-
var newErrors = _objectSpread$
|
|
14288
|
+
var newErrors = _objectSpread$v({}, prev);
|
|
13172
14289
|
delete newErrors[fieldName];
|
|
13173
14290
|
return newErrors;
|
|
13174
14291
|
});
|
|
@@ -13206,7 +14323,7 @@ var ProviderForm = function ProviderForm(_ref) {
|
|
|
13206
14323
|
// Clear error if filled
|
|
13207
14324
|
if (errors.providerName && value !== null && value !== void 0 && value.trim()) {
|
|
13208
14325
|
setErrors(function (prev) {
|
|
13209
|
-
var newErrors = _objectSpread$
|
|
14326
|
+
var newErrors = _objectSpread$v({}, prev);
|
|
13210
14327
|
delete newErrors.providerName;
|
|
13211
14328
|
return newErrors;
|
|
13212
14329
|
});
|
|
@@ -13443,8 +14560,8 @@ var ToolSelector = function ToolSelector(_ref) {
|
|
|
13443
14560
|
});
|
|
13444
14561
|
};
|
|
13445
14562
|
|
|
13446
|
-
function ownKeys$
|
|
13447
|
-
function _objectSpread$
|
|
14563
|
+
function ownKeys$u(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; }
|
|
14564
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$u(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$u(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13448
14565
|
/**
|
|
13449
14566
|
* Shared MCP utility functions.
|
|
13450
14567
|
*
|
|
@@ -13572,7 +14689,7 @@ function buildMcpConfigFromOverrides(baseMcpConfig, envMappingRows, headerRows)
|
|
|
13572
14689
|
headerTemplate[name] = value;
|
|
13573
14690
|
}
|
|
13574
14691
|
});
|
|
13575
|
-
var config = _objectSpread$
|
|
14692
|
+
var config = _objectSpread$u({}, baseMcpConfig);
|
|
13576
14693
|
if (Object.keys(headerTemplate).length > 0) {
|
|
13577
14694
|
config.headerTemplate = headerTemplate;
|
|
13578
14695
|
} else {
|
|
@@ -13590,7 +14707,7 @@ function buildMcpConfigFromOverrides(baseMcpConfig, envMappingRows, headerRows)
|
|
|
13590
14707
|
envMapping[env] = cred;
|
|
13591
14708
|
}
|
|
13592
14709
|
});
|
|
13593
|
-
return _objectSpread$
|
|
14710
|
+
return _objectSpread$u(_objectSpread$u({}, baseMcpConfig), {}, {
|
|
13594
14711
|
envMapping: envMapping
|
|
13595
14712
|
});
|
|
13596
14713
|
}
|
|
@@ -13831,11 +14948,11 @@ var getUserConfigurableProviders = function getUserConfigurableProviders(provide
|
|
|
13831
14948
|
});
|
|
13832
14949
|
};
|
|
13833
14950
|
|
|
13834
|
-
function _createForOfIteratorHelper$
|
|
13835
|
-
function _unsupportedIterableToArray$
|
|
13836
|
-
function _arrayLikeToArray$
|
|
13837
|
-
function ownKeys$
|
|
13838
|
-
function _objectSpread$
|
|
14951
|
+
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; } } }; }
|
|
14952
|
+
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; } }
|
|
14953
|
+
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; }
|
|
14954
|
+
function ownKeys$t(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; }
|
|
14955
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$t(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$t(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13839
14956
|
var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
13840
14957
|
var isOpen = _ref.isOpen,
|
|
13841
14958
|
onClose = _ref.onClose,
|
|
@@ -14012,7 +15129,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14012
15129
|
.map(function (entry) {
|
|
14013
15130
|
var widget = allWidgets[entry.widgetKey];
|
|
14014
15131
|
if (!widget) return null; // Widget no longer exists
|
|
14015
|
-
return _objectSpread$
|
|
15132
|
+
return _objectSpread$t(_objectSpread$t({
|
|
14016
15133
|
key: entry.widgetKey
|
|
14017
15134
|
}, widget), {}, {
|
|
14018
15135
|
savedProviders: entry.providers || {},
|
|
@@ -14100,11 +15217,11 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14100
15217
|
|
|
14101
15218
|
// Flatten all widgets from all packages for the widget list
|
|
14102
15219
|
flatWidgets = [];
|
|
14103
|
-
_iterator = _createForOfIteratorHelper$
|
|
15220
|
+
_iterator = _createForOfIteratorHelper$b(result.packages || []);
|
|
14104
15221
|
try {
|
|
14105
15222
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
14106
15223
|
pkg = _step.value;
|
|
14107
|
-
_iterator2 = _createForOfIteratorHelper$
|
|
15224
|
+
_iterator2 = _createForOfIteratorHelper$b(pkg.widgets || []);
|
|
14108
15225
|
try {
|
|
14109
15226
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
14110
15227
|
widget = _step2.value;
|
|
@@ -14163,7 +15280,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14163
15280
|
// Get widgets from ComponentManager
|
|
14164
15281
|
var allWidgets = ComponentManager.map();
|
|
14165
15282
|
var widgetList = Object.keys(allWidgets).map(function (key) {
|
|
14166
|
-
return _objectSpread$
|
|
15283
|
+
return _objectSpread$t({
|
|
14167
15284
|
key: key
|
|
14168
15285
|
}, allWidgets[key]);
|
|
14169
15286
|
}).filter(function (widget) {
|
|
@@ -14394,7 +15511,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14394
15511
|
setInlineCreateType(null);
|
|
14395
15512
|
setInlineCreateSchema({});
|
|
14396
15513
|
setInlineCreateError(null);
|
|
14397
|
-
setSelectedProviders(_objectSpread$
|
|
15514
|
+
setSelectedProviders(_objectSpread$t(_objectSpread$t({}, selectedProviders), {}, _defineProperty({}, providerType, providerName)));
|
|
14398
15515
|
}
|
|
14399
15516
|
};
|
|
14400
15517
|
var handleInlineProviderSubmit = function handleInlineProviderSubmit(formData) {
|
|
@@ -14415,7 +15532,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14415
15532
|
|
|
14416
15533
|
// Auto-select the newly created provider
|
|
14417
15534
|
setSelectedProviders(function (prev) {
|
|
14418
|
-
return _objectSpread$
|
|
15535
|
+
return _objectSpread$t(_objectSpread$t({}, prev), {}, _defineProperty({}, providerType, providerName));
|
|
14419
15536
|
});
|
|
14420
15537
|
|
|
14421
15538
|
// Collapse the inline form
|
|
@@ -14469,11 +15586,11 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14469
15586
|
};
|
|
14470
15587
|
var inlineHandleCredentialChange = function inlineHandleCredentialChange(fieldName, value) {
|
|
14471
15588
|
setInlineCredentialData(function (prev) {
|
|
14472
|
-
return _objectSpread$
|
|
15589
|
+
return _objectSpread$t(_objectSpread$t({}, prev), {}, _defineProperty({}, fieldName, value));
|
|
14473
15590
|
});
|
|
14474
15591
|
if (inlineFormErrors[fieldName] && value !== null && value !== void 0 && value.trim()) {
|
|
14475
15592
|
setInlineFormErrors(function (prev) {
|
|
14476
|
-
var next = _objectSpread$
|
|
15593
|
+
var next = _objectSpread$t({}, prev);
|
|
14477
15594
|
delete next[fieldName];
|
|
14478
15595
|
return next;
|
|
14479
15596
|
});
|
|
@@ -14566,7 +15683,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14566
15683
|
refreshProviders();
|
|
14567
15684
|
}
|
|
14568
15685
|
setSelectedProviders(function (prev) {
|
|
14569
|
-
return _objectSpread$
|
|
15686
|
+
return _objectSpread$t(_objectSpread$t({}, prev), {}, _defineProperty({}, providerType, providerName));
|
|
14570
15687
|
});
|
|
14571
15688
|
|
|
14572
15689
|
// Reset stepper state
|
|
@@ -14587,7 +15704,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14587
15704
|
});
|
|
14588
15705
|
};
|
|
14589
15706
|
var handleConfigChange = function handleConfigChange(key, value) {
|
|
14590
|
-
setUserConfigValues(_objectSpread$
|
|
15707
|
+
setUserConfigValues(_objectSpread$t(_objectSpread$t({}, userConfigValues), {}, _defineProperty({}, key, value)));
|
|
14591
15708
|
};
|
|
14592
15709
|
|
|
14593
15710
|
// Install a package from the registry
|
|
@@ -14677,7 +15794,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14677
15794
|
|
|
14678
15795
|
// Phase 3: Save to recent widgets
|
|
14679
15796
|
saveToRecent(selectedWidget, selectedProviders, userConfigValues);
|
|
14680
|
-
onSelectWidget(_objectSpread$
|
|
15797
|
+
onSelectWidget(_objectSpread$t(_objectSpread$t({}, selectedWidget), {}, {
|
|
14681
15798
|
selectedProviders: selectedProviders,
|
|
14682
15799
|
// Pass to parent
|
|
14683
15800
|
userConfigValues: userConfigValues // Pass to parent
|
|
@@ -15313,7 +16430,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
15313
16430
|
setInlineProviderName(value);
|
|
15314
16431
|
if (inlineFormErrors.providerName && value !== null && value !== void 0 && value.trim()) {
|
|
15315
16432
|
setInlineFormErrors(function (prev) {
|
|
15316
|
-
var next = _objectSpread$
|
|
16433
|
+
var next = _objectSpread$t({}, prev);
|
|
15317
16434
|
delete next.providerName;
|
|
15318
16435
|
return next;
|
|
15319
16436
|
});
|
|
@@ -15660,9 +16777,9 @@ var ProviderBadge = function ProviderBadge(_ref) {
|
|
|
15660
16777
|
});
|
|
15661
16778
|
};
|
|
15662
16779
|
|
|
15663
|
-
function _createForOfIteratorHelper$
|
|
15664
|
-
function _unsupportedIterableToArray$
|
|
15665
|
-
function _arrayLikeToArray$
|
|
16780
|
+
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; } } }; }
|
|
16781
|
+
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; } }
|
|
16782
|
+
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; }
|
|
15666
16783
|
var WidgetCardHeader = function WidgetCardHeader(_ref) {
|
|
15667
16784
|
var item = _ref.item,
|
|
15668
16785
|
widget = _ref.widget,
|
|
@@ -15706,7 +16823,7 @@ var WidgetCardHeader = function WidgetCardHeader(_ref) {
|
|
|
15706
16823
|
var el = headerRef.current;
|
|
15707
16824
|
if (!el) return;
|
|
15708
16825
|
var observer = new ResizeObserver(function (entries) {
|
|
15709
|
-
var _iterator = _createForOfIteratorHelper$
|
|
16826
|
+
var _iterator = _createForOfIteratorHelper$a(entries),
|
|
15710
16827
|
_step;
|
|
15711
16828
|
try {
|
|
15712
16829
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -16063,9 +17180,9 @@ var useWidgetSchedulerStatus = function useWidgetSchedulerStatus(widgetId) {
|
|
|
16063
17180
|
};
|
|
16064
17181
|
};
|
|
16065
17182
|
|
|
16066
|
-
function _createForOfIteratorHelper$
|
|
16067
|
-
function _unsupportedIterableToArray$
|
|
16068
|
-
function _arrayLikeToArray$
|
|
17183
|
+
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; } } }; }
|
|
17184
|
+
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; } }
|
|
17185
|
+
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; }
|
|
16069
17186
|
function formatCountdown(ms) {
|
|
16070
17187
|
if (ms == null || ms < 0) return "--";
|
|
16071
17188
|
if (ms < 1000) return "< 1s";
|
|
@@ -16182,7 +17299,7 @@ var WidgetCardStatusBar = function WidgetCardStatusBar(_ref) {
|
|
|
16182
17299
|
|
|
16183
17300
|
// Find soonest countdown among enabled tasks
|
|
16184
17301
|
var soonestMs = null;
|
|
16185
|
-
var _iterator = _createForOfIteratorHelper$
|
|
17302
|
+
var _iterator = _createForOfIteratorHelper$9(enabledTasks),
|
|
16186
17303
|
_step;
|
|
16187
17304
|
try {
|
|
16188
17305
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -16633,8 +17750,8 @@ var ProviderSelector = function ProviderSelector(_ref) {
|
|
|
16633
17750
|
});
|
|
16634
17751
|
};
|
|
16635
17752
|
|
|
16636
|
-
function ownKeys$
|
|
16637
|
-
function _objectSpread$
|
|
17753
|
+
function ownKeys$s(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; }
|
|
17754
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$s(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$s(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16638
17755
|
var AdvancedMcpConfig = function AdvancedMcpConfig(_ref) {
|
|
16639
17756
|
var transport = _ref.transport,
|
|
16640
17757
|
envMappingRows = _ref.envMappingRows,
|
|
@@ -16663,7 +17780,7 @@ var AdvancedMcpConfig = function AdvancedMcpConfig(_ref) {
|
|
|
16663
17780
|
var updateEnvRow = function updateEnvRow(id, field, value) {
|
|
16664
17781
|
onEnvMappingRowsChange(function (prev) {
|
|
16665
17782
|
return prev.map(function (row) {
|
|
16666
|
-
return row.id === id ? _objectSpread$
|
|
17783
|
+
return row.id === id ? _objectSpread$s(_objectSpread$s({}, row), {}, _defineProperty({}, field, value)) : row;
|
|
16667
17784
|
});
|
|
16668
17785
|
});
|
|
16669
17786
|
};
|
|
@@ -16688,7 +17805,7 @@ var AdvancedMcpConfig = function AdvancedMcpConfig(_ref) {
|
|
|
16688
17805
|
var updateHeaderRow = function updateHeaderRow(id, field, value) {
|
|
16689
17806
|
onHeaderRowsChange(function (prev) {
|
|
16690
17807
|
return prev.map(function (row) {
|
|
16691
|
-
return row.id === id ? _objectSpread$
|
|
17808
|
+
return row.id === id ? _objectSpread$s(_objectSpread$s({}, row), {}, _defineProperty({}, field, value)) : row;
|
|
16692
17809
|
});
|
|
16693
17810
|
});
|
|
16694
17811
|
};
|
|
@@ -16837,8 +17954,8 @@ var AdvancedMcpConfig = function AdvancedMcpConfig(_ref) {
|
|
|
16837
17954
|
});
|
|
16838
17955
|
};
|
|
16839
17956
|
|
|
16840
|
-
function ownKeys$
|
|
16841
|
-
function _objectSpread$
|
|
17957
|
+
function ownKeys$r(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; }
|
|
17958
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16842
17959
|
var McpServerPicker = function McpServerPicker(_ref) {
|
|
16843
17960
|
var _testResult$tools;
|
|
16844
17961
|
var isOpen = _ref.isOpen,
|
|
@@ -17017,11 +18134,11 @@ var McpServerPicker = function McpServerPicker(_ref) {
|
|
|
17017
18134
|
// Handle credential field changes
|
|
17018
18135
|
var handleCredentialChange = function handleCredentialChange(fieldName, value) {
|
|
17019
18136
|
setCredentialData(function (prev) {
|
|
17020
|
-
return _objectSpread$
|
|
18137
|
+
return _objectSpread$r(_objectSpread$r({}, prev), {}, _defineProperty({}, fieldName, value));
|
|
17021
18138
|
});
|
|
17022
18139
|
if (formErrors[fieldName] && value !== null && value !== void 0 && value.trim()) {
|
|
17023
18140
|
setFormErrors(function (prev) {
|
|
17024
|
-
var next = _objectSpread$
|
|
18141
|
+
var next = _objectSpread$r({}, prev);
|
|
17025
18142
|
delete next[fieldName];
|
|
17026
18143
|
return next;
|
|
17027
18144
|
});
|
|
@@ -17359,7 +18476,7 @@ var McpServerPicker = function McpServerPicker(_ref) {
|
|
|
17359
18476
|
setProviderName(value);
|
|
17360
18477
|
if (formErrors.providerName && value !== null && value !== void 0 && value.trim()) {
|
|
17361
18478
|
setFormErrors(function (prev) {
|
|
17362
|
-
var next = _objectSpread$
|
|
18479
|
+
var next = _objectSpread$r({}, prev);
|
|
17363
18480
|
delete next.providerName;
|
|
17364
18481
|
return next;
|
|
17365
18482
|
});
|
|
@@ -17549,8 +18666,8 @@ var McpServerPicker = function McpServerPicker(_ref) {
|
|
|
17549
18666
|
});
|
|
17550
18667
|
};
|
|
17551
18668
|
|
|
17552
|
-
function ownKeys$
|
|
17553
|
-
function _objectSpread$
|
|
18669
|
+
function ownKeys$q(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; }
|
|
18670
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17554
18671
|
var USE_ENHANCED_WIDGET_SELECTOR = true; // Set to false to use original modal
|
|
17555
18672
|
|
|
17556
18673
|
/**
|
|
@@ -17596,7 +18713,7 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
17596
18713
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
17597
18714
|
id = _ref3[0],
|
|
17598
18715
|
p = _ref3[1];
|
|
17599
|
-
return _objectSpread$
|
|
18716
|
+
return _objectSpread$q(_objectSpread$q({}, p), {}, {
|
|
17600
18717
|
id: id,
|
|
17601
18718
|
name: p.name || id
|
|
17602
18719
|
});
|
|
@@ -17683,7 +18800,7 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
17683
18800
|
// so we use its layout to replace any corrupted grid data.
|
|
17684
18801
|
if (workspace && workspace["layout"]) {
|
|
17685
18802
|
var model = new DashboardModel(workspace);
|
|
17686
|
-
setCurrentWorkspace(_objectSpread$
|
|
18803
|
+
setCurrentWorkspace(_objectSpread$q(_objectSpread$q({}, workspace), {}, {
|
|
17687
18804
|
layout: model.layout
|
|
17688
18805
|
}));
|
|
17689
18806
|
} else {
|
|
@@ -18074,7 +19191,7 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
18074
19191
|
var uuid = widget.uuid || widget.uuidString;
|
|
18075
19192
|
if (uuid) {
|
|
18076
19193
|
newWorkspace.selectedProviders = newWorkspace.selectedProviders || {};
|
|
18077
|
-
newWorkspace.selectedProviders[uuid] = _objectSpread$
|
|
19194
|
+
newWorkspace.selectedProviders[uuid] = _objectSpread$q(_objectSpread$q({}, newWorkspace.selectedProviders[uuid] || {}), {}, _defineProperty({}, providerType, providerId));
|
|
18078
19195
|
}
|
|
18079
19196
|
setCurrentWorkspace(newWorkspace);
|
|
18080
19197
|
}
|
|
@@ -18209,7 +19326,7 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
18209
19326
|
try {
|
|
18210
19327
|
var config = ComponentManager.config(widgetKey);
|
|
18211
19328
|
if (!config) return;
|
|
18212
|
-
var widgetItem = _objectSpread$
|
|
19329
|
+
var widgetItem = _objectSpread$q(_objectSpread$q({}, config), {}, {
|
|
18213
19330
|
component: widgetKey,
|
|
18214
19331
|
key: widgetKey
|
|
18215
19332
|
});
|
|
@@ -18438,7 +19555,7 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
|
|
|
18438
19555
|
onSelectWidget: function onSelectWidget(widget) {
|
|
18439
19556
|
|
|
18440
19557
|
// Add component property from widget.key
|
|
18441
|
-
var widgetWithComponent = _objectSpread$
|
|
19558
|
+
var widgetWithComponent = _objectSpread$q(_objectSpread$q({}, widget), {}, {
|
|
18442
19559
|
component: widget.key
|
|
18443
19560
|
});
|
|
18444
19561
|
handleClickConfirmAdd(widgetWithComponent, dropdownTarget);
|
|
@@ -20066,8 +21183,8 @@ var MissingProviderPrompt = function MissingProviderPrompt(_ref) {
|
|
|
20066
21183
|
});
|
|
20067
21184
|
};
|
|
20068
21185
|
|
|
20069
|
-
function ownKeys$
|
|
20070
|
-
function _objectSpread$
|
|
21186
|
+
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; }
|
|
21187
|
+
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; }
|
|
20071
21188
|
function _callSuper$4(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20072
21189
|
function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20073
21190
|
var ProviderErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
@@ -20122,7 +21239,7 @@ var ProviderErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
20122
21239
|
_defineProperty(_this, "handleProviderSelect", function (providerType, providerName, credentials) {
|
|
20123
21240
|
|
|
20124
21241
|
// Update local selected providers state
|
|
20125
|
-
var updatedSelected = _objectSpread$
|
|
21242
|
+
var updatedSelected = _objectSpread$p(_objectSpread$p({}, _this.state.selectedProviders), {}, _defineProperty({}, providerType, providerName));
|
|
20126
21243
|
_this.setState({
|
|
20127
21244
|
selectedProviders: updatedSelected
|
|
20128
21245
|
}, function () {
|
|
@@ -20196,8 +21313,8 @@ var ProviderErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
20196
21313
|
}(Component);
|
|
20197
21314
|
_defineProperty(ProviderErrorBoundary, "contextType", ProviderContext);
|
|
20198
21315
|
|
|
20199
|
-
function ownKeys$
|
|
20200
|
-
function _objectSpread$
|
|
21316
|
+
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; }
|
|
21317
|
+
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; }
|
|
20201
21318
|
var withProviderDetection = function withProviderDetection(Component) {
|
|
20202
21319
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
20203
21320
|
_ref$requiredProvider = _ref.requiredProviders,
|
|
@@ -20222,7 +21339,7 @@ var withProviderDetection = function withProviderDetection(Component) {
|
|
|
20222
21339
|
onProviderSelect: onProviderSelect
|
|
20223
21340
|
});
|
|
20224
21341
|
}
|
|
20225
|
-
return /*#__PURE__*/jsx(Component, _objectSpread$
|
|
21342
|
+
return /*#__PURE__*/jsx(Component, _objectSpread$o({}, props));
|
|
20226
21343
|
};
|
|
20227
21344
|
};
|
|
20228
21345
|
|
|
@@ -20436,8 +21553,8 @@ var WidgetHelpers = /*#__PURE__*/function () {
|
|
|
20436
21553
|
}]);
|
|
20437
21554
|
}();
|
|
20438
21555
|
|
|
20439
|
-
function ownKeys$
|
|
20440
|
-
function _objectSpread$
|
|
21556
|
+
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; }
|
|
21557
|
+
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; }
|
|
20441
21558
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20442
21559
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20443
21560
|
var WidgetErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
@@ -20564,7 +21681,7 @@ var WidgetRenderer = function WidgetRenderer(_ref) {
|
|
|
20564
21681
|
|
|
20565
21682
|
// Build widgetData for WidgetContext — hooks read from this
|
|
20566
21683
|
var uuidString = getUUID(params.uuid);
|
|
20567
|
-
var widgetData = _objectSpread$
|
|
21684
|
+
var widgetData = _objectSpread$n(_objectSpread$n({}, params), {}, {
|
|
20568
21685
|
uuidString: uuidString,
|
|
20569
21686
|
providers: (config === null || config === void 0 ? void 0 : config.providers) || [],
|
|
20570
21687
|
notifications: (config === null || config === void 0 ? void 0 : config.notifications) || []
|
|
@@ -20588,7 +21705,7 @@ var WidgetRenderer = function WidgetRenderer(_ref) {
|
|
|
20588
21705
|
widgetData: widgetData
|
|
20589
21706
|
};
|
|
20590
21707
|
var hasScheduledTasks = ((config === null || config === void 0 ? void 0 : config.scheduledTasks) || []).length > 0;
|
|
20591
|
-
var widgetElement = children === null ? /*#__PURE__*/jsx(WidgetComponent, _objectSpread$
|
|
21708
|
+
var widgetElement = children === null ? /*#__PURE__*/jsx(WidgetComponent, _objectSpread$n(_objectSpread$n(_objectSpread$n({
|
|
20592
21709
|
id: "widget-nokids-".concat(widgetKey),
|
|
20593
21710
|
listen: function listen(listeners, handlers) {
|
|
20594
21711
|
return helpers.listen(listeners, handlers);
|
|
@@ -20601,7 +21718,7 @@ var WidgetRenderer = function WidgetRenderer(_ref) {
|
|
|
20601
21718
|
backgroundColor: bgColor,
|
|
20602
21719
|
widgetConfig: helpers.config(),
|
|
20603
21720
|
widgetEventNames: helpers.events()
|
|
20604
|
-
}), "widget-nokids-".concat(widgetKey)) : /*#__PURE__*/jsx(WidgetComponent, _objectSpread$
|
|
21721
|
+
}), "widget-nokids-".concat(widgetKey)) : /*#__PURE__*/jsx(WidgetComponent, _objectSpread$n(_objectSpread$n(_objectSpread$n({
|
|
20605
21722
|
listen: function listen(listeners, handlers) {
|
|
20606
21723
|
return helpers.listen(listeners, handlers);
|
|
20607
21724
|
},
|
|
@@ -20795,11 +21912,11 @@ var ExternalWidget = function ExternalWidget(_ref) {
|
|
|
20795
21912
|
var GRID_CELL_WIDGET_TYPE = "grid-cell-widget";
|
|
20796
21913
|
var SIDEBAR_WIDGET_TYPE = "sidebar-widget";
|
|
20797
21914
|
|
|
20798
|
-
function _createForOfIteratorHelper$
|
|
20799
|
-
function _unsupportedIterableToArray$
|
|
20800
|
-
function _arrayLikeToArray$
|
|
20801
|
-
function ownKeys$
|
|
20802
|
-
function _objectSpread$
|
|
21915
|
+
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; } } }; }
|
|
21916
|
+
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; } }
|
|
21917
|
+
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; }
|
|
21918
|
+
function ownKeys$m(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; }
|
|
21919
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20803
21920
|
var DraggableDroppableCellBody = function DraggableDroppableCellBody(_ref) {
|
|
20804
21921
|
var cellNumber = _ref.cellNumber,
|
|
20805
21922
|
gridContainerId = _ref.gridContainerId,
|
|
@@ -20986,7 +22103,7 @@ var LayoutGridContainer = /*#__PURE__*/memo(function (_ref3) {
|
|
|
20986
22103
|
var _ref5 = _slicedToArray(_ref4, 2),
|
|
20987
22104
|
id = _ref5[0],
|
|
20988
22105
|
provider = _ref5[1];
|
|
20989
|
-
return _objectSpread$
|
|
22106
|
+
return _objectSpread$m({
|
|
20990
22107
|
id: id
|
|
20991
22108
|
}, provider);
|
|
20992
22109
|
}) : [];
|
|
@@ -21361,7 +22478,7 @@ var LayoutGridContainer = /*#__PURE__*/memo(function (_ref3) {
|
|
|
21361
22478
|
return selectable["delete"](cn);
|
|
21362
22479
|
});
|
|
21363
22480
|
var resolved = new Set();
|
|
21364
|
-
var _iterator = _createForOfIteratorHelper$
|
|
22481
|
+
var _iterator = _createForOfIteratorHelper$8(selectable),
|
|
21365
22482
|
_step;
|
|
21366
22483
|
try {
|
|
21367
22484
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -21986,7 +23103,7 @@ var LayoutGridContainer = /*#__PURE__*/memo(function (_ref3) {
|
|
|
21986
23103
|
var widgetSpecificSelections = (workspace === null || workspace === void 0 || (_workspace$selectedPr = workspace.selectedProviders) === null || _workspace$selectedPr === void 0 ? void 0 : _workspace$selectedPr[id]) || {};
|
|
21987
23104
|
|
|
21988
23105
|
// Add provider-related props from workspace
|
|
21989
|
-
var itemWithProviders = _objectSpread$
|
|
23106
|
+
var itemWithProviders = _objectSpread$m(_objectSpread$m({}, item), {}, {
|
|
21990
23107
|
selectedProviders: widgetSpecificSelections,
|
|
21991
23108
|
onProviderSelect: onProviderSelect
|
|
21992
23109
|
});
|
|
@@ -23499,11 +24616,11 @@ function isWidgetResolvable(componentKey) {
|
|
|
23499
24616
|
// isMinOrderForItem
|
|
23500
24617
|
// }
|
|
23501
24618
|
|
|
23502
|
-
function ownKeys$
|
|
23503
|
-
function _objectSpread$
|
|
23504
|
-
function _createForOfIteratorHelper$
|
|
23505
|
-
function _unsupportedIterableToArray$
|
|
23506
|
-
function _arrayLikeToArray$
|
|
24619
|
+
function ownKeys$l(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; }
|
|
24620
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24621
|
+
function _createForOfIteratorHelper$7(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$7(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; } } }; }
|
|
24622
|
+
function _unsupportedIterableToArray$7(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$7(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$7(r, a) : void 0; } }
|
|
24623
|
+
function _arrayLikeToArray$7(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; }
|
|
23507
24624
|
/**
|
|
23508
24625
|
* The model for all layout components used primarily in the renderLayout method
|
|
23509
24626
|
* @param {Object} layoutItem an object containing various attributes of the layout item
|
|
@@ -23515,7 +24632,7 @@ function _arrayLikeToArray$8(r, a) { (null == a || a > r.length) && (a = r.lengt
|
|
|
23515
24632
|
function sortObjectByKeys(obj) {
|
|
23516
24633
|
var sortedKeys = Object.keys(obj).sort();
|
|
23517
24634
|
var sortedObj = {};
|
|
23518
|
-
var _iterator = _createForOfIteratorHelper$
|
|
24635
|
+
var _iterator = _createForOfIteratorHelper$7(sortedKeys),
|
|
23519
24636
|
_step;
|
|
23520
24637
|
try {
|
|
23521
24638
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -23656,7 +24773,7 @@ var LayoutModel = function LayoutModel(layoutItem, workspaceLayout, dashboardId)
|
|
|
23656
24773
|
|
|
23657
24774
|
// Merge user-entered config values (from EnhancedWidgetDropdown) into userPrefs
|
|
23658
24775
|
if ("userConfigValues" in obj && obj.userConfigValues) {
|
|
23659
|
-
layout.userPrefs = _objectSpread$
|
|
24776
|
+
layout.userPrefs = _objectSpread$l(_objectSpread$l({}, layout.userPrefs), obj.userConfigValues);
|
|
23660
24777
|
}
|
|
23661
24778
|
|
|
23662
24779
|
// Preserve provider selections for this widget
|
|
@@ -24184,8 +25301,8 @@ var MenuItemModel = function MenuItemModel() {
|
|
|
24184
25301
|
return m;
|
|
24185
25302
|
};
|
|
24186
25303
|
|
|
24187
|
-
function ownKeys$
|
|
24188
|
-
function _objectSpread$
|
|
25304
|
+
function ownKeys$k(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; }
|
|
25305
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24189
25306
|
/**
|
|
24190
25307
|
* A Model for a Workspace (Dashboard)
|
|
24191
25308
|
* The Dashboard in this instance is the entire Layout inclusive of the workspaces and widgets
|
|
@@ -25449,7 +26566,7 @@ var DashboardModel = /*#__PURE__*/function () {
|
|
|
25449
26566
|
visibleCells.push({
|
|
25450
26567
|
row: r,
|
|
25451
26568
|
col: c,
|
|
25452
|
-
data: _objectSpread$
|
|
26569
|
+
data: _objectSpread$k({}, cell),
|
|
25453
26570
|
spanCol: ((_cell$span = cell.span) === null || _cell$span === void 0 ? void 0 : _cell$span.col) || 1,
|
|
25454
26571
|
spanRow: ((_cell$span2 = cell.span) === null || _cell$span2 === void 0 ? void 0 : _cell$span2.row) || 1
|
|
25455
26572
|
});
|
|
@@ -25471,7 +26588,7 @@ var DashboardModel = /*#__PURE__*/function () {
|
|
|
25471
26588
|
var vc = _visibleCells[_i5];
|
|
25472
26589
|
var newCol = (vc.col - 1) * count + 1;
|
|
25473
26590
|
var _key7 = "".concat(vc.row, ".").concat(newCol);
|
|
25474
|
-
grid[_key7] = _objectSpread$
|
|
26591
|
+
grid[_key7] = _objectSpread$k(_objectSpread$k({}, vc.data), {}, {
|
|
25475
26592
|
hide: false,
|
|
25476
26593
|
span: {
|
|
25477
26594
|
row: vc.spanRow,
|
|
@@ -25546,7 +26663,7 @@ var DashboardModel = /*#__PURE__*/function () {
|
|
|
25546
26663
|
_visibleCells2.push({
|
|
25547
26664
|
row: _r1,
|
|
25548
26665
|
col: _c10,
|
|
25549
|
-
data: _objectSpread$
|
|
26666
|
+
data: _objectSpread$k({}, _cell6),
|
|
25550
26667
|
spanRow: ((_cell6$span = _cell6.span) === null || _cell6$span === void 0 ? void 0 : _cell6$span.row) || 1,
|
|
25551
26668
|
spanCol: ((_cell6$span2 = _cell6.span) === null || _cell6$span2 === void 0 ? void 0 : _cell6$span2.col) || 1
|
|
25552
26669
|
});
|
|
@@ -25568,7 +26685,7 @@ var DashboardModel = /*#__PURE__*/function () {
|
|
|
25568
26685
|
var _vc = _visibleCells3[_i9];
|
|
25569
26686
|
var newRow = (_vc.row - 1) * count + 1;
|
|
25570
26687
|
var _key10 = "".concat(newRow, ".").concat(_vc.col);
|
|
25571
|
-
grid[_key10] = _objectSpread$
|
|
26688
|
+
grid[_key10] = _objectSpread$k(_objectSpread$k({}, _vc.data), {}, {
|
|
25572
26689
|
hide: false,
|
|
25573
26690
|
span: {
|
|
25574
26691
|
row: _vc.spanRow * count,
|
|
@@ -26715,8 +27832,8 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
26715
27832
|
}]);
|
|
26716
27833
|
}(React__default.Component);
|
|
26717
27834
|
|
|
26718
|
-
function ownKeys$
|
|
26719
|
-
function _objectSpread$
|
|
27835
|
+
function ownKeys$j(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; }
|
|
27836
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26720
27837
|
|
|
26721
27838
|
/**
|
|
26722
27839
|
* useDashboard Hook
|
|
@@ -26772,7 +27889,7 @@ var useDashboard = function useDashboard() {
|
|
|
26772
27889
|
}
|
|
26773
27890
|
});
|
|
26774
27891
|
}
|
|
26775
|
-
return _objectSpread$
|
|
27892
|
+
return _objectSpread$j({
|
|
26776
27893
|
app: app,
|
|
26777
27894
|
dashboard: dashboard,
|
|
26778
27895
|
theme: theme
|
|
@@ -26781,9 +27898,9 @@ var useDashboard = function useDashboard() {
|
|
|
26781
27898
|
});
|
|
26782
27899
|
};
|
|
26783
27900
|
|
|
26784
|
-
function _createForOfIteratorHelper$
|
|
26785
|
-
function _unsupportedIterableToArray$
|
|
26786
|
-
function _arrayLikeToArray$
|
|
27901
|
+
function _createForOfIteratorHelper$6(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$6(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; } } }; }
|
|
27902
|
+
function _unsupportedIterableToArray$6(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$6(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$6(r, a) : void 0; } }
|
|
27903
|
+
function _arrayLikeToArray$6(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; }
|
|
26787
27904
|
|
|
26788
27905
|
/**
|
|
26789
27906
|
* useWidgetProviders Hook
|
|
@@ -26834,7 +27951,7 @@ var useWidgetProviders = function useWidgetProviders() {
|
|
|
26834
27951
|
// 1. Widget-level: stored directly on the layout item by handleSelectProvider
|
|
26835
27952
|
// 2. Workspace-level: stored as workspace.selectedProviders[widgetId][providerType]
|
|
26836
27953
|
var providers = {};
|
|
26837
|
-
var _iterator = _createForOfIteratorHelper$
|
|
27954
|
+
var _iterator = _createForOfIteratorHelper$6(providerDeclarations),
|
|
26838
27955
|
_step;
|
|
26839
27956
|
try {
|
|
26840
27957
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -27569,9 +28686,9 @@ var useNotifications = function useNotifications() {
|
|
|
27569
28686
|
};
|
|
27570
28687
|
};
|
|
27571
28688
|
|
|
27572
|
-
function _createForOfIteratorHelper$
|
|
27573
|
-
function _unsupportedIterableToArray$
|
|
27574
|
-
function _arrayLikeToArray$
|
|
28689
|
+
function _createForOfIteratorHelper$5(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$5(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; } } }; }
|
|
28690
|
+
function _unsupportedIterableToArray$5(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$5(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$5(r, a) : void 0; } }
|
|
28691
|
+
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; }
|
|
27575
28692
|
|
|
27576
28693
|
/**
|
|
27577
28694
|
* useScheduler Hook
|
|
@@ -27644,7 +28761,7 @@ var useScheduler = function useScheduler() {
|
|
|
27644
28761
|
if (pending && pending.length > 0) {
|
|
27645
28762
|
setPendingResults(pending);
|
|
27646
28763
|
// Call handlers for each pending result
|
|
27647
|
-
var _iterator = _createForOfIteratorHelper$
|
|
28764
|
+
var _iterator = _createForOfIteratorHelper$5(pending),
|
|
27648
28765
|
_step;
|
|
27649
28766
|
try {
|
|
27650
28767
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -28485,180 +29602,6 @@ function useMcpDashServer() {
|
|
|
28485
29602
|
};
|
|
28486
29603
|
}
|
|
28487
29604
|
|
|
28488
|
-
function ownKeys$j(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; }
|
|
28489
|
-
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28490
|
-
var TOTAL_STEPS = 6; // Steps 0-5
|
|
28491
|
-
|
|
28492
|
-
var initialState = {
|
|
28493
|
-
step: 0,
|
|
28494
|
-
intent: [],
|
|
28495
|
-
providers: [],
|
|
28496
|
-
selectedWidgets: [],
|
|
28497
|
-
selectedDashboard: null,
|
|
28498
|
-
layout: {
|
|
28499
|
-
templateKey: null,
|
|
28500
|
-
widgetOrder: []
|
|
28501
|
-
},
|
|
28502
|
-
customization: {
|
|
28503
|
-
name: "",
|
|
28504
|
-
menuId: null,
|
|
28505
|
-
theme: null
|
|
28506
|
-
},
|
|
28507
|
-
path: null
|
|
28508
|
-
};
|
|
28509
|
-
function wizardReducer(state, action) {
|
|
28510
|
-
switch (action.type) {
|
|
28511
|
-
case "SET_STEP":
|
|
28512
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28513
|
-
step: action.payload
|
|
28514
|
-
});
|
|
28515
|
-
case "SET_INTENT":
|
|
28516
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28517
|
-
intent: action.payload
|
|
28518
|
-
});
|
|
28519
|
-
case "TOGGLE_INTENT":
|
|
28520
|
-
{
|
|
28521
|
-
var intent = state.intent.includes(action.payload) ? state.intent.filter(function (i) {
|
|
28522
|
-
return i !== action.payload;
|
|
28523
|
-
}) : [].concat(_toConsumableArray(state.intent), [action.payload]);
|
|
28524
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28525
|
-
intent: intent
|
|
28526
|
-
});
|
|
28527
|
-
}
|
|
28528
|
-
case "SET_PROVIDERS":
|
|
28529
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28530
|
-
providers: action.payload
|
|
28531
|
-
});
|
|
28532
|
-
case "TOGGLE_PROVIDER":
|
|
28533
|
-
{
|
|
28534
|
-
var providers = state.providers.includes(action.payload) ? state.providers.filter(function (p) {
|
|
28535
|
-
return p !== action.payload;
|
|
28536
|
-
}) : [].concat(_toConsumableArray(state.providers), [action.payload]);
|
|
28537
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28538
|
-
providers: providers
|
|
28539
|
-
});
|
|
28540
|
-
}
|
|
28541
|
-
case "SET_SELECTED_WIDGETS":
|
|
28542
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28543
|
-
selectedWidgets: action.payload
|
|
28544
|
-
});
|
|
28545
|
-
case "TOGGLE_WIDGET":
|
|
28546
|
-
{
|
|
28547
|
-
var exists = state.selectedWidgets.some(function (w) {
|
|
28548
|
-
return w.name === action.payload.name;
|
|
28549
|
-
});
|
|
28550
|
-
var selectedWidgets = exists ? state.selectedWidgets.filter(function (w) {
|
|
28551
|
-
return w.name !== action.payload.name;
|
|
28552
|
-
}) : [].concat(_toConsumableArray(state.selectedWidgets), [action.payload]);
|
|
28553
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28554
|
-
selectedWidgets: selectedWidgets
|
|
28555
|
-
});
|
|
28556
|
-
}
|
|
28557
|
-
case "SET_SELECTED_DASHBOARD":
|
|
28558
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28559
|
-
selectedDashboard: action.payload
|
|
28560
|
-
});
|
|
28561
|
-
case "SET_PATH":
|
|
28562
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28563
|
-
path: action.payload
|
|
28564
|
-
});
|
|
28565
|
-
case "SET_LAYOUT":
|
|
28566
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28567
|
-
layout: action.payload
|
|
28568
|
-
});
|
|
28569
|
-
case "REORDER_WIDGETS":
|
|
28570
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28571
|
-
layout: _objectSpread$j(_objectSpread$j({}, state.layout), {}, {
|
|
28572
|
-
widgetOrder: action.payload
|
|
28573
|
-
})
|
|
28574
|
-
});
|
|
28575
|
-
case "SET_CUSTOMIZATION":
|
|
28576
|
-
return _objectSpread$j(_objectSpread$j({}, state), {}, {
|
|
28577
|
-
customization: _objectSpread$j(_objectSpread$j({}, state.customization), action.payload)
|
|
28578
|
-
});
|
|
28579
|
-
case "RESET":
|
|
28580
|
-
return _objectSpread$j({}, initialState);
|
|
28581
|
-
default:
|
|
28582
|
-
return state;
|
|
28583
|
-
}
|
|
28584
|
-
}
|
|
28585
|
-
function widgetCountToTemplate(count) {
|
|
28586
|
-
if (count <= 1) return "single";
|
|
28587
|
-
if (count === 2) return "two-columns";
|
|
28588
|
-
if (count === 3) return "three-columns";
|
|
28589
|
-
if (count === 4) return "two-by-two";
|
|
28590
|
-
if (count <= 6) return "two-by-three";
|
|
28591
|
-
return "three-by-three";
|
|
28592
|
-
}
|
|
28593
|
-
function getCanProceed(state) {
|
|
28594
|
-
switch (state.step) {
|
|
28595
|
-
case 0:
|
|
28596
|
-
return state.intent.length > 0;
|
|
28597
|
-
case 1:
|
|
28598
|
-
return state.providers.length > 0;
|
|
28599
|
-
case 2:
|
|
28600
|
-
return state.path === "prebuilt" ? state.selectedDashboard !== null : state.selectedWidgets.length > 0;
|
|
28601
|
-
case 3:
|
|
28602
|
-
return state.layout.templateKey !== null;
|
|
28603
|
-
case 4:
|
|
28604
|
-
return state.customization.name.trim().length > 0;
|
|
28605
|
-
case 5:
|
|
28606
|
-
return true;
|
|
28607
|
-
default:
|
|
28608
|
-
return false;
|
|
28609
|
-
}
|
|
28610
|
-
}
|
|
28611
|
-
var useWizardState = function useWizardState() {
|
|
28612
|
-
var _useReducer = useReducer(wizardReducer, initialState),
|
|
28613
|
-
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
28614
|
-
state = _useReducer2[0],
|
|
28615
|
-
dispatch = _useReducer2[1];
|
|
28616
|
-
var canProceed = useMemo(function () {
|
|
28617
|
-
return getCanProceed(state);
|
|
28618
|
-
}, [state]);
|
|
28619
|
-
var selectedCount = useMemo(function () {
|
|
28620
|
-
return state.selectedWidgets.length;
|
|
28621
|
-
}, [state.selectedWidgets]);
|
|
28622
|
-
var isPrebuiltPath = state.path === "prebuilt";
|
|
28623
|
-
var isCustomPath = state.path === "custom";
|
|
28624
|
-
var nextStep = useCallback(function () {
|
|
28625
|
-
if (getCanProceed(state) && state.step < TOTAL_STEPS - 1) {
|
|
28626
|
-
dispatch({
|
|
28627
|
-
type: "SET_STEP",
|
|
28628
|
-
payload: state.step + 1
|
|
28629
|
-
});
|
|
28630
|
-
}
|
|
28631
|
-
}, [state]);
|
|
28632
|
-
var prevStep = useCallback(function () {
|
|
28633
|
-
if (state.step > 0) {
|
|
28634
|
-
dispatch({
|
|
28635
|
-
type: "SET_STEP",
|
|
28636
|
-
payload: state.step - 1
|
|
28637
|
-
});
|
|
28638
|
-
}
|
|
28639
|
-
}, [state.step]);
|
|
28640
|
-
var goToStep = useCallback(function (n) {
|
|
28641
|
-
if (n >= 0 && n < TOTAL_STEPS) {
|
|
28642
|
-
dispatch({
|
|
28643
|
-
type: "SET_STEP",
|
|
28644
|
-
payload: n
|
|
28645
|
-
});
|
|
28646
|
-
}
|
|
28647
|
-
}, []);
|
|
28648
|
-
return {
|
|
28649
|
-
state: state,
|
|
28650
|
-
dispatch: dispatch,
|
|
28651
|
-
nextStep: nextStep,
|
|
28652
|
-
prevStep: prevStep,
|
|
28653
|
-
goToStep: goToStep,
|
|
28654
|
-
canProceed: canProceed,
|
|
28655
|
-
selectedCount: selectedCount,
|
|
28656
|
-
isPrebuiltPath: isPrebuiltPath,
|
|
28657
|
-
isCustomPath: isCustomPath,
|
|
28658
|
-
widgetCountToTemplate: widgetCountToTemplate
|
|
28659
|
-
};
|
|
28660
|
-
};
|
|
28661
|
-
|
|
28662
29605
|
function ownKeys$i(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; }
|
|
28663
29606
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28664
29607
|
var PreviewComponentsPane = function PreviewComponentsPane(_ref) {
|
|
@@ -30821,9 +31764,9 @@ function loadWidgetBundle(source, widgetName) {
|
|
|
30821
31764
|
};
|
|
30822
31765
|
}
|
|
30823
31766
|
|
|
30824
|
-
function _createForOfIteratorHelper$
|
|
30825
|
-
function _unsupportedIterableToArray$
|
|
30826
|
-
function _arrayLikeToArray$
|
|
31767
|
+
function _createForOfIteratorHelper$4(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(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; } } }; }
|
|
31768
|
+
function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(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$4(r, a) : void 0; } }
|
|
31769
|
+
function _arrayLikeToArray$4(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; }
|
|
30827
31770
|
/**
|
|
30828
31771
|
* Validation utilities for grid-first dashboard architecture
|
|
30829
31772
|
*
|
|
@@ -31062,7 +32005,7 @@ var validateCellMerge = function validateCellMerge(cellNumbers, grid) {
|
|
|
31062
32005
|
|
|
31063
32006
|
// Validate each cell
|
|
31064
32007
|
var cells = [];
|
|
31065
|
-
var _iterator = _createForOfIteratorHelper$
|
|
32008
|
+
var _iterator = _createForOfIteratorHelper$4(cellNumbers),
|
|
31066
32009
|
_step;
|
|
31067
32010
|
try {
|
|
31068
32011
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -38806,9 +39749,9 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
38806
39749
|
|
|
38807
39750
|
function ownKeys$6(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; }
|
|
38808
39751
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38809
|
-
function _createForOfIteratorHelper$
|
|
38810
|
-
function _unsupportedIterableToArray$
|
|
38811
|
-
function _arrayLikeToArray$
|
|
39752
|
+
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(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; } } }; }
|
|
39753
|
+
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(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$3(r, a) : void 0; } }
|
|
39754
|
+
function _arrayLikeToArray$3(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; }
|
|
38812
39755
|
function isValidWsUrl(url) {
|
|
38813
39756
|
if (!url) return false;
|
|
38814
39757
|
try {
|
|
@@ -38855,7 +39798,7 @@ function extractCredentialFields(url, headerRows) {
|
|
|
38855
39798
|
fields.add(match[1]);
|
|
38856
39799
|
}
|
|
38857
39800
|
}
|
|
38858
|
-
var _iterator = _createForOfIteratorHelper$
|
|
39801
|
+
var _iterator = _createForOfIteratorHelper$3(headerRows),
|
|
38859
39802
|
_step;
|
|
38860
39803
|
try {
|
|
38861
39804
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -38958,7 +39901,7 @@ var WebSocketProviderForm = function WebSocketProviderForm(_ref) {
|
|
|
38958
39901
|
if (!url.trim()) errs.url = "WebSocket URL is required";else if (!isValidWsUrl(url)) errs.url = "URL must start with ws:// or wss://";
|
|
38959
39902
|
|
|
38960
39903
|
// Check required credential fields are filled
|
|
38961
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
39904
|
+
var _iterator2 = _createForOfIteratorHelper$3(credentialFields),
|
|
38962
39905
|
_step2;
|
|
38963
39906
|
try {
|
|
38964
39907
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -38981,7 +39924,7 @@ var WebSocketProviderForm = function WebSocketProviderForm(_ref) {
|
|
|
38981
39924
|
|
|
38982
39925
|
// Build headers object from rows
|
|
38983
39926
|
var headers = {};
|
|
38984
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
39927
|
+
var _iterator3 = _createForOfIteratorHelper$3(headerRows),
|
|
38985
39928
|
_step3;
|
|
38986
39929
|
try {
|
|
38987
39930
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
@@ -39050,7 +39993,7 @@ var WebSocketProviderForm = function WebSocketProviderForm(_ref) {
|
|
|
39050
39993
|
|
|
39051
39994
|
// Build config from current form state (same as handleSave)
|
|
39052
39995
|
headers = {};
|
|
39053
|
-
_iterator4 = _createForOfIteratorHelper$
|
|
39996
|
+
_iterator4 = _createForOfIteratorHelper$3(headerRows);
|
|
39054
39997
|
try {
|
|
39055
39998
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
39056
39999
|
row = _step4.value;
|
|
@@ -41694,293 +42637,6 @@ var RegistryPackageDetail = function RegistryPackageDetail(_ref) {
|
|
|
41694
42637
|
});
|
|
41695
42638
|
};
|
|
41696
42639
|
|
|
41697
|
-
function _createForOfIteratorHelper$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(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; } } }; }
|
|
41698
|
-
function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(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$3(r, a) : void 0; } }
|
|
41699
|
-
function _arrayLikeToArray$3(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; }
|
|
41700
|
-
|
|
41701
|
-
/**
|
|
41702
|
-
* useRegistrySearch — shared hook for browsing and installing registry packages.
|
|
41703
|
-
*
|
|
41704
|
-
* Extracted from EnhancedWidgetDropdown so the same logic can power the
|
|
41705
|
-
* Discover tab inside AppSettingsModal (and anywhere else).
|
|
41706
|
-
*
|
|
41707
|
-
* Options:
|
|
41708
|
-
* filterByCapabilities – if true (default), only show packages compatible
|
|
41709
|
-
* with the app's API capabilities
|
|
41710
|
-
*
|
|
41711
|
-
* Returns:
|
|
41712
|
-
* packages – raw package objects from the registry
|
|
41713
|
-
* flatWidgets – flattened widget entries with `isRegistry: true`
|
|
41714
|
-
* isLoading – true while a search request is in flight
|
|
41715
|
-
* error – error message string (or null)
|
|
41716
|
-
* searchQuery / setSearchQuery – controlled search input
|
|
41717
|
-
* isInstalling – true during an install
|
|
41718
|
-
* installError – install error string (or null)
|
|
41719
|
-
* search() – manually trigger a search
|
|
41720
|
-
* installPackage(widget) – install a specific registry widget
|
|
41721
|
-
* showAllPackages / setShowAllPackages – toggle to show incompatible packages
|
|
41722
|
-
* appCapabilities – the app's API namespaces
|
|
41723
|
-
*/
|
|
41724
|
-
var useRegistrySearch = function useRegistrySearch() {
|
|
41725
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
41726
|
-
_ref$filterByCapabili = _ref.filterByCapabilities,
|
|
41727
|
-
filterByCapabilities = _ref$filterByCapabili === void 0 ? true : _ref$filterByCapabili;
|
|
41728
|
-
var _useState = useState(false),
|
|
41729
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
41730
|
-
isLoading = _useState2[0],
|
|
41731
|
-
setIsLoading = _useState2[1];
|
|
41732
|
-
var _useState3 = useState(null),
|
|
41733
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
41734
|
-
error = _useState4[0],
|
|
41735
|
-
setError = _useState4[1];
|
|
41736
|
-
var _useState5 = useState([]),
|
|
41737
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
41738
|
-
packages = _useState6[0],
|
|
41739
|
-
setPackages = _useState6[1];
|
|
41740
|
-
var _useState7 = useState([]),
|
|
41741
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
41742
|
-
flatWidgets = _useState8[0],
|
|
41743
|
-
setFlatWidgets = _useState8[1];
|
|
41744
|
-
var _useState9 = useState(""),
|
|
41745
|
-
_useState0 = _slicedToArray(_useState9, 2),
|
|
41746
|
-
searchQuery = _useState0[0],
|
|
41747
|
-
setSearchQuery = _useState0[1];
|
|
41748
|
-
var _useState1 = useState(false),
|
|
41749
|
-
_useState10 = _slicedToArray(_useState1, 2),
|
|
41750
|
-
isInstalling = _useState10[0],
|
|
41751
|
-
setIsInstalling = _useState10[1];
|
|
41752
|
-
var _useState11 = useState(null),
|
|
41753
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
41754
|
-
installError = _useState12[0],
|
|
41755
|
-
setInstallError = _useState12[1];
|
|
41756
|
-
var _useState13 = useState(false),
|
|
41757
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
41758
|
-
showAllPackages = _useState14[0],
|
|
41759
|
-
setShowAllPackages = _useState14[1];
|
|
41760
|
-
|
|
41761
|
-
// Discover app capabilities from window.mainApi
|
|
41762
|
-
var appCapabilities = useMemo(function () {
|
|
41763
|
-
if (typeof window !== "undefined" && window.mainApi) {
|
|
41764
|
-
return Object.keys(window.mainApi);
|
|
41765
|
-
}
|
|
41766
|
-
return [];
|
|
41767
|
-
}, []);
|
|
41768
|
-
var search = useCallback(/*#__PURE__*/function () {
|
|
41769
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(query) {
|
|
41770
|
-
var _window$mainApi;
|
|
41771
|
-
var filters, result, pkgs, capSet, widgets, _iterator, _step, pkg, allApiProviders, _iterator2, _step2, p, _iterator3, _step3, w, _iterator5, _step5, _p, missingApis, _iterator4, _step4, widget, _t;
|
|
41772
|
-
return _regeneratorRuntime.wrap(function (_context) {
|
|
41773
|
-
while (1) switch (_context.prev = _context.next) {
|
|
41774
|
-
case 0:
|
|
41775
|
-
if ((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && _window$mainApi.registry) {
|
|
41776
|
-
_context.next = 1;
|
|
41777
|
-
break;
|
|
41778
|
-
}
|
|
41779
|
-
setPackages([]);
|
|
41780
|
-
setFlatWidgets([]);
|
|
41781
|
-
return _context.abrupt("return");
|
|
41782
|
-
case 1:
|
|
41783
|
-
setIsLoading(true);
|
|
41784
|
-
setError(null);
|
|
41785
|
-
_context.prev = 2;
|
|
41786
|
-
filters = {};
|
|
41787
|
-
if (filterByCapabilities && !showAllPackages && appCapabilities.length) {
|
|
41788
|
-
filters.appCapabilities = appCapabilities;
|
|
41789
|
-
}
|
|
41790
|
-
_context.next = 3;
|
|
41791
|
-
return window.mainApi.registry.search(query !== null && query !== void 0 ? query : searchQuery, filters);
|
|
41792
|
-
case 3:
|
|
41793
|
-
result = _context.sent;
|
|
41794
|
-
// Only include packages that contain at least one widget
|
|
41795
|
-
// (filters out theme-only packages, etc.)
|
|
41796
|
-
pkgs = (result.packages || []).filter(function (pkg) {
|
|
41797
|
-
return pkg.widgets && pkg.widgets.length > 0;
|
|
41798
|
-
});
|
|
41799
|
-
setPackages(pkgs);
|
|
41800
|
-
|
|
41801
|
-
// Flatten packages into widget entries
|
|
41802
|
-
capSet = new Set(appCapabilities.map(function (c) {
|
|
41803
|
-
return c.toLowerCase();
|
|
41804
|
-
}));
|
|
41805
|
-
widgets = [];
|
|
41806
|
-
_iterator = _createForOfIteratorHelper$3(pkgs);
|
|
41807
|
-
try {
|
|
41808
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
41809
|
-
pkg = _step.value;
|
|
41810
|
-
// Compute missing APIs for the entire package
|
|
41811
|
-
allApiProviders = [];
|
|
41812
|
-
_iterator2 = _createForOfIteratorHelper$3(pkg.providers || []);
|
|
41813
|
-
try {
|
|
41814
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
41815
|
-
p = _step2.value;
|
|
41816
|
-
if (p.providerClass === "api" && p.required !== false) {
|
|
41817
|
-
allApiProviders.push(p.type);
|
|
41818
|
-
}
|
|
41819
|
-
}
|
|
41820
|
-
} catch (err) {
|
|
41821
|
-
_iterator2.e(err);
|
|
41822
|
-
} finally {
|
|
41823
|
-
_iterator2.f();
|
|
41824
|
-
}
|
|
41825
|
-
_iterator3 = _createForOfIteratorHelper$3(pkg.widgets || []);
|
|
41826
|
-
try {
|
|
41827
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
41828
|
-
w = _step3.value;
|
|
41829
|
-
_iterator5 = _createForOfIteratorHelper$3(w.providers || []);
|
|
41830
|
-
try {
|
|
41831
|
-
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
41832
|
-
_p = _step5.value;
|
|
41833
|
-
if (_p.providerClass === "api" && _p.required !== false) {
|
|
41834
|
-
allApiProviders.push(_p.type);
|
|
41835
|
-
}
|
|
41836
|
-
}
|
|
41837
|
-
} catch (err) {
|
|
41838
|
-
_iterator5.e(err);
|
|
41839
|
-
} finally {
|
|
41840
|
-
_iterator5.f();
|
|
41841
|
-
}
|
|
41842
|
-
}
|
|
41843
|
-
} catch (err) {
|
|
41844
|
-
_iterator3.e(err);
|
|
41845
|
-
} finally {
|
|
41846
|
-
_iterator3.f();
|
|
41847
|
-
}
|
|
41848
|
-
missingApis = _toConsumableArray(new Set(allApiProviders)).filter(function (api) {
|
|
41849
|
-
return !capSet.has(api.toLowerCase());
|
|
41850
|
-
});
|
|
41851
|
-
_iterator4 = _createForOfIteratorHelper$3(pkg.widgets || []);
|
|
41852
|
-
try {
|
|
41853
|
-
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
41854
|
-
widget = _step4.value;
|
|
41855
|
-
widgets.push({
|
|
41856
|
-
key: "".concat(pkg.name, "/").concat(widget.name),
|
|
41857
|
-
name: widget.displayName || widget.name,
|
|
41858
|
-
description: widget.description || "",
|
|
41859
|
-
icon: widget.icon || null,
|
|
41860
|
-
providers: widget.providers || [],
|
|
41861
|
-
isRegistry: true,
|
|
41862
|
-
packageName: pkg.name,
|
|
41863
|
-
packageDisplayName: pkg.displayName || pkg.name,
|
|
41864
|
-
packageVersion: pkg.version,
|
|
41865
|
-
packageAuthor: pkg.author || "",
|
|
41866
|
-
packageDescription: pkg.description || "",
|
|
41867
|
-
packageTags: pkg.tags || [],
|
|
41868
|
-
packageCategory: pkg.category || "",
|
|
41869
|
-
downloadUrl: pkg.downloadUrl || "",
|
|
41870
|
-
repository: pkg.repository || "",
|
|
41871
|
-
publishedAt: pkg.publishedAt || "",
|
|
41872
|
-
packageWidgets: pkg.widgets || [],
|
|
41873
|
-
appOrigin: pkg.appOrigin || null,
|
|
41874
|
-
packageProviders: pkg.providers || [],
|
|
41875
|
-
missingApis: missingApis
|
|
41876
|
-
});
|
|
41877
|
-
}
|
|
41878
|
-
} catch (err) {
|
|
41879
|
-
_iterator4.e(err);
|
|
41880
|
-
} finally {
|
|
41881
|
-
_iterator4.f();
|
|
41882
|
-
}
|
|
41883
|
-
}
|
|
41884
|
-
} catch (err) {
|
|
41885
|
-
_iterator.e(err);
|
|
41886
|
-
} finally {
|
|
41887
|
-
_iterator.f();
|
|
41888
|
-
}
|
|
41889
|
-
setFlatWidgets(widgets);
|
|
41890
|
-
_context.next = 5;
|
|
41891
|
-
break;
|
|
41892
|
-
case 4:
|
|
41893
|
-
_context.prev = 4;
|
|
41894
|
-
_t = _context["catch"](2);
|
|
41895
|
-
setError(_t.message || "Failed to load registry");
|
|
41896
|
-
setPackages([]);
|
|
41897
|
-
setFlatWidgets([]);
|
|
41898
|
-
case 5:
|
|
41899
|
-
_context.prev = 5;
|
|
41900
|
-
setIsLoading(false);
|
|
41901
|
-
return _context.finish(5);
|
|
41902
|
-
case 6:
|
|
41903
|
-
case "end":
|
|
41904
|
-
return _context.stop();
|
|
41905
|
-
}
|
|
41906
|
-
}, _callee, null, [[2, 4, 5, 6]]);
|
|
41907
|
-
}));
|
|
41908
|
-
return function (_x) {
|
|
41909
|
-
return _ref2.apply(this, arguments);
|
|
41910
|
-
};
|
|
41911
|
-
}(), [searchQuery, filterByCapabilities, showAllPackages, appCapabilities]);
|
|
41912
|
-
|
|
41913
|
-
// Debounce search on query changes (300ms)
|
|
41914
|
-
useEffect(function () {
|
|
41915
|
-
var timer = setTimeout(function () {
|
|
41916
|
-
search(searchQuery);
|
|
41917
|
-
}, 300);
|
|
41918
|
-
return function () {
|
|
41919
|
-
return clearTimeout(timer);
|
|
41920
|
-
};
|
|
41921
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41922
|
-
}, [searchQuery, showAllPackages]);
|
|
41923
|
-
var installPackage = useCallback(/*#__PURE__*/function () {
|
|
41924
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(widget) {
|
|
41925
|
-
var packageName, downloadUrl, packageVersion, resolvedUrl, _t2;
|
|
41926
|
-
return _regeneratorRuntime.wrap(function (_context2) {
|
|
41927
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
41928
|
-
case 0:
|
|
41929
|
-
if (!(!widget || !widget.isRegistry)) {
|
|
41930
|
-
_context2.next = 1;
|
|
41931
|
-
break;
|
|
41932
|
-
}
|
|
41933
|
-
return _context2.abrupt("return");
|
|
41934
|
-
case 1:
|
|
41935
|
-
setIsInstalling(true);
|
|
41936
|
-
setInstallError(null);
|
|
41937
|
-
_context2.prev = 2;
|
|
41938
|
-
packageName = widget.packageName, downloadUrl = widget.downloadUrl, packageVersion = widget.packageVersion; // Resolve placeholders in the download URL
|
|
41939
|
-
resolvedUrl = downloadUrl.replace(/\{version\}/g, packageVersion).replace(/\{name\}/g, packageName);
|
|
41940
|
-
_context2.next = 3;
|
|
41941
|
-
return window.mainApi.widgets.install(packageName, resolvedUrl);
|
|
41942
|
-
case 3:
|
|
41943
|
-
_context2.next = 5;
|
|
41944
|
-
break;
|
|
41945
|
-
case 4:
|
|
41946
|
-
_context2.prev = 4;
|
|
41947
|
-
_t2 = _context2["catch"](2);
|
|
41948
|
-
setInstallError(_t2.message || "Failed to install package");
|
|
41949
|
-
case 5:
|
|
41950
|
-
_context2.prev = 5;
|
|
41951
|
-
setIsInstalling(false);
|
|
41952
|
-
return _context2.finish(5);
|
|
41953
|
-
case 6:
|
|
41954
|
-
case "end":
|
|
41955
|
-
return _context2.stop();
|
|
41956
|
-
}
|
|
41957
|
-
}, _callee2, null, [[2, 4, 5, 6]]);
|
|
41958
|
-
}));
|
|
41959
|
-
return function (_x2) {
|
|
41960
|
-
return _ref3.apply(this, arguments);
|
|
41961
|
-
};
|
|
41962
|
-
}(), []);
|
|
41963
|
-
var retry = useCallback(function () {
|
|
41964
|
-
search(searchQuery);
|
|
41965
|
-
}, [search, searchQuery]);
|
|
41966
|
-
return {
|
|
41967
|
-
packages: packages,
|
|
41968
|
-
flatWidgets: flatWidgets,
|
|
41969
|
-
isLoading: isLoading,
|
|
41970
|
-
error: error,
|
|
41971
|
-
searchQuery: searchQuery,
|
|
41972
|
-
setSearchQuery: setSearchQuery,
|
|
41973
|
-
isInstalling: isInstalling,
|
|
41974
|
-
installError: installError,
|
|
41975
|
-
search: search,
|
|
41976
|
-
installPackage: installPackage,
|
|
41977
|
-
retry: retry,
|
|
41978
|
-
showAllPackages: showAllPackages,
|
|
41979
|
-
setShowAllPackages: setShowAllPackages,
|
|
41980
|
-
appCapabilities: appCapabilities
|
|
41981
|
-
};
|
|
41982
|
-
};
|
|
41983
|
-
|
|
41984
42640
|
function _createForOfIteratorHelper$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(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; } } }; }
|
|
41985
42641
|
function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(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$2(r, a) : void 0; } }
|
|
41986
42642
|
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; }
|
|
@@ -48470,5 +49126,5 @@ var WorkspaceMenu = function WorkspaceMenu(_ref) {
|
|
|
48470
49126
|
|
|
48471
49127
|
ComponentManager.registerContainerTypes(LayoutContainer, LayoutGridContainer);
|
|
48472
49128
|
|
|
48473
|
-
export { ALGOLIA_ANALYTICS_FOR_QUERY, ALGOLIA_ANALYTICS_FOR_QUERY_COMPLETE, ALGOLIA_ANALYTICS_FOR_QUERY_ERROR, ALGOLIA_LIST_INDICES, ALGOLIA_LIST_INDICES_COMPLETE, ALGOLIA_LIST_INDICES_ERROR, AVAILABLE_COLORS, AddMenuItemModal, AdvancedMcpConfig, AppContext, AppSettingsModal, AppThemeScope, AppWrapper, CHOOSE_FILE, CHOOSE_FILE_COMPLETE, CHOOSE_FILE_ERROR, ColorModel, ComponentConfigModel, ComponentManager, ContextModel, DATA_JSON_TO_CSV_FILE, DATA_JSON_TO_CSV_FILE_COMPLETE, DATA_JSON_TO_CSV_FILE_ERROR, DATA_JSON_TO_CSV_STRING, DATA_JSON_TO_CSV_STRING_COMPLETE, DATA_JSON_TO_CSV_STRING_ERROR, DATA_READ_FROM_FILE, DATA_READ_FROM_FILE_COMPLETE, DATA_READ_FROM_FILE_ERROR, DATA_SAVE_TO_FILE, DATA_SAVE_TO_FILE_COMPLETE, DATA_SAVE_TO_FILE_ERROR, DashCommandPalette, DashNavbar, DashSidebar, DashTabBar, DashboardStage as Dashboard, DashboardApi, DashboardContext, DashboardFooter, DashboardHeader, DashboardMenuItem, DashboardModel, DashboardMonitor, DashboardPublisher, DashboardStage, DashboardThemeProvider, DashboardWrapper, ElectronDashboardApi, ErrorBoundary, ExternalWidget, GRID_CELL_WIDGET_TYPE, HARMONY_STRATEGIES, LAYOUT_LIST, LAYOUT_LIST_COMPLETE, LAYOUT_LIST_ERROR, LAYOUT_SAVE, LAYOUT_SAVE_COMPLETE, LAYOUT_SAVE_ERROR, Layout, LayoutBuilder, LayoutBuilderAddItemModal, LayoutBuilderConfigContainerMenuItem, LayoutBuilderConfigMenuItem, LayoutBuilderConfigModal, LayoutBuilderEditItemModal, LayoutBuilderEventModal, LayoutBuilderGridItem, LayoutContainer, LayoutDragBuilder, LayoutDragBuilderEdit, LayoutGridContainer, LayoutManagerModal, LayoutModel, LayoutQuickAddMenu, MCP_CALL_TOOL_COMPLETE, MCP_CALL_TOOL_ERROR, MCP_GET_CATALOG_COMPLETE, MCP_GET_CATALOG_ERROR, MCP_LIST_RESOURCES_COMPLETE, MCP_LIST_RESOURCES_ERROR, MCP_LIST_TOOLS_COMPLETE, MCP_LIST_TOOLS_ERROR, MCP_READ_RESOURCE_COMPLETE, MCP_READ_RESOURCE_ERROR, MCP_RUN_AUTH_COMPLETE, MCP_RUN_AUTH_ERROR, MCP_SERVER_STATUS_COMPLETE, MCP_SERVER_STATUS_ERROR, MCP_START_SERVER_COMPLETE, MCP_START_SERVER_ERROR, MCP_STOP_SERVER_COMPLETE, MCP_STOP_SERVER_ERROR, MENU_ITEMS_DELETE, MENU_ITEMS_DELETE_COMPLETE, MENU_ITEMS_DELETE_ERROR, MENU_ITEMS_LIST, MENU_ITEMS_LIST_COMPLETE, MENU_ITEMS_LIST_ERROR, MENU_ITEMS_SAVE, MENU_ITEMS_SAVE_COMPLETE, MENU_ITEMS_SAVE_ERROR, MainMenu, MainMenuItem, MainMenuSection, McpServerPicker, MenuItemModel, MenuSlideOverlay, MergeCellsModal, MissingProviderPrompt, MockDashboardApi, PROVIDER_DELETE_COMPLETE, PROVIDER_DELETE_ERROR, PROVIDER_GET_COMPLETE, PROVIDER_GET_ERROR, PROVIDER_LIST_COMPLETE, PROVIDER_LIST_ERROR, PROVIDER_SAVE_COMPLETE, PROVIDER_SAVE_ERROR, PanelCode, PanelEditItem, PanelEditItemHandlers, PanelEditItemNotifications, ProviderContext, ProviderErrorBoundary, ProviderForm, ProviderSelector, SECURE_STORAGE_ENCRYPT_STRING, SECURE_STORAGE_ENCRYPT_STRING_COMPLETE, SECURE_STORAGE_ENCRYPT_STRING_ERROR, SECURE_STORE_ENCRYPTION_CHECK, SECURE_STORE_ENCRYPTION_CHECK_COMPLETE, SECURE_STORE_ENCRYPTION_CHECK_ERROR, SECURE_STORE_GET_DATA, SECURE_STORE_GET_DATA_COMPLETE, SECURE_STORE_GET_DATA_ERROR, SECURE_STORE_SET_DATA, SECURE_STORE_SET_DATA_COMPLETE, SECURE_STORE_SET_DATA_ERROR, SETTINGS_GET, SETTINGS_GET_COMPLETE, SETTINGS_GET_ERROR, SETTINGS_SAVE, SETTINGS_SAVE_COMPLETE, SETTINGS_SAVE_ERROR, SIDEBAR_WIDGET_TYPE, SettingsModel, SideMenu, SplitCellModal, THEME_DELETE, THEME_DELETE_COMPLETE, THEME_DELETE_ERROR, THEME_EXTRACT_FROM_URL, THEME_EXTRACT_FROM_URL_COMPLETE, THEME_EXTRACT_FROM_URL_ERROR, THEME_LIST, THEME_LIST_COMPLETE, THEME_LIST_ERROR, THEME_MAP_PALETTE, THEME_MAP_PALETTE_COMPLETE, THEME_MAP_PALETTE_ERROR, THEME_SAVE, THEME_SAVE_COMPLETE, THEME_SAVE_ERROR, ThemeApi, ThemeColorDots, ThemeManagerModal, ThemeModel, ThemeWrapper, WORKSPACE_DELETE, WORKSPACE_DELETE_COMPLETE, WORKSPACE_DELETE_ERROR, WORKSPACE_LIST, WORKSPACE_LIST_COMPLETE, WORKSPACE_LIST_ERROR, WORKSPACE_SAVE, WORKSPACE_SAVE_COMPLETE, WORKSPACE_SAVE_ERROR, WebDashboardApi, Widget, WidgetApi, WidgetConfigPanel, WidgetContext, WidgetFactory, WidgetPopoutStage, WidgetProviderWrapper, WidgetSidebar, WizardIntentStep, WizardProvidersStep, Workspace, WorkspaceContext, WorkspaceFooter, WorkspaceMenu, WorkspaceModel, addChildToLayoutItem, addItemToItemLayout, buildMcpConfigFromOverrides, canHaveChildren, changeDirectionForLayoutItem, createProviderRegistry, deriveFormFields, envMappingToRows, evaluateBundle, extractWidgetConfigs, formStateToMcpJson, formatFieldName, generateCustomTheme, generateHarmonyTheme, generateRandomTheme, generateThemeName, getBorderStyle, getChildrenForLayoutItem, getComponentInLayout, getContainerBorderColor, getContainerColor, getIndexOfLayoutChildrenForItem, getIndexOfLayoutItem, getLayoutItemById, getLayoutItemForWorkspace, getNearestParentWorkspace, getNextHighestId, getNextHighestItemInLayout, getNextHighestOrder, getNextHighestParentId, getNextLowestItemInLayout, getParentForLayoutItem, getParentWorkspaceForItem, getThemePresets, getUserConfigurableProviders, getWidgetsForWorkspace, getWorkspacesForWorkspace, headerTemplateToRows, isContainer, isLikelySecret, isMaxOrderForItem, isMinOrderForItem, isWidget, isWidgetResolvable, isWorkspace, layoutItemHasWorkspaceAsChild, loadWidgetBundle, mcpJsonToFormState, numChildrenForLayout, removeItemFromLayout, renderComponent, renderGridLayout, renderGridLayoutFlow, _renderLayout as renderLayout, renderLayoutMenu, replaceItemInLayout, resolveIcon, setHostModules, traverseParentTree, updateLayoutItem, updateParentForItem, useDashboard, useMcpDashServer, useMcpProvider, useNotifications, useProvider, useProviderClient, useScheduler, useWebSocketProvider, useWidgetEvents, useWidgetProviders, useWidgetSchedulerStatus, useWizardState, validateCellMerge, validateGridCell, validateGridPlacement, validateWidgetPlacement, widgetCountToTemplate, withProviderDetection };
|
|
49129
|
+
export { ALGOLIA_ANALYTICS_FOR_QUERY, ALGOLIA_ANALYTICS_FOR_QUERY_COMPLETE, ALGOLIA_ANALYTICS_FOR_QUERY_ERROR, ALGOLIA_LIST_INDICES, ALGOLIA_LIST_INDICES_COMPLETE, ALGOLIA_LIST_INDICES_ERROR, AVAILABLE_COLORS, AddMenuItemModal, AdvancedMcpConfig, AppContext, AppSettingsModal, AppThemeScope, AppWrapper, CHOOSE_FILE, CHOOSE_FILE_COMPLETE, CHOOSE_FILE_ERROR, ColorModel, ComponentConfigModel, ComponentManager, ContextModel, DATA_JSON_TO_CSV_FILE, DATA_JSON_TO_CSV_FILE_COMPLETE, DATA_JSON_TO_CSV_FILE_ERROR, DATA_JSON_TO_CSV_STRING, DATA_JSON_TO_CSV_STRING_COMPLETE, DATA_JSON_TO_CSV_STRING_ERROR, DATA_READ_FROM_FILE, DATA_READ_FROM_FILE_COMPLETE, DATA_READ_FROM_FILE_ERROR, DATA_SAVE_TO_FILE, DATA_SAVE_TO_FILE_COMPLETE, DATA_SAVE_TO_FILE_ERROR, DashCommandPalette, DashNavbar, DashSidebar, DashTabBar, DashboardStage as Dashboard, DashboardApi, DashboardContext, DashboardFooter, DashboardHeader, DashboardMenuItem, DashboardModel, DashboardMonitor, DashboardPublisher, DashboardStage, DashboardThemeProvider, DashboardWrapper, ElectronDashboardApi, ErrorBoundary, ExternalWidget, GRID_CELL_WIDGET_TYPE, HARMONY_STRATEGIES, LAYOUT_LIST, LAYOUT_LIST_COMPLETE, LAYOUT_LIST_ERROR, LAYOUT_SAVE, LAYOUT_SAVE_COMPLETE, LAYOUT_SAVE_ERROR, Layout, LayoutBuilder, LayoutBuilderAddItemModal, LayoutBuilderConfigContainerMenuItem, LayoutBuilderConfigMenuItem, LayoutBuilderConfigModal, LayoutBuilderEditItemModal, LayoutBuilderEventModal, LayoutBuilderGridItem, LayoutContainer, LayoutDragBuilder, LayoutDragBuilderEdit, LayoutGridContainer, LayoutManagerModal, LayoutModel, LayoutQuickAddMenu, MCP_CALL_TOOL_COMPLETE, MCP_CALL_TOOL_ERROR, MCP_GET_CATALOG_COMPLETE, MCP_GET_CATALOG_ERROR, MCP_LIST_RESOURCES_COMPLETE, MCP_LIST_RESOURCES_ERROR, MCP_LIST_TOOLS_COMPLETE, MCP_LIST_TOOLS_ERROR, MCP_READ_RESOURCE_COMPLETE, MCP_READ_RESOURCE_ERROR, MCP_RUN_AUTH_COMPLETE, MCP_RUN_AUTH_ERROR, MCP_SERVER_STATUS_COMPLETE, MCP_SERVER_STATUS_ERROR, MCP_START_SERVER_COMPLETE, MCP_START_SERVER_ERROR, MCP_STOP_SERVER_COMPLETE, MCP_STOP_SERVER_ERROR, MENU_ITEMS_DELETE, MENU_ITEMS_DELETE_COMPLETE, MENU_ITEMS_DELETE_ERROR, MENU_ITEMS_LIST, MENU_ITEMS_LIST_COMPLETE, MENU_ITEMS_LIST_ERROR, MENU_ITEMS_SAVE, MENU_ITEMS_SAVE_COMPLETE, MENU_ITEMS_SAVE_ERROR, MainMenu, MainMenuItem, MainMenuSection, McpServerPicker, MenuItemModel, MenuSlideOverlay, MergeCellsModal, MissingProviderPrompt, MockDashboardApi, PROVIDER_DELETE_COMPLETE, PROVIDER_DELETE_ERROR, PROVIDER_GET_COMPLETE, PROVIDER_GET_ERROR, PROVIDER_LIST_COMPLETE, PROVIDER_LIST_ERROR, PROVIDER_SAVE_COMPLETE, PROVIDER_SAVE_ERROR, PanelCode, PanelEditItem, PanelEditItemHandlers, PanelEditItemNotifications, ProviderContext, ProviderErrorBoundary, ProviderForm, ProviderSelector, SECURE_STORAGE_ENCRYPT_STRING, SECURE_STORAGE_ENCRYPT_STRING_COMPLETE, SECURE_STORAGE_ENCRYPT_STRING_ERROR, SECURE_STORE_ENCRYPTION_CHECK, SECURE_STORE_ENCRYPTION_CHECK_COMPLETE, SECURE_STORE_ENCRYPTION_CHECK_ERROR, SECURE_STORE_GET_DATA, SECURE_STORE_GET_DATA_COMPLETE, SECURE_STORE_GET_DATA_ERROR, SECURE_STORE_SET_DATA, SECURE_STORE_SET_DATA_COMPLETE, SECURE_STORE_SET_DATA_ERROR, SETTINGS_GET, SETTINGS_GET_COMPLETE, SETTINGS_GET_ERROR, SETTINGS_SAVE, SETTINGS_SAVE_COMPLETE, SETTINGS_SAVE_ERROR, SIDEBAR_WIDGET_TYPE, SettingsModel, SideMenu, SplitCellModal, THEME_DELETE, THEME_DELETE_COMPLETE, THEME_DELETE_ERROR, THEME_EXTRACT_FROM_URL, THEME_EXTRACT_FROM_URL_COMPLETE, THEME_EXTRACT_FROM_URL_ERROR, THEME_LIST, THEME_LIST_COMPLETE, THEME_LIST_ERROR, THEME_MAP_PALETTE, THEME_MAP_PALETTE_COMPLETE, THEME_MAP_PALETTE_ERROR, THEME_SAVE, THEME_SAVE_COMPLETE, THEME_SAVE_ERROR, ThemeApi, ThemeColorDots, ThemeManagerModal, ThemeModel, ThemeWrapper, WORKSPACE_DELETE, WORKSPACE_DELETE_COMPLETE, WORKSPACE_DELETE_ERROR, WORKSPACE_LIST, WORKSPACE_LIST_COMPLETE, WORKSPACE_LIST_ERROR, WORKSPACE_SAVE, WORKSPACE_SAVE_COMPLETE, WORKSPACE_SAVE_ERROR, WebDashboardApi, Widget, WidgetApi, WidgetConfigPanel, WidgetContext, WidgetFactory, WidgetPopoutStage, WidgetProviderWrapper, WidgetSidebar, WizardIntentStep, WizardLayoutPreviewStep, WizardProvidersStep, WizardResultsStep, Workspace, WorkspaceContext, WorkspaceFooter, WorkspaceMenu, WorkspaceModel, addChildToLayoutItem, addItemToItemLayout, buildMcpConfigFromOverrides, canHaveChildren, changeDirectionForLayoutItem, createProviderRegistry, deriveFormFields, envMappingToRows, evaluateBundle, extractWidgetConfigs, formStateToMcpJson, formatFieldName, generateCustomTheme, generateHarmonyTheme, generateRandomTheme, generateThemeName, getBorderStyle, getChildrenForLayoutItem, getComponentInLayout, getContainerBorderColor, getContainerColor, getIndexOfLayoutChildrenForItem, getIndexOfLayoutItem, getLayoutItemById, getLayoutItemForWorkspace, getNearestParentWorkspace, getNextHighestId, getNextHighestItemInLayout, getNextHighestOrder, getNextHighestParentId, getNextLowestItemInLayout, getParentForLayoutItem, getParentWorkspaceForItem, getThemePresets, getUserConfigurableProviders, getWidgetsForWorkspace, getWorkspacesForWorkspace, headerTemplateToRows, isContainer, isLikelySecret, isMaxOrderForItem, isMinOrderForItem, isWidget, isWidgetResolvable, isWorkspace, layoutItemHasWorkspaceAsChild, loadWidgetBundle, mcpJsonToFormState, numChildrenForLayout, removeItemFromLayout, renderComponent, renderGridLayout, renderGridLayoutFlow, _renderLayout as renderLayout, renderLayoutMenu, replaceItemInLayout, resolveIcon, setHostModules, traverseParentTree, updateLayoutItem, updateParentForItem, useDashboard, useMcpDashServer, useMcpProvider, useNotifications, useProvider, useProviderClient, useScheduler, useWebSocketProvider, useWidgetEvents, useWidgetProviders, useWidgetSchedulerStatus, useWizardState, validateCellMerge, validateGridCell, validateGridPlacement, validateWidgetPlacement, widgetCountToTemplate, withProviderDetection };
|
|
48474
49130
|
//# sourceMappingURL=index.esm.js.map
|