@streamoid/settings 0.19.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +94 -3
- package/dist/index.d.ts +94 -3
- package/dist/index.js +667 -384
- package/dist/index.mjs +627 -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,275 @@ 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 ssoLabel(displayName) {
|
|
14892
|
+
const name = displayName.trim();
|
|
14893
|
+
return /\bSSO\b/i.test(name) ? name : `${name} SSO`;
|
|
14894
|
+
}
|
|
14895
|
+
function loginMethodsSwitchState(data) {
|
|
14896
|
+
const hasConnection = !!data.connection;
|
|
14897
|
+
let emailHint = null;
|
|
14898
|
+
if (data.emailCode) {
|
|
14899
|
+
if (!hasConnection) emailHint = null;
|
|
14900
|
+
else if (!data.sso) emailHint = AT_LEAST_ONE_HINT;
|
|
14901
|
+
else if (data.constraints.selfLockoutGuard) emailHint = SELF_GUARD_HINT;
|
|
14902
|
+
}
|
|
14903
|
+
const emailLocked = data.emailCode && (!data.constraints.canDisableEmailCode || data.constraints.selfLockoutGuard);
|
|
14904
|
+
let ssoHint = null;
|
|
14905
|
+
if (!hasConnection) ssoHint = NO_SSO_HINT;
|
|
14906
|
+
else if (data.sso && !data.emailCode) ssoHint = AT_LEAST_ONE_HINT;
|
|
14907
|
+
const ssoLocked = !hasConnection || data.sso && !data.emailCode;
|
|
14908
|
+
return {
|
|
14909
|
+
emailCode: { checked: data.emailCode, disabled: emailLocked, hint: emailHint },
|
|
14910
|
+
sso: { checked: data.sso, disabled: ssoLocked, hint: ssoHint }
|
|
14911
|
+
};
|
|
14912
|
+
}
|
|
14913
|
+
var domainsLabel = (domains) => domains.length ? domains.map((d) => `@${d}`).join(" or ") : "your organization's";
|
|
14914
|
+
var memberCsv = (members) => toCsv([["Name", "Email", "Role"], ...members.map((m) => [m.name ?? "", m.email, m.role])]);
|
|
14915
|
+
function SwitchRow({
|
|
14916
|
+
title,
|
|
14917
|
+
description,
|
|
14918
|
+
state,
|
|
14919
|
+
busy,
|
|
14920
|
+
onToggle
|
|
14921
|
+
}) {
|
|
14922
|
+
const disabled = state.disabled || busy;
|
|
14923
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex items-start w-full", style: { gap: T15.spXl }, children: [
|
|
14924
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
|
|
14925
|
+
/* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: title }),
|
|
14926
|
+
/* @__PURE__ */ jsx34(Muted, { children: description }),
|
|
14927
|
+
state.hint && /* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: state.hint })
|
|
14928
|
+
] }),
|
|
14929
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
|
|
14930
|
+
/* @__PURE__ */ jsx34("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: state.checked ? "On" : "Off" }),
|
|
14931
|
+
/* @__PURE__ */ jsx34("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx34(
|
|
14932
|
+
ScToggleSwitch2,
|
|
14933
|
+
{
|
|
14934
|
+
checked: state.checked,
|
|
14935
|
+
disabled,
|
|
14936
|
+
onToggle,
|
|
14937
|
+
role: "switch",
|
|
14938
|
+
"aria-checked": state.checked,
|
|
14939
|
+
"aria-disabled": disabled,
|
|
14940
|
+
"aria-label": title,
|
|
14941
|
+
tabIndex: 0,
|
|
14942
|
+
onKeyDown: (event) => {
|
|
14943
|
+
if ((event.key === " " || event.key === "Enter") && !disabled) {
|
|
14944
|
+
event.preventDefault();
|
|
14945
|
+
onToggle(!state.checked);
|
|
14946
|
+
}
|
|
14947
|
+
}
|
|
14948
|
+
}
|
|
14949
|
+
) })
|
|
14950
|
+
] })
|
|
14951
|
+
] });
|
|
14952
|
+
}
|
|
14953
|
+
function MemberList({ members }) {
|
|
14954
|
+
return /* @__PURE__ */ jsx34(
|
|
14955
|
+
"ul",
|
|
14956
|
+
{
|
|
14957
|
+
"aria-label": "Not signed in with SSO yet",
|
|
14958
|
+
className: "flex flex-col w-full",
|
|
14959
|
+
style: { maxHeight: 240, overflowY: "auto", border: `1px solid ${T15.borderSubtle}`, borderRadius: T15.rXl },
|
|
14960
|
+
children: members.map((m) => /* @__PURE__ */ jsxs31(
|
|
14961
|
+
"li",
|
|
14962
|
+
{
|
|
14963
|
+
className: "flex items-center w-full",
|
|
14964
|
+
style: { gap: T15.spMd, padding: `${T15.spMd} ${T15.spXl}`, borderBottom: `1px solid ${T15.borderSubtle}` },
|
|
14965
|
+
children: [
|
|
14966
|
+
/* @__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 }),
|
|
14967
|
+
/* @__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 }),
|
|
14968
|
+
/* @__PURE__ */ jsx34("span", { className: "shrink-0", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted, textTransform: "capitalize" }, children: m.role })
|
|
14969
|
+
]
|
|
14970
|
+
},
|
|
14971
|
+
m.userId
|
|
14972
|
+
))
|
|
14973
|
+
}
|
|
14974
|
+
);
|
|
14975
|
+
}
|
|
14976
|
+
var card = {
|
|
14977
|
+
gap: T15.spXl,
|
|
14978
|
+
padding: T15.sp3xl,
|
|
14979
|
+
backgroundColor: T15.surfaceBase,
|
|
14980
|
+
border: `1px solid ${T15.borderSubtle}`,
|
|
14981
|
+
borderRadius: T15.r3xl
|
|
14982
|
+
};
|
|
14983
|
+
function OrganizationLoginMethodsContent() {
|
|
14984
|
+
const { loginMethods, organization, toast } = useSettingsAdapters();
|
|
14985
|
+
const current = organization.current;
|
|
14986
|
+
const orgId = current?.id ?? null;
|
|
14987
|
+
const canLoad = !!loginMethods && !!orgId && current?.role === "admin";
|
|
14988
|
+
const data = useLoad(
|
|
14989
|
+
canLoad ? orgId : null,
|
|
14990
|
+
(signal) => loginMethods.get(orgId, signal),
|
|
14991
|
+
"Couldn't load this organization's login methods."
|
|
14992
|
+
);
|
|
14993
|
+
const [saving, setSaving] = useState25(false);
|
|
14994
|
+
const [confirmEmailOff, setConfirmEmailOff] = useState25(false);
|
|
14995
|
+
if (!canLoad) {
|
|
14996
|
+
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." }) });
|
|
14997
|
+
}
|
|
14998
|
+
const value = data.value;
|
|
14999
|
+
const state = value ? loginMethodsSwitchState(value) : null;
|
|
15000
|
+
const sso = ssoLabel(value?.connection?.displayName ?? "company");
|
|
15001
|
+
const domains = domainsLabel(value?.coveredDomains ?? []);
|
|
15002
|
+
const notYet = value?.readiness?.notYet ?? [];
|
|
15003
|
+
async function save(next) {
|
|
15004
|
+
if (saving || !value) return;
|
|
15005
|
+
setSaving(true);
|
|
15006
|
+
try {
|
|
15007
|
+
const result = await loginMethods.update(orgId, next);
|
|
15008
|
+
data.setValue(result);
|
|
15009
|
+
toast.success("Login methods updated. Changes apply within a minute.");
|
|
15010
|
+
setConfirmEmailOff(false);
|
|
15011
|
+
} catch (cause) {
|
|
15012
|
+
toast.error(errorMessage(cause, { method: "PUT" }));
|
|
15013
|
+
} finally {
|
|
15014
|
+
setSaving(false);
|
|
15015
|
+
}
|
|
15016
|
+
}
|
|
15017
|
+
async function copyEmails() {
|
|
15018
|
+
try {
|
|
15019
|
+
await navigator.clipboard.writeText(notYet.map((m) => m.email).join("\n"));
|
|
15020
|
+
toast.success(`Copied ${notYet.length} email ${notYet.length === 1 ? "address" : "addresses"}`);
|
|
15021
|
+
} catch {
|
|
15022
|
+
toast.error("Couldn't copy to the clipboard.");
|
|
15023
|
+
}
|
|
15024
|
+
}
|
|
15025
|
+
function downloadCsv() {
|
|
15026
|
+
const blob = new Blob([memberCsv(notYet)], { type: "text/csv;charset=utf-8;" });
|
|
15027
|
+
const url = URL.createObjectURL(blob);
|
|
15028
|
+
const link = document.createElement("a");
|
|
15029
|
+
link.href = url;
|
|
15030
|
+
link.download = `not-signed-in-with-sso-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`;
|
|
15031
|
+
link.click();
|
|
15032
|
+
URL.revokeObjectURL(url);
|
|
15033
|
+
}
|
|
15034
|
+
return /* @__PURE__ */ jsxs31(
|
|
15035
|
+
"div",
|
|
15036
|
+
{
|
|
15037
|
+
className: "flex flex-col flex-1 min-w-0 min-h-0 h-full overflow-y-auto",
|
|
15038
|
+
style: { gap: T15.sp3xl, paddingBottom: T15.sp6xl },
|
|
15039
|
+
children: [
|
|
15040
|
+
/* @__PURE__ */ jsx34(ScopeHeader, { kind: "organization", name: current?.name, imageUrl: current?.imageUrl, role: current?.role }),
|
|
15041
|
+
data.error && /* @__PURE__ */ jsx34(LoadError, { message: data.error, onRetry: data.retry }),
|
|
15042
|
+
!value && !data.error && /* @__PURE__ */ jsx34(Spinner, {}),
|
|
15043
|
+
value && state && /* @__PURE__ */ jsxs31(Fragment15, { children: [
|
|
15044
|
+
value.failOpen && /* @__PURE__ */ jsxs31("div", { role: "alert", className: "flex flex-col w-full", style: { ...card, gap: T15.spXs }, children: [
|
|
15045
|
+
/* @__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." }),
|
|
15046
|
+
/* @__PURE__ */ jsx34(Muted, { children: "Your organization is set to company SSO only. Contact Streamoid to fix the SSO connection." })
|
|
15047
|
+
] }),
|
|
15048
|
+
/* @__PURE__ */ jsxs31("section", { "aria-label": "Login methods", className: "flex flex-col w-full shrink-0", style: card, children: [
|
|
15049
|
+
/* @__PURE__ */ jsx34(
|
|
15050
|
+
SwitchRow,
|
|
15051
|
+
{
|
|
15052
|
+
title: "Email code",
|
|
15053
|
+
description: `Anyone with an ${domains} address gets a one-time code by email. Google and Microsoft sign-in follow this switch.`,
|
|
15054
|
+
state: state.emailCode,
|
|
15055
|
+
busy: saving,
|
|
15056
|
+
onToggle: (next) => next ? save({ emailCode: true, sso: value.sso }) : setConfirmEmailOff(true)
|
|
15057
|
+
}
|
|
15058
|
+
),
|
|
15059
|
+
/* @__PURE__ */ jsx34("div", { style: { borderTop: `1px solid ${T15.borderSubtle}` } }),
|
|
15060
|
+
/* @__PURE__ */ jsx34(
|
|
15061
|
+
SwitchRow,
|
|
15062
|
+
{
|
|
15063
|
+
title: "Company SSO",
|
|
15064
|
+
description: `People your IT team has given access sign in through ${sso}.`,
|
|
15065
|
+
state: state.sso,
|
|
15066
|
+
busy: saving,
|
|
15067
|
+
onToggle: (next) => save({ emailCode: value.emailCode, sso: next })
|
|
15068
|
+
}
|
|
15069
|
+
)
|
|
15070
|
+
] }),
|
|
15071
|
+
value.readiness && /* @__PURE__ */ jsxs31("section", { "aria-label": "SSO readiness", className: "flex flex-col w-full shrink-0", style: card, children: [
|
|
15072
|
+
/* @__PURE__ */ jsxs31("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: [
|
|
15073
|
+
value.readiness.signedInWithSso,
|
|
15074
|
+
" of ",
|
|
15075
|
+
value.readiness.affectedTotal,
|
|
15076
|
+
" ",
|
|
15077
|
+
value.readiness.affectedTotal === 1 ? "person" : "people",
|
|
15078
|
+
" at ",
|
|
15079
|
+
domains,
|
|
15080
|
+
" have signed in with SSO.",
|
|
15081
|
+
notYet.length > 0 ? ` ${notYet.length} haven't yet.` : ""
|
|
15082
|
+
] }),
|
|
15083
|
+
notYet.length > 0 ? /* @__PURE__ */ jsxs31(Fragment15, { children: [
|
|
15084
|
+
/* @__PURE__ */ jsxs31(Muted, { children: [
|
|
15085
|
+
"Send this list to your IT team to give them access to ",
|
|
15086
|
+
sso,
|
|
15087
|
+
". When it's empty, it's safe to turn email codes off."
|
|
15088
|
+
] }),
|
|
15089
|
+
/* @__PURE__ */ jsx34(MemberList, { members: notYet }),
|
|
15090
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center", style: { gap: T15.spMd }, children: [
|
|
15091
|
+
/* @__PURE__ */ jsx34(ScButton18, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }),
|
|
15092
|
+
/* @__PURE__ */ jsx34(ScButton18, { text: "Download CSV", variant: "outline", size: "sm", onClick: downloadCsv })
|
|
15093
|
+
] })
|
|
15094
|
+
] }) : /* @__PURE__ */ jsx34(Muted, { children: "Everyone has signed in with SSO at least once." }),
|
|
15095
|
+
value.readiness.notAffected > 0 && /* @__PURE__ */ jsxs31(Muted, { children: [
|
|
15096
|
+
value.readiness.notAffected,
|
|
15097
|
+
" ",
|
|
15098
|
+
value.readiness.notAffected === 1 ? "member uses" : "members use",
|
|
15099
|
+
" an address on another domain and ",
|
|
15100
|
+
value.readiness.notAffected === 1 ? "isn't" : "aren't",
|
|
15101
|
+
" affected by these switches."
|
|
15102
|
+
] })
|
|
15103
|
+
] }),
|
|
15104
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
|
|
15105
|
+
/* @__PURE__ */ jsxs31(Muted, { children: [
|
|
15106
|
+
"Changes apply within a minute. ",
|
|
15107
|
+
SESSION_NOTE
|
|
15108
|
+
] }),
|
|
15109
|
+
/* @__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." })
|
|
15110
|
+
] }),
|
|
15111
|
+
confirmEmailOff && /* @__PURE__ */ jsx34(
|
|
15112
|
+
ConfirmActionModal,
|
|
15113
|
+
{
|
|
15114
|
+
title: "Turn off email codes?",
|
|
15115
|
+
body: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col", style: { gap: T15.spMd }, children: [
|
|
15116
|
+
notYet.length > 0 ? /* @__PURE__ */ jsxs31(Fragment15, { children: [
|
|
15117
|
+
/* @__PURE__ */ jsxs31("span", { children: [
|
|
15118
|
+
"These ",
|
|
15119
|
+
notYet.length,
|
|
15120
|
+
" ",
|
|
15121
|
+
notYet.length === 1 ? "person has" : "people have",
|
|
15122
|
+
" never signed in with",
|
|
15123
|
+
" ",
|
|
15124
|
+
sso,
|
|
15125
|
+
" and will be locked out until IT gives them access:"
|
|
15126
|
+
] }),
|
|
15127
|
+
/* @__PURE__ */ jsx34(MemberList, { members: notYet }),
|
|
15128
|
+
/* @__PURE__ */ jsx34("div", { children: /* @__PURE__ */ jsx34(ScButton18, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }) })
|
|
15129
|
+
] }) : /* @__PURE__ */ jsxs31("span", { children: [
|
|
15130
|
+
"Everyone at ",
|
|
15131
|
+
domains,
|
|
15132
|
+
" will have to sign in with ",
|
|
15133
|
+
sso,
|
|
15134
|
+
". Google and Microsoft sign-in turn off too."
|
|
15135
|
+
] }),
|
|
15136
|
+
/* @__PURE__ */ jsx34("span", { children: SESSION_NOTE })
|
|
15137
|
+
] }),
|
|
15138
|
+
confirmText: "Turn off email codes",
|
|
15139
|
+
busyText: "Turning off\u2026",
|
|
15140
|
+
onClose: () => setConfirmEmailOff(false),
|
|
15141
|
+
onConfirm: () => save({ emailCode: false, sso: value.sso })
|
|
15142
|
+
}
|
|
15143
|
+
)
|
|
15144
|
+
] })
|
|
15145
|
+
]
|
|
15146
|
+
}
|
|
15147
|
+
);
|
|
15148
|
+
}
|
|
15149
|
+
|
|
14877
15150
|
// src/settings-content.tsx
|
|
14878
|
-
import { Fragment as
|
|
15151
|
+
import { Fragment as Fragment17, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
14879
15152
|
function deriveInitials(name) {
|
|
14880
15153
|
return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
14881
15154
|
}
|
|
@@ -14911,7 +15184,7 @@ function SettingsNavItem({
|
|
|
14911
15184
|
onTabChange
|
|
14912
15185
|
}) {
|
|
14913
15186
|
const isActive = activeTab === tab;
|
|
14914
|
-
return /* @__PURE__ */
|
|
15187
|
+
return /* @__PURE__ */ jsx35(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
|
|
14915
15188
|
ScSidebarMenu,
|
|
14916
15189
|
{
|
|
14917
15190
|
icon: icon(isActive ? PRIMARY_COLOR3 : MUTED_COLOR2),
|
|
@@ -14941,9 +15214,10 @@ function SettingsNav({
|
|
|
14941
15214
|
isWorkspaceAdmin,
|
|
14942
15215
|
showConnectedApps = false,
|
|
14943
15216
|
showIntegrations = false,
|
|
15217
|
+
showLoginMethods = false,
|
|
14944
15218
|
showReferral = false
|
|
14945
15219
|
}) {
|
|
14946
|
-
const item = (tab, icon) => /* @__PURE__ */
|
|
15220
|
+
const item = (tab, icon) => /* @__PURE__ */ jsx35(
|
|
14947
15221
|
SettingsNavItem,
|
|
14948
15222
|
{
|
|
14949
15223
|
tab,
|
|
@@ -14953,7 +15227,7 @@ function SettingsNav({
|
|
|
14953
15227
|
onTabChange
|
|
14954
15228
|
}
|
|
14955
15229
|
);
|
|
14956
|
-
return /* @__PURE__ */
|
|
15230
|
+
return /* @__PURE__ */ jsxs32(
|
|
14957
15231
|
"div",
|
|
14958
15232
|
{
|
|
14959
15233
|
className: "flex flex-col items-start shrink-0 relative overflow-y-auto",
|
|
@@ -14976,43 +15250,44 @@ function SettingsNav({
|
|
|
14976
15250
|
gap: "var(--spacing-5xl)"
|
|
14977
15251
|
},
|
|
14978
15252
|
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__ */
|
|
15253
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15254
|
+
/* @__PURE__ */ jsx35("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
|
|
15255
|
+
item("profile", (color) => /* @__PURE__ */ jsx35(SiconUser, { className: "w-5 h-5", color })),
|
|
15256
|
+
item("workspaceList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color })),
|
|
15257
|
+
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ jsx35(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15258
|
+
showReferral && item("referral", (color) => /* @__PURE__ */ jsx35(SiconReferral, { className: "w-5 h-5", color }))
|
|
14985
15259
|
] }),
|
|
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__ */
|
|
15260
|
+
/* @__PURE__ */ jsx35(ScHDivider, {}),
|
|
15261
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15262
|
+
/* @__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" }),
|
|
15263
|
+
item("workspace", (color) => /* @__PURE__ */ jsx35(SiconSettings2, { className: "w-5 h-5", color })),
|
|
15264
|
+
item("workspaceMembers", (color) => /* @__PURE__ */ jsx35(SiconTeam, { className: "w-5 h-5", color })),
|
|
15265
|
+
isWorkspaceAdmin && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
15266
|
+
item("billing", (color) => /* @__PURE__ */ jsx35(SiconBilling, { className: "w-5 h-5", color })),
|
|
15267
|
+
item("apikey", (color) => /* @__PURE__ */ jsx35(SiconKey_default, { className: "w-5 h-5", color }))
|
|
14994
15268
|
] }),
|
|
14995
|
-
!isWorkspaceAdmin && /* @__PURE__ */
|
|
15269
|
+
!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
15270
|
] }),
|
|
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
|
-
|
|
15271
|
+
/* @__PURE__ */ jsx35(ScHDivider, {}),
|
|
15272
|
+
/* @__PURE__ */ jsx35("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
15273
|
+
/* @__PURE__ */ jsx35("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
|
|
15274
|
+
item("organizationList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color })),
|
|
15275
|
+
item("organization", (color) => /* @__PURE__ */ jsx35(SiconTeam, { className: "w-5 h-5", color })),
|
|
15276
|
+
item("organizationWorkspaces", (color) => /* @__PURE__ */ jsx35(SiconWorkspace2, { className: "w-5 h-5", color })),
|
|
15277
|
+
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ jsx35(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15278
|
+
showLoginMethods && item("organizationLoginMethods", (color) => /* @__PURE__ */ jsx35(SiconLock, { className: "w-5 h-5", color }))
|
|
15279
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
15280
|
+
/* @__PURE__ */ jsx35(
|
|
15006
15281
|
SettingsNavItem,
|
|
15007
15282
|
{
|
|
15008
15283
|
tab: "organization",
|
|
15009
15284
|
label: "Organization",
|
|
15010
|
-
icon: (color) => /* @__PURE__ */
|
|
15285
|
+
icon: (color) => /* @__PURE__ */ jsx35(SiconGlobe3, { className: "w-5 h-5", color }),
|
|
15011
15286
|
activeTab,
|
|
15012
15287
|
onTabChange
|
|
15013
15288
|
}
|
|
15014
15289
|
),
|
|
15015
|
-
item("organizationList", (color) => /* @__PURE__ */
|
|
15290
|
+
item("organizationList", (color) => /* @__PURE__ */ jsx35(SiconSwitch, { className: "w-5 h-5", color }))
|
|
15016
15291
|
] }) })
|
|
15017
15292
|
]
|
|
15018
15293
|
}
|
|
@@ -15021,7 +15296,7 @@ function SettingsNav({
|
|
|
15021
15296
|
var SPECIALIZATION_ICON_SIZE = 24;
|
|
15022
15297
|
function SpecializationIcon({ iconUrl }) {
|
|
15023
15298
|
if (iconUrl) {
|
|
15024
|
-
return /* @__PURE__ */
|
|
15299
|
+
return /* @__PURE__ */ jsx35(
|
|
15025
15300
|
"img",
|
|
15026
15301
|
{
|
|
15027
15302
|
src: iconUrl,
|
|
@@ -15034,7 +15309,7 @@ function SpecializationIcon({ iconUrl }) {
|
|
|
15034
15309
|
}
|
|
15035
15310
|
);
|
|
15036
15311
|
}
|
|
15037
|
-
return /* @__PURE__ */
|
|
15312
|
+
return /* @__PURE__ */ jsx35(
|
|
15038
15313
|
SiconBolt,
|
|
15039
15314
|
{
|
|
15040
15315
|
style: {
|
|
@@ -15066,9 +15341,9 @@ function SpecializationDropdown({
|
|
|
15066
15341
|
disabled
|
|
15067
15342
|
}) {
|
|
15068
15343
|
const { auth } = useSettingsAdapters();
|
|
15069
|
-
const [open, setOpen] =
|
|
15344
|
+
const [open, setOpen] = useState26(false);
|
|
15070
15345
|
const containerRef = useRef12(null);
|
|
15071
|
-
const [options, setOptions] =
|
|
15346
|
+
const [options, setOptions] = useState26([]);
|
|
15072
15347
|
useEffect20(() => {
|
|
15073
15348
|
if (!auth.getSpecializations) return;
|
|
15074
15349
|
let cancelled = false;
|
|
@@ -15107,15 +15382,15 @@ function SpecializationDropdown({
|
|
|
15107
15382
|
};
|
|
15108
15383
|
}, [open]);
|
|
15109
15384
|
const selected = options.find((o) => o.id === value);
|
|
15110
|
-
return /* @__PURE__ */
|
|
15385
|
+
return /* @__PURE__ */ jsxs32(
|
|
15111
15386
|
"div",
|
|
15112
15387
|
{
|
|
15113
15388
|
ref: containerRef,
|
|
15114
15389
|
className: "w-full",
|
|
15115
15390
|
style: { position: "relative" },
|
|
15116
15391
|
children: [
|
|
15117
|
-
/* @__PURE__ */
|
|
15118
|
-
/* @__PURE__ */
|
|
15392
|
+
/* @__PURE__ */ jsx35("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15393
|
+
/* @__PURE__ */ jsx35(
|
|
15119
15394
|
"div",
|
|
15120
15395
|
{
|
|
15121
15396
|
className: "spec-dropdown-trigger",
|
|
@@ -15123,7 +15398,7 @@ function SpecializationDropdown({
|
|
|
15123
15398
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15124
15399
|
"aria-haspopup": "listbox",
|
|
15125
15400
|
"aria-expanded": open,
|
|
15126
|
-
children: /* @__PURE__ */
|
|
15401
|
+
children: /* @__PURE__ */ jsx35(
|
|
15127
15402
|
ScTextField,
|
|
15128
15403
|
{
|
|
15129
15404
|
label: "Specialization",
|
|
@@ -15131,8 +15406,8 @@ function SpecializationDropdown({
|
|
|
15131
15406
|
value: selected?.label ?? "",
|
|
15132
15407
|
placeholderFilled: "Select specialization",
|
|
15133
15408
|
tfGroup: "icon-left-right",
|
|
15134
|
-
tfLeftIcon: /* @__PURE__ */
|
|
15135
|
-
tfRightIcon: /* @__PURE__ */
|
|
15409
|
+
tfLeftIcon: /* @__PURE__ */ jsx35(SpecializationIcon, { iconUrl: selected?.iconUrl }),
|
|
15410
|
+
tfRightIcon: /* @__PURE__ */ jsx35(
|
|
15136
15411
|
"span",
|
|
15137
15412
|
{
|
|
15138
15413
|
style: {
|
|
@@ -15142,7 +15417,7 @@ function SpecializationDropdown({
|
|
|
15142
15417
|
transform: open ? "rotate(180deg)" : "none",
|
|
15143
15418
|
transition: "transform 120ms ease-out"
|
|
15144
15419
|
},
|
|
15145
|
-
children: /* @__PURE__ */
|
|
15420
|
+
children: /* @__PURE__ */ jsx35(SiconDown2, {})
|
|
15146
15421
|
}
|
|
15147
15422
|
),
|
|
15148
15423
|
className: "sc-text-field-full-width",
|
|
@@ -15153,7 +15428,7 @@ function SpecializationDropdown({
|
|
|
15153
15428
|
)
|
|
15154
15429
|
}
|
|
15155
15430
|
),
|
|
15156
|
-
open && /* @__PURE__ */
|
|
15431
|
+
open && /* @__PURE__ */ jsx35(
|
|
15157
15432
|
"div",
|
|
15158
15433
|
{
|
|
15159
15434
|
role: "listbox",
|
|
@@ -15175,11 +15450,11 @@ function SpecializationDropdown({
|
|
|
15175
15450
|
},
|
|
15176
15451
|
children: options.map((opt) => {
|
|
15177
15452
|
const isActive = opt.id === value;
|
|
15178
|
-
return /* @__PURE__ */
|
|
15453
|
+
return /* @__PURE__ */ jsx35(
|
|
15179
15454
|
ScMenuOptions,
|
|
15180
15455
|
{
|
|
15181
15456
|
text: opt.label,
|
|
15182
|
-
icon: /* @__PURE__ */
|
|
15457
|
+
icon: /* @__PURE__ */ jsx35(SpecializationIcon, { iconUrl: opt.iconUrl }),
|
|
15183
15458
|
hover: isActive ? "true" : "false",
|
|
15184
15459
|
variant: "default",
|
|
15185
15460
|
role: "option",
|
|
@@ -15204,7 +15479,7 @@ function LanguageDropdown({
|
|
|
15204
15479
|
onChange,
|
|
15205
15480
|
disabled
|
|
15206
15481
|
}) {
|
|
15207
|
-
const [open, setOpen] =
|
|
15482
|
+
const [open, setOpen] = useState26(false);
|
|
15208
15483
|
const containerRef = useRef12(null);
|
|
15209
15484
|
useEffect20(() => {
|
|
15210
15485
|
if (!open) return;
|
|
@@ -15223,15 +15498,15 @@ function LanguageDropdown({
|
|
|
15223
15498
|
document.removeEventListener("keydown", handleKeyDown);
|
|
15224
15499
|
};
|
|
15225
15500
|
}, [open]);
|
|
15226
|
-
return /* @__PURE__ */
|
|
15501
|
+
return /* @__PURE__ */ jsxs32(
|
|
15227
15502
|
"div",
|
|
15228
15503
|
{
|
|
15229
15504
|
ref: containerRef,
|
|
15230
15505
|
className: "w-full",
|
|
15231
15506
|
style: { position: "relative" },
|
|
15232
15507
|
children: [
|
|
15233
|
-
/* @__PURE__ */
|
|
15234
|
-
/* @__PURE__ */
|
|
15508
|
+
/* @__PURE__ */ jsx35("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15509
|
+
/* @__PURE__ */ jsx35(
|
|
15235
15510
|
"div",
|
|
15236
15511
|
{
|
|
15237
15512
|
className: "spec-dropdown-trigger",
|
|
@@ -15239,7 +15514,7 @@ function LanguageDropdown({
|
|
|
15239
15514
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15240
15515
|
"aria-haspopup": "listbox",
|
|
15241
15516
|
"aria-expanded": open,
|
|
15242
|
-
children: /* @__PURE__ */
|
|
15517
|
+
children: /* @__PURE__ */ jsx35(
|
|
15243
15518
|
ScTextField,
|
|
15244
15519
|
{
|
|
15245
15520
|
label: "Language",
|
|
@@ -15247,7 +15522,7 @@ function LanguageDropdown({
|
|
|
15247
15522
|
value: userLanguageLabel(value),
|
|
15248
15523
|
placeholderFilled: "Select language",
|
|
15249
15524
|
tfGroup: "icon-right",
|
|
15250
|
-
tfRightIcon: /* @__PURE__ */
|
|
15525
|
+
tfRightIcon: /* @__PURE__ */ jsx35(
|
|
15251
15526
|
"span",
|
|
15252
15527
|
{
|
|
15253
15528
|
style: {
|
|
@@ -15257,7 +15532,7 @@ function LanguageDropdown({
|
|
|
15257
15532
|
transform: open ? "rotate(180deg)" : "none",
|
|
15258
15533
|
transition: "transform 120ms ease-out"
|
|
15259
15534
|
},
|
|
15260
|
-
children: /* @__PURE__ */
|
|
15535
|
+
children: /* @__PURE__ */ jsx35(SiconDown2, {})
|
|
15261
15536
|
}
|
|
15262
15537
|
),
|
|
15263
15538
|
className: "sc-text-field-full-width",
|
|
@@ -15268,7 +15543,7 @@ function LanguageDropdown({
|
|
|
15268
15543
|
)
|
|
15269
15544
|
}
|
|
15270
15545
|
),
|
|
15271
|
-
open && /* @__PURE__ */
|
|
15546
|
+
open && /* @__PURE__ */ jsx35(
|
|
15272
15547
|
"div",
|
|
15273
15548
|
{
|
|
15274
15549
|
role: "listbox",
|
|
@@ -15294,11 +15569,11 @@ function LanguageDropdown({
|
|
|
15294
15569
|
},
|
|
15295
15570
|
children: USER_LANGUAGES.map((lang) => {
|
|
15296
15571
|
const isActive = lang.code === value;
|
|
15297
|
-
return /* @__PURE__ */
|
|
15572
|
+
return /* @__PURE__ */ jsx35(
|
|
15298
15573
|
ScMenuOptions,
|
|
15299
15574
|
{
|
|
15300
15575
|
text: lang.label,
|
|
15301
|
-
icon: /* @__PURE__ */
|
|
15576
|
+
icon: /* @__PURE__ */ jsx35(Fragment17, {}),
|
|
15302
15577
|
hover: isActive ? "true" : "false",
|
|
15303
15578
|
variant: "default",
|
|
15304
15579
|
role: "option",
|
|
@@ -15324,12 +15599,12 @@ function ProfileTab() {
|
|
|
15324
15599
|
const derivedName = user?.name ?? "";
|
|
15325
15600
|
const derivedSpec = user?.userSpecialization ?? "";
|
|
15326
15601
|
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] =
|
|
15602
|
+
const [fullName, setFullName] = useState26(derivedName);
|
|
15603
|
+
const [selectedSpec, setSelectedSpec] = useState26(derivedSpec);
|
|
15604
|
+
const [selectedLanguage, setSelectedLanguage] = useState26(derivedLanguage);
|
|
15605
|
+
const [saving, setSaving] = useState26(false);
|
|
15606
|
+
const [imageSaving, setImageSaving] = useState26(false);
|
|
15607
|
+
const [imagePreview, setImagePreview] = useState26(
|
|
15333
15608
|
void 0
|
|
15334
15609
|
);
|
|
15335
15610
|
const fileInputRef = useRef12(null);
|
|
@@ -15427,13 +15702,13 @@ function ProfileTab() {
|
|
|
15427
15702
|
}
|
|
15428
15703
|
auth.clearAuth();
|
|
15429
15704
|
};
|
|
15430
|
-
return /* @__PURE__ */
|
|
15705
|
+
return /* @__PURE__ */ jsxs32(
|
|
15431
15706
|
"div",
|
|
15432
15707
|
{
|
|
15433
15708
|
className: "flex flex-col items-start flex-1 min-w-0 min-h-0 overflow-y-auto",
|
|
15434
15709
|
style: { gap: "var(--spacing-3xl)" },
|
|
15435
15710
|
children: [
|
|
15436
|
-
/* @__PURE__ */
|
|
15711
|
+
/* @__PURE__ */ jsxs32(
|
|
15437
15712
|
"div",
|
|
15438
15713
|
{
|
|
15439
15714
|
className: "sc-profile-card flex flex-col items-start w-full",
|
|
@@ -15446,13 +15721,13 @@ function ProfileTab() {
|
|
|
15446
15721
|
gap: "var(--spacing-6xl)"
|
|
15447
15722
|
},
|
|
15448
15723
|
children: [
|
|
15449
|
-
/* @__PURE__ */
|
|
15724
|
+
/* @__PURE__ */ jsxs32(
|
|
15450
15725
|
"div",
|
|
15451
15726
|
{
|
|
15452
15727
|
className: "flex items-center shrink-0 w-full",
|
|
15453
15728
|
style: { gap: 24, flexWrap: "wrap" },
|
|
15454
15729
|
children: [
|
|
15455
|
-
profileImage ? /* @__PURE__ */
|
|
15730
|
+
profileImage ? /* @__PURE__ */ jsx35(
|
|
15456
15731
|
"img",
|
|
15457
15732
|
{
|
|
15458
15733
|
src: profileImage,
|
|
@@ -15465,7 +15740,7 @@ function ProfileTab() {
|
|
|
15465
15740
|
flexShrink: 0
|
|
15466
15741
|
}
|
|
15467
15742
|
}
|
|
15468
|
-
) : /* @__PURE__ */
|
|
15743
|
+
) : /* @__PURE__ */ jsx35(
|
|
15469
15744
|
"div",
|
|
15470
15745
|
{
|
|
15471
15746
|
"aria-label": "Profile",
|
|
@@ -15478,7 +15753,7 @@ function ProfileTab() {
|
|
|
15478
15753
|
border: "1px solid var(--alias-border-subtle)",
|
|
15479
15754
|
flexShrink: 0
|
|
15480
15755
|
},
|
|
15481
|
-
children: /* @__PURE__ */
|
|
15756
|
+
children: /* @__PURE__ */ jsx35(
|
|
15482
15757
|
"span",
|
|
15483
15758
|
{
|
|
15484
15759
|
style: {
|
|
@@ -15493,7 +15768,7 @@ function ProfileTab() {
|
|
|
15493
15768
|
)
|
|
15494
15769
|
}
|
|
15495
15770
|
),
|
|
15496
|
-
/* @__PURE__ */
|
|
15771
|
+
/* @__PURE__ */ jsx35(
|
|
15497
15772
|
"input",
|
|
15498
15773
|
{
|
|
15499
15774
|
ref: fileInputRef,
|
|
@@ -15503,17 +15778,17 @@ function ProfileTab() {
|
|
|
15503
15778
|
onChange: handleImageChange
|
|
15504
15779
|
}
|
|
15505
15780
|
),
|
|
15506
|
-
/* @__PURE__ */
|
|
15781
|
+
/* @__PURE__ */ jsxs32(
|
|
15507
15782
|
"div",
|
|
15508
15783
|
{
|
|
15509
15784
|
className: "flex items-center",
|
|
15510
15785
|
style: { gap: 12, flexWrap: "wrap" },
|
|
15511
15786
|
children: [
|
|
15512
|
-
/* @__PURE__ */
|
|
15513
|
-
|
|
15787
|
+
/* @__PURE__ */ jsx35(
|
|
15788
|
+
ScButton19,
|
|
15514
15789
|
{
|
|
15515
15790
|
text: "Upload photo",
|
|
15516
|
-
icon: /* @__PURE__ */
|
|
15791
|
+
icon: /* @__PURE__ */ jsx35(SiconUpload2, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
15517
15792
|
styleVariant: "icon-left",
|
|
15518
15793
|
variant: "outline",
|
|
15519
15794
|
size: "md",
|
|
@@ -15521,11 +15796,11 @@ function ProfileTab() {
|
|
|
15521
15796
|
onClick: handleUploadClick
|
|
15522
15797
|
}
|
|
15523
15798
|
),
|
|
15524
|
-
/* @__PURE__ */
|
|
15525
|
-
|
|
15799
|
+
/* @__PURE__ */ jsx35(
|
|
15800
|
+
ScButton19,
|
|
15526
15801
|
{
|
|
15527
15802
|
text: "Remove photo",
|
|
15528
|
-
icon: /* @__PURE__ */
|
|
15803
|
+
icon: /* @__PURE__ */ jsx35(
|
|
15529
15804
|
SiconDelete,
|
|
15530
15805
|
{
|
|
15531
15806
|
className: "w-5 h-5",
|
|
@@ -15545,15 +15820,15 @@ function ProfileTab() {
|
|
|
15545
15820
|
]
|
|
15546
15821
|
}
|
|
15547
15822
|
),
|
|
15548
|
-
/* @__PURE__ */
|
|
15549
|
-
/* @__PURE__ */
|
|
15823
|
+
/* @__PURE__ */ jsx35(ScHDivider, {}),
|
|
15824
|
+
/* @__PURE__ */ jsxs32(
|
|
15550
15825
|
"div",
|
|
15551
15826
|
{
|
|
15552
15827
|
className: "sc-profile-fields flex flex-col min-w-0 w-full",
|
|
15553
15828
|
style: { gap: 24 },
|
|
15554
15829
|
children: [
|
|
15555
|
-
/* @__PURE__ */
|
|
15556
|
-
/* @__PURE__ */
|
|
15830
|
+
/* @__PURE__ */ jsxs32("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
|
|
15831
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx35(
|
|
15557
15832
|
ScTextField,
|
|
15558
15833
|
{
|
|
15559
15834
|
label: "Full Name",
|
|
@@ -15567,7 +15842,7 @@ function ProfileTab() {
|
|
|
15567
15842
|
onChange: (e) => setFullName(e.target.value)
|
|
15568
15843
|
}
|
|
15569
15844
|
) }),
|
|
15570
|
-
/* @__PURE__ */
|
|
15845
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx35(
|
|
15571
15846
|
SpecializationDropdown,
|
|
15572
15847
|
{
|
|
15573
15848
|
value: selectedSpec,
|
|
@@ -15576,8 +15851,8 @@ function ProfileTab() {
|
|
|
15576
15851
|
}
|
|
15577
15852
|
) })
|
|
15578
15853
|
] }),
|
|
15579
|
-
/* @__PURE__ */
|
|
15580
|
-
/* @__PURE__ */
|
|
15854
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
|
|
15855
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx35(
|
|
15581
15856
|
LanguageDropdown,
|
|
15582
15857
|
{
|
|
15583
15858
|
value: selectedLanguage,
|
|
@@ -15585,9 +15860,9 @@ function ProfileTab() {
|
|
|
15585
15860
|
disabled: disableAllActions
|
|
15586
15861
|
}
|
|
15587
15862
|
) }),
|
|
15588
|
-
/* @__PURE__ */
|
|
15863
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0" })
|
|
15589
15864
|
] }),
|
|
15590
|
-
/* @__PURE__ */
|
|
15865
|
+
/* @__PURE__ */ jsx35("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx35(
|
|
15591
15866
|
ScTextField,
|
|
15592
15867
|
{
|
|
15593
15868
|
label: "Email ID",
|
|
@@ -15596,7 +15871,7 @@ function ProfileTab() {
|
|
|
15596
15871
|
value: user?.email ?? "",
|
|
15597
15872
|
placeholderFilled: user?.email ?? "chris@kepler.com",
|
|
15598
15873
|
tfGroup: "icon-right",
|
|
15599
|
-
tfRightIcon: /* @__PURE__ */
|
|
15874
|
+
tfRightIcon: /* @__PURE__ */ jsx35(
|
|
15600
15875
|
SiconLock,
|
|
15601
15876
|
{
|
|
15602
15877
|
className: "w-6 h-6",
|
|
@@ -15608,13 +15883,13 @@ function ProfileTab() {
|
|
|
15608
15883
|
readOnly: true
|
|
15609
15884
|
}
|
|
15610
15885
|
) }),
|
|
15611
|
-
/* @__PURE__ */
|
|
15886
|
+
/* @__PURE__ */ jsx35(
|
|
15612
15887
|
"div",
|
|
15613
15888
|
{
|
|
15614
15889
|
className: "flex items-center w-full",
|
|
15615
15890
|
style: { justifyContent: "flex-end", paddingTop: "var(--spacing-md)" },
|
|
15616
|
-
children: /* @__PURE__ */
|
|
15617
|
-
|
|
15891
|
+
children: /* @__PURE__ */ jsx35(
|
|
15892
|
+
ScButton19,
|
|
15618
15893
|
{
|
|
15619
15894
|
text: saving ? "Saving..." : "Save changes",
|
|
15620
15895
|
variant: "secondary",
|
|
@@ -15631,7 +15906,7 @@ function ProfileTab() {
|
|
|
15631
15906
|
]
|
|
15632
15907
|
}
|
|
15633
15908
|
),
|
|
15634
|
-
/* @__PURE__ */
|
|
15909
|
+
/* @__PURE__ */ jsxs32(
|
|
15635
15910
|
"div",
|
|
15636
15911
|
{
|
|
15637
15912
|
className: "flex items-center w-full",
|
|
@@ -15643,8 +15918,8 @@ function ProfileTab() {
|
|
|
15643
15918
|
gap: "var(--spacing-3xl)"
|
|
15644
15919
|
},
|
|
15645
15920
|
children: [
|
|
15646
|
-
/* @__PURE__ */
|
|
15647
|
-
/* @__PURE__ */
|
|
15921
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
|
|
15922
|
+
/* @__PURE__ */ jsx35(
|
|
15648
15923
|
"span",
|
|
15649
15924
|
{
|
|
15650
15925
|
style: {
|
|
@@ -15657,7 +15932,7 @@ function ProfileTab() {
|
|
|
15657
15932
|
children: "Session"
|
|
15658
15933
|
}
|
|
15659
15934
|
),
|
|
15660
|
-
/* @__PURE__ */
|
|
15935
|
+
/* @__PURE__ */ jsx35(
|
|
15661
15936
|
"span",
|
|
15662
15937
|
{
|
|
15663
15938
|
className: "truncate",
|
|
@@ -15672,8 +15947,8 @@ function ProfileTab() {
|
|
|
15672
15947
|
}
|
|
15673
15948
|
)
|
|
15674
15949
|
] }),
|
|
15675
|
-
/* @__PURE__ */
|
|
15676
|
-
|
|
15950
|
+
/* @__PURE__ */ jsx35(
|
|
15951
|
+
ScButton19,
|
|
15677
15952
|
{
|
|
15678
15953
|
text: "Log out",
|
|
15679
15954
|
variant: "outline",
|
|
@@ -15736,9 +16011,9 @@ function WorkspaceListTab({
|
|
|
15736
16011
|
const currentOrganization = organizations.find(
|
|
15737
16012
|
(org) => org._id && org._id === currentWorkspace?.organizationId
|
|
15738
16013
|
);
|
|
15739
|
-
const [page, setPage] =
|
|
15740
|
-
const [serverPage, setServerPage] =
|
|
15741
|
-
const [serverFailed, setServerFailed] =
|
|
16014
|
+
const [page, setPage] = useState26(0);
|
|
16015
|
+
const [serverPage, setServerPage] = useState26(null);
|
|
16016
|
+
const [serverFailed, setServerFailed] = useState26(false);
|
|
15742
16017
|
const serverMode = !!listPage && !serverFailed;
|
|
15743
16018
|
useEffect20(() => {
|
|
15744
16019
|
if (!listPage || serverFailed) return;
|
|
@@ -15781,7 +16056,7 @@ function WorkspaceListTab({
|
|
|
15781
16056
|
const pageRows = serverMode ? (serverPage?.items ?? []).map((ws) => ({ ws, group: serverGroupOf(ws) })) : rows.slice(pageStart, pageStart + pageSize);
|
|
15782
16057
|
const pageWorkspaces = pageRows.map((row) => row.ws);
|
|
15783
16058
|
const listLoading = loading || serverMode && !serverPage;
|
|
15784
|
-
const [plans, setPlans] =
|
|
16059
|
+
const [plans, setPlans] = useState26({});
|
|
15785
16060
|
const requestedPlans = useRef12(/* @__PURE__ */ new Set());
|
|
15786
16061
|
const visibleIds = [
|
|
15787
16062
|
...currentWorkspace ? [currentWorkspace._id] : [],
|
|
@@ -15806,13 +16081,13 @@ function WorkspaceListTab({
|
|
|
15806
16081
|
});
|
|
15807
16082
|
}, [fetchPlans, listLoading, visibleKey]);
|
|
15808
16083
|
const planOf = (ws) => fetchPlans ? plans[ws._id] ?? "" : ws.plan ?? "";
|
|
15809
|
-
return /* @__PURE__ */
|
|
16084
|
+
return /* @__PURE__ */ jsxs32(
|
|
15810
16085
|
"div",
|
|
15811
16086
|
{
|
|
15812
16087
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
15813
16088
|
style: { gap: "var(--spacing-3xl)", height: "100%" },
|
|
15814
16089
|
children: [
|
|
15815
|
-
/* @__PURE__ */
|
|
16090
|
+
/* @__PURE__ */ jsx35(
|
|
15816
16091
|
"p",
|
|
15817
16092
|
{
|
|
15818
16093
|
className: "shrink-0 w-full",
|
|
@@ -15825,7 +16100,7 @@ function WorkspaceListTab({
|
|
|
15825
16100
|
children: "Switching changes which workspace the rest of Settings acts on."
|
|
15826
16101
|
}
|
|
15827
16102
|
),
|
|
15828
|
-
listLoading && /* @__PURE__ */
|
|
16103
|
+
listLoading && /* @__PURE__ */ jsx35(
|
|
15829
16104
|
"p",
|
|
15830
16105
|
{
|
|
15831
16106
|
style: {
|
|
@@ -15836,13 +16111,13 @@ function WorkspaceListTab({
|
|
|
15836
16111
|
children: "Loading workspaces\u2026"
|
|
15837
16112
|
}
|
|
15838
16113
|
),
|
|
15839
|
-
!listLoading && currentWorkspace && /* @__PURE__ */
|
|
16114
|
+
!listLoading && currentWorkspace && /* @__PURE__ */ jsxs32(
|
|
15840
16115
|
"div",
|
|
15841
16116
|
{
|
|
15842
16117
|
className: "flex flex-col items-start shrink-0 w-full",
|
|
15843
16118
|
style: { gap: 16, padding: "var(--spacing-md) 0" },
|
|
15844
16119
|
children: [
|
|
15845
|
-
/* @__PURE__ */
|
|
16120
|
+
/* @__PURE__ */ jsxs32(
|
|
15846
16121
|
"p",
|
|
15847
16122
|
{
|
|
15848
16123
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
|
|
@@ -15859,7 +16134,7 @@ function WorkspaceListTab({
|
|
|
15859
16134
|
]
|
|
15860
16135
|
}
|
|
15861
16136
|
),
|
|
15862
|
-
/* @__PURE__ */
|
|
16137
|
+
/* @__PURE__ */ jsx35(
|
|
15863
16138
|
ScWorkspaceSwitchCard,
|
|
15864
16139
|
{
|
|
15865
16140
|
wsName: currentWorkspace.name,
|
|
@@ -15876,7 +16151,7 @@ function WorkspaceListTab({
|
|
|
15876
16151
|
]
|
|
15877
16152
|
}
|
|
15878
16153
|
),
|
|
15879
|
-
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */
|
|
16154
|
+
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ jsx35(
|
|
15880
16155
|
"div",
|
|
15881
16156
|
{
|
|
15882
16157
|
className: "shrink-0 w-full",
|
|
@@ -15886,19 +16161,19 @@ function WorkspaceListTab({
|
|
|
15886
16161
|
}
|
|
15887
16162
|
}
|
|
15888
16163
|
),
|
|
15889
|
-
!listLoading && listTotal > 0 && /* @__PURE__ */
|
|
16164
|
+
!listLoading && listTotal > 0 && /* @__PURE__ */ jsxs32(
|
|
15890
16165
|
"div",
|
|
15891
16166
|
{
|
|
15892
16167
|
className: "flex flex-col items-start flex-1 min-h-0 w-full",
|
|
15893
16168
|
style: { gap: 16, overflowY: "auto" },
|
|
15894
16169
|
children: [
|
|
15895
|
-
/* @__PURE__ */
|
|
16170
|
+
/* @__PURE__ */ jsx35(
|
|
15896
16171
|
"div",
|
|
15897
16172
|
{
|
|
15898
16173
|
className: "flex flex-col items-start w-full",
|
|
15899
16174
|
style: { gap: 16 },
|
|
15900
|
-
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */
|
|
15901
|
-
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */
|
|
16175
|
+
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ jsxs32(Fragment16, { children: [
|
|
16176
|
+
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ jsx35(
|
|
15902
16177
|
"p",
|
|
15903
16178
|
{
|
|
15904
16179
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap shrink-0",
|
|
@@ -15913,7 +16188,7 @@ function WorkspaceListTab({
|
|
|
15913
16188
|
children: group.label
|
|
15914
16189
|
}
|
|
15915
16190
|
),
|
|
15916
|
-
/* @__PURE__ */
|
|
16191
|
+
/* @__PURE__ */ jsx35(
|
|
15917
16192
|
ScWorkspaceSwitchCard,
|
|
15918
16193
|
{
|
|
15919
16194
|
wsName: ws.name,
|
|
@@ -15931,13 +16206,13 @@ function WorkspaceListTab({
|
|
|
15931
16206
|
] }, ws._id))
|
|
15932
16207
|
}
|
|
15933
16208
|
),
|
|
15934
|
-
pageCount > 1 && /* @__PURE__ */
|
|
16209
|
+
pageCount > 1 && /* @__PURE__ */ jsxs32(
|
|
15935
16210
|
"div",
|
|
15936
16211
|
{
|
|
15937
16212
|
className: "flex items-center justify-between shrink-0 w-full",
|
|
15938
16213
|
style: { gap: "var(--spacing-md)" },
|
|
15939
16214
|
children: [
|
|
15940
|
-
/* @__PURE__ */
|
|
16215
|
+
/* @__PURE__ */ jsxs32(
|
|
15941
16216
|
"span",
|
|
15942
16217
|
{
|
|
15943
16218
|
style: {
|
|
@@ -15956,9 +16231,9 @@ function WorkspaceListTab({
|
|
|
15956
16231
|
]
|
|
15957
16232
|
}
|
|
15958
16233
|
),
|
|
15959
|
-
/* @__PURE__ */
|
|
15960
|
-
/* @__PURE__ */
|
|
15961
|
-
|
|
16234
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
|
|
16235
|
+
/* @__PURE__ */ jsx35(
|
|
16236
|
+
ScButton19,
|
|
15962
16237
|
{
|
|
15963
16238
|
text: "Previous",
|
|
15964
16239
|
variant: "tertiary",
|
|
@@ -15967,8 +16242,8 @@ function WorkspaceListTab({
|
|
|
15967
16242
|
onClick: safePage === 0 ? void 0 : () => setPage(safePage - 1)
|
|
15968
16243
|
}
|
|
15969
16244
|
),
|
|
15970
|
-
/* @__PURE__ */
|
|
15971
|
-
|
|
16245
|
+
/* @__PURE__ */ jsx35(
|
|
16246
|
+
ScButton19,
|
|
15972
16247
|
{
|
|
15973
16248
|
text: "Next",
|
|
15974
16249
|
variant: "tertiary",
|
|
@@ -15993,7 +16268,7 @@ function ReferralTab() {
|
|
|
15993
16268
|
const { auth, toast, api } = useSettingsAdapters();
|
|
15994
16269
|
const domain = typeof window !== "undefined" ? window.location.origin : "";
|
|
15995
16270
|
const link = referralLink(referralCodeOf(auth.user), domain);
|
|
15996
|
-
const [copied, setCopied] =
|
|
16271
|
+
const [copied, setCopied] = useState26(false);
|
|
15997
16272
|
const copiedTimer = useRef12(null);
|
|
15998
16273
|
useEffect20(() => () => {
|
|
15999
16274
|
if (copiedTimer.current) clearTimeout(copiedTimer.current);
|
|
@@ -16010,13 +16285,13 @@ function ReferralTab() {
|
|
|
16010
16285
|
toast.error("Couldn't copy the referral link");
|
|
16011
16286
|
}
|
|
16012
16287
|
};
|
|
16013
|
-
return /* @__PURE__ */
|
|
16288
|
+
return /* @__PURE__ */ jsxs32(
|
|
16014
16289
|
"div",
|
|
16015
16290
|
{
|
|
16016
16291
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
16017
16292
|
style: { gap: "var(--spacing-3xl)" },
|
|
16018
16293
|
children: [
|
|
16019
|
-
/* @__PURE__ */
|
|
16294
|
+
/* @__PURE__ */ jsx35(
|
|
16020
16295
|
"div",
|
|
16021
16296
|
{
|
|
16022
16297
|
className: "w-full relative",
|
|
@@ -16025,7 +16300,7 @@ function ReferralTab() {
|
|
|
16025
16300
|
borderRadius: "var(--radius-3xl)",
|
|
16026
16301
|
padding: "var(--spacing-6xl)"
|
|
16027
16302
|
},
|
|
16028
|
-
children: /* @__PURE__ */
|
|
16303
|
+
children: /* @__PURE__ */ jsx35(
|
|
16029
16304
|
ScTextField,
|
|
16030
16305
|
{
|
|
16031
16306
|
label: "Your Referral Link",
|
|
@@ -16034,7 +16309,7 @@ function ReferralTab() {
|
|
|
16034
16309
|
value: link,
|
|
16035
16310
|
placeholderFilled: "https://your-domain.com?referral_code=ABC123",
|
|
16036
16311
|
tfGroup: "none",
|
|
16037
|
-
rightSlot: /* @__PURE__ */
|
|
16312
|
+
rightSlot: /* @__PURE__ */ jsxs32(
|
|
16038
16313
|
"button",
|
|
16039
16314
|
{
|
|
16040
16315
|
type: "button",
|
|
@@ -16060,7 +16335,7 @@ function ReferralTab() {
|
|
|
16060
16335
|
e.currentTarget.style.background = "transparent";
|
|
16061
16336
|
},
|
|
16062
16337
|
children: [
|
|
16063
|
-
copied ? /* @__PURE__ */
|
|
16338
|
+
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
16339
|
copied ? "Copied" : "Copy"
|
|
16065
16340
|
]
|
|
16066
16341
|
}
|
|
@@ -16073,7 +16348,7 @@ function ReferralTab() {
|
|
|
16073
16348
|
)
|
|
16074
16349
|
}
|
|
16075
16350
|
),
|
|
16076
|
-
api.getReferredUsers && /* @__PURE__ */
|
|
16351
|
+
api.getReferredUsers && /* @__PURE__ */ jsx35(ReferralHistory, { load: (signal) => api.getReferredUsers(signal) })
|
|
16077
16352
|
]
|
|
16078
16353
|
}
|
|
16079
16354
|
);
|
|
@@ -16091,7 +16366,7 @@ function SettingsContent({
|
|
|
16091
16366
|
inviteRequested,
|
|
16092
16367
|
onInviteRequestHandled
|
|
16093
16368
|
}) {
|
|
16094
|
-
return /* @__PURE__ */
|
|
16369
|
+
return /* @__PURE__ */ jsx35(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ jsx35(
|
|
16095
16370
|
SettingsContentInner,
|
|
16096
16371
|
{
|
|
16097
16372
|
activeTab,
|
|
@@ -16129,7 +16404,8 @@ function SettingsContentInner({
|
|
|
16129
16404
|
organization,
|
|
16130
16405
|
navigation,
|
|
16131
16406
|
toast,
|
|
16132
|
-
integrations
|
|
16407
|
+
integrations,
|
|
16408
|
+
loginMethods
|
|
16133
16409
|
} = adapters;
|
|
16134
16410
|
const overviewDetail = presentation === "overview-detail";
|
|
16135
16411
|
const isOverview = overviewDetail && showOverview;
|
|
@@ -16137,13 +16413,14 @@ function SettingsContentInner({
|
|
|
16137
16413
|
const showConnectedApps = !!integrations;
|
|
16138
16414
|
const showReferral = !!referralCodeOf(adapters.auth.user);
|
|
16139
16415
|
const showIntegrations = !!integrations?.listOrganizationConnections && !!integrations.getOrganizationAccess && organization.current?.role === "admin";
|
|
16416
|
+
const showLoginMethods = !!loginMethods && organization.current?.role === "admin";
|
|
16140
16417
|
const workspaceId = workspace.current?.id ?? null;
|
|
16141
16418
|
const workspaceOwner = useWorkspaceOrganization({ workspaceId, request: workspace.organizationRequest ?? unavailableOrganizationRequest, enabled: !!workspace.organizationRequest });
|
|
16142
16419
|
const workspaceOwnerName = workspace.organizationRequest ? workspaceOwner.organizationName : void 0;
|
|
16143
|
-
const [workspaceList, setWorkspaceList] =
|
|
16420
|
+
const [workspaceList, setWorkspaceList] = useState26([]);
|
|
16144
16421
|
const currentWorkspaceRole = workspace.current?.role ?? workspaceList.find((item) => item._id === workspaceId)?.role;
|
|
16145
16422
|
const isWorkspaceAdmin = currentWorkspaceRole?.trim().toLowerCase() === "admin";
|
|
16146
|
-
const [workspaceListLoading, setWorkspaceListLoading] =
|
|
16423
|
+
const [workspaceListLoading, setWorkspaceListLoading] = useState26(false);
|
|
16147
16424
|
const refreshWorkspaceList = useCallback10(async () => {
|
|
16148
16425
|
setWorkspaceListLoading(true);
|
|
16149
16426
|
try {
|
|
@@ -16186,7 +16463,7 @@ function SettingsContentInner({
|
|
|
16186
16463
|
} : void 0,
|
|
16187
16464
|
[hostListPage, workspaceId]
|
|
16188
16465
|
);
|
|
16189
|
-
const [listOrganizations, setListOrganizations] =
|
|
16466
|
+
const [listOrganizations, setListOrganizations] = useState26([]);
|
|
16190
16467
|
useEffect20(() => {
|
|
16191
16468
|
if (activeTab !== "workspaceList" || typeof organization?.list !== "function") {
|
|
16192
16469
|
return;
|
|
@@ -16217,23 +16494,23 @@ function SettingsContentInner({
|
|
|
16217
16494
|
const setActiveTab = (tab) => {
|
|
16218
16495
|
navigation.navigateToTab(tab);
|
|
16219
16496
|
};
|
|
16220
|
-
const [creatingWorkspace, setCreatingWorkspace] =
|
|
16221
|
-
const [updatingWorkspace, setUpdatingWorkspace] =
|
|
16222
|
-
const [teamInviteOpen, setTeamInviteOpen] =
|
|
16497
|
+
const [creatingWorkspace, setCreatingWorkspace] = useState26(false);
|
|
16498
|
+
const [updatingWorkspace, setUpdatingWorkspace] = useState26(false);
|
|
16499
|
+
const [teamInviteOpen, setTeamInviteOpen] = useState26(false);
|
|
16223
16500
|
const teamPermissionScope = JSON.stringify([workspaceId, _auth.user?.id, workspace.current?.role]);
|
|
16224
|
-
const [teamInvitePermission, setTeamInvitePermission] =
|
|
16501
|
+
const [teamInvitePermission, setTeamInvitePermission] = useState26(null);
|
|
16225
16502
|
const teamCanInvite = teamInvitePermission?.scope === teamPermissionScope && teamInvitePermission.api === adapters.api ? teamInvitePermission.canInvite : null;
|
|
16226
16503
|
const receiveTeamInvitePermission = useCallback10((canInvite) => {
|
|
16227
16504
|
setTeamInvitePermission((previous) => previous?.scope === teamPermissionScope && previous.api === adapters.api && previous.canInvite === canInvite ? previous : { scope: teamPermissionScope, api: adapters.api, canInvite });
|
|
16228
16505
|
}, [teamPermissionScope, adapters.api]);
|
|
16229
16506
|
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] =
|
|
16507
|
+
const [tokenShowRevoked, setTokenShowRevoked] = useState26(false);
|
|
16508
|
+
const [tokenCreateOpen, setTokenCreateOpen] = useState26(false);
|
|
16509
|
+
const [billingShowPlans, setBillingShowPlans] = useState26(false);
|
|
16233
16510
|
const isBillingPlans = activeTab === "billing" && isWorkspaceAdmin && billingShowPlans;
|
|
16234
|
-
const [billingShowPerUserLimits, setBillingShowPerUserLimits] =
|
|
16511
|
+
const [billingShowPerUserLimits, setBillingShowPerUserLimits] = useState26(false);
|
|
16235
16512
|
const isBillingPerUserLimits = activeTab === "billing" && isWorkspaceAdmin && billingShowPerUserLimits && !billingShowPlans;
|
|
16236
|
-
const [billingShowSharedCredits, setBillingShowSharedCredits] =
|
|
16513
|
+
const [billingShowSharedCredits, setBillingShowSharedCredits] = useState26(false);
|
|
16237
16514
|
const isBillingSharedCredits = activeTab === "billing" && isWorkspaceAdmin && billingShowSharedCredits && !billingShowPlans && !billingShowPerUserLimits;
|
|
16238
16515
|
const isBillingSubView = isBillingPlans || isBillingPerUserLimits || isBillingSharedCredits;
|
|
16239
16516
|
useEffect20(() => {
|
|
@@ -16270,14 +16547,14 @@ function SettingsContentInner({
|
|
|
16270
16547
|
document.addEventListener("keydown", handleKeyDown);
|
|
16271
16548
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
16272
16549
|
}, [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] =
|
|
16550
|
+
const [localWorkspaces, setLocalWorkspaces] = useState26(null);
|
|
16551
|
+
const [wsModalOpen, setWsModalOpen] = useState26(false);
|
|
16552
|
+
const [wsModalMode, setWsModalMode] = useState26("create");
|
|
16553
|
+
const [editingWorkspace, setEditingWorkspace] = useState26(null);
|
|
16554
|
+
const [confirmLeaveOpen, setConfirmLeaveOpen] = useState26(false);
|
|
16555
|
+
const [leavingWorkspace, setLeavingWorkspace] = useState26(null);
|
|
16556
|
+
const [confirmDeleteOpen, setConfirmDeleteOpen] = useState26(false);
|
|
16557
|
+
const [deletingWorkspace, setDeletingWorkspace] = useState26(null);
|
|
16281
16558
|
const toWorkspaceData = (ws) => ({
|
|
16282
16559
|
id: ws._id,
|
|
16283
16560
|
name: ws.name ?? "",
|
|
@@ -16544,7 +16821,7 @@ function SettingsContentInner({
|
|
|
16544
16821
|
setConfirmLeaveOpen(true);
|
|
16545
16822
|
return false;
|
|
16546
16823
|
}
|
|
16547
|
-
return /* @__PURE__ */
|
|
16824
|
+
return /* @__PURE__ */ jsxs32(
|
|
16548
16825
|
"div",
|
|
16549
16826
|
{
|
|
16550
16827
|
"data-streamoid-settings": "",
|
|
@@ -16555,8 +16832,8 @@ function SettingsContentInner({
|
|
|
16555
16832
|
...isOverview ? { display: "block", overflowY: "auto" } : {}
|
|
16556
16833
|
},
|
|
16557
16834
|
children: [
|
|
16558
|
-
!isOverview && /* @__PURE__ */
|
|
16559
|
-
/* @__PURE__ */
|
|
16835
|
+
!isOverview && /* @__PURE__ */ jsx35(SettingsAppearance, {}),
|
|
16836
|
+
/* @__PURE__ */ jsx35(
|
|
16560
16837
|
"div",
|
|
16561
16838
|
{
|
|
16562
16839
|
className: "flex flex-col items-start relative h-full overflow-hidden",
|
|
@@ -16567,8 +16844,8 @@ function SettingsContentInner({
|
|
|
16567
16844
|
width: "100%",
|
|
16568
16845
|
...isOverview ? { height: "auto", minHeight: "100%", overflow: "visible", marginInline: "auto" } : {}
|
|
16569
16846
|
},
|
|
16570
|
-
children: /* @__PURE__ */
|
|
16571
|
-
!overviewDetail && onBack !== null && /* @__PURE__ */
|
|
16847
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
|
|
16848
|
+
!overviewDetail && onBack !== null && /* @__PURE__ */ jsx35("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsxs32(
|
|
16572
16849
|
"button",
|
|
16573
16850
|
{
|
|
16574
16851
|
type: "button",
|
|
@@ -16600,19 +16877,19 @@ function SettingsContentInner({
|
|
|
16600
16877
|
else window.history.back();
|
|
16601
16878
|
},
|
|
16602
16879
|
children: [
|
|
16603
|
-
/* @__PURE__ */
|
|
16880
|
+
/* @__PURE__ */ jsx35(SiconLeft3, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
|
|
16604
16881
|
"Back"
|
|
16605
16882
|
]
|
|
16606
16883
|
}
|
|
16607
16884
|
) }),
|
|
16608
|
-
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */
|
|
16609
|
-
|
|
16885
|
+
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ jsx35("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ jsx35(
|
|
16886
|
+
ScButton19,
|
|
16610
16887
|
{
|
|
16611
16888
|
text: isBillingSubView ? "Back to billing" : "Back to account and workspace settings",
|
|
16612
16889
|
variant: "tertiary",
|
|
16613
16890
|
size: "sm",
|
|
16614
16891
|
styleVariant: "icon-left",
|
|
16615
|
-
icon: /* @__PURE__ */
|
|
16892
|
+
icon: /* @__PURE__ */ jsx35(SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
|
|
16616
16893
|
onClick: () => {
|
|
16617
16894
|
if (isBillingSubView) {
|
|
16618
16895
|
setBillingShowPlans(false);
|
|
@@ -16624,7 +16901,7 @@ function SettingsContentInner({
|
|
|
16624
16901
|
}
|
|
16625
16902
|
}
|
|
16626
16903
|
) }),
|
|
16627
|
-
/* @__PURE__ */
|
|
16904
|
+
/* @__PURE__ */ jsxs32(
|
|
16628
16905
|
"div",
|
|
16629
16906
|
{
|
|
16630
16907
|
className: "flex items-center shrink-0 w-full",
|
|
@@ -16635,9 +16912,9 @@ function SettingsContentInner({
|
|
|
16635
16912
|
paddingRight: 20
|
|
16636
16913
|
},
|
|
16637
16914
|
children: [
|
|
16638
|
-
/* @__PURE__ */
|
|
16639
|
-
/* @__PURE__ */
|
|
16640
|
-
/* @__PURE__ */
|
|
16915
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
|
|
16916
|
+
/* @__PURE__ */ jsx35(SiconSettings2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16917
|
+
/* @__PURE__ */ jsx35(
|
|
16641
16918
|
"h1",
|
|
16642
16919
|
{
|
|
16643
16920
|
style: {
|
|
@@ -16651,10 +16928,10 @@ function SettingsContentInner({
|
|
|
16651
16928
|
children: overviewDetail ? "Account and workspace settings" : "Settings"
|
|
16652
16929
|
}
|
|
16653
16930
|
),
|
|
16654
|
-
!isOverview && /* @__PURE__ */
|
|
16655
|
-
scopeCrumb && /* @__PURE__ */
|
|
16656
|
-
/* @__PURE__ */
|
|
16657
|
-
/* @__PURE__ */
|
|
16931
|
+
!isOverview && /* @__PURE__ */ jsxs32("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
|
|
16932
|
+
scopeCrumb && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16933
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16934
|
+
/* @__PURE__ */ jsx35(
|
|
16658
16935
|
"span",
|
|
16659
16936
|
{
|
|
16660
16937
|
className: "truncate",
|
|
@@ -16671,8 +16948,8 @@ function SettingsContentInner({
|
|
|
16671
16948
|
}
|
|
16672
16949
|
)
|
|
16673
16950
|
] }),
|
|
16674
|
-
/* @__PURE__ */
|
|
16675
|
-
/* @__PURE__ */
|
|
16951
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16952
|
+
/* @__PURE__ */ jsx35(
|
|
16676
16953
|
"span",
|
|
16677
16954
|
{
|
|
16678
16955
|
style: {
|
|
@@ -16685,9 +16962,9 @@ function SettingsContentInner({
|
|
|
16685
16962
|
children: leafLabel
|
|
16686
16963
|
}
|
|
16687
16964
|
),
|
|
16688
|
-
isBillingPlans && /* @__PURE__ */
|
|
16689
|
-
/* @__PURE__ */
|
|
16690
|
-
/* @__PURE__ */
|
|
16965
|
+
isBillingPlans && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16966
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16967
|
+
/* @__PURE__ */ jsx35(
|
|
16691
16968
|
"span",
|
|
16692
16969
|
{
|
|
16693
16970
|
style: {
|
|
@@ -16701,9 +16978,9 @@ function SettingsContentInner({
|
|
|
16701
16978
|
}
|
|
16702
16979
|
)
|
|
16703
16980
|
] }),
|
|
16704
|
-
isBillingPerUserLimits && /* @__PURE__ */
|
|
16705
|
-
/* @__PURE__ */
|
|
16706
|
-
/* @__PURE__ */
|
|
16981
|
+
isBillingPerUserLimits && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16982
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16983
|
+
/* @__PURE__ */ jsx35(
|
|
16707
16984
|
"span",
|
|
16708
16985
|
{
|
|
16709
16986
|
style: {
|
|
@@ -16717,9 +16994,9 @@ function SettingsContentInner({
|
|
|
16717
16994
|
}
|
|
16718
16995
|
)
|
|
16719
16996
|
] }),
|
|
16720
|
-
isBillingSharedCredits && /* @__PURE__ */
|
|
16721
|
-
/* @__PURE__ */
|
|
16722
|
-
/* @__PURE__ */
|
|
16997
|
+
isBillingSharedCredits && /* @__PURE__ */ jsxs32(Fragment17, { children: [
|
|
16998
|
+
/* @__PURE__ */ jsx35(SiconRight3, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
16999
|
+
/* @__PURE__ */ jsx35(
|
|
16723
17000
|
"span",
|
|
16724
17001
|
{
|
|
16725
17002
|
style: {
|
|
@@ -16735,20 +17012,20 @@ function SettingsContentInner({
|
|
|
16735
17012
|
] })
|
|
16736
17013
|
] })
|
|
16737
17014
|
] }),
|
|
16738
|
-
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */
|
|
17015
|
+
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */ jsx35(
|
|
16739
17016
|
SettingsTooltip,
|
|
16740
17017
|
{
|
|
16741
17018
|
content: "Start a new workspace with its own team, members and billing",
|
|
16742
17019
|
placement: "bottom",
|
|
16743
17020
|
inline: true,
|
|
16744
|
-
children: /* @__PURE__ */
|
|
16745
|
-
|
|
17021
|
+
children: /* @__PURE__ */ jsx35(
|
|
17022
|
+
ScButton19,
|
|
16746
17023
|
{
|
|
16747
17024
|
text: "Create Workspace",
|
|
16748
17025
|
variant: "secondary",
|
|
16749
17026
|
size: "md",
|
|
16750
17027
|
styleVariant: "icon-left",
|
|
16751
|
-
icon: /* @__PURE__ */
|
|
17028
|
+
icon: /* @__PURE__ */ jsx35(
|
|
16752
17029
|
SiconWorkspace2,
|
|
16753
17030
|
{
|
|
16754
17031
|
className: "w-5 h-5",
|
|
@@ -16760,21 +17037,21 @@ function SettingsContentInner({
|
|
|
16760
17037
|
)
|
|
16761
17038
|
}
|
|
16762
17039
|
),
|
|
16763
|
-
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */
|
|
17040
|
+
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ jsx35(
|
|
16764
17041
|
SettingsTooltip,
|
|
16765
17042
|
{
|
|
16766
17043
|
content: "Send someone an invite to join this workspace",
|
|
16767
17044
|
placement: "bottom",
|
|
16768
17045
|
inline: true,
|
|
16769
|
-
children: /* @__PURE__ */
|
|
16770
|
-
|
|
17046
|
+
children: /* @__PURE__ */ jsx35(
|
|
17047
|
+
ScButton19,
|
|
16771
17048
|
{
|
|
16772
17049
|
text: overviewDetail ? "Invite people" : "Invite user",
|
|
16773
17050
|
variant: "secondary",
|
|
16774
17051
|
size: "md",
|
|
16775
17052
|
styleVariant: "icon-left",
|
|
16776
17053
|
state: canUseHeaderInvite ? "default" : "disabled",
|
|
16777
|
-
icon: /* @__PURE__ */
|
|
17054
|
+
icon: /* @__PURE__ */ jsx35(
|
|
16778
17055
|
SiconUserAdd3,
|
|
16779
17056
|
{
|
|
16780
17057
|
className: "w-5 h-5",
|
|
@@ -16788,15 +17065,15 @@ function SettingsContentInner({
|
|
|
16788
17065
|
)
|
|
16789
17066
|
}
|
|
16790
17067
|
),
|
|
16791
|
-
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */
|
|
16792
|
-
/* @__PURE__ */
|
|
17068
|
+
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs32("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
|
|
17069
|
+
/* @__PURE__ */ jsx35(
|
|
16793
17070
|
SettingsTooltip,
|
|
16794
17071
|
{
|
|
16795
17072
|
content: "Include keys you have already revoked in the list below",
|
|
16796
17073
|
placement: "bottom",
|
|
16797
17074
|
inline: true,
|
|
16798
|
-
children: /* @__PURE__ */
|
|
16799
|
-
|
|
17075
|
+
children: /* @__PURE__ */ jsx35(
|
|
17076
|
+
ScButton19,
|
|
16800
17077
|
{
|
|
16801
17078
|
text: tokenShowRevoked ? "Hide Revoked" : "Show Revoked",
|
|
16802
17079
|
variant: "outline",
|
|
@@ -16806,20 +17083,20 @@ function SettingsContentInner({
|
|
|
16806
17083
|
)
|
|
16807
17084
|
}
|
|
16808
17085
|
),
|
|
16809
|
-
/* @__PURE__ */
|
|
17086
|
+
/* @__PURE__ */ jsx35(
|
|
16810
17087
|
SettingsTooltip,
|
|
16811
17088
|
{
|
|
16812
17089
|
content: "Generate a key for calling the Streamoid APIs from your own code",
|
|
16813
17090
|
placement: "bottom",
|
|
16814
17091
|
inline: true,
|
|
16815
|
-
children: /* @__PURE__ */
|
|
16816
|
-
|
|
17092
|
+
children: /* @__PURE__ */ jsx35(
|
|
17093
|
+
ScButton19,
|
|
16817
17094
|
{
|
|
16818
17095
|
text: "New API Key",
|
|
16819
17096
|
variant: "secondary",
|
|
16820
17097
|
size: "md",
|
|
16821
17098
|
styleVariant: "icon-left",
|
|
16822
|
-
icon: /* @__PURE__ */
|
|
17099
|
+
icon: /* @__PURE__ */ jsx35(
|
|
16823
17100
|
SiconPlus3,
|
|
16824
17101
|
{
|
|
16825
17102
|
className: "w-5 h-5",
|
|
@@ -16832,13 +17109,13 @@ function SettingsContentInner({
|
|
|
16832
17109
|
}
|
|
16833
17110
|
)
|
|
16834
17111
|
] }),
|
|
16835
|
-
overviewDetail && onClose && /* @__PURE__ */
|
|
16836
|
-
|
|
17112
|
+
overviewDetail && onClose && /* @__PURE__ */ jsx35(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ jsx35(
|
|
17113
|
+
ScButton19,
|
|
16837
17114
|
{
|
|
16838
17115
|
styleVariant: "icon-only",
|
|
16839
17116
|
variant: "outline",
|
|
16840
17117
|
size: "md",
|
|
16841
|
-
icon: /* @__PURE__ */
|
|
17118
|
+
icon: /* @__PURE__ */ jsx35(SiconClose11, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
16842
17119
|
"aria-label": "Close settings",
|
|
16843
17120
|
style: isOverview ? { width: "2rem", height: "2rem", padding: 0 } : void 0,
|
|
16844
17121
|
onClick: onClose
|
|
@@ -16847,7 +17124,7 @@ function SettingsContentInner({
|
|
|
16847
17124
|
]
|
|
16848
17125
|
}
|
|
16849
17126
|
),
|
|
16850
|
-
isOverview ? /* @__PURE__ */
|
|
17127
|
+
isOverview ? /* @__PURE__ */ jsx35(
|
|
16851
17128
|
AdministrationOverview,
|
|
16852
17129
|
{
|
|
16853
17130
|
workspaceName: workspaceScopeName,
|
|
@@ -16857,18 +17134,19 @@ function SettingsContentInner({
|
|
|
16857
17134
|
isWorkspaceAdmin,
|
|
16858
17135
|
showConnectedApps,
|
|
16859
17136
|
showIntegrations,
|
|
17137
|
+
showLoginMethods,
|
|
16860
17138
|
showReferral,
|
|
16861
17139
|
canInvite: !overviewInvite.isLoading && overviewInvite.canInvite,
|
|
16862
17140
|
onNavigate: setActiveTab,
|
|
16863
17141
|
onInvitePeople
|
|
16864
17142
|
}
|
|
16865
|
-
) : /* @__PURE__ */
|
|
17143
|
+
) : /* @__PURE__ */ jsxs32(
|
|
16866
17144
|
"div",
|
|
16867
17145
|
{
|
|
16868
17146
|
className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
|
|
16869
17147
|
style: { gap: 20 },
|
|
16870
17148
|
children: [
|
|
16871
|
-
!overviewDetail && !isBillingSubView && /* @__PURE__ */
|
|
17149
|
+
!overviewDetail && !isBillingSubView && /* @__PURE__ */ jsx35(
|
|
16872
17150
|
SettingsNav,
|
|
16873
17151
|
{
|
|
16874
17152
|
isWorkspaceAdmin,
|
|
@@ -16879,11 +17157,12 @@ function SettingsContentInner({
|
|
|
16879
17157
|
hasOrganization,
|
|
16880
17158
|
showConnectedApps,
|
|
16881
17159
|
showIntegrations,
|
|
17160
|
+
showLoginMethods,
|
|
16882
17161
|
showReferral
|
|
16883
17162
|
}
|
|
16884
17163
|
),
|
|
16885
|
-
activeTab === "profile" && /* @__PURE__ */
|
|
16886
|
-
activeTab === "workspace" && /* @__PURE__ */
|
|
17164
|
+
activeTab === "profile" && /* @__PURE__ */ jsx35(ProfileTab, {}),
|
|
17165
|
+
activeTab === "workspace" && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
|
|
16887
17166
|
WorkspaceGeneralTab,
|
|
16888
17167
|
{
|
|
16889
17168
|
workspace: currentWorkspaceData,
|
|
@@ -16905,7 +17184,7 @@ function SettingsContentInner({
|
|
|
16905
17184
|
}
|
|
16906
17185
|
}
|
|
16907
17186
|
) }),
|
|
16908
|
-
activeTab === "workspaceMembers" && /* @__PURE__ */
|
|
17187
|
+
activeTab === "workspaceMembers" && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
|
|
16909
17188
|
TeamsContent,
|
|
16910
17189
|
{
|
|
16911
17190
|
embedded: true,
|
|
@@ -16920,7 +17199,7 @@ function SettingsContentInner({
|
|
|
16920
17199
|
hiddenApps
|
|
16921
17200
|
}
|
|
16922
17201
|
) }),
|
|
16923
|
-
activeTab === "workspaceList" && /* @__PURE__ */
|
|
17202
|
+
activeTab === "workspaceList" && /* @__PURE__ */ jsx35(
|
|
16924
17203
|
WorkspaceListTab,
|
|
16925
17204
|
{
|
|
16926
17205
|
workspaces: displayWorkspaces,
|
|
@@ -16945,11 +17224,12 @@ function SettingsContentInner({
|
|
|
16945
17224
|
}
|
|
16946
17225
|
}
|
|
16947
17226
|
),
|
|
16948
|
-
activeTab === "referral" && showReferral && /* @__PURE__ */
|
|
16949
|
-
activeTab === "connectedApps" && /* @__PURE__ */
|
|
16950
|
-
activeTab === "organizationIntegrations" && /* @__PURE__ */
|
|
16951
|
-
activeTab === "
|
|
16952
|
-
|
|
17227
|
+
activeTab === "referral" && showReferral && /* @__PURE__ */ jsx35(ReferralTab, {}),
|
|
17228
|
+
activeTab === "connectedApps" && /* @__PURE__ */ jsx35(ConnectedAppsContent, {}),
|
|
17229
|
+
activeTab === "organizationIntegrations" && /* @__PURE__ */ jsx35(OrganizationIntegrationsContent, {}),
|
|
17230
|
+
activeTab === "organizationLoginMethods" && /* @__PURE__ */ jsx35(OrganizationLoginMethodsContent, {}),
|
|
17231
|
+
activeTab === "organizationList" && /* @__PURE__ */ jsx35(OrganizationListContent, {}),
|
|
17232
|
+
(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
17233
|
ManagedOrganizationSummary,
|
|
16954
17234
|
{
|
|
16955
17235
|
name: workspaceOwner.organizationName,
|
|
@@ -16957,14 +17237,14 @@ function SettingsContentInner({
|
|
|
16957
17237
|
status: workspaceOwner.organizationStatus,
|
|
16958
17238
|
managementUrl: organization.managementUrl
|
|
16959
17239
|
}
|
|
16960
|
-
) : /* @__PURE__ */
|
|
17240
|
+
) : /* @__PURE__ */ jsx35(
|
|
16961
17241
|
OrganizationContent,
|
|
16962
17242
|
{
|
|
16963
17243
|
embedded: true,
|
|
16964
17244
|
view: activeTab === "organizationWorkspaces" || activeTab === "organizationDomains" ? "workspaces" : "people"
|
|
16965
17245
|
}
|
|
16966
17246
|
) }),
|
|
16967
|
-
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */
|
|
17247
|
+
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ jsx35("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx35(
|
|
16968
17248
|
BillingContent,
|
|
16969
17249
|
{
|
|
16970
17250
|
embedded: true,
|
|
@@ -16994,14 +17274,14 @@ function SettingsContentInner({
|
|
|
16994
17274
|
}
|
|
16995
17275
|
}
|
|
16996
17276
|
) }),
|
|
16997
|
-
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */
|
|
16998
|
-
/* @__PURE__ */
|
|
16999
|
-
/* @__PURE__ */
|
|
17000
|
-
/* @__PURE__ */
|
|
17001
|
-
/* @__PURE__ */
|
|
17277
|
+
(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: [
|
|
17278
|
+
/* @__PURE__ */ jsx35(SiconLock, { size: 24, color: MUTED_COLOR2 }),
|
|
17279
|
+
/* @__PURE__ */ jsx35("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
|
|
17280
|
+
/* @__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." }),
|
|
17281
|
+
/* @__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
17282
|
] }),
|
|
17003
|
-
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */
|
|
17004
|
-
/* @__PURE__ */
|
|
17283
|
+
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ jsxs32("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
|
|
17284
|
+
/* @__PURE__ */ jsxs32(
|
|
17005
17285
|
"a",
|
|
17006
17286
|
{
|
|
17007
17287
|
href: "https://docs.streamoid.com",
|
|
@@ -17011,19 +17291,19 @@ function SettingsContentInner({
|
|
|
17011
17291
|
className: "flex items-center shrink-0",
|
|
17012
17292
|
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
17293
|
children: [
|
|
17014
|
-
/* @__PURE__ */
|
|
17015
|
-
/* @__PURE__ */
|
|
17016
|
-
/* @__PURE__ */
|
|
17017
|
-
/* @__PURE__ */
|
|
17294
|
+
/* @__PURE__ */ jsx35(SiconBookOpen, { size: 24 }),
|
|
17295
|
+
/* @__PURE__ */ jsxs32("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
|
|
17296
|
+
/* @__PURE__ */ jsx35("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
|
|
17297
|
+
/* @__PURE__ */ jsx35("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
|
|
17018
17298
|
] }),
|
|
17019
|
-
/* @__PURE__ */
|
|
17299
|
+
/* @__PURE__ */ jsxs32("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
|
|
17020
17300
|
"View docs ",
|
|
17021
|
-
/* @__PURE__ */
|
|
17301
|
+
/* @__PURE__ */ jsx35(SiconExternalLink2, { size: 16 })
|
|
17022
17302
|
] })
|
|
17023
17303
|
]
|
|
17024
17304
|
}
|
|
17025
17305
|
),
|
|
17026
|
-
/* @__PURE__ */
|
|
17306
|
+
/* @__PURE__ */ jsx35(
|
|
17027
17307
|
TokensContent,
|
|
17028
17308
|
{
|
|
17029
17309
|
embedded: true,
|
|
@@ -17040,7 +17320,7 @@ function SettingsContentInner({
|
|
|
17040
17320
|
] })
|
|
17041
17321
|
}
|
|
17042
17322
|
),
|
|
17043
|
-
/* @__PURE__ */
|
|
17323
|
+
/* @__PURE__ */ jsx35(
|
|
17044
17324
|
WorkspaceModal,
|
|
17045
17325
|
{
|
|
17046
17326
|
open: wsModalOpen,
|
|
@@ -17059,7 +17339,7 @@ function SettingsContentInner({
|
|
|
17059
17339
|
}
|
|
17060
17340
|
}
|
|
17061
17341
|
),
|
|
17062
|
-
/* @__PURE__ */
|
|
17342
|
+
/* @__PURE__ */ jsx35(
|
|
17063
17343
|
ConfirmLeaveModal,
|
|
17064
17344
|
{
|
|
17065
17345
|
open: confirmLeaveOpen,
|
|
@@ -17092,7 +17372,7 @@ function SettingsContentInner({
|
|
|
17092
17372
|
}
|
|
17093
17373
|
}
|
|
17094
17374
|
),
|
|
17095
|
-
/* @__PURE__ */
|
|
17375
|
+
/* @__PURE__ */ jsx35(
|
|
17096
17376
|
ConfirmDeleteModal,
|
|
17097
17377
|
{
|
|
17098
17378
|
open: confirmDeleteOpen,
|
|
@@ -17122,10 +17402,10 @@ function SettingsContentInner({
|
|
|
17122
17402
|
}
|
|
17123
17403
|
|
|
17124
17404
|
// src/workspace-picker.tsx
|
|
17125
|
-
import { useState as
|
|
17126
|
-
import { ScButton as
|
|
17405
|
+
import { useState as useState27 } from "react";
|
|
17406
|
+
import { ScButton as ScButton20, ScCheckbox } from "@streamoid/ui";
|
|
17127
17407
|
import { SiconChevronDown, SiconChevronRight } from "@streamoid/icons";
|
|
17128
|
-
import { Fragment as
|
|
17408
|
+
import { Fragment as Fragment18, jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
17129
17409
|
var T19 = {
|
|
17130
17410
|
primary: "var(--alias-text---icons-primary)",
|
|
17131
17411
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17166,14 +17446,14 @@ function WorkspacePicker({
|
|
|
17166
17446
|
}
|
|
17167
17447
|
];
|
|
17168
17448
|
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] =
|
|
17449
|
+
const [selected, setSelected] = useState27(/* @__PURE__ */ new Set());
|
|
17450
|
+
const [collapsed, setCollapsed] = useState27(/* @__PURE__ */ new Set());
|
|
17451
|
+
const [creating, setCreating] = useState27(false);
|
|
17452
|
+
const [name, setName] = useState27("");
|
|
17453
|
+
const [visibility, setVisibility] = useState27("shared");
|
|
17174
17454
|
const creatable = onCreate ? sections.filter((s) => s.canCreate) : [];
|
|
17175
|
-
const [createOrgId, setCreateOrgId] =
|
|
17176
|
-
const [busy, setBusy] =
|
|
17455
|
+
const [createOrgId, setCreateOrgId] = useState27("");
|
|
17456
|
+
const [busy, setBusy] = useState27(false);
|
|
17177
17457
|
const total = sections.reduce((n, s) => n + s.workspaces.length, 0);
|
|
17178
17458
|
const hasWorkspaces = total > 0;
|
|
17179
17459
|
const canCreate = creatable.length > 0;
|
|
@@ -17208,7 +17488,7 @@ function WorkspacePicker({
|
|
|
17208
17488
|
);
|
|
17209
17489
|
const workspaceRow = (workspace, first) => {
|
|
17210
17490
|
const checked = selected.has(workspace._id);
|
|
17211
|
-
return /* @__PURE__ */
|
|
17491
|
+
return /* @__PURE__ */ jsxs33(
|
|
17212
17492
|
"div",
|
|
17213
17493
|
{
|
|
17214
17494
|
role: "checkbox",
|
|
@@ -17229,8 +17509,8 @@ function WorkspacePicker({
|
|
|
17229
17509
|
}
|
|
17230
17510
|
},
|
|
17231
17511
|
children: [
|
|
17232
|
-
/* @__PURE__ */
|
|
17233
|
-
/* @__PURE__ */
|
|
17512
|
+
/* @__PURE__ */ jsx36(ScCheckbox, { checked }),
|
|
17513
|
+
/* @__PURE__ */ jsx36(
|
|
17234
17514
|
ProfileAvatar,
|
|
17235
17515
|
{
|
|
17236
17516
|
name: workspace.name,
|
|
@@ -17239,8 +17519,8 @@ function WorkspacePicker({
|
|
|
17239
17519
|
borderRadius: T19.rLg
|
|
17240
17520
|
}
|
|
17241
17521
|
),
|
|
17242
|
-
/* @__PURE__ */
|
|
17243
|
-
/* @__PURE__ */
|
|
17522
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col min-w-0", children: [
|
|
17523
|
+
/* @__PURE__ */ jsx36(
|
|
17244
17524
|
"span",
|
|
17245
17525
|
{
|
|
17246
17526
|
className: "truncate",
|
|
@@ -17248,7 +17528,7 @@ function WorkspacePicker({
|
|
|
17248
17528
|
children: workspace.name
|
|
17249
17529
|
}
|
|
17250
17530
|
),
|
|
17251
|
-
workspace.ownerName && /* @__PURE__ */
|
|
17531
|
+
workspace.ownerName && /* @__PURE__ */ jsxs33(
|
|
17252
17532
|
"span",
|
|
17253
17533
|
{
|
|
17254
17534
|
className: "truncate",
|
|
@@ -17269,8 +17549,8 @@ function WorkspacePicker({
|
|
|
17269
17549
|
const isCollapsed = collapsed.has(section.organizationId);
|
|
17270
17550
|
const picked = section.workspaces.filter((w) => selected.has(w._id)).length;
|
|
17271
17551
|
const Chevron = isCollapsed ? SiconChevronRight : SiconChevronDown;
|
|
17272
|
-
return /* @__PURE__ */
|
|
17273
|
-
/* @__PURE__ */
|
|
17552
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", children: [
|
|
17553
|
+
/* @__PURE__ */ jsxs33(
|
|
17274
17554
|
"div",
|
|
17275
17555
|
{
|
|
17276
17556
|
role: "button",
|
|
@@ -17294,8 +17574,8 @@ function WorkspacePicker({
|
|
|
17294
17574
|
}
|
|
17295
17575
|
},
|
|
17296
17576
|
children: [
|
|
17297
|
-
/* @__PURE__ */
|
|
17298
|
-
/* @__PURE__ */
|
|
17577
|
+
/* @__PURE__ */ jsx36(Chevron, { className: "w-4 h-4", color: T19.muted }),
|
|
17578
|
+
/* @__PURE__ */ jsx36(
|
|
17299
17579
|
ProfileAvatar,
|
|
17300
17580
|
{
|
|
17301
17581
|
name: section.organizationName,
|
|
@@ -17304,7 +17584,7 @@ function WorkspacePicker({
|
|
|
17304
17584
|
borderRadius: T19.rLg
|
|
17305
17585
|
}
|
|
17306
17586
|
),
|
|
17307
|
-
/* @__PURE__ */
|
|
17587
|
+
/* @__PURE__ */ jsx36(
|
|
17308
17588
|
"span",
|
|
17309
17589
|
{
|
|
17310
17590
|
className: "truncate flex-1 min-w-0",
|
|
@@ -17312,11 +17592,11 @@ function WorkspacePicker({
|
|
|
17312
17592
|
children: section.organizationName
|
|
17313
17593
|
}
|
|
17314
17594
|
),
|
|
17315
|
-
/* @__PURE__ */
|
|
17595
|
+
/* @__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
17596
|
]
|
|
17317
17597
|
}
|
|
17318
17598
|
),
|
|
17319
|
-
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */
|
|
17599
|
+
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ jsx36(
|
|
17320
17600
|
"div",
|
|
17321
17601
|
{
|
|
17322
17602
|
style: {
|
|
@@ -17331,14 +17611,14 @@ function WorkspacePicker({
|
|
|
17331
17611
|
))
|
|
17332
17612
|
] }, section.organizationId);
|
|
17333
17613
|
};
|
|
17334
|
-
return /* @__PURE__ */
|
|
17614
|
+
return /* @__PURE__ */ jsxs33(
|
|
17335
17615
|
"div",
|
|
17336
17616
|
{
|
|
17337
17617
|
className: "flex flex-col w-full",
|
|
17338
17618
|
style: { maxWidth: 520, gap: T19.sp5xl, fontFamily: T19.font },
|
|
17339
17619
|
children: [
|
|
17340
|
-
/* @__PURE__ */
|
|
17341
|
-
/* @__PURE__ */
|
|
17620
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
|
|
17621
|
+
/* @__PURE__ */ jsx36(
|
|
17342
17622
|
"p",
|
|
17343
17623
|
{
|
|
17344
17624
|
style: {
|
|
@@ -17351,9 +17631,9 @@ function WorkspacePicker({
|
|
|
17351
17631
|
children: "Choose your workspaces"
|
|
17352
17632
|
}
|
|
17353
17633
|
),
|
|
17354
|
-
/* @__PURE__ */
|
|
17634
|
+
/* @__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
17635
|
] }),
|
|
17356
|
-
(loading || hasWorkspaces) && /* @__PURE__ */
|
|
17636
|
+
(loading || hasWorkspaces) && /* @__PURE__ */ jsx36(
|
|
17357
17637
|
"div",
|
|
17358
17638
|
{
|
|
17359
17639
|
className: "flex flex-col w-full overflow-y-auto",
|
|
@@ -17363,7 +17643,7 @@ function WorkspacePicker({
|
|
|
17363
17643
|
border: `1px solid ${T19.borderSubtle}`,
|
|
17364
17644
|
borderRadius: T19.r3xl
|
|
17365
17645
|
},
|
|
17366
|
-
children: loading ? /* @__PURE__ */
|
|
17646
|
+
children: loading ? /* @__PURE__ */ jsx36(
|
|
17367
17647
|
"div",
|
|
17368
17648
|
{
|
|
17369
17649
|
className: "flex items-center justify-center",
|
|
@@ -17373,9 +17653,9 @@ function WorkspacePicker({
|
|
|
17373
17653
|
) : grouped ? sections.map(groupSection) : sections[0].workspaces.map((w, index) => workspaceRow(w, index === 0))
|
|
17374
17654
|
}
|
|
17375
17655
|
),
|
|
17376
|
-
showCreate ? /* @__PURE__ */
|
|
17377
|
-
creatable.length > 1 && /* @__PURE__ */
|
|
17378
|
-
/* @__PURE__ */
|
|
17656
|
+
showCreate ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
|
|
17657
|
+
creatable.length > 1 && /* @__PURE__ */ jsxs33(Fragment18, { children: [
|
|
17658
|
+
/* @__PURE__ */ jsx36(
|
|
17379
17659
|
"label",
|
|
17380
17660
|
{
|
|
17381
17661
|
htmlFor: "workspace-picker-organization",
|
|
@@ -17383,7 +17663,7 @@ function WorkspacePicker({
|
|
|
17383
17663
|
children: "Organization"
|
|
17384
17664
|
}
|
|
17385
17665
|
),
|
|
17386
|
-
/* @__PURE__ */
|
|
17666
|
+
/* @__PURE__ */ jsx36(
|
|
17387
17667
|
"select",
|
|
17388
17668
|
{
|
|
17389
17669
|
id: "workspace-picker-organization",
|
|
@@ -17400,11 +17680,11 @@ function WorkspacePicker({
|
|
|
17400
17680
|
fontFamily: T19.font,
|
|
17401
17681
|
fontSize: T19.fsSm
|
|
17402
17682
|
},
|
|
17403
|
-
children: creatable.map((s) => /* @__PURE__ */
|
|
17683
|
+
children: creatable.map((s) => /* @__PURE__ */ jsx36("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
|
|
17404
17684
|
}
|
|
17405
17685
|
)
|
|
17406
17686
|
] }),
|
|
17407
|
-
/* @__PURE__ */
|
|
17687
|
+
/* @__PURE__ */ jsx36(
|
|
17408
17688
|
"label",
|
|
17409
17689
|
{
|
|
17410
17690
|
htmlFor: "workspace-picker-name",
|
|
@@ -17412,7 +17692,7 @@ function WorkspacePicker({
|
|
|
17412
17692
|
children: "New workspace name"
|
|
17413
17693
|
}
|
|
17414
17694
|
),
|
|
17415
|
-
/* @__PURE__ */
|
|
17695
|
+
/* @__PURE__ */ jsx36(
|
|
17416
17696
|
"input",
|
|
17417
17697
|
{
|
|
17418
17698
|
id: "workspace-picker-name",
|
|
@@ -17436,12 +17716,12 @@ function WorkspacePicker({
|
|
|
17436
17716
|
}
|
|
17437
17717
|
}
|
|
17438
17718
|
),
|
|
17439
|
-
/* @__PURE__ */
|
|
17719
|
+
/* @__PURE__ */ jsx36("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
|
|
17440
17720
|
["shared", "Shared", `Anyone in ${createLabel} can join`],
|
|
17441
17721
|
["private", "Private", "Invite only"]
|
|
17442
17722
|
].map(([value, label, hint]) => {
|
|
17443
17723
|
const active = visibility === value;
|
|
17444
|
-
return /* @__PURE__ */
|
|
17724
|
+
return /* @__PURE__ */ jsxs33(
|
|
17445
17725
|
"div",
|
|
17446
17726
|
{
|
|
17447
17727
|
role: "radio",
|
|
@@ -17462,7 +17742,7 @@ function WorkspacePicker({
|
|
|
17462
17742
|
border: `1px solid ${active ? T19.primary : T19.borderSubtle}`
|
|
17463
17743
|
},
|
|
17464
17744
|
children: [
|
|
17465
|
-
/* @__PURE__ */
|
|
17745
|
+
/* @__PURE__ */ jsx36(
|
|
17466
17746
|
"span",
|
|
17467
17747
|
{
|
|
17468
17748
|
style: {
|
|
@@ -17474,15 +17754,15 @@ function WorkspacePicker({
|
|
|
17474
17754
|
children: label
|
|
17475
17755
|
}
|
|
17476
17756
|
),
|
|
17477
|
-
/* @__PURE__ */
|
|
17757
|
+
/* @__PURE__ */ jsx36("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
|
|
17478
17758
|
]
|
|
17479
17759
|
},
|
|
17480
17760
|
value
|
|
17481
17761
|
);
|
|
17482
17762
|
}) }),
|
|
17483
|
-
/* @__PURE__ */
|
|
17484
|
-
hasWorkspaces && /* @__PURE__ */
|
|
17485
|
-
|
|
17763
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
|
|
17764
|
+
hasWorkspaces && /* @__PURE__ */ jsx36(
|
|
17765
|
+
ScButton20,
|
|
17486
17766
|
{
|
|
17487
17767
|
text: "Back",
|
|
17488
17768
|
variant: "tertiary",
|
|
@@ -17490,8 +17770,8 @@ function WorkspacePicker({
|
|
|
17490
17770
|
onClick: () => setCreating(false)
|
|
17491
17771
|
}
|
|
17492
17772
|
),
|
|
17493
|
-
/* @__PURE__ */
|
|
17494
|
-
|
|
17773
|
+
/* @__PURE__ */ jsx36(
|
|
17774
|
+
ScButton20,
|
|
17495
17775
|
{
|
|
17496
17776
|
text: busy ? "Creating\u2026" : "Create workspace",
|
|
17497
17777
|
variant: "primary",
|
|
@@ -17501,9 +17781,9 @@ function WorkspacePicker({
|
|
|
17501
17781
|
}
|
|
17502
17782
|
)
|
|
17503
17783
|
] })
|
|
17504
|
-
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */
|
|
17505
|
-
canCreate ? /* @__PURE__ */
|
|
17506
|
-
|
|
17784
|
+
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ jsxs33("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
|
|
17785
|
+
canCreate ? /* @__PURE__ */ jsx36(
|
|
17786
|
+
ScButton20,
|
|
17507
17787
|
{
|
|
17508
17788
|
text: "Create a workspace",
|
|
17509
17789
|
variant: "tertiary",
|
|
@@ -17511,9 +17791,9 @@ function WorkspacePicker({
|
|
|
17511
17791
|
state: loading || busy ? "disabled" : "default",
|
|
17512
17792
|
onClick: loading || busy ? void 0 : () => setCreating(true)
|
|
17513
17793
|
}
|
|
17514
|
-
) : /* @__PURE__ */
|
|
17515
|
-
/* @__PURE__ */
|
|
17516
|
-
|
|
17794
|
+
) : /* @__PURE__ */ jsx36("span", {}),
|
|
17795
|
+
/* @__PURE__ */ jsx36(
|
|
17796
|
+
ScButton20,
|
|
17517
17797
|
{
|
|
17518
17798
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} workspaces` : "Join workspace",
|
|
17519
17799
|
variant: "primary",
|
|
@@ -17529,9 +17809,9 @@ function WorkspacePicker({
|
|
|
17529
17809
|
}
|
|
17530
17810
|
|
|
17531
17811
|
// src/organization-picker.tsx
|
|
17532
|
-
import { useEffect as useEffect21, useState as
|
|
17533
|
-
import { ScButton as
|
|
17534
|
-
import { Fragment as
|
|
17812
|
+
import { useEffect as useEffect21, useState as useState28 } from "react";
|
|
17813
|
+
import { ScButton as ScButton21, ScCheckbox as ScCheckbox2 } from "@streamoid/ui";
|
|
17814
|
+
import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
17535
17815
|
var T20 = {
|
|
17536
17816
|
primary: "var(--alias-text---icons-primary)",
|
|
17537
17817
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17565,16 +17845,16 @@ function OrganizationPicker({
|
|
|
17565
17845
|
onJoin,
|
|
17566
17846
|
onCreate
|
|
17567
17847
|
}) {
|
|
17568
|
-
const [selected, setSelected] =
|
|
17848
|
+
const [selected, setSelected] = useState28(/* @__PURE__ */ new Set());
|
|
17569
17849
|
const toggle = (id) => setSelected((prev) => {
|
|
17570
17850
|
const next = new Set(prev);
|
|
17571
17851
|
if (next.has(id)) next.delete(id);
|
|
17572
17852
|
else next.add(id);
|
|
17573
17853
|
return next;
|
|
17574
17854
|
});
|
|
17575
|
-
const [name, setName] =
|
|
17576
|
-
const [type, setType] =
|
|
17577
|
-
const [busy, setBusy] =
|
|
17855
|
+
const [name, setName] = useState28(suggestedName);
|
|
17856
|
+
const [type, setType] = useState28("shared");
|
|
17857
|
+
const [busy, setBusy] = useState28(false);
|
|
17578
17858
|
useEffect21(() => {
|
|
17579
17859
|
setName((current) => current || suggestedName);
|
|
17580
17860
|
}, [suggestedName]);
|
|
@@ -17591,18 +17871,18 @@ function OrganizationPicker({
|
|
|
17591
17871
|
const heading = choosing ? "Choose your organization" : "Create your organization";
|
|
17592
17872
|
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
17873
|
const textStyle = { margin: 0, fontFamily: T20.font };
|
|
17594
|
-
return /* @__PURE__ */
|
|
17874
|
+
return /* @__PURE__ */ jsxs34(
|
|
17595
17875
|
"div",
|
|
17596
17876
|
{
|
|
17597
17877
|
className: "flex flex-col w-full",
|
|
17598
17878
|
style: { maxWidth: 520, gap: T20.sp5xl, fontFamily: T20.font },
|
|
17599
17879
|
children: [
|
|
17600
|
-
/* @__PURE__ */
|
|
17601
|
-
/* @__PURE__ */
|
|
17602
|
-
/* @__PURE__ */
|
|
17880
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
|
|
17881
|
+
/* @__PURE__ */ jsx37("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
|
|
17882
|
+
/* @__PURE__ */ jsx37("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
|
|
17603
17883
|
] }),
|
|
17604
|
-
!loading && choosing && /* @__PURE__ */
|
|
17605
|
-
/* @__PURE__ */
|
|
17884
|
+
!loading && choosing && /* @__PURE__ */ jsxs34(Fragment19, { children: [
|
|
17885
|
+
/* @__PURE__ */ jsx37(
|
|
17606
17886
|
"div",
|
|
17607
17887
|
{
|
|
17608
17888
|
role: "group",
|
|
@@ -17615,7 +17895,7 @@ function OrganizationPicker({
|
|
|
17615
17895
|
},
|
|
17616
17896
|
children: organizations.map((org, index) => {
|
|
17617
17897
|
const checked = selected.has(org._id);
|
|
17618
|
-
return /* @__PURE__ */
|
|
17898
|
+
return /* @__PURE__ */ jsxs34(
|
|
17619
17899
|
"div",
|
|
17620
17900
|
{
|
|
17621
17901
|
role: "checkbox",
|
|
@@ -17636,11 +17916,11 @@ function OrganizationPicker({
|
|
|
17636
17916
|
}
|
|
17637
17917
|
},
|
|
17638
17918
|
children: [
|
|
17639
|
-
/* @__PURE__ */
|
|
17640
|
-
/* @__PURE__ */
|
|
17641
|
-
/* @__PURE__ */
|
|
17642
|
-
/* @__PURE__ */
|
|
17643
|
-
org.domain && /* @__PURE__ */
|
|
17919
|
+
/* @__PURE__ */ jsx37(ScCheckbox2, { checked }),
|
|
17920
|
+
/* @__PURE__ */ jsx37(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
|
|
17921
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col min-w-0", children: [
|
|
17922
|
+
/* @__PURE__ */ jsx37("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
|
|
17923
|
+
org.domain && /* @__PURE__ */ jsx37("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
|
|
17644
17924
|
] })
|
|
17645
17925
|
]
|
|
17646
17926
|
},
|
|
@@ -17649,8 +17929,8 @@ function OrganizationPicker({
|
|
|
17649
17929
|
})
|
|
17650
17930
|
}
|
|
17651
17931
|
),
|
|
17652
|
-
/* @__PURE__ */
|
|
17653
|
-
|
|
17932
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx37(
|
|
17933
|
+
ScButton21,
|
|
17654
17934
|
{
|
|
17655
17935
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} organizations` : "Join organization",
|
|
17656
17936
|
variant: "primary",
|
|
@@ -17660,10 +17940,10 @@ function OrganizationPicker({
|
|
|
17660
17940
|
}
|
|
17661
17941
|
) })
|
|
17662
17942
|
] }),
|
|
17663
|
-
!loading && !choosing && /* @__PURE__ */
|
|
17664
|
-
/* @__PURE__ */
|
|
17665
|
-
/* @__PURE__ */
|
|
17666
|
-
/* @__PURE__ */
|
|
17943
|
+
!loading && !choosing && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
|
|
17944
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
17945
|
+
/* @__PURE__ */ jsx37("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
|
|
17946
|
+
/* @__PURE__ */ jsx37(
|
|
17667
17947
|
"input",
|
|
17668
17948
|
{
|
|
17669
17949
|
id: "organization-picker-name",
|
|
@@ -17685,14 +17965,14 @@ function OrganizationPicker({
|
|
|
17685
17965
|
}
|
|
17686
17966
|
)
|
|
17687
17967
|
] }),
|
|
17688
|
-
!publicDomain && /* @__PURE__ */
|
|
17689
|
-
/* @__PURE__ */
|
|
17690
|
-
/* @__PURE__ */
|
|
17968
|
+
!publicDomain && /* @__PURE__ */ jsxs34("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
17969
|
+
/* @__PURE__ */ jsx37("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
|
|
17970
|
+
/* @__PURE__ */ jsx37("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
|
|
17691
17971
|
["shared", "Shared"],
|
|
17692
17972
|
["private", "Private"]
|
|
17693
17973
|
].map(([value, label]) => {
|
|
17694
17974
|
const active = type === value;
|
|
17695
|
-
return /* @__PURE__ */
|
|
17975
|
+
return /* @__PURE__ */ jsx37(
|
|
17696
17976
|
"div",
|
|
17697
17977
|
{
|
|
17698
17978
|
role: "radio",
|
|
@@ -17711,12 +17991,12 @@ function OrganizationPicker({
|
|
|
17711
17991
|
borderRadius: T20.r3xl,
|
|
17712
17992
|
border: `1px solid ${active ? T20.primary : T20.borderSubtle}`
|
|
17713
17993
|
},
|
|
17714
|
-
children: /* @__PURE__ */
|
|
17994
|
+
children: /* @__PURE__ */ jsx37("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
|
|
17715
17995
|
},
|
|
17716
17996
|
value
|
|
17717
17997
|
);
|
|
17718
17998
|
}) }),
|
|
17719
|
-
/* @__PURE__ */
|
|
17999
|
+
/* @__PURE__ */ jsx37(
|
|
17720
18000
|
"span",
|
|
17721
18001
|
{
|
|
17722
18002
|
"data-testid": "organization-visibility-message",
|
|
@@ -17726,8 +18006,8 @@ function OrganizationPicker({
|
|
|
17726
18006
|
}
|
|
17727
18007
|
)
|
|
17728
18008
|
] }),
|
|
17729
|
-
/* @__PURE__ */
|
|
17730
|
-
|
|
18009
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ jsx37(
|
|
18010
|
+
ScButton21,
|
|
17731
18011
|
{
|
|
17732
18012
|
text: busy ? "Creating\u2026" : "Create organization",
|
|
17733
18013
|
variant: "primary",
|
|
@@ -17743,12 +18023,12 @@ function OrganizationPicker({
|
|
|
17743
18023
|
}
|
|
17744
18024
|
|
|
17745
18025
|
// src/use-billing-entitlement.ts
|
|
17746
|
-
import { useEffect as useEffect22, useRef as useRef13, useState as
|
|
18026
|
+
import { useEffect as useEffect22, useRef as useRef13, useState as useState29 } from "react";
|
|
17747
18027
|
function useBillingEntitlement(fetchCurrentPlan, key) {
|
|
17748
18028
|
const fetchRef = useRef13(fetchCurrentPlan);
|
|
17749
18029
|
fetchRef.current = fetchCurrentPlan;
|
|
17750
|
-
const [state, setState] =
|
|
17751
|
-
const [loading, setLoading] =
|
|
18030
|
+
const [state, setState] = useState29(null);
|
|
18031
|
+
const [loading, setLoading] = useState29(false);
|
|
17752
18032
|
useEffect22(() => {
|
|
17753
18033
|
const fetch2 = fetchRef.current;
|
|
17754
18034
|
setState(null);
|
|
@@ -17834,18 +18114,18 @@ var app_settings_page_default = {
|
|
|
17834
18114
|
};
|
|
17835
18115
|
|
|
17836
18116
|
// src/app-settings-page.tsx
|
|
17837
|
-
import { Fragment as
|
|
18117
|
+
import { Fragment as Fragment20, jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
17838
18118
|
function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }) {
|
|
17839
|
-
return /* @__PURE__ */
|
|
17840
|
-
/* @__PURE__ */
|
|
17841
|
-
/* @__PURE__ */
|
|
17842
|
-
/* @__PURE__ */
|
|
18119
|
+
return /* @__PURE__ */ jsxs35("header", { className: app_settings_page_default.header, children: [
|
|
18120
|
+
/* @__PURE__ */ jsx38("h1", { children: "App settings" }),
|
|
18121
|
+
/* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.actions, children: [
|
|
18122
|
+
/* @__PURE__ */ jsx38("a", { href: administrationHref, onClick: (event) => {
|
|
17843
18123
|
if (onOpenAdministration && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17844
18124
|
event.preventDefault();
|
|
17845
18125
|
onOpenAdministration();
|
|
17846
18126
|
}
|
|
17847
18127
|
}, children: "Account and workspace settings" }),
|
|
17848
|
-
onClose ? /* @__PURE__ */
|
|
18128
|
+
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
18129
|
] })
|
|
17850
18130
|
] });
|
|
17851
18131
|
}
|
|
@@ -17857,45 +18137,45 @@ function AppSettingsPage({
|
|
|
17857
18137
|
emptyDescription = "Account, workspace and organization settings are available above.",
|
|
17858
18138
|
children
|
|
17859
18139
|
}) {
|
|
17860
|
-
return /* @__PURE__ */
|
|
17861
|
-
/* @__PURE__ */
|
|
17862
|
-
children ?? /* @__PURE__ */
|
|
17863
|
-
/* @__PURE__ */
|
|
17864
|
-
/* @__PURE__ */
|
|
18140
|
+
return /* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.page, children: [
|
|
18141
|
+
/* @__PURE__ */ jsx38(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
|
|
18142
|
+
children ?? /* @__PURE__ */ jsxs35("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
|
|
18143
|
+
/* @__PURE__ */ jsx38("h2", { children: emptyTitle }),
|
|
18144
|
+
/* @__PURE__ */ jsx38("p", { children: emptyDescription })
|
|
17865
18145
|
] })
|
|
17866
18146
|
] });
|
|
17867
18147
|
}
|
|
17868
18148
|
function AppSettingsSection({ title, action, children }) {
|
|
17869
|
-
return /* @__PURE__ */
|
|
17870
|
-
/* @__PURE__ */
|
|
17871
|
-
/* @__PURE__ */
|
|
17872
|
-
action ? /* @__PURE__ */
|
|
18149
|
+
return /* @__PURE__ */ jsxs35("section", { className: app_settings_page_default.section, "aria-label": title, children: [
|
|
18150
|
+
/* @__PURE__ */ jsxs35("div", { className: app_settings_page_default.sectionHeader, children: [
|
|
18151
|
+
/* @__PURE__ */ jsx38("h2", { children: title }),
|
|
18152
|
+
action ? /* @__PURE__ */ jsx38("div", { className: app_settings_page_default.sectionAction, children: action }) : null
|
|
17873
18153
|
] }),
|
|
17874
|
-
/* @__PURE__ */
|
|
18154
|
+
/* @__PURE__ */ jsx38("div", { children })
|
|
17875
18155
|
] });
|
|
17876
18156
|
}
|
|
17877
18157
|
function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }) {
|
|
17878
18158
|
const reasonId = useId2();
|
|
17879
|
-
const content = /* @__PURE__ */
|
|
17880
|
-
/* @__PURE__ */
|
|
17881
|
-
/* @__PURE__ */
|
|
17882
|
-
description ? /* @__PURE__ */
|
|
18159
|
+
const content = /* @__PURE__ */ jsxs35(Fragment20, { children: [
|
|
18160
|
+
/* @__PURE__ */ jsxs35("span", { className: app_settings_page_default.rowCopy, children: [
|
|
18161
|
+
/* @__PURE__ */ jsx38("span", { className: app_settings_page_default.rowTitle, children: title }),
|
|
18162
|
+
description ? /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.rowDescription, children: description }) : null
|
|
17883
18163
|
] }),
|
|
17884
|
-
summary || trailing || href || onClick ? /* @__PURE__ */
|
|
18164
|
+
summary || trailing || href || onClick ? /* @__PURE__ */ jsxs35("span", { className: app_settings_page_default.rowEnd, children: [
|
|
17885
18165
|
summary,
|
|
17886
|
-
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */
|
|
18166
|
+
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ jsx38(SiconArrowRight2, { size: 18, "aria-hidden": "true" }) : null)
|
|
17887
18167
|
] }) : null,
|
|
17888
|
-
disabledReason ? /* @__PURE__ */
|
|
18168
|
+
disabledReason ? /* @__PURE__ */ jsx38("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
|
|
17889
18169
|
] });
|
|
17890
18170
|
const props = { className: app_settings_page_default.row, "aria-label": ariaLabel, "aria-describedby": disabledReason ? reasonId : void 0 };
|
|
17891
|
-
if (href && !disabled) return /* @__PURE__ */
|
|
18171
|
+
if (href && !disabled) return /* @__PURE__ */ jsx38("a", { ...props, href, onClick: (event) => {
|
|
17892
18172
|
if (onClick && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17893
18173
|
event.preventDefault();
|
|
17894
18174
|
onClick();
|
|
17895
18175
|
}
|
|
17896
18176
|
}, children: content });
|
|
17897
|
-
if (onClick || disabled) return /* @__PURE__ */
|
|
17898
|
-
return /* @__PURE__ */
|
|
18177
|
+
if (onClick || disabled) return /* @__PURE__ */ jsx38("button", { ...props, type: "button", disabled, onClick, children: content });
|
|
18178
|
+
return /* @__PURE__ */ jsx38("div", { ...props, children: content });
|
|
17899
18179
|
}
|
|
17900
18180
|
export {
|
|
17901
18181
|
APP_KEYS,
|
|
@@ -17925,6 +18205,7 @@ export {
|
|
|
17925
18205
|
MemberListToolbar,
|
|
17926
18206
|
OrganizationContent,
|
|
17927
18207
|
OrganizationIntegrationsContent,
|
|
18208
|
+
OrganizationLoginMethodsContent,
|
|
17928
18209
|
OrganizationMemberModal,
|
|
17929
18210
|
OrganizationModal,
|
|
17930
18211
|
OrganizationPicker,
|
|
@@ -17998,6 +18279,7 @@ export {
|
|
|
17998
18279
|
limitSourceLabel,
|
|
17999
18280
|
loadCurrentPlan,
|
|
18000
18281
|
loadWorkspaceOrganization,
|
|
18282
|
+
loginMethodsSwitchState,
|
|
18001
18283
|
memberRoleUpdate,
|
|
18002
18284
|
minPoolEndDate,
|
|
18003
18285
|
minimumCreditLimit,
|
|
@@ -18024,6 +18306,7 @@ export {
|
|
|
18024
18306
|
sliceUsageLogsPage,
|
|
18025
18307
|
sortReferredUsers,
|
|
18026
18308
|
sponsoredCreditsText,
|
|
18309
|
+
ssoLabel,
|
|
18027
18310
|
toCsv,
|
|
18028
18311
|
toLocalDateInput,
|
|
18029
18312
|
usageLogsCsvRows,
|