@streamoid/settings 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +88 -3
- package/dist/index.d.ts +88 -3
- package/dist/index.js +662 -384
- package/dist/index.mjs +622 -344
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __export(index_exports, {
|
|
|
47
47
|
MemberListToolbar: () => MemberListToolbar,
|
|
48
48
|
OrganizationContent: () => OrganizationContent,
|
|
49
49
|
OrganizationIntegrationsContent: () => OrganizationIntegrationsContent,
|
|
50
|
+
OrganizationLoginMethodsContent: () => OrganizationLoginMethodsContent,
|
|
50
51
|
OrganizationMemberModal: () => OrganizationMemberModal,
|
|
51
52
|
OrganizationModal: () => OrganizationModal,
|
|
52
53
|
OrganizationPicker: () => OrganizationPicker,
|
|
@@ -120,6 +121,7 @@ __export(index_exports, {
|
|
|
120
121
|
limitSourceLabel: () => limitSourceLabel,
|
|
121
122
|
loadCurrentPlan: () => loadCurrentPlan,
|
|
122
123
|
loadWorkspaceOrganization: () => loadWorkspaceOrganization,
|
|
124
|
+
loginMethodsSwitchState: () => loginMethodsSwitchState,
|
|
123
125
|
memberRoleUpdate: () => memberRoleUpdate,
|
|
124
126
|
minPoolEndDate: () => minPoolEndDate,
|
|
125
127
|
minimumCreditLimit: () => minimumCreditLimit,
|
|
@@ -429,7 +431,8 @@ var TAB_SCOPE = {
|
|
|
429
431
|
billing: "workspace",
|
|
430
432
|
apikey: "workspace",
|
|
431
433
|
connectedApps: "account",
|
|
432
|
-
organizationIntegrations: "organization"
|
|
434
|
+
organizationIntegrations: "organization",
|
|
435
|
+
organizationLoginMethods: "organization"
|
|
433
436
|
};
|
|
434
437
|
var SCOPE_LABELS = {
|
|
435
438
|
account: "Account",
|
|
@@ -450,7 +453,8 @@ var TAB_TO_URL = {
|
|
|
450
453
|
billing: "billing",
|
|
451
454
|
apikey: "api-keys",
|
|
452
455
|
connectedApps: "connected-apps",
|
|
453
|
-
organizationIntegrations: "organization/integrations"
|
|
456
|
+
organizationIntegrations: "organization/integrations",
|
|
457
|
+
organizationLoginMethods: "organization/login-methods"
|
|
454
458
|
};
|
|
455
459
|
var URL_TO_TAB = {
|
|
456
460
|
/* Canonical, scope-first slugs. */
|
|
@@ -461,6 +465,7 @@ var URL_TO_TAB = {
|
|
|
461
465
|
"organization/people": "organization",
|
|
462
466
|
"organization/workspaces": "organizationWorkspaces",
|
|
463
467
|
"organization/integrations": "organizationIntegrations",
|
|
468
|
+
"organization/login-methods": "organizationLoginMethods",
|
|
464
469
|
/* The Domains tab is gone; its join requests live under Workspaces. */
|
|
465
470
|
"organization/domains": "organizationWorkspaces",
|
|
466
471
|
/* Unscoped destinations. */
|
|
@@ -492,7 +497,8 @@ var TAB_LABELS = {
|
|
|
492
497
|
billing: "Billing & usage",
|
|
493
498
|
apikey: "API Keys",
|
|
494
499
|
connectedApps: "Connected apps",
|
|
495
|
-
organizationIntegrations: "Integrations"
|
|
500
|
+
organizationIntegrations: "Integrations",
|
|
501
|
+
organizationLoginMethods: "Login methods"
|
|
496
502
|
};
|
|
497
503
|
var TAB_DESCRIPTIONS = {
|
|
498
504
|
profile: "Your name, photo, language and personalisation",
|
|
@@ -507,7 +513,8 @@ var TAB_DESCRIPTIONS = {
|
|
|
507
513
|
billing: "Workspace plan, credits, invoices and usage history",
|
|
508
514
|
apikey: "Create and revoke keys for calling the Streamoid APIs",
|
|
509
515
|
connectedApps: "Apps like ChatGPT and Codex that you've allowed to use CXO for you",
|
|
510
|
-
organizationIntegrations: "Turn ChatGPT and Codex on for the organization, and revoke any member's connection"
|
|
516
|
+
organizationIntegrations: "Turn ChatGPT and Codex on for the organization, and revoke any member's connection",
|
|
517
|
+
organizationLoginMethods: "Choose whether people sign in with an email code, company SSO, or either"
|
|
511
518
|
};
|
|
512
519
|
function resolveSettingsTabFromPath(path) {
|
|
513
520
|
const segments = path.split("/").filter(Boolean);
|
|
@@ -545,6 +552,7 @@ function AdministrationOverview({
|
|
|
545
552
|
isWorkspaceAdmin,
|
|
546
553
|
showConnectedApps,
|
|
547
554
|
showIntegrations,
|
|
555
|
+
showLoginMethods = false,
|
|
548
556
|
showReferral = false,
|
|
549
557
|
canInvite,
|
|
550
558
|
onNavigate,
|
|
@@ -563,7 +571,7 @@ function AdministrationOverview({
|
|
|
563
571
|
{
|
|
564
572
|
title: "Organization",
|
|
565
573
|
scopeName: hasOrganization ? organizationName : null,
|
|
566
|
-
tabs: ["organizationList", ...hasOrganization ? ["organization", "organizationWorkspaces"] : [], ...showIntegrations ? ["organizationIntegrations"] : []]
|
|
574
|
+
tabs: ["organizationList", ...hasOrganization ? ["organization", "organizationWorkspaces"] : [], ...showIntegrations ? ["organizationIntegrations"] : [], ...showLoginMethods ? ["organizationLoginMethods"] : []]
|
|
567
575
|
}
|
|
568
576
|
];
|
|
569
577
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: administration_overview_default.overview, children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: administration_overview_default.section, "aria-label": group.scopeName ? `${group.title} \xB7 ${group.scopeName}` : group.title, children: [
|
|
@@ -767,11 +775,11 @@ function useWorkspaceOrganization({
|
|
|
767
775
|
}
|
|
768
776
|
|
|
769
777
|
// src/settings-content.tsx
|
|
770
|
-
var
|
|
771
|
-
var import_ui21 = require("@streamoid/ui");
|
|
778
|
+
var import_react28 = require("react");
|
|
772
779
|
var import_ui22 = require("@streamoid/ui");
|
|
773
780
|
var import_ui23 = require("@streamoid/ui");
|
|
774
781
|
var import_ui24 = require("@streamoid/ui");
|
|
782
|
+
var import_ui25 = require("@streamoid/ui");
|
|
775
783
|
var import_icons18 = require("@streamoid/icons");
|
|
776
784
|
|
|
777
785
|
// src/icons/SiconKey.tsx
|
|
@@ -14966,8 +14974,271 @@ function OrganizationIntegrationsContent() {
|
|
|
14966
14974
|
] });
|
|
14967
14975
|
}
|
|
14968
14976
|
|
|
14969
|
-
// src/
|
|
14977
|
+
// src/organization-login-methods-content.tsx
|
|
14978
|
+
var import_react27 = require("react");
|
|
14979
|
+
var import_ui21 = require("@streamoid/ui");
|
|
14970
14980
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
14981
|
+
var AT_LEAST_ONE_HINT = "At least one login method must stay on, or nobody can sign in.";
|
|
14982
|
+
var NO_SSO_HINT = "Company SSO isn't set up for your organization. Contact Streamoid to set it up.";
|
|
14983
|
+
var SELF_GUARD_HINT = "Sign in once with company SSO before turning email codes off.";
|
|
14984
|
+
var SESSION_NOTE = "People already signed in stay signed in until their session ends (up to 7 days).";
|
|
14985
|
+
function loginMethodsSwitchState(data) {
|
|
14986
|
+
const hasConnection = !!data.connection;
|
|
14987
|
+
let emailHint = null;
|
|
14988
|
+
if (data.emailCode) {
|
|
14989
|
+
if (!hasConnection) emailHint = null;
|
|
14990
|
+
else if (!data.sso) emailHint = AT_LEAST_ONE_HINT;
|
|
14991
|
+
else if (data.constraints.selfLockoutGuard) emailHint = SELF_GUARD_HINT;
|
|
14992
|
+
}
|
|
14993
|
+
const emailLocked = data.emailCode && (!data.constraints.canDisableEmailCode || data.constraints.selfLockoutGuard);
|
|
14994
|
+
let ssoHint = null;
|
|
14995
|
+
if (!hasConnection) ssoHint = NO_SSO_HINT;
|
|
14996
|
+
else if (data.sso && !data.emailCode) ssoHint = AT_LEAST_ONE_HINT;
|
|
14997
|
+
const ssoLocked = !hasConnection || data.sso && !data.emailCode;
|
|
14998
|
+
return {
|
|
14999
|
+
emailCode: { checked: data.emailCode, disabled: emailLocked, hint: emailHint },
|
|
15000
|
+
sso: { checked: data.sso, disabled: ssoLocked, hint: ssoHint }
|
|
15001
|
+
};
|
|
15002
|
+
}
|
|
15003
|
+
var domainsLabel = (domains) => domains.length ? domains.map((d) => `@${d}`).join(" or ") : "your organization's";
|
|
15004
|
+
var memberCsv = (members) => toCsv([["Name", "Email", "Role"], ...members.map((m) => [m.name ?? "", m.email, m.role])]);
|
|
15005
|
+
function SwitchRow({
|
|
15006
|
+
title,
|
|
15007
|
+
description,
|
|
15008
|
+
state,
|
|
15009
|
+
busy,
|
|
15010
|
+
onToggle
|
|
15011
|
+
}) {
|
|
15012
|
+
const disabled = state.disabled || busy;
|
|
15013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start w-full", style: { gap: T15.spXl }, children: [
|
|
15014
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.spXs }, children: [
|
|
15015
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: title }),
|
|
15016
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Muted, { children: description }),
|
|
15017
|
+
state.hint && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.primary }, children: state.hint })
|
|
15018
|
+
] }),
|
|
15019
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T15.spMd, minHeight: 26 }, children: [
|
|
15020
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: state.checked ? "On" : "Off" }),
|
|
15021
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15022
|
+
import_ui21.ScToggleSwitch,
|
|
15023
|
+
{
|
|
15024
|
+
checked: state.checked,
|
|
15025
|
+
disabled,
|
|
15026
|
+
onToggle,
|
|
15027
|
+
role: "switch",
|
|
15028
|
+
"aria-checked": state.checked,
|
|
15029
|
+
"aria-disabled": disabled,
|
|
15030
|
+
"aria-label": title,
|
|
15031
|
+
tabIndex: 0,
|
|
15032
|
+
onKeyDown: (event) => {
|
|
15033
|
+
if ((event.key === " " || event.key === "Enter") && !disabled) {
|
|
15034
|
+
event.preventDefault();
|
|
15035
|
+
onToggle(!state.checked);
|
|
15036
|
+
}
|
|
15037
|
+
}
|
|
15038
|
+
}
|
|
15039
|
+
) })
|
|
15040
|
+
] })
|
|
15041
|
+
] });
|
|
15042
|
+
}
|
|
15043
|
+
function MemberList({ members }) {
|
|
15044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15045
|
+
"ul",
|
|
15046
|
+
{
|
|
15047
|
+
"aria-label": "Not signed in with SSO yet",
|
|
15048
|
+
className: "flex flex-col w-full",
|
|
15049
|
+
style: { maxHeight: 240, overflowY: "auto", border: `1px solid ${T15.borderSubtle}`, borderRadius: T15.rXl },
|
|
15050
|
+
children: members.map((m) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15051
|
+
"li",
|
|
15052
|
+
{
|
|
15053
|
+
className: "flex items-center w-full",
|
|
15054
|
+
style: { gap: T15.spMd, padding: `${T15.spMd} ${T15.spXl}`, borderBottom: `1px solid ${T15.borderSubtle}` },
|
|
15055
|
+
children: [
|
|
15056
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("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 }),
|
|
15057
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "flex-1 min-w-0 truncate", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted }, children: m.email }),
|
|
15058
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "shrink-0", style: { fontFamily: T15.font, fontSize: T15.fsSm, lineHeight: T15.lhSm, color: T15.muted, textTransform: "capitalize" }, children: m.role })
|
|
15059
|
+
]
|
|
15060
|
+
},
|
|
15061
|
+
m.userId
|
|
15062
|
+
))
|
|
15063
|
+
}
|
|
15064
|
+
);
|
|
15065
|
+
}
|
|
15066
|
+
var card = {
|
|
15067
|
+
gap: T15.spXl,
|
|
15068
|
+
padding: T15.sp3xl,
|
|
15069
|
+
backgroundColor: T15.surfaceBase,
|
|
15070
|
+
border: `1px solid ${T15.borderSubtle}`,
|
|
15071
|
+
borderRadius: T15.r3xl
|
|
15072
|
+
};
|
|
15073
|
+
function OrganizationLoginMethodsContent() {
|
|
15074
|
+
const { loginMethods, organization, toast } = useSettingsAdapters();
|
|
15075
|
+
const current = organization.current;
|
|
15076
|
+
const orgId = current?.id ?? null;
|
|
15077
|
+
const canLoad = !!loginMethods && !!orgId && current?.role === "admin";
|
|
15078
|
+
const data = useLoad(
|
|
15079
|
+
canLoad ? orgId : null,
|
|
15080
|
+
(signal) => loginMethods.get(orgId, signal),
|
|
15081
|
+
"Couldn't load this organization's login methods."
|
|
15082
|
+
);
|
|
15083
|
+
const [saving, setSaving] = (0, import_react27.useState)(false);
|
|
15084
|
+
const [confirmEmailOff, setConfirmEmailOff] = (0, import_react27.useState)(false);
|
|
15085
|
+
if (!canLoad) {
|
|
15086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T15.sp3xl }, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Muted, { children: !loginMethods ? "Login methods aren't available here yet." : "Login methods are managed by organization admins." }) });
|
|
15087
|
+
}
|
|
15088
|
+
const value = data.value;
|
|
15089
|
+
const state = value ? loginMethodsSwitchState(value) : null;
|
|
15090
|
+
const ssoName = value?.connection?.displayName ?? "company";
|
|
15091
|
+
const domains = domainsLabel(value?.coveredDomains ?? []);
|
|
15092
|
+
const notYet = value?.readiness?.notYet ?? [];
|
|
15093
|
+
async function save(next) {
|
|
15094
|
+
if (saving || !value) return;
|
|
15095
|
+
setSaving(true);
|
|
15096
|
+
try {
|
|
15097
|
+
const result = await loginMethods.update(orgId, next);
|
|
15098
|
+
data.setValue(result);
|
|
15099
|
+
toast.success("Login methods updated. Changes apply within a minute.");
|
|
15100
|
+
setConfirmEmailOff(false);
|
|
15101
|
+
} catch (cause) {
|
|
15102
|
+
toast.error(errorMessage(cause, { method: "PUT" }));
|
|
15103
|
+
} finally {
|
|
15104
|
+
setSaving(false);
|
|
15105
|
+
}
|
|
15106
|
+
}
|
|
15107
|
+
async function copyEmails() {
|
|
15108
|
+
try {
|
|
15109
|
+
await navigator.clipboard.writeText(notYet.map((m) => m.email).join("\n"));
|
|
15110
|
+
toast.success(`Copied ${notYet.length} email ${notYet.length === 1 ? "address" : "addresses"}`);
|
|
15111
|
+
} catch {
|
|
15112
|
+
toast.error("Couldn't copy to the clipboard.");
|
|
15113
|
+
}
|
|
15114
|
+
}
|
|
15115
|
+
function downloadCsv() {
|
|
15116
|
+
const blob = new Blob([memberCsv(notYet)], { type: "text/csv;charset=utf-8;" });
|
|
15117
|
+
const url = URL.createObjectURL(blob);
|
|
15118
|
+
const link = document.createElement("a");
|
|
15119
|
+
link.href = url;
|
|
15120
|
+
link.download = `not-signed-in-with-sso-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`;
|
|
15121
|
+
link.click();
|
|
15122
|
+
URL.revokeObjectURL(url);
|
|
15123
|
+
}
|
|
15124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
15125
|
+
"div",
|
|
15126
|
+
{
|
|
15127
|
+
className: "flex flex-col flex-1 min-w-0 min-h-0 h-full overflow-y-auto",
|
|
15128
|
+
style: { gap: T15.sp3xl, paddingBottom: T15.sp6xl },
|
|
15129
|
+
children: [
|
|
15130
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ScopeHeader, { kind: "organization", name: current?.name, imageUrl: current?.imageUrl, role: current?.role }),
|
|
15131
|
+
data.error && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoadError, { message: data.error, onRetry: data.retry }),
|
|
15132
|
+
!value && !data.error && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Spinner, {}),
|
|
15133
|
+
value && state && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
15134
|
+
value.failOpen && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { role: "alert", className: "flex flex-col w-full", style: { ...card, gap: T15.spXs }, children: [
|
|
15135
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("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." }),
|
|
15136
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Muted, { children: "Your organization is set to company SSO only. Contact Streamoid to fix the SSO connection." })
|
|
15137
|
+
] }),
|
|
15138
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { "aria-label": "Login methods", className: "flex flex-col w-full shrink-0", style: card, children: [
|
|
15139
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15140
|
+
SwitchRow,
|
|
15141
|
+
{
|
|
15142
|
+
title: "Email code",
|
|
15143
|
+
description: `Anyone with an ${domains} address gets a one-time code by email. Google and Microsoft sign-in follow this switch.`,
|
|
15144
|
+
state: state.emailCode,
|
|
15145
|
+
busy: saving,
|
|
15146
|
+
onToggle: (next) => next ? save({ emailCode: true, sso: value.sso }) : setConfirmEmailOff(true)
|
|
15147
|
+
}
|
|
15148
|
+
),
|
|
15149
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { borderTop: `1px solid ${T15.borderSubtle}` } }),
|
|
15150
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15151
|
+
SwitchRow,
|
|
15152
|
+
{
|
|
15153
|
+
title: "Company SSO",
|
|
15154
|
+
description: `People your IT team has given access sign in through ${ssoName} SSO.`,
|
|
15155
|
+
state: state.sso,
|
|
15156
|
+
busy: saving,
|
|
15157
|
+
onToggle: (next) => save({ emailCode: value.emailCode, sso: next })
|
|
15158
|
+
}
|
|
15159
|
+
)
|
|
15160
|
+
] }),
|
|
15161
|
+
value.readiness && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { "aria-label": "SSO readiness", className: "flex flex-col w-full shrink-0", style: card, children: [
|
|
15162
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { style: { fontFamily: T15.font, fontSize: T15.fsMd, fontWeight: 600, lineHeight: T15.lhMd, color: T15.primary }, children: [
|
|
15163
|
+
value.readiness.signedInWithSso,
|
|
15164
|
+
" of ",
|
|
15165
|
+
value.readiness.affectedTotal,
|
|
15166
|
+
" ",
|
|
15167
|
+
value.readiness.affectedTotal === 1 ? "person" : "people",
|
|
15168
|
+
" at ",
|
|
15169
|
+
domains,
|
|
15170
|
+
" have signed in with SSO.",
|
|
15171
|
+
notYet.length > 0 ? ` ${notYet.length} haven't yet.` : ""
|
|
15172
|
+
] }),
|
|
15173
|
+
notYet.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
15174
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Muted, { children: [
|
|
15175
|
+
"Send this list to your IT team to give them access to ",
|
|
15176
|
+
ssoName,
|
|
15177
|
+
" SSO. When it's empty, it's safe to turn email codes off."
|
|
15178
|
+
] }),
|
|
15179
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(MemberList, { members: notYet }),
|
|
15180
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center", style: { gap: T15.spMd }, children: [
|
|
15181
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui21.ScButton, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }),
|
|
15182
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui21.ScButton, { text: "Download CSV", variant: "outline", size: "sm", onClick: downloadCsv })
|
|
15183
|
+
] })
|
|
15184
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Muted, { children: "Everyone has signed in with SSO at least once." }),
|
|
15185
|
+
value.readiness.notAffected > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Muted, { children: [
|
|
15186
|
+
value.readiness.notAffected,
|
|
15187
|
+
" ",
|
|
15188
|
+
value.readiness.notAffected === 1 ? "member uses" : "members use",
|
|
15189
|
+
" an address on another domain and ",
|
|
15190
|
+
value.readiness.notAffected === 1 ? "isn't" : "aren't",
|
|
15191
|
+
" affected by these switches."
|
|
15192
|
+
] })
|
|
15193
|
+
] }),
|
|
15194
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col", style: { gap: T15.spXs }, children: [
|
|
15195
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Muted, { children: [
|
|
15196
|
+
"Changes apply within a minute. ",
|
|
15197
|
+
SESSION_NOTE
|
|
15198
|
+
] }),
|
|
15199
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(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." })
|
|
15200
|
+
] }),
|
|
15201
|
+
confirmEmailOff && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
15202
|
+
ConfirmActionModal,
|
|
15203
|
+
{
|
|
15204
|
+
title: "Turn off email codes?",
|
|
15205
|
+
body: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col", style: { gap: T15.spMd }, children: [
|
|
15206
|
+
notYet.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
15207
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
|
|
15208
|
+
"These ",
|
|
15209
|
+
notYet.length,
|
|
15210
|
+
" ",
|
|
15211
|
+
notYet.length === 1 ? "person has" : "people have",
|
|
15212
|
+
" never signed in with",
|
|
15213
|
+
" ",
|
|
15214
|
+
ssoName,
|
|
15215
|
+
" SSO and will be locked out until IT gives them access:"
|
|
15216
|
+
] }),
|
|
15217
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(MemberList, { members: notYet }),
|
|
15218
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_ui21.ScButton, { text: "Copy emails", variant: "outline", size: "sm", onClick: copyEmails }) })
|
|
15219
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
|
|
15220
|
+
"Everyone at ",
|
|
15221
|
+
domains,
|
|
15222
|
+
" will have to sign in with ",
|
|
15223
|
+
ssoName,
|
|
15224
|
+
" SSO. Google and Microsoft sign-in turn off too."
|
|
15225
|
+
] }),
|
|
15226
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: SESSION_NOTE })
|
|
15227
|
+
] }),
|
|
15228
|
+
confirmText: "Turn off email codes",
|
|
15229
|
+
busyText: "Turning off\u2026",
|
|
15230
|
+
onClose: () => setConfirmEmailOff(false),
|
|
15231
|
+
onConfirm: () => save({ emailCode: false, sso: value.sso })
|
|
15232
|
+
}
|
|
15233
|
+
)
|
|
15234
|
+
] })
|
|
15235
|
+
]
|
|
15236
|
+
}
|
|
15237
|
+
);
|
|
15238
|
+
}
|
|
15239
|
+
|
|
15240
|
+
// src/settings-content.tsx
|
|
15241
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
14971
15242
|
function deriveInitials(name) {
|
|
14972
15243
|
return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
14973
15244
|
}
|
|
@@ -15003,8 +15274,8 @@ function SettingsNavItem({
|
|
|
15003
15274
|
onTabChange
|
|
15004
15275
|
}) {
|
|
15005
15276
|
const isActive = activeTab === tab;
|
|
15006
|
-
return /* @__PURE__ */ (0,
|
|
15007
|
-
|
|
15277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SettingsTooltip, { content: TAB_DESCRIPTIONS[tab], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15278
|
+
import_ui22.ScSidebarMenu,
|
|
15008
15279
|
{
|
|
15009
15280
|
icon: icon(isActive ? PRIMARY_COLOR3 : MUTED_COLOR2),
|
|
15010
15281
|
text: label,
|
|
@@ -15033,9 +15304,10 @@ function SettingsNav({
|
|
|
15033
15304
|
isWorkspaceAdmin,
|
|
15034
15305
|
showConnectedApps = false,
|
|
15035
15306
|
showIntegrations = false,
|
|
15307
|
+
showLoginMethods = false,
|
|
15036
15308
|
showReferral = false
|
|
15037
15309
|
}) {
|
|
15038
|
-
const item = (tab, icon) => /* @__PURE__ */ (0,
|
|
15310
|
+
const item = (tab, icon) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15039
15311
|
SettingsNavItem,
|
|
15040
15312
|
{
|
|
15041
15313
|
tab,
|
|
@@ -15045,7 +15317,7 @@ function SettingsNav({
|
|
|
15045
15317
|
onTabChange
|
|
15046
15318
|
}
|
|
15047
15319
|
);
|
|
15048
|
-
return /* @__PURE__ */ (0,
|
|
15320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15049
15321
|
"div",
|
|
15050
15322
|
{
|
|
15051
15323
|
className: "flex flex-col items-start shrink-0 relative overflow-y-auto",
|
|
@@ -15068,43 +15340,44 @@ function SettingsNav({
|
|
|
15068
15340
|
gap: "var(--spacing-5xl)"
|
|
15069
15341
|
},
|
|
15070
15342
|
children: [
|
|
15071
|
-
/* @__PURE__ */ (0,
|
|
15072
|
-
/* @__PURE__ */ (0,
|
|
15073
|
-
item("profile", (color) => /* @__PURE__ */ (0,
|
|
15074
|
-
item("workspaceList", (color) => /* @__PURE__ */ (0,
|
|
15075
|
-
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ (0,
|
|
15076
|
-
showReferral && item("referral", (color) => /* @__PURE__ */ (0,
|
|
15343
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15344
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Account" }),
|
|
15345
|
+
item("profile", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconUser, { className: "w-5 h-5", color })),
|
|
15346
|
+
item("workspaceList", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconSwitch, { className: "w-5 h-5", color })),
|
|
15347
|
+
showConnectedApps && item("connectedApps", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15348
|
+
showReferral && item("referral", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconReferral, { className: "w-5 h-5", color }))
|
|
15077
15349
|
] }),
|
|
15078
|
-
/* @__PURE__ */ (0,
|
|
15079
|
-
/* @__PURE__ */ (0,
|
|
15080
|
-
/* @__PURE__ */ (0,
|
|
15081
|
-
item("workspace", (color) => /* @__PURE__ */ (0,
|
|
15082
|
-
item("workspaceMembers", (color) => /* @__PURE__ */ (0,
|
|
15083
|
-
isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
15084
|
-
item("billing", (color) => /* @__PURE__ */ (0,
|
|
15085
|
-
item("apikey", (color) => /* @__PURE__ */ (0,
|
|
15350
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ui22.ScHDivider, {}),
|
|
15351
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: [
|
|
15352
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { title: workspaceName ?? void 0, style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Workspace" }),
|
|
15353
|
+
item("workspace", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconSettings, { className: "w-5 h-5", color })),
|
|
15354
|
+
item("workspaceMembers", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconTeam, { className: "w-5 h-5", color })),
|
|
15355
|
+
isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
15356
|
+
item("billing", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconBilling, { className: "w-5 h-5", color })),
|
|
15357
|
+
item("apikey", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SiconKey_default, { className: "w-5 h-5", color }))
|
|
15086
15358
|
] }),
|
|
15087
|
-
!isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
15359
|
+
!isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { style: { margin: "4px 12px", fontSize: 12, lineHeight: "18px", color: MUTED_COLOR2 }, children: "Contact your workspace admin for credit top-ups and billing history." })
|
|
15088
15360
|
] }),
|
|
15089
|
-
/* @__PURE__ */ (0,
|
|
15090
|
-
/* @__PURE__ */ (0,
|
|
15091
|
-
/* @__PURE__ */ (0,
|
|
15092
|
-
item("organizationList", (color) => /* @__PURE__ */ (0,
|
|
15093
|
-
item("organization", (color) => /* @__PURE__ */ (0,
|
|
15094
|
-
item("organizationWorkspaces", (color) => /* @__PURE__ */ (0,
|
|
15095
|
-
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ (0,
|
|
15096
|
-
|
|
15097
|
-
|
|
15361
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ui22.ScHDivider, {}),
|
|
15362
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col w-full", style: { gap: "var(--spacing-md)" }, children: hasOrganization ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
15363
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { padding: "4px 12px", fontSize: 11, fontWeight: 500, color: MUTED_COLOR2, textTransform: "uppercase", letterSpacing: "0.08em" }, children: "Organization" }),
|
|
15364
|
+
item("organizationList", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconSwitch, { className: "w-5 h-5", color })),
|
|
15365
|
+
item("organization", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconTeam, { className: "w-5 h-5", color })),
|
|
15366
|
+
item("organizationWorkspaces", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconWorkspace, { className: "w-5 h-5", color })),
|
|
15367
|
+
showIntegrations && item("organizationIntegrations", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SiconPlug_default, { className: "w-5 h-5", color })),
|
|
15368
|
+
showLoginMethods && item("organizationLoginMethods", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconLock, { className: "w-5 h-5", color }))
|
|
15369
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
15370
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15098
15371
|
SettingsNavItem,
|
|
15099
15372
|
{
|
|
15100
15373
|
tab: "organization",
|
|
15101
15374
|
label: "Organization",
|
|
15102
|
-
icon: (color) => /* @__PURE__ */ (0,
|
|
15375
|
+
icon: (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconGlobe, { className: "w-5 h-5", color }),
|
|
15103
15376
|
activeTab,
|
|
15104
15377
|
onTabChange
|
|
15105
15378
|
}
|
|
15106
15379
|
),
|
|
15107
|
-
item("organizationList", (color) => /* @__PURE__ */ (0,
|
|
15380
|
+
item("organizationList", (color) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconSwitch, { className: "w-5 h-5", color }))
|
|
15108
15381
|
] }) })
|
|
15109
15382
|
]
|
|
15110
15383
|
}
|
|
@@ -15113,7 +15386,7 @@ function SettingsNav({
|
|
|
15113
15386
|
var SPECIALIZATION_ICON_SIZE = 24;
|
|
15114
15387
|
function SpecializationIcon({ iconUrl }) {
|
|
15115
15388
|
if (iconUrl) {
|
|
15116
|
-
return /* @__PURE__ */ (0,
|
|
15389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15117
15390
|
"img",
|
|
15118
15391
|
{
|
|
15119
15392
|
src: iconUrl,
|
|
@@ -15126,7 +15399,7 @@ function SpecializationIcon({ iconUrl }) {
|
|
|
15126
15399
|
}
|
|
15127
15400
|
);
|
|
15128
15401
|
}
|
|
15129
|
-
return /* @__PURE__ */ (0,
|
|
15402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15130
15403
|
import_icons18.SiconBolt,
|
|
15131
15404
|
{
|
|
15132
15405
|
style: {
|
|
@@ -15158,10 +15431,10 @@ function SpecializationDropdown({
|
|
|
15158
15431
|
disabled
|
|
15159
15432
|
}) {
|
|
15160
15433
|
const { auth } = useSettingsAdapters();
|
|
15161
|
-
const [open, setOpen] = (0,
|
|
15162
|
-
const containerRef = (0,
|
|
15163
|
-
const [options, setOptions] = (0,
|
|
15164
|
-
(0,
|
|
15434
|
+
const [open, setOpen] = (0, import_react28.useState)(false);
|
|
15435
|
+
const containerRef = (0, import_react28.useRef)(null);
|
|
15436
|
+
const [options, setOptions] = (0, import_react28.useState)([]);
|
|
15437
|
+
(0, import_react28.useEffect)(() => {
|
|
15165
15438
|
if (!auth.getSpecializations) return;
|
|
15166
15439
|
let cancelled = false;
|
|
15167
15440
|
auth.getSpecializations().then((items) => {
|
|
@@ -15181,7 +15454,7 @@ function SpecializationDropdown({
|
|
|
15181
15454
|
cancelled = true;
|
|
15182
15455
|
};
|
|
15183
15456
|
}, [auth]);
|
|
15184
|
-
(0,
|
|
15457
|
+
(0, import_react28.useEffect)(() => {
|
|
15185
15458
|
if (!open) return;
|
|
15186
15459
|
function handleMouseDown(e) {
|
|
15187
15460
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -15199,15 +15472,15 @@ function SpecializationDropdown({
|
|
|
15199
15472
|
};
|
|
15200
15473
|
}, [open]);
|
|
15201
15474
|
const selected = options.find((o) => o.id === value);
|
|
15202
|
-
return /* @__PURE__ */ (0,
|
|
15475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15203
15476
|
"div",
|
|
15204
15477
|
{
|
|
15205
15478
|
ref: containerRef,
|
|
15206
15479
|
className: "w-full",
|
|
15207
15480
|
style: { position: "relative" },
|
|
15208
15481
|
children: [
|
|
15209
|
-
/* @__PURE__ */ (0,
|
|
15210
|
-
/* @__PURE__ */ (0,
|
|
15482
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15483
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15211
15484
|
"div",
|
|
15212
15485
|
{
|
|
15213
15486
|
className: "spec-dropdown-trigger",
|
|
@@ -15215,16 +15488,16 @@ function SpecializationDropdown({
|
|
|
15215
15488
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15216
15489
|
"aria-haspopup": "listbox",
|
|
15217
15490
|
"aria-expanded": open,
|
|
15218
|
-
children: /* @__PURE__ */ (0,
|
|
15219
|
-
|
|
15491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15492
|
+
import_ui23.ScTextField,
|
|
15220
15493
|
{
|
|
15221
15494
|
label: "Specialization",
|
|
15222
15495
|
labelGroup: "label",
|
|
15223
15496
|
value: selected?.label ?? "",
|
|
15224
15497
|
placeholderFilled: "Select specialization",
|
|
15225
15498
|
tfGroup: "icon-left-right",
|
|
15226
|
-
tfLeftIcon: /* @__PURE__ */ (0,
|
|
15227
|
-
tfRightIcon: /* @__PURE__ */ (0,
|
|
15499
|
+
tfLeftIcon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SpecializationIcon, { iconUrl: selected?.iconUrl }),
|
|
15500
|
+
tfRightIcon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15228
15501
|
"span",
|
|
15229
15502
|
{
|
|
15230
15503
|
style: {
|
|
@@ -15234,7 +15507,7 @@ function SpecializationDropdown({
|
|
|
15234
15507
|
transform: open ? "rotate(180deg)" : "none",
|
|
15235
15508
|
transition: "transform 120ms ease-out"
|
|
15236
15509
|
},
|
|
15237
|
-
children: /* @__PURE__ */ (0,
|
|
15510
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconDown, {})
|
|
15238
15511
|
}
|
|
15239
15512
|
),
|
|
15240
15513
|
className: "sc-text-field-full-width",
|
|
@@ -15245,7 +15518,7 @@ function SpecializationDropdown({
|
|
|
15245
15518
|
)
|
|
15246
15519
|
}
|
|
15247
15520
|
),
|
|
15248
|
-
open && /* @__PURE__ */ (0,
|
|
15521
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15249
15522
|
"div",
|
|
15250
15523
|
{
|
|
15251
15524
|
role: "listbox",
|
|
@@ -15267,11 +15540,11 @@ function SpecializationDropdown({
|
|
|
15267
15540
|
},
|
|
15268
15541
|
children: options.map((opt) => {
|
|
15269
15542
|
const isActive = opt.id === value;
|
|
15270
|
-
return /* @__PURE__ */ (0,
|
|
15271
|
-
|
|
15543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15544
|
+
import_ui22.ScMenuOptions,
|
|
15272
15545
|
{
|
|
15273
15546
|
text: opt.label,
|
|
15274
|
-
icon: /* @__PURE__ */ (0,
|
|
15547
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SpecializationIcon, { iconUrl: opt.iconUrl }),
|
|
15275
15548
|
hover: isActive ? "true" : "false",
|
|
15276
15549
|
variant: "default",
|
|
15277
15550
|
role: "option",
|
|
@@ -15296,9 +15569,9 @@ function LanguageDropdown({
|
|
|
15296
15569
|
onChange,
|
|
15297
15570
|
disabled
|
|
15298
15571
|
}) {
|
|
15299
|
-
const [open, setOpen] = (0,
|
|
15300
|
-
const containerRef = (0,
|
|
15301
|
-
(0,
|
|
15572
|
+
const [open, setOpen] = (0, import_react28.useState)(false);
|
|
15573
|
+
const containerRef = (0, import_react28.useRef)(null);
|
|
15574
|
+
(0, import_react28.useEffect)(() => {
|
|
15302
15575
|
if (!open) return;
|
|
15303
15576
|
function handleMouseDown(e) {
|
|
15304
15577
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -15315,15 +15588,15 @@ function LanguageDropdown({
|
|
|
15315
15588
|
document.removeEventListener("keydown", handleKeyDown);
|
|
15316
15589
|
};
|
|
15317
15590
|
}, [open]);
|
|
15318
|
-
return /* @__PURE__ */ (0,
|
|
15591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15319
15592
|
"div",
|
|
15320
15593
|
{
|
|
15321
15594
|
ref: containerRef,
|
|
15322
15595
|
className: "w-full",
|
|
15323
15596
|
style: { position: "relative" },
|
|
15324
15597
|
children: [
|
|
15325
|
-
/* @__PURE__ */ (0,
|
|
15326
|
-
/* @__PURE__ */ (0,
|
|
15598
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("style", { children: DROPDOWN_TRIGGER_STYLES }),
|
|
15599
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15327
15600
|
"div",
|
|
15328
15601
|
{
|
|
15329
15602
|
className: "spec-dropdown-trigger",
|
|
@@ -15331,15 +15604,15 @@ function LanguageDropdown({
|
|
|
15331
15604
|
onClick: () => !disabled && setOpen((v) => !v),
|
|
15332
15605
|
"aria-haspopup": "listbox",
|
|
15333
15606
|
"aria-expanded": open,
|
|
15334
|
-
children: /* @__PURE__ */ (0,
|
|
15335
|
-
|
|
15607
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15608
|
+
import_ui23.ScTextField,
|
|
15336
15609
|
{
|
|
15337
15610
|
label: "Language",
|
|
15338
15611
|
labelGroup: "label",
|
|
15339
15612
|
value: userLanguageLabel(value),
|
|
15340
15613
|
placeholderFilled: "Select language",
|
|
15341
15614
|
tfGroup: "icon-right",
|
|
15342
|
-
tfRightIcon: /* @__PURE__ */ (0,
|
|
15615
|
+
tfRightIcon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15343
15616
|
"span",
|
|
15344
15617
|
{
|
|
15345
15618
|
style: {
|
|
@@ -15349,7 +15622,7 @@ function LanguageDropdown({
|
|
|
15349
15622
|
transform: open ? "rotate(180deg)" : "none",
|
|
15350
15623
|
transition: "transform 120ms ease-out"
|
|
15351
15624
|
},
|
|
15352
|
-
children: /* @__PURE__ */ (0,
|
|
15625
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconDown, {})
|
|
15353
15626
|
}
|
|
15354
15627
|
),
|
|
15355
15628
|
className: "sc-text-field-full-width",
|
|
@@ -15360,7 +15633,7 @@ function LanguageDropdown({
|
|
|
15360
15633
|
)
|
|
15361
15634
|
}
|
|
15362
15635
|
),
|
|
15363
|
-
open && /* @__PURE__ */ (0,
|
|
15636
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15364
15637
|
"div",
|
|
15365
15638
|
{
|
|
15366
15639
|
role: "listbox",
|
|
@@ -15386,11 +15659,11 @@ function LanguageDropdown({
|
|
|
15386
15659
|
},
|
|
15387
15660
|
children: USER_LANGUAGES.map((lang) => {
|
|
15388
15661
|
const isActive = lang.code === value;
|
|
15389
|
-
return /* @__PURE__ */ (0,
|
|
15390
|
-
|
|
15662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15663
|
+
import_ui22.ScMenuOptions,
|
|
15391
15664
|
{
|
|
15392
15665
|
text: lang.label,
|
|
15393
|
-
icon: /* @__PURE__ */ (0,
|
|
15666
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, {}),
|
|
15394
15667
|
hover: isActive ? "true" : "false",
|
|
15395
15668
|
variant: "default",
|
|
15396
15669
|
role: "option",
|
|
@@ -15416,28 +15689,28 @@ function ProfileTab() {
|
|
|
15416
15689
|
const derivedName = user?.name ?? "";
|
|
15417
15690
|
const derivedSpec = user?.userSpecialization ?? "";
|
|
15418
15691
|
const derivedLanguage = user?.language?.trim() || DEFAULT_USER_LANGUAGE;
|
|
15419
|
-
const [fullName, setFullName] = (0,
|
|
15420
|
-
const [selectedSpec, setSelectedSpec] = (0,
|
|
15421
|
-
const [selectedLanguage, setSelectedLanguage] = (0,
|
|
15422
|
-
const [saving, setSaving] = (0,
|
|
15423
|
-
const [imageSaving, setImageSaving] = (0,
|
|
15424
|
-
const [imagePreview, setImagePreview] = (0,
|
|
15692
|
+
const [fullName, setFullName] = (0, import_react28.useState)(derivedName);
|
|
15693
|
+
const [selectedSpec, setSelectedSpec] = (0, import_react28.useState)(derivedSpec);
|
|
15694
|
+
const [selectedLanguage, setSelectedLanguage] = (0, import_react28.useState)(derivedLanguage);
|
|
15695
|
+
const [saving, setSaving] = (0, import_react28.useState)(false);
|
|
15696
|
+
const [imageSaving, setImageSaving] = (0, import_react28.useState)(false);
|
|
15697
|
+
const [imagePreview, setImagePreview] = (0, import_react28.useState)(
|
|
15425
15698
|
void 0
|
|
15426
15699
|
);
|
|
15427
|
-
const fileInputRef = (0,
|
|
15700
|
+
const fileInputRef = (0, import_react28.useRef)(null);
|
|
15428
15701
|
const profileDisplayName = fullName || user?.email || "User";
|
|
15429
15702
|
const profileImage = imagePreview ?? getUserProfileImage(user);
|
|
15430
15703
|
const profileInitial = profileDisplayName.charAt(0).toUpperCase();
|
|
15431
15704
|
const disableAllActions = saving || imageSaving;
|
|
15432
15705
|
const dirty = fullName.trim() !== derivedName || selectedSpec !== derivedSpec || selectedLanguage !== derivedLanguage;
|
|
15433
|
-
(0,
|
|
15706
|
+
(0, import_react28.useEffect)(() => {
|
|
15434
15707
|
setFullName(derivedName);
|
|
15435
15708
|
setImagePreview(void 0);
|
|
15436
15709
|
}, [derivedName]);
|
|
15437
|
-
(0,
|
|
15710
|
+
(0, import_react28.useEffect)(() => {
|
|
15438
15711
|
setSelectedSpec(derivedSpec);
|
|
15439
15712
|
}, [derivedSpec]);
|
|
15440
|
-
(0,
|
|
15713
|
+
(0, import_react28.useEffect)(() => {
|
|
15441
15714
|
setSelectedLanguage(derivedLanguage);
|
|
15442
15715
|
}, [derivedLanguage]);
|
|
15443
15716
|
const handleSave = async () => {
|
|
@@ -15519,13 +15792,13 @@ function ProfileTab() {
|
|
|
15519
15792
|
}
|
|
15520
15793
|
auth.clearAuth();
|
|
15521
15794
|
};
|
|
15522
|
-
return /* @__PURE__ */ (0,
|
|
15795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15523
15796
|
"div",
|
|
15524
15797
|
{
|
|
15525
15798
|
className: "flex flex-col items-start flex-1 min-w-0 min-h-0 overflow-y-auto",
|
|
15526
15799
|
style: { gap: "var(--spacing-3xl)" },
|
|
15527
15800
|
children: [
|
|
15528
|
-
/* @__PURE__ */ (0,
|
|
15801
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15529
15802
|
"div",
|
|
15530
15803
|
{
|
|
15531
15804
|
className: "sc-profile-card flex flex-col items-start w-full",
|
|
@@ -15538,13 +15811,13 @@ function ProfileTab() {
|
|
|
15538
15811
|
gap: "var(--spacing-6xl)"
|
|
15539
15812
|
},
|
|
15540
15813
|
children: [
|
|
15541
|
-
/* @__PURE__ */ (0,
|
|
15814
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15542
15815
|
"div",
|
|
15543
15816
|
{
|
|
15544
15817
|
className: "flex items-center shrink-0 w-full",
|
|
15545
15818
|
style: { gap: 24, flexWrap: "wrap" },
|
|
15546
15819
|
children: [
|
|
15547
|
-
profileImage ? /* @__PURE__ */ (0,
|
|
15820
|
+
profileImage ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15548
15821
|
"img",
|
|
15549
15822
|
{
|
|
15550
15823
|
src: profileImage,
|
|
@@ -15557,7 +15830,7 @@ function ProfileTab() {
|
|
|
15557
15830
|
flexShrink: 0
|
|
15558
15831
|
}
|
|
15559
15832
|
}
|
|
15560
|
-
) : /* @__PURE__ */ (0,
|
|
15833
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15561
15834
|
"div",
|
|
15562
15835
|
{
|
|
15563
15836
|
"aria-label": "Profile",
|
|
@@ -15570,7 +15843,7 @@ function ProfileTab() {
|
|
|
15570
15843
|
border: "1px solid var(--alias-border-subtle)",
|
|
15571
15844
|
flexShrink: 0
|
|
15572
15845
|
},
|
|
15573
|
-
children: /* @__PURE__ */ (0,
|
|
15846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15574
15847
|
"span",
|
|
15575
15848
|
{
|
|
15576
15849
|
style: {
|
|
@@ -15585,7 +15858,7 @@ function ProfileTab() {
|
|
|
15585
15858
|
)
|
|
15586
15859
|
}
|
|
15587
15860
|
),
|
|
15588
|
-
/* @__PURE__ */ (0,
|
|
15861
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15589
15862
|
"input",
|
|
15590
15863
|
{
|
|
15591
15864
|
ref: fileInputRef,
|
|
@@ -15595,17 +15868,17 @@ function ProfileTab() {
|
|
|
15595
15868
|
onChange: handleImageChange
|
|
15596
15869
|
}
|
|
15597
15870
|
),
|
|
15598
|
-
/* @__PURE__ */ (0,
|
|
15871
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15599
15872
|
"div",
|
|
15600
15873
|
{
|
|
15601
15874
|
className: "flex items-center",
|
|
15602
15875
|
style: { gap: 12, flexWrap: "wrap" },
|
|
15603
15876
|
children: [
|
|
15604
|
-
/* @__PURE__ */ (0,
|
|
15605
|
-
|
|
15877
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15878
|
+
import_ui24.ScButton,
|
|
15606
15879
|
{
|
|
15607
15880
|
text: "Upload photo",
|
|
15608
|
-
icon: /* @__PURE__ */ (0,
|
|
15881
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconUpload, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
15609
15882
|
styleVariant: "icon-left",
|
|
15610
15883
|
variant: "outline",
|
|
15611
15884
|
size: "md",
|
|
@@ -15613,11 +15886,11 @@ function ProfileTab() {
|
|
|
15613
15886
|
onClick: handleUploadClick
|
|
15614
15887
|
}
|
|
15615
15888
|
),
|
|
15616
|
-
/* @__PURE__ */ (0,
|
|
15617
|
-
|
|
15889
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15890
|
+
import_ui24.ScButton,
|
|
15618
15891
|
{
|
|
15619
15892
|
text: "Remove photo",
|
|
15620
|
-
icon: /* @__PURE__ */ (0,
|
|
15893
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15621
15894
|
import_icons18.SiconDelete,
|
|
15622
15895
|
{
|
|
15623
15896
|
className: "w-5 h-5",
|
|
@@ -15637,16 +15910,16 @@ function ProfileTab() {
|
|
|
15637
15910
|
]
|
|
15638
15911
|
}
|
|
15639
15912
|
),
|
|
15640
|
-
/* @__PURE__ */ (0,
|
|
15641
|
-
/* @__PURE__ */ (0,
|
|
15913
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_ui22.ScHDivider, {}),
|
|
15914
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15642
15915
|
"div",
|
|
15643
15916
|
{
|
|
15644
15917
|
className: "sc-profile-fields flex flex-col min-w-0 w-full",
|
|
15645
15918
|
style: { gap: 24 },
|
|
15646
15919
|
children: [
|
|
15647
|
-
/* @__PURE__ */ (0,
|
|
15648
|
-
/* @__PURE__ */ (0,
|
|
15649
|
-
|
|
15920
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { style: { display: "grid", width: "100%", gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 240px), 1fr))", gap: 24 }, children: [
|
|
15921
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 min-w-0", style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15922
|
+
import_ui23.ScTextField,
|
|
15650
15923
|
{
|
|
15651
15924
|
label: "Full Name",
|
|
15652
15925
|
labelGroup: "label",
|
|
@@ -15659,7 +15932,7 @@ function ProfileTab() {
|
|
|
15659
15932
|
onChange: (e) => setFullName(e.target.value)
|
|
15660
15933
|
}
|
|
15661
15934
|
) }),
|
|
15662
|
-
/* @__PURE__ */ (0,
|
|
15935
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15663
15936
|
SpecializationDropdown,
|
|
15664
15937
|
{
|
|
15665
15938
|
value: selectedSpec,
|
|
@@ -15668,8 +15941,8 @@ function ProfileTab() {
|
|
|
15668
15941
|
}
|
|
15669
15942
|
) })
|
|
15670
15943
|
] }),
|
|
15671
|
-
/* @__PURE__ */ (0,
|
|
15672
|
-
/* @__PURE__ */ (0,
|
|
15944
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-start w-full", style: { gap: "var(--spacing-3xl)" }, children: [
|
|
15945
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15673
15946
|
LanguageDropdown,
|
|
15674
15947
|
{
|
|
15675
15948
|
value: selectedLanguage,
|
|
@@ -15677,10 +15950,10 @@ function ProfileTab() {
|
|
|
15677
15950
|
disabled: disableAllActions
|
|
15678
15951
|
}
|
|
15679
15952
|
) }),
|
|
15680
|
-
/* @__PURE__ */ (0,
|
|
15953
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex-1 min-w-0" })
|
|
15681
15954
|
] }),
|
|
15682
|
-
/* @__PURE__ */ (0,
|
|
15683
|
-
|
|
15955
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-full", style: { overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15956
|
+
import_ui23.ScTextField,
|
|
15684
15957
|
{
|
|
15685
15958
|
label: "Email ID",
|
|
15686
15959
|
labelGroup: "label",
|
|
@@ -15688,7 +15961,7 @@ function ProfileTab() {
|
|
|
15688
15961
|
value: user?.email ?? "",
|
|
15689
15962
|
placeholderFilled: user?.email ?? "chris@kepler.com",
|
|
15690
15963
|
tfGroup: "icon-right",
|
|
15691
|
-
tfRightIcon: /* @__PURE__ */ (0,
|
|
15964
|
+
tfRightIcon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15692
15965
|
import_icons18.SiconLock,
|
|
15693
15966
|
{
|
|
15694
15967
|
className: "w-6 h-6",
|
|
@@ -15700,13 +15973,13 @@ function ProfileTab() {
|
|
|
15700
15973
|
readOnly: true
|
|
15701
15974
|
}
|
|
15702
15975
|
) }),
|
|
15703
|
-
/* @__PURE__ */ (0,
|
|
15976
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15704
15977
|
"div",
|
|
15705
15978
|
{
|
|
15706
15979
|
className: "flex items-center w-full",
|
|
15707
15980
|
style: { justifyContent: "flex-end", paddingTop: "var(--spacing-md)" },
|
|
15708
|
-
children: /* @__PURE__ */ (0,
|
|
15709
|
-
|
|
15981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15982
|
+
import_ui24.ScButton,
|
|
15710
15983
|
{
|
|
15711
15984
|
text: saving ? "Saving..." : "Save changes",
|
|
15712
15985
|
variant: "secondary",
|
|
@@ -15723,7 +15996,7 @@ function ProfileTab() {
|
|
|
15723
15996
|
]
|
|
15724
15997
|
}
|
|
15725
15998
|
),
|
|
15726
|
-
/* @__PURE__ */ (0,
|
|
15999
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15727
16000
|
"div",
|
|
15728
16001
|
{
|
|
15729
16002
|
className: "flex items-center w-full",
|
|
@@ -15735,8 +16008,8 @@ function ProfileTab() {
|
|
|
15735
16008
|
gap: "var(--spacing-3xl)"
|
|
15736
16009
|
},
|
|
15737
16010
|
children: [
|
|
15738
|
-
/* @__PURE__ */ (0,
|
|
15739
|
-
/* @__PURE__ */ (0,
|
|
16011
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col min-w-0 flex-1", style: { gap: "var(--spacing-xs)" }, children: [
|
|
16012
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15740
16013
|
"span",
|
|
15741
16014
|
{
|
|
15742
16015
|
style: {
|
|
@@ -15749,7 +16022,7 @@ function ProfileTab() {
|
|
|
15749
16022
|
children: "Session"
|
|
15750
16023
|
}
|
|
15751
16024
|
),
|
|
15752
|
-
/* @__PURE__ */ (0,
|
|
16025
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15753
16026
|
"span",
|
|
15754
16027
|
{
|
|
15755
16028
|
className: "truncate",
|
|
@@ -15764,8 +16037,8 @@ function ProfileTab() {
|
|
|
15764
16037
|
}
|
|
15765
16038
|
)
|
|
15766
16039
|
] }),
|
|
15767
|
-
/* @__PURE__ */ (0,
|
|
15768
|
-
|
|
16040
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16041
|
+
import_ui24.ScButton,
|
|
15769
16042
|
{
|
|
15770
16043
|
text: "Log out",
|
|
15771
16044
|
variant: "outline",
|
|
@@ -15828,11 +16101,11 @@ function WorkspaceListTab({
|
|
|
15828
16101
|
const currentOrganization = organizations.find(
|
|
15829
16102
|
(org) => org._id && org._id === currentWorkspace?.organizationId
|
|
15830
16103
|
);
|
|
15831
|
-
const [page, setPage] = (0,
|
|
15832
|
-
const [serverPage, setServerPage] = (0,
|
|
15833
|
-
const [serverFailed, setServerFailed] = (0,
|
|
16104
|
+
const [page, setPage] = (0, import_react28.useState)(0);
|
|
16105
|
+
const [serverPage, setServerPage] = (0, import_react28.useState)(null);
|
|
16106
|
+
const [serverFailed, setServerFailed] = (0, import_react28.useState)(false);
|
|
15834
16107
|
const serverMode = !!listPage && !serverFailed;
|
|
15835
|
-
(0,
|
|
16108
|
+
(0, import_react28.useEffect)(() => {
|
|
15836
16109
|
if (!listPage || serverFailed) return;
|
|
15837
16110
|
let cancelled = false;
|
|
15838
16111
|
listPage({ limit: pageSize, offset: page * pageSize }).then((result) => {
|
|
@@ -15873,21 +16146,21 @@ function WorkspaceListTab({
|
|
|
15873
16146
|
const pageRows = serverMode ? (serverPage?.items ?? []).map((ws) => ({ ws, group: serverGroupOf(ws) })) : rows.slice(pageStart, pageStart + pageSize);
|
|
15874
16147
|
const pageWorkspaces = pageRows.map((row) => row.ws);
|
|
15875
16148
|
const listLoading = loading || serverMode && !serverPage;
|
|
15876
|
-
const [plans, setPlans] = (0,
|
|
15877
|
-
const requestedPlans = (0,
|
|
16149
|
+
const [plans, setPlans] = (0, import_react28.useState)({});
|
|
16150
|
+
const requestedPlans = (0, import_react28.useRef)(/* @__PURE__ */ new Set());
|
|
15878
16151
|
const visibleIds = [
|
|
15879
16152
|
...currentWorkspace ? [currentWorkspace._id] : [],
|
|
15880
16153
|
...pageWorkspaces.map((ws) => ws._id)
|
|
15881
16154
|
];
|
|
15882
16155
|
const visibleKey = visibleIds.join(",");
|
|
15883
|
-
const mounted = (0,
|
|
15884
|
-
(0,
|
|
16156
|
+
const mounted = (0, import_react28.useRef)(true);
|
|
16157
|
+
(0, import_react28.useEffect)(() => {
|
|
15885
16158
|
mounted.current = true;
|
|
15886
16159
|
return () => {
|
|
15887
16160
|
mounted.current = false;
|
|
15888
16161
|
};
|
|
15889
16162
|
}, []);
|
|
15890
|
-
(0,
|
|
16163
|
+
(0, import_react28.useEffect)(() => {
|
|
15891
16164
|
if (!fetchPlans || listLoading) return;
|
|
15892
16165
|
const missing = visibleKey.split(",").filter((id) => id && !requestedPlans.current.has(id));
|
|
15893
16166
|
if (!missing.length) return;
|
|
@@ -15898,13 +16171,13 @@ function WorkspaceListTab({
|
|
|
15898
16171
|
});
|
|
15899
16172
|
}, [fetchPlans, listLoading, visibleKey]);
|
|
15900
16173
|
const planOf = (ws) => fetchPlans ? plans[ws._id] ?? "" : ws.plan ?? "";
|
|
15901
|
-
return /* @__PURE__ */ (0,
|
|
16174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15902
16175
|
"div",
|
|
15903
16176
|
{
|
|
15904
16177
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
15905
16178
|
style: { gap: "var(--spacing-3xl)", height: "100%" },
|
|
15906
16179
|
children: [
|
|
15907
|
-
/* @__PURE__ */ (0,
|
|
16180
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15908
16181
|
"p",
|
|
15909
16182
|
{
|
|
15910
16183
|
className: "shrink-0 w-full",
|
|
@@ -15917,7 +16190,7 @@ function WorkspaceListTab({
|
|
|
15917
16190
|
children: "Switching changes which workspace the rest of Settings acts on."
|
|
15918
16191
|
}
|
|
15919
16192
|
),
|
|
15920
|
-
listLoading && /* @__PURE__ */ (0,
|
|
16193
|
+
listLoading && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15921
16194
|
"p",
|
|
15922
16195
|
{
|
|
15923
16196
|
style: {
|
|
@@ -15928,13 +16201,13 @@ function WorkspaceListTab({
|
|
|
15928
16201
|
children: "Loading workspaces\u2026"
|
|
15929
16202
|
}
|
|
15930
16203
|
),
|
|
15931
|
-
!listLoading && currentWorkspace && /* @__PURE__ */ (0,
|
|
16204
|
+
!listLoading && currentWorkspace && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15932
16205
|
"div",
|
|
15933
16206
|
{
|
|
15934
16207
|
className: "flex flex-col items-start shrink-0 w-full",
|
|
15935
16208
|
style: { gap: 16, padding: "var(--spacing-md) 0" },
|
|
15936
16209
|
children: [
|
|
15937
|
-
/* @__PURE__ */ (0,
|
|
16210
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15938
16211
|
"p",
|
|
15939
16212
|
{
|
|
15940
16213
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
|
|
@@ -15951,8 +16224,8 @@ function WorkspaceListTab({
|
|
|
15951
16224
|
]
|
|
15952
16225
|
}
|
|
15953
16226
|
),
|
|
15954
|
-
/* @__PURE__ */ (0,
|
|
15955
|
-
|
|
16227
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16228
|
+
import_ui25.ScWorkspaceSwitchCard,
|
|
15956
16229
|
{
|
|
15957
16230
|
wsName: currentWorkspace.name,
|
|
15958
16231
|
initials: currentWorkspace.initials,
|
|
@@ -15968,7 +16241,7 @@ function WorkspaceListTab({
|
|
|
15968
16241
|
]
|
|
15969
16242
|
}
|
|
15970
16243
|
),
|
|
15971
|
-
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ (0,
|
|
16244
|
+
!listLoading && currentWorkspace && listTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15972
16245
|
"div",
|
|
15973
16246
|
{
|
|
15974
16247
|
className: "shrink-0 w-full",
|
|
@@ -15978,19 +16251,19 @@ function WorkspaceListTab({
|
|
|
15978
16251
|
}
|
|
15979
16252
|
}
|
|
15980
16253
|
),
|
|
15981
|
-
!listLoading && listTotal > 0 && /* @__PURE__ */ (0,
|
|
16254
|
+
!listLoading && listTotal > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
15982
16255
|
"div",
|
|
15983
16256
|
{
|
|
15984
16257
|
className: "flex flex-col items-start flex-1 min-h-0 w-full",
|
|
15985
16258
|
style: { gap: 16, overflowY: "auto" },
|
|
15986
16259
|
children: [
|
|
15987
|
-
/* @__PURE__ */ (0,
|
|
16260
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15988
16261
|
"div",
|
|
15989
16262
|
{
|
|
15990
16263
|
className: "flex flex-col items-start w-full",
|
|
15991
16264
|
style: { gap: 16 },
|
|
15992
|
-
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ (0,
|
|
15993
|
-
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ (0,
|
|
16265
|
+
children: pageRows.map(({ ws, group }, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react28.Fragment, { children: [
|
|
16266
|
+
(index === 0 || pageRows[index - 1].group.key !== group.key) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
15994
16267
|
"p",
|
|
15995
16268
|
{
|
|
15996
16269
|
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap shrink-0",
|
|
@@ -16005,8 +16278,8 @@ function WorkspaceListTab({
|
|
|
16005
16278
|
children: group.label
|
|
16006
16279
|
}
|
|
16007
16280
|
),
|
|
16008
|
-
/* @__PURE__ */ (0,
|
|
16009
|
-
|
|
16281
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16282
|
+
import_ui25.ScWorkspaceSwitchCard,
|
|
16010
16283
|
{
|
|
16011
16284
|
wsName: ws.name,
|
|
16012
16285
|
initials: ws.initials,
|
|
@@ -16023,13 +16296,13 @@ function WorkspaceListTab({
|
|
|
16023
16296
|
] }, ws._id))
|
|
16024
16297
|
}
|
|
16025
16298
|
),
|
|
16026
|
-
pageCount > 1 && /* @__PURE__ */ (0,
|
|
16299
|
+
pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16027
16300
|
"div",
|
|
16028
16301
|
{
|
|
16029
16302
|
className: "flex items-center justify-between shrink-0 w-full",
|
|
16030
16303
|
style: { gap: "var(--spacing-md)" },
|
|
16031
16304
|
children: [
|
|
16032
|
-
/* @__PURE__ */ (0,
|
|
16305
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16033
16306
|
"span",
|
|
16034
16307
|
{
|
|
16035
16308
|
style: {
|
|
@@ -16048,9 +16321,9 @@ function WorkspaceListTab({
|
|
|
16048
16321
|
]
|
|
16049
16322
|
}
|
|
16050
16323
|
),
|
|
16051
|
-
/* @__PURE__ */ (0,
|
|
16052
|
-
/* @__PURE__ */ (0,
|
|
16053
|
-
|
|
16324
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center", style: { gap: "var(--spacing-md)" }, children: [
|
|
16325
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16326
|
+
import_ui24.ScButton,
|
|
16054
16327
|
{
|
|
16055
16328
|
text: "Previous",
|
|
16056
16329
|
variant: "tertiary",
|
|
@@ -16059,8 +16332,8 @@ function WorkspaceListTab({
|
|
|
16059
16332
|
onClick: safePage === 0 ? void 0 : () => setPage(safePage - 1)
|
|
16060
16333
|
}
|
|
16061
16334
|
),
|
|
16062
|
-
/* @__PURE__ */ (0,
|
|
16063
|
-
|
|
16335
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16336
|
+
import_ui24.ScButton,
|
|
16064
16337
|
{
|
|
16065
16338
|
text: "Next",
|
|
16066
16339
|
variant: "tertiary",
|
|
@@ -16085,9 +16358,9 @@ function ReferralTab() {
|
|
|
16085
16358
|
const { auth, toast, api } = useSettingsAdapters();
|
|
16086
16359
|
const domain = typeof window !== "undefined" ? window.location.origin : "";
|
|
16087
16360
|
const link = referralLink(referralCodeOf(auth.user), domain);
|
|
16088
|
-
const [copied, setCopied] = (0,
|
|
16089
|
-
const copiedTimer = (0,
|
|
16090
|
-
(0,
|
|
16361
|
+
const [copied, setCopied] = (0, import_react28.useState)(false);
|
|
16362
|
+
const copiedTimer = (0, import_react28.useRef)(null);
|
|
16363
|
+
(0, import_react28.useEffect)(() => () => {
|
|
16091
16364
|
if (copiedTimer.current) clearTimeout(copiedTimer.current);
|
|
16092
16365
|
}, []);
|
|
16093
16366
|
const copyLink = async () => {
|
|
@@ -16102,13 +16375,13 @@ function ReferralTab() {
|
|
|
16102
16375
|
toast.error("Couldn't copy the referral link");
|
|
16103
16376
|
}
|
|
16104
16377
|
};
|
|
16105
|
-
return /* @__PURE__ */ (0,
|
|
16378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16106
16379
|
"div",
|
|
16107
16380
|
{
|
|
16108
16381
|
className: "flex flex-col items-start flex-1 min-w-0",
|
|
16109
16382
|
style: { gap: "var(--spacing-3xl)" },
|
|
16110
16383
|
children: [
|
|
16111
|
-
/* @__PURE__ */ (0,
|
|
16384
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16112
16385
|
"div",
|
|
16113
16386
|
{
|
|
16114
16387
|
className: "w-full relative",
|
|
@@ -16117,8 +16390,8 @@ function ReferralTab() {
|
|
|
16117
16390
|
borderRadius: "var(--radius-3xl)",
|
|
16118
16391
|
padding: "var(--spacing-6xl)"
|
|
16119
16392
|
},
|
|
16120
|
-
children: /* @__PURE__ */ (0,
|
|
16121
|
-
|
|
16393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16394
|
+
import_ui23.ScTextField,
|
|
16122
16395
|
{
|
|
16123
16396
|
label: "Your Referral Link",
|
|
16124
16397
|
labelGroup: "label",
|
|
@@ -16126,7 +16399,7 @@ function ReferralTab() {
|
|
|
16126
16399
|
value: link,
|
|
16127
16400
|
placeholderFilled: "https://your-domain.com?referral_code=ABC123",
|
|
16128
16401
|
tfGroup: "none",
|
|
16129
|
-
rightSlot: /* @__PURE__ */ (0,
|
|
16402
|
+
rightSlot: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16130
16403
|
"button",
|
|
16131
16404
|
{
|
|
16132
16405
|
type: "button",
|
|
@@ -16152,7 +16425,7 @@ function ReferralTab() {
|
|
|
16152
16425
|
e.currentTarget.style.background = "transparent";
|
|
16153
16426
|
},
|
|
16154
16427
|
children: [
|
|
16155
|
-
copied ? /* @__PURE__ */ (0,
|
|
16428
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconCheck, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconCopy, { className: "w-4 h-4", color: "var(--alias-text---icons-primary)" }),
|
|
16156
16429
|
copied ? "Copied" : "Copy"
|
|
16157
16430
|
]
|
|
16158
16431
|
}
|
|
@@ -16165,7 +16438,7 @@ function ReferralTab() {
|
|
|
16165
16438
|
)
|
|
16166
16439
|
}
|
|
16167
16440
|
),
|
|
16168
|
-
api.getReferredUsers && /* @__PURE__ */ (0,
|
|
16441
|
+
api.getReferredUsers && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ReferralHistory, { load: (signal) => api.getReferredUsers(signal) })
|
|
16169
16442
|
]
|
|
16170
16443
|
}
|
|
16171
16444
|
);
|
|
@@ -16183,7 +16456,7 @@ function SettingsContent({
|
|
|
16183
16456
|
inviteRequested,
|
|
16184
16457
|
onInviteRequestHandled
|
|
16185
16458
|
}) {
|
|
16186
|
-
return /* @__PURE__ */ (0,
|
|
16459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SettingsAdaptersProvider, { adapters, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16187
16460
|
SettingsContentInner,
|
|
16188
16461
|
{
|
|
16189
16462
|
activeTab,
|
|
@@ -16221,7 +16494,8 @@ function SettingsContentInner({
|
|
|
16221
16494
|
organization,
|
|
16222
16495
|
navigation,
|
|
16223
16496
|
toast,
|
|
16224
|
-
integrations
|
|
16497
|
+
integrations,
|
|
16498
|
+
loginMethods
|
|
16225
16499
|
} = adapters;
|
|
16226
16500
|
const overviewDetail = presentation === "overview-detail";
|
|
16227
16501
|
const isOverview = overviewDetail && showOverview;
|
|
@@ -16229,14 +16503,15 @@ function SettingsContentInner({
|
|
|
16229
16503
|
const showConnectedApps = !!integrations;
|
|
16230
16504
|
const showReferral = !!referralCodeOf(adapters.auth.user);
|
|
16231
16505
|
const showIntegrations = !!integrations?.listOrganizationConnections && !!integrations.getOrganizationAccess && organization.current?.role === "admin";
|
|
16506
|
+
const showLoginMethods = !!loginMethods && organization.current?.role === "admin";
|
|
16232
16507
|
const workspaceId = workspace.current?.id ?? null;
|
|
16233
16508
|
const workspaceOwner = useWorkspaceOrganization({ workspaceId, request: workspace.organizationRequest ?? unavailableOrganizationRequest, enabled: !!workspace.organizationRequest });
|
|
16234
16509
|
const workspaceOwnerName = workspace.organizationRequest ? workspaceOwner.organizationName : void 0;
|
|
16235
|
-
const [workspaceList, setWorkspaceList] = (0,
|
|
16510
|
+
const [workspaceList, setWorkspaceList] = (0, import_react28.useState)([]);
|
|
16236
16511
|
const currentWorkspaceRole = workspace.current?.role ?? workspaceList.find((item) => item._id === workspaceId)?.role;
|
|
16237
16512
|
const isWorkspaceAdmin = currentWorkspaceRole?.trim().toLowerCase() === "admin";
|
|
16238
|
-
const [workspaceListLoading, setWorkspaceListLoading] = (0,
|
|
16239
|
-
const refreshWorkspaceList = (0,
|
|
16513
|
+
const [workspaceListLoading, setWorkspaceListLoading] = (0, import_react28.useState)(false);
|
|
16514
|
+
const refreshWorkspaceList = (0, import_react28.useCallback)(async () => {
|
|
16240
16515
|
setWorkspaceListLoading(true);
|
|
16241
16516
|
try {
|
|
16242
16517
|
const items = await workspace.list();
|
|
@@ -16257,11 +16532,11 @@ function SettingsContentInner({
|
|
|
16257
16532
|
setWorkspaceListLoading(false);
|
|
16258
16533
|
}
|
|
16259
16534
|
}, [workspace, workspaceId]);
|
|
16260
|
-
(0,
|
|
16535
|
+
(0, import_react28.useEffect)(() => {
|
|
16261
16536
|
void refreshWorkspaceList();
|
|
16262
16537
|
}, [refreshWorkspaceList]);
|
|
16263
16538
|
const hostListPage = workspace.listPage;
|
|
16264
|
-
const listWorkspacePage = (0,
|
|
16539
|
+
const listWorkspacePage = (0, import_react28.useMemo)(
|
|
16265
16540
|
() => hostListPage ? async (params) => {
|
|
16266
16541
|
const result = await hostListPage(params);
|
|
16267
16542
|
return {
|
|
@@ -16278,8 +16553,8 @@ function SettingsContentInner({
|
|
|
16278
16553
|
} : void 0,
|
|
16279
16554
|
[hostListPage, workspaceId]
|
|
16280
16555
|
);
|
|
16281
|
-
const [listOrganizations, setListOrganizations] = (0,
|
|
16282
|
-
(0,
|
|
16556
|
+
const [listOrganizations, setListOrganizations] = (0, import_react28.useState)([]);
|
|
16557
|
+
(0, import_react28.useEffect)(() => {
|
|
16283
16558
|
if (activeTab !== "workspaceList" || typeof organization?.list !== "function") {
|
|
16284
16559
|
return;
|
|
16285
16560
|
}
|
|
@@ -16300,7 +16575,7 @@ function SettingsContentInner({
|
|
|
16300
16575
|
cancelled = true;
|
|
16301
16576
|
};
|
|
16302
16577
|
}, [activeTab, organization]);
|
|
16303
|
-
const switchWorkspace = (0,
|
|
16578
|
+
const switchWorkspace = (0, import_react28.useCallback)(
|
|
16304
16579
|
async (id) => {
|
|
16305
16580
|
await workspace.switch(id);
|
|
16306
16581
|
},
|
|
@@ -16309,38 +16584,38 @@ function SettingsContentInner({
|
|
|
16309
16584
|
const setActiveTab = (tab) => {
|
|
16310
16585
|
navigation.navigateToTab(tab);
|
|
16311
16586
|
};
|
|
16312
|
-
const [creatingWorkspace, setCreatingWorkspace] = (0,
|
|
16313
|
-
const [updatingWorkspace, setUpdatingWorkspace] = (0,
|
|
16314
|
-
const [teamInviteOpen, setTeamInviteOpen] = (0,
|
|
16587
|
+
const [creatingWorkspace, setCreatingWorkspace] = (0, import_react28.useState)(false);
|
|
16588
|
+
const [updatingWorkspace, setUpdatingWorkspace] = (0, import_react28.useState)(false);
|
|
16589
|
+
const [teamInviteOpen, setTeamInviteOpen] = (0, import_react28.useState)(false);
|
|
16315
16590
|
const teamPermissionScope = JSON.stringify([workspaceId, _auth.user?.id, workspace.current?.role]);
|
|
16316
|
-
const [teamInvitePermission, setTeamInvitePermission] = (0,
|
|
16591
|
+
const [teamInvitePermission, setTeamInvitePermission] = (0, import_react28.useState)(null);
|
|
16317
16592
|
const teamCanInvite = teamInvitePermission?.scope === teamPermissionScope && teamInvitePermission.api === adapters.api ? teamInvitePermission.canInvite : null;
|
|
16318
|
-
const receiveTeamInvitePermission = (0,
|
|
16593
|
+
const receiveTeamInvitePermission = (0, import_react28.useCallback)((canInvite) => {
|
|
16319
16594
|
setTeamInvitePermission((previous) => previous?.scope === teamPermissionScope && previous.api === adapters.api && previous.canInvite === canInvite ? previous : { scope: teamPermissionScope, api: adapters.api, canInvite });
|
|
16320
16595
|
}, [teamPermissionScope, adapters.api]);
|
|
16321
16596
|
const canUseHeaderInvite = overviewDetail ? activeTab === "workspaceMembers" && !isOverview ? teamCanInvite === true : !overviewInvite.isLoading && overviewInvite.canInvite : teamCanInvite ?? isWorkspaceAdmin;
|
|
16322
|
-
const [tokenShowRevoked, setTokenShowRevoked] = (0,
|
|
16323
|
-
const [tokenCreateOpen, setTokenCreateOpen] = (0,
|
|
16324
|
-
const [billingShowPlans, setBillingShowPlans] = (0,
|
|
16597
|
+
const [tokenShowRevoked, setTokenShowRevoked] = (0, import_react28.useState)(false);
|
|
16598
|
+
const [tokenCreateOpen, setTokenCreateOpen] = (0, import_react28.useState)(false);
|
|
16599
|
+
const [billingShowPlans, setBillingShowPlans] = (0, import_react28.useState)(false);
|
|
16325
16600
|
const isBillingPlans = activeTab === "billing" && isWorkspaceAdmin && billingShowPlans;
|
|
16326
|
-
const [billingShowPerUserLimits, setBillingShowPerUserLimits] = (0,
|
|
16601
|
+
const [billingShowPerUserLimits, setBillingShowPerUserLimits] = (0, import_react28.useState)(false);
|
|
16327
16602
|
const isBillingPerUserLimits = activeTab === "billing" && isWorkspaceAdmin && billingShowPerUserLimits && !billingShowPlans;
|
|
16328
|
-
const [billingShowSharedCredits, setBillingShowSharedCredits] = (0,
|
|
16603
|
+
const [billingShowSharedCredits, setBillingShowSharedCredits] = (0, import_react28.useState)(false);
|
|
16329
16604
|
const isBillingSharedCredits = activeTab === "billing" && isWorkspaceAdmin && billingShowSharedCredits && !billingShowPlans && !billingShowPerUserLimits;
|
|
16330
16605
|
const isBillingSubView = isBillingPlans || isBillingPerUserLimits || isBillingSharedCredits;
|
|
16331
|
-
(0,
|
|
16606
|
+
(0, import_react28.useEffect)(() => {
|
|
16332
16607
|
if (isOverview || activeTab !== "billing" || !isWorkspaceAdmin) {
|
|
16333
16608
|
setBillingShowPlans(false);
|
|
16334
16609
|
setBillingShowPerUserLimits(false);
|
|
16335
16610
|
setBillingShowSharedCredits(false);
|
|
16336
16611
|
}
|
|
16337
16612
|
}, [activeTab, isWorkspaceAdmin, isOverview]);
|
|
16338
|
-
(0,
|
|
16613
|
+
(0, import_react28.useEffect)(() => {
|
|
16339
16614
|
setBillingShowPlans(false);
|
|
16340
16615
|
setBillingShowPerUserLimits(false);
|
|
16341
16616
|
setBillingShowSharedCredits(false);
|
|
16342
16617
|
}, [workspaceId]);
|
|
16343
|
-
(0,
|
|
16618
|
+
(0, import_react28.useEffect)(() => {
|
|
16344
16619
|
if (!onClose) return;
|
|
16345
16620
|
const handleKeyDown = (e) => {
|
|
16346
16621
|
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
@@ -16362,14 +16637,14 @@ function SettingsContentInner({
|
|
|
16362
16637
|
document.addEventListener("keydown", handleKeyDown);
|
|
16363
16638
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
16364
16639
|
}, [onClose, billingShowPlans, billingShowPerUserLimits, billingShowSharedCredits]);
|
|
16365
|
-
const [localWorkspaces, setLocalWorkspaces] = (0,
|
|
16366
|
-
const [wsModalOpen, setWsModalOpen] = (0,
|
|
16367
|
-
const [wsModalMode, setWsModalMode] = (0,
|
|
16368
|
-
const [editingWorkspace, setEditingWorkspace] = (0,
|
|
16369
|
-
const [confirmLeaveOpen, setConfirmLeaveOpen] = (0,
|
|
16370
|
-
const [leavingWorkspace, setLeavingWorkspace] = (0,
|
|
16371
|
-
const [confirmDeleteOpen, setConfirmDeleteOpen] = (0,
|
|
16372
|
-
const [deletingWorkspace, setDeletingWorkspace] = (0,
|
|
16640
|
+
const [localWorkspaces, setLocalWorkspaces] = (0, import_react28.useState)(null);
|
|
16641
|
+
const [wsModalOpen, setWsModalOpen] = (0, import_react28.useState)(false);
|
|
16642
|
+
const [wsModalMode, setWsModalMode] = (0, import_react28.useState)("create");
|
|
16643
|
+
const [editingWorkspace, setEditingWorkspace] = (0, import_react28.useState)(null);
|
|
16644
|
+
const [confirmLeaveOpen, setConfirmLeaveOpen] = (0, import_react28.useState)(false);
|
|
16645
|
+
const [leavingWorkspace, setLeavingWorkspace] = (0, import_react28.useState)(null);
|
|
16646
|
+
const [confirmDeleteOpen, setConfirmDeleteOpen] = (0, import_react28.useState)(false);
|
|
16647
|
+
const [deletingWorkspace, setDeletingWorkspace] = (0, import_react28.useState)(null);
|
|
16373
16648
|
const toWorkspaceData = (ws) => ({
|
|
16374
16649
|
id: ws._id,
|
|
16375
16650
|
name: ws.name ?? "",
|
|
@@ -16459,7 +16734,7 @@ function SettingsContentInner({
|
|
|
16459
16734
|
}
|
|
16460
16735
|
return true;
|
|
16461
16736
|
};
|
|
16462
|
-
(0,
|
|
16737
|
+
(0, import_react28.useEffect)(() => {
|
|
16463
16738
|
if (workspaceList.length > 0 && localWorkspaces === null) {
|
|
16464
16739
|
setLocalWorkspaces(workspaceList.map(toWorkspaceData));
|
|
16465
16740
|
}
|
|
@@ -16636,7 +16911,7 @@ function SettingsContentInner({
|
|
|
16636
16911
|
setConfirmLeaveOpen(true);
|
|
16637
16912
|
return false;
|
|
16638
16913
|
}
|
|
16639
|
-
return /* @__PURE__ */ (0,
|
|
16914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16640
16915
|
"div",
|
|
16641
16916
|
{
|
|
16642
16917
|
"data-streamoid-settings": "",
|
|
@@ -16647,8 +16922,8 @@ function SettingsContentInner({
|
|
|
16647
16922
|
...isOverview ? { display: "block", overflowY: "auto" } : {}
|
|
16648
16923
|
},
|
|
16649
16924
|
children: [
|
|
16650
|
-
!isOverview && /* @__PURE__ */ (0,
|
|
16651
|
-
/* @__PURE__ */ (0,
|
|
16925
|
+
!isOverview && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SettingsAppearance, {}),
|
|
16926
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16652
16927
|
"div",
|
|
16653
16928
|
{
|
|
16654
16929
|
className: "flex flex-col items-start relative h-full overflow-hidden",
|
|
@@ -16659,8 +16934,8 @@ function SettingsContentInner({
|
|
|
16659
16934
|
width: "100%",
|
|
16660
16935
|
...isOverview ? { height: "auto", minHeight: "100%", overflow: "visible", marginInline: "auto" } : {}
|
|
16661
16936
|
},
|
|
16662
|
-
children: /* @__PURE__ */ (0,
|
|
16663
|
-
!overviewDetail && onBack !== null && /* @__PURE__ */ (0,
|
|
16937
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col w-full flex-1 min-h-0", style: { gap: 20, paddingTop: 16 }, children: [
|
|
16938
|
+
!overviewDetail && onBack !== null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16664
16939
|
"button",
|
|
16665
16940
|
{
|
|
16666
16941
|
type: "button",
|
|
@@ -16692,19 +16967,19 @@ function SettingsContentInner({
|
|
|
16692
16967
|
else window.history.back();
|
|
16693
16968
|
},
|
|
16694
16969
|
children: [
|
|
16695
|
-
/* @__PURE__ */ (0,
|
|
16970
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconLeft, { className: "w-4 h-4 shrink-0", color: "var(--alias-text---icons-muted)" }),
|
|
16696
16971
|
"Back"
|
|
16697
16972
|
]
|
|
16698
16973
|
}
|
|
16699
16974
|
) }),
|
|
16700
|
-
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ (0,
|
|
16701
|
-
|
|
16975
|
+
overviewDetail && !isOverview && (isBillingSubView || onOverview) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center shrink-0", style: { paddingLeft: 20 }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16976
|
+
import_ui24.ScButton,
|
|
16702
16977
|
{
|
|
16703
16978
|
text: isBillingSubView ? "Back to billing" : "Back to account and workspace settings",
|
|
16704
16979
|
variant: "tertiary",
|
|
16705
16980
|
size: "sm",
|
|
16706
16981
|
styleVariant: "icon-left",
|
|
16707
|
-
icon: /* @__PURE__ */ (0,
|
|
16982
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconArrowLeft, { size: 18, "aria-hidden": "true" }),
|
|
16708
16983
|
onClick: () => {
|
|
16709
16984
|
if (isBillingSubView) {
|
|
16710
16985
|
setBillingShowPlans(false);
|
|
@@ -16716,7 +16991,7 @@ function SettingsContentInner({
|
|
|
16716
16991
|
}
|
|
16717
16992
|
}
|
|
16718
16993
|
) }),
|
|
16719
|
-
/* @__PURE__ */ (0,
|
|
16994
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16720
16995
|
"div",
|
|
16721
16996
|
{
|
|
16722
16997
|
className: "flex items-center shrink-0 w-full",
|
|
@@ -16727,9 +17002,9 @@ function SettingsContentInner({
|
|
|
16727
17002
|
paddingRight: 20
|
|
16728
17003
|
},
|
|
16729
17004
|
children: [
|
|
16730
|
-
/* @__PURE__ */ (0,
|
|
16731
|
-
/* @__PURE__ */ (0,
|
|
16732
|
-
/* @__PURE__ */ (0,
|
|
17005
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center flex-1 min-w-0", style: { gap: 8, paddingLeft: 20 }, children: [
|
|
17006
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconSettings, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
17007
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16733
17008
|
"h1",
|
|
16734
17009
|
{
|
|
16735
17010
|
style: {
|
|
@@ -16743,10 +17018,10 @@ function SettingsContentInner({
|
|
|
16743
17018
|
children: overviewDetail ? "Account and workspace settings" : "Settings"
|
|
16744
17019
|
}
|
|
16745
17020
|
),
|
|
16746
|
-
!isOverview && /* @__PURE__ */ (0,
|
|
16747
|
-
scopeCrumb && /* @__PURE__ */ (0,
|
|
16748
|
-
/* @__PURE__ */ (0,
|
|
16749
|
-
/* @__PURE__ */ (0,
|
|
17021
|
+
!isOverview && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("nav", { "aria-label": "Breadcrumb", className: "flex items-center min-w-0", style: { gap: 8 }, children: [
|
|
17022
|
+
scopeCrumb && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
17023
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
17024
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16750
17025
|
"span",
|
|
16751
17026
|
{
|
|
16752
17027
|
className: "truncate",
|
|
@@ -16763,8 +17038,8 @@ function SettingsContentInner({
|
|
|
16763
17038
|
}
|
|
16764
17039
|
)
|
|
16765
17040
|
] }),
|
|
16766
|
-
/* @__PURE__ */ (0,
|
|
16767
|
-
/* @__PURE__ */ (0,
|
|
17041
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
17042
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16768
17043
|
"span",
|
|
16769
17044
|
{
|
|
16770
17045
|
style: {
|
|
@@ -16777,9 +17052,9 @@ function SettingsContentInner({
|
|
|
16777
17052
|
children: leafLabel
|
|
16778
17053
|
}
|
|
16779
17054
|
),
|
|
16780
|
-
isBillingPlans && /* @__PURE__ */ (0,
|
|
16781
|
-
/* @__PURE__ */ (0,
|
|
16782
|
-
/* @__PURE__ */ (0,
|
|
17055
|
+
isBillingPlans && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
17056
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
17057
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16783
17058
|
"span",
|
|
16784
17059
|
{
|
|
16785
17060
|
style: {
|
|
@@ -16793,9 +17068,9 @@ function SettingsContentInner({
|
|
|
16793
17068
|
}
|
|
16794
17069
|
)
|
|
16795
17070
|
] }),
|
|
16796
|
-
isBillingPerUserLimits && /* @__PURE__ */ (0,
|
|
16797
|
-
/* @__PURE__ */ (0,
|
|
16798
|
-
/* @__PURE__ */ (0,
|
|
17071
|
+
isBillingPerUserLimits && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
17072
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
17073
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16799
17074
|
"span",
|
|
16800
17075
|
{
|
|
16801
17076
|
style: {
|
|
@@ -16809,9 +17084,9 @@ function SettingsContentInner({
|
|
|
16809
17084
|
}
|
|
16810
17085
|
)
|
|
16811
17086
|
] }),
|
|
16812
|
-
isBillingSharedCredits && /* @__PURE__ */ (0,
|
|
16813
|
-
/* @__PURE__ */ (0,
|
|
16814
|
-
/* @__PURE__ */ (0,
|
|
17087
|
+
isBillingSharedCredits && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
17088
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconRight, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
|
|
17089
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16815
17090
|
"span",
|
|
16816
17091
|
{
|
|
16817
17092
|
style: {
|
|
@@ -16827,20 +17102,20 @@ function SettingsContentInner({
|
|
|
16827
17102
|
] })
|
|
16828
17103
|
] })
|
|
16829
17104
|
] }),
|
|
16830
|
-
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */ (0,
|
|
17105
|
+
!isOverview && activeTab === "workspaceList" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16831
17106
|
SettingsTooltip,
|
|
16832
17107
|
{
|
|
16833
17108
|
content: "Start a new workspace with its own team, members and billing",
|
|
16834
17109
|
placement: "bottom",
|
|
16835
17110
|
inline: true,
|
|
16836
|
-
children: /* @__PURE__ */ (0,
|
|
16837
|
-
|
|
17111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17112
|
+
import_ui24.ScButton,
|
|
16838
17113
|
{
|
|
16839
17114
|
text: "Create Workspace",
|
|
16840
17115
|
variant: "secondary",
|
|
16841
17116
|
size: "md",
|
|
16842
17117
|
styleVariant: "icon-left",
|
|
16843
|
-
icon: /* @__PURE__ */ (0,
|
|
17118
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16844
17119
|
import_icons18.SiconWorkspace,
|
|
16845
17120
|
{
|
|
16846
17121
|
className: "w-5 h-5",
|
|
@@ -16852,21 +17127,21 @@ function SettingsContentInner({
|
|
|
16852
17127
|
)
|
|
16853
17128
|
}
|
|
16854
17129
|
),
|
|
16855
|
-
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ (0,
|
|
17130
|
+
!isOverview && activeTab === "workspaceMembers" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16856
17131
|
SettingsTooltip,
|
|
16857
17132
|
{
|
|
16858
17133
|
content: "Send someone an invite to join this workspace",
|
|
16859
17134
|
placement: "bottom",
|
|
16860
17135
|
inline: true,
|
|
16861
|
-
children: /* @__PURE__ */ (0,
|
|
16862
|
-
|
|
17136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17137
|
+
import_ui24.ScButton,
|
|
16863
17138
|
{
|
|
16864
17139
|
text: overviewDetail ? "Invite people" : "Invite user",
|
|
16865
17140
|
variant: "secondary",
|
|
16866
17141
|
size: "md",
|
|
16867
17142
|
styleVariant: "icon-left",
|
|
16868
17143
|
state: canUseHeaderInvite ? "default" : "disabled",
|
|
16869
|
-
icon: /* @__PURE__ */ (0,
|
|
17144
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16870
17145
|
import_icons18.SiconUserAdd,
|
|
16871
17146
|
{
|
|
16872
17147
|
className: "w-5 h-5",
|
|
@@ -16880,15 +17155,15 @@ function SettingsContentInner({
|
|
|
16880
17155
|
)
|
|
16881
17156
|
}
|
|
16882
17157
|
),
|
|
16883
|
-
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
16884
|
-
/* @__PURE__ */ (0,
|
|
17158
|
+
!isOverview && activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center shrink-0", style: { gap: "var(--spacing-md)" }, children: [
|
|
17159
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16885
17160
|
SettingsTooltip,
|
|
16886
17161
|
{
|
|
16887
17162
|
content: "Include keys you have already revoked in the list below",
|
|
16888
17163
|
placement: "bottom",
|
|
16889
17164
|
inline: true,
|
|
16890
|
-
children: /* @__PURE__ */ (0,
|
|
16891
|
-
|
|
17165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17166
|
+
import_ui24.ScButton,
|
|
16892
17167
|
{
|
|
16893
17168
|
text: tokenShowRevoked ? "Hide Revoked" : "Show Revoked",
|
|
16894
17169
|
variant: "outline",
|
|
@@ -16898,20 +17173,20 @@ function SettingsContentInner({
|
|
|
16898
17173
|
)
|
|
16899
17174
|
}
|
|
16900
17175
|
),
|
|
16901
|
-
/* @__PURE__ */ (0,
|
|
17176
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16902
17177
|
SettingsTooltip,
|
|
16903
17178
|
{
|
|
16904
17179
|
content: "Generate a key for calling the Streamoid APIs from your own code",
|
|
16905
17180
|
placement: "bottom",
|
|
16906
17181
|
inline: true,
|
|
16907
|
-
children: /* @__PURE__ */ (0,
|
|
16908
|
-
|
|
17182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17183
|
+
import_ui24.ScButton,
|
|
16909
17184
|
{
|
|
16910
17185
|
text: "New API Key",
|
|
16911
17186
|
variant: "secondary",
|
|
16912
17187
|
size: "md",
|
|
16913
17188
|
styleVariant: "icon-left",
|
|
16914
|
-
icon: /* @__PURE__ */ (0,
|
|
17189
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16915
17190
|
import_icons18.SiconPlus,
|
|
16916
17191
|
{
|
|
16917
17192
|
className: "w-5 h-5",
|
|
@@ -16924,13 +17199,13 @@ function SettingsContentInner({
|
|
|
16924
17199
|
}
|
|
16925
17200
|
)
|
|
16926
17201
|
] }),
|
|
16927
|
-
overviewDetail && onClose && /* @__PURE__ */ (0,
|
|
16928
|
-
|
|
17202
|
+
overviewDetail && onClose && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SettingsTooltip, { content: "Close settings", placement: "bottom", inline: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17203
|
+
import_ui24.ScButton,
|
|
16929
17204
|
{
|
|
16930
17205
|
styleVariant: "icon-only",
|
|
16931
17206
|
variant: "outline",
|
|
16932
17207
|
size: "md",
|
|
16933
|
-
icon: /* @__PURE__ */ (0,
|
|
17208
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconClose, { className: "w-5 h-5", color: PRIMARY_COLOR3 }),
|
|
16934
17209
|
"aria-label": "Close settings",
|
|
16935
17210
|
style: isOverview ? { width: "2rem", height: "2rem", padding: 0 } : void 0,
|
|
16936
17211
|
onClick: onClose
|
|
@@ -16939,7 +17214,7 @@ function SettingsContentInner({
|
|
|
16939
17214
|
]
|
|
16940
17215
|
}
|
|
16941
17216
|
),
|
|
16942
|
-
isOverview ? /* @__PURE__ */ (0,
|
|
17217
|
+
isOverview ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16943
17218
|
AdministrationOverview,
|
|
16944
17219
|
{
|
|
16945
17220
|
workspaceName: workspaceScopeName,
|
|
@@ -16949,18 +17224,19 @@ function SettingsContentInner({
|
|
|
16949
17224
|
isWorkspaceAdmin,
|
|
16950
17225
|
showConnectedApps,
|
|
16951
17226
|
showIntegrations,
|
|
17227
|
+
showLoginMethods,
|
|
16952
17228
|
showReferral,
|
|
16953
17229
|
canInvite: !overviewInvite.isLoading && overviewInvite.canInvite,
|
|
16954
17230
|
onNavigate: setActiveTab,
|
|
16955
17231
|
onInvitePeople
|
|
16956
17232
|
}
|
|
16957
|
-
) : /* @__PURE__ */ (0,
|
|
17233
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
16958
17234
|
"div",
|
|
16959
17235
|
{
|
|
16960
17236
|
className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
|
|
16961
17237
|
style: { gap: 20 },
|
|
16962
17238
|
children: [
|
|
16963
|
-
!overviewDetail && !isBillingSubView && /* @__PURE__ */ (0,
|
|
17239
|
+
!overviewDetail && !isBillingSubView && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16964
17240
|
SettingsNav,
|
|
16965
17241
|
{
|
|
16966
17242
|
isWorkspaceAdmin,
|
|
@@ -16971,11 +17247,12 @@ function SettingsContentInner({
|
|
|
16971
17247
|
hasOrganization,
|
|
16972
17248
|
showConnectedApps,
|
|
16973
17249
|
showIntegrations,
|
|
17250
|
+
showLoginMethods,
|
|
16974
17251
|
showReferral
|
|
16975
17252
|
}
|
|
16976
17253
|
),
|
|
16977
|
-
activeTab === "profile" && /* @__PURE__ */ (0,
|
|
16978
|
-
activeTab === "workspace" && /* @__PURE__ */ (0,
|
|
17254
|
+
activeTab === "profile" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ProfileTab, {}),
|
|
17255
|
+
activeTab === "workspace" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
16979
17256
|
WorkspaceGeneralTab,
|
|
16980
17257
|
{
|
|
16981
17258
|
workspace: currentWorkspaceData,
|
|
@@ -16997,7 +17274,7 @@ function SettingsContentInner({
|
|
|
16997
17274
|
}
|
|
16998
17275
|
}
|
|
16999
17276
|
) }),
|
|
17000
|
-
activeTab === "workspaceMembers" && /* @__PURE__ */ (0,
|
|
17277
|
+
activeTab === "workspaceMembers" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17001
17278
|
TeamsContent,
|
|
17002
17279
|
{
|
|
17003
17280
|
embedded: true,
|
|
@@ -17012,7 +17289,7 @@ function SettingsContentInner({
|
|
|
17012
17289
|
hiddenApps
|
|
17013
17290
|
}
|
|
17014
17291
|
) }),
|
|
17015
|
-
activeTab === "workspaceList" && /* @__PURE__ */ (0,
|
|
17292
|
+
activeTab === "workspaceList" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17016
17293
|
WorkspaceListTab,
|
|
17017
17294
|
{
|
|
17018
17295
|
workspaces: displayWorkspaces,
|
|
@@ -17037,11 +17314,12 @@ function SettingsContentInner({
|
|
|
17037
17314
|
}
|
|
17038
17315
|
}
|
|
17039
17316
|
),
|
|
17040
|
-
activeTab === "referral" && showReferral && /* @__PURE__ */ (0,
|
|
17041
|
-
activeTab === "connectedApps" && /* @__PURE__ */ (0,
|
|
17042
|
-
activeTab === "organizationIntegrations" && /* @__PURE__ */ (0,
|
|
17043
|
-
activeTab === "
|
|
17044
|
-
|
|
17317
|
+
activeTab === "referral" && showReferral && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ReferralTab, {}),
|
|
17318
|
+
activeTab === "connectedApps" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ConnectedAppsContent, {}),
|
|
17319
|
+
activeTab === "organizationIntegrations" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OrganizationIntegrationsContent, {}),
|
|
17320
|
+
activeTab === "organizationLoginMethods" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OrganizationLoginMethodsContent, {}),
|
|
17321
|
+
activeTab === "organizationList" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OrganizationListContent, {}),
|
|
17322
|
+
(activeTab === "organization" || activeTab === "organizationWorkspaces" || activeTab === "organizationDomains") && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: organization.managementUrl ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17045
17323
|
ManagedOrganizationSummary,
|
|
17046
17324
|
{
|
|
17047
17325
|
name: workspaceOwner.organizationName,
|
|
@@ -17049,14 +17327,14 @@ function SettingsContentInner({
|
|
|
17049
17327
|
status: workspaceOwner.organizationStatus,
|
|
17050
17328
|
managementUrl: organization.managementUrl
|
|
17051
17329
|
}
|
|
17052
|
-
) : /* @__PURE__ */ (0,
|
|
17330
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17053
17331
|
OrganizationContent,
|
|
17054
17332
|
{
|
|
17055
17333
|
embedded: true,
|
|
17056
17334
|
view: activeTab === "organizationWorkspaces" || activeTab === "organizationDomains" ? "workspaces" : "people"
|
|
17057
17335
|
}
|
|
17058
17336
|
) }),
|
|
17059
|
-
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
17337
|
+
activeTab === "billing" && isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17060
17338
|
BillingContent,
|
|
17061
17339
|
{
|
|
17062
17340
|
embedded: true,
|
|
@@ -17086,14 +17364,14 @@ function SettingsContentInner({
|
|
|
17086
17364
|
}
|
|
17087
17365
|
}
|
|
17088
17366
|
) }),
|
|
17089
|
-
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
17090
|
-
/* @__PURE__ */ (0,
|
|
17091
|
-
/* @__PURE__ */ (0,
|
|
17092
|
-
/* @__PURE__ */ (0,
|
|
17093
|
-
/* @__PURE__ */ (0,
|
|
17367
|
+
(activeTab === "billing" || activeTab === "apikey") && !isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("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: [
|
|
17368
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconLock, { size: 24, color: MUTED_COLOR2 }),
|
|
17369
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { style: { margin: 0, fontSize: 18, fontWeight: 600, color: PRIMARY_COLOR3 }, children: "Contact your workspace admin" }),
|
|
17370
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("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." }),
|
|
17371
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("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" })
|
|
17094
17372
|
] }),
|
|
17095
|
-
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0,
|
|
17096
|
-
/* @__PURE__ */ (0,
|
|
17373
|
+
activeTab === "apikey" && isWorkspaceAdmin && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: [
|
|
17374
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
17097
17375
|
"a",
|
|
17098
17376
|
{
|
|
17099
17377
|
href: "https://docs.streamoid.com",
|
|
@@ -17103,19 +17381,19 @@ function SettingsContentInner({
|
|
|
17103
17381
|
className: "flex items-center shrink-0",
|
|
17104
17382
|
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" },
|
|
17105
17383
|
children: [
|
|
17106
|
-
/* @__PURE__ */ (0,
|
|
17107
|
-
/* @__PURE__ */ (0,
|
|
17108
|
-
/* @__PURE__ */ (0,
|
|
17109
|
-
/* @__PURE__ */ (0,
|
|
17384
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconBookOpen, { size: 24 }),
|
|
17385
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { style: { display: "flex", flexDirection: "column", gap: 4, flex: 1 }, children: [
|
|
17386
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { fontSize: 14, fontWeight: 600 }, children: "Build with the Streamoid API" }),
|
|
17387
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { style: { fontSize: 13, lineHeight: "20px", color: MUTED_COLOR2 }, children: "Explore authentication, API references and integration guides." })
|
|
17110
17388
|
] }),
|
|
17111
|
-
/* @__PURE__ */ (0,
|
|
17389
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, fontSize: 13, whiteSpace: "nowrap" }, children: [
|
|
17112
17390
|
"View docs ",
|
|
17113
|
-
/* @__PURE__ */ (0,
|
|
17391
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons18.SiconExternalLink, { size: 16 })
|
|
17114
17392
|
] })
|
|
17115
17393
|
]
|
|
17116
17394
|
}
|
|
17117
17395
|
),
|
|
17118
|
-
/* @__PURE__ */ (0,
|
|
17396
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17119
17397
|
TokensContent,
|
|
17120
17398
|
{
|
|
17121
17399
|
embedded: true,
|
|
@@ -17132,7 +17410,7 @@ function SettingsContentInner({
|
|
|
17132
17410
|
] })
|
|
17133
17411
|
}
|
|
17134
17412
|
),
|
|
17135
|
-
/* @__PURE__ */ (0,
|
|
17413
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17136
17414
|
WorkspaceModal,
|
|
17137
17415
|
{
|
|
17138
17416
|
open: wsModalOpen,
|
|
@@ -17151,7 +17429,7 @@ function SettingsContentInner({
|
|
|
17151
17429
|
}
|
|
17152
17430
|
}
|
|
17153
17431
|
),
|
|
17154
|
-
/* @__PURE__ */ (0,
|
|
17432
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17155
17433
|
ConfirmLeaveModal,
|
|
17156
17434
|
{
|
|
17157
17435
|
open: confirmLeaveOpen,
|
|
@@ -17184,7 +17462,7 @@ function SettingsContentInner({
|
|
|
17184
17462
|
}
|
|
17185
17463
|
}
|
|
17186
17464
|
),
|
|
17187
|
-
/* @__PURE__ */ (0,
|
|
17465
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
17188
17466
|
ConfirmDeleteModal,
|
|
17189
17467
|
{
|
|
17190
17468
|
open: confirmDeleteOpen,
|
|
@@ -17214,10 +17492,10 @@ function SettingsContentInner({
|
|
|
17214
17492
|
}
|
|
17215
17493
|
|
|
17216
17494
|
// src/workspace-picker.tsx
|
|
17217
|
-
var
|
|
17218
|
-
var
|
|
17495
|
+
var import_react29 = require("react");
|
|
17496
|
+
var import_ui26 = require("@streamoid/ui");
|
|
17219
17497
|
var import_icons19 = require("@streamoid/icons");
|
|
17220
|
-
var
|
|
17498
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
17221
17499
|
var T19 = {
|
|
17222
17500
|
primary: "var(--alias-text---icons-primary)",
|
|
17223
17501
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17258,14 +17536,14 @@ function WorkspacePicker({
|
|
|
17258
17536
|
}
|
|
17259
17537
|
];
|
|
17260
17538
|
const grouped = !!groups && sections.length > 1;
|
|
17261
|
-
const [selected, setSelected] = (0,
|
|
17262
|
-
const [collapsed, setCollapsed] = (0,
|
|
17263
|
-
const [creating, setCreating] = (0,
|
|
17264
|
-
const [name, setName] = (0,
|
|
17265
|
-
const [visibility, setVisibility] = (0,
|
|
17539
|
+
const [selected, setSelected] = (0, import_react29.useState)(/* @__PURE__ */ new Set());
|
|
17540
|
+
const [collapsed, setCollapsed] = (0, import_react29.useState)(/* @__PURE__ */ new Set());
|
|
17541
|
+
const [creating, setCreating] = (0, import_react29.useState)(false);
|
|
17542
|
+
const [name, setName] = (0, import_react29.useState)("");
|
|
17543
|
+
const [visibility, setVisibility] = (0, import_react29.useState)("shared");
|
|
17266
17544
|
const creatable = onCreate ? sections.filter((s) => s.canCreate) : [];
|
|
17267
|
-
const [createOrgId, setCreateOrgId] = (0,
|
|
17268
|
-
const [busy, setBusy] = (0,
|
|
17545
|
+
const [createOrgId, setCreateOrgId] = (0, import_react29.useState)("");
|
|
17546
|
+
const [busy, setBusy] = (0, import_react29.useState)(false);
|
|
17269
17547
|
const total = sections.reduce((n, s) => n + s.workspaces.length, 0);
|
|
17270
17548
|
const hasWorkspaces = total > 0;
|
|
17271
17549
|
const canCreate = creatable.length > 0;
|
|
@@ -17300,7 +17578,7 @@ function WorkspacePicker({
|
|
|
17300
17578
|
);
|
|
17301
17579
|
const workspaceRow = (workspace, first) => {
|
|
17302
17580
|
const checked = selected.has(workspace._id);
|
|
17303
|
-
return /* @__PURE__ */ (0,
|
|
17581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17304
17582
|
"div",
|
|
17305
17583
|
{
|
|
17306
17584
|
role: "checkbox",
|
|
@@ -17321,8 +17599,8 @@ function WorkspacePicker({
|
|
|
17321
17599
|
}
|
|
17322
17600
|
},
|
|
17323
17601
|
children: [
|
|
17324
|
-
/* @__PURE__ */ (0,
|
|
17325
|
-
/* @__PURE__ */ (0,
|
|
17602
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_ui26.ScCheckbox, { checked }),
|
|
17603
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17326
17604
|
ProfileAvatar,
|
|
17327
17605
|
{
|
|
17328
17606
|
name: workspace.name,
|
|
@@ -17331,8 +17609,8 @@ function WorkspacePicker({
|
|
|
17331
17609
|
borderRadius: T19.rLg
|
|
17332
17610
|
}
|
|
17333
17611
|
),
|
|
17334
|
-
/* @__PURE__ */ (0,
|
|
17335
|
-
/* @__PURE__ */ (0,
|
|
17612
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
17613
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17336
17614
|
"span",
|
|
17337
17615
|
{
|
|
17338
17616
|
className: "truncate",
|
|
@@ -17340,7 +17618,7 @@ function WorkspacePicker({
|
|
|
17340
17618
|
children: workspace.name
|
|
17341
17619
|
}
|
|
17342
17620
|
),
|
|
17343
|
-
workspace.ownerName && /* @__PURE__ */ (0,
|
|
17621
|
+
workspace.ownerName && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17344
17622
|
"span",
|
|
17345
17623
|
{
|
|
17346
17624
|
className: "truncate",
|
|
@@ -17361,8 +17639,8 @@ function WorkspacePicker({
|
|
|
17361
17639
|
const isCollapsed = collapsed.has(section.organizationId);
|
|
17362
17640
|
const picked = section.workspaces.filter((w) => selected.has(w._id)).length;
|
|
17363
17641
|
const Chevron = isCollapsed ? import_icons19.SiconChevronRight : import_icons19.SiconChevronDown;
|
|
17364
|
-
return /* @__PURE__ */ (0,
|
|
17365
|
-
/* @__PURE__ */ (0,
|
|
17642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col w-full", children: [
|
|
17643
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17366
17644
|
"div",
|
|
17367
17645
|
{
|
|
17368
17646
|
role: "button",
|
|
@@ -17386,8 +17664,8 @@ function WorkspacePicker({
|
|
|
17386
17664
|
}
|
|
17387
17665
|
},
|
|
17388
17666
|
children: [
|
|
17389
|
-
/* @__PURE__ */ (0,
|
|
17390
|
-
/* @__PURE__ */ (0,
|
|
17667
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Chevron, { className: "w-4 h-4", color: T19.muted }),
|
|
17668
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17391
17669
|
ProfileAvatar,
|
|
17392
17670
|
{
|
|
17393
17671
|
name: section.organizationName,
|
|
@@ -17396,7 +17674,7 @@ function WorkspacePicker({
|
|
|
17396
17674
|
borderRadius: T19.rLg
|
|
17397
17675
|
}
|
|
17398
17676
|
),
|
|
17399
|
-
/* @__PURE__ */ (0,
|
|
17677
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17400
17678
|
"span",
|
|
17401
17679
|
{
|
|
17402
17680
|
className: "truncate flex-1 min-w-0",
|
|
@@ -17404,11 +17682,11 @@ function WorkspacePicker({
|
|
|
17404
17682
|
children: section.organizationName
|
|
17405
17683
|
}
|
|
17406
17684
|
),
|
|
17407
|
-
/* @__PURE__ */ (0,
|
|
17685
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("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"}` })
|
|
17408
17686
|
]
|
|
17409
17687
|
}
|
|
17410
17688
|
),
|
|
17411
|
-
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ (0,
|
|
17689
|
+
!isCollapsed && (section.workspaces.length ? section.workspaces.map((w) => workspaceRow(w, false)) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17412
17690
|
"div",
|
|
17413
17691
|
{
|
|
17414
17692
|
style: {
|
|
@@ -17423,14 +17701,14 @@ function WorkspacePicker({
|
|
|
17423
17701
|
))
|
|
17424
17702
|
] }, section.organizationId);
|
|
17425
17703
|
};
|
|
17426
|
-
return /* @__PURE__ */ (0,
|
|
17704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17427
17705
|
"div",
|
|
17428
17706
|
{
|
|
17429
17707
|
className: "flex flex-col w-full",
|
|
17430
17708
|
style: { maxWidth: 520, gap: T19.sp5xl, fontFamily: T19.font },
|
|
17431
17709
|
children: [
|
|
17432
|
-
/* @__PURE__ */ (0,
|
|
17433
|
-
/* @__PURE__ */ (0,
|
|
17710
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col", style: { gap: T19.spMd }, children: [
|
|
17711
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17434
17712
|
"p",
|
|
17435
17713
|
{
|
|
17436
17714
|
style: {
|
|
@@ -17443,9 +17721,9 @@ function WorkspacePicker({
|
|
|
17443
17721
|
children: "Choose your workspaces"
|
|
17444
17722
|
}
|
|
17445
17723
|
),
|
|
17446
|
-
/* @__PURE__ */ (0,
|
|
17724
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("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.` })
|
|
17447
17725
|
] }),
|
|
17448
|
-
(loading || hasWorkspaces) && /* @__PURE__ */ (0,
|
|
17726
|
+
(loading || hasWorkspaces) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17449
17727
|
"div",
|
|
17450
17728
|
{
|
|
17451
17729
|
className: "flex flex-col w-full overflow-y-auto",
|
|
@@ -17455,7 +17733,7 @@ function WorkspacePicker({
|
|
|
17455
17733
|
border: `1px solid ${T19.borderSubtle}`,
|
|
17456
17734
|
borderRadius: T19.r3xl
|
|
17457
17735
|
},
|
|
17458
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
17736
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17459
17737
|
"div",
|
|
17460
17738
|
{
|
|
17461
17739
|
className: "flex items-center justify-center",
|
|
@@ -17465,9 +17743,9 @@ function WorkspacePicker({
|
|
|
17465
17743
|
) : grouped ? sections.map(groupSection) : sections[0].workspaces.map((w, index) => workspaceRow(w, index === 0))
|
|
17466
17744
|
}
|
|
17467
17745
|
),
|
|
17468
|
-
showCreate ? /* @__PURE__ */ (0,
|
|
17469
|
-
creatable.length > 1 && /* @__PURE__ */ (0,
|
|
17470
|
-
/* @__PURE__ */ (0,
|
|
17746
|
+
showCreate ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T19.spMd }, children: [
|
|
17747
|
+
creatable.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
17748
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17471
17749
|
"label",
|
|
17472
17750
|
{
|
|
17473
17751
|
htmlFor: "workspace-picker-organization",
|
|
@@ -17475,7 +17753,7 @@ function WorkspacePicker({
|
|
|
17475
17753
|
children: "Organization"
|
|
17476
17754
|
}
|
|
17477
17755
|
),
|
|
17478
|
-
/* @__PURE__ */ (0,
|
|
17756
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17479
17757
|
"select",
|
|
17480
17758
|
{
|
|
17481
17759
|
id: "workspace-picker-organization",
|
|
@@ -17492,11 +17770,11 @@ function WorkspacePicker({
|
|
|
17492
17770
|
fontFamily: T19.font,
|
|
17493
17771
|
fontSize: T19.fsSm
|
|
17494
17772
|
},
|
|
17495
|
-
children: creatable.map((s) => /* @__PURE__ */ (0,
|
|
17773
|
+
children: creatable.map((s) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("option", { value: s.organizationId, children: s.organizationName }, s.organizationId))
|
|
17496
17774
|
}
|
|
17497
17775
|
)
|
|
17498
17776
|
] }),
|
|
17499
|
-
/* @__PURE__ */ (0,
|
|
17777
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17500
17778
|
"label",
|
|
17501
17779
|
{
|
|
17502
17780
|
htmlFor: "workspace-picker-name",
|
|
@@ -17504,7 +17782,7 @@ function WorkspacePicker({
|
|
|
17504
17782
|
children: "New workspace name"
|
|
17505
17783
|
}
|
|
17506
17784
|
),
|
|
17507
|
-
/* @__PURE__ */ (0,
|
|
17785
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17508
17786
|
"input",
|
|
17509
17787
|
{
|
|
17510
17788
|
id: "workspace-picker-name",
|
|
@@ -17528,12 +17806,12 @@ function WorkspacePicker({
|
|
|
17528
17806
|
}
|
|
17529
17807
|
}
|
|
17530
17808
|
),
|
|
17531
|
-
/* @__PURE__ */ (0,
|
|
17809
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { role: "radiogroup", className: "flex w-full", style: { gap: T19.spMd }, children: [
|
|
17532
17810
|
["shared", "Shared", `Anyone in ${createLabel} can join`],
|
|
17533
17811
|
["private", "Private", "Invite only"]
|
|
17534
17812
|
].map(([value, label, hint]) => {
|
|
17535
17813
|
const active = visibility === value;
|
|
17536
|
-
return /* @__PURE__ */ (0,
|
|
17814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
17537
17815
|
"div",
|
|
17538
17816
|
{
|
|
17539
17817
|
role: "radio",
|
|
@@ -17554,7 +17832,7 @@ function WorkspacePicker({
|
|
|
17554
17832
|
border: `1px solid ${active ? T19.primary : T19.borderSubtle}`
|
|
17555
17833
|
},
|
|
17556
17834
|
children: [
|
|
17557
|
-
/* @__PURE__ */ (0,
|
|
17835
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17558
17836
|
"span",
|
|
17559
17837
|
{
|
|
17560
17838
|
style: {
|
|
@@ -17566,15 +17844,15 @@ function WorkspacePicker({
|
|
|
17566
17844
|
children: label
|
|
17567
17845
|
}
|
|
17568
17846
|
),
|
|
17569
|
-
/* @__PURE__ */ (0,
|
|
17847
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { style: { color: T19.muted, fontSize: T19.fsXs, lineHeight: T19.lhXs }, children: hint })
|
|
17570
17848
|
]
|
|
17571
17849
|
},
|
|
17572
17850
|
value
|
|
17573
17851
|
);
|
|
17574
17852
|
}) }),
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17576
|
-
hasWorkspaces && /* @__PURE__ */ (0,
|
|
17577
|
-
|
|
17853
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center justify-end w-full", style: { gap: T19.spMd }, children: [
|
|
17854
|
+
hasWorkspaces && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17855
|
+
import_ui26.ScButton,
|
|
17578
17856
|
{
|
|
17579
17857
|
text: "Back",
|
|
17580
17858
|
variant: "tertiary",
|
|
@@ -17582,8 +17860,8 @@ function WorkspacePicker({
|
|
|
17582
17860
|
onClick: () => setCreating(false)
|
|
17583
17861
|
}
|
|
17584
17862
|
),
|
|
17585
|
-
/* @__PURE__ */ (0,
|
|
17586
|
-
|
|
17863
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17864
|
+
import_ui26.ScButton,
|
|
17587
17865
|
{
|
|
17588
17866
|
text: busy ? "Creating\u2026" : "Create workspace",
|
|
17589
17867
|
variant: "primary",
|
|
@@ -17593,9 +17871,9 @@ function WorkspacePicker({
|
|
|
17593
17871
|
}
|
|
17594
17872
|
)
|
|
17595
17873
|
] })
|
|
17596
|
-
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ (0,
|
|
17597
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
17598
|
-
|
|
17874
|
+
] }) : !loading && !hasWorkspaces ? null : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-wrap items-center justify-between w-full", style: { gap: T19.spMd }, children: [
|
|
17875
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17876
|
+
import_ui26.ScButton,
|
|
17599
17877
|
{
|
|
17600
17878
|
text: "Create a workspace",
|
|
17601
17879
|
variant: "tertiary",
|
|
@@ -17603,9 +17881,9 @@ function WorkspacePicker({
|
|
|
17603
17881
|
state: loading || busy ? "disabled" : "default",
|
|
17604
17882
|
onClick: loading || busy ? void 0 : () => setCreating(true)
|
|
17605
17883
|
}
|
|
17606
|
-
) : /* @__PURE__ */ (0,
|
|
17607
|
-
/* @__PURE__ */ (0,
|
|
17608
|
-
|
|
17884
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", {}),
|
|
17885
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
17886
|
+
import_ui26.ScButton,
|
|
17609
17887
|
{
|
|
17610
17888
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} workspaces` : "Join workspace",
|
|
17611
17889
|
variant: "primary",
|
|
@@ -17621,9 +17899,9 @@ function WorkspacePicker({
|
|
|
17621
17899
|
}
|
|
17622
17900
|
|
|
17623
17901
|
// src/organization-picker.tsx
|
|
17624
|
-
var
|
|
17625
|
-
var
|
|
17626
|
-
var
|
|
17902
|
+
var import_react30 = require("react");
|
|
17903
|
+
var import_ui27 = require("@streamoid/ui");
|
|
17904
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
17627
17905
|
var T20 = {
|
|
17628
17906
|
primary: "var(--alias-text---icons-primary)",
|
|
17629
17907
|
muted: "var(--alias-text---icons-muted)",
|
|
@@ -17657,17 +17935,17 @@ function OrganizationPicker({
|
|
|
17657
17935
|
onJoin,
|
|
17658
17936
|
onCreate
|
|
17659
17937
|
}) {
|
|
17660
|
-
const [selected, setSelected] = (0,
|
|
17938
|
+
const [selected, setSelected] = (0, import_react30.useState)(/* @__PURE__ */ new Set());
|
|
17661
17939
|
const toggle = (id) => setSelected((prev) => {
|
|
17662
17940
|
const next = new Set(prev);
|
|
17663
17941
|
if (next.has(id)) next.delete(id);
|
|
17664
17942
|
else next.add(id);
|
|
17665
17943
|
return next;
|
|
17666
17944
|
});
|
|
17667
|
-
const [name, setName] = (0,
|
|
17668
|
-
const [type, setType] = (0,
|
|
17669
|
-
const [busy, setBusy] = (0,
|
|
17670
|
-
(0,
|
|
17945
|
+
const [name, setName] = (0, import_react30.useState)(suggestedName);
|
|
17946
|
+
const [type, setType] = (0, import_react30.useState)("shared");
|
|
17947
|
+
const [busy, setBusy] = (0, import_react30.useState)(false);
|
|
17948
|
+
(0, import_react30.useEffect)(() => {
|
|
17671
17949
|
setName((current) => current || suggestedName);
|
|
17672
17950
|
}, [suggestedName]);
|
|
17673
17951
|
const choosing = organizations.length > 0;
|
|
@@ -17683,18 +17961,18 @@ function OrganizationPicker({
|
|
|
17683
17961
|
const heading = choosing ? "Choose your organization" : "Create your organization";
|
|
17684
17962
|
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.`;
|
|
17685
17963
|
const textStyle = { margin: 0, fontFamily: T20.font };
|
|
17686
|
-
return /* @__PURE__ */ (0,
|
|
17964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
17687
17965
|
"div",
|
|
17688
17966
|
{
|
|
17689
17967
|
className: "flex flex-col w-full",
|
|
17690
17968
|
style: { maxWidth: 520, gap: T20.sp5xl, fontFamily: T20.font },
|
|
17691
17969
|
children: [
|
|
17692
|
-
/* @__PURE__ */ (0,
|
|
17693
|
-
/* @__PURE__ */ (0,
|
|
17694
|
-
/* @__PURE__ */ (0,
|
|
17970
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col", style: { gap: T20.spMd }, children: [
|
|
17971
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { style: { ...textStyle, color: T20.primary, fontSize: T20.fsXl, fontWeight: 600, lineHeight: T20.lhXl }, children: heading }),
|
|
17972
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { style: { ...textStyle, color: T20.muted, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: loading ? "Looking up your company\u2026" : subheading })
|
|
17695
17973
|
] }),
|
|
17696
|
-
!loading && choosing && /* @__PURE__ */ (0,
|
|
17697
|
-
/* @__PURE__ */ (0,
|
|
17974
|
+
!loading && choosing && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
17975
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
17698
17976
|
"div",
|
|
17699
17977
|
{
|
|
17700
17978
|
role: "group",
|
|
@@ -17707,7 +17985,7 @@ function OrganizationPicker({
|
|
|
17707
17985
|
},
|
|
17708
17986
|
children: organizations.map((org, index) => {
|
|
17709
17987
|
const checked = selected.has(org._id);
|
|
17710
|
-
return /* @__PURE__ */ (0,
|
|
17988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
17711
17989
|
"div",
|
|
17712
17990
|
{
|
|
17713
17991
|
role: "checkbox",
|
|
@@ -17728,11 +18006,11 @@ function OrganizationPicker({
|
|
|
17728
18006
|
}
|
|
17729
18007
|
},
|
|
17730
18008
|
children: [
|
|
17731
|
-
/* @__PURE__ */ (0,
|
|
17732
|
-
/* @__PURE__ */ (0,
|
|
17733
|
-
/* @__PURE__ */ (0,
|
|
17734
|
-
/* @__PURE__ */ (0,
|
|
17735
|
-
org.domain && /* @__PURE__ */ (0,
|
|
18009
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_ui27.ScCheckbox, { checked }),
|
|
18010
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ProfileAvatar, { name: org.name, profileImage: org.imageUrl, size: 32, borderRadius: T20.rLg }),
|
|
18011
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
18012
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "truncate", style: { color: T20.primary, fontSize: T20.fsSm, fontWeight: 500, lineHeight: T20.lhSm }, children: org.name }),
|
|
18013
|
+
org.domain && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "truncate", style: { color: T20.muted, fontSize: T20.fsXs, lineHeight: T20.lhXs }, children: org.domain })
|
|
17736
18014
|
] })
|
|
17737
18015
|
]
|
|
17738
18016
|
},
|
|
@@ -17741,8 +18019,8 @@ function OrganizationPicker({
|
|
|
17741
18019
|
})
|
|
17742
18020
|
}
|
|
17743
18021
|
),
|
|
17744
|
-
/* @__PURE__ */ (0,
|
|
17745
|
-
|
|
18022
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
18023
|
+
import_ui27.ScButton,
|
|
17746
18024
|
{
|
|
17747
18025
|
text: busy ? "Joining\u2026" : selected.size > 1 ? `Join ${selected.size} organizations` : "Join organization",
|
|
17748
18026
|
variant: "primary",
|
|
@@ -17752,10 +18030,10 @@ function OrganizationPicker({
|
|
|
17752
18030
|
}
|
|
17753
18031
|
) })
|
|
17754
18032
|
] }),
|
|
17755
|
-
!loading && !choosing && /* @__PURE__ */ (0,
|
|
17756
|
-
/* @__PURE__ */ (0,
|
|
17757
|
-
/* @__PURE__ */ (0,
|
|
17758
|
-
/* @__PURE__ */ (0,
|
|
18033
|
+
!loading && !choosing && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T20.sp3xl }, children: [
|
|
18034
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
18035
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("label", { htmlFor: "organization-picker-name", style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Organization name" }),
|
|
18036
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
17759
18037
|
"input",
|
|
17760
18038
|
{
|
|
17761
18039
|
id: "organization-picker-name",
|
|
@@ -17777,14 +18055,14 @@ function OrganizationPicker({
|
|
|
17777
18055
|
}
|
|
17778
18056
|
)
|
|
17779
18057
|
] }),
|
|
17780
|
-
!publicDomain && /* @__PURE__ */ (0,
|
|
17781
|
-
/* @__PURE__ */ (0,
|
|
17782
|
-
/* @__PURE__ */ (0,
|
|
18058
|
+
!publicDomain && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col w-full", style: { gap: T20.spMd }, children: [
|
|
18059
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { style: { color: T20.tertiary, fontSize: T20.fsSm, lineHeight: T20.lhSm }, children: "Who can join" }),
|
|
18060
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { role: "radiogroup", className: "flex w-full", style: { gap: T20.spMd }, children: [
|
|
17783
18061
|
["shared", "Shared"],
|
|
17784
18062
|
["private", "Private"]
|
|
17785
18063
|
].map(([value, label]) => {
|
|
17786
18064
|
const active = type === value;
|
|
17787
|
-
return /* @__PURE__ */ (0,
|
|
18065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
17788
18066
|
"div",
|
|
17789
18067
|
{
|
|
17790
18068
|
role: "radio",
|
|
@@ -17803,12 +18081,12 @@ function OrganizationPicker({
|
|
|
17803
18081
|
borderRadius: T20.r3xl,
|
|
17804
18082
|
border: `1px solid ${active ? T20.primary : T20.borderSubtle}`
|
|
17805
18083
|
},
|
|
17806
|
-
children: /* @__PURE__ */ (0,
|
|
18084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { style: { color: T20.primary, fontSize: T20.fsSm, lineHeight: T20.lhSm, fontWeight: active ? 600 : 400 }, children: label })
|
|
17807
18085
|
},
|
|
17808
18086
|
value
|
|
17809
18087
|
);
|
|
17810
18088
|
}) }),
|
|
17811
|
-
/* @__PURE__ */ (0,
|
|
18089
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
17812
18090
|
"span",
|
|
17813
18091
|
{
|
|
17814
18092
|
"data-testid": "organization-visibility-message",
|
|
@@ -17818,8 +18096,8 @@ function OrganizationPicker({
|
|
|
17818
18096
|
}
|
|
17819
18097
|
)
|
|
17820
18098
|
] }),
|
|
17821
|
-
/* @__PURE__ */ (0,
|
|
17822
|
-
|
|
18099
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
18100
|
+
import_ui27.ScButton,
|
|
17823
18101
|
{
|
|
17824
18102
|
text: busy ? "Creating\u2026" : "Create organization",
|
|
17825
18103
|
variant: "primary",
|
|
@@ -17835,13 +18113,13 @@ function OrganizationPicker({
|
|
|
17835
18113
|
}
|
|
17836
18114
|
|
|
17837
18115
|
// src/use-billing-entitlement.ts
|
|
17838
|
-
var
|
|
18116
|
+
var import_react31 = require("react");
|
|
17839
18117
|
function useBillingEntitlement(fetchCurrentPlan, key) {
|
|
17840
|
-
const fetchRef = (0,
|
|
18118
|
+
const fetchRef = (0, import_react31.useRef)(fetchCurrentPlan);
|
|
17841
18119
|
fetchRef.current = fetchCurrentPlan;
|
|
17842
|
-
const [state, setState] = (0,
|
|
17843
|
-
const [loading, setLoading] = (0,
|
|
17844
|
-
(0,
|
|
18120
|
+
const [state, setState] = (0, import_react31.useState)(null);
|
|
18121
|
+
const [loading, setLoading] = (0, import_react31.useState)(false);
|
|
18122
|
+
(0, import_react31.useEffect)(() => {
|
|
17845
18123
|
const fetch2 = fetchRef.current;
|
|
17846
18124
|
setState(null);
|
|
17847
18125
|
if (!key || !fetch2) {
|
|
@@ -17904,7 +18182,7 @@ function readSettingsCaller(base, state, entryKey, fallback = `${normalizedBase(
|
|
|
17904
18182
|
}
|
|
17905
18183
|
|
|
17906
18184
|
// src/app-settings-page.tsx
|
|
17907
|
-
var
|
|
18185
|
+
var import_react32 = require("react");
|
|
17908
18186
|
var import_icons20 = require("@streamoid/icons");
|
|
17909
18187
|
|
|
17910
18188
|
// src/app-settings-page.module.css
|
|
@@ -17926,18 +18204,18 @@ var app_settings_page_default = {
|
|
|
17926
18204
|
};
|
|
17927
18205
|
|
|
17928
18206
|
// src/app-settings-page.tsx
|
|
17929
|
-
var
|
|
18207
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
17930
18208
|
function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }) {
|
|
17931
|
-
return /* @__PURE__ */ (0,
|
|
17932
|
-
/* @__PURE__ */ (0,
|
|
17933
|
-
/* @__PURE__ */ (0,
|
|
17934
|
-
/* @__PURE__ */ (0,
|
|
18209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("header", { className: app_settings_page_default.header, children: [
|
|
18210
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { children: "App settings" }),
|
|
18211
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: app_settings_page_default.actions, children: [
|
|
18212
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("a", { href: administrationHref, onClick: (event) => {
|
|
17935
18213
|
if (onOpenAdministration && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17936
18214
|
event.preventDefault();
|
|
17937
18215
|
onOpenAdministration();
|
|
17938
18216
|
}
|
|
17939
18217
|
}, children: "Account and workspace settings" }),
|
|
17940
|
-
onClose ? /* @__PURE__ */ (0,
|
|
18218
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("button", { type: "button", className: app_settings_page_default.close, "aria-label": "Close App settings", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons20.SiconX, { size: 20, "aria-hidden": "true" }) }) : null
|
|
17941
18219
|
] })
|
|
17942
18220
|
] });
|
|
17943
18221
|
}
|
|
@@ -17949,43 +18227,43 @@ function AppSettingsPage({
|
|
|
17949
18227
|
emptyDescription = "Account, workspace and organization settings are available above.",
|
|
17950
18228
|
children
|
|
17951
18229
|
}) {
|
|
17952
|
-
return /* @__PURE__ */ (0,
|
|
17953
|
-
/* @__PURE__ */ (0,
|
|
17954
|
-
children ?? /* @__PURE__ */ (0,
|
|
17955
|
-
/* @__PURE__ */ (0,
|
|
17956
|
-
/* @__PURE__ */ (0,
|
|
18230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: app_settings_page_default.page, children: [
|
|
18231
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AppSettingsHeader, { administrationHref, onOpenAdministration, onClose }),
|
|
18232
|
+
children ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { className: app_settings_page_default.empty, "aria-label": "App settings empty state", children: [
|
|
18233
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { children: emptyTitle }),
|
|
18234
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: emptyDescription })
|
|
17957
18235
|
] })
|
|
17958
18236
|
] });
|
|
17959
18237
|
}
|
|
17960
18238
|
function AppSettingsSection({ title, action, children }) {
|
|
17961
|
-
return /* @__PURE__ */ (0,
|
|
17962
|
-
/* @__PURE__ */ (0,
|
|
17963
|
-
/* @__PURE__ */ (0,
|
|
17964
|
-
action ? /* @__PURE__ */ (0,
|
|
18239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { className: app_settings_page_default.section, "aria-label": title, children: [
|
|
18240
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: app_settings_page_default.sectionHeader, children: [
|
|
18241
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { children: title }),
|
|
18242
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: app_settings_page_default.sectionAction, children: action }) : null
|
|
17965
18243
|
] }),
|
|
17966
|
-
/* @__PURE__ */ (0,
|
|
18244
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children })
|
|
17967
18245
|
] });
|
|
17968
18246
|
}
|
|
17969
18247
|
function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }) {
|
|
17970
|
-
const reasonId = (0,
|
|
17971
|
-
const content = /* @__PURE__ */ (0,
|
|
17972
|
-
/* @__PURE__ */ (0,
|
|
17973
|
-
/* @__PURE__ */ (0,
|
|
17974
|
-
description ? /* @__PURE__ */ (0,
|
|
18248
|
+
const reasonId = (0, import_react32.useId)();
|
|
18249
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
18250
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: app_settings_page_default.rowCopy, children: [
|
|
18251
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: app_settings_page_default.rowTitle, children: title }),
|
|
18252
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: app_settings_page_default.rowDescription, children: description }) : null
|
|
17975
18253
|
] }),
|
|
17976
|
-
summary || trailing || href || onClick ? /* @__PURE__ */ (0,
|
|
18254
|
+
summary || trailing || href || onClick ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: app_settings_page_default.rowEnd, children: [
|
|
17977
18255
|
summary,
|
|
17978
|
-
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ (0,
|
|
18256
|
+
trailing ?? (!disabled && (href || onClick) ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons20.SiconArrowRight, { size: 18, "aria-hidden": "true" }) : null)
|
|
17979
18257
|
] }) : null,
|
|
17980
|
-
disabledReason ? /* @__PURE__ */ (0,
|
|
18258
|
+
disabledReason ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: app_settings_page_default.srOnly, id: reasonId, children: disabledReason }) : null
|
|
17981
18259
|
] });
|
|
17982
18260
|
const props = { className: app_settings_page_default.row, "aria-label": ariaLabel, "aria-describedby": disabledReason ? reasonId : void 0 };
|
|
17983
|
-
if (href && !disabled) return /* @__PURE__ */ (0,
|
|
18261
|
+
if (href && !disabled) return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("a", { ...props, href, onClick: (event) => {
|
|
17984
18262
|
if (onClick && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && event.button === 0) {
|
|
17985
18263
|
event.preventDefault();
|
|
17986
18264
|
onClick();
|
|
17987
18265
|
}
|
|
17988
18266
|
}, children: content });
|
|
17989
|
-
if (onClick || disabled) return /* @__PURE__ */ (0,
|
|
17990
|
-
return /* @__PURE__ */ (0,
|
|
18267
|
+
if (onClick || disabled) return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("button", { ...props, type: "button", disabled, onClick, children: content });
|
|
18268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ...props, children: content });
|
|
17991
18269
|
}
|