inviton-powerduck 0.0.148 → 0.0.149

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.
@@ -1,147 +1,147 @@
1
- /* Javascript plotting library for jQuery, version 0.8.3.
2
-
3
- Copyright (c) 2007-2014 IOLA and Ole Laursen.
4
- Licensed under the MIT license.
5
-
6
- */
7
- (function ($, e, t) {
8
- "$:nomunge";
9
- var i = [],
10
- n = ($.resize = $.extend($.resize, {})),
11
- a,
12
- r = false,
13
- s = "setTimeout",
14
- u = "resize",
15
- m = u + "-special-event",
16
- o = "pendingDelay",
17
- l = "activeDelay",
18
- f = "throttleWindow";
19
- n[o] = 200;
20
- n[l] = 20;
21
- n[f] = true;
22
- $.event.special[u] = {
23
- setup: function () {
24
- if (!n[f] && this[s]) {
25
- return false;
26
- }
27
- var e = $(this);
28
- i.push(this);
29
- e.data(m, { w: e.width(), h: e.height() });
30
- if (i.length === 1) {
31
- a = t;
32
- h();
33
- }
34
- },
35
- teardown: function () {
36
- if (!n[f] && this[s]) {
37
- return false;
38
- }
39
- var e = $(this);
40
- for (var t = i.length - 1; t >= 0; t--) {
41
- if (i[t] == this) {
42
- i.splice(t, 1);
43
- break;
44
- }
45
- }
46
- e.removeData(m);
47
- if (!i.length) {
48
- if (r) {
49
- cancelAnimationFrame(a);
50
- } else {
51
- clearTimeout(a);
52
- }
53
- a = null;
54
- }
55
- },
56
- add: function (e) {
57
- if (!n[f] && this[s]) {
58
- return false;
59
- }
60
- var i;
61
- function a(e, n, a) {
62
- var r = $(this),
63
- s = r.data(m) || {};
64
- s.w = n !== t ? n : r.width();
65
- s.h = a !== t ? a : r.height();
66
- i.apply(this, arguments);
67
- }
68
- if ($.isFunction(e)) {
69
- i = e;
70
- return a;
71
- } else {
72
- i = e.handler;
73
- e.handler = a;
74
- }
75
- },
76
- };
77
- function h(t) {
78
- if (r === true) {
79
- r = t || 1;
80
- }
81
- for (var s = i.length - 1; s >= 0; s--) {
82
- var l = $(i[s]);
83
- if (l[0] == e || l.is(":visible")) {
84
- var f = l.width(),
85
- c = l.height(),
86
- d = l.data(m);
87
- if (d && (f !== d.w || c !== d.h)) {
88
- l.trigger(u, [(d.w = f), (d.h = c)]);
89
- r = t || true;
90
- }
91
- } else {
92
- d = l.data(m);
93
- d.w = 0;
94
- d.h = 0;
95
- }
96
- }
97
- if (a !== null) {
98
- if (r && (t == null || t - r < 1e3)) {
99
- a = e.requestAnimationFrame(h);
100
- } else {
101
- a = setTimeout(h, n[o]);
102
- r = false;
103
- }
104
- }
105
- }
106
- if (!e.requestAnimationFrame) {
107
- e.requestAnimationFrame = (function () {
108
- return (
109
- e.webkitRequestAnimationFrame ||
110
- e.mozRequestAnimationFrame ||
111
- e.oRequestAnimationFrame ||
112
- e.msRequestAnimationFrame ||
113
- function (t, i) {
114
- return e.setTimeout(function () {
115
- t(new Date().getTime());
116
- }, n[l]);
117
- }
118
- );
119
- })();
120
- }
121
- if (!e.cancelAnimationFrame) {
122
- e.cancelAnimationFrame = (function () {
123
- return e.webkitCancelRequestAnimationFrame || e.mozCancelRequestAnimationFrame || e.oCancelRequestAnimationFrame || e.msCancelRequestAnimationFrame || clearTimeout;
124
- })();
125
- }
126
- })(jQuery, this);
127
- (function ($) {
128
- var options = {};
129
- function init(plot) {
130
- function onResize() {
131
- var placeholder = plot.getPlaceholder();
132
- if (placeholder.width() == 0 || placeholder.height() == 0) return;
133
- plot.resize();
134
- plot.setupGrid();
135
- plot.draw();
136
- }
137
- function bindEvents(plot, eventHolder) {
138
- plot.getPlaceholder().resize(onResize);
139
- }
140
- function shutdown(plot, eventHolder) {
141
- plot.getPlaceholder().unbind("resize", onResize);
142
- }
143
- plot.hooks.bindEvents.push(bindEvents);
144
- plot.hooks.shutdown.push(shutdown);
145
- }
146
- $.plot.plugins.push({ init: init, options: options, name: "resize", version: "1.0" });
147
- })(jQuery);
1
+ /* Javascript plotting library for jQuery, version 0.8.3.
2
+
3
+ Copyright (c) 2007-2014 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ */
7
+ (function ($, e, t) {
8
+ "$:nomunge";
9
+ var i = [],
10
+ n = ($.resize = $.extend($.resize, {})),
11
+ a,
12
+ r = false,
13
+ s = "setTimeout",
14
+ u = "resize",
15
+ m = u + "-special-event",
16
+ o = "pendingDelay",
17
+ l = "activeDelay",
18
+ f = "throttleWindow";
19
+ n[o] = 200;
20
+ n[l] = 20;
21
+ n[f] = true;
22
+ $.event.special[u] = {
23
+ setup: function () {
24
+ if (!n[f] && this[s]) {
25
+ return false;
26
+ }
27
+ var e = $(this);
28
+ i.push(this);
29
+ e.data(m, { w: e.width(), h: e.height() });
30
+ if (i.length === 1) {
31
+ a = t;
32
+ h();
33
+ }
34
+ },
35
+ teardown: function () {
36
+ if (!n[f] && this[s]) {
37
+ return false;
38
+ }
39
+ var e = $(this);
40
+ for (var t = i.length - 1; t >= 0; t--) {
41
+ if (i[t] == this) {
42
+ i.splice(t, 1);
43
+ break;
44
+ }
45
+ }
46
+ e.removeData(m);
47
+ if (!i.length) {
48
+ if (r) {
49
+ cancelAnimationFrame(a);
50
+ } else {
51
+ clearTimeout(a);
52
+ }
53
+ a = null;
54
+ }
55
+ },
56
+ add: function (e) {
57
+ if (!n[f] && this[s]) {
58
+ return false;
59
+ }
60
+ var i;
61
+ function a(e, n, a) {
62
+ var r = $(this),
63
+ s = r.data(m) || {};
64
+ s.w = n !== t ? n : r.width();
65
+ s.h = a !== t ? a : r.height();
66
+ i.apply(this, arguments);
67
+ }
68
+ if ($.isFunction(e)) {
69
+ i = e;
70
+ return a;
71
+ } else {
72
+ i = e.handler;
73
+ e.handler = a;
74
+ }
75
+ },
76
+ };
77
+ function h(t) {
78
+ if (r === true) {
79
+ r = t || 1;
80
+ }
81
+ for (var s = i.length - 1; s >= 0; s--) {
82
+ var l = $(i[s]);
83
+ if (l[0] == e || l.is(":visible")) {
84
+ var f = l.width(),
85
+ c = l.height(),
86
+ d = l.data(m);
87
+ if (d && (f !== d.w || c !== d.h)) {
88
+ l.trigger(u, [(d.w = f), (d.h = c)]);
89
+ r = t || true;
90
+ }
91
+ } else {
92
+ d = l.data(m);
93
+ d.w = 0;
94
+ d.h = 0;
95
+ }
96
+ }
97
+ if (a !== null) {
98
+ if (r && (t == null || t - r < 1e3)) {
99
+ a = e.requestAnimationFrame(h);
100
+ } else {
101
+ a = setTimeout(h, n[o]);
102
+ r = false;
103
+ }
104
+ }
105
+ }
106
+ if (!e.requestAnimationFrame) {
107
+ e.requestAnimationFrame = (function () {
108
+ return (
109
+ e.webkitRequestAnimationFrame ||
110
+ e.mozRequestAnimationFrame ||
111
+ e.oRequestAnimationFrame ||
112
+ e.msRequestAnimationFrame ||
113
+ function (t, i) {
114
+ return e.setTimeout(function () {
115
+ t(new Date().getTime());
116
+ }, n[l]);
117
+ }
118
+ );
119
+ })();
120
+ }
121
+ if (!e.cancelAnimationFrame) {
122
+ e.cancelAnimationFrame = (function () {
123
+ return e.webkitCancelRequestAnimationFrame || e.mozCancelRequestAnimationFrame || e.oCancelRequestAnimationFrame || e.msCancelRequestAnimationFrame || clearTimeout;
124
+ })();
125
+ }
126
+ })(jQuery, this);
127
+ (function ($) {
128
+ var options = {};
129
+ function init(plot) {
130
+ function onResize() {
131
+ var placeholder = plot.getPlaceholder();
132
+ if (placeholder.width() == 0 || placeholder.height() == 0) return;
133
+ plot.resize();
134
+ plot.setupGrid();
135
+ plot.draw();
136
+ }
137
+ function bindEvents(plot, eventHolder) {
138
+ plot.getPlaceholder().resize(onResize);
139
+ }
140
+ function shutdown(plot, eventHolder) {
141
+ plot.getPlaceholder().unbind("resize", onResize);
142
+ }
143
+ plot.hooks.bindEvents.push(bindEvents);
144
+ plot.hooks.shutdown.push(shutdown);
145
+ }
146
+ $.plot.plugins.push({ init: init, options: options, name: "resize", version: "1.0" });
147
+ })(jQuery);
@@ -1,104 +1,104 @@
1
- /* Javascript plotting library for jQuery, version 0.8.3.
2
-
3
- Copyright (c) 2007-2014 IOLA and Ole Laursen.
4
- Licensed under the MIT license.
5
-
6
- */
7
- (function ($) {
8
- var options = { series: { stack: null } };
9
- function init(plot) {
10
- function findMatchingSeries(s, allseries) {
11
- var res = null;
12
- for (var i = 0; i < allseries.length; ++i) {
13
- if (s == allseries[i]) break;
14
- if (allseries[i].stack == s.stack) res = allseries[i];
15
- }
16
- return res;
17
- }
18
- function stackData(plot, s, datapoints) {
19
- if (s.stack == null || s.stack === false) return;
20
- var other = findMatchingSeries(s, plot.getData());
21
- if (!other) return;
22
- var ps = datapoints.pointsize,
23
- points = datapoints.points,
24
- otherps = other.datapoints.pointsize,
25
- otherpoints = other.datapoints.points,
26
- newpoints = [],
27
- px,
28
- py,
29
- intery,
30
- qx,
31
- qy,
32
- bottom,
33
- withlines = s.lines.show,
34
- horizontal = s.bars.horizontal,
35
- withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
36
- withsteps = withlines && s.lines.steps,
37
- fromgap = true,
38
- keyOffset = horizontal ? 1 : 0,
39
- accumulateOffset = horizontal ? 0 : 1,
40
- i = 0,
41
- j = 0,
42
- l,
43
- m;
44
- while (true) {
45
- if (i >= points.length) break;
46
- l = newpoints.length;
47
- if (points[i] == null) {
48
- for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
49
- i += ps;
50
- } else if (j >= otherpoints.length) {
51
- if (!withlines) {
52
- for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
53
- }
54
- i += ps;
55
- } else if (otherpoints[j] == null) {
56
- for (m = 0; m < ps; ++m) newpoints.push(null);
57
- fromgap = true;
58
- j += otherps;
59
- } else {
60
- px = points[i + keyOffset];
61
- py = points[i + accumulateOffset];
62
- qx = otherpoints[j + keyOffset];
63
- qy = otherpoints[j + accumulateOffset];
64
- bottom = 0;
65
- if (px == qx) {
66
- for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
67
- newpoints[l + accumulateOffset] += qy;
68
- bottom = qy;
69
- i += ps;
70
- j += otherps;
71
- } else if (px > qx) {
72
- if (withlines && i > 0 && points[i - ps] != null) {
73
- intery = py + ((points[i - ps + accumulateOffset] - py) * (qx - px)) / (points[i - ps + keyOffset] - px);
74
- newpoints.push(qx);
75
- newpoints.push(intery + qy);
76
- for (m = 2; m < ps; ++m) newpoints.push(points[i + m]);
77
- bottom = qy;
78
- }
79
- j += otherps;
80
- } else {
81
- if (fromgap && withlines) {
82
- i += ps;
83
- continue;
84
- }
85
- for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
86
- if (withlines && j > 0 && otherpoints[j - otherps] != null)
87
- bottom = qy + ((otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx)) / (otherpoints[j - otherps + keyOffset] - qx);
88
- newpoints[l + accumulateOffset] += bottom;
89
- i += ps;
90
- }
91
- fromgap = false;
92
- if (l != newpoints.length && withbottom) newpoints[l + 2] += bottom;
93
- }
94
- if (withsteps && l != newpoints.length && l > 0 && newpoints[l] != null && newpoints[l] != newpoints[l - ps] && newpoints[l + 1] != newpoints[l - ps + 1]) {
95
- for (m = 0; m < ps; ++m) newpoints[l + ps + m] = newpoints[l + m];
96
- newpoints[l + 1] = newpoints[l - ps + 1];
97
- }
98
- }
99
- datapoints.points = newpoints;
100
- }
101
- plot.hooks.processDatapoints.push(stackData);
102
- }
103
- $.plot.plugins.push({ init: init, options: options, name: "stack", version: "1.2" });
104
- })(jQuery);
1
+ /* Javascript plotting library for jQuery, version 0.8.3.
2
+
3
+ Copyright (c) 2007-2014 IOLA and Ole Laursen.
4
+ Licensed under the MIT license.
5
+
6
+ */
7
+ (function ($) {
8
+ var options = { series: { stack: null } };
9
+ function init(plot) {
10
+ function findMatchingSeries(s, allseries) {
11
+ var res = null;
12
+ for (var i = 0; i < allseries.length; ++i) {
13
+ if (s == allseries[i]) break;
14
+ if (allseries[i].stack == s.stack) res = allseries[i];
15
+ }
16
+ return res;
17
+ }
18
+ function stackData(plot, s, datapoints) {
19
+ if (s.stack == null || s.stack === false) return;
20
+ var other = findMatchingSeries(s, plot.getData());
21
+ if (!other) return;
22
+ var ps = datapoints.pointsize,
23
+ points = datapoints.points,
24
+ otherps = other.datapoints.pointsize,
25
+ otherpoints = other.datapoints.points,
26
+ newpoints = [],
27
+ px,
28
+ py,
29
+ intery,
30
+ qx,
31
+ qy,
32
+ bottom,
33
+ withlines = s.lines.show,
34
+ horizontal = s.bars.horizontal,
35
+ withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),
36
+ withsteps = withlines && s.lines.steps,
37
+ fromgap = true,
38
+ keyOffset = horizontal ? 1 : 0,
39
+ accumulateOffset = horizontal ? 0 : 1,
40
+ i = 0,
41
+ j = 0,
42
+ l,
43
+ m;
44
+ while (true) {
45
+ if (i >= points.length) break;
46
+ l = newpoints.length;
47
+ if (points[i] == null) {
48
+ for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
49
+ i += ps;
50
+ } else if (j >= otherpoints.length) {
51
+ if (!withlines) {
52
+ for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
53
+ }
54
+ i += ps;
55
+ } else if (otherpoints[j] == null) {
56
+ for (m = 0; m < ps; ++m) newpoints.push(null);
57
+ fromgap = true;
58
+ j += otherps;
59
+ } else {
60
+ px = points[i + keyOffset];
61
+ py = points[i + accumulateOffset];
62
+ qx = otherpoints[j + keyOffset];
63
+ qy = otherpoints[j + accumulateOffset];
64
+ bottom = 0;
65
+ if (px == qx) {
66
+ for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
67
+ newpoints[l + accumulateOffset] += qy;
68
+ bottom = qy;
69
+ i += ps;
70
+ j += otherps;
71
+ } else if (px > qx) {
72
+ if (withlines && i > 0 && points[i - ps] != null) {
73
+ intery = py + ((points[i - ps + accumulateOffset] - py) * (qx - px)) / (points[i - ps + keyOffset] - px);
74
+ newpoints.push(qx);
75
+ newpoints.push(intery + qy);
76
+ for (m = 2; m < ps; ++m) newpoints.push(points[i + m]);
77
+ bottom = qy;
78
+ }
79
+ j += otherps;
80
+ } else {
81
+ if (fromgap && withlines) {
82
+ i += ps;
83
+ continue;
84
+ }
85
+ for (m = 0; m < ps; ++m) newpoints.push(points[i + m]);
86
+ if (withlines && j > 0 && otherpoints[j - otherps] != null)
87
+ bottom = qy + ((otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx)) / (otherpoints[j - otherps + keyOffset] - qx);
88
+ newpoints[l + accumulateOffset] += bottom;
89
+ i += ps;
90
+ }
91
+ fromgap = false;
92
+ if (l != newpoints.length && withbottom) newpoints[l + 2] += bottom;
93
+ }
94
+ if (withsteps && l != newpoints.length && l > 0 && newpoints[l] != null && newpoints[l] != newpoints[l - ps] && newpoints[l + 1] != newpoints[l - ps + 1]) {
95
+ for (m = 0; m < ps; ++m) newpoints[l + ps + m] = newpoints[l + m];
96
+ newpoints[l + 1] = newpoints[l - ps + 1];
97
+ }
98
+ }
99
+ datapoints.points = newpoints;
100
+ }
101
+ plot.hooks.processDatapoints.push(stackData);
102
+ }
103
+ $.plot.plugins.push({ init: init, options: options, name: "stack", version: "1.2" });
104
+ })(jQuery);
@@ -335,8 +335,16 @@ export default function FilterableSelect(this: any, args: FilterableSelectArgs):
335
335
  builder.build();
336
336
  } else {
337
337
  const listContainer = document.createElement('ul');
338
+ let lastClick = 0;
339
+
338
340
  listContainer.onclick = (e) => {
339
- this._handleItemClick(e.target);
341
+ const now = new Date().getTime();
342
+ const diff = now - lastClick;
343
+
344
+ if (diff > 150) {
345
+ lastClick = now;
346
+ this._handleItemClick(e.target);
347
+ }
340
348
  };
341
349
 
342
350
  const rebuildData = (filter: string) => {
@@ -405,7 +413,7 @@ export default function FilterableSelect(this: any, args: FilterableSelectArgs):
405
413
  targetElem.append(listContainer);
406
414
 
407
415
  let currentTimeOut = null;
408
- const searchInput = $(targetElem).find('input');
416
+ const searchInput = $(targetElem).find('input.lvb-filter-input');
409
417
  targetElem.querySelector('.lvb-filter-erase').onclick = () => {
410
418
  searchInput.val('');
411
419
  searchInput.trigger('change');