mdt-client 1.0.32 → 1.2.0
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/dist/index.d.ts +3 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +2707 -1
- package/package.json +6 -2
- package/types/common/Datasource.d.ts +1 -1
- package/types/common/Field.d.ts +2 -1
- package/types/components/baseFormControls/input/inputView.d.ts +4 -0
- package/types/components/icon/iconOptions.d.ts +8 -2
- package/types/helpers/types.d.ts +10 -4
- package/types/helpers/ui/elementModificators/focusableComponent.d.ts +2 -8
- package/types/helpers/ui/keyboardUtils/keyboardUtils.d.ts +16 -0
- package/types/helpers/zone/IZone.d.ts +2 -0
- package/types/security/PermissionLevel.d.ts +2 -1
- package/types/services/IFilter.d.ts +18 -4
- package/types/services/customModules/facades/Form/IFormControlFacade.d.ts +3 -1
- package/types/services/customModules/facades/Form/IFormFacade.d.ts +7 -3
- package/types/services/customModules/facades/IMdtFacade.d.ts +6 -1
- package/types/services/customModules/facades/List/IListControlFacade.d.ts +3 -1
- package/types/services/customModules/facades/components/ModalFacade.d.ts +4 -0
- package/types/services/customModules/facades/schema/IObjectFacade.d.ts +2 -0
- package/types/services/customModules/facades/utils/IUiComponentsFacade.d.ts +6 -3
- package/types/services/customModules/facades/utils/IUiFacade.d.ts +6 -1
- package/types/services/customModules/facades/utils/ImUtilsFacade.d.ts +2 -0
- package/types/services/dropdown/IDropDownMenu.d.ts +2 -0
- package/types/views/form/controls/commonControl/ICommonControl.d.ts +2 -0
- package/types/views/list/IListView.d.ts +2 -0
- package/types/views/list/schema/ListPageOptions.schema.d.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdt-client",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"build": "tsc",
|
|
13
13
|
"types-update": "tsc --project tsconfig.facade-types.json",
|
|
14
14
|
"update": "tsc --project tsconfig.facade-types.json && tsc",
|
|
15
|
-
"pub": "npm version patch && npm publish"
|
|
15
|
+
"pub-patch": "npm version patch && npm publish",
|
|
16
|
+
"pub-minor": "npm version minor && npm publish"
|
|
16
17
|
},
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
@@ -22,5 +23,8 @@
|
|
|
22
23
|
"license": "ISC",
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"typescript": "^4.2.3"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@types/mithril": "^0.0.27"
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -3,7 +3,7 @@ import { Query } from "../services/api/Query";
|
|
|
3
3
|
import { ApiRequestOptions } from "../services/api/ApiRequestOptions";
|
|
4
4
|
export interface Datasource {
|
|
5
5
|
fetch(query: Query, table: Table, options?: ApiRequestOptions, batch?: boolean): any;
|
|
6
|
-
save?(data: any, params?: any, options?: ApiRequestOptions): any
|
|
6
|
+
save?(data: any, params?: any, options?: ApiRequestOptions): PromiseLike<any>;
|
|
7
7
|
delete?(ids: any[], table: Table): any;
|
|
8
8
|
table?: Table;
|
|
9
9
|
}
|
package/types/common/Field.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { FieldCode } from "mdtScripts/helpers/types";
|
|
1
2
|
import { Record } from "./Record";
|
|
2
3
|
import { Table } from "./Table";
|
|
3
4
|
export interface Field extends Record {
|
|
4
5
|
id?: any;
|
|
5
|
-
code?:
|
|
6
|
+
code?: FieldCode;
|
|
6
7
|
title?: string;
|
|
7
8
|
type?: string;
|
|
8
9
|
codeLowered?: string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import "./inputView.less";
|
|
2
4
|
import { ComponentSize } from "mdtScripts/helpers/utils/stringifyControlSize";
|
|
3
5
|
import { KeyboardActions } from "mdtScripts/helpers/ui/elementModificators/focusableComponent";
|
|
6
|
+
import { CSSClassName } from "mdtScripts/helpers/types";
|
|
4
7
|
export declare function inputView({ attrs, hasError, size, ...options }: InputOptions): _mithril.MithrilVirtualElement;
|
|
5
8
|
export interface InputOptions {
|
|
6
9
|
id?: string;
|
|
@@ -15,6 +18,7 @@ export interface InputOptions {
|
|
|
15
18
|
readonly?: boolean;
|
|
16
19
|
hasError?: boolean;
|
|
17
20
|
keyboardActions?: KeyboardActions;
|
|
21
|
+
className?: CSSClassName;
|
|
18
22
|
/**
|
|
19
23
|
*
|
|
20
24
|
* @deprecated
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
3
|
+
import { CSSClassName } from "mdtScripts/helpers/types";
|
|
1
4
|
import { FormattedText } from "../../helpers/formattedText";
|
|
2
5
|
export declare type Icon = string;
|
|
3
|
-
export interface
|
|
6
|
+
export interface BaseIconOptions {
|
|
4
7
|
size?: "2xs" | "xs" | "sm" | "lg" | "xl" | "2xl" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x";
|
|
8
|
+
className?: CSSClassName;
|
|
9
|
+
}
|
|
10
|
+
export interface IconOptions extends BaseIconOptions {
|
|
5
11
|
fixedWidth?: boolean;
|
|
6
12
|
rotate?: "90" | "180" | "270";
|
|
7
13
|
flip?: "horizontal" | "vertical" | "both";
|
|
@@ -10,7 +16,7 @@ export interface IconOptions {
|
|
|
10
16
|
attrs?: _mithril.MithrilAttributes;
|
|
11
17
|
title?: string;
|
|
12
18
|
tooltip?: FormattedText;
|
|
13
|
-
className?: string;
|
|
14
19
|
onmousedown?: () => void;
|
|
15
20
|
onclick?: (e?: MouseEvent) => void;
|
|
16
21
|
}
|
|
22
|
+
export declare type IconElOptions = BaseIconOptions;
|
package/types/helpers/types.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
export interface AnyObject {
|
|
2
4
|
[key: string]: any;
|
|
3
5
|
}
|
|
@@ -9,18 +11,18 @@ declare type CSSSizeUnit = string;
|
|
|
9
11
|
export declare type NotifierType = "log" | "error" | "warn" | "info" | "success";
|
|
10
12
|
export interface NotifierOptions {
|
|
11
13
|
type?: NotifierType;
|
|
12
|
-
msg?:
|
|
14
|
+
msg?: MessageText;
|
|
13
15
|
icon?: string;
|
|
14
16
|
}
|
|
15
17
|
export interface Notifier {
|
|
16
|
-
notify(title:
|
|
18
|
+
notify(title: MessageText, options?: NotifierOptions): void;
|
|
17
19
|
}
|
|
18
20
|
export declare type ViewElement = _mithril.MithrilVirtualElement | _mithril.MithrilVirtualElement[] | string;
|
|
19
21
|
export declare type CommandEvent = Event | _mithril.MithrilEvent;
|
|
20
22
|
export declare type CSSClassName = string;
|
|
21
23
|
export declare type MithrilControl = ViewControl | ContentControl;
|
|
22
24
|
export interface ViewControl {
|
|
23
|
-
$view():
|
|
25
|
+
$view(): ViewElement | string;
|
|
24
26
|
[key: string]: any;
|
|
25
27
|
}
|
|
26
28
|
export interface ContentControl {
|
|
@@ -28,6 +30,7 @@ export interface ContentControl {
|
|
|
28
30
|
[key: string]: any;
|
|
29
31
|
}
|
|
30
32
|
export declare type Markdown = string;
|
|
33
|
+
export declare type MessageText = Markdown | string;
|
|
31
34
|
export declare type ColorStyle = "default" | "primary" | "success" | "info" | "warning" | "danger" | "fatal";
|
|
32
35
|
export declare type ButtonStyle = ColorStyle;
|
|
33
36
|
export declare type ObjectCode = string;
|
|
@@ -45,9 +48,12 @@ export declare type MithrilAttributes = _mithril.MithrilAttributes & {
|
|
|
45
48
|
};
|
|
46
49
|
export declare type AnyError = any;
|
|
47
50
|
export declare type FieldPath = string;
|
|
48
|
-
export declare type
|
|
51
|
+
export declare type FieldId = number;
|
|
52
|
+
export declare type FieldCode = string;
|
|
49
53
|
export declare type KeyboardKeyCode = string;
|
|
50
54
|
export declare type LanguageCode = "ru" | "en";
|
|
51
55
|
export declare type LanguageId = number;
|
|
56
|
+
export declare type GConstructor<T = Record<string, unknown>, A extends Array<any> = any> = new (...args: A) => T;
|
|
52
57
|
export declare type URLString = string;
|
|
58
|
+
export declare type JSONString = string;
|
|
53
59
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import { ComponentConfigParams } from "./modificatorsTypes";
|
|
2
4
|
export declare function getFocusableComponentAttrs(): _mithril.MithrilAttributes;
|
|
3
5
|
declare type KeyboardAction = (e: KeyboardEvent) => void;
|
|
@@ -7,12 +9,4 @@ export interface KeyboardActions {
|
|
|
7
9
|
clear?: KeyboardAction;
|
|
8
10
|
}
|
|
9
11
|
export declare function setKeyboardActions(actions: KeyboardActions, configParams: ComponentConfigParams): void;
|
|
10
|
-
interface EventModifierKeys {
|
|
11
|
-
shift: boolean;
|
|
12
|
-
meta: boolean;
|
|
13
|
-
alt: boolean;
|
|
14
|
-
ctrl: boolean;
|
|
15
|
-
}
|
|
16
|
-
declare type ModifierKey = keyof EventModifierKeys;
|
|
17
|
-
export declare function checkKeydownModifiers(e: KeyboardEvent, pressedModifierKeys?: ModifierKey[]): boolean;
|
|
18
12
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare type KeyCode = string;
|
|
2
|
+
interface EventModifierKeys {
|
|
3
|
+
shift: boolean;
|
|
4
|
+
meta: boolean;
|
|
5
|
+
alt: boolean;
|
|
6
|
+
ctrl: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare type ModifierKey = keyof EventModifierKeys;
|
|
9
|
+
export declare function checkKeydownModifiers(e: KeyboardEvent, pressedModifierKeys?: ModifierKey[]): boolean;
|
|
10
|
+
interface KeydownEventKeyCheckingOptions {
|
|
11
|
+
requiredModifiers?: ModifierKey[];
|
|
12
|
+
/** @default true */
|
|
13
|
+
checkModifiers?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function checkKeydownEventKeys(e: KeyboardEvent, keyCode: KeyCode, options?: KeydownEventKeyCheckingOptions): boolean;
|
|
16
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IFilterGroup } from "mdtServices/IFilter";
|
|
1
2
|
import { MdtField } from "../common/MdtField";
|
|
2
3
|
import { MdtObject } from "../common/MdtObject";
|
|
3
4
|
import { Record } from "../common/Record";
|
|
@@ -20,7 +21,7 @@ export interface PrincipalPermission extends Record {
|
|
|
20
21
|
ID_Field$?: MdtField;
|
|
21
22
|
LevelGrant?: PermissionLevel;
|
|
22
23
|
LevelDeny?: PermissionLevel;
|
|
23
|
-
Filter?:
|
|
24
|
+
Filter?: IFilterGroup;
|
|
24
25
|
}
|
|
25
26
|
export interface Permission extends Record {
|
|
26
27
|
id?: number;
|
|
@@ -4,25 +4,37 @@
|
|
|
4
4
|
* @default { "op": "eq", "p1": "", "p2": "" }
|
|
5
5
|
*/
|
|
6
6
|
export declare type IFilter = IFilterItem | IFilterGroup | IFilterIn;
|
|
7
|
+
export declare type FilterKeys = keyof IFilter | keyof IFilterItem | keyof IFilterGroup;
|
|
8
|
+
export declare type FilterUserIdOp = "userId";
|
|
9
|
+
export declare type FilterOp = "eq" | "ne" | "gt" | "ge" | "lt" | "le" | "startsWith" | "endsWith" | "contains" | "fulltext" | "equalTemplate" | "queryIn" | "notStartsWith" | "notContains" | "notEndsWith" | "null" | "notNull" | FilterUserIdOp | FilterInOperation;
|
|
10
|
+
export declare type FilterGroupOp = "and" | "or";
|
|
11
|
+
export declare type AnyFilterOp = FilterOp | FilterGroupOp;
|
|
12
|
+
export interface QueryInValue {
|
|
13
|
+
table?: string;
|
|
14
|
+
field?: string;
|
|
15
|
+
args?: string;
|
|
16
|
+
filter?: IFilter;
|
|
17
|
+
}
|
|
7
18
|
/** Группировка фильтров */
|
|
8
19
|
export interface IFilterGroup {
|
|
9
|
-
op:
|
|
20
|
+
op: FilterGroupOp;
|
|
10
21
|
groups: IFilter[];
|
|
11
22
|
not?: boolean;
|
|
12
23
|
}
|
|
13
24
|
/** Фильтр */
|
|
14
25
|
export interface IFilterItem {
|
|
15
|
-
op:
|
|
26
|
+
op: FilterOp;
|
|
16
27
|
/** Поле, по которому происходит фильтрация */
|
|
17
28
|
p1: string;
|
|
18
29
|
/** Значение фильтра */
|
|
19
|
-
p2: string | number | Date;
|
|
30
|
+
p2: string | number | Date | QueryInValue;
|
|
20
31
|
not?: boolean;
|
|
21
32
|
cast?: "date";
|
|
22
33
|
}
|
|
34
|
+
export declare type FilterInOperation = "in";
|
|
23
35
|
/** Фильтр */
|
|
24
36
|
export interface IFilterIn extends Omit<IFilterItem, "op" | "p2"> {
|
|
25
|
-
op:
|
|
37
|
+
op: FilterInOperation;
|
|
26
38
|
p2: {
|
|
27
39
|
table: string;
|
|
28
40
|
field: string;
|
|
@@ -74,4 +86,6 @@ export declare class Filter {
|
|
|
74
86
|
static queryIn(field: any, table: any, subField: any, filter: any, args?: any): IFilterIn;
|
|
75
87
|
static cast(filter: any, cast: any): IFilter;
|
|
76
88
|
static equalTemplate(p1: any, p2: any): IFilter;
|
|
89
|
+
static isFilterGroup(filter: IFilter): filter is IFilterGroup;
|
|
90
|
+
static isFilterItem(filter: IFilter): filter is IFilterItem;
|
|
77
91
|
}
|
|
@@ -50,7 +50,7 @@ export interface IFormControlFacade extends ParentCtrl {
|
|
|
50
50
|
/** Установить флаг доступности редактирования формы */
|
|
51
51
|
setReadonly(readonly: boolean): void;
|
|
52
52
|
/** Изменить свойства существующей кнопки */
|
|
53
|
-
updateCommand(findCondition: () => boolean, command: Partial<ButtonFacade>): void;
|
|
53
|
+
updateCommand(findCondition: (button: ButtonFacade) => boolean, command: Partial<ButtonFacade>): void;
|
|
54
54
|
/** Повторно инициализировать форму */
|
|
55
55
|
reinit(): void;
|
|
56
56
|
/** Сохранить форму */
|
|
@@ -61,4 +61,6 @@ export interface IFormControlFacade extends ParentCtrl {
|
|
|
61
61
|
getZones(): FormZones;
|
|
62
62
|
/** Подписаться на событие обновление значения поля формы */
|
|
63
63
|
onUpdated<V = string>(callback: (field: IFieldFacade, value: V) => void): void;
|
|
64
|
+
/** Закрыть форму */
|
|
65
|
+
close(): void;
|
|
64
66
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MdtRecord } from "mdtScripts/common/Record";
|
|
2
|
+
import { FormattedText } from "mdtScripts/helpers/formattedText";
|
|
3
|
+
import { Valued } from "mdtScripts/helpers/types";
|
|
2
4
|
import { Field } from "../../../../common/Field";
|
|
3
5
|
import { IButton } from "../../../../views/form/controls/monacoEditor/jsonSchemas/Button.schema";
|
|
4
6
|
import { RecordId } from "../utils/IApiFacade";
|
|
5
7
|
import { IFormControlFacade } from "./IFormControlFacade";
|
|
6
8
|
export declare type ActionButton = IButton & {
|
|
7
9
|
/** Всплывающая подсказка */
|
|
8
|
-
description?:
|
|
9
|
-
(): string;
|
|
10
|
-
};
|
|
10
|
+
description?: Valued<FormattedText>;
|
|
11
11
|
/** Подписка на событие нажатия на кнопку */
|
|
12
12
|
execute?: () => void;
|
|
13
13
|
/** Активность кнопки */
|
|
@@ -56,6 +56,10 @@ export interface IFormServiceFacade {
|
|
|
56
56
|
onCreated(callback: (form: IFormControlFacade) => void): void;
|
|
57
57
|
/** Добавить настройки для полей формы */
|
|
58
58
|
addFieldOptions(tableCode: string, options: IFormInitOptions): void;
|
|
59
|
+
/** Зарегистрировать расширение формы
|
|
60
|
+
* @param {string} alias - Имя свойства, которое можно использовать для установки опций экстендера
|
|
61
|
+
*/
|
|
62
|
+
registerExtender<T>(extender: IFormExtenderFacade<T>, alias: string): void;
|
|
59
63
|
}
|
|
60
64
|
export interface ICustomField extends Field {
|
|
61
65
|
/** Опции контрола поля */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import { FilterConstructor } from "../../../services/IFilter";
|
|
2
4
|
import { IFieldControlFacadeContstructor } from "./Form/IFieldControlFacade";
|
|
3
5
|
import { IFieldControlManagerFacade } from "./Form/IFieldControlManagerFacade";
|
|
@@ -17,6 +19,9 @@ import { IUiFacade } from "./utils/IUiFacade";
|
|
|
17
19
|
import { IUtilsFacade } from "./utils/IUtilsFacade";
|
|
18
20
|
import { IPageFacade } from "./IPageFacade";
|
|
19
21
|
import { CommandManagerFacade } from "./services/CommandManagerFacade";
|
|
22
|
+
export declare type ModulePackageInfo = {
|
|
23
|
+
version: string;
|
|
24
|
+
};
|
|
20
25
|
export interface IMDTFacade {
|
|
21
26
|
/** Mithril библиотека */
|
|
22
27
|
m: _mithril.MithrilStatic;
|
|
@@ -56,5 +61,5 @@ export interface IMDTFacade {
|
|
|
56
61
|
/** Управление командами */
|
|
57
62
|
CommandManager: CommandManagerFacade;
|
|
58
63
|
/** Зарегистрировать модуль */
|
|
59
|
-
registerModule(callback: () => void): void;
|
|
64
|
+
registerModule(callback: () => void, moduleData: ModulePackageInfo): void;
|
|
60
65
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import { FilterSetterOptions, IFilter } from "../../../../services/IFilter";
|
|
2
4
|
import { ButtonFacade } from "../Form/IFormFacade";
|
|
3
5
|
import { ParentCtrl } from "../utils/IUiFacade";
|
|
@@ -32,7 +34,7 @@ export interface IListControlFacade extends ParentCtrl {
|
|
|
32
34
|
/** Установить расширения списка */
|
|
33
35
|
setExtOptions(extOptions: any): void;
|
|
34
36
|
/** Изменить свойства существующей кнопки */
|
|
35
|
-
updateCommand(findCondition: () => boolean, command: Partial<ButtonFacade>): void;
|
|
37
|
+
updateCommand(findCondition: (button: ButtonFacade) => boolean, command: Partial<ButtonFacade>): void;
|
|
36
38
|
/** Открыть форму добавления записи */
|
|
37
39
|
openNewRecordForm(): void;
|
|
38
40
|
/** Удалить выделенные строки */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ObjectId } from "mdtScripts/helpers/types";
|
|
1
2
|
import { IFieldFacade } from "./IFieldFacade";
|
|
2
3
|
export interface IObjectFacade {
|
|
3
4
|
getCode(): string;
|
|
@@ -6,4 +7,5 @@ export interface IObjectFacade {
|
|
|
6
7
|
getPrimaryField(): IFieldFacade;
|
|
7
8
|
isReadonly(): boolean;
|
|
8
9
|
getField(code: string, check?: boolean): IFieldFacade;
|
|
10
|
+
getId(): ObjectId;
|
|
9
11
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import { ProcessPrincipalsListItem } from "../../../../components/processPrincipalsList/ProcessPrincipalsListItem";
|
|
2
|
-
import { Markdown, MithrilAttributes, Valued } from "../../../../helpers/types";
|
|
3
|
-
import { Icon, IconOptions } from "../../../../components/icon/iconOptions";
|
|
4
|
+
import { Markdown, MithrilAttributes, Valued, ViewElement } from "../../../../helpers/types";
|
|
5
|
+
import { Icon, IconElOptions, IconOptions } from "../../../../components/icon/iconOptions";
|
|
4
6
|
import { InputOptions } from "../../../../components/baseFormControls/input/inputView";
|
|
5
7
|
import { CommonControlOptions } from "../../../../views/form/controls/commonControl/ICommonControl";
|
|
6
8
|
import { ButtonFacade } from "../Form/IFormFacade";
|
|
7
9
|
import { DropdownInputItemOptions } from "../../../../components/dropdown/menu/item/dropdownInputItemOptions";
|
|
8
10
|
import { DropdownItemViewOptions } from "../../../../components/dropdown/menu/item/dropdownItemWrapOptions";
|
|
9
11
|
export interface IUiComponentsFacade {
|
|
10
|
-
button(button: ButtonFacade, translate?: boolean):
|
|
12
|
+
button(button: ButtonFacade, translate?: boolean): ViewElement;
|
|
11
13
|
topNavButton(options: TopNavButton): _mithril.MithrilVirtualElement;
|
|
12
14
|
icon(code: string, options?: IconOptions): _mithril.MithrilVirtualElement;
|
|
15
|
+
iconHTML(icon: Icon, options?: IconElOptions): HTMLElement;
|
|
13
16
|
processFormBlock(options: IProcessFormBlockOptions): _mithril.MithrilVirtualElement;
|
|
14
17
|
commonControl(options: CommonControlOptions): _mithril.MithrilVirtualElement;
|
|
15
18
|
unstyledInput(options: InputOptions): _mithril.MithrilVirtualElement;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import { MithrilControl } from "../../../../helpers/types";
|
|
2
4
|
import { DropdownOptions } from "../../../dropdown/IDropDownMenu";
|
|
3
5
|
import { ButtonFacade } from "../Form/IFormFacade";
|
|
4
6
|
import { DropdownTargetContext, IDropdownMenu } from "mdtServices/dropdown/IDropDownMenu";
|
|
7
|
+
import { IModalFacade } from "../components/ModalFacade";
|
|
5
8
|
export declare type onModalResizeCallback = (data: IModalSizingState) => void;
|
|
6
9
|
export interface IType<T> {
|
|
7
10
|
new (...args: any[]): T;
|
|
@@ -25,7 +28,7 @@ export interface IUiFacade {
|
|
|
25
28
|
/** Вызвать окно уведомления */
|
|
26
29
|
showNotification(msg: CustomNotification, duration?: number): any;
|
|
27
30
|
/** Вызвать модальное окно */
|
|
28
|
-
showModal(ctrl: MithrilControl | ParentCtrl, options?: IModalOptions):
|
|
31
|
+
showModal(ctrl: MithrilControl | ParentCtrl, options?: IModalOptions): IModalFacade;
|
|
29
32
|
/** Вызвать боковую панель */
|
|
30
33
|
showSidebar(ctrl: MithrilControl | ParentCtrl, options?: IPanelOptions): any;
|
|
31
34
|
/** Создать выпадающее меню */
|
|
@@ -53,6 +56,8 @@ export interface IModalOptions {
|
|
|
53
56
|
initialSizingState?: IModalSizingState;
|
|
54
57
|
/** Тип модального окна */
|
|
55
58
|
type?: ModalTypes;
|
|
59
|
+
/** Дополнительные кнопки на окне */
|
|
60
|
+
buttons?: ButtonFacade[];
|
|
56
61
|
}
|
|
57
62
|
export interface IPanelOptions {
|
|
58
63
|
/** Отображать боковую панель в расширенном на весь экран виде */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
/// <reference types="mithril" />
|
|
1
3
|
import { MithrilControl } from "mdtScripts/helpers/types";
|
|
2
4
|
export declare type ConfigFunction = (element: HTMLElement, isInitialized: boolean, context?: any) => void;
|
|
3
5
|
export interface ImUtilsFacade {
|
|
@@ -32,7 +32,10 @@ export interface ListPageOptions {
|
|
|
32
32
|
fkLinks?: boolean;
|
|
33
33
|
/** Разрешить редактирование форм, открытых по нажатию на ссылки на внешние таблицы */
|
|
34
34
|
fkLinksEditable?: boolean;
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* @title Запретить редактирование o2m полей в списке
|
|
37
|
+
* @TJS-type boolean
|
|
38
|
+
*/
|
|
36
39
|
readonly?: any;
|
|
37
40
|
/** Запрашивать дополнительную информацию по путям, не отображающимся в списке */
|
|
38
41
|
addSelect?: string[];
|