@sesionario/blocks 1.16.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +158 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -15
- package/dist/index.d.ts +22 -15
- package/dist/index.js +159 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -246,8 +246,11 @@ type LanguageSwitcherProps = {
|
|
|
246
246
|
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, variant, showIcon, align, side, }: LanguageSwitcherProps): React.JSX.Element;
|
|
247
247
|
|
|
248
248
|
type PlatformNavbarProps = {
|
|
249
|
-
/**
|
|
250
|
-
|
|
249
|
+
/**
|
|
250
|
+
* Brand mark (isotype). Typically a link to the member app home.
|
|
251
|
+
* Omit in shells that already brand the sidebar.
|
|
252
|
+
*/
|
|
253
|
+
logo?: ReactNode;
|
|
251
254
|
/** Optional control before the center (e.g. SidebarTrigger). */
|
|
252
255
|
leading?: ReactNode;
|
|
253
256
|
/** Flex-growing center slot (tabs, subtitle). Horizontally scrollable. */
|
|
@@ -259,7 +262,7 @@ type PlatformNavbarProps = {
|
|
|
259
262
|
innerClassName?: string;
|
|
260
263
|
};
|
|
261
264
|
/**
|
|
262
|
-
* Shared sticky top chrome: logo | optional leading | scrollable center | fixed right.
|
|
265
|
+
* Shared sticky top chrome: optional logo | optional leading | scrollable center | fixed right.
|
|
263
266
|
* Apps inject search, notifications, and the account menu into `right`.
|
|
264
267
|
*/
|
|
265
268
|
declare function PlatformNavbar({ logo, leading, center, right, className, innerClassName, }: PlatformNavbarProps): React.JSX.Element;
|
|
@@ -284,12 +287,15 @@ type PlatformAccountMenuOrg = {
|
|
|
284
287
|
id: string;
|
|
285
288
|
name: string;
|
|
286
289
|
slug: string;
|
|
290
|
+
logo?: string | null;
|
|
291
|
+
};
|
|
292
|
+
type MergedPlatformAccountOrg = PlatformAccountMenuOrg & {
|
|
293
|
+
canManage: boolean;
|
|
287
294
|
};
|
|
288
295
|
type PlatformAccountMenuUrls = {
|
|
289
296
|
authAppUrl: string;
|
|
290
297
|
appUrl: string;
|
|
291
298
|
adminUrl: string;
|
|
292
|
-
backofficeUrl: string;
|
|
293
299
|
loginPath?: string;
|
|
294
300
|
accountPath?: string;
|
|
295
301
|
activityPath?: string;
|
|
@@ -301,13 +307,9 @@ type PlatformAccountMenuLabels = {
|
|
|
301
307
|
personalProfile: string;
|
|
302
308
|
activity: string;
|
|
303
309
|
professionalProfile: string;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
orgManagement: string;
|
|
308
|
-
backoffice: string;
|
|
309
|
-
memberOrgs: string;
|
|
310
|
-
managementOrgs: string;
|
|
310
|
+
showMoreOrgs: string;
|
|
311
|
+
showLessOrgs: string;
|
|
312
|
+
manageOrg: string;
|
|
311
313
|
language: string;
|
|
312
314
|
theme: string;
|
|
313
315
|
themeLight: string;
|
|
@@ -318,13 +320,18 @@ type PlatformAccountMenuLabels = {
|
|
|
318
320
|
signingOut: string;
|
|
319
321
|
accountSettings: string;
|
|
320
322
|
};
|
|
323
|
+
/** Visible org rows before “Show more”. */
|
|
324
|
+
declare const PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = 4;
|
|
325
|
+
/**
|
|
326
|
+
* Union member + manageable orgs by id (member order first, then manageable-only).
|
|
327
|
+
* `canManage` is true when the org appears in `manageableOrgs`.
|
|
328
|
+
*/
|
|
329
|
+
declare function mergePlatformAccountOrgs(memberOrgs: PlatformAccountMenuOrg[], manageableOrgs: PlatformAccountMenuOrg[]): MergedPlatformAccountOrg[];
|
|
321
330
|
type PlatformAccountMenuProps = {
|
|
322
331
|
variant?: PlatformAccountMenuVariant;
|
|
323
332
|
/** While session is resolving. */
|
|
324
333
|
isPending?: boolean;
|
|
325
334
|
user?: PlatformAccountMenuUser | null;
|
|
326
|
-
/** Platform admin (JWT role includes admin). Enables Backoffice link. */
|
|
327
|
-
isAdmin?: boolean;
|
|
328
335
|
verificationStatus?: ProfessionalVerificationStatus;
|
|
329
336
|
urls: PlatformAccountMenuUrls;
|
|
330
337
|
memberOrgs?: PlatformAccountMenuOrg[];
|
|
@@ -352,7 +359,7 @@ type PlatformAccountMenuProps = {
|
|
|
352
359
|
* Cross-app account / settings menu. Guest trigger is a settings cog;
|
|
353
360
|
* signed-in trigger is the user avatar.
|
|
354
361
|
*/
|
|
355
|
-
declare function PlatformAccountMenu({ variant, isPending, user,
|
|
362
|
+
declare function PlatformAccountMenu({ variant, isPending, user, verificationStatus, urls, memberOrgs, manageableOrgs, languages, currentLanguage, onLanguageChange, labels: labelsProp, onSignOut, extraItems, trigger: triggerProp, contentSide, contentAlign, contentSideOffset, contentClassName, className, }: PlatformAccountMenuProps): React.JSX.Element;
|
|
356
363
|
|
|
357
364
|
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
358
365
|
inset?: boolean;
|
|
@@ -1254,4 +1261,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
|
|
|
1254
1261
|
|
|
1255
1262
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1256
1263
|
|
|
1257
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
1264
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, type MergedPlatformAccountOrg, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
package/dist/index.d.ts
CHANGED
|
@@ -246,8 +246,11 @@ type LanguageSwitcherProps = {
|
|
|
246
246
|
declare function LanguageSwitcher({ languages: propLanguages, currentLanguage: propCurrentLanguage, onLanguageChange: propOnLanguageChange, labels, className, size, shape, variant, showIcon, align, side, }: LanguageSwitcherProps): React.JSX.Element;
|
|
247
247
|
|
|
248
248
|
type PlatformNavbarProps = {
|
|
249
|
-
/**
|
|
250
|
-
|
|
249
|
+
/**
|
|
250
|
+
* Brand mark (isotype). Typically a link to the member app home.
|
|
251
|
+
* Omit in shells that already brand the sidebar.
|
|
252
|
+
*/
|
|
253
|
+
logo?: ReactNode;
|
|
251
254
|
/** Optional control before the center (e.g. SidebarTrigger). */
|
|
252
255
|
leading?: ReactNode;
|
|
253
256
|
/** Flex-growing center slot (tabs, subtitle). Horizontally scrollable. */
|
|
@@ -259,7 +262,7 @@ type PlatformNavbarProps = {
|
|
|
259
262
|
innerClassName?: string;
|
|
260
263
|
};
|
|
261
264
|
/**
|
|
262
|
-
* Shared sticky top chrome: logo | optional leading | scrollable center | fixed right.
|
|
265
|
+
* Shared sticky top chrome: optional logo | optional leading | scrollable center | fixed right.
|
|
263
266
|
* Apps inject search, notifications, and the account menu into `right`.
|
|
264
267
|
*/
|
|
265
268
|
declare function PlatformNavbar({ logo, leading, center, right, className, innerClassName, }: PlatformNavbarProps): React.JSX.Element;
|
|
@@ -284,12 +287,15 @@ type PlatformAccountMenuOrg = {
|
|
|
284
287
|
id: string;
|
|
285
288
|
name: string;
|
|
286
289
|
slug: string;
|
|
290
|
+
logo?: string | null;
|
|
291
|
+
};
|
|
292
|
+
type MergedPlatformAccountOrg = PlatformAccountMenuOrg & {
|
|
293
|
+
canManage: boolean;
|
|
287
294
|
};
|
|
288
295
|
type PlatformAccountMenuUrls = {
|
|
289
296
|
authAppUrl: string;
|
|
290
297
|
appUrl: string;
|
|
291
298
|
adminUrl: string;
|
|
292
|
-
backofficeUrl: string;
|
|
293
299
|
loginPath?: string;
|
|
294
300
|
accountPath?: string;
|
|
295
301
|
activityPath?: string;
|
|
@@ -301,13 +307,9 @@ type PlatformAccountMenuLabels = {
|
|
|
301
307
|
personalProfile: string;
|
|
302
308
|
activity: string;
|
|
303
309
|
professionalProfile: string;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
orgManagement: string;
|
|
308
|
-
backoffice: string;
|
|
309
|
-
memberOrgs: string;
|
|
310
|
-
managementOrgs: string;
|
|
310
|
+
showMoreOrgs: string;
|
|
311
|
+
showLessOrgs: string;
|
|
312
|
+
manageOrg: string;
|
|
311
313
|
language: string;
|
|
312
314
|
theme: string;
|
|
313
315
|
themeLight: string;
|
|
@@ -318,13 +320,18 @@ type PlatformAccountMenuLabels = {
|
|
|
318
320
|
signingOut: string;
|
|
319
321
|
accountSettings: string;
|
|
320
322
|
};
|
|
323
|
+
/** Visible org rows before “Show more”. */
|
|
324
|
+
declare const PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = 4;
|
|
325
|
+
/**
|
|
326
|
+
* Union member + manageable orgs by id (member order first, then manageable-only).
|
|
327
|
+
* `canManage` is true when the org appears in `manageableOrgs`.
|
|
328
|
+
*/
|
|
329
|
+
declare function mergePlatformAccountOrgs(memberOrgs: PlatformAccountMenuOrg[], manageableOrgs: PlatformAccountMenuOrg[]): MergedPlatformAccountOrg[];
|
|
321
330
|
type PlatformAccountMenuProps = {
|
|
322
331
|
variant?: PlatformAccountMenuVariant;
|
|
323
332
|
/** While session is resolving. */
|
|
324
333
|
isPending?: boolean;
|
|
325
334
|
user?: PlatformAccountMenuUser | null;
|
|
326
|
-
/** Platform admin (JWT role includes admin). Enables Backoffice link. */
|
|
327
|
-
isAdmin?: boolean;
|
|
328
335
|
verificationStatus?: ProfessionalVerificationStatus;
|
|
329
336
|
urls: PlatformAccountMenuUrls;
|
|
330
337
|
memberOrgs?: PlatformAccountMenuOrg[];
|
|
@@ -352,7 +359,7 @@ type PlatformAccountMenuProps = {
|
|
|
352
359
|
* Cross-app account / settings menu. Guest trigger is a settings cog;
|
|
353
360
|
* signed-in trigger is the user avatar.
|
|
354
361
|
*/
|
|
355
|
-
declare function PlatformAccountMenu({ variant, isPending, user,
|
|
362
|
+
declare function PlatformAccountMenu({ variant, isPending, user, verificationStatus, urls, memberOrgs, manageableOrgs, languages, currentLanguage, onLanguageChange, labels: labelsProp, onSignOut, extraItems, trigger: triggerProp, contentSide, contentAlign, contentSideOffset, contentClassName, className, }: PlatformAccountMenuProps): React.JSX.Element;
|
|
356
363
|
|
|
357
364
|
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
358
365
|
inset?: boolean;
|
|
@@ -1254,4 +1261,4 @@ declare function useRealtimeChannel({ getWsUrl, onEvent, enabled, reconnectDelay
|
|
|
1254
1261
|
|
|
1255
1262
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1256
1263
|
|
|
1257
|
-
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
1264
|
+
export { type AutoplayState, AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, Bubble, BubbleContent, BubbleGroup, BubbleReactions, type ChatListMessage, ChatMessageList, type ChatMessageListProps, ConfirmDestructiveDialog, type ConfirmDestructiveDialogProps, type ConversationKind, type DescribedPlaybackError, DropdownMenuItem, DropdownMenuSeparator, type EmojiCategoryData, type EmojiCategoryKey, type EmojiDatum, EmojiInput, type EmojiInputProps, EmojiPicker, type EmojiPickerLabels, type EmojiPickerLocale, EmojiPickerPopover, type EmojiPickerPopoverProps, type EmojiPickerProps, type EmojiSkinTone, EmojiTextarea, type EmojiTextareaProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, type EmptyStateProps, EmptyTitle, ErrorState, ExpandableText, type ExpandableTextProps, type FeatureEntry, type FindOrCreateConversationInput, type HlsPlayerMode, ImageLightbox, type ImageLightboxLabels, type ImageLightboxProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, type MergedPlatformAccountOrg, Message, MessageAvatar, MessageComposer, type MessageComposerProps, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, type MexicoMapProps, type MexicoState, type MexicoStateId, type OpenThreadRequest, OrgSwitcher, type OrgSwitcherLabels, type OrgSwitcherProps, type OrgSwitcherTenant, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PhoneInput, type PhoneInputProps, PlatformAccountMenu, type PlatformAccountMenuLabels, type PlatformAccountMenuOrg, type PlatformAccountMenuProps, type PlatformAccountMenuUrls, type PlatformAccountMenuUser, type PlatformAccountMenuVariant, PlatformNavbar, type PlatformNavbarProps, type PlaybackErrorContext, type PlaybackErrorDetail, type PlaybackErrorKind, type PlaybackState, type PlaybackStats, type ProfessionalVerificationStatus, type QualityLevel, type RealtimeEvent, type ScrollFadeXEdges, SearchCommand, type SearchCommandLabels, type SearchCommandProps, type SearchCommandSelection, type SearchHit, SearchablePicker, type SearchablePickerCreateOption, type SearchablePickerLabels, type SearchablePickerMultipleProps, type SearchablePickerPinned, type SearchablePickerProps, type SearchablePickerSingleProps, type SupportChatClient, type SupportConversation, type SupportMessage, type SupportMessengerItem, type SupportMessengerLabels, SupportMessengerProvider, type SupportMessengerProviderProps, type SupportMessengerTab, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, type UseHlsPlaybackOptions, type UseHlsPlaybackResult, type UsePlaybackStatsOptions, type UseRealtimeChannelOptions, type UseSearchHotkeyOptions, type UseSearchHotkeyResult, type UseSupportConversationOptions, type UseSupportConversationResult, VerifiedProfessionalBadge, type VerifiedProfessionalBadgeProps, VideoPlayer, type VideoPlayerLabels, type VideoPlayerProps, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React7 from 'react';
|
|
3
|
-
import { createContext, useContext, useState, useRef, useEffect, useLayoutEffect, useCallback,
|
|
4
|
-
import { ChevronsUpDown, CheckIcon, Smile, SearchIcon, Search, Clock, Flag, Hash, Lightbulb, Trophy, Plane, Apple, Leaf, Hand, Loader2, AlertTriangle, Inbox, X, ChevronLeft, ChevronRight, Monitor, Sun, Moon, Building2, Check, Plus, Languages, BadgeCheck, Settings, User, Activity,
|
|
3
|
+
import { createContext, useContext, useState, useRef, useEffect, useLayoutEffect, useCallback, useMemo, useId } from 'react';
|
|
4
|
+
import { ChevronsUpDown, CheckIcon, Smile, SearchIcon, Search, Clock, Flag, Hash, Lightbulb, Trophy, Plane, Apple, Leaf, Hand, Loader2, AlertTriangle, Inbox, X, ChevronLeft, ChevronRight, Monitor, Sun, Moon, Building2, Check, Plus, Languages, BadgeCheck, Settings, User, Activity, LogOut, LogIn, Upload, Move, ZoomOut, ZoomIn, RotateCcw, RotateCw, Grid3X3, RefreshCw, Pencil, Play, AlertCircle, VolumeX, Pause, Volume1, Volume2, PictureInPicture2, Minimize, Maximize, ArrowDownIcon, MessageCircleDashedIcon, MessageCircle, ChevronUp, ChevronDown, XIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
@@ -1715,7 +1715,7 @@ function PlatformNavbar({
|
|
|
1715
1715
|
innerClassName
|
|
1716
1716
|
),
|
|
1717
1717
|
children: [
|
|
1718
|
-
/* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: logo }),
|
|
1718
|
+
logo != null && logo !== false ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: logo }) : null,
|
|
1719
1719
|
leading ? /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center gap-2", children: leading }) : null,
|
|
1720
1720
|
/* @__PURE__ */ jsx(
|
|
1721
1721
|
"div",
|
|
@@ -1800,11 +1800,9 @@ var defaultLabels3 = {
|
|
|
1800
1800
|
personalProfile: "Personal profile",
|
|
1801
1801
|
activity: "Activity",
|
|
1802
1802
|
professionalProfile: "Professional profile",
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
memberOrgs: "My organizations",
|
|
1807
|
-
managementOrgs: "Management team",
|
|
1803
|
+
showMoreOrgs: "Show more",
|
|
1804
|
+
showLessOrgs: "Show less",
|
|
1805
|
+
manageOrg: "Manage organization",
|
|
1808
1806
|
language: "Language",
|
|
1809
1807
|
theme: "Theme",
|
|
1810
1808
|
themeLight: "Light",
|
|
@@ -1815,6 +1813,30 @@ var defaultLabels3 = {
|
|
|
1815
1813
|
signingOut: "Signing out\u2026",
|
|
1816
1814
|
accountSettings: "Account settings"
|
|
1817
1815
|
};
|
|
1816
|
+
var PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = 4;
|
|
1817
|
+
function mergePlatformAccountOrgs(memberOrgs, manageableOrgs) {
|
|
1818
|
+
const manageableIds = new Set(manageableOrgs.map((org) => org.id));
|
|
1819
|
+
const byId = /* @__PURE__ */ new Map();
|
|
1820
|
+
for (const org of memberOrgs) {
|
|
1821
|
+
byId.set(org.id, {
|
|
1822
|
+
...org,
|
|
1823
|
+
canManage: manageableIds.has(org.id)
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
for (const org of manageableOrgs) {
|
|
1827
|
+
const existing = byId.get(org.id);
|
|
1828
|
+
if (existing) {
|
|
1829
|
+
byId.set(org.id, {
|
|
1830
|
+
...existing,
|
|
1831
|
+
canManage: true,
|
|
1832
|
+
logo: existing.logo ?? org.logo
|
|
1833
|
+
});
|
|
1834
|
+
} else {
|
|
1835
|
+
byId.set(org.id, { ...org, canManage: true });
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
return Array.from(byId.values());
|
|
1839
|
+
}
|
|
1818
1840
|
function MenuAvatar({
|
|
1819
1841
|
name,
|
|
1820
1842
|
image,
|
|
@@ -1856,9 +1878,9 @@ function LanguageThemeSubs({
|
|
|
1856
1878
|
const themeValue = theme ?? "system";
|
|
1857
1879
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1858
1880
|
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
1859
|
-
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
1860
|
-
/* @__PURE__ */ jsx(
|
|
1861
|
-
|
|
1881
|
+
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2 [&>svg:last-child]:ml-0", children: [
|
|
1882
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.language }),
|
|
1883
|
+
/* @__PURE__ */ jsx(Languages, { className: "size-4" })
|
|
1862
1884
|
] }),
|
|
1863
1885
|
/* @__PURE__ */ jsx(DropdownMenuSubContent, { className: "min-w-40", children: /* @__PURE__ */ jsx(
|
|
1864
1886
|
DropdownMenuRadioGroup,
|
|
@@ -1870,9 +1892,9 @@ function LanguageThemeSubs({
|
|
|
1870
1892
|
) })
|
|
1871
1893
|
] }),
|
|
1872
1894
|
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
1873
|
-
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
1874
|
-
|
|
1875
|
-
|
|
1895
|
+
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2 [&>svg:last-child]:ml-0", children: [
|
|
1896
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.theme }),
|
|
1897
|
+
themeValue === "light" ? /* @__PURE__ */ jsx(Sun, { className: "size-4" }) : themeValue === "dark" ? /* @__PURE__ */ jsx(Moon, { className: "size-4" }) : /* @__PURE__ */ jsx(Monitor, { className: "size-4" })
|
|
1876
1898
|
] }),
|
|
1877
1899
|
/* @__PURE__ */ jsx(DropdownMenuSubContent, { className: "min-w-40", children: /* @__PURE__ */ jsxs(DropdownMenuRadioGroup, { value: themeValue, onValueChange: setTheme, children: [
|
|
1878
1900
|
/* @__PURE__ */ jsx(DropdownMenuRadioItem, { value: "system", children: labels.themeSystem }),
|
|
@@ -1882,11 +1904,86 @@ function LanguageThemeSubs({
|
|
|
1882
1904
|
] })
|
|
1883
1905
|
] });
|
|
1884
1906
|
}
|
|
1907
|
+
function OrgMenuRows({
|
|
1908
|
+
orgs,
|
|
1909
|
+
appUrl,
|
|
1910
|
+
adminUrl,
|
|
1911
|
+
labels
|
|
1912
|
+
}) {
|
|
1913
|
+
const [expanded, setExpanded] = useState(false);
|
|
1914
|
+
const collapsible = orgs.length > PLATFORM_ACCOUNT_ORG_COLLAPSE_AT;
|
|
1915
|
+
const visibleOrgs = collapsible && !expanded ? orgs.slice(0, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT) : orgs;
|
|
1916
|
+
if (orgs.length === 0) return null;
|
|
1917
|
+
return /* @__PURE__ */ jsxs(
|
|
1918
|
+
"div",
|
|
1919
|
+
{
|
|
1920
|
+
className: cn(
|
|
1921
|
+
expanded && orgs.length > PLATFORM_ACCOUNT_ORG_COLLAPSE_AT ? "max-h-64 overflow-y-auto scroll-fade-b" : void 0
|
|
1922
|
+
),
|
|
1923
|
+
"data-testid": "platform-account-orgs",
|
|
1924
|
+
children: [
|
|
1925
|
+
visibleOrgs.map((org) => {
|
|
1926
|
+
const orgHomeHref = `${appUrl}/o/${org.slug}`;
|
|
1927
|
+
const manageHref = `${adminUrl}/api/auth/org/select?id=${encodeURIComponent(org.id)}`;
|
|
1928
|
+
return /* @__PURE__ */ jsxs(
|
|
1929
|
+
"div",
|
|
1930
|
+
{
|
|
1931
|
+
className: "relative",
|
|
1932
|
+
"data-testid": `platform-account-org-${org.id}`,
|
|
1933
|
+
children: [
|
|
1934
|
+
/* @__PURE__ */ jsx(
|
|
1935
|
+
DropdownMenuItem,
|
|
1936
|
+
{
|
|
1937
|
+
asChild: true,
|
|
1938
|
+
className: cn("gap-2", org.canManage && "pr-9"),
|
|
1939
|
+
children: /* @__PURE__ */ jsxs("a", { href: orgHomeHref, children: [
|
|
1940
|
+
/* @__PURE__ */ jsx(
|
|
1941
|
+
MenuAvatar,
|
|
1942
|
+
{
|
|
1943
|
+
name: org.name,
|
|
1944
|
+
image: org.logo,
|
|
1945
|
+
sizeClass: "size-6"
|
|
1946
|
+
}
|
|
1947
|
+
),
|
|
1948
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: org.name })
|
|
1949
|
+
] })
|
|
1950
|
+
}
|
|
1951
|
+
),
|
|
1952
|
+
org.canManage ? /* @__PURE__ */ jsx(
|
|
1953
|
+
DropdownMenuItem,
|
|
1954
|
+
{
|
|
1955
|
+
asChild: true,
|
|
1956
|
+
className: "absolute right-0.5 top-1/2 size-7 -translate-y-1/2 p-0",
|
|
1957
|
+
children: /* @__PURE__ */ jsx("a", { href: manageHref, "aria-label": labels.manageOrg, children: /* @__PURE__ */ jsx(Settings, { className: "size-4" }) })
|
|
1958
|
+
}
|
|
1959
|
+
) : null
|
|
1960
|
+
]
|
|
1961
|
+
},
|
|
1962
|
+
org.id
|
|
1963
|
+
);
|
|
1964
|
+
}),
|
|
1965
|
+
collapsible ? /* @__PURE__ */ jsxs(
|
|
1966
|
+
DropdownMenuItem,
|
|
1967
|
+
{
|
|
1968
|
+
className: "gap-2",
|
|
1969
|
+
onSelect: (event) => {
|
|
1970
|
+
event.preventDefault();
|
|
1971
|
+
setExpanded((value) => !value);
|
|
1972
|
+
},
|
|
1973
|
+
children: [
|
|
1974
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: expanded ? labels.showLessOrgs : labels.showMoreOrgs }),
|
|
1975
|
+
expanded ? /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" }) : /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
|
|
1976
|
+
]
|
|
1977
|
+
}
|
|
1978
|
+
) : null
|
|
1979
|
+
]
|
|
1980
|
+
}
|
|
1981
|
+
);
|
|
1982
|
+
}
|
|
1885
1983
|
function PlatformAccountMenu({
|
|
1886
1984
|
variant = "platform",
|
|
1887
1985
|
isPending = false,
|
|
1888
1986
|
user = null,
|
|
1889
|
-
isAdmin = false,
|
|
1890
1987
|
verificationStatus = "unverified",
|
|
1891
1988
|
urls,
|
|
1892
1989
|
memberOrgs = [],
|
|
@@ -1906,6 +2003,11 @@ function PlatformAccountMenu({
|
|
|
1906
2003
|
}) {
|
|
1907
2004
|
const labels = { ...defaultLabels3, ...labelsProp };
|
|
1908
2005
|
const [signingOut, setSigningOut] = useState(false);
|
|
2006
|
+
const mergedOrgs = useMemo(
|
|
2007
|
+
() => mergePlatformAccountOrgs(memberOrgs, manageableOrgs),
|
|
2008
|
+
[memberOrgs, manageableOrgs]
|
|
2009
|
+
);
|
|
2010
|
+
const hasOrgs = mergedOrgs.length > 0;
|
|
1909
2011
|
const loginHref = `${urls.authAppUrl}${urls.loginPath ?? "/login"}`;
|
|
1910
2012
|
const accountHref = `${urls.authAppUrl}${urls.accountPath ?? "/account"}`;
|
|
1911
2013
|
const activityHref = `${urls.authAppUrl}${urls.activityPath ?? "/account/activity"}`;
|
|
@@ -1985,48 +2087,36 @@ function PlatformAccountMenu({
|
|
|
1985
2087
|
] }),
|
|
1986
2088
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
1987
2089
|
variant === "platform" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2090
|
+
hasOrgs ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2091
|
+
/* @__PURE__ */ jsx(
|
|
2092
|
+
OrgMenuRows,
|
|
2093
|
+
{
|
|
2094
|
+
orgs: mergedOrgs,
|
|
2095
|
+
appUrl: urls.appUrl,
|
|
2096
|
+
adminUrl: urls.adminUrl,
|
|
2097
|
+
labels
|
|
2098
|
+
}
|
|
2099
|
+
),
|
|
2100
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
2101
|
+
] }) : null,
|
|
1988
2102
|
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxs("a", { href: accountHref, children: [
|
|
1989
|
-
/* @__PURE__ */ jsx(
|
|
1990
|
-
|
|
2103
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.personalProfile }),
|
|
2104
|
+
/* @__PURE__ */ jsx(User, { className: "size-4" })
|
|
1991
2105
|
] }) }),
|
|
1992
2106
|
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxs("a", { href: activityHref, children: [
|
|
1993
|
-
/* @__PURE__ */ jsx(
|
|
1994
|
-
|
|
2107
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.activity }),
|
|
2108
|
+
/* @__PURE__ */ jsx(Activity, { className: "size-4" })
|
|
1995
2109
|
] }) }),
|
|
1996
2110
|
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxs("a", { href: profileHref, children: [
|
|
1997
|
-
/* @__PURE__ */ jsx(
|
|
1998
|
-
|
|
2111
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.professionalProfile }),
|
|
2112
|
+
/* @__PURE__ */ jsx(User, { className: "size-4" })
|
|
1999
2113
|
] }) }),
|
|
2000
|
-
memberOrgs.length > 0 ? /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
2001
|
-
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
2002
|
-
/* @__PURE__ */ jsx(Users, { className: "size-4" }),
|
|
2003
|
-
labels.memberOrgs
|
|
2004
|
-
] }),
|
|
2005
|
-
/* @__PURE__ */ jsx(DropdownMenuSubContent, { className: "min-w-48 max-h-64 overflow-y-auto scroll-fade-b", children: memberOrgs.map((org) => /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx("a", { href: `${urls.appUrl}/o/${org.slug}`, children: org.name }) }, org.id)) })
|
|
2006
|
-
] }) : null,
|
|
2007
|
-
manageableOrgs.length > 0 ? /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
2008
|
-
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
|
|
2009
|
-
/* @__PURE__ */ jsx(Building2, { className: "size-4" }),
|
|
2010
|
-
labels.managementOrgs
|
|
2011
|
-
] }),
|
|
2012
|
-
/* @__PURE__ */ jsx(DropdownMenuSubContent, { className: "min-w-48 max-h-64 overflow-y-auto scroll-fade-b", children: manageableOrgs.map((org) => /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
2013
|
-
"a",
|
|
2014
|
-
{
|
|
2015
|
-
href: `${urls.adminUrl}/api/auth/org/select?id=${encodeURIComponent(org.id)}`,
|
|
2016
|
-
children: org.name
|
|
2017
|
-
}
|
|
2018
|
-
) }, org.id)) })
|
|
2019
|
-
] }) : null,
|
|
2020
2114
|
extraItems,
|
|
2021
|
-
isAdmin && urls.backofficeUrl ? /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxs("a", { href: urls.backofficeUrl, children: [
|
|
2022
|
-
/* @__PURE__ */ jsx(LayoutDashboard, { className: "size-4" }),
|
|
2023
|
-
labels.backoffice
|
|
2024
|
-
] }) }) : null,
|
|
2025
2115
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
2026
2116
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2027
2117
|
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxs("a", { href: accountHref, children: [
|
|
2028
|
-
/* @__PURE__ */ jsx(
|
|
2029
|
-
|
|
2118
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.accountSettings }),
|
|
2119
|
+
/* @__PURE__ */ jsx(Settings, { className: "size-4" })
|
|
2030
2120
|
] }) }),
|
|
2031
2121
|
extraItems,
|
|
2032
2122
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
@@ -2051,8 +2141,8 @@ function PlatformAccountMenu({
|
|
|
2051
2141
|
void handleSignOut();
|
|
2052
2142
|
},
|
|
2053
2143
|
children: [
|
|
2054
|
-
/* @__PURE__ */ jsx(
|
|
2055
|
-
|
|
2144
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: signingOut ? labels.signingOut : labels.signOut }),
|
|
2145
|
+
/* @__PURE__ */ jsx(LogOut, { className: "size-4" })
|
|
2056
2146
|
]
|
|
2057
2147
|
}
|
|
2058
2148
|
)
|
|
@@ -2068,8 +2158,8 @@ function PlatformAccountMenu({
|
|
|
2068
2158
|
),
|
|
2069
2159
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2070
2160
|
/* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxs("a", { href: loginHref, children: [
|
|
2071
|
-
/* @__PURE__ */ jsx(
|
|
2072
|
-
|
|
2161
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: labels.signIn }),
|
|
2162
|
+
/* @__PURE__ */ jsx(LogIn, { className: "size-4" })
|
|
2073
2163
|
] }) })
|
|
2074
2164
|
] })
|
|
2075
2165
|
}
|
|
@@ -7142,6 +7232,7 @@ function SupportMessengerProvider({
|
|
|
7142
7232
|
className
|
|
7143
7233
|
}) {
|
|
7144
7234
|
const isMobile = useMediaQuery2("(max-width: 767px)");
|
|
7235
|
+
const dockRef = useRef(null);
|
|
7145
7236
|
const [listOpen, setListOpen] = useState(false);
|
|
7146
7237
|
const [threads, setThreads] = useState([]);
|
|
7147
7238
|
const [mobileThreadKey, setMobileThreadKey] = useState(null);
|
|
@@ -7149,6 +7240,7 @@ function SupportMessengerProvider({
|
|
|
7149
7240
|
() => items.reduce((sum, item) => sum + (item.unreadCount ?? 0), 0),
|
|
7150
7241
|
[items]
|
|
7151
7242
|
);
|
|
7243
|
+
const isDesktopOpen = !isMobile && (listOpen || threads.length > 0);
|
|
7152
7244
|
useEffect(() => {
|
|
7153
7245
|
if (!forceMinimized) return;
|
|
7154
7246
|
setListOpen(false);
|
|
@@ -7191,6 +7283,20 @@ function SupportMessengerProvider({
|
|
|
7191
7283
|
setThreads([]);
|
|
7192
7284
|
setMobileThreadKey(null);
|
|
7193
7285
|
}, []);
|
|
7286
|
+
useEffect(() => {
|
|
7287
|
+
if (!isDesktopOpen) return;
|
|
7288
|
+
function onPointerDown(event) {
|
|
7289
|
+
const target = event.target;
|
|
7290
|
+
if (!(target instanceof Node)) return;
|
|
7291
|
+
if (dockRef.current?.contains(target)) return;
|
|
7292
|
+
if (target instanceof Element && target.closest('[data-slot="popover-content"]')) {
|
|
7293
|
+
return;
|
|
7294
|
+
}
|
|
7295
|
+
closeAll();
|
|
7296
|
+
}
|
|
7297
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
7298
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
7299
|
+
}, [isDesktopOpen, closeAll]);
|
|
7194
7300
|
const ctx = useMemo(
|
|
7195
7301
|
() => ({
|
|
7196
7302
|
listOpen,
|
|
@@ -7234,6 +7340,7 @@ function SupportMessengerProvider({
|
|
|
7234
7340
|
enabled ? /* @__PURE__ */ jsxs(
|
|
7235
7341
|
"div",
|
|
7236
7342
|
{
|
|
7343
|
+
ref: dockRef,
|
|
7237
7344
|
className: cn(
|
|
7238
7345
|
"pointer-events-none fixed right-4 bottom-4 z-50 flex flex-col items-end gap-3",
|
|
7239
7346
|
className
|
|
@@ -7596,6 +7703,6 @@ function useRealtimeChannel({
|
|
|
7596
7703
|
}, [enabled, reconnectDelayMs]);
|
|
7597
7704
|
}
|
|
7598
7705
|
|
|
7599
|
-
export { AvatarEditor, AvatarEditorDialog, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, DropdownMenuItem, DropdownMenuSeparator, EmojiInput, EmojiPicker, EmojiPickerPopover, EmojiTextarea, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, ExpandableText, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PhoneInput, PlatformAccountMenu, PlatformNavbar, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, useMediaQuery2 as useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
7706
|
+
export { AvatarEditor, AvatarEditorDialog, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ChatMessageList, ConfirmDestructiveDialog, DropdownMenuItem, DropdownMenuSeparator, EmojiInput, EmojiPicker, EmojiPickerPopover, EmojiTextarea, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyState, EmptyTitle, ErrorState, ExpandableText, ImageLightbox, LanguageContext, LanguageSwitcher, LoadingState, MEXICO_STATES, MEXICO_STATE_PATHS, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageComposer, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, MexicoMap, OrgSwitcher, PLATFORM_ACCOUNT_ORG_COLLAPSE_AT, PhoneInput, PlatformAccountMenu, PlatformNavbar, SearchCommand, SearchablePicker, SupportMessengerProvider, ThemeSwitcher, VerifiedProfessionalBadge, VideoPlayer, avatarFallbackStyle, bubbleVariants, cn, createLiveHlsConfig, createSupportChatClient, createVodHlsConfig, defaultLanguages, describeAvResync, describePlaybackError, fuzzyMatch, getAvatarColors, getInitials, insertAtCaret, markerVariants, mergePlatformAccountOrgs, normalizeEmojiQuery, shouldRetryLiveEdge404, useDebouncedValue, useDebouncedValueStrict, useHlsPlayback, useLanguageContext, useMediaQuery2 as useMediaQuery, usePlaybackStats, useRealtimeChannel, useScrollFadeXEdges, useSearchHotkey, useSupportConversation, useSupportMessenger, useSupportMessengerOptional };
|
|
7600
7707
|
//# sourceMappingURL=index.js.map
|
|
7601
7708
|
//# sourceMappingURL=index.js.map
|