@arbidocs/blocks 0.5.22 → 0.5.23

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.
@@ -56,7 +56,7 @@ var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
56
56
  require('../chunk-QW3SVHGM.cjs');
57
57
  var chunkLKK52DEY_cjs = require('../chunk-LKK52DEY.cjs');
58
58
  var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
59
- var chunkK237IYOD_cjs = require('../chunk-K237IYOD.cjs');
59
+ var chunkBYJUI4AT_cjs = require('../chunk-BYJUI4AT.cjs');
60
60
  var chunkCG757WKY_cjs = require('../chunk-CG757WKY.cjs');
61
61
  var chunkW3PSIIMN_cjs = require('../chunk-W3PSIIMN.cjs');
62
62
  var chunkQUMUAJ2P_cjs = require('../chunk-QUMUAJ2P.cjs');
@@ -7685,7 +7685,7 @@ var NO_SSO = {
7685
7685
  };
7686
7686
  function useAuthPages() {
7687
7687
  const auth = chunkMB3S2ETI_cjs.useHost().auth;
7688
- return { ...auth, passwordRules: auth?.passwordRules ?? chunkK237IYOD_cjs.DEFAULT_PASSWORD_RULES };
7688
+ return { ...auth, passwordRules: auth?.passwordRules ?? chunkBYJUI4AT_cjs.DEFAULT_PASSWORD_RULES };
7689
7689
  }
7690
7690
  function useSsoSignIn() {
7691
7691
  const sso = chunkMB3S2ETI_cjs.useHost().sso;
@@ -8144,7 +8144,7 @@ function ConnectedSsoDisconnect() {
8144
8144
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "Sign in with your email and master password instead. Your data stays unchanged." })
8145
8145
  ] }),
8146
8146
  /* @__PURE__ */ jsxRuntime.jsxs("form", { className: "space-y-4", onSubmit: submit, children: [
8147
- step === "email" ? /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "disconnect-email", label: "Email", children: /* @__PURE__ */ jsxRuntime.jsx(
8147
+ step === "email" ? /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "disconnect-email", label: "Email", children: /* @__PURE__ */ jsxRuntime.jsx(
8148
8148
  ui.Input,
8149
8149
  {
8150
8150
  id: "disconnect-email",
@@ -8156,7 +8156,7 @@ function ConnectedSsoDisconnect() {
8156
8156
  disabled: busy
8157
8157
  }
8158
8158
  ) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8159
- changedEmail && /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "disconnect-code", label: `Verification code sent to ${email}`, children: /* @__PURE__ */ jsxRuntime.jsx(
8159
+ changedEmail && /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "disconnect-code", label: `Verification code sent to ${email}`, children: /* @__PURE__ */ jsxRuntime.jsx(
8160
8160
  ui.Input,
8161
8161
  {
8162
8162
  id: "disconnect-code",
@@ -8167,7 +8167,7 @@ function ConnectedSsoDisconnect() {
8167
8167
  disabled: busy
8168
8168
  }
8169
8169
  ) }),
8170
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "disconnect-password", label: "Master password", children: /* @__PURE__ */ jsxRuntime.jsx(
8170
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "disconnect-password", label: "Master password", children: /* @__PURE__ */ jsxRuntime.jsx(
8171
8171
  ui.Input,
8172
8172
  {
8173
8173
  id: "disconnect-password",
@@ -8191,6 +8191,32 @@ function ConnectedSsoDisconnect() {
8191
8191
  )
8192
8192
  ] });
8193
8193
  }
8194
+ function ConnectedBoxPortalSection() {
8195
+ const { isBoxAdmin } = react.useBoxRole();
8196
+ const { licenceUrl } = chunk2QQUGL2V_cjs.useBlocksEnvironment().runtimeConfig;
8197
+ if (!isBoxAdmin || !licenceUrl) return null;
8198
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkIRY63R4L_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, {}), title: "Box", testId: "box-portal-section", children: /* @__PURE__ */ jsxRuntime.jsx(chunkIRY63R4L_cjs.SettingsCard, { children: /* @__PURE__ */ jsxRuntime.jsx(
8199
+ chunkIRY63R4L_cjs.SettingsRow,
8200
+ {
8201
+ label: "Manage your Box in the ARBI portal",
8202
+ description: "Users, storage, AI usage and billing.",
8203
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
8204
+ "a",
8205
+ {
8206
+ href: licenceUrl,
8207
+ target: "_blank",
8208
+ rel: "noopener noreferrer",
8209
+ className: "inline-flex shrink-0 items-center gap-1.5 self-start rounded-md border border-input bg-background px-3 py-1.5 text-sm font-medium text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
8210
+ "data-testid": "box-portal-link",
8211
+ children: [
8212
+ "Open portal",
8213
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "size-3.5", "aria-hidden": true })
8214
+ ]
8215
+ }
8216
+ )
8217
+ }
8218
+ ) }) });
8219
+ }
8194
8220
  function ServerConnectionRow({ onRefresh, ...status }) {
8195
8221
  const { runtimeConfig } = chunk2QQUGL2V_cjs.useBlocksEnvironment();
8196
8222
  const [isRefreshing, setIsRefreshing] = React7.useState(false);
@@ -8229,6 +8255,7 @@ function ConnectedAccountSettings({
8229
8255
  const [logoutOpen, setLogoutOpen] = React7.useState(false);
8230
8256
  return /* @__PURE__ */ jsxRuntime.jsxs(chunkIRY63R4L_cjs.SettingsPanel, { className: "max-w-2xl", children: [
8231
8257
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedProfileCard, { avatarClassName, nameBadge: profileBadge }),
8258
+ /* @__PURE__ */ jsxRuntime.jsx(ConnectedBoxPortalSection, {}),
8232
8259
  afterProfile,
8233
8260
  /* @__PURE__ */ jsxRuntime.jsxs(chunkIRY63R4L_cjs.SettingsDisclosure, { title: "More", testId: "account-more-settings", children: [
8234
8261
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedSsoDisconnect, {}),
@@ -11287,6 +11314,46 @@ function ConnectedDriveSyncDialog({
11287
11314
  }
11288
11315
  );
11289
11316
  }
11317
+ function ConnectedSharePointAdminConsentPage({
11318
+ result: givenResult
11319
+ } = {}) {
11320
+ const queryResult = React7.useMemo(() => new URLSearchParams(window.location.search).get("result"), []);
11321
+ const result = givenResult === void 0 ? queryResult : givenResult;
11322
+ const { apiBaseUrl } = chunk2QQUGL2V_cjs.useBlocksEnvironment().runtimeConfig;
11323
+ const consentUrl = `${apiBaseUrl}/v1/connectors/microsoft_sharepoint/admin-consent`;
11324
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkS4G3DNMA_cjs.ConsentCard, { size: "md", children: [
11325
+ /* @__PURE__ */ jsxRuntime.jsx(
11326
+ chunkS4G3DNMA_cjs.ConsentHeader,
11327
+ {
11328
+ icon: /* @__PURE__ */ jsxRuntime.jsx(chunkEWWVKXEQ_cjs.VendorLogo, { vendorKey: "microsoft_sharepoint", product: "sharepoint" }),
11329
+ title: "Approve ARBI for SharePoint access",
11330
+ children: "A member of your organization uses ARBI and wants to sync documents from SharePoint. Your Microsoft 365 organization requires an administrator to approve this once for the whole organization."
11331
+ }
11332
+ ),
11333
+ result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentNotice, { tone: "success", title: "Access approved \u2014 you\u2019re all set.", className: "mt-4", children: "People in your organization can now connect SharePoint from their own ARBI account. Nothing is synced until each user connects and chooses what to import." }),
11334
+ result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentNotice, { tone: "warning", title: "The approval didn\u2019t complete.", className: "mt-4", children: "The request was declined or canceled on the Microsoft screen. You can try again below \u2014 you must sign in with a Microsoft 365 administrator account of your organization." }),
11335
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkS4G3DNMA_cjs.ConsentSection, { title: "What you are approving", children: [
11336
+ /* @__PURE__ */ jsxRuntime.jsx(
11337
+ chunkS4G3DNMA_cjs.ConsentBulletList,
11338
+ {
11339
+ items: [
11340
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11341
+ /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentStrong, { children: "Read SharePoint sites and files" }),
11342
+ " \u2014 lets each user who connects their own account import documents from sites they already have access to. ARBI never gets more access than the user has."
11343
+ ] }),
11344
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11345
+ /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentStrong, { children: "Sign users in and keep access" }),
11346
+ " \u2014 standard sign-in (openid, profile, email) and offline access so syncs keep working between sessions."
11347
+ ] })
11348
+ ]
11349
+ }
11350
+ ),
11351
+ /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentText, { children: "Approving does not sync anything by itself and grants ARBI no standing access to your tenant. Each user still connects their own Microsoft account, and their tokens are end-to-end encrypted so ARBI\u2019s servers cannot read them at rest." }),
11352
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { asChild: true, className: "w-full pointer-coarse:h-11", children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: consentUrl, children: "Review and approve in Microsoft" }) }),
11353
+ /* @__PURE__ */ jsxRuntime.jsx(chunkS4G3DNMA_cjs.ConsentText, { variant: "footnote", children: "You\u2019ll sign in at login.microsoftonline.com and see Microsoft\u2019s own summary of these permissions before anything is granted." })
11354
+ ] })
11355
+ ] }) });
11356
+ }
11290
11357
  var focus = null;
11291
11358
  var listeners2 = /* @__PURE__ */ new Set();
11292
11359
  function requestProjectBillingFocus(next) {
@@ -14055,8 +14122,13 @@ function useAutoRefreshPendingProjects() {
14055
14122
  var QUOTA_EXCEEDED_MESSAGE = "This project's AI usage for this month is used up.";
14056
14123
  var BOX_MEMBER_QUOTA_MESSAGE = "AI usage for this month is used up. Ask your Box admin to add more.";
14057
14124
  var BOX_ADMIN_QUOTA_MESSAGE = "AI usage for this month is used up. Add more in the ARBI portal.";
14058
- function ConnectedQuotaDialog({ info, onClose: close, box }) {
14059
- const { openProject } = chunk2QQUGL2V_cjs.useBlocksEnvironment();
14125
+ function ConnectedQuotaDialog({ info, onClose: close }) {
14126
+ const { openProject, runtimeConfig } = chunk2QQUGL2V_cjs.useBlocksEnvironment();
14127
+ const role = react.useBoxRole({ enabled: info !== null });
14128
+ const box = role.isBox ? {
14129
+ isAdmin: role.isBoxAdmin && !!runtimeConfig.licenceUrl,
14130
+ portalUrl: runtimeConfig.licenceUrl
14131
+ } : void 0;
14060
14132
  const { data: projects, refetch: refetchProjects } = react.useProjects();
14061
14133
  const [addAiUsageFor, setAddAiUsageFor] = React7.useState(null);
14062
14134
  const open = info !== null;
@@ -35761,7 +35833,7 @@ function ConnectedForgotPassword({
35761
35833
  setError(null);
35762
35834
  } else {
35763
35835
  setError(
35764
- chunkK237IYOD_cjs.parseAuthError(err, {
35836
+ chunkBYJUI4AT_cjs.parseAuthError(err, {
35765
35837
  messageMap: { "Incorrect username or password": client.RECOVERY_KEY_ERRORS.AUTH_FAILED },
35766
35838
  defaultMessage: "Failed to authenticate with recovery key. Please check your email and try again."
35767
35839
  })
@@ -35786,7 +35858,7 @@ function ConnectedForgotPassword({
35786
35858
  await sso.signIn({ returnTo: "/recover" });
35787
35859
  };
35788
35860
  return /* @__PURE__ */ jsxRuntime.jsx(
35789
- chunkK237IYOD_cjs.AccountRecoveryDialog,
35861
+ chunkBYJUI4AT_cjs.AccountRecoveryDialog,
35790
35862
  {
35791
35863
  open,
35792
35864
  onClose: handleClose,
@@ -35812,7 +35884,7 @@ async function backUpOnSignup({
35812
35884
  saveRecoveryKey,
35813
35885
  auth0Sub
35814
35886
  }) {
35815
- await chunkK237IYOD_cjs.promptSaveCredential(email, password);
35887
+ await chunkBYJUI4AT_cjs.promptSaveCredential(email, password);
35816
35888
  if (!saveRecoveryKey) return;
35817
35889
  try {
35818
35890
  await react.downloadRecoveryFile({ signingPrivateKey, email, auth0Sub });
@@ -35828,6 +35900,7 @@ function useLoginActions({
35828
35900
  formActions
35829
35901
  }) {
35830
35902
  const arbi = react.useArbi();
35903
+ const signInLayer = chunkIWT4QVQL_cjs.useOptionalConnection();
35831
35904
  const sso = useSsoSignIn();
35832
35905
  const { notify: notify17 } = chunk2QQUGL2V_cjs.useBlocksEnvironment();
35833
35906
  const { passwordRules, onRegistered, onUnlockedOffline } = useAuthPages();
@@ -35889,14 +35962,16 @@ function useLoginActions({
35889
35962
  const handleLocalLogin = React7.useCallback(
35890
35963
  async (opts) => {
35891
35964
  arbi.session?.setSsoMode(false);
35892
- if (!password) {
35965
+ const loginEmail = opts?.credentials?.email ?? email;
35966
+ const loginPassword = opts?.credentials?.password ?? password;
35967
+ if (!loginPassword) {
35893
35968
  notify17("Please fill in all required fields.", "error");
35894
35969
  return;
35895
35970
  }
35896
- if (!validateEmailWithError(email)) return;
35971
+ if (!validateEmailWithError(loginEmail)) return;
35897
35972
  if (typeof navigator !== "undefined" && !navigator.onLine) {
35898
35973
  try {
35899
- await arbi.unlock(email, password);
35974
+ await arbi.unlock(loginEmail, loginPassword);
35900
35975
  onUnlockedOffline?.();
35901
35976
  } catch (err) {
35902
35977
  notify17(
@@ -35906,22 +35981,35 @@ function useLoginActions({
35906
35981
  }
35907
35982
  return;
35908
35983
  }
35984
+ if (signInLayer && !signInLayer.apiConfigured) {
35985
+ await signInLayer.login(loginEmail, loginPassword);
35986
+ return;
35987
+ }
35909
35988
  setIsAuthenticating(true);
35910
35989
  try {
35911
- const login = await arbi.login(email, password);
35990
+ const login = await arbi.login(loginEmail, loginPassword);
35912
35991
  if (opts?.isFreshRegistration) onRegistered?.(login);
35913
35992
  } catch (error) {
35914
35993
  setIsAuthenticating(false);
35915
35994
  console.error("Login error:", error);
35916
35995
  notify17(
35917
- chunkK237IYOD_cjs.parseAuthError(error, {
35996
+ chunkBYJUI4AT_cjs.parseAuthError(error, {
35918
35997
  messageMap: { "Incorrect username or password": BAD_CREDENTIALS }
35919
35998
  }),
35920
35999
  "error"
35921
36000
  );
35922
36001
  }
35923
36002
  },
35924
- [arbi, email, password, validateEmailWithError, notify17, onRegistered, onUnlockedOffline]
36003
+ [
36004
+ arbi,
36005
+ signInLayer,
36006
+ email,
36007
+ password,
36008
+ validateEmailWithError,
36009
+ notify17,
36010
+ onRegistered,
36011
+ onUnlockedOffline
36012
+ ]
35925
36013
  );
35926
36014
  const handleRegister = React7.useCallback(
35927
36015
  async (saveRecoveryKey = true) => {
@@ -35954,7 +36042,7 @@ function useLoginActions({
35954
36042
  } catch (error) {
35955
36043
  setIsAuthenticating(false);
35956
36044
  console.error("Registration error:", error);
35957
- notify17(chunkK237IYOD_cjs.parseAuthError(error), "error");
36045
+ notify17(chunkBYJUI4AT_cjs.parseAuthError(error), "error");
35958
36046
  }
35959
36047
  },
35960
36048
  [
@@ -36012,7 +36100,7 @@ function useLoginForm() {
36012
36100
  };
36013
36101
  }, []);
36014
36102
  React7.useEffect(() => {
36015
- const { params: hashParams, trailingFragment } = chunkK237IYOD_cjs.splitAuthHash(window.location.hash);
36103
+ const { params: hashParams, trailingFragment } = chunkBYJUI4AT_cjs.splitAuthHash(window.location.hash);
36016
36104
  const errorParam = hashParams.get("error");
36017
36105
  const errorDescriptionParam = hashParams.get("error_description");
36018
36106
  const emailParam = hashParams.get("verify");
@@ -36027,7 +36115,7 @@ function useLoginForm() {
36027
36115
  }
36028
36116
  const nextParam = hashParams.get("next");
36029
36117
  if (nextParam) {
36030
- onReturnPath?.(chunkK237IYOD_cjs.withTrailingFragment(decodeURIComponent(nextParam), trailingFragment));
36118
+ onReturnPath?.(chunkBYJUI4AT_cjs.withTrailingFragment(decodeURIComponent(nextParam), trailingFragment));
36031
36119
  }
36032
36120
  if (emailParam) {
36033
36121
  setIsRegistering(true);
@@ -36230,6 +36318,7 @@ function ConnectedLoginPage() {
36230
36318
  const auth = useAuthPages();
36231
36319
  const { notify: notify17 } = chunk2QQUGL2V_cjs.useBlocksEnvironment();
36232
36320
  const isSsoOnly = !!auth.ssoOnly;
36321
+ const allowRegistration = auth.allowRegistration ?? true;
36233
36322
  const isOnline = documentTools.useIsOnline();
36234
36323
  const passwordRules = auth.passwordRules;
36235
36324
  useSsoVerificationRedirect();
@@ -36290,13 +36379,21 @@ function ConnectedLoginPage() {
36290
36379
  auth.onIntent?.();
36291
36380
  };
36292
36381
  React7.useEffect(() => {
36293
- if (!isOnline) setIsRegistering(false);
36294
- }, [isOnline, setIsRegistering]);
36382
+ if (!isOnline || !allowRegistration) setIsRegistering(false);
36383
+ }, [isOnline, allowRegistration, setIsRegistering]);
36384
+ chunkBYJUI4AT_cjs.useFragmentCredentials({
36385
+ enabled: !!auth.fragmentSignIn,
36386
+ onCredentials: ({ email: linkEmail, password: linkPassword, next }) => {
36387
+ setEmail(linkEmail);
36388
+ if (next) auth.onReturnPath?.(next);
36389
+ void handleLocalLogin({ credentials: { email: linkEmail, password: linkPassword } });
36390
+ }
36391
+ });
36295
36392
  const autoRequestFiredRef = React7.useRef(false);
36296
36393
  const emailInputRef = React7.useRef(null);
36297
36394
  React7.useEffect(() => {
36298
36395
  if (!pendingAutoRequest || autoRequestFiredRef.current) return;
36299
- if (isSsoOnly || !isOnline) return;
36396
+ if (isSsoOnly || !isOnline || !allowRegistration) return;
36300
36397
  autoRequestFiredRef.current = true;
36301
36398
  setPendingAutoRequest(false);
36302
36399
  void handleRequestVerificationCode();
@@ -36304,6 +36401,7 @@ function ConnectedLoginPage() {
36304
36401
  pendingAutoRequest,
36305
36402
  isSsoOnly,
36306
36403
  isOnline,
36404
+ allowRegistration,
36307
36405
  setPendingAutoRequest,
36308
36406
  handleRequestVerificationCode
36309
36407
  ]);
@@ -36373,9 +36471,9 @@ function ConnectedLoginPage() {
36373
36471
  handleLocalLogin();
36374
36472
  }
36375
36473
  };
36376
- const offlineIndicator = /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthOfflineBadge, { title: "No connection \u2014 sign in to unlock your offline files on this device" });
36474
+ const offlineIndicator = /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthOfflineBadge, { title: "No connection \u2014 sign in to unlock your offline files on this device" });
36377
36475
  const loginRegisterToggle = /* @__PURE__ */ jsxRuntime.jsx(
36378
- chunkK237IYOD_cjs.AuthTabs,
36476
+ chunkBYJUI4AT_cjs.AuthTabs,
36379
36477
  {
36380
36478
  ariaLabel: "Login or register",
36381
36479
  value: isRegistering ? "register" : "login",
@@ -36389,16 +36487,22 @@ function ConnectedLoginPage() {
36389
36487
  const aside = isSsoOnly ? void 0 : auth.aside;
36390
36488
  const isStepTwo = isRegistering && verificationSent && showVerificationForm;
36391
36489
  return /* @__PURE__ */ jsxRuntime.jsxs(
36392
- chunkK237IYOD_cjs.AuthLayout,
36490
+ chunkBYJUI4AT_cjs.AuthLayout,
36393
36491
  {
36394
36492
  brand: auth.brand,
36395
36493
  corner: auth.corner,
36396
- headerRight: !isSsoOnly ? isOnline ? loginRegisterToggle : offlineIndicator : void 0,
36494
+ headerRight: isSsoOnly ? void 0 : !isOnline ? offlineIndicator : allowRegistration ? loginRegisterToggle : void 0,
36397
36495
  aside,
36398
36496
  children: [
36399
36497
  auth.banner,
36400
36498
  !isSsoOnly && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
36401
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthHeading, { title: isRegistering ? "Create your account" : "Welcome back" }),
36499
+ /* @__PURE__ */ jsxRuntime.jsx(
36500
+ chunkBYJUI4AT_cjs.AuthHeading,
36501
+ {
36502
+ title: isRegistering ? "Create your account" : auth.heading?.title ?? "Welcome back",
36503
+ description: isRegistering ? void 0 : auth.heading?.description
36504
+ }
36505
+ ),
36402
36506
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "login-form-container", children: [
36403
36507
  /* @__PURE__ */ jsxRuntime.jsxs(
36404
36508
  "form",
@@ -36410,17 +36514,17 @@ function ConnectedLoginPage() {
36410
36514
  "aria-busy": isAuthenticating,
36411
36515
  children: [
36412
36516
  /* @__PURE__ */ jsxRuntime.jsx(
36413
- chunkK237IYOD_cjs.AuthField,
36517
+ chunkBYJUI4AT_cjs.AuthField,
36414
36518
  {
36415
36519
  htmlFor: "email",
36416
- label: "Email",
36520
+ label: isRegistering ? "Email" : auth.emailLabel ?? "Email",
36417
36521
  required: true,
36418
- labelAction: isRegistering && verificationSent ? /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthLink, { onClick: clearForm, "data-testid": "clear-button", children: "Clear form" }) : void 0,
36522
+ labelAction: isRegistering && verificationSent ? /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthLink, { onClick: clearForm, "data-testid": "clear-button", children: "Clear form" }) : void 0,
36419
36523
  trailing: (
36420
36524
  // Shown once the address is locked in with a code in hand — i.e. the emailed
36421
36525
  // link, or a code typed in. The server checks the code when the account is made.
36422
36526
  showVerifiedBadge ? /* @__PURE__ */ jsxRuntime.jsx(
36423
- chunkK237IYOD_cjs.AuthFieldBadge,
36527
+ chunkBYJUI4AT_cjs.AuthFieldBadge,
36424
36528
  {
36425
36529
  testId: "email-verified-badge",
36426
36530
  icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BadgeCheck, { className: "h-4 w-4", "aria-hidden": "true" }),
@@ -36429,7 +36533,7 @@ function ConnectedLoginPage() {
36429
36533
  ) : void 0
36430
36534
  ),
36431
36535
  children: /* @__PURE__ */ jsxRuntime.jsx(
36432
- chunkK237IYOD_cjs.AuthInput,
36536
+ chunkBYJUI4AT_cjs.AuthInput,
36433
36537
  {
36434
36538
  ref: emailInputRef,
36435
36539
  type: "email",
@@ -36461,7 +36565,7 @@ function ConnectedLoginPage() {
36461
36565
  }
36462
36566
  ),
36463
36567
  /* @__PURE__ */ jsxRuntime.jsx(
36464
- chunkK237IYOD_cjs.AuthLink,
36568
+ chunkBYJUI4AT_cjs.AuthLink,
36465
36569
  {
36466
36570
  onClick: () => {
36467
36571
  if (!email) {
@@ -36483,9 +36587,9 @@ function ConnectedLoginPage() {
36483
36587
  )
36484
36588
  ] }),
36485
36589
  isRegistering && verificationSent && !showVerificationForm && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 pt-1", "data-testid": "verification-sent-notice", children: [
36486
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthNote, { children: "We've sent a link to your email \u2014 click it to continue." }),
36590
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthNote, { children: "We've sent a link to your email \u2014 click it to continue." }),
36487
36591
  /* @__PURE__ */ jsxRuntime.jsx(
36488
- chunkK237IYOD_cjs.AuthLink,
36592
+ chunkBYJUI4AT_cjs.AuthLink,
36489
36593
  {
36490
36594
  onClick: () => setShowVerificationForm(true),
36491
36595
  className: "w-full text-center",
@@ -36495,8 +36599,8 @@ function ConnectedLoginPage() {
36495
36599
  )
36496
36600
  ] }),
36497
36601
  isStepTwo && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
36498
- !showVerifiedBadge && /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "verificationCode", label: "Verification Code", required: true, children: /* @__PURE__ */ jsxRuntime.jsx(
36499
- chunkK237IYOD_cjs.AuthInput,
36602
+ !showVerifiedBadge && /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "verificationCode", label: "Verification Code", required: true, children: /* @__PURE__ */ jsxRuntime.jsx(
36603
+ chunkBYJUI4AT_cjs.AuthInput,
36500
36604
  {
36501
36605
  type: "text",
36502
36606
  placeholder: "THREE-WORD-CODE",
@@ -36514,8 +36618,8 @@ function ConnectedLoginPage() {
36514
36618
  }
36515
36619
  ) }),
36516
36620
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
36517
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "firstName", label: "First Name", required: true, children: /* @__PURE__ */ jsxRuntime.jsx(
36518
- chunkK237IYOD_cjs.AuthInput,
36621
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "firstName", label: "First Name", required: true, children: /* @__PURE__ */ jsxRuntime.jsx(
36622
+ chunkBYJUI4AT_cjs.AuthInput,
36519
36623
  {
36520
36624
  type: "text",
36521
36625
  placeholder: "",
@@ -36528,8 +36632,8 @@ function ConnectedLoginPage() {
36528
36632
  required: true
36529
36633
  }
36530
36634
  ) }),
36531
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "lastName", label: "Last Name", required: true, children: /* @__PURE__ */ jsxRuntime.jsx(
36532
- chunkK237IYOD_cjs.AuthInput,
36635
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "lastName", label: "Last Name", required: true, children: /* @__PURE__ */ jsxRuntime.jsx(
36636
+ chunkBYJUI4AT_cjs.AuthInput,
36533
36637
  {
36534
36638
  type: "text",
36535
36639
  placeholder: "",
@@ -36559,9 +36663,9 @@ function ConnectedLoginPage() {
36559
36663
  }
36560
36664
  )
36561
36665
  ] }),
36562
- !isRegistering && /* @__PURE__ */ jsxRuntime.jsxs(chunkK237IYOD_cjs.AuthField, { htmlFor: "password", label: "Password", required: true, children: [
36666
+ !isRegistering && /* @__PURE__ */ jsxRuntime.jsxs(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "password", label: "Password", required: true, children: [
36563
36667
  /* @__PURE__ */ jsxRuntime.jsx(
36564
- chunkK237IYOD_cjs.RevealablePasswordInput,
36668
+ chunkBYJUI4AT_cjs.RevealablePasswordInput,
36565
36669
  {
36566
36670
  isRevealed: showPassword,
36567
36671
  onToggleReveal: () => setShowPassword((v) => !v),
@@ -36580,7 +36684,7 @@ function ConnectedLoginPage() {
36580
36684
  }
36581
36685
  ),
36582
36686
  /* @__PURE__ */ jsxRuntime.jsx(
36583
- chunkK237IYOD_cjs.AuthLink,
36687
+ chunkBYJUI4AT_cjs.AuthLink,
36584
36688
  {
36585
36689
  onClick: () => setShowForgotPasswordModal(true),
36586
36690
  className: "mt-2",
@@ -36590,7 +36694,7 @@ function ConnectedLoginPage() {
36590
36694
  )
36591
36695
  ] }),
36592
36696
  isStepTwo && /* @__PURE__ */ jsxRuntime.jsx(
36593
- chunkK237IYOD_cjs.AuthConsent,
36697
+ chunkBYJUI4AT_cjs.AuthConsent,
36594
36698
  {
36595
36699
  termsAccepted,
36596
36700
  onTermsAcceptedChange: setTermsAccepted,
@@ -36602,7 +36706,7 @@ function ConnectedLoginPage() {
36602
36706
  }
36603
36707
  ),
36604
36708
  (!isRegistering || isStepTwo) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
36605
- chunkK237IYOD_cjs.AuthSubmitButton,
36709
+ chunkBYJUI4AT_cjs.AuthSubmitButton,
36606
36710
  {
36607
36711
  isBusy: isAuthenticating,
36608
36712
  disabled: isAuthenticating || isRegistering && isRegisterSubmitDisabled,
@@ -36613,7 +36717,7 @@ function ConnectedLoginPage() {
36613
36717
  }
36614
36718
  ),
36615
36719
  (!isRegistering || !verificationSent) && sso.available && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-6 space-y-4", children: [
36616
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthDivider, { label: "or continue with" }),
36720
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthDivider, { label: "or continue with" }),
36617
36721
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-2", children: [
36618
36722
  /* @__PURE__ */ jsxRuntime.jsxs(
36619
36723
  ui.Button,
@@ -36670,7 +36774,7 @@ function ConnectedLoginPage() {
36670
36774
  ] })
36671
36775
  ] })
36672
36776
  ] }),
36673
- !isRegistering && sso.available && /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthLink, { onClick: () => handleSsoLogin(), "data-testid": "login-with-arbi-button", children: "Continue with Arbicity" }),
36777
+ !isRegistering && sso.available && /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthLink, { onClick: () => handleSsoLogin(), "data-testid": "login-with-arbi-button", children: "Continue with Arbicity" }),
36674
36778
  !isRegistering && auth.footer,
36675
36779
  /* @__PURE__ */ jsxRuntime.jsx(
36676
36780
  ConnectedForgotPassword,
@@ -37134,7 +37238,7 @@ function ConnectedSsoCallback() {
37134
37238
  window.location.href = sso.continueUrl("link", auth0Message.state);
37135
37239
  }
37136
37240
  } : () => navigate("/");
37137
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkK237IYOD_cjs.AuthLayout, { brand: auth.brand, corner: auth.corner, children: [
37241
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkBYJUI4AT_cjs.AuthLayout, { brand: auth.brand, corner: auth.corner, children: [
37138
37242
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8", "data-testid": "auth0-message", children: [
37139
37243
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground mb-2", children: getTitle() }),
37140
37244
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: getDescription() }),
@@ -37185,7 +37289,7 @@ function ConnectedSsoCallback() {
37185
37289
  ] });
37186
37290
  }
37187
37291
  if (isCheckingStatus || !ssoStatus) {
37188
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkK237IYOD_cjs.AuthLayout, { brand: auth.brand, corner: auth.corner, children: [
37292
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkBYJUI4AT_cjs.AuthLayout, { brand: auth.brand, corner: auth.corner, children: [
37189
37293
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8", "data-testid": "sso-loading", children: [
37190
37294
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-8 w-8 animate-spin mx-auto mb-4" }),
37191
37295
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "Completing authentication..." })
@@ -37193,14 +37297,14 @@ function ConnectedSsoCallback() {
37193
37297
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: () => navigate("/login"), variant: "ghost", className: "w-full text-sm", children: "Cancel" })
37194
37298
  ] });
37195
37299
  }
37196
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkK237IYOD_cjs.AuthLayout, { brand: auth.brand, corner: auth.corner, children: [
37300
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkBYJUI4AT_cjs.AuthLayout, { brand: auth.brand, corner: auth.corner, children: [
37197
37301
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3", "data-testid": "sso-password-form", children: [
37198
37302
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 text-center", children: [
37199
37303
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground", children: getTitle() }),
37200
37304
  getDescription() && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: getDescription() })
37201
37305
  ] }),
37202
37306
  /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handlePasswordSubmit, className: "space-y-4", children: [
37203
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "email", label: "Email", children: /* @__PURE__ */ jsxRuntime.jsx(
37307
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "email", label: "Email", children: /* @__PURE__ */ jsxRuntime.jsx(
37204
37308
  ui.Input,
37205
37309
  {
37206
37310
  type: "email",
@@ -37215,7 +37319,7 @@ function ConnectedSsoCallback() {
37215
37319
  ) }),
37216
37320
  ssoStatus.status === "new_user" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
37217
37321
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
37218
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "firstName", label: "First Name", className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
37322
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "firstName", label: "First Name", className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
37219
37323
  ui.Input,
37220
37324
  {
37221
37325
  type: "text",
@@ -37228,7 +37332,7 @@ function ConnectedSsoCallback() {
37228
37332
  "data-testid": "sso-firstname-display"
37229
37333
  }
37230
37334
  ) }),
37231
- /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthField, { htmlFor: "lastName", label: "Last Name", className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
37335
+ /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "lastName", label: "Last Name", className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
37232
37336
  ui.Input,
37233
37337
  {
37234
37338
  type: "text",
@@ -37257,7 +37361,7 @@ function ConnectedSsoCallback() {
37257
37361
  getUnmetRequirement: passwordRules.unmet
37258
37362
  }
37259
37363
  )
37260
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(chunkK237IYOD_cjs.AuthField, { htmlFor: "password", label: "Password", required: true, children: [
37364
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(chunkBYJUI4AT_cjs.AuthField, { htmlFor: "password", label: "Password", required: true, children: [
37261
37365
  /* @__PURE__ */ jsxRuntime.jsx(
37262
37366
  ui.Input,
37263
37367
  {
@@ -37276,7 +37380,7 @@ function ConnectedSsoCallback() {
37276
37380
  }
37277
37381
  ),
37278
37382
  ssoStatus?.status === "sso_exists" && /* @__PURE__ */ jsxRuntime.jsx(
37279
- chunkK237IYOD_cjs.AuthLink,
37383
+ chunkBYJUI4AT_cjs.AuthLink,
37280
37384
  {
37281
37385
  onClick: () => setShowForgotPasswordModal(true),
37282
37386
  className: "mt-2",
@@ -37285,9 +37389,9 @@ function ConnectedSsoCallback() {
37285
37389
  }
37286
37390
  )
37287
37391
  ] }),
37288
- error && /* @__PURE__ */ jsxRuntime.jsx(chunkK237IYOD_cjs.AuthAlert, { testId: "sso-error-message", children: error.message }),
37392
+ error && /* @__PURE__ */ jsxRuntime.jsx(chunkBYJUI4AT_cjs.AuthAlert, { testId: "sso-error-message", children: error.message }),
37289
37393
  ssoStatus.status === "new_user" && /* @__PURE__ */ jsxRuntime.jsx(
37290
- chunkK237IYOD_cjs.AuthConsent,
37394
+ chunkBYJUI4AT_cjs.AuthConsent,
37291
37395
  {
37292
37396
  termsAccepted,
37293
37397
  onTermsAcceptedChange: setTermsAccepted,
@@ -37529,7 +37633,7 @@ function ConnectedRecoveryKeyDialog({
37529
37633
  onOpenChange(false);
37530
37634
  };
37531
37635
  return /* @__PURE__ */ jsxRuntime.jsx(
37532
- chunkK237IYOD_cjs.RecoveryKeyDialog,
37636
+ chunkBYJUI4AT_cjs.RecoveryKeyDialog,
37533
37637
  {
37534
37638
  open,
37535
37639
  onClose: handleClose,
@@ -38165,6 +38269,7 @@ exports.ConnectedSearchPage = ConnectedSearchPage;
38165
38269
  exports.ConnectedSecuritySection = ConnectedSecuritySection;
38166
38270
  exports.ConnectedSessionsRow = ConnectedSessionsRow;
38167
38271
  exports.ConnectedSettingsPage = ConnectedSettingsPage;
38272
+ exports.ConnectedSharePointAdminConsentPage = ConnectedSharePointAdminConsentPage;
38168
38273
  exports.ConnectedSharedFilesPage = ConnectedSharedFilesPage;
38169
38274
  exports.ConnectedSignatureVerifyPage = ConnectedSignatureVerifyPage;
38170
38275
  exports.ConnectedSkillUpload = ConnectedSkillUpload;