@progress/kendo-vue-gauges 3.5.0 → 3.5.1-dev.202208150613

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.
Files changed (125) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/js/kendo-vue-gauges.js +1 -1
  3. package/dist/es/ArcGaugeProps.js +1 -0
  4. package/dist/es/BaseGaugeProps.js +1 -1
  5. package/dist/es/CircularGaugeProps.js +1 -0
  6. package/dist/es/LinearGaugeProps.js +1 -0
  7. package/dist/es/RadialGaugeProps.js +1 -0
  8. package/dist/es/package-metadata.js +1 -1
  9. package/dist/es/store/reducer.js +9 -7
  10. package/dist/es/theming/theme-service.js +1 -1
  11. package/dist/es/types/arc-scale.interface.js +1 -0
  12. package/dist/es/types/border.interface.js +1 -0
  13. package/dist/es/types/cap.interface.js +1 -0
  14. package/dist/es/types/circular-scale.interface.js +1 -0
  15. package/dist/es/types/color-range.interface.js +1 -0
  16. package/dist/es/types/dash-type.interface.js +1 -0
  17. package/dist/es/types/gauge-area.interface.js +1 -0
  18. package/dist/es/types/labels.interface.js +1 -0
  19. package/dist/es/types/line-cap.js +1 -0
  20. package/dist/es/types/line.interface.js +1 -0
  21. package/dist/es/types/linear-pointer-shape.js +1 -0
  22. package/dist/es/types/linear-pointer.interface.js +1 -0
  23. package/dist/es/types/linear-scale.interface.js +1 -0
  24. package/dist/es/types/margin.interface.js +1 -0
  25. package/dist/es/types/padding.interface.js +1 -0
  26. package/dist/es/types/radial-label-position.js +1 -0
  27. package/dist/es/types/radial-labels.interface.js +1 -0
  28. package/dist/es/types/radial-pointer.interface.js +1 -0
  29. package/dist/es/types/radial-scale.interface.js +1 -0
  30. package/dist/es/types/range.interface.js +1 -0
  31. package/dist/es/types/scale.interface.js +1 -0
  32. package/dist/es/types/ticks.interface.js +1 -0
  33. package/dist/es/types.js +1 -0
  34. package/dist/esm/ArcCenter.d.ts +53 -0
  35. package/dist/esm/ArcCenter.js +86 -0
  36. package/dist/esm/ArcGauge.d.ts +48 -0
  37. package/dist/esm/ArcGauge.js +217 -0
  38. package/dist/esm/ArcGaugeProps.d.ts +33 -0
  39. package/dist/esm/ArcGaugeProps.js +1 -0
  40. package/dist/esm/BaseGauge.d.ts +47 -0
  41. package/dist/esm/BaseGauge.js +231 -0
  42. package/dist/esm/BaseGaugeProps.d.ts +44 -0
  43. package/dist/esm/BaseGaugeProps.js +1 -0
  44. package/dist/esm/CircularGauge.d.ts +43 -0
  45. package/dist/esm/CircularGauge.js +41 -0
  46. package/dist/esm/CircularGaugeProps.d.ts +17 -0
  47. package/dist/esm/CircularGaugeProps.js +1 -0
  48. package/dist/esm/LinearGauge.d.ts +43 -0
  49. package/dist/esm/LinearGauge.js +131 -0
  50. package/dist/esm/LinearGaugeProps.d.ts +15 -0
  51. package/dist/esm/LinearGaugeProps.js +1 -0
  52. package/dist/esm/RadialGauge.d.ts +43 -0
  53. package/dist/esm/RadialGauge.js +135 -0
  54. package/dist/esm/RadialGaugeProps.d.ts +15 -0
  55. package/dist/esm/RadialGaugeProps.js +1 -0
  56. package/dist/esm/additionalTypes.ts +21 -0
  57. package/dist/esm/main.d.ts +10 -0
  58. package/dist/esm/main.js +6 -0
  59. package/dist/esm/package-metadata.d.ts +5 -0
  60. package/dist/esm/package-metadata.js +11 -0
  61. package/dist/esm/package.json +3 -0
  62. package/dist/esm/store/reducer.d.ts +14 -0
  63. package/dist/esm/store/reducer.js +102 -0
  64. package/dist/esm/store/store.d.ts +26 -0
  65. package/dist/esm/store/store.js +28 -0
  66. package/dist/esm/theming/theme-service.d.ts +6 -0
  67. package/dist/esm/theming/theme-service.js +53 -0
  68. package/dist/esm/types/arc-scale.interface.d.ts +28 -0
  69. package/dist/esm/types/arc-scale.interface.js +2 -0
  70. package/dist/esm/types/border.interface.d.ts +18 -0
  71. package/dist/esm/types/border.interface.js +1 -0
  72. package/dist/esm/types/cap.interface.d.ts +13 -0
  73. package/dist/esm/types/cap.interface.js +1 -0
  74. package/dist/esm/types/circular-scale.interface.d.ts +10 -0
  75. package/dist/esm/types/circular-scale.interface.js +1 -0
  76. package/dist/esm/types/color-range.interface.d.ts +21 -0
  77. package/dist/esm/types/color-range.interface.js +1 -0
  78. package/dist/esm/types/dash-type.interface.d.ts +4 -0
  79. package/dist/esm/types/dash-type.interface.js +1 -0
  80. package/dist/esm/types/gauge-area.interface.d.ts +27 -0
  81. package/dist/esm/types/gauge-area.interface.js +1 -0
  82. package/dist/esm/types/labels.interface.d.ts +47 -0
  83. package/dist/esm/types/labels.interface.js +2 -0
  84. package/dist/esm/types/line-cap.d.ts +4 -0
  85. package/dist/esm/types/line-cap.js +1 -0
  86. package/dist/esm/types/line.interface.d.ts +22 -0
  87. package/dist/esm/types/line.interface.js +1 -0
  88. package/dist/esm/types/linear-pointer-shape.d.ts +4 -0
  89. package/dist/esm/types/linear-pointer-shape.js +1 -0
  90. package/dist/esm/types/linear-pointer.interface.d.ts +36 -0
  91. package/dist/esm/types/linear-pointer.interface.js +1 -0
  92. package/dist/esm/types/linear-scale.interface.d.ts +26 -0
  93. package/dist/esm/types/linear-scale.interface.js +2 -0
  94. package/dist/esm/types/margin.interface.d.ts +21 -0
  95. package/dist/esm/types/margin.interface.js +1 -0
  96. package/dist/esm/types/padding.interface.d.ts +21 -0
  97. package/dist/esm/types/padding.interface.js +1 -0
  98. package/dist/esm/types/radial-label-position.d.ts +4 -0
  99. package/dist/esm/types/radial-label-position.js +1 -0
  100. package/dist/esm/types/radial-labels.interface.d.ts +8 -0
  101. package/dist/esm/types/radial-labels.interface.js +1 -0
  102. package/dist/esm/types/radial-pointer.interface.d.ts +22 -0
  103. package/dist/esm/types/radial-pointer.interface.js +2 -0
  104. package/dist/esm/types/radial-scale.interface.d.ts +28 -0
  105. package/dist/esm/types/radial-scale.interface.js +2 -0
  106. package/dist/esm/types/range.interface.d.ts +21 -0
  107. package/dist/esm/types/range.interface.js +1 -0
  108. package/dist/esm/types/scale.interface.d.ts +47 -0
  109. package/dist/esm/types/scale.interface.js +1 -0
  110. package/dist/esm/types/ticks.interface.d.ts +21 -0
  111. package/dist/esm/types/ticks.interface.js +2 -0
  112. package/dist/esm/types.d.ts +21 -0
  113. package/dist/esm/types.js +1 -0
  114. package/dist/esm/utils/common.d.ts +4 -0
  115. package/dist/esm/utils/common.js +39 -0
  116. package/dist/npm/ArcGauge.js +3 -3
  117. package/dist/npm/BaseGauge.js +5 -5
  118. package/dist/npm/LinearGauge.js +1 -1
  119. package/dist/npm/RadialGauge.js +1 -1
  120. package/dist/npm/main.js +6 -2
  121. package/dist/npm/package-metadata.js +1 -1
  122. package/dist/npm/store/reducer.js +9 -7
  123. package/dist/npm/theming/theme-service.js +3 -3
  124. package/dist/npm/utils/common.js +2 -1
  125. package/package.json +12 -6
@@ -0,0 +1,135 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ var isV3 = allVue.version && allVue.version[0] === '3';
6
+ import { BaseGauge } from './BaseGauge.js';
7
+ import { RadialGauge as KendoRadialGauge } from '@progress/kendo-charts';
8
+ import { Group } from '@progress/kendo-drawing';
9
+ import { getDefaultSlots } from '@progress/kendo-vue-common';
10
+ /**
11
+ * @hidden
12
+ */
13
+
14
+ var RadialGaugeVue2 = {
15
+ name: 'KendoRadialGauge',
16
+ props: {
17
+ dir: String,
18
+ renderAs: {
19
+ type: String,
20
+ default: 'svg',
21
+ validator: function validator(value) {
22
+ return ['svg', 'canvas'].includes(value);
23
+ }
24
+ },
25
+ gaugeConstructor: [Object, Function],
26
+ pointer: {
27
+ type: [Object, Array],
28
+ default: undefined
29
+ },
30
+ scale: {
31
+ type: Object,
32
+ default: undefined
33
+ },
34
+ transitions: {
35
+ type: Boolean,
36
+ default: undefined
37
+ }
38
+ },
39
+ mounted: function mounted() {
40
+ this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
41
+ },
42
+ updated: function updated() {
43
+ this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
44
+ },
45
+ // @ts-ignore
46
+ setup: !isV3 ? undefined : function () {
47
+ var v3 = !!isV3;
48
+ return {
49
+ v3: v3
50
+ };
51
+ },
52
+ // @ts-ignore
53
+ render: function render(createElement) {
54
+ var _this = this;
55
+
56
+ var h = gh || createElement;
57
+ var defaultSlots = getDefaultSlots(this);
58
+ var _a = this.$props,
59
+ pointer = _a.pointer,
60
+ scale = _a.scale,
61
+ transitions = _a.transitions;
62
+ return (// @ts-ignore function children
63
+ h(BaseGauge, {
64
+ transitions: transitions,
65
+ attrs: this.v3 ? undefined : {
66
+ transitions: transitions,
67
+ scale: scale,
68
+ pointer: pointer,
69
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
70
+ gaugeConstructor: KendoRadialGauge,
71
+ getTarget: this.getTarget
72
+ },
73
+ scale: scale,
74
+ pointer: pointer,
75
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
76
+ ref: this.v3 ? function (el) {
77
+ _this.baseGaugeRef = el;
78
+ } : 'baseGauge',
79
+ gaugeConstructor: KendoRadialGauge,
80
+ getTarget: this.getTarget,
81
+ "class": 'k-gauge'
82
+ }, this.v3 ? function () {
83
+ return [defaultSlots];
84
+ } : [defaultSlots])
85
+ );
86
+ },
87
+ methods: {
88
+ gaugeInstance: function gaugeInstance() {
89
+ if (this._baseGauge !== null) {
90
+ return this._baseGauge.gaugeInstance;
91
+ }
92
+
93
+ return null;
94
+ },
95
+ surface: function surface() {
96
+ if (this._baseGauge !== null) {
97
+ return this._baseGauge.surface;
98
+ }
99
+
100
+ return null;
101
+ },
102
+ element: function element() {
103
+ if (this._baseGauge !== null) {
104
+ return this._baseGauge.element;
105
+ }
106
+
107
+ return null;
108
+ },
109
+ exportVisual: function exportVisual(options) {
110
+ if (this.gaugeInstance() !== null) {
111
+ return Promise.resolve(this.gaugeInstance().exportVisual(options));
112
+ }
113
+
114
+ return Promise.resolve(new Group());
115
+ },
116
+ getTarget: function getTarget() {
117
+ return this;
118
+ },
119
+ deriveOptionsFromParent: function deriveOptionsFromParent(options) {
120
+ var _a = this.$props,
121
+ pointer = _a.pointer,
122
+ scale = _a.scale;
123
+ return Object.assign({}, options, {
124
+ pointer: pointer,
125
+ scale: scale
126
+ });
127
+ }
128
+ }
129
+ };
130
+ /**
131
+ * @hidden
132
+ */
133
+
134
+ var RadialGauge = RadialGaugeVue2;
135
+ export { RadialGauge, RadialGaugeVue2 };
@@ -0,0 +1,15 @@
1
+ import { BaseGaugeProps } from './BaseGaugeProps';
2
+ import { RadialPointer, RadialScale } from './types';
3
+ /**
4
+ * Represents the props of the [Kendo UI for Vue RadialGauge component]({% slug overview_radialgauge_gauges %}).
5
+ */
6
+ export interface RadialGaugeProps extends BaseGaugeProps {
7
+ /**
8
+ * The configuration of the pointers ([see example]({% slug multiplepointers_radialgauge %})).
9
+ */
10
+ pointer: RadialPointer | RadialPointer[];
11
+ /**
12
+ * The configuration of the scale.
13
+ */
14
+ scale?: RadialScale;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ // @ts-ignore
2
+ import { DefineComponent } from 'vue';
3
+ // @ts-ignore
4
+ import * as Vue from 'vue';
5
+
6
+ /**
7
+ * @hidden
8
+ */
9
+ // @ts-ignore
10
+ type Vue2type = Vue.default;
11
+
12
+ /**
13
+ * @hidden
14
+ */
15
+ // @ts-ignore
16
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
17
+ /**
18
+ * @hidden
19
+ */
20
+ // @ts-ignore
21
+ export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
@@ -0,0 +1,10 @@
1
+ import { ArcGauge, ArcGaugeVue2 } from './ArcGauge';
2
+ import { ArcGaugeProps } from './ArcGaugeProps';
3
+ import { CircularGauge, CircularGaugeVue2 } from './CircularGauge';
4
+ import { CircularGaugeProps } from './CircularGaugeProps';
5
+ import { LinearGauge, LinearGaugeVue2 } from './LinearGauge';
6
+ import { LinearGaugeProps } from './LinearGaugeProps';
7
+ import { RadialGauge, RadialGaugeVue2 } from './RadialGauge';
8
+ import { RadialGaugeProps } from './RadialGaugeProps';
9
+ export * from './types';
10
+ export { ArcGauge, ArcGaugeVue2, ArcGaugeProps, CircularGauge, CircularGaugeVue2, CircularGaugeProps, LinearGauge, LinearGaugeVue2, LinearGaugeProps, RadialGauge, RadialGaugeVue2, RadialGaugeProps };
@@ -0,0 +1,6 @@
1
+ import { ArcGauge, ArcGaugeVue2 } from './ArcGauge.js';
2
+ import { CircularGauge, CircularGaugeVue2 } from './CircularGauge.js';
3
+ import { LinearGauge, LinearGaugeVue2 } from './LinearGauge.js';
4
+ import { RadialGauge, RadialGaugeVue2 } from './RadialGauge.js';
5
+ export * from './types.js';
6
+ export { ArcGauge, ArcGaugeVue2, CircularGauge, CircularGaugeVue2, LinearGauge, LinearGaugeVue2, RadialGauge, RadialGaugeVue2 };
@@ -0,0 +1,5 @@
1
+ import { PackageMetadata } from '@progress/kendo-licensing';
2
+ /**
3
+ * @hidden
4
+ */
5
+ export declare const packageMetadata: PackageMetadata;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @hidden
3
+ */
4
+ export var packageMetadata = {
5
+ name: '@progress/kendo-vue-gauges',
6
+ productName: 'Kendo UI for Vue',
7
+ productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
+ publishDate: 1660543472,
9
+ version: '',
10
+ licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
+ };
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,14 @@
1
+ import { StoreAction } from './store';
2
+ /**
3
+ * @hidden
4
+ */
5
+ declare const optionsReducer: (currentState: any, action: StoreAction) => object;
6
+ /**
7
+ * @hidden
8
+ */
9
+ declare const themeReducer: (currentState: any, action: StoreAction) => any;
10
+ /**
11
+ * @hidden
12
+ */
13
+ declare const observersReducer: (currentState: any, action: StoreAction) => any;
14
+ export { optionsReducer, themeReducer, observersReducer };
@@ -0,0 +1,102 @@
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 };
@@ -0,0 +1,26 @@
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;
@@ -0,0 +1,28 @@
1
+ import { canUseDOM } from '@progress/kendo-vue-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;
@@ -0,0 +1,6 @@
1
+ import { Store } from './../store/store';
2
+ /**
3
+ * @hidden
4
+ */
5
+ declare const loadTheme: (store: Store, done: any) => void;
6
+ export { loadTheme };
@@ -0,0 +1,53 @@
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 === null || element === void 0 ? void 0 : element.querySelector(".k-var--".concat(varName)));
27
+ };
28
+ return ThemeService;
29
+ }());
30
+ /**
31
+ * @hidden
32
+ */
33
+ var loadTheme = function (store, done) {
34
+ var service = new ThemeService(store);
35
+ if (typeof document === 'undefined') {
36
+ store.dispatch({ type: 'push', payload: chartBaseTheme() });
37
+ return;
38
+ }
39
+ var container = service.element = document.createElement('div');
40
+ container.style.display = 'none';
41
+ container.innerHTML = template;
42
+ document.body.appendChild(container);
43
+ try {
44
+ store.dispatch({ type: 'push', payload: chartBaseTheme() });
45
+ service.setColors();
46
+ }
47
+ finally {
48
+ document.body.removeChild(service.element);
49
+ delete service.element;
50
+ done();
51
+ }
52
+ };
53
+ export { loadTheme };
@@ -0,0 +1,28 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ // tslint:enable:max-line-length
@@ -0,0 +1,18 @@
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ArcScale } from './arc-scale.interface';
2
+ /**
3
+ * The scale options of the Gauge.
4
+ */
5
+ export interface CircularScale extends ArcScale {
6
+ /**
7
+ * @hidden
8
+ */
9
+ endAngle?: number;
10
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The dash type of a line.
3
+ */
4
+ export declare type DashType = 'dash' | 'dashDot' | 'dot' | 'longDash' | 'longDashDot' | 'longDashDotDot' | 'solid';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
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
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,47 @@
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`&mdash;The value of the label.
41
+ */
42
+ content?: (e: any) => string;
43
+ /**
44
+ * The visibility of the labels.
45
+ */
46
+ visible?: boolean;
47
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ // tslint:enable:max-line-length
@@ -0,0 +1,4 @@
1
+ /**
2
+ * The cap style of a line.
3
+ */
4
+ export declare type LineCap = 'butt' | 'round' | 'square';
@@ -0,0 +1 @@
1
+ export {};