@progress/kendo-angular-gauges 21.4.1-develop.1 → 22.0.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base-components/collection-item.component.d.ts +1 -1
- package/base-components/collection.component.d.ts +1 -1
- package/base-components/gauge-area.component.d.ts +1 -1
- package/base-components/gauge.component.d.ts +1 -1
- package/base-components/labels.component.d.ts +1 -1
- package/base-components/range.component.d.ts +1 -1
- package/base-components/scale.component.d.ts +1 -1
- package/base-components/settings.component.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-gauges.mjs +140 -140
- package/package.json +10 -18
- package/esm2022/arc-gauge/arc-center-template.directive.mjs +0 -39
- package/esm2022/arc-gauge/arc-gauge.component.mjs +0 -205
- package/esm2022/arc-gauge/arc-gauge.directives.mjs +0 -11
- package/esm2022/arc-gauge/arc-gauge.module.mjs +0 -50
- package/esm2022/arc-gauge/color.component.mjs +0 -75
- package/esm2022/arc-gauge/colors.component.mjs +0 -76
- package/esm2022/arc-gauge/gauge-area.component.mjs +0 -50
- package/esm2022/arc-gauge/labels.component.mjs +0 -52
- package/esm2022/arc-gauge/scale.component.mjs +0 -84
- package/esm2022/base-components/collection-item.component.mjs +0 -28
- package/esm2022/base-components/collection.component.mjs +0 -44
- package/esm2022/base-components/gauge-area.component.mjs +0 -59
- package/esm2022/base-components/gauge.component.mjs +0 -253
- package/esm2022/base-components/labels.component.mjs +0 -90
- package/esm2022/base-components/range.component.mjs +0 -41
- package/esm2022/base-components/scale.component.mjs +0 -59
- package/esm2022/base-components/settings.component.mjs +0 -30
- package/esm2022/base-components.mjs +0 -12
- package/esm2022/circular-gauge/center-template.directive.mjs +0 -38
- package/esm2022/circular-gauge/circular-gauge.component.mjs +0 -98
- package/esm2022/circular-gauge/circular-gauge.directives.mjs +0 -9
- package/esm2022/circular-gauge/circular-gauge.module.mjs +0 -48
- package/esm2022/circular-gauge/gauge-area.component.mjs +0 -37
- package/esm2022/circular-gauge/labels.component.mjs +0 -44
- package/esm2022/circular-gauge/scale.component.mjs +0 -44
- package/esm2022/directives.mjs +0 -89
- package/esm2022/gauges.module.mjs +0 -73
- package/esm2022/index.mjs +0 -17
- package/esm2022/linear-gauge/gauge-area.component.mjs +0 -38
- package/esm2022/linear-gauge/labels.component.mjs +0 -39
- package/esm2022/linear-gauge/linear-gauge.component.mjs +0 -91
- package/esm2022/linear-gauge/linear-gauge.directives.mjs +0 -12
- package/esm2022/linear-gauge/linear-gauge.module.mjs +0 -52
- package/esm2022/linear-gauge/pointer.component.mjs +0 -80
- package/esm2022/linear-gauge/pointers.component.mjs +0 -69
- package/esm2022/linear-gauge/range.component.mjs +0 -42
- package/esm2022/linear-gauge/ranges.component.mjs +0 -77
- package/esm2022/linear-gauge/scale.component.mjs +0 -69
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-gauges.mjs +0 -8
- package/esm2022/radial-gauge/gauge-area.component.mjs +0 -45
- package/esm2022/radial-gauge/labels.component.mjs +0 -45
- package/esm2022/radial-gauge/pointer.component.mjs +0 -62
- package/esm2022/radial-gauge/pointers.component.mjs +0 -72
- package/esm2022/radial-gauge/radial-gauge.component.mjs +0 -93
- package/esm2022/radial-gauge/radial-gauge.directives.mjs +0 -12
- package/esm2022/radial-gauge/radial-gauge.module.mjs +0 -52
- package/esm2022/radial-gauge/range.component.mjs +0 -40
- package/esm2022/radial-gauge/ranges.component.mjs +0 -77
- package/esm2022/radial-gauge/scale.component.mjs +0 -71
- package/esm2022/services/collection-changes.service.mjs +0 -17
- package/esm2022/services/configuration.service.mjs +0 -98
- package/esm2022/services/theme.service.mjs +0 -43
- package/esm2022/services.mjs +0 -7
- package/esm2022/types/arc-scale.interface.mjs +0 -5
- package/esm2022/types/border.interface.mjs +0 -5
- package/esm2022/types/cap.interface.mjs +0 -5
- package/esm2022/types/circular-gauge-scale.interface.mjs +0 -5
- package/esm2022/types/color-range.interface.mjs +0 -5
- package/esm2022/types/dash-type.interface.mjs +0 -5
- package/esm2022/types/gauge-area.interface.mjs +0 -5
- package/esm2022/types/labels.interface.mjs +0 -5
- package/esm2022/types/line-cap.mjs +0 -5
- package/esm2022/types/line.interface.mjs +0 -5
- package/esm2022/types/linear-pointer-shape.mjs +0 -5
- package/esm2022/types/linear-pointer.interface.mjs +0 -5
- package/esm2022/types/linear-scale.interface.mjs +0 -5
- package/esm2022/types/margin.interface.mjs +0 -5
- package/esm2022/types/padding.interface.mjs +0 -5
- package/esm2022/types/radial-label-position.mjs +0 -5
- package/esm2022/types/radial-labels.interface.mjs +0 -5
- package/esm2022/types/radial-pointer.interface.mjs +0 -5
- package/esm2022/types/radial-scale.interface.mjs +0 -5
- package/esm2022/types/range.interface.mjs +0 -5
- package/esm2022/types/scale.interface.mjs +0 -5
- package/esm2022/types/ticks.interface.mjs +0 -5
- package/esm2022/types.mjs +0 -5
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Input, Component } from '@angular/core';
|
|
6
|
-
import { ScaleComponent } from '../base-components';
|
|
7
|
-
import { ConfigurationService } from '../services';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../services";
|
|
10
|
-
/**
|
|
11
|
-
* Represents the configuration options for the scale of the ArcGauge
|
|
12
|
-
* ([see example]({% slug scaleoptions_arcgauge %})).
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* import { Component } from '@angular/core';
|
|
17
|
-
*
|
|
18
|
-
* @Component({
|
|
19
|
-
* selector: 'my-app',
|
|
20
|
-
* template: `
|
|
21
|
-
* <kendo-arcgauge [value]="value">
|
|
22
|
-
* <kendo-arcgauge-scale
|
|
23
|
-
* [startAngle]="-90"
|
|
24
|
-
* [endAngle]="90"
|
|
25
|
-
* [rangeDistance]="10">
|
|
26
|
-
* </kendo-arcgauge-scale>
|
|
27
|
-
* </kendo-arcgauge>
|
|
28
|
-
* `
|
|
29
|
-
* })
|
|
30
|
-
* export class AppComponent {
|
|
31
|
-
* public value: number = 30;
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
* Supported children components are: {@link ArcLabelsComponent}
|
|
37
|
-
*/
|
|
38
|
-
export class ArcScaleComponent extends ScaleComponent {
|
|
39
|
-
configurationService;
|
|
40
|
-
/**
|
|
41
|
-
* Sets the scale labels configuration.
|
|
42
|
-
*/
|
|
43
|
-
labels;
|
|
44
|
-
/**
|
|
45
|
-
* Sets the distance between the scale ranges in pixels.
|
|
46
|
-
*/
|
|
47
|
-
rangeDistance;
|
|
48
|
-
/**
|
|
49
|
-
* Sets the line cap style for the scale ranges.
|
|
50
|
-
*/
|
|
51
|
-
rangeLineCap;
|
|
52
|
-
/**
|
|
53
|
-
* Sets the start angle of the Gauge in degrees.
|
|
54
|
-
*/
|
|
55
|
-
startAngle;
|
|
56
|
-
/**
|
|
57
|
-
* Sets the end angle of the Gauge in degrees.
|
|
58
|
-
*/
|
|
59
|
-
endAngle;
|
|
60
|
-
constructor(configurationService) {
|
|
61
|
-
super('scale', configurationService);
|
|
62
|
-
this.configurationService = configurationService;
|
|
63
|
-
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ArcScaleComponent, deps: [{ token: i1.ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ArcScaleComponent, isStandalone: true, selector: "kendo-arcgauge-scale", inputs: { labels: "labels", rangeDistance: "rangeDistance", rangeLineCap: "rangeLineCap", startAngle: "startAngle", endAngle: "endAngle" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
66
|
-
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ArcScaleComponent, decorators: [{
|
|
68
|
-
type: Component,
|
|
69
|
-
args: [{
|
|
70
|
-
selector: 'kendo-arcgauge-scale',
|
|
71
|
-
template: '',
|
|
72
|
-
standalone: true
|
|
73
|
-
}]
|
|
74
|
-
}], ctorParameters: () => [{ type: i1.ConfigurationService }], propDecorators: { labels: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], rangeDistance: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], rangeLineCap: [{
|
|
79
|
-
type: Input
|
|
80
|
-
}], startAngle: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}], endAngle: [{
|
|
83
|
-
type: Input
|
|
84
|
-
}] } });
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive } from '@angular/core';
|
|
6
|
-
import { CollectionChangesService, ConfigurationService } from '../services';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "../services";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class CollectionItemComponent {
|
|
13
|
-
configurationService;
|
|
14
|
-
collectionChangesService;
|
|
15
|
-
constructor(configurationService, collectionChangesService) {
|
|
16
|
-
this.configurationService = configurationService;
|
|
17
|
-
this.collectionChangesService = collectionChangesService;
|
|
18
|
-
}
|
|
19
|
-
ngOnChanges(changes) {
|
|
20
|
-
this.configurationService.copyChanges('', changes);
|
|
21
|
-
this.collectionChangesService.hasChanges = true;
|
|
22
|
-
}
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CollectionItemComponent, deps: [{ token: i1.ConfigurationService }, { token: i1.CollectionChangesService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: CollectionItemComponent, usesOnChanges: true, ngImport: i0 });
|
|
25
|
-
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CollectionItemComponent, decorators: [{
|
|
27
|
-
type: Directive
|
|
28
|
-
}], ctorParameters: () => [{ type: i1.ConfigurationService }, { type: i1.CollectionChangesService }] });
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive } from '@angular/core';
|
|
6
|
-
import { ConfigurationService, CollectionChangesService } from "../services";
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "../services";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class CollectionComponent {
|
|
13
|
-
key;
|
|
14
|
-
configurationService;
|
|
15
|
-
collectionChangesService;
|
|
16
|
-
children;
|
|
17
|
-
subscription;
|
|
18
|
-
constructor(key, configurationService, collectionChangesService) {
|
|
19
|
-
this.key = key;
|
|
20
|
-
this.configurationService = configurationService;
|
|
21
|
-
this.collectionChangesService = collectionChangesService;
|
|
22
|
-
}
|
|
23
|
-
ngOnDestroy() {
|
|
24
|
-
this.subscription.unsubscribe();
|
|
25
|
-
this.configurationService.set(this.key, []);
|
|
26
|
-
}
|
|
27
|
-
ngAfterContentInit() {
|
|
28
|
-
this.subscription = this.children.changes.subscribe(() => this.collectionChangesService.hasChanges = true);
|
|
29
|
-
}
|
|
30
|
-
ngAfterContentChecked() {
|
|
31
|
-
if (this.collectionChangesService.hasChanges) {
|
|
32
|
-
this.configurationService.set(this.key, this.readItems());
|
|
33
|
-
this.collectionChangesService.hasChanges = false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
readItems() {
|
|
37
|
-
return this.children.map(child => Object.assign({}, child.configurationService.read()));
|
|
38
|
-
}
|
|
39
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CollectionComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
40
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: CollectionComponent, ngImport: i0 });
|
|
41
|
-
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CollectionComponent, decorators: [{
|
|
43
|
-
type: Directive
|
|
44
|
-
}], ctorParameters: () => [{ type: undefined }, { type: i1.ConfigurationService }, { type: i1.CollectionChangesService }] });
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
6
|
-
import { SettingsComponent } from './settings.component';
|
|
7
|
-
import { ConfigurationService } from '../services';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../services";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class GaugeAreaComponent extends SettingsComponent {
|
|
14
|
-
key;
|
|
15
|
-
configurationService;
|
|
16
|
-
/**
|
|
17
|
-
* The background of the Gauge area. Accepts valid CSS color strings, including hex and rgb.
|
|
18
|
-
*/
|
|
19
|
-
background;
|
|
20
|
-
/**
|
|
21
|
-
* The border of the Gauge area.
|
|
22
|
-
*/
|
|
23
|
-
border;
|
|
24
|
-
/**
|
|
25
|
-
* The height of the Gauge area.
|
|
26
|
-
*/
|
|
27
|
-
height;
|
|
28
|
-
/**
|
|
29
|
-
* The margin of the Gauge area.
|
|
30
|
-
*/
|
|
31
|
-
margin;
|
|
32
|
-
/**
|
|
33
|
-
* The width of the Gauge area.
|
|
34
|
-
*/
|
|
35
|
-
width;
|
|
36
|
-
// due to NG error: The directive GaugeAreaComponent inherits its constructor from SettingsComponent, but the latter has a constructor parameter
|
|
37
|
-
// that is not compatible with dependency injection. Either add an explicit constructor to ScaleComponent or change SettingsComponent's constructor
|
|
38
|
-
// to use parameters that are valid for DI.(-992016)
|
|
39
|
-
constructor(key, configurationService) {
|
|
40
|
-
super('gaugeArea', configurationService);
|
|
41
|
-
this.key = key;
|
|
42
|
-
this.configurationService = configurationService;
|
|
43
|
-
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GaugeAreaComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GaugeAreaComponent, inputs: { background: "background", border: "border", height: "height", margin: "margin", width: "width" }, usesInheritance: true, ngImport: i0 });
|
|
46
|
-
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GaugeAreaComponent, decorators: [{
|
|
48
|
-
type: Directive
|
|
49
|
-
}], ctorParameters: () => [{ type: undefined }, { type: i1.ConfigurationService }], propDecorators: { background: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}], border: [{
|
|
52
|
-
type: Input
|
|
53
|
-
}], height: [{
|
|
54
|
-
type: Input
|
|
55
|
-
}], margin: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], width: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}] } });
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { HostBinding, NgZone, Input, ViewChild, ElementRef, Renderer2, Directive } from '@angular/core';
|
|
6
|
-
import { ConfigurationService, ThemeService } from '../services';
|
|
7
|
-
import { IntlService } from '@progress/kendo-angular-intl';
|
|
8
|
-
import { exportSVG, exportImage } from '@progress/kendo-drawing';
|
|
9
|
-
import { ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
10
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
|
-
import { packageMetadata } from '../package-metadata';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "../services";
|
|
15
|
-
import * as i2 from "@progress/kendo-angular-intl";
|
|
16
|
-
import * as i3 from "@progress/kendo-angular-l10n";
|
|
17
|
-
const inDocument = (element) => {
|
|
18
|
-
let node = element;
|
|
19
|
-
while (node && node !== document.body) {
|
|
20
|
-
node = node.parentNode;
|
|
21
|
-
}
|
|
22
|
-
return Boolean(node);
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
export class GaugeComponent {
|
|
28
|
-
configurationService;
|
|
29
|
-
themeService;
|
|
30
|
-
intlService;
|
|
31
|
-
localizationService;
|
|
32
|
-
element;
|
|
33
|
-
renderer;
|
|
34
|
-
ngZone;
|
|
35
|
-
/**
|
|
36
|
-
* Specifies options for the Gauge area.
|
|
37
|
-
*/
|
|
38
|
-
gaugeArea;
|
|
39
|
-
/**
|
|
40
|
-
* Specifies the output type.
|
|
41
|
-
*/
|
|
42
|
-
renderAs;
|
|
43
|
-
/**
|
|
44
|
-
* The maximum number of times the Gauge resizes per second.
|
|
45
|
-
* Defaults to `10`. To disable the automatic resizing, set `resizeRateLimit` to `0`.
|
|
46
|
-
*/
|
|
47
|
-
resizeRateLimit = 10;
|
|
48
|
-
/**
|
|
49
|
-
* Specifies the scale options.
|
|
50
|
-
*/
|
|
51
|
-
scale;
|
|
52
|
-
/**
|
|
53
|
-
* Specifies if the changes will be animated.
|
|
54
|
-
*/
|
|
55
|
-
transitions;
|
|
56
|
-
surfaceElement;
|
|
57
|
-
resizeSensor;
|
|
58
|
-
className = true;
|
|
59
|
-
options;
|
|
60
|
-
theme = null;
|
|
61
|
-
instance;
|
|
62
|
-
subscriptions;
|
|
63
|
-
redrawTimeout;
|
|
64
|
-
rtl = false;
|
|
65
|
-
constructor(configurationService, themeService, intlService, localizationService, element, renderer, ngZone) {
|
|
66
|
-
this.configurationService = configurationService;
|
|
67
|
-
this.themeService = themeService;
|
|
68
|
-
this.intlService = intlService;
|
|
69
|
-
this.localizationService = localizationService;
|
|
70
|
-
this.element = element;
|
|
71
|
-
this.renderer = renderer;
|
|
72
|
-
this.ngZone = ngZone;
|
|
73
|
-
validatePackage(packageMetadata);
|
|
74
|
-
}
|
|
75
|
-
ngOnInit() {
|
|
76
|
-
this.setDirection();
|
|
77
|
-
this.subscriptions = this.intlService.changes.subscribe(this.intlChange.bind(this));
|
|
78
|
-
this.subscriptions.add(this.localizationService.changes.subscribe(this.rtlChange.bind(this)));
|
|
79
|
-
}
|
|
80
|
-
ngAfterViewChecked() {
|
|
81
|
-
if (typeof document === 'undefined') {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
let updateMethod;
|
|
85
|
-
if (!this.instance) {
|
|
86
|
-
updateMethod = this.init;
|
|
87
|
-
}
|
|
88
|
-
else if (this.configurationService.hasChanges) {
|
|
89
|
-
updateMethod = this.updateOptions;
|
|
90
|
-
}
|
|
91
|
-
else if (this.configurationService.valueChange) {
|
|
92
|
-
updateMethod = this.setValues;
|
|
93
|
-
}
|
|
94
|
-
if (updateMethod) {
|
|
95
|
-
clearTimeout(this.redrawTimeout);
|
|
96
|
-
if (!this.instance && !inDocument(this.element.nativeElement)) { // required in case the gauge is initialized by ng-content outside of the DOM
|
|
97
|
-
this.defer(() => {
|
|
98
|
-
this.updateCall(updateMethod);
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
this.updateCall(updateMethod);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
updateCall(updateMethod) {
|
|
107
|
-
this.updateDirection();
|
|
108
|
-
updateMethod.call(this);
|
|
109
|
-
this.updateSize();
|
|
110
|
-
}
|
|
111
|
-
updateOptions() {
|
|
112
|
-
this.instance.setOptions(this.configurationService.read());
|
|
113
|
-
}
|
|
114
|
-
setValues() {
|
|
115
|
-
this.instance.allValues(this.configurationService.readValues());
|
|
116
|
-
}
|
|
117
|
-
ngOnChanges(changes) {
|
|
118
|
-
this.configurationService.copyChanges('', changes);
|
|
119
|
-
}
|
|
120
|
-
ngOnDestroy() {
|
|
121
|
-
if (this.instance) {
|
|
122
|
-
this.instance.destroy();
|
|
123
|
-
}
|
|
124
|
-
this.subscriptions?.unsubscribe();
|
|
125
|
-
clearTimeout(this.redrawTimeout);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Exports the Gauge as an image. The export operation is asynchronous and returns a promise.
|
|
129
|
-
*
|
|
130
|
-
* @param {ImageExportOptions} options - The parameters for the exported image.
|
|
131
|
-
* @returns {Promise<string>} - A promise that will be resolved with a PNG image that is encoded as a Data URI.
|
|
132
|
-
*/
|
|
133
|
-
exportImage(options = {}) {
|
|
134
|
-
return this.exportVisual().then((visual) => {
|
|
135
|
-
return exportImage(visual, options);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Exports the Gauge as an SVG document. The export operation is asynchronous and returns a promise.
|
|
140
|
-
*
|
|
141
|
-
* @param {SVGExportOptions} options - The parameters for the exported file.
|
|
142
|
-
* @returns {Promise<string>} - A promise that will be resolved with an SVG document that is encoded as a Data URI.
|
|
143
|
-
*/
|
|
144
|
-
exportSVG(options = {}) {
|
|
145
|
-
return this.exportVisual().then((visual) => {
|
|
146
|
-
return exportSVG(visual, options);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Exports the Gauge as a Drawing `Scene`.
|
|
151
|
-
*
|
|
152
|
-
* @returns {Promise<Group>} - A promise that will be resolved with the export visual.
|
|
153
|
-
*/
|
|
154
|
-
exportVisual() {
|
|
155
|
-
return Promise.resolve(this.instance.exportVisual());
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* @hidden
|
|
159
|
-
*/
|
|
160
|
-
onResize() {
|
|
161
|
-
if (this.autoResize) {
|
|
162
|
-
this.resize();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Detects the size of the container and redraws the Gauge.
|
|
167
|
-
* Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
|
|
168
|
-
*/
|
|
169
|
-
resize() {
|
|
170
|
-
if (this.instance) {
|
|
171
|
-
this.instance.resize();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
init() {
|
|
175
|
-
if (!this.surfaceElement) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
this.createInstance(this.surfaceElement.nativeElement, this.configurationService.read(), this.themeService.read(), {
|
|
179
|
-
intlService: this.intlService,
|
|
180
|
-
rtl: this.rtl
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
get autoResize() {
|
|
184
|
-
return this.resizeRateLimit > 0;
|
|
185
|
-
}
|
|
186
|
-
updateSize() {
|
|
187
|
-
this.resizeSensor.acceptSize();
|
|
188
|
-
}
|
|
189
|
-
intlChange() {
|
|
190
|
-
if (this.instance) {
|
|
191
|
-
this.deferredRedraw();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
rtlChange() {
|
|
195
|
-
if (this.instance && this.rtl !== this.isRTL) {
|
|
196
|
-
this.deferredRedraw();
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
deferredRedraw() {
|
|
200
|
-
this.defer(() => {
|
|
201
|
-
this.updateDirection();
|
|
202
|
-
this.instance.noTransitionsRedraw();
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
defer(callback) {
|
|
206
|
-
this.ngZone.runOutsideAngular(() => {
|
|
207
|
-
clearTimeout(this.redrawTimeout);
|
|
208
|
-
this.redrawTimeout = setTimeout(callback, 0);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
updateDirection() {
|
|
212
|
-
const current = this.isRTL;
|
|
213
|
-
if (this.rtl !== current) {
|
|
214
|
-
this.setDirection();
|
|
215
|
-
if (this.instance) {
|
|
216
|
-
this.instance.setDirection(current);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
setDirection() {
|
|
221
|
-
this.rtl = this.isRTL;
|
|
222
|
-
if (this.element) {
|
|
223
|
-
this.renderer.setAttribute(this.element.nativeElement, 'dir', this.rtl ? 'rtl' : 'ltr');
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
get isRTL() {
|
|
227
|
-
return Boolean(this.localizationService.rtl);
|
|
228
|
-
}
|
|
229
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GaugeComponent, deps: [{ token: i1.ConfigurationService }, { token: i1.ThemeService }, { token: i2.IntlService }, { token: i3.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
230
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GaugeComponent, inputs: { gaugeArea: "gaugeArea", renderAs: "renderAs", resizeRateLimit: "resizeRateLimit", scale: "scale", transitions: "transitions" }, host: { properties: { "class.k-gauge": "this.className" } }, viewQueries: [{ propertyName: "surfaceElement", first: true, predicate: ["surface"], descendants: true, static: true }, { propertyName: "resizeSensor", first: true, predicate: ResizeSensorComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0 });
|
|
231
|
-
}
|
|
232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GaugeComponent, decorators: [{
|
|
233
|
-
type: Directive
|
|
234
|
-
}], ctorParameters: () => [{ type: i1.ConfigurationService }, { type: i1.ThemeService }, { type: i2.IntlService }, { type: i3.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { gaugeArea: [{
|
|
235
|
-
type: Input
|
|
236
|
-
}], renderAs: [{
|
|
237
|
-
type: Input
|
|
238
|
-
}], resizeRateLimit: [{
|
|
239
|
-
type: Input
|
|
240
|
-
}], scale: [{
|
|
241
|
-
type: Input
|
|
242
|
-
}], transitions: [{
|
|
243
|
-
type: Input
|
|
244
|
-
}], surfaceElement: [{
|
|
245
|
-
type: ViewChild,
|
|
246
|
-
args: ['surface', { static: true }]
|
|
247
|
-
}], resizeSensor: [{
|
|
248
|
-
type: ViewChild,
|
|
249
|
-
args: [ResizeSensorComponent, { static: true }]
|
|
250
|
-
}], className: [{
|
|
251
|
-
type: HostBinding,
|
|
252
|
-
args: ['class.k-gauge']
|
|
253
|
-
}] } });
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
6
|
-
import { SettingsComponent } from './settings.component';
|
|
7
|
-
import { ConfigurationService } from '../services';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../services";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class LabelsComponent extends SettingsComponent {
|
|
14
|
-
key;
|
|
15
|
-
configurationService;
|
|
16
|
-
/**
|
|
17
|
-
* The background of the labels.
|
|
18
|
-
* Accepts valid CSS color strings, including hex and rgb.
|
|
19
|
-
*/
|
|
20
|
-
background;
|
|
21
|
-
/**
|
|
22
|
-
* The border of the labels.
|
|
23
|
-
*/
|
|
24
|
-
border;
|
|
25
|
-
/**
|
|
26
|
-
* The color of the labels.
|
|
27
|
-
* Accepts valid CSS color strings, including hex and rgb.
|
|
28
|
-
*/
|
|
29
|
-
color;
|
|
30
|
-
/**
|
|
31
|
-
* The font of the labels.
|
|
32
|
-
*/
|
|
33
|
-
font;
|
|
34
|
-
/**
|
|
35
|
-
* The format that is used to display the labels.
|
|
36
|
-
* Uses the IntlService [`format`]({% slug api_intl_intlservice %}#toc-format) method.
|
|
37
|
-
*/
|
|
38
|
-
format;
|
|
39
|
-
/**
|
|
40
|
-
* The margin of the labels.
|
|
41
|
-
*/
|
|
42
|
-
margin;
|
|
43
|
-
/**
|
|
44
|
-
* The padding of the labels.
|
|
45
|
-
*/
|
|
46
|
-
padding;
|
|
47
|
-
/**
|
|
48
|
-
* The function which returns the label content.
|
|
49
|
-
*
|
|
50
|
-
* The available fields in the function argument are:
|
|
51
|
-
*
|
|
52
|
-
* - `value`—The value of the label.
|
|
53
|
-
*/
|
|
54
|
-
content;
|
|
55
|
-
/**
|
|
56
|
-
* The visibility of the labels.
|
|
57
|
-
*/
|
|
58
|
-
visible;
|
|
59
|
-
// due to NG error: The directive LabelsComponent inherits its constructor from SettingsComponent, but the latter has a constructor parameter
|
|
60
|
-
// that is not compatible with dependency injection. Either add an explicit constructor to ScaleComponent or change SettingsComponent's constructor
|
|
61
|
-
// to use parameters that are valid for DI.(-992016)
|
|
62
|
-
constructor(key, configurationService) {
|
|
63
|
-
super('label', configurationService);
|
|
64
|
-
this.key = key;
|
|
65
|
-
this.configurationService = configurationService;
|
|
66
|
-
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelsComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
68
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LabelsComponent, inputs: { background: "background", border: "border", color: "color", font: "font", format: "format", margin: "margin", padding: "padding", content: "content", visible: "visible" }, usesInheritance: true, ngImport: i0 });
|
|
69
|
-
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelsComponent, decorators: [{
|
|
71
|
-
type: Directive
|
|
72
|
-
}], ctorParameters: () => [{ type: undefined }, { type: i1.ConfigurationService }], propDecorators: { background: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], border: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], color: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], font: [{
|
|
79
|
-
type: Input
|
|
80
|
-
}], format: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}], margin: [{
|
|
83
|
-
type: Input
|
|
84
|
-
}], padding: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}], content: [{
|
|
87
|
-
type: Input
|
|
88
|
-
}], visible: [{
|
|
89
|
-
type: Input
|
|
90
|
-
}] } });
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
6
|
-
import { CollectionItemComponent } from './collection-item.component';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class RangeComponent extends CollectionItemComponent {
|
|
12
|
-
/**
|
|
13
|
-
* The start position of the range.
|
|
14
|
-
*/
|
|
15
|
-
from;
|
|
16
|
-
/**
|
|
17
|
-
* The end position of the range.
|
|
18
|
-
*/
|
|
19
|
-
to;
|
|
20
|
-
/**
|
|
21
|
-
* The range opacity.
|
|
22
|
-
*/
|
|
23
|
-
opacity;
|
|
24
|
-
/**
|
|
25
|
-
* The color of the range. Accepts valid CSS color strings, including hex and rgb.
|
|
26
|
-
*/
|
|
27
|
-
color;
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RangeComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
29
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: RangeComponent, inputs: { from: "from", to: "to", opacity: "opacity", color: "color" }, usesInheritance: true, ngImport: i0 });
|
|
30
|
-
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RangeComponent, decorators: [{
|
|
32
|
-
type: Directive
|
|
33
|
-
}], propDecorators: { from: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], to: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], opacity: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], color: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}] } });
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input } from '@angular/core';
|
|
6
|
-
import { SettingsComponent } from './settings.component';
|
|
7
|
-
import { ConfigurationService } from '../services';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../services";
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export class ScaleComponent extends SettingsComponent {
|
|
14
|
-
key;
|
|
15
|
-
configurationService;
|
|
16
|
-
labels;
|
|
17
|
-
majorTicks;
|
|
18
|
-
minorTicks;
|
|
19
|
-
min;
|
|
20
|
-
max;
|
|
21
|
-
minorUnit;
|
|
22
|
-
majorUnit;
|
|
23
|
-
reverse;
|
|
24
|
-
rangeSize;
|
|
25
|
-
rangePlaceholderColor;
|
|
26
|
-
// due to NG error: The directive ScaleComponent inherits its constructor from SettingsComponent, but the latter has a constructor parameter
|
|
27
|
-
// that is not compatible with dependency injection. Either add an explicit constructor to ScaleComponent or change SettingsComponent's constructor
|
|
28
|
-
// to use parameters that are valid for DI.(-992016)
|
|
29
|
-
constructor(key, configurationService) {
|
|
30
|
-
super('scale', configurationService);
|
|
31
|
-
this.key = key;
|
|
32
|
-
this.configurationService = configurationService;
|
|
33
|
-
}
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScaleComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
35
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ScaleComponent, inputs: { labels: "labels", majorTicks: "majorTicks", minorTicks: "minorTicks", min: "min", max: "max", minorUnit: "minorUnit", majorUnit: "majorUnit", reverse: "reverse", rangeSize: "rangeSize", rangePlaceholderColor: "rangePlaceholderColor" }, usesInheritance: true, ngImport: i0 });
|
|
36
|
-
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScaleComponent, decorators: [{
|
|
38
|
-
type: Directive
|
|
39
|
-
}], ctorParameters: () => [{ type: undefined }, { type: i1.ConfigurationService }], propDecorators: { labels: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], majorTicks: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}], minorTicks: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], min: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}], max: [{
|
|
48
|
-
type: Input
|
|
49
|
-
}], minorUnit: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}], majorUnit: [{
|
|
52
|
-
type: Input
|
|
53
|
-
}], reverse: [{
|
|
54
|
-
type: Input
|
|
55
|
-
}], rangeSize: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], rangePlaceholderColor: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}] } });
|