@trops/dash-core 0.1.471 → 0.1.473
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 +87 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +87 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40602,8 +40602,6 @@ var RegistryThemeDetail = function RegistryThemeDetail(_ref2) {
|
|
|
40602
40602
|
case 1:
|
|
40603
40603
|
setIsInstalling(true);
|
|
40604
40604
|
setInstallResult(null);
|
|
40605
|
-
setAuthFlow(null);
|
|
40606
|
-
setAuthError(null);
|
|
40607
40605
|
_context.prev = 2;
|
|
40608
40606
|
// Send scoped name (scope/name) for unambiguous package lookup;
|
|
40609
40607
|
// fall back to bare name if scope is missing
|
|
@@ -52922,6 +52920,14 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
52922
52920
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
52923
52921
|
selectedKey = _useState10[0],
|
|
52924
52922
|
setSelectedKey = _useState10[1];
|
|
52923
|
+
var _useState11 = React.useState("all"),
|
|
52924
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
52925
|
+
filterDashboard = _useState12[0],
|
|
52926
|
+
setFilterDashboard = _useState12[1];
|
|
52927
|
+
var _useState13 = React.useState("all"),
|
|
52928
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
52929
|
+
filterPackage = _useState14[0],
|
|
52930
|
+
setFilterPackage = _useState14[1];
|
|
52925
52931
|
|
|
52926
52932
|
// Load preferences on mount
|
|
52927
52933
|
React.useEffect(function () {
|
|
@@ -52969,15 +52975,48 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
52969
52975
|
});
|
|
52970
52976
|
}, [workspaces]);
|
|
52971
52977
|
|
|
52972
|
-
//
|
|
52978
|
+
// Derive dropdown option lists. Both sorted alphabetically so the
|
|
52979
|
+
// dropdowns don't shuffle as the underlying list changes order.
|
|
52980
|
+
var dashboardOptions = React.useMemo(function () {
|
|
52981
|
+
var set = new Set();
|
|
52982
|
+
widgetInstances.forEach(function (wi) {
|
|
52983
|
+
if (wi.workspaceName) set.add(wi.workspaceName);
|
|
52984
|
+
});
|
|
52985
|
+
return _toConsumableArray(set).sort(function (a, b) {
|
|
52986
|
+
return String(a).localeCompare(String(b), undefined, {
|
|
52987
|
+
sensitivity: "base"
|
|
52988
|
+
});
|
|
52989
|
+
});
|
|
52990
|
+
}, [widgetInstances]);
|
|
52991
|
+
var packageOptions = React.useMemo(function () {
|
|
52992
|
+
var set = new Set();
|
|
52993
|
+
widgetInstances.forEach(function (wi) {
|
|
52994
|
+
if (wi["package"]) set.add(wi["package"]);
|
|
52995
|
+
});
|
|
52996
|
+
return _toConsumableArray(set).sort(function (a, b) {
|
|
52997
|
+
return String(a).localeCompare(String(b), undefined, {
|
|
52998
|
+
sensitivity: "base"
|
|
52999
|
+
});
|
|
53000
|
+
});
|
|
53001
|
+
}, [widgetInstances]);
|
|
53002
|
+
var hasActiveFilters = searchQuery.trim() !== "" || filterDashboard !== "all" || filterPackage !== "all";
|
|
53003
|
+
var clearFilters = function clearFilters() {
|
|
53004
|
+
setSearchQuery("");
|
|
53005
|
+
setFilterDashboard("all");
|
|
53006
|
+
setFilterPackage("all");
|
|
53007
|
+
};
|
|
53008
|
+
|
|
53009
|
+
// Filter by search + dashboard + package (composed AND).
|
|
52973
53010
|
var filteredInstances = React.useMemo(function () {
|
|
52974
53011
|
var q = searchQuery.trim().toLowerCase();
|
|
52975
|
-
if (!q) return widgetInstances;
|
|
52976
53012
|
return widgetInstances.filter(function (wi) {
|
|
53013
|
+
if (filterDashboard !== "all" && wi.workspaceName !== filterDashboard) return false;
|
|
53014
|
+
if (filterPackage !== "all" && wi["package"] !== filterPackage) return false;
|
|
53015
|
+
if (!q) return true;
|
|
52977
53016
|
var hay = [wi.title, wi["package"], wi.workspaceName, wi.componentName].filter(Boolean).join(" ").toLowerCase();
|
|
52978
53017
|
return hay.includes(q);
|
|
52979
53018
|
});
|
|
52980
|
-
}, [widgetInstances, searchQuery]);
|
|
53019
|
+
}, [widgetInstances, searchQuery, filterDashboard, filterPackage]);
|
|
52981
53020
|
function handleGlobalToggle(value) {
|
|
52982
53021
|
var _window$mainApi2;
|
|
52983
53022
|
setGlobalEnabled(value);
|
|
@@ -53023,8 +53062,49 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
53023
53062
|
placeholder: "Search widgets...",
|
|
53024
53063
|
inputClassName: "py-1.5 text-xs"
|
|
53025
53064
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53026
|
-
className: "
|
|
53027
|
-
children: [
|
|
53065
|
+
className: "grid grid-cols-2 gap-1.5",
|
|
53066
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("select", {
|
|
53067
|
+
value: filterDashboard,
|
|
53068
|
+
onChange: function onChange(e) {
|
|
53069
|
+
return setFilterDashboard(e.target.value);
|
|
53070
|
+
},
|
|
53071
|
+
className: "w-full px-2 py-1 text-xs bg-gray-800/50 border border-white/10 rounded text-gray-200 focus:outline-none",
|
|
53072
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("option", {
|
|
53073
|
+
value: "all",
|
|
53074
|
+
children: "All Dashboards"
|
|
53075
|
+
}), dashboardOptions.map(function (d) {
|
|
53076
|
+
return /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
53077
|
+
value: d,
|
|
53078
|
+
children: d
|
|
53079
|
+
}, d);
|
|
53080
|
+
})]
|
|
53081
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("select", {
|
|
53082
|
+
value: filterPackage,
|
|
53083
|
+
onChange: function onChange(e) {
|
|
53084
|
+
return setFilterPackage(e.target.value);
|
|
53085
|
+
},
|
|
53086
|
+
className: "w-full px-2 py-1 text-xs bg-gray-800/50 border border-white/10 rounded text-gray-200 focus:outline-none",
|
|
53087
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("option", {
|
|
53088
|
+
value: "all",
|
|
53089
|
+
children: "All Packages"
|
|
53090
|
+
}), packageOptions.map(function (p) {
|
|
53091
|
+
return /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
53092
|
+
value: p,
|
|
53093
|
+
children: p
|
|
53094
|
+
}, p);
|
|
53095
|
+
})]
|
|
53096
|
+
})]
|
|
53097
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53098
|
+
className: "flex items-center justify-between text-[10px] px-0.5",
|
|
53099
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53100
|
+
className: "opacity-50",
|
|
53101
|
+
children: hasActiveFilters ? "".concat(filteredInstances.length, " of ").concat(widgetInstances.length, " widgets") : "".concat(widgetInstances.length, " widget").concat(widgetInstances.length === 1 ? "" : "s")
|
|
53102
|
+
}), hasActiveFilters && /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
53103
|
+
type: "button",
|
|
53104
|
+
onClick: clearFilters,
|
|
53105
|
+
className: "opacity-60 hover:opacity-100 transition-opacity text-gray-300 hover:bg-white/10 px-1.5 py-0.5 rounded",
|
|
53106
|
+
children: "Clear"
|
|
53107
|
+
})]
|
|
53028
53108
|
})]
|
|
53029
53109
|
}), /*#__PURE__*/jsxRuntime.jsxs(DashReact.Sidebar.Content, {
|
|
53030
53110
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
|