@progress/kendo-charts 1.23.3 → 1.23.4-dev.202205050627

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.
@@ -6,8 +6,6 @@ import {
6
6
  setDefaultOptions
7
7
  } from '../common';
8
8
 
9
- import TemplateService from '../services/template-service';
10
-
11
9
  import {
12
10
  appendHtml,
13
11
  removeChildren
@@ -15,8 +13,6 @@ import {
15
13
 
16
14
  import { Observable } from './scroller/observable';
17
15
 
18
- var template = TemplateService.compile;
19
-
20
16
  export var Attribution = (function (Observable) {
21
17
  function Attribution(element, options) {
22
18
  Observable.call(this);
@@ -83,16 +79,13 @@ export var Attribution = (function (Observable) {
83
79
  var this$1 = this;
84
80
 
85
81
  var result = [];
86
- var itemTemplate = template(this.options.itemTemplate);
87
82
 
88
83
  for (var i = 0; i < this.items.length; i++) {
89
84
  var item = this$1.items[i];
90
85
  var text = this$1._itemText(item);
91
86
 
92
87
  if (text !== '') {
93
- result.push(itemTemplate({
94
- text: text
95
- }));
88
+ result.push(text);
96
89
  }
97
90
  }
98
91
 
@@ -152,7 +145,5 @@ export var Attribution = (function (Observable) {
152
145
 
153
146
  setDefaultOptions(Attribution, {
154
147
  name: 'Attribution',
155
- separator: '&nbsp;|&nbsp;',
156
- itemTemplate: '#= text #'
148
+ separator: '&nbsp;|&nbsp;'
157
149
  });
158
-
@@ -10,7 +10,8 @@ import {
10
10
  round,
11
11
  limitValue,
12
12
  hashKey,
13
- setDefaultOptions
13
+ setDefaultOptions,
14
+ isFunction
14
15
  } from '../../common';
15
16
 
16
17
  import { removeChildren } from '../utils';
@@ -20,9 +21,16 @@ import { Layer } from './layer';
20
21
  import TemplateService from '../../services/template-service';
21
22
 
22
23
  var math = Math,
23
- template = TemplateService.compile,
24
24
  Point = g.Point;
25
25
 
26
+ function compileTemplate(template) {
27
+ if (isFunction(template)) {
28
+ return template;
29
+ }
30
+
31
+ return TemplateService.compile(template);
32
+ }
33
+
26
34
  function roundPoint(point) {
27
35
  return new Point(round(point.x), round(point.y));
28
36
  }
@@ -371,12 +379,12 @@ export var ImageTile = (function (Class) {
371
379
  };
372
380
 
373
381
  ImageTile.prototype.url = function url () {
374
- var urlResult = template(this.options.urlTemplate);
382
+ var urlResult = compileTemplate(this.options.urlTemplate);
375
383
  return urlResult(this.urlOptions());
376
384
  };
377
385
 
378
386
  ImageTile.prototype.errorUrl = function errorUrl () {
379
- var urlResult = template(this.options.errorUrlTemplate);
387
+ var urlResult = compileTemplate(this.options.errorUrlTemplate);
380
388
  return urlResult(this.urlOptions());
381
389
  };
382
390
 
package/dist/es/map.js CHANGED
@@ -1 +1,3 @@
1
1
  export { default as Map } from './map/map';
2
+ export { Location } from './map/location';
3
+ export { Extent } from './map/extent';
@@ -6,8 +6,6 @@ import {
6
6
  setDefaultOptions
7
7
  } from '../common';
8
8
 
9
- import TemplateService from '../services/template-service';
10
-
11
9
  import {
12
10
  appendHtml,
13
11
  removeChildren
@@ -15,8 +13,6 @@ import {
15
13
 
16
14
  import { Observable } from './scroller/observable';
17
15
 
18
- let template = TemplateService.compile;
19
-
20
16
  export class Attribution extends Observable {
21
17
  constructor(element, options) {
22
18
  super();
@@ -75,16 +71,13 @@ export class Attribution extends Observable {
75
71
 
76
72
  _render() {
77
73
  let result = [];
78
- let itemTemplate = template(this.options.itemTemplate);
79
74
 
80
75
  for (let i = 0; i < this.items.length; i++) {
81
76
  let item = this.items[i];
82
77
  let text = this._itemText(item);
83
78
 
84
79
  if (text !== '') {
85
- result.push(itemTemplate({
86
- text: text
87
- }));
80
+ result.push(text);
88
81
  }
89
82
  }
90
83
 
@@ -142,7 +135,5 @@ export class Attribution extends Observable {
142
135
 
143
136
  setDefaultOptions(Attribution, {
144
137
  name: 'Attribution',
145
- separator: '&nbsp;|&nbsp;',
146
- itemTemplate: '#= text #'
138
+ separator: '&nbsp;|&nbsp;'
147
139
  });
148
-
@@ -10,7 +10,8 @@ import {
10
10
  round,
11
11
  limitValue,
12
12
  hashKey,
13
- setDefaultOptions
13
+ setDefaultOptions,
14
+ isFunction
14
15
  } from '../../common';
15
16
 
16
17
  import { removeChildren } from '../utils';
@@ -20,9 +21,16 @@ import { Layer } from './layer';
20
21
  import TemplateService from '../../services/template-service';
21
22
 
22
23
  let math = Math,
23
- template = TemplateService.compile,
24
24
  Point = g.Point;
25
25
 
26
+ function compileTemplate(template) {
27
+ if (isFunction(template)) {
28
+ return template;
29
+ }
30
+
31
+ return TemplateService.compile(template);
32
+ }
33
+
26
34
  function roundPoint(point) {
27
35
  return new Point(round(point.x), round(point.y));
28
36
  }
@@ -353,12 +361,12 @@ export class ImageTile extends Class {
353
361
  }
354
362
 
355
363
  url() {
356
- let urlResult = template(this.options.urlTemplate);
364
+ let urlResult = compileTemplate(this.options.urlTemplate);
357
365
  return urlResult(this.urlOptions());
358
366
  }
359
367
 
360
368
  errorUrl() {
361
- let urlResult = template(this.options.errorUrlTemplate);
369
+ let urlResult = compileTemplate(this.options.errorUrlTemplate);
362
370
  return urlResult(this.urlOptions());
363
371
  }
364
372
 
@@ -1 +1,3 @@
1
1
  export { default as Map } from './map/map';
2
+ export { Location } from './map/location';
3
+ export { Extent } from './map/extent';
@@ -8,10 +8,7 @@ import { ValidationResult } from './validation';
8
8
  export type BarcodeType =
9
9
  'EAN8' | 'EAN13' | 'UPCE' | 'UPCA' | 'Code11' | 'Code39' | 'Code39Extended' |
10
10
  'Code93' | 'Code93Extended' | 'Code128' | 'Code128A' | 'Code128B' | 'Code128C' |
11
- 'GS1-128' | 'MSImod10' | 'MSImod11' | 'MSImod1010' | 'MSImod1110' | 'POSTNET' |
12
- 'ean8' | 'ean13' | 'upce' | 'upca' | 'code11' | 'code39' | 'code39extended' |
13
- 'code93' | 'code93extended' | 'code128' | 'code128a' | 'code128b' | 'code128c' |
14
- 'gs1-128' | 'msimod10' | 'msimod11' | 'msimod1010' | 'msimod1110' | 'postnet';
11
+ 'GS1-128' | 'MSImod10' | 'MSImod11' | 'MSImod1010' | 'MSImod1110' | 'POSTNET';
15
12
 
16
13
  /**
17
14
  * The Barcode text label configuration.