@rebasepro/core 0.2.3 → 0.2.4
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/components/LoginView/LoginView.d.ts +17 -1
- package/dist/components/common/types.d.ts +10 -7
- package/dist/components/common/useDebouncedData.d.ts +1 -1
- package/dist/core/RebaseProps.d.ts +13 -2
- package/dist/core/RebaseRouter.d.ts +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/index.es.js +499 -418
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +499 -418
- package/dist/index.umd.js.map +1 -1
- package/dist/util/entity_cache.d.ts +0 -5
- package/dist/util/index.d.ts +0 -2
- package/dist/util/useStorageUploadController.d.ts +2 -2
- package/package.json +6 -6
- package/src/components/BootstrapAdminBanner.tsx +12 -3
- package/src/components/LoginView/LoginView.tsx +151 -6
- package/src/components/UserSettingsView.tsx +95 -2
- package/src/components/common/types.tsx +7 -7
- package/src/components/common/useDebouncedData.ts +2 -2
- package/src/core/Rebase.tsx +3 -2
- package/src/core/RebaseProps.tsx +15 -2
- package/src/core/RebaseRouter.tsx +1 -1
- package/src/hooks/index.tsx +0 -1
- package/src/hooks/useResolvedComponent.tsx +4 -3
- package/src/locales/en.ts +13 -0
- package/src/locales/es.ts +11 -1
- package/src/util/entity_cache.ts +1 -27
- package/src/util/icon_list.ts +2 -2
- package/src/util/index.ts +2 -2
- package/src/util/useStorageUploadController.tsx +4 -4
- package/dist/hooks/useValidateAuthenticator.d.ts +0 -21
- package/dist/util/icon_synonyms.d.ts +0 -1
- package/dist/util/useTraceUpdate.d.ts +0 -2
- package/src/hooks/useValidateAuthenticator.tsx +0 -116
- package/src/util/icon_synonyms.ts +0 -1
- package/src/util/useTraceUpdate.tsx +0 -24
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("react"), require("@rebasepro/ui"), require("notistack"), require("@rebasepro/types"), require("react-router-dom"), require("@rebasepro/common"), require("@rebasepro/utils"), require("
|
|
3
|
-
})(this, (function(exports2, jsxRuntime, reactCompilerRuntime, React, ui, notistack, types, reactRouterDom, common, utils,
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("react"), require("@rebasepro/ui"), require("notistack"), require("@rebasepro/types"), require("react-router-dom"), require("@rebasepro/common"), require("@rebasepro/utils"), require("react-i18next"), require("fast-equals"), require("i18next"), require("fuse.js"), require("compressorjs")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react-compiler-runtime", "react", "@rebasepro/ui", "notistack", "@rebasepro/types", "react-router-dom", "@rebasepro/common", "@rebasepro/utils", "react-i18next", "fast-equals", "i18next", "fuse.js", "compressorjs"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["Rebase Core"] = {}, global.jsxRuntime, global.reactCompilerRuntime, global.React, global.ui, global.notistack, global.types, global.reactRouterDom, global.common, global.utils, global.reactI18next, global.fastEquals, global.i18next, global.Fuse, global.Compressor));
|
|
3
|
+
})(this, (function(exports2, jsxRuntime, reactCompilerRuntime, React, ui, notistack, types, reactRouterDom, common, utils, reactI18next, fastEquals, i18next, Fuse, Compressor) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function PluginProviderStack({
|
|
6
6
|
plugins,
|
|
@@ -1743,128 +1743,6 @@
|
|
|
1743
1743
|
setMode: setModeInternal
|
|
1744
1744
|
}), [mode, setModeInternal]);
|
|
1745
1745
|
}
|
|
1746
|
-
function useValidateAuthenticator(t0) {
|
|
1747
|
-
const $ = reactCompilerRuntime.c(17);
|
|
1748
|
-
const {
|
|
1749
|
-
disabled,
|
|
1750
|
-
authController,
|
|
1751
|
-
authenticator,
|
|
1752
|
-
storageSource,
|
|
1753
|
-
data
|
|
1754
|
-
} = t0;
|
|
1755
|
-
const authenticationEnabled = Boolean(authenticator);
|
|
1756
|
-
const [authLoading, setAuthLoading] = React.useState(authenticationEnabled);
|
|
1757
|
-
const [notAllowedError, setNotAllowedError] = React.useState(false);
|
|
1758
|
-
const [authVerified, setAuthVerified] = React.useState(!authenticationEnabled || Boolean(authController.loginSkipped));
|
|
1759
|
-
const canAccessMainView = authVerified && (!authenticationEnabled || Boolean(authController.user) || Boolean(authController.loginSkipped)) && !notAllowedError;
|
|
1760
|
-
let t1;
|
|
1761
|
-
let t2;
|
|
1762
|
-
if ($[0] !== authController.loginSkipped) {
|
|
1763
|
-
t1 = () => {
|
|
1764
|
-
if (authController.loginSkipped) {
|
|
1765
|
-
setAuthVerified(true);
|
|
1766
|
-
}
|
|
1767
|
-
};
|
|
1768
|
-
t2 = [authController.loginSkipped];
|
|
1769
|
-
$[0] = authController.loginSkipped;
|
|
1770
|
-
$[1] = t1;
|
|
1771
|
-
$[2] = t2;
|
|
1772
|
-
} else {
|
|
1773
|
-
t1 = $[1];
|
|
1774
|
-
t2 = $[2];
|
|
1775
|
-
}
|
|
1776
|
-
React.useEffect(t1, t2);
|
|
1777
|
-
const checkedUserRef = React.useRef(void 0);
|
|
1778
|
-
let t3;
|
|
1779
|
-
if ($[3] !== authController || $[4] !== authenticator || $[5] !== data || $[6] !== disabled || $[7] !== storageSource) {
|
|
1780
|
-
t3 = async () => {
|
|
1781
|
-
if (disabled) {
|
|
1782
|
-
return;
|
|
1783
|
-
}
|
|
1784
|
-
if (authController.initialLoading) {
|
|
1785
|
-
return;
|
|
1786
|
-
}
|
|
1787
|
-
if (!authController.user && !authController.loginSkipped) {
|
|
1788
|
-
checkedUserRef.current = void 0;
|
|
1789
|
-
setAuthLoading(false);
|
|
1790
|
-
setAuthVerified(false);
|
|
1791
|
-
return;
|
|
1792
|
-
}
|
|
1793
|
-
const delegateUser = authController.user;
|
|
1794
|
-
if (authenticator instanceof Function && delegateUser && !fastEquals.deepEqual(checkedUserRef.current?.uid, delegateUser.uid)) {
|
|
1795
|
-
setAuthLoading(true);
|
|
1796
|
-
try {
|
|
1797
|
-
const allowed = await authenticator({
|
|
1798
|
-
user: delegateUser,
|
|
1799
|
-
authController,
|
|
1800
|
-
data,
|
|
1801
|
-
storageSource
|
|
1802
|
-
});
|
|
1803
|
-
if (!allowed) {
|
|
1804
|
-
authController.signOut();
|
|
1805
|
-
setNotAllowedError(true);
|
|
1806
|
-
}
|
|
1807
|
-
} catch (t42) {
|
|
1808
|
-
const e = t42;
|
|
1809
|
-
setNotAllowedError(e);
|
|
1810
|
-
authController.signOut();
|
|
1811
|
-
}
|
|
1812
|
-
setAuthLoading(false);
|
|
1813
|
-
setAuthVerified(true);
|
|
1814
|
-
checkedUserRef.current = delegateUser;
|
|
1815
|
-
} else {
|
|
1816
|
-
setAuthLoading(false);
|
|
1817
|
-
}
|
|
1818
|
-
if (!authController.initialLoading && !delegateUser) {
|
|
1819
|
-
setAuthVerified(true);
|
|
1820
|
-
}
|
|
1821
|
-
};
|
|
1822
|
-
$[3] = authController;
|
|
1823
|
-
$[4] = authenticator;
|
|
1824
|
-
$[5] = data;
|
|
1825
|
-
$[6] = disabled;
|
|
1826
|
-
$[7] = storageSource;
|
|
1827
|
-
$[8] = t3;
|
|
1828
|
-
} else {
|
|
1829
|
-
t3 = $[8];
|
|
1830
|
-
}
|
|
1831
|
-
const checkAuthentication = t3;
|
|
1832
|
-
let t4;
|
|
1833
|
-
let t5;
|
|
1834
|
-
if ($[9] !== checkAuthentication) {
|
|
1835
|
-
t4 = () => {
|
|
1836
|
-
checkAuthentication();
|
|
1837
|
-
};
|
|
1838
|
-
t5 = [checkAuthentication];
|
|
1839
|
-
$[9] = checkAuthentication;
|
|
1840
|
-
$[10] = t4;
|
|
1841
|
-
$[11] = t5;
|
|
1842
|
-
} else {
|
|
1843
|
-
t4 = $[10];
|
|
1844
|
-
t5 = $[11];
|
|
1845
|
-
}
|
|
1846
|
-
React.useEffect(t4, t5);
|
|
1847
|
-
let t6;
|
|
1848
|
-
const t7 = authenticationEnabled && authLoading;
|
|
1849
|
-
let t8;
|
|
1850
|
-
if ($[12] !== authVerified || $[13] !== canAccessMainView || $[14] !== notAllowedError || $[15] !== t7) {
|
|
1851
|
-
t8 = {
|
|
1852
|
-
canAccessMainView,
|
|
1853
|
-
authLoading: t7,
|
|
1854
|
-
notAllowedError,
|
|
1855
|
-
authVerified
|
|
1856
|
-
};
|
|
1857
|
-
$[12] = authVerified;
|
|
1858
|
-
$[13] = canAccessMainView;
|
|
1859
|
-
$[14] = notAllowedError;
|
|
1860
|
-
$[15] = t7;
|
|
1861
|
-
$[16] = t8;
|
|
1862
|
-
} else {
|
|
1863
|
-
t8 = $[16];
|
|
1864
|
-
}
|
|
1865
|
-
t6 = t8;
|
|
1866
|
-
return t6;
|
|
1867
|
-
}
|
|
1868
1746
|
const RegistryDispatchContext = React.createContext(void 0);
|
|
1869
1747
|
const RegistryStateContext = React.createContext({
|
|
1870
1748
|
cmsConfig: null,
|
|
@@ -5628,11 +5506,18 @@
|
|
|
5628
5506
|
const {
|
|
5629
5507
|
t
|
|
5630
5508
|
} = useTranslation();
|
|
5509
|
+
const hasPasswordChange = !!authController.changePassword;
|
|
5631
5510
|
const [activeTab, setActiveTab] = React.useState("profile");
|
|
5632
5511
|
const [displayName, setDisplayName] = React.useState(user?.displayName || "");
|
|
5633
5512
|
const [photoURL, setPhotoURL] = React.useState(user?.photoURL || "");
|
|
5634
5513
|
const [savingProfile, setSavingProfile] = React.useState(false);
|
|
5635
5514
|
const [profileError, setProfileError] = React.useState(null);
|
|
5515
|
+
const [currentPassword, setCurrentPassword] = React.useState("");
|
|
5516
|
+
const [newPassword, setNewPassword] = React.useState("");
|
|
5517
|
+
const [confirmPassword, setConfirmPassword] = React.useState("");
|
|
5518
|
+
const [changingPassword, setChangingPassword] = React.useState(false);
|
|
5519
|
+
const [passwordError, setPasswordError] = React.useState(null);
|
|
5520
|
+
const [passwordSuccess, setPasswordSuccess] = React.useState(null);
|
|
5636
5521
|
const [sessions, setSessions] = React.useState([]);
|
|
5637
5522
|
const [loadingSessions, setLoadingSessions] = React.useState(false);
|
|
5638
5523
|
const [sessionsError, setSessionsError] = React.useState(null);
|
|
@@ -5660,6 +5545,35 @@
|
|
|
5660
5545
|
setSavingProfile(false);
|
|
5661
5546
|
}
|
|
5662
5547
|
};
|
|
5548
|
+
const handleChangePassword = async () => {
|
|
5549
|
+
setPasswordError(null);
|
|
5550
|
+
setPasswordSuccess(null);
|
|
5551
|
+
if (newPassword.length < 8) {
|
|
5552
|
+
setPasswordError(t("password_too_short"));
|
|
5553
|
+
return;
|
|
5554
|
+
}
|
|
5555
|
+
if (newPassword !== confirmPassword) {
|
|
5556
|
+
setPasswordError(t("passwords_dont_match"));
|
|
5557
|
+
return;
|
|
5558
|
+
}
|
|
5559
|
+
setChangingPassword(true);
|
|
5560
|
+
try {
|
|
5561
|
+
if (authController.changePassword) {
|
|
5562
|
+
await authController.changePassword(currentPassword, newPassword);
|
|
5563
|
+
setPasswordSuccess(t("password_changed"));
|
|
5564
|
+
setCurrentPassword("");
|
|
5565
|
+
setNewPassword("");
|
|
5566
|
+
setConfirmPassword("");
|
|
5567
|
+
setTimeout(() => {
|
|
5568
|
+
authController.signOut();
|
|
5569
|
+
}, 2e3);
|
|
5570
|
+
}
|
|
5571
|
+
} catch (e_0) {
|
|
5572
|
+
setPasswordError(e_0 instanceof Error ? e_0.message : String(e_0));
|
|
5573
|
+
} finally {
|
|
5574
|
+
setChangingPassword(false);
|
|
5575
|
+
}
|
|
5576
|
+
};
|
|
5663
5577
|
const loadSessions = async () => {
|
|
5664
5578
|
setLoadingSessions(true);
|
|
5665
5579
|
setSessionsError(null);
|
|
@@ -5671,8 +5585,8 @@
|
|
|
5671
5585
|
} else {
|
|
5672
5586
|
throw new Error("fetchSessions not implemented in this auth controller.");
|
|
5673
5587
|
}
|
|
5674
|
-
} catch (
|
|
5675
|
-
setSessionsError(
|
|
5588
|
+
} catch (e_1) {
|
|
5589
|
+
setSessionsError(e_1 instanceof Error ? e_1.message : String(e_1));
|
|
5676
5590
|
} finally {
|
|
5677
5591
|
setLoadingSessions(false);
|
|
5678
5592
|
}
|
|
@@ -5689,8 +5603,8 @@
|
|
|
5689
5603
|
} else {
|
|
5690
5604
|
throw new Error("revokeSession not implemented in this auth controller.");
|
|
5691
5605
|
}
|
|
5692
|
-
} catch (
|
|
5693
|
-
setSessionsError(
|
|
5606
|
+
} catch (e_2) {
|
|
5607
|
+
setSessionsError(e_2 instanceof Error ? e_2.message : String(e_2));
|
|
5694
5608
|
} finally {
|
|
5695
5609
|
setRevokingSessionId(null);
|
|
5696
5610
|
}
|
|
@@ -5703,8 +5617,8 @@
|
|
|
5703
5617
|
} else {
|
|
5704
5618
|
throw new Error("revokeAllSessions not implemented in this auth controller.");
|
|
5705
5619
|
}
|
|
5706
|
-
} catch (
|
|
5707
|
-
setSessionsError(
|
|
5620
|
+
} catch (e_3) {
|
|
5621
|
+
setSessionsError(e_3 instanceof Error ? e_3.message : String(e_3));
|
|
5708
5622
|
} finally {
|
|
5709
5623
|
setRevokingAll(false);
|
|
5710
5624
|
}
|
|
@@ -5714,15 +5628,25 @@
|
|
|
5714
5628
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h4", className: "mb-8", children: t("account_settings") }),
|
|
5715
5629
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Tabs, { value: activeTab, onValueChange: (v) => setActiveTab(v), className: "mb-8", children: [
|
|
5716
5630
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "profile", children: t("profile") }),
|
|
5631
|
+
hasPasswordChange && /* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "security", children: t("security") }),
|
|
5717
5632
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "sessions", children: t("sessions") })
|
|
5718
5633
|
] }),
|
|
5719
5634
|
activeTab === "profile" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 max-w-xl", children: [
|
|
5720
5635
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-6 mb-2", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Avatar, { src: photoURL || void 0, className: "w-24 h-24 text-3xl", children: displayName ? displayName[0].toUpperCase() : user.email ? user.email[0].toUpperCase() : "A" }) }),
|
|
5721
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("display_name"), value: displayName, onChange: (
|
|
5722
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("photo_url"), value: photoURL, onChange: (
|
|
5636
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("display_name"), value: displayName, onChange: (e_4) => setDisplayName(e_4.target.value) }),
|
|
5637
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("photo_url"), value: photoURL, onChange: (e_5) => setPhotoURL(e_5.target.value) }),
|
|
5723
5638
|
profileError && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "error", children: profileError }),
|
|
5724
5639
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleSaveProfile, disabled: savingProfile, children: savingProfile ? t("saving") : t("save_profile") }) })
|
|
5725
5640
|
] }),
|
|
5641
|
+
activeTab === "security" && hasPasswordChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 max-w-xl", children: [
|
|
5642
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h6", className: "mb-2", children: t("change_password") }),
|
|
5643
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("current_password"), type: "password", value: currentPassword, onChange: (e_6) => setCurrentPassword(e_6.target.value), autoComplete: "current-password" }),
|
|
5644
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("new_password"), type: "password", value: newPassword, onChange: (e_7) => setNewPassword(e_7.target.value), autoComplete: "new-password" }),
|
|
5645
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("confirm_password"), type: "password", value: confirmPassword, onChange: (e_8) => setConfirmPassword(e_8.target.value), autoComplete: "new-password" }),
|
|
5646
|
+
passwordError && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "error", children: passwordError }),
|
|
5647
|
+
passwordSuccess && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "text-emerald-600 dark:text-emerald-400", children: passwordSuccess }),
|
|
5648
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleChangePassword, disabled: changingPassword || !currentPassword || !newPassword || !confirmPassword, children: changingPassword ? t("changing_password") : t("change_password") }) })
|
|
5649
|
+
] }),
|
|
5726
5650
|
activeTab === "sessions" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 max-w-3xl", children: loadingSessions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center p-8", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, {}) }) : sessionsError ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { color: "error", children: sessionsError }) : sessions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: t("no_active_sessions") }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
5727
5651
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end mb-2", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", color: "error", onClick: handleRevokeAll, disabled: revokingAll, children: revokingAll ? t("revoking") : t("revoke_all_sessions") }) }),
|
|
5728
5652
|
sessions.map((session) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center p-4 bg-white dark:bg-surface-950 border rounded-lg dark:border-surface-700 shadow-sm", children: [
|
|
@@ -6421,7 +6345,7 @@
|
|
|
6421
6345
|
return t8;
|
|
6422
6346
|
}
|
|
6423
6347
|
function LoginView(t0) {
|
|
6424
|
-
const $ = reactCompilerRuntime.c(
|
|
6348
|
+
const $ = reactCompilerRuntime.c(107);
|
|
6425
6349
|
const {
|
|
6426
6350
|
logo,
|
|
6427
6351
|
authController,
|
|
@@ -6430,8 +6354,13 @@
|
|
|
6430
6354
|
disabled: t2,
|
|
6431
6355
|
notAllowedError,
|
|
6432
6356
|
googleClientId,
|
|
6357
|
+
githubClientId,
|
|
6358
|
+
linkedinClientId,
|
|
6359
|
+
title,
|
|
6360
|
+
subtitle,
|
|
6433
6361
|
needsSetup,
|
|
6434
|
-
registrationEnabled
|
|
6362
|
+
registrationEnabled,
|
|
6363
|
+
additionalComponent
|
|
6435
6364
|
} = t0;
|
|
6436
6365
|
const disableSignupScreen = t1 === void 0 ? false : t1;
|
|
6437
6366
|
const disabled = t2 === void 0 ? false : t2;
|
|
@@ -6482,26 +6411,76 @@
|
|
|
6482
6411
|
t5 = $[6];
|
|
6483
6412
|
}
|
|
6484
6413
|
const hasGoogleLogin = t5;
|
|
6485
|
-
const hasPasswordReset = caps.passwordReset ?? !!authController.forgotPassword;
|
|
6486
|
-
const showRegistration = !disableSignupScreen && canRegister;
|
|
6487
6414
|
let t6;
|
|
6415
|
+
if ($[7] !== caps.enabledProviders || $[8] !== githubClientId) {
|
|
6416
|
+
t6 = githubClientId && (caps.enabledProviders?.includes("github") ?? false);
|
|
6417
|
+
$[7] = caps.enabledProviders;
|
|
6418
|
+
$[8] = githubClientId;
|
|
6419
|
+
$[9] = t6;
|
|
6420
|
+
} else {
|
|
6421
|
+
t6 = $[9];
|
|
6422
|
+
}
|
|
6423
|
+
const hasGitHubLogin = t6;
|
|
6488
6424
|
let t7;
|
|
6489
|
-
if ($[
|
|
6490
|
-
|
|
6425
|
+
if ($[10] !== caps.enabledProviders || $[11] !== linkedinClientId) {
|
|
6426
|
+
t7 = linkedinClientId && (caps.enabledProviders?.includes("linkedin") ?? false);
|
|
6427
|
+
$[10] = caps.enabledProviders;
|
|
6428
|
+
$[11] = linkedinClientId;
|
|
6429
|
+
$[12] = t7;
|
|
6430
|
+
} else {
|
|
6431
|
+
t7 = $[12];
|
|
6432
|
+
}
|
|
6433
|
+
const hasLinkedinLogin = t7;
|
|
6434
|
+
const hasPasswordReset = caps.passwordReset ?? !!authController.forgotPassword;
|
|
6435
|
+
const showRegistration = !disableSignupScreen && canRegister;
|
|
6436
|
+
let t8;
|
|
6437
|
+
let t9;
|
|
6438
|
+
if ($[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6439
|
+
t8 = () => {
|
|
6491
6440
|
const timer = setTimeout(() => setFadeIn(true), 50);
|
|
6492
6441
|
return () => clearTimeout(timer);
|
|
6493
6442
|
};
|
|
6494
|
-
|
|
6495
|
-
$[
|
|
6496
|
-
$[
|
|
6443
|
+
t9 = [];
|
|
6444
|
+
$[13] = t8;
|
|
6445
|
+
$[14] = t9;
|
|
6497
6446
|
} else {
|
|
6498
|
-
|
|
6499
|
-
|
|
6447
|
+
t8 = $[13];
|
|
6448
|
+
t9 = $[14];
|
|
6500
6449
|
}
|
|
6501
|
-
React.useEffect(
|
|
6502
|
-
let
|
|
6503
|
-
|
|
6504
|
-
|
|
6450
|
+
React.useEffect(t8, t9);
|
|
6451
|
+
let t10;
|
|
6452
|
+
let t11;
|
|
6453
|
+
if ($[15] !== authController) {
|
|
6454
|
+
t10 = () => {
|
|
6455
|
+
const params = new URLSearchParams(window.location.search);
|
|
6456
|
+
const code = params.get("code");
|
|
6457
|
+
const provider = localStorage.getItem("rebase_oauth_provider");
|
|
6458
|
+
if (code && provider) {
|
|
6459
|
+
localStorage.removeItem("rebase_oauth_provider");
|
|
6460
|
+
const cleanUrl = window.location.origin + window.location.pathname;
|
|
6461
|
+
window.history.replaceState({}, document.title, cleanUrl);
|
|
6462
|
+
if (authController.oauthLogin) {
|
|
6463
|
+
authController.oauthLogin(provider, {
|
|
6464
|
+
code,
|
|
6465
|
+
redirectUri: cleanUrl
|
|
6466
|
+
}).catch((err) => {
|
|
6467
|
+
console.error(`${provider} login failed:`, err);
|
|
6468
|
+
});
|
|
6469
|
+
}
|
|
6470
|
+
}
|
|
6471
|
+
};
|
|
6472
|
+
t11 = [authController];
|
|
6473
|
+
$[15] = authController;
|
|
6474
|
+
$[16] = t10;
|
|
6475
|
+
$[17] = t11;
|
|
6476
|
+
} else {
|
|
6477
|
+
t10 = $[16];
|
|
6478
|
+
t11 = $[17];
|
|
6479
|
+
}
|
|
6480
|
+
React.useEffect(t10, t11);
|
|
6481
|
+
let t12;
|
|
6482
|
+
if ($[18] !== authController.authProviderError || $[19] !== authController.user) {
|
|
6483
|
+
t12 = function buildErrorView2() {
|
|
6505
6484
|
if (!authController.authProviderError) {
|
|
6506
6485
|
return null;
|
|
6507
6486
|
}
|
|
@@ -6511,44 +6490,44 @@
|
|
|
6511
6490
|
const errorMsg = authController.authProviderError instanceof Error ? authController.authProviderError.message : String(authController.authProviderError);
|
|
6512
6491
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorView, { error: errorMsg }) });
|
|
6513
6492
|
};
|
|
6514
|
-
$[
|
|
6515
|
-
$[
|
|
6516
|
-
$[
|
|
6493
|
+
$[18] = authController.authProviderError;
|
|
6494
|
+
$[19] = authController.user;
|
|
6495
|
+
$[20] = t12;
|
|
6517
6496
|
} else {
|
|
6518
|
-
|
|
6497
|
+
t12 = $[20];
|
|
6519
6498
|
}
|
|
6520
|
-
const buildErrorView =
|
|
6499
|
+
const buildErrorView = t12;
|
|
6521
6500
|
let logoComponent;
|
|
6522
6501
|
if (logo) {
|
|
6523
|
-
let
|
|
6524
|
-
if ($[
|
|
6525
|
-
|
|
6502
|
+
let t132;
|
|
6503
|
+
if ($[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6504
|
+
t132 = {
|
|
6526
6505
|
height: "100%",
|
|
6527
6506
|
width: "100%",
|
|
6528
6507
|
objectFit: "cover"
|
|
6529
6508
|
};
|
|
6530
|
-
$[
|
|
6509
|
+
$[21] = t132;
|
|
6531
6510
|
} else {
|
|
6532
|
-
|
|
6511
|
+
t132 = $[21];
|
|
6533
6512
|
}
|
|
6534
|
-
let
|
|
6535
|
-
if ($[
|
|
6536
|
-
|
|
6537
|
-
$[
|
|
6538
|
-
$[
|
|
6513
|
+
let t142;
|
|
6514
|
+
if ($[22] !== logo) {
|
|
6515
|
+
t142 = /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, style: t132, alt: "Logo" });
|
|
6516
|
+
$[22] = logo;
|
|
6517
|
+
$[23] = t142;
|
|
6539
6518
|
} else {
|
|
6540
|
-
|
|
6519
|
+
t142 = $[23];
|
|
6541
6520
|
}
|
|
6542
|
-
logoComponent =
|
|
6521
|
+
logoComponent = t142;
|
|
6543
6522
|
} else {
|
|
6544
|
-
let
|
|
6545
|
-
if ($[
|
|
6546
|
-
|
|
6547
|
-
$[
|
|
6523
|
+
let t132;
|
|
6524
|
+
if ($[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6525
|
+
t132 = /* @__PURE__ */ jsxRuntime.jsx(RebaseLogo, {});
|
|
6526
|
+
$[24] = t132;
|
|
6548
6527
|
} else {
|
|
6549
|
-
|
|
6528
|
+
t132 = $[24];
|
|
6550
6529
|
}
|
|
6551
|
-
logoComponent =
|
|
6530
|
+
logoComponent = t132;
|
|
6552
6531
|
}
|
|
6553
6532
|
let notAllowedMessage;
|
|
6554
6533
|
if (notAllowedError) {
|
|
@@ -6558,210 +6537,227 @@
|
|
|
6558
6537
|
if (notAllowedError instanceof Error) {
|
|
6559
6538
|
notAllowedMessage = notAllowedError.message;
|
|
6560
6539
|
} else {
|
|
6561
|
-
notAllowedMessage = "It looks like you don't have access, based on the specified
|
|
6540
|
+
notAllowedMessage = "It looks like you don't have access, based on the specified access configuration";
|
|
6562
6541
|
}
|
|
6563
6542
|
}
|
|
6564
6543
|
}
|
|
6565
|
-
const
|
|
6566
|
-
let t10;
|
|
6567
|
-
if ($[16] !== t9) {
|
|
6568
|
-
t10 = ui.cls("relative flex items-center justify-center h-screen w-screen p-4 transition-opacity duration-500 bg-surface-50 dark:bg-surface-800", t9);
|
|
6569
|
-
$[16] = t9;
|
|
6570
|
-
$[17] = t10;
|
|
6571
|
-
} else {
|
|
6572
|
-
t10 = $[17];
|
|
6573
|
-
}
|
|
6574
|
-
let t11;
|
|
6575
|
-
if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6576
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(LanguageToggle, {});
|
|
6577
|
-
$[18] = t11;
|
|
6578
|
-
} else {
|
|
6579
|
-
t11 = $[18];
|
|
6580
|
-
}
|
|
6581
|
-
let t12;
|
|
6582
|
-
if ($[19] !== colorMode) {
|
|
6583
|
-
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": "Toggle theme", children: colorMode === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(ui.MoonIcon, { size: ui.iconSize.small }) : /* @__PURE__ */ jsxRuntime.jsx(ui.SunIcon, { size: ui.iconSize.small }) });
|
|
6584
|
-
$[19] = colorMode;
|
|
6585
|
-
$[20] = t12;
|
|
6586
|
-
} else {
|
|
6587
|
-
t12 = $[20];
|
|
6588
|
-
}
|
|
6589
|
-
let t13;
|
|
6590
|
-
if ($[21] !== setColorMode) {
|
|
6591
|
-
t13 = () => setColorMode("dark");
|
|
6592
|
-
$[21] = setColorMode;
|
|
6593
|
-
$[22] = t13;
|
|
6594
|
-
} else {
|
|
6595
|
-
t13 = $[22];
|
|
6596
|
-
}
|
|
6544
|
+
const t13 = fadeIn ? "opacity-100" : "opacity-0";
|
|
6597
6545
|
let t14;
|
|
6598
|
-
if ($[
|
|
6599
|
-
t14 =
|
|
6600
|
-
$[
|
|
6546
|
+
if ($[25] !== t13) {
|
|
6547
|
+
t14 = ui.cls("relative flex items-center justify-center h-screen w-screen p-4 transition-opacity duration-500 bg-surface-50 dark:bg-surface-950 overflow-hidden", t13);
|
|
6548
|
+
$[25] = t13;
|
|
6549
|
+
$[26] = t14;
|
|
6601
6550
|
} else {
|
|
6602
|
-
t14 = $[
|
|
6551
|
+
t14 = $[26];
|
|
6603
6552
|
}
|
|
6604
6553
|
let t15;
|
|
6605
|
-
if ($[24] !== t) {
|
|
6606
|
-
t15 = t("dark_mode");
|
|
6607
|
-
$[24] = t;
|
|
6608
|
-
$[25] = t15;
|
|
6609
|
-
} else {
|
|
6610
|
-
t15 = $[25];
|
|
6611
|
-
}
|
|
6612
6554
|
let t16;
|
|
6613
|
-
if ($[
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
" ",
|
|
6617
|
-
t15
|
|
6618
|
-
] });
|
|
6619
|
-
$[26] = t13;
|
|
6555
|
+
if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6556
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[-10%] left-[-10%] w-[50%] h-[50%] rounded-full bg-primary-500/10 blur-[120px] pointer-events-none" });
|
|
6557
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-[-10%] right-[-10%] w-[50%] h-[50%] rounded-full bg-indigo-500/10 blur-[120px] pointer-events-none" });
|
|
6620
6558
|
$[27] = t15;
|
|
6621
6559
|
$[28] = t16;
|
|
6622
6560
|
} else {
|
|
6561
|
+
t15 = $[27];
|
|
6623
6562
|
t16 = $[28];
|
|
6624
6563
|
}
|
|
6625
6564
|
let t17;
|
|
6626
|
-
if ($[29]
|
|
6627
|
-
t17 =
|
|
6628
|
-
$[29] =
|
|
6629
|
-
$[30] = t17;
|
|
6565
|
+
if ($[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6566
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(LanguageToggle, {});
|
|
6567
|
+
$[29] = t17;
|
|
6630
6568
|
} else {
|
|
6631
|
-
t17 = $[
|
|
6569
|
+
t17 = $[29];
|
|
6632
6570
|
}
|
|
6633
6571
|
let t18;
|
|
6634
|
-
if ($[
|
|
6635
|
-
t18 = /* @__PURE__ */ jsxRuntime.jsx(ui.SunIcon, { size: ui.iconSize.
|
|
6572
|
+
if ($[30] !== colorMode) {
|
|
6573
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": "Toggle theme", children: colorMode === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(ui.MoonIcon, { size: ui.iconSize.small }) : /* @__PURE__ */ jsxRuntime.jsx(ui.SunIcon, { size: ui.iconSize.small }) });
|
|
6574
|
+
$[30] = colorMode;
|
|
6636
6575
|
$[31] = t18;
|
|
6637
6576
|
} else {
|
|
6638
6577
|
t18 = $[31];
|
|
6639
6578
|
}
|
|
6640
6579
|
let t19;
|
|
6641
|
-
if ($[32] !==
|
|
6642
|
-
t19 =
|
|
6643
|
-
$[32] =
|
|
6580
|
+
if ($[32] !== setColorMode) {
|
|
6581
|
+
t19 = () => setColorMode("dark");
|
|
6582
|
+
$[32] = setColorMode;
|
|
6644
6583
|
$[33] = t19;
|
|
6645
6584
|
} else {
|
|
6646
6585
|
t19 = $[33];
|
|
6647
6586
|
}
|
|
6648
6587
|
let t20;
|
|
6649
|
-
if ($[34]
|
|
6650
|
-
t20 = /* @__PURE__ */ jsxRuntime.
|
|
6651
|
-
|
|
6652
|
-
" ",
|
|
6653
|
-
t19
|
|
6654
|
-
] });
|
|
6655
|
-
$[34] = t17;
|
|
6656
|
-
$[35] = t19;
|
|
6657
|
-
$[36] = t20;
|
|
6588
|
+
if ($[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6589
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsx(ui.MoonIcon, { size: ui.iconSize.smallest });
|
|
6590
|
+
$[34] = t20;
|
|
6658
6591
|
} else {
|
|
6659
|
-
t20 = $[
|
|
6592
|
+
t20 = $[34];
|
|
6660
6593
|
}
|
|
6661
6594
|
let t21;
|
|
6662
|
-
if ($[
|
|
6663
|
-
t21 = (
|
|
6664
|
-
$[
|
|
6665
|
-
$[
|
|
6595
|
+
if ($[35] !== t) {
|
|
6596
|
+
t21 = t("dark_mode");
|
|
6597
|
+
$[35] = t;
|
|
6598
|
+
$[36] = t21;
|
|
6666
6599
|
} else {
|
|
6667
|
-
t21 = $[
|
|
6600
|
+
t21 = $[36];
|
|
6668
6601
|
}
|
|
6669
6602
|
let t22;
|
|
6670
|
-
if ($[
|
|
6671
|
-
t22 = /* @__PURE__ */ jsxRuntime.
|
|
6603
|
+
if ($[37] !== t19 || $[38] !== t21) {
|
|
6604
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: t19, children: [
|
|
6605
|
+
t20,
|
|
6606
|
+
" ",
|
|
6607
|
+
t21
|
|
6608
|
+
] });
|
|
6609
|
+
$[37] = t19;
|
|
6610
|
+
$[38] = t21;
|
|
6672
6611
|
$[39] = t22;
|
|
6673
6612
|
} else {
|
|
6674
6613
|
t22 = $[39];
|
|
6675
6614
|
}
|
|
6676
6615
|
let t23;
|
|
6677
|
-
if ($[40] !==
|
|
6678
|
-
t23 =
|
|
6679
|
-
$[40] =
|
|
6616
|
+
if ($[40] !== setColorMode) {
|
|
6617
|
+
t23 = () => setColorMode("light");
|
|
6618
|
+
$[40] = setColorMode;
|
|
6680
6619
|
$[41] = t23;
|
|
6681
6620
|
} else {
|
|
6682
6621
|
t23 = $[41];
|
|
6683
6622
|
}
|
|
6684
6623
|
let t24;
|
|
6685
|
-
if ($[42]
|
|
6686
|
-
t24 = /* @__PURE__ */ jsxRuntime.
|
|
6687
|
-
|
|
6688
|
-
" ",
|
|
6689
|
-
t23
|
|
6690
|
-
] });
|
|
6691
|
-
$[42] = t21;
|
|
6692
|
-
$[43] = t23;
|
|
6693
|
-
$[44] = t24;
|
|
6624
|
+
if ($[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6625
|
+
t24 = /* @__PURE__ */ jsxRuntime.jsx(ui.SunIcon, { size: ui.iconSize.smallest });
|
|
6626
|
+
$[42] = t24;
|
|
6694
6627
|
} else {
|
|
6695
|
-
t24 = $[
|
|
6628
|
+
t24 = $[42];
|
|
6696
6629
|
}
|
|
6697
6630
|
let t25;
|
|
6698
|
-
if ($[
|
|
6699
|
-
t25 =
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
t16,
|
|
6703
|
-
t20,
|
|
6704
|
-
t24
|
|
6705
|
-
] })
|
|
6706
|
-
] });
|
|
6707
|
-
$[45] = t12;
|
|
6708
|
-
$[46] = t16;
|
|
6709
|
-
$[47] = t20;
|
|
6710
|
-
$[48] = t24;
|
|
6711
|
-
$[49] = t25;
|
|
6631
|
+
if ($[43] !== t) {
|
|
6632
|
+
t25 = t("light_mode");
|
|
6633
|
+
$[43] = t;
|
|
6634
|
+
$[44] = t25;
|
|
6712
6635
|
} else {
|
|
6713
|
-
t25 = $[
|
|
6636
|
+
t25 = $[44];
|
|
6714
6637
|
}
|
|
6715
6638
|
let t26;
|
|
6716
|
-
if ($[
|
|
6717
|
-
t26 = /* @__PURE__ */ jsxRuntime.
|
|
6718
|
-
|
|
6719
|
-
|
|
6639
|
+
if ($[45] !== t23 || $[46] !== t25) {
|
|
6640
|
+
t26 = /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: t23, children: [
|
|
6641
|
+
t24,
|
|
6642
|
+
" ",
|
|
6643
|
+
t25
|
|
6644
|
+
] });
|
|
6645
|
+
$[45] = t23;
|
|
6646
|
+
$[46] = t25;
|
|
6647
|
+
$[47] = t26;
|
|
6720
6648
|
} else {
|
|
6721
|
-
t26 = $[
|
|
6649
|
+
t26 = $[47];
|
|
6722
6650
|
}
|
|
6723
6651
|
let t27;
|
|
6724
|
-
if ($[
|
|
6725
|
-
t27 =
|
|
6726
|
-
$[
|
|
6727
|
-
$[
|
|
6652
|
+
if ($[48] !== setColorMode) {
|
|
6653
|
+
t27 = () => setColorMode("system");
|
|
6654
|
+
$[48] = setColorMode;
|
|
6655
|
+
$[49] = t27;
|
|
6728
6656
|
} else {
|
|
6729
|
-
t27 = $[
|
|
6657
|
+
t27 = $[49];
|
|
6730
6658
|
}
|
|
6731
6659
|
let t28;
|
|
6732
|
-
if ($[
|
|
6733
|
-
t28 =
|
|
6734
|
-
$[
|
|
6735
|
-
|
|
6736
|
-
$[
|
|
6660
|
+
if ($[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6661
|
+
t28 = /* @__PURE__ */ jsxRuntime.jsx(ui.SunMoonIcon, { size: ui.iconSize.smallest });
|
|
6662
|
+
$[50] = t28;
|
|
6663
|
+
} else {
|
|
6664
|
+
t28 = $[50];
|
|
6665
|
+
}
|
|
6666
|
+
let t29;
|
|
6667
|
+
if ($[51] !== t) {
|
|
6668
|
+
t29 = t("system_mode");
|
|
6669
|
+
$[51] = t;
|
|
6670
|
+
$[52] = t29;
|
|
6737
6671
|
} else {
|
|
6738
|
-
|
|
6672
|
+
t29 = $[52];
|
|
6739
6673
|
}
|
|
6740
|
-
const t29 = viewVisible ? "opacity-100" : "opacity-0";
|
|
6741
6674
|
let t30;
|
|
6742
|
-
if ($[
|
|
6743
|
-
t30 = ui.
|
|
6744
|
-
|
|
6745
|
-
|
|
6675
|
+
if ($[53] !== t27 || $[54] !== t29) {
|
|
6676
|
+
t30 = /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: t27, children: [
|
|
6677
|
+
t28,
|
|
6678
|
+
" ",
|
|
6679
|
+
t29
|
|
6680
|
+
] });
|
|
6681
|
+
$[53] = t27;
|
|
6682
|
+
$[54] = t29;
|
|
6683
|
+
$[55] = t30;
|
|
6746
6684
|
} else {
|
|
6747
|
-
t30 = $[
|
|
6685
|
+
t30 = $[55];
|
|
6748
6686
|
}
|
|
6749
6687
|
let t31;
|
|
6750
|
-
if ($[
|
|
6751
|
-
t31 =
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6688
|
+
if ($[56] !== t18 || $[57] !== t22 || $[58] !== t26 || $[59] !== t30) {
|
|
6689
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-4 right-4 flex items-center gap-1 z-10", children: [
|
|
6690
|
+
t17,
|
|
6691
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { trigger: t18, children: [
|
|
6692
|
+
t22,
|
|
6693
|
+
t26,
|
|
6694
|
+
t30
|
|
6695
|
+
] })
|
|
6696
|
+
] });
|
|
6697
|
+
$[56] = t18;
|
|
6698
|
+
$[57] = t22;
|
|
6699
|
+
$[58] = t26;
|
|
6700
|
+
$[59] = t30;
|
|
6701
|
+
$[60] = t31;
|
|
6756
6702
|
} else {
|
|
6757
|
-
t31 = $[
|
|
6703
|
+
t31 = $[60];
|
|
6758
6704
|
}
|
|
6759
6705
|
let t32;
|
|
6760
|
-
if ($[
|
|
6761
|
-
t32 =
|
|
6706
|
+
if ($[61] !== logoComponent) {
|
|
6707
|
+
t32 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-24 h-24 m-2 mb-4 drop-shadow-md", children: logoComponent });
|
|
6708
|
+
$[61] = logoComponent;
|
|
6709
|
+
$[62] = t32;
|
|
6710
|
+
} else {
|
|
6711
|
+
t32 = $[62];
|
|
6712
|
+
}
|
|
6713
|
+
let t33;
|
|
6714
|
+
if ($[63] !== notAllowedMessage) {
|
|
6715
|
+
t33 = notAllowedMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 w-full", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorView, { error: notAllowedMessage }) });
|
|
6716
|
+
$[63] = notAllowedMessage;
|
|
6717
|
+
$[64] = t33;
|
|
6718
|
+
} else {
|
|
6719
|
+
t33 = $[64];
|
|
6720
|
+
}
|
|
6721
|
+
let t34;
|
|
6722
|
+
if ($[65] !== buildErrorView || $[66] !== mode) {
|
|
6723
|
+
t34 = mode !== "forgot" && buildErrorView();
|
|
6724
|
+
$[65] = buildErrorView;
|
|
6725
|
+
$[66] = mode;
|
|
6726
|
+
$[67] = t34;
|
|
6727
|
+
} else {
|
|
6728
|
+
t34 = $[67];
|
|
6729
|
+
}
|
|
6730
|
+
const t35 = viewVisible ? "opacity-100" : "opacity-0";
|
|
6731
|
+
let t36;
|
|
6732
|
+
if ($[68] !== t35) {
|
|
6733
|
+
t36 = ui.cls("w-full transition-opacity duration-150", t35);
|
|
6734
|
+
$[68] = t35;
|
|
6735
|
+
$[69] = t36;
|
|
6736
|
+
} else {
|
|
6737
|
+
t36 = $[69];
|
|
6738
|
+
}
|
|
6739
|
+
let t37;
|
|
6740
|
+
if ($[70] !== authController || $[71] !== isBootstrapMode || $[72] !== noUserComponent) {
|
|
6741
|
+
t37 = isBootstrapMode && !authController.user && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: true, onClose: _temp, onForgotPassword: _temp2, noUserComponent, disableSignupScreen: false, bootstrapMode: true });
|
|
6742
|
+
$[70] = authController;
|
|
6743
|
+
$[71] = isBootstrapMode;
|
|
6744
|
+
$[72] = noUserComponent;
|
|
6745
|
+
$[73] = t37;
|
|
6746
|
+
} else {
|
|
6747
|
+
t37 = $[73];
|
|
6748
|
+
}
|
|
6749
|
+
let t38;
|
|
6750
|
+
if ($[74] !== authController || $[75] !== disableSignupScreen || $[76] !== disabled || $[77] !== githubClientId || $[78] !== googleClientId || $[79] !== hasGitHubLogin || $[80] !== hasGoogleLogin || $[81] !== hasLinkedinLogin || $[82] !== hasPasswordReset || $[83] !== isBootstrapMode || $[84] !== linkedinClientId || $[85] !== mode || $[86] !== noUserComponent || $[87] !== showRegistration || $[88] !== subtitle || $[89] !== title) {
|
|
6751
|
+
t38 = !isBootstrapMode && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6762
6752
|
mode === "buttons" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-3 mt-2", children: [
|
|
6753
|
+
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-2", children: [
|
|
6754
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h6", className: "mb-0.5 font-bold", children: title }),
|
|
6755
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", className: "mb-4", children: subtitle })
|
|
6756
|
+
] }),
|
|
6763
6757
|
/* @__PURE__ */ jsxRuntime.jsx(LoginButton, { disabled, text: "Sign in with email", icon: /* @__PURE__ */ jsxRuntime.jsx(ui.MailIcon, {}), onClick: () => switchMode("login") }),
|
|
6764
6758
|
hasGoogleLogin && googleClientId && /* @__PURE__ */ jsxRuntime.jsx(GoogleLoginButton, { disabled, googleClientId, authController }),
|
|
6759
|
+
hasGitHubLogin && githubClientId && /* @__PURE__ */ jsxRuntime.jsx(GitHubLoginButton, { disabled, githubClientId }),
|
|
6760
|
+
hasLinkedinLogin && linkedinClientId && /* @__PURE__ */ jsxRuntime.jsx(LinkedInLoginButton, { disabled, linkedinClientId }),
|
|
6765
6761
|
showRegistration && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-center", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "body2", color: "secondary", children: [
|
|
6766
6762
|
"Don't have an account?",
|
|
6767
6763
|
" ",
|
|
@@ -6772,63 +6768,81 @@
|
|
|
6772
6768
|
mode === "register" && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: true, onClose: () => switchMode("buttons"), onForgotPassword: hasPasswordReset ? () => switchMode("forgot") : void 0, noUserComponent, disableSignupScreen, switchToLogin: () => switchMode("login") }),
|
|
6773
6769
|
mode === "forgot" && authController.forgotPassword && /* @__PURE__ */ jsxRuntime.jsx(ForgotPasswordForm, { authController, onClose: () => switchMode("login") })
|
|
6774
6770
|
] });
|
|
6775
|
-
$[
|
|
6776
|
-
$[
|
|
6777
|
-
$[
|
|
6778
|
-
$[
|
|
6779
|
-
$[
|
|
6780
|
-
$[
|
|
6781
|
-
$[
|
|
6782
|
-
$[
|
|
6783
|
-
$[
|
|
6784
|
-
$[
|
|
6785
|
-
$[
|
|
6786
|
-
|
|
6787
|
-
|
|
6771
|
+
$[74] = authController;
|
|
6772
|
+
$[75] = disableSignupScreen;
|
|
6773
|
+
$[76] = disabled;
|
|
6774
|
+
$[77] = githubClientId;
|
|
6775
|
+
$[78] = googleClientId;
|
|
6776
|
+
$[79] = hasGitHubLogin;
|
|
6777
|
+
$[80] = hasGoogleLogin;
|
|
6778
|
+
$[81] = hasLinkedinLogin;
|
|
6779
|
+
$[82] = hasPasswordReset;
|
|
6780
|
+
$[83] = isBootstrapMode;
|
|
6781
|
+
$[84] = linkedinClientId;
|
|
6782
|
+
$[85] = mode;
|
|
6783
|
+
$[86] = noUserComponent;
|
|
6784
|
+
$[87] = showRegistration;
|
|
6785
|
+
$[88] = subtitle;
|
|
6786
|
+
$[89] = title;
|
|
6787
|
+
$[90] = t38;
|
|
6788
|
+
} else {
|
|
6789
|
+
t38 = $[90];
|
|
6788
6790
|
}
|
|
6789
|
-
let
|
|
6790
|
-
if ($[
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6791
|
+
let t39;
|
|
6792
|
+
if ($[91] !== t36 || $[92] !== t37 || $[93] !== t38) {
|
|
6793
|
+
t39 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t36, children: [
|
|
6794
|
+
t37,
|
|
6795
|
+
t38
|
|
6794
6796
|
] });
|
|
6795
|
-
$[
|
|
6796
|
-
$[
|
|
6797
|
-
$[
|
|
6798
|
-
$[
|
|
6797
|
+
$[91] = t36;
|
|
6798
|
+
$[92] = t37;
|
|
6799
|
+
$[93] = t38;
|
|
6800
|
+
$[94] = t39;
|
|
6799
6801
|
} else {
|
|
6800
|
-
|
|
6802
|
+
t39 = $[94];
|
|
6801
6803
|
}
|
|
6802
|
-
let
|
|
6803
|
-
if ($[
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6804
|
+
let t40;
|
|
6805
|
+
if ($[95] !== additionalComponent) {
|
|
6806
|
+
t40 = additionalComponent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: additionalComponent });
|
|
6807
|
+
$[95] = additionalComponent;
|
|
6808
|
+
$[96] = t40;
|
|
6809
|
+
} else {
|
|
6810
|
+
t40 = $[96];
|
|
6811
|
+
}
|
|
6812
|
+
let t41;
|
|
6813
|
+
if ($[97] !== t32 || $[98] !== t33 || $[99] !== t34 || $[100] !== t39 || $[101] !== t40) {
|
|
6814
|
+
t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-center w-[440px] max-w-full p-8 sm:p-10 bg-white/70 dark:bg-surface-900/60 backdrop-blur-xl border border-surface-200/50 dark:border-surface-800/50 rounded-2xl shadow-2xl z-10 transition-all duration-300 hover:shadow-primary-500/5", children: [
|
|
6815
|
+
t32,
|
|
6816
|
+
t33,
|
|
6817
|
+
t34,
|
|
6818
|
+
t39,
|
|
6819
|
+
t40
|
|
6809
6820
|
] });
|
|
6810
|
-
$[
|
|
6811
|
-
$[
|
|
6812
|
-
$[
|
|
6813
|
-
$[
|
|
6814
|
-
$[
|
|
6821
|
+
$[97] = t32;
|
|
6822
|
+
$[98] = t33;
|
|
6823
|
+
$[99] = t34;
|
|
6824
|
+
$[100] = t39;
|
|
6825
|
+
$[101] = t40;
|
|
6826
|
+
$[102] = t41;
|
|
6815
6827
|
} else {
|
|
6816
|
-
|
|
6828
|
+
t41 = $[102];
|
|
6817
6829
|
}
|
|
6818
|
-
let
|
|
6819
|
-
if ($[
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6830
|
+
let t42;
|
|
6831
|
+
if ($[103] !== t14 || $[104] !== t31 || $[105] !== t41) {
|
|
6832
|
+
t42 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t14, children: [
|
|
6833
|
+
t15,
|
|
6834
|
+
t16,
|
|
6835
|
+
t31,
|
|
6836
|
+
t41
|
|
6823
6837
|
] });
|
|
6824
|
-
$[
|
|
6825
|
-
$[
|
|
6826
|
-
$[
|
|
6827
|
-
$[
|
|
6838
|
+
$[103] = t14;
|
|
6839
|
+
$[104] = t31;
|
|
6840
|
+
$[105] = t41;
|
|
6841
|
+
$[106] = t42;
|
|
6828
6842
|
} else {
|
|
6829
|
-
|
|
6843
|
+
t42 = $[106];
|
|
6830
6844
|
}
|
|
6831
|
-
return
|
|
6845
|
+
return t42;
|
|
6832
6846
|
}
|
|
6833
6847
|
function _temp2() {
|
|
6834
6848
|
}
|
|
@@ -6872,7 +6886,7 @@
|
|
|
6872
6886
|
}
|
|
6873
6887
|
let t4;
|
|
6874
6888
|
if ($[7] !== disabled || $[8] !== onClick || $[9] !== t3) {
|
|
6875
|
-
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { disabled, className: "w-full", variant: "outlined", size: "large", onClick, children: t3 });
|
|
6889
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { disabled, className: "w-full transition-transform duration-200 active:scale-[0.98]", variant: "outlined", size: "large", onClick, children: t3 });
|
|
6876
6890
|
$[7] = disabled;
|
|
6877
6891
|
$[8] = onClick;
|
|
6878
6892
|
$[9] = t3;
|
|
@@ -6984,6 +6998,102 @@
|
|
|
6984
6998
|
}
|
|
6985
6999
|
return t5;
|
|
6986
7000
|
}
|
|
7001
|
+
const GitHubIcon = () => {
|
|
7002
|
+
const $ = reactCompilerRuntime.c(1);
|
|
7003
|
+
let t0;
|
|
7004
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
7005
|
+
t0 = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "20", height: "20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.464-1.11-1.464-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.579.688.481C19.137 20.162 22 16.418 22 12c0-5.523-4.477-10-10-10z" }) });
|
|
7006
|
+
$[0] = t0;
|
|
7007
|
+
} else {
|
|
7008
|
+
t0 = $[0];
|
|
7009
|
+
}
|
|
7010
|
+
return t0;
|
|
7011
|
+
};
|
|
7012
|
+
function GitHubLoginButton(t0) {
|
|
7013
|
+
const $ = reactCompilerRuntime.c(6);
|
|
7014
|
+
const {
|
|
7015
|
+
disabled,
|
|
7016
|
+
githubClientId
|
|
7017
|
+
} = t0;
|
|
7018
|
+
let t1;
|
|
7019
|
+
if ($[0] !== githubClientId) {
|
|
7020
|
+
t1 = () => {
|
|
7021
|
+
localStorage.setItem("rebase_oauth_provider", "github");
|
|
7022
|
+
const redirectUri = encodeURIComponent(window.location.origin + window.location.pathname);
|
|
7023
|
+
window.location.href = `https://github.com/login/oauth/authorize?client_id=${githubClientId}&redirect_uri=${redirectUri}&scope=${"read:user,user:email"}`;
|
|
7024
|
+
};
|
|
7025
|
+
$[0] = githubClientId;
|
|
7026
|
+
$[1] = t1;
|
|
7027
|
+
} else {
|
|
7028
|
+
t1 = $[1];
|
|
7029
|
+
}
|
|
7030
|
+
const handleClick = t1;
|
|
7031
|
+
let t2;
|
|
7032
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
7033
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(GitHubIcon, {});
|
|
7034
|
+
$[2] = t2;
|
|
7035
|
+
} else {
|
|
7036
|
+
t2 = $[2];
|
|
7037
|
+
}
|
|
7038
|
+
let t3;
|
|
7039
|
+
if ($[3] !== disabled || $[4] !== handleClick) {
|
|
7040
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(LoginButton, { disabled, text: "Sign in with GitHub", icon: t2, onClick: handleClick });
|
|
7041
|
+
$[3] = disabled;
|
|
7042
|
+
$[4] = handleClick;
|
|
7043
|
+
$[5] = t3;
|
|
7044
|
+
} else {
|
|
7045
|
+
t3 = $[5];
|
|
7046
|
+
}
|
|
7047
|
+
return t3;
|
|
7048
|
+
}
|
|
7049
|
+
const LinkedInIcon = () => {
|
|
7050
|
+
const $ = reactCompilerRuntime.c(1);
|
|
7051
|
+
let t0;
|
|
7052
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
7053
|
+
t0 = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "20", height: "20", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" }) });
|
|
7054
|
+
$[0] = t0;
|
|
7055
|
+
} else {
|
|
7056
|
+
t0 = $[0];
|
|
7057
|
+
}
|
|
7058
|
+
return t0;
|
|
7059
|
+
};
|
|
7060
|
+
function LinkedInLoginButton(t0) {
|
|
7061
|
+
const $ = reactCompilerRuntime.c(6);
|
|
7062
|
+
const {
|
|
7063
|
+
disabled,
|
|
7064
|
+
linkedinClientId
|
|
7065
|
+
} = t0;
|
|
7066
|
+
let t1;
|
|
7067
|
+
if ($[0] !== linkedinClientId) {
|
|
7068
|
+
t1 = () => {
|
|
7069
|
+
localStorage.setItem("rebase_oauth_provider", "linkedin");
|
|
7070
|
+
const redirectUri = encodeURIComponent(window.location.origin + window.location.pathname);
|
|
7071
|
+
window.location.href = `https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=${linkedinClientId}&redirect_uri=${redirectUri}&scope=${"openid profile email"}`;
|
|
7072
|
+
};
|
|
7073
|
+
$[0] = linkedinClientId;
|
|
7074
|
+
$[1] = t1;
|
|
7075
|
+
} else {
|
|
7076
|
+
t1 = $[1];
|
|
7077
|
+
}
|
|
7078
|
+
const handleClick = t1;
|
|
7079
|
+
let t2;
|
|
7080
|
+
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
7081
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(LinkedInIcon, {});
|
|
7082
|
+
$[2] = t2;
|
|
7083
|
+
} else {
|
|
7084
|
+
t2 = $[2];
|
|
7085
|
+
}
|
|
7086
|
+
let t3;
|
|
7087
|
+
if ($[3] !== disabled || $[4] !== handleClick) {
|
|
7088
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(LoginButton, { disabled, text: "Sign in with LinkedIn", icon: t2, onClick: handleClick });
|
|
7089
|
+
$[3] = disabled;
|
|
7090
|
+
$[4] = handleClick;
|
|
7091
|
+
$[5] = t3;
|
|
7092
|
+
} else {
|
|
7093
|
+
t3 = $[5];
|
|
7094
|
+
}
|
|
7095
|
+
return t3;
|
|
7096
|
+
}
|
|
6987
7097
|
function LoginForm(t0) {
|
|
6988
7098
|
const $ = reactCompilerRuntime.c(67);
|
|
6989
7099
|
const {
|
|
@@ -7541,14 +7651,18 @@
|
|
|
7541
7651
|
if (!userManagement || !loggedInUser) {
|
|
7542
7652
|
return null;
|
|
7543
7653
|
}
|
|
7654
|
+
const loggedInUserRoles = loggedInUser.roles ?? [];
|
|
7655
|
+
const isLoggedInUserAdmin = loggedInUserRoles.length === 0 || loggedInUserRoles.some((r) => r === "admin");
|
|
7656
|
+
if (!isLoggedInUserAdmin) {
|
|
7657
|
+
return null;
|
|
7658
|
+
}
|
|
7544
7659
|
const {
|
|
7545
|
-
|
|
7660
|
+
hasAdminUsers,
|
|
7546
7661
|
loading: delegateLoading,
|
|
7547
7662
|
bootstrapAdmin,
|
|
7548
7663
|
usersError
|
|
7549
7664
|
} = userManagement;
|
|
7550
|
-
|
|
7551
|
-
if (delegateLoading || hasAdmin || usersError || !bootstrapAdmin) {
|
|
7665
|
+
if (delegateLoading || hasAdminUsers || usersError || !bootstrapAdmin) {
|
|
7552
7666
|
return null;
|
|
7553
7667
|
}
|
|
7554
7668
|
const handleBootstrap = async () => {
|
|
@@ -7722,6 +7836,9 @@
|
|
|
7722
7836
|
navigation_drawer: "Navigation drawer",
|
|
7723
7837
|
collapse: "Collapse",
|
|
7724
7838
|
expand: "Expand",
|
|
7839
|
+
change_language: "Change language",
|
|
7840
|
+
toggle_theme: "Toggle theme",
|
|
7841
|
+
user_menu: "User menu",
|
|
7725
7842
|
// ─── Error states ─────────────────────────────────────────────
|
|
7726
7843
|
error: "Error",
|
|
7727
7844
|
error_uploading_file: "Error uploading file",
|
|
@@ -7983,7 +8100,17 @@
|
|
|
7983
8100
|
select_references: "Select references",
|
|
7984
8101
|
account_settings: "Account Settings",
|
|
7985
8102
|
profile: "Profile",
|
|
8103
|
+
security: "Security",
|
|
7986
8104
|
sessions: "Sessions",
|
|
8105
|
+
change_password: "Change Password",
|
|
8106
|
+
current_password: "Current Password",
|
|
8107
|
+
new_password: "New Password",
|
|
8108
|
+
confirm_password: "Confirm New Password",
|
|
8109
|
+
password_changed: "Password changed successfully. You will be logged out.",
|
|
8110
|
+
passwords_dont_match: "Passwords don't match",
|
|
8111
|
+
password_too_short: "Password must be at least 8 characters",
|
|
8112
|
+
password_change_not_available: "Password change is not available for accounts using external sign-in providers.",
|
|
8113
|
+
changing_password: "Changing...",
|
|
7987
8114
|
display_name: "Display Name",
|
|
7988
8115
|
photo_url: "Photo URL",
|
|
7989
8116
|
save_profile: "Save Profile",
|
|
@@ -9050,7 +9177,17 @@
|
|
|
9050
9177
|
select_references: "Select references",
|
|
9051
9178
|
account_settings: "Account Settings",
|
|
9052
9179
|
profile: "Profile",
|
|
9053
|
-
sessions: "
|
|
9180
|
+
sessions: "Sesiones",
|
|
9181
|
+
security: "Seguridad",
|
|
9182
|
+
change_password: "Cambiar Contraseña",
|
|
9183
|
+
current_password: "Contraseña Actual",
|
|
9184
|
+
new_password: "Nueva Contraseña",
|
|
9185
|
+
confirm_password: "Confirmar Nueva Contraseña",
|
|
9186
|
+
password_changed: "Contraseña cambiada con éxito. Se cerrará tu sesión.",
|
|
9187
|
+
passwords_dont_match: "Las contraseñas no coinciden",
|
|
9188
|
+
password_too_short: "La contraseña debe tener al menos 8 caracteres",
|
|
9189
|
+
password_change_not_available: "El cambio de contraseña no está disponible para cuentas que usan proveedores de inicio de sesión externos.",
|
|
9190
|
+
changing_password: "Cambiando...",
|
|
9054
9191
|
display_name: "Display Name",
|
|
9055
9192
|
photo_url: "Photo URL",
|
|
9056
9193
|
save_profile: "Save Profile",
|
|
@@ -13666,7 +13803,8 @@
|
|
|
13666
13803
|
apiKey,
|
|
13667
13804
|
userManagement: _userManagement,
|
|
13668
13805
|
effectiveRoleController,
|
|
13669
|
-
apiUrl
|
|
13806
|
+
apiUrl,
|
|
13807
|
+
translations
|
|
13670
13808
|
} = props;
|
|
13671
13809
|
const plugins = pluginsProp;
|
|
13672
13810
|
if (plugins) {
|
|
@@ -13741,7 +13879,7 @@
|
|
|
13741
13879
|
if (authController.authError) {
|
|
13742
13880
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.CenteredView, { maxWidth: "md", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorView, { title: "Error loading auth", error: authController.authError }) });
|
|
13743
13881
|
}
|
|
13744
|
-
const content = /* @__PURE__ */ jsxRuntime.jsx(RebaseI18nProvider, { locale, children: /* @__PURE__ */ jsxRuntime.jsx(SnackbarProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(ModeControllerProvider, { value: modeController, children: /* @__PURE__ */ jsxRuntime.jsx(AdminModeControllerProvider, { value: adminModeController, children: /* @__PURE__ */ jsxRuntime.jsx(RebaseClientInstanceContext.Provider, { value: client, children: /* @__PURE__ */ jsxRuntime.jsx(AnalyticsContext.Provider, { value: analyticsController, children: /* @__PURE__ */ jsxRuntime.jsx(CustomizationControllerContext.Provider, { value: customizationController, children: /* @__PURE__ */ jsxRuntime.jsx(UserConfigurationPersistenceContext.Provider, { value: userConfigPersistence, children: /* @__PURE__ */ jsxRuntime.jsx(StorageSourceContext.Provider, { value: resolvedStorage, children: /* @__PURE__ */ jsxRuntime.jsx(RebaseDataContext.Provider, { value: resolvedData, children: /* @__PURE__ */ jsxRuntime.jsx(DatabaseAdminContext.Provider, { value: resolvedDatabaseAdmin, children: /* @__PURE__ */ jsxRuntime.jsx(AuthControllerContext.Provider, { value: authController, children: /* @__PURE__ */ jsxRuntime.jsx(InternalUserManagementContext.Provider, { value: userManagement, children: /* @__PURE__ */ jsxRuntime.jsx(EffectiveRoleControllerContext.Provider, { value: activeEffectiveRoleController, children: /* @__PURE__ */ jsxRuntime.jsx(DialogsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RebaseRegistryProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RebaseInternal, { loading, children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
13882
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(RebaseI18nProvider, { locale, translations, children: /* @__PURE__ */ jsxRuntime.jsx(SnackbarProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(ModeControllerProvider, { value: modeController, children: /* @__PURE__ */ jsxRuntime.jsx(AdminModeControllerProvider, { value: adminModeController, children: /* @__PURE__ */ jsxRuntime.jsx(RebaseClientInstanceContext.Provider, { value: client, children: /* @__PURE__ */ jsxRuntime.jsx(AnalyticsContext.Provider, { value: analyticsController, children: /* @__PURE__ */ jsxRuntime.jsx(CustomizationControllerContext.Provider, { value: customizationController, children: /* @__PURE__ */ jsxRuntime.jsx(UserConfigurationPersistenceContext.Provider, { value: userConfigPersistence, children: /* @__PURE__ */ jsxRuntime.jsx(StorageSourceContext.Provider, { value: resolvedStorage, children: /* @__PURE__ */ jsxRuntime.jsx(RebaseDataContext.Provider, { value: resolvedData, children: /* @__PURE__ */ jsxRuntime.jsx(DatabaseAdminContext.Provider, { value: resolvedDatabaseAdmin, children: /* @__PURE__ */ jsxRuntime.jsx(AuthControllerContext.Provider, { value: authController, children: /* @__PURE__ */ jsxRuntime.jsx(InternalUserManagementContext.Provider, { value: userManagement, children: /* @__PURE__ */ jsxRuntime.jsx(EffectiveRoleControllerContext.Provider, { value: activeEffectiveRoleController, children: /* @__PURE__ */ jsxRuntime.jsx(DialogsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RebaseRegistryProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(RebaseInternal, { loading, children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
13745
13883
|
const resolvedApiUrl = apiUrl ?? client?.baseUrl;
|
|
13746
13884
|
if (resolvedApiUrl) {
|
|
13747
13885
|
return /* @__PURE__ */ jsxRuntime.jsx(ApiConfigProvider, { apiUrl: resolvedApiUrl, getAuthToken: authController.getAuthToken, children: content });
|
|
@@ -14183,9 +14321,6 @@
|
|
|
14183
14321
|
function getEntityFromMemoryCache(path) {
|
|
14184
14322
|
return entityCache.get(path);
|
|
14185
14323
|
}
|
|
14186
|
-
function hasEntityInCache(path) {
|
|
14187
|
-
return entityCache.has(path);
|
|
14188
|
-
}
|
|
14189
14324
|
function getEntityFromCache(path) {
|
|
14190
14325
|
if (isSessionStorageAvailable) {
|
|
14191
14326
|
try {
|
|
@@ -14213,23 +14348,6 @@
|
|
|
14213
14348
|
}
|
|
14214
14349
|
}
|
|
14215
14350
|
}
|
|
14216
|
-
function clearEntityCache() {
|
|
14217
|
-
entityCache.clear();
|
|
14218
|
-
if (isSessionStorageAvailable) {
|
|
14219
|
-
try {
|
|
14220
|
-
const keysToRemove = [];
|
|
14221
|
-
for (let i = 0; i < sessionStorage.length; i++) {
|
|
14222
|
-
const fullKey = sessionStorage.key(i);
|
|
14223
|
-
if (fullKey && fullKey.startsWith(LOCAL_STORAGE_PREFIX)) {
|
|
14224
|
-
keysToRemove.push(fullKey);
|
|
14225
|
-
}
|
|
14226
|
-
}
|
|
14227
|
-
keysToRemove.forEach((key) => sessionStorage.removeItem(key));
|
|
14228
|
-
} catch (error) {
|
|
14229
|
-
console.error("Failed to clear entity cache from sessionStorage:", error);
|
|
14230
|
-
}
|
|
14231
|
-
}
|
|
14232
|
-
}
|
|
14233
14351
|
function flattenKeys(obj, prefix = "", result = []) {
|
|
14234
14352
|
if (utils.isObject(obj) || Array.isArray(obj)) {
|
|
14235
14353
|
const plainObject = utils.isPlainObject(obj);
|
|
@@ -14468,37 +14586,6 @@
|
|
|
14468
14586
|
});
|
|
14469
14587
|
});
|
|
14470
14588
|
}
|
|
14471
|
-
function printChanged(props, prev, path = "", depth = 0, maxDepth = 10) {
|
|
14472
|
-
if (depth > maxDepth) {
|
|
14473
|
-
return;
|
|
14474
|
-
}
|
|
14475
|
-
if (props && prev && typeof props === "object" && typeof prev === "object") {
|
|
14476
|
-
Object.keys(props).forEach((key) => {
|
|
14477
|
-
printChanged(props[key], prev[key], path + "." + key, depth + 1, maxDepth);
|
|
14478
|
-
});
|
|
14479
|
-
} else if (props !== prev) {
|
|
14480
|
-
console.log("Changed props:", path);
|
|
14481
|
-
}
|
|
14482
|
-
}
|
|
14483
|
-
function useTraceUpdate(props, t0) {
|
|
14484
|
-
const $ = reactCompilerRuntime.c(3);
|
|
14485
|
-
const maxDepth = t0 === void 0 ? 3 : t0;
|
|
14486
|
-
const prev = React.useRef(props);
|
|
14487
|
-
let t1;
|
|
14488
|
-
if ($[0] !== maxDepth || $[1] !== props) {
|
|
14489
|
-
t1 = () => {
|
|
14490
|
-
console.log("Changed props:");
|
|
14491
|
-
printChanged(props, prev.current, "", 0, maxDepth);
|
|
14492
|
-
prev.current = props;
|
|
14493
|
-
};
|
|
14494
|
-
$[0] = maxDepth;
|
|
14495
|
-
$[1] = props;
|
|
14496
|
-
$[2] = t1;
|
|
14497
|
-
} else {
|
|
14498
|
-
t1 = $[2];
|
|
14499
|
-
}
|
|
14500
|
-
React.useEffect(t1);
|
|
14501
|
-
}
|
|
14502
14589
|
function isReferenceProperty(property) {
|
|
14503
14590
|
if (!property) return null;
|
|
14504
14591
|
if (property.type === "reference") return true;
|
|
@@ -14944,7 +15031,6 @@
|
|
|
14944
15031
|
exports2.UserSettingsView = UserSettingsView;
|
|
14945
15032
|
exports2.buildCollapsedDefaults = buildCollapsedDefaults;
|
|
14946
15033
|
exports2.buildEnumLabel = buildEnumLabel;
|
|
14947
|
-
exports2.clearEntityCache = clearEntityCache;
|
|
14948
15034
|
exports2.clearEntityFetchCache = clearEntityFetchCache;
|
|
14949
15035
|
exports2.createFormexStub = createFormexStub;
|
|
14950
15036
|
exports2.deleteEntityWithCallbacks = deleteEntityWithCallbacks;
|
|
@@ -14961,12 +15047,9 @@
|
|
|
14961
15047
|
exports2.getIcon = getIcon;
|
|
14962
15048
|
exports2.getRowHeight = getRowHeight;
|
|
14963
15049
|
exports2.getSubcollectionColumnId = getSubcollectionColumnId;
|
|
14964
|
-
exports2.hasEntityInCache = hasEntityInCache;
|
|
14965
|
-
exports2.iconSynonyms = iconSynonyms;
|
|
14966
15050
|
exports2.iconsSearch = iconsSearch;
|
|
14967
15051
|
exports2.isEnumValueDisabled = isEnumValueDisabled;
|
|
14968
15052
|
exports2.populateEntityFetchCache = populateEntityFetchCache;
|
|
14969
|
-
exports2.printChanged = printChanged;
|
|
14970
15053
|
exports2.removeEntityFromCache = removeEntityFromCache;
|
|
14971
15054
|
exports2.removeEntityFromMemoryCache = removeEntityFromMemoryCache;
|
|
14972
15055
|
exports2.resolveComponentRef = resolveComponentRef;
|
|
@@ -15017,12 +15100,10 @@
|
|
|
15017
15100
|
exports2.useStudioNavigationState = useStudioNavigationState;
|
|
15018
15101
|
exports2.useStudioSideEntityController = useStudioSideEntityController;
|
|
15019
15102
|
exports2.useStudioUrlController = useStudioUrlController;
|
|
15020
|
-
exports2.useTraceUpdate = useTraceUpdate;
|
|
15021
15103
|
exports2.useTranslation = useTranslation;
|
|
15022
15104
|
exports2.useUnsavedChangesDialog = useUnsavedChangesDialog;
|
|
15023
15105
|
exports2.useUserConfigurationPersistence = useUserConfigurationPersistence;
|
|
15024
15106
|
exports2.useUserSelector = useUserSelector;
|
|
15025
|
-
exports2.useValidateAuthenticator = useValidateAuthenticator;
|
|
15026
15107
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
15027
15108
|
}));
|
|
15028
15109
|
//# sourceMappingURL=index.umd.js.map
|