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,84 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
import { UiType } from "./IUi";
|
|
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 declare type LabelType = "normal" | "heading" | "hidden" | "inline" | "embedded";
|
|
13
|
+
export interface NotifierOptions {
|
|
14
|
+
type?: NotifierType;
|
|
15
|
+
msg?: MessageText;
|
|
16
|
+
icon?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Notifier {
|
|
19
|
+
notify(title: MessageText, options?: NotifierOptions): void;
|
|
20
|
+
}
|
|
21
|
+
export interface NotifierErrorOptions extends NotifierOptions {
|
|
22
|
+
error?: Error;
|
|
23
|
+
}
|
|
24
|
+
export interface ErrorNotifier extends Notifier {
|
|
25
|
+
notify(title: MessageText, options?: NotifierErrorOptions): void;
|
|
26
|
+
}
|
|
27
|
+
export declare type ViewElement = _mithril.MithrilVirtualElement | _mithril.MithrilVirtualElement[] | string;
|
|
28
|
+
export declare type CommandEvent = Event | _mithril.MithrilEvent;
|
|
29
|
+
export declare type InputChangeEvent = Event | _mithril.MithrilEvent;
|
|
30
|
+
export declare type CSSClassName = string;
|
|
31
|
+
export declare type CSSPositionUnit = string;
|
|
32
|
+
export declare type MithrilControl = ViewControl | ContentControl;
|
|
33
|
+
export interface ViewControl {
|
|
34
|
+
$view(): ViewElement | string;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export declare type ViewControlConstructor<A extends Array<any> = any> = new (...A: A) => ViewControl;
|
|
38
|
+
export interface ContentControl<C = any> {
|
|
39
|
+
content: C;
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}
|
|
42
|
+
export declare type Markdown = string;
|
|
43
|
+
export declare type MessageText = Markdown | string;
|
|
44
|
+
export declare type ColorStyle = UiType | "default";
|
|
45
|
+
export declare type ButtonStyle = ColorStyle;
|
|
46
|
+
export declare type ObjectCode = string;
|
|
47
|
+
export declare type ObjectId = number;
|
|
48
|
+
export declare type ObjectIdOrCode = ObjectCode | ObjectId;
|
|
49
|
+
export declare type ObjectTitle = string;
|
|
50
|
+
export declare type ObjectSchemaName = string;
|
|
51
|
+
export declare type ObjectPhysicalName = string;
|
|
52
|
+
export declare type ModuleId = number;
|
|
53
|
+
export declare type ModuleCode = string;
|
|
54
|
+
export declare type Valued<T> = T | (() => T);
|
|
55
|
+
export declare type Timeout = ReturnType<typeof setTimeout>;
|
|
56
|
+
export declare type MithrilAttributes = _mithril.MithrilAttributes & {
|
|
57
|
+
[name: string]: any;
|
|
58
|
+
};
|
|
59
|
+
export declare type MithrilVirtualElementKey = string | number;
|
|
60
|
+
export declare type HTMLAnchorTarget = "_blank" | "_self" | "_parent" | "_top" | "framename";
|
|
61
|
+
export declare type HTMLString = string;
|
|
62
|
+
export declare type KeyboardKeyCode = string;
|
|
63
|
+
export declare type AnyError = any;
|
|
64
|
+
export declare type FieldPath = string;
|
|
65
|
+
export declare type FieldId = number;
|
|
66
|
+
export declare type FieldCode = string;
|
|
67
|
+
export declare type FieldKind = "dfk" | "o2m" | "o2o" | "hist" | "dfk-list";
|
|
68
|
+
export declare type LanguageCode = "ru" | "en";
|
|
69
|
+
export declare type LanguageId = number;
|
|
70
|
+
export declare type GConstructor<T = Record<string, unknown>, A extends Array<any> = any> = new (...args: A) => T;
|
|
71
|
+
export declare type URLString = string;
|
|
72
|
+
export declare type JSONString = string;
|
|
73
|
+
export declare type JavaScriptCodeContent = string;
|
|
74
|
+
export declare type DateString = string;
|
|
75
|
+
export declare type RequestMethod = "POST" | "GET" | string;
|
|
76
|
+
export declare enum BrandIcon {
|
|
77
|
+
primary = 0,
|
|
78
|
+
fatal = "skull",
|
|
79
|
+
danger = "hexagon-xmark",
|
|
80
|
+
warning = "triangle-exclamation",
|
|
81
|
+
success = "circle-check",
|
|
82
|
+
info = "circle-info"
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="../../../../mithril" />
|
|
2
|
+
import { KeyboardKeyCode } from "../../types";
|
|
3
|
+
import { ComponentConfigParams } from "./modificatorsTypes";
|
|
4
|
+
export declare function doesKeyPressed(keyCode: KeyboardKeyCode | KeyboardKeyCode[], e: KeyboardEvent): boolean;
|
|
5
|
+
export declare function getFocusableComponentAttrs(): _mithril.MithrilAttributes;
|
|
6
|
+
declare type KeyboardAction = (e: KeyboardEvent) => void;
|
|
7
|
+
export interface KeyboardActions {
|
|
8
|
+
primary?: KeyboardAction;
|
|
9
|
+
secondary?: KeyboardAction;
|
|
10
|
+
clear?: KeyboardAction;
|
|
11
|
+
cancel?: KeyboardAction;
|
|
12
|
+
}
|
|
13
|
+
export declare function setKeyboardActions(actions: KeyboardActions, configParams: ComponentConfigParams): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** KeyboardEvent.code */
|
|
2
|
+
export declare type KeyboardKeyCode = string;
|
|
3
|
+
/** KeyboardEvent.key */
|
|
4
|
+
export declare type KeyboardKeyValue = string;
|
|
5
|
+
/** KeyboardEvent.key, приведенный к числу */
|
|
6
|
+
export declare type KeyboardNumberKeyValue = number;
|
|
7
|
+
interface EventModifierKeys {
|
|
8
|
+
shift: boolean;
|
|
9
|
+
meta: boolean;
|
|
10
|
+
alt: boolean;
|
|
11
|
+
ctrl: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare type EventModifierKey = keyof EventModifierKeys;
|
|
14
|
+
export declare function checkKeydownModifiers(e: KeyboardEvent, pressedModifierKeys?: EventModifierKey[]): boolean;
|
|
15
|
+
interface KeydownEventKeyCheckingOptions {
|
|
16
|
+
requiredModifiers?: EventModifierKey[];
|
|
17
|
+
/** @default true */
|
|
18
|
+
checkModifiers?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function checkKeydownEventKeys(e: KeyboardEvent, keyCode: KeyboardKeyCode, options?: KeydownEventKeyCheckingOptions): boolean;
|
|
21
|
+
/** Получить код клавиши с цифрой */
|
|
22
|
+
export declare function getKeyCodeOfNumberKey(numberKeyValue: KeyboardNumberKeyValue): KeyboardKeyCode;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function osByUserAgent(userAgent: string): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSClassName } from "../types";
|
|
2
|
+
declare type ClassNamesSimpleArg = CSSClassName | number | Record<CSSClassName, any> | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Тип для параметров функций classNames и mClassNames.
|
|
5
|
+
* Функции принимают любое количество аргументов, которые могут быть строкой, объектом или массивом.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* classNames('foo', 'bar'); // => 'foo bar'
|
|
9
|
+
* classNames('foo', { bar: true }); // => 'foo bar'
|
|
10
|
+
* classNames({ 'foo-bar': true }); // => 'foo-bar'
|
|
11
|
+
* classNames({ 'foo-bar': false }); // => ''
|
|
12
|
+
* classNames({ foo: true }, { bar: true }); // => 'foo bar'
|
|
13
|
+
* classNames({ foo: true, bar: true }); // => 'foo bar'
|
|
14
|
+
* classNames('foo', { bar: true, duck: false }, 'baz', { quux: true }); // => 'foo bar baz quux'
|
|
15
|
+
* classNames(null, false, 'bar', undefined, 0, { baz: null }, ''); // => 'bar'
|
|
16
|
+
*/
|
|
17
|
+
export declare type ClassNamesArg = ClassNamesSimpleArg | ClassNamesSimpleArg[];
|
|
18
|
+
export declare function classNames(...args: ClassNamesArg[]): string;
|
|
19
|
+
export declare function mClassNames(...args: ClassNamesArg[]): string;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class Memoize<A extends any[] = any[], R = any> {
|
|
2
|
+
private calculate;
|
|
3
|
+
private store;
|
|
4
|
+
constructor(calculate: (...args: A) => R);
|
|
5
|
+
exec(args: A): R;
|
|
6
|
+
}
|
|
7
|
+
export declare class MemoizeStore {
|
|
8
|
+
private store;
|
|
9
|
+
exec<A extends any[] = any[], R = any>(key: string, calculate: (...args: A) => R, args: A): R;
|
|
10
|
+
clearKey(key: string): void;
|
|
11
|
+
}
|
|
12
|
+
export declare class MultiMemoize<A extends any[] = any[], R = any> {
|
|
13
|
+
private calculate;
|
|
14
|
+
private store;
|
|
15
|
+
constructor(calculate: (...args: A) => R);
|
|
16
|
+
exec(...args: A): R;
|
|
17
|
+
clear(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function hasOwnProperty(object: Record<never, unknown>, name: string): boolean;
|
|
2
|
+
export declare function shallowCopy<T>(obj: T): T;
|
|
3
|
+
export declare function copyWithIgnore<T, K extends keyof T = null>(obj: T, ignore: K[]): Omit<T, K>;
|
|
4
|
+
export declare function shallowEqual(objA: Record<never, unknown>, objB: Record<never, unknown>): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare type ValuedParams<F> = F extends (...args: infer A) => unknown ? A : never;
|
|
2
|
+
declare type ValuedExtract<F> = F extends (...args: any[]) => infer R ? R : F;
|
|
3
|
+
/**
|
|
4
|
+
* @example
|
|
5
|
+
const o = {
|
|
6
|
+
a1: getValued(123), // number
|
|
7
|
+
a2: getValued(() => 123), // number
|
|
8
|
+
a3: getValued(() => "str"), // string
|
|
9
|
+
a4: getValued((s: string) => `str:${s}`, "one"), // string
|
|
10
|
+
a5: getValued((s: string, n: number) => `str:${s}${n.toString()}`, "one", 123), // string
|
|
11
|
+
a6: getValued((s: string, n: string) => ({ name: s, value: n }), "one", "v"), // { name: string; value: string; }
|
|
12
|
+
a7: getValued((s: string, n: string) => ({ name: s, value: n }), "one", 123), // Error
|
|
13
|
+
a8: getValued("str", "one", 123), // Error
|
|
14
|
+
a9: getValued((s?: string, n?: string) => ({ name: s, value: n }), "one") // { name: string; value: string; }
|
|
15
|
+
};
|
|
16
|
+
*/
|
|
17
|
+
export declare function getValued<F>(main: F, ...args: ValuedParams<F>): ValuedExtract<F>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IFilterGroup } from "../services/IFilter";
|
|
2
|
+
import { MdtField } from "../common/MdtField";
|
|
3
|
+
import { MdtObject } from "../common/MdtObject";
|
|
4
|
+
import { Record } from "../common/Record";
|
|
5
|
+
export declare enum PermissionLevel {
|
|
6
|
+
None = 0,
|
|
7
|
+
Read = 1,
|
|
8
|
+
Write = 2,
|
|
9
|
+
Delete = 4,
|
|
10
|
+
Add = 8,
|
|
11
|
+
Execute = 16,
|
|
12
|
+
Filter = 32,
|
|
13
|
+
All = 255
|
|
14
|
+
}
|
|
15
|
+
/** Example: "Read, Write, Delete, Add" */
|
|
16
|
+
export declare type PermissionLevelString = string;
|
|
17
|
+
export interface PrincipalPermission extends Record {
|
|
18
|
+
ID_Permission?: number;
|
|
19
|
+
ID_Permission$?: Permission;
|
|
20
|
+
ID_Object?: number;
|
|
21
|
+
ID_Object$?: MdtObject;
|
|
22
|
+
ID_Field?: number;
|
|
23
|
+
ID_Field$?: MdtField;
|
|
24
|
+
LevelGrant?: PermissionLevel;
|
|
25
|
+
LevelDeny?: PermissionLevel;
|
|
26
|
+
Filter?: IFilterGroup;
|
|
27
|
+
}
|
|
28
|
+
export interface Permission extends Record {
|
|
29
|
+
id?: number;
|
|
30
|
+
Code: string;
|
|
31
|
+
LevelMask: PermissionLevel;
|
|
32
|
+
ID_Parent: number;
|
|
33
|
+
FlagObject: boolean;
|
|
34
|
+
FlagField: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare class PrincipalTypes {
|
|
37
|
+
static User: string;
|
|
38
|
+
static Group: string;
|
|
39
|
+
static Role: string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApiV1 } from "mdtServices/api/ApiAccessor/apiV1Types";
|
|
2
|
+
export interface User {
|
|
3
|
+
$id: number;
|
|
4
|
+
id: any;
|
|
5
|
+
permissions: ApiV1.Response.User.Permissions;
|
|
6
|
+
login: string;
|
|
7
|
+
fullName: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
identityName: string;
|
|
10
|
+
isAdmin: boolean;
|
|
11
|
+
isAnonymous: boolean;
|
|
12
|
+
roles: string[];
|
|
13
|
+
languageId: number;
|
|
14
|
+
languageCode: string;
|
|
15
|
+
isImpersonated: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare type UserPermissionType = ApiV1.Response.User.UserPermissionType;
|
|
18
|
+
export declare type ObjectPermission = ApiV1.Response.User.ObjectPermission;
|
|
19
|
+
export declare type CommonPermissionData = ApiV1.Response.User.CommonPermissonData;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Фильтр
|
|
3
|
+
*
|
|
4
|
+
* @default { "op": "eq", "p1": "", "p2": "" }
|
|
5
|
+
*/
|
|
6
|
+
export declare type IFilter = IFilterItem | IFilterGroup | IFilterIn | IFilterQueryIn;
|
|
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
|
+
}
|
|
18
|
+
/** Группировка фильтров */
|
|
19
|
+
export interface IFilterGroup {
|
|
20
|
+
op: FilterGroupOp;
|
|
21
|
+
groups: IFilter[];
|
|
22
|
+
not?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** Фильтр */
|
|
25
|
+
export interface IFilterItem {
|
|
26
|
+
op: FilterOp;
|
|
27
|
+
/** Поле, по которому происходит фильтрация */
|
|
28
|
+
p1: string;
|
|
29
|
+
/** Значение фильтра */
|
|
30
|
+
p2: string | number | Date | QueryInValue;
|
|
31
|
+
not?: boolean;
|
|
32
|
+
cast?: "date";
|
|
33
|
+
}
|
|
34
|
+
declare const filterInOp = "in";
|
|
35
|
+
export declare type FilterInOperation = typeof filterInOp;
|
|
36
|
+
/** Фильтр */
|
|
37
|
+
export interface IFilterIn extends Omit<IFilterItem, "op" | "p2"> {
|
|
38
|
+
op: FilterInOperation;
|
|
39
|
+
p2: {
|
|
40
|
+
table: string;
|
|
41
|
+
field: string;
|
|
42
|
+
filter?: IFilter;
|
|
43
|
+
args?: QueryInArgs;
|
|
44
|
+
} | (string | Date | number)[];
|
|
45
|
+
}
|
|
46
|
+
export declare type QueryInArgs = ArgValue[] | {
|
|
47
|
+
[k: string]: ArgValue;
|
|
48
|
+
};
|
|
49
|
+
declare type ArgValue = any;
|
|
50
|
+
export interface IFilterQueryIn extends Omit<IFilterIn, "op" | "p2"> {
|
|
51
|
+
op: FilterInOperation | "queryIn";
|
|
52
|
+
p2: QueryInValue;
|
|
53
|
+
}
|
|
54
|
+
export interface FilterSetterOptions {
|
|
55
|
+
fireEvents?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface FilterConstructor {
|
|
58
|
+
new (): Filter;
|
|
59
|
+
/**
|
|
60
|
+
* Создает группу фильтров, где все условия должны быть выполнены
|
|
61
|
+
*
|
|
62
|
+
* @param groups Группа фильтров - указываются необходимые фильтры
|
|
63
|
+
*
|
|
64
|
+
* **Пример**
|
|
65
|
+
*
|
|
66
|
+
* Поле `Name` должно быть равно `Ivan` и поле `LastName` должно быть равно `Ivanov`
|
|
67
|
+
* ```js
|
|
68
|
+
* Filter.and(Filter.eq('Name', 'Ivan'), Filter.eq('LastName', 'Ivanov'))
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
and(...groups: IFilter[]): IFilterGroup;
|
|
72
|
+
/**
|
|
73
|
+
* Создает группу фильтров, где хотя бы одно условие должно быть выполнено
|
|
74
|
+
*
|
|
75
|
+
* @param groups Группа фильтров - указываются необходимые фильтры
|
|
76
|
+
*
|
|
77
|
+
* Поле `Name` должно быть равно `Ivan` или поле `Name` должно быть равно `Petr`
|
|
78
|
+
* **Пример**
|
|
79
|
+
*
|
|
80
|
+
* ```js
|
|
81
|
+
* Filter.or(Filter.eq('Name', 'Ivan'), Filter.eq('Name', 'Petr'))
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
or(...groups: IFilter[]): IFilterGroup;
|
|
85
|
+
/**
|
|
86
|
+
* Создает фильтр, который проверяет равенство значения поля заданному значению
|
|
87
|
+
*
|
|
88
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
89
|
+
* @param value Значение фильтра
|
|
90
|
+
*
|
|
91
|
+
* **Пример**
|
|
92
|
+
*
|
|
93
|
+
* Поле `Name` должно быть равно `Ivan`
|
|
94
|
+
* ```js
|
|
95
|
+
* Filter.eq('Name', 'Ivan')
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
eq(fieldPath: string, value: any): IFilterItem;
|
|
99
|
+
/**
|
|
100
|
+
* Создает фильтр, который проверяет неравенство значения поля заданному значению
|
|
101
|
+
*
|
|
102
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
103
|
+
* @param value Значение фильтра
|
|
104
|
+
*
|
|
105
|
+
* **Пример**
|
|
106
|
+
*
|
|
107
|
+
* Поле `Name` не должно быть равно `Ivan`
|
|
108
|
+
* ```js
|
|
109
|
+
* Filter.ne('Name', 'Ivan')
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
ne(fieldPath: string, value: any): IFilterItem;
|
|
113
|
+
/**
|
|
114
|
+
* Создает фильтр, который проверяет, что значение указанного поля больше заданного значения
|
|
115
|
+
*
|
|
116
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
117
|
+
* @param value Значение фильтра
|
|
118
|
+
*
|
|
119
|
+
* **Пример**
|
|
120
|
+
*
|
|
121
|
+
* Поле `SumOrder` должно быть больше `100000`
|
|
122
|
+
* ```js
|
|
123
|
+
* Filter.gt('SumOrder', 100000)
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
gt(fieldPath: string, value: any): IFilterItem;
|
|
127
|
+
/**
|
|
128
|
+
* Создает фильтр, который проверяет, что значение указанного поля больше или равно заданному значению
|
|
129
|
+
*
|
|
130
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
131
|
+
* @param value Значение фильтра
|
|
132
|
+
*
|
|
133
|
+
* **Пример**
|
|
134
|
+
*
|
|
135
|
+
* Поле `SumOrder` должно быть больше или равно `100000`
|
|
136
|
+
* ```js
|
|
137
|
+
* Filter.ge('SumOrder', 100000)
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
ge(fieldPath: string, value: any): IFilterItem;
|
|
141
|
+
/**
|
|
142
|
+
* Создает фильтр, который проверяет, что значение указанного поля меньше заданного значения
|
|
143
|
+
*
|
|
144
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
145
|
+
* @param value Значение фильтра
|
|
146
|
+
*
|
|
147
|
+
* **Пример**
|
|
148
|
+
*
|
|
149
|
+
* Поле `SumOrder` должно быть меньше `100000`
|
|
150
|
+
* ```js
|
|
151
|
+
* Filter.lt('SumOrder', 100000)
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
lt(fieldPath: string, value: any): IFilterItem;
|
|
155
|
+
/**
|
|
156
|
+
* Создает фильтр, который проверяет, что значение указанного поля меньше или равно заданному значению
|
|
157
|
+
*
|
|
158
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
159
|
+
* @param value Значение фильтра
|
|
160
|
+
*
|
|
161
|
+
* **Пример**
|
|
162
|
+
*
|
|
163
|
+
* Поле `SumOrder` должно быть меньше или равно `100000`
|
|
164
|
+
* ```js
|
|
165
|
+
* Filter.le('SumOrder', 100000)
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
le(fieldPath: string, value: any): IFilterItem;
|
|
169
|
+
/**
|
|
170
|
+
* Создает фильтр, который проверяет, начинается ли значение указанного поля с заданной подстроки
|
|
171
|
+
*
|
|
172
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
173
|
+
* @param value Подстрока, с которой должно начинаться значение
|
|
174
|
+
*
|
|
175
|
+
* **Пример**
|
|
176
|
+
*
|
|
177
|
+
* Поле `LastName` должно начинаться с `Al`
|
|
178
|
+
* ```js
|
|
179
|
+
* Filter.startsWith('LastName', 'Al')
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
startsWith(fieldPath: string, value: any): IFilterItem;
|
|
183
|
+
/**
|
|
184
|
+
* Создает фильтр, который проверяет, заканчивается ли значение указанного поля на заданную подстроку
|
|
185
|
+
*
|
|
186
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
187
|
+
* @param value Подстрока, с которой должно заканчиваться значение
|
|
188
|
+
*
|
|
189
|
+
* **Пример**
|
|
190
|
+
*
|
|
191
|
+
* Поле `LastName` должно заканчиваться на `ov`
|
|
192
|
+
* ```js
|
|
193
|
+
* Filter.endsWith('LastName', 'ov')
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
196
|
+
endsWith(fieldPath: string, value: any): IFilterItem;
|
|
197
|
+
/**
|
|
198
|
+
* Создает фильтр, который проверяет, содержит ли значение указанного поля заданную подстроку
|
|
199
|
+
*
|
|
200
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
201
|
+
* @param value Подстрока, которую должно содержать значение
|
|
202
|
+
*
|
|
203
|
+
* **Пример**
|
|
204
|
+
*
|
|
205
|
+
* Поле `LastName` должно содержать `an`
|
|
206
|
+
* ```js
|
|
207
|
+
* Filter.contains('LastName', 'an')
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
contains(fieldPath: string, value: any): IFilterItem;
|
|
211
|
+
/**
|
|
212
|
+
* Создает фильтр для полнотекстового поиска по указанному полю
|
|
213
|
+
*
|
|
214
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
215
|
+
* @param value Подстрока, которую должно содержать значение
|
|
216
|
+
*
|
|
217
|
+
* **Пример**
|
|
218
|
+
*
|
|
219
|
+
* Поле `Description` должно содержать `example`
|
|
220
|
+
* ```js
|
|
221
|
+
* Filter.fulltext('Description', 'example');
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
fulltext(fieldPath: string, value: any): IFilterItem;
|
|
225
|
+
/**
|
|
226
|
+
* Создает фильтр, который исключает значения, соответствующие указанному фильтру
|
|
227
|
+
*
|
|
228
|
+
* @param filter Фильтр
|
|
229
|
+
*
|
|
230
|
+
* **Пример**
|
|
231
|
+
*
|
|
232
|
+
* Поле `Name` должно содержать любое значение кроме `Ivan`
|
|
233
|
+
* ```js
|
|
234
|
+
* Filter.not(Filter.eq('Name', 'Ivan'))
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
not(filter: IFilterItem | IFilterIn): IFilterItem;
|
|
238
|
+
/**
|
|
239
|
+
* Фильтр, проверяющий, что поле содержит одно из перечисленных значений
|
|
240
|
+
*
|
|
241
|
+
* @param fieldPath Поле, по которому происходит фильтрация
|
|
242
|
+
* @param array Массив значений
|
|
243
|
+
*
|
|
244
|
+
* **Пример**
|
|
245
|
+
*
|
|
246
|
+
* Поле `Name` должно содержать либо значение `Ivan`, либо `Petr`
|
|
247
|
+
* ```js
|
|
248
|
+
* Filter.in('Name', ['Ivan', 'Petr'])
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
in(fieldPath: string, array: any[]): IFilterIn;
|
|
252
|
+
/**
|
|
253
|
+
* Строится фильтр для поля на основании значений из другой таблицы
|
|
254
|
+
* @param field Поле, по которому происходит фильтрация
|
|
255
|
+
* @param objectCode Код объекта, из которой берутся значения. Может быть таблицей, представлением, функцей и т.д.
|
|
256
|
+
* @param subField Поле, по которому происходит фильтрация в другой таблице
|
|
257
|
+
* @param filter Фильтр, который применяется к другой таблице
|
|
258
|
+
* @param args Аргументы для объекта (например для функции). Можно задать, например, в виде `{ Search: "Москва" }`.
|
|
259
|
+
*
|
|
260
|
+
* **Пример**
|
|
261
|
+
*
|
|
262
|
+
* Отфильтруется поле `Title` текущей таблицы по полю `Name` таблицы `mdt.Employee`, где поле `Name` равно `Ivan`
|
|
263
|
+
* ```js
|
|
264
|
+
* Filter.queryIn('Title', 'mdt.Employee', 'Name', Filter.eq('Name', 'Ivan'))
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
queryIn(field: string, objectCode: string, subField: string, filter?: IFilter, args?: any): IFilterIn;
|
|
268
|
+
/**
|
|
269
|
+
* Преобразует тип данных фильтра
|
|
270
|
+
*
|
|
271
|
+
* @param filter Фильтр
|
|
272
|
+
* @param cast Значение, к типу которого приводится фильтр
|
|
273
|
+
*
|
|
274
|
+
* **Пример**
|
|
275
|
+
*
|
|
276
|
+
* Значение поля `DateTime` приводится к типу `date` (`value` содержит значение типа `datetime`)
|
|
277
|
+
* ```js
|
|
278
|
+
* Filter.cast(Filter.eq('DateTime', value), 'date')
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
cast(filter: IFilter, cast: string): IFilter;
|
|
282
|
+
/**
|
|
283
|
+
* Проверка, что фильтр пустой
|
|
284
|
+
*
|
|
285
|
+
* **Пример**
|
|
286
|
+
*
|
|
287
|
+
* Проверка, что `filter` пустой
|
|
288
|
+
* ```js
|
|
289
|
+
* if (filter === Filter.empty) { ... }
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
empty: any;
|
|
293
|
+
}
|
|
294
|
+
export declare class Filter {
|
|
295
|
+
static empty: IFilter;
|
|
296
|
+
static isEmptyFilter(filter: IFilter): boolean;
|
|
297
|
+
static mergeFilters(orig: IFilter, filter: IFilter): IFilter;
|
|
298
|
+
static and(...groups: any[]): IFilterGroup;
|
|
299
|
+
static or(...groups: any[]): IFilterGroup;
|
|
300
|
+
static eq(p1: any, p2: any): IFilterItem;
|
|
301
|
+
static ne(p1: any, p2: any): IFilterItem;
|
|
302
|
+
static gt(p1: any, p2: any): IFilterItem;
|
|
303
|
+
static ge(p1: any, p2: any): IFilterItem;
|
|
304
|
+
static lt(p1: any, p2: any): IFilterItem;
|
|
305
|
+
static le(p1: any, p2: any): IFilterItem;
|
|
306
|
+
static startsWith(p1: any, p2: any): IFilterItem;
|
|
307
|
+
static endsWith(p1: any, p2: any): IFilterItem;
|
|
308
|
+
static contains(p1: any, p2: any): IFilterItem;
|
|
309
|
+
static fulltext(p1: any, p2: any): IFilterItem;
|
|
310
|
+
static not(f: any): IFilterItem;
|
|
311
|
+
static in(p1: any, ar: any): IFilterIn;
|
|
312
|
+
static queryIn(field: any, table: any, subField: any, filter?: any, args?: any): IFilterIn;
|
|
313
|
+
static cast(filter: any, cast: any): IFilter;
|
|
314
|
+
static equalTemplate(p1: any, p2: any): IFilter;
|
|
315
|
+
static isFilter(filter: unknown): filter is IFilter;
|
|
316
|
+
static isFilterGroup(filter: IFilter): filter is IFilterGroup;
|
|
317
|
+
static isFilterItem(filter: IFilter): filter is IFilterItem;
|
|
318
|
+
static isFilterIn(filter: IFilter): filter is IFilterIn;
|
|
319
|
+
static isFilterQueryIn(filter: IFilter): filter is IFilterQueryIn;
|
|
320
|
+
static getP2(filter: IFilter): string | number | QueryInValue | Date;
|
|
321
|
+
}
|
|
322
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ModuleCode } from "../helpers/types";
|
|
2
|
+
import { RecordId } from "../common/Record";
|
|
3
|
+
import { Record } from "../common/Record";
|
|
4
|
+
export interface ModuleData extends Record {
|
|
5
|
+
Code: ModuleCode;
|
|
6
|
+
ID_Package?: RecordId;
|
|
7
|
+
Icon?: string;
|
|
8
|
+
Title?: string;
|
|
9
|
+
}
|