@streamoid/settings 0.22.4 → 0.23.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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +129 -4
- package/dist/index.mjs +134 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -315,10 +315,18 @@ interface SettingsOrganizationListItem {
|
|
|
315
315
|
/** Its email domain; absent for an organization with none. */
|
|
316
316
|
domain?: string | null;
|
|
317
317
|
type?: SettingsOrganizationType;
|
|
318
|
+
/** Absent: "open". */
|
|
319
|
+
workspaceJoin?: SettingsOrganizationWorkspaceJoin;
|
|
318
320
|
}
|
|
319
321
|
/** "shared": offered to new users from the company domain at signup.
|
|
320
322
|
* "private": invite-only. */
|
|
321
323
|
type SettingsOrganizationType = "shared" | "private";
|
|
324
|
+
/** Who may join the organization's shared workspaces. "open": any org member,
|
|
325
|
+
* from the workspace list or picker. "invite": only people invited to that
|
|
326
|
+
* workspace — org admins still see and may join every workspace, and nobody
|
|
327
|
+
* already in one loses it. Absent on `SettingsOrganizationCurrent`: the host
|
|
328
|
+
* doesn't support it — no switch, members join as under "open". */
|
|
329
|
+
type SettingsOrganizationWorkspaceJoin = "open" | "invite";
|
|
322
330
|
/** Whether the viewer may create an organization, and on which domains
|
|
323
331
|
* (GET /organization/create-options). */
|
|
324
332
|
interface SettingsOrganizationCreateOptions {
|
|
@@ -336,6 +344,11 @@ interface SettingsOrganizationCurrent {
|
|
|
336
344
|
name?: string;
|
|
337
345
|
/** Absent on organizations created before types existed: treat as shared. */
|
|
338
346
|
type?: SettingsOrganizationType;
|
|
347
|
+
/** Set it (to "open" when the organization has none stored) only if the
|
|
348
|
+
* host loads it and forwards it in `update`: absent means the host doesn't
|
|
349
|
+
* support the setting, so Organization › Workspaces shows no switch and
|
|
350
|
+
* filters nothing — members may join any shared workspace. */
|
|
351
|
+
workspaceJoin?: SettingsOrganizationWorkspaceJoin;
|
|
339
352
|
/** The company the organization belongs to ("abfrl.com" for an org on
|
|
340
353
|
* ownd.abfrl.com). Members from the same company join as members; anyone
|
|
341
354
|
* else is a guest. Absent for organizations with no domain. */
|
|
@@ -492,6 +505,9 @@ interface SettingsOrganizationAdapter {
|
|
|
492
505
|
/** Only an admin whose own email is on the org's company may change it,
|
|
493
506
|
* and only to a domain of the same company. */
|
|
494
507
|
domain?: string;
|
|
508
|
+
/** Only org admins may change it. Hosts should refresh `current` after
|
|
509
|
+
* saving so the Join buttons follow. */
|
|
510
|
+
workspaceJoin?: SettingsOrganizationWorkspaceJoin;
|
|
495
511
|
}) => Promise<void>;
|
|
496
512
|
switch: (id: string) => Promise<void>;
|
|
497
513
|
delete: (id: string) => Promise<void>;
|
|
@@ -3165,4 +3181,4 @@ interface AppSettingsRowProps {
|
|
|
3165
3181
|
}
|
|
3166
3182
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
3167
3183
|
|
|
3168
|
-
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditPoolSelfShare, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, INVOICE_DOWNLOAD_FAILED_MESSAGE, INVOICE_NOT_AVAILABLE_MESSAGE, InviteUpdateModal, type InvoiceDownloadKind, type InvoicePdfResponse, type LoginMethodsMember, type LoginMethodsSettings, type LoginMethodsSwitchState, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, OrganizationLoginMethodsContent, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, RemoveSelfShareModal, type RemoveSelfShareModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SetCreditPoolSelfShareInput, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsLoginMethodsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type SponsorShareBalance, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, UsageLogsTable, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_CREDIT_LIMIT_REACHED, WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceCreditLimit, WorkspaceCreditLimitCard, type WorkspaceCreditLimitSummary, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, aboveTotalReason, belowUsageReason, canManageOnlyWorkspaceCreditLimit, canShowSharedCredits, checkPoolPercentTotal, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, describeWorkspaceCreditLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, invoiceDownloadKind, isLimitAboveTotal, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, isWorkspaceCreditLimitReached, joinMembersWithLimits, lastUsedLabel, limitAboveTotalTotal, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, maximumCreditLimit, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolAllocatedPercent, poolAllocationText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolSharesCredits, poolUnallocatedPercent, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsorShareBannerText, sponsorShareDetailText, sponsorShareSpentText, sponsoredCreditsText, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsShowWorkspace, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
|
3184
|
+
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditPoolSelfShare, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, INVOICE_DOWNLOAD_FAILED_MESSAGE, INVOICE_NOT_AVAILABLE_MESSAGE, InviteUpdateModal, type InvoiceDownloadKind, type InvoicePdfResponse, type LoginMethodsMember, type LoginMethodsSettings, type LoginMethodsSwitchState, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, OrganizationLoginMethodsContent, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, RemoveSelfShareModal, type RemoveSelfShareModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SetCreditPoolSelfShareInput, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsLoginMethodsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsOrganizationWorkspaceJoin, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type SponsorShareBalance, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, UsageLogsTable, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_CREDIT_LIMIT_REACHED, WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceCreditLimit, WorkspaceCreditLimitCard, type WorkspaceCreditLimitSummary, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, aboveTotalReason, belowUsageReason, canManageOnlyWorkspaceCreditLimit, canShowSharedCredits, checkPoolPercentTotal, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, describeWorkspaceCreditLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, invoiceDownloadKind, isLimitAboveTotal, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, isWorkspaceCreditLimitReached, joinMembersWithLimits, lastUsedLabel, limitAboveTotalTotal, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, maximumCreditLimit, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolAllocatedPercent, poolAllocationText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolSharesCredits, poolUnallocatedPercent, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsorShareBannerText, sponsorShareDetailText, sponsorShareSpentText, sponsoredCreditsText, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsShowWorkspace, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -315,10 +315,18 @@ interface SettingsOrganizationListItem {
|
|
|
315
315
|
/** Its email domain; absent for an organization with none. */
|
|
316
316
|
domain?: string | null;
|
|
317
317
|
type?: SettingsOrganizationType;
|
|
318
|
+
/** Absent: "open". */
|
|
319
|
+
workspaceJoin?: SettingsOrganizationWorkspaceJoin;
|
|
318
320
|
}
|
|
319
321
|
/** "shared": offered to new users from the company domain at signup.
|
|
320
322
|
* "private": invite-only. */
|
|
321
323
|
type SettingsOrganizationType = "shared" | "private";
|
|
324
|
+
/** Who may join the organization's shared workspaces. "open": any org member,
|
|
325
|
+
* from the workspace list or picker. "invite": only people invited to that
|
|
326
|
+
* workspace — org admins still see and may join every workspace, and nobody
|
|
327
|
+
* already in one loses it. Absent on `SettingsOrganizationCurrent`: the host
|
|
328
|
+
* doesn't support it — no switch, members join as under "open". */
|
|
329
|
+
type SettingsOrganizationWorkspaceJoin = "open" | "invite";
|
|
322
330
|
/** Whether the viewer may create an organization, and on which domains
|
|
323
331
|
* (GET /organization/create-options). */
|
|
324
332
|
interface SettingsOrganizationCreateOptions {
|
|
@@ -336,6 +344,11 @@ interface SettingsOrganizationCurrent {
|
|
|
336
344
|
name?: string;
|
|
337
345
|
/** Absent on organizations created before types existed: treat as shared. */
|
|
338
346
|
type?: SettingsOrganizationType;
|
|
347
|
+
/** Set it (to "open" when the organization has none stored) only if the
|
|
348
|
+
* host loads it and forwards it in `update`: absent means the host doesn't
|
|
349
|
+
* support the setting, so Organization › Workspaces shows no switch and
|
|
350
|
+
* filters nothing — members may join any shared workspace. */
|
|
351
|
+
workspaceJoin?: SettingsOrganizationWorkspaceJoin;
|
|
339
352
|
/** The company the organization belongs to ("abfrl.com" for an org on
|
|
340
353
|
* ownd.abfrl.com). Members from the same company join as members; anyone
|
|
341
354
|
* else is a guest. Absent for organizations with no domain. */
|
|
@@ -492,6 +505,9 @@ interface SettingsOrganizationAdapter {
|
|
|
492
505
|
/** Only an admin whose own email is on the org's company may change it,
|
|
493
506
|
* and only to a domain of the same company. */
|
|
494
507
|
domain?: string;
|
|
508
|
+
/** Only org admins may change it. Hosts should refresh `current` after
|
|
509
|
+
* saving so the Join buttons follow. */
|
|
510
|
+
workspaceJoin?: SettingsOrganizationWorkspaceJoin;
|
|
495
511
|
}) => Promise<void>;
|
|
496
512
|
switch: (id: string) => Promise<void>;
|
|
497
513
|
delete: (id: string) => Promise<void>;
|
|
@@ -3165,4 +3181,4 @@ interface AppSettingsRowProps {
|
|
|
3165
3181
|
}
|
|
3166
3182
|
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
3167
3183
|
|
|
3168
|
-
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditPoolSelfShare, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, INVOICE_DOWNLOAD_FAILED_MESSAGE, INVOICE_NOT_AVAILABLE_MESSAGE, InviteUpdateModal, type InvoiceDownloadKind, type InvoicePdfResponse, type LoginMethodsMember, type LoginMethodsSettings, type LoginMethodsSwitchState, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, OrganizationLoginMethodsContent, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, RemoveSelfShareModal, type RemoveSelfShareModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SetCreditPoolSelfShareInput, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsLoginMethodsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type SponsorShareBalance, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, UsageLogsTable, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_CREDIT_LIMIT_REACHED, WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceCreditLimit, WorkspaceCreditLimitCard, type WorkspaceCreditLimitSummary, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, aboveTotalReason, belowUsageReason, canManageOnlyWorkspaceCreditLimit, canShowSharedCredits, checkPoolPercentTotal, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, describeWorkspaceCreditLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, invoiceDownloadKind, isLimitAboveTotal, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, isWorkspaceCreditLimitReached, joinMembersWithLimits, lastUsedLabel, limitAboveTotalTotal, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, maximumCreditLimit, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolAllocatedPercent, poolAllocationText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolSharesCredits, poolUnallocatedPercent, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsorShareBannerText, sponsorShareDetailText, sponsorShareSpentText, sponsoredCreditsText, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsShowWorkspace, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
|
3184
|
+
export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BILLING_TABLE_FRAME_STYLE, BILLING_TABLE_MIN_HEIGHT, BILLING_TABLE_PAGER_STYLE, BillingContent, type BillingEntitlement, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditPoolSelfShare, type CreditsMeter, type CurrentPlanState, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, EMPTY_USAGE_LOGS_PAGE, ExportDateModal, type FetchUsageLogs, type FetchUsageLogsInRangeOptions, INITIAL_USAGE_LOGS_STATE, INVOICE_DOWNLOAD_FAILED_MESSAGE, INVOICE_NOT_AVAILABLE_MESSAGE, InviteUpdateModal, type InvoiceDownloadKind, type InvoicePdfResponse, type LoginMethodsMember, type LoginMethodsSettings, type LoginMethodsSwitchState, MOCK_REFERRED_USERS, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, OrganizationLoginMethodsContent, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_EXPIRY_MAX_MONTHS, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolEndsAtResult, type PoolErrorCode, type PoolExpiryChoice, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralHistoryView, type ReferralHistoryViewProps, ReferralTab, type ReferredUser, RemovePoolMemberModal, type RemovePoolMemberModalProps, RemoveSelfShareModal, type RemoveSelfShareModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SetCreditPoolSelfShareInput, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsLoginMethodsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsOrganizationWorkspaceJoin, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type SponsorShareBalance, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USAGE_LOGS_EXPORT_BATCH_SIZE, USAGE_LOGS_EXPORT_EXTRA_REQUESTS, USAGE_LOGS_EXPORT_MAX_ROWS, USAGE_LOGS_PAGE_SIZE, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryPagination, type UsageHistoryResponse, type UsageLogsAction, type UsageLogsExportResult, type UsageLogsPage, UsageLogsPager, type UsageLogsQuery, type UsageLogsState, UsageLogsTable, type UsedByNamesLoader, type UserLanguage, type UserPermissions, WORKSPACE_CREDIT_LIMIT_REACHED, WORKSPACE_CREDIT_LIMIT_REACHED_MESSAGE, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceCreditLimit, WorkspaceCreditLimitCard, type WorkspaceCreditLimitSummary, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, aboveTotalReason, belowUsageReason, canManageOnlyWorkspaceCreditLimit, canShowSharedCredits, checkPoolPercentTotal, cleanCreditLimitInput, cleanPoolValueInput, countLabel, createUsedByNamesLoader, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, describeWorkspaceCreditLimit, entitlementFromBody, entitlementFromFailure, expiryChoiceFor, fetchUsageLogsInRange, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolEndsAt, formatPoolSplit, groupWorkspaceList, hasPaidFeatures, inviteUpdate, invoiceDownloadKind, isLimitAboveTotal, isLimitBelowUsage, isPaidPlan, isSponsoredEntitlement, isWorkspaceCreditLimitReached, joinMembersWithLimits, lastUsedLabel, limitAboveTotalTotal, limitBelowUsageUsed, limitSourceLabel, loadCurrentPlan, loadWorkspaceOrganization, loginMethodsSwitchState, maximumCreditLimit, memberRoleUpdate, minPoolEndDate, minimumCreditLimit, ownCreditsFirstText, parseBillingEntitlement, parseInviteEmails, pausedOwnCreditsText, poolAllocatedPercent, poolAllocationText, poolEndsAtFrom, poolErrorMessage, poolRenewsAtCycleEnd, poolSharesCredits, poolUnallocatedPercent, poolWorkspaceName, productsForCountry, readSettingsCaller, referralCodeOf, referralCountLabel, referralLink, referralSignupDate, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, sharedPoolEndsText, sliceUsageLogsPage, sortReferredUsers, sponsorShareBannerText, sponsorShareDetailText, sponsorShareSpentText, sponsoredCreditsText, ssoLabel, toCsv, toLocalDateInput, usageLogsCsvRows, usageLogsDateRange, usageLogsExportFileName, usageLogsPage, usageLogsReducer, usageLogsReloadPage, usageLogsShowWorkspace, usageLogsSpentByOthers, useBillingEntitlement, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
|
package/dist/index.js
CHANGED
|
@@ -7216,6 +7216,100 @@ function WorkspaceRow({
|
|
|
7216
7216
|
}
|
|
7217
7217
|
);
|
|
7218
7218
|
}
|
|
7219
|
+
var WORKSPACE_JOIN_TITLE = "Members can join shared workspaces without an invite";
|
|
7220
|
+
function WorkspaceJoinSetting({
|
|
7221
|
+
value,
|
|
7222
|
+
saving,
|
|
7223
|
+
onChange
|
|
7224
|
+
}) {
|
|
7225
|
+
const checked = value !== "invite";
|
|
7226
|
+
const toggle = (next) => {
|
|
7227
|
+
if (!saving) onChange(next ? "open" : "invite");
|
|
7228
|
+
};
|
|
7229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
7230
|
+
"section",
|
|
7231
|
+
{
|
|
7232
|
+
"aria-label": "Workspace access",
|
|
7233
|
+
className: "flex items-start shrink-0 w-full",
|
|
7234
|
+
style: {
|
|
7235
|
+
gap: T11.spXl,
|
|
7236
|
+
padding: T11.sp3xl,
|
|
7237
|
+
backgroundColor: "var(--alias-surface-base)",
|
|
7238
|
+
border: `1px solid ${T11.borderSubtle}`,
|
|
7239
|
+
borderRadius: T11.r3xl
|
|
7240
|
+
},
|
|
7241
|
+
children: [
|
|
7242
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T11.spXs }, children: [
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7244
|
+
"span",
|
|
7245
|
+
{
|
|
7246
|
+
style: {
|
|
7247
|
+
fontFamily: T11.font,
|
|
7248
|
+
fontSize: T11.fsMd,
|
|
7249
|
+
fontWeight: 600,
|
|
7250
|
+
lineHeight: T11.lhSm,
|
|
7251
|
+
color: T11.primary
|
|
7252
|
+
},
|
|
7253
|
+
children: WORKSPACE_JOIN_TITLE
|
|
7254
|
+
}
|
|
7255
|
+
),
|
|
7256
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7257
|
+
"span",
|
|
7258
|
+
{
|
|
7259
|
+
style: {
|
|
7260
|
+
fontFamily: T11.font,
|
|
7261
|
+
fontSize: T11.fsSm,
|
|
7262
|
+
lineHeight: T11.lhSm,
|
|
7263
|
+
color: T11.muted
|
|
7264
|
+
},
|
|
7265
|
+
children: "When off, people see only the workspaces they're invited to. Admins still see all workspaces, and nobody loses access they already have."
|
|
7266
|
+
}
|
|
7267
|
+
)
|
|
7268
|
+
] }),
|
|
7269
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
7270
|
+
"div",
|
|
7271
|
+
{
|
|
7272
|
+
className: "flex items-center shrink-0",
|
|
7273
|
+
style: { alignSelf: "center", gap: T11.spMd, minHeight: 26 },
|
|
7274
|
+
children: [
|
|
7275
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7276
|
+
"span",
|
|
7277
|
+
{
|
|
7278
|
+
style: {
|
|
7279
|
+
fontFamily: T11.font,
|
|
7280
|
+
fontSize: T11.fsSm,
|
|
7281
|
+
lineHeight: T11.lhSm,
|
|
7282
|
+
color: T11.muted
|
|
7283
|
+
},
|
|
7284
|
+
children: checked ? "On" : "Off"
|
|
7285
|
+
}
|
|
7286
|
+
),
|
|
7287
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7288
|
+
import_ui9.ScToggleSwitch,
|
|
7289
|
+
{
|
|
7290
|
+
checked,
|
|
7291
|
+
disabled: saving,
|
|
7292
|
+
onToggle: toggle,
|
|
7293
|
+
role: "switch",
|
|
7294
|
+
"aria-checked": checked,
|
|
7295
|
+
"aria-disabled": saving,
|
|
7296
|
+
"aria-label": WORKSPACE_JOIN_TITLE,
|
|
7297
|
+
tabIndex: 0,
|
|
7298
|
+
onKeyDown: (event) => {
|
|
7299
|
+
if (event.key === " " || event.key === "Enter") {
|
|
7300
|
+
event.preventDefault();
|
|
7301
|
+
toggle(!checked);
|
|
7302
|
+
}
|
|
7303
|
+
}
|
|
7304
|
+
}
|
|
7305
|
+
) })
|
|
7306
|
+
]
|
|
7307
|
+
}
|
|
7308
|
+
)
|
|
7309
|
+
]
|
|
7310
|
+
}
|
|
7311
|
+
);
|
|
7312
|
+
}
|
|
7219
7313
|
function JoinRequestRow({
|
|
7220
7314
|
request,
|
|
7221
7315
|
onApprove,
|
|
@@ -7341,6 +7435,12 @@ function OrganizationContent({
|
|
|
7341
7435
|
const [workspaces, setWorkspaces] = (0, import_react13.useState)([]);
|
|
7342
7436
|
const joinRole = current?.role === "admin" || current?.role === "member" ? current.role : null;
|
|
7343
7437
|
const canJoin = !!joinRole && !!organization.joinWorkspaces;
|
|
7438
|
+
const [workspaceJoin, setWorkspaceJoin] = (0, import_react13.useState)(current?.workspaceJoin);
|
|
7439
|
+
const [savingWorkspaceJoin, setSavingWorkspaceJoin] = (0, import_react13.useState)(false);
|
|
7440
|
+
(0, import_react13.useEffect)(() => {
|
|
7441
|
+
setWorkspaceJoin(current?.workspaceJoin);
|
|
7442
|
+
}, [current?.id, current?.workspaceJoin]);
|
|
7443
|
+
const visibleWorkspaces = workspaceJoin === "invite" && current?.role !== "admin" ? workspaces.filter((ws) => ws.joined !== false) : workspaces;
|
|
7344
7444
|
const [joiningId, setJoiningId] = (0, import_react13.useState)(null);
|
|
7345
7445
|
const [joinRequests, setJoinRequests] = (0, import_react13.useState)([]);
|
|
7346
7446
|
const [highestRole, setHighestRole] = (0, import_react13.useState)("guest");
|
|
@@ -7387,6 +7487,23 @@ function OrganizationContent({
|
|
|
7387
7487
|
setJoiningId(null);
|
|
7388
7488
|
}
|
|
7389
7489
|
};
|
|
7490
|
+
const handleWorkspaceJoinChange = async (next) => {
|
|
7491
|
+
if (!current || workspaceJoin === void 0 || next === workspaceJoin) return;
|
|
7492
|
+
const previous = workspaceJoin;
|
|
7493
|
+
setWorkspaceJoin(next);
|
|
7494
|
+
setSavingWorkspaceJoin(true);
|
|
7495
|
+
try {
|
|
7496
|
+
await organization.update(current.id, { workspaceJoin: next });
|
|
7497
|
+
toast.success(
|
|
7498
|
+
next === "open" ? "Members can now join shared workspaces" : "Members now need an invite to join a workspace"
|
|
7499
|
+
);
|
|
7500
|
+
} catch (err) {
|
|
7501
|
+
setWorkspaceJoin(previous);
|
|
7502
|
+
toast.error(errorMessage(err, { method: "PUT" }));
|
|
7503
|
+
} finally {
|
|
7504
|
+
setSavingWorkspaceJoin(false);
|
|
7505
|
+
}
|
|
7506
|
+
};
|
|
7390
7507
|
const [manageModalOpen, setManageModalOpen] = (0, import_react13.useState)(false);
|
|
7391
7508
|
const handleUpdateOrganization = async (name, imageFile, _imageRemoved, details) => {
|
|
7392
7509
|
if (!current) return false;
|
|
@@ -7530,7 +7647,7 @@ function OrganizationContent({
|
|
|
7530
7647
|
role: current.role,
|
|
7531
7648
|
facts: [
|
|
7532
7649
|
!loadingData && countLabel(members.length, "person", "people"),
|
|
7533
|
-
!loadingData && countLabel(
|
|
7650
|
+
!loadingData && countLabel(visibleWorkspaces.length, "workspace"),
|
|
7534
7651
|
!loadingData && joinRequests.length > 0 && countLabel(joinRequests.length, "join request")
|
|
7535
7652
|
],
|
|
7536
7653
|
action: current.role === "admin" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -7612,17 +7729,25 @@ function OrganizationContent({
|
|
|
7612
7729
|
)
|
|
7613
7730
|
] });
|
|
7614
7731
|
const workspacesView = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
7732
|
+
current.role === "admin" && workspaceJoin !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7733
|
+
WorkspaceJoinSetting,
|
|
7734
|
+
{
|
|
7735
|
+
value: workspaceJoin,
|
|
7736
|
+
saving: savingWorkspaceJoin,
|
|
7737
|
+
onChange: (next) => void handleWorkspaceJoinChange(next)
|
|
7738
|
+
}
|
|
7739
|
+
),
|
|
7615
7740
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7616
7741
|
Section,
|
|
7617
7742
|
{
|
|
7618
7743
|
title: "Workspaces in this organization",
|
|
7619
|
-
empty:
|
|
7620
|
-
children:
|
|
7744
|
+
empty: visibleWorkspaces.length === 0,
|
|
7745
|
+
children: visibleWorkspaces.map((ws) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7621
7746
|
WorkspaceRow,
|
|
7622
7747
|
{
|
|
7623
7748
|
workspace: ws,
|
|
7624
7749
|
joining: joiningId === ws._id,
|
|
7625
|
-
onJoin: canJoin && ws.joined === false && ws.status !== "inactive" && (joinRole === "admin" || ws.orgVisibility === "shared") ? () => void handleJoinWorkspace(ws) : void 0
|
|
7750
|
+
onJoin: canJoin && ws.joined === false && ws.status !== "inactive" && (joinRole === "admin" || ws.orgVisibility === "shared" && workspaceJoin !== "invite") ? () => void handleJoinWorkspace(ws) : void 0
|
|
7626
7751
|
},
|
|
7627
7752
|
ws._id
|
|
7628
7753
|
))
|
package/dist/index.mjs
CHANGED
|
@@ -5827,7 +5827,7 @@ function TeamsContent({
|
|
|
5827
5827
|
|
|
5828
5828
|
// src/organization-content.tsx
|
|
5829
5829
|
import { useCallback as useCallback3, useEffect as useEffect11, useState as useState11 } from "react";
|
|
5830
|
-
import { ScButton as ScButton6 } from "@streamoid/ui";
|
|
5830
|
+
import { ScButton as ScButton6, ScToggleSwitch } from "@streamoid/ui";
|
|
5831
5831
|
import { SiconCheck, SiconCopy, SiconGlobe as SiconGlobe2, SiconSettings } from "@streamoid/icons";
|
|
5832
5832
|
|
|
5833
5833
|
// src/organization-member-modal.tsx
|
|
@@ -7068,6 +7068,100 @@ function WorkspaceRow({
|
|
|
7068
7068
|
}
|
|
7069
7069
|
);
|
|
7070
7070
|
}
|
|
7071
|
+
var WORKSPACE_JOIN_TITLE = "Members can join shared workspaces without an invite";
|
|
7072
|
+
function WorkspaceJoinSetting({
|
|
7073
|
+
value,
|
|
7074
|
+
saving,
|
|
7075
|
+
onChange
|
|
7076
|
+
}) {
|
|
7077
|
+
const checked = value !== "invite";
|
|
7078
|
+
const toggle = (next) => {
|
|
7079
|
+
if (!saving) onChange(next ? "open" : "invite");
|
|
7080
|
+
};
|
|
7081
|
+
return /* @__PURE__ */ jsxs16(
|
|
7082
|
+
"section",
|
|
7083
|
+
{
|
|
7084
|
+
"aria-label": "Workspace access",
|
|
7085
|
+
className: "flex items-start shrink-0 w-full",
|
|
7086
|
+
style: {
|
|
7087
|
+
gap: T11.spXl,
|
|
7088
|
+
padding: T11.sp3xl,
|
|
7089
|
+
backgroundColor: "var(--alias-surface-base)",
|
|
7090
|
+
border: `1px solid ${T11.borderSubtle}`,
|
|
7091
|
+
borderRadius: T11.r3xl
|
|
7092
|
+
},
|
|
7093
|
+
children: [
|
|
7094
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex flex-col flex-1 min-w-0", style: { gap: T11.spXs }, children: [
|
|
7095
|
+
/* @__PURE__ */ jsx19(
|
|
7096
|
+
"span",
|
|
7097
|
+
{
|
|
7098
|
+
style: {
|
|
7099
|
+
fontFamily: T11.font,
|
|
7100
|
+
fontSize: T11.fsMd,
|
|
7101
|
+
fontWeight: 600,
|
|
7102
|
+
lineHeight: T11.lhSm,
|
|
7103
|
+
color: T11.primary
|
|
7104
|
+
},
|
|
7105
|
+
children: WORKSPACE_JOIN_TITLE
|
|
7106
|
+
}
|
|
7107
|
+
),
|
|
7108
|
+
/* @__PURE__ */ jsx19(
|
|
7109
|
+
"span",
|
|
7110
|
+
{
|
|
7111
|
+
style: {
|
|
7112
|
+
fontFamily: T11.font,
|
|
7113
|
+
fontSize: T11.fsSm,
|
|
7114
|
+
lineHeight: T11.lhSm,
|
|
7115
|
+
color: T11.muted
|
|
7116
|
+
},
|
|
7117
|
+
children: "When off, people see only the workspaces they're invited to. Admins still see all workspaces, and nobody loses access they already have."
|
|
7118
|
+
}
|
|
7119
|
+
)
|
|
7120
|
+
] }),
|
|
7121
|
+
/* @__PURE__ */ jsxs16(
|
|
7122
|
+
"div",
|
|
7123
|
+
{
|
|
7124
|
+
className: "flex items-center shrink-0",
|
|
7125
|
+
style: { alignSelf: "center", gap: T11.spMd, minHeight: 26 },
|
|
7126
|
+
children: [
|
|
7127
|
+
/* @__PURE__ */ jsx19(
|
|
7128
|
+
"span",
|
|
7129
|
+
{
|
|
7130
|
+
style: {
|
|
7131
|
+
fontFamily: T11.font,
|
|
7132
|
+
fontSize: T11.fsSm,
|
|
7133
|
+
lineHeight: T11.lhSm,
|
|
7134
|
+
color: T11.muted
|
|
7135
|
+
},
|
|
7136
|
+
children: checked ? "On" : "Off"
|
|
7137
|
+
}
|
|
7138
|
+
),
|
|
7139
|
+
/* @__PURE__ */ jsx19("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx19(
|
|
7140
|
+
ScToggleSwitch,
|
|
7141
|
+
{
|
|
7142
|
+
checked,
|
|
7143
|
+
disabled: saving,
|
|
7144
|
+
onToggle: toggle,
|
|
7145
|
+
role: "switch",
|
|
7146
|
+
"aria-checked": checked,
|
|
7147
|
+
"aria-disabled": saving,
|
|
7148
|
+
"aria-label": WORKSPACE_JOIN_TITLE,
|
|
7149
|
+
tabIndex: 0,
|
|
7150
|
+
onKeyDown: (event) => {
|
|
7151
|
+
if (event.key === " " || event.key === "Enter") {
|
|
7152
|
+
event.preventDefault();
|
|
7153
|
+
toggle(!checked);
|
|
7154
|
+
}
|
|
7155
|
+
}
|
|
7156
|
+
}
|
|
7157
|
+
) })
|
|
7158
|
+
]
|
|
7159
|
+
}
|
|
7160
|
+
)
|
|
7161
|
+
]
|
|
7162
|
+
}
|
|
7163
|
+
);
|
|
7164
|
+
}
|
|
7071
7165
|
function JoinRequestRow({
|
|
7072
7166
|
request,
|
|
7073
7167
|
onApprove,
|
|
@@ -7193,6 +7287,12 @@ function OrganizationContent({
|
|
|
7193
7287
|
const [workspaces, setWorkspaces] = useState11([]);
|
|
7194
7288
|
const joinRole = current?.role === "admin" || current?.role === "member" ? current.role : null;
|
|
7195
7289
|
const canJoin = !!joinRole && !!organization.joinWorkspaces;
|
|
7290
|
+
const [workspaceJoin, setWorkspaceJoin] = useState11(current?.workspaceJoin);
|
|
7291
|
+
const [savingWorkspaceJoin, setSavingWorkspaceJoin] = useState11(false);
|
|
7292
|
+
useEffect11(() => {
|
|
7293
|
+
setWorkspaceJoin(current?.workspaceJoin);
|
|
7294
|
+
}, [current?.id, current?.workspaceJoin]);
|
|
7295
|
+
const visibleWorkspaces = workspaceJoin === "invite" && current?.role !== "admin" ? workspaces.filter((ws) => ws.joined !== false) : workspaces;
|
|
7196
7296
|
const [joiningId, setJoiningId] = useState11(null);
|
|
7197
7297
|
const [joinRequests, setJoinRequests] = useState11([]);
|
|
7198
7298
|
const [highestRole, setHighestRole] = useState11("guest");
|
|
@@ -7239,6 +7339,23 @@ function OrganizationContent({
|
|
|
7239
7339
|
setJoiningId(null);
|
|
7240
7340
|
}
|
|
7241
7341
|
};
|
|
7342
|
+
const handleWorkspaceJoinChange = async (next) => {
|
|
7343
|
+
if (!current || workspaceJoin === void 0 || next === workspaceJoin) return;
|
|
7344
|
+
const previous = workspaceJoin;
|
|
7345
|
+
setWorkspaceJoin(next);
|
|
7346
|
+
setSavingWorkspaceJoin(true);
|
|
7347
|
+
try {
|
|
7348
|
+
await organization.update(current.id, { workspaceJoin: next });
|
|
7349
|
+
toast.success(
|
|
7350
|
+
next === "open" ? "Members can now join shared workspaces" : "Members now need an invite to join a workspace"
|
|
7351
|
+
);
|
|
7352
|
+
} catch (err) {
|
|
7353
|
+
setWorkspaceJoin(previous);
|
|
7354
|
+
toast.error(errorMessage(err, { method: "PUT" }));
|
|
7355
|
+
} finally {
|
|
7356
|
+
setSavingWorkspaceJoin(false);
|
|
7357
|
+
}
|
|
7358
|
+
};
|
|
7242
7359
|
const [manageModalOpen, setManageModalOpen] = useState11(false);
|
|
7243
7360
|
const handleUpdateOrganization = async (name, imageFile, _imageRemoved, details) => {
|
|
7244
7361
|
if (!current) return false;
|
|
@@ -7382,7 +7499,7 @@ function OrganizationContent({
|
|
|
7382
7499
|
role: current.role,
|
|
7383
7500
|
facts: [
|
|
7384
7501
|
!loadingData && countLabel(members.length, "person", "people"),
|
|
7385
|
-
!loadingData && countLabel(
|
|
7502
|
+
!loadingData && countLabel(visibleWorkspaces.length, "workspace"),
|
|
7386
7503
|
!loadingData && joinRequests.length > 0 && countLabel(joinRequests.length, "join request")
|
|
7387
7504
|
],
|
|
7388
7505
|
action: current.role === "admin" ? /* @__PURE__ */ jsx19(
|
|
@@ -7464,17 +7581,25 @@ function OrganizationContent({
|
|
|
7464
7581
|
)
|
|
7465
7582
|
] });
|
|
7466
7583
|
const workspacesView = /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
7584
|
+
current.role === "admin" && workspaceJoin !== void 0 && /* @__PURE__ */ jsx19(
|
|
7585
|
+
WorkspaceJoinSetting,
|
|
7586
|
+
{
|
|
7587
|
+
value: workspaceJoin,
|
|
7588
|
+
saving: savingWorkspaceJoin,
|
|
7589
|
+
onChange: (next) => void handleWorkspaceJoinChange(next)
|
|
7590
|
+
}
|
|
7591
|
+
),
|
|
7467
7592
|
/* @__PURE__ */ jsx19(
|
|
7468
7593
|
Section,
|
|
7469
7594
|
{
|
|
7470
7595
|
title: "Workspaces in this organization",
|
|
7471
|
-
empty:
|
|
7472
|
-
children:
|
|
7596
|
+
empty: visibleWorkspaces.length === 0,
|
|
7597
|
+
children: visibleWorkspaces.map((ws) => /* @__PURE__ */ jsx19(
|
|
7473
7598
|
WorkspaceRow,
|
|
7474
7599
|
{
|
|
7475
7600
|
workspace: ws,
|
|
7476
7601
|
joining: joiningId === ws._id,
|
|
7477
|
-
onJoin: canJoin && ws.joined === false && ws.status !== "inactive" && (joinRole === "admin" || ws.orgVisibility === "shared") ? () => void handleJoinWorkspace(ws) : void 0
|
|
7602
|
+
onJoin: canJoin && ws.joined === false && ws.status !== "inactive" && (joinRole === "admin" || ws.orgVisibility === "shared" && workspaceJoin !== "invite") ? () => void handleJoinWorkspace(ws) : void 0
|
|
7478
7603
|
},
|
|
7479
7604
|
ws._id
|
|
7480
7605
|
))
|
|
@@ -15081,7 +15206,7 @@ function HistorySkeleton() {
|
|
|
15081
15206
|
|
|
15082
15207
|
// src/organization-integrations-content.tsx
|
|
15083
15208
|
import { useState as useState25 } from "react";
|
|
15084
|
-
import { ScButton as ScButton18, ScToggleSwitch } from "@streamoid/ui";
|
|
15209
|
+
import { ScButton as ScButton18, ScToggleSwitch as ScToggleSwitch2 } from "@streamoid/ui";
|
|
15085
15210
|
import { Fragment as Fragment15, jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
15086
15211
|
var COLUMN = { app: "6.5rem", workspace: "9rem", date: "6.5rem", action: "4.75rem" };
|
|
15087
15212
|
function HeaderRow() {
|
|
@@ -15210,7 +15335,7 @@ function AccessCard({
|
|
|
15210
15335
|
/* @__PURE__ */ jsxs31("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T16.spMd, minHeight: 26 }, children: [
|
|
15211
15336
|
/* @__PURE__ */ jsx34("span", { style: { fontFamily: T16.font, fontSize: T16.fsSm, lineHeight: T16.lhSm, color: T16.muted }, children: enabled === null ? "" : enabled ? "On" : "Off" }),
|
|
15212
15337
|
/* @__PURE__ */ jsx34("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx34(
|
|
15213
|
-
|
|
15338
|
+
ScToggleSwitch2,
|
|
15214
15339
|
{
|
|
15215
15340
|
checked: !!enabled,
|
|
15216
15341
|
disabled: enabled === null || loading,
|
|
@@ -15400,7 +15525,7 @@ function OrganizationIntegrationsContent() {
|
|
|
15400
15525
|
|
|
15401
15526
|
// src/organization-login-methods-content.tsx
|
|
15402
15527
|
import { useState as useState26 } from "react";
|
|
15403
|
-
import { ScButton as ScButton19, ScToggleSwitch as
|
|
15528
|
+
import { ScButton as ScButton19, ScToggleSwitch as ScToggleSwitch3 } from "@streamoid/ui";
|
|
15404
15529
|
import { Fragment as Fragment16, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
15405
15530
|
var AT_LEAST_ONE_HINT = "At least one login method must stay on, or nobody can sign in.";
|
|
15406
15531
|
var NO_SSO_HINT = "Company SSO isn't set up for your organization. Contact Streamoid to set it up.";
|
|
@@ -15447,7 +15572,7 @@ function SwitchRow({
|
|
|
15447
15572
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-center shrink-0", style: { alignSelf: "center", gap: T16.spMd, minHeight: 26 }, children: [
|
|
15448
15573
|
/* @__PURE__ */ jsx35("span", { style: { fontFamily: T16.font, fontSize: T16.fsSm, lineHeight: T16.lhSm, color: T16.muted }, children: state.checked ? "On" : "Off" }),
|
|
15449
15574
|
/* @__PURE__ */ jsx35("span", { style: { display: "inline-flex", width: 41, height: 25, alignItems: "center" }, children: /* @__PURE__ */ jsx35(
|
|
15450
|
-
|
|
15575
|
+
ScToggleSwitch3,
|
|
15451
15576
|
{
|
|
15452
15577
|
checked: state.checked,
|
|
15453
15578
|
disabled,
|