@streamoid/settings 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +88 -3
- package/dist/index.d.ts +88 -3
- package/dist/index.js +662 -384
- package/dist/index.mjs +622 -344
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -258,7 +258,8 @@ var TAB_SCOPE = {
|
|
|
258
258
|
billing: "workspace",
|
|
259
259
|
apikey: "workspace",
|
|
260
260
|
connectedApps: "account",
|
|
261
|
-
organizationIntegrations: "organization"
|
|
261
|
+
organizationIntegrations: "organization",
|
|
262
|
+
organizationLoginMethods: "organization"
|
|
262
263
|
};
|
|
263
264
|
var SCOPE_LABELS = {
|
|
264
265
|
account: "Account",
|
|
@@ -279,7 +280,8 @@ var TAB_TO_URL = {
|
|
|
279
280
|
billing: "billing",
|
|
280
281
|
apikey: "api-keys",
|
|
281
282
|
connectedApps: "connected-apps",
|
|
282
|
-
organizationIntegrations: "organization/integrations"
|
|
283
|
+
organizationIntegrations: "organization/integrations",
|
|
284
|
+
organizationLoginMethods: "organization/login-methods"
|
|
283
285
|
};
|
|
284
286
|
var URL_TO_TAB = {
|
|
285
287
|
/* Canonical, scope-first slugs. */
|
|
@@ -290,6 +292,7 @@ var URL_TO_TAB = {
|
|
|
290
292
|
"organization/people": "organization",
|
|
291
293
|
"organization/workspaces": "organizationWorkspaces",
|
|
292
294
|
"organization/integrations": "organizationIntegrations",
|
|
295
|
+
"organization/login-methods": "organizationLoginMethods",
|
|
293
296
|
/* The Domains tab is gone; its join requests live under Workspaces. */
|
|
294
297
|
"organization/domains": "organizationWorkspaces",
|
|
295
298
|
/* Unscoped destinations. */
|
|
@@ -321,7 +324,8 @@ var TAB_LABELS = {
|
|
|
321
324
|
billing: "Billing & usage",
|
|
322
325
|
apikey: "API Keys",
|
|
323
326
|
connectedApps: "Connected apps",
|
|
324
|
-
organizationIntegrations: "Integrations"
|
|
327
|
+
organizationIntegrations: "Integrations",
|
|
328
|
+
organizationLoginMethods: "Login methods"
|
|
325
329
|
};
|
|
326
330
|
var TAB_DESCRIPTIONS = {
|
|
327
331
|
profile: "Your name, photo, language and personalisation",
|
|
@@ -336,7 +340,8 @@ var TAB_DESCRIPTIONS = {
|
|
|
336
340
|
billing: "Workspace plan, credits, invoices and usage history",
|
|
337
341
|
apikey: "Create and revoke keys for calling the Streamoid APIs",
|
|
338
342
|
connectedApps: "Apps like ChatGPT and Codex that you've allowed to use CXO for you",
|
|
339
|
-
organizationIntegrations: "Turn ChatGPT and Codex on for the organization, and revoke any member's connection"
|
|
343
|
+
organizationIntegrations: "Turn ChatGPT and Codex on for the organization, and revoke any member's connection",
|
|
344
|
+
organizationLoginMethods: "Choose whether people sign in with an email code, company SSO, or either"
|
|
340
345
|
};
|
|
341
346
|
function resolveSettingsTabFromPath(path) {
|
|
342
347
|
const segments = path.split("/").filter(Boolean);
|
|
@@ -374,6 +379,7 @@ function AdministrationOverview({
|
|
|
374
379
|
isWorkspaceAdmin,
|
|
375
380
|
showConnectedApps,
|
|
376
381
|
showIntegrations,
|
|
382
|
+
showLoginMethods = false,
|
|
377
383
|
showReferral = false,
|
|
378
384
|
canInvite,
|
|
379
385
|
onNavigate,
|
|
@@ -392,7 +398,7 @@ function AdministrationOverview({
|
|
|
392
398
|
{
|
|
393
399
|
title: "Organization",
|
|
394
400
|
scopeName: hasOrganization ? organizationName : null,
|
|
395
|
-
tabs: ["organizationList", ...hasOrganization ? ["organization", "organizationWorkspaces"] : [], ...showIntegrations ? ["organizationIntegrations"] : []]
|
|
401
|
+
tabs: ["organizationList", ...hasOrganization ? ["organization", "organizationWorkspaces"] : [], ...showIntegrations ? ["organizationIntegrations"] : [], ...showLoginMethods ? ["organizationLoginMethods"] : []]
|
|
396
402
|
}
|
|
397
403
|
];
|
|
398
404
|
return /* @__PURE__ */ jsx3("div", { className: administration_overview_default.overview, children: groups.map((group) => /* @__PURE__ */ jsxs2("section", { className: administration_overview_default.section, "aria-label": group.scopeName ? `${group.title} \xB7 ${group.scopeName}` : group.title, children: [
|
|
@@ -597,8 +603,8 @@ function useWorkspaceOrganization({
|
|
|
597
603
|
|
|
598
604
|
// src/settings-content.tsx
|
|
599
605
|
import {
|
|
600
|
-
Fragment as
|
|
601
|
-
useState as
|
|
606
|
+
Fragment as Fragment16,
|
|
607
|
+
useState as useState26,
|
|
602
608
|
useEffect as useEffect20,
|
|
603
609
|
useRef as useRef12,
|
|
604
610
|
useCallback as useCallback10,
|
|
@@ -610,7 +616,7 @@ import {
|
|
|
610
616
|
ScMenuOptions
|
|
611
617
|
} from "@streamoid/ui";
|
|
612
618
|
import { ScTextField } from "@streamoid/ui";
|
|
613
|
-
import { ScButton as
|
|
619
|
+
import { ScButton as ScButton19 } from "@streamoid/ui";
|
|
614
620
|
import { ScWorkspaceSwitchCard } from "@streamoid/ui";
|
|
615
621
|
import {
|
|
616
622
|
SiconTeam,
|
|
@@ -14874,8 +14880,271 @@ function OrganizationIntegrationsContent() {
|
|
|
14874
14880
|
] });
|
|
14875
14881
|
}
|
|
14876
14882
|
|
|
14883
|
+
// src/organization-login-methods-content.tsx
|
|
14884
|
+
import { useState as useState25 } from "react";
|
|
14885
|
+
import { ScButton as ScButton18, ScToggleSwitch as ScToggleSwitch2 } from "@streamoid/ui";
|
|
14886
|
+
import { Fragment as Fragment15, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
14887
|
+
var AT_LEAST_ONE_HINT = "At least one login method must stay on, or nobody can sign in.";
|
|
14888
|
+
var NO_SSO_HINT = "Company SSO isn't set up for your organization. Contact Streamoid to set it up.";
|
|
14889
|
+
var SELF_GUARD_HINT = "Sign in once with company SSO before turning email codes off.";
|
|
14890
|
+
var SESSION_NOTE = "People already signed in stay signed in until their session ends (up to 7 days).";
|
|
14891
|
+
function loginMethodsSwitchState(data) {
|
|
14892
|
+
const hasConnection = !!data.connection;
|
|
14893
|
+
let emailHint = null;
|
|
14894
|
+
if (data.emailCode) {
|
|
14895
|
+
if (!hasConnection) emailHint = null;
|
|
14896
|
+
else if (!data.sso) emailHint = AT_LEAST_ONE_HINT;
|
|
14897
|
+
else if (data.constraints.selfLockoutGuard) emailHint = SELF_GUARD_HINT;
|
|
14898
|
+
}
|
|
14899
|
+
const emailLocked = data.emailCode && (!data.constraints.canDisableEmailCode || data.constraints.selfLockoutGuard);
|
|
14900
|
+
let ssoHint = null;
|
|
14901
|
+
if (!hasConnection) ssoHint = NO_SSO_HINT;
|
|
14902
|
+
else if (data.sso && !data.emailCode) ssoHint = AT_LEAST_ONE_HINT;
|
|
14903
|
+
const ssoLocked = !hasConnection || data.sso && !data.emailCode;
|
|
14904
|
+
return {
|
|
14905
|
+
emailCode: { checked: data.emailCode, disabled: emailLocked, hint: emailHint },
|
|
14906
|
+
sso: { checked: data.sso, disabled: ssoLocked, hint: ssoHint }
|
|
14907
|
+
};
|
|
14908
|
+
}
|
|
14909
|
+
var domainsLabel = (domains) => domains.length ? domains.map((d) => `@${d}`).join(" or ") : "your organization's";
|
|
14910
|
+
var memberCsv = (members) => toCsv([["Name", "Email", "Role"], ...members.map((m) => [m.name ?? "", m.email, m.role])]);
|
|
14911
|
+
function SwitchRow({
|
|
14912
|
+
title,
|
|
14913
|
+
description,
|
|
14914
|
+
state,
|
|
14915
|
+
busy,
|
|
14916
|
+
onToggle
|
|
14917
|
+
}) {
|
|
14918
|
+
const disabled = state.disabled || busy;
|
|
14919
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex items-start w-full", style: { gap: T15.spXl }, children: [
|
|
14920
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
|
|
14921
|
+
/* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: title }),
|
|
14922
|
+
/* @__PURE__ */ jsx34(Muted, { children: description }),
|
|
14923
|
+
state.hint && /* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: state.hint })
|
|
14924
|
+
] }),
|
|
14925
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
|
|
14926
|
+
/* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: state.checked ? "On" : "Off" }),
|
|
14927
|
+
/* @__PURE__ */ jsx34("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx34(
|
|
14928
|
+
ScToggleSwitch2,
|
|
14929
|
+
{
|
|
14930
|
+
checked: state.checked,
|
|
14931
|
+
disabled,
|
|
14932
|
+
onToggle,
|
|
14933
|
+
role: "switch",
|
|
14934
|
+
"aria-checked": state.checked,
|
|
14935
|
+
"aria-disabled": disabled,
|
|
14936
|
+
"aria-label": title,
|
|
14937
|
+
tabIndex: 0,
|
|
14938
|
+
onKeyDown: (event) => {
|
|
14939
|
+
if ((event.key === " " || event.key === "Enter") && !disabled) {
|
|
14940
|
+
event.preventDefault();
|
|
14941
|
+
onToggle(!state.checked);
|
|
14942
|
+
}
|
|
14943
|
+
}
|
|
14944
|
+
}
|
|
14945
|
+
) })
|
|
14946
|
+
] })
|
|
14947
|
+
] });
|
|
14948
|
+
}
|
|
14949
|
+
function MemberList({ members }) {
|
|
14950
|
+
return /* @__PURE__ */ jsx34(
|
|
14951
|
+
"ul",
|
|
14952
|
+
{
|
|
14953
|
+
"aria-label": "Not signed in with SSO yet",
|
|
14954
|
+
className: "flex flex-col w-full",
|
|
14955
|
+
style: { maxHeight: 240, overflowY: "auto", border: `1px solid ${T15.borderSubtle}`, borderRadius: T15.rXl },
|
|
14956
|
+
children: members.map((m) => /* @__PURE__ */ jsxs31(
|
|
14957
|
+
"li",
|
|
14958
|
+
{
|
|
14959
|
+
className: "flex items-center w-full",
|
|
14960
|
+
style: { gap: T15.spMd, padding: `${T15.spMd} ${T15.spXl}`, borderBottom: `1px solid ${T15.borderSubtle}` },
|
|
14961
|
+
children: [
|
|
14962
|
+
/* @__PURE__ */ jsx34("span", { className: "flex-1 min-w-0 truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: m.name || m.email }),
|
|
14963
|
+
/* @__PURE__ */ jsx34("span", { className: "flex-1 min-w-0 truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: m.email }),
|
|
14964
|
+
/* @__PURE__ */ jsx34("span", { className: "shrink-0", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted, textTransform: "capitalize" }, children: m.role })
|
|
14965
|
+
]
|
|
14966
|
+
},
|
|
14967
|
+
m.userId
|
|
14968
|
+
))
|
|
14969
|
+
}
|
|
14970
|
+
);
|
|
14971
|
+
}
|
|
14972
|
+
var card = {
|
|
14973
|
+
gap: T15.spXl,
|
|
14974
|
+
padding: T15.sp3xl,
|
|
14975
|
+
backgroundColor: T15.surfaceBase,
|
|
14976
|
+
border: `1px solid ${T15.borderSubtle}`,
|
|
14977
|
+
borderRadius: T15.r3xl
|
|
14978
|
+
};
|
|
14979
|
+
function OrganizationLoginMethodsContent() {
|
|
14980
|
+
const { loginMethods, organization, toast } = useSettingsAdapters();
|
|
14981
|
+
const current = organization.current;
|
|
14982
|
+
const orgId = current?.id ?? null;
|
|
14983
|
+
const canLoad = !!loginMethods && !!orgId && current?.role === "admin";
|
|
14984
|
+
const data = useLoad(
|
|
14985
|
+
canLoad ? orgId : null,
|
|
14986
|
+
(signal) => loginMethods.get(orgId, signal),
|
|
14987
|
+
"Couldn't load this organization's login methods."
|
|
14988
|
+
);
|
|
14989
|
+
const [saving, setSaving] = useState25(false);
|
|
14990
|
+
const [confirmEmailOff, setConfirmEmailOff] = useState25(false);
|
|
14991
|
+
if (!canLoad) {
|
|
14992
|
+
return /* @__PURE__ */ jsx34("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ jsx34(Muted, { children: !loginMethods ? "Login methods aren't available here yet." : "Login methods are managed by organization admins." }) });
|
|
14993
|
+
}
|
|
14994
|
+
const value = data.value;
|
|
14995
|
+
const state = value ? loginMethodsSwitchState(value) : null;
|
|
14996
|
+
const ssoName = value?.connection?.displayName ?? "company";
|
|
14997
|
+
const domains = domainsLabel(value?.coveredDomains ?? []);
|
|
14998
|
+
const notYet = value?.readiness?.notYet ?? [];
|
|
14999
|
+
async function save(next) {
|
|
15000
|
+
if (saving || !value) return;
|
|
15001
|
+
setSaving(true);
|
|
15002
|
+
try {
|
|
15003
|
+
const result = await loginMethods.update(orgId, next);
|
|
15004
|
+
data.setValue(result);
|
|
15005
|
+
toast.success("Login methods updated. Changes apply within a minute.");
|
|
15006
|
+
setConfirmEmailOff(false);
|
|
15007
|
+
} catch (cause) {
|
|
15008
|
+
toast.error(errorMessage(cause, { method: "PUT" }));
|
|
15009
|
+
} finally {
|
|
15010
|
+
setSaving(false);
|
|
15011
|
+
}
|
|
15012
|
+
}
|
|
15013
|
+
async function copyEmails() {
|
|
15014
|
+
try {
|
|
15015
|
+
await navigator.clipboard.writeText(notYet.map((m) => m.email).join("\n"));
|
|
15016
|
+
toast.success(`Copied ${notYet.length} email ${notYet.length === 1 ? "address" : "addresses"}`);
|
|
15017
|
+
} catch {
|
|
15018
|
+
toast.error("Couldn't copy to the clipboard.");
|
|
15019
|
+
}
|
|
15020
|
+
}
|
|
15021
|
+
function downloadCsv() {
|
|
15022
|
+
const blob = new Blob([memberCsv(notYet)], { type: "text/csv;charset=utf-8;" });
|
|
15023
|
+
const url = URL.createObjectURL(blob);
|
|
15024
|
+
const link = document.createElement("a");
|
|
15025
|
+
link.href = url;
|
|
15026
|
+
link.download = `not-signed-in-with-sso-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`;
|
|
15027
|
+
link.click();
|
|
15028
|
+
URL.revokeObjectURL(url);
|
|
15029
|
+
}
|
|
15030
|
+
return /* @__PURE__ */ jsxs31(
|
|
15031
|
+
"div",
|
|
15032
|
+
{
|
|
15033
|
+
className: "flex flex-col flex-1 min-w-0 min-h-0 h-full overflow-y-auto",
|
|
15034
|
+
style: { gap: T15.sp3xl, paddingBottom: T15.sp6xl },
|
|
15035
|
+
children: [
|
|
15036
|
+
/* @__PURE__ */ jsx34(ScopeHeader, { kind: "organization", name: current?.name, imageUrl: current?.imageUrl, role: current?.role }),
|
|
15037
|
+
data.error && /* @__PURE__ */ jsx34(LoadError, { message: data.error, onRetry: data.retry }),
|
|
15038
|
+
!value && !data.error && /* @__PURE__ */ jsx34(Spinner, {}),
|
|
15039
|
+
value && state && /* @__PURE__ */ jsxs31(Fragment15, { children: [
|
|
15040
|
+
value.failOpen && /* @__PURE__ */ jsxs31("div", { role: "alert", className: "flex flex-col w-full", style: { ...card, gap: T15.spXs }, children: [
|
|
15041
|
+
/* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, fontWeight: 600, lineHeight: T15.lhSm, color: T15.primary }, children: "Company SSO isn't working right now, so email codes still work." }),
|
|
15042
|
+
/* @__PURE__ */ jsx34(Muted, { children: "Your organization is set to company SSO only. Contact Streamoid to fix the SSO connection." })
|
|
15043
|
+
] }),
|
|
15044
|
+
/* @__PURE__ */ jsxs31("section", { "aria-label": "Login methods", className: "flex flex-col w-full shrink-0", style: card, children: [
|
|
15045
|
+
/* @__PURE__ */ jsx34(
|
|
15046
|
+
SwitchRow,
|
|
15047
|
+
{
|
|
15048
|
+
title: "Email code",
|
|
15049
|
+
description: `Anyone with an ${domains} address gets a one-time code by email. Google and Microsoft sign-in follow this switch.`,
|
|
15050
|
+
state: state.emailCode,
|
|
15051
|
+
busy: saving,
|
|
15052
|
+
onToggle: (next) => next ? save({ emailCode: true, sso: value.sso }) : setConfirmEmailOff(true)
|
|
15053
|
+
}
|
|
15054
|
+
),
|
|
15055
|
+
/* @__PURE__ */ jsx34("div", { style: { borderTop: `1px solid ${T15.borderSubtle}` } }),
|
|
15056
|
+
/* @__PURE__ */ jsx34(
|
|
15057
|
+
SwitchRow,
|
|
15058
|
+
{
|
|
15059
|
+
title: "Company SSO",
|
|
15060
|
+
description: `People your IT team has given access sign in through ${ssoName} SSO.`,
|
|
15061
|
+
state: state.sso,
|
|
15062
|
+
busy: saving,
|
|
15063
|
+
onToggle: (next) => save({ emailCode: value.emailCode, sso: next })
|
|
15064
|
+
}
|
|
15065
|
+
)
|
|
15066
|
+
] }),
|
|
15067
|
+
value.readiness && /* @__PURE__ */ jsxs31("section", { "aria-label": "SSO readiness", className: "flex flex-col w-full shrink-0", style: card, children: [
|
|
15068
|
+
/* @__PURE__ */ jsxs31("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: [
|
|
15069
|
+
value.readiness.signedInWithSso,
|
|
15070
|
+
" of ",
|
|
15071
|
+
value.readiness.affectedTotal,
|
|
15072
|
+
" ",
|
|
15073
|
+
value.readiness.affectedTotal === 1 ? "person" : "people",
|
|
15074
|
+
" at ",
|
|
15075
|
+
domains,
|
|
15076
|
+
" have signed in with SSO.",
|
|
15077
|
+
notYet.length > 0 ? ` ${notYet.length} haven't yet.` : ""
|
|
15078
|
+
] }),
|
|
15079
|
+
notYet.length > 0 ? /* @__PURE__ */ jsxs31(Fragment15, { children: [
|
|
15080
|
+
/* @__PURE__ */ jsxs31(Muted, { children: [
|
|
15081
|
+
"Send this list to your IT team to give them access to ",
|
|
15082
|
+
ssoName,
|
|
15083
|
+
" SSO. When it's empty, it's safe to turn email codes off."
|
|
15084
|
+
] }),
|
|
15085
|
+
/* @__PURE__ */ jsx34(MemberList, { members: notYet }),
|
|
15086
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center", style: { gap: T15.spMd }, children: [
|
|
15087
|
+
/* @__PURE__ */ jsx34(ScButton18, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }),
|
|
15088
|
+
/* @__PURE__ */ jsx34(ScButton18, { text: "Download CSV", variant: "outline", size: "sm", onClick: downloadCsv })
|
|
15089
|
+
] })
|
|
15090
|
+
] }) : /* @__PURE__ */ jsx34(Muted, { children: "Everyone has signed in with SSO at least once." }),
|
|
15091
|
+
value.readiness.notAffected > 0 && /* @__PURE__ */ jsxs31(Muted, { children: [
|
|
15092
|
+
value.readiness.notAffected,
|
|
15093
|
+
" ",
|
|
15094
|
+
value.readiness.notAffected === 1 ? "member uses" : "members use",
|
|
15095
|
+
" an address on another domain and ",
|
|
15096
|
+
value.readiness.notAffected === 1 ? "isn't" : "aren't",
|
|
15097
|
+
" affected by these switches."
|
|
15098
|
+
] })
|
|
15099
|
+
] }),
|
|
15100
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
|
|
15101
|
+
/* @__PURE__ */ jsxs31(Muted, { children: [
|
|
15102
|
+
"Changes apply within a minute. ",
|
|
15103
|
+
SESSION_NOTE
|
|
15104
|
+
] }),
|
|
15105
|
+
/* @__PURE__ */ jsx34(Muted, { children: value.source === "org" && value.updatedAt ? `Last changed${value.updatedBy?.email ? ` by ${value.updatedBy.email}` : ""} on ${formatDate2(value.updatedAt)}.` : "Using Streamoid's default for your organization. Nobody has changed it yet." })
|
|
15106
|
+
] }),
|
|
15107
|
+
confirmEmailOff && /* @__PURE__ */ jsx34(
|
|
15108
|
+
ConfirmActionModal,
|
|
15109
|
+
{
|
|
15110
|
+
title: "Turn off email codes?",
|
|
15111
|
+
body: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T15.spMd }, children: [
|
|
15112
|
+
notYet.length > 0 ? /* @__PURE__ */ jsxs31(Fragment15, { children: [
|
|
15113
|
+
/* @__PURE__ */ jsxs31("span", { children: [
|
|
15114
|
+
"These ",
|
|
15115
|
+
notYet.length,
|
|
15116
|
+
" ",
|
|
15117
|
+
notYet.length === 1 ? "person has" : "people have",
|
|
15118
|
+
" never signed in with",
|
|
15119
|
+
" ",
|
|
15120
|
+
ssoName,
|
|
15121
|
+
" SSO and will be locked out until IT gives them access:"
|
|
15122
|
+
] }),
|
|
15123
|
+
/* @__PURE__ */ jsx34(MemberList, { members: notYet }),
|
|
15124
|
+
/* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ScButton18, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }) })
|
|
15125
|
+
] }) : /* @__PURE__ */ jsxs31("span", { children: [
|
|
15126
|
+
"Everyone at ",
|
|
15127
|
+
domains,
|
|
15128
|
+
" will have to sign in with ",
|
|
15129
|
+
ssoName,
|
|
15130
|
+
" SSO. Google and Microsoft sign-in turn off too."
|
|
15131
|
+
] }),
|
|
15132
|
+
/* @__PURE__ */ jsx34("span", { children: SESSION_NOTE })
|
|
15133
|
+
] }),
|
|
15134
|
+
confirmText: "Turn off email codes",
|
|
15135
|
+
busyText: "Turning off\u2026",
|
|
15136
|
+
onClose: () => setConfirmEmailOff(false),
|
|
15137
|
+
onConfirm: () => save({ emailCode: false, sso: value.sso })
|
|
15138
|
+
}
|
|
15139
|
+
)
|
|
15140
|
+
] })
|
|
15141
|
+
]
|
|
15142
|
+
}
|
|
15143
|
+
);
|
|
15144
|
+
}
|
|
15145
|
+
|
|
14877
15146
|
// src/settings-content.tsx
|
|
14878
|
-
import { Fragment as
|
|
15147
|
+
import { Fragment as Fragment17, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
14879
15148
|
function deriveInitials(name) {
|
|
14880
15149
|
return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
14881
15150
|
}
|
|
@@ -14911,7 +15180,7 @@ function SettingsNavItem({
|
|
|
14911
15180
|
onTabChange
|
|
14912
15181
|
}) {
|
|
14913
15182
|
const isActive = activeTab === tab;
|
|
14914
|
-
return /* @__PURE__ */
|
|
15183
|
+
return /* @__PURE__ */ jsx35(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
14915
15184
|
ScSidebarMenu,
|
|
14916
15185
|
{
|
|
14917
15186
|
icon: icon(isActive ? PRIMARY_COLOR3 : MUTED_COLOR2),
|
|
@@ -14941,9 +15210,10 @@ function SettingsNav({
|
|
|
14941
15210
|
isWorkspaceAdmin,
|
|
14942
15211
|
showConnectedApps = false,
|
|
14943
15212
|
showIntegrations = false,
|
|
15213
|
+
showLoginMethods = false,
|
|
14944
15214
|
showReferral = false
|
|
14945
15215
|
}) {
|
|
14946
|
-
const item = (tab, icon) => /* @__PURE__ */
|
|
15216
|
+
const item = (tab, icon) => /* @__PURE__ */ jsx35(
|
|
14947
15217
|
SettingsNavItem,
|
|
14948
15218
|
{
|
|
14949
15219
|
tab,
|
|
@@ -14953,7 +15223,7 @@ function SettingsNav({
|
|
|
14953
15223
|
onTabChange
|
|
14954
15224
|
}
|
|
14955
15225
|
);
|
|
14956
|
-
return /* @__PURE__ */
|
|
15226
|
+
return /* @__PURE__ */ jsxs32(
|
|
14957
15227
|
"div",
|
|
14958
15228
|
{
|
|
14959
15229
|
className: "flex flex-col items-start shrink-0 relative overflow-y-auto",
|
|
@@ -14976,43 +15246,44 @@ function SettingsNav({
|
|
|
14976
15246
|
gap: "var(--spacing-5xl)"
|
|
14977
15247
|
},
|
|
14978
15248
|
children: [
|
|
14979
|
-
/* @__PURE__ */
|
|
14980
|
-
/* @__PURE__ */
|
|
14981
|
-
item("profile", (color) => /* @__PURE__ */
|
|
14982
|
-
item("workspaceList", (color) => /* @__PURE__ */
|
|
14983
|
-
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */
|
|
14984
|
-
showReferral && item("referral", (color) => /* @__PURE__ */
|
|
15249
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15250
|
+
/* @__PURE__ */ jsx35("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
|
|
15251
|
+
item("profile", (color) => /* @__PURE__ */ jsx35(SiconUser, { className: "w-5 h-5", color })),
|
|
15252
|
+
item("workspaceList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color })),
|
|
15253
|
+
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ jsx35(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15254
|
+
showReferral && item("referral", (color) => /* @__PURE__ */ jsx35(SiconReferral, { className: "w-5 h-5", color }))
|
|
14985
15255
|
] }),
|
|
14986
|
-
/* @__PURE__ */
|
|
14987
|
-
/* @__PURE__ */
|
|
14988
|
-
/* @__PURE__ */
|
|
14989
|
-
item("workspace", (color) => /* @__PURE__ */
|
|
14990
|
-
item("workspaceMembers", (color) => /* @__PURE__ */
|
|
14991
|
-
isWorkspaceAdmin && /* @__PURE__ */
|
|
14992
|
-
item("billing", (color) => /* @__PURE__ */
|
|
14993
|
-
item("apikey", (color) => /* @__PURE__ */
|
|
15256
|
+
/* @__PURE__ */ jsx35(ScHDivider, {}),
|
|
15257
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15258
|
+
/* @__PURE__ */ jsx35("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
|
|
15259
|
+
item("workspace", (color) => /* @__PURE__ */ jsx35(SiconSettings2, { className: "w-5 h-5", color })),
|
|
15260
|
+
item("workspaceMembers", (color) => /* @__PURE__ */ jsx35(SiconTeam, { className: "w-5 h-5", color })),
|
|
15261
|
+
isWorkspaceAdmin && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
15262
|
+
item("billing", (color) => /* @__PURE__ */ jsx35(SiconBilling, { className: "w-5 h-5", color })),
|
|
15263
|
+
item("apikey", (color) => /* @__PURE__ */ jsx35(SiconKey_default, { className: "w-5 h-5", color }))
|
|
14994
15264
|
] }),
|
|
14995
|
-
!isWorkspaceAdmin && /* @__PURE__ */
|
|
15265
|
+
!isWorkspaceAdmin && /* @__PURE__ */ jsx35("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
|
|
14996
15266
|
] }),
|
|
14997
|
-
/* @__PURE__ */
|
|
14998
|
-
/* @__PURE__ */
|
|
14999
|
-
/* @__PURE__ */
|
|
15000
|
-
item("organizationList", (color) => /* @__PURE__ */
|
|
15001
|
-
item("organization", (color) => /* @__PURE__ */
|
|
15002
|
-
item("organizationWorkspaces", (color) => /* @__PURE__ */
|
|
15003
|
-
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */
|
|
15004
|
-
|
|
15005
|
-
|
|
15267
|
+
/* @__PURE__ */ jsx35(ScHDivider, {}),
|
|
15268
|
+
/* @__PURE__ */ jsx35("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
15269
|
+
/* @__PURE__ */ jsx35("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
|
|
15270
|
+
item("organizationList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color })),
|
|
15271
|
+
item("organization", (color) => /* @__PURE__ */ jsx35(SiconTeam, { className: "w-5 h-5", color })),
|
|
15272
|
+
item("organizationWorkspaces", (color) => /* @__PURE__ */ jsx35(SiconWorkspace2, { className: "w-5 h-5", color })),
|
|
15273
|
+
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ jsx35(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15274
|
+
showLoginMethods && item("organizationLoginMethods", (color) => /* @__PURE__ */ jsx35(SiconLock, { className: "w-5 h-5", color }))
|
|
15275
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
15276
|
+
/* @__PURE__ */ jsx35(
|
|
15006
15277
|
SettingsNavItem,
|
|
15007
15278
|
{
|
|
15008
15279
|
tab: "organization",
|
|
15009
15280
|
label: "Organization",
|
|
15010
|
-
icon: (color) => /* @__PURE__ */
|
|
15281
|
+
icon: (color) => /* @__PURE__ */ jsx35(SiconGlobe3, { className: "w-5 h-5", color }),
|
|
15011
15282
|
activeTab,
|
|
15012
15283
|
onTabChange
|
|
15013
15284
|
}
|
|
15014
15285
|
),
|
|
15015
|
-
item("organizationList", (color) => /* @__PURE__ */
|
|
15286
|
+
item("organizationList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color }))
|
|
15016
15287
|
] }) })
|
|
15017
15288
|
]
|
|
15018
15289
|
}
|
|
@@ -15021,7 +15292,7 @@ function SettingsNav({
|
|
|
15021
15292
|
var SPECIALIZATION_ICON_SIZE = 24;
|
|
15022
15293
|
function SpecializationIcon({ iconUrl }) {
|
|
15023
15294
|
if (iconUrl) {
|
|
15024
|
-
return /* @__PURE__ */
|
|
15295
|
+
return /* @__PURE__ */ jsx35(
|
|
15025
15296
|
"img",
|
|
15026
15297
|
{
|
|
15027
15298
|
src: iconUrl,
|
|
@@ -15034,7 +15305,7 @@ function SpecializationIcon({ iconUrl }) {
|
|
|
15034
15305
|
}
|
|
15035
15306
|
);
|
|
15036
15307
|
}
|
|
15037
|
-
return /* @__PURE__ */
|
|
15308
|
+
return /* @__PURE__ */ jsx35(
|
|
15038
15309
|
SiconBolt,
|
|
15039
15310
|
{
|
|
15040
15311
|
style: {
|
|
@@ -15066,9 +15337,9 @@ function SpecializationDropdown({
|
|
|
15066
15337
|
disabled
|
|
15067
15338
|
}) {
|
|
15068
15339
|
const { auth } = useSettingsAdapters();
|
|
15069
|
-
const [open, setOpen] =
|
|
15340
|
+
const [open, setOpen] = useState26(false);
|
|
15070
15341
|
const containerRef = useRef12(null);
|
|
15071
|
-
const [options, setOptions] =
|
|
15342
|
+
const [options, setOptions] = useState26([]);
|
|
15072
15343
|
useEffect20(() => {
|
|
15073
15344
|
if (!auth.getSpecializations) return;
|
|
15074
15345
|
let cancelled = false;
|
|
@@ -15107,15 +15378,15 @@ function SpecializationDropdown({
|
|
|
15107
15378
|
};
|
|
15108
15379
|
}, [open]);
|
|
15109
15380
|
const selected = options.find((o) => o.id === value);
|
|
15110
|
-
return /* @__PURE__ */
|
|
15381
|
+
return /* @__PURE__ */ jsxs32(
|
|
15111
15382
|
"div",
|
|
15112
15383
|
{
|
|
15113
15384
|
ref: containerRef,
|
|
15114
15385
|
className: "w-full",
|
|
15115
15386
|
style: { position: "relative" },
|
|
15116
15387
|
children: [
|
|
15117
|
-
/* @__PURE__ */
|
|
15118
|
-
/* @__PURE__ */
|
|
15388
|
+
/* @__PURE__ */ jsx35("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15389
|
+
/* @__PURE__ */ jsx35(
|
|
15119
15390
|
"div",
|
|
15120
15391
|
{
|
|
15121
15392
|
className: "spec-dropdown-trigger",
|
|
@@ -15123,7 +15394,7 @@ function SpecializationDropdown({
|
|
|
15123
15394
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15124
15395
|
"aria-haspopup": "listbox",
|
|
15125
15396
|
"aria-expanded": open,
|
|
15126
|
-
children: /* @__PURE__ */
|
|
15397
|
+
children: /* @__PURE__ */ jsx35(
|
|
15127
15398
|
ScTextField,
|
|
15128
15399
|
{
|
|
15129
15400
|
label: "Specialization",
|
|
@@ -15131,8 +15402,8 @@ function SpecializationDropdown({
|
|
|
15131
15402
|
value: selected?.label ?? "",
|
|
15132
15403
|
placeholderFilled: "Select specialization",
|
|
15133
15404
|
tfGroup: "icon-left-right",
|
|
15134
|
-
tfLeftIcon: /* @__PURE__ */
|
|
15135
|
-
tfRightIcon: /* @__PURE__ */
|
|
15405
|
+
tfLeftIcon: /* @__PURE__ */ jsx35(SpecializationIcon, { iconUrl: selected?.iconUrl }),
|
|
15406
|
+
tfRightIcon: /* @__PURE__ */ jsx35(
|
|
15136
15407
|
"span",
|
|
15137
15408
|
{
|
|
15138
15409
|
style: {
|
|
@@ -15142,7 +15413,7 @@ function SpecializationDropdown({
|
|
|
15142
15413
|
transform: open ? "rotate(180deg)" : "none",
|
|
15143
15414
|
transition: "transform 120ms ease-out"
|
|
15144
15415
|
},
|
|
15145
|
-
children: /* @__PURE__ */
|
|
15416
|
+
children: /* @__PURE__ */ jsx35(SiconDown2, {})
|
|
15146
15417
|
}
|
|
15147
15418
|
),
|
|
15148
15419
|
className: "sc-text-field-full-width",
|
|
@@ -15153,7 +15424,7 @@ function SpecializationDropdown({
|
|
|
15153
15424
|
)
|
|
15154
15425
|
}
|
|
15155
15426
|
),
|
|
15156
|
-
open && /* @__PURE__ */
|
|
15427
|
+
open && /* @__PURE__ */ jsx35(
|
|
15157
15428
|
"div",
|
|
15158
15429
|
{
|
|
15159
15430
|
role: "listbox",
|
|
@@ -15175,11 +15446,11 @@ function SpecializationDropdown({
|
|
|
15175
15446
|
},
|
|
15176
15447
|
children: options.map((opt) => {
|
|
15177
15448
|
const isActive = opt.id === value;
|
|
15178
|
-
return /* @__PURE__ */
|
|
15449
|
+
return /* @__PURE__ */ jsx35(
|
|
15179
15450
|
ScMenuOptions,
|
|
15180
15451
|
{
|
|
15181
15452
|
text: opt.label,
|
|
15182
|
-
icon: /* @__PURE__ */
|
|
15453
|
+
icon: /* @__PURE__ */ jsx35(SpecializationIcon, { iconUrl: opt.iconUrl }),
|
|
15183
15454
|
hover: isActive ? "true" : "false",
|
|
15184
15455
|
variant: "default",
|
|
15185
15456
|
role: "option",
|
|
@@ -15204,7 +15475,7 @@ function LanguageDropdown({
|
|
|
15204
15475
|
onChange,
|
|
15205
15476
|
disabled
|
|
15206
15477
|
}) {
|
|
15207
|
-
const [open, setOpen] =
|
|
15478
|
+
const [open, setOpen] = useState26(false);
|
|
15208
15479
|
const containerRef = useRef12(null);
|
|
15209
15480
|
useEffect20(() => {
|
|
15210
15481
|
if (!open) return;
|
|
@@ -15223,15 +15494,15 @@ function LanguageDropdown({
|
|
|
15223
15494
|
document.removeEventListener("keydown", handleKeyDown);
|
|
15224
15495
|
};
|
|
15225
15496
|
}, [open]);
|
|
15226
|
-
return /* @__PURE__ */
|
|
15497
|
+
return /* @__PURE__ */ jsxs32(
|
|
15227
15498
|
"div",
|
|
15228
15499
|
{
|
|
15229
15500
|
ref: containerRef,
|
|
15230
15501
|
className: "w-full",
|
|
15231
15502
|
style: { position: "relative" },
|
|
15232
15503
|
children: [
|
|
15233
|
-
/* @__PURE__ */
|
|
15234
|
-
/* @__PURE__ */
|
|
15504
|
+
/* @__PURE__ */ jsx35("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15505
|
+
/* @__PURE__ */ jsx35(
|
|
15235
15506
|
"div",
|
|
15236
15507
|
{
|
|
15237
15508
|
className: "spec-dropdown-trigger",
|
|
@@ -15239,7 +15510,7 @@ function LanguageDropdown({
|
|
|
15239
15510
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15240
15511
|
"aria-haspopup": "listbox",
|
|
15241
15512
|
"aria-expanded": open,
|
|
15242
|
-
children: /* @__PURE__ */
|
|
15513
|
+
children: /* @__PURE__ */ jsx35(
|
|
15243
15514
|
ScTextField,
|
|
15244
15515
|
{
|
|
15245
15516
|
label: "Language",
|
|
@@ -15247,7 +15518,7 @@ function LanguageDropdown({
|
|
|
15247
15518
|
value: userLanguageLabel(value),
|
|
15248
15519
|
placeholderFilled: "Select language",
|
|
15249
15520
|
tfGroup: "icon-right",
|
|
15250
|
-
tfRightIcon: /* @__PURE__ */
|
|
15521
|
+
tfRightIcon: /* @__PURE__ */ jsx35(
|
|
15251
15522
|
"span",
|
|
15252
15523
|
{
|
|
15253
15524
|
style: {
|
|
@@ -15257,7 +15528,7 @@ function LanguageDropdown({
|
|
|
15257
15528
|
transform: open ? "rotate(180deg)" : "none",
|
|
15258
15529
|
transition: "transform 120ms ease-out"
|
|
15259
15530
|
},
|
|
15260
|
-
children: /* @__PURE__ */
|
|
15531
|
+
children: /* @__PURE__ */ jsx35(SiconDown2, {})
|
|
15261
15532
|
}
|
|
15262
15533
|
),
|
|
15263
15534
|
className: "sc-text-field-full-width",
|
|
@@ -15268,7 +15539,7 @@ function LanguageDropdown({
|
|
|
15268
15539
|
)
|
|
15269
15540
|
}
|
|
15270
15541
|
),
|
|
15271
|
-
open && /* @__PURE__ */
|
|
15542
|
+
open && /* @__PURE__ */ jsx35(
|
|
15272
15543
|
"div",
|
|
15273
15544
|
{
|
|
15274
15545
|
role: "listbox",
|
|
@@ -15294,11 +15565,11 @@ function LanguageDropdown({
|
|
|
15294
15565
|
},
|
|
15295
15566
|
children: USER_LANGUAGES.map((lang) => {
|
|
15296
15567
|
const isActive = lang.code === value;
|
|
15297
|
-
return /* @__PURE__ */
|
|
15568
|
+
return /* @__PURE__ */ jsx35(
|
|
15298
15569
|
ScMenuOptions,
|
|
15299
15570
|
{
|
|
15300
15571
|
text: lang.label,
|
|
15301
|
-
icon: /* @__PURE__ */
|
|
15572
|
+
icon: /* @__PURE__ */ jsx35(Fragment17, {}),
|
|
15302
15573
|
hover: isActive ? "true" : "false",
|
|
15303
15574
|
variant: "default",
|
|
15304
15575
|
role: "option",
|
|
@@ -15324,12 +15595,12 @@ function ProfileTab() {
|
|
|
15324
15595
|
const derivedName = user?.name ?? "";
|
|
15325
15596
|
const derivedSpec = user?.userSpecialization ?? "";
|
|
15326
15597
|
const derivedLanguage = user?.language?.trim() || DEFAULT_USER_LANGUAGE;
|
|
15327
|
-
const [fullName, setFullName] =
|
|
15328
|
-
const [selectedSpec, setSelectedSpec] =
|
|
15329
|
-
const [selectedLanguage, setSelectedLanguage] =
|
|
15330
|
-
const [saving, setSaving] =
|
|
15331
|
-
const [imageSaving, setImageSaving] =
|
|
15332
|
-
const [imagePreview, setImagePreview] =
|
|
15598
|
+
const [fullName, setFullName] = useState26(derivedName);
|
|
15599
|
+
const [selectedSpec, setSelectedSpec] = useState26(derivedSpec);
|
|
15600
|
+
const [selectedLanguage, setSelectedLanguage] = useState26(derivedLanguage);
|
|
15601
|
+
const [saving, setSaving] = useState26(false);
|
|
15602
|
+
const [imageSaving, setImageSaving] = useState26(false);
|
|
15603
|
+
const [imagePreview, setImagePreview] = useState26(
|
|
15333
15604
|
void 0
|
|
15334
15605
|
);
|
|
15335
15606
|
const fileInputRef = useRef12(null);
|
|
@@ -15427,13 +15698,13 @@ function ProfileTab() {
|
|
|
15427
15698
|
}
|
|
15428
15699
|
auth.clearAuth();
|
|
15429
15700
|
};
|
|
15430
|
-
return /* @__PURE__ */
|
|
15701
|
+
return /* @__PURE__ */ jsxs32(
|
|
15431
15702
|
"div",
|
|
15432
15703
|
{
|
|
15433
15704
|
className: "flex flex-col items-start flex-1 min-w-0 min-h-0 overflow-y-auto",
|
|
15434
15705
|
style: { gap: "var(--spacing-3xl)" },
|
|
15435
15706
|
children: [
|
|
15436
|
-
/* @__PURE__ */
|
|
15707
|
+
/* @__PURE__ */ jsxs32(
|
|
15437
15708
|
"div",
|
|
15438
15709
|
{
|
|
15439
15710
|
className: "sc-profile-card flex flex-col items-start w-full",
|
|
@@ -15446,13 +15717,13 @@ function ProfileTab() {
|
|
|
15446
15717
|
gap: "var(--spacing-6xl)"
|
|
15447
15718
|
},
|
|
15448
15719
|
children: [
|
|
15449
|
-
/* @__PURE__ */
|
|
15720
|
+
/* @__PURE__ */ jsxs32(
|
|
15450
15721
|
"div",
|
|
15451
15722
|
{
|
|
15452
15723
|
className: "flex items-center shrink-0 w-full",
|
|
15453
15724
|
style: { gap: 24, flexWrap: "wrap" },
|
|
15454
15725
|
children: [
|
|
15455
|
-
profileImage ? /* @__PURE__ */
|
|
15726
|
+
profileImage ? /* @__PURE__ */ jsx35(
|
|
15456
15727
|
"img",
|
|
15457
15728
|
{
|
|
15458
15729
|
src: profileImage,
|
|
@@ -15465,7 +15736,7 @@ function ProfileTab() {
|
|
|
15465
15736
|
flexShrink: 0
|
|
15466
15737
|
}
|
|
15467
15738
|
}
|
|
15468
|
-
) : /* @__PURE__ */
|
|
15739
|
+
) : /* @__PURE__ */ jsx35(
|
|
15469
15740
|
"div",
|
|
15470
15741
|
{
|
|
15471
15742
|
"aria-label": "Profile",
|
|
@@ -15478,7 +15749,7 @@ function ProfileTab() {
|
|
|
15478
15749
|
border: "1px solid var(--alias-border-subtle)",
|
|
15479
15750
|
flexShrink: 0
|
|
15480
15751
|
},
|
|
15481
|
-
children: /* @__PURE__ */
|
|
15752
|
+
children: /* @__PURE__ */ jsx35(
|
|
15482
15753
|
"span",
|
|
15483
15754
|
{
|
|
15484
15755
|
style: {
|
|
@@ -15493,7 +15764,7 @@ function ProfileTab() {
|
|
|
15493
15764
|
)
|
|
15494
15765
|
}
|
|
15495
15766
|
),
|
|
15496
|
-
/* @__PURE__ */
|
|
15767
|
+
/* @__PURE__ */ jsx35(
|
|
15497
15768
|
"input",
|
|
15498
15769
|
{
|
|
15499
15770
|
ref: fileInputRef,
|
|
@@ -15503,17 +15774,17 @@ function ProfileTab() {
|
|
|
15503
15774
|
onChange: handleImageChange
|
|
15504
15775
|
}
|
|
15505
15776
|
),
|
|
15506
|
-
/* @__PURE__ */
|
|
15777
|
+
/* @__PURE__ */ jsxs32(
|
|
15507
15778
|
"div",
|
|
15508
15779
|
{
|
|
15509
15780
|
className: "flex items-center",
|
|
15510
15781
|
style: { gap: 12, flexWrap: "wrap" },
|
|
15511
15782
|
children: [
|
|
15512
|
-
/* @__PURE__ */
|
|
15513
|
-
|
|
15783
|
+
/* @__PURE__ */ jsx35(
|
|
15784
|
+
ScButton19,
|
|
15514
15785
|
{
|
|
15515
15786
|
text: "Upload photo",
|
|
15516
|
-
icon: /* @__PURE__ */
|
|
15787
|
+
icon: /* @__PURE__ */ jsx35(SiconUpload2, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
15517
15788
|
styleVariant: "icon-left",
|
|
15518
15789
|
variant: "outline",
|
|
15519
15790
|
size: "md",
|
|
@@ -15521,11 +15792,11 @@ function ProfileTab() {
|
|
|
15521
15792
|
onClick: handleUploadClick
|
|
15522
15793
|
}
|
|
15523
15794
|
),
|
|
15524
|
-
/* @__PURE__ */
|
|
15525
|
-
|
|
15795
|
+
/* @__PURE__ */ jsx35(
|
|
15796
|
+
ScButton19,
|
|
15526
15797
|
{
|
|
15527
15798
|
text: "Remove photo",
|
|
15528
|
-
icon: /* @__PURE__ */
|
|
15799
|
+
icon: /* @__PURE__ */ jsx35(
|
|
15529
15800
|
SiconDelete,
|
|
15530
15801
|
{
|
|
15531
15802
|
className: "w-5 h-5",
|
|
@@ -15545,15 +15816,15 @@ function ProfileTab() {
|
|
|
15545
15816
|
]
|
|
15546
15817
|
}
|
|
15547
15818
|
),
|
|
15548
|
-
/* @__PURE__ */
|
|
15549
|
-
/* @__PURE__ */
|
|
15819
|
+
/* @__PURE__ */ jsx35(ScHDivider, {}),
|
|
15820
|
+
/* @__PURE__ */ jsxs32(
|
|
15550
15821
|
"div",
|
|
15551
15822
|
{
|
|
15552
15823
|
className: "sc-profile-fields flex flex-col min-w-0 w-full",
|
|
15553
15824
|
style: { gap: 24 },
|
|
15554
15825
|
children: [
|
|
15555
|
-
/* @__PURE__ */
|
|
15556
|
-
/* @__PURE__ */
|
|
15826
|
+
/* @__PURE__ */ jsxs32("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
|
|
15827
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx35(
|
|
15557
15828
|
ScTextField,
|
|
15558
15829
|
{
|
|
15559
15830
|
label: "Full Name",
|
|
@@ -15567,7 +15838,7 @@ function ProfileTab() {
|
|
|
15567
15838
|
onChange: (e) => setFullName(e.target.value)
|
|
15568
15839
|
}
|
|
15569
15840
|
) }),
|
|
15570
|
-
/* @__PURE__ */
|
|
15841
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx35(
|
|
15571
15842
|
SpecializationDropdown,
|
|
15572
15843
|
{
|
|
15573
15844
|
value: selectedSpec,
|
|
@@ -15576,8 +15847,8 @@ function ProfileTab() {
|
|
|
15576
15847
|
}
|
|
15577
15848
|
) })
|
|
15578
15849
|
] }),
|
|
15579
|
-
/* @__PURE__ */
|
|
15580
|
-
/* @__PURE__ */
|
|
15850
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
|
|
15851
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx35(
|
|
15581
15852
|
LanguageDropdown,
|
|
15582
15853
|
{
|
|
15583
15854
|
value: selectedLanguage,
|
|
@@ -15585,9 +15856,9 @@ function ProfileTab() {
|
|
|
15585
15856
|
disabled: disableAllActions
|
|
15586
15857
|
}
|
|
15587
15858
|
) }),
|
|
15588
|
-
/* @__PURE__ */
|
|
15859
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0" })
|
|
15589
15860
|
] }),
|
|
15590
|
-
/* @__PURE__ */
|
|
15861
|
+
/* @__PURE__ */ jsx35("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx35(
|
|
15591
15862
|
ScTextField,
|
|
15592
15863
|
{
|
|
15593
15864
|
label: "Email ID",
|
|
@@ -15596,7 +15867,7 @@ function ProfileTab() {
|
|
|
15596
15867
|
value: user?.email ?? "",
|
|
15597
15868
|
placeholderFilled: user?.email ?? "chris@kepler.com",
|
|
15598
15869
|
tfGroup: "icon-right",
|
|
15599
|
-
tfRightIcon: /* @__PURE__ */
|
|
15870
|
+
tfRightIcon: /* @__PURE__ */ jsx35(
|
|
15600
15871
|
SiconLock,
|
|
15601
15872
|
{
|
|
15602
15873
|
className: "w-6 h-6",
|
|
@@ -15608,13 +15879,13 @@ function ProfileTab() {
|
|
|
15608
15879
|
readOnly: true
|
|
15609
15880
|
}
|
|
15610
15881
|
) }),
|
|
15611
|
-
/* @__PURE__ */
|
|
15882
|
+
/* @__PURE__ */ jsx35(
|
|
15612
15883
|
"div",
|
|
15613
15884
|
{
|
|
15614
15885
|
className: "flex items-center w-full",
|
|
15615
15886
|
style: { justifyContent: "flex-end", paddingTop: "var(--spacing-md)" },
|
|
15616
|
-
children: /* @__PURE__ */
|
|
15617
|
-
|
|
15887
|
+
children: /* @__PURE__ */ jsx35(
|
|
15888
|
+
ScButton19,
|
|
15618
15889
|
{
|
|
15619
15890
|
text: saving ? "Saving..." : "Save changes",
|
|
15620
15891
|
variant: "secondary",
|
|
@@ -15631,7 +15902,7 @@ function ProfileTab() {
|
|
|
15631
15902
|
]
|
|
15632
15903
|
}
|
|
15633
15904
|
),
|
|
15634
|
-
/* @__PURE__ */
|
|
15905
|
+
/* @__PURE__ */ jsxs32(
|
|
15635
15906
|
"div",
|
|
15636
15907
|
{
|
|
15637
15908
|
className: "flex items-center w-full",
|
|
@@ -15643,8 +15914,8 @@ function ProfileTab() {
|
|
|
15643
15914
|
gap: "var(--spacing-3xl)"
|
|
15644
15915
|
},
|
|
15645
15916
|
children: [
|
|
15646
|
-
/* @__PURE__ */
|
|
15647
|
-
/* @__PURE__ */
|
|
15917
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
|
|
15918
|
+
/* @__PURE__ */ jsx35(
|
|
15648
15919
|
"span",
|
|
15649
15920
|
{
|
|
15650
15921
|
style: {
|
|
@@ -15657,7 +15928,7 @@ function ProfileTab() {
|
|
|
15657
15928
|
children: "Session"
|
|
15658
15929
|
}
|
|
15659
15930
|
),
|
|
15660
|
-
/* @__PURE__ */
|
|
15931
|
+
/* @__PURE__ */ jsx35(
|
|
15661
15932
|
"span",
|
|
15662
15933
|
{
|
|
15663
15934
|
className: "truncate",
|
|
@@ -15672,8 +15943,8 @@ function ProfileTab() {
|
|
|
15672
15943
|
}
|
|
15673
15944
|
)
|
|
15674
15945
|
] }),
|
|
15675
|
-
/* @__PURE__ */
|
|
15676
|
-
|
|
15946
|
+
/* @__PURE__ */ jsx35(
|
|
15947
|
+
ScButton19,
|
|
15677
15948
|
{
|
|
15678
15949
|
text: "Log out",
|
|
15679
15950
|
variant: "outline",
|
|
@@ -15736,9 +16007,9 @@ function WorkspaceListTab({
|
|
|
15736
16007
|
const currentOrganization = organizations.find(
|
|
15737
16008
|
(org) => org._id && org._id === currentWorkspace?.organizationId
|
|
15738
16009
|
);
|
|
15739
|
-
const [page, setPage] =
|
|
15740
|
-
const [serverPage, setServerPage] =
|
|
15741
|
-
const [serverFailed, setServerFailed] =
|
|
16010
|
+
const [page, setPage] = useState26(0);
|
|
16011
|
+
const [serverPage, setServerPage] = useState26(null);
|
|
16012
|
+
const [serverFailed, setServerFailed] = useState26(false);
|
|
15742
16013
|
const serverMode = !!listPage && !serverFailed;
|
|
15743
16014
|
useEffect20(() => {
|
|
15744
16015
|
if (!listPage || serverFailed) return;
|
|
@@ -15781,7 +16052,7 @@ function WorkspaceListTab({
|
|
|
15781
16052
|
const pageRows = serverMode ? (serverPage?.items ?? []).map((ws) => ({ ws, group: serverGroupOf(ws) })) : rows.slice(pageStart, pageStart + pageSize);
|
|
15782
16053
|
const pageWorkspaces = pageRows.map((row) => row.ws);
|
|
15783
16054
|
const listLoading = loading || serverMode && !serverPage;
|
|
15784
|
-
const [plans, setPlans] =
|
|
16055
|
+
const [plans, setPlans] = useState26({});
|
|
15785
16056
|
const requestedPlans = useRef12(/* @__PURE__ */ new Set());
|
|
15786
16057
|
const visibleIds = [
|
|
15787
16058
|
...currentWorkspace ? [currentWorkspace._id] : [],
|
|
@@ -15806,13 +16077,13 @@ function WorkspaceListTab({
|
|
|
15806
16077
|
});
|
|
15807
16078
|
}, [fetchPlans, listLoading, visibleKey]);
|
|
15808
16079
|
const planOf = (ws) => fetchPlans ? plans[ws._id] ?? "" : ws.plan ?? "";
|
|
15809
|
-
return /* @__PURE__ */
|
|
16080
|
+
return /* @__PURE__ */ jsxs32(
|
|
15810
16081
|
"div",
|
|
15811
16082
|
{
|
|
15812
16083
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
15813
16084
|
style: { gap: "var(--spacing-3xl)", height: "100%" },
|
|
15814
16085
|
children: [
|
|
15815
|
-
/* @__PURE__ */
|
|
16086
|
+
/* @__PURE__ */ jsx35(
|
|
15816
16087
|
"p",
|
|
15817
16088
|
{
|
|
15818
16089
|
className: "shrink-0 w-full",
|
|
@@ -15825,7 +16096,7 @@ function WorkspaceListTab({
|
|
|
15825
16096
|
children: "Switching changes which workspace the rest of Settings acts on."
|
|
15826
16097
|
}
|
|
15827
16098
|
),
|
|
15828
|
-
listLoading && /* @__PURE__ */
|
|
16099
|
+
listLoading && /* @__PURE__ */ jsx35(
|
|
15829
16100
|
"p",
|
|
15830
16101
|
{
|
|
15831
16102
|
style: {
|
|
@@ -15836,13 +16107,13 @@ function WorkspaceListTab({
|
|
|
15836
16107
|
children: "Loading workspaces\u2026"
|
|
15837
16108
|
}
|
|
15838
16109
|
),
|
|
15839
|
-
!listLoading && currentWorkspace && /* @__PURE__ */
|
|
16110
|
+
!listLoading && currentWorkspace && /* @__PURE__ */ jsxs32(
|
|
15840
16111
|
"div",
|
|
15841
16112
|
{
|
|
15842
16113
|
className: "flex flex-col items-start shrink-0 w-full",
|
|
15843
16114
|
style: { gap: 16, padding: "var(--spacing-md) 0" },
|
|
15844
16115
|
children: [
|
|
15845
|
-
/* @__PURE__ */
|
|
16116
|
+
/* @__PURE__ */ jsxs32(
|
|
15846
16117
|
"p",
|
|
15847
16118
|
{
|
|
15848
16119
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
|
|
@@ -15859,7 +16130,7 @@ function WorkspaceListTab({
|
|
|
15859
16130
|
]
|
|
15860
16131
|
}
|
|
15861
16132
|
),
|
|
15862
|
-
/* @__PURE__ */
|
|
16133
|
+
/* @__PURE__ */ jsx35(
|
|
15863
16134
|
ScWorkspaceSwitchCard,
|
|
15864
16135
|
{
|
|
15865
16136
|
wsName: currentWorkspace.name,
|
|
@@ -15876,7 +16147,7 @@ function WorkspaceListTab({
|
|
|
15876
16147
|
]
|
|
15877
16148
|
}
|
|
15878
16149
|
),
|
|
15879
|
-
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */
|
|
16150
|
+
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ jsx35(
|
|
15880
16151
|
"div",
|
|
15881
16152
|
{
|
|
15882
16153
|
className: "shrink-0 w-full",
|
|
@@ -15886,19 +16157,19 @@ function WorkspaceListTab({
|
|
|
15886
16157
|
}
|
|
15887
16158
|
}
|
|
15888
16159
|
),
|
|
15889
|
-
!listLoading && listTotal > 0 && /* @__PURE__ */
|
|
16160
|
+
!listLoading && listTotal > 0 && /* @__PURE__ */ jsxs32(
|
|
15890
16161
|
"div",
|
|
15891
16162
|
{
|
|
15892
16163
|
className: "flex flex-col items-start flex-1 min-h-0 w-full",
|
|
15893
16164
|
style: { gap: 16, overflowY: "auto" },
|
|
15894
16165
|
children: [
|
|
15895
|
-
/* @__PURE__ */
|
|
16166
|
+
/* @__PURE__ */ jsx35(
|
|
15896
16167
|
"div",
|
|
15897
16168
|
{
|
|
15898
16169
|
className: "flex flex-col items-start w-full",
|
|
15899
16170
|
style: { gap: 16 },
|
|
15900
|
-
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */
|
|
15901
|
-
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */
|
|
16171
|
+
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
16172
|
+
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ jsx35(
|
|
15902
16173
|
"p",
|
|
15903
16174
|
{
|
|
15904
16175
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap shrink-0",
|
|
@@ -15913,7 +16184,7 @@ function WorkspaceListTab({
|
|
|
15913
16184
|
children: group.label
|
|
15914
16185
|
}
|
|
15915
16186
|
),
|
|
15916
|
-
/* @__PURE__ */
|
|
16187
|
+
/* @__PURE__ */ jsx35(
|
|
15917
16188
|
ScWorkspaceSwitchCard,
|
|
15918
16189
|
{
|
|
15919
16190
|
wsName: ws.name,
|
|
@@ -15931,13 +16202,13 @@ function WorkspaceListTab({
|
|
|
15931
16202
|
] }, ws._id))
|
|
15932
16203
|
}
|
|
15933
16204
|
),
|
|
15934
|
-
pageCount > 1 && /* @__PURE__ */
|
|
16205
|
+
pageCount > 1 && /* @__PURE__ */ jsxs32(
|
|
15935
16206
|
"div",
|
|
15936
16207
|
{
|
|
15937
16208
|
className: "flex items-center justify-between shrink-0 w-full",
|
|
15938
16209
|
style: { gap: "var(--spacing-md)" },
|
|
15939
16210
|
children: [
|
|
15940
|
-
/* @__PURE__ */
|
|
16211
|
+
/* @__PURE__ */ jsxs32(
|
|
15941
16212
|
"span",
|
|
15942
16213
|
{
|
|
15943
16214
|
style: {
|
|
@@ -15956,9 +16227,9 @@ function WorkspaceListTab({
|
|
|
15956
16227
|
]
|
|
15957
16228
|
}
|
|
15958
16229
|
),
|
|
15959
|
-
/* @__PURE__ */
|
|
15960
|
-
/* @__PURE__ */
|
|
15961
|
-
|
|
16230
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
|
|
16231
|
+
/* @__PURE__ */ jsx35(
|
|
16232
|
+
ScButton19,
|
|
15962
16233
|
{
|
|
15963
16234
|
text: "Previous",
|
|
15964
16235
|
variant: "tertiary",
|
|
@@ -15967,8 +16238,8 @@ function WorkspaceListTab({
|
|
|
15967
16238
|
onClick: safePage === 0 ? void 0 : () => setPage(safePage - 1)
|
|
15968
16239
|
}
|
|
15969
16240
|
),
|
|
15970
|
-
/* @__PURE__ */
|
|
15971
|
-
|
|
16241
|
+
/* @__PURE__ */ jsx35(
|
|
16242
|
+
ScButton19,
|
|
15972
16243
|
{
|
|
15973
16244
|
text: "Next",
|
|
15974
16245
|
variant: "tertiary",
|
|
@@ -15993,7 +16264,7 @@ function ReferralTab() {
|
|
|
15993
16264
|
const { auth, toast, api } = useSettingsAdapters();
|
|
15994
16265
|
const domain = typeof window !== "undefined" ? window.location.origin : "";
|
|
15995
16266
|
const link = referralLink(referralCodeOf(auth.user), domain);
|
|
15996
|
-
const [copied, setCopied] =
|
|
16267
|
+
const [copied, setCopied] = useState26(false);
|
|
15997
16268
|
const copiedTimer = useRef12(null);
|
|
15998
16269
|
useEffect20(() => () => {
|
|
15999
16270
|
if (copiedTimer.current) clearTimeout(copiedTimer.current);
|
|
@@ -16010,13 +16281,13 @@ function ReferralTab() {
|
|
|
16010
16281
|
toast.error("Couldn't copy the referral link");
|
|
16011
16282
|
}
|
|
16012
16283
|
};
|
|
16013
|
-
return /* @__PURE__ */
|
|
16284
|
+
return /* @__PURE__ */ jsxs32(
|
|
16014
16285
|
"div",
|
|
16015
16286
|
{
|
|
16016
16287
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
16017
16288
|
style: { gap: "var(--spacing-3xl)" },
|
|
16018
16289
|
children: [
|
|
16019
|
-
/* @__PURE__ */
|
|
16290
|
+
/* @__PURE__ */ jsx35(
|
|
16020
16291
|
"div",
|
|
16021
16292
|
{
|
|
16022
16293
|
className: "w-full relative",
|
|
@@ -16025,7 +16296,7 @@ function ReferralTab() {
|
|
|
16025
16296
|
borderRadius: "var(--radius-3xl)",
|
|
16026
16297
|
padding: "var(--spacing-6xl)"
|
|
16027
16298
|
},
|
|
16028
|
-
children: /* @__PURE__ */
|
|
16299
|
+
children: /* @__PURE__ */ jsx35(
|
|
16029
16300
|
ScTextField,
|
|
16030
16301
|
{
|
|
16031
16302
|
label: "Your Referral Link",
|
|
@@ -16034,7 +16305,7 @@ function ReferralTab() {
|
|
|
16034
16305
|
value: link,
|
|
16035
16306
|
placeholderFilled: "https://your-domain.com?referral_code=ABC123",
|
|
16036
16307
|
tfGroup: "none",
|
|
16037
|
-
rightSlot: /* @__PURE__ */
|
|
16308
|
+
rightSlot: /* @__PURE__ */ jsxs32(
|
|
16038
16309
|
"button",
|
|
16039
16310
|
{
|
|
16040
16311
|
type: "button",
|
|
@@ -16060,7 +16331,7 @@ function ReferralTab() {
|
|
|
16060
16331
|
e.currentTarget.style.background = "transparent";
|
|
16061
16332
|
},
|
|
16062
16333
|
children: [
|
|
16063
|
-
copied ? /* @__PURE__ */
|
|
16334
|
+
copied ? /* @__PURE__ */ jsx35(SiconCheck2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }) : /* @__PURE__ */ jsx35(SiconCopy2, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }),
|
|
16064
16335
|
copied ? "Copied" : "Copy"
|
|
16065
16336
|
]
|
|
16066
16337
|
}
|
|
@@ -16073,7 +16344,7 @@ function ReferralTab() {
|
|
|
16073
16344
|
)
|
|
16074
16345
|
}
|
|
16075
16346
|
),
|
|
16076
|
-
api.getReferredUsers && /* @__PURE__ */
|
|
16347
|
+
api.getReferredUsers && /* @__PURE__ */ jsx35(ReferralHistory, { load: (signal) => api.getReferredUsers(signal) })
|
|
16077
16348
|
]
|
|
16078
16349
|
}
|
|
16079
16350
|
);
|
|
@@ -16091,7 +16362,7 @@ function SettingsContent({
|
|
|
16091
16362
|
inviteRequested,
|
|
16092
16363
|
onInviteRequestHandled
|
|
16093
16364
|
}) {
|
|
16094
|
-
return /* @__PURE__ */
|
|
16365
|
+
return /* @__PURE__ */ jsx35(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx35(
|
|
16095
16366
|
SettingsContentInner,
|
|
16096
16367
|
{
|
|
16097
16368
|
activeTab,
|
|
@@ -16129,7 +16400,8 @@ function SettingsContentInner({
|
|
|
16129
16400
|
organization,
|
|
16130
16401
|
navigation,
|
|
16131
16402
|
toast,
|
|
16132
|
-
integrations
|
|
16403
|
+
integrations,
|
|
16404
|
+
loginMethods
|
|
16133
16405
|
} = adapters;
|
|
16134
16406
|
const overviewDetail = presentation === "overview-detail";
|
|
16135
16407
|
const isOverview = overviewDetail && showOverview;
|
|
@@ -16137,13 +16409,14 @@ function SettingsContentInner({
|
|
|
16137
16409
|
const showConnectedApps = !!integrations;
|
|
16138
16410
|
const showReferral = !!referralCodeOf(adapters.auth.user);
|
|
16139
16411
|
const showIntegrations = !!integrations?.listOrganizationConnections && !!integrations.getOrganizationAccess && organization.current?.role === "admin";
|
|
16412
|
+
const showLoginMethods = !!loginMethods && organization.current?.role === "admin";
|
|
16140
16413
|
const workspaceId = workspace.current?.id ?? null;
|
|
16141
16414
|
const workspaceOwner = useWorkspaceOrganization({ workspaceId, request: workspace.organizationRequest ?? unavailableOrganizationRequest, enabled: !!workspace.organizationRequest });
|
|
16142
16415
|
const workspaceOwnerName = workspace.organizationRequest ? workspaceOwner.organizationName : void 0;
|
|
16143
|
-
const [workspaceList, setWorkspaceList] =
|
|
16416
|
+
const [workspaceList, setWorkspaceList] = useState26([]);
|
|
16144
16417
|
const currentWorkspaceRole = workspace.current?.role ?? workspaceList.find((item) => item._id === workspaceId)?.role;
|
|
16145
16418
|
const isWorkspaceAdmin = currentWorkspaceRole?.trim().toLowerCase() === "admin";
|
|
16146
|
-
const [workspaceListLoading, setWorkspaceListLoading] =
|
|
16419
|
+
const [workspaceListLoading, setWorkspaceListLoading] = useState26(false);
|
|
16147
16420
|
const refreshWorkspaceList = useCallback10(async () => {
|
|
16148
16421
|
setWorkspaceListLoading(true);
|
|
16149
16422
|
try {
|
|
@@ -16186,7 +16459,7 @@ function SettingsContentInner({
|
|
|
16186
16459
|
} : void 0,
|
|
16187
16460
|
[hostListPage, workspaceId]
|
|
16188
16461
|
);
|
|
16189
|
-
const [listOrganizations, setListOrganizations] =
|
|
16462
|
+
const [listOrganizations, setListOrganizations] = useState26([]);
|
|
16190
16463
|
useEffect20(() => {
|
|
16191
16464
|
if (activeTab !== "workspaceList" || typeof organization?.list !== "function") {
|
|
16192
16465
|
return;
|
|
@@ -16217,23 +16490,23 @@ function SettingsContentInner({
|
|
|
16217
16490
|
const setActiveTab = (tab) => {
|
|
16218
16491
|
navigation.navigateToTab(tab);
|
|
16219
16492
|
};
|
|
16220
|
-
const [creatingWorkspace, setCreatingWorkspace] =
|
|
16221
|
-
const [updatingWorkspace, setUpdatingWorkspace] =
|
|
16222
|
-
const [teamInviteOpen, setTeamInviteOpen] =
|
|
16493
|
+
const [creatingWorkspace, setCreatingWorkspace] = useState26(false);
|
|
16494
|
+
const [updatingWorkspace, setUpdatingWorkspace] = useState26(false);
|
|
16495
|
+
const [teamInviteOpen, setTeamInviteOpen] = useState26(false);
|
|
16223
16496
|
const teamPermissionScope = JSON.stringify([workspaceId, _auth.user?.id, workspace.current?.role]);
|
|
16224
|
-
const [teamInvitePermission, setTeamInvitePermission] =
|
|
16497
|
+
const [teamInvitePermission, setTeamInvitePermission] = useState26(null);
|
|
16225
16498
|
const teamCanInvite = teamInvitePermission?.scope === teamPermissionScope && teamInvitePermission.api === adapters.api ? teamInvitePermission.canInvite : null;
|
|
16226
16499
|
const receiveTeamInvitePermission = useCallback10((canInvite) => {
|
|
16227
16500
|
setTeamInvitePermission((previous) => previous?.scope === teamPermissionScope && previous.api === adapters.api && previous.canInvite === canInvite ? previous : { scope: teamPermissionScope, api: adapters.api, canInvite });
|
|
16228
16501
|
}, [teamPermissionScope, adapters.api]);
|
|
16229
16502
|
const canUseHeaderInvite = overviewDetail ? activeTab === "workspaceMembers" && !isOverview ? teamCanInvite === true : !overviewInvite.isLoading && overviewInvite.canInvite : teamCanInvite ?? isWorkspaceAdmin;
|
|
16230
|
-
const [tokenShowRevoked, setTokenShowRevoked] =
|
|
16231
|
-
const [tokenCreateOpen, setTokenCreateOpen] =
|
|
16232
|
-
const [billingShowPlans, setBillingShowPlans] =
|
|
16503
|
+
const [tokenShowRevoked, setTokenShowRevoked] = useState26(false);
|
|
16504
|
+
const [tokenCreateOpen, setTokenCreateOpen] = useState26(false);
|
|
16505
|
+
const [billingShowPlans, setBillingShowPlans] = useState26(false);
|
|
16233
16506
|
const isBillingPlans = activeTab === "billing" && isWorkspaceAdmin && billingShowPlans;
|
|
16234
|
-
const [billingShowPerUserLimits, setBillingShowPerUserLimits] =
|
|
16507
|
+
const [billingShowPerUserLimits, setBillingShowPerUserLimits] = useState26(false);
|
|
16235
16508
|
const isBillingPerUserLimits = activeTab === "billing" && isWorkspaceAdmin && billingShowPerUserLimits && !billingShowPlans;
|
|
16236
|
-
const [billingShowSharedCredits, setBillingShowSharedCredits] =
|
|
16509
|
+
const [billingShowSharedCredits, setBillingShowSharedCredits] = useState26(false);
|
|
16237
16510
|
const isBillingSharedCredits = activeTab === "billing" && isWorkspaceAdmin && billingShowSharedCredits && !billingShowPlans && !billingShowPerUserLimits;
|
|
16238
16511
|
const isBillingSubView = isBillingPlans || isBillingPerUserLimits || isBillingSharedCredits;
|
|
16239
16512
|
useEffect20(() => {
|
|
@@ -16270,14 +16543,14 @@ function SettingsContentInner({
|
|
|
16270
16543
|
document.addEventListener("keydown", handleKeyDown);
|
|
16271
16544
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
16272
16545
|
}, [onClose, billingShowPlans, billingShowPerUserLimits, billingShowSharedCredits]);
|
|
16273
|
-
const [localWorkspaces, setLocalWorkspaces] =
|
|
16274
|
-
const [wsModalOpen, setWsModalOpen] =
|
|
16275
|
-
const [wsModalMode, setWsModalMode] =
|
|
16276
|
-
const [editingWorkspace, setEditingWorkspace] =
|
|
16277
|
-
const [confirmLeaveOpen, setConfirmLeaveOpen] =
|
|
16278
|
-
const [leavingWorkspace, setLeavingWorkspace] =
|
|
16279
|
-
const [confirmDeleteOpen, setConfirmDeleteOpen] =
|
|
16280
|
-
const [deletingWorkspace, setDeletingWorkspace] =
|
|
16546
|
+
const [localWorkspaces, setLocalWorkspaces] = useState26(null);
|
|
16547
|
+
const [wsModalOpen, setWsModalOpen] = useState26(false);
|
|
16548
|
+
const [wsModalMode, setWsModalMode] = useState26("create");
|
|
16549
|
+
const [editingWorkspace, setEditingWorkspace] = useState26(null);
|
|
16550
|
+
const [confirmLeaveOpen, setConfirmLeaveOpen] = useState26(false);
|
|
16551
|
+
const [leavingWorkspace, setLeavingWorkspace] = useState26(null);
|
|
16552
|
+
const [confirmDeleteOpen, setConfirmDeleteOpen] = useState26(false);
|
|
16553
|
+
const [deletingWorkspace, setDeletingWorkspace] = useState26(null);
|
|
16281
16554
|
const toWorkspaceData = (ws) => ({
|
|
16282
16555
|
id: ws._id,
|
|
16283
16556
|
name: ws.name ?? "",
|
|
@@ -16544,7 +16817,7 @@ function SettingsContentInner({
|
|
|
16544
16817
|
setConfirmLeaveOpen(true);
|
|
16545
16818
|
return false;
|
|
16546
16819
|
}
|
|
16547
|
-
return /* @__PURE__ */
|
|
16820
|
+
return /* @__PURE__ */ jsxs32(
|
|
16548
16821
|
"div",
|
|
16549
16822
|
{
|
|
16550
16823
|
"data-streamoid-settings": "",
|
|
@@ -16555,8 +16828,8 @@ function SettingsContentInner({
|
|
|
16555
16828
|
...isOverview ? { display: "block", overflowY: "auto" } : {}
|
|
16556
16829
|
},
|
|
16557
16830
|
children: [
|
|
16558
|
-
!isOverview && /* @__PURE__ */
|
|
16559
|
-
/* @__PURE__ */
|
|
16831
|
+
!isOverview && /* @__PURE__ */ jsx35(SettingsAppearance, {}),
|
|
16832
|
+
/* @__PURE__ */ jsx35(
|
|
16560
16833
|
"div",
|
|
16561
16834
|
{
|
|
16562
16835
|
className: "flex flex-col items-start relative h-full overflow-hidden",
|
|
@@ -16567,8 +16840,8 @@ function SettingsContentInner({
|
|
|
16567
16840
|
width: "100%",
|
|
16568
16841
|
...isOverview ? { height: "auto", minHeight: "100%", overflow: "visible", marginInline: "auto" } : {}
|
|
16569
16842
|
},
|
|
16570
|
-
children: /* @__PURE__ */
|
|
16571
|
-
!overviewDetail && onBack !== null && /* @__PURE__ */
|
|
16843
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
|
|
16844
|
+
!overviewDetail && onBack !== null && /* @__PURE__ */ jsx35("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsxs32(
|
|
16572
16845
|
"button",
|
|
16573
16846
|
{
|
|
16574
16847
|
type: "button",
|
|
@@ -16600,19 +16873,19 @@ function SettingsContentInner({
|
|
|
16600
16873
|
else window.history.back();
|
|
16601
16874
|
},
|
|
16602
16875
|
children: [
|
|
16603
|
-
/* @__PURE__ */
|
|
16876
|
+
/* @__PURE__ */ jsx35(SiconLeft3, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
|
|
16604
16877
|
"Back"
|
|
16605
16878
|
]
|
|
16606
16879
|
}
|
|
16607
16880
|
) }),
|
|
16608
|
-
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */
|
|
16609
|
-
|
|
16881
|
+
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ jsx35("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsx35(
|
|
16882
|
+
ScButton19,
|
|
16610
16883
|
{
|
|
16611
16884
|
text: isBillingSubView ? "Back to billing" : "Back to account and workspace settings",
|
|
16612
16885
|
variant: "tertiary",
|
|
16613
16886
|
size: "sm",
|
|
16614
16887
|
styleVariant: "icon-left",
|
|
16615
|
-
icon: /* @__PURE__ */
|
|
16888
|
+
icon: /* @__PURE__ */ jsx35(SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
|
|
16616
16889
|
onClick: () => {
|
|
16617
16890
|
if (isBillingSubView) {
|
|
16618
16891
|
setBillingShowPlans(false);
|
|
@@ -16624,7 +16897,7 @@ function SettingsContentInner({
|
|
|
16624
16897
|
}
|
|
16625
16898
|
}
|
|
16626
16899
|
) }),
|
|
16627
|
-
/* @__PURE__ */
|
|
16900
|
+
/* @__PURE__ */ jsxs32(
|
|
16628
16901
|
"div",
|
|
16629
16902
|
{
|
|
16630
16903
|
className: "flex items-center shrink-0 w-full",
|
|
@@ -16635,9 +16908,9 @@ function SettingsContentInner({
|
|
|
16635
16908
|
paddingRight: 20
|
|
16636
16909
|
},
|
|
16637
16910
|
children: [
|
|
16638
|
-
/* @__PURE__ */
|
|
16639
|
-
/* @__PURE__ */
|
|
16640
|
-
/* @__PURE__ */
|
|
16911
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
|
|
16912
|
+
/* @__PURE__ */ jsx35(SiconSettings2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16913
|
+
/* @__PURE__ */ jsx35(
|
|
16641
16914
|
"h1",
|
|
16642
16915
|
{
|
|
16643
16916
|
style: {
|
|
@@ -16651,10 +16924,10 @@ function SettingsContentInner({
|
|
|
16651
16924
|
children: overviewDetail ? "Account and workspace settings" : "Settings"
|
|
16652
16925
|
}
|
|
16653
16926
|
),
|
|
16654
|
-
!isOverview && /* @__PURE__ */
|
|
16655
|
-
scopeCrumb && /* @__PURE__ */
|
|
16656
|
-
/* @__PURE__ */
|
|
16657
|
-
/* @__PURE__ */
|
|
16927
|
+
!isOverview && /* @__PURE__ */ jsxs32("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
|
|
16928
|
+
scopeCrumb && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16929
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16930
|
+
/* @__PURE__ */ jsx35(
|
|
16658
16931
|
"span",
|
|
16659
16932
|
{
|
|
16660
16933
|
className: "truncate",
|
|
@@ -16671,8 +16944,8 @@ function SettingsContentInner({
|
|
|
16671
16944
|
}
|
|
16672
16945
|
)
|
|
16673
16946
|
] }),
|
|
16674
|
-
/* @__PURE__ */
|
|
16675
|
-
/* @__PURE__ */
|
|
16947
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16948
|
+
/* @__PURE__ */ jsx35(
|
|
16676
16949
|
"span",
|
|
16677
16950
|
{
|
|
16678
16951
|
style: {
|
|
@@ -16685,9 +16958,9 @@ function SettingsContentInner({
|
|
|
16685
16958
|
children: leafLabel
|
|
16686
16959
|
}
|
|
16687
16960
|
),
|
|
16688
|
-
isBillingPlans && /* @__PURE__ */
|
|
16689
|
-
/* @__PURE__ */
|
|
16690
|
-
/* @__PURE__ */
|
|
16961
|
+
isBillingPlans && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16962
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16963
|
+
/* @__PURE__ */ jsx35(
|
|
16691
16964
|
"span",
|
|
16692
16965
|
{
|
|
16693
16966
|
style: {
|
|
@@ -16701,9 +16974,9 @@ function SettingsContentInner({
|
|
|
16701
16974
|
}
|
|
16702
16975
|
)
|
|
16703
16976
|
] }),
|
|
16704
|
-
isBillingPerUserLimits && /* @__PURE__ */
|
|
16705
|
-
/* @__PURE__ */
|
|
16706
|
-
/* @__PURE__ */
|
|
16977
|
+
isBillingPerUserLimits && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16978
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16979
|
+
/* @__PURE__ */ jsx35(
|
|
16707
16980
|
"span",
|
|
16708
16981
|
{
|
|
16709
16982
|
style: {
|
|
@@ -16717,9 +16990,9 @@ function SettingsContentInner({
|
|
|
16717
16990
|
}
|
|
16718
16991
|
)
|
|
16719
16992
|
] }),
|
|
16720
|
-
isBillingSharedCredits && /* @__PURE__ */
|
|
16721
|
-
/* @__PURE__ */
|
|
16722
|
-
/* @__PURE__ */
|
|
16993
|
+
isBillingSharedCredits && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16994
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16995
|
+
/* @__PURE__ */ jsx35(
|
|
16723
16996
|
"span",
|
|
16724
16997
|
{
|
|
16725
16998
|
style: {
|
|
@@ -16735,20 +17008,20 @@ function SettingsContentInner({
|
|
|
16735
17008
|
] })
|
|
16736
17009
|
] })
|
|
16737
17010
|
] }),
|
|
16738
|
-
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */
|
|
17011
|
+
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */ jsx35(
|
|
16739
17012
|
SettingsTooltip,
|
|
16740
17013
|
{
|
|
16741
17014
|
content: "Start a new workspace with its own team, members and billing",
|
|
16742
17015
|
placement: "bottom",
|
|
16743
17016
|
inline: true,
|
|
16744
|
-
children: /* @__PURE__ */
|
|
16745
|
-
|
|
17017
|
+
children: /* @__PURE__ */ jsx35(
|
|
17018
|
+
ScButton19,
|
|
16746
17019
|
{
|
|
16747
17020
|
text: "Create Workspace",
|
|
16748
17021
|
variant: "secondary",
|
|
16749
17022
|
size: "md",
|
|
16750
17023
|
styleVariant: "icon-left",
|
|
16751
|
-
icon: /* @__PURE__ */
|
|
17024
|
+
icon: /* @__PURE__ */ jsx35(
|
|
16752
17025
|
SiconWorkspace2,
|
|
16753
17026
|
{
|
|
16754
17027
|
className: "w-5 h-5",
|
|
@@ -16760,21 +17033,21 @@ function SettingsContentInner({
|
|
|
16760
17033
|
)
|
|
16761
17034
|
}
|
|
16762
17035
|
),
|
|
16763
|
-
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */
|
|
17036
|
+
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ jsx35(
|
|
16764
17037
|
SettingsTooltip,
|
|
16765
17038
|
{
|
|
16766
17039
|
content: "Send someone an invite to join this workspace",
|
|
16767
17040
|
placement: "bottom",
|
|
16768
17041
|
inline: true,
|
|
16769
|
-
children: /* @__PURE__ */
|
|
16770
|
-
|
|
17042
|
+
children: /* @__PURE__ */ jsx35(
|
|
17043
|
+
ScButton19,
|
|
16771
17044
|
{
|
|
16772
17045
|
text: overviewDetail ? "Invite people" : "Invite user",
|
|
16773
17046
|
variant: "secondary",
|
|
16774
17047
|
size: "md",
|
|
16775
17048
|
styleVariant: "icon-left",
|
|
16776
17049
|
state: canUseHeaderInvite ? "default" : "disabled",
|
|
16777
|
-
icon: /* @__PURE__ */
|
|
17050
|
+
icon: /* @__PURE__ */ jsx35(
|
|
16778
17051
|
SiconUserAdd3,
|
|
16779
17052
|
{
|
|
16780
17053
|
className: "w-5 h-5",
|
|
@@ -16788,15 +17061,15 @@ function SettingsContentInner({
|
|
|
16788
17061
|
)
|
|
16789
17062
|
}
|
|
16790
17063
|
),
|
|
16791
|
-
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */
|
|
16792
|
-
/* @__PURE__ */
|
|
17064
|
+
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs32("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
|
|
17065
|
+
/* @__PURE__ */ jsx35(
|
|
16793
17066
|
SettingsTooltip,
|
|
16794
17067
|
{
|
|
16795
17068
|
content: "Include keys you have already revoked in the list below",
|
|
16796
17069
|
placement: "bottom",
|
|
16797
17070
|
inline: true,
|
|
16798
|
-
children: /* @__PURE__ */
|
|
16799
|
-
|
|
17071
|
+
children: /* @__PURE__ */ jsx35(
|
|
17072
|
+
ScButton19,
|
|
16800
17073
|
{
|
|
16801
17074
|
text: tokenShowRevoked ? "Hide Revoked" : "Show Revoked",
|
|
16802
17075
|
variant: "outline",
|
|
@@ -16806,20 +17079,20 @@ function SettingsContentInner({
|
|
|
16806
17079
|
)
|
|
16807
17080
|
}
|
|
16808
17081
|
),
|
|
16809
|
-
/* @__PURE__ */
|
|
17082
|
+
/* @__PURE__ */ jsx35(
|
|
16810
17083
|
SettingsTooltip,
|
|
16811
17084
|
{
|
|
16812
17085
|
content: "Generate a key for calling the Streamoid APIs from your own code",
|
|
16813
17086
|
placement: "bottom",
|
|
16814
17087
|
inline: true,
|
|
16815
|
-
children: /* @__PURE__ */
|
|
16816
|
-
|
|
17088
|
+
children: /* @__PURE__ */ jsx35(
|
|
17089
|
+
ScButton19,
|
|
16817
17090
|
{
|
|
16818
17091
|
text: "New API Key",
|
|
16819
17092
|
variant: "secondary",
|
|
16820
17093
|
size: "md",
|
|
16821
17094
|
styleVariant: "icon-left",
|
|
16822
|
-
icon: /* @__PURE__ */
|
|
17095
|
+
icon: /* @__PURE__ */ jsx35(
|
|
16823
17096
|
SiconPlus3,
|
|
16824
17097
|
{
|
|
16825
17098
|
className: "w-5 h-5",
|
|
@@ -16832,13 +17105,13 @@ function SettingsContentInner({
|
|
|
16832
17105
|
}
|
|
16833
17106
|
)
|
|
16834
17107
|
] }),
|
|
16835
|
-
overviewDetail && onClose && /* @__PURE__ */
|
|
16836
|
-
|
|
17108
|
+
overviewDetail && onClose && /* @__PURE__ */ jsx35(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ jsx35(
|
|
17109
|
+
ScButton19,
|
|
16837
17110
|
{
|
|
16838
17111
|
styleVariant: "icon-only",
|
|
16839
17112
|
variant: "outline",
|
|
16840
17113
|
size: "md",
|
|
16841
|
-
icon: /* @__PURE__ */
|
|
17114
|
+
icon: /* @__PURE__ */ jsx35(SiconClose11, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
16842
17115
|
"aria-label": "Close settings",
|
|
16843
17116
|
style: isOverview ? { width: "2rem", height: "2rem", padding: 0 } : void 0,
|
|
16844
17117
|
onClick: onClose
|
|
@@ -16847,7 +17120,7 @@ function SettingsContentInner({
|
|
|
16847
17120
|
]
|
|
16848
17121
|
}
|
|
16849
17122
|
),
|
|
16850
|
-
isOverview ? /* @__PURE__ */
|
|
17123
|
+
isOverview ? /* @__PURE__ */ jsx35(
|
|
16851
17124
|
AdministrationOverview,
|
|
16852
17125
|
{
|
|
16853
17126
|
workspaceName: workspaceScopeName,
|
|
@@ -16857,18 +17130,19 @@ function SettingsContentInner({
|
|
|
16857
17130
|
isWorkspaceAdmin,
|
|
16858
17131
|
showConnectedApps,
|
|
16859
17132
|
showIntegrations,
|
|
17133
|
+
showLoginMethods,
|
|
16860
17134
|
showReferral,
|
|
16861
17135
|
canInvite: !overviewInvite.isLoading && overviewInvite.canInvite,
|
|
16862
17136
|
onNavigate: setActiveTab,
|
|
16863
17137
|
onInvitePeople
|
|
16864
17138
|
}
|
|
16865
|
-
) : /* @__PURE__ */
|
|
17139
|
+
) : /* @__PURE__ */ jsxs32(
|
|
16866
17140
|
"div",
|
|
16867
17141
|
{
|
|
16868
17142
|
className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
|
|
16869
17143
|
style: { gap: 20 },
|
|
16870
17144
|
children: [
|
|
16871
|
-
!overviewDetail && !isBillingSubView && /* @__PURE__ */
|
|
17145
|
+
!overviewDetail && !isBillingSubView && /* @__PURE__ */ jsx35(
|
|
16872
17146
|
SettingsNav,
|
|
16873
17147
|
{
|
|
16874
17148
|
isWorkspaceAdmin,
|
|
@@ -16879,11 +17153,12 @@ function SettingsContentInner({
|
|
|
16879
17153
|
hasOrganization,
|
|
16880
17154
|
showConnectedApps,
|
|
16881
17155
|
showIntegrations,
|
|
17156
|
+
showLoginMethods,
|
|
16882
17157
|
showReferral
|
|
16883
17158
|
}
|
|
16884
17159
|
),
|
|
16885
|
-
activeTab === "profile" && /* @__PURE__ */
|
|
16886
|
-
activeTab === "workspace" && /* @__PURE__ */
|
|
17160
|
+
activeTab === "profile" && /* @__PURE__ */ jsx35(ProfileTab, {}),
|
|
17161
|
+
activeTab === "workspace" && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
|
|
16887
17162
|
WorkspaceGeneralTab,
|
|
16888
17163
|
{
|
|
16889
17164
|
workspace: currentWorkspaceData,
|
|
@@ -16905,7 +17180,7 @@ function SettingsContentInner({
|
|
|
16905
17180
|
}
|
|
16906
17181
|
}
|
|
16907
17182
|
) }),
|
|
16908
|
-
activeTab === "workspaceMembers" && /* @__PURE__ */
|
|
17183
|
+
activeTab === "workspaceMembers" && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
|
|
16909
17184
|
TeamsContent,
|
|
16910
17185
|
{
|
|
16911
17186
|
embedded: true,
|
|
@@ -16920,7 +17195,7 @@ function SettingsContentInner({
|
|
|
16920
17195
|
hiddenApps
|
|
16921
17196
|
}
|
|
16922
17197
|
) }),
|
|
16923
|
-
activeTab === "workspaceList" && /* @__PURE__ */
|
|
17198
|
+
activeTab === "workspaceList" && /* @__PURE__ */ jsx35(
|
|
16924
17199
|
WorkspaceListTab,
|
|
16925
17200
|
{
|
|
16926
17201
|
workspaces: displayWorkspaces,
|
|
@@ -16945,11 +17220,12 @@ function SettingsContentInner({
|
|
|
16945
17220
|
}
|
|
16946
17221
|
}
|
|
16947
17222
|
),
|
|
16948
|
-
activeTab === "referral" && showReferral && /* @__PURE__ */
|
|
16949
|
-
activeTab === "connectedApps" && /* @__PURE__ */
|
|
16950
|
-
activeTab === "organizationIntegrations" && /* @__PURE__ */
|
|
16951
|
-
activeTab === "
|
|
16952
|
-
|
|
17223
|
+
activeTab === "referral" && showReferral && /* @__PURE__ */ jsx35(ReferralTab, {}),
|
|
17224
|
+
activeTab === "connectedApps" && /* @__PURE__ */ jsx35(ConnectedAppsContent, {}),
|
|
17225
|
+
activeTab === "organizationIntegrations" && /* @__PURE__ */ jsx35(OrganizationIntegrationsContent, {}),
|
|
17226
|
+
activeTab === "organizationLoginMethods" && /* @__PURE__ */ jsx35(OrganizationLoginMethodsContent, {}),
|
|
17227
|
+
activeTab === "organizationList" && /* @__PURE__ */ jsx35(OrganizationListContent, {}),
|
|
17228
|
+
(activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ jsx35(
|
|
16953
17229
|
ManagedOrganizationSummary,
|
|
16954
17230
|
{
|
|
16955
17231
|
name: workspaceOwner.organizationName,
|
|
@@ -16957,14 +17233,14 @@ function SettingsContentInner({
|
|
|
16957
17233
|
status: workspaceOwner.organizationStatus,
|
|
16958
17234
|
managementUrl: organization.managementUrl
|
|
16959
17235
|
}
|
|
16960
|
-
) : /* @__PURE__ */
|
|
17236
|
+
) : /* @__PURE__ */ jsx35(
|
|
16961
17237
|
OrganizationContent,
|
|
16962
17238
|
{
|
|
16963
17239
|
embedded: true,
|
|
16964
17240
|
view: activeTab === "organizationWorkspaces" || activeTab === "organizationDomains" ? "workspaces" : "people"
|
|
16965
17241
|
}
|
|
16966
17242
|
) }),
|
|
16967
|
-
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */
|
|
17243
|
+
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
|
|
16968
17244
|
BillingContent,
|
|
16969
17245
|
{
|
|
16970
17246
|
embedded: true,
|
|
@@ -16994,14 +17270,14 @@ function SettingsContentInner({
|
|
|
16994
17270
|
}
|
|
16995
17271
|
}
|
|
16996
17272
|
) }),
|
|
16997
|
-
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */
|
|
16998
|
-
/* @__PURE__ */
|
|
16999
|
-
/* @__PURE__ */
|
|
17000
|
-
/* @__PURE__ */
|
|
17001
|
-
/* @__PURE__ */
|
|
17273
|
+
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ jsxs32("section", { role: "status", className: "flex flex-col flex-1 min-w-0", style: { padding: 28, gap: 12, background: "var(--alias-surface-base)", border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)" }, children: [
|
|
17274
|
+
/* @__PURE__ */ jsx35(SiconLock, { size: 24, color: MUTED_COLOR2 }),
|
|
17275
|
+
/* @__PURE__ */ jsx35("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
|
|
17276
|
+
/* @__PURE__ */ jsx35("p", { style: { margin: 0, fontSize: 14, lineHeight: "22px", color: MUTED_COLOR2, maxWidth: 480 }, children: activeTab === "billing" ? "Your workspace admin manages credit top-ups, plans and billing history. Get in touch with them to add credits or request billing details." : "API Keys are available to workspace Admins only. Get in touch with your workspace admin to manage API access." }),
|
|
17277
|
+
/* @__PURE__ */ jsx35("button", { type: "button", onClick: () => setActiveTab("workspaceMembers"), style: { alignSelf: "flex-start", marginTop: 8, padding: "8px 12px", background: "transparent", color: PRIMARY_COLOR3, border: "1px solid var(--alias-border-default)", borderRadius: 8, cursor: "pointer" }, children: "View workspace members" })
|
|
17002
17278
|
] }),
|
|
17003
|
-
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */
|
|
17004
|
-
/* @__PURE__ */
|
|
17279
|
+
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
|
|
17280
|
+
/* @__PURE__ */ jsxs32(
|
|
17005
17281
|
"a",
|
|
17006
17282
|
{
|
|
17007
17283
|
href: "https://docs.streamoid.com",
|
|
@@ -17011,19 +17287,19 @@ function SettingsContentInner({
|
|
|
17011
17287
|
className: "flex items-center shrink-0",
|
|
17012
17288
|
style: { gap: 14, padding: "16px 20px", marginBottom: 16, border: "1px solid var(--alias-border-default)", borderRadius: "var(--radius-3xl, 16px)", background: "var(--alias-surface-base)", color: PRIMARY_COLOR3, textDecoration: "none" },
|
|
17013
17289
|
children: [
|
|
17014
|
-
/* @__PURE__ */
|
|
17015
|
-
/* @__PURE__ */
|
|
17016
|
-
/* @__PURE__ */
|
|
17017
|
-
/* @__PURE__ */
|
|
17290
|
+
/* @__PURE__ */ jsx35(SiconBookOpen, { size: 24 }),
|
|
17291
|
+
/* @__PURE__ */ jsxs32("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
|
|
17292
|
+
/* @__PURE__ */ jsx35("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
|
|
17293
|
+
/* @__PURE__ */ jsx35("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
|
|
17018
17294
|
] }),
|
|
17019
|
-
/* @__PURE__ */
|
|
17295
|
+
/* @__PURE__ */ jsxs32("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
|
|
17020
17296
|
"View docs ",
|
|
17021
|
-
/* @__PURE__ */
|
|
17297
|
+
/* @__PURE__ */ jsx35(SiconExternalLink2, { size: 16 })
|
|
17022
17298
|
] })
|
|
17023
17299
|
]
|
|
17024
17300
|
}
|
|
17025
17301
|
),
|
|
17026
|
-
/* @__PURE__ */
|
|
17302
|
+
/* @__PURE__ */ jsx35(
|
|
17027
17303
|
TokensContent,
|
|
17028
17304
|
{
|
|
17029
17305
|
embedded: true,
|
|
@@ -17040,7 +17316,7 @@ function SettingsContentInner({
|
|
|
17040
17316
|
] })
|
|
17041
17317
|
}
|
|
17042
17318
|
),
|
|
17043
|
-
/* @__PURE__ */
|
|
17319
|
+
/* @__PURE__ */ jsx35(
|
|
17044
17320
|
WorkspaceModal,
|
|
17045
17321
|
{
|
|
17046
17322
|
open: wsModalOpen,
|
|
@@ -17059,7 +17335,7 @@ function SettingsContentInner({
|
|
|
17059
17335
|
}
|
|
17060
17336
|
}
|
|
17061
17337
|
),
|
|
17062
|
-
/* @__PURE__ */
|
|
17338
|
+
/* @__PURE__ */ jsx35(
|
|
17063
17339
|
ConfirmLeaveModal,
|
|
17064
17340
|
{
|
|
17065
17341
|
open: confirmLeaveOpen,
|
|
@@ -17092,7 +17368,7 @@ function SettingsContentInner({
|
|
|
17092
17368
|
}
|
|
17093
17369
|
}
|
|
17094
17370
|
),
|
|
17095
|
-
/* @__PURE__ */
|
|
17371
|
+
/* @__PURE__ */ jsx35(
|
|
17096
17372
|
ConfirmDeleteModal,
|
|
17097
17373
|
{
|
|
17098
17374
|
open: confirmDeleteOpen,
|
|
@@ -17122,10 +17398,10 @@ function SettingsContentInner({
|
|
|
17122
17398
|
}
|
|
17123
17399
|
|
|
17124
17400
|
// src/workspace-picker.tsx
|
|
17125
|
-
import { useState as
|
|
17126
|
-
import { ScButton as
|
|
17401
|
+
import { useState as useState27 } from "react";
|
|
17402
|
+
import { ScButton as ScButton20, ScCheckbox } from "@streamoid/ui";
|
|
17127
17403
|
import { SiconChevronDown, SiconChevronRight } from "@streamoid/icons";
|
|
17128
|
-
import { Fragment as
|
|
17404
|
+
import { Fragment as Fragment18, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
17129
17405
|
var T19 = {
|
|
17130
17406
|
primary: "var(--alias-text---icons-primary)",
|
|
17131
17407
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17166,14 +17442,14 @@ function WorkspacePicker({
|
|
|
17166
17442
|
}
|
|
17167
17443
|
];
|
|
17168
17444
|
const grouped = !!groups && sections.length > 1;
|
|
17169
|
-
const [selected, setSelected] =
|
|
17170
|
-
const [collapsed, setCollapsed] =
|
|
17171
|
-
const [creating, setCreating] =
|
|
17172
|
-
const [name, setName] =
|
|
17173
|
-
const [visibility, setVisibility] =
|
|
17445
|
+
const [selected, setSelected] = useState27(/* @__PURE__ */ new Set());
|
|
17446
|
+
const [collapsed, setCollapsed] = useState27(/* @__PURE__ */ new Set());
|
|
17447
|
+
const [creating, setCreating] = useState27(false);
|
|
17448
|
+
const [name, setName] = useState27("");
|
|
17449
|
+
const [visibility, setVisibility] = useState27("shared");
|
|
17174
17450
|
const creatable = onCreate ? sections.filter((s) => s.canCreate) : [];
|
|
17175
|
-
const [createOrgId, setCreateOrgId] =
|
|
17176
|
-
const [busy, setBusy] =
|
|
17451
|
+
const [createOrgId, setCreateOrgId] = useState27("");
|
|
17452
|
+
const [busy, setBusy] = useState27(false);
|
|
17177
17453
|
const total = sections.reduce((n, s) => n + s.workspaces.length, 0);
|
|
17178
17454
|
const hasWorkspaces = total > 0;
|
|
17179
17455
|
const canCreate = creatable.length > 0;
|
|
@@ -17208,7 +17484,7 @@ function WorkspacePicker({
|
|
|
17208
17484
|
);
|
|
17209
17485
|
const workspaceRow = (workspace, first) => {
|
|
17210
17486
|
const checked = selected.has(workspace._id);
|
|
17211
|
-
return /* @__PURE__ */
|
|
17487
|
+
return /* @__PURE__ */ jsxs33(
|
|
17212
17488
|
"div",
|
|
17213
17489
|
{
|
|
17214
17490
|
role: "checkbox",
|
|
@@ -17229,8 +17505,8 @@ function WorkspacePicker({
|
|
|
17229
17505
|
}
|
|
17230
17506
|
},
|
|
17231
17507
|
children: [
|
|
17232
|
-
/* @__PURE__ */
|
|
17233
|
-
/* @__PURE__ */
|
|
17508
|
+
/* @__PURE__ */ jsx36(ScCheckbox, { checked }),
|
|
17509
|
+
/* @__PURE__ */ jsx36(
|
|
17234
17510
|
ProfileAvatar,
|
|
17235
17511
|
{
|
|
17236
17512
|
name: workspace.name,
|
|
@@ -17239,8 +17515,8 @@ function WorkspacePicker({
|
|
|
17239
17515
|
borderRadius: T19.rLg
|
|
17240
17516
|
}
|
|
17241
17517
|
),
|
|
17242
|
-
/* @__PURE__ */
|
|
17243
|
-
/* @__PURE__ */
|
|
17518
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col min-w-0", children: [
|
|
17519
|
+
/* @__PURE__ */ jsx36(
|
|
17244
17520
|
"span",
|
|
17245
17521
|
{
|
|
17246
17522
|
className: "truncate",
|
|
@@ -17248,7 +17524,7 @@ function WorkspacePicker({
|
|
|
17248
17524
|
children: workspace.name
|
|
17249
17525
|
}
|
|
17250
17526
|
),
|
|
17251
|
-
workspace.ownerName && /* @__PURE__ */
|
|
17527
|
+
workspace.ownerName && /* @__PURE__ */ jsxs33(
|
|
17252
17528
|
"span",
|
|
17253
17529
|
{
|
|
17254
17530
|
className: "truncate",
|
|
@@ -17269,8 +17545,8 @@ function WorkspacePicker({
|
|
|
17269
17545
|
const isCollapsed = collapsed.has(section.organizationId);
|
|
17270
17546
|
const picked = section.workspaces.filter((w) => selected.has(w._id)).length;
|
|
17271
17547
|
const Chevron = isCollapsed ? SiconChevronRight : SiconChevronDown;
|
|
17272
|
-
return /* @__PURE__ */
|
|
17273
|
-
/* @__PURE__ */
|
|
17548
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", children: [
|
|
17549
|
+
/* @__PURE__ */ jsxs33(
|
|
17274
17550
|
"div",
|
|
17275
17551
|
{
|
|
17276
17552
|
role: "button",
|
|
@@ -17294,8 +17570,8 @@ function WorkspacePicker({
|
|
|
17294
17570
|
}
|
|
17295
17571
|
},
|
|
17296
17572
|
children: [
|
|
17297
|
-
/* @__PURE__ */
|
|
17298
|
-
/* @__PURE__ */
|
|
17573
|
+
/* @__PURE__ */ jsx36(Chevron, { className: "w-4 h-4", color: T19.muted }),
|
|
17574
|
+
/* @__PURE__ */ jsx36(
|
|
17299
17575
|
ProfileAvatar,
|
|
17300
17576
|
{
|
|
17301
17577
|
name: section.organizationName,
|
|
@@ -17304,7 +17580,7 @@ function WorkspacePicker({
|
|
|
17304
17580
|
borderRadius: T19.rLg
|
|
17305
17581
|
}
|
|
17306
17582
|
),
|
|
17307
|
-
/* @__PURE__ */
|
|
17583
|
+
/* @__PURE__ */ jsx36(
|
|
17308
17584
|
"span",
|
|
17309
17585
|
{
|
|
17310
17586
|
className: "truncate flex-1 min-w-0",
|
|
@@ -17312,11 +17588,11 @@ function WorkspacePicker({
|
|
|
17312
17588
|
children: section.organizationName
|
|
17313
17589
|
}
|
|
17314
17590
|
),
|
|
17315
|
-
/* @__PURE__ */
|
|
17591
|
+
/* @__PURE__ */ jsx36("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs, flexShrink: 0 }, children: picked ? `${picked} of ${section.workspaces.length} selected` : `${section.workspaces.length} workspace${section.workspaces.length === 1 ? "" : "s"}` })
|
|
17316
17592
|
]
|
|
17317
17593
|
}
|
|
17318
17594
|
),
|
|
17319
|
-
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */
|
|
17595
|
+
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ jsx36(
|
|
17320
17596
|
"div",
|
|
17321
17597
|
{
|
|
17322
17598
|
style: {
|
|
@@ -17331,14 +17607,14 @@ function WorkspacePicker({
|
|
|
17331
17607
|
))
|
|
17332
17608
|
] }, section.organizationId);
|
|
17333
17609
|
};
|
|
17334
|
-
return /* @__PURE__ */
|
|
17610
|
+
return /* @__PURE__ */ jsxs33(
|
|
17335
17611
|
"div",
|
|
17336
17612
|
{
|
|
17337
17613
|
className: "flex flex-col w-full",
|
|
17338
17614
|
style: { maxWidth: 520, gap: T19.sp5xl, fontFamily: T19.font },
|
|
17339
17615
|
children: [
|
|
17340
|
-
/* @__PURE__ */
|
|
17341
|
-
/* @__PURE__ */
|
|
17616
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
|
|
17617
|
+
/* @__PURE__ */ jsx36(
|
|
17342
17618
|
"p",
|
|
17343
17619
|
{
|
|
17344
17620
|
style: {
|
|
@@ -17351,9 +17627,9 @@ function WorkspacePicker({
|
|
|
17351
17627
|
children: "Choose your workspaces"
|
|
17352
17628
|
}
|
|
17353
17629
|
),
|
|
17354
|
-
/* @__PURE__ */
|
|
17630
|
+
/* @__PURE__ */ jsx36("p", { style: { color: T19.muted, fontSize: T19.fsSm, lineHeight: T19.lhSm, margin: 0 }, children: hasWorkspaces || loading ? canCreate ? `Join one or more workspaces in ${orgLabel} as a member, or create your own.` : `Join one or more workspaces in ${orgLabel} as a member.` : canCreate ? `There are no workspaces to join in ${orgLabel} yet. Create one to get started.` : `There are no workspaces you can join in ${orgLabel} yet. Ask an admin${grouped ? "" : ` of ${orgLabel}`} to invite you to one.` })
|
|
17355
17631
|
] }),
|
|
17356
|
-
(loading || hasWorkspaces) && /* @__PURE__ */
|
|
17632
|
+
(loading || hasWorkspaces) && /* @__PURE__ */ jsx36(
|
|
17357
17633
|
"div",
|
|
17358
17634
|
{
|
|
17359
17635
|
className: "flex flex-col w-full overflow-y-auto",
|
|
@@ -17363,7 +17639,7 @@ function WorkspacePicker({
|
|
|
17363
17639
|
border: `1px solid ${T19.borderSubtle}`,
|
|
17364
17640
|
borderRadius: T19.r3xl
|
|
17365
17641
|
},
|
|
17366
|
-
children: loading ? /* @__PURE__ */
|
|
17642
|
+
children: loading ? /* @__PURE__ */ jsx36(
|
|
17367
17643
|
"div",
|
|
17368
17644
|
{
|
|
17369
17645
|
className: "flex items-center justify-center",
|
|
@@ -17373,9 +17649,9 @@ function WorkspacePicker({
|
|
|
17373
17649
|
) : grouped ? sections.map(groupSection) : sections[0].workspaces.map((w, index) => workspaceRow(w, index === 0))
|
|
17374
17650
|
}
|
|
17375
17651
|
),
|
|
17376
|
-
showCreate ? /* @__PURE__ */
|
|
17377
|
-
creatable.length > 1 && /* @__PURE__ */
|
|
17378
|
-
/* @__PURE__ */
|
|
17652
|
+
showCreate ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
|
|
17653
|
+
creatable.length > 1 && /* @__PURE__ */ jsxs33(Fragment18, { children: [
|
|
17654
|
+
/* @__PURE__ */ jsx36(
|
|
17379
17655
|
"label",
|
|
17380
17656
|
{
|
|
17381
17657
|
htmlFor: "workspace-picker-organization",
|
|
@@ -17383,7 +17659,7 @@ function WorkspacePicker({
|
|
|
17383
17659
|
children: "Organization"
|
|
17384
17660
|
}
|
|
17385
17661
|
),
|
|
17386
|
-
/* @__PURE__ */
|
|
17662
|
+
/* @__PURE__ */ jsx36(
|
|
17387
17663
|
"select",
|
|
17388
17664
|
{
|
|
17389
17665
|
id: "workspace-picker-organization",
|
|
@@ -17400,11 +17676,11 @@ function WorkspacePicker({
|
|
|
17400
17676
|
fontFamily: T19.font,
|
|
17401
17677
|
fontSize: T19.fsSm
|
|
17402
17678
|
},
|
|
17403
|
-
children: creatable.map((s) => /* @__PURE__ */
|
|
17679
|
+
children: creatable.map((s) => /* @__PURE__ */ jsx36("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
|
|
17404
17680
|
}
|
|
17405
17681
|
)
|
|
17406
17682
|
] }),
|
|
17407
|
-
/* @__PURE__ */
|
|
17683
|
+
/* @__PURE__ */ jsx36(
|
|
17408
17684
|
"label",
|
|
17409
17685
|
{
|
|
17410
17686
|
htmlFor: "workspace-picker-name",
|
|
@@ -17412,7 +17688,7 @@ function WorkspacePicker({
|
|
|
17412
17688
|
children: "New workspace name"
|
|
17413
17689
|
}
|
|
17414
17690
|
),
|
|
17415
|
-
/* @__PURE__ */
|
|
17691
|
+
/* @__PURE__ */ jsx36(
|
|
17416
17692
|
"input",
|
|
17417
17693
|
{
|
|
17418
17694
|
id: "workspace-picker-name",
|
|
@@ -17436,12 +17712,12 @@ function WorkspacePicker({
|
|
|
17436
17712
|
}
|
|
17437
17713
|
}
|
|
17438
17714
|
),
|
|
17439
|
-
/* @__PURE__ */
|
|
17715
|
+
/* @__PURE__ */ jsx36("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
|
|
17440
17716
|
["shared", "Shared", `Anyone in ${createLabel} can join`],
|
|
17441
17717
|
["private", "Private", "Invite only"]
|
|
17442
17718
|
].map(([value, label, hint]) => {
|
|
17443
17719
|
const active = visibility === value;
|
|
17444
|
-
return /* @__PURE__ */
|
|
17720
|
+
return /* @__PURE__ */ jsxs33(
|
|
17445
17721
|
"div",
|
|
17446
17722
|
{
|
|
17447
17723
|
role: "radio",
|
|
@@ -17462,7 +17738,7 @@ function WorkspacePicker({
|
|
|
17462
17738
|
border: `1px solid ${active ? T19.primary : T19.borderSubtle}`
|
|
17463
17739
|
},
|
|
17464
17740
|
children: [
|
|
17465
|
-
/* @__PURE__ */
|
|
17741
|
+
/* @__PURE__ */ jsx36(
|
|
17466
17742
|
"span",
|
|
17467
17743
|
{
|
|
17468
17744
|
style: {
|
|
@@ -17474,15 +17750,15 @@ function WorkspacePicker({
|
|
|
17474
17750
|
children: label
|
|
17475
17751
|
}
|
|
17476
17752
|
),
|
|
17477
|
-
/* @__PURE__ */
|
|
17753
|
+
/* @__PURE__ */ jsx36("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
|
|
17478
17754
|
]
|
|
17479
17755
|
},
|
|
17480
17756
|
value
|
|
17481
17757
|
);
|
|
17482
17758
|
}) }),
|
|
17483
|
-
/* @__PURE__ */
|
|
17484
|
-
hasWorkspaces && /* @__PURE__ */
|
|
17485
|
-
|
|
17759
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
|
|
17760
|
+
hasWorkspaces && /* @__PURE__ */ jsx36(
|
|
17761
|
+
ScButton20,
|
|
17486
17762
|
{
|
|
17487
17763
|
text: "Back",
|
|
17488
17764
|
variant: "tertiary",
|
|
@@ -17490,8 +17766,8 @@ function WorkspacePicker({
|
|
|
17490
17766
|
onClick: () => setCreating(false)
|
|
17491
17767
|
}
|
|
17492
17768
|
),
|
|
17493
|
-
/* @__PURE__ */
|
|
17494
|
-
|
|
17769
|
+
/* @__PURE__ */ jsx36(
|
|
17770
|
+
ScButton20,
|
|
17495
17771
|
{
|
|
17496
17772
|
text: busy ? "Creating\u2026" : "Create workspace",
|
|
17497
17773
|
variant: "primary",
|
|
@@ -17501,9 +17777,9 @@ function WorkspacePicker({
|
|
|
17501
17777
|
}
|
|
17502
17778
|
)
|
|
17503
17779
|
] })
|
|
17504
|
-
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */
|
|
17505
|
-
canCreate ? /* @__PURE__ */
|
|
17506
|
-
|
|
17780
|
+
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
|
|
17781
|
+
canCreate ? /* @__PURE__ */ jsx36(
|
|
17782
|
+
ScButton20,
|
|
17507
17783
|
{
|
|
17508
17784
|
text: "Create a workspace",
|
|
17509
17785
|
variant: "tertiary",
|
|
@@ -17511,9 +17787,9 @@ function WorkspacePicker({
|
|
|
17511
17787
|
state: loading || busy ? "disabled" : "default",
|
|
17512
17788
|
onClick: loading || busy ? void 0 : () => setCreating(true)
|
|
17513
17789
|
}
|
|
17514
|
-
) : /* @__PURE__ */
|
|
17515
|
-
/* @__PURE__ */
|
|
17516
|
-
|
|
17790
|
+
) : /* @__PURE__ */ jsx36("span", {}),
|
|
17791
|
+
/* @__PURE__ */ jsx36(
|
|
17792
|
+
ScButton20,
|
|
17517
17793
|
{
|
|
17518
17794
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} workspaces` : "Join workspace",
|
|
17519
17795
|
variant: "primary",
|
|
@@ -17529,9 +17805,9 @@ function WorkspacePicker({
|
|
|
17529
17805
|
}
|
|
17530
17806
|
|
|
17531
17807
|
// src/organization-picker.tsx
|
|
17532
|
-
import { useEffect as useEffect21, useState as
|
|
17533
|
-
import { ScButton as
|
|
17534
|
-
import { Fragment as
|
|
17808
|
+
import { useEffect as useEffect21, useState as useState28 } from "react";
|
|
17809
|
+
import { ScButton as ScButton21, ScCheckbox as ScCheckbox2 } from "@streamoid/ui";
|
|
17810
|
+
import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
17535
17811
|
var T20 = {
|
|
17536
17812
|
primary: "var(--alias-text---icons-primary)",
|
|
17537
17813
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17565,16 +17841,16 @@ function OrganizationPicker({
|
|
|
17565
17841
|
onJoin,
|
|
17566
17842
|
onCreate
|
|
17567
17843
|
}) {
|
|
17568
|
-
const [selected, setSelected] =
|
|
17844
|
+
const [selected, setSelected] = useState28(/* @__PURE__ */ new Set());
|
|
17569
17845
|
const toggle = (id) => setSelected((prev) => {
|
|
17570
17846
|
const next = new Set(prev);
|
|
17571
17847
|
if (next.has(id)) next.delete(id);
|
|
17572
17848
|
else next.add(id);
|
|
17573
17849
|
return next;
|
|
17574
17850
|
});
|
|
17575
|
-
const [name, setName] =
|
|
17576
|
-
const [type, setType] =
|
|
17577
|
-
const [busy, setBusy] =
|
|
17851
|
+
const [name, setName] = useState28(suggestedName);
|
|
17852
|
+
const [type, setType] = useState28("shared");
|
|
17853
|
+
const [busy, setBusy] = useState28(false);
|
|
17578
17854
|
useEffect21(() => {
|
|
17579
17855
|
setName((current) => current || suggestedName);
|
|
17580
17856
|
}, [suggestedName]);
|
|
@@ -17591,18 +17867,18 @@ function OrganizationPicker({
|
|
|
17591
17867
|
const heading = choosing ? "Choose your organization" : "Create your organization";
|
|
17592
17868
|
const subheading = choosing ? `${companyDomain ?? "Your company"} has more than one organization. Pick the ones to join as a member.` : publicDomain ? "Create an organization for your team. Or, if your team already uses Streamoid, ask them to invite you." : `Nobody from ${companyDomain ?? "your company"} has set up an organization you can join yet. Create one; you'll be its admin.`;
|
|
17593
17869
|
const textStyle = { margin: 0, fontFamily: T20.font };
|
|
17594
|
-
return /* @__PURE__ */
|
|
17870
|
+
return /* @__PURE__ */ jsxs34(
|
|
17595
17871
|
"div",
|
|
17596
17872
|
{
|
|
17597
17873
|
className: "flex flex-col w-full",
|
|
17598
17874
|
style: { maxWidth: 520, gap: T20.sp5xl, fontFamily: T20.font },
|
|
17599
17875
|
children: [
|
|
17600
|
-
/* @__PURE__ */
|
|
17601
|
-
/* @__PURE__ */
|
|
17602
|
-
/* @__PURE__ */
|
|
17876
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
|
|
17877
|
+
/* @__PURE__ */ jsx37("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
|
|
17878
|
+
/* @__PURE__ */ jsx37("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
|
|
17603
17879
|
] }),
|
|
17604
|
-
!loading && choosing && /* @__PURE__ */
|
|
17605
|
-
/* @__PURE__ */
|
|
17880
|
+
!loading && choosing && /* @__PURE__ */ jsxs34(Fragment19, { children: [
|
|
17881
|
+
/* @__PURE__ */ jsx37(
|
|
17606
17882
|
"div",
|
|
17607
17883
|
{
|
|
17608
17884
|
role: "group",
|
|
@@ -17615,7 +17891,7 @@ function OrganizationPicker({
|
|
|
17615
17891
|
},
|
|
17616
17892
|
children: organizations.map((org, index) => {
|
|
17617
17893
|
const checked = selected.has(org._id);
|
|
17618
|
-
return /* @__PURE__ */
|
|
17894
|
+
return /* @__PURE__ */ jsxs34(
|
|
17619
17895
|
"div",
|
|
17620
17896
|
{
|
|
17621
17897
|
role: "checkbox",
|
|
@@ -17636,11 +17912,11 @@ function OrganizationPicker({
|
|
|
17636
17912
|
}
|
|
17637
17913
|
},
|
|
17638
17914
|
children: [
|
|
17639
|
-
/* @__PURE__ */
|
|
17640
|
-
/* @__PURE__ */
|
|
17641
|
-
/* @__PURE__ */
|
|
17642
|
-
/* @__PURE__ */
|
|
17643
|
-
org.domain && /* @__PURE__ */
|
|
17915
|
+
/* @__PURE__ */ jsx37(ScCheckbox2, { checked }),
|
|
17916
|
+
/* @__PURE__ */ jsx37(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
|
|
17917
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col min-w-0", children: [
|
|
17918
|
+
/* @__PURE__ */ jsx37("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
|
|
17919
|
+
org.domain && /* @__PURE__ */ jsx37("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
|
|
17644
17920
|
] })
|
|
17645
17921
|
]
|
|
17646
17922
|
},
|
|
@@ -17649,8 +17925,8 @@ function OrganizationPicker({
|
|
|
17649
17925
|
})
|
|
17650
17926
|
}
|
|
17651
17927
|
),
|
|
17652
|
-
/* @__PURE__ */
|
|
17653
|
-
|
|
17928
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx37(
|
|
17929
|
+
ScButton21,
|
|
17654
17930
|
{
|
|
17655
17931
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} organizations` : "Join organization",
|
|
17656
17932
|
variant: "primary",
|
|
@@ -17660,10 +17936,10 @@ function OrganizationPicker({
|
|
|
17660
17936
|
}
|
|
17661
17937
|
) })
|
|
17662
17938
|
] }),
|
|
17663
|
-
!loading && !choosing && /* @__PURE__ */
|
|
17664
|
-
/* @__PURE__ */
|
|
17665
|
-
/* @__PURE__ */
|
|
17666
|
-
/* @__PURE__ */
|
|
17939
|
+
!loading && !choosing && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
|
|
17940
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
17941
|
+
/* @__PURE__ */ jsx37("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
|
|
17942
|
+
/* @__PURE__ */ jsx37(
|
|
17667
17943
|
"input",
|
|
17668
17944
|
{
|
|
17669
17945
|
id: "organization-picker-name",
|
|
@@ -17685,14 +17961,14 @@ function OrganizationPicker({
|
|
|
17685
17961
|
}
|
|
17686
17962
|
)
|
|
17687
17963
|
] }),
|
|
17688
|
-
!publicDomain && /* @__PURE__ */
|
|
17689
|
-
/* @__PURE__ */
|
|
17690
|
-
/* @__PURE__ */
|
|
17964
|
+
!publicDomain && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
17965
|
+
/* @__PURE__ */ jsx37("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
|
|
17966
|
+
/* @__PURE__ */ jsx37("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
|
|
17691
17967
|
["shared", "Shared"],
|
|
17692
17968
|
["private", "Private"]
|
|
17693
17969
|
].map(([value, label]) => {
|
|
17694
17970
|
const active = type === value;
|
|
17695
|
-
return /* @__PURE__ */
|
|
17971
|
+
return /* @__PURE__ */ jsx37(
|
|
17696
17972
|
"div",
|
|
17697
17973
|
{
|
|
17698
17974
|
role: "radio",
|
|
@@ -17711,12 +17987,12 @@ function OrganizationPicker({
|
|
|
17711
17987
|
borderRadius: T20.r3xl,
|
|
17712
17988
|
border: `1px solid ${active ? T20.primary : T20.borderSubtle}`
|
|
17713
17989
|
},
|
|
17714
|
-
children: /* @__PURE__ */
|
|
17990
|
+
children: /* @__PURE__ */ jsx37("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
|
|
17715
17991
|
},
|
|
17716
17992
|
value
|
|
17717
17993
|
);
|
|
17718
17994
|
}) }),
|
|
17719
|
-
/* @__PURE__ */
|
|
17995
|
+
/* @__PURE__ */ jsx37(
|
|
17720
17996
|
"span",
|
|
17721
17997
|
{
|
|
17722
17998
|
"data-testid": "organization-visibility-message",
|
|
@@ -17726,8 +18002,8 @@ function OrganizationPicker({
|
|
|
17726
18002
|
}
|
|
17727
18003
|
)
|
|
17728
18004
|
] }),
|
|
17729
|
-
/* @__PURE__ */
|
|
17730
|
-
|
|
18005
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx37(
|
|
18006
|
+
ScButton21,
|
|
17731
18007
|
{
|
|
17732
18008
|
text: busy ? "Creating\u2026" : "Create organization",
|
|
17733
18009
|
variant: "primary",
|
|
@@ -17743,12 +18019,12 @@ function OrganizationPicker({
|
|
|
17743
18019
|
}
|
|
17744
18020
|
|
|
17745
18021
|
// src/use-billing-entitlement.ts
|
|
17746
|
-
import { useEffect as useEffect22, useRef as useRef13, useState as
|
|
18022
|
+
import { useEffect as useEffect22, useRef as useRef13, useState as useState29 } from "react";
|
|
17747
18023
|
function useBillingEntitlement(fetchCurrentPlan, key) {
|
|
17748
18024
|
const fetchRef = useRef13(fetchCurrentPlan);
|
|
17749
18025
|
fetchRef.current = fetchCurrentPlan;
|
|
17750
|
-
const [state, setState] =
|
|
17751
|
-
const [loading, setLoading] =
|
|
18026
|
+
const [state, setState] = useState29(null);
|
|
18027
|
+
const [loading, setLoading] = useState29(false);
|
|
17752
18028
|
useEffect22(() => {
|
|
17753
18029
|
const fetch2 = fetchRef.current;
|
|
17754
18030
|
setState(null);
|
|
@@ -17834,18 +18110,18 @@ var app_settings_page_default = {
|
|
|
17834
18110
|
};
|
|
17835
18111
|
|
|
17836
18112
|
// src/app-settings-page.tsx
|
|
17837
|
-
import { Fragment as
|
|
18113
|
+
import { Fragment as Fragment20, jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
17838
18114
|
function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }) {
|
|
17839
|
-
return /* @__PURE__ */
|
|
17840
|
-
/* @__PURE__ */
|
|
17841
|
-
/* @__PURE__ */
|
|
17842
|
-
/* @__PURE__ */
|
|
18115
|
+
return /* @__PURE__ */ jsxs35("header", { className: app_settings_page_default.header, children: [
|
|
18116
|
+
/* @__PURE__ */ jsx38("h1", { children: "App settings" }),
|
|
18117
|
+
/* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.actions, children: [
|
|
18118
|
+
/* @__PURE__ */ jsx38("a", { href: administrationHref, onClick: (event) => {
|
|
17843
18119
|
if (onOpenAdministration && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17844
18120
|
event.preventDefault();
|
|
17845
18121
|
onOpenAdministration();
|
|
17846
18122
|
}
|
|
17847
18123
|
}, children: "Account and workspace settings" }),
|
|
17848
|
-
onClose ? /* @__PURE__ */
|
|
18124
|
+
onClose ? /* @__PURE__ */ jsx38("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ jsx38(SiconX, { size: 20, "aria-hidden": "true" }) }) : null
|
|
17849
18125
|
] })
|
|
17850
18126
|
] });
|
|
17851
18127
|
}
|
|
@@ -17857,45 +18133,45 @@ function AppSettingsPage({
|
|
|
17857
18133
|
emptyDescription = "Account, workspace and organization settings are available above.",
|
|
17858
18134
|
children
|
|
17859
18135
|
}) {
|
|
17860
|
-
return /* @__PURE__ */
|
|
17861
|
-
/* @__PURE__ */
|
|
17862
|
-
children ?? /* @__PURE__ */
|
|
17863
|
-
/* @__PURE__ */
|
|
17864
|
-
/* @__PURE__ */
|
|
18136
|
+
return /* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.page, children: [
|
|
18137
|
+
/* @__PURE__ */ jsx38(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
|
|
18138
|
+
children ?? /* @__PURE__ */ jsxs35("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
|
|
18139
|
+
/* @__PURE__ */ jsx38("h2", { children: emptyTitle }),
|
|
18140
|
+
/* @__PURE__ */ jsx38("p", { children: emptyDescription })
|
|
17865
18141
|
] })
|
|
17866
18142
|
] });
|
|
17867
18143
|
}
|
|
17868
18144
|
function AppSettingsSection({ title, action, children }) {
|
|
17869
|
-
return /* @__PURE__ */
|
|
17870
|
-
/* @__PURE__ */
|
|
17871
|
-
/* @__PURE__ */
|
|
17872
|
-
action ? /* @__PURE__ */
|
|
18145
|
+
return /* @__PURE__ */ jsxs35("section", { className: app_settings_page_default.section, "aria-label": title, children: [
|
|
18146
|
+
/* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.sectionHeader, children: [
|
|
18147
|
+
/* @__PURE__ */ jsx38("h2", { children: title }),
|
|
18148
|
+
action ? /* @__PURE__ */ jsx38("div", { className: app_settings_page_default.sectionAction, children: action }) : null
|
|
17873
18149
|
] }),
|
|
17874
|
-
/* @__PURE__ */
|
|
18150
|
+
/* @__PURE__ */ jsx38("div", { children })
|
|
17875
18151
|
] });
|
|
17876
18152
|
}
|
|
17877
18153
|
function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }) {
|
|
17878
18154
|
const reasonId = useId2();
|
|
17879
|
-
const content = /* @__PURE__ */
|
|
17880
|
-
/* @__PURE__ */
|
|
17881
|
-
/* @__PURE__ */
|
|
17882
|
-
description ? /* @__PURE__ */
|
|
18155
|
+
const content = /* @__PURE__ */ jsxs35(Fragment20, { children: [
|
|
18156
|
+
/* @__PURE__ */ jsxs35("span", { className: app_settings_page_default.rowCopy, children: [
|
|
18157
|
+
/* @__PURE__ */ jsx38("span", { className: app_settings_page_default.rowTitle, children: title }),
|
|
18158
|
+
description ? /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.rowDescription, children: description }) : null
|
|
17883
18159
|
] }),
|
|
17884
|
-
summary || trailing || href || onClick ? /* @__PURE__ */
|
|
18160
|
+
summary || trailing || href || onClick ? /* @__PURE__ */ jsxs35("span", { className: app_settings_page_default.rowEnd, children: [
|
|
17885
18161
|
summary,
|
|
17886
|
-
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */
|
|
18162
|
+
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ jsx38(SiconArrowRight2, { size: 18, "aria-hidden": "true" }) : null)
|
|
17887
18163
|
] }) : null,
|
|
17888
|
-
disabledReason ? /* @__PURE__ */
|
|
18164
|
+
disabledReason ? /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
|
|
17889
18165
|
] });
|
|
17890
18166
|
const props = { className: app_settings_page_default.row, "aria-label": ariaLabel, "aria-describedby": disabledReason ? reasonId : void 0 };
|
|
17891
|
-
if (href && !disabled) return /* @__PURE__ */
|
|
18167
|
+
if (href && !disabled) return /* @__PURE__ */ jsx38("a", { ...props, href, onClick: (event) => {
|
|
17892
18168
|
if (onClick && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17893
18169
|
event.preventDefault();
|
|
17894
18170
|
onClick();
|
|
17895
18171
|
}
|
|
17896
18172
|
}, children: content });
|
|
17897
|
-
if (onClick || disabled) return /* @__PURE__ */
|
|
17898
|
-
return /* @__PURE__ */
|
|
18173
|
+
if (onClick || disabled) return /* @__PURE__ */ jsx38("button", { ...props, type: "button", disabled, onClick, children: content });
|
|
18174
|
+
return /* @__PURE__ */ jsx38("div", { ...props, children: content });
|
|
17899
18175
|
}
|
|
17900
18176
|
export {
|
|
17901
18177
|
APP_KEYS,
|
|
@@ -17925,6 +18201,7 @@ export {
|
|
|
17925
18201
|
MemberListToolbar,
|
|
17926
18202
|
OrganizationContent,
|
|
17927
18203
|
OrganizationIntegrationsContent,
|
|
18204
|
+
OrganizationLoginMethodsContent,
|
|
17928
18205
|
OrganizationMemberModal,
|
|
17929
18206
|
OrganizationModal,
|
|
17930
18207
|
OrganizationPicker,
|
|
@@ -17998,6 +18275,7 @@ export {
|
|
|
17998
18275
|
limitSourceLabel,
|
|
17999
18276
|
loadCurrentPlan,
|
|
18000
18277
|
loadWorkspaceOrganization,
|
|
18278
|
+
loginMethodsSwitchState,
|
|
18001
18279
|
memberRoleUpdate,
|
|
18002
18280
|
minPoolEndDate,
|
|
18003
18281
|
minimumCreditLimit,
|