analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
125 lines • 3.8 kB
TypeScript
/**
* Visibility state of a single module/feature.
* - ENABLED: shown and functional
* - COMING_SOON: shown but disabled, with an "Em breve" badge
* - HIDDEN: not shown at all
*/
export type FeatureVisibility = 'ENABLED' | 'COMING_SOON' | 'HIDDEN';
/**
* Per-institution configuration of the Simulados module.
* `enabled` is the master toggle (gates the whole module/menu); the remaining
* keys map 1:1 to each simulado type's `backgroundColor` (the card catalog).
*/
export interface SimulationsConfig {
enabled: boolean;
enem: FeatureVisibility;
prova: FeatureVisibility;
simuladao: FeatureVisibility;
vestibular: FeatureVisibility;
}
/**
* Configuration for Performance screen graphs
*/
export interface PerformanceGraphsConfig {
aulas: boolean;
acessos: boolean;
simulados: boolean;
atividades: boolean;
questoes: boolean;
ranking: boolean;
}
/**
* Configuration for Reports
*/
export interface ReportsConfig {
simulatedReports: boolean;
simulatedGenericReports: boolean;
activitiesReports: boolean;
questionnairesReports: boolean;
lessonsReports: boolean;
essayReports: boolean;
}
/**
* Score display options for simulations
*/
export interface SimulatedScoreConfig {
tri: boolean;
absoluto: boolean;
}
/**
* Default simulados configuration - module on, all types enabled
*/
export declare const DEFAULT_SIMULATIONS: SimulationsConfig;
/**
* Default exams configuration
*/
export declare const DEFAULT_EXAMS: boolean;
/**
* Default performance graphs configuration
*/
export declare const DEFAULT_PERFORMANCE_GRAPHS: PerformanceGraphsConfig;
/**
* Default reports configuration
*/
export declare const DEFAULT_REPORTS: ReportsConfig;
/**
* Default simulated score configuration
*/
export declare const DEFAULT_SIMULATED_SCORE: SimulatedScoreConfig;
/**
* Utility type that recursively makes all properties optional.
* Used for API payloads and test data where only a subset of fields are provided.
*/
export type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
/**
* Complete modules configuration interface
* All modules that can be controlled via feature flags
*/
export interface ModulesConfig {
simulator: boolean;
essay: boolean;
forum: boolean;
support: boolean;
chat: boolean;
recommendedLessons: boolean;
activities: boolean;
questionBanks: boolean;
comparator: boolean;
performance: boolean;
dashboard: boolean;
lessons: boolean;
tutorial: boolean;
tutorialUrl: string;
/**
* Reading-fluency mode (opt-in per institution, off by default).
* When `true`, the platform switches to the reading-fluency-only experience:
* the professor app hides the navigation menu and exposes only the
* "Teste de fluência" page. Consumed via `useModules().hasReadingFluency`.
*/
readingFluency: boolean;
exams: boolean;
simulations: SimulationsConfig;
performanceGraphs: PerformanceGraphsConfig;
reports: ReportsConfig;
simulatedScore: SimulatedScoreConfig;
simulatedReports: boolean;
simulatedGenericReports: boolean;
activitiesReports: boolean;
questionnairesReports: boolean;
lessonsReports: boolean;
essayReports: boolean;
simulatedScoreTri: boolean;
simulatedScoreAbsoluto: boolean;
}
/**
* Default modules configuration - all enabled (permissive default pattern)
*/
export declare const DEFAULT_MODULES: ModulesConfig;
/**
* Deep merge a partial config onto defaults.
* Handles nested objects (simulations, performanceGraphs, reports, simulatedScore).
*/
export declare const mergeModulesConfig: (version?: DeepPartial<ModulesConfig> | null) => ModulesConfig;
//# sourceMappingURL=modulesConfig.d.ts.map