mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Enforce node: schema for builtins, import extensions
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
import type { AboutProps } from './About';
|
||||
import { About } from './About';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
import type { AboutProps } from './About.js';
|
||||
import { About } from './About.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { useEscapeHandling } from '../hooks/useEscapeHandling';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { useEscapeHandling } from '../hooks/useEscapeHandling.js';
|
||||
|
||||
export type AboutProps = Readonly<{
|
||||
closeAbout: () => unknown;
|
||||
|
||||
@@ -6,11 +6,11 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AddGroupMemberErrorDialog';
|
||||
import type { PropsType } from './AddGroupMemberErrorDialog.js';
|
||||
import {
|
||||
AddGroupMemberErrorDialog,
|
||||
AddGroupMemberErrorDialogMode,
|
||||
} from './AddGroupMemberErrorDialog';
|
||||
} from './AddGroupMemberErrorDialog.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Alert } from './Alert';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Alert } from './Alert.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
|
||||
export enum AddGroupMemberErrorDialogMode {
|
||||
MaximumGroupSize,
|
||||
|
||||
@@ -5,12 +5,12 @@ import React from 'react';
|
||||
import type { Meta, StoryFn } from '@storybook/react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Props } from './AddUserToAnotherGroupModal';
|
||||
import type { Props } from './AddUserToAnotherGroupModal.js';
|
||||
import {
|
||||
getDefaultConversation,
|
||||
getDefaultGroup,
|
||||
} from '../test-helpers/getDefaultConversation';
|
||||
import { AddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal';
|
||||
} from '../test-helpers/getDefaultConversation.js';
|
||||
import { AddUserToAnotherGroupModal } from './AddUserToAnotherGroupModal.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -5,23 +5,23 @@ import { pick } from 'lodash';
|
||||
import React, { useCallback } from 'react';
|
||||
import type { ListRowProps } from 'react-virtualized';
|
||||
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { ToastType } from '../types/Toast';
|
||||
import { filterAndSortConversations } from '../util/filterAndSortConversations';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog';
|
||||
import type { GroupListItemConversationType } from './conversationList/GroupListItem';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { ToastType } from '../types/Toast.js';
|
||||
import { filterAndSortConversations } from '../util/filterAndSortConversations.js';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog.js';
|
||||
import type { GroupListItemConversationType } from './conversationList/GroupListItem.js';
|
||||
import {
|
||||
DisabledReason,
|
||||
GroupListItem,
|
||||
} from './conversationList/GroupListItem';
|
||||
import { Modal } from './Modal';
|
||||
import { SearchInput } from './SearchInput';
|
||||
import { useRestoreFocus } from '../hooks/useRestoreFocus';
|
||||
import { ListView } from './ListView';
|
||||
import { ListTile } from './ListTile';
|
||||
import type { ShowToastAction } from '../state/ducks/toast';
|
||||
import { SizeObserver } from '../hooks/useSizeObserver';
|
||||
} from './conversationList/GroupListItem.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import { SearchInput } from './SearchInput.js';
|
||||
import { useRestoreFocus } from '../hooks/useRestoreFocus.js';
|
||||
import { ListView } from './ListView.js';
|
||||
import { ListTile } from './ListTile.js';
|
||||
import type { ShowToastAction } from '../state/ducks/toast.js';
|
||||
import { SizeObserver } from '../hooks/useSizeObserver.js';
|
||||
|
||||
type OwnProps = {
|
||||
i18n: LocalizerType;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './Alert';
|
||||
import { Alert } from './Alert';
|
||||
import type { PropsType } from './Alert.js';
|
||||
import { Alert } from './Alert.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import React from 'react';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { Theme } from '../util/theme';
|
||||
import { Button } from './Button';
|
||||
import { Modal } from './Modal';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type { Theme } from '../util/theme.js';
|
||||
import { Button } from './Button.js';
|
||||
import { Modal } from './Modal.js';
|
||||
|
||||
export type PropsType = {
|
||||
body: ReactNode;
|
||||
|
||||
@@ -5,8 +5,8 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AnimatedEmojiGalore';
|
||||
import { AnimatedEmojiGalore } from './AnimatedEmojiGalore';
|
||||
import type { PropsType } from './AnimatedEmojiGalore.js';
|
||||
import { AnimatedEmojiGalore } from './AnimatedEmojiGalore.js';
|
||||
|
||||
export default {
|
||||
title: 'Components/AnimatedEmojiGalore',
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
import React from 'react';
|
||||
import { animated, to as interpolate, useSprings } from '@react-spring/web';
|
||||
import { random } from 'lodash';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion';
|
||||
import { FunStaticEmoji } from './fun/FunEmoji';
|
||||
import { strictAssert } from '../util/assert';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion.js';
|
||||
import { FunStaticEmoji } from './fun/FunEmoji.js';
|
||||
import { strictAssert } from '../util/assert.js';
|
||||
import {
|
||||
getEmojiVariantByKey,
|
||||
getEmojiVariantKeyByValue,
|
||||
isEmojiVariantValue,
|
||||
} from './fun/data/emojis';
|
||||
} from './fun/data/emojis.js';
|
||||
|
||||
export type PropsType = {
|
||||
emoji: string;
|
||||
|
||||
@@ -6,11 +6,11 @@ import { noop } from 'lodash';
|
||||
import type {
|
||||
ConversationType,
|
||||
ShowConversationType,
|
||||
} from '../state/ducks/conversations';
|
||||
import { I18n } from './I18n';
|
||||
import type { LocalizerType, ThemeType } from '../types/Util';
|
||||
import { Modal } from './Modal';
|
||||
import { ConversationListItem } from './conversationList/ConversationListItem';
|
||||
} from '../state/ducks/conversations.js';
|
||||
import { I18n } from './I18n.js';
|
||||
import type { LocalizerType, ThemeType } from '../types/Util.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import { ConversationListItem } from './conversationList/ConversationListItem.js';
|
||||
|
||||
type PropsType = {
|
||||
groupAdmins: Array<ConversationType>;
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { ViewStoryActionCreatorType } from '../state/ducks/stories';
|
||||
import type { VerificationTransport } from '../types/VerificationTransport';
|
||||
import { ThemeType } from '../types/Util';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { type AppStateType, AppViewType } from '../state/ducks/app';
|
||||
import { SmartInstallScreen } from '../state/smart/InstallScreen';
|
||||
import { StandaloneRegistration } from './StandaloneRegistration';
|
||||
import { usePageVisibility } from '../hooks/usePageVisibility';
|
||||
import type { ViewStoryActionCreatorType } from '../state/ducks/stories.js';
|
||||
import type { VerificationTransport } from '../types/VerificationTransport.js';
|
||||
import { ThemeType } from '../types/Util.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { type AppStateType, AppViewType } from '../state/ducks/app.js';
|
||||
import { SmartInstallScreen } from '../state/smart/InstallScreen.js';
|
||||
import { StandaloneRegistration } from './StandaloneRegistration.js';
|
||||
import { usePageVisibility } from '../hooks/usePageVisibility.js';
|
||||
|
||||
type PropsType = {
|
||||
state: AppStateType;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
import React, { useState } from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AutoSizeInput';
|
||||
import { AutoSizeInput } from './AutoSizeInput';
|
||||
import type { PropsType } from './AutoSizeInput.js';
|
||||
import { AutoSizeInput } from './AutoSizeInput.js';
|
||||
|
||||
export default {
|
||||
title: 'Components/AutoSizeInput',
|
||||
|
||||
@@ -6,7 +6,7 @@ import React, { useCallback, useState, useEffect, useRef } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { getClassNamesFor } from '../util/getClassNamesFor';
|
||||
import { getClassNamesFor } from '../util/getClassNamesFor.js';
|
||||
|
||||
export type PropsType = Readonly<{
|
||||
disableSpellcheck?: boolean;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import type { ForwardedRef } from 'react';
|
||||
import React, { forwardRef, useEffect, useLayoutEffect, useRef } from 'react';
|
||||
import { mergeRefs } from '@react-aria/utils';
|
||||
import { strictAssert } from '../util/assert';
|
||||
import type { PropsType } from './Input';
|
||||
import { Input } from './Input';
|
||||
import { strictAssert } from '../util/assert.js';
|
||||
import type { PropsType } from './Input.js';
|
||||
import { Input } from './Input.js';
|
||||
|
||||
export const AutoSizeTextArea = forwardRef(function AutoSizeTextArea(
|
||||
props: PropsType,
|
||||
|
||||
@@ -5,13 +5,13 @@ import type { Meta, StoryFn } from '@storybook/react';
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { expect, fn, within, userEvent } from '@storybook/test';
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import type { Props } from './Avatar';
|
||||
import { Avatar, AvatarBlur, AvatarSize } from './Avatar';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { HasStories } from '../types/Stories';
|
||||
import { ThemeType } from '../types/Util';
|
||||
import { getFakeBadge } from '../test-helpers/getFakeBadge';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import type { Props } from './Avatar.js';
|
||||
import { Avatar, AvatarBlur, AvatarSize } from './Avatar.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { HasStories } from '../types/Stories.js';
|
||||
import { ThemeType } from '../types/Util.js';
|
||||
import { getFakeBadge } from '../test-helpers/getFakeBadge.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
+14
-14
@@ -13,20 +13,20 @@ import classNames from 'classnames';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import { filterDOMProps } from '@react-aria/utils';
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import type { BadgeType } from '../badges/types';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { createLogger } from '../logging/log';
|
||||
import { BadgeImageTheme } from '../badges/BadgeImageTheme';
|
||||
import { HasStories } from '../types/Stories';
|
||||
import { Spinner } from './Spinner';
|
||||
import { ThemeType } from '../types/Util';
|
||||
import { assertDev } from '../util/assert';
|
||||
import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath';
|
||||
import { getInitials } from '../util/getInitials';
|
||||
import { isBadgeVisible } from '../badges/isBadgeVisible';
|
||||
import { SIGNAL_AVATAR_PATH } from '../types/SignalConversation';
|
||||
import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import type { BadgeType } from '../badges/types.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { createLogger } from '../logging/log.js';
|
||||
import { BadgeImageTheme } from '../badges/BadgeImageTheme.js';
|
||||
import { HasStories } from '../types/Stories.js';
|
||||
import { Spinner } from './Spinner.js';
|
||||
import { ThemeType } from '../types/Util.js';
|
||||
import { assertDev } from '../util/assert.js';
|
||||
import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.js';
|
||||
import { getInitials } from '../util/getInitials.js';
|
||||
import { isBadgeVisible } from '../badges/isBadgeVisible.js';
|
||||
import { SIGNAL_AVATAR_PATH } from '../types/SignalConversation.js';
|
||||
import { getAvatarPlaceholderGradient } from '../utils/getAvatarPlaceholderGradient.js';
|
||||
|
||||
const log = createLogger('Avatar');
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AvatarColorPicker';
|
||||
import { AvatarColorPicker } from './AvatarColorPicker';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './AvatarColorPicker.js';
|
||||
import { AvatarColorPicker } from './AvatarColorPicker.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble.js';
|
||||
|
||||
export type PropsType = {
|
||||
i18n: LocalizerType;
|
||||
|
||||
@@ -5,11 +5,11 @@ import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './AvatarEditor';
|
||||
import { AvatarEditor } from './AvatarEditor';
|
||||
import { getDefaultAvatars } from '../types/Avatar';
|
||||
import { createAvatarData } from '../util/createAvatarData';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { PropsType } from './AvatarEditor.js';
|
||||
import { AvatarEditor } from './AvatarEditor.js';
|
||||
import { getDefaultAvatars } from '../types/Avatar.js';
|
||||
import { createAvatarData } from '../util/createAvatarData.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,25 +4,25 @@
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { isEqual } from 'lodash';
|
||||
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import type {
|
||||
AvatarDataType,
|
||||
DeleteAvatarFromDiskActionType,
|
||||
ReplaceAvatarActionType,
|
||||
SaveAvatarToDiskActionType,
|
||||
} from '../types/Avatar';
|
||||
import { AvatarIconEditor } from './AvatarIconEditor';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons';
|
||||
import { AvatarPreview } from './AvatarPreview';
|
||||
import { AvatarTextEditor } from './AvatarTextEditor';
|
||||
import { AvatarUploadButton } from './AvatarUploadButton';
|
||||
import { BetterAvatar } from './BetterAvatar';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes';
|
||||
import { createAvatarData } from '../util/createAvatarData';
|
||||
import { isSameAvatarData } from '../util/isSameAvatarData';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { useConfirmDiscard } from '../hooks/useConfirmDiscard';
|
||||
} from '../types/Avatar.js';
|
||||
import { AvatarIconEditor } from './AvatarIconEditor.js';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons.js';
|
||||
import { AvatarPreview } from './AvatarPreview.js';
|
||||
import { AvatarTextEditor } from './AvatarTextEditor.js';
|
||||
import { AvatarUploadButton } from './AvatarUploadButton.js';
|
||||
import { BetterAvatar } from './BetterAvatar.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes.js';
|
||||
import { createAvatarData } from '../util/createAvatarData.js';
|
||||
import { isSameAvatarData } from '../util/isSameAvatarData.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { useConfirmDiscard } from '../hooks/useConfirmDiscard.js';
|
||||
|
||||
export type PropsType = {
|
||||
avatarColor?: AvatarColorType;
|
||||
|
||||
@@ -5,11 +5,11 @@ import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AvatarIconEditor';
|
||||
import { AvatarIconEditor } from './AvatarIconEditor';
|
||||
import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { createAvatarData } from '../util/createAvatarData';
|
||||
import type { PropsType } from './AvatarIconEditor.js';
|
||||
import { AvatarIconEditor } from './AvatarIconEditor.js';
|
||||
import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { createAvatarData } from '../util/createAvatarData.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { AvatarColorPicker } from './AvatarColorPicker';
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import type { AvatarDataType } from '../types/Avatar';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons';
|
||||
import { AvatarPreview } from './AvatarPreview';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes';
|
||||
import { AvatarColorPicker } from './AvatarColorPicker.js';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import type { AvatarDataType } from '../types/Avatar.js';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons.js';
|
||||
import { AvatarPreview } from './AvatarPreview.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes.js';
|
||||
|
||||
export type PropsType = {
|
||||
avatarData: AvatarDataType;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './AvatarLightbox';
|
||||
import { AvatarLightbox } from './AvatarLightbox';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { PropsType } from './AvatarLightbox.js';
|
||||
import { AvatarLightbox } from './AvatarLightbox.js';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
import React from 'react';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import { AvatarPreview } from './AvatarPreview';
|
||||
import { Lightbox } from './Lightbox';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import { AvatarPreview } from './AvatarPreview.js';
|
||||
import { Lightbox } from './Lightbox.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
|
||||
export type PropsType = {
|
||||
avatarPlaceholderGradient?: Readonly<[string, string]>;
|
||||
|
||||
@@ -6,8 +6,8 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AvatarModalButtons';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons';
|
||||
import type { PropsType } from './AvatarModalButtons.js';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import { ConfirmDiscardDialog } from './ConfirmDiscardDialog';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Modal } from './Modal';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import { ConfirmDiscardDialog } from './ConfirmDiscardDialog.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Modal } from './Modal.js';
|
||||
|
||||
export type PropsType = {
|
||||
hasChanges: boolean;
|
||||
|
||||
@@ -7,9 +7,9 @@ import { chunk } from 'lodash';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AvatarPreview';
|
||||
import { AvatarPreview } from './AvatarPreview';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './AvatarPreview.js';
|
||||
import { AvatarPreview } from './AvatarPreview.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import type { CSSProperties } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import { createLogger } from '../logging/log';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Spinner } from './Spinner';
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { getInitials } from '../util/getInitials';
|
||||
import { imagePathToBytes } from '../util/imagePathToBytes';
|
||||
import { type ConversationType } from '../state/ducks/conversations';
|
||||
import { createLogger } from '../logging/log.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Spinner } from './Spinner.js';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { getInitials } from '../util/getInitials.js';
|
||||
import { imagePathToBytes } from '../util/imagePathToBytes.js';
|
||||
import { type ConversationType } from '../state/ducks/conversations.js';
|
||||
|
||||
const log = createLogger('AvatarPreview');
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { ReactElement } from 'react';
|
||||
import React from 'react';
|
||||
import type { AvatarSize } from './Avatar';
|
||||
import type { AvatarSize } from './Avatar.js';
|
||||
|
||||
export function AvatarSpacer({
|
||||
size,
|
||||
|
||||
@@ -5,9 +5,9 @@ import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AvatarTextEditor';
|
||||
import { AvatarTextEditor } from './AvatarTextEditor';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './AvatarTextEditor.js';
|
||||
import { AvatarTextEditor } from './AvatarTextEditor.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -11,19 +11,19 @@ import React, {
|
||||
} from 'react';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import * as grapheme from '../util/grapheme';
|
||||
import { AvatarColorPicker } from './AvatarColorPicker';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { AvatarDataType } from '../types/Avatar';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes';
|
||||
import { createAvatarData } from '../util/createAvatarData';
|
||||
import * as grapheme from '../util/grapheme.js';
|
||||
import { AvatarColorPicker } from './AvatarColorPicker.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { AvatarDataType } from '../types/Avatar.js';
|
||||
import { AvatarModalButtons } from './AvatarModalButtons.js';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes.js';
|
||||
import { createAvatarData } from '../util/createAvatarData.js';
|
||||
import {
|
||||
getFittedFontSize,
|
||||
getFontSizes,
|
||||
} from '../util/avatarTextSizeCalculator';
|
||||
} from '../util/avatarTextSizeCalculator.js';
|
||||
|
||||
type DoneHandleType = (
|
||||
avatarBuffer: Uint8Array,
|
||||
|
||||
@@ -5,8 +5,8 @@ import React from 'react';
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './AvatarUploadButton';
|
||||
import { AvatarUploadButton } from './AvatarUploadButton';
|
||||
import type { PropsType } from './AvatarUploadButton.js';
|
||||
import { AvatarUploadButton } from './AvatarUploadButton.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { ChangeEventHandler } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { processImageFile } from '../util/processImageFile';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { processImageFile } from '../util/processImageFile.js';
|
||||
|
||||
export type PropsType = {
|
||||
className: string;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { PropsType } from './BackfillFailureModal';
|
||||
import type { PropsType } from './BackfillFailureModal.js';
|
||||
import {
|
||||
BackfillFailureModal,
|
||||
BackfillFailureKind,
|
||||
} from './BackfillFailureModal';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
} from './BackfillFailureModal.js';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { Modal } from './Modal';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
|
||||
export enum BackfillFailureKind {
|
||||
Timeout = 'Timeout',
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { ConfirmationDialog } from './ConfirmationDialog';
|
||||
import type { LocalizerType } from '../types/I18N';
|
||||
import { I18n } from './I18n';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog.js';
|
||||
import type { LocalizerType } from '../types/I18N.js';
|
||||
import { I18n } from './I18n.js';
|
||||
|
||||
const BACKUP_AND_RESTORE_SUPPORT_PAGE =
|
||||
'https://support.signal.org/hc/articles/360007059752-Backup-and-Restore-Messages';
|
||||
|
||||
@@ -5,9 +5,9 @@ import React, { type ComponentProps } from 'react';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress';
|
||||
import { KIBIBYTE } from '../types/AttachmentSize';
|
||||
import { WidthBreakpoint } from './_util';
|
||||
import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress.js';
|
||||
import { KIBIBYTE } from '../types/AttachmentSize.js';
|
||||
import { WidthBreakpoint } from './_util.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { formatFileSize } from '../util/formatFileSize';
|
||||
import { SpinnerV2 } from './SpinnerV2';
|
||||
import { ContextMenu } from './ContextMenu';
|
||||
import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog';
|
||||
import { LeftPaneDialog } from './LeftPaneDialog';
|
||||
import { WidthBreakpoint } from './_util';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { formatFileSize } from '../util/formatFileSize.js';
|
||||
import { SpinnerV2 } from './SpinnerV2.js';
|
||||
import { ContextMenu } from './ContextMenu.js';
|
||||
import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog.js';
|
||||
import { LeftPaneDialog } from './LeftPaneDialog.js';
|
||||
import { WidthBreakpoint } from './_util.js';
|
||||
|
||||
export type PropsType = Readonly<{
|
||||
i18n: LocalizerType;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { formatFileSize } from '../util/formatFileSize';
|
||||
import { roundFractionForProgressBar } from '../util/numbers';
|
||||
import { ProgressBar } from './ProgressBar';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button';
|
||||
import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { formatFileSize } from '../util/formatFileSize.js';
|
||||
import { roundFractionForProgressBar } from '../util/numbers.js';
|
||||
import { ProgressBar } from './ProgressBar.js';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button.js';
|
||||
import { BackupMediaDownloadCancelConfirmationDialog } from './BackupMediaDownloadCancelConfirmationDialog.js';
|
||||
|
||||
export type PropsType = Readonly<{
|
||||
i18n: LocalizerType;
|
||||
|
||||
@@ -5,7 +5,7 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { times } from 'lodash';
|
||||
|
||||
import { strictAssert } from '../util/assert';
|
||||
import { strictAssert } from '../util/assert.js';
|
||||
|
||||
export function BadgeCarouselIndex({
|
||||
currentIndex,
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
import React from 'react';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { Props } from './BadgeDescription';
|
||||
import { BadgeDescription } from './BadgeDescription';
|
||||
import type { Props } from './BadgeDescription.js';
|
||||
import { BadgeDescription } from './BadgeDescription.js';
|
||||
|
||||
export default {
|
||||
title: 'Components/BadgeDescription',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { ReactChild, ReactElement } from 'react';
|
||||
import React from 'react';
|
||||
import { ContactName } from './conversation/ContactName';
|
||||
import { ContactName } from './conversation/ContactName.js';
|
||||
|
||||
export type Props = Readonly<{
|
||||
firstName?: string;
|
||||
|
||||
@@ -6,11 +6,11 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { getFakeBadge, getFakeBadges } from '../test-helpers/getFakeBadge';
|
||||
import { repeat, zipObject } from '../util/iterables';
|
||||
import { BadgeImageTheme } from '../badges/BadgeImageTheme';
|
||||
import type { PropsType } from './BadgeDialog';
|
||||
import { BadgeDialog } from './BadgeDialog';
|
||||
import { getFakeBadge, getFakeBadges } from '../test-helpers/getFakeBadge.js';
|
||||
import { repeat, zipObject } from '../util/iterables.js';
|
||||
import { BadgeImageTheme } from '../badges/BadgeImageTheme.js';
|
||||
import type { PropsType } from './BadgeDialog.js';
|
||||
import { BadgeDialog } from './BadgeDialog.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { strictAssert } from '../util/assert';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { BadgeType } from '../badges/types';
|
||||
import { BadgeCategory } from '../badges/BadgeCategory';
|
||||
import { Modal } from './Modal';
|
||||
import { Button, ButtonSize } from './Button';
|
||||
import { BadgeDescription } from './BadgeDescription';
|
||||
import { BadgeImage } from './BadgeImage';
|
||||
import { BadgeCarouselIndex } from './BadgeCarouselIndex';
|
||||
import { BadgeSustainerInstructionsDialog } from './BadgeSustainerInstructionsDialog';
|
||||
import { strictAssert } from '../util/assert.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type { BadgeType } from '../badges/types.js';
|
||||
import { BadgeCategory } from '../badges/BadgeCategory.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import { Button, ButtonSize } from './Button.js';
|
||||
import { BadgeDescription } from './BadgeDescription.js';
|
||||
import { BadgeImage } from './BadgeImage.js';
|
||||
import { BadgeCarouselIndex } from './BadgeCarouselIndex.js';
|
||||
import { BadgeSustainerInstructionsDialog } from './BadgeSustainerInstructionsDialog.js';
|
||||
|
||||
export type PropsType = Readonly<{
|
||||
areWeASubscriber: boolean;
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import type { BadgeType } from '../badges/types';
|
||||
import { Spinner } from './Spinner';
|
||||
import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath';
|
||||
import { BadgeImageTheme } from '../badges/BadgeImageTheme';
|
||||
import type { BadgeType } from '../badges/types.js';
|
||||
import { Spinner } from './Spinner.js';
|
||||
import { getBadgeImageFileLocalPath } from '../badges/getBadgeImageFileLocalPath.js';
|
||||
import { BadgeImageTheme } from '../badges/BadgeImageTheme.js';
|
||||
|
||||
export function BadgeImage({
|
||||
badge,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import type { ReactElement } from 'react';
|
||||
import React from 'react';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Modal } from './Modal';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Modal } from './Modal.js';
|
||||
|
||||
export function BadgeSustainerInstructionsDialog({
|
||||
i18n,
|
||||
|
||||
@@ -6,11 +6,11 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar';
|
||||
import type { PropsType } from './BetterAvatar';
|
||||
import { BetterAvatar } from './BetterAvatar';
|
||||
import { createAvatarData } from '../util/createAvatarData';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { GroupAvatarIcons, PersonalAvatarIcons } from '../types/Avatar.js';
|
||||
import type { PropsType } from './BetterAvatar.js';
|
||||
import { BetterAvatar } from './BetterAvatar.js';
|
||||
import { createAvatarData } from '../util/createAvatarData.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
import type { MouseEvent } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
import type { AvatarDataType } from '../types/Avatar';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Spinner } from './Spinner';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes';
|
||||
import type { AvatarDataType } from '../types/Avatar.js';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Spinner } from './Spinner.js';
|
||||
import { avatarDataToBytes } from '../util/avatarDataToBytes.js';
|
||||
|
||||
type AvatarSize = 48 | 80;
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './BetterAvatarBubble';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { PropsType } from './BetterAvatarBubble.js';
|
||||
import { BetterAvatarBubble } from './BetterAvatarBubble.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import type { CSSProperties, MouseEvent, ReactNode } from 'react';
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { AvatarColorType } from '../types/Colors';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { AvatarColorType } from '../types/Colors.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
|
||||
export type PropsType = {
|
||||
children?: ReactNode;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import React from 'react';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './BrandedQRCode';
|
||||
import { BrandedQRCode } from './BrandedQRCode';
|
||||
import type { PropsType } from './BrandedQRCode.js';
|
||||
import { BrandedQRCode } from './BrandedQRCode.js';
|
||||
|
||||
export default {
|
||||
title: 'Components/BrandedQRCode',
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './Button';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button';
|
||||
import type { PropsType } from './Button.js';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button.js';
|
||||
|
||||
export default {
|
||||
title: 'Components/Button',
|
||||
|
||||
@@ -10,9 +10,9 @@ import type {
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import type { Theme } from '../util/theme';
|
||||
import { assertDev } from '../util/assert';
|
||||
import { themeClassName } from '../util/theme';
|
||||
import type { Theme } from '../util/theme.js';
|
||||
import { assertDev } from '../util/assert.js';
|
||||
import { themeClassName } from '../util/theme.js';
|
||||
|
||||
export enum ButtonSize {
|
||||
Large,
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { CallLinkAddNameModalProps } from './CallLinkAddNameModal';
|
||||
import { CallLinkAddNameModal } from './CallLinkAddNameModal';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink';
|
||||
import type { CallLinkAddNameModalProps } from './CallLinkAddNameModal.js';
|
||||
import { CallLinkAddNameModal } from './CallLinkAddNameModal.js';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import { v4 as generateUuid } from 'uuid';
|
||||
import { Modal } from './Modal';
|
||||
import type { LocalizerType } from '../types/I18N';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { Input } from './Input';
|
||||
import { Modal } from './Modal.js';
|
||||
import type { LocalizerType } from '../types/I18N.js';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { Input } from './Input.js';
|
||||
import {
|
||||
CallLinkNameMaxByteLength,
|
||||
CallLinkNameMaxLength,
|
||||
type CallLinkType,
|
||||
} from '../types/CallLink';
|
||||
import { getColorForCallLink } from '../util/getColorForCallLink';
|
||||
} from '../types/CallLink.js';
|
||||
import { getColorForCallLink } from '../util/getColorForCallLink.js';
|
||||
|
||||
export type CallLinkAddNameModalProps = Readonly<{
|
||||
i18n: LocalizerType;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
import type { CallLinkDetailsProps } from './CallLinkDetails';
|
||||
import { CallLinkDetails } from './CallLinkDetails';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
import type { CallLinkDetailsProps } from './CallLinkDetails.js';
|
||||
import { CallLinkDetails } from './CallLinkDetails.js';
|
||||
import {
|
||||
FAKE_CALL_LINK,
|
||||
FAKE_CALL_LINK_WITH_ADMIN_KEY,
|
||||
} from '../test-helpers/fakeCallLink';
|
||||
import { getFakeCallLinkHistoryGroup } from '../test-helpers/getFakeCallHistoryGroup';
|
||||
} from '../test-helpers/fakeCallLink.js';
|
||||
import { getFakeCallLinkHistoryGroup } from '../test-helpers/getFakeCallHistoryGroup.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -2,28 +2,28 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
import React, { useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import type { CallHistoryGroup } from '../types/CallDisposition';
|
||||
import type { LocalizerType } from '../types/I18N';
|
||||
import { CallHistoryGroupPanelSection } from './conversation/conversation-details/CallHistoryGroupPanelSection';
|
||||
import { PanelSection } from './conversation/conversation-details/PanelSection';
|
||||
import type { CallHistoryGroup } from '../types/CallDisposition.js';
|
||||
import type { LocalizerType } from '../types/I18N.js';
|
||||
import { CallHistoryGroupPanelSection } from './conversation/conversation-details/CallHistoryGroupPanelSection.js';
|
||||
import { PanelSection } from './conversation/conversation-details/PanelSection.js';
|
||||
import {
|
||||
ConversationDetailsIcon,
|
||||
IconType,
|
||||
} from './conversation/conversation-details/ConversationDetailsIcon';
|
||||
import { PanelRow } from './conversation/conversation-details/PanelRow';
|
||||
import type { CallLinkRestrictions, CallLinkType } from '../types/CallLink';
|
||||
import { linkCallRoute } from '../util/signalRoutes';
|
||||
import { drop } from '../util/drop';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button';
|
||||
import { copyCallLink } from '../util/copyLinksWithToast';
|
||||
import { getColorForCallLink } from '../util/getColorForCallLink';
|
||||
import { isCallLinkAdmin } from '../types/CallLink';
|
||||
import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog';
|
||||
import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip';
|
||||
import { offsetDistanceModifier } from '../util/popperUtil';
|
||||
import { Tooltip, TooltipPlacement } from './Tooltip';
|
||||
} from './conversation/conversation-details/ConversationDetailsIcon.js';
|
||||
import { PanelRow } from './conversation/conversation-details/PanelRow.js';
|
||||
import type { CallLinkRestrictions, CallLinkType } from '../types/CallLink.js';
|
||||
import { linkCallRoute } from '../util/signalRoutes.js';
|
||||
import { drop } from '../util/drop.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button.js';
|
||||
import { copyCallLink } from '../util/copyLinksWithToast.js';
|
||||
import { getColorForCallLink } from '../util/getColorForCallLink.js';
|
||||
import { isCallLinkAdmin } from '../types/CallLink.js';
|
||||
import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect.js';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog.js';
|
||||
import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip.js';
|
||||
import { offsetDistanceModifier } from '../util/popperUtil.js';
|
||||
import { Tooltip, TooltipPlacement } from './Tooltip.js';
|
||||
|
||||
function toUrlWithoutProtocol(url: URL): string {
|
||||
return `${url.hostname}${url.pathname}${url.search}${url.hash}`;
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { CallLinkEditModalProps } from './CallLinkEditModal';
|
||||
import { CallLinkEditModal } from './CallLinkEditModal';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink';
|
||||
import type { CallLinkEditModalProps } from './CallLinkEditModal.js';
|
||||
import { CallLinkEditModal } from './CallLinkEditModal.js';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
import { FAKE_CALL_LINK_WITH_ADMIN_KEY } from '../test-helpers/fakeCallLink.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,16 +4,15 @@
|
||||
import type { ReactNode } from 'react';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { v4 as generateUuid } from 'uuid';
|
||||
import { Modal } from './Modal';
|
||||
import type { LocalizerType } from '../types/I18N';
|
||||
import type { CallLinkRestrictions } from '../types/CallLink';
|
||||
import { type CallLinkType } from '../types/CallLink';
|
||||
import { linkCallRoute } from '../util/signalRoutes';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { getColorForCallLink } from '../util/getColorForCallLink';
|
||||
import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect';
|
||||
import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip';
|
||||
import { Modal } from './Modal.js';
|
||||
import type { LocalizerType } from '../types/I18N.js';
|
||||
import type { CallLinkRestrictions, CallLinkType } from '../types/CallLink.js';
|
||||
import { linkCallRoute } from '../util/signalRoutes.js';
|
||||
import { Button, ButtonSize, ButtonVariant } from './Button.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { getColorForCallLink } from '../util/getColorForCallLink.js';
|
||||
import { CallLinkRestrictionsSelect } from './CallLinkRestrictionsSelect.js';
|
||||
import { InAnotherCallTooltip } from './conversation/InAnotherCallTooltip.js';
|
||||
|
||||
const CallLinkEditModalRowIconClasses = {
|
||||
Edit: 'CallLinkEditModal__RowIcon--Edit',
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { CallLinkPendingParticipantModalProps } from './CallLinkPendingParticipantModal';
|
||||
import { CallLinkPendingParticipantModal } from './CallLinkPendingParticipantModal';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import type { CallLinkPendingParticipantModalProps } from './CallLinkPendingParticipantModal.js';
|
||||
import { CallLinkPendingParticipantModal } from './CallLinkPendingParticipantModal.js';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { useCallback, useEffect, useMemo } from 'react';
|
||||
import { Modal } from './Modal';
|
||||
import type { LocalizerType } from '../types/I18N';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import type { PendingUserActionPayloadType } from '../state/ducks/calling';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { InContactsIcon } from './InContactsIcon';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts';
|
||||
import { ThemeType } from '../types/Util';
|
||||
import { Theme } from '../util/theme';
|
||||
import { UserText } from './UserText';
|
||||
import { SharedGroupNames } from './SharedGroupNames';
|
||||
import { Modal } from './Modal.js';
|
||||
import type { LocalizerType } from '../types/I18N.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import type { PendingUserActionPayloadType } from '../state/ducks/calling.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { InContactsIcon } from './InContactsIcon.js';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts.js';
|
||||
import { ThemeType } from '../types/Util.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
import { UserText } from './UserText.js';
|
||||
import { SharedGroupNames } from './SharedGroupNames.js';
|
||||
|
||||
export type CallLinkPendingParticipantModalProps = {
|
||||
readonly i18n: LocalizerType;
|
||||
|
||||
@@ -4,9 +4,9 @@ import React from 'react';
|
||||
import {
|
||||
CallLinkRestrictions,
|
||||
toCallLinkRestrictions,
|
||||
} from '../types/CallLink';
|
||||
import type { LocalizerType } from '../types/I18N';
|
||||
import { Select } from './Select';
|
||||
} from '../types/CallLink.js';
|
||||
import type { LocalizerType } from '../types/I18N.js';
|
||||
import { Select } from './Select.js';
|
||||
|
||||
export type CallLinkRestrictionsSelectProps = Readonly<{
|
||||
disabled?: boolean;
|
||||
|
||||
@@ -4,36 +4,36 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallManager';
|
||||
import { CallManager } from './CallManager';
|
||||
import type { PropsType } from './CallManager.js';
|
||||
import { CallManager } from './CallManager.js';
|
||||
import {
|
||||
CallEndedReason,
|
||||
CallState,
|
||||
CallViewMode,
|
||||
GroupCallConnectionState,
|
||||
GroupCallJoinState,
|
||||
} from '../types/Calling';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
} from '../types/Calling.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import type {
|
||||
ActiveGroupCallType,
|
||||
GroupCallRemoteParticipantType,
|
||||
} from '../types/Calling';
|
||||
} from '../types/Calling.js';
|
||||
import type {
|
||||
ConversationType,
|
||||
ConversationTypeType,
|
||||
} from '../state/ducks/conversations';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource';
|
||||
import { StorySendMode } from '../types/Stories';
|
||||
} from '../state/ducks/conversations.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { generateAci } from '../types/ServiceId.js';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.js';
|
||||
import { StorySendMode } from '../types/Stories.js';
|
||||
import {
|
||||
FAKE_CALL_LINK,
|
||||
FAKE_CALL_LINK_WITH_ADMIN_KEY,
|
||||
getDefaultCallLinkConversation,
|
||||
} from '../test-helpers/fakeCallLink';
|
||||
import { allRemoteParticipants } from './CallScreen.stories';
|
||||
import { getPlaceholderContact } from '../state/selectors/conversations';
|
||||
} from '../test-helpers/fakeCallLink.js';
|
||||
import { allRemoteParticipants } from './CallScreen.stories.js';
|
||||
import { getPlaceholderContact } from '../state/selectors/conversations.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,26 +4,26 @@
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
import type { VideoFrameSource } from '@signalapp/ringrtc';
|
||||
import { CallNeedPermissionScreen } from './CallNeedPermissionScreen';
|
||||
import { CallScreen } from './CallScreen';
|
||||
import { CallingLobby } from './CallingLobby';
|
||||
import { CallingParticipantsList } from './CallingParticipantsList';
|
||||
import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal';
|
||||
import { CallingPip } from './CallingPip';
|
||||
import { IncomingCallBar } from './IncomingCallBar';
|
||||
import { CallNeedPermissionScreen } from './CallNeedPermissionScreen.js';
|
||||
import { CallScreen } from './CallScreen.js';
|
||||
import { CallingLobby } from './CallingLobby.js';
|
||||
import { CallingParticipantsList } from './CallingParticipantsList.js';
|
||||
import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal.js';
|
||||
import { CallingPip } from './CallingPip.js';
|
||||
import { IncomingCallBar } from './IncomingCallBar.js';
|
||||
import type {
|
||||
ActiveCallType,
|
||||
CallViewMode,
|
||||
GroupCallConnectionState,
|
||||
GroupCallVideoRequest,
|
||||
} from '../types/Calling';
|
||||
} from '../types/Calling.js';
|
||||
import {
|
||||
CallEndedReason,
|
||||
CallState,
|
||||
GroupCallJoinState,
|
||||
} from '../types/Calling';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
} from '../types/Calling.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import type {
|
||||
AcceptCallType,
|
||||
BatchUserActionPayloadType,
|
||||
@@ -40,26 +40,26 @@ import type {
|
||||
SetLocalVideoType,
|
||||
SetRendererCanvasType,
|
||||
StartCallType,
|
||||
} from '../state/ducks/calling';
|
||||
import { CallLinkRestrictions } from '../types/CallLink';
|
||||
import type { CallLinkType } from '../types/CallLink';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { CallingToastProvider } from './CallingToast';
|
||||
import type { SmartReactionPicker } from '../state/smart/ReactionPicker';
|
||||
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker';
|
||||
import { createLogger } from '../logging/log';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall';
|
||||
import { CallingAdhocCallInfo } from './CallingAdhocCallInfo';
|
||||
import { callLinkRootKeyToUrl } from '../util/callLinkRootKeyToUrl';
|
||||
import { usePrevious } from '../hooks/usePrevious';
|
||||
import { copyCallLink } from '../util/copyLinksWithToast';
|
||||
} from '../state/ducks/calling.js';
|
||||
import { CallLinkRestrictions } from '../types/CallLink.js';
|
||||
import type { CallLinkType } from '../types/CallLink.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { CallingToastProvider } from './CallingToast.js';
|
||||
import type { SmartReactionPicker } from '../state/smart/ReactionPicker.js';
|
||||
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker.js';
|
||||
import { createLogger } from '../logging/log.js';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.js';
|
||||
import { CallingAdhocCallInfo } from './CallingAdhocCallInfo.js';
|
||||
import { callLinkRootKeyToUrl } from '../util/callLinkRootKeyToUrl.js';
|
||||
import { usePrevious } from '../hooks/usePrevious.js';
|
||||
import { copyCallLink } from '../util/copyLinksWithToast.js';
|
||||
import {
|
||||
redactNotificationProfileId,
|
||||
shouldNotify,
|
||||
} from '../types/NotificationProfile';
|
||||
import type { NotificationProfileType } from '../types/NotificationProfile';
|
||||
import { strictAssert } from '../util/assert';
|
||||
} from '../types/NotificationProfile.js';
|
||||
import type { NotificationProfileType } from '../types/NotificationProfile.js';
|
||||
import { strictAssert } from '../util/assert.js';
|
||||
|
||||
const log = createLogger('CallManager');
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { ComponentMeta } from '../storybook/types';
|
||||
import type { Props } from './CallNeedPermissionScreen';
|
||||
import { CallNeedPermissionScreen } from './CallNeedPermissionScreen';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import type { ComponentMeta } from '../storybook/types.js';
|
||||
import type { Props } from './CallNeedPermissionScreen.js';
|
||||
import { CallNeedPermissionScreen } from './CallNeedPermissionScreen.js';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { useRef, useEffect } from 'react';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { I18n } from './I18n';
|
||||
import { ContactName } from './conversation/ContactName';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { I18n } from './I18n.js';
|
||||
import { ContactName } from './conversation/ContactName.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
|
||||
export type Props = {
|
||||
conversation: Pick<
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
|
||||
export type PropsType = {
|
||||
callMode: CallMode.Group | CallMode.Adhoc;
|
||||
|
||||
@@ -12,8 +12,8 @@ import React, {
|
||||
} from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { useIsMounted } from '../hooks/useIsMounted';
|
||||
import { CallReactionBurstEmoji } from './CallReactionBurstEmoji';
|
||||
import { useIsMounted } from '../hooks/useIsMounted.js';
|
||||
import { CallReactionBurstEmoji } from './CallReactionBurstEmoji.js';
|
||||
|
||||
const LIFETIME = 3000;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import React from 'react';
|
||||
import { animated, useSpring } from '@react-spring/web';
|
||||
import { random } from 'lodash';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { Emojify } from './conversation/Emojify';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion';
|
||||
import { Emojify } from './conversation/Emojify.js';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion.js';
|
||||
|
||||
export type PropsType = {
|
||||
values: Array<string>;
|
||||
|
||||
@@ -11,30 +11,30 @@ import type {
|
||||
ActiveGroupCallType,
|
||||
GroupCallRemoteParticipantType,
|
||||
ObservedRemoteMuteType,
|
||||
} from '../types/Calling';
|
||||
} from '../types/Calling.js';
|
||||
import {
|
||||
CallViewMode,
|
||||
CallState,
|
||||
GroupCallConnectionState,
|
||||
GroupCallJoinState,
|
||||
} from '../types/Calling';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import type { AciString } from '../types/ServiceId';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { PropsType } from './CallScreen';
|
||||
import { CallScreen as UnwrappedCallScreen } from './CallScreen';
|
||||
import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
} from '../types/Calling.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import { generateAci } from '../types/ServiceId.js';
|
||||
import type { AciString } from '../types/ServiceId.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { PropsType } from './CallScreen.js';
|
||||
import { CallScreen as UnwrappedCallScreen } from './CallScreen.js';
|
||||
import { DEFAULT_PREFERRED_REACTION_EMOJI } from '../reactions/constants.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import {
|
||||
getDefaultConversation,
|
||||
getDefaultConversationWithServiceId,
|
||||
} from '../test-helpers/getDefaultConversation';
|
||||
import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource';
|
||||
import { CallingToastProvider, useCallingToasts } from './CallingToast';
|
||||
import type { CallingImageDataCache } from './CallManager';
|
||||
import { MINUTE } from '../util/durations';
|
||||
} from '../test-helpers/getDefaultConversation.js';
|
||||
import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.js';
|
||||
import { CallingToastProvider, useCallingToasts } from './CallingToast.js';
|
||||
import type { CallingImageDataCache } from './CallManager.js';
|
||||
import { MINUTE } from '../util/durations/index.js';
|
||||
|
||||
const MAX_PARTICIPANTS = 75;
|
||||
const LOCAL_DEMUX_ID = 1;
|
||||
|
||||
@@ -16,88 +16,88 @@ import type {
|
||||
SetLocalVideoType,
|
||||
SetRendererCanvasType,
|
||||
SetMutedByType,
|
||||
} from '../state/ducks/calling';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { CallingHeader, getCallViewIconClassname } from './CallingHeader';
|
||||
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import { TooltipPlacement } from './Tooltip';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur';
|
||||
} from '../state/ducks/calling.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { CallingHeader, getCallViewIconClassname } from './CallingHeader.js';
|
||||
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.js';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton.js';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import { TooltipPlacement } from './Tooltip.js';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur.js';
|
||||
import type {
|
||||
ActiveCallType,
|
||||
ActiveCallReactionsType,
|
||||
ConversationsByDemuxIdType,
|
||||
GroupCallVideoRequest,
|
||||
} from '../types/Calling';
|
||||
} from '../types/Calling.js';
|
||||
import {
|
||||
CALLING_REACTIONS_LIFETIME,
|
||||
CallViewMode,
|
||||
CallState,
|
||||
GroupCallConnectionState,
|
||||
GroupCallJoinState,
|
||||
} from '../types/Calling';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
} from '../types/Calling.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import type { ServiceIdString } from '../types/ServiceId.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import {
|
||||
CallingButtonToastsContainer,
|
||||
useScreenSharingStoppedToast,
|
||||
} from './CallingToastManager';
|
||||
import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant';
|
||||
import { GroupCallRemoteParticipants } from './GroupCallRemoteParticipants';
|
||||
import { CallParticipantCount } from './CallParticipantCount';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { NeedsScreenRecordingPermissionsModal } from './NeedsScreenRecordingPermissionsModal';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import * as KeyboardLayout from '../services/keyboardLayout';
|
||||
} from './CallingToastManager.js';
|
||||
import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant.js';
|
||||
import { GroupCallRemoteParticipants } from './GroupCallRemoteParticipants.js';
|
||||
import { CallParticipantCount } from './CallParticipantCount.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { NeedsScreenRecordingPermissionsModal } from './NeedsScreenRecordingPermissionsModal.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import * as KeyboardLayout from '../services/keyboardLayout.js';
|
||||
import {
|
||||
usePresenter,
|
||||
useActivateSpeakerViewOnPresenting,
|
||||
} from '../hooks/useActivateSpeakerViewOnPresenting';
|
||||
} from '../hooks/useActivateSpeakerViewOnPresenting.js';
|
||||
import {
|
||||
CallingAudioIndicator,
|
||||
SPEAKING_LINGER_MS,
|
||||
} from './CallingAudioIndicator';
|
||||
} from './CallingAudioIndicator.js';
|
||||
import {
|
||||
useActiveCallShortcuts,
|
||||
useKeyboardShortcuts,
|
||||
} from '../hooks/useKeyboardShortcuts';
|
||||
import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate';
|
||||
import { isReconnecting as callingIsReconnecting } from '../util/callingIsReconnecting';
|
||||
import { usePrevious } from '../hooks/usePrevious';
|
||||
} from '../hooks/useKeyboardShortcuts.js';
|
||||
import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.js';
|
||||
import { isReconnecting as callingIsReconnecting } from '../util/callingIsReconnecting.js';
|
||||
import { usePrevious } from '../hooks/usePrevious.js';
|
||||
import {
|
||||
CallingToastProvider,
|
||||
PersistentCallingToast,
|
||||
useCallingToasts,
|
||||
} from './CallingToast';
|
||||
import { handleOutsideClick } from '../util/handleOutsideClick';
|
||||
import { Spinner } from './Spinner';
|
||||
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker';
|
||||
import type { SmartReactionPicker } from '../state/smart/ReactionPicker';
|
||||
} from './CallingToast.js';
|
||||
import { handleOutsideClick } from '../util/handleOutsideClick.js';
|
||||
import { Spinner } from './Spinner.js';
|
||||
import type { Props as ReactionPickerProps } from './conversation/ReactionPicker.js';
|
||||
import type { SmartReactionPicker } from '../state/smart/ReactionPicker.js';
|
||||
import {
|
||||
CallingRaisedHandsList,
|
||||
CallingRaisedHandsListButton,
|
||||
} from './CallingRaisedHandsList';
|
||||
import type { CallReactionBurstType } from './CallReactionBurst';
|
||||
} from './CallingRaisedHandsList.js';
|
||||
import type { CallReactionBurstType } from './CallReactionBurst.js';
|
||||
import {
|
||||
CallReactionBurstProvider,
|
||||
useCallReactionBursts,
|
||||
} from './CallReactionBurst';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall';
|
||||
import { assertDev, strictAssert } from '../util/assert';
|
||||
import { emojiToData } from './emoji/lib';
|
||||
import { CallingPendingParticipants } from './CallingPendingParticipants';
|
||||
import type { CallingImageDataCache } from './CallManager';
|
||||
import { FunStaticEmoji } from './fun/FunEmoji';
|
||||
} from './CallReactionBurst.js';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.js';
|
||||
import { assertDev, strictAssert } from '../util/assert.js';
|
||||
import { emojiToData } from './emoji/lib.js';
|
||||
import { CallingPendingParticipants } from './CallingPendingParticipants.js';
|
||||
import type { CallingImageDataCache } from './CallManager.js';
|
||||
import { FunStaticEmoji } from './fun/FunEmoji.js';
|
||||
import {
|
||||
getEmojiVariantByKey,
|
||||
getEmojiVariantKeyByValue,
|
||||
isEmojiVariantValue,
|
||||
} from './fun/data/emojis';
|
||||
import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer';
|
||||
import { BeforeNavigateResponse } from '../services/BeforeNavigate';
|
||||
} from './fun/data/emojis.js';
|
||||
import { useFunEmojiLocalizer } from './fun/useFunEmojiLocalizer.js';
|
||||
import { BeforeNavigateResponse } from '../services/BeforeNavigate.js';
|
||||
|
||||
export type PropsType = {
|
||||
activeCall: ActiveCallType;
|
||||
|
||||
@@ -6,14 +6,14 @@ import { sample } from 'lodash';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingAdhocCallInfo';
|
||||
import { CallingAdhocCallInfo } from './CallingAdhocCallInfo';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { GroupCallRemoteParticipantType } from '../types/Calling';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import type { CallLinkType } from '../types/CallLink';
|
||||
import { CallLinkRestrictions } from '../types/CallLink';
|
||||
import type { PropsType } from './CallingAdhocCallInfo.js';
|
||||
import { CallingAdhocCallInfo } from './CallingAdhocCallInfo.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { GroupCallRemoteParticipantType } from '../types/Calling.js';
|
||||
import { generateAci } from '../types/ServiceId.js';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
import type { CallLinkType } from '../types/CallLink.js';
|
||||
import { CallLinkRestrictions } from '../types/CallLink.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -5,22 +5,22 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { partition } from 'lodash';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { ContactName } from './conversation/ContactName';
|
||||
import { InContactsIcon } from './InContactsIcon';
|
||||
import type { CallLinkType } from '../types/CallLink';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
import { sortByTitle } from '../util/sortByTitle';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { ModalHost } from './ModalHost';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts';
|
||||
import type { RemoveClientType } from '../state/ducks/calling';
|
||||
import { AVATAR_COLOR_COUNT, AvatarColors } from '../types/Colors';
|
||||
import { Button } from './Button';
|
||||
import { Modal } from './Modal';
|
||||
import { Theme } from '../util/theme';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { ContactName } from './conversation/ContactName.js';
|
||||
import { InContactsIcon } from './InContactsIcon.js';
|
||||
import type { CallLinkType } from '../types/CallLink.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type { ServiceIdString } from '../types/ServiceId.js';
|
||||
import { sortByTitle } from '../util/sortByTitle.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { ModalHost } from './ModalHost.js';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts.js';
|
||||
import type { RemoveClientType } from '../state/ducks/calling.js';
|
||||
import { AVATAR_COLOR_COUNT, AvatarColors } from '../types/Colors.js';
|
||||
import { Button } from './Button.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog.js';
|
||||
|
||||
const MAX_UNKNOWN_AVATARS_COUNT = 3;
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { Props } from './CallingAudioIndicator';
|
||||
import type { Props } from './CallingAudioIndicator.js';
|
||||
import {
|
||||
CallingAudioIndicator,
|
||||
SPEAKING_LINGER_MS,
|
||||
} from './CallingAudioIndicator';
|
||||
import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants';
|
||||
import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate';
|
||||
} from './CallingAudioIndicator.js';
|
||||
import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants.js';
|
||||
import { useValueAtFixedRate } from '../hooks/useValueAtFixedRate.js';
|
||||
|
||||
export default {
|
||||
title: 'Components/CallingAudioIndicator',
|
||||
|
||||
@@ -6,8 +6,8 @@ import type { ReactElement } from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { useSpring, animated } from '@react-spring/web';
|
||||
|
||||
import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { AUDIO_LEVEL_INTERVAL_MS } from '../calling/constants.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
|
||||
export const SPEAKING_LINGER_MS = 200;
|
||||
const BASE_CLASS_NAME = 'CallingAudioIndicator';
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingButton';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton';
|
||||
import { TooltipPlacement } from './Tooltip';
|
||||
import type { PropsType } from './CallingButton.js';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton.js';
|
||||
import { TooltipPlacement } from './Tooltip.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import type { TooltipPlacement } from './Tooltip';
|
||||
import { Tooltip } from './Tooltip';
|
||||
import { Theme } from '../util/theme';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { TooltipPlacement } from './Tooltip.js';
|
||||
import { Tooltip } from './Tooltip.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
|
||||
export enum CallingButtonType {
|
||||
AUDIO_DISABLED = 'AUDIO_DISABLED',
|
||||
|
||||
@@ -5,8 +5,8 @@ import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { Props } from './CallingDeviceSelection';
|
||||
import { CallingDeviceSelection } from './CallingDeviceSelection';
|
||||
import type { Props } from './CallingDeviceSelection.js';
|
||||
import { CallingDeviceSelection } from './CallingDeviceSelection.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
import * as React from 'react';
|
||||
import type { AudioDevice } from '@signalapp/ringrtc';
|
||||
|
||||
import type { Option } from './Select';
|
||||
import { Modal } from './Modal';
|
||||
import { Select } from './Select';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { Option } from './Select.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import { Select } from './Select.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type {
|
||||
ChangeIODevicePayloadType,
|
||||
MediaDeviceSettings,
|
||||
} from '../types/Calling';
|
||||
import { CallingDeviceType } from '../types/Calling';
|
||||
import { Theme } from '../util/theme';
|
||||
} from '../types/Calling.js';
|
||||
import { CallingDeviceType } from '../types/Calling.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
|
||||
export type Props = MediaDeviceSettings & {
|
||||
changeIODevice: (payload: ChangeIODevicePayloadType) => void;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingHeader';
|
||||
import { CallingHeader } from './CallingHeader';
|
||||
import { CallViewMode } from '../types/Calling';
|
||||
import type { PropsType } from './CallingHeader.js';
|
||||
import { CallingHeader } from './CallingHeader.js';
|
||||
import { CallViewMode } from '../types/Calling.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
import classNames from 'classnames';
|
||||
import React from 'react';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { CallViewMode } from '../types/Calling';
|
||||
import { Tooltip } from './Tooltip';
|
||||
import { Theme } from '../util/theme';
|
||||
import { ContextMenu } from './ContextMenu';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { CallViewMode } from '../types/Calling.js';
|
||||
import { Tooltip } from './Tooltip.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
import { ContextMenu } from './ContextMenu.js';
|
||||
|
||||
export type PropsType = {
|
||||
callViewMode?: CallViewMode;
|
||||
|
||||
@@ -7,18 +7,18 @@ import { action } from '@storybook/addon-actions';
|
||||
import { v4 as generateUuid } from 'uuid';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { PropsType } from './CallingLobby';
|
||||
import { CallingLobby as UnwrappedCallingLobby } from './CallingLobby';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import type { PropsType } from './CallingLobby.js';
|
||||
import { CallingLobby as UnwrappedCallingLobby } from './CallingLobby.js';
|
||||
import { generateAci } from '../types/ServiceId.js';
|
||||
import {
|
||||
getDefaultConversation,
|
||||
getDefaultConversationWithServiceId,
|
||||
} from '../test-helpers/getDefaultConversation';
|
||||
import { CallingToastProvider } from './CallingToast';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import { getDefaultCallLinkConversation } from '../test-helpers/fakeCallLink';
|
||||
} from '../test-helpers/getDefaultConversation.js';
|
||||
import { CallingToastProvider } from './CallingToast.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import { getDefaultCallLinkConversation } from '../test-helpers/fakeCallLink.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -7,28 +7,28 @@ import { FocusScope } from 'react-aria';
|
||||
import type {
|
||||
SetLocalAudioType,
|
||||
SetLocalVideoType,
|
||||
} from '../state/ducks/calling';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton';
|
||||
import { TooltipPlacement } from './Tooltip';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur';
|
||||
import { CallParticipantCount } from './CallParticipantCount';
|
||||
import { CallingHeader } from './CallingHeader';
|
||||
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo';
|
||||
} from '../state/ducks/calling.js';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton.js';
|
||||
import { TooltipPlacement } from './Tooltip.js';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur.js';
|
||||
import { CallParticipantCount } from './CallParticipantCount.js';
|
||||
import { CallingHeader } from './CallingHeader.js';
|
||||
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.js';
|
||||
import {
|
||||
CallingLobbyJoinButton,
|
||||
CallingLobbyJoinButtonVariant,
|
||||
} from './CallingLobbyJoinButton';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import type { CallingConversationType } from '../types/Calling';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { useIsOnline } from '../hooks/useIsOnline';
|
||||
import * as KeyboardLayout from '../services/keyboardLayout';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { useCallingToasts } from './CallingToast';
|
||||
import { CallingButtonToastsContainer } from './CallingToastManager';
|
||||
import { isGroupOrAdhocCallMode } from '../util/isGroupOrAdhocCall';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import { SpinnerV2 } from './SpinnerV2';
|
||||
} from './CallingLobbyJoinButton.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import type { CallingConversationType } from '../types/Calling.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { useIsOnline } from '../hooks/useIsOnline.js';
|
||||
import * as KeyboardLayout from '../services/keyboardLayout.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { useCallingToasts } from './CallingToast.js';
|
||||
import { CallingButtonToastsContainer } from './CallingToastManager.js';
|
||||
import { isGroupOrAdhocCallMode } from '../util/isGroupOrAdhocCall.js';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import { SpinnerV2 } from './SpinnerV2.js';
|
||||
|
||||
export type PropsType = {
|
||||
availableCameras: Array<MediaDeviceInfo>;
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { ReactChild } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import { Spinner } from './Spinner';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import { Spinner } from './Spinner.js';
|
||||
|
||||
export enum CallingLobbyJoinButtonVariant {
|
||||
CallIsFull = 'CallIsFull',
|
||||
|
||||
@@ -6,10 +6,10 @@ import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingParticipantsList';
|
||||
import { CallingParticipantsList } from './CallingParticipantsList';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import { createCallParticipant } from '../test-helpers/createCallParticipant';
|
||||
import type { PropsType } from './CallingParticipantsList.js';
|
||||
import { CallingParticipantsList } from './CallingParticipantsList.js';
|
||||
import { generateAci } from '../types/ServiceId.js';
|
||||
import { createCallParticipant } from '../test-helpers/createCallParticipant.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ import React, { useContext } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import classNames from 'classnames';
|
||||
import { FocusScope } from 'react-aria';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { ContactName } from './conversation/ContactName';
|
||||
import { InContactsIcon } from './InContactsIcon';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
import { sortByTitle } from '../util/sortByTitle';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts';
|
||||
import { ModalContainerContext } from './ModalHost';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { ContactName } from './conversation/ContactName.js';
|
||||
import { InContactsIcon } from './InContactsIcon.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type { ServiceIdString } from '../types/ServiceId.js';
|
||||
import { sortByTitle } from '../util/sortByTitle.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts.js';
|
||||
import { ModalContainerContext } from './ModalHost.js';
|
||||
|
||||
type ParticipantType = ConversationType & {
|
||||
hasRemoteAudio?: boolean;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingPendingParticipants';
|
||||
import { CallingPendingParticipants } from './CallingPendingParticipants';
|
||||
import { allRemoteParticipants } from './CallScreen.stories';
|
||||
import type { PropsType } from './CallingPendingParticipants.js';
|
||||
import { CallingPendingParticipants } from './CallingPendingParticipants.js';
|
||||
import { allRemoteParticipants } from './CallScreen.stories.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -7,24 +7,24 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { noop } from 'lodash';
|
||||
import classNames from 'classnames';
|
||||
import { animated, useSpring } from '@react-spring/web';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { ContactName } from './conversation/ContactName';
|
||||
import { InContactsIcon } from './InContactsIcon';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { ContactName } from './conversation/ContactName.js';
|
||||
import { InContactsIcon } from './InContactsIcon.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { isInSystemContacts } from '../util/isInSystemContacts.js';
|
||||
import type {
|
||||
BatchUserActionPayloadType,
|
||||
PendingUserActionPayloadType,
|
||||
} from '../state/ducks/calling';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
import { handleOutsideClick } from '../util/handleOutsideClick';
|
||||
import { Theme } from '../util/theme';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog';
|
||||
import { usePrevious } from '../hooks/usePrevious';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion';
|
||||
import { drop } from '../util/drop';
|
||||
} from '../state/ducks/calling.js';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import type { ServiceIdString } from '../types/ServiceId.js';
|
||||
import { handleOutsideClick } from '../util/handleOutsideClick.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
import { ConfirmationDialog } from './ConfirmationDialog.js';
|
||||
import { usePrevious } from '../hooks/usePrevious.js';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion.js';
|
||||
import { drop } from '../util/drop.js';
|
||||
|
||||
enum ConfirmDialogState {
|
||||
None = 'None',
|
||||
|
||||
@@ -5,23 +5,23 @@ import * as React from 'react';
|
||||
import { times } from 'lodash';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { PropsType } from './CallingPip';
|
||||
import { CallingPip } from './CallingPip';
|
||||
import type { ActiveDirectCallType } from '../types/Calling';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import type { PropsType } from './CallingPip.js';
|
||||
import { CallingPip } from './CallingPip.js';
|
||||
import type { ActiveDirectCallType } from '../types/Calling.js';
|
||||
import {
|
||||
CallViewMode,
|
||||
CallState,
|
||||
GroupCallConnectionState,
|
||||
GroupCallJoinState,
|
||||
} from '../types/Calling';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource';
|
||||
import { MINUTE } from '../util/durations';
|
||||
import type { SetRendererCanvasType } from '../state/ducks/calling';
|
||||
import { createCallParticipant } from '../test-helpers/createCallParticipant';
|
||||
} from '../types/Calling.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
import { fakeGetGroupCallVideoFrameSource } from '../test-helpers/fakeGetGroupCallVideoFrameSource.js';
|
||||
import { MINUTE } from '../util/durations/index.js';
|
||||
import type { SetRendererCanvasType } from '../state/ducks/calling.js';
|
||||
import { createCallParticipant } from '../test-helpers/createCallParticipant.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -7,22 +7,25 @@ import { minBy, debounce, noop } from 'lodash';
|
||||
|
||||
import type { VideoFrameSource } from '@signalapp/ringrtc';
|
||||
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall';
|
||||
import { useActivateSpeakerViewOnPresenting } from '../hooks/useActivateSpeakerViewOnPresenting';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import { TooltipPlacement } from './Tooltip';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton';
|
||||
import { CallingPipRemoteVideo } from './CallingPipRemoteVideo';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.js';
|
||||
import { useActivateSpeakerViewOnPresenting } from '../hooks/useActivateSpeakerViewOnPresenting.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import { TooltipPlacement } from './Tooltip.js';
|
||||
import { CallingButton, CallingButtonType } from './CallingButton.js';
|
||||
import { CallingPipRemoteVideo } from './CallingPipRemoteVideo.js';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur.js';
|
||||
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ActiveCallType, GroupCallVideoRequest } from '../types/Calling';
|
||||
import type { SetRendererCanvasType } from '../state/ducks/calling';
|
||||
import type { CallingImageDataCache } from './CallManager';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type {
|
||||
ActiveCallType,
|
||||
GroupCallVideoRequest,
|
||||
} from '../types/Calling.js';
|
||||
import type { SetRendererCanvasType } from '../state/ducks/calling.js';
|
||||
import type { CallingImageDataCache } from './CallManager.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
|
||||
enum PositionMode {
|
||||
BeingDragged,
|
||||
|
||||
@@ -4,34 +4,34 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { clamp, isNumber, maxBy } from 'lodash';
|
||||
import type { VideoFrameSource } from '@signalapp/ringrtc';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur';
|
||||
import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant';
|
||||
import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { CallBackgroundBlur } from './CallBackgroundBlur.js';
|
||||
import { DirectCallRemoteParticipant } from './DirectCallRemoteParticipant.js';
|
||||
import { GroupCallRemoteParticipant } from './GroupCallRemoteParticipant.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import {
|
||||
GroupCallJoinState,
|
||||
type ActiveCallType,
|
||||
type GroupCallRemoteParticipantType,
|
||||
type GroupCallVideoRequest,
|
||||
} from '../types/Calling';
|
||||
import { CallMode } from '../types/CallDisposition';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import type { SetRendererCanvasType } from '../state/ducks/calling';
|
||||
import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer';
|
||||
import { MAX_FRAME_HEIGHT } from '../calling/constants';
|
||||
import { usePageVisibility } from '../hooks/usePageVisibility';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant';
|
||||
import { isReconnecting } from '../util/callingIsReconnecting';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall';
|
||||
import { assertDev } from '../util/assert';
|
||||
import type { CallingImageDataCache } from './CallManager';
|
||||
} from '../types/Calling.js';
|
||||
import { CallMode } from '../types/CallDisposition.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import type { SetRendererCanvasType } from '../state/ducks/calling.js';
|
||||
import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer.js';
|
||||
import { MAX_FRAME_HEIGHT } from '../calling/constants.js';
|
||||
import { usePageVisibility } from '../hooks/usePageVisibility.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant.js';
|
||||
import { isReconnecting } from '../util/callingIsReconnecting.js';
|
||||
import { isGroupOrAdhocActiveCall } from '../util/isGroupOrAdhocCall.js';
|
||||
import { assertDev } from '../util/assert.js';
|
||||
import type { CallingImageDataCache } from './CallManager.js';
|
||||
import {
|
||||
PIP_MAXIMUM_HEIGHT_MULTIPLIER,
|
||||
PIP_MINIMUM_HEIGHT_MULTIPLIER,
|
||||
PIP_WIDTH_NORMAL,
|
||||
} from './CallingPip';
|
||||
} from './CallingPip.js';
|
||||
|
||||
function BlurredBackground({
|
||||
activeCall,
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
import React from 'react';
|
||||
import { times } from 'lodash';
|
||||
import type { Meta } from '@storybook/react';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation';
|
||||
import type { PropsType } from './CallingPreCallInfo';
|
||||
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { getPlaceholderContact } from '../state/selectors/conversations';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
import { FAKE_CALL_LINK } from '../test-helpers/fakeCallLink';
|
||||
import { callLinkToConversation } from '../util/callLinks';
|
||||
import { getDefaultConversation } from '../test-helpers/getDefaultConversation.js';
|
||||
import type { PropsType } from './CallingPreCallInfo.js';
|
||||
import { CallingPreCallInfo, RingMode } from './CallingPreCallInfo.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { getPlaceholderContact } from '../state/selectors/conversations.js';
|
||||
import { generateAci } from '../types/ServiceId.js';
|
||||
import { FAKE_CALL_LINK } from '../test-helpers/fakeCallLink.js';
|
||||
import { callLinkToConversation } from '../util/callLinks.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
const getDefaultGroupConversation = () =>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
import React from 'react';
|
||||
import { partition } from 'lodash';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import type { CallingConversationType } from '../types/Calling';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { getParticipantName } from '../util/callingGetParticipantName';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
import { UserText } from './UserText';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import type { CallingConversationType } from '../types/Calling.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { getParticipantName } from '../util/callingGetParticipantName.js';
|
||||
import { missingCaseError } from '../util/missingCaseError.js';
|
||||
import { UserText } from './UserText.js';
|
||||
|
||||
export enum RingMode {
|
||||
WillNotRing,
|
||||
|
||||
@@ -9,14 +9,14 @@ import type { Meta } from '@storybook/react';
|
||||
import type {
|
||||
CallingRaisedHandsListButtonPropsType,
|
||||
PropsType,
|
||||
} from './CallingRaisedHandsList';
|
||||
} from './CallingRaisedHandsList.js';
|
||||
import {
|
||||
CallingRaisedHandsList,
|
||||
CallingRaisedHandsListButton,
|
||||
} from './CallingRaisedHandsList';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { AvatarColors } from '../types/Colors';
|
||||
import { getDefaultConversationWithServiceId } from '../test-helpers/getDefaultConversation';
|
||||
} from './CallingRaisedHandsList.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { AvatarColors } from '../types/Colors.js';
|
||||
import { getDefaultConversationWithServiceId } from '../test-helpers/getDefaultConversation.js';
|
||||
|
||||
const MAX_HANDS = 20;
|
||||
const LOCAL_DEMUX_ID = 1;
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
import React from 'react';
|
||||
import { animated, useSpring } from '@react-spring/web';
|
||||
|
||||
import { Avatar, AvatarSize } from './Avatar';
|
||||
import { ContactName } from './conversation/ContactName';
|
||||
import type { ConversationsByDemuxIdType } from '../types/Calling';
|
||||
import type { ServiceIdString } from '../types/ServiceId';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { ModalHost } from './ModalHost';
|
||||
import { drop } from '../util/drop';
|
||||
import { createLogger } from '../logging/log';
|
||||
import { usePrevious } from '../hooks/usePrevious';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion';
|
||||
import { Avatar, AvatarSize } from './Avatar.js';
|
||||
import { ContactName } from './conversation/ContactName.js';
|
||||
import type { ConversationsByDemuxIdType } from '../types/Calling.js';
|
||||
import type { ServiceIdString } from '../types/ServiceId.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import type { ConversationType } from '../state/ducks/conversations.js';
|
||||
import { ModalHost } from './ModalHost.js';
|
||||
import { drop } from '../util/drop.js';
|
||||
import { createLogger } from '../logging/log.js';
|
||||
import { usePrevious } from '../hooks/usePrevious.js';
|
||||
import { useReducedMotion } from '../hooks/useReducedMotion.js';
|
||||
|
||||
const log = createLogger('CallingRaisedHandsList');
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingScreenSharingController';
|
||||
import { CallingScreenSharingController } from './CallingScreenSharingController';
|
||||
import type { PropsType } from './CallingScreenSharingController.js';
|
||||
import { CallingScreenSharingController } from './CallingScreenSharingController.js';
|
||||
|
||||
import { ScreenShareStatus } from '../types/Calling';
|
||||
import { ScreenShareStatus } from '../types/Calling.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React from 'react';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { ScreenShareStatus } from '../types/Calling';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { ScreenShareStatus } from '../types/Calling.js';
|
||||
|
||||
export type PropsType = {
|
||||
i18n: LocalizerType;
|
||||
|
||||
@@ -5,8 +5,8 @@ import React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
|
||||
import type { Meta } from '@storybook/react';
|
||||
import type { PropsType } from './CallingSelectPresentingSourcesModal';
|
||||
import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal';
|
||||
import type { PropsType } from './CallingSelectPresentingSourcesModal.js';
|
||||
import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal.js';
|
||||
|
||||
const { i18n } = window.SignalContext;
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
import React, { useState } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { groupBy } from 'lodash';
|
||||
import { Button, ButtonVariant } from './Button';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import { Modal } from './Modal';
|
||||
import type { PresentedSource, PresentableSource } from '../types/Calling';
|
||||
import { Theme } from '../util/theme';
|
||||
import { strictAssert } from '../util/assert';
|
||||
import { Button, ButtonVariant } from './Button.js';
|
||||
import type { LocalizerType } from '../types/Util.js';
|
||||
import { Modal } from './Modal.js';
|
||||
import type { PresentedSource, PresentableSource } from '../types/Calling.js';
|
||||
import { Theme } from '../util/theme.js';
|
||||
import { strictAssert } from '../util/assert.js';
|
||||
|
||||
export type PropsType = {
|
||||
i18n: LocalizerType;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user