mdt-client 31.3.40 → 31.3.41
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/helpers/ui/toolbarItemTypes.d.ts +30 -0
- package/types/job/scripts/types.d.ts +11 -0
- package/types/services/customModules/facades/Form/IFormControlFacade.d.ts +2 -2
- package/types/services/customModules/facades/Form/IFormFacade.d.ts +4 -0
- package/types/services/customModules/facades/List/IListControlFacade.d.ts +2 -2
- package/types/ui-kit/UiKitFacade.d.ts +14 -0
- package/types/services/customModules/facades/ui-kit/UiKitFacade.d.ts +0 -8
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChartControlOptions } from "../ChartControlOptions.schema";
|
|
2
|
+
import { MdtRecord } from "../../../../services/customModules/facades/utils/IApiFacade";
|
|
3
|
+
import { EventEmitterSubscribeController } from "../../../../helpers/events/EventEmitter";
|
|
4
|
+
import { ViewControl } from "../../../../helpers/types";
|
|
5
|
+
export interface ChartControlFacadeData {
|
|
6
|
+
refresh?: number;
|
|
7
|
+
fetch?: () => Promise<MdtRecord[]>;
|
|
8
|
+
}
|
|
9
|
+
export interface ChartFormControlFacadeOptions {
|
|
10
|
+
controlOptions: ChartControlOptions;
|
|
11
|
+
data?: ChartControlFacadeData;
|
|
12
|
+
code?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ChartEvents {
|
|
15
|
+
selected: {
|
|
16
|
+
records: MdtRecord[];
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface ChartClearSelectionOptions {
|
|
20
|
+
/** @default true */
|
|
21
|
+
fireEvent?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface IChartControlFacade extends ViewControl {
|
|
24
|
+
readonly on: EventEmitterSubscribeController<ChartEvents>["subscribe"];
|
|
25
|
+
refreshData(): void;
|
|
26
|
+
reCreate(newOptionsCreator?: () => ChartFormControlFacadeOptions): void;
|
|
27
|
+
init(): void;
|
|
28
|
+
clearSelection(options?: ChartClearSelectionOptions): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChartControlOptions } from "../../ChartControlOptions.schema";
|
|
2
|
+
import { FilterableByFieldsElement, ReportDashboardFetchFilter } from "./filterConfig";
|
|
3
|
+
export interface DashboardChartCrossFilter {
|
|
4
|
+
fieldPath?: string;
|
|
5
|
+
dependencies?: DashboardCrossFilterDependency[];
|
|
6
|
+
}
|
|
7
|
+
export interface DashboardCrossFilterDependency {
|
|
8
|
+
chartId: string;
|
|
9
|
+
fieldPath: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DashboardChartConfig extends FilterableByFieldsElement {
|
|
12
|
+
fetch: (options: {
|
|
13
|
+
getEnvVar: (varName: string) => any;
|
|
14
|
+
filter: ReportDashboardFetchFilter;
|
|
15
|
+
}) => Promise<Record<string, any>[]>;
|
|
16
|
+
options: ChartControlOptions;
|
|
17
|
+
filterByCharts?: DashboardChartCrossFilter;
|
|
18
|
+
}
|
|
19
|
+
export interface DashboardDynamicChartConfig extends FilterableByFieldsElement {
|
|
20
|
+
defaultItem?: string;
|
|
21
|
+
items?: string[];
|
|
22
|
+
filterByCharts?: DashboardChartCrossFilter;
|
|
23
|
+
update: (options: {
|
|
24
|
+
type?: string;
|
|
25
|
+
filter?: ReportDashboardFetchFilter;
|
|
26
|
+
}, currentControlOptions?: ChartControlOptions) => Promise<{
|
|
27
|
+
data: Record<string, any>[];
|
|
28
|
+
controlOptions: ChartControlOptions;
|
|
29
|
+
reCreate?: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { AnyObject } from "mdtScripts/helpers/types";
|
|
2
|
+
import { ApiV2 } from "mdtServices/api/ApiAccessor/apiV2Types";
|
|
3
|
+
import { IFilter } from "mdtServices/IFilter";
|
|
4
|
+
export interface FilterDependencyConfig {
|
|
5
|
+
fieldCode: string;
|
|
6
|
+
fieldPath?: string;
|
|
7
|
+
operation?: ApiV2.Filter.BinaryOp;
|
|
8
|
+
handleValue?: (value?: any) => any;
|
|
9
|
+
}
|
|
10
|
+
export interface FilterableByFieldsElement {
|
|
11
|
+
filterByFields?: FilterDependencyConfig[];
|
|
12
|
+
}
|
|
13
|
+
export interface DashboardVirtualObject {
|
|
14
|
+
code: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
fields: {
|
|
17
|
+
code: string;
|
|
18
|
+
primary?: boolean;
|
|
19
|
+
default?: boolean;
|
|
20
|
+
}[];
|
|
21
|
+
fetch: () => Promise<AnyObject[]>;
|
|
22
|
+
}
|
|
23
|
+
export interface DashboardFiltersPublicConfig {
|
|
24
|
+
code: string;
|
|
25
|
+
params: FilterFieldConfig[];
|
|
26
|
+
}
|
|
27
|
+
export interface FilterFieldConfig {
|
|
28
|
+
code: string;
|
|
29
|
+
type?: string;
|
|
30
|
+
title?: string;
|
|
31
|
+
defaultValue?: any;
|
|
32
|
+
reference?: FilterableByFieldsElement & {
|
|
33
|
+
type: "single" | "multi";
|
|
34
|
+
datasource: {
|
|
35
|
+
type: "dbObject";
|
|
36
|
+
code: string;
|
|
37
|
+
} | {
|
|
38
|
+
type: "virtualObject";
|
|
39
|
+
object: DashboardVirtualObject;
|
|
40
|
+
} | {
|
|
41
|
+
type: "proxyObject";
|
|
42
|
+
proxyObjectCode?: string;
|
|
43
|
+
originalObjectCode: string;
|
|
44
|
+
primaryFieldCode: string;
|
|
45
|
+
defaultFieldCode?: string;
|
|
46
|
+
proxyObjectOptions?: {
|
|
47
|
+
title?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export interface ReportDashboardFetchFilter {
|
|
53
|
+
buildV2(): ApiV2.Filter.Multi | undefined;
|
|
54
|
+
buildV1(): IFilter | undefined;
|
|
55
|
+
getValues(): Record<string, any> | undefined;
|
|
56
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DashboardChartCrossFilter } from "./chartConfig";
|
|
2
|
+
import { FilterableByFieldsElement } from "./filterConfig";
|
|
3
|
+
export interface DashboardListConfig extends FilterableByFieldsElement {
|
|
4
|
+
id: string;
|
|
5
|
+
filterByCharts?: Omit<DashboardChartCrossFilter, "fieldPath">;
|
|
6
|
+
datasource: {
|
|
7
|
+
objectCode: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
package/types/_core/scripts/views/page/charts/reportDashboard/config/reportDashboardConfig.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AnyObject } from "mdtScripts/helpers/types";
|
|
2
|
+
import { DashboardChartConfig, DashboardDynamicChartConfig } from "./chartConfig";
|
|
3
|
+
import { JsonVarsMap } from "../utils/formJsonVarParser";
|
|
4
|
+
import { DashboardFiltersPublicConfig, ReportDashboardFetchFilter } from "./filterConfig";
|
|
5
|
+
import { DynamicChartCtrlPublicOptions } from "../controls/dynamicChart/dynamicChartControlPublicOptions";
|
|
6
|
+
import { IChartControlFacade } from "../../facade/IChartControlFacade";
|
|
7
|
+
import { DashboardListConfig } from "./listConfig";
|
|
8
|
+
import { ButtonFacade } from "mdtServices/customModules/facades/Form/IFormFacade";
|
|
9
|
+
import { Icon } from "mdtScripts/components/icon/iconOptions";
|
|
10
|
+
export interface ReportDashboardConfig<ChartId extends string, DynamicChartId extends string, ListId extends string> {
|
|
11
|
+
filters: DashboardFiltersPublicConfig;
|
|
12
|
+
defaultCharts?: Record<ChartId, DashboardChartConfig>;
|
|
13
|
+
dynamicCharts?: Record<DynamicChartId, DashboardDynamicChartConfig>;
|
|
14
|
+
lists?: DashboardListConfig[];
|
|
15
|
+
bindEnvVariables?: (dashboard: ReportDashboardInstance<ChartId>) => JsonVarsMap;
|
|
16
|
+
mdtLayout: (options: {
|
|
17
|
+
dashboard: ReportDashboardInstance<ChartId>;
|
|
18
|
+
items: {
|
|
19
|
+
field: (code: string, width: number, options?: AnyObject) => AnyObject;
|
|
20
|
+
defaultChart: (id: ChartId, width: number) => AnyObject;
|
|
21
|
+
dynamicChart: (id: DynamicChartId, width: number, options?: DynamicChartCtrlPublicOptions) => AnyObject;
|
|
22
|
+
list: (id: ListId, width: number, options?: AnyObject) => AnyObject;
|
|
23
|
+
filterPanel: (width: number, options: {
|
|
24
|
+
items: AnyObject[];
|
|
25
|
+
header?: {
|
|
26
|
+
title?: string;
|
|
27
|
+
icon?: Icon;
|
|
28
|
+
clearButton?: Partial<ButtonFacade>;
|
|
29
|
+
};
|
|
30
|
+
}) => AnyObject;
|
|
31
|
+
};
|
|
32
|
+
}) => AnyObject;
|
|
33
|
+
events?: {
|
|
34
|
+
fieldUpdated?(event: {
|
|
35
|
+
fieldCode: string;
|
|
36
|
+
value: any;
|
|
37
|
+
dashboard: ReportDashboardInstance<ChartId>;
|
|
38
|
+
}): void | Promise<void>;
|
|
39
|
+
clearAllFilters?(): void | Promise<void>;
|
|
40
|
+
stateInited?(event: {
|
|
41
|
+
dashboard: ReportDashboardInstance<ChartId>;
|
|
42
|
+
}): void | Promise<void>;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface ReportDashboardInstance<ChartId extends string> {
|
|
46
|
+
clearAllFilters(): void;
|
|
47
|
+
fields: {
|
|
48
|
+
setValue(fieldCode: string, value: any, fireEvent?: boolean): void;
|
|
49
|
+
getValue(fieldPath: string): any;
|
|
50
|
+
getFilterBuilderForField(fieldCode: string): ReportDashboardFetchFilter | undefined;
|
|
51
|
+
};
|
|
52
|
+
charts: {
|
|
53
|
+
getDefaultChart(id: ChartId): IChartControlFacade | undefined;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CustomNavNode } from "mdtServices/customModules/facades/services/INavigationFacade";
|
|
2
|
+
import { ReportDashboardConfig } from "./config/reportDashboardConfig";
|
|
3
|
+
export interface ReportDashboard {
|
|
4
|
+
createNode<ChartId extends string, DynamicChartId extends string, ListId extends string>(node: CustomNavNode, config: ReportDashboardConfig<ChartId, DynamicChartId, ListId>): void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IJsonVarParser {
|
|
2
|
+
getVarValue(varName: string): number | string;
|
|
3
|
+
}
|
|
4
|
+
export declare type JsonVarsMap = {
|
|
5
|
+
[key: string]: () => number | string;
|
|
6
|
+
};
|
|
7
|
+
export declare class JsonVarParser implements IJsonVarParser {
|
|
8
|
+
private readonly jsonVarsMap;
|
|
9
|
+
constructor(jsonVarsMap: JsonVarsMap);
|
|
10
|
+
getVarValue(varName: string): number | string;
|
|
11
|
+
private hasVarName;
|
|
12
|
+
}
|
|
13
|
+
export declare function replaceVariablesInJson<D = any>(data: D, jsonVarParser: IJsonVarParser): D;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Valued, ViewElement } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Кнопка с кастомным представлением для тулбара.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* // Пример с React-компонентом из UI Kit
|
|
7
|
+
* FormService.onCreated((form) => {
|
|
8
|
+
* form.addCommand({
|
|
9
|
+
* code: "test",
|
|
10
|
+
* order: 100,
|
|
11
|
+
* $view: () => {
|
|
12
|
+
* return uiKitWrap(
|
|
13
|
+
* MyComponent,
|
|
14
|
+
* { onClose: () => form.close() },
|
|
15
|
+
* {
|
|
16
|
+
* // Рекомендуется всегда проставлять элементу ключ
|
|
17
|
+
* key: "test",
|
|
18
|
+
* style: { paddingLeft: "10px" }
|
|
19
|
+
* }
|
|
20
|
+
* );
|
|
21
|
+
* }
|
|
22
|
+
* });
|
|
23
|
+
* });
|
|
24
|
+
*/
|
|
25
|
+
export interface CustomViewButton {
|
|
26
|
+
code?: string;
|
|
27
|
+
order?: number;
|
|
28
|
+
visible?: Valued<boolean>;
|
|
29
|
+
$view: () => ViewElement;
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Field } from "mdtScripts/common/Field";
|
|
2
|
+
import { ApiV1, ApiV2 } from "mdtServices/api/ApiAccessor/job/jobApiTypes";
|
|
3
|
+
export declare type JobContextFacade = Omit<ApiV1.Request.JobTask, "ObjectId"> & {
|
|
4
|
+
objectId: number;
|
|
5
|
+
formContext?: ParentFormContextFacade;
|
|
6
|
+
};
|
|
7
|
+
export declare type JobExecutionResult = ApiV2.Response.Job.ExecTask;
|
|
8
|
+
export interface ParentFormContextFacade<FormType = any, FieldType = Field> {
|
|
9
|
+
parentForm?: FormType;
|
|
10
|
+
parentField?: FieldType;
|
|
11
|
+
}
|
|
@@ -4,7 +4,7 @@ import { IFieldFacade } from "../schema/IFieldFacade";
|
|
|
4
4
|
import { IObjectFacade } from "../schema/IObjectFacade";
|
|
5
5
|
import { RecordId } from "../../../../common/Record";
|
|
6
6
|
import { ParentCtrl } from "../utils/IUiFacade";
|
|
7
|
-
import { ButtonFacade } from "./IFormFacade";
|
|
7
|
+
import { ButtonFacade, CommandFacade } from "./IFormFacade";
|
|
8
8
|
import { FieldCode } from "mdtScripts/helpers/types";
|
|
9
9
|
import { IFieldStateFacade } from "./IFieldStateFacade";
|
|
10
10
|
export type IFormFieldOptionsConfig = {
|
|
@@ -53,7 +53,7 @@ export interface IFormControlFacade extends ParentCtrl {
|
|
|
53
53
|
/** Подписаться на событие создания макета формы */
|
|
54
54
|
onLayoutCreated(callback: () => void): void;
|
|
55
55
|
/** Установить команду на форму */
|
|
56
|
-
addCommand(command:
|
|
56
|
+
addCommand(command: CommandFacade, isExtended?: boolean): void;
|
|
57
57
|
/** Установить настройки для полей формы */
|
|
58
58
|
setFieldOptions(options: IFormFieldOptionsConfig): void;
|
|
59
59
|
/** Установить настройки для компонента формы */
|
|
@@ -7,6 +7,7 @@ import { IObjectFacade } from "../schema/IObjectFacade";
|
|
|
7
7
|
import { IFormControlFacade } from "./IFormControlFacade";
|
|
8
8
|
import { FieldPhysicalType } from "../schema/ISchemaFacade";
|
|
9
9
|
import { IBaseFieldBuilder } from "../schema/fieldBuilder/fieldBuilder/IFieldBuilder";
|
|
10
|
+
import { CustomViewButton } from "mdtScripts/helpers/ui/toolbarItemTypes";
|
|
10
11
|
export type ActionButton = IButton & {
|
|
11
12
|
/** Всплывающая подсказка */
|
|
12
13
|
description?: Valued<FormattedText>;
|
|
@@ -23,6 +24,7 @@ export interface ButtonFacade extends ActionButton {
|
|
|
23
24
|
/** Дочерние элементы кнопки */
|
|
24
25
|
items?: ButtonFacade[];
|
|
25
26
|
}
|
|
27
|
+
export type CommandFacade = ButtonFacade | CustomViewButton;
|
|
26
28
|
export interface IFormInitOptions {
|
|
27
29
|
/** Уникальный код списка */
|
|
28
30
|
code?: string;
|
|
@@ -51,6 +53,8 @@ export interface IFormOptions {
|
|
|
51
53
|
/** Описание лэйаута формы */
|
|
52
54
|
layout?: CustomFormLayout;
|
|
53
55
|
viewSettings?: FormViewSettings;
|
|
56
|
+
/** Контекст формы */
|
|
57
|
+
context?: Record<string, any>;
|
|
54
58
|
}
|
|
55
59
|
export interface FormViewSettings {
|
|
56
60
|
hideSubTitle?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterSetterOptions, IFilter } from "../../../../services/IFilter";
|
|
2
|
-
import { ButtonFacade } from "../Form/IFormFacade";
|
|
2
|
+
import { ButtonFacade, CommandFacade } from "../Form/IFormFacade";
|
|
3
3
|
import { ParentCtrl } from "../utils/IUiFacade";
|
|
4
4
|
import { IListRowFacade } from "./IListRowFacade";
|
|
5
5
|
import { IListCellFacade } from "./IListCellFacade";
|
|
@@ -23,7 +23,7 @@ export interface IListControlFacade extends ParentCtrl {
|
|
|
23
23
|
/** Получить выделенные строки списка */
|
|
24
24
|
getSelectedRows(): any[];
|
|
25
25
|
/** Добавить команду на список */
|
|
26
|
-
addCommand(command:
|
|
26
|
+
addCommand(command: CommandFacade, extend?: boolean): void;
|
|
27
27
|
/** Установить фильтр на список */
|
|
28
28
|
setFilter(filter: IFilter | null, options?: FilterSetterOptions, key?: string): void;
|
|
29
29
|
/** Подписаться на событие обновления фильтра */
|
|
@@ -43,6 +43,7 @@ import * as tooltip from "ics-ui-kit/dist/components/tooltip";
|
|
|
43
43
|
import * as reactHookForm from "ics-ui-kit/dist/vendors/react-hook-form";
|
|
44
44
|
import * as reactTable from "ics-ui-kit/dist/vendors/tanstack/react-table";
|
|
45
45
|
import * as zod from "ics-ui-kit/dist/vendors/zod";
|
|
46
|
+
import { cn } from "ics-ui-kit/dist/lib/utils";
|
|
46
47
|
/**
|
|
47
48
|
* Фасад для ре-экспорта компонентов из UI Kit.
|
|
48
49
|
* В этом классе должны быть только ре-экспорты из UI Kit с сохранением структуры.
|
|
@@ -103,4 +104,17 @@ export declare class UiKitFacade {
|
|
|
103
104
|
zod: typeof zod;
|
|
104
105
|
"react-hook-form": typeof reactHookForm;
|
|
105
106
|
};
|
|
107
|
+
hooks: {
|
|
108
|
+
useIsSm: () => boolean;
|
|
109
|
+
useIsMd: () => boolean;
|
|
110
|
+
useIsLg: () => boolean;
|
|
111
|
+
useIsXl: () => boolean;
|
|
112
|
+
useIs2Xl: () => boolean;
|
|
113
|
+
useIsMobile: () => boolean;
|
|
114
|
+
useBreakpoint: (breakpoint: "lg" | "sm" | "md" | "xl" | "2xl") => boolean;
|
|
115
|
+
useActiveBreakpoint: () => "lg" | "sm" | "md" | "xl" | "2xl";
|
|
116
|
+
};
|
|
117
|
+
lib: {
|
|
118
|
+
cn: typeof cn;
|
|
119
|
+
};
|
|
106
120
|
}
|