@progress/kendo-charts 1.23.4-dev.202203220848 → 1.23.4-dev.202205050854

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
-
@@ -5,12 +5,12 @@ import {
5
5
 
6
6
  import {
7
7
  Class,
8
- addClass,
9
8
  deepExtend,
10
9
  round,
11
10
  limitValue,
12
11
  hashKey,
13
- setDefaultOptions
12
+ setDefaultOptions,
13
+ isFunction
14
14
  } from '../../common';
15
15
 
16
16
  import { removeChildren } from '../utils';
@@ -20,9 +20,16 @@ import { Layer } from './layer';
20
20
  import TemplateService from '../../services/template-service';
21
21
 
22
22
  var math = Math,
23
- template = TemplateService.compile,
24
23
  Point = g.Point;
25
24
 
25
+ function compileTemplate(template) {
26
+ if (isFunction(template)) {
27
+ return template;
28
+ }
29
+
30
+ return TemplateService.compile(template);
31
+ }
32
+
26
33
  function roundPoint(point) {
27
34
  return new Point(round(point.x), round(point.y));
28
35
  }
@@ -324,11 +331,11 @@ export var ImageTile = (function (Class) {
324
331
 
325
332
  ImageTile.prototype.createElement = function createElement () {
326
333
  var el = document.createElement("img");
327
- addClass(el, "k-layer");
334
+ var size = this.options.size + "px";
328
335
  el.style.position = "absolute";
329
336
  el.style.display = "block";
330
- el.style.width = this.options.size;
331
- el.style.height = this.options.size;
337
+ el.style.width = el.style.maxWidth = size;
338
+ el.style.height = el.style.maxHeight = size;
332
339
 
333
340
  this.element = el;
334
341
 
@@ -371,12 +378,12 @@ export var ImageTile = (function (Class) {
371
378
  };
372
379
 
373
380
  ImageTile.prototype.url = function url () {
374
- var urlResult = template(this.options.urlTemplate);
381
+ var urlResult = compileTemplate(this.options.urlTemplate);
375
382
  return urlResult(this.urlOptions());
376
383
  };
377
384
 
378
385
  ImageTile.prototype.errorUrl = function errorUrl () {
379
- var urlResult = template(this.options.errorUrlTemplate);
386
+ var urlResult = compileTemplate(this.options.errorUrlTemplate);
380
387
  return urlResult(this.urlOptions());
381
388
  };
382
389
 
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
-
@@ -5,12 +5,12 @@ import {
5
5
 
6
6
  import {
7
7
  Class,
8
- addClass,
9
8
  deepExtend,
10
9
  round,
11
10
  limitValue,
12
11
  hashKey,
13
- setDefaultOptions
12
+ setDefaultOptions,
13
+ isFunction
14
14
  } from '../../common';
15
15
 
16
16
  import { removeChildren } from '../utils';
@@ -20,9 +20,16 @@ import { Layer } from './layer';
20
20
  import TemplateService from '../../services/template-service';
21
21
 
22
22
  let math = Math,
23
- template = TemplateService.compile,
24
23
  Point = g.Point;
25
24
 
25
+ function compileTemplate(template) {
26
+ if (isFunction(template)) {
27
+ return template;
28
+ }
29
+
30
+ return TemplateService.compile(template);
31
+ }
32
+
26
33
  function roundPoint(point) {
27
34
  return new Point(round(point.x), round(point.y));
28
35
  }
@@ -306,11 +313,11 @@ export class ImageTile extends Class {
306
313
 
307
314
  createElement() {
308
315
  let el = document.createElement("img");
309
- addClass(el, "k-layer");
316
+ const size = this.options.size + "px";
310
317
  el.style.position = "absolute";
311
318
  el.style.display = "block";
312
- el.style.width = this.options.size;
313
- el.style.height = this.options.size;
319
+ el.style.width = el.style.maxWidth = size;
320
+ el.style.height = el.style.maxHeight = size;
314
321
 
315
322
  this.element = el;
316
323
 
@@ -353,12 +360,12 @@ export class ImageTile extends Class {
353
360
  }
354
361
 
355
362
  url() {
356
- let urlResult = template(this.options.urlTemplate);
363
+ let urlResult = compileTemplate(this.options.urlTemplate);
357
364
  return urlResult(this.urlOptions());
358
365
  }
359
366
 
360
367
  errorUrl() {
361
- let urlResult = template(this.options.errorUrlTemplate);
368
+ let urlResult = compileTemplate(this.options.errorUrlTemplate);
362
369
  return urlResult(this.urlOptions());
363
370
  }
364
371
 
@@ -1 +1,3 @@
1
1
  export { default as Map } from './map/map';
2
+ export { Location } from './map/location';
3
+ export { Extent } from './map/extent';