@progress/kendo-react-gauges 6.1.1 → 7.0.0-develop.2
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/npm/ArcCenter.d.ts → ArcCenter.d.ts} +4 -0
- package/{dist/npm/ArcGauge.d.ts → ArcGauge.d.ts} +4 -0
- package/{dist/es/ArcGaugeProps.d.ts → ArcGaugeProps.d.ts} +4 -1
- package/{dist/npm/BaseGauge.d.ts → BaseGauge.d.ts} +4 -0
- package/{dist/es/BaseGaugeProps.d.ts → BaseGaugeProps.d.ts} +4 -1
- package/CircularGauge.d.ts +10 -0
- package/{dist/es/CircularGaugeProps.d.ts → CircularGaugeProps.d.ts} +4 -0
- package/GaugeContext.d.ts +16 -0
- package/LICENSE.md +1 -1
- package/{dist/es/LinearGauge.d.ts → LinearGauge.d.ts} +4 -0
- package/{dist/npm/LinearGaugeProps.d.ts → LinearGaugeProps.d.ts} +4 -0
- package/{dist/es/RadialGauge.d.ts → RadialGauge.d.ts} +4 -0
- package/{dist/npm/RadialGaugeProps.d.ts → RadialGaugeProps.d.ts} +4 -0
- package/common/gauges.d.ts +9 -0
- package/dist/cdn/js/kendo-react-gauges.js +9 -1
- package/index.d.ts +15 -0
- package/index.js +9 -0
- package/index.mjs +502 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +30 -44
- package/{dist/npm/store → store}/reducer.d.ts +4 -0
- package/{dist/es/store → store}/store.d.ts +4 -0
- package/theming/theme-service.d.ts +10 -0
- package/{dist/npm/types → types}/arc-scale.interface.d.ts +4 -0
- package/{dist/es/types → types}/border.interface.d.ts +4 -0
- package/types/cap.interface.d.ts +17 -0
- package/types/circular-scale.interface.d.ts +14 -0
- package/{dist/npm/types → types}/color-range.interface.d.ts +4 -0
- package/types/dash-type.interface.d.ts +8 -0
- package/{dist/npm/types → types}/gauge-area.interface.d.ts +4 -0
- package/{dist/npm/types → types}/labels.interface.d.ts +4 -0
- package/types/line-cap.d.ts +8 -0
- package/{dist/npm/types → types}/line.interface.d.ts +4 -0
- package/types/linear-pointer-shape.d.ts +8 -0
- package/{dist/es/types → types}/linear-pointer.interface.d.ts +4 -0
- package/{dist/npm/types → types}/linear-scale.interface.d.ts +4 -0
- package/{dist/es/types → types}/margin.interface.d.ts +4 -0
- package/{dist/es/types → types}/padding.interface.d.ts +4 -0
- package/types/radial-label-position.d.ts +8 -0
- package/types/radial-labels.interface.d.ts +12 -0
- package/{dist/es/types → types}/radial-pointer.interface.d.ts +4 -0
- package/{dist/npm/types → types}/radial-scale.interface.d.ts +4 -0
- package/{dist/es/types → types}/range.interface.d.ts +4 -0
- package/{dist/npm/types → types}/scale.interface.d.ts +4 -0
- package/{dist/es/types → types}/ticks.interface.d.ts +4 -0
- package/types.d.ts +25 -0
- package/utils/common.d.ts +5 -0
- package/about.md +0 -3
- package/dist/es/ArcCenter.d.ts +0 -36
- package/dist/es/ArcCenter.js +0 -76
- package/dist/es/ArcGauge.d.ts +0 -33
- package/dist/es/ArcGauge.js +0 -128
- package/dist/es/ArcGaugeProps.js +0 -1
- package/dist/es/BaseGauge.d.ts +0 -89
- package/dist/es/BaseGauge.js +0 -247
- package/dist/es/BaseGaugeProps.js +0 -2
- package/dist/es/CircularGauge.d.ts +0 -6
- package/dist/es/CircularGauge.js +0 -27
- package/dist/es/CircularGaugeProps.js +0 -1
- package/dist/es/GaugeContext.d.ts +0 -12
- package/dist/es/GaugeContext.js +0 -6
- package/dist/es/LinearGauge.js +0 -121
- package/dist/es/LinearGaugeProps.d.ts +0 -15
- package/dist/es/LinearGaugeProps.js +0 -1
- package/dist/es/RadialGauge.js +0 -121
- package/dist/es/RadialGaugeProps.d.ts +0 -15
- package/dist/es/RadialGaugeProps.js +0 -1
- package/dist/es/common/gauges.d.ts +0 -5
- package/dist/es/common/gauges.js +0 -1
- package/dist/es/main.d.ts +0 -11
- package/dist/es/main.js +0 -7
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/store/reducer.d.ts +0 -14
- package/dist/es/store/reducer.js +0 -102
- package/dist/es/store/store.js +0 -28
- package/dist/es/theming/theme-service.d.ts +0 -6
- package/dist/es/theming/theme-service.js +0 -53
- package/dist/es/types/arc-scale.interface.d.ts +0 -28
- package/dist/es/types/arc-scale.interface.js +0 -2
- package/dist/es/types/border.interface.js +0 -1
- package/dist/es/types/cap.interface.d.ts +0 -13
- package/dist/es/types/cap.interface.js +0 -1
- package/dist/es/types/circular-scale.interface.d.ts +0 -10
- package/dist/es/types/circular-scale.interface.js +0 -1
- package/dist/es/types/color-range.interface.d.ts +0 -21
- package/dist/es/types/color-range.interface.js +0 -1
- package/dist/es/types/dash-type.interface.d.ts +0 -4
- package/dist/es/types/dash-type.interface.js +0 -1
- package/dist/es/types/gauge-area.interface.d.ts +0 -27
- package/dist/es/types/gauge-area.interface.js +0 -1
- package/dist/es/types/labels.interface.d.ts +0 -47
- package/dist/es/types/labels.interface.js +0 -2
- package/dist/es/types/line-cap.d.ts +0 -4
- package/dist/es/types/line-cap.js +0 -1
- package/dist/es/types/line.interface.d.ts +0 -22
- package/dist/es/types/line.interface.js +0 -1
- package/dist/es/types/linear-pointer-shape.d.ts +0 -4
- package/dist/es/types/linear-pointer-shape.js +0 -1
- package/dist/es/types/linear-pointer.interface.js +0 -1
- package/dist/es/types/linear-scale.interface.d.ts +0 -26
- package/dist/es/types/linear-scale.interface.js +0 -2
- package/dist/es/types/margin.interface.js +0 -1
- package/dist/es/types/padding.interface.js +0 -1
- package/dist/es/types/radial-label-position.d.ts +0 -4
- package/dist/es/types/radial-label-position.js +0 -1
- package/dist/es/types/radial-labels.interface.d.ts +0 -8
- package/dist/es/types/radial-labels.interface.js +0 -1
- package/dist/es/types/radial-pointer.interface.js +0 -2
- package/dist/es/types/radial-scale.interface.d.ts +0 -28
- package/dist/es/types/radial-scale.interface.js +0 -2
- package/dist/es/types/range.interface.js +0 -1
- package/dist/es/types/scale.interface.d.ts +0 -47
- package/dist/es/types/scale.interface.js +0 -1
- package/dist/es/types/ticks.interface.js +0 -2
- package/dist/es/types.d.ts +0 -21
- package/dist/es/types.js +0 -1
- package/dist/es/utils/common.d.ts +0 -1
- package/dist/es/utils/common.js +0 -36
- package/dist/npm/ArcCenter.js +0 -79
- package/dist/npm/ArcGauge.js +0 -131
- package/dist/npm/ArcGaugeProps.d.ts +0 -40
- package/dist/npm/ArcGaugeProps.js +0 -2
- package/dist/npm/BaseGauge.js +0 -250
- package/dist/npm/BaseGaugeProps.d.ts +0 -52
- package/dist/npm/BaseGaugeProps.js +0 -3
- package/dist/npm/CircularGauge.d.ts +0 -6
- package/dist/npm/CircularGauge.js +0 -30
- package/dist/npm/CircularGaugeProps.d.ts +0 -17
- package/dist/npm/CircularGaugeProps.js +0 -2
- package/dist/npm/GaugeContext.d.ts +0 -12
- package/dist/npm/GaugeContext.js +0 -9
- package/dist/npm/LinearGauge.d.ts +0 -32
- package/dist/npm/LinearGauge.js +0 -124
- package/dist/npm/LinearGaugeProps.js +0 -2
- package/dist/npm/RadialGauge.d.ts +0 -32
- package/dist/npm/RadialGauge.js +0 -124
- package/dist/npm/RadialGaugeProps.js +0 -2
- package/dist/npm/common/gauges.d.ts +0 -5
- package/dist/npm/common/gauges.js +0 -2
- package/dist/npm/main.d.ts +0 -11
- package/dist/npm/main.js +0 -27
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/store/reducer.js +0 -107
- package/dist/npm/store/store.d.ts +0 -26
- package/dist/npm/store/store.js +0 -31
- package/dist/npm/theming/theme-service.d.ts +0 -6
- package/dist/npm/theming/theme-service.js +0 -56
- package/dist/npm/types/arc-scale.interface.js +0 -3
- package/dist/npm/types/border.interface.d.ts +0 -18
- package/dist/npm/types/border.interface.js +0 -2
- package/dist/npm/types/cap.interface.d.ts +0 -13
- package/dist/npm/types/cap.interface.js +0 -2
- package/dist/npm/types/circular-scale.interface.d.ts +0 -10
- package/dist/npm/types/circular-scale.interface.js +0 -2
- package/dist/npm/types/color-range.interface.js +0 -2
- package/dist/npm/types/dash-type.interface.d.ts +0 -4
- package/dist/npm/types/dash-type.interface.js +0 -2
- package/dist/npm/types/gauge-area.interface.js +0 -2
- package/dist/npm/types/labels.interface.js +0 -3
- package/dist/npm/types/line-cap.d.ts +0 -4
- package/dist/npm/types/line-cap.js +0 -2
- package/dist/npm/types/line.interface.js +0 -2
- package/dist/npm/types/linear-pointer-shape.d.ts +0 -4
- package/dist/npm/types/linear-pointer-shape.js +0 -2
- package/dist/npm/types/linear-pointer.interface.d.ts +0 -36
- package/dist/npm/types/linear-pointer.interface.js +0 -2
- package/dist/npm/types/linear-scale.interface.js +0 -3
- package/dist/npm/types/margin.interface.d.ts +0 -21
- package/dist/npm/types/margin.interface.js +0 -2
- package/dist/npm/types/padding.interface.d.ts +0 -21
- package/dist/npm/types/padding.interface.js +0 -2
- package/dist/npm/types/radial-label-position.d.ts +0 -4
- package/dist/npm/types/radial-label-position.js +0 -2
- package/dist/npm/types/radial-labels.interface.d.ts +0 -8
- package/dist/npm/types/radial-labels.interface.js +0 -2
- package/dist/npm/types/radial-pointer.interface.d.ts +0 -22
- package/dist/npm/types/radial-pointer.interface.js +0 -3
- package/dist/npm/types/radial-scale.interface.js +0 -3
- package/dist/npm/types/range.interface.d.ts +0 -21
- package/dist/npm/types/range.interface.js +0 -2
- package/dist/npm/types/scale.interface.js +0 -2
- package/dist/npm/types/ticks.interface.d.ts +0 -21
- package/dist/npm/types/ticks.interface.js +0 -3
- package/dist/npm/types.d.ts +0 -21
- package/dist/npm/types.js +0 -2
- package/dist/npm/utils/common.d.ts +0 -1
- package/dist/npm/utils/common.js +0 -40
- package/dist/systemjs/kendo-react-gauges.js +0 -1
- package/e2e-next/arcgauge.basic.tests.ts +0 -24
- package/e2e-next/circulargauge.basic.tests.ts +0 -24
- package/e2e-next/lineargauge.basic.tests.ts +0 -24
- package/e2e-next/radialgauge.basic.tests.ts +0 -24
package/dist/npm/LinearGauge.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.LinearGauge = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var BaseGauge_1 = require("./BaseGauge");
|
|
43
|
-
var kendo_charts_1 = require("@progress/kendo-charts");
|
|
44
|
-
var kendo_drawing_1 = require("@progress/kendo-drawing");
|
|
45
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
46
|
-
var LinearGauge = /** @class */ (function (_super) {
|
|
47
|
-
__extends(LinearGauge, _super);
|
|
48
|
-
function LinearGauge() {
|
|
49
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
-
_this._baseGauge = null;
|
|
51
|
-
_this.getTarget = function () {
|
|
52
|
-
return _this;
|
|
53
|
-
};
|
|
54
|
-
_this.deriveOptionsFromParent = function (options) {
|
|
55
|
-
var _a = _this.props, pointer = _a.pointer, scale = _a.scale;
|
|
56
|
-
return Object.assign({}, options, {
|
|
57
|
-
pointer: pointer,
|
|
58
|
-
scale: scale
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
return _this;
|
|
62
|
-
}
|
|
63
|
-
Object.defineProperty(LinearGauge.prototype, "gaugeInstance", {
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
get: function () {
|
|
68
|
-
if (this._baseGauge !== null) {
|
|
69
|
-
return this._baseGauge.gaugeInstance;
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
},
|
|
73
|
-
enumerable: false,
|
|
74
|
-
configurable: true
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(LinearGauge.prototype, "surface", {
|
|
77
|
-
/**
|
|
78
|
-
* The Drawing `Surface` of the Gauge.
|
|
79
|
-
*/
|
|
80
|
-
get: function () {
|
|
81
|
-
if (this._baseGauge !== null) {
|
|
82
|
-
return this._baseGauge.surface;
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
},
|
|
86
|
-
enumerable: false,
|
|
87
|
-
configurable: true
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(LinearGauge.prototype, "element", {
|
|
90
|
-
/**
|
|
91
|
-
* The DOM element of the Gauge.
|
|
92
|
-
*/
|
|
93
|
-
get: function () {
|
|
94
|
-
if (this._baseGauge !== null) {
|
|
95
|
-
return this._baseGauge.element;
|
|
96
|
-
}
|
|
97
|
-
return null;
|
|
98
|
-
},
|
|
99
|
-
enumerable: false,
|
|
100
|
-
configurable: true
|
|
101
|
-
});
|
|
102
|
-
/**
|
|
103
|
-
* @hidden
|
|
104
|
-
*/
|
|
105
|
-
LinearGauge.prototype.render = function () {
|
|
106
|
-
var _this = this;
|
|
107
|
-
var _a = this.props, children = _a.children, className = _a.className, baseGaugeProps = __rest(_a, ["children", "className"]);
|
|
108
|
-
return (React.createElement(BaseGauge_1.BaseGauge, __assign({}, baseGaugeProps, { deriveOptionsFromParent: this.deriveOptionsFromParent, ref: function (baseGauge) { return _this._baseGauge = baseGauge; }, gaugeConstructor: kendo_charts_1.LinearGauge, getTarget: this.getTarget, className: (0, kendo_react_common_1.classNames)('k-gauge', className) }), children));
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Exports a Gauge component as a Drawing `Scene`.
|
|
112
|
-
*
|
|
113
|
-
* @param {any} options - The parameters for the export operation.
|
|
114
|
-
* @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
|
|
115
|
-
*/
|
|
116
|
-
LinearGauge.prototype.exportVisual = function (options) {
|
|
117
|
-
if (this.gaugeInstance !== null) {
|
|
118
|
-
return Promise.resolve(this.gaugeInstance.exportVisual(options));
|
|
119
|
-
}
|
|
120
|
-
return Promise.resolve(new kendo_drawing_1.Group());
|
|
121
|
-
};
|
|
122
|
-
return LinearGauge;
|
|
123
|
-
}(React.Component));
|
|
124
|
-
exports.LinearGauge = LinearGauge;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { RadialGaugeProps } from './RadialGaugeProps';
|
|
3
|
-
import { Surface } from '@progress/kendo-drawing';
|
|
4
|
-
import { Group } from '@progress/kendo-drawing';
|
|
5
|
-
export declare class RadialGauge extends React.Component<RadialGaugeProps, {}> {
|
|
6
|
-
private _baseGauge;
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
get gaugeInstance(): any;
|
|
11
|
-
/**
|
|
12
|
-
* The Drawing `Surface` of the Gauge.
|
|
13
|
-
*/
|
|
14
|
-
get surface(): Surface | null;
|
|
15
|
-
/**
|
|
16
|
-
* The DOM element of the Gauge.
|
|
17
|
-
*/
|
|
18
|
-
get element(): HTMLDivElement | null;
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
*/
|
|
22
|
-
render(): any;
|
|
23
|
-
/**
|
|
24
|
-
* Exports a Gauge component as a Drawing `Scene`.
|
|
25
|
-
*
|
|
26
|
-
* @param {any} options - The parameters for the export operation.
|
|
27
|
-
* @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
|
|
28
|
-
*/
|
|
29
|
-
exportVisual(options?: any): Promise<Group>;
|
|
30
|
-
private getTarget;
|
|
31
|
-
private deriveOptionsFromParent;
|
|
32
|
-
}
|
package/dist/npm/RadialGauge.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.RadialGauge = void 0;
|
|
41
|
-
var React = require("react");
|
|
42
|
-
var BaseGauge_1 = require("./BaseGauge");
|
|
43
|
-
var kendo_charts_1 = require("@progress/kendo-charts");
|
|
44
|
-
var kendo_drawing_1 = require("@progress/kendo-drawing");
|
|
45
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
46
|
-
var RadialGauge = /** @class */ (function (_super) {
|
|
47
|
-
__extends(RadialGauge, _super);
|
|
48
|
-
function RadialGauge() {
|
|
49
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
-
_this._baseGauge = null;
|
|
51
|
-
_this.getTarget = function () {
|
|
52
|
-
return _this;
|
|
53
|
-
};
|
|
54
|
-
_this.deriveOptionsFromParent = function (options) {
|
|
55
|
-
var _a = _this.props, pointer = _a.pointer, scale = _a.scale;
|
|
56
|
-
return Object.assign({}, options, {
|
|
57
|
-
pointer: pointer,
|
|
58
|
-
scale: scale
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
return _this;
|
|
62
|
-
}
|
|
63
|
-
Object.defineProperty(RadialGauge.prototype, "gaugeInstance", {
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
get: function () {
|
|
68
|
-
if (this._baseGauge !== null) {
|
|
69
|
-
return this._baseGauge.gaugeInstance;
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
},
|
|
73
|
-
enumerable: false,
|
|
74
|
-
configurable: true
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(RadialGauge.prototype, "surface", {
|
|
77
|
-
/**
|
|
78
|
-
* The Drawing `Surface` of the Gauge.
|
|
79
|
-
*/
|
|
80
|
-
get: function () {
|
|
81
|
-
if (this._baseGauge !== null) {
|
|
82
|
-
return this._baseGauge.surface;
|
|
83
|
-
}
|
|
84
|
-
return null;
|
|
85
|
-
},
|
|
86
|
-
enumerable: false,
|
|
87
|
-
configurable: true
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(RadialGauge.prototype, "element", {
|
|
90
|
-
/**
|
|
91
|
-
* The DOM element of the Gauge.
|
|
92
|
-
*/
|
|
93
|
-
get: function () {
|
|
94
|
-
if (this._baseGauge !== null) {
|
|
95
|
-
return this._baseGauge.element;
|
|
96
|
-
}
|
|
97
|
-
return null;
|
|
98
|
-
},
|
|
99
|
-
enumerable: false,
|
|
100
|
-
configurable: true
|
|
101
|
-
});
|
|
102
|
-
/**
|
|
103
|
-
* @hidden
|
|
104
|
-
*/
|
|
105
|
-
RadialGauge.prototype.render = function () {
|
|
106
|
-
var _this = this;
|
|
107
|
-
var _a = this.props, children = _a.children, className = _a.className, baseGaugeProps = __rest(_a, ["children", "className"]);
|
|
108
|
-
return (React.createElement(BaseGauge_1.BaseGauge, __assign({}, baseGaugeProps, { deriveOptionsFromParent: this.deriveOptionsFromParent, ref: function (baseGauge) { return _this._baseGauge = baseGauge; }, gaugeConstructor: kendo_charts_1.RadialGauge, getTarget: this.getTarget, className: (0, kendo_react_common_1.classNames)('k-gauge', className) }), children));
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Exports a Gauge component as a Drawing `Scene`.
|
|
112
|
-
*
|
|
113
|
-
* @param {any} options - The parameters for the export operation.
|
|
114
|
-
* @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
|
|
115
|
-
*/
|
|
116
|
-
RadialGauge.prototype.exportVisual = function (options) {
|
|
117
|
-
if (this.gaugeInstance !== null) {
|
|
118
|
-
return Promise.resolve(this.gaugeInstance.exportVisual(options));
|
|
119
|
-
}
|
|
120
|
-
return Promise.resolve(new kendo_drawing_1.Group());
|
|
121
|
-
};
|
|
122
|
-
return RadialGauge;
|
|
123
|
-
}(React.Component));
|
|
124
|
-
exports.RadialGauge = RadialGauge;
|
package/dist/npm/main.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ArcGauge } from './ArcGauge';
|
|
2
|
-
import { ArcGaugeProps } from './ArcGaugeProps';
|
|
3
|
-
import { CircularGauge } from './CircularGauge';
|
|
4
|
-
import { CircularGaugeProps } from './CircularGaugeProps';
|
|
5
|
-
import { LinearGauge } from './LinearGauge';
|
|
6
|
-
import { LinearGaugeProps } from './LinearGaugeProps';
|
|
7
|
-
import { RadialGauge } from './RadialGauge';
|
|
8
|
-
import { RadialGaugeProps } from './RadialGaugeProps';
|
|
9
|
-
export * from './common/gauges';
|
|
10
|
-
export * from './types';
|
|
11
|
-
export { ArcGauge, ArcGaugeProps, CircularGauge, CircularGaugeProps, LinearGauge, LinearGaugeProps, RadialGauge, RadialGaugeProps };
|
package/dist/npm/main.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.RadialGauge = exports.LinearGauge = exports.CircularGauge = exports.ArcGauge = void 0;
|
|
18
|
-
var ArcGauge_1 = require("./ArcGauge");
|
|
19
|
-
Object.defineProperty(exports, "ArcGauge", { enumerable: true, get: function () { return ArcGauge_1.ArcGauge; } });
|
|
20
|
-
var CircularGauge_1 = require("./CircularGauge");
|
|
21
|
-
Object.defineProperty(exports, "CircularGauge", { enumerable: true, get: function () { return CircularGauge_1.CircularGauge; } });
|
|
22
|
-
var LinearGauge_1 = require("./LinearGauge");
|
|
23
|
-
Object.defineProperty(exports, "LinearGauge", { enumerable: true, get: function () { return LinearGauge_1.LinearGauge; } });
|
|
24
|
-
var RadialGauge_1 = require("./RadialGauge");
|
|
25
|
-
Object.defineProperty(exports, "RadialGauge", { enumerable: true, get: function () { return RadialGauge_1.RadialGauge; } });
|
|
26
|
-
__exportStar(require("./common/gauges"), exports);
|
|
27
|
-
__exportStar(require("./types"), exports);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.packageMetadata = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
exports.packageMetadata = {
|
|
8
|
-
name: '@progress/kendo-react-gauges',
|
|
9
|
-
productName: 'KendoReact',
|
|
10
|
-
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate: 1700064599,
|
|
12
|
-
version: '',
|
|
13
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.observersReducer = exports.themeReducer = exports.optionsReducer = void 0;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
var optionsReducer = function (currentState, action) {
|
|
17
|
-
if (action.gaugeCollectionIdxKey) {
|
|
18
|
-
return reducers.collectionConfigurationItem(currentState, action);
|
|
19
|
-
}
|
|
20
|
-
else if (action.gaugeKey) {
|
|
21
|
-
return reducers.configurationItem(currentState, action);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.optionsReducer = optionsReducer;
|
|
28
|
-
/**
|
|
29
|
-
* @hidden
|
|
30
|
-
*/
|
|
31
|
-
var themeReducer = function (currentState, action) {
|
|
32
|
-
if (action.type) {
|
|
33
|
-
switch (action.type) {
|
|
34
|
-
case 'set':
|
|
35
|
-
return reducers.themeItem(currentState, action);
|
|
36
|
-
case 'push':
|
|
37
|
-
return Object.assign(currentState, action.payload);
|
|
38
|
-
default:
|
|
39
|
-
return currentState;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.themeReducer = themeReducer;
|
|
47
|
-
/**
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
var observersReducer = function (currentState, action) {
|
|
51
|
-
if (action.type) {
|
|
52
|
-
switch (action.type) {
|
|
53
|
-
case 'add':
|
|
54
|
-
return __spreadArray(__spreadArray([], currentState, true), [action.payload], false);
|
|
55
|
-
case 'remove':
|
|
56
|
-
return currentState.filter(function (element) { return element !== action.payload; });
|
|
57
|
-
default:
|
|
58
|
-
return currentState;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
exports.observersReducer = observersReducer;
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
var reducers = {
|
|
70
|
-
configurationItem: function (currentState, action) {
|
|
71
|
-
var _a;
|
|
72
|
-
return Object.assign(currentState, (_a = {},
|
|
73
|
-
_a[action.gaugeKey] = action.payload,
|
|
74
|
-
_a));
|
|
75
|
-
},
|
|
76
|
-
collectionConfigurationItem: function (currentState, action) {
|
|
77
|
-
var _a;
|
|
78
|
-
var inCollection = false;
|
|
79
|
-
var _b = action.gaugeCollectionIdxKey.split('_'), collectionName = _b[0], collectionIdx = _b[1];
|
|
80
|
-
var collection = currentState[collectionName].map(function (item, index) {
|
|
81
|
-
if (parseInt(collectionIdx, 10) === index) {
|
|
82
|
-
inCollection = true;
|
|
83
|
-
return action.payload;
|
|
84
|
-
}
|
|
85
|
-
return item;
|
|
86
|
-
});
|
|
87
|
-
if (inCollection === false) {
|
|
88
|
-
collection.splice(parseInt(collectionIdx, 10), 0, action.payload);
|
|
89
|
-
}
|
|
90
|
-
return Object.assign(currentState, (_a = {},
|
|
91
|
-
_a[collectionName] = collection,
|
|
92
|
-
_a));
|
|
93
|
-
},
|
|
94
|
-
themeItem: function (currentState, action) {
|
|
95
|
-
var store = {};
|
|
96
|
-
var nextStore = Object.assign(store, currentState);
|
|
97
|
-
var _a = action.payload, field = _a.field, value = _a.value;
|
|
98
|
-
var parts = field.split('.');
|
|
99
|
-
var key = parts.shift();
|
|
100
|
-
while (parts.length > 0) {
|
|
101
|
-
store = store[key] = store[key] || {};
|
|
102
|
-
key = parts.shift();
|
|
103
|
-
}
|
|
104
|
-
store[key] = value;
|
|
105
|
-
return nextStore;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export declare const THROTTLE_MS: number;
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export interface StoreAction {
|
|
9
|
-
gaugeKey?: string;
|
|
10
|
-
gaugeCollectionIdxKey?: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export interface Store {
|
|
18
|
-
getState(): any;
|
|
19
|
-
dispatch(action: StoreAction | object): void;
|
|
20
|
-
subscribe(f: Function): Function;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
declare const createStore: (reducer: any) => Store;
|
|
26
|
-
export default createStore;
|
package/dist/npm/store/store.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.THROTTLE_MS = void 0;
|
|
4
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
exports.THROTTLE_MS = 1000 / 60;
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
var createStore = function (reducer) {
|
|
13
|
-
var state;
|
|
14
|
-
var timerId;
|
|
15
|
-
var listeners = [];
|
|
16
|
-
var getState = function () { return state; };
|
|
17
|
-
var dispatch = function (action) {
|
|
18
|
-
state = reducer(state, action);
|
|
19
|
-
if (kendo_react_common_1.canUseDOM) {
|
|
20
|
-
window.clearTimeout(timerId);
|
|
21
|
-
timerId = window.setTimeout(function () { return listeners.forEach(function (l) { return l(); }); }, exports.THROTTLE_MS);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var subscribe = function (listener) {
|
|
25
|
-
listeners.push(listener);
|
|
26
|
-
return function () { return listeners = listeners.filter(function (l) { return l !== listener; }); };
|
|
27
|
-
};
|
|
28
|
-
dispatch({});
|
|
29
|
-
return { getState: getState, dispatch: dispatch, subscribe: subscribe };
|
|
30
|
-
};
|
|
31
|
-
exports.default = createStore;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadTheme = void 0;
|
|
4
|
-
var kendo_charts_1 = require("@progress/kendo-charts");
|
|
5
|
-
var template = "\n <div class=\"k-var--gauge-pointer\"></div>\n <div class=\"k-var--gauge-track\"></div>\n <div class=\"k-var--normal-text-color\"></div>\n";
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
var ThemeService = /** @class */ (function () {
|
|
10
|
-
function ThemeService(store) {
|
|
11
|
-
this.store = store;
|
|
12
|
-
}
|
|
13
|
-
ThemeService.prototype.setStyle = function (field, value) {
|
|
14
|
-
this.store.dispatch({ type: 'set', payload: { field: field, value: value } });
|
|
15
|
-
};
|
|
16
|
-
ThemeService.prototype.setColors = function () {
|
|
17
|
-
this.mapColor('pointer.color', 'gauge-pointer');
|
|
18
|
-
this.mapColor('scale.rangePlaceholderColor', 'gauge-track');
|
|
19
|
-
this.mapColor('scale.labels.color', 'normal-text-color');
|
|
20
|
-
this.mapColor('scale.minorTicks.color', 'normal-text-color');
|
|
21
|
-
this.mapColor('scale.majorTicks.color', 'normal-text-color');
|
|
22
|
-
this.mapColor('scale.line.color', 'normal-text-color');
|
|
23
|
-
};
|
|
24
|
-
ThemeService.prototype.mapColor = function (key, varName) {
|
|
25
|
-
this.setStyle(key, this.queryStyle(varName).backgroundColor);
|
|
26
|
-
};
|
|
27
|
-
ThemeService.prototype.queryStyle = function (varName) {
|
|
28
|
-
var element = this.element;
|
|
29
|
-
return window.getComputedStyle(element.querySelector(".k-var--".concat(varName)));
|
|
30
|
-
};
|
|
31
|
-
return ThemeService;
|
|
32
|
-
}());
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
var loadTheme = function (store, done, doc) {
|
|
37
|
-
var service = new ThemeService(store);
|
|
38
|
-
if (typeof doc === 'undefined') {
|
|
39
|
-
store.dispatch({ type: 'push', payload: (0, kendo_charts_1.chartBaseTheme)() });
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
var container = service.element = doc.createElement('div');
|
|
43
|
-
container.style.display = 'none';
|
|
44
|
-
container.innerHTML = template;
|
|
45
|
-
doc.body.appendChild(container);
|
|
46
|
-
try {
|
|
47
|
-
store.dispatch({ type: 'push', payload: (0, kendo_charts_1.chartBaseTheme)() });
|
|
48
|
-
service.setColors();
|
|
49
|
-
}
|
|
50
|
-
finally {
|
|
51
|
-
doc.body.removeChild(service.element);
|
|
52
|
-
delete service.element;
|
|
53
|
-
done();
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
exports.loadTheme = loadTheme;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DashType } from './dash-type.interface';
|
|
2
|
-
/**
|
|
3
|
-
* The appearance settings for the border lines.
|
|
4
|
-
*/
|
|
5
|
-
export interface Border {
|
|
6
|
-
/**
|
|
7
|
-
* The color of the border line. Accepts valid CSS color strings, including hex and rgb.
|
|
8
|
-
*/
|
|
9
|
-
color?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The dash type of the border line.
|
|
12
|
-
*/
|
|
13
|
-
dashType?: DashType;
|
|
14
|
-
/**
|
|
15
|
-
* The width of the border line in pixels.
|
|
16
|
-
*/
|
|
17
|
-
width?: number;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The configuration options for the RadialGauge pointer cap.
|
|
3
|
-
*/
|
|
4
|
-
export interface Cap {
|
|
5
|
-
/**
|
|
6
|
-
* The color of the cap. Accepts valid CSS color strings, including hex and rgb.
|
|
7
|
-
*/
|
|
8
|
-
color?: string;
|
|
9
|
-
/**
|
|
10
|
-
* The size of the cap in percent (from 0 to 1).
|
|
11
|
-
*/
|
|
12
|
-
size?: number;
|
|
13
|
-
}
|