pl-fe: Remove remaining barrel exports
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
512a28eafd
commit
6c6f2a2952
94 changed files with 132 additions and 120 deletions
|
@ -22,7 +22,8 @@ import type { EditorState } from 'lexical';
|
|||
import type { Account as BaseAccount, BackendVersion, CreateStatusParams, Group, MediaAttachment, Status as BaseStatus, Tag, Poll, ScheduledStatus } from 'pl-api';
|
||||
import type { AutoSuggestion } from 'pl-fe/components/autosuggest-input';
|
||||
import type { Emoji } from 'pl-fe/features/emoji';
|
||||
import type { Account, Status } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Status } from 'pl-fe/normalizers/status';
|
||||
import type { AppDispatch, RootState } from 'pl-fe/store';
|
||||
import type { History } from 'pl-fe/types/history';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { OrderedMap as ImmutableOrderedMap } from 'immutable';
|
|||
|
||||
import { __stub } from 'pl-fe/api';
|
||||
import { mockStore, rootState } from 'pl-fe/jest/test-helpers';
|
||||
import { normalizeNotification } from 'pl-fe/normalizers';
|
||||
import { normalizeNotification } from 'pl-fe/normalizers/notification';
|
||||
|
||||
import { markReadNotifications } from './notifications';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { defineMessages } from 'react-intl';
|
|||
|
||||
import { getClient } from 'pl-fe/api';
|
||||
import { getNotificationStatus } from 'pl-fe/features/notifications/components/notification';
|
||||
import { normalizeNotification, normalizeNotifications, type Notification } from 'pl-fe/normalizers';
|
||||
import { normalizeNotification, normalizeNotifications, type Notification } from 'pl-fe/normalizers/notification';
|
||||
import { getFilters, regexFromFilters } from 'pl-fe/selectors';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { isLoggedIn } from 'pl-fe/utils/auth';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createSelector } from 'reselect';
|
||||
|
||||
import { getHost } from 'pl-fe/actions/instance';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config';
|
||||
import KVStore from 'pl-fe/storage/kv-store';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ import { useModalsStore } from 'pl-fe/stores/modals';
|
|||
|
||||
import { getClient } from '../api';
|
||||
|
||||
import type { Account, Status } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Status } from 'pl-fe/normalizers/status';
|
||||
import type { AppDispatch, RootState } from 'pl-fe/store';
|
||||
|
||||
const REPORT_SUBMIT_REQUEST = 'REPORT_SUBMIT_REQUEST' as const;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useTransaction } from 'pl-fe/entity-store/hooks/useTransaction';
|
||||
import { EntityCallbacks } from 'pl-fe/entity-store/hooks/types';
|
||||
import { useTransaction } from 'pl-fe/entity-store/hooks/useTransaction';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeGroup, type Group } from 'pl-fe/normalizers';
|
||||
import { normalizeGroup, type Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
import type { Group as BaseGroup, CreateGroupParams } from 'pl-api';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import * as v from 'valibot';
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeGroupMember } from 'pl-fe/normalizers';
|
||||
import { normalizeGroupMember } from 'pl-fe/normalizers/group-member';
|
||||
|
||||
import type { Group, GroupMember as GroupMember, GroupRole } from 'pl-api';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useHistory } from 'react-router-dom';
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useEntity } from 'pl-fe/entity-store/hooks/useEntity';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeGroup, type Group } from 'pl-fe/normalizers';
|
||||
import { normalizeGroup, type Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
import { useGroupRelationship } from './useGroupRelationship';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useEntities } from 'pl-fe/entity-store/hooks/useEntities';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers/status';
|
||||
|
||||
const useGroupMedia = (groupId: string) => {
|
||||
const client = useClient();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useEntities } from 'pl-fe/entity-store/hooks/useEntities';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeGroupMember, type GroupMember } from 'pl-fe/normalizers';
|
||||
import { normalizeGroupMember, type GroupMember } from 'pl-fe/normalizers/group-member';
|
||||
|
||||
import type { GroupMember as BaseGroupMember, GroupRoles } from 'pl-api';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Entities } from 'pl-fe/entity-store/entities';
|
|||
import { useEntities } from 'pl-fe/entity-store/hooks/useEntities';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { normalizeGroup, type Group } from 'pl-fe/normalizers';
|
||||
import { normalizeGroup, type Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
import { useGroupRelationships } from './useGroupRelationships';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import * as v from 'valibot';
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeGroupMember } from 'pl-fe/normalizers';
|
||||
import { normalizeGroupMember } from 'pl-fe/normalizers/group-member';
|
||||
|
||||
import type { Group, GroupMember, GroupRole } from 'pl-api';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { useCreateEntity } from 'pl-fe/entity-store/hooks/useCreateEntity';
|
||||
import { useClient } from 'pl-fe/hooks/useClient';
|
||||
import { normalizeGroup } from 'pl-fe/normalizers';
|
||||
import { normalizeGroup } from 'pl-fe/normalizers/group';
|
||||
|
||||
interface UpdateGroupParams {
|
||||
display_name?: string;
|
||||
|
|
|
@ -20,7 +20,7 @@ import Badge from './badge';
|
|||
import { ParsedContent } from './parsed-content';
|
||||
import RelativeTimestamp from './relative-timestamp';
|
||||
|
||||
import type { Account as AccountSchema } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountSchema } from 'pl-fe/normalizers/account';
|
||||
import type { StatusApprovalStatus } from 'pl-fe/normalizers/status';
|
||||
|
||||
interface IInstanceFavicon {
|
||||
|
|
|
@ -11,7 +11,7 @@ import ReactionsBar from './reactions-bar';
|
|||
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
import type { CustomEmoji } from 'pl-api';
|
||||
import type { Announcement as AnnouncementEntity } from 'pl-fe/normalizers';
|
||||
import type { Announcement as AnnouncementEntity } from 'pl-fe/normalizers/announcement';
|
||||
|
||||
interface IAnnouncement {
|
||||
announcement: AnnouncementEntity;
|
||||
|
|
|
@ -3,8 +3,8 @@ import { defineMessages, useIntl } from 'react-intl';
|
|||
|
||||
import IconButton from 'pl-fe/components/icon-button';
|
||||
import { DatePicker } from 'pl-fe/features/ui/util/async-components';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
|
||||
const messages = defineMessages({
|
||||
birthdayPlaceholder: { id: 'edit_profile.fields.birthday_placeholder', defaultMessage: 'Your birthday' },
|
||||
|
|
|
@ -12,7 +12,7 @@ import EventActionButton from 'pl-fe/features/event/components/event-action-butt
|
|||
import EventDate from 'pl-fe/features/event/components/event-date';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
const messages = defineMessages({
|
||||
eventBanner: { id: 'event.banner', defaultMessage: 'Event banner' },
|
||||
|
|
|
@ -10,7 +10,7 @@ import GroupRelationship from 'pl-fe/features/group/components/group-relationshi
|
|||
|
||||
import GroupAvatar from './groups/group-avatar';
|
||||
|
||||
import type { Group as GroupEntity } from 'pl-fe/normalizers';
|
||||
import type { Group as GroupEntity } from 'pl-fe/normalizers/group';
|
||||
|
||||
interface IGroupCard {
|
||||
group: GroupEntity;
|
||||
|
|
|
@ -24,7 +24,7 @@ import { useUiStore } from 'pl-fe/stores/ui';
|
|||
import sourceCode from 'pl-fe/utils/code';
|
||||
|
||||
import type { List as ImmutableList } from 'immutable';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
const messages = defineMessages({
|
||||
profile: { id: 'account.profile', defaultMessage: 'Profile' },
|
||||
|
|
|
@ -9,11 +9,11 @@ import ComposeButton from 'pl-fe/features/ui/components/compose-button';
|
|||
import ProfileDropdown from 'pl-fe/features/ui/components/profile-dropdown';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
|
||||
import { useLogo } from 'pl-fe/hooks/useLogo';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
|
||||
import Account from './account';
|
||||
import DropdownMenu, { Menu } from './dropdown-menu';
|
||||
|
|
|
@ -40,7 +40,8 @@ import GroupPopover from './groups/popover/group-popover';
|
|||
import type { Menu } from 'pl-fe/components/dropdown-menu';
|
||||
import type { Emoji as EmojiType } from 'pl-fe/features/emoji';
|
||||
import type { UnauthorizedModalAction } from 'pl-fe/features/ui/components/modals/unauthorized-modal';
|
||||
import type { Account, Group } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
import type { SelectedStatus } from 'pl-fe/selectors';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
|
||||
import { buildAccount } from 'pl-fe/jest/factory';
|
||||
import { render, screen, rootState } from 'pl-fe/jest/test-helpers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers/status';
|
||||
|
||||
import Status from './status';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Map as ImmutableMap } from 'immutable';
|
|||
import React from 'react';
|
||||
|
||||
import { fireEvent, render, rootState, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers/status';
|
||||
import { ReducerStatus } from 'pl-fe/reducers/statuses';
|
||||
|
||||
import SensitiveContentOverlay from './sensitive-content-overlay';
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import type { AdminDomain, AdminRelay, AdminRule, BookmarkFolder, GroupMember, GroupRelationship, Relationship, Scrobble, TrendsLink } from 'pl-api';
|
||||
import type { Account, Group, Status } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
import type { Status } from 'pl-fe/normalizers/status';
|
||||
|
||||
enum Entities {
|
||||
ACCOUNTS = 'Accounts',
|
||||
|
|
|
@ -5,9 +5,9 @@ import { useParams } from 'react-router-dom';
|
|||
import { fetchAboutPage } from 'pl-fe/actions/about';
|
||||
import { Navlinks } from 'pl-fe/components/navlinks';
|
||||
import Card from 'pl-fe/components/ui/card';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
|
||||
import { languages } from '../preferences';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import Icon from 'pl-fe/components/icon';
|
|||
import HStack from 'pl-fe/components/ui/hstack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
interface IMovedNote {
|
||||
from: AccountEntity;
|
||||
|
|
|
@ -8,7 +8,7 @@ import Column from 'pl-fe/components/ui/column';
|
|||
import HStack from 'pl-fe/components/ui/hstack';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import { AdminAnnouncement } from 'pl-fe/normalizers';
|
||||
import { AdminAnnouncement } from 'pl-fe/normalizers/announcement';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import List, { ListItem } from 'pl-fe/components/list';
|
|||
import { CardTitle } from 'pl-fe/components/ui/card';
|
||||
import Icon from 'pl-fe/components/ui/icon';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import sourceCode from 'pl-fe/utils/code';
|
||||
|
||||
import { DashCounter, DashCounters } from '../components/dashcounter';
|
||||
|
|
|
@ -17,9 +17,9 @@ import Select from 'pl-fe/components/ui/select';
|
|||
import Textarea from 'pl-fe/components/ui/textarea';
|
||||
import CaptchaField from 'pl-fe/features/auth-login/components/captcha';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
|
||||
import type { CreateAccountParams } from 'pl-api';
|
||||
|
|
|
@ -11,10 +11,10 @@ import DropdownMenu from 'pl-fe/components/dropdown-menu';
|
|||
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
|
||||
import StatusList from 'pl-fe/components/status-list';
|
||||
import Column from 'pl-fe/components/ui/column';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import { fetchBubbleTimeline } from 'pl-fe/actions/timelines';
|
|||
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
|
||||
import Column from 'pl-fe/components/ui/column';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import { __stub } from 'pl-fe/api';
|
|||
import { ChatContext } from 'pl-fe/contexts/chat-context';
|
||||
import { buildAccount, buildInstance } from 'pl-fe/jest/factory';
|
||||
import { queryClient, render, rootState, screen, waitFor } from 'pl-fe/jest/test-helpers';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers/chat-message';
|
||||
import { IChat } from 'pl-fe/queries/chats';
|
||||
import { ChatMessage } from 'pl-fe/types/entities';
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import { useChatActions, useChatMessages } from 'pl-fe/queries/chats';
|
|||
import ChatMessage from './chat-message';
|
||||
|
||||
import type { Chat, Relationship } from 'pl-api';
|
||||
import type { ChatMessage as ChatMessageEntity } from 'pl-fe/normalizers';
|
||||
import type { ChatMessage as ChatMessageEntity } from 'pl-fe/normalizers/chat-message';
|
||||
|
||||
const messages = defineMessages({
|
||||
today: { id: 'chats.dividers.today', defaultMessage: 'Today' },
|
||||
|
|
|
@ -20,7 +20,7 @@ import { onlyEmoji } from 'pl-fe/utils/rich-content';
|
|||
|
||||
import type { Chat, CustomEmoji } from 'pl-api';
|
||||
import type { Menu as IMenu } from 'pl-fe/components/dropdown-menu';
|
||||
import type { ChatMessage as ChatMessageEntity } from 'pl-fe/normalizers';
|
||||
import type { ChatMessage as ChatMessageEntity } from 'pl-fe/normalizers/chat-message';
|
||||
|
||||
const messages = defineMessages({
|
||||
copy: { id: 'chats.actions.copy', defaultMessage: 'Copy' },
|
||||
|
|
|
@ -6,9 +6,9 @@ import { useCommunityStream } from 'pl-fe/api/hooks/streaming/useCommunityStream
|
|||
import PullToRefresh from 'pl-fe/components/pull-to-refresh';
|
||||
import Column from 'pl-fe/components/ui/column';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { statusSchema } from 'pl-api';
|
|||
import * as v from 'valibot';
|
||||
|
||||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers/status';
|
||||
|
||||
import type { DraftStatus } from 'pl-fe/reducers/draft-statuses';
|
||||
import type { RootState } from 'pl-fe/store';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
|||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
import type { DraftStatus } from 'pl-fe/reducers/draft-statuses';
|
||||
|
||||
const messages = defineMessages({
|
||||
|
|
|
@ -16,7 +16,7 @@ import { buildStatus } from '../builder';
|
|||
|
||||
import DraftStatusActionBar from './draft-status-action-bar';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
import type { DraftStatus as DraftStatusType } from 'pl-fe/reducers/draft-statuses';
|
||||
|
||||
interface IDraftStatus {
|
||||
|
|
|
@ -17,12 +17,12 @@ import Input from 'pl-fe/components/ui/input';
|
|||
import Streamfield from 'pl-fe/components/ui/streamfield';
|
||||
import Textarea from 'pl-fe/components/ui/textarea';
|
||||
import Toggle from 'pl-fe/components/ui/toggle';
|
||||
import { useImageField } from 'pl-fe/hooks/forms/useImageField';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useImageField } from 'pl-fe/hooks/forms/useImageField';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import toast from 'pl-fe/toast';
|
||||
import { isDefaultAvatar, isDefaultHeader } from 'pl-fe/utils/accounts';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
|||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
|
||||
import type { ButtonThemes } from 'pl-fe/components/ui/button/useButtonStyles';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
const messages = defineMessages({
|
||||
leaveHeading: { id: 'confirmations.leave_event.heading', defaultMessage: 'Leave event' },
|
||||
|
|
|
@ -17,7 +17,7 @@ import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
|||
import { makeGetStatus } from 'pl-fe/selectors';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
type RouteParams = { statusId: string };
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ import React from 'react';
|
|||
|
||||
import { buildGroup, buildGroupRelationship } from 'pl-fe/jest/factory';
|
||||
import { render, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import GroupActionButton from './group-action-button';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
|
||||
let group: Group;
|
||||
|
||||
describe('<GroupActionButton />', () => {
|
||||
|
|
|
@ -2,10 +2,12 @@ import React from 'react';
|
|||
|
||||
import { buildGroup } from 'pl-fe/jest/factory';
|
||||
import { render, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import GroupHeader from './group-header';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
|
||||
let group: Group;
|
||||
|
||||
describe('<GroupHeader />', () => {
|
||||
|
|
|
@ -2,10 +2,12 @@ import React from 'react';
|
|||
|
||||
import { buildGroup } from 'pl-fe/jest/factory';
|
||||
import { render, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import GroupMemberCount from './group-member-count';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
|
||||
let group: Group;
|
||||
|
||||
describe('<GroupMemberCount />', () => {
|
||||
|
|
|
@ -19,7 +19,8 @@ import { useModalsStore } from 'pl-fe/stores/modals';
|
|||
import toast from 'pl-fe/toast';
|
||||
|
||||
import type { Menu as IMenu } from 'pl-fe/components/dropdown-menu';
|
||||
import type { Group, GroupMember } from 'pl-fe/normalizers';
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
import type { GroupMember } from 'pl-fe/normalizers/group-member';
|
||||
|
||||
const messages = defineMessages({
|
||||
adminLimitTitle: { id: 'group.member.admin.limit.title', defaultMessage: 'Admin limit reached' },
|
||||
|
|
|
@ -3,10 +3,12 @@ import React from 'react';
|
|||
|
||||
import { buildGroup, buildGroupRelationship } from 'pl-fe/jest/factory';
|
||||
import { render, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import GroupOptionsButton from './group-options-button';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
|
||||
let group: Group;
|
||||
|
||||
describe('<GroupOptionsButton />', () => {
|
||||
|
|
|
@ -2,10 +2,12 @@ import React from 'react';
|
|||
|
||||
import { buildGroup } from 'pl-fe/jest/factory';
|
||||
import { render, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import GroupPrivacy from './group-privacy';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
|
||||
let group: Group;
|
||||
|
||||
describe('<GroupPrivacy />', () => {
|
||||
|
|
|
@ -6,7 +6,8 @@ import Icon from 'pl-fe/components/ui/icon';
|
|||
import Popover from 'pl-fe/components/ui/popover';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
interface IGroupPolicy {
|
||||
group: Pick<Group, 'locked'>;
|
||||
|
|
|
@ -3,10 +3,12 @@ import React from 'react';
|
|||
|
||||
import { buildGroup, buildGroupRelationship } from 'pl-fe/jest/factory';
|
||||
import { render, screen } from 'pl-fe/jest/test-helpers';
|
||||
import { Group } from 'pl-fe/normalizers';
|
||||
|
||||
import GroupRelationship from './group-relationship';
|
||||
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
|
||||
|
||||
let group: Group;
|
||||
|
||||
describe('<GroupRelationship />', () => {
|
||||
|
|
|
@ -16,7 +16,7 @@ import toast from 'pl-fe/toast';
|
|||
import ColumnForbidden from '../ui/components/column-forbidden';
|
||||
|
||||
import type { PlfeResponse } from 'pl-fe/api';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
type RouteParams = { groupId: string };
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import Timeline from 'pl-fe/features/ui/components/timeline';
|
|||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
|
||||
interface IHashtagTimeline {
|
||||
params?: {
|
||||
|
|
|
@ -8,12 +8,12 @@ import Column from 'pl-fe/components/ui/column';
|
|||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import Timeline from 'pl-fe/features/ui/components/timeline';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.home', defaultMessage: 'Home' },
|
||||
|
|
|
@ -7,8 +7,8 @@ import PullToRefresh from 'pl-fe/components/pull-to-refresh';
|
|||
import Column from 'pl-fe/components/ui/column';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
|
||||
import AboutPage from '../about';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
|
|
@ -12,8 +12,8 @@ import Column from 'pl-fe/components/ui/column';
|
|||
import Spinner from 'pl-fe/components/ui/spinner';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
|
|
@ -24,7 +24,9 @@ import { useSettingsStore } from 'pl-fe/stores/settings';
|
|||
import { NotificationType } from 'pl-fe/utils/notification';
|
||||
|
||||
import type { Notification as BaseNotification } from 'pl-api';
|
||||
import type { Account, Notification as NotificationEntity, Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Notification as NotificationEntity } from 'pl-fe/normalizers/notification';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
import type { MinifiedNotification } from 'pl-fe/reducers/notifications';
|
||||
|
||||
const notificationForScreenReader = (intl: IntlShape, message: string, timestamp: string) => {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { FormattedMessage } from 'react-intl';
|
|||
|
||||
import BackgroundShapes from 'pl-fe/features/ui/components/background-shapes';
|
||||
import { useSystemTheme } from 'pl-fe/hooks/useSystemTheme';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
import { generateThemeCss } from 'pl-fe/utils/theme';
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ import Streamfield from 'pl-fe/components/ui/streamfield';
|
|||
import Textarea from 'pl-fe/components/ui/textarea';
|
||||
import Toggle from 'pl-fe/components/ui/toggle';
|
||||
import ThemeSelector from 'pl-fe/features/ui/components/theme-selector';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
import CryptoAddressInput from './components/crypto-address-input';
|
||||
|
|
|
@ -10,9 +10,9 @@ import Accordion from 'pl-fe/components/ui/accordion';
|
|||
import Column from 'pl-fe/components/ui/column';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
|
||||
import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
|
|
@ -9,8 +9,8 @@ import StatusList from 'pl-fe/components/status-list';
|
|||
import Column from 'pl-fe/components/ui/column';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
|
||||
const messages = defineMessages({
|
||||
heading: { id: 'column.quotes', defaultMessage: 'Post quotes' },
|
||||
|
|
|
@ -9,9 +9,9 @@ import Column from 'pl-fe/components/ui/column';
|
|||
import HStack from 'pl-fe/components/ui/hstack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
|||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { useSettingsStore } from 'pl-fe/stores/settings';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
const messages = defineMessages({
|
||||
cancel: { id: 'scheduled_status.cancel', defaultMessage: 'Cancel' },
|
||||
|
|
|
@ -27,7 +27,8 @@ import DetailedStatus from './detailed-status';
|
|||
import ThreadStatus from './thread-status';
|
||||
|
||||
import type { Virtualizer } from '@tanstack/react-virtual';
|
||||
import type { Account, Status } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Status } from 'pl-fe/normalizers/status';
|
||||
import type { SelectedStatus } from 'pl-fe/selectors';
|
||||
|
||||
const getAncestorsIds = createSelector([
|
||||
|
|
|
@ -6,8 +6,8 @@ import { expandTimelineSuccess } from 'pl-fe/actions/timelines';
|
|||
import Column from 'pl-fe/components/ui/column';
|
||||
import Timeline from 'pl-fe/features/ui/components/timeline';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.test', defaultMessage: 'Test timeline' },
|
||||
|
|
|
@ -14,7 +14,7 @@ import ColorPicker from 'pl-fe/features/pl-fe-config/components/color-picker';
|
|||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config';
|
||||
import toast from 'pl-fe/toast';
|
||||
import { download } from 'pl-fe/utils/download';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { SelectDropdown } from 'pl-fe/features/forms';
|
|||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
/** Staff role. */
|
||||
type AccountRole = 'user' | 'moderator' | 'admin';
|
||||
|
|
|
@ -10,7 +10,7 @@ import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
|||
import { makeGetStatus } from 'pl-fe/selectors';
|
||||
|
||||
import type { BaseModalProps } from '../modal-root';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
const messages = defineMessages({
|
||||
cancel_reblog: { id: 'status.cancel_reblog_private', defaultMessage: 'Un-repost' },
|
||||
|
|
|
@ -7,9 +7,9 @@ import Input from 'pl-fe/components/ui/input';
|
|||
import Textarea from 'pl-fe/components/ui/textarea';
|
||||
import AvatarPicker from 'pl-fe/features/edit-profile/components/avatar-picker';
|
||||
import HeaderPicker from 'pl-fe/features/edit-profile/components/header-picker';
|
||||
import { usePreview } from 'pl-fe/hooks/forms/usePreview';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { usePreview } from 'pl-fe/hooks/forms/usePreview';
|
||||
import resizeImage from 'pl-fe/utils/resize-image';
|
||||
|
||||
import type { CreateGroupParams } from 'pl-api';
|
||||
|
|
|
@ -16,7 +16,7 @@ import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
|||
import { makeGetStatus } from 'pl-fe/selectors';
|
||||
|
||||
import type { BaseModalProps } from '../modal-root';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
interface SelectBookmarkFolderModalProps {
|
||||
statusId: string;
|
||||
|
|
|
@ -9,8 +9,8 @@ import Input from 'pl-fe/components/ui/input';
|
|||
import Modal from 'pl-fe/components/ui/modal';
|
||||
import Stack from 'pl-fe/components/ui/stack';
|
||||
import Text from 'pl-fe/components/ui/text';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useRegistrationStatus } from 'pl-fe/hooks/useRegistrationStatus';
|
||||
|
|
|
@ -10,7 +10,7 @@ import Widget from 'pl-fe/components/ui/widget';
|
|||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
import type { AppDispatch } from 'pl-fe/store';
|
||||
|
||||
const onSave = debounce(
|
||||
|
|
|
@ -3,8 +3,8 @@ import { useIntl, defineMessages } from 'react-intl';
|
|||
|
||||
import { pinHost, unpinHost } from 'pl-fe/actions/remote-timeline';
|
||||
import Widget from 'pl-fe/components/ui/widget';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { makeGetRemoteInstance } from 'pl-fe/selectors';
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ import List, { ListItem } from 'pl-fe/components/list';
|
|||
import HStack from 'pl-fe/components/ui/hstack';
|
||||
import Widget from 'pl-fe/components/ui/widget';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
|
||||
const PromoPanel: React.FC = () => {
|
||||
const instance = useInstance();
|
||||
|
|
|
@ -9,7 +9,7 @@ import PlaceholderSidebarSuggestions from 'pl-fe/features/placeholder/components
|
|||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useDismissSuggestion, useSuggestions } from 'pl-fe/queries/suggestions';
|
||||
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
const messages = defineMessages({
|
||||
dismissSuggestion: { id: 'suggestions.dismiss', defaultMessage: 'Dismiss suggestion' },
|
||||
|
|
|
@ -16,7 +16,7 @@ import { buildStatus } from '../util/pending-status-builder';
|
|||
|
||||
import PollPreview from './poll-preview';
|
||||
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers';
|
||||
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
|
||||
|
||||
const shouldHaveCard = (pendingStatus: StatusEntity) => Boolean(pendingStatus.content.match(/https?:\/\/\S*/));
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import { makeGetAccount } from 'pl-fe/selectors';
|
|||
|
||||
import ThemeToggle from './theme-toggle';
|
||||
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
const messages = defineMessages({
|
||||
add: { id: 'profile_dropdown.add_account', defaultMessage: 'Add an existing account' },
|
||||
|
|
|
@ -6,7 +6,7 @@ import IconButton from 'pl-fe/components/ui/icon-button';
|
|||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import toast from 'pl-fe/toast';
|
||||
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
|
||||
const messages = defineMessages({
|
||||
subscribe: { id: 'account.subscribe', defaultMessage: 'Subscribe to notifications from @{name}' },
|
||||
|
|
|
@ -19,12 +19,12 @@ import ThumbNavigation from 'pl-fe/components/thumb-navigation';
|
|||
import Layout from 'pl-fe/components/ui/layout';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useInstance } from 'pl-fe/hooks/useInstance';
|
||||
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import AdminLayout from 'pl-fe/layouts/admin-layout';
|
||||
import ChatsLayout from 'pl-fe/layouts/chats-layout';
|
||||
import DefaultLayout from 'pl-fe/layouts/default-layout';
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useLocale } from 'pl-fe/hooks/useLocale';
|
|||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import { useSettings } from 'pl-fe/hooks/useSettings';
|
||||
import { useTheme } from 'pl-fe/hooks/useTheme';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers';
|
||||
import { normalizePlFeConfig } from 'pl-fe/normalizers/pl-fe/pl-fe-config';
|
||||
import { startSentry } from 'pl-fe/sentry';
|
||||
import { useModalsStore } from 'pl-fe/stores/modals';
|
||||
import { generateThemeCss } from 'pl-fe/utils/theme';
|
||||
|
|
|
@ -19,13 +19,13 @@ import {
|
|||
BirthdayPanel,
|
||||
AnnouncementsPanel,
|
||||
} from 'pl-fe/features/ui/util/async-components';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
|
||||
import { useAppDispatch } from 'pl-fe/hooks/useAppDispatch';
|
||||
import { useAppSelector } from 'pl-fe/hooks/useAppSelector';
|
||||
import { useDraggedFiles } from 'pl-fe/hooks/useDraggedFiles';
|
||||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useIsMobile } from 'pl-fe/hooks/useIsMobile';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { usePlFeConfig } from 'pl-fe/hooks/usePlFeConfig';
|
||||
|
||||
interface IHomeLayout {
|
||||
children: React.ReactNode;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
export { normalizeAccount, type Account } from './account';
|
||||
export { normalizeAdminReport, type AdminReport } from './admin-report';
|
||||
export { normalizeAnnouncement, type AdminAnnouncement, type Announcement } from './announcement';
|
||||
export { normalizeChatMessage, type ChatMessage } from './chat-message';
|
||||
export { normalizeGroup, type Group } from './group';
|
||||
export { normalizeGroupMember, type GroupMember } from './group-member';
|
||||
export { normalizeNotification, normalizeNotifications, type Notification } from './notification';
|
||||
export { normalizePoll, normalizePollEdit, type Poll, type PollEdit } from './poll';
|
||||
export { normalizeStatus, type Status } from './status';
|
||||
export { normalizeStatusEdit, type StatusEdit } from './status-edit';
|
||||
export { normalizeTranslation, type Translation } from './translation';
|
||||
|
||||
export { PlFeConfigRecord, normalizePlFeConfig } from './pl-fe/pl-fe-config';
|
|
@ -5,7 +5,7 @@ import { useEffect } from 'react';
|
|||
import { __stub } from 'pl-fe/api';
|
||||
import { buildAccount, buildRelationship } from 'pl-fe/jest/factory';
|
||||
import { createTestStore, mockStore, queryClient, renderHook, rootState, waitFor } from 'pl-fe/jest/test-helpers';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers/chat-message';
|
||||
import { Store } from 'pl-fe/store';
|
||||
import { flattenPages } from 'pl-fe/utils/queries';
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import { useClient } from 'pl-fe/hooks/useClient';
|
|||
import { useFeatures } from 'pl-fe/hooks/useFeatures';
|
||||
import { useLoggedIn } from 'pl-fe/hooks/useLoggedIn';
|
||||
import { useOwnAccount } from 'pl-fe/hooks/useOwnAccount';
|
||||
import { type ChatMessage, normalizeChatMessage } from 'pl-fe/normalizers';
|
||||
import { type ChatMessage, normalizeChatMessage } from 'pl-fe/normalizers/chat-message';
|
||||
import { reOrderChatListItems } from 'pl-fe/utils/chats';
|
||||
import { flattenPages, updatePageItem } from 'pl-fe/utils/queries';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import {
|
|||
import { ME_FETCH_SKIP } from '../actions/me';
|
||||
|
||||
import type { PlfeResponse } from 'pl-fe/api';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers';
|
||||
import type { Account as AccountEntity } from 'pl-fe/normalizers/account';
|
||||
import type { AnyAction } from 'redux';
|
||||
|
||||
const backendUrl = (isURL(BuildConfig.BACKEND_URL) ? BuildConfig.BACKEND_URL : '');
|
||||
|
|
|
@ -4,7 +4,6 @@ import * as actions from 'pl-fe/actions/compose';
|
|||
import { ME_FETCH_SUCCESS, ME_PATCH_SUCCESS } from 'pl-fe/actions/me';
|
||||
import { SETTING_CHANGE } from 'pl-fe/actions/settings';
|
||||
import { TIMELINE_DELETE } from 'pl-fe/actions/timelines';
|
||||
import { TagRecord } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers/status';
|
||||
|
||||
import reducer, { initialState, ReducerCompose } from './compose';
|
||||
|
@ -382,7 +381,7 @@ describe('compose reducer', () => {
|
|||
id: 'home',
|
||||
token: 'aaadken3',
|
||||
tags: ImmutableList([
|
||||
TagRecord({ name: 'hashtag' }),
|
||||
{ name: 'hashtag', url: '', history: null },
|
||||
]),
|
||||
};
|
||||
expect(reducer(state, action).toJS().home).toMatchObject({
|
||||
|
|
|
@ -68,7 +68,8 @@ import { unescapeHTML } from '../utils/html';
|
|||
|
||||
import type { Emoji } from 'pl-fe/features/emoji';
|
||||
import type { Language } from 'pl-fe/features/preferences';
|
||||
import type { Account, Status } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Status } from 'pl-fe/normalizers/status';
|
||||
import type { APIEntity } from 'pl-fe/types/entities';
|
||||
|
||||
const getResetFileKey = () => Math.floor((Math.random() * 0x10000));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Map as ImmutableMap, Record as ImmutableRecord } from 'immutable';
|
||||
|
||||
import { HISTORY_FETCH_REQUEST, HISTORY_FETCH_SUCCESS, HISTORY_FETCH_FAIL, type HistoryAction } from 'pl-fe/actions/history';
|
||||
import { normalizeStatusEdit } from 'pl-fe/normalizers';
|
||||
import { normalizeStatusEdit } from 'pl-fe/normalizers/status-edit';
|
||||
|
||||
import type { StatusEdit as BaseStatusEdit } from 'pl-api';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import { POLLS_IMPORT } from 'pl-fe/actions/importer';
|
||||
import { normalizePoll } from 'pl-fe/normalizers';
|
||||
import { normalizePoll } from 'pl-fe/normalizers/poll';
|
||||
|
||||
import type { Status } from 'pl-api';
|
||||
import type { AnyAction } from 'redux';
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
STATUS_DELETE_REQUEST,
|
||||
STATUS_DELETE_FAIL,
|
||||
} from 'pl-fe/actions/statuses';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers/status';
|
||||
|
||||
import reducer, { ReducerStatus } from './statuses';
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Map as ImmutableMap } from 'immutable';
|
||||
import omit from 'lodash/omit';
|
||||
|
||||
import { normalizeStatus, normalizeTranslation, Status as StatusRecord } from 'pl-fe/normalizers';
|
||||
import { normalizeStatus, Status as StatusRecord } from 'pl-fe/normalizers/status';
|
||||
import { normalizeTranslation } from 'pl-fe/normalizers/translation';
|
||||
import { simulateEmojiReact, simulateUnEmojiReact } from 'pl-fe/utils/emoji-reacts';
|
||||
|
||||
import {
|
||||
|
|
|
@ -15,7 +15,9 @@ import { shouldFilter } from 'pl-fe/utils/timelines';
|
|||
|
||||
import type { Account as BaseAccount, Filter, MediaAttachment, Relationship } from 'pl-api';
|
||||
import type { EntityStore } from 'pl-fe/entity-store/types';
|
||||
import type { Account, Group, Notification } from 'pl-fe/normalizers';
|
||||
import type { Account } from 'pl-fe/normalizers/account';
|
||||
import type { Group } from 'pl-fe/normalizers/group';
|
||||
import type { Notification } from 'pl-fe/normalizers/notification';
|
||||
import type { MinifiedNotification } from 'pl-fe/reducers/notifications';
|
||||
import type { MinifiedStatus } from 'pl-fe/reducers/statuses';
|
||||
import type { MRFSimple } from 'pl-fe/schemas/pleroma';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AccountRecord } from 'pl-fe/normalizers';
|
||||
import { AccountRecord } from 'pl-fe/normalizers/account';
|
||||
|
||||
import {
|
||||
getDomain,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { buildAccount } from 'pl-fe/jest/factory';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers/chat-message';
|
||||
import { ChatKeys, IChat } from 'pl-fe/queries/chats';
|
||||
import { queryClient } from 'pl-fe/queries/client';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import sumBy from 'lodash/sumBy';
|
||||
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers';
|
||||
import { normalizeChatMessage } from 'pl-fe/normalizers/chat-message';
|
||||
import { ChatKeys } from 'pl-fe/queries/chats';
|
||||
import { queryClient } from 'pl-fe/queries/client';
|
||||
|
||||
|
|
Loading…
Reference in a new issue