inviton-powerduck 0.0.173 → 0.0.174

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,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);
@@ -13,6 +13,7 @@ import { DialogResult, DialogUtils } from '../../common/dialog-utils';
13
13
  import { DialogIcons } from '../../common/enums/dialog-icons';
14
14
  import { sortBy } from '../../common/extensions/array-extensions';
15
15
  import { capitalize, latinize } from '../../common/extensions/string-extensions';
16
+ import StorageProvider from '../../common/local-storage-shim';
16
17
  import { QueryStringUtils } from '../../common/query-string-utils';
17
18
  import CheckboxUtils from '../../common/utils/checkbox-utils';
18
19
  import DropdownUtils from '../../common/utils/dropdown-utils';
@@ -213,7 +214,7 @@ class StorageHelper {
213
214
  }
214
215
 
215
216
  static getStoredState(id: string): StoredState {
216
- const retVal = localStorage.getItem(StorageHelper.getStorageKey(id));
217
+ const retVal = StorageProvider.getString(StorageHelper.getStorageKey(id));
217
218
  if (retVal != null) {
218
219
  try {
219
220
  return JSON.parse(retVal);
@@ -224,7 +225,7 @@ class StorageHelper {
224
225
  }
225
226
 
226
227
  static saveStoredState(id: string, state: StoredState): void {
227
- localStorage.setItem(StorageHelper.getStorageKey(id), JSON.stringify(state));
228
+ StorageProvider.setString(StorageHelper.getStorageKey(id), JSON.stringify(state));
228
229
  }
229
230
 
230
231
  static storeSortOrder(id: string, sortOrder: string[]) {