@burdenoff/microfe-auth 2026.1030.1 → 2026.1101.1
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/auth/AuthRoot.js +14 -11
- package/dist/auth/AuthRoot.js.map +1 -1
- package/dist/auth/AuthRoutes.js +1 -2
- package/dist/auth/AuthRoutes.js.map +1 -1
- package/dist/auth/components/AuthIcons.js +1 -2
- package/dist/auth/components/AuthIcons.js.map +1 -1
- package/dist/auth/components/AuthLayout.js +1 -2
- package/dist/auth/components/AuthLayout.js.map +1 -1
- package/dist/auth/components/CaptchaV2.js +9 -10
- package/dist/auth/components/CaptchaV2.js.map +1 -1
- package/dist/auth/components/ConfirmActionDialog.js +1 -2
- package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
- package/dist/auth/components/profile/UserProfileMenu.js +7 -6
- package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
- package/dist/auth/components/workspace/WorkspaceSelector.js +1 -2
- package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
- package/dist/auth/constants/permissions.js +1 -2
- package/dist/auth/constants/permissions.js.map +1 -1
- package/dist/auth/constants/sessionKeys.js +1 -2
- package/dist/auth/constants/sessionKeys.js.map +1 -1
- package/dist/auth/hooks/contextDeepLink.js +1 -2
- package/dist/auth/hooks/contextDeepLink.js.map +1 -1
- package/dist/auth/hooks/index.js +12 -11
- package/dist/auth/hooks/useAccountOperations.js +1 -2
- package/dist/auth/hooks/useAccountOperations.js.map +1 -1
- package/dist/auth/hooks/useActiveContextBootstrapMirror.js +1 -2
- package/dist/auth/hooks/useActiveContextBootstrapMirror.js.map +1 -1
- package/dist/auth/hooks/useAuthOperations.js +37 -37
- package/dist/auth/hooks/useAuthOperations.js.map +1 -1
- package/dist/auth/hooks/useAuthPermissions.js +1 -2
- package/dist/auth/hooks/useAuthPermissions.js.map +1 -1
- package/dist/auth/hooks/useCaptchaV3.js +1 -2
- package/dist/auth/hooks/useCaptchaV3.js.map +1 -1
- package/dist/auth/hooks/useContextSwitcherData.js +81 -78
- package/dist/auth/hooks/useContextSwitcherData.js.map +1 -1
- package/dist/auth/hooks/useMfaOperations.js +4 -5
- package/dist/auth/hooks/useMfaOperations.js.map +1 -1
- package/dist/auth/hooks/useMyWorkspaces.js +4 -5
- package/dist/auth/hooks/useMyWorkspaces.js.map +1 -1
- package/dist/auth/hooks/useOAuthOperations.js +11 -12
- package/dist/auth/hooks/useOAuthOperations.js.map +1 -1
- package/dist/auth/hooks/usePasswordOperations.js +1 -2
- package/dist/auth/hooks/usePasswordOperations.js.map +1 -1
- package/dist/auth/hooks/useSessionOperations.js +3 -4
- package/dist/auth/hooks/useSessionOperations.js.map +1 -1
- package/dist/auth/hooks/useSignupCaptcha.js +1 -2
- package/dist/auth/hooks/useSignupCaptcha.js.map +1 -1
- package/dist/auth/hooks/useSsoOperations.js +80 -81
- package/dist/auth/hooks/useSsoOperations.js.map +1 -1
- package/dist/auth/hooks/useTokenRefresh.js +8 -12
- package/dist/auth/hooks/useTokenRefresh.js.map +1 -1
- package/dist/auth/hooks/useUserOperations.js +1 -2
- package/dist/auth/hooks/useUserOperations.js.map +1 -1
- package/dist/auth/hooks/useWorkspaceOperations.js +1 -2
- package/dist/auth/hooks/useWorkspaceOperations.js.map +1 -1
- package/dist/auth/hooks/useWorkspaceToken.js +1 -2
- package/dist/auth/hooks/useWorkspaceToken.js.map +1 -1
- package/dist/auth/index.js +19 -18
- package/dist/auth/pages/AuditLogPage.js +21 -22
- package/dist/auth/pages/AuditLogPage.js.map +1 -1
- package/dist/auth/pages/EmailVerifyPage.js +70 -64
- package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
- package/dist/auth/pages/LoginPage.js +89 -105
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/MagicLinkPage.js +30 -31
- package/dist/auth/pages/MagicLinkPage.js.map +1 -1
- package/dist/auth/pages/MfaSetupPage.js +18 -20
- package/dist/auth/pages/MfaSetupPage.js.map +1 -1
- package/dist/auth/pages/MfaVerifyPage.js +31 -35
- package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
- package/dist/auth/pages/OAuthCallbackPage.js +4 -11
- package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +20 -23
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/ReactivatePage.js +14 -18
- package/dist/auth/pages/ReactivatePage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.js +180 -181
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/SSOClearPage.js +9 -10
- package/dist/auth/pages/SSOClearPage.js.map +1 -1
- package/dist/auth/pages/SSODepositPage.js +9 -13
- package/dist/auth/pages/SSODepositPage.js.map +1 -1
- package/dist/auth/pages/SSORelayCallbackPage.js +3 -7
- package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
- package/dist/auth/pages/SSORelayPage.js +11 -10
- package/dist/auth/pages/SSORelayPage.js.map +1 -1
- package/dist/auth/pages/SecurityPage.js +19 -21
- package/dist/auth/pages/SecurityPage.js.map +1 -1
- package/dist/auth/pages/SessionBridgePage.js +9 -16
- package/dist/auth/pages/SessionBridgePage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.js +17 -18
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/auth/pages/SsoCallbackPage.js +17 -22
- package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +69 -69
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +9 -10
- package/dist/auth/pages/SsoLoginPage.js.map +1 -1
- package/dist/auth/pages/UserDetailsPage.js +16 -23
- package/dist/auth/pages/UserDetailsPage.js.map +1 -1
- package/dist/auth/pages/UserProfilePage.js +140 -141
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.js +446 -453
- package/dist/auth/pages/UsersPage.js.map +1 -1
- package/dist/auth/providers/AuthProvider.js +1 -2
- package/dist/auth/providers/AuthProvider.js.map +1 -1
- package/dist/auth/providers/CaptchaProvider.js +1 -2
- package/dist/auth/providers/CaptchaProvider.js.map +1 -1
- package/dist/auth/store/authStore.js +5 -12
- package/dist/auth/store/authStore.js.map +1 -1
- package/dist/auth/utils/captchaConfig.js +5 -8
- package/dist/auth/utils/captchaConfig.js.map +1 -1
- package/dist/auth/utils/formatters.js +1 -2
- package/dist/auth/utils/formatters.js.map +1 -1
- package/dist/auth/utils/gatewayBaseUrls.js +1 -2
- package/dist/auth/utils/gatewayBaseUrls.js.map +1 -1
- package/dist/auth/utils/legalUrls.js +2 -3
- package/dist/auth/utils/legalUrls.js.map +1 -1
- package/dist/auth/utils/redirect.js +1 -2
- package/dist/auth/utils/redirect.js.map +1 -1
- package/dist/auth/utils/ssoOrigins.js +2 -3
- package/dist/auth/utils/ssoOrigins.js.map +1 -1
- package/dist/auth/utils/validation.js +34 -36
- package/dist/auth/utils/validation.js.map +1 -1
- package/dist/generated/global-operations.js +2 -3
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/wspace-operations.js +2 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/microfe-auth.css +1 -1
- package/dist/shared/hooks/useTr.js +1 -2
- package/dist/shared/hooks/useTr.js.map +1 -1
- package/dist/translations/en.js +1 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +7 -3
|
@@ -8,8 +8,8 @@ import { getStoredAuthToken as d, graphqlFetch as f } from "@burdenoff/fe-libs/s
|
|
|
8
8
|
import { clearWorkspaceWideSelection as p, isWorkspaceWideSelection as m, selectWorkspaceWide as h } from "@burdenoff/fe-libs/shared/providers/shell/WorkspaceWideSelection";
|
|
9
9
|
import { getUrlParam as g } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextStorage";
|
|
10
10
|
import { useActiveContext as _ } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextProvider";
|
|
11
|
-
|
|
12
|
-
var v = "\n query MyOrganizations {\n myOrganizations {\n total\n items {\n id\n name\n slug\n tenantId\n description\n logo\n website\n status\n type\n createdAt\n updatedAt\n }\n }\n }\n", y = "\n query WorkspacesByOrg {\n workspaces: myWorkspaces(limit: 100) {\n total\n items {\n id\n name\n slug\n tenantId\n organizationId\n type\n status\n region\n createdAt\n updatedAt\n }\n }\n }\n", b = "\n query MyWorkspacesPage($limit: Int, $offset: Int) {\n workspaces: myWorkspaces(limit: $limit, offset: $offset) {\n total\n items {\n id\n name\n slug\n tenantId\n organizationId\n type\n status\n region\n createdAt\n updatedAt\n }\n }\n }\n", x = new Set(["NOT_PROJECT_MEMBER", "PROJECT_NOT_FOUND"]);
|
|
11
|
+
// src/auth/hooks/useContextSwitcherData.ts
|
|
12
|
+
var v = "\n query MyOrganizations {\n myOrganizations {\n total\n items {\n id\n name\n slug\n tenantId\n description\n logo\n website\n status\n type\n createdAt\n updatedAt\n }\n }\n }\n", y = "\n query WorkspacesByOrg {\n workspaces: myWorkspaces(limit: 100) {\n total\n items {\n id\n name\n slug\n tenantId\n organizationId\n type\n status\n region\n createdAt\n updatedAt\n }\n }\n }\n", b = "\n query MyWorkspacesPage($limit: Int, $offset: Int) {\n workspaces: myWorkspaces(limit: $limit, offset: $offset) {\n total\n items {\n id\n name\n slug\n tenantId\n organizationId\n type\n status\n region\n createdAt\n updatedAt\n }\n }\n }\n", x = /* @__PURE__ */ new Set(["NOT_PROJECT_MEMBER", "PROJECT_NOT_FOUND"]);
|
|
13
13
|
function S(e) {
|
|
14
14
|
return !!e && x.has(e);
|
|
15
15
|
}
|
|
@@ -86,13 +86,13 @@ function M(e) {
|
|
|
86
86
|
tenantId: e.find((e) => e.organizationId === t)?.tenantId || ""
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
|
-
var N = new Set([
|
|
89
|
+
var N = /* @__PURE__ */ new Set([
|
|
90
90
|
"project.created",
|
|
91
91
|
"project.updated",
|
|
92
92
|
"project.deleted",
|
|
93
93
|
"project.archived",
|
|
94
94
|
"project.unarchived"
|
|
95
|
-
]), P = new Set([
|
|
95
|
+
]), P = /* @__PURE__ */ new Set([
|
|
96
96
|
"workspace.created",
|
|
97
97
|
"workspace.updated",
|
|
98
98
|
"workspace.deleted",
|
|
@@ -106,44 +106,44 @@ function F(e) {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
function I(d) {
|
|
109
|
-
let { organizationId:
|
|
109
|
+
let b = d?.disableBootstrap ?? !1, x = d?.disableWorkspaceSync ?? !1, S = d?.disableProjectSync ?? !1, C = d?.skipProjectFetch ?? !1, { organizationId: w, workspaceId: T, projectId: E, tenantId: I, setContext: L } = _(), R = u(), z = e((e) => e.organizations), ne = e((e) => e.currentOrganizationId), re = e((e) => e.isLoadingOrganizations), B = e((e) => e.workspaces), ie = e((e) => e.currentWorkspaceId), ae = e((e) => e.workspaceToken), oe = e((e) => e.isLoadingWorkspaces), se = e((e) => e.projects), ce = e((e) => e.currentProjectId), le = e((e) => e.isLoadingProjects);
|
|
110
110
|
o(() => {
|
|
111
|
-
let e =
|
|
112
|
-
|
|
111
|
+
let e = B.find((e) => e.id === T && e.organizationId === w), t = z.find((e) => e.id === w);
|
|
112
|
+
e && t && /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(e.tenantId) && e.tenantId === t.tenantId && I !== e.tenantId && L({ tenantId: e.tenantId });
|
|
113
113
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
w,
|
|
115
|
+
T,
|
|
116
|
+
I,
|
|
117
|
+
z,
|
|
118
|
+
B,
|
|
119
|
+
L
|
|
120
120
|
]);
|
|
121
|
-
let [
|
|
121
|
+
let [ue, V] = c(null), [de, H] = c(0), U = s(0), W = s(null), G = s(/* @__PURE__ */ new Map()), K = s(T), q = s(w);
|
|
122
122
|
o(() => {
|
|
123
|
-
K.current =
|
|
123
|
+
K.current = T, q.current = w;
|
|
124
124
|
});
|
|
125
|
-
let
|
|
125
|
+
let fe = t(), J = d?.globalBaseUrl ?? fe.globalBaseUrl, Y = d?.workspaceBaseUrl ?? fe.workspaceBaseUrl, pe = s(null), me = s(null), he = s(null), ge = s(null);
|
|
126
126
|
o(() => {
|
|
127
127
|
let t = e.getState();
|
|
128
|
-
if (
|
|
129
|
-
organizationId:
|
|
130
|
-
workspaceId:
|
|
131
|
-
}) && !
|
|
132
|
-
workspaceId:
|
|
133
|
-
organizationId:
|
|
134
|
-
projectId:
|
|
135
|
-
workspaceWide: !
|
|
136
|
-
organizationId:
|
|
137
|
-
workspaceId:
|
|
128
|
+
if (w && w !== t.currentOrganizationId && w !== pe.current && (pe.current = w, t.setCurrentOrganizationId(w), t.workspaces.length > 0 && !t.workspaces.some((e) => e.organizationId === w) && t.setWorkspaces([])), T && T !== t.currentWorkspaceId && T !== me.current && (me.current = T, t.setCurrentWorkspaceId(T), t.projects.length > 0 && !t.projects.some((e) => e.workspaceId === T) && (t.setProjects([]), t.setCurrentProjectId(null))), m({
|
|
129
|
+
organizationId: w,
|
|
130
|
+
workspaceId: T
|
|
131
|
+
}) && !E && t.currentProjectId && (t.setCurrentProjectId(null), t.setWorkspaceToken(null)), E && E !== t.currentProjectId && E !== he.current && (he.current = E, t.setCurrentProjectId(E)), t.workspaceToken && !D(t.workspaceToken, {
|
|
132
|
+
workspaceId: T,
|
|
133
|
+
organizationId: w,
|
|
134
|
+
projectId: E,
|
|
135
|
+
workspaceWide: !E && m({
|
|
136
|
+
organizationId: w,
|
|
137
|
+
workspaceId: T
|
|
138
138
|
})
|
|
139
139
|
})) {
|
|
140
|
-
let e = `${
|
|
141
|
-
|
|
140
|
+
let e = `${w ?? ""}|${T ?? ""}|${E ?? ""}`;
|
|
141
|
+
ge.current !== e && (ge.current = e, t.setWorkspaceToken(null));
|
|
142
142
|
}
|
|
143
143
|
}, [
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
w,
|
|
145
|
+
T,
|
|
146
|
+
E
|
|
147
147
|
]);
|
|
148
148
|
let X = a(async () => {
|
|
149
149
|
if (W.current) return W.current;
|
|
@@ -219,7 +219,7 @@ function I(d) {
|
|
|
219
219
|
});
|
|
220
220
|
if (b.kind === "switch") {
|
|
221
221
|
let e = b.workspace;
|
|
222
|
-
h = e.organizationId,
|
|
222
|
+
h = e.organizationId, L({
|
|
223
223
|
organizationId: e.organizationId,
|
|
224
224
|
workspaceId: e.id,
|
|
225
225
|
tenantId: e.tenantId || null,
|
|
@@ -234,7 +234,7 @@ function I(d) {
|
|
|
234
234
|
e && t.setContextLinkDenial(e);
|
|
235
235
|
}
|
|
236
236
|
let x = h && d.some((e) => e.id === h);
|
|
237
|
-
if (h && !x && d.length > 0 && (h = d[0].id,
|
|
237
|
+
if (h && !x && d.length > 0 && (h = d[0].id, L({
|
|
238
238
|
organizationId: h,
|
|
239
239
|
workspaceId: null,
|
|
240
240
|
tenantId: null,
|
|
@@ -259,7 +259,7 @@ function I(d) {
|
|
|
259
259
|
tenantId: e[0].tenantId,
|
|
260
260
|
projectId: null
|
|
261
261
|
};
|
|
262
|
-
K.current ? (t.setCurrentWorkspaceId(e[0].id), t.setWorkspaceToken(null),
|
|
262
|
+
K.current ? (t.setCurrentWorkspaceId(e[0].id), t.setWorkspaceToken(null), L(n)) : t.currentWorkspaceId || (t.setCurrentWorkspaceId(e[0].id), L(n));
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
} catch {
|
|
@@ -281,9 +281,9 @@ function I(d) {
|
|
|
281
281
|
t.setLoadingOrganizations(!1), W.current = null;
|
|
282
282
|
}
|
|
283
283
|
})(), W.current) : [];
|
|
284
|
-
}, [J,
|
|
284
|
+
}, [J, L]);
|
|
285
285
|
o(() => {
|
|
286
|
-
if (
|
|
286
|
+
if (b || de === 0 || U.current >= 5 || !A()) return;
|
|
287
287
|
U.current += 1;
|
|
288
288
|
let e = Math.min(1500 * 2 ** (U.current - 1), 12e3), t = window.setTimeout(() => {
|
|
289
289
|
X();
|
|
@@ -291,14 +291,19 @@ function I(d) {
|
|
|
291
291
|
return () => {
|
|
292
292
|
window.clearTimeout(t);
|
|
293
293
|
};
|
|
294
|
-
}, [
|
|
294
|
+
}, [
|
|
295
|
+
b,
|
|
296
|
+
de,
|
|
297
|
+
X
|
|
298
|
+
]), o(() => {
|
|
299
|
+
if (b) return;
|
|
295
300
|
let t = () => {
|
|
296
301
|
e.getState().organizations.length === 0 && A() && (U.current = 0, X());
|
|
297
302
|
};
|
|
298
303
|
return window.addEventListener("online", t), () => {
|
|
299
304
|
window.removeEventListener("online", t);
|
|
300
305
|
};
|
|
301
|
-
}, [X]);
|
|
306
|
+
}, [b, X]);
|
|
302
307
|
let Z = a(async (t) => {
|
|
303
308
|
let n = e.getState(), r = A(), i = l(), a = n.user?.id, o = JSON.stringify([
|
|
304
309
|
i,
|
|
@@ -443,10 +448,10 @@ function I(d) {
|
|
|
443
448
|
} finally {
|
|
444
449
|
t.setLoadingProjects(!1);
|
|
445
450
|
}
|
|
446
|
-
}, [Y]),
|
|
451
|
+
}, [Y]), _e = a(async (t) => {
|
|
447
452
|
let n = e.getState();
|
|
448
453
|
return n.setContextLinkDenial(null), n.setCurrentWorkspaceId(null), n.setWorkspaceToken(null), n.setProjects([]), n.setCurrentProjectId(null), n.setCurrentOrganizationId(t.id), await Z(t.id);
|
|
449
|
-
}, [Z]),
|
|
454
|
+
}, [Z]), ve = a(async (t) => {
|
|
450
455
|
let n = e.getState();
|
|
451
456
|
if (n.setContextLinkDenial(null), n.setCurrentProjectId(null), n.setProjects([]), !t.organizationId) return console.error("Workspace missing organizationId:", t), {
|
|
452
457
|
success: !1,
|
|
@@ -477,7 +482,7 @@ function I(d) {
|
|
|
477
482
|
success: !1,
|
|
478
483
|
error: "Context changed during selection"
|
|
479
484
|
};
|
|
480
|
-
}, [Q, $]),
|
|
485
|
+
}, [Q, $]), ye = a((t) => {
|
|
481
486
|
let n = e.getState();
|
|
482
487
|
p({
|
|
483
488
|
organizationId: n.currentOrganizationId,
|
|
@@ -487,73 +492,72 @@ function I(d) {
|
|
|
487
492
|
organizationId: n.currentOrganizationId,
|
|
488
493
|
projectId: t.id
|
|
489
494
|
}) && n.setWorkspaceToken(null);
|
|
490
|
-
}, []),
|
|
495
|
+
}, []), be = a(() => {
|
|
491
496
|
let t = e.getState(), n = {
|
|
492
497
|
organizationId: q.current,
|
|
493
498
|
workspaceId: K.current
|
|
494
499
|
};
|
|
495
500
|
if (!n.organizationId || !n.workspaceId || t.currentOrganizationId !== n.organizationId || t.currentWorkspaceId !== n.workspaceId) throw Error("Current workspace context required");
|
|
496
501
|
if (!h(n)) throw Error("Workspace-wide preference could not be saved");
|
|
497
|
-
t.setCurrentProjectId(null), t.setWorkspaceToken(null),
|
|
498
|
-
}, [
|
|
502
|
+
t.setCurrentProjectId(null), t.setWorkspaceToken(null), L({ projectId: null });
|
|
503
|
+
}, [L]);
|
|
499
504
|
return o(() => {
|
|
500
505
|
let t = !1, n = (e) => {
|
|
501
506
|
let n = !1, r = !1, i = () => {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
n = !0, e().finally(() => {
|
|
508
|
-
n = !1, !t && r && (r = !1, i());
|
|
509
|
-
});
|
|
510
|
-
}
|
|
507
|
+
t || (n ? r = !0 : (n = !0, e().finally(() => {
|
|
508
|
+
n = !1, !t && r && (r = !1, i());
|
|
509
|
+
})));
|
|
511
510
|
};
|
|
512
511
|
return i;
|
|
513
512
|
}, r = n(() => $()), i = n(() => {
|
|
514
513
|
let t = e.getState().currentOrganizationId;
|
|
515
514
|
return t ? Z(t) : Promise.resolve();
|
|
516
|
-
}), a =
|
|
515
|
+
}), a = R.onAny((t) => {
|
|
517
516
|
let n = t.name;
|
|
518
517
|
if (N.has(n)) {
|
|
518
|
+
if (S || C) return;
|
|
519
519
|
let n = F(t.payload), { currentWorkspaceId: i } = e.getState();
|
|
520
520
|
if (n && i && n !== i) return;
|
|
521
521
|
r();
|
|
522
|
-
|
|
522
|
+
} else if (P.has(n)) {
|
|
523
|
+
if (x) return;
|
|
524
|
+
i();
|
|
523
525
|
}
|
|
524
|
-
P.has(n) && i();
|
|
525
526
|
});
|
|
526
527
|
return () => {
|
|
527
528
|
t = !0, a();
|
|
528
529
|
};
|
|
529
530
|
}, [
|
|
530
|
-
|
|
531
|
+
R,
|
|
531
532
|
$,
|
|
532
|
-
Z
|
|
533
|
+
Z,
|
|
534
|
+
x,
|
|
535
|
+
S,
|
|
536
|
+
C
|
|
533
537
|
]), {
|
|
534
|
-
organizations:
|
|
535
|
-
workspaces:
|
|
536
|
-
projects:
|
|
537
|
-
currentOrganizationId:
|
|
538
|
-
currentWorkspaceId:
|
|
539
|
-
currentProjectId:
|
|
540
|
-
currentOrganization:
|
|
541
|
-
currentWorkspace:
|
|
542
|
-
currentProject:
|
|
543
|
-
workspaceToken:
|
|
544
|
-
isLoadingOrganizations:
|
|
545
|
-
isLoadingWorkspaces:
|
|
546
|
-
isLoadingProjects:
|
|
547
|
-
isLoading:
|
|
548
|
-
error:
|
|
538
|
+
organizations: z,
|
|
539
|
+
workspaces: B,
|
|
540
|
+
projects: se,
|
|
541
|
+
currentOrganizationId: ne,
|
|
542
|
+
currentWorkspaceId: ie,
|
|
543
|
+
currentProjectId: ce,
|
|
544
|
+
currentOrganization: z.find((e) => e.id === ne),
|
|
545
|
+
currentWorkspace: B.find((e) => e.id === ie),
|
|
546
|
+
currentProject: se.find((e) => e.id === ce),
|
|
547
|
+
workspaceToken: ae,
|
|
548
|
+
isLoadingOrganizations: re,
|
|
549
|
+
isLoadingWorkspaces: oe,
|
|
550
|
+
isLoadingProjects: le,
|
|
551
|
+
isLoading: re || oe || le,
|
|
552
|
+
error: ue,
|
|
549
553
|
fetchOrganizations: X,
|
|
550
554
|
fetchWorkspacesForOrg: Z,
|
|
551
555
|
issueWorkspaceToken: Q,
|
|
552
556
|
fetchProjects: $,
|
|
553
|
-
selectOrganization:
|
|
554
|
-
selectWorkspace:
|
|
555
|
-
selectProject:
|
|
556
|
-
selectWorkspaceWide:
|
|
557
|
+
selectOrganization: _e,
|
|
558
|
+
selectWorkspace: ve,
|
|
559
|
+
selectProject: ye,
|
|
560
|
+
selectWorkspaceWide: be
|
|
557
561
|
};
|
|
558
562
|
}
|
|
559
563
|
function L(n) {
|
|
@@ -733,7 +737,6 @@ function R(n) {
|
|
|
733
737
|
};
|
|
734
738
|
}, []);
|
|
735
739
|
}
|
|
736
|
-
//#endregion
|
|
737
740
|
export { I as useContextSwitcherData, R as useProjectSyncEffect, L as useWorkspaceSyncEffect };
|
|
738
741
|
|
|
739
742
|
//# sourceMappingURL=useContextSwitcherData.js.map
|