From b013778cf5e4facc0842f86033afc959488ef6ae Mon Sep 17 00:00:00 2001 From: Aliullov Vlad Date: Thu, 3 Dec 2026 15:23:21 +0100 Subject: [PATCH] Fix TS in demos (Diagram, Gantt, Gauges) --- .../Angular/app/app.component.ts | 16 +++++++++++----- .../Angular/app/app.service.ts | 4 ++-- .../Angular/app/app.component.ts | 7 ++++--- .../Angular/app/app.service.ts | 4 ++-- .../Angular/app/app.component.ts | 16 +++++++++------- .../Angular/app/app.service.ts | 4 ++-- .../Angular/app/app.service.ts | 4 ++-- .../ImagesInShapes/Angular/app/app.service.ts | 4 ++-- .../ItemSelection/Angular/app/app.component.ts | 11 ++++------- .../ItemSelection/Angular/app/app.service.ts | 4 ++-- .../Angular/app/app.service.ts | 6 +++--- .../Angular/app/app.service.ts | 2 +- .../Angular/app/app.service.ts | 4 ++-- .../Angular/app/app.component.ts | 5 +++-- .../Angular/app/app.service.ts | 2 +- .../SimpleView/Angular/app/app.service.ts | 4 ++-- .../UICustomization/Angular/app/app.component.ts | 3 ++- .../Appearance/Angular/app/app.component.html | 2 +- .../Appearance/Angular/app/app.component.ts | 10 ++++++---- .../Gantt/Appearance/Angular/app/app.service.ts | 8 ++++---- .../ContextMenu/Angular/app/app.component.html | 2 +- .../ContextMenu/Angular/app/app.component.ts | 16 ++++++++++------ .../Gantt/ContextMenu/Angular/app/app.service.ts | 8 ++++---- .../DataBinding/Angular/app/app.component.html | 2 +- .../Gantt/DataBinding/Angular/app/app.service.ts | 8 ++++---- .../ExportToPDF/Angular/app/app.component.html | 2 +- .../ExportToPDF/Angular/app/app.component.ts | 3 ++- .../Gantt/ExportToPDF/Angular/app/app.service.ts | 8 ++++---- .../FilterRow/Angular/app/app.component.html | 2 +- .../Gantt/FilterRow/Angular/app/app.service.ts | 8 ++++---- .../HeaderFilter/Angular/app/app.component.html | 2 +- .../HeaderFilter/Angular/app/app.service.ts | 8 ++++---- .../Overview/Angular/app/app.component.html | 2 +- .../Gantt/Overview/Angular/app/app.service.ts | 8 ++++---- .../Gantt/Sorting/Angular/app/app.component.html | 2 +- .../Gantt/Sorting/Angular/app/app.service.ts | 8 ++++---- .../StripLines/Angular/app/app.component.html | 2 +- .../Gantt/StripLines/Angular/app/app.service.ts | 2 +- .../TaskTemplate/Angular/app/app.component.html | 2 +- .../TaskTemplate/Angular/app/app.component.ts | 4 ++-- .../TaskTemplate/Angular/app/app.service.ts | 8 ++++---- .../Gantt/Toolbar/Angular/app/app.component.html | 2 +- .../Gantt/Toolbar/Angular/app/app.service.ts | 8 ++++---- .../Validation/Angular/app/app.component.html | 2 +- .../Gantt/Validation/Angular/app/app.service.ts | 4 ++-- .../Gauges/BarGauge/Angular/app/app.service.ts | 2 +- .../CircularGauge/Angular/app/app.component.ts | 2 +- .../CircularGauge/Angular/app/app.service.ts | 2 +- .../Angular/app/app.component.ts | 2 +- .../Angular/app/app.component.html | 2 +- .../Angular/app/app.component.ts | 5 +++-- .../Angular/app/app.component.html | 2 +- .../Angular/app/app.component.ts | 5 +++-- .../Angular/app/app.component.html | 2 +- .../GaugeTooltip/Angular/app/app.component.ts | 2 +- .../Angular/app/app.component.ts | 2 +- .../LinearGauge/Angular/app/app.service.ts | 2 +- .../Palette/Angular/app/app.component.html | 2 +- .../Angular/app/app.component.html | 2 +- .../Angular/app/app.component.html | 2 +- .../Angular/app/app.component.ts | 8 +++++--- .../Angular/app/app.component.ts | 5 +++-- .../Angular/app/app.component.html | 2 +- .../Angular/app/app.component.ts | 5 +++-- .../Angular/app/app.component.ts | 9 +++++---- .../Angular/app/app.service.ts | 2 +- .../Gauges/Tooltip/Angular/app/app.component.ts | 8 ++++---- .../Angular/app/app.component.ts | 5 +++-- .../Angular/app/app.component.ts | 3 ++- .../Angular/app/app.service.ts | 2 +- apps/demos/tsconfig.ngc-check.json | 3 +++ 71 files changed, 179 insertions(+), 152 deletions(-) diff --git a/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.component.ts b/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.component.ts index 64a4fa3133e7..7bfd0e985823 100644 --- a/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.component.ts +++ b/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.component.ts @@ -5,6 +5,12 @@ import { provideHttpClient, withFetch } from '@angular/common/http'; import { DxDiagramModule } from 'devextreme-angular'; import { ArrayStore } from 'devextreme-angular/common/data'; import { Service } from './app.service'; +import type { OrgItem } from './app.service'; + +type DiagramItem = OrgItem & { + Width?: number; + Height?: number; +}; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -33,7 +39,7 @@ export class AppComponent { data: this.service.getOrgLinks(), }); - itemTypeExpr(obj, value) { + itemTypeExpr(obj: DiagramItem, value?: string) { if (value) { obj.Type = (value === 'rectangle') ? undefined : 'group'; return null; @@ -41,7 +47,7 @@ export class AppComponent { return obj.Type === 'group' ? 'ellipse' : 'rectangle'; } - itemWidthExpr(obj, value) { + itemWidthExpr(obj: DiagramItem, value?: number) { if (value) { obj.Width = value; return null; @@ -49,7 +55,7 @@ export class AppComponent { return obj.Width || (obj.Type === 'group' && 1.5) || 1; } - itemHeightExpr(obj, value) { + itemHeightExpr(obj: DiagramItem, value?: number) { if (value) { obj.Height = value; return null; @@ -57,12 +63,12 @@ export class AppComponent { return obj.Height || (obj.Type === 'group' && 1) || 0.75; } - itemTextStyleExpr(obj) { + itemTextStyleExpr(obj: DiagramItem) { if (obj.Level === 'senior') { return { 'font-weight': 'bold', 'text-decoration': 'underline' }; } return {}; } - itemStyleExpr(obj) { + itemStyleExpr(obj: DiagramItem) { const style: Record = { stroke: '#444444' }; if (obj.Type === 'group') { style.fill = '#f3f3f3'; } return style; diff --git a/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.service.ts index 5182910e7a56..ed8461d2d402 100644 --- a/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/AdvancedDataBinding/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class OrgItem { +export interface OrgItem { ID: string; Name: string; @@ -10,7 +10,7 @@ export class OrgItem { Level?: string; } -export class OrgLink { +export interface OrgLink { ID: string; From: string; diff --git a/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.component.ts b/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.component.ts index e0fd76fd94b3..717195957de4 100644 --- a/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.component.ts +++ b/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.component.ts @@ -6,7 +6,8 @@ import { DxPopupModule, DxDiagramModule, } from 'devextreme-angular'; import { ArrayStore } from 'devextreme-angular/common/data'; -import { Service, Employee } from './app.service'; +import { Service } from './app.service'; +import type { Employee } from './app.service'; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -26,7 +27,7 @@ if (!/localhost/.test(document.location.host)) { export class AppComponent { private readonly service = inject(Service); - readonly currentEmployee = signal(new Employee()); + readonly currentEmployee = signal>({}); readonly employees: Employee[] = this.service.getEmployees(); @@ -37,7 +38,7 @@ export class AppComponent { readonly popupVisible = signal(false); - itemTypeExpr(obj, value) { + itemTypeExpr(obj: Employee & { type?: string }, value?: string) { if (value === undefined) { return `employee${obj.ID}`; } diff --git a/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.service.ts index ef5e2be0adb3..b4a315f09958 100644 --- a/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/CustomShapesWithTemplates/Angular/app/app.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { ID: number; - Head_ID: number; + Head_ID?: number; Full_Name: string; diff --git a/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.ts b/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.ts index 3896935cff48..fc2ba5414f63 100644 --- a/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.ts +++ b/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.component.ts @@ -6,7 +6,9 @@ import { DxPopupModule, DxDiagramModule, DxTextBoxModule, DxButtonModule, } from 'devextreme-angular'; import { ArrayStore } from 'devextreme-angular/common/data'; -import { Service, Employee } from './app.service'; +import type { DxDiagramTypes } from 'devextreme-angular/ui/diagram'; +import { Service } from './app.service'; +import type { Employee } from './app.service'; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -26,7 +28,7 @@ if (!/localhost/.test(document.location.host)) { ], }) export class AppComponent { - readonly currentEmployee = signal(new Employee()); + readonly currentEmployee = signal({} as Employee); readonly popupVisible = signal(false); @@ -42,7 +44,7 @@ export class AppComponent { }, }); - itemTypeExpr(obj, value) { + itemTypeExpr(obj: Employee & { type?: string }, value?: string) { if (value === undefined) { return 'employee'; } @@ -50,7 +52,7 @@ export class AppComponent { return null; } - itemCustomDataExpr(obj, value) { + itemCustomDataExpr(obj: Employee, value?: Employee) { if (value === undefined) { return { Full_Name: obj.Full_Name, @@ -74,7 +76,7 @@ export class AppComponent { return null; } - requestLayoutUpdateHandler(e) { + requestLayoutUpdateHandler(e: DxDiagramTypes.RequestLayoutUpdateEvent) { for (let i = 0; i < e.changes.length; i += 1) { if (e.changes[i].type === 'remove') { e.allowed = true; } else if (e.changes[i].data.Head_ID !== undefined && e.changes[i].data.Head_ID !== null) { e.allowed = true; } } @@ -85,7 +87,7 @@ export class AppComponent { this.popupVisible.set(true); } - deleteEmployee(employee) { + deleteEmployee(employee: Employee) { this.dataSource.push([{ type: 'remove', key: employee.ID }]); } @@ -108,7 +110,7 @@ export class AppComponent { } cancelEditEmployee() { - this.currentEmployee.set(new Employee()); + this.currentEmployee.set({} as Employee); this.popupVisible.set(false); } } diff --git a/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.service.ts index ef5e2be0adb3..b4a315f09958 100644 --- a/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/CustomShapesWithTemplatesWithEditing/Angular/app/app.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { ID: number; - Head_ID: number; + Head_ID?: number; Full_Name: string; diff --git a/apps/demos/Demos/Diagram/CustomShapesWithTexts/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/CustomShapesWithTexts/Angular/app/app.service.ts index ef5e2be0adb3..b4a315f09958 100644 --- a/apps/demos/Demos/Diagram/CustomShapesWithTexts/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/CustomShapesWithTexts/Angular/app/app.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { ID: number; - Head_ID: number; + Head_ID?: number; Full_Name: string; diff --git a/apps/demos/Demos/Diagram/ImagesInShapes/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/ImagesInShapes/Angular/app/app.service.ts index 128d728e8a44..193c8eec3ff9 100644 --- a/apps/demos/Demos/Diagram/ImagesInShapes/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/ImagesInShapes/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class OrgItem { +export interface OrgItem { ID: string; Text: string; @@ -10,7 +10,7 @@ export class OrgItem { Picture: string; } -export class OrgLink { +export interface OrgLink { ID: string; From: string; diff --git a/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.component.ts b/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.component.ts index b786b48cdf78..84b90e0a17be 100644 --- a/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.component.ts +++ b/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.component.ts @@ -1,14 +1,11 @@ import { - Component, - Pipe, - type PipeTransform, - enableProdMode, - inject, - signal, + Component, Pipe, enableProdMode, inject, signal, } from '@angular/core'; +import type { PipeTransform } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; import { ArrayStore } from 'devextreme-angular/common/data'; -import { DxDiagramModule, DxDiagramTypes } from 'devextreme-angular/ui/diagram'; +import { DxDiagramModule } from 'devextreme-angular/ui/diagram'; +import type { DxDiagramTypes } from 'devextreme-angular/ui/diagram'; import { Service } from './app.service'; if (!/localhost/.test(document.location.host)) { diff --git a/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.service.ts index ef5e2be0adb3..b4a315f09958 100644 --- a/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/ItemSelection/Angular/app/app.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { ID: number; - Head_ID: number; + Head_ID?: number; Full_Name: string; diff --git a/apps/demos/Demos/Diagram/NodesAndEdgesArrays/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/NodesAndEdgesArrays/Angular/app/app.service.ts index 5751033b5b5b..fdc8b718dc30 100644 --- a/apps/demos/Demos/Diagram/NodesAndEdgesArrays/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/NodesAndEdgesArrays/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class FlowNode { +export interface FlowNode { id: number; text: string; @@ -8,14 +8,14 @@ export class FlowNode { type: string; } -export class FlowEdge { +export interface FlowEdge { id: number; fromId: number; toId: number; - text: string; + text: string | null; } const flowNodes: FlowNode[] = [ diff --git a/apps/demos/Demos/Diagram/NodesArrayHierarchicalStructure/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/NodesArrayHierarchicalStructure/Angular/app/app.service.ts index 1c8019b12680..aabb53b653f4 100644 --- a/apps/demos/Demos/Diagram/NodesArrayHierarchicalStructure/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/NodesArrayHierarchicalStructure/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { Full_Name: string; Prefix: string; diff --git a/apps/demos/Demos/Diagram/NodesArrayPlainStructure/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/NodesArrayPlainStructure/Angular/app/app.service.ts index ef5e2be0adb3..b4a315f09958 100644 --- a/apps/demos/Demos/Diagram/NodesArrayPlainStructure/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/NodesArrayPlainStructure/Angular/app/app.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { ID: number; - Head_ID: number; + Head_ID?: number; Full_Name: string; diff --git a/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.component.ts b/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.component.ts index dc6a291b1f63..c30eee9555f0 100644 --- a/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.component.ts +++ b/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.component.ts @@ -3,7 +3,8 @@ import { Component, enableProdMode, inject } from '@angular/core'; import { provideHttpClient, withFetch } from '@angular/common/http'; import notify from 'devextreme/ui/notify'; import { ArrayStore } from 'devextreme-angular/common/data'; -import { DxDiagramModule, DxDiagramTypes } from 'devextreme-angular/ui/diagram'; +import { DxDiagramModule } from 'devextreme-angular/ui/diagram'; +import type { DxDiagramTypes } from 'devextreme-angular/ui/diagram'; import { Service } from './app.service'; if (!/localhost/.test(document.location.host)) { @@ -43,7 +44,7 @@ export class AppComponent { } } - requestEditOperationHandler(e) { + requestEditOperationHandler(e: Record) { const diagram = e.component.instance(); if (e.operation === 'addShape') { if (e.args.shape.type !== 'employee' && e.args.shape.type !== 'team') { diff --git a/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.service.ts index b7405f08d9f1..6269ffd05b7a 100644 --- a/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/OperationRestrictions/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class OrgItem { +export interface OrgItem { ID: string; Name: string; diff --git a/apps/demos/Demos/Diagram/SimpleView/Angular/app/app.service.ts b/apps/demos/Demos/Diagram/SimpleView/Angular/app/app.service.ts index ef5e2be0adb3..b4a315f09958 100644 --- a/apps/demos/Demos/Diagram/SimpleView/Angular/app/app.service.ts +++ b/apps/demos/Demos/Diagram/SimpleView/Angular/app/app.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -export class Employee { +export interface Employee { ID: number; - Head_ID: number; + Head_ID?: number; Full_Name: string; diff --git a/apps/demos/Demos/Diagram/UICustomization/Angular/app/app.component.ts b/apps/demos/Demos/Diagram/UICustomization/Angular/app/app.component.ts index 5425c9822ef1..1de984cd97cb 100644 --- a/apps/demos/Demos/Diagram/UICustomization/Angular/app/app.component.ts +++ b/apps/demos/Demos/Diagram/UICustomization/Angular/app/app.component.ts @@ -5,6 +5,7 @@ import { import { HttpClient, provideHttpClient, withFetch } from '@angular/common/http'; import { DxDiagramModule, DxDiagramComponent } from 'devextreme-angular'; +import type { DxDiagramTypes } from 'devextreme-angular/ui/diagram'; import { confirm } from 'devextreme/ui/dialog'; if (!/localhost/.test(document.location.host)) { @@ -30,7 +31,7 @@ export class AppComponent { }); } - onCustomCommand(e) { + onCustomCommand(e: DxDiagramTypes.CustomCommandEvent) { if (e.name === 'clear') { const result = confirm('Are you sure you want to clear the diagram? This action cannot be undone.', 'Warning'); result.then( diff --git a/apps/demos/Demos/Gantt/Appearance/Angular/app/app.component.html b/apps/demos/Demos/Gantt/Appearance/Angular/app/app.component.html index e5c9ee74c66d..3e6c0ea02e83 100644 --- a/apps/demos/Demos/Gantt/Appearance/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/Appearance/Angular/app/app.component.html @@ -77,7 +77,7 @@
('months'); + readonly scaleType = signal>('months'); - readonly titlePosition = signal('outside'); + readonly titlePosition = signal>('outside'); readonly showResources = signal(true); diff --git a/apps/demos/Demos/Gantt/Appearance/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/Appearance/Angular/app/app.service.ts index 78161d35d165..c60f776f7704 100644 --- a/apps/demos/Demos/Gantt/Appearance/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/Appearance/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.component.html b/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.component.html index b02fa5281292..ed2df9921b5d 100644 --- a/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.component.html @@ -18,7 +18,7 @@
(this.getContextMenuItems()); onContextMenuPreparing(e: DxGanttTypes.ContextMenuPreparingEvent) { e.cancel = this.disableContextMenu; } onCustomizeContextMenu(e: DxCheckBoxTypes.ValueChangedEvent) { - this.contextMenuItems.set(e.value ? this.getContextMenuItems() : undefined); + this.contextMenuItems.set(e.value ? this.getContextMenuItems() : []); } onPreventContextMenuShowing(e: DxCheckBoxTypes.ValueChangedEvent) { @@ -56,10 +60,10 @@ export class AppComponent { } } - private getContextMenuItems() { + private getContextMenuItems(): ContextMenuItem[] { return [ 'addTask', - 'taskdetails', + 'taskDetails', 'deleteTask', { name: 'ToggleDisplayOfResources', diff --git a/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.service.ts index 78161d35d165..c60f776f7704 100644 --- a/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/ContextMenu/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.component.html b/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.component.html index 0a10d090966b..c3a455ee0792 100644 --- a/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.component.html @@ -1,4 +1,4 @@ - + diff --git a/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.service.ts index 223668e832d6..118270a03f93 100644 --- a/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/DataBinding/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.html b/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.html index d6f096f78ab1..a5d2d151046a 100644 --- a/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.html @@ -1,4 +1,4 @@ - + diff --git a/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.ts b/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.ts index d54786fe6b78..9bf77b71fd13 100644 --- a/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.component.ts @@ -11,6 +11,7 @@ import { } from 'devextreme-angular'; import { exportGantt as exportGanttToPdf } from 'devextreme-angular/common/export/pdf'; import { jsPDF } from 'jspdf'; +import type { jsPDFOptions } from 'jspdf'; import { applyPlugin } from 'jspdf-autotable'; import { DxSelectBoxModule } from 'devextreme-angular/ui/select-box'; import type { DxButtonTypes } from 'devextreme-angular/ui/button'; @@ -105,7 +106,7 @@ export class AppComponent { exportGanttToPdf( { component: gantt, - createDocumentMethod: (args?: unknown) => new jsPDF(args), + createDocumentMethod: (args?: jsPDFOptions) => new jsPDF(args), format, landscape: isLandscape, exportMode, diff --git a/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.service.ts index 223668e832d6..118270a03f93 100644 --- a/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/ExportToPDF/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.component.html b/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.component.html index 97e867ce205a..32c0bc037876 100644 --- a/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.component.html @@ -1,4 +1,4 @@ - + diff --git a/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.service.ts index 223668e832d6..118270a03f93 100644 --- a/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/FilterRow/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.component.html b/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.component.html index 4bbd55eabe88..42c703f1d100 100644 --- a/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.component.html @@ -1,4 +1,4 @@ - + diff --git a/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.service.ts index 223668e832d6..118270a03f93 100644 --- a/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/HeaderFilter/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/Overview/Angular/app/app.component.html b/apps/demos/Demos/Gantt/Overview/Angular/app/app.component.html index e6fb2e72376f..f3f20e65e478 100644 --- a/apps/demos/Demos/Gantt/Overview/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/Overview/Angular/app/app.component.html @@ -1,4 +1,4 @@ - + diff --git a/apps/demos/Demos/Gantt/Overview/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/Overview/Angular/app/app.service.ts index 78161d35d165..c60f776f7704 100644 --- a/apps/demos/Demos/Gantt/Overview/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/Overview/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/Sorting/Angular/app/app.component.html b/apps/demos/Demos/Gantt/Sorting/Angular/app/app.component.html index 8c411ecdec6f..7c9c63bb8ef2 100644 --- a/apps/demos/Demos/Gantt/Sorting/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/Sorting/Angular/app/app.component.html @@ -21,7 +21,7 @@
+
+ diff --git a/apps/demos/Demos/Gantt/Toolbar/Angular/app/app.service.ts b/apps/demos/Demos/Gantt/Toolbar/Angular/app/app.service.ts index 78161d35d165..c60f776f7704 100644 --- a/apps/demos/Demos/Gantt/Toolbar/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gantt/Toolbar/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class Task { +export interface Task { id: number; parentId: number; @@ -14,7 +14,7 @@ export class Task { progress: number; } -export class Dependency { +export interface Dependency { id: number; predecessorId: number; @@ -24,13 +24,13 @@ export class Dependency { type: number; } -export class Resource { +export interface Resource { id: number; text: string; } -export class ResourceAssignment { +export interface ResourceAssignment { id: number; taskId: number; diff --git a/apps/demos/Demos/Gantt/Validation/Angular/app/app.component.html b/apps/demos/Demos/Gantt/Validation/Angular/app/app.component.html index 1fe579c114b1..3f8fc5d79aba 100644 --- a/apps/demos/Demos/Gantt/Validation/Angular/app/app.component.html +++ b/apps/demos/Demos/Gantt/Validation/Angular/app/app.component.html @@ -21,7 +21,7 @@
- + `$${valueText}`; + customizeText = ({ valueText }: { valueText?: string }) => `$${valueText}`; } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.html b/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.html index e24445554bd2..83fc20def811 100644 --- a/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.html +++ b/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.html @@ -55,7 +55,7 @@

Power of Engines

- + diff --git a/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.ts index 9047e7c26108..b8ea59a15ba0 100644 --- a/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/DifferentValueIndicatorTypes/Angular/app/app.component.ts @@ -1,6 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { Component, enableProdMode } from '@angular/core'; -import { DxCircularGaugeModule, DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; +import { DxCircularGaugeModule } from 'devextreme-angular/ui/circular-gauge'; +import type { DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -15,7 +16,7 @@ if (!/localhost/.test(document.location.host)) { ], }) export class AppComponent { - customizeText: DxCircularGaugeTypes.ScaleLabel['customizeText'] = ({ valueText }) => `${valueText} %`; + customizeText: NonNullable = ({ valueText }) => `${valueText} %`; } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/DifferentValueIndicatorTypesLinearGauge/Angular/app/app.component.html b/apps/demos/Demos/Gauges/DifferentValueIndicatorTypesLinearGauge/Angular/app/app.component.html index 140f42f179c0..b89c36b201ac 100644 --- a/apps/demos/Demos/Gauges/DifferentValueIndicatorTypesLinearGauge/Angular/app/app.component.html +++ b/apps/demos/Demos/Gauges/DifferentValueIndicatorTypesLinearGauge/Angular/app/app.component.html @@ -45,7 +45,7 @@

Available Disk Space

- + `${valueText} %`; + customizeText: NonNullable = ({ valueText }) => `${valueText} %`; } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/GaugeTitleCustomized/Angular/app/app.component.html b/apps/demos/Demos/Gauges/GaugeTitleCustomized/Angular/app/app.component.html index 576ecff40fa6..a01a85596d18 100644 --- a/apps/demos/Demos/Gauges/GaugeTitleCustomized/Angular/app/app.component.html +++ b/apps/demos/Demos/Gauges/GaugeTitleCustomized/Angular/app/app.component.html @@ -16,7 +16,7 @@ verticalAlignment="bottom" > - + diff --git a/apps/demos/Demos/Gauges/GaugeTooltip/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/GaugeTooltip/Angular/app/app.component.ts index c975e335b667..5d59870d60cf 100644 --- a/apps/demos/Demos/Gauges/GaugeTooltip/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/GaugeTooltip/Angular/app/app.component.ts @@ -15,7 +15,7 @@ if (!/localhost/.test(document.location.host)) { ], }) export class AppComponent { - customizeTooltip = ({ valueText }) => ({ + customizeTooltip = ({ valueText }: { valueText?: string }) => ({ text: `${valueText} ohm`, }); } diff --git a/apps/demos/Demos/Gauges/LabelsCustomization/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/LabelsCustomization/Angular/app/app.component.ts index 16015b35433d..868bed1cee20 100644 --- a/apps/demos/Demos/Gauges/LabelsCustomization/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/LabelsCustomization/Angular/app/app.component.ts @@ -16,7 +16,7 @@ if (!/localhost/.test(document.location.host)) { }) export class AppComponent { - customizeText(arg) { + customizeText(arg: { valueText?: string }) { return `${arg.valueText} %`; } } diff --git a/apps/demos/Demos/Gauges/LinearGauge/Angular/app/app.service.ts b/apps/demos/Demos/Gauges/LinearGauge/Angular/app/app.service.ts index 20f65660181f..8e7481fac8e4 100644 --- a/apps/demos/Demos/Gauges/LinearGauge/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gauges/LinearGauge/Angular/app/app.service.ts @@ -2,7 +2,7 @@ import { Injectable, } from '@angular/core'; -export class City { +export interface City { name: string; id: string; diff --git a/apps/demos/Demos/Gauges/Palette/Angular/app/app.component.html b/apps/demos/Demos/Gauges/Palette/Angular/app/app.component.html index 3a482f381818..8e02d2612ca3 100644 --- a/apps/demos/Demos/Gauges/Palette/Angular/app/app.component.html +++ b/apps/demos/Demos/Gauges/Palette/Angular/app/app.component.html @@ -4,7 +4,7 @@ [endValue]="5" [baseValue]="0" [values]="[-2.13, 1.48, -3.09, 4.52, 4.9, 3.9]" - palette="ocean" + palette="Ocean" > diff --git a/apps/demos/Demos/Gauges/PaletteForRanges/Angular/app/app.component.html b/apps/demos/Demos/Gauges/PaletteForRanges/Angular/app/app.component.html index 53cc7df33129..6c44437831b7 100644 --- a/apps/demos/Demos/Gauges/PaletteForRanges/Angular/app/app.component.html +++ b/apps/demos/Demos/Gauges/PaletteForRanges/Angular/app/app.component.html @@ -8,7 +8,7 @@ [useRangeColors]="true" > - + Deviation from the Target (Horizontal and Vertical)
- + diff --git a/apps/demos/Demos/Gauges/RangeBarBaseValue/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/RangeBarBaseValue/Angular/app/app.component.ts index 5e15b053595e..7f3bdb41ee71 100644 --- a/apps/demos/Demos/Gauges/RangeBarBaseValue/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/RangeBarBaseValue/Angular/app/app.component.ts @@ -1,7 +1,9 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { Component, enableProdMode } from '@angular/core'; -import { DxCircularGaugeModule, DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; -import { DxLinearGaugeModule, DxLinearGaugeTypes } from 'devextreme-angular/ui/linear-gauge'; +import { DxCircularGaugeModule } from 'devextreme-angular/ui/circular-gauge'; +import type { DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; +import { DxLinearGaugeModule } from 'devextreme-angular/ui/linear-gauge'; +import type { DxLinearGaugeTypes } from 'devextreme-angular/ui/linear-gauge'; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -19,7 +21,7 @@ type ScaleLabel = DxLinearGaugeTypes.ScaleLabel | DxCircularGaugeTypes.ScaleLabe ], }) export class AppComponent { - customizeText: ScaleLabel['customizeText'] = ({ valueText }) => `${valueText}°`; + customizeText: NonNullable = ({ valueText }) => `${valueText}°`; } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/ScaleLabelFormatting/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/ScaleLabelFormatting/Angular/app/app.component.ts index 9047e7c26108..b8ea59a15ba0 100644 --- a/apps/demos/Demos/Gauges/ScaleLabelFormatting/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/ScaleLabelFormatting/Angular/app/app.component.ts @@ -1,6 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { Component, enableProdMode } from '@angular/core'; -import { DxCircularGaugeModule, DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; +import { DxCircularGaugeModule } from 'devextreme-angular/ui/circular-gauge'; +import type { DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -15,7 +16,7 @@ if (!/localhost/.test(document.location.host)) { ], }) export class AppComponent { - customizeText: DxCircularGaugeTypes.ScaleLabel['customizeText'] = ({ valueText }) => `${valueText} %`; + customizeText: NonNullable = ({ valueText }) => `${valueText} %`; } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/SubvalueIndicatorTextFormatting/Angular/app/app.component.html b/apps/demos/Demos/Gauges/SubvalueIndicatorTextFormatting/Angular/app/app.component.html index a5faff08d036..f38f5fbc10e7 100644 --- a/apps/demos/Demos/Gauges/SubvalueIndicatorTextFormatting/Angular/app/app.component.html +++ b/apps/demos/Demos/Gauges/SubvalueIndicatorTextFormatting/Angular/app/app.component.html @@ -1,5 +1,5 @@ - + `${valueText} °C`; + customizeText: NonNullable = ({ valueText }) => `${valueText} °C`; } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.component.ts index 94445544147e..1fcccfa1e224 100644 --- a/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.component.ts @@ -3,7 +3,8 @@ import { Component, enableProdMode, inject, signal, } from '@angular/core'; import { DxSelectBoxModule } from 'devextreme-angular'; -import { DxLinearGaugeModule, type DxLinearGaugeTypes } from 'devextreme-angular/ui/linear-gauge'; +import { DxLinearGaugeModule } from 'devextreme-angular/ui/linear-gauge'; +import type { DxLinearGaugeTypes } from 'devextreme-angular/ui/linear-gauge'; import { Service } from './app.service'; if (!/localhost/.test(document.location.host)) { @@ -25,12 +26,12 @@ export class AppComponent { readonly currentValue = signal(this.powerInfo[0]); - readonly customizeText: DxLinearGaugeTypes.ScaleLabel['customizeText'] = ({ valueText }) => `${valueText} kW`; + readonly customizeText: NonNullable = ({ valueText }) => `${valueText} kW`; - customizeTooltip({ index, valueText }) { + customizeTooltip({ index, valueText }: { index?: number; valueText?: string }) { let result = `${valueText} kW`; - result = (index >= 0) + result = (index !== undefined && index >= 0) ? `Secondary ${index + 1}: ${result}` : `Primary: ${result}`; diff --git a/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.service.ts b/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.service.ts index 12076a2ee976..ea6c7bddaf39 100644 --- a/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gauges/SubvalueIndicatorsRuntimeCustomization/Angular/app/app.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -export class PowerInfo { +export interface PowerInfo { name: string; primary: number; diff --git a/apps/demos/Demos/Gauges/Tooltip/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/Tooltip/Angular/app/app.component.ts index f16223e73985..31ae96794f08 100644 --- a/apps/demos/Demos/Gauges/Tooltip/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/Tooltip/Angular/app/app.component.ts @@ -16,15 +16,15 @@ if (!/localhost/.test(document.location.host)) { }) export class AppComponent { - getText(item, text) { - return `Racer ${item.index + 1} - ${text} km/h`; + getText(item: { index?: number } | undefined, text?: string) { + return `Racer ${item?.index !== undefined ? item.index + 1 : ''} - ${text} km/h`; } - customizeTooltip = (arg) => ({ + customizeTooltip = (arg: { index?: number; valueText?: string }) => ({ text: this.getText(arg, arg.valueText), }); - customizeText = (arg) => this.getText(arg.item, arg.text); + customizeText = (arg: { item?: { index?: number }; text?: string }) => this.getText(arg.item, arg.text); } bootstrapApplication(AppComponent); diff --git a/apps/demos/Demos/Gauges/ValueIndicatorsAPI/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/ValueIndicatorsAPI/Angular/app/app.component.ts index 75876dd97d46..356230dd4e9b 100644 --- a/apps/demos/Demos/Gauges/ValueIndicatorsAPI/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/ValueIndicatorsAPI/Angular/app/app.component.ts @@ -1,7 +1,8 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { Component, enableProdMode, signal } from '@angular/core'; import { DxNumberBoxModule, DxButtonModule } from 'devextreme-angular'; -import { DxCircularGaugeModule, type DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; +import { DxCircularGaugeModule } from 'devextreme-angular/ui/circular-gauge'; +import type { DxCircularGaugeTypes } from 'devextreme-angular/ui/circular-gauge'; if (!/localhost/.test(document.location.host)) { enableProdMode(); @@ -28,7 +29,7 @@ export class AppComponent { readonly gaugeSubvalues = signal([12, 23]); - readonly customizeText: DxCircularGaugeTypes.ScaleLabel['customizeText'] = ({ valueText }) => `${valueText} kV`; + readonly customizeText: NonNullable = ({ valueText }) => `${valueText} kV`; updateValues() { this.gaugeValue.set(this.mainGenerator()); diff --git a/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.component.ts b/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.component.ts index 8b08cdc5c404..c7da1a06a799 100644 --- a/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.component.ts +++ b/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.component.ts @@ -4,7 +4,8 @@ import { } from '@angular/core'; import { DxBarGaugeModule, DxCheckBoxModule } from 'devextreme-angular'; -import { type Product, Service } from './app.service'; +import { Service } from './app.service'; +import type { Product } from './app.service'; if (!/localhost/.test(document.location.host)) { enableProdMode(); diff --git a/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.service.ts b/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.service.ts index c31b52ed368f..7b29a38b6e26 100644 --- a/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.service.ts +++ b/apps/demos/Demos/Gauges/VariableNumberOfBars/Angular/app/app.service.ts @@ -2,7 +2,7 @@ import { Injectable, } from '@angular/core'; -export class Product { +export interface Product { name: string; count: number; diff --git a/apps/demos/tsconfig.ngc-check.json b/apps/demos/tsconfig.ngc-check.json index 47eb11e60382..9d34411f43de 100644 --- a/apps/demos/tsconfig.ngc-check.json +++ b/apps/demos/tsconfig.ngc-check.json @@ -32,6 +32,7 @@ "Demos/Common/**/Angular/**/*.ts", "Demos/DateBox/**/Angular/**/*.ts", "Demos/DateRangeBox/**/Angular/**/*.ts", + "Demos/Diagram/**/Angular/**/*.ts", "Demos/Drawer/**/Angular/**/*.ts", "Demos/DropDownBox/**/Angular/**/*.ts", "Demos/DropDownButton/**/Angular/**/*.ts", @@ -39,6 +40,8 @@ "Demos/FileUploader/**/Angular/**/*.ts", "Demos/FloatingActionButton/**/Angular/**/*.ts", "Demos/Gallery/**/Angular/**/*.ts", + "Demos/Gantt/**/Angular/**/*.ts", + "Demos/Gauges/**/Angular/**/*.ts", "Demos/HtmlEditor/**/Angular/**/*.ts", "Demos/List/**/Angular/**/*.ts", "Demos/LoadIndicator/**/Angular/**/*.ts",