@progress/kendo-charts 1.22.0 → 1.23.0-dev.202201170838
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.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/common/keys.js +25 -0
- package/dist/es/common.js +1 -0
- package/dist/es/drawing-utils.js +27 -3
- package/dist/es/main.js +1 -0
- package/dist/es/map/attribution.js +158 -0
- package/dist/es/map/crs.js +277 -0
- package/dist/es/map/datums.js +16 -0
- package/dist/es/map/extent.js +129 -0
- package/dist/es/map/layers/bubble.js +185 -0
- package/dist/es/map/layers/layer.js +140 -0
- package/dist/es/map/layers/marker.js +347 -0
- package/dist/es/map/layers/shape.js +389 -0
- package/dist/es/map/layers/tile.js +491 -0
- package/dist/es/map/location.js +201 -0
- package/dist/es/map/map.js +945 -0
- package/dist/es/map/navigator.js +175 -0
- package/dist/es/map/scroller/draggable.js +454 -0
- package/dist/es/map/scroller/fx.js +119 -0
- package/dist/es/map/scroller/observable.js +175 -0
- package/dist/es/map/scroller/scroller.js +746 -0
- package/dist/es/map/scroller/user-events.js +713 -0
- package/dist/es/map/utils.js +450 -0
- package/dist/es/map/zoom.js +139 -0
- package/dist/es/map.js +1 -0
- package/dist/es/services/map-service.js +15 -0
- package/dist/es2015/common/keys.js +25 -0
- package/dist/es2015/common.js +1 -0
- package/dist/es2015/drawing-utils.js +43 -3
- package/dist/es2015/main.js +1 -0
- package/dist/es2015/map/attribution.js +148 -0
- package/dist/es2015/map/crs.js +233 -0
- package/dist/es2015/map/datums.js +16 -0
- package/dist/es2015/map/extent.js +115 -0
- package/dist/es2015/map/layers/bubble.js +167 -0
- package/dist/es2015/map/layers/layer.js +134 -0
- package/dist/es2015/map/layers/marker.js +327 -0
- package/dist/es2015/map/layers/shape.js +369 -0
- package/dist/es2015/map/layers/tile.js +465 -0
- package/dist/es2015/map/location.js +193 -0
- package/dist/es2015/map/map.js +915 -0
- package/dist/es2015/map/navigator.js +170 -0
- package/dist/es2015/map/scroller/draggable.js +418 -0
- package/dist/es2015/map/scroller/fx.js +112 -0
- package/dist/es2015/map/scroller/observable.js +165 -0
- package/dist/es2015/map/scroller/scroller.js +716 -0
- package/dist/es2015/map/scroller/user-events.js +695 -0
- package/dist/es2015/map/utils.js +450 -0
- package/dist/es2015/map/zoom.js +134 -0
- package/dist/es2015/map.js +1 -0
- package/dist/es2015/services/map-service.js +15 -0
- package/dist/npm/main.d.ts +1 -0
- package/dist/npm/main.js +6218 -342
- package/dist/npm/map.d.ts +4 -0
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Class
|
|
3
|
+
} from '../../common';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
proxy,
|
|
7
|
+
now
|
|
8
|
+
} from '../utils';
|
|
9
|
+
|
|
10
|
+
var extend = Object.assign;
|
|
11
|
+
|
|
12
|
+
function animationFrame(callback) {
|
|
13
|
+
window.requestAnimationFrame(callback);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export var Animation = (function (Class) {
|
|
17
|
+
function Animation() {
|
|
18
|
+
Class.call(this);
|
|
19
|
+
var that = this;
|
|
20
|
+
|
|
21
|
+
that._tickProxy = proxy(that._tick, that);
|
|
22
|
+
that._started = false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if ( Class ) Animation.__proto__ = Class;
|
|
26
|
+
Animation.prototype = Object.create( Class && Class.prototype );
|
|
27
|
+
Animation.prototype.constructor = Animation;
|
|
28
|
+
|
|
29
|
+
Animation.prototype.tick = function tick () { };
|
|
30
|
+
Animation.prototype.done = function done () { };
|
|
31
|
+
Animation.prototype.onEnd = function onEnd () { };
|
|
32
|
+
Animation.prototype.onCancel = function onCancel () { };
|
|
33
|
+
|
|
34
|
+
Animation.prototype.start = function start () {
|
|
35
|
+
if (!this.enabled()) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (!this.done()) {
|
|
40
|
+
this._started = true;
|
|
41
|
+
animationFrame(this._tickProxy);
|
|
42
|
+
} else {
|
|
43
|
+
this.onEnd();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
Animation.prototype.enabled = function enabled () {
|
|
48
|
+
return true;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
Animation.prototype.cancel = function cancel () {
|
|
52
|
+
this._started = false;
|
|
53
|
+
this.onCancel();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
Animation.prototype._tick = function _tick () {
|
|
57
|
+
var that = this;
|
|
58
|
+
|
|
59
|
+
if (!that._started) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
that.tick();
|
|
64
|
+
|
|
65
|
+
if (!that.done()) {
|
|
66
|
+
animationFrame(that._tickProxy);
|
|
67
|
+
} else {
|
|
68
|
+
that._started = false;
|
|
69
|
+
that.onEnd();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return Animation;
|
|
74
|
+
}(Class));
|
|
75
|
+
|
|
76
|
+
export var Transition = (function (Animation) {
|
|
77
|
+
function Transition(options) {
|
|
78
|
+
Animation.call(this);
|
|
79
|
+
extend(this, options);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if ( Animation ) Transition.__proto__ = Animation;
|
|
83
|
+
Transition.prototype = Object.create( Animation && Animation.prototype );
|
|
84
|
+
Transition.prototype.constructor = Transition;
|
|
85
|
+
|
|
86
|
+
Transition.prototype.done = function done () {
|
|
87
|
+
return this.timePassed() >= this.duration;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
Transition.prototype.timePassed = function timePassed () {
|
|
91
|
+
return Math.min(this.duration, now() - this.startDate);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
Transition.prototype.moveTo = function moveTo (options) {
|
|
95
|
+
var that = this,
|
|
96
|
+
movable = that.movable;
|
|
97
|
+
|
|
98
|
+
that.initial = movable[that.axis];
|
|
99
|
+
that.delta = options.location - that.initial;
|
|
100
|
+
that.duration = typeof options.duration === 'number' ? options.duration : 300;
|
|
101
|
+
that.tick = that._easeProxy(options.ease);
|
|
102
|
+
that.startDate = now();
|
|
103
|
+
that.start();
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
Transition.prototype._easeProxy = function _easeProxy (ease) {
|
|
107
|
+
var that = this;
|
|
108
|
+
|
|
109
|
+
return function() {
|
|
110
|
+
that.movable.moveAxis(that.axis, ease(that.timePassed(), that.initial, that.delta, that.duration));
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
Transition.easeOutExpo = function easeOutExpo (t, b, c, d) {
|
|
115
|
+
return t === d ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return Transition;
|
|
119
|
+
}(Animation));
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Class
|
|
3
|
+
} from '../../common';
|
|
4
|
+
|
|
5
|
+
var STRING = "string";
|
|
6
|
+
var FUNCTION = "function";
|
|
7
|
+
|
|
8
|
+
var preventDefault = function() {
|
|
9
|
+
this._defaultPrevented = true;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
var isDefaultPrevented = function() {
|
|
13
|
+
return this._defaultPrevented === true;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export var Observable = (function (Class) {
|
|
17
|
+
function Observable() {
|
|
18
|
+
Class.call(this);
|
|
19
|
+
this._events = {};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if ( Class ) Observable.__proto__ = Class;
|
|
23
|
+
Observable.prototype = Object.create( Class && Class.prototype );
|
|
24
|
+
Observable.prototype.constructor = Observable;
|
|
25
|
+
|
|
26
|
+
Observable.prototype.destroy = function destroy () {
|
|
27
|
+
this.unbind();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
Observable.prototype.bind = function bind (event, handlers, one) {
|
|
31
|
+
var that = this,
|
|
32
|
+
idx,
|
|
33
|
+
eventNames = typeof event === STRING ? [event] : event || [],
|
|
34
|
+
length,
|
|
35
|
+
original,
|
|
36
|
+
handler,
|
|
37
|
+
handlersIsFunction = typeof handlers === FUNCTION,
|
|
38
|
+
events;
|
|
39
|
+
|
|
40
|
+
if (handlers === undefined) {
|
|
41
|
+
for (idx in event) {
|
|
42
|
+
that.bind(idx, event[idx]);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return that;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* eslint-disable no-loop-func */
|
|
49
|
+
var loop = function ( ) {
|
|
50
|
+
var eventName = eventNames[idx];
|
|
51
|
+
|
|
52
|
+
handler = handlersIsFunction ? handlers : handlers[eventName];
|
|
53
|
+
|
|
54
|
+
if (handler) {
|
|
55
|
+
if (one) {
|
|
56
|
+
original = handler;
|
|
57
|
+
handler = function() {
|
|
58
|
+
that.unbind(eventName, handler);
|
|
59
|
+
original.apply(that, arguments);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
handler.original = original;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
events = that._events[eventName] = that._events[eventName] || [];
|
|
66
|
+
events.push(handler);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
for (idx = 0, length = eventNames.length; idx < length; idx++) loop( );
|
|
71
|
+
/* eslint-enable no-loop-func */
|
|
72
|
+
|
|
73
|
+
return that;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
Observable.prototype.one = function one (eventNames, handlers) {
|
|
77
|
+
return this.bind(eventNames, handlers, true);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
Observable.prototype.first = function first (eventName, handlers) {
|
|
81
|
+
var that = this,
|
|
82
|
+
idx,
|
|
83
|
+
eventNames = typeof eventName === STRING ? [eventName] : eventName,
|
|
84
|
+
length,
|
|
85
|
+
handler,
|
|
86
|
+
handlersIsFunction = typeof handlers === FUNCTION,
|
|
87
|
+
events;
|
|
88
|
+
|
|
89
|
+
for (idx = 0, length = eventNames.length; idx < length; idx++) {
|
|
90
|
+
var eventName$1 = eventNames[idx];
|
|
91
|
+
|
|
92
|
+
handler = handlersIsFunction ? handlers : handlers[eventName$1];
|
|
93
|
+
|
|
94
|
+
if (handler) {
|
|
95
|
+
events = that._events[eventName$1] = that._events[eventName$1] || [];
|
|
96
|
+
events.unshift(handler);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return that;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
Observable.prototype.trigger = function trigger (eventName, eventArgs) {
|
|
104
|
+
var that = this,
|
|
105
|
+
events = that._events[eventName],
|
|
106
|
+
idx,
|
|
107
|
+
length;
|
|
108
|
+
|
|
109
|
+
if (events) {
|
|
110
|
+
var e = eventArgs || {};
|
|
111
|
+
|
|
112
|
+
e.sender = that;
|
|
113
|
+
|
|
114
|
+
e._defaultPrevented = false;
|
|
115
|
+
|
|
116
|
+
e.preventDefault = preventDefault;
|
|
117
|
+
|
|
118
|
+
e.isDefaultPrevented = isDefaultPrevented;
|
|
119
|
+
|
|
120
|
+
events = events.slice();
|
|
121
|
+
|
|
122
|
+
for (idx = 0, length = events.length; idx < length; idx++) {
|
|
123
|
+
events[idx].call(that, e);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return e._defaultPrevented === true;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return false;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
Observable.prototype.unbind = function unbind (eventName, handler) {
|
|
133
|
+
var that = this,
|
|
134
|
+
events = that._events[eventName],
|
|
135
|
+
idx;
|
|
136
|
+
|
|
137
|
+
if (eventName === undefined) {
|
|
138
|
+
that._events = {};
|
|
139
|
+
} else if (events) {
|
|
140
|
+
if (handler) {
|
|
141
|
+
for (idx = events.length - 1; idx >= 0; idx--) {
|
|
142
|
+
if (events[idx] === handler || events[idx].original === handler) {
|
|
143
|
+
events.splice(idx, 1);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
that._events[eventName] = [];
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return that;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
Observable.prototype._setEvents = function _setEvents (options) {
|
|
155
|
+
var this$1 = this;
|
|
156
|
+
|
|
157
|
+
var length = (this.events || []).length;
|
|
158
|
+
|
|
159
|
+
for (var idx = 0; idx < length; idx ++) {
|
|
160
|
+
var e = this$1.events[idx];
|
|
161
|
+
|
|
162
|
+
if (this$1.options[e] && options[e]) {
|
|
163
|
+
this$1.unbind(e, this$1.options[e]);
|
|
164
|
+
|
|
165
|
+
if (this$1._events && this$1._events[e]) {
|
|
166
|
+
delete this$1._events[e];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
this.bind(this.events, options);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
return Observable;
|
|
175
|
+
}(Class));
|