mdt-client 31.3.35 → 31.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/_core/scripts/common/Datasource.d.ts +9 -0
- package/types/_core/scripts/common/Field.d.ts +51 -0
- package/types/_core/scripts/common/FieldSettings.schema.d.ts +17 -0
- package/types/_core/scripts/common/MdtField.d.ts +9 -0
- package/types/_core/scripts/common/MdtObject.d.ts +7 -0
- package/types/_core/scripts/common/Record.d.ts +27 -0
- package/types/_core/scripts/common/Table.d.ts +66 -0
- package/types/_core/scripts/common/form/tabs/TabsFormExtenderOptions.d.ts +12 -0
- package/types/_core/scripts/common/list/aggregation/AggregayionTypes.d.ts +2 -0
- package/types/_core/scripts/common/list/cacheUpdateTime/CacheUpdateTimePublicOptions.d.ts +6 -0
- package/types/_core/scripts/common/list/cellControlExtender/CellControlExtender.d.ts +1 -0
- package/types/_core/scripts/common/list/columnMenu/ColumnMenuOptions.d.ts +17 -0
- package/types/_core/scripts/common/list/columnMenu/QuickFilterOptions.d.ts +7 -0
- package/types/_core/scripts/common/list/columnMenu/ValuesFilterOptions.d.ts +24 -0
- package/types/_core/scripts/common/list/form/FormListPublicOptions.d.ts +40 -0
- package/types/_core/scripts/common/list/gallery/GalleryListExtenderPublicOptions.d.ts +11 -0
- package/types/_core/scripts/common/list/group/groupTypes.d.ts +177 -0
- package/types/_core/scripts/common/list/hierarchy/hierarchyTypes.d.ts +48 -0
- package/types/_core/scripts/common/list/historyType/HistoryTypeListExtenderOptions.d.ts +3 -0
- package/types/_core/scripts/common/list/labelStyle/LabelStylePublicOptions.d.ts +6 -0
- package/types/_core/scripts/common/list/legend/LegendListExtenderOptions.d.ts +8 -0
- package/types/_core/scripts/common/list/listView/ListViewListExtenderOptions.d.ts +25 -0
- package/types/_core/scripts/common/list/namedFilter/InMemoryNamedFilterOptions.d.ts +23 -0
- package/types/_core/scripts/common/list/namedFilter/NamedFilterListExtenderPublicOptions.d.ts +29 -0
- package/types/_core/scripts/common/list/reorder/ReorderListExtenderPublicOptions.d.ts +4 -0
- package/types/_core/scripts/common/list/select/SelectPublicOptions.d.ts +18 -0
- package/types/_core/scripts/common/list/styleField/StyleFieldListExtenderPublicOptions.d.ts +3 -0
- package/types/_core/scripts/common/list/toolbar/ToolbarPublicOptions.d.ts +22 -0
- package/types/_core/scripts/common/list/virtualScroll/VIrtualScrollPublicOptions.d.ts +7 -0
- package/types/_core/scripts/common/serverMessage/ServerMessageTypes.d.ts +17 -0
- package/types/_core/scripts/components/baseFormControls/input/inputOptions.d.ts +30 -0
- package/types/_core/scripts/components/baseFormControls/maskedInput/MaskFormatter.types.d.ts +2 -0
- package/types/_core/scripts/components/button/baseButton/buttonOptions.d.ts +12 -0
- package/types/_core/scripts/components/buttonGroup/buttonGroupOptions.d.ts +7 -0
- package/types/_core/scripts/components/dropdown/menu/item/dropdownInputItemOptions.d.ts +5 -0
- package/types/_core/scripts/components/dropdown/menu/item/dropdownItemWrapOptions.d.ts +19 -0
- package/types/_core/scripts/components/dropdown/menuActionItem/dropdownMenuItemOptions.d.ts +32 -0
- package/types/_core/scripts/components/form/fieldView/fieldViewOptions.d.ts +13 -0
- package/types/_core/scripts/components/form/header/types.d.ts +14 -0
- package/types/_core/scripts/components/form/label/labelOptions.d.ts +22 -0
- package/types/_core/scripts/components/icon/iconOptions.d.ts +21 -0
- package/types/_core/scripts/components/iconButton/iconButtonOptions.d.ts +9 -0
- package/types/_core/scripts/components/processPrincipalsList/ProcessPrincipalsListItem.d.ts +5 -0
- package/types/_core/scripts/components/resizablePanels/panelTitle/panelTitleOptions.d.ts +16 -0
- package/types/_core/scripts/components/resizablePanels/panelToolbar/panelToolbarOptions.d.ts +4 -0
- package/types/_core/scripts/components/resizablePanels/resizablePanel/resizablePanelOptions.d.ts +24 -0
- package/types/_core/scripts/components/resizablePanels/resizablePanelsOptions.d.ts +22 -0
- package/types/_core/scripts/components/textWithIcon/textWithIconOptions.d.ts +16 -0
- package/types/_core/scripts/components/toggleablePanels/toggleablePanelsOptions.d.ts +40 -0
- package/types/_core/scripts/data/active/ActivationListAdapterTypes.d.ts +6 -0
- package/types/_core/scripts/data/fieldFilter/ToolbarFieldFilterOptions.d.ts +21 -0
- package/types/_core/scripts/data/periods/helpers/types.d.ts +4 -0
- package/types/_core/scripts/datasources/FetchResult.d.ts +5 -0
- package/types/_core/scripts/helpers/IUi.d.ts +2 -0
- package/types/_core/scripts/helpers/dateUtils.d.ts +23 -0
- package/types/_core/scripts/helpers/deleteFromArray.d.ts +1 -0
- package/types/_core/scripts/helpers/events/EventEmitter.d.ts +12 -0
- package/types/_core/scripts/helpers/fireEvent.d.ts +4 -0
- package/types/_core/scripts/helpers/formatOptions.d.ts +16 -0
- package/types/_core/scripts/helpers/formattedText.d.ts +8 -0
- package/types/_core/scripts/helpers/pipeline/ImmutableArgPipeline.d.ts +8 -0
- package/types/_core/scripts/helpers/pipeline/Pipeline.d.ts +20 -0
- package/types/_core/scripts/helpers/redraw.d.ts +16 -0
- package/types/_core/scripts/helpers/types.d.ts +84 -0
- package/types/_core/scripts/helpers/ui/elementModificators/focusableComponent.d.ts +14 -0
- package/types/_core/scripts/helpers/ui/elementModificators/modificatorsTypes.d.ts +4 -0
- package/types/_core/scripts/helpers/ui/keyboardUtils/getKeySymbol.d.ts +2 -0
- package/types/_core/scripts/helpers/ui/keyboardUtils/keyboardUtils.d.ts +23 -0
- package/types/_core/scripts/helpers/ui/keyboardUtils/osByUserAgent.d.ts +1 -0
- package/types/_core/scripts/helpers/utils/classNames.d.ts +20 -0
- package/types/_core/scripts/helpers/utils/keyStorage/KeyStorage.d.ts +6 -0
- package/types/_core/scripts/helpers/utils/memoization/memoize.d.ts +18 -0
- package/types/_core/scripts/helpers/utils/object.d.ts +4 -0
- package/types/_core/scripts/helpers/utils/stringifyControlSize.d.ts +3 -0
- package/types/_core/scripts/helpers/utils/valued/getValued.d.ts +18 -0
- package/types/_core/scripts/helpers/zone/IZone.d.ts +7 -0
- package/types/_core/scripts/security/PermissionLevel.d.ts +40 -0
- package/types/_core/scripts/security/User.d.ts +19 -0
- package/types/_core/scripts/services/HotkeyManager.d.ts +6 -0
- package/types/_core/scripts/services/IFilter.d.ts +322 -0
- package/types/_core/scripts/services/ModuleData.d.ts +9 -0
- package/types/_core/scripts/services/api/ApiAccessor/apiV1Types.d.ts +266 -0
- package/types/_core/scripts/services/api/ApiAccessor/apiV2Types.d.ts +585 -0
- package/types/_core/scripts/services/api/ApiAccessor/binding/bindingApiTypes.d.ts +42 -0
- package/types/_core/scripts/services/api/ApiAccessor/job/jobApiTypes.d.ts +82 -0
- package/types/_core/scripts/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/count/count.d.ts +10 -0
- package/types/_core/scripts/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/hierarchy/hierarchyQueryHelpersTypes.d.ts +28 -0
- package/types/_core/scripts/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/placeIn/placeInQueryTypes.d.ts +9 -0
- package/types/_core/scripts/services/api/ApiAccessorRequestAdapter/handlers/messageTypes.d.ts +37 -0
- package/types/_core/scripts/services/api/ApiAccessorRequestAdapter/message/apiV2MessageTypes.d.ts +2 -0
- package/types/_core/scripts/services/api/ApiRequestOptions.d.ts +43 -0
- package/types/_core/scripts/services/api/BaseQuery.d.ts +25 -0
- package/types/_core/scripts/services/api/Query.d.ts +56 -0
- package/types/_core/scripts/services/api/QuerySorting.d.ts +18 -0
- package/types/_core/scripts/services/api/ServerResonseType.d.ts +2 -0
- package/types/_core/scripts/services/commands/Command.d.ts +22 -0
- package/types/_core/scripts/services/commands/CommandGroup.d.ts +15 -0
- package/types/_core/scripts/services/commands/CommandManager.d.ts +77 -0
- package/types/_core/scripts/services/customModules/facades/Form/IFieldControlFacade.d.ts +26 -0
- package/types/_core/scripts/services/customModules/facades/Form/IFieldControlManagerFacade.d.ts +36 -0
- package/types/_core/scripts/services/customModules/facades/Form/IFieldStateFacade.d.ts +13 -0
- package/types/_core/scripts/services/customModules/facades/Form/IFormControlFacade.d.ts +133 -0
- package/types/_core/scripts/services/customModules/facades/Form/IFormFacade.d.ts +102 -0
- package/types/_core/scripts/services/customModules/facades/Form/IFormLayout.d.ts +12 -0
- package/types/_core/scripts/services/customModules/facades/IAppFacade.d.ts +38 -0
- package/types/_core/scripts/services/customModules/facades/IAuthFacade.d.ts +9 -0
- package/types/_core/scripts/services/customModules/facades/ILegacyFacade.d.ts +238 -0
- package/types/_core/scripts/services/customModules/facades/IMdtFacade.d.ts +87 -0
- package/types/_core/scripts/services/customModules/facades/IModuleRegistryFacade.d.ts +5 -0
- package/types/_core/scripts/services/customModules/facades/IPageFacade.d.ts +7 -0
- package/types/_core/scripts/services/customModules/facades/List/Column/IColumnFacade.d.ts +7 -0
- package/types/_core/scripts/services/customModules/facades/List/IListCellFacade.d.ts +8 -0
- package/types/_core/scripts/services/customModules/facades/List/IListComponentFacade.d.ts +10 -0
- package/types/_core/scripts/services/customModules/facades/List/IListControlFacade.d.ts +88 -0
- package/types/_core/scripts/services/customModules/facades/List/IListRowFacade.d.ts +2 -0
- package/types/_core/scripts/services/customModules/facades/List/IListServiceFacade.d.ts +96 -0
- package/types/_core/scripts/services/customModules/facades/List/ListOptions/IListOptions.d.ts +4 -0
- package/types/_core/scripts/services/customModules/facades/components/CodeEditorFacade.d.ts +9 -0
- package/types/_core/scripts/services/customModules/facades/components/ModalFacade.d.ts +4 -0
- package/types/_core/scripts/services/customModules/facades/formDashboard/IFormDashboard.d.ts +20 -0
- package/types/_core/scripts/services/customModules/facades/internalModules/importFormCtrl.types.d.ts +77 -0
- package/types/_core/scripts/services/customModules/facades/internalModules/importModuleFacade.d.ts +53 -0
- package/types/_core/scripts/services/customModules/facades/internalModules/jobFacade.d.ts +7 -0
- package/types/_core/scripts/services/customModules/facades/internalModules/modulesFacadeTypes.d.ts +12 -0
- package/types/_core/scripts/services/customModules/facades/internalModules/statusFacade.d.ts +13 -0
- package/types/_core/scripts/services/customModules/facades/record/IRecordFacade.d.ts +13 -0
- package/types/_core/scripts/services/customModules/facades/record/IRecordManagerFacade.d.ts +5 -0
- package/types/_core/scripts/services/customModules/facades/schema/IFieldFacade.d.ts +14 -0
- package/types/_core/scripts/services/customModules/facades/schema/IObjectFacade.d.ts +20 -0
- package/types/_core/scripts/services/customModules/facades/schema/ISchemaFacade.d.ts +24 -0
- package/types/_core/scripts/services/customModules/facades/schema/fieldBuilder/fieldBuilder/IFieldBuilder.d.ts +23 -0
- package/types/_core/scripts/services/customModules/facades/schema/fieldBuilder/fieldFkBuilder/IFieldFkBuilder.d.ts +8 -0
- package/types/_core/scripts/services/customModules/facades/services/CommandManagerFacade.d.ts +11 -0
- package/types/_core/scripts/services/customModules/facades/services/IListButtonExtendPipelineService.d.ts +13 -0
- package/types/_core/scripts/services/customModules/facades/services/INavigationFacade.d.ts +91 -0
- package/types/_core/scripts/services/customModules/facades/services/ISecurityFacade.d.ts +13 -0
- package/types/_core/scripts/services/customModules/facades/utils/IApiFacade.d.ts +91 -0
- package/types/_core/scripts/services/customModules/facades/utils/IUiComponentsFacade.d.ts +185 -0
- package/types/_core/scripts/services/customModules/facades/utils/IUiFacade.d.ts +83 -0
- package/types/_core/scripts/services/customModules/facades/utils/IUtilsFacade.d.ts +224 -0
- package/types/_core/scripts/services/customModules/facades/utils/ImUtilsFacade.d.ts +41 -0
- package/types/_core/scripts/services/dropdown/IDropDownMenu.d.ts +40 -0
- package/types/_core/scripts/services/e2e/e2eServiceType.d.ts +11 -0
- package/types/_core/scripts/ui-kit/IUiKitUtilsFacade.d.ts +21 -0
- package/types/_core/scripts/ui-kit/UiKitFacade.d.ts +101 -0
- package/types/_core/scripts/views/controls/Control.d.ts +7 -0
- package/types/_core/scripts/views/controls/panels/panelOptions.d.ts +15 -0
- package/types/_core/scripts/views/form/controls/commonControl/ICommonControl.d.ts +28 -0
- package/types/_core/scripts/views/form/controls/fileupload/FileInputFacade.types.d.ts +6 -0
- package/types/_core/scripts/views/form/controls/monacoEditor/MonacoCodeOptions.schema.d.ts +24 -0
- package/types/_core/scripts/views/form/controls/monacoEditor/jsonSchemas/Button.schema.d.ts +70 -0
- package/types/_core/scripts/views/form/controls/picker/multiPickerFacade/IMultiPickerFacade.d.ts +36 -0
- package/types/_core/scripts/views/form/controls/toggleablePanels/editor/toggleablePanelsEditorFacadeOptions.d.ts +21 -0
- package/types/_core/scripts/views/form/formTypes.d.ts +5 -0
- package/types/_core/scripts/views/form/schema/FormPageExtOptions.schema.d.ts +22 -0
- package/types/_core/scripts/views/form/schema/FormPageOptions.schema.d.ts +19 -0
- package/types/_core/scripts/views/gallery/ImageFetchOptions.d.ts +5 -0
- package/types/_core/scripts/views/list/ListViewOptions.d.ts +99 -0
- package/types/_core/scripts/views/list/features/aggregation/AggregationRowListOptions.d.ts +23 -0
- package/types/_core/scripts/views/list/schema/ListPageExtOptions.schema.d.ts +123 -0
- package/types/_core/scripts/views/list/schema/ListPageOptions.schema.d.ts +145 -0
- package/types/_core/scripts/views/list/tabular/TabularListTypes.d.ts +53 -0
- package/types/_core/scripts/views/page/PageZoneTypes.d.ts +1 -0
- package/types/_core/scripts/views/page/charts/ChartControlOptions.schema.d.ts +759 -0
- package/types/_core/scripts/views/page/charts/facade/IChartControlFacade.d.ts +29 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/config/chartConfig.d.ts +31 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/config/filterConfig.d.ts +56 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/config/listConfig.d.ts +9 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/config/reportDashboardConfig.d.ts +55 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/controls/dynamicChart/dynamicChartControlPublicOptions.d.ts +3 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/index.d.ts +5 -0
- package/types/_core/scripts/views/page/charts/reportDashboard/utils/formJsonVarParser.d.ts +13 -0
- package/types/job/scripts/types.d.ts +11 -0
- package/types/services/customModules/facades/utils/IUiComponentsFacade.d.ts +1 -1
- package/types/views/page/charts/ChartControlOptions.schema.d.ts +2 -1
- package/types/services/customModules/facades/ui-kit/UiKitFacade.d.ts +0 -8
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ILayoutColumn, ListColumnControlViewContextBase } from "mdtScripts/views/list/ListViewOptions";
|
|
2
|
+
import { ApiV2 } from "mdtServices/api/ApiAccessor/apiV2Types";
|
|
3
|
+
import { Field } from "../../../../../scripts/common/Field";
|
|
4
|
+
import { ObjectCode, ViewControl } from "../../../../helpers/types";
|
|
5
|
+
import { IBaseFieldBuilder } from "../schema/fieldBuilder/fieldBuilder/IFieldBuilder";
|
|
6
|
+
import { MdtRecord } from "../utils/IApiFacade";
|
|
7
|
+
import { IListControlFacade } from "./IListControlFacade";
|
|
8
|
+
import { IListExtOptions, IListOptions } from "./ListOptions/IListOptions";
|
|
9
|
+
export interface IListInitOptions {
|
|
10
|
+
/** Уникальный код списка */
|
|
11
|
+
code?: string;
|
|
12
|
+
/** Опции списка */
|
|
13
|
+
listOptions?: IListOptions;
|
|
14
|
+
/** Настройки расширений списка */
|
|
15
|
+
extConfig?: IListExtOptions;
|
|
16
|
+
}
|
|
17
|
+
export interface IListServiceFacade {
|
|
18
|
+
/**
|
|
19
|
+
* Позволяет переопределить логику отображения ссылок в ячейках списка
|
|
20
|
+
* @param callback - Функция, которая будет вызываться для каждой колонки списка.
|
|
21
|
+
* - Если функция вернет true, то ссылка будет отображаться
|
|
22
|
+
* - Если функция вернет false, то ссылка не будет отображаться
|
|
23
|
+
* - Если функция вернет undefined, то будет использоваться логика обработки по умолчанию (см. {@link FieldColumnCtrl.linksAvailable})
|
|
24
|
+
* @returns Функция отписки для удаления перехватчика
|
|
25
|
+
*/
|
|
26
|
+
readonly registerColumnLinkEnabledInterceptor: (callback: (args: {
|
|
27
|
+
col: ILayoutColumn;
|
|
28
|
+
list: IListControlFacade;
|
|
29
|
+
}) => boolean) => () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Позволяет переопределить логику обработки нажатия на ссылку в ячейке списка
|
|
32
|
+
* @param callback - Функция, которая будет вызываться при нажатии на ссылку в ячейке списка.
|
|
33
|
+
* Если функция возвращает undefined, то будет использоваться логика обработки по умолчанию (см. {@link FieldColumnCtrl.showForm})
|
|
34
|
+
* @returns Функция отписки для удаления перехватчика
|
|
35
|
+
*/
|
|
36
|
+
readonly registerColumnLinkClickInterceptor: (callback: (args: {
|
|
37
|
+
col: ILayoutColumn;
|
|
38
|
+
list: IListControlFacade;
|
|
39
|
+
context: ListColumnControlViewContextBase;
|
|
40
|
+
}) => boolean) => () => void;
|
|
41
|
+
/** Переопределить опции и настройки компонента перед его инициализацией */
|
|
42
|
+
preConfig(callback: (args: {
|
|
43
|
+
list: IListControlFacade;
|
|
44
|
+
options: any;
|
|
45
|
+
extConfig: any;
|
|
46
|
+
}) => void): void;
|
|
47
|
+
/** Подписаться на событие создания списка */
|
|
48
|
+
onCreate(callback: (list: IListControlFacade) => void): void;
|
|
49
|
+
/** Подписаться на событие окончания создания списка */
|
|
50
|
+
onCreated(callback: (list: IListControlFacade) => void): void;
|
|
51
|
+
/** Установить опции списка */
|
|
52
|
+
configureList(tableCode: string, options: IListInitOptions): void;
|
|
53
|
+
/** Создать список */
|
|
54
|
+
create(tableCode: string, options?: any, extOptions?: any): IListControlFacade;
|
|
55
|
+
/** Зарегистрировать расширение списка
|
|
56
|
+
* @param {string} alias - Имя свойства, которое можно использовать для установки опций экстендера в extConfig или extOptions списка
|
|
57
|
+
*/
|
|
58
|
+
registerExtender<T>(extender: IListExtenderFacade<T>, alias: string): void;
|
|
59
|
+
createCustom(options: CustomListOptions): IListControlFacade;
|
|
60
|
+
}
|
|
61
|
+
export interface IListExtenderFacade<T> extends Partial<ViewControl> {
|
|
62
|
+
new (list: IListControlFacade, options: any): T;
|
|
63
|
+
}
|
|
64
|
+
export interface CustomListSaveOptions<R = MdtRecord> {
|
|
65
|
+
changedRecord: R;
|
|
66
|
+
oldRecord?: R;
|
|
67
|
+
}
|
|
68
|
+
export interface CustomListOptions<R = MdtRecord> {
|
|
69
|
+
/** Код объекта списка */
|
|
70
|
+
code: ObjectCode;
|
|
71
|
+
/** Поля списка
|
|
72
|
+
* @example Примеры
|
|
73
|
+
*
|
|
74
|
+
* ```js
|
|
75
|
+
* fields: [
|
|
76
|
+
* Schema.customField("Name", "string", "Имя").length(10),
|
|
77
|
+
* Schema.customField("Age", "number", "Возраст").length(10),
|
|
78
|
+
* Schema.customFkField("Customer", "md.Customer", "Клиент").nullable()
|
|
79
|
+
* ],
|
|
80
|
+
*
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
fields: (Field | IBaseFieldBuilder)[];
|
|
84
|
+
/**
|
|
85
|
+
* Записи списка
|
|
86
|
+
* @deprecated
|
|
87
|
+
* Используйте fetch() вместо этого
|
|
88
|
+
*/
|
|
89
|
+
records?: R[];
|
|
90
|
+
/** Опции списка */
|
|
91
|
+
listOptions?: IListOptions;
|
|
92
|
+
/** Настройки расширений списка */
|
|
93
|
+
extConfig?: IListExtOptions;
|
|
94
|
+
/** Функция для получения записей списка с возможностью обновления данных или использования пользовательского API */
|
|
95
|
+
fetch?: (query: ApiV2.Request.Fetch | ApiV2.Request.Fetch[]) => Promise<R[]>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ListPageExtOptions } from "mdtScripts/views/list/schema/ListPageExtOptions.schema";
|
|
2
|
+
import { ListPageOptions } from "mdtScripts/views/list/schema/ListPageOptions.schema";
|
|
3
|
+
export declare type IListExtOptions = ListPageExtOptions;
|
|
4
|
+
export declare type IListOptions = ListPageOptions;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ViewControl } from "../../../../helpers/types";
|
|
2
|
+
import { MonacoCodeOptions } from "../../../../views/form/controls/monacoEditor/MonacoCodeOptions.schema";
|
|
3
|
+
export interface CodeEditorFacadeOptions extends MonacoCodeOptions {
|
|
4
|
+
/** Адаптировать высоту редактора под высоту родительского элемента */
|
|
5
|
+
fillParentMode?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface CodeEditorFacade extends ViewControl {
|
|
8
|
+
pasteSnippet(snippetContent: string): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MithrilControl } from "mdtScripts/helpers/types";
|
|
2
|
+
import { IFormLayout } from "../Form/IFormLayout";
|
|
3
|
+
export interface IFormDashboard {
|
|
4
|
+
/**
|
|
5
|
+
* Настройка дашборда. Возвращает объект для управления дашбордом.
|
|
6
|
+
* @param code - Код дашборда. Его можно узнать в настройках узла навигации в "Расширенной конфигурации"
|
|
7
|
+
*/
|
|
8
|
+
setup: (code: string) => IFormDashboardFacade;
|
|
9
|
+
}
|
|
10
|
+
export declare type ComponentPosition = "title-right";
|
|
11
|
+
export interface IFormDashboardFacade {
|
|
12
|
+
/**
|
|
13
|
+
* Добавляет компонент на дашборд в указанную позицию
|
|
14
|
+
*/
|
|
15
|
+
addComponent: (component: () => MithrilControl, position: ComponentPosition) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Устанавливает настройки лейаута для дашборда
|
|
18
|
+
*/
|
|
19
|
+
configureLayout: (layout: IFormLayout) => void;
|
|
20
|
+
}
|
package/types/_core/scripts/services/customModules/facades/internalModules/importFormCtrl.types.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { MdtRecord } from "mdtScripts/common/Record";
|
|
2
|
+
import { PredefinedValues } from "mdtServices/customModules/facades/internalModules/importModuleFacade";
|
|
3
|
+
import { Field } from "mdtScripts/common/Field";
|
|
4
|
+
import { Table } from "mdtScripts/common/Table";
|
|
5
|
+
import { FieldPath } from "mdtScripts/helpers/types";
|
|
6
|
+
export declare type ImportMappingColumns = {
|
|
7
|
+
[fieldPath: string]: string;
|
|
8
|
+
};
|
|
9
|
+
interface ImportMapping {
|
|
10
|
+
columns?: ImportMappingColumns;
|
|
11
|
+
keys?: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ImportUploadData {
|
|
14
|
+
/** id записи */
|
|
15
|
+
entryId?: number;
|
|
16
|
+
/** Данные для маппинга */
|
|
17
|
+
mapping?: ImportMapping;
|
|
18
|
+
/** Данные для превью */
|
|
19
|
+
preview?: MdtRecord[];
|
|
20
|
+
}
|
|
21
|
+
/** Опции поля для импорта файла */
|
|
22
|
+
export interface ImportUploadCtrlOptions {
|
|
23
|
+
/** Изменение данных после загрузки либо удаления файла */
|
|
24
|
+
onChange?: (record: MdtRecord) => void;
|
|
25
|
+
/** id таблицы, в которую осуществляется импорт */
|
|
26
|
+
objectId?: number;
|
|
27
|
+
}
|
|
28
|
+
/** Опции для предпросмотра */
|
|
29
|
+
declare type ImportPreviewData = {
|
|
30
|
+
/** Данные для маппинга */
|
|
31
|
+
mapping?: ImportMapping;
|
|
32
|
+
/** Данные для превью */
|
|
33
|
+
preview?: MdtRecord[];
|
|
34
|
+
};
|
|
35
|
+
export interface ImportPreviewCtrlOptions {
|
|
36
|
+
getData: () => ImportPreviewData;
|
|
37
|
+
}
|
|
38
|
+
export interface MappingCtrlData extends PredefinedValues {
|
|
39
|
+
/** Игнорировать обязательное поле */
|
|
40
|
+
ignoreRequiredField?(field: Field): boolean;
|
|
41
|
+
/** Пропустить новую запись */
|
|
42
|
+
skipNew?: boolean;
|
|
43
|
+
/** Таблица */
|
|
44
|
+
table?: Table;
|
|
45
|
+
/** Можно ли добавлять записи */
|
|
46
|
+
canAdd?: number;
|
|
47
|
+
/** Скрыть чекбокс "Пропускать новые записи" */
|
|
48
|
+
hideCheckbox?: boolean;
|
|
49
|
+
/** Данные для маппинга */
|
|
50
|
+
mapping?: ImportMapping;
|
|
51
|
+
}
|
|
52
|
+
/** Опции для сопоставления колонок */
|
|
53
|
+
export interface MappingCtrlOptions {
|
|
54
|
+
getData: () => MappingCtrlData;
|
|
55
|
+
}
|
|
56
|
+
export interface ImportDefaultData {
|
|
57
|
+
/** Таблица */
|
|
58
|
+
table?: Table;
|
|
59
|
+
/** id записи */
|
|
60
|
+
entryId?: number;
|
|
61
|
+
defaultValues?: DefaultValuesData[];
|
|
62
|
+
}
|
|
63
|
+
export interface DefaultValuesData {
|
|
64
|
+
field: FieldPath;
|
|
65
|
+
value: any;
|
|
66
|
+
}
|
|
67
|
+
/** Опции для значений по умолчанию */
|
|
68
|
+
export interface ImportDefaultValuesOptions {
|
|
69
|
+
getData: () => ImportDefaultData;
|
|
70
|
+
}
|
|
71
|
+
export interface ImportFormData extends PredefinedValues {
|
|
72
|
+
/** id записи */
|
|
73
|
+
entryId: number;
|
|
74
|
+
/** Пропустить новую запись */
|
|
75
|
+
skipNew: boolean;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
package/types/_core/scripts/services/customModules/facades/internalModules/importModuleFacade.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ViewControl } from "mdtScripts/helpers/types";
|
|
2
|
+
import { ImportFormData, ImportUploadCtrlOptions, ImportPreviewCtrlOptions, MappingCtrlOptions, ImportDefaultValuesOptions } from "./importFormCtrl.types";
|
|
3
|
+
export interface ImportModuleFacade {
|
|
4
|
+
"mdt.import": {
|
|
5
|
+
ImportForm: ImportFormFacade;
|
|
6
|
+
ImportUploadCtrl: ImportUploadCtrlFacade;
|
|
7
|
+
ImportPreviewCtrl: ImportPreviewCtrlFacade;
|
|
8
|
+
ImportMappingCtrl: ImportMappingCtrlFacade;
|
|
9
|
+
ImportDefaultValues: ImportDefaultValuesFacade;
|
|
10
|
+
ImportService: ImportServiceFacade;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ImportFormFacade {
|
|
14
|
+
new (objectCode: string, options?: ImportFormOptions): ViewControl;
|
|
15
|
+
}
|
|
16
|
+
export interface ImportServiceFacade {
|
|
17
|
+
import(data: ImportFormData, { onSuccessfullyCompleted }: ImportManagerImportOptions): void;
|
|
18
|
+
getUploadUrl(tableId: number): void;
|
|
19
|
+
}
|
|
20
|
+
export interface ImportUploadCtrlFacade {
|
|
21
|
+
new (options: ImportUploadCtrlOptions): ViewControl;
|
|
22
|
+
}
|
|
23
|
+
export interface ImportPreviewCtrlFacade {
|
|
24
|
+
new (options: ImportPreviewCtrlOptions): ViewControl;
|
|
25
|
+
}
|
|
26
|
+
export interface ImportMappingCtrlFacade {
|
|
27
|
+
new (options: MappingCtrlOptions): ViewControl;
|
|
28
|
+
}
|
|
29
|
+
export interface ImportDefaultValuesFacade {
|
|
30
|
+
new (options: ImportDefaultValuesOptions): ViewControl;
|
|
31
|
+
}
|
|
32
|
+
export interface PredefinedValues {
|
|
33
|
+
predefinedValues?: PredefinedValue[];
|
|
34
|
+
}
|
|
35
|
+
export interface PredefinedValue {
|
|
36
|
+
field: string;
|
|
37
|
+
value: string | number;
|
|
38
|
+
}
|
|
39
|
+
export interface ImportFormSkipRequired {
|
|
40
|
+
/** Позволяет импортировать данные, даже если не все обязательные поля заполнены */
|
|
41
|
+
skipRequiredFieldsCheck?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface ImportFormOptions extends PredefinedValues, ImportFormSkipRequired {
|
|
44
|
+
onSuccessfullyCompleted?: () => void;
|
|
45
|
+
mapping?: ImportMappingDisableKeySelection;
|
|
46
|
+
}
|
|
47
|
+
export interface ImportMappingDisableKeySelection {
|
|
48
|
+
/** Отключить возможность выбора ключевых полей при импорте */
|
|
49
|
+
disableKeySelection?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface ImportManagerImportOptions {
|
|
52
|
+
onSuccessfullyCompleted: () => void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JobContextFacade, JobExecutionResult } from "job/scripts/types";
|
|
2
|
+
export interface JobModuleFacade {
|
|
3
|
+
"mdt.job": {
|
|
4
|
+
/** Выполняет запрос на выполнение службы */
|
|
5
|
+
request: (taskCode: string, context: JobContextFacade) => PromiseLike<JobExecutionResult>;
|
|
6
|
+
};
|
|
7
|
+
}
|
package/types/_core/scripts/services/customModules/facades/internalModules/modulesFacadeTypes.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ImportModuleFacade } from "./importModuleFacade";
|
|
2
|
+
import { JobModuleFacade } from "./jobFacade";
|
|
3
|
+
import { StatusModuleFacade } from "./statusFacade";
|
|
4
|
+
export interface InternalModulesFacade {
|
|
5
|
+
/**
|
|
6
|
+
* Возвращает фасад модуля. Если фасада нет или модуль не подключен, то метод выбрасывает ошибку.
|
|
7
|
+
* @throws {Error} - Выбрасывает ошибку, если имя не найдено
|
|
8
|
+
* @param moduleName - имя модуля
|
|
9
|
+
*/
|
|
10
|
+
get<T extends keyof InternalModulesTypes>(moduleName: T): InternalModulesTypes[T];
|
|
11
|
+
}
|
|
12
|
+
export declare type InternalModulesTypes = ImportModuleFacade & StatusModuleFacade & JobModuleFacade;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ObjectCode } from "../../../../helpers/types";
|
|
2
|
+
import { RecordFacade } from "../record/IRecordFacade";
|
|
3
|
+
export interface StatusModuleFacade {
|
|
4
|
+
"mdt.status": {
|
|
5
|
+
statusChangeHandler: (status: StatusCode, handler: ChangeStatusHandler) => void;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare type ChangeStatusHandler = ({ record, object }: StatusChangeHandlerContext) => void | Promise<void>;
|
|
9
|
+
export declare type StatusCode = string;
|
|
10
|
+
export interface StatusChangeHandlerContext {
|
|
11
|
+
record: RecordFacade;
|
|
12
|
+
object: ObjectCode;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FieldCode, FieldPath, ObjectCode } from "../../../../helpers/types";
|
|
2
|
+
export declare type RecordFacade = RecordValueFacade & RecordChangesFacade;
|
|
3
|
+
export interface RecordValueFacade {
|
|
4
|
+
/** Получить значение записи по пути. */
|
|
5
|
+
getValue: (path: FieldPath) => any;
|
|
6
|
+
}
|
|
7
|
+
export interface RecordChangesFacade {
|
|
8
|
+
changes: RecordChanges;
|
|
9
|
+
}
|
|
10
|
+
export declare type RecordChanges = {
|
|
11
|
+
record: Record<FieldCode, any>;
|
|
12
|
+
table: ObjectCode;
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FieldSettings } from "mdtScripts/common/FieldSettings.schema";
|
|
2
|
+
import { AnyObject } from "mdtScripts/helpers/types";
|
|
3
|
+
export interface IFieldFacade {
|
|
4
|
+
getCode(): string;
|
|
5
|
+
getTitle(): string | undefined;
|
|
6
|
+
getDescription(): string | undefined;
|
|
7
|
+
isPrimary(): boolean;
|
|
8
|
+
getType(): string;
|
|
9
|
+
isNullable(): boolean;
|
|
10
|
+
isOne2Many(): boolean;
|
|
11
|
+
isHistory(): boolean;
|
|
12
|
+
getDefaultValue(): string | number | boolean | Date | AnyObject[];
|
|
13
|
+
}
|
|
14
|
+
export declare type IFieldSettings = FieldSettings;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Table } from "mdtScripts/common/Table";
|
|
2
|
+
import { ObjectId } from "../../../../helpers/types";
|
|
3
|
+
import { IFieldFacade } from "./IFieldFacade";
|
|
4
|
+
export interface IObjectFacade {
|
|
5
|
+
getCode(): string | undefined;
|
|
6
|
+
getTitle(): string | undefined;
|
|
7
|
+
getIcon(): string | undefined;
|
|
8
|
+
getPrimaryField(): IFieldFacade | undefined;
|
|
9
|
+
getDefaultField(): IFieldFacade | undefined;
|
|
10
|
+
getObject(): Table;
|
|
11
|
+
isReadonly(): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Получить поле по коду
|
|
14
|
+
* @param code - код поля
|
|
15
|
+
* @param allowNotFound - Если true, возвращает undefined при отсутствии поля, вместо выброса ошибки
|
|
16
|
+
*/
|
|
17
|
+
getField(code: string, allowNotFound?: boolean): IFieldFacade | undefined;
|
|
18
|
+
getId(): ObjectId | undefined;
|
|
19
|
+
getFields(): IFieldFacade[];
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IFieldSettings } from "./IFieldFacade";
|
|
2
|
+
import { IObjectFacade } from "./IObjectFacade";
|
|
3
|
+
import { BaseBuilderTypes } from "./fieldBuilder/fieldBuilder/IFieldBuilder";
|
|
4
|
+
import { IFieldFkBuilder } from "./fieldBuilder/fieldFkBuilder/IFieldFkBuilder";
|
|
5
|
+
declare const allFieldPhysicalTypes: readonly ["bigint", "binary", "bit", "char", "date", "datetime", "datetime2", "datetimeoffset", "decimal", "float", "geography", "geometry", "hierarchyid", "image", "int", "money", "nchar", "ntext", "numeric", "nvarchar", "real", "smalldatetime", "smallint", "smallmoney", "sql_variant", "sysname", "text", "time", "timestamp", "tinyint", "uniqueidentifier", "varbinary", "varchar", "xml"];
|
|
6
|
+
export declare const allFieldLogicalTypes: readonly ["number", "money", "long", "string", "date", "time", "datetime", "boolean", "image", "icon", "secret", "identifier", "url", "xml", "markdown", "query", "etl", "json"];
|
|
7
|
+
export declare type FieldPhysicalType = typeof allFieldPhysicalTypes[number];
|
|
8
|
+
export declare type FieldLogicalType = typeof allFieldLogicalTypes[number];
|
|
9
|
+
export declare type FieldType = FieldPhysicalType | FieldLogicalType;
|
|
10
|
+
export interface ISchemaFacade {
|
|
11
|
+
/**
|
|
12
|
+
* Получить объект по коду или по ID
|
|
13
|
+
* @param idOrCode - код или ID объекта для поиска
|
|
14
|
+
* @param allowNotFound - Если true, возвращает undefined при отсутствии объекта, вместо выброса ошибки
|
|
15
|
+
*/
|
|
16
|
+
getObject(idOrCode: string | number, allowNotFound?: boolean): IObjectFacade;
|
|
17
|
+
/** Установить настройки для поля */
|
|
18
|
+
setFieldSettings(objectCode: string, settings: Record<string, IFieldSettings>): void;
|
|
19
|
+
/** Создать кастомное поле */
|
|
20
|
+
customField<T extends FieldType>(code: string, type: T, title?: string): BaseBuilderTypes[T];
|
|
21
|
+
/** Создать кастомное FK поле */
|
|
22
|
+
customFkField(code: string, refTableCode: string, title?: string): IFieldFkBuilder;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Field } from "mdtScripts/common/Field";
|
|
2
|
+
import { FieldType } from "../../ISchemaFacade";
|
|
3
|
+
export interface IFieldBuilder {
|
|
4
|
+
toJson(): Field;
|
|
5
|
+
}
|
|
6
|
+
export interface IBaseFieldBuilder extends IFieldBuilder {
|
|
7
|
+
description(description: string): this;
|
|
8
|
+
nullable(): this;
|
|
9
|
+
primary(): this;
|
|
10
|
+
unique(): this;
|
|
11
|
+
readonly(): this;
|
|
12
|
+
defaultValue(defaultValue: string | number | boolean | Date): this;
|
|
13
|
+
}
|
|
14
|
+
export interface IStringFieldBuilder extends IBaseFieldBuilder {
|
|
15
|
+
length(length: number): this;
|
|
16
|
+
}
|
|
17
|
+
export interface INumberFieldBuilder extends IBaseFieldBuilder {
|
|
18
|
+
identity(): this;
|
|
19
|
+
}
|
|
20
|
+
export interface BaseBuilderTypes extends Record<FieldType, IBaseFieldBuilder> {
|
|
21
|
+
string: IStringFieldBuilder;
|
|
22
|
+
int: INumberFieldBuilder;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IFieldBuilder } from "../fieldBuilder/IFieldBuilder";
|
|
2
|
+
export interface IFieldFkBuilder extends IFieldBuilder {
|
|
3
|
+
description(description: string): this;
|
|
4
|
+
nullable(): this;
|
|
5
|
+
unique(): this;
|
|
6
|
+
readonly(): this;
|
|
7
|
+
defaultValue(defaultValue: string | number | boolean | Date): this;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommandGroup } from "../../../commands/CommandGroup";
|
|
2
|
+
import { CommandBase, CommandManagerContext } from "../../../commands/CommandManager";
|
|
3
|
+
import { CommandGroupProps } from "../../../commands/CommandManager";
|
|
4
|
+
export declare class CommandManagerFacade {
|
|
5
|
+
/** Добавить группу команд */
|
|
6
|
+
addGroup(group: CommandGroupProps): CommandGroup<CommandManagerContext>;
|
|
7
|
+
/** Добавить команды */
|
|
8
|
+
addCommands(commands: CommandBase<CommandManagerContext>[], groupCode?: string): void;
|
|
9
|
+
/** Получить существующую команду */
|
|
10
|
+
getCommand(code: string): import("../../../commands/Command").Command<CommandManagerContext>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Pipeline, PipelineSync } from "../../../../helpers/pipeline/Pipeline";
|
|
2
|
+
import { IListControlFacade } from "../List/IListControlFacade";
|
|
3
|
+
import { MdtRecord } from "../utils/IApiFacade";
|
|
4
|
+
export declare type JobButtonCreateHandler = (list: IListControlFacade, pipelines: ListButtonExtendPipelines) => void;
|
|
5
|
+
export interface ListButtonExtendPipelines {
|
|
6
|
+
/** Определить активность кнопок службы и удаления записи */
|
|
7
|
+
buttonEnabled: PipelineSync<boolean>;
|
|
8
|
+
/** Добавить дополнительные записи перед выполнением операции над записями */
|
|
9
|
+
preExecute: Pipeline<MdtRecord[]>;
|
|
10
|
+
}
|
|
11
|
+
export interface IListButtonExtendPipelineService {
|
|
12
|
+
onJobButtonCreate(handler: JobButtonCreateHandler): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { AnyObject, URLString, Valued } from "mdtScripts/helpers/types";
|
|
2
|
+
export interface CustomPageCtrl {
|
|
3
|
+
new (node: ICustomNodeNavigationFacade): any;
|
|
4
|
+
}
|
|
5
|
+
export interface ICustomNodeNavigationFacade {
|
|
6
|
+
getSettings<T = AnyObject>(): T;
|
|
7
|
+
}
|
|
8
|
+
/** Управление навигацией */
|
|
9
|
+
export interface INavigationFacade {
|
|
10
|
+
/** Добавить узел навигации */
|
|
11
|
+
addNode: (node: CustomNavNode) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Обновить узлы навигации по условию.
|
|
14
|
+
*/
|
|
15
|
+
updateNodes: (predicate: (item: NavigationNodeFacade) => boolean, data: {
|
|
16
|
+
visible?: () => boolean;
|
|
17
|
+
}) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Зарегистрировать новый контрол для узла навигации.
|
|
20
|
+
* Использование: Чтобы отобразить контрол на странице, нужно в узле навигации указать название контрола в поле "Идентификатор подключаемого элемента" (Control)
|
|
21
|
+
*/
|
|
22
|
+
registerPageCtrl: (ctrl: CustomPageCtrl, name: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Очистить кеш отображения верхней и боковой навигации.
|
|
25
|
+
* Используется в случае, если условия отображения узлов навигации изменились.
|
|
26
|
+
*/
|
|
27
|
+
clearViewCache: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Подписаться на событие перехода по узлу навигации
|
|
30
|
+
*/
|
|
31
|
+
onNavigated: (listener: (args: {
|
|
32
|
+
node: NavigationNodeFacade;
|
|
33
|
+
path: string;
|
|
34
|
+
}) => void) => void;
|
|
35
|
+
}
|
|
36
|
+
export interface CustomNavNode {
|
|
37
|
+
/** Код узла */
|
|
38
|
+
code: string;
|
|
39
|
+
/** Наименование узла */
|
|
40
|
+
title: string;
|
|
41
|
+
/** Ссылка, на которую осуществится переход при нажатии на узел */
|
|
42
|
+
url?: Valued<URLString>;
|
|
43
|
+
/** В какой вкладке должен открыться url (по умолчанию - "new") */
|
|
44
|
+
urlTarget?: "new" | "current";
|
|
45
|
+
/** Уникальный идентификатор узла */
|
|
46
|
+
key?: string;
|
|
47
|
+
/** Иконка узла */
|
|
48
|
+
icon?: string;
|
|
49
|
+
/** Настройки значения узла */
|
|
50
|
+
value?: CustomNavNodeValue;
|
|
51
|
+
/** Код объекта узла навигации */
|
|
52
|
+
objectCode?: string;
|
|
53
|
+
/** Дочерние узлы */
|
|
54
|
+
childNodes?: CustomNavNode[];
|
|
55
|
+
/** Позиция размещения узла навигации. Сортировка узлов производится от меньшего к большему. */
|
|
56
|
+
position?: number;
|
|
57
|
+
/** Путь к родительскому узлу */
|
|
58
|
+
parentPath?: string;
|
|
59
|
+
/** Код контрола для текущего узла навигации
|
|
60
|
+
* @default "ListCtrl"
|
|
61
|
+
*/
|
|
62
|
+
controlCode?: NavNodeControl | string;
|
|
63
|
+
/** Настройки контрола */
|
|
64
|
+
controlTemplate?: Record<string, any>;
|
|
65
|
+
/** Контрол для страницы */
|
|
66
|
+
pageControl?: Function;
|
|
67
|
+
}
|
|
68
|
+
export interface NavigationNodeFacade {
|
|
69
|
+
code?: string;
|
|
70
|
+
title?: string;
|
|
71
|
+
id_Object?: number;
|
|
72
|
+
control?: Function;
|
|
73
|
+
id_Control?: number;
|
|
74
|
+
id_ControlTemplate?: number;
|
|
75
|
+
controlTemplate?: string;
|
|
76
|
+
parent?: NavigationNodeFacade;
|
|
77
|
+
}
|
|
78
|
+
interface CustomNavNodeValue {
|
|
79
|
+
/** Иконка статуса узла */
|
|
80
|
+
iconExt?: string;
|
|
81
|
+
/** Значение узла навигации. Отображается рядом с заголовком */
|
|
82
|
+
value?: string;
|
|
83
|
+
/** Стиль значения узла */
|
|
84
|
+
style?: string;
|
|
85
|
+
/** Иконка значения узла */
|
|
86
|
+
icon?: string;
|
|
87
|
+
/** Текст появляющийся при наведении на счетчик. Поддерживается markdown */
|
|
88
|
+
tooltip?: string;
|
|
89
|
+
}
|
|
90
|
+
export declare type NavNodeControl = "ListCtrl" | "FormCtrl" | "FkPanelsPage" | "dashboard" | "FirstRecordCtrl";
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { User } from "../../../../security/User";
|
|
2
|
+
import type { PermissionLevel, PrincipalTypes } from "../../../../security/PermissionLevel";
|
|
3
|
+
import { IObjectFacade } from "../schema/IObjectFacade";
|
|
4
|
+
export interface ISecurityFacade {
|
|
5
|
+
/** Проверка на наличие роли у пользователя */
|
|
6
|
+
hasRole(role: string): boolean;
|
|
7
|
+
/** Получить информацию о текущем пользователе */
|
|
8
|
+
getUser(): User;
|
|
9
|
+
/** Имеет ли текущий пользователь разрешение на объект */
|
|
10
|
+
hasPermission(object: IObjectFacade, permissionLevel: PermissionLevel): any;
|
|
11
|
+
PermissionLevel: typeof PermissionLevel;
|
|
12
|
+
PrincipalTypes: typeof PrincipalTypes;
|
|
13
|
+
}
|