* chore: code split sagas and reducers index file * fix: update imports * chore: remove acl reducers file on ce * fix: code split reducers properly * chore: remove unnecessary import * chore: split root sagas file
76 lines
1.5 KiB
TypeScript
76 lines
1.5 KiB
TypeScript
import { AppState } from "@appsmith/reducers";
|
|
|
|
export enum AppThemingMode {
|
|
APP_THEME_EDIT = "APP_THEME_EDIT",
|
|
APP_THEME_SELECTION = "APP_THEME_SELECTION",
|
|
}
|
|
|
|
/**
|
|
* returns the theming mode ( edit, selection, variant editor )
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getAppThemingStack = (state: AppState) => {
|
|
return state.ui.appTheming.stack;
|
|
};
|
|
|
|
/**
|
|
* gets the themes
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getAppThemes = (state: AppState) => {
|
|
return state.ui.appTheming.themes;
|
|
};
|
|
|
|
/**
|
|
* get the selected theme
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getSelectedAppTheme = (state: AppState) => {
|
|
return state.ui.appTheming.selectedTheme;
|
|
};
|
|
|
|
/**
|
|
* get the selected theme stylsheet
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getSelectedAppThemeStylesheet = (state: AppState) => {
|
|
return state.ui.appTheming.selectedTheme.stylesheet;
|
|
};
|
|
|
|
/**
|
|
* get the preview theme or selected theme
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getSelectedAppThemeProperties = (state: AppState) => {
|
|
return state.ui.appTheming.selectedTheme.properties;
|
|
};
|
|
|
|
/**
|
|
* gets the value of `state.ui.appTheming.isSaving`
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getAppThemeIsChanging = (state: AppState) => {
|
|
return state.ui.appTheming.isChanging;
|
|
};
|
|
|
|
/**
|
|
* gets the value of `state.ui.appTheming.isSaving`
|
|
*
|
|
* @param state
|
|
* @returns
|
|
*/
|
|
export const getIsBetaCardShown = (state: AppState): boolean =>
|
|
state.ui.appTheming.isBetaCardShown;
|