@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/es/store/reducer.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
-
if (ar || !(i in from)) {
|
|
4
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
-
ar[i] = from[i];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
var optionsReducer = function (currentState, action) {
|
|
14
|
-
if (action.gaugeCollectionIdxKey) {
|
|
15
|
-
return reducers.collectionConfigurationItem(currentState, action);
|
|
16
|
-
}
|
|
17
|
-
else if (action.gaugeKey) {
|
|
18
|
-
return reducers.configurationItem(currentState, action);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return {};
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* @hidden
|
|
26
|
-
*/
|
|
27
|
-
var themeReducer = function (currentState, action) {
|
|
28
|
-
if (action.type) {
|
|
29
|
-
switch (action.type) {
|
|
30
|
-
case 'set':
|
|
31
|
-
return reducers.themeItem(currentState, action);
|
|
32
|
-
case 'push':
|
|
33
|
-
return Object.assign(currentState, action.payload);
|
|
34
|
-
default:
|
|
35
|
-
return currentState;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return {};
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
var observersReducer = function (currentState, action) {
|
|
46
|
-
if (action.type) {
|
|
47
|
-
switch (action.type) {
|
|
48
|
-
case 'add':
|
|
49
|
-
return __spreadArray(__spreadArray([], currentState, true), [action.payload], false);
|
|
50
|
-
case 'remove':
|
|
51
|
-
return currentState.filter(function (element) { return element !== action.payload; });
|
|
52
|
-
default:
|
|
53
|
-
return currentState;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return [];
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* @hidden
|
|
62
|
-
*/
|
|
63
|
-
var reducers = {
|
|
64
|
-
configurationItem: function (currentState, action) {
|
|
65
|
-
var _a;
|
|
66
|
-
return Object.assign(currentState, (_a = {},
|
|
67
|
-
_a[action.gaugeKey] = action.payload,
|
|
68
|
-
_a));
|
|
69
|
-
},
|
|
70
|
-
collectionConfigurationItem: function (currentState, action) {
|
|
71
|
-
var _a;
|
|
72
|
-
var inCollection = false;
|
|
73
|
-
var _b = action.gaugeCollectionIdxKey.split('_'), collectionName = _b[0], collectionIdx = _b[1];
|
|
74
|
-
var collection = currentState[collectionName].map(function (item, index) {
|
|
75
|
-
if (parseInt(collectionIdx, 10) === index) {
|
|
76
|
-
inCollection = true;
|
|
77
|
-
return action.payload;
|
|
78
|
-
}
|
|
79
|
-
return item;
|
|
80
|
-
});
|
|
81
|
-
if (inCollection === false) {
|
|
82
|
-
collection.splice(parseInt(collectionIdx, 10), 0, action.payload);
|
|
83
|
-
}
|
|
84
|
-
return Object.assign(currentState, (_a = {},
|
|
85
|
-
_a[collectionName] = collection,
|
|
86
|
-
_a));
|
|
87
|
-
},
|
|
88
|
-
themeItem: function (currentState, action) {
|
|
89
|
-
var store = {};
|
|
90
|
-
var nextStore = Object.assign(store, currentState);
|
|
91
|
-
var _a = action.payload, field = _a.field, value = _a.value;
|
|
92
|
-
var parts = field.split('.');
|
|
93
|
-
var key = parts.shift();
|
|
94
|
-
while (parts.length > 0) {
|
|
95
|
-
store = store[key] = store[key] || {};
|
|
96
|
-
key = parts.shift();
|
|
97
|
-
}
|
|
98
|
-
store[key] = value;
|
|
99
|
-
return nextStore;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
export { optionsReducer, themeReducer, observersReducer };
|
package/dist/es/store/store.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { canUseDOM } from '@progress/kendo-react-common';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export var THROTTLE_MS = 1000 / 60;
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
var createStore = function (reducer) {
|
|
10
|
-
var state;
|
|
11
|
-
var timerId;
|
|
12
|
-
var listeners = [];
|
|
13
|
-
var getState = function () { return state; };
|
|
14
|
-
var dispatch = function (action) {
|
|
15
|
-
state = reducer(state, action);
|
|
16
|
-
if (canUseDOM) {
|
|
17
|
-
window.clearTimeout(timerId);
|
|
18
|
-
timerId = window.setTimeout(function () { return listeners.forEach(function (l) { return l(); }); }, THROTTLE_MS);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
var subscribe = function (listener) {
|
|
22
|
-
listeners.push(listener);
|
|
23
|
-
return function () { return listeners = listeners.filter(function (l) { return l !== listener; }); };
|
|
24
|
-
};
|
|
25
|
-
dispatch({});
|
|
26
|
-
return { getState: getState, dispatch: dispatch, subscribe: subscribe };
|
|
27
|
-
};
|
|
28
|
-
export default createStore;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { chartBaseTheme } from '@progress/kendo-charts';
|
|
2
|
-
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";
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
var ThemeService = /** @class */ (function () {
|
|
7
|
-
function ThemeService(store) {
|
|
8
|
-
this.store = store;
|
|
9
|
-
}
|
|
10
|
-
ThemeService.prototype.setStyle = function (field, value) {
|
|
11
|
-
this.store.dispatch({ type: 'set', payload: { field: field, value: value } });
|
|
12
|
-
};
|
|
13
|
-
ThemeService.prototype.setColors = function () {
|
|
14
|
-
this.mapColor('pointer.color', 'gauge-pointer');
|
|
15
|
-
this.mapColor('scale.rangePlaceholderColor', 'gauge-track');
|
|
16
|
-
this.mapColor('scale.labels.color', 'normal-text-color');
|
|
17
|
-
this.mapColor('scale.minorTicks.color', 'normal-text-color');
|
|
18
|
-
this.mapColor('scale.majorTicks.color', 'normal-text-color');
|
|
19
|
-
this.mapColor('scale.line.color', 'normal-text-color');
|
|
20
|
-
};
|
|
21
|
-
ThemeService.prototype.mapColor = function (key, varName) {
|
|
22
|
-
this.setStyle(key, this.queryStyle(varName).backgroundColor);
|
|
23
|
-
};
|
|
24
|
-
ThemeService.prototype.queryStyle = function (varName) {
|
|
25
|
-
var element = this.element;
|
|
26
|
-
return window.getComputedStyle(element.querySelector(".k-var--".concat(varName)));
|
|
27
|
-
};
|
|
28
|
-
return ThemeService;
|
|
29
|
-
}());
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
var loadTheme = function (store, done, doc) {
|
|
34
|
-
var service = new ThemeService(store);
|
|
35
|
-
if (typeof doc === 'undefined') {
|
|
36
|
-
store.dispatch({ type: 'push', payload: chartBaseTheme() });
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
var container = service.element = doc.createElement('div');
|
|
40
|
-
container.style.display = 'none';
|
|
41
|
-
container.innerHTML = template;
|
|
42
|
-
doc.body.appendChild(container);
|
|
43
|
-
try {
|
|
44
|
-
store.dispatch({ type: 'push', payload: chartBaseTheme() });
|
|
45
|
-
service.setColors();
|
|
46
|
-
}
|
|
47
|
-
finally {
|
|
48
|
-
doc.body.removeChild(service.element);
|
|
49
|
-
delete service.element;
|
|
50
|
-
done();
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
export { loadTheme };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { RadialLabels } from './radial-labels.interface';
|
|
2
|
-
import { Scale } from './scale.interface';
|
|
3
|
-
import { LineCap } from './line-cap';
|
|
4
|
-
/**
|
|
5
|
-
* The scale options of the Gauge.
|
|
6
|
-
*/
|
|
7
|
-
export interface ArcScale extends Scale {
|
|
8
|
-
/**
|
|
9
|
-
* Configures the scale labels.
|
|
10
|
-
*/
|
|
11
|
-
labels?: RadialLabels;
|
|
12
|
-
/**
|
|
13
|
-
* The distance between the range indicators and the ticks.
|
|
14
|
-
*/
|
|
15
|
-
rangeDistance?: number;
|
|
16
|
-
/**
|
|
17
|
-
* The `lineCap` style of the ranges.
|
|
18
|
-
*/
|
|
19
|
-
rangeLineCap?: LineCap;
|
|
20
|
-
/**
|
|
21
|
-
* The starting angle of the Gauge. The Gauge is rendered clockwise (0 degrees equal 180 degrees in the polar coordinate system).
|
|
22
|
-
*/
|
|
23
|
-
startAngle?: number;
|
|
24
|
-
/**
|
|
25
|
-
* The ending angle of the Gauge. The Gauge is rendered clockwise (0 degrees equals 180 degrees in the polar coordinate system).
|
|
26
|
-
*/
|
|
27
|
-
endAngle?: number;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The color range configuration.
|
|
3
|
-
*/
|
|
4
|
-
export interface ColorRange {
|
|
5
|
-
/**
|
|
6
|
-
* The color of the range. Accepts valid CSS color strings, including hex and rgb.
|
|
7
|
-
*/
|
|
8
|
-
color?: string;
|
|
9
|
-
/**
|
|
10
|
-
* The opacity of the range.
|
|
11
|
-
*/
|
|
12
|
-
opacity?: number;
|
|
13
|
-
/**
|
|
14
|
-
* The range start value.
|
|
15
|
-
*/
|
|
16
|
-
from?: number;
|
|
17
|
-
/**
|
|
18
|
-
* The range end value.
|
|
19
|
-
*/
|
|
20
|
-
to?: number;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Border } from './border.interface';
|
|
2
|
-
import { Margin } from './margin.interface';
|
|
3
|
-
/**
|
|
4
|
-
* The configuration options for the Gauge area. Represents the entire visible area of the Gauge.
|
|
5
|
-
*/
|
|
6
|
-
export interface GaugeArea {
|
|
7
|
-
/**
|
|
8
|
-
* The background of the Gauge area. Accepts valid CSS color strings, including hex and rgb.
|
|
9
|
-
*/
|
|
10
|
-
background?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The border of the Gauge area.
|
|
13
|
-
*/
|
|
14
|
-
border?: Border;
|
|
15
|
-
/**
|
|
16
|
-
* The height of the Gauge area.
|
|
17
|
-
*/
|
|
18
|
-
height?: number;
|
|
19
|
-
/**
|
|
20
|
-
* The margin of the Gauge area.
|
|
21
|
-
*/
|
|
22
|
-
margin?: number | Margin;
|
|
23
|
-
/**
|
|
24
|
-
* The height of the Gauge area.
|
|
25
|
-
*/
|
|
26
|
-
width?: number;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Border } from './border.interface';
|
|
2
|
-
import { Margin } from './margin.interface';
|
|
3
|
-
import { Padding } from './padding.interface';
|
|
4
|
-
/**
|
|
5
|
-
* The configuration of the scale labels.
|
|
6
|
-
*/
|
|
7
|
-
export interface Labels {
|
|
8
|
-
/**
|
|
9
|
-
* The background of the labels. Accepts valid CSS color strings, including hex and rgb.
|
|
10
|
-
*/
|
|
11
|
-
background?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The border of the labels.
|
|
14
|
-
*/
|
|
15
|
-
border?: Border;
|
|
16
|
-
/**
|
|
17
|
-
* The color of the labels. Accepts valid CSS color strings, including hex and rgb.
|
|
18
|
-
*/
|
|
19
|
-
color?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The font of the labels.
|
|
22
|
-
*/
|
|
23
|
-
font?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The format that is used to display the labels. Uses the IntlService [`format`]({% slug api_intl_intlservice %}#toc-format) method.
|
|
26
|
-
*/
|
|
27
|
-
format?: string;
|
|
28
|
-
/**
|
|
29
|
-
* The margin of the labels.
|
|
30
|
-
*/
|
|
31
|
-
margin?: number | Margin;
|
|
32
|
-
/**
|
|
33
|
-
* The padding of the labels.
|
|
34
|
-
*/
|
|
35
|
-
padding?: number | Padding;
|
|
36
|
-
/**
|
|
37
|
-
* The function which returns the label content.
|
|
38
|
-
*
|
|
39
|
-
* The available fields in the function argument are:
|
|
40
|
-
* - `value`—The value of the label.
|
|
41
|
-
*/
|
|
42
|
-
content?: (e: any) => string;
|
|
43
|
-
/**
|
|
44
|
-
* The visibility of the labels.
|
|
45
|
-
*/
|
|
46
|
-
visible?: boolean;
|
|
47
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { DashType } from './dash-type.interface';
|
|
2
|
-
/**
|
|
3
|
-
* The scale line options.
|
|
4
|
-
*/
|
|
5
|
-
export interface Line {
|
|
6
|
-
/**
|
|
7
|
-
* The color of the lines. Accepts valid CSS color strings, including hex and rgb.
|
|
8
|
-
*/
|
|
9
|
-
color?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The dash type of the line.
|
|
12
|
-
*/
|
|
13
|
-
dashType?: DashType;
|
|
14
|
-
/**
|
|
15
|
-
* The visibility of the lines.
|
|
16
|
-
*/
|
|
17
|
-
visible?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* The width of the line.
|
|
20
|
-
*/
|
|
21
|
-
width?: number;
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Scale } from './scale.interface';
|
|
2
|
-
import { Line } from './line.interface';
|
|
3
|
-
import { Range } from './range.interface';
|
|
4
|
-
/**
|
|
5
|
-
* The scale options of the Gauge.
|
|
6
|
-
*/
|
|
7
|
-
export interface LinearScale extends Scale {
|
|
8
|
-
/**
|
|
9
|
-
* Configures the scale line.
|
|
10
|
-
*/
|
|
11
|
-
line?: Line;
|
|
12
|
-
/**
|
|
13
|
-
* The ranges of the scale.
|
|
14
|
-
*/
|
|
15
|
-
ranges?: Range[];
|
|
16
|
-
/**
|
|
17
|
-
* Mirrors the scale labels and ticks. If the labels are normally on the left side of the scale, the mirroring of the scale will render them to the right.
|
|
18
|
-
*/
|
|
19
|
-
mirror?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Specifies if the scale will be vertical ([see example]({% slug orientation_lineargauge %})).
|
|
22
|
-
*
|
|
23
|
-
* @default true
|
|
24
|
-
*/
|
|
25
|
-
vertical?: boolean;
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { RadialLabels } from './radial-labels.interface';
|
|
2
|
-
import { Scale } from './scale.interface';
|
|
3
|
-
import { Range } from './range.interface';
|
|
4
|
-
/**
|
|
5
|
-
* The scale options of the Gauge.
|
|
6
|
-
*/
|
|
7
|
-
export interface RadialScale extends Scale {
|
|
8
|
-
/**
|
|
9
|
-
* Configures the scale labels.
|
|
10
|
-
*/
|
|
11
|
-
labels?: RadialLabels;
|
|
12
|
-
/**
|
|
13
|
-
* The distance between the range indicators and the ticks.
|
|
14
|
-
*/
|
|
15
|
-
rangeDistance?: number;
|
|
16
|
-
/**
|
|
17
|
-
* The ranges of the scale.
|
|
18
|
-
*/
|
|
19
|
-
ranges?: Range[];
|
|
20
|
-
/**
|
|
21
|
-
* The starting angle of the Gauge. The Gauge is rendered clockwise (0 degrees equal 180 degrees in the polar coordinate system).
|
|
22
|
-
*/
|
|
23
|
-
startAngle?: number;
|
|
24
|
-
/**
|
|
25
|
-
* The ending angle of the Gauge. The Gauge is rendered clockwise (0 degrees equal to 180 degrees in the polar coordinate system).
|
|
26
|
-
*/
|
|
27
|
-
endAngle?: number;
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Labels } from './labels.interface';
|
|
2
|
-
import { Ticks } from './ticks.interface';
|
|
3
|
-
/**
|
|
4
|
-
* The scale options of the Gauge.
|
|
5
|
-
*/
|
|
6
|
-
export interface Scale {
|
|
7
|
-
/**
|
|
8
|
-
* Configures the scale labels.
|
|
9
|
-
*/
|
|
10
|
-
labels?: Labels;
|
|
11
|
-
/**
|
|
12
|
-
* Configures the major scale ticks.
|
|
13
|
-
*/
|
|
14
|
-
majorTicks?: Ticks;
|
|
15
|
-
/**
|
|
16
|
-
* Configures the minor scale ticks.
|
|
17
|
-
*/
|
|
18
|
-
minorTicks?: Ticks;
|
|
19
|
-
/**
|
|
20
|
-
* The minimum value of the scale.
|
|
21
|
-
*/
|
|
22
|
-
min?: number;
|
|
23
|
-
/**
|
|
24
|
-
* The maximum value of the scale.
|
|
25
|
-
*/
|
|
26
|
-
max?: number;
|
|
27
|
-
/**
|
|
28
|
-
* The interval between minor divisions.
|
|
29
|
-
*/
|
|
30
|
-
minorUnit?: number;
|
|
31
|
-
/**
|
|
32
|
-
* The interval between major divisions.
|
|
33
|
-
*/
|
|
34
|
-
majorUnit?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Reverses the scale direction.
|
|
37
|
-
*/
|
|
38
|
-
reverse?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The width of the range indicators.
|
|
41
|
-
*/
|
|
42
|
-
rangeSize?: number;
|
|
43
|
-
/**
|
|
44
|
-
* The default color of the ranges.
|
|
45
|
-
*/
|
|
46
|
-
rangePlaceholderColor?: string;
|
|
47
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/es/types.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { ArcScale } from './types/arc-scale.interface';
|
|
2
|
-
export { ColorRange } from './types/color-range.interface';
|
|
3
|
-
export { Scale } from './types/scale.interface';
|
|
4
|
-
export { LineCap } from './types/line-cap';
|
|
5
|
-
export { RadialLabelPosition } from './types/radial-label-position';
|
|
6
|
-
export { RadialLabels } from './types/radial-labels.interface';
|
|
7
|
-
export { Labels } from './types/labels.interface';
|
|
8
|
-
export { Margin } from './types/margin.interface';
|
|
9
|
-
export { Padding } from './types/padding.interface';
|
|
10
|
-
export { Border } from './types/border.interface';
|
|
11
|
-
export { Ticks } from './types/ticks.interface';
|
|
12
|
-
export { DashType } from './types/dash-type.interface';
|
|
13
|
-
export { Cap } from './types/cap.interface';
|
|
14
|
-
export { GaugeArea } from './types/gauge-area.interface';
|
|
15
|
-
export { Line } from './types/line.interface';
|
|
16
|
-
export { LinearPointer } from './types/linear-pointer.interface';
|
|
17
|
-
export { LinearPointerShape } from './types/linear-pointer-shape';
|
|
18
|
-
export { LinearScale } from './types/linear-scale.interface';
|
|
19
|
-
export { RadialPointer } from './types/radial-pointer.interface';
|
|
20
|
-
export { RadialScale } from './types/radial-scale.interface';
|
|
21
|
-
export { Range } from './types/range.interface';
|
package/dist/es/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isOptionsChanged: (original: any, current: any) => boolean;
|
package/dist/es/utils/common.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var isObject = function (value) {
|
|
2
|
-
return typeof value === 'object';
|
|
3
|
-
};
|
|
4
|
-
var diffOptions = function (original, current) {
|
|
5
|
-
if (Object.keys(original).length !== Object.keys(current).length) {
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
for (var field in original) {
|
|
9
|
-
if (field !== 'value' && original.hasOwnProperty(field)) {
|
|
10
|
-
var originalValue = original[field];
|
|
11
|
-
var currentValue = current[field];
|
|
12
|
-
var diff = isObject(originalValue) && isObject(currentValue) ?
|
|
13
|
-
diffOptions(originalValue, currentValue) : originalValue !== currentValue;
|
|
14
|
-
if (diff) {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return false;
|
|
20
|
-
};
|
|
21
|
-
export var isOptionsChanged = function (original, current) {
|
|
22
|
-
if (!original || !current) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
original = [].concat(original);
|
|
26
|
-
current = [].concat(current);
|
|
27
|
-
if (original.length !== current.length) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
for (var idx = 0; idx < original.length; idx++) {
|
|
31
|
-
if (diffOptions(original[idx], current[idx])) {
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return false;
|
|
36
|
-
};
|