ConceptPortal-public/rsconcept/frontend/src/models/miscellaneous.ts

109 lines
1.9 KiB
TypeScript
Raw Normal View History

/**
2023-12-26 14:23:51 +03:00
* Module: Miscellaneous frontend model types. Future targets for refactoring aimed at extracting modules.
*/
2023-09-11 20:31:54 +03:00
2023-12-16 19:20:26 +03:00
/**
* Represents user access mode.
2023-12-28 14:04:44 +03:00
*/
2023-12-16 19:20:26 +03:00
export enum UserAccessMode {
READER = 0,
OWNER,
ADMIN
}
2023-11-01 14:09:44 +03:00
/**
* Represents graph dependency mode.
2023-12-28 14:04:44 +03:00
*/
2023-09-11 20:31:54 +03:00
export enum DependencyMode {
ALL = 0,
EXPRESSION,
OUTPUTS,
INPUTS,
EXPAND_OUTPUTS,
EXPAND_INPUTS
}
/**
* Represents graph node coloring scheme.
2023-12-28 14:04:44 +03:00
*/
export type GraphColoringScheme = 'none' | 'status' | 'type';
2024-03-26 12:49:38 +03:00
/**
* Represents font styles.
*/
export type FontStyle = 'controls' | 'main' | 'math' | 'math2';
2023-11-01 14:09:44 +03:00
/**
* Represents manuals topic.
2023-12-28 14:04:44 +03:00
*/
2023-09-11 20:31:54 +03:00
export enum HelpTopic {
MAIN = 'main',
LIBRARY = 'library',
RSFORM = 'rsform',
2024-04-01 19:07:20 +03:00
CST_ATTRIBUTES = 'cst-type',
CST_LIST = 'cst-list',
CST_EDITOR = 'cst-editor',
2023-09-11 20:31:54 +03:00
GRAPH_TERM = 'graph-term',
RSTEMPLATES = 'rstemplates',
2023-09-29 16:22:49 +03:00
RSLANG = 'rslang',
TERM_CONTROL = 'terminology-control',
2024-03-12 13:47:19 +03:00
VERSIONS = 'versions',
2023-09-11 20:31:54 +03:00
EXTEOR = 'exteor',
2023-12-07 23:08:49 +03:00
API = 'api',
2023-12-28 14:04:44 +03:00
PRIVACY = 'privacy'
2023-09-11 20:31:54 +03:00
}
2023-11-01 14:09:44 +03:00
/**
* Represents {@link IConstituenta} matching mode.
2023-12-28 14:04:44 +03:00
*/
2023-09-11 20:31:54 +03:00
export enum CstMatchMode {
ALL = 1,
EXPR,
TERM,
TEXT,
NAME
}
2023-11-01 14:09:44 +03:00
/**
* Represents Library filter parameters.
2023-12-28 14:04:44 +03:00
*/
2023-09-11 20:31:54 +03:00
export interface ILibraryFilter {
2023-12-28 14:04:44 +03:00
query?: string;
is_personal?: boolean;
is_owned?: boolean;
is_common?: boolean;
is_canonical?: boolean;
is_subscribed?: boolean;
2023-09-11 20:31:54 +03:00
}
2023-11-01 14:09:44 +03:00
/**
* Represents filtering strategy for Library.
2023-12-28 14:04:44 +03:00
*/
2023-09-11 20:31:54 +03:00
export enum LibraryFilterStrategy {
MANUAL = 'manual',
PERSONAL = 'personal',
COMMON = 'common',
SUBSCRIBE = 'subscribe',
CANONICAL = 'canonical',
OWNED = 'owned'
}
2023-11-01 14:09:44 +03:00
/**
* Represents parameters for GraphEditor.
2023-12-28 14:04:44 +03:00
*/
export interface GraphFilterParams {
2023-12-28 14:04:44 +03:00
noHermits: boolean;
noTransitive: boolean;
noTemplates: boolean;
noText: boolean;
2023-11-01 14:09:44 +03:00
2023-12-28 14:04:44 +03:00
allowBase: boolean;
allowStruct: boolean;
allowTerm: boolean;
allowAxiom: boolean;
allowFunction: boolean;
allowPredicate: boolean;
allowConstant: boolean;
allowTheorem: boolean;
}