@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.esm.js
CHANGED
|
@@ -6870,6 +6870,11 @@ var useRegistrySearch = function useRegistrySearch() {
|
|
|
6870
6870
|
search: search,
|
|
6871
6871
|
installPackage: installPackage,
|
|
6872
6872
|
retry: retry,
|
|
6873
|
+
// refetch is an alias of retry, exposed under the name the
|
|
6874
|
+
// Wizard's sign-in flow uses to re-fetch the registry once
|
|
6875
|
+
// the user signs in (so private results show up without a
|
|
6876
|
+
// manual reload).
|
|
6877
|
+
refetch: retry,
|
|
6873
6878
|
showAllPackages: showAllPackages,
|
|
6874
6879
|
setShowAllPackages: setShowAllPackages,
|
|
6875
6880
|
appCapabilities: appCapabilities
|
|
@@ -6978,7 +6983,27 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
6978
6983
|
isLoading = _useRegistrySearch.isLoading,
|
|
6979
6984
|
error = _useRegistrySearch.error,
|
|
6980
6985
|
searchQuery = _useRegistrySearch.searchQuery,
|
|
6981
|
-
setSearchQuery = _useRegistrySearch.setSearchQuery
|
|
6986
|
+
setSearchQuery = _useRegistrySearch.setSearchQuery,
|
|
6987
|
+
refetch = _useRegistrySearch.refetch;
|
|
6988
|
+
|
|
6989
|
+
// --- Registry auth (device-code OAuth) ---
|
|
6990
|
+
// Surfaces a sign-in CTA when the user isn't authenticated so they
|
|
6991
|
+
// see private dashboards/widgets they have access to. After
|
|
6992
|
+
// successful auth, `refetch` re-runs the registry search so the
|
|
6993
|
+
// results refresh automatically — no manual reload needed.
|
|
6994
|
+
var _useRegistryAuth = useRegistryAuth(),
|
|
6995
|
+
isAuthenticated = _useRegistryAuth.isAuthenticated,
|
|
6996
|
+
isAuthenticating = _useRegistryAuth.isAuthenticating,
|
|
6997
|
+
authError = _useRegistryAuth.authError,
|
|
6998
|
+
checkAuth = _useRegistryAuth.checkAuth,
|
|
6999
|
+
initiateAuth = _useRegistryAuth.initiateAuth,
|
|
7000
|
+
cancelAuth = _useRegistryAuth.cancelAuth;
|
|
7001
|
+
useEffect(function () {
|
|
7002
|
+
checkAuth();
|
|
7003
|
+
}, [checkAuth]);
|
|
7004
|
+
var handleSignIn = useCallback(function () {
|
|
7005
|
+
initiateAuth(refetch);
|
|
7006
|
+
}, [initiateAuth, refetch]);
|
|
6982
7007
|
|
|
6983
7008
|
// Sync search query from wizard state on mount
|
|
6984
7009
|
useEffect(function () {
|
|
@@ -7106,7 +7131,43 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
7106
7131
|
className: "flex flex-row gap-4",
|
|
7107
7132
|
children: [/*#__PURE__*/jsxs("aside", {
|
|
7108
7133
|
className: "flex-shrink-0 w-56 flex flex-col gap-4 overflow-y-auto",
|
|
7109
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
7134
|
+
children: [!isAuthenticated && /*#__PURE__*/jsxs("div", {
|
|
7135
|
+
className: "flex flex-col gap-2 px-3 py-3 rounded bg-gray-800 text-gray-300",
|
|
7136
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
7137
|
+
className: "text-xs font-semibold text-gray-200",
|
|
7138
|
+
children: "Sign in to registry"
|
|
7139
|
+
}), /*#__PURE__*/jsx("span", {
|
|
7140
|
+
className: "text-xs text-gray-400",
|
|
7141
|
+
children: "See dashboards and widgets you have access to"
|
|
7142
|
+
}), !isAuthenticating ? /*#__PURE__*/jsx("button", {
|
|
7143
|
+
type: "button",
|
|
7144
|
+
onClick: handleSignIn,
|
|
7145
|
+
className: "mt-1 text-xs py-1.5 px-3 rounded bg-blue-600 text-white hover:bg-blue-500 transition-colors",
|
|
7146
|
+
children: "Sign in"
|
|
7147
|
+
}) : /*#__PURE__*/jsxs("div", {
|
|
7148
|
+
className: "mt-1 flex flex-col gap-1",
|
|
7149
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
7150
|
+
className: "text-xs text-gray-400",
|
|
7151
|
+
children: "Waiting for browser\u2026"
|
|
7152
|
+
}), /*#__PURE__*/jsx("button", {
|
|
7153
|
+
type: "button",
|
|
7154
|
+
onClick: cancelAuth,
|
|
7155
|
+
className: "text-xs text-gray-400 hover:text-gray-200 underline self-start",
|
|
7156
|
+
children: "Cancel"
|
|
7157
|
+
})]
|
|
7158
|
+
}), authError && /*#__PURE__*/jsx("span", {
|
|
7159
|
+
className: "text-xs text-red-400",
|
|
7160
|
+
children: authError
|
|
7161
|
+
})]
|
|
7162
|
+
}), isAuthenticated && /*#__PURE__*/jsxs("div", {
|
|
7163
|
+
className: "flex items-center gap-2 px-3 text-xs text-gray-500",
|
|
7164
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
7165
|
+
icon: "circle-check",
|
|
7166
|
+
className: "text-green-400 text-xs"
|
|
7167
|
+
}), /*#__PURE__*/jsx("span", {
|
|
7168
|
+
children: "Signed in"
|
|
7169
|
+
})]
|
|
7170
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
7110
7171
|
className: "flex flex-col",
|
|
7111
7172
|
children: [/*#__PURE__*/jsx("span", {
|
|
7112
7173
|
className: sectionLabelClass,
|