mdt-client 1.2.0 → 23.0.1

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.
Files changed (60) hide show
  1. package/dist/index.d.ts +1 -2
  2. package/dist/index.js +2 -12
  3. package/dist/index.js.map +1 -1
  4. package/dist/tsconfig.tsbuildinfo +1 -2707
  5. package/package.json +3 -5
  6. package/types/common/Datasource.d.ts +1 -1
  7. package/types/common/Field.d.ts +1 -2
  8. package/types/common/Record.d.ts +1 -9
  9. package/types/common/Table.d.ts +6 -12
  10. package/types/security/PermissionLevel.d.ts +1 -2
  11. package/types/services/IFilter.d.ts +9 -19
  12. package/types/services/customModules/facades/Form/IFieldControlManagerFacade.d.ts +1 -1
  13. package/types/services/customModules/facades/Form/IFormControlFacade.d.ts +2 -25
  14. package/types/services/customModules/facades/Form/IFormFacade.d.ts +4 -14
  15. package/types/services/customModules/facades/IAuthFacade.d.ts +1 -2
  16. package/types/services/customModules/facades/IMdtFacade.d.ts +3 -11
  17. package/types/services/customModules/facades/List/IListCellFacade.d.ts +1 -6
  18. package/types/services/customModules/facades/List/IListControlFacade.d.ts +1 -8
  19. package/types/services/customModules/facades/List/IListRowFacade.d.ts +12 -2
  20. package/types/services/customModules/facades/List/IListServiceFacade.d.ts +0 -7
  21. package/types/services/customModules/facades/internalModules/modulesFacadeTypes.d.ts +10 -0
  22. package/types/services/customModules/facades/internalModules/statusFacade.d.ts +14 -0
  23. package/types/services/customModules/facades/record/IRecordFacade.d.ts +16 -0
  24. package/types/services/customModules/facades/schema/IObjectFacade.d.ts +0 -2
  25. package/types/services/customModules/facades/utils/IUiComponentsFacade.d.ts +1 -40
  26. package/types/services/customModules/facades/utils/IUiFacade.d.ts +9 -12
  27. package/types/services/customModules/facades/utils/IUtilsFacade.d.ts +0 -1
  28. package/types/services/customModules/facades/utils/ImUtilsFacade.d.ts +0 -4
  29. package/types/views/controls/Control.d.ts +2 -1
  30. package/types/views/form/controls/monacoEditor/jsonSchemas/Button.schema.d.ts +3 -4
  31. package/types/views/form/schema/FormPageOptions.schema.d.ts +17 -0
  32. package/types/views/list/schema/ListPageOptions.schema.d.ts +7 -23
  33. package/types/components/baseFormControls/input/inputView.d.ts +0 -27
  34. package/types/components/dropdown/menu/item/dropdownInputItemOptions.d.ts +0 -5
  35. package/types/components/dropdown/menu/item/dropdownItemWrapOptions.d.ts +0 -19
  36. package/types/components/dropdown/menuActionItem/dropdownMenuItemOptions.d.ts +0 -28
  37. package/types/components/icon/iconOptions.d.ts +0 -22
  38. package/types/components/processPrincipalsList/ProcessPrincipalsListItem.d.ts +0 -5
  39. package/types/helpers/formattedText.d.ts +0 -9
  40. package/types/helpers/types.d.ts +0 -59
  41. package/types/helpers/ui/elementModificators/focusableComponent.d.ts +0 -12
  42. package/types/helpers/ui/elementModificators/modificatorsTypes.d.ts +0 -4
  43. package/types/helpers/ui/keyboardUtils/keyboardUtils.d.ts +0 -16
  44. package/types/helpers/utils/classNames.d.ts +0 -2
  45. package/types/helpers/utils/object.d.ts +0 -1
  46. package/types/helpers/utils/stringifyControlSize.d.ts +0 -3
  47. package/types/helpers/zone/IZone.d.ts +0 -8
  48. package/types/services/HotkeyManager.d.ts +0 -4
  49. package/types/services/commands/Command.d.ts +0 -22
  50. package/types/services/commands/CommandGroup.d.ts +0 -15
  51. package/types/services/commands/CommandManager.d.ts +0 -77
  52. package/types/services/customModules/facades/IPageFacade.d.ts +0 -7
  53. package/types/services/customModules/facades/List/IListComponentFacade.d.ts +0 -10
  54. package/types/services/customModules/facades/components/ModalFacade.d.ts +0 -4
  55. package/types/services/customModules/facades/services/CommandManagerFacade.d.ts +0 -9
  56. package/types/services/dropdown/IDropDownMenu.d.ts +0 -27
  57. package/types/views/form/controls/commonControl/ICommonControl.d.ts +0 -24
  58. package/types/views/form/formTypes.d.ts +0 -4
  59. package/types/views/list/IListView.d.ts +0 -62
  60. package/types/views/page/PageZoneTypes.d.ts +0 -1
@@ -1,7 +1,7 @@
1
+ import { FormPageOptions } from "mdtScripts/views/form/schema/FormPageOptions.schema";
1
2
  import { BaseQuery } from "../../../services/api/BaseQuery";
2
3
  import { QuerySorting } from "../../../services/api/Query";
3
4
  import { IFilter } from "../../../services/IFilter";
4
- declare type WhiteSpaceType = "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap" | "inherit";
5
5
  export interface ListPageOptions {
6
6
  /** Настройки получения данных */
7
7
  paging?: {
@@ -32,10 +32,11 @@ export interface ListPageOptions {
32
32
  fkLinks?: boolean;
33
33
  /** Разрешить редактирование форм, открытых по нажатию на ссылки на внешние таблицы */
34
34
  fkLinksEditable?: boolean;
35
- /**
36
- * @title Запретить редактирование o2m полей в списке
37
- * @TJS-type boolean
38
- */
35
+ /** Установить опции для формы, открывающейся по нажатию на ссылку у FK */
36
+ fkLinksFormOptions?: {
37
+ [k: string]: FormPageOptions;
38
+ };
39
+ /** Запретить редактирование записей */
39
40
  readonly?: any;
40
41
  /** Запрашивать дополнительную информацию по путям, не отображающимся в списке */
41
42
  addSelect?: string[];
@@ -58,22 +59,5 @@ export interface ListPageOptions {
58
59
  *
59
60
  * inherit - наследует значение родителя
60
61
  * */
61
- whiteSpace?: WhiteSpaceType;
62
- /**
63
- * Определяет как будут отображаться пробелы в заголовке:
64
- *
65
- * normal - текст в окне браузера выводится как обычно, переносы строк устанавливаются автоматически
66
- *
67
- * nowrap - пробелы не учитываются, переносы строк игнорируются, весь заголовок отображается одной строкой
68
- *
69
- * pre - заголовок показывается с учетом всех пробелов и переносов
70
- *
71
- * pre-line - в заголовке пробелы не учитываются, текст автоматически переносится на следующую строку, если он не помещается в заданную область
72
- *
73
- * pre-wrap - в заголовке сохраняются все пробелы и переносы, однако если строка по ширине не помещается в заданную область, то текст автоматически будет перенесен на следующую строку.
74
- *
75
- * inherit - наследует значение родителя
76
- * */
77
- whiteSpaceHeader?: WhiteSpaceType;
62
+ whiteSpace?: "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap" | "inherit";
78
63
  }
79
- export {};
@@ -1,27 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import "./inputView.less";
4
- import { ComponentSize } from "mdtScripts/helpers/utils/stringifyControlSize";
5
- import { KeyboardActions } from "mdtScripts/helpers/ui/elementModificators/focusableComponent";
6
- import { CSSClassName } from "mdtScripts/helpers/types";
7
- export declare function inputView({ attrs, hasError, size, ...options }: InputOptions): _mithril.MithrilVirtualElement;
8
- export interface InputOptions {
9
- id?: string;
10
- value?: string | number;
11
- type?: string;
12
- placeholder?: string;
13
- autofocus?: boolean;
14
- autocomplete?: "on" | "off";
15
- min?: number;
16
- max?: number;
17
- size?: ComponentSize;
18
- readonly?: boolean;
19
- hasError?: boolean;
20
- keyboardActions?: KeyboardActions;
21
- className?: CSSClassName;
22
- /**
23
- *
24
- * @deprecated
25
- */
26
- attrs?: _mithril.MithrilAttributes;
27
- }
@@ -1,5 +0,0 @@
1
- export interface DropdownInputItemOptions {
2
- value: string;
3
- onChange?: (value: string) => void;
4
- config?: (el: HTMLElement, inited: boolean) => void;
5
- }
@@ -1,19 +0,0 @@
1
- import { ViewElement } from "../../../../helpers/types";
2
- import { DropdownMenuItemBaseOptions, DropdownMenuItemOptions, DropdownMenuItemWithChildrenOptions } from "../../menuActionItem/dropdownMenuItemOptions";
3
- export interface DropdownItemBaseOptions {
4
- className?: string;
5
- idx?: number;
6
- }
7
- export interface DropdownItemOptions<T extends DropdownMenuItemBaseOptions = DropdownMenuItemBaseOptions> extends DropdownItemBaseOptions {
8
- focused?: boolean;
9
- actionItemOptions: T;
10
- }
11
- export declare type DropdownBaseItemOptions = DropdownItemOptions<DropdownMenuItemOptions>;
12
- export declare type DropdownItemWithMoreOptions = DropdownItemOptions<DropdownMenuItemWithChildrenOptions>;
13
- export interface DropdownItemWithCustomContentOptions extends DropdownItemBaseOptions {
14
- content: ViewElement;
15
- }
16
- export interface DropdownMenuItemBaseFocusable {
17
- focused?: boolean;
18
- }
19
- export declare type DropdownItemViewOptions = DropdownMenuItemOptions & DropdownMenuItemBaseFocusable;
@@ -1,28 +0,0 @@
1
- import { Icon } from "mdtScripts/components/icon/iconOptions";
2
- import { FormattedText } from "mdtScripts/helpers/formattedText";
3
- import { CSSClassName, ViewElement, Valued } from "mdtScripts/helpers/types";
4
- export interface DropdownMenuItemBaseOptions {
5
- icon?: Valued<Icon>;
6
- title: Valued<string>;
7
- additionalTitle?: string;
8
- tooltip?: Valued<FormattedText>;
9
- execute?: (e?: Event) => void;
10
- visible?: () => boolean;
11
- enabled?: () => boolean;
12
- selected?: Valued<boolean>;
13
- className?: CSSClassName;
14
- zone?: DropdownMenuItemZones;
15
- }
16
- interface DropdownMenuItemZones {
17
- right: () => ViewElement;
18
- }
19
- export interface DropdownMenuItemOptions extends DropdownMenuItemBaseOptions {
20
- rightCaret?: boolean;
21
- }
22
- export interface DropdownMenuItemWithChildrenOptions extends DropdownMenuItemBaseOptions {
23
- moreBtn?: MoreButton;
24
- }
25
- interface MoreButton {
26
- execute: (e?: Event) => void;
27
- }
28
- export {};
@@ -1,22 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import { CSSClassName } from "mdtScripts/helpers/types";
4
- import { FormattedText } from "../../helpers/formattedText";
5
- export declare type Icon = string;
6
- export interface BaseIconOptions {
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 {
11
- fixedWidth?: boolean;
12
- rotate?: "90" | "180" | "270";
13
- flip?: "horizontal" | "vertical" | "both";
14
- animate?: "spin" | "beat" | "fade" | "flash";
15
- /** @deprecated */
16
- attrs?: _mithril.MithrilAttributes;
17
- title?: string;
18
- tooltip?: FormattedText;
19
- onmousedown?: () => void;
20
- onclick?: (e?: MouseEvent) => void;
21
- }
22
- export declare type IconElOptions = BaseIconOptions;
@@ -1,5 +0,0 @@
1
- import { RecordId } from "mdtScripts/common/Record";
2
- export interface ProcessPrincipalsListItem {
3
- id: RecordId;
4
- title: string;
5
- }
@@ -1,9 +0,0 @@
1
- declare type FormattedTextType = "text" | "markdown";
2
- export declare type FormattedText = string | {
3
- text: string;
4
- type: FormattedTextType;
5
- };
6
- export declare function getTextContent(text: FormattedText): string;
7
- export declare function getFormattedTextType(text: FormattedText): FormattedTextType;
8
- export declare function getTranslatedFormattedText(text: FormattedText, translateFn: (text: string) => string): FormattedText;
9
- export {};
@@ -1,59 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- export interface AnyObject {
4
- [key: string]: any;
5
- }
6
- export declare type MithrilStyleAttribute = {
7
- width?: CSSSizeUnit;
8
- } & AnyObject;
9
- export declare type MithrilContext<T = Record<string, unknown>> = T;
10
- declare type CSSSizeUnit = string;
11
- export declare type NotifierType = "log" | "error" | "warn" | "info" | "success";
12
- export interface NotifierOptions {
13
- type?: NotifierType;
14
- msg?: MessageText;
15
- icon?: string;
16
- }
17
- export interface Notifier {
18
- notify(title: MessageText, options?: NotifierOptions): void;
19
- }
20
- export declare type ViewElement = _mithril.MithrilVirtualElement | _mithril.MithrilVirtualElement[] | string;
21
- export declare type CommandEvent = Event | _mithril.MithrilEvent;
22
- export declare type CSSClassName = string;
23
- export declare type MithrilControl = ViewControl | ContentControl;
24
- export interface ViewControl {
25
- $view(): ViewElement | string;
26
- [key: string]: any;
27
- }
28
- export interface ContentControl {
29
- content: any;
30
- [key: string]: any;
31
- }
32
- export declare type Markdown = string;
33
- export declare type MessageText = Markdown | string;
34
- export declare type ColorStyle = "default" | "primary" | "success" | "info" | "warning" | "danger" | "fatal";
35
- export declare type ButtonStyle = ColorStyle;
36
- export declare type ObjectCode = string;
37
- export declare type ObjectId = number;
38
- export declare type ObjectIdOrCode = ObjectCode | ObjectId;
39
- export declare type ObjectTitle = string;
40
- export declare type ObjectSchemaName = string;
41
- export declare type ObjectPhysicalName = string;
42
- export declare type ModuleId = number;
43
- export declare type ModuleCode = string;
44
- export declare type Valued<T> = T | (() => T);
45
- export declare type Timeout = ReturnType<typeof setTimeout>;
46
- export declare type MithrilAttributes = _mithril.MithrilAttributes & {
47
- [name: string]: any;
48
- };
49
- export declare type AnyError = any;
50
- export declare type FieldPath = string;
51
- export declare type FieldId = number;
52
- export declare type FieldCode = string;
53
- export declare type KeyboardKeyCode = string;
54
- export declare type LanguageCode = "ru" | "en";
55
- export declare type LanguageId = number;
56
- export declare type GConstructor<T = Record<string, unknown>, A extends Array<any> = any> = new (...args: A) => T;
57
- export declare type URLString = string;
58
- export declare type JSONString = string;
59
- export {};
@@ -1,12 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import { ComponentConfigParams } from "./modificatorsTypes";
4
- export declare function getFocusableComponentAttrs(): _mithril.MithrilAttributes;
5
- declare type KeyboardAction = (e: KeyboardEvent) => void;
6
- export interface KeyboardActions {
7
- primary?: KeyboardAction;
8
- secondary?: KeyboardAction;
9
- clear?: KeyboardAction;
10
- }
11
- export declare function setKeyboardActions(actions: KeyboardActions, configParams: ComponentConfigParams): void;
12
- export {};
@@ -1,4 +0,0 @@
1
- export interface ComponentConfigParams {
2
- el: HTMLElement;
3
- inited: boolean;
4
- }
@@ -1,16 +0,0 @@
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,2 +0,0 @@
1
- export declare function classNames(...args: any[]): string;
2
- export declare function mClassNames(...args: any[]): string;
@@ -1 +0,0 @@
1
- export declare function hasOwnProperty(object: Record<never, unknown>, name: string): boolean;
@@ -1,3 +0,0 @@
1
- import { ControlSize } from "mdtScripts/views/controls/Control";
2
- export declare type ComponentSize = "small" | "normal" | "large";
3
- export declare function stringifyControlSize(size: ControlSize): ComponentSize;
@@ -1,8 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import { MithrilControl } from "../types";
4
- export interface IZone {
5
- remove(content: MithrilControl): void;
6
- push(content: MithrilControl): void;
7
- render(): _mithril.MithrilVirtualElement[];
8
- }
@@ -1,4 +0,0 @@
1
- export declare class HotkeyManager {
2
- static keyJoinWith: string;
3
- static eventToString(e: any): string;
4
- }
@@ -1,22 +0,0 @@
1
- import { Icon } from "../../components/icon/iconOptions";
2
- import { FormattedText } from "../../helpers/formattedText";
3
- import { AnyObject, Valued } from "../../helpers/types";
4
- import { CommandBase, CommandGroupProps, CommandProps, Hotkey } from "./CommandManager";
5
- interface CommandOptions<Context> {
6
- getContext: () => Context;
7
- }
8
- export declare class Command<Context = AnyObject> implements CommandProps {
9
- private base;
10
- private options;
11
- readonly code: string;
12
- readonly title: string;
13
- readonly description: Valued<FormattedText>;
14
- readonly icon: Valued<Icon>;
15
- readonly hotkeys: Hotkey[];
16
- readonly group: CommandGroupProps;
17
- constructor(base: CommandBase, options: CommandOptions<Context>);
18
- visible(): boolean;
19
- enabled(): boolean;
20
- execute(): void;
21
- }
22
- export {};
@@ -1,15 +0,0 @@
1
- import { AnyObject } from "../../helpers/types";
2
- import { CommandBase, CommandGroupProps } from "./CommandManager";
3
- interface CommandGroupOptions<Context> {
4
- addCommands: (commands: CommandBase<Context>[], groupCode: string) => void;
5
- }
6
- export declare class CommandGroup<Context = AnyObject> implements CommandGroupProps {
7
- private options;
8
- readonly code: string;
9
- readonly title: string;
10
- readonly description?: string;
11
- readonly icon?: string;
12
- constructor(group: CommandGroupProps, options: CommandGroupOptions<Context>);
13
- addCommands(commands: CommandBase<Context>[]): void;
14
- }
15
- export {};
@@ -1,77 +0,0 @@
1
- import { Icon } from "../../components/icon/iconOptions";
2
- import { FormattedText } from "../../helpers/formattedText";
3
- import { AnyObject, CommandEvent, Valued } from "../../helpers/types";
4
- import { IFormControlFacade } from "../customModules/facades/Form/IFormControlFacade";
5
- import { IListControlFacade } from "../customModules/facades/List/IListControlFacade";
6
- import { Command } from "./Command";
7
- import { CommandGroup } from "./CommandGroup";
8
- export interface CommandGroupProps {
9
- /** Уникальный код группы команд */
10
- code: string;
11
- /** Наименование группы команд */
12
- title: string;
13
- /** Описание группы команд */
14
- description?: string;
15
- /** Иконка группы команд */
16
- icon?: Icon;
17
- }
18
- export declare type Hotkey = string;
19
- export interface CommandProps {
20
- /** Уникальный код команды */
21
- code: string;
22
- /** Наименование команды */
23
- title: string;
24
- /** Описание команды */
25
- description?: Valued<FormattedText>;
26
- /** Иконка команды */
27
- icon?: Valued<Icon>;
28
- /**
29
- * Горячие клавиши для вызова команды.
30
- *
31
- * Комбинаций клавиш для команды может быть несколько.
32
- *
33
- * Комбинация клавиш задается строкой и указывается в следующем порядке `Ctrl/Cmd + Alt + Shift + Любая другая клавиша`.
34
- *
35
- * Клавиши разделяются двумя пробелами и символом "+" между ними.
36
- *
37
- * Например `Alt + Shift + Y`.
38
- */
39
- hotkeys?: Hotkey[];
40
- /** Группа которой принадлежит команда */
41
- group?: CommandGroupProps;
42
- }
43
- export interface CommandBase<Context = AnyObject> extends CommandProps {
44
- /** Функция которая будет вызвана при выполнении команды */
45
- execute: (context: Context) => void;
46
- /** Условие активности команды */
47
- enabled?: (context: Context) => boolean;
48
- /** Условие видимости команды в палитре команд */
49
- visible?: (context: Context) => boolean;
50
- }
51
- export declare type HotkeyCommands = {
52
- [hotkey: string]: () => void;
53
- };
54
- export interface CommandManagerContext {
55
- list?: IListControlFacade;
56
- form?: IFormControlFacade;
57
- [contextProp: string]: any;
58
- }
59
- export declare class CommandManagerClass<Context> {
60
- private groups;
61
- private commands;
62
- private hotkeyCommands;
63
- private context;
64
- addGroup(group: CommandGroupProps, commands?: CommandBase<Context>[]): CommandGroup<Context>;
65
- addCommands(commands: CommandBase<Context>[], groupCode?: string): void;
66
- getCommand(code: string): Command<Context>;
67
- getCommandList(): Command<Context>[];
68
- execByEvent(event: CommandEvent): void;
69
- setContext(key: keyof Context, value: Context[keyof Context]): void;
70
- removeContext(key: keyof Context): void;
71
- private createGroup;
72
- private validateGroup;
73
- private findGroup;
74
- private validateCommand;
75
- private pushCommands;
76
- }
77
- export declare const CommandManager: CommandManagerClass<CommandManagerContext>;
@@ -1,7 +0,0 @@
1
- import { PageZoneCodes } from "../../../views/page/PageZoneTypes";
2
- import { MithrilControl } from "../../../helpers/types";
3
- export interface IPageFacade {
4
- getZone(zone: typeof PageZoneCodes[number]): {
5
- addControl: (control: MithrilControl) => void;
6
- };
7
- }
@@ -1,10 +0,0 @@
1
- import { IListControlFacade } from "./IListControlFacade";
2
- export interface IListComponentFacade {
3
- record: any;
4
- list: IListControlFacade;
5
- addClass(className: string): void;
6
- hasClass(className: string): boolean;
7
- removeClass(className: string): void;
8
- addStyle(prop: string, value: string): void;
9
- config(config: Function, before?: boolean): void;
10
- }
@@ -1,4 +0,0 @@
1
- export interface IModalFacade {
2
- /** Закрыть модальное окно */
3
- close(): void;
4
- }
@@ -1,9 +0,0 @@
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>[]): void;
9
- }
@@ -1,27 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import { MithrilContext, MithrilControl } from "../../helpers/types";
4
- export declare class IDropdownMenu<I> {
5
- constructor(items: I[], uid: string, options?: DropdownOptions<I>);
6
- bind(el: HTMLElement, ctx: MithrilContext): void;
7
- show(): void;
8
- close(): void;
9
- isShown(): boolean;
10
- }
11
- export interface DropdownOptions<I> {
12
- getItems: () => I[];
13
- onSelect: (item: Exclude<I, MithrilControl>) => void;
14
- itemView: (item: Exclude<I, MithrilControl>) => _mithril.MithrilVirtualElement;
15
- class?: string;
16
- onShow?: () => void;
17
- onClose?: () => void;
18
- }
19
- export interface DropdownMenuViewOptions<I> {
20
- items: I[];
21
- itemView?: (item: Exclude<I, MithrilControl>) => _mithril.MithrilVirtualElement;
22
- onSelect: (item: Exclude<I, MithrilControl>) => void;
23
- class?: string;
24
- }
25
- export declare type DropdownTargetContext<I> = MithrilContext<{
26
- $dropdown?: IDropdownMenu<I>;
27
- }>;
@@ -1,24 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import { Valued, ViewElement } from "../../../../helpers/types";
4
- export interface Action {
5
- icon?: Valued<string>;
6
- code?: string;
7
- title?: Valued<string>;
8
- command?: () => void;
9
- }
10
- export interface ClearAction {
11
- show?: boolean;
12
- title?: Valued<string>;
13
- command?: () => void;
14
- }
15
- export interface CommonControlOptions {
16
- actions?: Action[];
17
- clearAction?: ClearAction;
18
- icon?: Valued<string>;
19
- readonly?: boolean;
20
- attrs?: _mithril.MithrilAttributes;
21
- contentAttrs?: _mithril.MithrilAttributes;
22
- content?: ViewElement;
23
- invalid?: boolean;
24
- }
@@ -1,4 +0,0 @@
1
- import { IZone } from "mdtScripts/helpers/zone/IZone";
2
- export interface FormZones {
3
- beforeLayout: IZone;
4
- }
@@ -1,62 +0,0 @@
1
- /// <reference types="../../../../mithril" />
2
- /// <reference types="mithril" />
3
- import { Field } from "../../common/Field";
4
- import { IListControlFacade } from "../../services/customModules/facades/List/IListControlFacade";
5
- export interface ICellTransformerCtx {
6
- row: {
7
- $rendered?: number;
8
- [k: string]: any;
9
- };
10
- td: _mithril.MithrilVirtualElement;
11
- tr: _mithril.MithrilVirtualElement;
12
- isHead?: boolean;
13
- idx?: number;
14
- }
15
- export interface CellTransformerContext extends ICellTransformerCtx {
16
- list: IListControlFacade;
17
- col: LayoutColumn;
18
- }
19
- export interface IRowTransformerContext {
20
- row: any;
21
- tr: _mithril.MithrilVirtualElement;
22
- list: any;
23
- }
24
- export interface RowTransformerContext extends IRowTransformerContext {
25
- list: IListControlFacade;
26
- }
27
- export interface ILayoutColumnBase {
28
- id?: number;
29
- code?: string;
30
- fieldPath?: string;
31
- title?: string;
32
- description?: string;
33
- width?: number;
34
- type?: string;
35
- position?: number;
36
- flagIconOnly?: boolean;
37
- id_FilterFunction?: number;
38
- }
39
- export interface ILayoutColumn extends ILayoutColumnBase {
40
- control?: any;
41
- transformer?: any;
42
- $field?: Field;
43
- $pathFields?: Field[];
44
- $pathFieldsFull?: Field[];
45
- $refFields?: Field[];
46
- $type?: any;
47
- $column?: any;
48
- $valuePath?: string;
49
- $valuePathFull?: string;
50
- $lastRefField?: Field;
51
- $refIdPath?: string;
52
- $system?: boolean;
53
- $new?: boolean;
54
- $title?: string;
55
- $destroy?: boolean;
56
- }
57
- export interface LayoutColumn extends ILayoutColumn {
58
- $valueView?: (value: any, ctx: CellTransformerContext, args?: O2MValueViewArgs) => any;
59
- }
60
- export interface O2MValueViewArgs {
61
- valueIndex?: number;
62
- }
@@ -1 +0,0 @@
1
- export declare const PageZoneCodes: readonly ["nav.left", "nav.right"];