@trops/dash-core 0.1.123 → 0.1.125
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 +37 -137
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +37 -136
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13188,6 +13188,13 @@ function mcpJsonToFormState(jsonString, nextRowId) {
|
|
|
13188
13188
|
return result;
|
|
13189
13189
|
}
|
|
13190
13190
|
|
|
13191
|
+
var getUserConfigurableProviders = function getUserConfigurableProviders(providers) {
|
|
13192
|
+
if (!providers) return [];
|
|
13193
|
+
return providers.filter(function (p) {
|
|
13194
|
+
return p.providerClass !== "api";
|
|
13195
|
+
});
|
|
13196
|
+
};
|
|
13197
|
+
|
|
13191
13198
|
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; } } }; }
|
|
13192
13199
|
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; } }
|
|
13193
13200
|
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; }
|
|
@@ -13548,8 +13555,9 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
13548
13555
|
var providers = new Set();
|
|
13549
13556
|
providers.add("none"); // For widgets without providers
|
|
13550
13557
|
widgets.forEach(function (widget) {
|
|
13551
|
-
|
|
13552
|
-
|
|
13558
|
+
var configurable = getUserConfigurableProviders(widget.providers);
|
|
13559
|
+
if (configurable.length > 0) {
|
|
13560
|
+
configurable.forEach(function (provider) {
|
|
13553
13561
|
providers.add(provider.type);
|
|
13554
13562
|
});
|
|
13555
13563
|
}
|
|
@@ -13574,9 +13582,9 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
13574
13582
|
var matchesProvider = true;
|
|
13575
13583
|
if (selectedProvider !== "all") {
|
|
13576
13584
|
if (selectedProvider === "none") {
|
|
13577
|
-
matchesProvider =
|
|
13585
|
+
matchesProvider = getUserConfigurableProviders(widget.providers).length === 0;
|
|
13578
13586
|
} else {
|
|
13579
|
-
matchesProvider = widget.providers
|
|
13587
|
+
matchesProvider = getUserConfigurableProviders(widget.providers).some(function (p) {
|
|
13580
13588
|
return p.type === selectedProvider;
|
|
13581
13589
|
});
|
|
13582
13590
|
}
|
|
@@ -14003,7 +14011,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14003
14011
|
}
|
|
14004
14012
|
|
|
14005
14013
|
// Check providers: all required providers must be selected
|
|
14006
|
-
var hasRequiredProviders = selectedWidget.providers ? selectedWidget.providers.filter(function (p) {
|
|
14014
|
+
var hasRequiredProviders = selectedWidget.providers ? getUserConfigurableProviders(selectedWidget.providers).filter(function (p) {
|
|
14007
14015
|
return p.required === true;
|
|
14008
14016
|
}).every(function (p) {
|
|
14009
14017
|
return selectedProviders[p.type] && selectedProviders[p.type] !== "";
|
|
@@ -14125,7 +14133,6 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14125
14133
|
})
|
|
14126
14134
|
})
|
|
14127
14135
|
}), expandedPackages.has(group.name) && group.widgets.map(function (widget) {
|
|
14128
|
-
var _widget$providers;
|
|
14129
14136
|
return /*#__PURE__*/jsxRuntime.jsx(DashReact.MenuItem3, {
|
|
14130
14137
|
onClick: function onClick() {
|
|
14131
14138
|
return handleWidgetSelect(widget);
|
|
@@ -14145,9 +14152,9 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14145
14152
|
}), widget.description && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14146
14153
|
className: "text-xs opacity-50 truncate",
|
|
14147
14154
|
children: widget.description
|
|
14148
|
-
}), (
|
|
14155
|
+
}), getUserConfigurableProviders(widget.providers).length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14149
14156
|
className: "flex flex-wrap gap-1 mt-0.5",
|
|
14150
|
-
children: widget.providers.map(function (p) {
|
|
14157
|
+
children: getUserConfigurableProviders(widget.providers).map(function (p) {
|
|
14151
14158
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
14152
14159
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-blue-500/20 text-blue-300",
|
|
14153
14160
|
children: p.type
|
|
@@ -14169,7 +14176,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14169
14176
|
padding: true,
|
|
14170
14177
|
height: "h-full",
|
|
14171
14178
|
children: filteredWidgets.map(function (widget) {
|
|
14172
|
-
var _widget$
|
|
14179
|
+
var _widget$providers;
|
|
14173
14180
|
return /*#__PURE__*/jsxRuntime.jsx(DashReact.MenuItem3, {
|
|
14174
14181
|
onClick: function onClick() {
|
|
14175
14182
|
return handleWidgetSelect(widget);
|
|
@@ -14189,7 +14196,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14189
14196
|
}), widget.description && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14190
14197
|
className: "text-xs opacity-50 truncate",
|
|
14191
14198
|
children: widget.description
|
|
14192
|
-
}), ((_widget$
|
|
14199
|
+
}), ((_widget$providers = widget.providers) === null || _widget$providers === void 0 ? void 0 : _widget$providers.length) > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14193
14200
|
className: "flex flex-wrap gap-1 mt-0.5",
|
|
14194
14201
|
children: widget.providers.map(function (p) {
|
|
14195
14202
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -14277,9 +14284,9 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14277
14284
|
}), w.description && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14278
14285
|
className: "text-xs text-gray-400 mt-0.5",
|
|
14279
14286
|
children: w.description
|
|
14280
|
-
}), w.providers
|
|
14287
|
+
}), getUserConfigurableProviders(w.providers).length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14281
14288
|
className: "flex gap-1 mt-1",
|
|
14282
|
-
children: w.providers.map(function (p, pidx) {
|
|
14289
|
+
children: getUserConfigurableProviders(w.providers).map(function (p, pidx) {
|
|
14283
14290
|
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
14284
14291
|
className: "text-xs px-1.5 py-0.5 rounded bg-blue-900/30 text-blue-400",
|
|
14285
14292
|
children: [p.type, p.required ? " *" : ""]
|
|
@@ -14485,7 +14492,6 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14485
14492
|
children: groupedInstalledWidgets[groupName].length
|
|
14486
14493
|
})]
|
|
14487
14494
|
}), expandedGroups.has(groupName) && groupedInstalledWidgets[groupName].map(function (widget) {
|
|
14488
|
-
var _widget$providers3;
|
|
14489
14495
|
return /*#__PURE__*/jsxRuntime.jsx(DashReact.MenuItem3, {
|
|
14490
14496
|
onClick: function onClick() {
|
|
14491
14497
|
return handleWidgetSelect(widget);
|
|
@@ -14505,9 +14511,9 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14505
14511
|
}), widget.description && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14506
14512
|
className: "text-xs opacity-50 truncate",
|
|
14507
14513
|
children: widget.description
|
|
14508
|
-
}), (
|
|
14514
|
+
}), getUserConfigurableProviders(widget.providers).length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14509
14515
|
className: "flex flex-wrap gap-1 mt-0.5",
|
|
14510
|
-
children: widget.providers.map(function (p) {
|
|
14516
|
+
children: getUserConfigurableProviders(widget.providers).map(function (p) {
|
|
14511
14517
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
14512
14518
|
className: "text-[10px] px-1.5 py-0.5 rounded bg-blue-500/20 text-blue-300",
|
|
14513
14519
|
children: p.type
|
|
@@ -14565,7 +14571,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14565
14571
|
className: "text-sm",
|
|
14566
14572
|
children: selectedWidget.description
|
|
14567
14573
|
})
|
|
14568
|
-
}), selectedWidget.providers
|
|
14574
|
+
}), getUserConfigurableProviders(selectedWidget.providers).length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
14569
14575
|
className: "mb-2",
|
|
14570
14576
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
14571
14577
|
padding: false,
|
|
@@ -14573,7 +14579,7 @@ var EnhancedWidgetDropdown = function EnhancedWidgetDropdown(_ref) {
|
|
|
14573
14579
|
children: "REQUIRED PROVIDERS"
|
|
14574
14580
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14575
14581
|
className: "space-y-2",
|
|
14576
|
-
children: selectedWidget.providers.map(function (providerReq, idx) {
|
|
14582
|
+
children: getUserConfigurableProviders(selectedWidget.providers).map(function (providerReq, idx) {
|
|
14577
14583
|
var _inlineCatalogEntry$m, _inlineCatalogEntry$m2, _inlineCatalogEntry$m3, _inlineCatalogEntry$m4, _inlineCatalogEntry$m5, _inlineTestResult$too;
|
|
14578
14584
|
// Get available providers of this type
|
|
14579
14585
|
var providersOfType = Object.values(availableProviders).filter(function (p) {
|
|
@@ -32993,15 +32999,11 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
32993
32999
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
32994
33000
|
viewMode = _useState10[0],
|
|
32995
33001
|
setViewMode = _useState10[1];
|
|
32996
|
-
// null | "marketplace"
|
|
33002
|
+
// null | "marketplace"
|
|
32997
33003
|
var _useState11 = React.useState(null),
|
|
32998
33004
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
32999
33005
|
installMode = _useState12[0],
|
|
33000
33006
|
setInstallMode = _useState12[1];
|
|
33001
|
-
var _useState13 = React.useState(null),
|
|
33002
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
33003
|
-
importResult = _useState14[0],
|
|
33004
|
-
setImportResult = _useState14[1];
|
|
33005
33007
|
var appId = credentials === null || credentials === void 0 ? void 0 : credentials.appId;
|
|
33006
33008
|
var _useContext = React.useContext(DashReact.ThemeContext),
|
|
33007
33009
|
currentTheme = _useContext.currentTheme;
|
|
@@ -33088,7 +33090,6 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33088
33090
|
if (createRequested && !prevCreateRequested.current) {
|
|
33089
33091
|
setSelectedId(null);
|
|
33090
33092
|
setInstallMode("marketplace");
|
|
33091
|
-
setImportResult(null);
|
|
33092
33093
|
}
|
|
33093
33094
|
prevCreateRequested.current = createRequested;
|
|
33094
33095
|
if (createRequested && onCreateAcknowledged) {
|
|
@@ -33096,69 +33097,6 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33096
33097
|
}
|
|
33097
33098
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33098
33099
|
}, [createRequested]);
|
|
33099
|
-
function handleImport() {
|
|
33100
|
-
return _handleImport.apply(this, arguments);
|
|
33101
|
-
}
|
|
33102
|
-
function _handleImport() {
|
|
33103
|
-
_handleImport = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
33104
|
-
var result, _result$workspace, _t;
|
|
33105
|
-
return _regeneratorRuntime.wrap(function (_context) {
|
|
33106
|
-
while (1) switch (_context.prev = _context.next) {
|
|
33107
|
-
case 0:
|
|
33108
|
-
if (appId) {
|
|
33109
|
-
_context.next = 1;
|
|
33110
|
-
break;
|
|
33111
|
-
}
|
|
33112
|
-
return _context.abrupt("return");
|
|
33113
|
-
case 1:
|
|
33114
|
-
setInstallMode("import-result");
|
|
33115
|
-
setImportResult({
|
|
33116
|
-
status: "loading",
|
|
33117
|
-
message: "Importing dashboard..."
|
|
33118
|
-
});
|
|
33119
|
-
_context.prev = 2;
|
|
33120
|
-
_context.next = 3;
|
|
33121
|
-
return window.mainApi.dashboardConfig.importDashboardConfig(appId);
|
|
33122
|
-
case 3:
|
|
33123
|
-
result = _context.sent;
|
|
33124
|
-
if (!(!result || result.canceled)) {
|
|
33125
|
-
_context.next = 4;
|
|
33126
|
-
break;
|
|
33127
|
-
}
|
|
33128
|
-
// User cancelled the file picker
|
|
33129
|
-
setInstallMode(null);
|
|
33130
|
-
setImportResult(null);
|
|
33131
|
-
return _context.abrupt("return");
|
|
33132
|
-
case 4:
|
|
33133
|
-
if (result.success) {
|
|
33134
|
-
setImportResult({
|
|
33135
|
-
status: "success",
|
|
33136
|
-
message: "Dashboard \"".concat(((_result$workspace = result.workspace) === null || _result$workspace === void 0 ? void 0 : _result$workspace.name) || "Untitled", "\" imported successfully.")
|
|
33137
|
-
});
|
|
33138
|
-
onReloadWorkspaces && onReloadWorkspaces();
|
|
33139
|
-
} else {
|
|
33140
|
-
setImportResult({
|
|
33141
|
-
status: "error",
|
|
33142
|
-
message: result.error || "Import failed."
|
|
33143
|
-
});
|
|
33144
|
-
}
|
|
33145
|
-
_context.next = 6;
|
|
33146
|
-
break;
|
|
33147
|
-
case 5:
|
|
33148
|
-
_context.prev = 5;
|
|
33149
|
-
_t = _context["catch"](2);
|
|
33150
|
-
setImportResult({
|
|
33151
|
-
status: "error",
|
|
33152
|
-
message: _t.message || "Failed to import dashboard."
|
|
33153
|
-
});
|
|
33154
|
-
case 6:
|
|
33155
|
-
case "end":
|
|
33156
|
-
return _context.stop();
|
|
33157
|
-
}
|
|
33158
|
-
}, _callee, null, [[2, 5]]);
|
|
33159
|
-
}));
|
|
33160
|
-
return _handleImport.apply(this, arguments);
|
|
33161
|
-
}
|
|
33162
33100
|
var selectedWorkspace = workspaces.find(function (ws) {
|
|
33163
33101
|
return ws.id === selectedId;
|
|
33164
33102
|
});
|
|
@@ -33174,7 +33112,6 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33174
33112
|
onClick: function onClick() {
|
|
33175
33113
|
setSelectedId(ws.id);
|
|
33176
33114
|
setInstallMode(null);
|
|
33177
|
-
setImportResult(null);
|
|
33178
33115
|
},
|
|
33179
33116
|
badge: String(widgetCount),
|
|
33180
33117
|
className: isSelected ? "bg-white/10 opacity-100" : "",
|
|
@@ -33210,9 +33147,9 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33210
33147
|
className: "flex flex-col h-full",
|
|
33211
33148
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33212
33149
|
className: "flex-shrink-0 flex flex-col gap-2 px-3 py-2 ".concat(headerStyles.backgroundColor || ""),
|
|
33213
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
33150
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
33214
33151
|
className: "flex items-center gap-2",
|
|
33215
|
-
children:
|
|
33152
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
33216
33153
|
className: "flex-1",
|
|
33217
33154
|
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.SearchInput, {
|
|
33218
33155
|
value: searchQuery,
|
|
@@ -33220,12 +33157,7 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33220
33157
|
placeholder: "Search dashboards...",
|
|
33221
33158
|
inputClassName: "py-1.5 text-xs"
|
|
33222
33159
|
})
|
|
33223
|
-
})
|
|
33224
|
-
icon: "file-import",
|
|
33225
|
-
onClick: handleImport,
|
|
33226
|
-
size: "sm",
|
|
33227
|
-
title: "Import dashboard"
|
|
33228
|
-
})]
|
|
33160
|
+
})
|
|
33229
33161
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
33230
33162
|
className: "flex bg-white/5 rounded-md p-0.5",
|
|
33231
33163
|
children: [{
|
|
@@ -33247,7 +33179,6 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33247
33179
|
setSelectedId(null);
|
|
33248
33180
|
} else {
|
|
33249
33181
|
setInstallMode(null);
|
|
33250
|
-
setImportResult(null);
|
|
33251
33182
|
setViewMode(tab.key);
|
|
33252
33183
|
}
|
|
33253
33184
|
},
|
|
@@ -33275,37 +33206,6 @@ var DashboardsSection = function DashboardsSection(_ref) {
|
|
|
33275
33206
|
},
|
|
33276
33207
|
appId: appId
|
|
33277
33208
|
});
|
|
33278
|
-
} else if (installMode === "import-result") {
|
|
33279
|
-
detailContent = /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33280
|
-
className: "flex flex-col flex-1 min-h-0 p-6 space-y-4",
|
|
33281
|
-
children: [(importResult === null || importResult === void 0 ? void 0 : importResult.status) === "loading" && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33282
|
-
className: "flex items-center gap-3",
|
|
33283
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
33284
|
-
className: "animate-spin rounded-full h-5 w-5 border-b-2 border-blue-500"
|
|
33285
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
33286
|
-
className: "text-sm opacity-70",
|
|
33287
|
-
children: importResult.message
|
|
33288
|
-
})]
|
|
33289
|
-
}), (importResult === null || importResult === void 0 ? void 0 : importResult.status) === "success" && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33290
|
-
className: "flex items-center gap-2",
|
|
33291
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
33292
|
-
icon: "circle-check",
|
|
33293
|
-
className: "h-4 w-4 text-green-400"
|
|
33294
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
33295
|
-
className: "text-sm",
|
|
33296
|
-
children: importResult.message
|
|
33297
|
-
})]
|
|
33298
|
-
}), (importResult === null || importResult === void 0 ? void 0 : importResult.status) === "error" && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
33299
|
-
className: "flex items-center gap-2",
|
|
33300
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
33301
|
-
icon: "circle-xmark",
|
|
33302
|
-
className: "h-4 w-4 text-red-400"
|
|
33303
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
33304
|
-
className: "text-sm text-red-400",
|
|
33305
|
-
children: importResult.message
|
|
33306
|
-
})]
|
|
33307
|
-
})]
|
|
33308
|
-
});
|
|
33309
33209
|
} else if (selectedWorkspace) {
|
|
33310
33210
|
detailContent = /*#__PURE__*/jsxRuntime.jsx(DashboardDetail, {
|
|
33311
33211
|
workspace: selectedWorkspace,
|
|
@@ -36920,14 +36820,14 @@ var InstalledWidgetDetail = function InstalledWidgetDetail(_ref) {
|
|
|
36920
36820
|
className: "text-sm opacity-70",
|
|
36921
36821
|
children: widget.workspace
|
|
36922
36822
|
})]
|
|
36923
|
-
}), widget.providers
|
|
36823
|
+
}), getUserConfigurableProviders(widget.providers).length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36924
36824
|
className: "flex flex-col space-y-1",
|
|
36925
36825
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36926
36826
|
className: "text-xs font-semibold opacity-50",
|
|
36927
36827
|
children: "PROVIDERS"
|
|
36928
36828
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
36929
36829
|
className: "flex flex-wrap gap-1.5",
|
|
36930
|
-
children: widget.providers.map(function (p, i) {
|
|
36830
|
+
children: getUserConfigurableProviders(widget.providers).map(function (p, i) {
|
|
36931
36831
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
36932
36832
|
className: "flex flex-col gap-1",
|
|
36933
36833
|
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
@@ -37126,22 +37026,22 @@ var RegistryPackageDetail = function RegistryPackageDetail(_ref) {
|
|
|
37126
37026
|
}), w.description && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
37127
37027
|
className: "text-xs opacity-50 mt-0.5",
|
|
37128
37028
|
children: w.description
|
|
37129
|
-
}), w.providers
|
|
37029
|
+
}), getUserConfigurableProviders(w.providers).length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
37130
37030
|
className: "space-y-1 mt-1",
|
|
37131
37031
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
37132
37032
|
className: "flex gap-1 flex-wrap",
|
|
37133
|
-
children: w.providers.map(function (p, pidx) {
|
|
37033
|
+
children: getUserConfigurableProviders(w.providers).map(function (p, pidx) {
|
|
37134
37034
|
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
37135
37035
|
className: "text-xs px-1.5 py-0.5 rounded bg-blue-900/30 text-blue-400",
|
|
37136
37036
|
children: [p.type, p.required ? " *" : ""]
|
|
37137
37037
|
}, pidx);
|
|
37138
37038
|
})
|
|
37139
|
-
}), w.providers.some(function (p) {
|
|
37039
|
+
}), getUserConfigurableProviders(w.providers).some(function (p) {
|
|
37140
37040
|
var _p$requiredTools;
|
|
37141
37041
|
return ((_p$requiredTools = p.requiredTools) === null || _p$requiredTools === void 0 ? void 0 : _p$requiredTools.length) > 0;
|
|
37142
37042
|
}) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
37143
37043
|
className: "flex flex-wrap gap-1 ml-1",
|
|
37144
|
-
children: w.providers.filter(function (p) {
|
|
37044
|
+
children: getUserConfigurableProviders(w.providers).filter(function (p) {
|
|
37145
37045
|
var _p$requiredTools2;
|
|
37146
37046
|
return ((_p$requiredTools2 = p.requiredTools) === null || _p$requiredTools2 === void 0 ? void 0 : _p$requiredTools2.length) > 0;
|
|
37147
37047
|
}).flatMap(function (p) {
|
|
@@ -38076,7 +37976,7 @@ var WidgetsSection = function WidgetsSection(_ref) {
|
|
|
38076
37976
|
}, [widgets]);
|
|
38077
37977
|
var uniqueProviders = React.useMemo(function () {
|
|
38078
37978
|
return _toConsumableArray(new Set(widgets.flatMap(function (w) {
|
|
38079
|
-
return (w.providers || []).map(function (p) {
|
|
37979
|
+
return getUserConfigurableProviders(w.providers || []).map(function (p) {
|
|
38080
37980
|
return p.type;
|
|
38081
37981
|
});
|
|
38082
37982
|
}))).sort();
|
|
@@ -38100,9 +38000,9 @@ var WidgetsSection = function WidgetsSection(_ref) {
|
|
|
38100
38000
|
// Provider filter
|
|
38101
38001
|
if (filterProvider !== "all") {
|
|
38102
38002
|
if (filterProvider === "none") {
|
|
38103
|
-
if (w.providers
|
|
38003
|
+
if (getUserConfigurableProviders(w.providers).length > 0) return false;
|
|
38104
38004
|
} else {
|
|
38105
|
-
if (!w.providers
|
|
38005
|
+
if (!getUserConfigurableProviders(w.providers).some(function (p) {
|
|
38106
38006
|
return p.type === filterProvider;
|
|
38107
38007
|
})) return false;
|
|
38108
38008
|
}
|
|
@@ -43704,6 +43604,7 @@ exports.getNextLowestItemInLayout = getNextLowestItemInLayout;
|
|
|
43704
43604
|
exports.getParentForLayoutItem = getParentForLayoutItem;
|
|
43705
43605
|
exports.getParentWorkspaceForItem = getParentWorkspaceForItem;
|
|
43706
43606
|
exports.getThemePresets = getThemePresets;
|
|
43607
|
+
exports.getUserConfigurableProviders = getUserConfigurableProviders;
|
|
43707
43608
|
exports.getWidgetsForWorkspace = getWidgetsForWorkspace;
|
|
43708
43609
|
exports.getWorkspacesForWorkspace = getWorkspacesForWorkspace;
|
|
43709
43610
|
exports.headerTemplateToRows = headerTemplateToRows;
|