@trops/dash-core 0.1.372 → 0.1.374
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 +67 -61
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +66 -60
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4720,6 +4720,31 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
|
|
|
4720
4720
|
});
|
|
4721
4721
|
};
|
|
4722
4722
|
|
|
4723
|
+
function RegistrySignInBanner(_ref) {
|
|
4724
|
+
var visible = _ref.visible,
|
|
4725
|
+
onSignIn = _ref.onSignIn,
|
|
4726
|
+
_ref$noun = _ref.noun,
|
|
4727
|
+
noun = _ref$noun === void 0 ? "package" : _ref$noun;
|
|
4728
|
+
if (!visible) return null;
|
|
4729
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4730
|
+
className: "flex-shrink-0 mx-4 mb-2 px-3 py-2 rounded-lg bg-amber-900/15 border border-amber-700/30 flex items-center gap-3",
|
|
4731
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4732
|
+
className: "flex-1 min-w-0",
|
|
4733
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(DashReact.Paragraph, {
|
|
4734
|
+
className: "text-xs text-amber-200 leading-snug",
|
|
4735
|
+
children: ["Sign in to the registry to also see your private ", noun, "s and ones granted to you."]
|
|
4736
|
+
})
|
|
4737
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
4738
|
+
title: "Sign in",
|
|
4739
|
+
bgColor: "bg-indigo-600",
|
|
4740
|
+
hoverBackgroundColor: "hover:bg-indigo-500",
|
|
4741
|
+
textSize: "text-xs",
|
|
4742
|
+
padding: "py-1 px-3",
|
|
4743
|
+
onClick: onSignIn
|
|
4744
|
+
})]
|
|
4745
|
+
});
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4723
4748
|
var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
|
|
4724
4749
|
var onBack = _ref.onBack,
|
|
4725
4750
|
appId = _ref.appId,
|
|
@@ -4733,7 +4758,10 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
|
|
|
4733
4758
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4734
4759
|
packages = _useState2[0],
|
|
4735
4760
|
setPackages = _useState2[1];
|
|
4736
|
-
|
|
4761
|
+
// Start in the loading state so the empty UI doesn't flash while the
|
|
4762
|
+
// initial debounce is pending — otherwise the sign-in nudge appears
|
|
4763
|
+
// briefly then disappears as soon as the registry returns results.
|
|
4764
|
+
var _useState3 = React.useState(true),
|
|
4737
4765
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
4738
4766
|
isLoading = _useState4[0],
|
|
4739
4767
|
setIsLoading = _useState4[1];
|
|
@@ -4908,27 +4936,12 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
|
|
|
4908
4936
|
})]
|
|
4909
4937
|
});
|
|
4910
4938
|
} else if (packages.length === 0) {
|
|
4911
|
-
listBody = /*#__PURE__*/jsxRuntime.
|
|
4912
|
-
className: "px-4 py-8 text-center
|
|
4913
|
-
children:
|
|
4939
|
+
listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4940
|
+
className: "px-4 py-8 text-center",
|
|
4941
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
4914
4942
|
className: "text-sm opacity-50",
|
|
4915
4943
|
children: searchQuery ? "No dashboards match your search." : "No dashboard packages available."
|
|
4916
|
-
})
|
|
4917
|
-
className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
|
|
4918
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
4919
|
-
className: "text-xs text-amber-200",
|
|
4920
|
-
children: "Sign in to the registry to see your private dashboards."
|
|
4921
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
4922
|
-
title: "Sign in to Registry",
|
|
4923
|
-
bgColor: "bg-indigo-600",
|
|
4924
|
-
hoverBackgroundColor: "hover:bg-indigo-500",
|
|
4925
|
-
textSize: "text-sm",
|
|
4926
|
-
padding: "py-1 px-3",
|
|
4927
|
-
onClick: function onClick() {
|
|
4928
|
-
return setShowAuthFromEmpty(true);
|
|
4929
|
-
}
|
|
4930
|
-
})]
|
|
4931
|
-
})]
|
|
4944
|
+
})
|
|
4932
4945
|
});
|
|
4933
4946
|
} else {
|
|
4934
4947
|
listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -4972,6 +4985,12 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
|
|
|
4972
4985
|
placeholder: "Search dashboards...",
|
|
4973
4986
|
inputClassName: "py-1.5 text-xs"
|
|
4974
4987
|
})
|
|
4988
|
+
}), /*#__PURE__*/jsxRuntime.jsx(RegistrySignInBanner, {
|
|
4989
|
+
visible: registryAuthed === false,
|
|
4990
|
+
onSignIn: function onSignIn() {
|
|
4991
|
+
return setShowAuthFromEmpty(true);
|
|
4992
|
+
},
|
|
4993
|
+
noun: "dashboard"
|
|
4975
4994
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4976
4995
|
className: "flex-1 min-h-0 overflow-y-auto px-2",
|
|
4977
4996
|
children: listBody
|
|
@@ -6244,7 +6263,10 @@ var useRegistrySearch = function useRegistrySearch() {
|
|
|
6244
6263
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
6245
6264
|
_ref$filterByCapabili = _ref.filterByCapabilities,
|
|
6246
6265
|
filterByCapabilities = _ref$filterByCapabili === void 0 ? true : _ref$filterByCapabili;
|
|
6247
|
-
|
|
6266
|
+
// Start in the loading state so consumers don't briefly render an
|
|
6267
|
+
// empty-list state during the initial debounce window before the first
|
|
6268
|
+
// search fires.
|
|
6269
|
+
var _useState = React.useState(true),
|
|
6248
6270
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6249
6271
|
isLoading = _useState2[0],
|
|
6250
6272
|
setIsLoading = _useState2[1];
|
|
@@ -38302,7 +38324,9 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
|
|
|
38302
38324
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38303
38325
|
packages = _useState2[0],
|
|
38304
38326
|
setPackages = _useState2[1];
|
|
38305
|
-
|
|
38327
|
+
// Start loading so the empty state with sign-in nudge doesn't flash
|
|
38328
|
+
// before the first fetch resolves.
|
|
38329
|
+
var _useState3 = React.useState(true),
|
|
38306
38330
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
38307
38331
|
isLoading = _useState4[0],
|
|
38308
38332
|
setIsLoading = _useState4[1];
|
|
@@ -38476,27 +38500,12 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
|
|
|
38476
38500
|
})]
|
|
38477
38501
|
});
|
|
38478
38502
|
} else if (packages.length === 0) {
|
|
38479
|
-
listBody = /*#__PURE__*/jsxRuntime.
|
|
38480
|
-
className: "px-4 py-8 text-center
|
|
38481
|
-
children:
|
|
38503
|
+
listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38504
|
+
className: "px-4 py-8 text-center",
|
|
38505
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
38482
38506
|
className: "text-sm opacity-50",
|
|
38483
38507
|
children: searchQuery ? "No themes match your search." : "No theme packages available."
|
|
38484
|
-
})
|
|
38485
|
-
className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
|
|
38486
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
38487
|
-
className: "text-xs text-amber-200",
|
|
38488
|
-
children: "Sign in to the registry to see your private themes."
|
|
38489
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
38490
|
-
title: "Sign in to Registry",
|
|
38491
|
-
bgColor: "bg-indigo-600",
|
|
38492
|
-
hoverBackgroundColor: "hover:bg-indigo-500",
|
|
38493
|
-
textSize: "text-sm",
|
|
38494
|
-
padding: "py-1 px-3",
|
|
38495
|
-
onClick: function onClick() {
|
|
38496
|
-
return setShowAuthFromEmpty(true);
|
|
38497
|
-
}
|
|
38498
|
-
})]
|
|
38499
|
-
})]
|
|
38508
|
+
})
|
|
38500
38509
|
});
|
|
38501
38510
|
} else {
|
|
38502
38511
|
listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -38542,6 +38551,12 @@ var DiscoverThemesDetail = function DiscoverThemesDetail(_ref) {
|
|
|
38542
38551
|
placeholder: "Search themes...",
|
|
38543
38552
|
inputClassName: "py-1.5 text-xs"
|
|
38544
38553
|
})
|
|
38554
|
+
}), /*#__PURE__*/jsxRuntime.jsx(RegistrySignInBanner, {
|
|
38555
|
+
visible: registryAuthed === false,
|
|
38556
|
+
onSignIn: function onSignIn() {
|
|
38557
|
+
return setShowAuthFromEmpty(true);
|
|
38558
|
+
},
|
|
38559
|
+
noun: "theme"
|
|
38545
38560
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
38546
38561
|
className: "flex-1 min-h-0 overflow-y-auto px-2",
|
|
38547
38562
|
children: listBody
|
|
@@ -47453,27 +47468,12 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
|
|
|
47453
47468
|
})]
|
|
47454
47469
|
});
|
|
47455
47470
|
} else if (packages.length === 0) {
|
|
47456
|
-
listBody = /*#__PURE__*/jsxRuntime.
|
|
47457
|
-
className: "px-4 py-8 text-center
|
|
47458
|
-
children:
|
|
47471
|
+
listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
47472
|
+
className: "px-4 py-8 text-center",
|
|
47473
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
47459
47474
|
className: "text-sm opacity-50",
|
|
47460
47475
|
children: searchQuery ? "No packages match your search." : "No packages available."
|
|
47461
|
-
})
|
|
47462
|
-
className: "inline-flex flex-col items-center gap-2 px-4 py-3 rounded-lg bg-amber-900/15 border border-amber-700/30",
|
|
47463
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Paragraph, {
|
|
47464
|
-
className: "text-xs text-amber-200",
|
|
47465
|
-
children: "Sign in to the registry to see your private packages."
|
|
47466
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
47467
|
-
title: "Sign in to Registry",
|
|
47468
|
-
bgColor: "bg-indigo-600",
|
|
47469
|
-
hoverBackgroundColor: "hover:bg-indigo-500",
|
|
47470
|
-
textSize: "text-sm",
|
|
47471
|
-
padding: "py-1 px-3",
|
|
47472
|
-
onClick: function onClick() {
|
|
47473
|
-
return setShowAuthFromEmpty(true);
|
|
47474
|
-
}
|
|
47475
|
-
})]
|
|
47476
|
-
})]
|
|
47476
|
+
})
|
|
47477
47477
|
});
|
|
47478
47478
|
} else {
|
|
47479
47479
|
listBody = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -47540,6 +47540,12 @@ var DiscoverWidgetsDetail = function DiscoverWidgetsDetail(_ref) {
|
|
|
47540
47540
|
className: "rounded"
|
|
47541
47541
|
}), "Show all packages"]
|
|
47542
47542
|
})]
|
|
47543
|
+
}), /*#__PURE__*/jsxRuntime.jsx(RegistrySignInBanner, {
|
|
47544
|
+
visible: registryAuthed === false,
|
|
47545
|
+
onSignIn: function onSignIn() {
|
|
47546
|
+
return setShowAuthFromEmpty(true);
|
|
47547
|
+
},
|
|
47548
|
+
noun: "widget"
|
|
47543
47549
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
47544
47550
|
className: "flex-1 min-h-0 overflow-y-auto px-2",
|
|
47545
47551
|
children: listBody
|