UNPKG

gnss-state

Version:

Shared singleton state service for Angular MFE architecture

29 lines (28 loc) 1.57 kB
import { StateModel } from '../models/state.model'; import * as i0 from "@angular/core"; /** * Directories are services that contain a * [list]{@link DirectoryModel#list} * of the names of the * [BehaviorSubjects]{@link https://www.learnrxjs.io/learn-rxjs/subjects/behaviorsubject} * contained in the * [dir]{@link DirectoryModel#dir} * object, a 'dir' object that is a Directory of BehaviorSubjects, and a * [backupObjs]{@link DirectoryModel#backupObjs} * Directory of JSON objects. A Directory is a specific term for this framework * where instead of using an array of objects, we use an object where the top-level * keys are the name of an object, and the value is the object itself. Most * Angular frameworks and tutorials recomend using arrays of objects for their * templating, and then use the filter or sort methods to control the display or * selection of a particular object within the array of objects. But for massive * arrays, the filter method can be incredibly slow. The UiDirectory contains * all of the JSON objects that serve as instructions for components used to * build themselves. These UI objects are further organized into 'groups' such * as 'buttons', 'panels, and 'pages'. A component (such as a button) that has * received a name, can then search the respective group (such as 'buttons') to * find its own name and assign those instructions to itself. */ export declare class UiState extends StateModel { static ɵfac: i0.ɵɵFactoryDeclaration<UiState, never>; static ɵprov: i0.ɵɵInjectableDeclaration<UiState>; }