@progress/kendo-charts 2.7.3-develop.2 → 2.8.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 (135) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/barcode/barcode.js +1 -4
  4. package/dist/es/barcode/encodings/code128.js +1 -3
  5. package/dist/es/barcode/encodings/encoding.js +1 -3
  6. package/dist/es/chart/aggregates/aggregates.js +3 -3
  7. package/dist/es/chart/aggregates/default-aggregates.js +1 -5
  8. package/dist/es/chart/aggregates/series-aggregator.js +12 -10
  9. package/dist/es/chart/api-elements/chart-axis.js +1 -5
  10. package/dist/es/chart/api-elements/chart-plotarea.js +1 -5
  11. package/dist/es/chart/axis-group-range-tracker.js +1 -4
  12. package/dist/es/chart/categorical-chart.js +8 -8
  13. package/dist/es/chart/chart.js +9 -8
  14. package/dist/es/chart/error-bars/error-range-calculator.js +2 -4
  15. package/dist/es/chart/highlight.js +1 -5
  16. package/dist/es/chart/line-chart/line-chart.js +2 -2
  17. package/dist/es/chart/line-chart/line-point.js +19 -19
  18. package/dist/es/chart/mixins/accessibility-attributes-mixin.js +3 -4
  19. package/dist/es/chart/mixins/clip-animation-mixin.js +6 -5
  20. package/dist/es/chart/mixins/line-chart-mixin.js +1 -2
  21. package/dist/es/chart/mixins/note-mixin.js +1 -2
  22. package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
  23. package/dist/es/chart/pan-and-zoom/pannable.js +2 -4
  24. package/dist/es/chart/pan-and-zoom/zoom-selection.js +2 -4
  25. package/dist/es/chart/plotarea/categorical-plotarea.js +2 -2
  26. package/dist/es/chart/plotarea/plotarea-factory.js +1 -5
  27. package/dist/es/chart/selection.js +2 -4
  28. package/dist/es/chart/series-binder.js +4 -8
  29. package/dist/es/chart/tooltip/base-tooltip.js +2 -4
  30. package/dist/es/common/getter.js +1 -3
  31. package/dist/es/common/grep.js +2 -11
  32. package/dist/es/common/in-array.js +1 -1
  33. package/dist/es/common/observable.js +1 -4
  34. package/dist/es/common/user-events.js +2 -6
  35. package/dist/es/core/box.js +38 -20
  36. package/dist/es/core/category-axis.js +5 -12
  37. package/dist/es/core/chart-element.js +8 -6
  38. package/dist/es/core/curve-processor.js +2 -5
  39. package/dist/es/core/point.js +2 -4
  40. package/dist/es/core/ring.js +2 -5
  41. package/dist/es/core/shape-builder.js +1 -2
  42. package/dist/es/core/utils/element-id.js +5 -0
  43. package/dist/es/core/utils/guid.js +4 -16
  44. package/dist/es/drawing-utils.js +0 -2
  45. package/dist/es/gauges/gauge.js +2 -5
  46. package/dist/es/gauges/pointer.js +2 -4
  47. package/dist/es/map/crs.js +5 -10
  48. package/dist/es/map/extent.js +1 -3
  49. package/dist/es/map/layers/bubble.js +1 -4
  50. package/dist/es/map/layers/layer.js +1 -4
  51. package/dist/es/map/layers/marker.js +1 -3
  52. package/dist/es/map/layers/shape.js +1 -3
  53. package/dist/es/map/layers/tile.js +3 -7
  54. package/dist/es/map/location.js +1 -4
  55. package/dist/es/map/scroller/draggable.js +1 -4
  56. package/dist/es/map/scroller/fx.js +1 -3
  57. package/dist/es/map/scroller/scroller.js +1 -4
  58. package/dist/es/map/tooltip/tooltip.js +2 -4
  59. package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
  60. package/dist/es/qrcode/encodings/encoders/iso-encoder.js +1 -2
  61. package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +1 -4
  62. package/dist/es/qrcode/encodings/encoding-result.js +1 -5
  63. package/dist/es/qrcode/encodings/free-cell-visitor.js +1 -5
  64. package/dist/es/qrcode/qrcode.js +1 -4
  65. package/dist/es/sankey/element.js +1 -3
  66. package/dist/es/stock/navigator-hint.js +2 -4
  67. package/dist/es/stock/navigator.js +2 -4
  68. package/dist/es2015/barcode/barcode.js +1 -4
  69. package/dist/es2015/barcode/encodings/code128.js +1 -3
  70. package/dist/es2015/barcode/encodings/encoding.js +1 -3
  71. package/dist/es2015/chart/aggregates/aggregates.js +3 -3
  72. package/dist/es2015/chart/aggregates/default-aggregates.js +1 -5
  73. package/dist/es2015/chart/aggregates/series-aggregator.js +12 -10
  74. package/dist/es2015/chart/api-elements/chart-axis.js +1 -5
  75. package/dist/es2015/chart/api-elements/chart-plotarea.js +1 -5
  76. package/dist/es2015/chart/axis-group-range-tracker.js +1 -4
  77. package/dist/es2015/chart/categorical-chart.js +8 -8
  78. package/dist/es2015/chart/chart.js +9 -8
  79. package/dist/es2015/chart/error-bars/error-range-calculator.js +2 -4
  80. package/dist/es2015/chart/highlight.js +1 -5
  81. package/dist/es2015/chart/line-chart/line-chart.js +2 -2
  82. package/dist/es2015/chart/line-chart/line-point.js +19 -19
  83. package/dist/es2015/chart/mixins/accessibility-attributes-mixin.js +3 -4
  84. package/dist/es2015/chart/mixins/clip-animation-mixin.js +6 -5
  85. package/dist/es2015/chart/mixins/line-chart-mixin.js +1 -2
  86. package/dist/es2015/chart/mixins/note-mixin.js +1 -2
  87. package/dist/es2015/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
  88. package/dist/es2015/chart/pan-and-zoom/pannable.js +2 -4
  89. package/dist/es2015/chart/pan-and-zoom/zoom-selection.js +2 -4
  90. package/dist/es2015/chart/plotarea/categorical-plotarea.js +2 -2
  91. package/dist/es2015/chart/plotarea/plotarea-factory.js +1 -5
  92. package/dist/es2015/chart/selection.js +2 -4
  93. package/dist/es2015/chart/series-binder.js +4 -8
  94. package/dist/es2015/chart/tooltip/base-tooltip.js +2 -4
  95. package/dist/es2015/common/getter.js +1 -3
  96. package/dist/es2015/common/grep.js +2 -11
  97. package/dist/es2015/common/in-array.js +1 -1
  98. package/dist/es2015/common/observable.js +1 -4
  99. package/dist/es2015/common/user-events.js +2 -6
  100. package/dist/es2015/core/box.js +38 -20
  101. package/dist/es2015/core/category-axis.js +5 -12
  102. package/dist/es2015/core/chart-element.js +8 -6
  103. package/dist/es2015/core/curve-processor.js +2 -5
  104. package/dist/es2015/core/point.js +2 -4
  105. package/dist/es2015/core/ring.js +2 -5
  106. package/dist/es2015/core/shape-builder.js +1 -2
  107. package/dist/es2015/core/utils/element-id.js +5 -0
  108. package/dist/es2015/core/utils/guid.js +4 -16
  109. package/dist/es2015/drawing-utils.js +0 -2
  110. package/dist/es2015/gauges/gauge.js +2 -5
  111. package/dist/es2015/gauges/pointer.js +2 -4
  112. package/dist/es2015/map/crs.js +5 -10
  113. package/dist/es2015/map/extent.js +1 -3
  114. package/dist/es2015/map/layers/bubble.js +1 -4
  115. package/dist/es2015/map/layers/layer.js +1 -4
  116. package/dist/es2015/map/layers/marker.js +1 -3
  117. package/dist/es2015/map/layers/shape.js +1 -3
  118. package/dist/es2015/map/layers/tile.js +3 -7
  119. package/dist/es2015/map/location.js +1 -4
  120. package/dist/es2015/map/scroller/draggable.js +1 -4
  121. package/dist/es2015/map/scroller/fx.js +1 -3
  122. package/dist/es2015/map/scroller/scroller.js +1 -4
  123. package/dist/es2015/map/tooltip/tooltip.js +2 -4
  124. package/dist/es2015/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
  125. package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -2
  126. package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -4
  127. package/dist/es2015/qrcode/encodings/encoding-result.js +1 -5
  128. package/dist/es2015/qrcode/encodings/free-cell-visitor.js +1 -5
  129. package/dist/es2015/qrcode/qrcode.js +1 -4
  130. package/dist/es2015/sankey/element.js +1 -3
  131. package/dist/es2015/stock/navigator-hint.js +2 -4
  132. package/dist/es2015/stock/navigator.js +2 -4
  133. package/dist/npm/main.js +6378 -6892
  134. package/dist/systemjs/kendo-charts.js +1 -1
  135. package/package.json +1 -1
@@ -1,12 +1,8 @@
1
1
  import getField from './utils/get-field';
2
2
  import { VALUE } from '../common/constants';
3
- import { Class, defined } from '../common';
4
-
5
- class SeriesBinder extends Class {
6
3
 
4
+ class SeriesBinder {
7
5
  constructor() {
8
- super();
9
-
10
6
  this._valueFields = {};
11
7
  this._otherFields = {};
12
8
  this._nullValue = {};
@@ -39,7 +35,7 @@ class SeriesBinder extends Class {
39
35
 
40
36
  bindPoint(series, pointIx, item) {
41
37
  const data = series.data;
42
- const pointData = defined(item) ? item : data[pointIx];
38
+ const pointData = item !== undefined ? item : data[pointIx];
43
39
  const result = { valueFields: { value: pointData } };
44
40
  const valueFields = this.valueFields(series);
45
41
  const otherFields = this._otherFields[series.type];
@@ -47,7 +43,7 @@ class SeriesBinder extends Class {
47
43
 
48
44
  if (pointData === null) {
49
45
  value = this._nullValue[series.type];
50
- } else if (!defined(pointData)) {
46
+ } else if (pointData === undefined) {
51
47
  value = this._undefinedValue[series.type];
52
48
  } else if (Array.isArray(pointData)) {
53
49
  const fieldData = pointData.slice(valueFields.length);
@@ -61,7 +57,7 @@ class SeriesBinder extends Class {
61
57
  fields = this._bindFromObject(pointData, otherFields, srcPointFields);
62
58
  }
63
59
 
64
- if (defined(value)) {
60
+ if (value !== undefined) {
65
61
  if (valueFields.length === 1) {
66
62
  result.valueFields.value = value[valueFields[0]];
67
63
  } else {
@@ -1,12 +1,10 @@
1
1
  import { Color } from '@progress/kendo-drawing';
2
2
 
3
- import { Class, defined, deepExtend, setDefaultOptions, valueOrDefault, getSpacing, styleValue } from '../../common';
3
+ import { defined, deepExtend, setDefaultOptions, valueOrDefault, getSpacing, styleValue } from '../../common';
4
4
  import { SHOW_TOOLTIP, HIDE_TOOLTIP } from '../constants';
5
5
 
6
- class BaseTooltip extends Class {
6
+ class BaseTooltip {
7
7
  constructor(chartService, options) {
8
- super();
9
-
10
8
  this.chartService = chartService;
11
9
  this.options = deepExtend({}, this.options, options);
12
10
  }
@@ -1,5 +1,3 @@
1
- import { drawing } from '@progress/kendo-drawing';
2
-
3
1
  const FIELD_REGEX = /\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;
4
2
  const getterCache = {};
5
3
 
@@ -14,7 +12,7 @@ export default function getter(field) {
14
12
 
15
13
  const fields = [];
16
14
  field.replace(FIELD_REGEX, function(match, index, indexAccessor, field) {
17
- fields.push(drawing.util.defined(index) ? index : (indexAccessor || field));
15
+ fields.push(index !== undefined ? index : (indexAccessor || field));
18
16
  });
19
17
 
20
18
  getterCache[field] = function(obj) {
@@ -1,11 +1,2 @@
1
- export default function grep(array, callback) {
2
- const length = array.length;
3
- const result = [];
4
- for (let idx = 0; idx < length; idx++) {
5
- if (callback(array[idx])) {
6
- result .push(array[idx]);
7
- }
8
- }
9
-
10
- return result;
11
- }
1
+ const grep = (array, callback) => array.filter(callback);
2
+ export default grep;
@@ -1,5 +1,5 @@
1
1
  export default function inArray(value, array) {
2
2
  if (array) {
3
- return array.indexOf(value) !== -1;
3
+ return array.includes(value);
4
4
  }
5
5
  }
@@ -1,5 +1,3 @@
1
- import { Class } from '../drawing-utils';
2
-
3
1
  const STRING = "string";
4
2
  const FUNCTION = "function";
5
3
 
@@ -11,9 +9,8 @@ let isDefaultPrevented = function() {
11
9
  return this._defaultPrevented === true;
12
10
  };
13
11
 
14
- export default class Observable extends Class {
12
+ export default class Observable {
15
13
  constructor() {
16
- super();
17
14
  this._events = {};
18
15
  }
19
16
 
@@ -1,4 +1,3 @@
1
- import { Class } from '../drawing-utils';
2
1
  import { applyEventMap, eventMap } from './event-map';
3
2
  import { on, off } from './event-utils';
4
3
  import getSupportedFeatures from './get-supported-features';
@@ -83,9 +82,8 @@ function getTouches(e) {
83
82
 
84
83
  return touches;
85
84
  }
86
- class TouchAxis extends Class {
85
+ class TouchAxis {
87
86
  constructor(axis, location) {
88
- super();
89
87
  let that = this;
90
88
 
91
89
  that.support = getSupportedFeatures();
@@ -124,10 +122,8 @@ class TouchAxis extends Class {
124
122
  }
125
123
  }
126
124
 
127
- class Touch extends Class {
125
+ class Touch {
128
126
  constructor(userEvents, target, touchInfo) {
129
- super();
130
-
131
127
  extend(this, {
132
128
  x: new TouchAxis('X', touchInfo.location),
133
129
  y: new TouchAxis('Y', touchInfo.location),
@@ -2,13 +2,11 @@ import { geometry as geom } from '@progress/kendo-drawing';
2
2
 
3
3
  import Point from './point';
4
4
 
5
- import { X, Y, TOP, BOTTOM, LEFT, RIGHT, CENTER, WIDTH, HEIGHT } from '../common/constants';
6
- import { Class, defined, getSpacing, inArray, isArray, rad } from '../common';
5
+ import { X, Y, TOP, BOTTOM, LEFT, RIGHT, CENTER } from '../common/constants';
6
+ import { getSpacing, isArray, rad } from '../common';
7
7
 
8
- class Box extends Class {
8
+ class Box {
9
9
  constructor(x1, y1, x2, y2) {
10
- super();
11
-
12
10
  this.x1 = x1 || 0;
13
11
  this.y1 = y1 || 0;
14
12
  this.x2 = x2 || 0;
@@ -41,12 +39,12 @@ class Box extends Class {
41
39
  const height = this.height();
42
40
  const width = this.width();
43
41
 
44
- if (defined(x)) {
42
+ if (x !== undefined) {
45
43
  this.x1 = x;
46
44
  this.x2 = this.x1 + width;
47
45
  }
48
46
 
49
- if (defined(y)) {
47
+ if (y !== undefined) {
50
48
  this.y1 = y;
51
49
  this.y2 = this.y1 + height;
52
50
  }
@@ -217,20 +215,40 @@ class Box extends Class {
217
215
  }
218
216
 
219
217
  align(targetBox, axis, alignment) {
220
- const c1 = axis + 1;
221
- const c2 = axis + 2;
222
- const sizeFunc = axis === X ? WIDTH : HEIGHT;
223
- const size = this[sizeFunc]();
224
-
225
- if (inArray(alignment, [ LEFT, TOP ])) {
226
- this[c1] = targetBox[c1];
227
- this[c2] = this[c1] + size;
228
- } else if (inArray(alignment, [ RIGHT, BOTTOM ])) {
229
- this[c2] = targetBox[c2];
230
- this[c1] = this[c2] - size;
218
+ if (axis === X) {
219
+ this.alignX(targetBox, alignment);
220
+ } else {
221
+ this.alignY(targetBox, alignment);
222
+ }
223
+
224
+ return this;
225
+ }
226
+
227
+ alignX(targetBox, alignment) {
228
+ const width = this.width();
229
+ if (alignment === LEFT) {
230
+ this.x1 = targetBox.x1;
231
+ this.x2 = this.x1 + width;
232
+ } else if (alignment === RIGHT) {
233
+ this.x2 = targetBox.x2;
234
+ this.x1 = this.x2 - width;
231
235
  } else if (alignment === CENTER) {
232
- this[c1] = targetBox[c1] + (targetBox[sizeFunc]() - size) / 2;
233
- this[c2] = this[c1] + size;
236
+ this.x1 = targetBox.x1 + (targetBox.width() - width) / 2;
237
+ this.x2 = this.x1 + width;
238
+ }
239
+ }
240
+
241
+ alignY(targetBox, alignment) {
242
+ const height = this.height();
243
+ if (alignment === TOP) {
244
+ this.y1 = targetBox.y1;
245
+ this.y2 = this.y1 + height;
246
+ } else if (alignment === BOTTOM) {
247
+ this.y2 = targetBox.y2;
248
+ this.y1 = this.y2 - height;
249
+ } else if (alignment === CENTER) {
250
+ this.y1 = targetBox.y1 + (targetBox.height() - height) / 2;
251
+ this.y2 = this.y1 + height;
234
252
  }
235
253
  }
236
254
  }
@@ -2,7 +2,7 @@ import Axis from './axis';
2
2
  import AxisLabel from './axis-label';
3
3
 
4
4
  import { BLACK, COORD_PRECISION, DEFAULT_PRECISION, X, Y } from '../common/constants';
5
- import { defined, isNumber, last, limitValue, round, setDefaultOptions, valueOrDefault, HashMap } from '../common';
5
+ import { isNumber, last, limitValue, round, setDefaultOptions, valueOrDefault, HashMap } from '../common';
6
6
  import { dateEquals } from '../date-utils';
7
7
 
8
8
  const MIN_CATEGORY_POINTS_RANGE = 0.01;
@@ -10,14 +10,7 @@ const MIN_CATEGORY_RANGE = 0.1;
10
10
 
11
11
  function indexOf(value, arr) {
12
12
  if (value instanceof Date) {
13
- const length = arr.length;
14
- for (let idx = 0; idx < length; idx++) {
15
- if (dateEquals(arr[idx], value)) {
16
- return idx;
17
- }
18
- }
19
-
20
- return -1;
13
+ return arr.findIndex((item) => dateEquals(item, value));
21
14
  }
22
15
 
23
16
  return arr.indexOf(value);
@@ -43,8 +36,8 @@ class CategoryAxis extends Axis {
43
36
 
44
37
  initUserOptions(options) {
45
38
  const categories = options.categories || [];
46
- const definedMin = defined(options.min);
47
- const definedMax = defined(options.max);
39
+ const definedMin = options.min !== undefined;
40
+ const definedMax = options.max !== undefined;
48
41
  options.srcCategories = options.categories = categories;
49
42
 
50
43
  if ((definedMin || definedMax) && categories.length) {
@@ -259,7 +252,7 @@ class CategoryAxis extends Axis {
259
252
  const { axis: valueAxis, lineStart } = this.lineInfo();
260
253
 
261
254
  const slotBox = box.clone();
262
- const singleSlot = !defined(to);
255
+ const singleSlot = to === undefined;
263
256
 
264
257
  const start = valueOrDefault(from, 0);
265
258
  let end = valueOrDefault(to, start);
@@ -1,14 +1,16 @@
1
1
  import { drawing as draw } from '@progress/kendo-drawing';
2
2
 
3
3
  import { WHITE } from '../common/constants';
4
- import { Class, deepExtend, defined, valueOrDefault, autoTextColor } from '../common';
4
+ import { deepExtend, valueOrDefault, autoTextColor } from '../common';
5
5
 
6
- class ChartElement extends Class {
6
+ class ChartElement {
7
7
  constructor(options) {
8
- super();
9
-
10
8
  this.children = [];
11
9
 
10
+ this.initOptions(options);
11
+ }
12
+
13
+ initOptions(options) {
12
14
  this.options = deepExtend({}, this.options, this.initUserOptions(options));
13
15
  }
14
16
 
@@ -137,7 +139,7 @@ class ChartElement extends Class {
137
139
 
138
140
  if (childVisual.options.noclip) {
139
141
  this.clipRoot().visual.append(childVisual);
140
- } else if (defined(childVisual.options.zIndex)) {
142
+ } else if (childVisual.options.zIndex !== undefined) {
141
143
  this.stackRoot().stackVisual(childVisual);
142
144
  } else if (this.isStackRoot) {
143
145
  this.stackVisual(childVisual);
@@ -261,7 +263,7 @@ class ChartElement extends Class {
261
263
  highlight = this._highlight = this.createHighlight(highlightOptions);
262
264
  }
263
265
 
264
- if (!defined(highlight.options.zIndex)) {
266
+ if (highlight.options.zIndex === undefined) {
265
267
  highlight.options.zIndex = valueOrDefault(options.zIndex, this.options.zIndex);
266
268
  }
267
269
 
@@ -1,16 +1,13 @@
1
1
  import { geometry as geom } from '@progress/kendo-drawing';
2
2
 
3
3
  import { X, Y } from '../common/constants';
4
- import { Class, last, round } from '../common';
4
+ import { last, round } from '../common';
5
5
 
6
6
  const WEIGHT = 0.333;
7
7
  const EXTREMUM_ALLOWED_DEVIATION = 0.01;
8
8
 
9
- class CurveProcessor extends Class {
10
-
9
+ class CurveProcessor {
11
10
  constructor(closed) {
12
- super();
13
-
14
11
  this.closed = closed;
15
12
  }
16
13
 
@@ -1,10 +1,8 @@
1
1
  import { COORD_PRECISION } from '../common/constants';
2
- import { Class, rad, round } from '../common';
2
+ import { rad, round } from '../common';
3
3
 
4
- class Point extends Class {
4
+ class Point {
5
5
  constructor(x, y) {
6
- super();
7
-
8
6
  this.x = x || 0;
9
7
  this.y = y || 0;
10
8
  }
@@ -1,13 +1,10 @@
1
1
  import Box from './box';
2
2
  import Point from './point';
3
3
  import { COORD_PRECISION, MAX_VALUE, MIN_VALUE } from '../common/constants';
4
- import { Class, clockwise, rad, round } from '../common';
5
-
6
- class Ring extends Class {
4
+ import { clockwise, rad, round } from '../common';
7
5
 
6
+ class Ring {
8
7
  constructor(center, innerRadius, radius, startAngle, angle) {
9
- super();
10
-
11
8
  this.center = center;
12
9
  this.innerRadius = innerRadius;
13
10
  this.radius = radius;
@@ -1,9 +1,8 @@
1
1
  import { geometry as geom, drawing as draw } from '@progress/kendo-drawing';
2
- import { Class } from '../common';
3
2
 
4
3
  const DIRECTION_ANGLE = 0.001; //any value that will make the endAngle bigger than the start angle will work here.
5
4
 
6
- class ShapeBuilder extends Class {
5
+ class ShapeBuilder {
7
6
  createRing(sector, options) {
8
7
  const startAngle = sector.startAngle + 180;
9
8
  let endAngle = sector.angle + startAngle;
@@ -0,0 +1,5 @@
1
+ let elId = 1;
2
+
3
+ export default function elementId() {
4
+ return "kchart" + elId++;
5
+ }
@@ -1,17 +1,5 @@
1
- export default function guid() {
2
- let id = "";
3
- let i;
4
- let random;
5
-
6
- for (i = 0; i < 32; i++) {
7
- random = Math.random() * 16 | 0;
8
-
9
- if (i === 8 || i === 12 || i === 16 || i === 20) {
10
- id += "-";
11
- }
1
+ import elementId from "./element-id";
12
2
 
13
- id += (i === 12 ? 4 : (i === 16 ? (random & 3 | 8) : random)).toString(16); // eslint-disable-line no-nested-ternary
14
- }
15
-
16
- return id;
17
- }
3
+ export default function guid() {
4
+ return elementId();
5
+ }
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  drawing,
3
- Class,
4
3
  logToConsole
5
4
  } from '@progress/kendo-drawing';
6
5
 
@@ -26,7 +25,6 @@ const {
26
25
  export {
27
26
  append,
28
27
  bindEvents,
29
- Class,
30
28
  defined,
31
29
  deg,
32
30
  elementOffset,
@@ -1,5 +1,5 @@
1
1
  import { geometry as geo, drawing } from '@progress/kendo-drawing';
2
- import { Class, elementSize, setDefaultOptions, deepExtend, isArray, isNumber } from '../common';
2
+ import { elementSize, setDefaultOptions, deepExtend, isArray, isNumber } from '../common';
3
3
  import { DEFAULT_WIDTH, DEFAULT_HEIGHT } from './constants';
4
4
  import { ChartService } from '../services';
5
5
  import { unpad } from './utils';
@@ -7,11 +7,8 @@ import { unpad } from './utils';
7
7
  const DEFAULT_MARGIN = 5;
8
8
  const { Path, Surface } = drawing;
9
9
 
10
- class Gauge extends Class {
11
-
10
+ class Gauge {
12
11
  constructor(element, userOptions, theme, context = {}) {
13
- super();
14
-
15
12
  this.element = element;
16
13
  this.theme = theme;
17
14
  this.contextService = new ChartService(this, context);
@@ -1,10 +1,8 @@
1
- import { Class, setDefaultOptions, defined, deepExtend, limitValue } from '../common';
1
+ import { setDefaultOptions, defined, deepExtend, limitValue } from '../common';
2
2
  import { BLACK } from '../common/constants';
3
3
 
4
- class Pointer extends Class {
4
+ class Pointer {
5
5
  constructor(scale, userOptions) {
6
- super();
7
-
8
6
  const { min, max } = scale.options;
9
7
  const options = this.options = deepExtend({}, this.options, userOptions);
10
8
 
@@ -3,7 +3,6 @@ import {
3
3
  } from '@progress/kendo-drawing';
4
4
 
5
5
  import {
6
- Class,
7
6
  setDefaultOptions,
8
7
  limitValue,
9
8
  rad,
@@ -37,9 +36,8 @@ let PI = math.PI,
37
36
  let WGS84 = datums.WGS84;
38
37
 
39
38
  // WGS 84 / World Mercator
40
- export class Mercator extends Class {
39
+ export class Mercator {
41
40
  constructor(options) {
42
- super();
43
41
  this.initProperties();
44
42
  this._initOptions(options);
45
43
  }
@@ -150,7 +148,7 @@ export class SphericalMercator extends Mercator {
150
148
  }
151
149
  }
152
150
 
153
- export class Equirectangular extends Class {
151
+ export class Equirectangular {
154
152
  forward(loc) {
155
153
  return new Point(loc.lng, loc.lat);
156
154
  }
@@ -167,9 +165,8 @@ export class Equirectangular extends Class {
167
165
  // Area of use: World between 85.06°S and 85.06°N.
168
166
  // Coordinate system: Cartesian 2D CS. Axes: easting, northing (X,Y). Orientations: east, north. UoM: m.
169
167
  // https://epsg.io/3857
170
- export class EPSG3857 extends Class {
168
+ export class EPSG3857 {
171
169
  constructor() {
172
- super();
173
170
  let crs = this,
174
171
  proj = crs._proj = new SphericalMercator();
175
172
  let c = this.c = 2 * PI * proj.options.datum.a;
@@ -200,9 +197,8 @@ export class EPSG3857 extends Class {
200
197
  // Area of use: World between 80°S and 84°N.
201
198
  // Coordinate system: Cartesian 2D CS. Axes: easting, northing (E,N). Orientations: east, north. UoM: m.
202
199
  // https://epsg.io/3395
203
- export class EPSG3395 extends Class {
200
+ export class EPSG3395 {
204
201
  constructor() {
205
- super();
206
202
  this._proj = new Mercator();
207
203
  }
208
204
  toPoint(loc) {
@@ -219,9 +215,8 @@ export class EPSG3395 extends Class {
219
215
  // Area of use: World.
220
216
  // Coordinate system: Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: north, east. UoM: degree
221
217
  // https://epsg.io/4326
222
- export class EPSG4326 extends Class {
218
+ export class EPSG4326 {
223
219
  constructor() {
224
- super();
225
220
  this._proj = new Equirectangular();
226
221
  }
227
222
  toPoint(loc) {
@@ -1,5 +1,4 @@
1
1
  import {
2
- Class,
3
2
  valueOrDefault
4
3
  } from '../common';
5
4
 
@@ -9,9 +8,8 @@ let math = Math,
9
8
  max = math.max,
10
9
  min = math.min;
11
10
 
12
- export class Extent extends Class {
11
+ export class Extent {
13
12
  constructor(initialNw, initialSe) {
14
- super();
15
13
  let nw = Location.create(initialNw);
16
14
  let se = Location.create(initialSe);
17
15
 
@@ -4,7 +4,6 @@ import {
4
4
  } from '@progress/kendo-drawing';
5
5
 
6
6
  import {
7
- Class,
8
7
  defined,
9
8
  isFunction,
10
9
  getter,
@@ -149,10 +148,8 @@ setDefaultOptions(BubbleLayer, {
149
148
  zIndex: 200
150
149
  });
151
150
 
152
- class SqrtScale extends Class {
151
+ class SqrtScale {
153
152
  constructor(domain, range) {
154
- super();
155
-
156
153
  this._domain = domain;
157
154
  this._range = range;
158
155
 
@@ -1,5 +1,4 @@
1
1
  import {
2
- Class,
3
2
  addClass,
4
3
  deepExtend,
5
4
  defined,
@@ -10,10 +9,8 @@ import {
10
9
  Extent
11
10
  } from './../extent';
12
11
 
13
- export class Layer extends Class {
12
+ export class Layer {
14
13
  constructor(map, options) {
15
- super();
16
-
17
14
  this.support = getSupportedFeatures();
18
15
 
19
16
  this._initOptions(options);
@@ -1,5 +1,4 @@
1
1
  import {
2
- Class,
3
2
  addClass,
4
3
  isArray,
5
4
  getter,
@@ -189,9 +188,8 @@ setDefaultOptions(MarkerLayer, {
189
188
  template: ""
190
189
  });
191
190
 
192
- export class Marker extends Class {
191
+ export class Marker {
193
192
  constructor(options) {
194
- super();
195
193
  this.options = options || {};
196
194
  }
197
195
 
@@ -4,7 +4,6 @@ import {
4
4
  } from '@progress/kendo-drawing';
5
5
 
6
6
  import {
7
- Class,
8
7
  defined,
9
8
  last,
10
9
  setDefaultOptions
@@ -258,9 +257,8 @@ setDefaultOptions(ShapeLayer, {
258
257
  zIndex: 100
259
258
  });
260
259
 
261
- class GeoJsonLoader extends Class {
260
+ class GeoJsonLoader {
262
261
  constructor(locator, defaultStyle, observer) {
263
- super();
264
262
  this.observer = observer;
265
263
  this.locator = locator;
266
264
  this.style = defaultStyle;
@@ -4,7 +4,6 @@ import {
4
4
  } from '@progress/kendo-drawing';
5
5
 
6
6
  import {
7
- Class,
8
7
  deepExtend,
9
8
  round,
10
9
  limitValue,
@@ -134,9 +133,8 @@ setDefaultOptions(TileLayer, {
134
133
  zIndex: 1
135
134
  });
136
135
 
137
- export class TileView extends Class {
136
+ export class TileView {
138
137
  constructor(element, options) {
139
- super();
140
138
  this.element = element;
141
139
  this._initOptions(options);
142
140
  this.pool = new TilePool();
@@ -284,9 +282,8 @@ export class TileView extends Class {
284
282
  }
285
283
  }
286
284
 
287
- export class ImageTile extends Class {
285
+ export class ImageTile {
288
286
  constructor(id, options) {
289
- super();
290
287
  this.id = id;
291
288
  this.visible = true;
292
289
  this._initOptions(options);
@@ -393,9 +390,8 @@ setDefaultOptions(ImageTile, {
393
390
  errorUrlTemplate: ''
394
391
  });
395
392
 
396
- export class TilePool extends Class {
393
+ export class TilePool {
397
394
  constructor() {
398
- super();
399
395
  this._items = [];
400
396
  }
401
397
 
@@ -1,5 +1,4 @@
1
1
  import {
2
- Class,
3
2
  deepExtend,
4
3
  deg,
5
4
  rad,
@@ -24,10 +23,8 @@ let math = Math,
24
23
  sin = math.sin,
25
24
  tan = math.tan;
26
25
 
27
- export class Location extends Class {
26
+ export class Location {
28
27
  constructor(lat, lng) {
29
- super();
30
-
31
28
  this.initProperties();
32
29
 
33
30
  if (arguments.length === 1) {