analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
73 lines • 1.86 kB
TypeScript
/**
* Activity type enum
*/
export type ActivityCategory = 'ATIVIDADE' | 'PROVA';
/**
* Active tab type for activity pages
*/
export type ActiveTab = 'history' | 'drafts' | 'models';
/**
* Labels configuration for each activity type
*/
export interface TypeLabels {
pageTitle: Record<ActiveTab, string>;
createButton: string;
selectorLabel: string;
itemLabel: Record<ActiveTab, string>;
searchPlaceholder: Record<ActiveTab, string>;
emptyState: {
title: string;
description: string;
buttonText: string;
};
statusLabel: string;
}
/**
* Routes configuration for each activity type
*/
export interface TypeRoutes {
base: string;
create: string;
details: (id: string) => string;
editDraft: (id: string) => string;
editModel: (id: string) => string;
}
/**
* Complete configuration for an activity type
*/
export interface TypeConfig {
labels: TypeLabels;
routes: TypeRoutes;
statusOptions: Array<{
id: string;
name: string;
}>;
}
/**
* Default labels for ATIVIDADE type
*/
export declare const ATIVIDADE_LABELS: TypeLabels;
/**
* Default labels for PROVA type
*/
export declare const PROVA_LABELS: TypeLabels;
/**
* Default status options by type
*/
export declare const DEFAULT_STATUS_OPTIONS: Record<ActivityCategory, Array<{
id: string;
name: string;
}>>;
/**
* Get tab path segment based on active tab
*/
export declare const getTabPath: (tab: ActiveTab) => string;
/**
* Get tab value from URL path segment
*/
export declare const getTabFromPath: (pathname: string) => ActiveTab;
/**
* Create activity type config with custom routes
*/
export declare const createActivityCategoryConfig: (routes: Record<ActivityCategory, TypeRoutes>) => Record<ActivityCategory, TypeConfig>;
//# sourceMappingURL=TypeSelector.types.d.ts.map