@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.
Files changed (194) hide show
  1. package/{dist/npm/ArcCenter.d.ts → ArcCenter.d.ts} +4 -0
  2. package/{dist/npm/ArcGauge.d.ts → ArcGauge.d.ts} +4 -0
  3. package/{dist/es/ArcGaugeProps.d.ts → ArcGaugeProps.d.ts} +4 -1
  4. package/{dist/npm/BaseGauge.d.ts → BaseGauge.d.ts} +4 -0
  5. package/{dist/es/BaseGaugeProps.d.ts → BaseGaugeProps.d.ts} +4 -1
  6. package/CircularGauge.d.ts +10 -0
  7. package/{dist/es/CircularGaugeProps.d.ts → CircularGaugeProps.d.ts} +4 -0
  8. package/GaugeContext.d.ts +16 -0
  9. package/LICENSE.md +1 -1
  10. package/{dist/es/LinearGauge.d.ts → LinearGauge.d.ts} +4 -0
  11. package/{dist/npm/LinearGaugeProps.d.ts → LinearGaugeProps.d.ts} +4 -0
  12. package/{dist/es/RadialGauge.d.ts → RadialGauge.d.ts} +4 -0
  13. package/{dist/npm/RadialGaugeProps.d.ts → RadialGaugeProps.d.ts} +4 -0
  14. package/common/gauges.d.ts +9 -0
  15. package/dist/cdn/js/kendo-react-gauges.js +9 -1
  16. package/index.d.ts +15 -0
  17. package/index.js +9 -0
  18. package/index.mjs +502 -0
  19. package/package-metadata.d.ts +9 -0
  20. package/package.json +30 -44
  21. package/{dist/npm/store → store}/reducer.d.ts +4 -0
  22. package/{dist/es/store → store}/store.d.ts +4 -0
  23. package/theming/theme-service.d.ts +10 -0
  24. package/{dist/npm/types → types}/arc-scale.interface.d.ts +4 -0
  25. package/{dist/es/types → types}/border.interface.d.ts +4 -0
  26. package/types/cap.interface.d.ts +17 -0
  27. package/types/circular-scale.interface.d.ts +14 -0
  28. package/{dist/npm/types → types}/color-range.interface.d.ts +4 -0
  29. package/types/dash-type.interface.d.ts +8 -0
  30. package/{dist/npm/types → types}/gauge-area.interface.d.ts +4 -0
  31. package/{dist/npm/types → types}/labels.interface.d.ts +4 -0
  32. package/types/line-cap.d.ts +8 -0
  33. package/{dist/npm/types → types}/line.interface.d.ts +4 -0
  34. package/types/linear-pointer-shape.d.ts +8 -0
  35. package/{dist/es/types → types}/linear-pointer.interface.d.ts +4 -0
  36. package/{dist/npm/types → types}/linear-scale.interface.d.ts +4 -0
  37. package/{dist/es/types → types}/margin.interface.d.ts +4 -0
  38. package/{dist/es/types → types}/padding.interface.d.ts +4 -0
  39. package/types/radial-label-position.d.ts +8 -0
  40. package/types/radial-labels.interface.d.ts +12 -0
  41. package/{dist/es/types → types}/radial-pointer.interface.d.ts +4 -0
  42. package/{dist/npm/types → types}/radial-scale.interface.d.ts +4 -0
  43. package/{dist/es/types → types}/range.interface.d.ts +4 -0
  44. package/{dist/npm/types → types}/scale.interface.d.ts +4 -0
  45. package/{dist/es/types → types}/ticks.interface.d.ts +4 -0
  46. package/types.d.ts +25 -0
  47. package/utils/common.d.ts +5 -0
  48. package/about.md +0 -3
  49. package/dist/es/ArcCenter.d.ts +0 -36
  50. package/dist/es/ArcCenter.js +0 -76
  51. package/dist/es/ArcGauge.d.ts +0 -33
  52. package/dist/es/ArcGauge.js +0 -128
  53. package/dist/es/ArcGaugeProps.js +0 -1
  54. package/dist/es/BaseGauge.d.ts +0 -89
  55. package/dist/es/BaseGauge.js +0 -247
  56. package/dist/es/BaseGaugeProps.js +0 -2
  57. package/dist/es/CircularGauge.d.ts +0 -6
  58. package/dist/es/CircularGauge.js +0 -27
  59. package/dist/es/CircularGaugeProps.js +0 -1
  60. package/dist/es/GaugeContext.d.ts +0 -12
  61. package/dist/es/GaugeContext.js +0 -6
  62. package/dist/es/LinearGauge.js +0 -121
  63. package/dist/es/LinearGaugeProps.d.ts +0 -15
  64. package/dist/es/LinearGaugeProps.js +0 -1
  65. package/dist/es/RadialGauge.js +0 -121
  66. package/dist/es/RadialGaugeProps.d.ts +0 -15
  67. package/dist/es/RadialGaugeProps.js +0 -1
  68. package/dist/es/common/gauges.d.ts +0 -5
  69. package/dist/es/common/gauges.js +0 -1
  70. package/dist/es/main.d.ts +0 -11
  71. package/dist/es/main.js +0 -7
  72. package/dist/es/package-metadata.d.ts +0 -5
  73. package/dist/es/package-metadata.js +0 -11
  74. package/dist/es/store/reducer.d.ts +0 -14
  75. package/dist/es/store/reducer.js +0 -102
  76. package/dist/es/store/store.js +0 -28
  77. package/dist/es/theming/theme-service.d.ts +0 -6
  78. package/dist/es/theming/theme-service.js +0 -53
  79. package/dist/es/types/arc-scale.interface.d.ts +0 -28
  80. package/dist/es/types/arc-scale.interface.js +0 -2
  81. package/dist/es/types/border.interface.js +0 -1
  82. package/dist/es/types/cap.interface.d.ts +0 -13
  83. package/dist/es/types/cap.interface.js +0 -1
  84. package/dist/es/types/circular-scale.interface.d.ts +0 -10
  85. package/dist/es/types/circular-scale.interface.js +0 -1
  86. package/dist/es/types/color-range.interface.d.ts +0 -21
  87. package/dist/es/types/color-range.interface.js +0 -1
  88. package/dist/es/types/dash-type.interface.d.ts +0 -4
  89. package/dist/es/types/dash-type.interface.js +0 -1
  90. package/dist/es/types/gauge-area.interface.d.ts +0 -27
  91. package/dist/es/types/gauge-area.interface.js +0 -1
  92. package/dist/es/types/labels.interface.d.ts +0 -47
  93. package/dist/es/types/labels.interface.js +0 -2
  94. package/dist/es/types/line-cap.d.ts +0 -4
  95. package/dist/es/types/line-cap.js +0 -1
  96. package/dist/es/types/line.interface.d.ts +0 -22
  97. package/dist/es/types/line.interface.js +0 -1
  98. package/dist/es/types/linear-pointer-shape.d.ts +0 -4
  99. package/dist/es/types/linear-pointer-shape.js +0 -1
  100. package/dist/es/types/linear-pointer.interface.js +0 -1
  101. package/dist/es/types/linear-scale.interface.d.ts +0 -26
  102. package/dist/es/types/linear-scale.interface.js +0 -2
  103. package/dist/es/types/margin.interface.js +0 -1
  104. package/dist/es/types/padding.interface.js +0 -1
  105. package/dist/es/types/radial-label-position.d.ts +0 -4
  106. package/dist/es/types/radial-label-position.js +0 -1
  107. package/dist/es/types/radial-labels.interface.d.ts +0 -8
  108. package/dist/es/types/radial-labels.interface.js +0 -1
  109. package/dist/es/types/radial-pointer.interface.js +0 -2
  110. package/dist/es/types/radial-scale.interface.d.ts +0 -28
  111. package/dist/es/types/radial-scale.interface.js +0 -2
  112. package/dist/es/types/range.interface.js +0 -1
  113. package/dist/es/types/scale.interface.d.ts +0 -47
  114. package/dist/es/types/scale.interface.js +0 -1
  115. package/dist/es/types/ticks.interface.js +0 -2
  116. package/dist/es/types.d.ts +0 -21
  117. package/dist/es/types.js +0 -1
  118. package/dist/es/utils/common.d.ts +0 -1
  119. package/dist/es/utils/common.js +0 -36
  120. package/dist/npm/ArcCenter.js +0 -79
  121. package/dist/npm/ArcGauge.js +0 -131
  122. package/dist/npm/ArcGaugeProps.d.ts +0 -40
  123. package/dist/npm/ArcGaugeProps.js +0 -2
  124. package/dist/npm/BaseGauge.js +0 -250
  125. package/dist/npm/BaseGaugeProps.d.ts +0 -52
  126. package/dist/npm/BaseGaugeProps.js +0 -3
  127. package/dist/npm/CircularGauge.d.ts +0 -6
  128. package/dist/npm/CircularGauge.js +0 -30
  129. package/dist/npm/CircularGaugeProps.d.ts +0 -17
  130. package/dist/npm/CircularGaugeProps.js +0 -2
  131. package/dist/npm/GaugeContext.d.ts +0 -12
  132. package/dist/npm/GaugeContext.js +0 -9
  133. package/dist/npm/LinearGauge.d.ts +0 -32
  134. package/dist/npm/LinearGauge.js +0 -124
  135. package/dist/npm/LinearGaugeProps.js +0 -2
  136. package/dist/npm/RadialGauge.d.ts +0 -32
  137. package/dist/npm/RadialGauge.js +0 -124
  138. package/dist/npm/RadialGaugeProps.js +0 -2
  139. package/dist/npm/common/gauges.d.ts +0 -5
  140. package/dist/npm/common/gauges.js +0 -2
  141. package/dist/npm/main.d.ts +0 -11
  142. package/dist/npm/main.js +0 -27
  143. package/dist/npm/package-metadata.d.ts +0 -5
  144. package/dist/npm/package-metadata.js +0 -14
  145. package/dist/npm/store/reducer.js +0 -107
  146. package/dist/npm/store/store.d.ts +0 -26
  147. package/dist/npm/store/store.js +0 -31
  148. package/dist/npm/theming/theme-service.d.ts +0 -6
  149. package/dist/npm/theming/theme-service.js +0 -56
  150. package/dist/npm/types/arc-scale.interface.js +0 -3
  151. package/dist/npm/types/border.interface.d.ts +0 -18
  152. package/dist/npm/types/border.interface.js +0 -2
  153. package/dist/npm/types/cap.interface.d.ts +0 -13
  154. package/dist/npm/types/cap.interface.js +0 -2
  155. package/dist/npm/types/circular-scale.interface.d.ts +0 -10
  156. package/dist/npm/types/circular-scale.interface.js +0 -2
  157. package/dist/npm/types/color-range.interface.js +0 -2
  158. package/dist/npm/types/dash-type.interface.d.ts +0 -4
  159. package/dist/npm/types/dash-type.interface.js +0 -2
  160. package/dist/npm/types/gauge-area.interface.js +0 -2
  161. package/dist/npm/types/labels.interface.js +0 -3
  162. package/dist/npm/types/line-cap.d.ts +0 -4
  163. package/dist/npm/types/line-cap.js +0 -2
  164. package/dist/npm/types/line.interface.js +0 -2
  165. package/dist/npm/types/linear-pointer-shape.d.ts +0 -4
  166. package/dist/npm/types/linear-pointer-shape.js +0 -2
  167. package/dist/npm/types/linear-pointer.interface.d.ts +0 -36
  168. package/dist/npm/types/linear-pointer.interface.js +0 -2
  169. package/dist/npm/types/linear-scale.interface.js +0 -3
  170. package/dist/npm/types/margin.interface.d.ts +0 -21
  171. package/dist/npm/types/margin.interface.js +0 -2
  172. package/dist/npm/types/padding.interface.d.ts +0 -21
  173. package/dist/npm/types/padding.interface.js +0 -2
  174. package/dist/npm/types/radial-label-position.d.ts +0 -4
  175. package/dist/npm/types/radial-label-position.js +0 -2
  176. package/dist/npm/types/radial-labels.interface.d.ts +0 -8
  177. package/dist/npm/types/radial-labels.interface.js +0 -2
  178. package/dist/npm/types/radial-pointer.interface.d.ts +0 -22
  179. package/dist/npm/types/radial-pointer.interface.js +0 -3
  180. package/dist/npm/types/radial-scale.interface.js +0 -3
  181. package/dist/npm/types/range.interface.d.ts +0 -21
  182. package/dist/npm/types/range.interface.js +0 -2
  183. package/dist/npm/types/scale.interface.js +0 -2
  184. package/dist/npm/types/ticks.interface.d.ts +0 -21
  185. package/dist/npm/types/ticks.interface.js +0 -3
  186. package/dist/npm/types.d.ts +0 -21
  187. package/dist/npm/types.js +0 -2
  188. package/dist/npm/utils/common.d.ts +0 -1
  189. package/dist/npm/utils/common.js +0 -40
  190. package/dist/systemjs/kendo-react-gauges.js +0 -1
  191. package/e2e-next/arcgauge.basic.tests.ts +0 -24
  192. package/e2e-next/circulargauge.basic.tests.ts +0 -24
  193. package/e2e-next/lineargauge.basic.tests.ts +0 -24
  194. package/e2e-next/radialgauge.basic.tests.ts +0 -24
@@ -1,247 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __rest = (this && this.__rest) || function (s, e) {
17
- var t = {};
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
- t[p] = s[p];
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
- t[p[i]] = s[p[i]];
24
- }
25
- return t;
26
- };
27
- import * as React from 'react';
28
- import * as PropTypes from 'prop-types';
29
- import { registerForIntl, provideIntlService } from '@progress/kendo-react-intl';
30
- import { loadTheme } from './theming/theme-service';
31
- import createStore from './store/store';
32
- import { themeReducer, observersReducer } from './store/reducer';
33
- import { isOptionsChanged } from './utils/common';
34
- import { canUseDOM } from '@progress/kendo-react-common';
35
- import { GaugeContext } from './GaugeContext';
36
- import { validatePackage } from '@progress/kendo-react-common';
37
- import { packageMetadata } from './package-metadata';
38
- /**
39
- * @hidden
40
- */
41
- var BaseGauge = /** @class */ (function (_super) {
42
- __extends(BaseGauge, _super);
43
- function BaseGauge(props) {
44
- var _this = _super.call(this, props) || this;
45
- /**
46
- * @hidden
47
- */
48
- _this.gaugeInstance = null;
49
- /**
50
- * @hidden
51
- */
52
- _this.surface = null;
53
- _this._element = null;
54
- _this.themeStore = {};
55
- _this.themeUnsubscriber = Function.prototype;
56
- _this.observersStore = {};
57
- /* DOM event handlers */
58
- /**
59
- * @hidden
60
- */
61
- _this.onWindowResize = function () {
62
- if (_this.gaugeInstance !== null) {
63
- _this.gaugeInstance.resize();
64
- _this.trigger('render', { sender: _this });
65
- }
66
- };
67
- validatePackage(packageMetadata);
68
- _this.themeStore = createStore(themeReducer);
69
- _this.observersStore = createStore(observersReducer);
70
- _this.contextValue = {
71
- observersStore: _this.observersStore
72
- };
73
- return _this;
74
- }
75
- Object.defineProperty(BaseGauge.prototype, "element", {
76
- /**
77
- * @hidden
78
- */
79
- get: function () {
80
- return this._element;
81
- },
82
- enumerable: false,
83
- configurable: true
84
- });
85
- /**
86
- * @hidden
87
- */
88
- BaseGauge.prototype.componentDidMount = function () {
89
- var _a;
90
- var doc = ((_a = this._element) === null || _a === void 0 ? void 0 : _a.ownerDocument) || document;
91
- loadTheme(this.themeStore, this.instantiateCoreGauge.bind(this), doc);
92
- this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this));
93
- window.addEventListener('resize', this.onWindowResize);
94
- this.trigger('render', { sender: this });
95
- };
96
- /**
97
- * @hidden
98
- */
99
- BaseGauge.prototype.componentDidUpdate = function (prevProps) {
100
- var _a = this.props, dir = _a.dir, children = _a.children, deriveOptionsFromParent = _a.deriveOptionsFromParent, getTarget = _a.getTarget, gaugeConstructor = _a.gaugeConstructor, className = _a.className, renderAs = _a.renderAs, currentOthers = __rest(_a, ["dir", "children", "deriveOptionsFromParent", "getTarget", "gaugeConstructor", "className", "renderAs"]);
101
- var prevDir = prevProps.dir, prevChildren = prevProps.children, prevDeriveOptionsFromParent = prevProps.deriveOptionsFromParent, prevGetTarget = prevProps.getTarget, prevGaugeConstructor = prevProps.gaugeConstructor, prevClassName = prevProps.className, prevRenderAs = prevProps.renderAs, prevOthers = __rest(prevProps, ["dir", "children", "deriveOptionsFromParent", "getTarget", "gaugeConstructor", "className", "renderAs"]);
102
- if (this.gaugeInstance !== null) {
103
- var currentIntlService = provideIntlService(this);
104
- var gaugeService = this.gaugeInstance.contextService;
105
- var localeChanged = currentIntlService.locale !== gaugeService._intlService.locale;
106
- var optionsChanged = isOptionsChanged(prevOthers, currentOthers);
107
- var typedCurrentOthers = currentOthers;
108
- if (localeChanged) {
109
- this.gaugeInstance.contextService._intlService = currentIntlService;
110
- this.gaugeInstance.contextService.format._intlService = currentIntlService;
111
- if (!optionsChanged) {
112
- this.gaugeInstance.noTransitionsRedraw();
113
- }
114
- }
115
- if (optionsChanged ||
116
- (renderAs || 'svg') !== (prevRenderAs || 'svg')) {
117
- this.refresh();
118
- }
119
- else {
120
- if (Object.keys(currentOthers).indexOf('pointer') > -1) {
121
- var isPointerArray = Array.isArray(typedCurrentOthers.pointer);
122
- if (isPointerArray) {
123
- this.refreshAllValues(typedCurrentOthers.pointer.map(function (item) { return item.value; }));
124
- }
125
- else {
126
- this.refreshValue((typedCurrentOthers.pointer || {}).value);
127
- }
128
- }
129
- else {
130
- this.refreshValue(typedCurrentOthers.value);
131
- }
132
- }
133
- if (prevProps.dir !== dir) {
134
- this.gaugeInstance.setDirection(this.getDirection(dir));
135
- }
136
- this.trigger('render', { sender: this });
137
- }
138
- };
139
- /**
140
- * @hidden
141
- */
142
- BaseGauge.prototype.componentWillUnmount = function () {
143
- this.themeUnsubscriber();
144
- var surfaceElement = this.gaugeInstance && this.gaugeInstance.surfaceElement;
145
- if (surfaceElement && surfaceElement.parentNode) {
146
- surfaceElement.parentNode.removeChild(surfaceElement);
147
- }
148
- if (this.gaugeInstance !== null) {
149
- this.gaugeInstance.destroy();
150
- this.gaugeInstance = null;
151
- }
152
- window.removeEventListener('resize', this.onWindowResize);
153
- };
154
- /**
155
- * @hidden
156
- */
157
- BaseGauge.prototype.render = function () {
158
- var _this = this;
159
- var _a = this.props, _b = _a.style, style = _b === void 0 ? {} : _b, className = _a.className, children = _a.children;
160
- var gaugeStyles = Object.assign({}, style, { position: 'relative' });
161
- return (React.createElement(GaugeContext.Provider, { value: this.contextValue },
162
- React.createElement("div", { style: gaugeStyles, ref: function (el) { return _this._element = el; }, className: className }, children)));
163
- };
164
- /**
165
- * @hidden
166
- */
167
- BaseGauge.prototype.instantiateCoreGauge = function () {
168
- var _a = this.props, dir = _a.dir, gaugeConstructor = _a.gaugeConstructor;
169
- var gaugeOptions = this.getGaugeOptions();
170
- this.gaugeInstance = new gaugeConstructor(this.element, gaugeOptions, this.themeStore.getState(), {
171
- rtl: this.getDirection(dir),
172
- intlService: provideIntlService(this),
173
- sender: this
174
- });
175
- };
176
- /**
177
- * @hidden
178
- */
179
- BaseGauge.prototype.refresh = function () {
180
- if (this.gaugeInstance !== null) {
181
- var themeOptions = this.themeStore.getState();
182
- var gaugeOptions = this.getGaugeOptions();
183
- this.gaugeInstance.setOptions(gaugeOptions, themeOptions);
184
- }
185
- };
186
- /**
187
- * @hidden
188
- */
189
- BaseGauge.prototype.refreshValue = function (value) {
190
- this.gaugeInstance.value(value);
191
- };
192
- /**
193
- * @hidden
194
- */
195
- BaseGauge.prototype.refreshAllValues = function (values) {
196
- this.gaugeInstance.allValues(values);
197
- };
198
- /**
199
- * @hidden
200
- */
201
- BaseGauge.prototype.getDirection = function (dir) {
202
- var _this = this;
203
- var directionFromWindow = function () { return canUseDOM && window.getComputedStyle(_this.element).direction; };
204
- var direction = dir !== undefined ? dir : (directionFromWindow() || 'ltr');
205
- return direction === 'rtl';
206
- };
207
- /**
208
- * @hidden
209
- */
210
- BaseGauge.prototype.getGaugeOptions = function () {
211
- var _a = this.props, renderAs = _a.renderAs, transitions = _a.transitions, deriveOptionsFromParent = _a.deriveOptionsFromParent;
212
- var gaugeOptions = Object.assign({
213
- renderAs: renderAs,
214
- transitions: transitions
215
- });
216
- if (deriveOptionsFromParent) {
217
- // Add options from parent - required by TS
218
- gaugeOptions = deriveOptionsFromParent(gaugeOptions);
219
- }
220
- return gaugeOptions;
221
- };
222
- /**
223
- * @hidden
224
- */
225
- BaseGauge.prototype.trigger = function (name, e) {
226
- var observers = this.observersStore.getState();
227
- for (var idx = 0; idx < observers.length; idx++) {
228
- observers[idx].trigger(name, e);
229
- }
230
- };
231
- /**
232
- * @hidden
233
- */
234
- BaseGauge.propTypes = {
235
- dir: PropTypes.string,
236
- renderAs: PropTypes.oneOf(['svg', 'canvas'])
237
- };
238
- /**
239
- * @hidden
240
- */
241
- BaseGauge.defaultProps = {
242
- renderAs: 'svg'
243
- };
244
- return BaseGauge;
245
- }(React.Component));
246
- export { BaseGauge };
247
- registerForIntl(BaseGauge);
@@ -1,2 +0,0 @@
1
- export {};
2
- // tslint:enable:max-line-length
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import { CircularGaugeProps } from './CircularGaugeProps';
3
- import { ArcGauge } from './ArcGauge';
4
- export declare class CircularGauge extends ArcGauge implements React.Component<CircularGaugeProps, {}> {
5
- protected gaugeType: any;
6
- }
@@ -1,27 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- import { ArcGauge } from './ArcGauge';
17
- import { CircularGauge as KendoCircularGauge } from '@progress/kendo-charts';
18
- var CircularGauge = /** @class */ (function (_super) {
19
- __extends(CircularGauge, _super);
20
- function CircularGauge() {
21
- var _this = _super !== null && _super.apply(this, arguments) || this;
22
- _this.gaugeType = KendoCircularGauge;
23
- return _this;
24
- }
25
- return CircularGauge;
26
- }(ArcGauge));
27
- export { CircularGauge };
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { Store } from './store/store';
3
- /**
4
- * @hidden
5
- */
6
- export interface GaugeContextType {
7
- observersStore: Store;
8
- }
9
- /**
10
- * @hidden
11
- */
12
- export declare const GaugeContext: React.Context<GaugeContextType | null>;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * @hidden
4
- */
5
- export var GaugeContext = React.createContext(null);
6
- GaugeContext.displayName = 'GaugeContext';
@@ -1,121 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import { BaseGauge } from './BaseGauge';
40
- import { LinearGauge as KendoLinearGauge } from '@progress/kendo-charts';
41
- import { Group } from '@progress/kendo-drawing';
42
- import { classNames } from '@progress/kendo-react-common';
43
- var LinearGauge = /** @class */ (function (_super) {
44
- __extends(LinearGauge, _super);
45
- function LinearGauge() {
46
- var _this = _super !== null && _super.apply(this, arguments) || this;
47
- _this._baseGauge = null;
48
- _this.getTarget = function () {
49
- return _this;
50
- };
51
- _this.deriveOptionsFromParent = function (options) {
52
- var _a = _this.props, pointer = _a.pointer, scale = _a.scale;
53
- return Object.assign({}, options, {
54
- pointer: pointer,
55
- scale: scale
56
- });
57
- };
58
- return _this;
59
- }
60
- Object.defineProperty(LinearGauge.prototype, "gaugeInstance", {
61
- /**
62
- * @hidden
63
- */
64
- get: function () {
65
- if (this._baseGauge !== null) {
66
- return this._baseGauge.gaugeInstance;
67
- }
68
- return null;
69
- },
70
- enumerable: false,
71
- configurable: true
72
- });
73
- Object.defineProperty(LinearGauge.prototype, "surface", {
74
- /**
75
- * The Drawing `Surface` of the Gauge.
76
- */
77
- get: function () {
78
- if (this._baseGauge !== null) {
79
- return this._baseGauge.surface;
80
- }
81
- return null;
82
- },
83
- enumerable: false,
84
- configurable: true
85
- });
86
- Object.defineProperty(LinearGauge.prototype, "element", {
87
- /**
88
- * The DOM element of the Gauge.
89
- */
90
- get: function () {
91
- if (this._baseGauge !== null) {
92
- return this._baseGauge.element;
93
- }
94
- return null;
95
- },
96
- enumerable: false,
97
- configurable: true
98
- });
99
- /**
100
- * @hidden
101
- */
102
- LinearGauge.prototype.render = function () {
103
- var _this = this;
104
- var _a = this.props, children = _a.children, className = _a.className, baseGaugeProps = __rest(_a, ["children", "className"]);
105
- return (React.createElement(BaseGauge, __assign({}, baseGaugeProps, { deriveOptionsFromParent: this.deriveOptionsFromParent, ref: function (baseGauge) { return _this._baseGauge = baseGauge; }, gaugeConstructor: KendoLinearGauge, getTarget: this.getTarget, className: classNames('k-gauge', className) }), children));
106
- };
107
- /**
108
- * Exports a Gauge component as a Drawing `Scene`.
109
- *
110
- * @param {any} options - The parameters for the export operation.
111
- * @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
112
- */
113
- LinearGauge.prototype.exportVisual = function (options) {
114
- if (this.gaugeInstance !== null) {
115
- return Promise.resolve(this.gaugeInstance.exportVisual(options));
116
- }
117
- return Promise.resolve(new Group());
118
- };
119
- return LinearGauge;
120
- }(React.Component));
121
- export { LinearGauge };
@@ -1,15 +0,0 @@
1
- import { BaseGaugeProps } from './BaseGaugeProps';
2
- import { LinearPointer, LinearScale } from './types';
3
- /**
4
- * Represents the props of the [KendoReact LinearGauge component]({% slug overview_lineargauge_gauges %}).
5
- */
6
- export interface LinearGaugeProps extends BaseGaugeProps {
7
- /**
8
- * The configuration of the pointers ([see example]({% slug multiplepointers_lineargauge %})).
9
- */
10
- pointer: LinearPointer | LinearPointer[];
11
- /**
12
- * The configuration of the scale.
13
- */
14
- scale?: LinearScale;
15
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,121 +0,0 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
- var __assign = (this && this.__assign) || function () {
17
- __assign = Object.assign || function(t) {
18
- for (var s, i = 1, n = arguments.length; i < n; i++) {
19
- s = arguments[i];
20
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
- t[p] = s[p];
22
- }
23
- return t;
24
- };
25
- return __assign.apply(this, arguments);
26
- };
27
- var __rest = (this && this.__rest) || function (s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
30
- t[p] = s[p];
31
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
32
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
34
- t[p[i]] = s[p[i]];
35
- }
36
- return t;
37
- };
38
- import * as React from 'react';
39
- import { BaseGauge } from './BaseGauge';
40
- import { RadialGauge as KendoRadialGauge } from '@progress/kendo-charts';
41
- import { Group } from '@progress/kendo-drawing';
42
- import { classNames } from '@progress/kendo-react-common';
43
- var RadialGauge = /** @class */ (function (_super) {
44
- __extends(RadialGauge, _super);
45
- function RadialGauge() {
46
- var _this = _super !== null && _super.apply(this, arguments) || this;
47
- _this._baseGauge = null;
48
- _this.getTarget = function () {
49
- return _this;
50
- };
51
- _this.deriveOptionsFromParent = function (options) {
52
- var _a = _this.props, pointer = _a.pointer, scale = _a.scale;
53
- return Object.assign({}, options, {
54
- pointer: pointer,
55
- scale: scale
56
- });
57
- };
58
- return _this;
59
- }
60
- Object.defineProperty(RadialGauge.prototype, "gaugeInstance", {
61
- /**
62
- * @hidden
63
- */
64
- get: function () {
65
- if (this._baseGauge !== null) {
66
- return this._baseGauge.gaugeInstance;
67
- }
68
- return null;
69
- },
70
- enumerable: false,
71
- configurable: true
72
- });
73
- Object.defineProperty(RadialGauge.prototype, "surface", {
74
- /**
75
- * The Drawing `Surface` of the Gauge.
76
- */
77
- get: function () {
78
- if (this._baseGauge !== null) {
79
- return this._baseGauge.surface;
80
- }
81
- return null;
82
- },
83
- enumerable: false,
84
- configurable: true
85
- });
86
- Object.defineProperty(RadialGauge.prototype, "element", {
87
- /**
88
- * The DOM element of the Gauge.
89
- */
90
- get: function () {
91
- if (this._baseGauge !== null) {
92
- return this._baseGauge.element;
93
- }
94
- return null;
95
- },
96
- enumerable: false,
97
- configurable: true
98
- });
99
- /**
100
- * @hidden
101
- */
102
- RadialGauge.prototype.render = function () {
103
- var _this = this;
104
- var _a = this.props, children = _a.children, className = _a.className, baseGaugeProps = __rest(_a, ["children", "className"]);
105
- return (React.createElement(BaseGauge, __assign({}, baseGaugeProps, { deriveOptionsFromParent: this.deriveOptionsFromParent, ref: function (baseGauge) { return _this._baseGauge = baseGauge; }, gaugeConstructor: KendoRadialGauge, getTarget: this.getTarget, className: classNames('k-gauge', className) }), children));
106
- };
107
- /**
108
- * Exports a Gauge component as a Drawing `Scene`.
109
- *
110
- * @param {any} options - The parameters for the export operation.
111
- * @returns {Promise<Group>} - A promise that returns the root `Group` of the scene.
112
- */
113
- RadialGauge.prototype.exportVisual = function (options) {
114
- if (this.gaugeInstance !== null) {
115
- return Promise.resolve(this.gaugeInstance.exportVisual(options));
116
- }
117
- return Promise.resolve(new Group());
118
- };
119
- return RadialGauge;
120
- }(React.Component));
121
- export { RadialGauge };
@@ -1,15 +0,0 @@
1
- import { BaseGaugeProps } from './BaseGaugeProps';
2
- import { RadialPointer, RadialScale } from './types';
3
- /**
4
- * Represents the props of the [KendoReact 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
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { ArcGauge } from './../ArcGauge';
2
- import { LinearGauge } from './../LinearGauge';
3
- import { RadialGauge } from './../RadialGauge';
4
- declare type Gauges = ArcGauge | LinearGauge | RadialGauge;
5
- export { Gauges };
@@ -1 +0,0 @@
1
- export {};
package/dist/es/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/es/main.js DELETED
@@ -1,7 +0,0 @@
1
- import { ArcGauge } from './ArcGauge';
2
- import { CircularGauge } from './CircularGauge';
3
- import { LinearGauge } from './LinearGauge';
4
- import { RadialGauge } from './RadialGauge';
5
- export * from './common/gauges';
6
- export * from './types';
7
- export { ArcGauge, CircularGauge, LinearGauge, RadialGauge };
@@ -1,5 +0,0 @@
1
- import { PackageMetadata } from '@progress/kendo-licensing';
2
- /**
3
- * @hidden
4
- */
5
- export declare const packageMetadata: PackageMetadata;
@@ -1,11 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export var packageMetadata = {
5
- name: '@progress/kendo-react-gauges',
6
- productName: 'KendoReact',
7
- productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1700064599,
9
- version: '',
10
- 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'
11
- };
@@ -1,14 +0,0 @@
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 };