2023-11-17 20:51:13 +03:00
|
|
|
/**
|
|
|
|
* Module: Global constants.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Variable constants depending on build type.
|
|
|
|
*/
|
2023-12-13 15:24:10 +03:00
|
|
|
export const buildConstants = {
|
2023-08-29 00:34:56 +03:00
|
|
|
backend: import.meta.env.VITE_PORTAL_BACKEND as string
|
2023-07-15 17:46:19 +03:00
|
|
|
};
|
2023-11-17 20:51:13 +03:00
|
|
|
|
|
|
|
/**
|
2024-04-06 14:39:49 +03:00
|
|
|
* Global application Parameters. The place where magic numbers are put to rest.
|
2023-11-17 20:51:13 +03:00
|
|
|
*/
|
2024-04-06 14:39:49 +03:00
|
|
|
export const PARAMETER = {
|
|
|
|
smallScreen: 640, // == tailwind:xs
|
|
|
|
smallTreeNodes: 50, // amount of nodes threshold for size increase for large graphs
|
|
|
|
refreshTimeout: 100, // milliseconds delay for post-refresh actions
|
2024-04-08 11:47:47 +03:00
|
|
|
minimalTimeout: 10, // milliseconds delay for fast updates
|
2024-04-06 14:39:49 +03:00
|
|
|
graphRefreshDelay: 10, // milliseconds delay for graph viewpoint reset
|
2023-11-17 20:51:13 +03:00
|
|
|
|
2024-04-06 14:39:49 +03:00
|
|
|
logicLabel: 'LOGIC'
|
|
|
|
};
|
2024-01-16 13:47:29 +03:00
|
|
|
|
2023-11-17 20:51:13 +03:00
|
|
|
/**
|
2024-04-06 14:39:49 +03:00
|
|
|
* Numeric limitations.
|
2023-11-17 20:51:13 +03:00
|
|
|
*/
|
2024-04-06 14:39:49 +03:00
|
|
|
export const limits = {
|
|
|
|
library_alias_len: 12
|
|
|
|
};
|
2023-07-31 22:38:58 +03:00
|
|
|
|
2023-11-17 20:51:13 +03:00
|
|
|
/**
|
|
|
|
* Exteor file extension for RSForm.
|
|
|
|
*/
|
2023-09-08 13:46:45 +03:00
|
|
|
export const EXTEOR_TRS_FILE = '.trs';
|
|
|
|
|
2023-12-08 19:58:16 +03:00
|
|
|
/**
|
|
|
|
* Regex patterns for data validation.
|
|
|
|
*/
|
|
|
|
export const patterns = {
|
2023-12-13 15:24:10 +03:00
|
|
|
login: '^[a-zA-Z][a-zA-Z0-9_\\-]{1,}[a-zA-Z0-9]$',
|
2024-01-04 14:35:46 +03:00
|
|
|
library_alias: `.{1,${limits.library_alias_len}}`
|
2023-12-28 14:04:44 +03:00
|
|
|
};
|
2023-12-08 19:58:16 +03:00
|
|
|
|
2024-03-27 15:32:59 +03:00
|
|
|
/**
|
|
|
|
* Local URIs.
|
|
|
|
*/
|
|
|
|
export const resources = {
|
|
|
|
graph_font: '/DejaVu.ttf',
|
|
|
|
privacy_policy: '/privacy.pdf',
|
|
|
|
logo: '/logo_full.svg'
|
|
|
|
};
|
|
|
|
|
2023-11-17 20:51:13 +03:00
|
|
|
/**
|
|
|
|
* Youtube IDs for embedding.
|
|
|
|
*/
|
2023-08-27 23:04:57 +03:00
|
|
|
export const youtube = {
|
|
|
|
intro: '0Ty9mu9sOJo'
|
|
|
|
};
|
|
|
|
|
2023-11-17 20:51:13 +03:00
|
|
|
/**
|
2024-03-27 15:32:59 +03:00
|
|
|
* External URLs.
|
2023-11-17 20:51:13 +03:00
|
|
|
*/
|
2024-04-01 21:45:10 +03:00
|
|
|
export const external_urls = {
|
2023-07-25 20:27:29 +03:00
|
|
|
concept: 'https://www.acconcept.ru/',
|
|
|
|
exteor32: 'https://drive.google.com/open?id=1IHlMMwaYlAUBRSxU1RU_hXM5mFU9-oyK&usp=drive_fs',
|
|
|
|
exteor64: 'https://drive.google.com/open?id=1IJt25ZRQ-ZMA6t7hOqmo5cv05WJCQKMv&usp=drive_fs',
|
|
|
|
ponomarev: 'https://inponomarev.ru/textbook',
|
|
|
|
intro_video: 'https://www.youtube.com/watch?v=0Ty9mu9sOJo',
|
2023-08-03 17:57:58 +03:00
|
|
|
full_course: 'https://www.youtube.com/playlist?list=PLGe_JiAwpqu1C70ruQmCm_OWTWU3KJwDo',
|
2023-08-23 18:50:49 +03:00
|
|
|
|
2023-12-26 14:23:51 +03:00
|
|
|
git_repo: 'https://github.com/IRBorisov/ConceptPortal',
|
|
|
|
mail_portal: 'mailto:portal@acconcept.ru',
|
|
|
|
restAPI: 'https://api.portal.acconcept.ru'
|
2023-07-15 17:46:19 +03:00
|
|
|
};
|
|
|
|
|
2023-11-17 20:51:13 +03:00
|
|
|
/**
|
2024-03-27 15:32:59 +03:00
|
|
|
* Local storage ID.
|
|
|
|
*/
|
|
|
|
export const storage = {
|
|
|
|
PREFIX: 'portal.',
|
|
|
|
|
|
|
|
themeDark: 'theme.dark',
|
2024-04-01 19:07:20 +03:00
|
|
|
optionsHelp: 'options.help',
|
2024-03-27 15:32:59 +03:00
|
|
|
|
|
|
|
rseditFont: 'rsedit.font',
|
|
|
|
rseditShowList: 'rsedit.show_list',
|
|
|
|
rseditShowControls: 'rsedit.show_controls',
|
|
|
|
|
|
|
|
librarySearchStrategy: 'library.search.strategy',
|
|
|
|
libraryPagination: 'library.pagination',
|
|
|
|
|
2024-04-09 13:47:18 +03:00
|
|
|
rsgraphFilter: 'rsgraph.filter2',
|
2024-03-27 15:32:59 +03:00
|
|
|
rsgraphLayout: 'rsgraph.layout',
|
2024-04-07 19:22:19 +03:00
|
|
|
rsgraphColoring: 'rsgraph.coloring',
|
|
|
|
rsgraphSizing: 'rsgraph.sizing',
|
|
|
|
rsgraphFoldHidden: 'rsgraph.fold_hidden',
|
2024-03-27 15:32:59 +03:00
|
|
|
|
|
|
|
cstFilterMatch: 'cst.filter.match',
|
|
|
|
cstFilterGraph: 'cst.filter.graph'
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Global element ID.
|
2023-11-17 20:51:13 +03:00
|
|
|
*/
|
2024-03-27 15:32:59 +03:00
|
|
|
export const globals = {
|
2024-03-18 16:21:39 +03:00
|
|
|
tooltip: 'global_tooltip',
|
|
|
|
password_tooltip: 'password_tooltip',
|
|
|
|
main_scroll: 'main_scroll',
|
|
|
|
library_item_editor: 'library_item_editor',
|
|
|
|
constituenta_editor: 'constituenta_editor'
|
2023-12-07 23:08:49 +03:00
|
|
|
};
|
2023-09-05 00:23:53 +03:00
|
|
|
|
2023-11-17 20:51:13 +03:00
|
|
|
/**
|
|
|
|
* Prefixes for generating unique keys for lists.
|
|
|
|
*/
|
2023-07-31 22:38:58 +03:00
|
|
|
export const prefixes = {
|
2024-03-18 16:21:39 +03:00
|
|
|
page_size: 'page_size_',
|
|
|
|
cst_list: 'cst_list_',
|
2024-03-21 17:48:42 +03:00
|
|
|
cst_inline_synth_list: 'cst_inline_synth_list_',
|
|
|
|
cst_inline_synth_substitutes: 'cst_inline_synth_substitutes_',
|
2024-03-18 16:21:39 +03:00
|
|
|
cst_side_table: 'cst_side_table_',
|
|
|
|
cst_hidden_list: 'cst_hidden_list_',
|
|
|
|
cst_modal_list: 'cst_modal_list_',
|
|
|
|
cst_template_ist: 'cst_template_list_',
|
|
|
|
cst_wordform_list: 'cst_wordform_list_',
|
|
|
|
cst_status_list: 'cst_status_list_',
|
|
|
|
cst_match_mode_list: 'cst_match_mode_list_',
|
|
|
|
cst_source_list: 'cst_source_list_',
|
|
|
|
cst_delete_list: 'cst_delete_list_',
|
|
|
|
cst_dependant_list: 'cst_dependant_list_',
|
|
|
|
csttype_list: 'csttype_',
|
|
|
|
library_filters_list: 'library_filters_list_',
|
|
|
|
topic_list: 'topic_list_',
|
|
|
|
library_list: 'library_list_',
|
|
|
|
wordform_list: 'wordform_list_',
|
2024-03-27 22:54:24 +03:00
|
|
|
rsedit_btn: 'rsedit_btn_',
|
|
|
|
dlg_cst_substitutes_list: 'dlg_cst_substitutes_list_'
|
2023-12-28 14:04:44 +03:00
|
|
|
};
|