mattermost-redux
Version:
Common code (API client, Redux stores, logic, utility functions) for building a Mattermost client
71 lines (70 loc) • 4.66 kB
TypeScript
import type { PreferencesType, PreferenceType } from '@mattermost/types/preferences';
import type { GlobalState } from '@mattermost/types/store';
export declare function getMyPreferences(state: GlobalState): {
[x: string]: PreferenceType;
};
export declare function getUserPreferences(state: GlobalState, userID: string): PreferencesType;
export declare function get(state: GlobalState, category: string, name: string, defaultValue?: string, preferences?: PreferencesType): string;
export declare function getFromPreferences(preferences: PreferencesType, category: string, name: string, defaultValue?: any): any;
export declare function getBool(state: GlobalState, category: string, name: string, defaultValue?: boolean, userPreferences?: PreferencesType): boolean;
export declare function getInt(state: GlobalState, category: string, name: string, defaultValue?: number, userPreferences?: PreferencesType): number;
export declare function makeGetCategory(selectorName: string, category: string): (state: GlobalState) => PreferenceType[];
export declare function makeGetUserCategory(selectorName: string, category: string): (state: GlobalState, userID: string) => PreferenceType[];
export declare const getDirectShowPreferences: (state: GlobalState) => PreferenceType[];
export declare const getGroupShowPreferences: (state: GlobalState) => PreferenceType[];
export declare const getTeammateNameDisplaySetting: (state: GlobalState) => string;
export declare const getThemePreferences: (state: GlobalState) => PreferenceType[];
export type ThemeKey = 'denim' | 'sapphire' | 'quartz' | 'indigo' | 'onyx';
export type LegacyThemeType = 'Mattermost' | 'Organization' | 'Mattermost Dark' | 'Windows Dark';
export type ThemeType = 'Denim' | 'Sapphire' | 'Quartz' | 'Indigo' | 'Onyx';
export type Theme = {
[key: string]: string | undefined;
type?: ThemeType | 'custom';
sidebarBg: string;
sidebarText: string;
sidebarUnreadText: string;
sidebarTextHoverBg: string;
sidebarTextActiveBorder: string;
sidebarTextActiveColor: string;
sidebarHeaderBg: string;
sidebarTeamBarBg: string;
sidebarHeaderTextColor: string;
onlineIndicator: string;
awayIndicator: string;
dndIndicator: string;
mentionBg: string;
mentionBj: string;
mentionColor: string;
centerChannelBg: string;
centerChannelColor: string;
newMessageSeparator: string;
linkColor: string;
buttonBg: string;
buttonColor: string;
errorTextColor: string;
mentionHighlightBg: string;
mentionHighlightLink: string;
codeTheme: string;
};
export declare const getTheme: (state: GlobalState) => Theme;
export declare function makeGetStyleFromTheme<Style>(): (state: GlobalState, getStyleFromTheme: (theme: Theme) => Style) => Style;
export declare function shouldShowJoinLeaveMessages(state: GlobalState): boolean;
export declare const shouldShowUnreadsCategory: (state: GlobalState, userPreferences?: PreferencesType) => boolean;
export declare function getUnreadScrollPositionPreference(state: GlobalState, userPreferences?: PreferencesType): string;
export declare function getCollapsedThreadsPreference(state: GlobalState): string;
export declare function getCollapsedThreadsPreferenceFromPreferences(state: GlobalState, userPreferences: PreferencesType): string;
export declare function isCollapsedThreadsAllowed(state: GlobalState): boolean;
export declare function isCollapsedThreadsEnabled(state: GlobalState): boolean;
export declare function isCollapsedThreadsEnabledForUser(state: GlobalState, userPreferences: PreferencesType): boolean;
export declare function isGroupChannelManuallyVisible(state: GlobalState, channelId: string): boolean;
export declare function isCustomGroupsEnabled(state: GlobalState): boolean;
export declare function getIsOnboardingFlowEnabled(state: GlobalState): boolean;
export declare function getHasDismissedSystemConsoleLimitReached(state: GlobalState): boolean;
export declare function syncedDraftsAreAllowed(state: GlobalState): boolean;
export declare function syncedDraftsAreAllowedAndEnabled(state: GlobalState): boolean;
export declare function getVisibleDmGmLimit(state: GlobalState, userPreferences?: PreferencesType): number;
export declare function onboardingTourTipsEnabled(state: GlobalState): boolean;
export declare function moveThreadsEnabled(state: GlobalState): boolean;
export declare function streamlinedMarketplaceEnabled(state: GlobalState): boolean;
export declare const getOverageBannerPreferences: (state: GlobalState) => PreferenceType[];
export declare const getPostHistoryLimitBannerPreferences: (state: GlobalState) => PreferenceType[];