@trops/dash-core 0.1.460 → 0.1.461
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 +63 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +63 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6888,6 +6888,11 @@ var useRegistrySearch = function useRegistrySearch() {
|
|
|
6888
6888
|
search: search,
|
|
6889
6889
|
installPackage: installPackage,
|
|
6890
6890
|
retry: retry,
|
|
6891
|
+
// refetch is an alias of retry, exposed under the name the
|
|
6892
|
+
// Wizard's sign-in flow uses to re-fetch the registry once
|
|
6893
|
+
// the user signs in (so private results show up without a
|
|
6894
|
+
// manual reload).
|
|
6895
|
+
refetch: retry,
|
|
6891
6896
|
showAllPackages: showAllPackages,
|
|
6892
6897
|
setShowAllPackages: setShowAllPackages,
|
|
6893
6898
|
appCapabilities: appCapabilities
|
|
@@ -6996,7 +7001,27 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
6996
7001
|
isLoading = _useRegistrySearch.isLoading,
|
|
6997
7002
|
error = _useRegistrySearch.error,
|
|
6998
7003
|
searchQuery = _useRegistrySearch.searchQuery,
|
|
6999
|
-
setSearchQuery = _useRegistrySearch.setSearchQuery
|
|
7004
|
+
setSearchQuery = _useRegistrySearch.setSearchQuery,
|
|
7005
|
+
refetch = _useRegistrySearch.refetch;
|
|
7006
|
+
|
|
7007
|
+
// --- Registry auth (device-code OAuth) ---
|
|
7008
|
+
// Surfaces a sign-in CTA when the user isn't authenticated so they
|
|
7009
|
+
// see private dashboards/widgets they have access to. After
|
|
7010
|
+
// successful auth, `refetch` re-runs the registry search so the
|
|
7011
|
+
// results refresh automatically — no manual reload needed.
|
|
7012
|
+
var _useRegistryAuth = useRegistryAuth(),
|
|
7013
|
+
isAuthenticated = _useRegistryAuth.isAuthenticated,
|
|
7014
|
+
isAuthenticating = _useRegistryAuth.isAuthenticating,
|
|
7015
|
+
authError = _useRegistryAuth.authError,
|
|
7016
|
+
checkAuth = _useRegistryAuth.checkAuth,
|
|
7017
|
+
initiateAuth = _useRegistryAuth.initiateAuth,
|
|
7018
|
+
cancelAuth = _useRegistryAuth.cancelAuth;
|
|
7019
|
+
React.useEffect(function () {
|
|
7020
|
+
checkAuth();
|
|
7021
|
+
}, [checkAuth]);
|
|
7022
|
+
var handleSignIn = React.useCallback(function () {
|
|
7023
|
+
initiateAuth(refetch);
|
|
7024
|
+
}, [initiateAuth, refetch]);
|
|
7000
7025
|
|
|
7001
7026
|
// Sync search query from wizard state on mount
|
|
7002
7027
|
React.useEffect(function () {
|
|
@@ -7124,7 +7149,43 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
7124
7149
|
className: "flex flex-row gap-4",
|
|
7125
7150
|
children: [/*#__PURE__*/jsxRuntime.jsxs("aside", {
|
|
7126
7151
|
className: "flex-shrink-0 w-56 flex flex-col gap-4 overflow-y-auto",
|
|
7127
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7152
|
+
children: [!isAuthenticated && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7153
|
+
className: "flex flex-col gap-2 px-3 py-3 rounded bg-gray-800 text-gray-300",
|
|
7154
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7155
|
+
className: "text-xs font-semibold text-gray-200",
|
|
7156
|
+
children: "Sign in to registry"
|
|
7157
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7158
|
+
className: "text-xs text-gray-400",
|
|
7159
|
+
children: "See dashboards and widgets you have access to"
|
|
7160
|
+
}), !isAuthenticating ? /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7161
|
+
type: "button",
|
|
7162
|
+
onClick: handleSignIn,
|
|
7163
|
+
className: "mt-1 text-xs py-1.5 px-3 rounded bg-blue-600 text-white hover:bg-blue-500 transition-colors",
|
|
7164
|
+
children: "Sign in"
|
|
7165
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7166
|
+
className: "mt-1 flex flex-col gap-1",
|
|
7167
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7168
|
+
className: "text-xs text-gray-400",
|
|
7169
|
+
children: "Waiting for browser\u2026"
|
|
7170
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7171
|
+
type: "button",
|
|
7172
|
+
onClick: cancelAuth,
|
|
7173
|
+
className: "text-xs text-gray-400 hover:text-gray-200 underline self-start",
|
|
7174
|
+
children: "Cancel"
|
|
7175
|
+
})]
|
|
7176
|
+
}), authError && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7177
|
+
className: "text-xs text-red-400",
|
|
7178
|
+
children: authError
|
|
7179
|
+
})]
|
|
7180
|
+
}), isAuthenticated && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7181
|
+
className: "flex items-center gap-2 px-3 text-xs text-gray-500",
|
|
7182
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7183
|
+
icon: "circle-check",
|
|
7184
|
+
className: "text-green-400 text-xs"
|
|
7185
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7186
|
+
children: "Signed in"
|
|
7187
|
+
})]
|
|
7188
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7128
7189
|
className: "flex flex-col",
|
|
7129
7190
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7130
7191
|
className: sectionLabelClass,
|