mdt-client 31.3.39 → 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/dist/index.d.ts +11 -11
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/package.json +38 -38
- package/readme.md +15 -15
- 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/common/Datasource.d.ts +9 -9
- package/types/common/Field.d.ts +51 -51
- package/types/common/FieldSettings.schema.d.ts +17 -17
- package/types/common/MdtField.d.ts +9 -9
- package/types/common/MdtObject.d.ts +7 -7
- package/types/common/Record.d.ts +27 -27
- package/types/common/Table.d.ts +66 -66
- package/types/common/form/tabs/TabsFormExtenderOptions.d.ts +12 -12
- package/types/common/list/aggregation/AggregayionTypes.d.ts +2 -2
- package/types/common/list/cacheUpdateTime/CacheUpdateTimePublicOptions.d.ts +6 -6
- package/types/common/list/cellControlExtender/CellControlExtender.d.ts +1 -1
- package/types/common/list/columnMenu/ColumnMenuOptions.d.ts +17 -17
- package/types/common/list/columnMenu/QuickFilterOptions.d.ts +7 -7
- package/types/common/list/columnMenu/ValuesFilterOptions.d.ts +24 -24
- package/types/common/list/form/FormListPublicOptions.d.ts +44 -44
- package/types/common/list/gallery/GalleryListExtenderPublicOptions.d.ts +11 -11
- package/types/common/list/group/groupTypes.d.ts +177 -177
- package/types/common/list/hierarchy/hierarchyTypes.d.ts +48 -48
- package/types/common/list/historyType/HistoryTypeListExtenderOptions.d.ts +3 -3
- package/types/common/list/labelStyle/LabelStylePublicOptions.d.ts +6 -6
- package/types/common/list/legend/LegendListExtenderOptions.d.ts +8 -8
- package/types/common/list/listView/ListViewListExtenderOptions.d.ts +25 -25
- package/types/common/list/namedFilter/InMemoryNamedFilterOptions.d.ts +23 -23
- package/types/common/list/namedFilter/NamedFilterListExtenderPublicOptions.d.ts +29 -29
- package/types/common/list/reorder/ReorderListExtenderPublicOptions.d.ts +4 -4
- package/types/common/list/select/SelectPublicOptions.d.ts +18 -18
- package/types/common/list/styleField/StyleFieldListExtenderPublicOptions.d.ts +3 -3
- package/types/common/list/toolbar/ToolbarPublicOptions.d.ts +23 -23
- package/types/common/list/virtualScroll/VIrtualScrollPublicOptions.d.ts +7 -7
- package/types/common/serverMessage/ServerMessageTypes.d.ts +17 -17
- package/types/components/baseFormControls/input/inputOptions.d.ts +31 -31
- package/types/components/baseFormControls/maskedInput/MaskFormatter.types.d.ts +2 -2
- package/types/components/button/baseButton/buttonOptions.d.ts +12 -12
- package/types/components/buttonGroup/buttonGroupOptions.d.ts +7 -7
- package/types/components/dropdown/menu/item/dropdownInputItemOptions.d.ts +5 -5
- package/types/components/dropdown/menu/item/dropdownItemWrapOptions.d.ts +20 -20
- package/types/components/dropdown/menuActionItem/dropdownMenuItemOptions.d.ts +32 -32
- package/types/components/form/fieldView/fieldViewOptions.d.ts +13 -13
- package/types/components/form/header/types.d.ts +14 -14
- package/types/components/form/label/labelOptions.d.ts +23 -23
- package/types/components/icon/iconOptions.d.ts +24 -24
- package/types/components/iconButton/iconButtonOptions.d.ts +10 -10
- package/types/components/navigation/header/userButton/UserMenuSlot.d.ts +10 -10
- package/types/components/processPrincipalsList/ProcessPrincipalsListItem.d.ts +5 -5
- package/types/components/resizablePanels/panelTitle/panelTitleOptions.d.ts +16 -16
- package/types/components/resizablePanels/panelToolbar/panelToolbarOptions.d.ts +4 -4
- package/types/components/resizablePanels/resizablePanel/resizablePanelOptions.d.ts +24 -24
- package/types/components/resizablePanels/resizablePanelsOptions.d.ts +22 -22
- package/types/components/textWithIcon/textWithIconOptions.d.ts +17 -17
- package/types/components/toggleablePanels/toggleablePanelsOptions.d.ts +40 -40
- package/types/data/active/ActivationListAdapterTypes.d.ts +6 -6
- package/types/data/fieldFilter/ToolbarFieldFilterOptions.d.ts +21 -21
- package/types/data/periods/helpers/types.d.ts +4 -4
- package/types/datasources/FetchResult.d.ts +5 -5
- package/types/helpers/IUi.d.ts +2 -2
- package/types/helpers/dateUtils.d.ts +23 -23
- package/types/helpers/deleteFromArray.d.ts +1 -1
- package/types/helpers/events/EventEmitter.d.ts +12 -12
- package/types/helpers/fireEvent.d.ts +4 -4
- package/types/helpers/formatOptions.d.ts +16 -16
- package/types/helpers/formattedText.d.ts +8 -8
- package/types/helpers/pipeline/ImmutableArgPipeline.d.ts +8 -8
- package/types/helpers/pipeline/Pipeline.d.ts +20 -20
- package/types/helpers/redraw.d.ts +16 -16
- package/types/helpers/types.d.ts +85 -85
- package/types/helpers/ui/elementModificators/focusableComponent.d.ts +15 -15
- package/types/helpers/ui/elementModificators/modificatorsTypes.d.ts +4 -4
- package/types/helpers/ui/keyboardUtils/getKeySymbol.d.ts +2 -2
- package/types/helpers/ui/keyboardUtils/keyboardUtils.d.ts +23 -23
- package/types/helpers/ui/keyboardUtils/osByUserAgent.d.ts +1 -1
- package/types/helpers/ui/toolbarItemTypes.d.ts +30 -0
- package/types/helpers/utils/classNames.d.ts +20 -20
- package/types/helpers/utils/keyStorage/KeyStorage.d.ts +6 -6
- package/types/helpers/utils/memoization/memoize.d.ts +18 -18
- package/types/helpers/utils/object.d.ts +4 -4
- package/types/helpers/utils/stringifyControlSize.d.ts +3 -3
- package/types/helpers/utils/valued/getValued.d.ts +18 -18
- package/types/helpers/zone/IZone.d.ts +8 -8
- package/types/job/scripts/types.d.ts +11 -0
- package/types/security/PermissionLevel.d.ts +40 -40
- package/types/security/User.d.ts +20 -20
- package/types/services/HotkeyManager.d.ts +6 -6
- package/types/services/IFilter.d.ts +322 -322
- package/types/services/ModuleData.d.ts +9 -9
- package/types/services/api/ApiAccessor/apiV1Types.d.ts +266 -266
- package/types/services/api/ApiAccessor/apiV2Types.d.ts +586 -586
- package/types/services/api/ApiAccessor/binding/bindingApiTypes.d.ts +42 -42
- package/types/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/count/count.d.ts +10 -10
- package/types/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/hierarchy/hierarchyQueryHelpersTypes.d.ts +28 -28
- package/types/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/placeIn/placeInQueryTypes.d.ts +9 -9
- package/types/services/api/ApiAccessorRequestAdapter/handlers/messageTypes.d.ts +37 -37
- package/types/services/api/ApiAccessorRequestAdapter/message/apiV2MessageTypes.d.ts +2 -2
- package/types/services/api/ApiRequestOptions.d.ts +43 -43
- package/types/services/api/BaseQuery.d.ts +25 -25
- package/types/services/api/Query.d.ts +56 -56
- package/types/services/api/QuerySorting.d.ts +18 -18
- package/types/services/api/ServerResonseType.d.ts +2 -2
- package/types/services/commands/Command.d.ts +22 -22
- package/types/services/commands/CommandGroup.d.ts +15 -15
- package/types/services/commands/CommandManager.d.ts +77 -77
- package/types/services/customModules/facades/Form/IFieldControlFacade.d.ts +26 -26
- package/types/services/customModules/facades/Form/IFieldControlManagerFacade.d.ts +38 -36
- package/types/services/customModules/facades/Form/IFieldStateFacade.d.ts +13 -13
- package/types/services/customModules/facades/Form/IFormControlFacade.d.ts +133 -133
- package/types/services/customModules/facades/Form/IFormFacade.d.ts +106 -102
- package/types/services/customModules/facades/Form/IFormLayout.d.ts +12 -12
- package/types/services/customModules/facades/IAppFacade.d.ts +38 -38
- package/types/services/customModules/facades/IAuthFacade.d.ts +9 -9
- package/types/services/customModules/facades/ILegacyFacade.d.ts +239 -239
- package/types/services/customModules/facades/IMdtFacade.d.ts +91 -88
- package/types/services/customModules/facades/IModuleRegistryFacade.d.ts +5 -5
- package/types/services/customModules/facades/IPageFacade.d.ts +7 -7
- package/types/services/customModules/facades/List/Column/IColumnFacade.d.ts +7 -7
- package/types/services/customModules/facades/List/IListCellFacade.d.ts +8 -8
- package/types/services/customModules/facades/List/IListComponentFacade.d.ts +10 -10
- package/types/services/customModules/facades/List/IListControlFacade.d.ts +88 -88
- package/types/services/customModules/facades/List/IListRowFacade.d.ts +2 -2
- package/types/services/customModules/facades/List/IListServiceFacade.d.ts +96 -96
- package/types/services/customModules/facades/List/ListOptions/IListOptions.d.ts +4 -4
- package/types/services/customModules/facades/components/CodeEditorFacade.d.ts +9 -9
- package/types/services/customModules/facades/components/ModalFacade.d.ts +4 -4
- package/types/services/customModules/facades/formDashboard/IFormDashboard.d.ts +20 -20
- package/types/services/customModules/facades/internalModules/importFormCtrl.types.d.ts +83 -83
- package/types/services/customModules/facades/internalModules/importModuleFacade.d.ts +53 -53
- package/types/services/customModules/facades/internalModules/modulesFacadeTypes.d.ts +11 -11
- package/types/services/customModules/facades/internalModules/statusFacade.d.ts +13 -13
- package/types/services/customModules/facades/record/IRecordFacade.d.ts +13 -13
- package/types/services/customModules/facades/record/IRecordManagerFacade.d.ts +5 -5
- package/types/services/customModules/facades/schema/IFieldFacade.d.ts +14 -14
- package/types/services/customModules/facades/schema/IObjectFacade.d.ts +20 -20
- package/types/services/customModules/facades/schema/ISchemaFacade.d.ts +24 -24
- package/types/services/customModules/facades/schema/fieldBuilder/fieldBuilder/IFieldBuilder.d.ts +23 -23
- package/types/services/customModules/facades/schema/fieldBuilder/fieldFkBuilder/IFieldFkBuilder.d.ts +8 -8
- package/types/services/customModules/facades/services/CommandManagerFacade.d.ts +11 -11
- package/types/services/customModules/facades/services/IListButtonExtendPipelineService.d.ts +13 -13
- package/types/services/customModules/facades/services/INavigationFacade.d.ts +91 -91
- package/types/services/customModules/facades/services/ISecurityFacade.d.ts +13 -13
- package/types/services/customModules/facades/sharedModules/ISharedModulesFacade.d.ts +4 -0
- package/types/services/customModules/facades/utils/IApiFacade.d.ts +91 -91
- package/types/services/customModules/facades/utils/IUiComponentsFacade.d.ts +191 -191
- package/types/services/customModules/facades/utils/IUiFacade.d.ts +84 -84
- package/types/services/customModules/facades/utils/IUtilsFacade.d.ts +225 -225
- package/types/services/customModules/facades/utils/ImUtilsFacade.d.ts +42 -42
- package/types/services/dropdown/IDropDownMenu.d.ts +41 -41
- package/types/services/e2e/e2eServiceType.d.ts +11 -11
- package/types/ui-kit/IUiKitUtilsFacade.d.ts +35 -35
- package/types/ui-kit/UiKitFacade.d.ts +120 -106
- package/types/ui-kit/components/calendar/Calendar.d.ts +3 -3
- package/types/views/controls/Control.d.ts +7 -7
- package/types/views/controls/panels/panelOptions.d.ts +15 -15
- package/types/views/form/controls/commonControl/ICommonControl.d.ts +29 -29
- package/types/views/form/controls/fileupload/FileInputFacade.types.d.ts +6 -6
- package/types/views/form/controls/monacoEditor/MonacoCodeOptions.schema.d.ts +24 -24
- package/types/views/form/controls/monacoEditor/jsonSchemas/Button.schema.d.ts +70 -70
- package/types/views/form/controls/picker/multiPickerFacade/IMultiPickerFacade.d.ts +36 -36
- package/types/views/form/controls/toggleablePanels/editor/toggleablePanelsEditorFacadeOptions.d.ts +21 -21
- package/types/views/form/formTypes.d.ts +5 -5
- package/types/views/form/schema/FormPageExtOptions.schema.d.ts +22 -22
- package/types/views/form/schema/FormPageOptions.schema.d.ts +19 -19
- package/types/views/gallery/ImageFetchOptions.d.ts +5 -5
- package/types/views/list/ListViewOptions.d.ts +102 -102
- package/types/views/list/features/aggregation/AggregationRowListOptions.d.ts +23 -23
- package/types/views/list/schema/ListPageExtOptions.schema.d.ts +123 -123
- package/types/views/list/schema/ListPageOptions.schema.d.ts +145 -145
- package/types/views/list/tabular/TabularListTypes.d.ts +53 -53
- package/types/views/page/PageZoneTypes.d.ts +1 -1
- package/types/views/page/charts/ChartControlOptions.schema.d.ts +850 -850
- package/types/views/page/charts/facade/IChartControlFacade.d.ts +29 -29
- package/types/views/page/charts/reportDashboard/config/chartConfig.d.ts +31 -31
- package/types/views/page/charts/reportDashboard/config/filterConfig.d.ts +56 -56
- package/types/views/page/charts/reportDashboard/config/listConfig.d.ts +9 -9
- package/types/views/page/charts/reportDashboard/config/reportDashboardConfig.d.ts +55 -55
- package/types/views/page/charts/reportDashboard/controls/dynamicChart/dynamicChartControlPublicOptions.d.ts +3 -3
- package/types/views/page/charts/reportDashboard/index.d.ts +5 -5
- package/types/views/page/charts/reportDashboard/utils/formJsonVarParser.d.ts +13 -13
|
@@ -1,850 +1,850 @@
|
|
|
1
|
-
type MdtChartsDataRow = Record<string, any>;
|
|
2
|
-
type TitleFunctionParams = {
|
|
3
|
-
data: MdtChartsDataRow[];
|
|
4
|
-
};
|
|
5
|
-
type TitleFunction = (params: TitleFunctionParams) => string;
|
|
6
|
-
type Title = string | TitleFunction;
|
|
7
|
-
export type Orientation = "horizontal" | "vertical";
|
|
8
|
-
type ChartElementPosition = "start" | "end";
|
|
9
|
-
export type AxisLabelPosition = "vertical" | "horizontal";
|
|
10
|
-
export type ChartLegendPosition = "top" | "bottom" | "left" | "right";
|
|
11
|
-
type ChartField = string;
|
|
12
|
-
export type ChartFieldWithNameOnly = {
|
|
13
|
-
name: string;
|
|
14
|
-
};
|
|
15
|
-
export type ChartFieldWithTitle = {
|
|
16
|
-
title?: string;
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
19
|
-
export type TwoDimensionalValueField = ChartField | (ChartFieldWithTitle & {
|
|
20
|
-
color?: string;
|
|
21
|
-
});
|
|
22
|
-
/**
|
|
23
|
-
* @defaultSnippets
|
|
24
|
-
* [
|
|
25
|
-
* {
|
|
26
|
-
* "label": "Вертикальная гистограмма (bar)",
|
|
27
|
-
* "body": {
|
|
28
|
-
* "title": "$1",
|
|
29
|
-
* "type": "2d",
|
|
30
|
-
* "keyField": "$2",
|
|
31
|
-
* "charts": [
|
|
32
|
-
* {
|
|
33
|
-
* "type": "bar",
|
|
34
|
-
* "data": {
|
|
35
|
-
* "valueFields": [
|
|
36
|
-
* "$3"
|
|
37
|
-
* ]
|
|
38
|
-
* }
|
|
39
|
-
* }
|
|
40
|
-
* ]
|
|
41
|
-
* }
|
|
42
|
-
* },
|
|
43
|
-
* {
|
|
44
|
-
* "label": "Вертикальная линейная диаграмма (line)",
|
|
45
|
-
* "body": {
|
|
46
|
-
* "title": "$1",
|
|
47
|
-
* "type": "2d",
|
|
48
|
-
* "keyField": "$2",
|
|
49
|
-
* "charts": [
|
|
50
|
-
* {
|
|
51
|
-
* "type": "line",
|
|
52
|
-
* "data": {
|
|
53
|
-
* "valueFields": [
|
|
54
|
-
* "$3"
|
|
55
|
-
* ]
|
|
56
|
-
* }
|
|
57
|
-
* }
|
|
58
|
-
* ]
|
|
59
|
-
* }
|
|
60
|
-
* },
|
|
61
|
-
* {
|
|
62
|
-
* "label": "Вертикальная диаграмма с областями (area)",
|
|
63
|
-
* "body": {
|
|
64
|
-
* "title": "$1",
|
|
65
|
-
* "type": "2d",
|
|
66
|
-
* "keyField": "$2",
|
|
67
|
-
* "charts": [
|
|
68
|
-
* {
|
|
69
|
-
* "type": "area",
|
|
70
|
-
* "data": {
|
|
71
|
-
* "valueFields": [
|
|
72
|
-
* "$3"
|
|
73
|
-
* ]
|
|
74
|
-
* }
|
|
75
|
-
* }
|
|
76
|
-
* ]
|
|
77
|
-
* }
|
|
78
|
-
* },
|
|
79
|
-
* {
|
|
80
|
-
* "label": "Горизонтальная гистограмма (bar)",
|
|
81
|
-
* "body": {
|
|
82
|
-
* "title": "$1",
|
|
83
|
-
* "type": "2d",
|
|
84
|
-
* "keyField": "$2",
|
|
85
|
-
* "axes": {
|
|
86
|
-
* "orientation": "horizontal"
|
|
87
|
-
* },
|
|
88
|
-
* "charts": [
|
|
89
|
-
* {
|
|
90
|
-
* "type": "bar",
|
|
91
|
-
* "data": {
|
|
92
|
-
* "valueFields": [
|
|
93
|
-
* "$3"
|
|
94
|
-
* ]
|
|
95
|
-
* }
|
|
96
|
-
* }
|
|
97
|
-
* ]
|
|
98
|
-
* }
|
|
99
|
-
* },
|
|
100
|
-
* {
|
|
101
|
-
* "label": "Кольцевая диаграмма (donut)",
|
|
102
|
-
* "body": {
|
|
103
|
-
* "title": "$1",
|
|
104
|
-
* "type": "polar",
|
|
105
|
-
* "keyField": "$2",
|
|
106
|
-
* "chart": {
|
|
107
|
-
* "valueField": "$3"
|
|
108
|
-
* }
|
|
109
|
-
* }
|
|
110
|
-
* }
|
|
111
|
-
* ]
|
|
112
|
-
*/
|
|
113
|
-
export type ChartControlOptions = TwoDimensionalOptions | PolarOptions | CardChartPublicOptions | SunburstOptions;
|
|
114
|
-
/**
|
|
115
|
-
* @defaultSnippets
|
|
116
|
-
* [
|
|
117
|
-
* {
|
|
118
|
-
* "label": "Вертикальная ориентация, ось ключей снизу, ось значений слева",
|
|
119
|
-
* "body": {
|
|
120
|
-
* "orientation": "vertical",
|
|
121
|
-
* "key": {
|
|
122
|
-
* "position": "end"
|
|
123
|
-
* },
|
|
124
|
-
* "value": {
|
|
125
|
-
* "position": "start"
|
|
126
|
-
* }
|
|
127
|
-
* }
|
|
128
|
-
* },
|
|
129
|
-
* {
|
|
130
|
-
* "label": "Вертикальная ориентация, ось ключей сверху, ось значений слева",
|
|
131
|
-
* "body": {
|
|
132
|
-
* "orientation": "vertical",
|
|
133
|
-
* "key": {
|
|
134
|
-
* "position": "start"
|
|
135
|
-
* },
|
|
136
|
-
* "value": {
|
|
137
|
-
* "position": "start"
|
|
138
|
-
* }
|
|
139
|
-
* }
|
|
140
|
-
* },
|
|
141
|
-
* {
|
|
142
|
-
* "label": "Горизонтальная ориентация, ось ключей слева, ось значений снизу",
|
|
143
|
-
* "body": {
|
|
144
|
-
* "orientation": "horizontal",
|
|
145
|
-
* "key": {
|
|
146
|
-
* "position": "start"
|
|
147
|
-
* },
|
|
148
|
-
* "value": {
|
|
149
|
-
* "position": "start"
|
|
150
|
-
* }
|
|
151
|
-
* }
|
|
152
|
-
* },
|
|
153
|
-
* {
|
|
154
|
-
* "label": "Горизонтальная ориентация, ось ключей справа, ось значений снизу",
|
|
155
|
-
* "body": {
|
|
156
|
-
* "orientation": "horizontal",
|
|
157
|
-
* "key": {
|
|
158
|
-
* "position": "end"
|
|
159
|
-
* },
|
|
160
|
-
* "value": {
|
|
161
|
-
* "position": "end"
|
|
162
|
-
* }
|
|
163
|
-
* }
|
|
164
|
-
* }
|
|
165
|
-
* ]
|
|
166
|
-
*/
|
|
167
|
-
export interface Axes {
|
|
168
|
-
/**
|
|
169
|
-
* @title Ориентация диаграмм
|
|
170
|
-
* @description При вертикальной ориентации ось ключей будет расположена сверху или снизу.
|
|
171
|
-
* При горизонтальной ориентации ось ключей будет расположена слева или справа.
|
|
172
|
-
* По умолчанию вертикальная.
|
|
173
|
-
*/
|
|
174
|
-
orientation?: Orientation;
|
|
175
|
-
/** @title Общая настройка подписей осей */
|
|
176
|
-
labels?: BaseAxesLabelsOptions;
|
|
177
|
-
/**
|
|
178
|
-
* @title Параметры оси ключей
|
|
179
|
-
*/
|
|
180
|
-
key?: {
|
|
181
|
-
/**
|
|
182
|
-
* @title Позиция оси ключей
|
|
183
|
-
* @description По умолчанию равна "end", если диаграмма вертикальная и "start" - если диаграмма горизонтальная
|
|
184
|
-
*/
|
|
185
|
-
position?: ChartElementPosition;
|
|
186
|
-
/**
|
|
187
|
-
* @title Отображение оси
|
|
188
|
-
* @description По умолчанию всегда отображается
|
|
189
|
-
*/
|
|
190
|
-
visible?: boolean;
|
|
191
|
-
/**
|
|
192
|
-
* @title Отображение линий сетки оси
|
|
193
|
-
* @description По умолчанию всегда скрывается
|
|
194
|
-
*/
|
|
195
|
-
gridLine?: boolean;
|
|
196
|
-
/**
|
|
197
|
-
* @title Настройка подписей оси
|
|
198
|
-
*/
|
|
199
|
-
labels?: {
|
|
200
|
-
/**
|
|
201
|
-
* @title Настройки позиции оси
|
|
202
|
-
* @description Настраивается при вертикальном расположении. По умолчанию позиция определяется по количеству свободного места для одной подписи.
|
|
203
|
-
*/
|
|
204
|
-
position?: AxisLabelPosition;
|
|
205
|
-
/**
|
|
206
|
-
* @title Количество места, выделенного для подписи в px
|
|
207
|
-
* @default 20
|
|
208
|
-
*/
|
|
209
|
-
space?: number;
|
|
210
|
-
/**
|
|
211
|
-
* @title Функция форматирования подписи
|
|
212
|
-
* @param options Параметры для форматирования подписи. В поле `key` хранится значение поля оси ключей, в поле `dataRow` - строка с данными для данного ключа.
|
|
213
|
-
* @returns Строка с форматированной подписью
|
|
214
|
-
*/
|
|
215
|
-
format?: (options: {
|
|
216
|
-
key: string;
|
|
217
|
-
dataRow: MdtChartsDataRow;
|
|
218
|
-
}) => string;
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
/**
|
|
222
|
-
* @title Параметры оси значений
|
|
223
|
-
*/
|
|
224
|
-
value?: BaseValueAxisOptions & {
|
|
225
|
-
/**
|
|
226
|
-
* @title Позиция оси значений
|
|
227
|
-
* @description По умолчанию равна "start", если диаграмма вертикальная и "end" - если диаграмма горизонтальная
|
|
228
|
-
*/
|
|
229
|
-
position?: ChartElementPosition;
|
|
230
|
-
/**
|
|
231
|
-
* @title Отображение линий сетки оси
|
|
232
|
-
* @description По умолчанию всегда отображается
|
|
233
|
-
*/
|
|
234
|
-
gridLine?: boolean;
|
|
235
|
-
line?: {
|
|
236
|
-
visible?: boolean;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
valueSecondary?: BaseValueAxisOptions;
|
|
240
|
-
}
|
|
241
|
-
export type FormatAxisValueFn = (value: number) => string;
|
|
242
|
-
interface BaseValueAxisOptions {
|
|
243
|
-
/** @title Размер отступа между подписями в px */
|
|
244
|
-
stepSize?: number;
|
|
245
|
-
/**
|
|
246
|
-
* @title Настройка диапазона осей
|
|
247
|
-
* @param options Опции с данными диаграммы
|
|
248
|
-
* @returns Объект с диапазоном осей. Оставить -1 для автоматического определения диапазона
|
|
249
|
-
*/
|
|
250
|
-
domain?: (options: {
|
|
251
|
-
data: MdtChartsDataRow[];
|
|
252
|
-
}) => {
|
|
253
|
-
start: number;
|
|
254
|
-
end: number;
|
|
255
|
-
};
|
|
256
|
-
/** @title Функция форматирования значений */
|
|
257
|
-
formatValue?: string | FormatAxisValueFn;
|
|
258
|
-
/**
|
|
259
|
-
* @title Отображение оси
|
|
260
|
-
* @description По умолчанию не отображается только тогда, когда все диаграммы имеют встроенные лейблы, показывающие значения
|
|
261
|
-
*/
|
|
262
|
-
visible?: boolean;
|
|
263
|
-
}
|
|
264
|
-
export interface BaseAxesLabelsOptions {
|
|
265
|
-
/**
|
|
266
|
-
* @title Максимальный размер подписи в px
|
|
267
|
-
* @description Для вертикальных осей этот параметр определяет максимальную ширину подписи, а для горизонтальных - максимальную высоту подписи (если подписи расположены вертикально).
|
|
268
|
-
* @default 80
|
|
269
|
-
*/
|
|
270
|
-
maxSize?: number;
|
|
271
|
-
}
|
|
272
|
-
interface BaseChartBlockOptions {
|
|
273
|
-
/**
|
|
274
|
-
* @title Высота блока графика (px)
|
|
275
|
-
* @description По умолчанию равна 510 для 2d и polar диаграмм и 150 для card. Минимально возможная высота: 100. Максимально возможная: 800.
|
|
276
|
-
* @default 510
|
|
277
|
-
*/
|
|
278
|
-
height?: number;
|
|
279
|
-
/** @title Настройки стилей */
|
|
280
|
-
style?: {
|
|
281
|
-
/** @title Цвет фона */
|
|
282
|
-
backgroundColor?: string;
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
interface GraphicChartBlockOptions extends BaseChartBlockOptions {
|
|
286
|
-
/**
|
|
287
|
-
* @title Заголовок диаграммы
|
|
288
|
-
*/
|
|
289
|
-
title?: Title;
|
|
290
|
-
/**
|
|
291
|
-
* @title Наименование поля-ключа
|
|
292
|
-
*/
|
|
293
|
-
keyField: ChartField;
|
|
294
|
-
/**
|
|
295
|
-
* @title Маркдаун тултипа
|
|
296
|
-
*/
|
|
297
|
-
tooltipMarkdown?: string;
|
|
298
|
-
/** @title Логический тип поля значений */
|
|
299
|
-
valueFieldType?: string;
|
|
300
|
-
/**
|
|
301
|
-
* @title Максимальное количество отображаемых записей
|
|
302
|
-
* @description По умолчанию равно `50`
|
|
303
|
-
* @default 50
|
|
304
|
-
*/
|
|
305
|
-
maxRecordCount?: number;
|
|
306
|
-
/**
|
|
307
|
-
* @title Настройки отображения тултипа
|
|
308
|
-
*/
|
|
309
|
-
tooltip?: ChartTooltipOptions;
|
|
310
|
-
}
|
|
311
|
-
export interface ChartTooltipOptions {
|
|
312
|
-
aggregator?: TooltipAggregator;
|
|
313
|
-
/**
|
|
314
|
-
* @title Настройки отображения строк тултипа
|
|
315
|
-
*/
|
|
316
|
-
rows?: ChartTooltipRowsOptions;
|
|
317
|
-
}
|
|
318
|
-
export type ChartCommonLegendOption = boolean | {
|
|
319
|
-
show?: boolean;
|
|
320
|
-
position?: ChartLegendPosition;
|
|
321
|
-
};
|
|
322
|
-
interface ChartTooltipRowsOptions {
|
|
323
|
-
/**
|
|
324
|
-
* @title Функция для сортировки строк
|
|
325
|
-
* @param aRow Строка с подписью и значением (хранятся в поле `textContent`)
|
|
326
|
-
* @param bRow Строка с подписью и значением (хранятся в поле `textContent`)
|
|
327
|
-
* @returns Число, которое будет использоваться для сортировки. Если больше 0, то aRow будет расположена после bRow, если меньше 0, то наоборот, если равно 0, то порядок не изменится
|
|
328
|
-
* @example Сортировка по значениям от большего к меньшему:
|
|
329
|
-
*
|
|
330
|
-
* sortCompareFn: (aRow, bRow) => bRow.textContent.value - aRow.textContent.value
|
|
331
|
-
*/
|
|
332
|
-
sortCompareFn?: (aRow: ChartTooltipRow, bRow: ChartTooltipRow) => number;
|
|
333
|
-
/**
|
|
334
|
-
* @title Предикат для фильтрации строк
|
|
335
|
-
* @param row Строка с подписью и значением (хранятся в поле `textContent`)
|
|
336
|
-
* @returns true, если строка должна быть отображена и false - если отображаться не должна
|
|
337
|
-
* @example Скрытие пустых значений:
|
|
338
|
-
*
|
|
339
|
-
* filterPredicate: (row) => row.textContent.value != null
|
|
340
|
-
*/
|
|
341
|
-
filterPredicate?: (row: ChartTooltipRow) => boolean;
|
|
342
|
-
}
|
|
343
|
-
interface ChartTooltipRow {
|
|
344
|
-
textContent: {
|
|
345
|
-
caption: string;
|
|
346
|
-
value?: number;
|
|
347
|
-
};
|
|
348
|
-
valueField: ChartFieldWithTitle;
|
|
349
|
-
}
|
|
350
|
-
interface TooltipAggregator {
|
|
351
|
-
content?: (options: {
|
|
352
|
-
row: MdtChartsDataRow;
|
|
353
|
-
}) => TooltipTypedRowContent | TooltipTypedRowContent[];
|
|
354
|
-
position?: "underKey" | "underValues";
|
|
355
|
-
}
|
|
356
|
-
type TooltipTypedRowContent = ({
|
|
357
|
-
type: "plainText";
|
|
358
|
-
textContent: string;
|
|
359
|
-
} | {
|
|
360
|
-
type: "captionValue";
|
|
361
|
-
caption: string;
|
|
362
|
-
value: any;
|
|
363
|
-
}) & {
|
|
364
|
-
marker?: {
|
|
365
|
-
shape: "circle" | "bar" | "line";
|
|
366
|
-
color: string;
|
|
367
|
-
};
|
|
368
|
-
wrapperElOptions?: {
|
|
369
|
-
cssClassName?: string;
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
export interface CommonCanvasOptions {
|
|
373
|
-
bar?: BarCanvasOptions;
|
|
374
|
-
}
|
|
375
|
-
interface BarCanvasOptions {
|
|
376
|
-
/** @title минимальная ширина столбца в px */
|
|
377
|
-
minBarWidth?: number;
|
|
378
|
-
/** @title максимальная ширина столбца в px */
|
|
379
|
-
maxBarWidth?: number;
|
|
380
|
-
/** @title минимальный размер расстояния между группами столбцов для разных ключей */
|
|
381
|
-
groupMinDistance?: number;
|
|
382
|
-
/** @title максимальный размер расстояния между группами столбцов для разных ключей */
|
|
383
|
-
groupMaxDistance?: number;
|
|
384
|
-
/** @title расстояние между столбцами в одной группе */
|
|
385
|
-
barDistance?: number;
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* @title Двумерная диаграмма
|
|
389
|
-
*/
|
|
390
|
-
export interface TwoDimensionalOptions extends GraphicChartBlockOptions {
|
|
391
|
-
/**
|
|
392
|
-
* @title Тип исчисления диаграммы
|
|
393
|
-
*/
|
|
394
|
-
type: "2d";
|
|
395
|
-
/**
|
|
396
|
-
* @title Параметры осей двумерной диаграммы
|
|
397
|
-
*
|
|
398
|
-
*/
|
|
399
|
-
axes?: Axes;
|
|
400
|
-
/**
|
|
401
|
-
* @title Параметры двумерных диаграмм
|
|
402
|
-
*/
|
|
403
|
-
charts: TwoDimensionalChart[];
|
|
404
|
-
/**
|
|
405
|
-
* @title Общие параметры холста графика
|
|
406
|
-
*/
|
|
407
|
-
commonCanvasOptions?: CommonCanvasOptions;
|
|
408
|
-
legend?: ChartCommonLegendOption;
|
|
409
|
-
valueLabels?: {
|
|
410
|
-
style?: ValueLabelsStyleOptions;
|
|
411
|
-
collision?: {
|
|
412
|
-
otherValueLabels?: "hide" | "none";
|
|
413
|
-
};
|
|
414
|
-
};
|
|
415
|
-
/**
|
|
416
|
-
* @title Отображения групп записей
|
|
417
|
-
*/
|
|
418
|
-
grouping?: {
|
|
419
|
-
/**
|
|
420
|
-
* @title Уровни группировки
|
|
421
|
-
*/
|
|
422
|
-
items: {
|
|
423
|
-
/**
|
|
424
|
-
* @title Данные, по которым будет настроена группировка
|
|
425
|
-
*/
|
|
426
|
-
data: {
|
|
427
|
-
field: ChartFieldWithTitle;
|
|
428
|
-
};
|
|
429
|
-
/**
|
|
430
|
-
* @title Подписи групп. Будут отображать значения поля, по которому задана группировка
|
|
431
|
-
*/
|
|
432
|
-
labels?: {
|
|
433
|
-
/**
|
|
434
|
-
* @title Позиция подписей.
|
|
435
|
-
* @description Может быть равна "start" или "end". Настраивается аналогично позиции оси ключей
|
|
436
|
-
*/
|
|
437
|
-
position?: ChartElementPosition;
|
|
438
|
-
};
|
|
439
|
-
}[];
|
|
440
|
-
};
|
|
441
|
-
events?: TwoDimensionalEvents;
|
|
442
|
-
}
|
|
443
|
-
interface ValueLabelsStyleOptions {
|
|
444
|
-
cssClassName?: string;
|
|
445
|
-
/**
|
|
446
|
-
* @default 10
|
|
447
|
-
*/
|
|
448
|
-
fontSize?: number;
|
|
449
|
-
/**
|
|
450
|
-
* @default rgba(68, 68, 68, 0.5)
|
|
451
|
-
*/
|
|
452
|
-
color?: string;
|
|
453
|
-
}
|
|
454
|
-
interface TwoDimensionalEvents {
|
|
455
|
-
drawComplete?: (event: DrawCompleteEvent) => void;
|
|
456
|
-
}
|
|
457
|
-
interface DrawCompleteEvent {
|
|
458
|
-
canvas: {
|
|
459
|
-
keyItems: CanvasKeyItemOptions[];
|
|
460
|
-
plotAreaMargin: BlockMargin;
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
interface BlockMargin {
|
|
464
|
-
top: number;
|
|
465
|
-
bottom: number;
|
|
466
|
-
left: number;
|
|
467
|
-
right: number;
|
|
468
|
-
}
|
|
469
|
-
interface CanvasKeyItemOptions {
|
|
470
|
-
totalSize: number;
|
|
471
|
-
}
|
|
472
|
-
/**
|
|
473
|
-
* @title Круговая диаграмма
|
|
474
|
-
*/
|
|
475
|
-
export interface PolarOptions extends GraphicChartBlockOptions {
|
|
476
|
-
/**
|
|
477
|
-
* @title Тип исчисления диаграммы
|
|
478
|
-
*/
|
|
479
|
-
type: "polar";
|
|
480
|
-
/**
|
|
481
|
-
* @title Параметры круговой диаграммы
|
|
482
|
-
*/
|
|
483
|
-
chart: PolarChart;
|
|
484
|
-
/**
|
|
485
|
-
* @title Наименование поля с цветом
|
|
486
|
-
* @description Наименование поля, в котором хранится цвет для сегментов диаграммы.
|
|
487
|
-
*/
|
|
488
|
-
colorField?: string;
|
|
489
|
-
/**
|
|
490
|
-
* @title Отображение легенды
|
|
491
|
-
* @description По умолчанию для круговых диаграмм отображается всегда
|
|
492
|
-
*/
|
|
493
|
-
legend?: ChartCommonLegendOption;
|
|
494
|
-
}
|
|
495
|
-
export type TwoDimensionalChart = BarChart | LineChart | AreaChart | DotChart;
|
|
496
|
-
interface TwoDimensionalChartOptions {
|
|
497
|
-
/**
|
|
498
|
-
* @title Параметры данных, привязанных к диаграмме
|
|
499
|
-
*/
|
|
500
|
-
data: {
|
|
501
|
-
/**
|
|
502
|
-
* @title Наименования отображаемых полей-значений
|
|
503
|
-
*/
|
|
504
|
-
valueFields: TwoDimensionalValueField[];
|
|
505
|
-
secondaryValue?: boolean;
|
|
506
|
-
};
|
|
507
|
-
/**
|
|
508
|
-
* @title Отображение диаграммы в сегментированном виде
|
|
509
|
-
*/
|
|
510
|
-
isSegmented?: boolean;
|
|
511
|
-
/**
|
|
512
|
-
* @title Отображение подписей значений на диаграмме
|
|
513
|
-
*/
|
|
514
|
-
valueLabels?: boolean | ValueLabelsChartOptions;
|
|
515
|
-
}
|
|
516
|
-
export type ValueLabelsPositionMode = "center" | "afterElement" | "beforeHead" | "afterStart";
|
|
517
|
-
export interface ValueLabelsChartOptions {
|
|
518
|
-
on?: boolean;
|
|
519
|
-
/** @default "afterElement" */
|
|
520
|
-
position?: ValueLabelsPositionMode;
|
|
521
|
-
/**
|
|
522
|
-
* @title Опции смещения подписи
|
|
523
|
-
*/
|
|
524
|
-
offset?: {
|
|
525
|
-
/**
|
|
526
|
-
* @title Смещение подписи относительно вершины элемента в px
|
|
527
|
-
* @default 10
|
|
528
|
-
*/
|
|
529
|
-
size?: number;
|
|
530
|
-
};
|
|
531
|
-
/**
|
|
532
|
-
* @title Список полей, для которых будут отображаться подписи
|
|
533
|
-
* @description По умолчанию подписи отображаются для всех полей
|
|
534
|
-
*/
|
|
535
|
-
renderForFields?: ChartField[];
|
|
536
|
-
/**
|
|
537
|
-
* @title Функция для формирования текста подписи
|
|
538
|
-
* @param options Параметры для формирования текста подписи
|
|
539
|
-
* @returns Объект с текстом подписи
|
|
540
|
-
*/
|
|
541
|
-
content?: (options: {
|
|
542
|
-
dataRow: MdtChartsDataRow;
|
|
543
|
-
field: ChartFieldWithTitle;
|
|
544
|
-
}) => {
|
|
545
|
-
textContent: string;
|
|
546
|
-
};
|
|
547
|
-
rotation?: {
|
|
548
|
-
angle?: number;
|
|
549
|
-
};
|
|
550
|
-
handleElement?: (options: {
|
|
551
|
-
element: SVGElement;
|
|
552
|
-
value: number;
|
|
553
|
-
dataRow: MdtChartsDataRow;
|
|
554
|
-
}) => void;
|
|
555
|
-
format?: (options: {
|
|
556
|
-
value: number;
|
|
557
|
-
}) => string | number;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* @title Гистограмма
|
|
561
|
-
* @defaultSnippets
|
|
562
|
-
* [
|
|
563
|
-
* {
|
|
564
|
-
* "label": "Несегментированная гистограмма (bar)",
|
|
565
|
-
* "body": {
|
|
566
|
-
* "type": "bar",
|
|
567
|
-
* "isSegmented": false,
|
|
568
|
-
* "data": {
|
|
569
|
-
* "valueFields": [
|
|
570
|
-
* "$1"
|
|
571
|
-
* ]
|
|
572
|
-
* }
|
|
573
|
-
* }
|
|
574
|
-
* },
|
|
575
|
-
* {
|
|
576
|
-
* "label": "Сегментированная гистограмма (bar)",
|
|
577
|
-
* "body": {
|
|
578
|
-
* "type": "bar",
|
|
579
|
-
* "isSegmented": true,
|
|
580
|
-
* "data": {
|
|
581
|
-
* "valueFields": [
|
|
582
|
-
* "$1"
|
|
583
|
-
* ]
|
|
584
|
-
* }
|
|
585
|
-
* }
|
|
586
|
-
* },
|
|
587
|
-
* {
|
|
588
|
-
* "label": "Сегментированная линейная диаграмма (line)",
|
|
589
|
-
* "body": {
|
|
590
|
-
* "type": "line",
|
|
591
|
-
* "isSegmented": true,
|
|
592
|
-
* "data": {
|
|
593
|
-
* "valueFields": [
|
|
594
|
-
* "$1"
|
|
595
|
-
* ]
|
|
596
|
-
* }
|
|
597
|
-
* }
|
|
598
|
-
* },
|
|
599
|
-
* {
|
|
600
|
-
* "label": "Несегментированная линейна диаграмма (line)",
|
|
601
|
-
* "body": {
|
|
602
|
-
* "type": "line",
|
|
603
|
-
* "isSegmented": false,
|
|
604
|
-
* "data": {
|
|
605
|
-
* "valueFields": [
|
|
606
|
-
* "$1"
|
|
607
|
-
* ]
|
|
608
|
-
* }
|
|
609
|
-
* }
|
|
610
|
-
* },
|
|
611
|
-
* {
|
|
612
|
-
* "label": "Сегментированная диаграмма с областями (area)",
|
|
613
|
-
* "body": {
|
|
614
|
-
* "type": "area",
|
|
615
|
-
* "isSegmented": true,
|
|
616
|
-
* "data": {
|
|
617
|
-
* "valueFields": [
|
|
618
|
-
* "$1"
|
|
619
|
-
* ]
|
|
620
|
-
* }
|
|
621
|
-
* }
|
|
622
|
-
* },
|
|
623
|
-
* {
|
|
624
|
-
* "label": "Несегментированная диаграмма с областями (area)",
|
|
625
|
-
* "body": {
|
|
626
|
-
* "type": "area",
|
|
627
|
-
* "isSegmented": false,
|
|
628
|
-
* "data": {
|
|
629
|
-
* "valueFields": [
|
|
630
|
-
* "$1"
|
|
631
|
-
* ]
|
|
632
|
-
* }
|
|
633
|
-
* }
|
|
634
|
-
* }
|
|
635
|
-
* ]
|
|
636
|
-
*/
|
|
637
|
-
interface BarChart extends TwoDimensionalChartOptions {
|
|
638
|
-
/**
|
|
639
|
-
* @title Тип 2D-диаграммы
|
|
640
|
-
*/
|
|
641
|
-
type: "bar";
|
|
642
|
-
/**
|
|
643
|
-
* @title Отображение встроенных надписей со значением
|
|
644
|
-
* @description Надписи отображаются только при горизонтальном отображении. По умолчанию равно `true`
|
|
645
|
-
* @default true
|
|
646
|
-
*/
|
|
647
|
-
labels?: boolean;
|
|
648
|
-
/** @title Отображать в заштрихованном виде */
|
|
649
|
-
hatched?: boolean;
|
|
650
|
-
borderRadius?: BarChartBorderRadius;
|
|
651
|
-
}
|
|
652
|
-
interface BarChartBorderRadius {
|
|
653
|
-
value?: number;
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* @title Линейная диаграмма
|
|
657
|
-
*/
|
|
658
|
-
interface LineAreaChart extends TwoDimensionalChartOptions {
|
|
659
|
-
/**
|
|
660
|
-
* @title Отображение маркеров
|
|
661
|
-
* @description По умолчанию всегда скрыты
|
|
662
|
-
*/
|
|
663
|
-
markers?: boolean;
|
|
664
|
-
}
|
|
665
|
-
interface AreaChart extends LineAreaChart {
|
|
666
|
-
/**
|
|
667
|
-
* @title Тип 2D-диаграммы
|
|
668
|
-
*/
|
|
669
|
-
type: "area";
|
|
670
|
-
/** @title Включить градиент */
|
|
671
|
-
gradient?: boolean;
|
|
672
|
-
}
|
|
673
|
-
interface LineChart extends LineAreaChart {
|
|
674
|
-
/**
|
|
675
|
-
* @title Тип 2D-диаграммы
|
|
676
|
-
*/
|
|
677
|
-
type: "line";
|
|
678
|
-
/** @title Управление пунктиром */
|
|
679
|
-
dash?: LineDash;
|
|
680
|
-
width?: number;
|
|
681
|
-
}
|
|
682
|
-
interface LineDash {
|
|
683
|
-
/** @title Включить пунктир */
|
|
684
|
-
on?: boolean;
|
|
685
|
-
/** @title Длина одной черты в px */
|
|
686
|
-
dashSize?: number;
|
|
687
|
-
/** @title Размер между чертами в px */
|
|
688
|
-
gapSize?: number;
|
|
689
|
-
}
|
|
690
|
-
export interface DotChart extends TwoDimensionalChartOptions {
|
|
691
|
-
type: "dot";
|
|
692
|
-
}
|
|
693
|
-
export interface PolarChart {
|
|
694
|
-
/**
|
|
695
|
-
* @title Наименование отображаемого поля-значения
|
|
696
|
-
*/
|
|
697
|
-
valueField: ChartField | ChartFieldWithTitle;
|
|
698
|
-
/**
|
|
699
|
-
* @title Управление агрегатором
|
|
700
|
-
*/
|
|
701
|
-
aggregator?: {
|
|
702
|
-
/**
|
|
703
|
-
* @title Контент агрегатора
|
|
704
|
-
*/
|
|
705
|
-
content?: string;
|
|
706
|
-
};
|
|
707
|
-
valueLabels?: DonutChartValueLabelsOptions;
|
|
708
|
-
}
|
|
709
|
-
interface SunburstAggregator {
|
|
710
|
-
content?: (model: SunburstAggregatorModel) => AggregatorContent;
|
|
711
|
-
}
|
|
712
|
-
interface SunburstAggregatorModel {
|
|
713
|
-
data: MdtChartsDataRow[];
|
|
714
|
-
}
|
|
715
|
-
interface AggregatorContent {
|
|
716
|
-
value?: string | number;
|
|
717
|
-
title?: string;
|
|
718
|
-
}
|
|
719
|
-
interface PolarLikeChartValueLabelsOptions {
|
|
720
|
-
on: boolean;
|
|
721
|
-
rotation?: {
|
|
722
|
-
type: "none" | "tangential";
|
|
723
|
-
};
|
|
724
|
-
cssClass?: string;
|
|
725
|
-
}
|
|
726
|
-
export interface DonutChartValueLabelsOptions extends PolarLikeChartValueLabelsOptions {
|
|
727
|
-
content?: (dataRow: MdtChartsDataRow) => string;
|
|
728
|
-
}
|
|
729
|
-
export interface SunburstOptions extends BaseChartBlockOptions {
|
|
730
|
-
type: "sunburst";
|
|
731
|
-
/**
|
|
732
|
-
* @title Заголовок диаграммы
|
|
733
|
-
*/
|
|
734
|
-
title?: Title;
|
|
735
|
-
/**
|
|
736
|
-
* @title Отображение легенды
|
|
737
|
-
* @description По умолчанию для круговых диаграмм отображается всегда
|
|
738
|
-
*/
|
|
739
|
-
legend?: ChartCommonLegendOption;
|
|
740
|
-
/**
|
|
741
|
-
* @title Управление агрегатором
|
|
742
|
-
*/
|
|
743
|
-
aggregator?: SunburstAggregator;
|
|
744
|
-
data: {
|
|
745
|
-
valueField: ChartFieldWithTitle;
|
|
746
|
-
};
|
|
747
|
-
levels: SunburstLevel[];
|
|
748
|
-
}
|
|
749
|
-
export interface SunburstLevel {
|
|
750
|
-
data: {
|
|
751
|
-
keyField: ChartFieldWithNameOnly;
|
|
752
|
-
colorField?: ChartFieldWithNameOnly;
|
|
753
|
-
};
|
|
754
|
-
canvas?: {
|
|
755
|
-
thickness?: SunburstLevelThicknessOptions;
|
|
756
|
-
};
|
|
757
|
-
tooltip?: {
|
|
758
|
-
overrideContent?: (options: {
|
|
759
|
-
autoTooltipRows: TooltipTypedRowContent[];
|
|
760
|
-
attachedDataRows: MdtChartsDataRow[];
|
|
761
|
-
}) => {
|
|
762
|
-
rows: TooltipTypedRowContent[];
|
|
763
|
-
};
|
|
764
|
-
};
|
|
765
|
-
valueLabels?: SunburstChartValueLabelsOptions;
|
|
766
|
-
/**
|
|
767
|
-
* @title Отображение значений данного уровня в легенде
|
|
768
|
-
*/
|
|
769
|
-
legend?: {
|
|
770
|
-
show: boolean;
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
export interface SunburstChartValueLabelsOptions extends PolarLikeChartValueLabelsOptions {
|
|
774
|
-
content?: (segment: {
|
|
775
|
-
attachedDataRows: MdtChartsDataRow[];
|
|
776
|
-
}) => string;
|
|
777
|
-
}
|
|
778
|
-
export interface SunburstLevelThicknessOptions {
|
|
779
|
-
/** @title Минимальная толщина в % или в px. Пример значений: "25%", "10px" */
|
|
780
|
-
min: number | string;
|
|
781
|
-
/** @title Максимальная толщина в % или в px. Пример значений: "25%", "10px" */
|
|
782
|
-
max: number | string;
|
|
783
|
-
/** @title Точная толщина в % или в px. Обязательно будет между min и max. Пример значений: "25%", "10px" */
|
|
784
|
-
value?: number | string;
|
|
785
|
-
}
|
|
786
|
-
export interface CardChartPublicOptions extends BaseChartBlockOptions {
|
|
787
|
-
/** @title Тип исчисления диаграммы */
|
|
788
|
-
type: "card";
|
|
789
|
-
/** @title Название */
|
|
790
|
-
title: string;
|
|
791
|
-
/** @title Описание */
|
|
792
|
-
description?: string;
|
|
793
|
-
/** @title Иконка */
|
|
794
|
-
icon?: string;
|
|
795
|
-
/** @title Значение */
|
|
796
|
-
value: CardChartValueOptions;
|
|
797
|
-
/**
|
|
798
|
-
* @title Настройки отображения изменения показателя
|
|
799
|
-
* @deprecated Используйте `changesBlock.items` вместо этого параметра
|
|
800
|
-
*/
|
|
801
|
-
change?: CardChartChangePublicOptions;
|
|
802
|
-
/** @title Опции блока с изменениями показателя */
|
|
803
|
-
changesBlock?: {
|
|
804
|
-
/** @title Направление отображения изменений */
|
|
805
|
-
layout?: {
|
|
806
|
-
/**
|
|
807
|
-
* @title Направление отображения изменений
|
|
808
|
-
* @description "row" - отображение изменений в одну строку, "column" - отображение изменений в один столбец
|
|
809
|
-
* @default "row"
|
|
810
|
-
*/
|
|
811
|
-
direction?: "row" | "column";
|
|
812
|
-
};
|
|
813
|
-
/** @title Опции изменений */
|
|
814
|
-
items: CardChartChangePublicOptions[];
|
|
815
|
-
};
|
|
816
|
-
/** @title Цвет текста карточки */
|
|
817
|
-
color?: CardColorOptions;
|
|
818
|
-
}
|
|
819
|
-
export interface CardChartValueOptions {
|
|
820
|
-
/** @title Наименование поля */
|
|
821
|
-
field: ChartField;
|
|
822
|
-
/** @title Логический тип поля */
|
|
823
|
-
dataType?: string;
|
|
824
|
-
/** @title Шаблон выводимого значения */
|
|
825
|
-
template?: string;
|
|
826
|
-
}
|
|
827
|
-
export interface CardChartChangePublicOptions {
|
|
828
|
-
/** @title Значение блока */
|
|
829
|
-
value: CardChartValueOptions;
|
|
830
|
-
/** @title Описание блока */
|
|
831
|
-
description?: string;
|
|
832
|
-
/** @title Иконки описания */
|
|
833
|
-
descriptionIcons?: {
|
|
834
|
-
iconName: string;
|
|
835
|
-
description?: string;
|
|
836
|
-
}[];
|
|
837
|
-
/** @title Цвет текста */
|
|
838
|
-
color?: CardColorOptions;
|
|
839
|
-
}
|
|
840
|
-
interface CardColorOptions {
|
|
841
|
-
/** @title Набор цветов */
|
|
842
|
-
range: ColorRangeItem[];
|
|
843
|
-
}
|
|
844
|
-
export interface ColorRangeItem {
|
|
845
|
-
/** @title Значение с которого начинается цвет */
|
|
846
|
-
value?: number;
|
|
847
|
-
/** @title Название цвета */
|
|
848
|
-
color: string;
|
|
849
|
-
}
|
|
850
|
-
export {};
|
|
1
|
+
type MdtChartsDataRow = Record<string, any>;
|
|
2
|
+
type TitleFunctionParams = {
|
|
3
|
+
data: MdtChartsDataRow[];
|
|
4
|
+
};
|
|
5
|
+
type TitleFunction = (params: TitleFunctionParams) => string;
|
|
6
|
+
type Title = string | TitleFunction;
|
|
7
|
+
export type Orientation = "horizontal" | "vertical";
|
|
8
|
+
type ChartElementPosition = "start" | "end";
|
|
9
|
+
export type AxisLabelPosition = "vertical" | "horizontal";
|
|
10
|
+
export type ChartLegendPosition = "top" | "bottom" | "left" | "right";
|
|
11
|
+
type ChartField = string;
|
|
12
|
+
export type ChartFieldWithNameOnly = {
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
export type ChartFieldWithTitle = {
|
|
16
|
+
title?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
export type TwoDimensionalValueField = ChartField | (ChartFieldWithTitle & {
|
|
20
|
+
color?: string;
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* @defaultSnippets
|
|
24
|
+
* [
|
|
25
|
+
* {
|
|
26
|
+
* "label": "Вертикальная гистограмма (bar)",
|
|
27
|
+
* "body": {
|
|
28
|
+
* "title": "$1",
|
|
29
|
+
* "type": "2d",
|
|
30
|
+
* "keyField": "$2",
|
|
31
|
+
* "charts": [
|
|
32
|
+
* {
|
|
33
|
+
* "type": "bar",
|
|
34
|
+
* "data": {
|
|
35
|
+
* "valueFields": [
|
|
36
|
+
* "$3"
|
|
37
|
+
* ]
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* ]
|
|
41
|
+
* }
|
|
42
|
+
* },
|
|
43
|
+
* {
|
|
44
|
+
* "label": "Вертикальная линейная диаграмма (line)",
|
|
45
|
+
* "body": {
|
|
46
|
+
* "title": "$1",
|
|
47
|
+
* "type": "2d",
|
|
48
|
+
* "keyField": "$2",
|
|
49
|
+
* "charts": [
|
|
50
|
+
* {
|
|
51
|
+
* "type": "line",
|
|
52
|
+
* "data": {
|
|
53
|
+
* "valueFields": [
|
|
54
|
+
* "$3"
|
|
55
|
+
* ]
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* ]
|
|
59
|
+
* }
|
|
60
|
+
* },
|
|
61
|
+
* {
|
|
62
|
+
* "label": "Вертикальная диаграмма с областями (area)",
|
|
63
|
+
* "body": {
|
|
64
|
+
* "title": "$1",
|
|
65
|
+
* "type": "2d",
|
|
66
|
+
* "keyField": "$2",
|
|
67
|
+
* "charts": [
|
|
68
|
+
* {
|
|
69
|
+
* "type": "area",
|
|
70
|
+
* "data": {
|
|
71
|
+
* "valueFields": [
|
|
72
|
+
* "$3"
|
|
73
|
+
* ]
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* ]
|
|
77
|
+
* }
|
|
78
|
+
* },
|
|
79
|
+
* {
|
|
80
|
+
* "label": "Горизонтальная гистограмма (bar)",
|
|
81
|
+
* "body": {
|
|
82
|
+
* "title": "$1",
|
|
83
|
+
* "type": "2d",
|
|
84
|
+
* "keyField": "$2",
|
|
85
|
+
* "axes": {
|
|
86
|
+
* "orientation": "horizontal"
|
|
87
|
+
* },
|
|
88
|
+
* "charts": [
|
|
89
|
+
* {
|
|
90
|
+
* "type": "bar",
|
|
91
|
+
* "data": {
|
|
92
|
+
* "valueFields": [
|
|
93
|
+
* "$3"
|
|
94
|
+
* ]
|
|
95
|
+
* }
|
|
96
|
+
* }
|
|
97
|
+
* ]
|
|
98
|
+
* }
|
|
99
|
+
* },
|
|
100
|
+
* {
|
|
101
|
+
* "label": "Кольцевая диаграмма (donut)",
|
|
102
|
+
* "body": {
|
|
103
|
+
* "title": "$1",
|
|
104
|
+
* "type": "polar",
|
|
105
|
+
* "keyField": "$2",
|
|
106
|
+
* "chart": {
|
|
107
|
+
* "valueField": "$3"
|
|
108
|
+
* }
|
|
109
|
+
* }
|
|
110
|
+
* }
|
|
111
|
+
* ]
|
|
112
|
+
*/
|
|
113
|
+
export type ChartControlOptions = TwoDimensionalOptions | PolarOptions | CardChartPublicOptions | SunburstOptions;
|
|
114
|
+
/**
|
|
115
|
+
* @defaultSnippets
|
|
116
|
+
* [
|
|
117
|
+
* {
|
|
118
|
+
* "label": "Вертикальная ориентация, ось ключей снизу, ось значений слева",
|
|
119
|
+
* "body": {
|
|
120
|
+
* "orientation": "vertical",
|
|
121
|
+
* "key": {
|
|
122
|
+
* "position": "end"
|
|
123
|
+
* },
|
|
124
|
+
* "value": {
|
|
125
|
+
* "position": "start"
|
|
126
|
+
* }
|
|
127
|
+
* }
|
|
128
|
+
* },
|
|
129
|
+
* {
|
|
130
|
+
* "label": "Вертикальная ориентация, ось ключей сверху, ось значений слева",
|
|
131
|
+
* "body": {
|
|
132
|
+
* "orientation": "vertical",
|
|
133
|
+
* "key": {
|
|
134
|
+
* "position": "start"
|
|
135
|
+
* },
|
|
136
|
+
* "value": {
|
|
137
|
+
* "position": "start"
|
|
138
|
+
* }
|
|
139
|
+
* }
|
|
140
|
+
* },
|
|
141
|
+
* {
|
|
142
|
+
* "label": "Горизонтальная ориентация, ось ключей слева, ось значений снизу",
|
|
143
|
+
* "body": {
|
|
144
|
+
* "orientation": "horizontal",
|
|
145
|
+
* "key": {
|
|
146
|
+
* "position": "start"
|
|
147
|
+
* },
|
|
148
|
+
* "value": {
|
|
149
|
+
* "position": "start"
|
|
150
|
+
* }
|
|
151
|
+
* }
|
|
152
|
+
* },
|
|
153
|
+
* {
|
|
154
|
+
* "label": "Горизонтальная ориентация, ось ключей справа, ось значений снизу",
|
|
155
|
+
* "body": {
|
|
156
|
+
* "orientation": "horizontal",
|
|
157
|
+
* "key": {
|
|
158
|
+
* "position": "end"
|
|
159
|
+
* },
|
|
160
|
+
* "value": {
|
|
161
|
+
* "position": "end"
|
|
162
|
+
* }
|
|
163
|
+
* }
|
|
164
|
+
* }
|
|
165
|
+
* ]
|
|
166
|
+
*/
|
|
167
|
+
export interface Axes {
|
|
168
|
+
/**
|
|
169
|
+
* @title Ориентация диаграмм
|
|
170
|
+
* @description При вертикальной ориентации ось ключей будет расположена сверху или снизу.
|
|
171
|
+
* При горизонтальной ориентации ось ключей будет расположена слева или справа.
|
|
172
|
+
* По умолчанию вертикальная.
|
|
173
|
+
*/
|
|
174
|
+
orientation?: Orientation;
|
|
175
|
+
/** @title Общая настройка подписей осей */
|
|
176
|
+
labels?: BaseAxesLabelsOptions;
|
|
177
|
+
/**
|
|
178
|
+
* @title Параметры оси ключей
|
|
179
|
+
*/
|
|
180
|
+
key?: {
|
|
181
|
+
/**
|
|
182
|
+
* @title Позиция оси ключей
|
|
183
|
+
* @description По умолчанию равна "end", если диаграмма вертикальная и "start" - если диаграмма горизонтальная
|
|
184
|
+
*/
|
|
185
|
+
position?: ChartElementPosition;
|
|
186
|
+
/**
|
|
187
|
+
* @title Отображение оси
|
|
188
|
+
* @description По умолчанию всегда отображается
|
|
189
|
+
*/
|
|
190
|
+
visible?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* @title Отображение линий сетки оси
|
|
193
|
+
* @description По умолчанию всегда скрывается
|
|
194
|
+
*/
|
|
195
|
+
gridLine?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* @title Настройка подписей оси
|
|
198
|
+
*/
|
|
199
|
+
labels?: {
|
|
200
|
+
/**
|
|
201
|
+
* @title Настройки позиции оси
|
|
202
|
+
* @description Настраивается при вертикальном расположении. По умолчанию позиция определяется по количеству свободного места для одной подписи.
|
|
203
|
+
*/
|
|
204
|
+
position?: AxisLabelPosition;
|
|
205
|
+
/**
|
|
206
|
+
* @title Количество места, выделенного для подписи в px
|
|
207
|
+
* @default 20
|
|
208
|
+
*/
|
|
209
|
+
space?: number;
|
|
210
|
+
/**
|
|
211
|
+
* @title Функция форматирования подписи
|
|
212
|
+
* @param options Параметры для форматирования подписи. В поле `key` хранится значение поля оси ключей, в поле `dataRow` - строка с данными для данного ключа.
|
|
213
|
+
* @returns Строка с форматированной подписью
|
|
214
|
+
*/
|
|
215
|
+
format?: (options: {
|
|
216
|
+
key: string;
|
|
217
|
+
dataRow: MdtChartsDataRow;
|
|
218
|
+
}) => string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* @title Параметры оси значений
|
|
223
|
+
*/
|
|
224
|
+
value?: BaseValueAxisOptions & {
|
|
225
|
+
/**
|
|
226
|
+
* @title Позиция оси значений
|
|
227
|
+
* @description По умолчанию равна "start", если диаграмма вертикальная и "end" - если диаграмма горизонтальная
|
|
228
|
+
*/
|
|
229
|
+
position?: ChartElementPosition;
|
|
230
|
+
/**
|
|
231
|
+
* @title Отображение линий сетки оси
|
|
232
|
+
* @description По умолчанию всегда отображается
|
|
233
|
+
*/
|
|
234
|
+
gridLine?: boolean;
|
|
235
|
+
line?: {
|
|
236
|
+
visible?: boolean;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
valueSecondary?: BaseValueAxisOptions;
|
|
240
|
+
}
|
|
241
|
+
export type FormatAxisValueFn = (value: number) => string;
|
|
242
|
+
interface BaseValueAxisOptions {
|
|
243
|
+
/** @title Размер отступа между подписями в px */
|
|
244
|
+
stepSize?: number;
|
|
245
|
+
/**
|
|
246
|
+
* @title Настройка диапазона осей
|
|
247
|
+
* @param options Опции с данными диаграммы
|
|
248
|
+
* @returns Объект с диапазоном осей. Оставить -1 для автоматического определения диапазона
|
|
249
|
+
*/
|
|
250
|
+
domain?: (options: {
|
|
251
|
+
data: MdtChartsDataRow[];
|
|
252
|
+
}) => {
|
|
253
|
+
start: number;
|
|
254
|
+
end: number;
|
|
255
|
+
};
|
|
256
|
+
/** @title Функция форматирования значений */
|
|
257
|
+
formatValue?: string | FormatAxisValueFn;
|
|
258
|
+
/**
|
|
259
|
+
* @title Отображение оси
|
|
260
|
+
* @description По умолчанию не отображается только тогда, когда все диаграммы имеют встроенные лейблы, показывающие значения
|
|
261
|
+
*/
|
|
262
|
+
visible?: boolean;
|
|
263
|
+
}
|
|
264
|
+
export interface BaseAxesLabelsOptions {
|
|
265
|
+
/**
|
|
266
|
+
* @title Максимальный размер подписи в px
|
|
267
|
+
* @description Для вертикальных осей этот параметр определяет максимальную ширину подписи, а для горизонтальных - максимальную высоту подписи (если подписи расположены вертикально).
|
|
268
|
+
* @default 80
|
|
269
|
+
*/
|
|
270
|
+
maxSize?: number;
|
|
271
|
+
}
|
|
272
|
+
interface BaseChartBlockOptions {
|
|
273
|
+
/**
|
|
274
|
+
* @title Высота блока графика (px)
|
|
275
|
+
* @description По умолчанию равна 510 для 2d и polar диаграмм и 150 для card. Минимально возможная высота: 100. Максимально возможная: 800.
|
|
276
|
+
* @default 510
|
|
277
|
+
*/
|
|
278
|
+
height?: number;
|
|
279
|
+
/** @title Настройки стилей */
|
|
280
|
+
style?: {
|
|
281
|
+
/** @title Цвет фона */
|
|
282
|
+
backgroundColor?: string;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
interface GraphicChartBlockOptions extends BaseChartBlockOptions {
|
|
286
|
+
/**
|
|
287
|
+
* @title Заголовок диаграммы
|
|
288
|
+
*/
|
|
289
|
+
title?: Title;
|
|
290
|
+
/**
|
|
291
|
+
* @title Наименование поля-ключа
|
|
292
|
+
*/
|
|
293
|
+
keyField: ChartField;
|
|
294
|
+
/**
|
|
295
|
+
* @title Маркдаун тултипа
|
|
296
|
+
*/
|
|
297
|
+
tooltipMarkdown?: string;
|
|
298
|
+
/** @title Логический тип поля значений */
|
|
299
|
+
valueFieldType?: string;
|
|
300
|
+
/**
|
|
301
|
+
* @title Максимальное количество отображаемых записей
|
|
302
|
+
* @description По умолчанию равно `50`
|
|
303
|
+
* @default 50
|
|
304
|
+
*/
|
|
305
|
+
maxRecordCount?: number;
|
|
306
|
+
/**
|
|
307
|
+
* @title Настройки отображения тултипа
|
|
308
|
+
*/
|
|
309
|
+
tooltip?: ChartTooltipOptions;
|
|
310
|
+
}
|
|
311
|
+
export interface ChartTooltipOptions {
|
|
312
|
+
aggregator?: TooltipAggregator;
|
|
313
|
+
/**
|
|
314
|
+
* @title Настройки отображения строк тултипа
|
|
315
|
+
*/
|
|
316
|
+
rows?: ChartTooltipRowsOptions;
|
|
317
|
+
}
|
|
318
|
+
export type ChartCommonLegendOption = boolean | {
|
|
319
|
+
show?: boolean;
|
|
320
|
+
position?: ChartLegendPosition;
|
|
321
|
+
};
|
|
322
|
+
interface ChartTooltipRowsOptions {
|
|
323
|
+
/**
|
|
324
|
+
* @title Функция для сортировки строк
|
|
325
|
+
* @param aRow Строка с подписью и значением (хранятся в поле `textContent`)
|
|
326
|
+
* @param bRow Строка с подписью и значением (хранятся в поле `textContent`)
|
|
327
|
+
* @returns Число, которое будет использоваться для сортировки. Если больше 0, то aRow будет расположена после bRow, если меньше 0, то наоборот, если равно 0, то порядок не изменится
|
|
328
|
+
* @example Сортировка по значениям от большего к меньшему:
|
|
329
|
+
*
|
|
330
|
+
* sortCompareFn: (aRow, bRow) => bRow.textContent.value - aRow.textContent.value
|
|
331
|
+
*/
|
|
332
|
+
sortCompareFn?: (aRow: ChartTooltipRow, bRow: ChartTooltipRow) => number;
|
|
333
|
+
/**
|
|
334
|
+
* @title Предикат для фильтрации строк
|
|
335
|
+
* @param row Строка с подписью и значением (хранятся в поле `textContent`)
|
|
336
|
+
* @returns true, если строка должна быть отображена и false - если отображаться не должна
|
|
337
|
+
* @example Скрытие пустых значений:
|
|
338
|
+
*
|
|
339
|
+
* filterPredicate: (row) => row.textContent.value != null
|
|
340
|
+
*/
|
|
341
|
+
filterPredicate?: (row: ChartTooltipRow) => boolean;
|
|
342
|
+
}
|
|
343
|
+
interface ChartTooltipRow {
|
|
344
|
+
textContent: {
|
|
345
|
+
caption: string;
|
|
346
|
+
value?: number;
|
|
347
|
+
};
|
|
348
|
+
valueField: ChartFieldWithTitle;
|
|
349
|
+
}
|
|
350
|
+
interface TooltipAggregator {
|
|
351
|
+
content?: (options: {
|
|
352
|
+
row: MdtChartsDataRow;
|
|
353
|
+
}) => TooltipTypedRowContent | TooltipTypedRowContent[];
|
|
354
|
+
position?: "underKey" | "underValues";
|
|
355
|
+
}
|
|
356
|
+
type TooltipTypedRowContent = ({
|
|
357
|
+
type: "plainText";
|
|
358
|
+
textContent: string;
|
|
359
|
+
} | {
|
|
360
|
+
type: "captionValue";
|
|
361
|
+
caption: string;
|
|
362
|
+
value: any;
|
|
363
|
+
}) & {
|
|
364
|
+
marker?: {
|
|
365
|
+
shape: "circle" | "bar" | "line";
|
|
366
|
+
color: string;
|
|
367
|
+
};
|
|
368
|
+
wrapperElOptions?: {
|
|
369
|
+
cssClassName?: string;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
export interface CommonCanvasOptions {
|
|
373
|
+
bar?: BarCanvasOptions;
|
|
374
|
+
}
|
|
375
|
+
interface BarCanvasOptions {
|
|
376
|
+
/** @title минимальная ширина столбца в px */
|
|
377
|
+
minBarWidth?: number;
|
|
378
|
+
/** @title максимальная ширина столбца в px */
|
|
379
|
+
maxBarWidth?: number;
|
|
380
|
+
/** @title минимальный размер расстояния между группами столбцов для разных ключей */
|
|
381
|
+
groupMinDistance?: number;
|
|
382
|
+
/** @title максимальный размер расстояния между группами столбцов для разных ключей */
|
|
383
|
+
groupMaxDistance?: number;
|
|
384
|
+
/** @title расстояние между столбцами в одной группе */
|
|
385
|
+
barDistance?: number;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* @title Двумерная диаграмма
|
|
389
|
+
*/
|
|
390
|
+
export interface TwoDimensionalOptions extends GraphicChartBlockOptions {
|
|
391
|
+
/**
|
|
392
|
+
* @title Тип исчисления диаграммы
|
|
393
|
+
*/
|
|
394
|
+
type: "2d";
|
|
395
|
+
/**
|
|
396
|
+
* @title Параметры осей двумерной диаграммы
|
|
397
|
+
*
|
|
398
|
+
*/
|
|
399
|
+
axes?: Axes;
|
|
400
|
+
/**
|
|
401
|
+
* @title Параметры двумерных диаграмм
|
|
402
|
+
*/
|
|
403
|
+
charts: TwoDimensionalChart[];
|
|
404
|
+
/**
|
|
405
|
+
* @title Общие параметры холста графика
|
|
406
|
+
*/
|
|
407
|
+
commonCanvasOptions?: CommonCanvasOptions;
|
|
408
|
+
legend?: ChartCommonLegendOption;
|
|
409
|
+
valueLabels?: {
|
|
410
|
+
style?: ValueLabelsStyleOptions;
|
|
411
|
+
collision?: {
|
|
412
|
+
otherValueLabels?: "hide" | "none";
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* @title Отображения групп записей
|
|
417
|
+
*/
|
|
418
|
+
grouping?: {
|
|
419
|
+
/**
|
|
420
|
+
* @title Уровни группировки
|
|
421
|
+
*/
|
|
422
|
+
items: {
|
|
423
|
+
/**
|
|
424
|
+
* @title Данные, по которым будет настроена группировка
|
|
425
|
+
*/
|
|
426
|
+
data: {
|
|
427
|
+
field: ChartFieldWithTitle;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* @title Подписи групп. Будут отображать значения поля, по которому задана группировка
|
|
431
|
+
*/
|
|
432
|
+
labels?: {
|
|
433
|
+
/**
|
|
434
|
+
* @title Позиция подписей.
|
|
435
|
+
* @description Может быть равна "start" или "end". Настраивается аналогично позиции оси ключей
|
|
436
|
+
*/
|
|
437
|
+
position?: ChartElementPosition;
|
|
438
|
+
};
|
|
439
|
+
}[];
|
|
440
|
+
};
|
|
441
|
+
events?: TwoDimensionalEvents;
|
|
442
|
+
}
|
|
443
|
+
interface ValueLabelsStyleOptions {
|
|
444
|
+
cssClassName?: string;
|
|
445
|
+
/**
|
|
446
|
+
* @default 10
|
|
447
|
+
*/
|
|
448
|
+
fontSize?: number;
|
|
449
|
+
/**
|
|
450
|
+
* @default rgba(68, 68, 68, 0.5)
|
|
451
|
+
*/
|
|
452
|
+
color?: string;
|
|
453
|
+
}
|
|
454
|
+
interface TwoDimensionalEvents {
|
|
455
|
+
drawComplete?: (event: DrawCompleteEvent) => void;
|
|
456
|
+
}
|
|
457
|
+
interface DrawCompleteEvent {
|
|
458
|
+
canvas: {
|
|
459
|
+
keyItems: CanvasKeyItemOptions[];
|
|
460
|
+
plotAreaMargin: BlockMargin;
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
interface BlockMargin {
|
|
464
|
+
top: number;
|
|
465
|
+
bottom: number;
|
|
466
|
+
left: number;
|
|
467
|
+
right: number;
|
|
468
|
+
}
|
|
469
|
+
interface CanvasKeyItemOptions {
|
|
470
|
+
totalSize: number;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* @title Круговая диаграмма
|
|
474
|
+
*/
|
|
475
|
+
export interface PolarOptions extends GraphicChartBlockOptions {
|
|
476
|
+
/**
|
|
477
|
+
* @title Тип исчисления диаграммы
|
|
478
|
+
*/
|
|
479
|
+
type: "polar";
|
|
480
|
+
/**
|
|
481
|
+
* @title Параметры круговой диаграммы
|
|
482
|
+
*/
|
|
483
|
+
chart: PolarChart;
|
|
484
|
+
/**
|
|
485
|
+
* @title Наименование поля с цветом
|
|
486
|
+
* @description Наименование поля, в котором хранится цвет для сегментов диаграммы.
|
|
487
|
+
*/
|
|
488
|
+
colorField?: string;
|
|
489
|
+
/**
|
|
490
|
+
* @title Отображение легенды
|
|
491
|
+
* @description По умолчанию для круговых диаграмм отображается всегда
|
|
492
|
+
*/
|
|
493
|
+
legend?: ChartCommonLegendOption;
|
|
494
|
+
}
|
|
495
|
+
export type TwoDimensionalChart = BarChart | LineChart | AreaChart | DotChart;
|
|
496
|
+
interface TwoDimensionalChartOptions {
|
|
497
|
+
/**
|
|
498
|
+
* @title Параметры данных, привязанных к диаграмме
|
|
499
|
+
*/
|
|
500
|
+
data: {
|
|
501
|
+
/**
|
|
502
|
+
* @title Наименования отображаемых полей-значений
|
|
503
|
+
*/
|
|
504
|
+
valueFields: TwoDimensionalValueField[];
|
|
505
|
+
secondaryValue?: boolean;
|
|
506
|
+
};
|
|
507
|
+
/**
|
|
508
|
+
* @title Отображение диаграммы в сегментированном виде
|
|
509
|
+
*/
|
|
510
|
+
isSegmented?: boolean;
|
|
511
|
+
/**
|
|
512
|
+
* @title Отображение подписей значений на диаграмме
|
|
513
|
+
*/
|
|
514
|
+
valueLabels?: boolean | ValueLabelsChartOptions;
|
|
515
|
+
}
|
|
516
|
+
export type ValueLabelsPositionMode = "center" | "afterElement" | "beforeHead" | "afterStart";
|
|
517
|
+
export interface ValueLabelsChartOptions {
|
|
518
|
+
on?: boolean;
|
|
519
|
+
/** @default "afterElement" */
|
|
520
|
+
position?: ValueLabelsPositionMode;
|
|
521
|
+
/**
|
|
522
|
+
* @title Опции смещения подписи
|
|
523
|
+
*/
|
|
524
|
+
offset?: {
|
|
525
|
+
/**
|
|
526
|
+
* @title Смещение подписи относительно вершины элемента в px
|
|
527
|
+
* @default 10
|
|
528
|
+
*/
|
|
529
|
+
size?: number;
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* @title Список полей, для которых будут отображаться подписи
|
|
533
|
+
* @description По умолчанию подписи отображаются для всех полей
|
|
534
|
+
*/
|
|
535
|
+
renderForFields?: ChartField[];
|
|
536
|
+
/**
|
|
537
|
+
* @title Функция для формирования текста подписи
|
|
538
|
+
* @param options Параметры для формирования текста подписи
|
|
539
|
+
* @returns Объект с текстом подписи
|
|
540
|
+
*/
|
|
541
|
+
content?: (options: {
|
|
542
|
+
dataRow: MdtChartsDataRow;
|
|
543
|
+
field: ChartFieldWithTitle;
|
|
544
|
+
}) => {
|
|
545
|
+
textContent: string;
|
|
546
|
+
};
|
|
547
|
+
rotation?: {
|
|
548
|
+
angle?: number;
|
|
549
|
+
};
|
|
550
|
+
handleElement?: (options: {
|
|
551
|
+
element: SVGElement;
|
|
552
|
+
value: number;
|
|
553
|
+
dataRow: MdtChartsDataRow;
|
|
554
|
+
}) => void;
|
|
555
|
+
format?: (options: {
|
|
556
|
+
value: number;
|
|
557
|
+
}) => string | number;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @title Гистограмма
|
|
561
|
+
* @defaultSnippets
|
|
562
|
+
* [
|
|
563
|
+
* {
|
|
564
|
+
* "label": "Несегментированная гистограмма (bar)",
|
|
565
|
+
* "body": {
|
|
566
|
+
* "type": "bar",
|
|
567
|
+
* "isSegmented": false,
|
|
568
|
+
* "data": {
|
|
569
|
+
* "valueFields": [
|
|
570
|
+
* "$1"
|
|
571
|
+
* ]
|
|
572
|
+
* }
|
|
573
|
+
* }
|
|
574
|
+
* },
|
|
575
|
+
* {
|
|
576
|
+
* "label": "Сегментированная гистограмма (bar)",
|
|
577
|
+
* "body": {
|
|
578
|
+
* "type": "bar",
|
|
579
|
+
* "isSegmented": true,
|
|
580
|
+
* "data": {
|
|
581
|
+
* "valueFields": [
|
|
582
|
+
* "$1"
|
|
583
|
+
* ]
|
|
584
|
+
* }
|
|
585
|
+
* }
|
|
586
|
+
* },
|
|
587
|
+
* {
|
|
588
|
+
* "label": "Сегментированная линейная диаграмма (line)",
|
|
589
|
+
* "body": {
|
|
590
|
+
* "type": "line",
|
|
591
|
+
* "isSegmented": true,
|
|
592
|
+
* "data": {
|
|
593
|
+
* "valueFields": [
|
|
594
|
+
* "$1"
|
|
595
|
+
* ]
|
|
596
|
+
* }
|
|
597
|
+
* }
|
|
598
|
+
* },
|
|
599
|
+
* {
|
|
600
|
+
* "label": "Несегментированная линейна диаграмма (line)",
|
|
601
|
+
* "body": {
|
|
602
|
+
* "type": "line",
|
|
603
|
+
* "isSegmented": false,
|
|
604
|
+
* "data": {
|
|
605
|
+
* "valueFields": [
|
|
606
|
+
* "$1"
|
|
607
|
+
* ]
|
|
608
|
+
* }
|
|
609
|
+
* }
|
|
610
|
+
* },
|
|
611
|
+
* {
|
|
612
|
+
* "label": "Сегментированная диаграмма с областями (area)",
|
|
613
|
+
* "body": {
|
|
614
|
+
* "type": "area",
|
|
615
|
+
* "isSegmented": true,
|
|
616
|
+
* "data": {
|
|
617
|
+
* "valueFields": [
|
|
618
|
+
* "$1"
|
|
619
|
+
* ]
|
|
620
|
+
* }
|
|
621
|
+
* }
|
|
622
|
+
* },
|
|
623
|
+
* {
|
|
624
|
+
* "label": "Несегментированная диаграмма с областями (area)",
|
|
625
|
+
* "body": {
|
|
626
|
+
* "type": "area",
|
|
627
|
+
* "isSegmented": false,
|
|
628
|
+
* "data": {
|
|
629
|
+
* "valueFields": [
|
|
630
|
+
* "$1"
|
|
631
|
+
* ]
|
|
632
|
+
* }
|
|
633
|
+
* }
|
|
634
|
+
* }
|
|
635
|
+
* ]
|
|
636
|
+
*/
|
|
637
|
+
interface BarChart extends TwoDimensionalChartOptions {
|
|
638
|
+
/**
|
|
639
|
+
* @title Тип 2D-диаграммы
|
|
640
|
+
*/
|
|
641
|
+
type: "bar";
|
|
642
|
+
/**
|
|
643
|
+
* @title Отображение встроенных надписей со значением
|
|
644
|
+
* @description Надписи отображаются только при горизонтальном отображении. По умолчанию равно `true`
|
|
645
|
+
* @default true
|
|
646
|
+
*/
|
|
647
|
+
labels?: boolean;
|
|
648
|
+
/** @title Отображать в заштрихованном виде */
|
|
649
|
+
hatched?: boolean;
|
|
650
|
+
borderRadius?: BarChartBorderRadius;
|
|
651
|
+
}
|
|
652
|
+
interface BarChartBorderRadius {
|
|
653
|
+
value?: number;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* @title Линейная диаграмма
|
|
657
|
+
*/
|
|
658
|
+
interface LineAreaChart extends TwoDimensionalChartOptions {
|
|
659
|
+
/**
|
|
660
|
+
* @title Отображение маркеров
|
|
661
|
+
* @description По умолчанию всегда скрыты
|
|
662
|
+
*/
|
|
663
|
+
markers?: boolean;
|
|
664
|
+
}
|
|
665
|
+
interface AreaChart extends LineAreaChart {
|
|
666
|
+
/**
|
|
667
|
+
* @title Тип 2D-диаграммы
|
|
668
|
+
*/
|
|
669
|
+
type: "area";
|
|
670
|
+
/** @title Включить градиент */
|
|
671
|
+
gradient?: boolean;
|
|
672
|
+
}
|
|
673
|
+
interface LineChart extends LineAreaChart {
|
|
674
|
+
/**
|
|
675
|
+
* @title Тип 2D-диаграммы
|
|
676
|
+
*/
|
|
677
|
+
type: "line";
|
|
678
|
+
/** @title Управление пунктиром */
|
|
679
|
+
dash?: LineDash;
|
|
680
|
+
width?: number;
|
|
681
|
+
}
|
|
682
|
+
interface LineDash {
|
|
683
|
+
/** @title Включить пунктир */
|
|
684
|
+
on?: boolean;
|
|
685
|
+
/** @title Длина одной черты в px */
|
|
686
|
+
dashSize?: number;
|
|
687
|
+
/** @title Размер между чертами в px */
|
|
688
|
+
gapSize?: number;
|
|
689
|
+
}
|
|
690
|
+
export interface DotChart extends TwoDimensionalChartOptions {
|
|
691
|
+
type: "dot";
|
|
692
|
+
}
|
|
693
|
+
export interface PolarChart {
|
|
694
|
+
/**
|
|
695
|
+
* @title Наименование отображаемого поля-значения
|
|
696
|
+
*/
|
|
697
|
+
valueField: ChartField | ChartFieldWithTitle;
|
|
698
|
+
/**
|
|
699
|
+
* @title Управление агрегатором
|
|
700
|
+
*/
|
|
701
|
+
aggregator?: {
|
|
702
|
+
/**
|
|
703
|
+
* @title Контент агрегатора
|
|
704
|
+
*/
|
|
705
|
+
content?: string;
|
|
706
|
+
};
|
|
707
|
+
valueLabels?: DonutChartValueLabelsOptions;
|
|
708
|
+
}
|
|
709
|
+
interface SunburstAggregator {
|
|
710
|
+
content?: (model: SunburstAggregatorModel) => AggregatorContent;
|
|
711
|
+
}
|
|
712
|
+
interface SunburstAggregatorModel {
|
|
713
|
+
data: MdtChartsDataRow[];
|
|
714
|
+
}
|
|
715
|
+
interface AggregatorContent {
|
|
716
|
+
value?: string | number;
|
|
717
|
+
title?: string;
|
|
718
|
+
}
|
|
719
|
+
interface PolarLikeChartValueLabelsOptions {
|
|
720
|
+
on: boolean;
|
|
721
|
+
rotation?: {
|
|
722
|
+
type: "none" | "tangential";
|
|
723
|
+
};
|
|
724
|
+
cssClass?: string;
|
|
725
|
+
}
|
|
726
|
+
export interface DonutChartValueLabelsOptions extends PolarLikeChartValueLabelsOptions {
|
|
727
|
+
content?: (dataRow: MdtChartsDataRow) => string;
|
|
728
|
+
}
|
|
729
|
+
export interface SunburstOptions extends BaseChartBlockOptions {
|
|
730
|
+
type: "sunburst";
|
|
731
|
+
/**
|
|
732
|
+
* @title Заголовок диаграммы
|
|
733
|
+
*/
|
|
734
|
+
title?: Title;
|
|
735
|
+
/**
|
|
736
|
+
* @title Отображение легенды
|
|
737
|
+
* @description По умолчанию для круговых диаграмм отображается всегда
|
|
738
|
+
*/
|
|
739
|
+
legend?: ChartCommonLegendOption;
|
|
740
|
+
/**
|
|
741
|
+
* @title Управление агрегатором
|
|
742
|
+
*/
|
|
743
|
+
aggregator?: SunburstAggregator;
|
|
744
|
+
data: {
|
|
745
|
+
valueField: ChartFieldWithTitle;
|
|
746
|
+
};
|
|
747
|
+
levels: SunburstLevel[];
|
|
748
|
+
}
|
|
749
|
+
export interface SunburstLevel {
|
|
750
|
+
data: {
|
|
751
|
+
keyField: ChartFieldWithNameOnly;
|
|
752
|
+
colorField?: ChartFieldWithNameOnly;
|
|
753
|
+
};
|
|
754
|
+
canvas?: {
|
|
755
|
+
thickness?: SunburstLevelThicknessOptions;
|
|
756
|
+
};
|
|
757
|
+
tooltip?: {
|
|
758
|
+
overrideContent?: (options: {
|
|
759
|
+
autoTooltipRows: TooltipTypedRowContent[];
|
|
760
|
+
attachedDataRows: MdtChartsDataRow[];
|
|
761
|
+
}) => {
|
|
762
|
+
rows: TooltipTypedRowContent[];
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
valueLabels?: SunburstChartValueLabelsOptions;
|
|
766
|
+
/**
|
|
767
|
+
* @title Отображение значений данного уровня в легенде
|
|
768
|
+
*/
|
|
769
|
+
legend?: {
|
|
770
|
+
show: boolean;
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
export interface SunburstChartValueLabelsOptions extends PolarLikeChartValueLabelsOptions {
|
|
774
|
+
content?: (segment: {
|
|
775
|
+
attachedDataRows: MdtChartsDataRow[];
|
|
776
|
+
}) => string;
|
|
777
|
+
}
|
|
778
|
+
export interface SunburstLevelThicknessOptions {
|
|
779
|
+
/** @title Минимальная толщина в % или в px. Пример значений: "25%", "10px" */
|
|
780
|
+
min: number | string;
|
|
781
|
+
/** @title Максимальная толщина в % или в px. Пример значений: "25%", "10px" */
|
|
782
|
+
max: number | string;
|
|
783
|
+
/** @title Точная толщина в % или в px. Обязательно будет между min и max. Пример значений: "25%", "10px" */
|
|
784
|
+
value?: number | string;
|
|
785
|
+
}
|
|
786
|
+
export interface CardChartPublicOptions extends BaseChartBlockOptions {
|
|
787
|
+
/** @title Тип исчисления диаграммы */
|
|
788
|
+
type: "card";
|
|
789
|
+
/** @title Название */
|
|
790
|
+
title: string;
|
|
791
|
+
/** @title Описание */
|
|
792
|
+
description?: string;
|
|
793
|
+
/** @title Иконка */
|
|
794
|
+
icon?: string;
|
|
795
|
+
/** @title Значение */
|
|
796
|
+
value: CardChartValueOptions;
|
|
797
|
+
/**
|
|
798
|
+
* @title Настройки отображения изменения показателя
|
|
799
|
+
* @deprecated Используйте `changesBlock.items` вместо этого параметра
|
|
800
|
+
*/
|
|
801
|
+
change?: CardChartChangePublicOptions;
|
|
802
|
+
/** @title Опции блока с изменениями показателя */
|
|
803
|
+
changesBlock?: {
|
|
804
|
+
/** @title Направление отображения изменений */
|
|
805
|
+
layout?: {
|
|
806
|
+
/**
|
|
807
|
+
* @title Направление отображения изменений
|
|
808
|
+
* @description "row" - отображение изменений в одну строку, "column" - отображение изменений в один столбец
|
|
809
|
+
* @default "row"
|
|
810
|
+
*/
|
|
811
|
+
direction?: "row" | "column";
|
|
812
|
+
};
|
|
813
|
+
/** @title Опции изменений */
|
|
814
|
+
items: CardChartChangePublicOptions[];
|
|
815
|
+
};
|
|
816
|
+
/** @title Цвет текста карточки */
|
|
817
|
+
color?: CardColorOptions;
|
|
818
|
+
}
|
|
819
|
+
export interface CardChartValueOptions {
|
|
820
|
+
/** @title Наименование поля */
|
|
821
|
+
field: ChartField;
|
|
822
|
+
/** @title Логический тип поля */
|
|
823
|
+
dataType?: string;
|
|
824
|
+
/** @title Шаблон выводимого значения */
|
|
825
|
+
template?: string;
|
|
826
|
+
}
|
|
827
|
+
export interface CardChartChangePublicOptions {
|
|
828
|
+
/** @title Значение блока */
|
|
829
|
+
value: CardChartValueOptions;
|
|
830
|
+
/** @title Описание блока */
|
|
831
|
+
description?: string;
|
|
832
|
+
/** @title Иконки описания */
|
|
833
|
+
descriptionIcons?: {
|
|
834
|
+
iconName: string;
|
|
835
|
+
description?: string;
|
|
836
|
+
}[];
|
|
837
|
+
/** @title Цвет текста */
|
|
838
|
+
color?: CardColorOptions;
|
|
839
|
+
}
|
|
840
|
+
interface CardColorOptions {
|
|
841
|
+
/** @title Набор цветов */
|
|
842
|
+
range: ColorRangeItem[];
|
|
843
|
+
}
|
|
844
|
+
export interface ColorRangeItem {
|
|
845
|
+
/** @title Значение с которого начинается цвет */
|
|
846
|
+
value?: number;
|
|
847
|
+
/** @title Название цвета */
|
|
848
|
+
color: string;
|
|
849
|
+
}
|
|
850
|
+
export {};
|