@streamoid/settings 0.4.5 → 0.4.7

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 CHANGED
@@ -1090,23 +1090,6 @@ interface MemberListFrameProps {
1090
1090
  children?: ReactNode;
1091
1091
  }
1092
1092
  declare function MemberListFrame({ header, emptyText, isEmpty, grow, maxHeight, contentMinWidth, children, }: MemberListFrameProps): react.JSX.Element;
1093
- /**
1094
- * A small pill marking a workspace member who is *also* a member of the
1095
- * organization above this workspace.
1096
- *
1097
- * It answers a question neither list used to acknowledge: removing someone
1098
- * here may not remove all their access. Per the org contract, admins of the
1099
- * parent organization keep implicit access to its workspaces, and a workspace
1100
- * set to organization-wide visibility is readable by every org member.
1101
- *
1102
- * Derived by intersecting this workspace's members with the organization's, so
1103
- * it states a fact both APIs already report — it is not a guess at an
1104
- * "inherited permission" flag, which no endpoint exposes.
1105
- */
1106
- declare function OrgMembershipTag({ organizationName, isOrgAdmin, }: {
1107
- organizationName?: string | null;
1108
- isOrgAdmin?: boolean;
1109
- }): react.JSX.Element;
1110
1093
 
1111
1094
  type SettingsTooltipPlacement = "right" | "top" | "bottom";
1112
1095
  interface SettingsTooltipProps {
@@ -1273,4 +1256,4 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
1273
1256
  */
1274
1257
  declare function useSettingsAdapters(): SettingsAdapters;
1275
1258
 
1276
- export { APP_KEYS, type ApiToken, type AppKey, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrgMembershipTag, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCurrent, type SettingsOrganizationListItem, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters, userLanguageLabel };
1259
+ export { APP_KEYS, type ApiToken, type AppKey, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCurrent, type SettingsOrganizationListItem, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters, userLanguageLabel };
package/dist/index.d.ts CHANGED
@@ -1090,23 +1090,6 @@ interface MemberListFrameProps {
1090
1090
  children?: ReactNode;
1091
1091
  }
1092
1092
  declare function MemberListFrame({ header, emptyText, isEmpty, grow, maxHeight, contentMinWidth, children, }: MemberListFrameProps): react.JSX.Element;
1093
- /**
1094
- * A small pill marking a workspace member who is *also* a member of the
1095
- * organization above this workspace.
1096
- *
1097
- * It answers a question neither list used to acknowledge: removing someone
1098
- * here may not remove all their access. Per the org contract, admins of the
1099
- * parent organization keep implicit access to its workspaces, and a workspace
1100
- * set to organization-wide visibility is readable by every org member.
1101
- *
1102
- * Derived by intersecting this workspace's members with the organization's, so
1103
- * it states a fact both APIs already report — it is not a guess at an
1104
- * "inherited permission" flag, which no endpoint exposes.
1105
- */
1106
- declare function OrgMembershipTag({ organizationName, isOrgAdmin, }: {
1107
- organizationName?: string | null;
1108
- isOrgAdmin?: boolean;
1109
- }): react.JSX.Element;
1110
1093
 
1111
1094
  type SettingsTooltipPlacement = "right" | "top" | "bottom";
1112
1095
  interface SettingsTooltipProps {
@@ -1273,4 +1256,4 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
1273
1256
  */
1274
1257
  declare function useSettingsAdapters(): SettingsAdapters;
1275
1258
 
1276
- export { APP_KEYS, type ApiToken, type AppKey, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrgMembershipTag, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCurrent, type SettingsOrganizationListItem, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters, userLanguageLabel };
1259
+ export { APP_KEYS, type ApiToken, type AppKey, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type CreatedToken, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationInvite, OrganizationInviteModal, type OrganizationInviteModalProps, type OrganizationJoinRequest, type OrganizationMember, OrganizationModal, type OrganizationView, type OrganizationWorkspaceItem, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, ReferralTab, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCurrent, type SettingsOrganizationListItem, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, WorkspaceTab, countLabel, resolveSettingsTabFromPath, useSettingsAdapters, userLanguageLabel };
package/dist/index.js CHANGED
@@ -31,7 +31,6 @@ __export(index_exports, {
31
31
  InviteUpdateModal: () => InviteUpdateModal,
32
32
  MemberListFrame: () => MemberListFrame,
33
33
  MemberListToolbar: () => MemberListToolbar,
34
- OrgMembershipTag: () => OrgMembershipTag,
35
34
  OrganizationContent: () => OrganizationContent,
36
35
  OrganizationInviteModal: () => OrganizationInviteModal,
37
36
  OrganizationModal: () => OrganizationModal,
@@ -3815,28 +3814,17 @@ function MemberListFrame({
3815
3814
  }
3816
3815
  );
3817
3816
  }
3818
- function OrgMembershipTag({
3819
- organizationName,
3820
- isOrgAdmin
3817
+ function RoleChip({
3818
+ role,
3819
+ label
3821
3820
  }) {
3822
- const org = organizationName?.trim() || "the organization";
3823
3821
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3824
- "span",
3822
+ import_ui4.ScRole,
3825
3823
  {
3826
- className: "shrink-0 whitespace-nowrap",
3827
- style: {
3828
- fontFamily: T7.font,
3829
- fontSize: T7.fsXs,
3830
- fontWeight: 500,
3831
- lineHeight: T7.lhSm,
3832
- padding: "1px 8px",
3833
- borderRadius: "var(--radius-full)",
3834
- color: isOrgAdmin ? T7.primary : T7.muted,
3835
- border: `1px solid ${isOrgAdmin ? T7.primary : T7.borderSubtle}`,
3836
- backgroundColor: "transparent"
3837
- },
3838
- title: isOrgAdmin ? `Admin of ${org} \u2014 keeps access to this workspace regardless of what is set here. Manage under Organization \u203A People.` : `Also a member of ${org}. Manage their organization role under Organization \u203A People.`,
3839
- children: isOrgAdmin ? "org admin" : "in org"
3824
+ type: role,
3825
+ label,
3826
+ className: "shrink-0",
3827
+ style: { width: "auto", minWidth: "5rem" }
3840
3828
  }
3841
3829
  );
3842
3830
  }
@@ -4244,8 +4232,6 @@ function AccessIcons({ permissions }) {
4244
4232
  function TeamRow({
4245
4233
  member,
4246
4234
  variant,
4247
- orgMembership,
4248
- organizationName,
4249
4235
  onClick,
4250
4236
  onCancelInvite,
4251
4237
  onResendInvite
@@ -4311,23 +4297,13 @@ function TeamRow({
4311
4297
  ]
4312
4298
  }
4313
4299
  ),
4314
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center shrink-0", style: { gap: 6 }, children: [
4315
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4316
- import_ui5.ScRole,
4317
- {
4318
- type: member.permissions.role,
4319
- label: member.permissions.role === "admin" ? "Admin" : "Member",
4320
- className: "shrink-0"
4321
- }
4322
- ),
4323
- orgMembership && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4324
- OrgMembershipTag,
4325
- {
4326
- organizationName,
4327
- isOrgAdmin: orgMembership.isOrgAdmin
4328
- }
4329
- )
4330
- ] }),
4300
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex items-center shrink-0", style: { gap: 6 }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4301
+ RoleChip,
4302
+ {
4303
+ role: member.permissions.role === "admin" ? "admin" : "member",
4304
+ label: member.permissions.role === "admin" ? "Workspace admin" : "Member"
4305
+ }
4306
+ ) }),
4331
4307
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AccessIcons, { permissions: member.permissions }),
4332
4308
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
4333
4309
  "div",
@@ -4394,7 +4370,7 @@ function TeamsContent({
4394
4370
  organizationName,
4395
4371
  hiddenApps
4396
4372
  } = {}) {
4397
- const { auth, api, organization, workspace, toast } = useSettingsAdapters();
4373
+ const { auth, api, workspace, toast } = useSettingsAdapters();
4398
4374
  const user = auth.user;
4399
4375
  const [activeTab, setActiveTab] = (0, import_react8.useState)("active");
4400
4376
  const [activeMembers, setActiveMembers] = (0, import_react8.useState)([]);
@@ -4404,9 +4380,6 @@ function TeamsContent({
4404
4380
  const [highestRole, setHighestRole] = (0, import_react8.useState)("admin");
4405
4381
  const [searchQuery, setSearchQuery] = (0, import_react8.useState)("");
4406
4382
  const [loadingData, setLoadingData] = (0, import_react8.useState)(false);
4407
- const [orgMemberRoles, setOrgMemberRoles] = (0, import_react8.useState)(
4408
- () => /* @__PURE__ */ new Map()
4409
- );
4410
4383
  const [modal, setModal] = (0, import_react8.useState)({
4411
4384
  open: false,
4412
4385
  mode: "invite"
@@ -4485,37 +4458,6 @@ function TeamsContent({
4485
4458
  }
4486
4459
  }
4487
4460
  ];
4488
- const organizationId = organization.current?.id ?? null;
4489
- (0, import_react8.useEffect)(() => {
4490
- if (!organizationId) {
4491
- setOrgMemberRoles(/* @__PURE__ */ new Map());
4492
- return;
4493
- }
4494
- let cancelled = false;
4495
- organization.fetchMembers().then((members2) => {
4496
- if (cancelled) return;
4497
- const next = /* @__PURE__ */ new Map();
4498
- for (const m of members2) {
4499
- const email = m.user?.email?.trim().toLowerCase();
4500
- if (email) next.set(email, m.role);
4501
- }
4502
- setOrgMemberRoles(next);
4503
- }).catch(() => {
4504
- if (!cancelled) setOrgMemberRoles(/* @__PURE__ */ new Map());
4505
- });
4506
- return () => {
4507
- cancelled = true;
4508
- };
4509
- }, [organizationId, organization]);
4510
- const orgMembershipFor = (0, import_react8.useCallback)(
4511
- (email) => {
4512
- const key = email?.trim().toLowerCase();
4513
- if (!key || orgMemberRoles.size === 0) return void 0;
4514
- const role = orgMemberRoles.get(key);
4515
- return role ? { isOrgAdmin: role === "admin" } : void 0;
4516
- },
4517
- [orgMemberRoles]
4518
- );
4519
4461
  const fetchData = (0, import_react8.useCallback)(async () => {
4520
4462
  setLoadingData(true);
4521
4463
  try {
@@ -4846,8 +4788,6 @@ function TeamsContent({
4846
4788
  {
4847
4789
  member,
4848
4790
  variant: activeTab,
4849
- orgMembership: orgMembershipFor(member.userEmail),
4850
- organizationName,
4851
4791
  onClick: activeTab === "active" ? () => openUpdateModal(member) : void 0,
4852
4792
  onCancelInvite: () => void handleCancelPendingInvite(member),
4853
4793
  onResendInvite: () => void handleResendPendingInvite(member)
@@ -5987,11 +5927,10 @@ function MemberRow({
5987
5927
  }
5988
5928
  ),
5989
5929
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5990
- import_ui8.ScRole,
5930
+ RoleChip,
5991
5931
  {
5992
- type: member.role,
5993
- label: member.role === "admin" ? "Admin" : "Member",
5994
- className: "shrink-0"
5932
+ role: member.role === "admin" ? "admin" : "member",
5933
+ label: member.role === "admin" ? "Org admin" : "Member"
5995
5934
  }
5996
5935
  ),
5997
5936
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
@@ -6096,11 +6035,10 @@ function InviteRow({
6096
6035
  ] })
6097
6036
  ] }),
6098
6037
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6099
- import_ui8.ScRole,
6038
+ RoleChip,
6100
6039
  {
6101
- type: role === "admin" ? "admin" : "member",
6102
- label: role === "admin" ? "Admin" : "Member",
6103
- className: "shrink-0"
6040
+ role: role === "admin" ? "admin" : "member",
6041
+ label: role === "admin" ? "Org admin" : "Member"
6104
6042
  }
6105
6043
  ),
6106
6044
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
package/dist/index.mjs CHANGED
@@ -2398,7 +2398,7 @@ function SettingsTooltip({
2398
2398
 
2399
2399
  // src/teams-content.tsx
2400
2400
  import { useState as useState6, useEffect as useEffect6, useCallback as useCallback2 } from "react";
2401
- import { ScTableHeader, ScRole, ScPendingAction } from "@streamoid/ui";
2401
+ import { ScTableHeader, ScPendingAction } from "@streamoid/ui";
2402
2402
  import { ScButton as ScButton3 } from "@streamoid/ui";
2403
2403
  import {
2404
2404
  SiconUserAdd,
@@ -3642,7 +3642,7 @@ function InviteUpdateModal({
3642
3642
  }
3643
3643
 
3644
3644
  // src/member-list.tsx
3645
- import { ScTabSwitcher, ScTabComp, ScOnlyField } from "@streamoid/ui";
3645
+ import { ScTabSwitcher, ScTabComp, ScOnlyField, ScRole } from "@streamoid/ui";
3646
3646
  import { SiconSearch as SiconSearch2 } from "@streamoid/icons";
3647
3647
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
3648
3648
  var T7 = {
@@ -3797,28 +3797,17 @@ function MemberListFrame({
3797
3797
  }
3798
3798
  );
3799
3799
  }
3800
- function OrgMembershipTag({
3801
- organizationName,
3802
- isOrgAdmin
3800
+ function RoleChip({
3801
+ role,
3802
+ label
3803
3803
  }) {
3804
- const org = organizationName?.trim() || "the organization";
3805
3804
  return /* @__PURE__ */ jsx11(
3806
- "span",
3805
+ ScRole,
3807
3806
  {
3808
- className: "shrink-0 whitespace-nowrap",
3809
- style: {
3810
- fontFamily: T7.font,
3811
- fontSize: T7.fsXs,
3812
- fontWeight: 500,
3813
- lineHeight: T7.lhSm,
3814
- padding: "1px 8px",
3815
- borderRadius: "var(--radius-full)",
3816
- color: isOrgAdmin ? T7.primary : T7.muted,
3817
- border: `1px solid ${isOrgAdmin ? T7.primary : T7.borderSubtle}`,
3818
- backgroundColor: "transparent"
3819
- },
3820
- title: isOrgAdmin ? `Admin of ${org} \u2014 keeps access to this workspace regardless of what is set here. Manage under Organization \u203A People.` : `Also a member of ${org}. Manage their organization role under Organization \u203A People.`,
3821
- children: isOrgAdmin ? "org admin" : "in org"
3807
+ type: role,
3808
+ label,
3809
+ className: "shrink-0",
3810
+ style: { width: "auto", minWidth: "5rem" }
3822
3811
  }
3823
3812
  );
3824
3813
  }
@@ -4226,8 +4215,6 @@ function AccessIcons({ permissions }) {
4226
4215
  function TeamRow({
4227
4216
  member,
4228
4217
  variant,
4229
- orgMembership,
4230
- organizationName,
4231
4218
  onClick,
4232
4219
  onCancelInvite,
4233
4220
  onResendInvite
@@ -4293,23 +4280,13 @@ function TeamRow({
4293
4280
  ]
4294
4281
  }
4295
4282
  ),
4296
- /* @__PURE__ */ jsxs10("div", { className: "flex items-center shrink-0", style: { gap: 6 }, children: [
4297
- /* @__PURE__ */ jsx12(
4298
- ScRole,
4299
- {
4300
- type: member.permissions.role,
4301
- label: member.permissions.role === "admin" ? "Admin" : "Member",
4302
- className: "shrink-0"
4303
- }
4304
- ),
4305
- orgMembership && /* @__PURE__ */ jsx12(
4306
- OrgMembershipTag,
4307
- {
4308
- organizationName,
4309
- isOrgAdmin: orgMembership.isOrgAdmin
4310
- }
4311
- )
4312
- ] }),
4283
+ /* @__PURE__ */ jsx12("div", { className: "flex items-center shrink-0", style: { gap: 6 }, children: /* @__PURE__ */ jsx12(
4284
+ RoleChip,
4285
+ {
4286
+ role: member.permissions.role === "admin" ? "admin" : "member",
4287
+ label: member.permissions.role === "admin" ? "Workspace admin" : "Member"
4288
+ }
4289
+ ) }),
4313
4290
  /* @__PURE__ */ jsx12(AccessIcons, { permissions: member.permissions }),
4314
4291
  /* @__PURE__ */ jsx12(
4315
4292
  "div",
@@ -4376,7 +4353,7 @@ function TeamsContent({
4376
4353
  organizationName,
4377
4354
  hiddenApps
4378
4355
  } = {}) {
4379
- const { auth, api, organization, workspace, toast } = useSettingsAdapters();
4356
+ const { auth, api, workspace, toast } = useSettingsAdapters();
4380
4357
  const user = auth.user;
4381
4358
  const [activeTab, setActiveTab] = useState6("active");
4382
4359
  const [activeMembers, setActiveMembers] = useState6([]);
@@ -4386,9 +4363,6 @@ function TeamsContent({
4386
4363
  const [highestRole, setHighestRole] = useState6("admin");
4387
4364
  const [searchQuery, setSearchQuery] = useState6("");
4388
4365
  const [loadingData, setLoadingData] = useState6(false);
4389
- const [orgMemberRoles, setOrgMemberRoles] = useState6(
4390
- () => /* @__PURE__ */ new Map()
4391
- );
4392
4366
  const [modal, setModal] = useState6({
4393
4367
  open: false,
4394
4368
  mode: "invite"
@@ -4467,37 +4441,6 @@ function TeamsContent({
4467
4441
  }
4468
4442
  }
4469
4443
  ];
4470
- const organizationId = organization.current?.id ?? null;
4471
- useEffect6(() => {
4472
- if (!organizationId) {
4473
- setOrgMemberRoles(/* @__PURE__ */ new Map());
4474
- return;
4475
- }
4476
- let cancelled = false;
4477
- organization.fetchMembers().then((members2) => {
4478
- if (cancelled) return;
4479
- const next = /* @__PURE__ */ new Map();
4480
- for (const m of members2) {
4481
- const email = m.user?.email?.trim().toLowerCase();
4482
- if (email) next.set(email, m.role);
4483
- }
4484
- setOrgMemberRoles(next);
4485
- }).catch(() => {
4486
- if (!cancelled) setOrgMemberRoles(/* @__PURE__ */ new Map());
4487
- });
4488
- return () => {
4489
- cancelled = true;
4490
- };
4491
- }, [organizationId, organization]);
4492
- const orgMembershipFor = useCallback2(
4493
- (email) => {
4494
- const key = email?.trim().toLowerCase();
4495
- if (!key || orgMemberRoles.size === 0) return void 0;
4496
- const role = orgMemberRoles.get(key);
4497
- return role ? { isOrgAdmin: role === "admin" } : void 0;
4498
- },
4499
- [orgMemberRoles]
4500
- );
4501
4444
  const fetchData = useCallback2(async () => {
4502
4445
  setLoadingData(true);
4503
4446
  try {
@@ -4828,8 +4771,6 @@ function TeamsContent({
4828
4771
  {
4829
4772
  member,
4830
4773
  variant: activeTab,
4831
- orgMembership: orgMembershipFor(member.userEmail),
4832
- organizationName,
4833
4774
  onClick: activeTab === "active" ? () => openUpdateModal(member) : void 0,
4834
4775
  onCancelInvite: () => void handleCancelPendingInvite(member),
4835
4776
  onResendInvite: () => void handleResendPendingInvite(member)
@@ -4923,7 +4864,7 @@ function TeamsContent({
4923
4864
 
4924
4865
  // src/organization-content.tsx
4925
4866
  import { useCallback as useCallback3, useEffect as useEffect9, useState as useState9 } from "react";
4926
- import { ScRole as ScRole2, ScButton as ScButton5 } from "@streamoid/ui";
4867
+ import { ScButton as ScButton5 } from "@streamoid/ui";
4927
4868
  import { SiconUserAdd as SiconUserAdd2, SiconGlobe as SiconGlobe2 } from "@streamoid/icons";
4928
4869
 
4929
4870
  // src/organization-invite-modal.tsx
@@ -5969,11 +5910,10 @@ function MemberRow({
5969
5910
  }
5970
5911
  ),
5971
5912
  /* @__PURE__ */ jsx15(
5972
- ScRole2,
5913
+ RoleChip,
5973
5914
  {
5974
- type: member.role,
5975
- label: member.role === "admin" ? "Admin" : "Member",
5976
- className: "shrink-0"
5915
+ role: member.role === "admin" ? "admin" : "member",
5916
+ label: member.role === "admin" ? "Org admin" : "Member"
5977
5917
  }
5978
5918
  ),
5979
5919
  /* @__PURE__ */ jsx15(
@@ -6078,11 +6018,10 @@ function InviteRow({
6078
6018
  ] })
6079
6019
  ] }),
6080
6020
  /* @__PURE__ */ jsx15(
6081
- ScRole2,
6021
+ RoleChip,
6082
6022
  {
6083
- type: role === "admin" ? "admin" : "member",
6084
- label: role === "admin" ? "Admin" : "Member",
6085
- className: "shrink-0"
6023
+ role: role === "admin" ? "admin" : "member",
6024
+ label: role === "admin" ? "Org admin" : "Member"
6086
6025
  }
6087
6026
  ),
6088
6027
  /* @__PURE__ */ jsx15(
@@ -12146,7 +12085,6 @@ export {
12146
12085
  InviteUpdateModal,
12147
12086
  MemberListFrame,
12148
12087
  MemberListToolbar,
12149
- OrgMembershipTag,
12150
12088
  OrganizationContent,
12151
12089
  OrganizationInviteModal,
12152
12090
  OrganizationModal,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/settings",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",