vis-util 5.0.2 → 5.0.3
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/declarations/deep-object-assign.d.ts +0 -2
- package/declarations/deep-object-assign.d.ts.map +1 -1
- package/declarations/random/alea.d.ts +0 -1
- package/declarations/random/alea.d.ts.map +1 -1
- package/declarations/shared/configurator-types.d.ts +2 -1
- package/declarations/shared/configurator-types.d.ts.map +1 -1
- package/declarations/util.d.ts +0 -58
- package/declarations/util.d.ts.map +1 -1
- package/esnext/esm/vis-util.js +52 -123
- package/esnext/esm/vis-util.js.map +1 -1
- package/esnext/esm/vis-util.min.js +3 -3
- package/esnext/esm/vis-util.min.js.map +1 -1
- package/esnext/umd/vis-util.js +61 -132
- package/esnext/umd/vis-util.js.map +1 -1
- package/esnext/umd/vis-util.min.js +2 -2
- package/esnext/umd/vis-util.min.js.map +1 -1
- package/package.json +24 -27
- package/peer/esm/vis-util.js +2282 -1901
- package/peer/esm/vis-util.js.map +1 -1
- package/peer/esm/vis-util.min.js +4 -5
- package/peer/esm/vis-util.min.js.map +1 -1
- package/peer/umd/vis-util.js +11208 -10827
- package/peer/umd/vis-util.js.map +1 -1
- package/peer/umd/vis-util.min.js +8 -9
- package/peer/umd/vis-util.min.js.map +1 -1
- package/standalone/esm/vis-util.js +2282 -1901
- package/standalone/esm/vis-util.js.map +1 -1
- package/standalone/esm/vis-util.min.js +4 -5
- package/standalone/esm/vis-util.min.js.map +1 -1
- package/standalone/umd/vis-util.js +11208 -10827
- package/standalone/umd/vis-util.js.map +1 -1
- package/standalone/umd/vis-util.min.js +8 -9
- package/standalone/umd/vis-util.min.js.map +1 -1
package/esnext/esm/vis-util.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* utilitie collection for visjs
|
|
6
6
|
*
|
|
7
|
-
* @version 5.0.
|
|
8
|
-
* @date
|
|
7
|
+
* @version 5.0.3
|
|
8
|
+
* @date 2022-03-04T18:53:16.725Z
|
|
9
9
|
*
|
|
10
10
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
11
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -36,7 +36,6 @@ const DELETE = Symbol("DELETE");
|
|
|
36
36
|
*
|
|
37
37
|
* @param base - The base object that fullfils the whole interface T.
|
|
38
38
|
* @param updates - Updates that may change or delete props.
|
|
39
|
-
*
|
|
40
39
|
* @returns A brand new instance with all the supplied objects deeply merged.
|
|
41
40
|
*/
|
|
42
41
|
function pureDeepObjectAssign(base, ...updates) {
|
|
@@ -46,7 +45,6 @@ function pureDeepObjectAssign(base, ...updates) {
|
|
|
46
45
|
* Deep version of object assign with additional deleting by the DELETE symbol.
|
|
47
46
|
*
|
|
48
47
|
* @param values - Objects to be deeply merged.
|
|
49
|
-
*
|
|
50
48
|
* @returns The first object from values.
|
|
51
49
|
*/
|
|
52
50
|
function deepObjectAssign(...values) {
|
|
@@ -59,9 +57,7 @@ function deepObjectAssign(...values) {
|
|
|
59
57
|
*
|
|
60
58
|
* @remarks
|
|
61
59
|
* This doesn't strip the DELETE symbols so they may end up in the final object.
|
|
62
|
-
*
|
|
63
60
|
* @param values - Objects to be deeply merged.
|
|
64
|
-
*
|
|
65
61
|
* @returns The first object from values.
|
|
66
62
|
*/
|
|
67
63
|
function deepObjectAssignNonentry(...values) {
|
|
@@ -96,7 +92,6 @@ function deepObjectAssignNonentry(...values) {
|
|
|
96
92
|
* Deep clone given object or array. In case of primitive simply return.
|
|
97
93
|
*
|
|
98
94
|
* @param a - Anything.
|
|
99
|
-
*
|
|
100
95
|
* @returns Deep cloned object/array or unchanged a.
|
|
101
96
|
*/
|
|
102
97
|
function clone(a) {
|
|
@@ -139,7 +134,6 @@ function stripDelete(a) {
|
|
|
139
134
|
*
|
|
140
135
|
* @param seed - All supplied arguments will be used as a seed. In case nothing
|
|
141
136
|
* is supplied the current time will be used to seed the generator.
|
|
142
|
-
*
|
|
143
137
|
* @returns A ready to use seeded generator.
|
|
144
138
|
*/
|
|
145
139
|
function Alea(...seed) {
|
|
@@ -149,7 +143,6 @@ function Alea(...seed) {
|
|
|
149
143
|
* An implementation of [[Alea]] without user input validation.
|
|
150
144
|
*
|
|
151
145
|
* @param seed - The data that will be used to seed the generator.
|
|
152
|
-
*
|
|
153
146
|
* @returns A ready to use seeded generator.
|
|
154
147
|
*/
|
|
155
148
|
function AleaImplementation(seed) {
|
|
@@ -173,7 +166,6 @@ function AleaImplementation(seed) {
|
|
|
173
166
|
* random numbers.
|
|
174
167
|
*
|
|
175
168
|
* @param seed - Arbitrary data that will be used as the seed.
|
|
176
|
-
*
|
|
177
169
|
* @returns Three numbers to use as initial values for [[AleaImplementation]].
|
|
178
170
|
*/
|
|
179
171
|
function mashSeed(...seed) {
|
|
@@ -245,7 +237,7 @@ function hammerMock() {
|
|
|
245
237
|
};
|
|
246
238
|
}
|
|
247
239
|
|
|
248
|
-
const Hammer =
|
|
240
|
+
const Hammer$1 =
|
|
249
241
|
typeof window !== "undefined"
|
|
250
242
|
? window.Hammer || RealHammer
|
|
251
243
|
: function () {
|
|
@@ -264,7 +256,7 @@ const Hammer =
|
|
|
264
256
|
* @param {Element} container
|
|
265
257
|
* @class Activator
|
|
266
258
|
*/
|
|
267
|
-
function Activator(container) {
|
|
259
|
+
function Activator$1(container) {
|
|
268
260
|
this._cleanupQueue = [];
|
|
269
261
|
|
|
270
262
|
this.active = false;
|
|
@@ -281,7 +273,7 @@ function Activator(container) {
|
|
|
281
273
|
this._dom.overlay.parentNode.removeChild(this._dom.overlay);
|
|
282
274
|
});
|
|
283
275
|
|
|
284
|
-
const hammer = Hammer(this._dom.overlay);
|
|
276
|
+
const hammer = Hammer$1(this._dom.overlay);
|
|
285
277
|
hammer.on("tap", this._onTapOverlay.bind(this));
|
|
286
278
|
this._cleanupQueue.push(() => {
|
|
287
279
|
hammer.destroy();
|
|
@@ -332,15 +324,15 @@ function Activator(container) {
|
|
|
332
324
|
}
|
|
333
325
|
|
|
334
326
|
// turn into an event emitter
|
|
335
|
-
Emitter(Activator.prototype);
|
|
327
|
+
Emitter(Activator$1.prototype);
|
|
336
328
|
|
|
337
329
|
// The currently active activator
|
|
338
|
-
Activator.current = null;
|
|
330
|
+
Activator$1.current = null;
|
|
339
331
|
|
|
340
332
|
/**
|
|
341
333
|
* Destroy the activator. Cleans up all created DOM and event listeners
|
|
342
334
|
*/
|
|
343
|
-
Activator.prototype.destroy = function () {
|
|
335
|
+
Activator$1.prototype.destroy = function () {
|
|
344
336
|
this.deactivate();
|
|
345
337
|
|
|
346
338
|
for (const callback of this._cleanupQueue.splice(0).reverse()) {
|
|
@@ -352,12 +344,12 @@ Activator.prototype.destroy = function () {
|
|
|
352
344
|
* Activate the element
|
|
353
345
|
* Overlay is hidden, element is decorated with a blue shadow border
|
|
354
346
|
*/
|
|
355
|
-
Activator.prototype.activate = function () {
|
|
347
|
+
Activator$1.prototype.activate = function () {
|
|
356
348
|
// we allow only one active activator at a time
|
|
357
|
-
if (Activator.current) {
|
|
358
|
-
Activator.current.deactivate();
|
|
349
|
+
if (Activator$1.current) {
|
|
350
|
+
Activator$1.current.deactivate();
|
|
359
351
|
}
|
|
360
|
-
Activator.current = this;
|
|
352
|
+
Activator$1.current = this;
|
|
361
353
|
|
|
362
354
|
this.active = true;
|
|
363
355
|
this._dom.overlay.style.display = "none";
|
|
@@ -375,7 +367,7 @@ Activator.prototype.activate = function () {
|
|
|
375
367
|
* Deactivate the element
|
|
376
368
|
* Overlay is displayed on top of the element
|
|
377
369
|
*/
|
|
378
|
-
Activator.prototype.deactivate = function () {
|
|
370
|
+
Activator$1.prototype.deactivate = function () {
|
|
379
371
|
this.active = false;
|
|
380
372
|
this._dom.overlay.style.display = "block";
|
|
381
373
|
this._dom.container.classList.remove("vis-active");
|
|
@@ -391,7 +383,7 @@ Activator.prototype.deactivate = function () {
|
|
|
391
383
|
* @param {Event} event The event
|
|
392
384
|
* @private
|
|
393
385
|
*/
|
|
394
|
-
Activator.prototype._onTapOverlay = function (event) {
|
|
386
|
+
Activator$1.prototype._onTapOverlay = function (event) {
|
|
395
387
|
// activate the container
|
|
396
388
|
this.activate();
|
|
397
389
|
event.srcEvent.stopPropagation();
|
|
@@ -431,7 +423,6 @@ const rgbaRE = /^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25
|
|
|
431
423
|
* Test whether given object is a number.
|
|
432
424
|
*
|
|
433
425
|
* @param value - Input value of unknown type.
|
|
434
|
-
*
|
|
435
426
|
* @returns True if number, false otherwise.
|
|
436
427
|
*/
|
|
437
428
|
function isNumber(value) {
|
|
@@ -457,7 +448,6 @@ function recursiveDOMDelete(DOMobject) {
|
|
|
457
448
|
* Test whether given object is a string.
|
|
458
449
|
*
|
|
459
450
|
* @param value - Input value of unknown type.
|
|
460
|
-
*
|
|
461
451
|
* @returns True if string, false otherwise.
|
|
462
452
|
*/
|
|
463
453
|
function isString(value) {
|
|
@@ -467,7 +457,6 @@ function isString(value) {
|
|
|
467
457
|
* Test whether given object is a object (not primitive or null).
|
|
468
458
|
*
|
|
469
459
|
* @param value - Input value of unknown type.
|
|
470
|
-
*
|
|
471
460
|
* @returns True if not null object, false otherwise.
|
|
472
461
|
*/
|
|
473
462
|
function isObject(value) {
|
|
@@ -477,7 +466,6 @@ function isObject(value) {
|
|
|
477
466
|
* Test whether given object is a Date, or a String containing a Date.
|
|
478
467
|
*
|
|
479
468
|
* @param value - Input value of unknown type.
|
|
480
|
-
*
|
|
481
469
|
* @returns True if Date instance or string date representation, false otherwise.
|
|
482
470
|
*/
|
|
483
471
|
function isDate(value) {
|
|
@@ -554,7 +542,6 @@ function fillIfDefined(a, b, allowDeletion = false) {
|
|
|
554
542
|
*
|
|
555
543
|
* @param target - The target object to copy to.
|
|
556
544
|
* @param source - The source object from which to copy properties.
|
|
557
|
-
*
|
|
558
545
|
* @returns The target object.
|
|
559
546
|
*/
|
|
560
547
|
const extend = Object.assign;
|
|
@@ -563,11 +550,9 @@ const extend = Object.assign;
|
|
|
563
550
|
*
|
|
564
551
|
* @remarks
|
|
565
552
|
* Only properties with defined values are copied.
|
|
566
|
-
*
|
|
567
553
|
* @param props - Properties to be copied to a.
|
|
568
554
|
* @param a - The target.
|
|
569
555
|
* @param others - The sources.
|
|
570
|
-
*
|
|
571
556
|
* @returns Argument a.
|
|
572
557
|
*/
|
|
573
558
|
function selectiveExtend(props, a, ...others) {
|
|
@@ -592,12 +577,10 @@ function selectiveExtend(props, a, ...others) {
|
|
|
592
577
|
* Previous version of this routine implied that multiple source objects could
|
|
593
578
|
* be used; however, the implementation was **wrong**. Since multiple (\>1)
|
|
594
579
|
* sources weren't used anywhere in the `vis.js` code, this has been removed
|
|
595
|
-
*
|
|
596
580
|
* @param props - Names of first-level properties to copy over.
|
|
597
581
|
* @param a - Target object.
|
|
598
582
|
* @param b - Source object.
|
|
599
583
|
* @param allowDeletion - If true, delete property in a if explicitly set to null in b.
|
|
600
|
-
*
|
|
601
584
|
* @returns Argument a.
|
|
602
585
|
*/
|
|
603
586
|
function selectiveDeepExtend(props, a, b, allowDeletion = false) {
|
|
@@ -637,13 +620,11 @@ function selectiveDeepExtend(props, a, b, allowDeletion = false) {
|
|
|
637
620
|
* The properties of `b` are considered for copying. Properties which are
|
|
638
621
|
* themselves objects are are also extended. Only properties with defined
|
|
639
622
|
* values are copied.
|
|
640
|
-
*
|
|
641
623
|
* @param propsToExclude - Names of properties which should *not* be copied.
|
|
642
624
|
* @param a - Object to extend.
|
|
643
625
|
* @param b - Object to take properties from for extension.
|
|
644
626
|
* @param allowDeletion - If true, delete properties in a that are explicitly
|
|
645
627
|
* set to null in b.
|
|
646
|
-
*
|
|
647
628
|
* @returns Argument a.
|
|
648
629
|
*/
|
|
649
630
|
function selectiveNotDeepExtend(propsToExclude, a, b, allowDeletion = false) {
|
|
@@ -691,7 +672,6 @@ function selectiveNotDeepExtend(propsToExclude, a, b, allowDeletion = false) {
|
|
|
691
672
|
* (That is the options objects that inherit from others will also get the
|
|
692
673
|
* inherited options).
|
|
693
674
|
* @param allowDeletion - If true, the values of fields that are null will be deleted.
|
|
694
|
-
*
|
|
695
675
|
* @returns Argument a.
|
|
696
676
|
*/
|
|
697
677
|
function deepExtend(a, b, protoExtend = false, allowDeletion = false) {
|
|
@@ -727,7 +707,6 @@ function deepExtend(a, b, protoExtend = false, allowDeletion = false) {
|
|
|
727
707
|
*
|
|
728
708
|
* @param a - First array.
|
|
729
709
|
* @param b - Second array.
|
|
730
|
-
*
|
|
731
710
|
* @returns True if both arrays have the same length and same elements (1 = '1').
|
|
732
711
|
*/
|
|
733
712
|
function equalArray(a, b) {
|
|
@@ -745,7 +724,6 @@ function equalArray(a, b) {
|
|
|
745
724
|
* Get the type of an object, for example exports.getType([]) returns 'Array'.
|
|
746
725
|
*
|
|
747
726
|
* @param object - Input value of unknown type.
|
|
748
|
-
*
|
|
749
727
|
* @returns Detected type.
|
|
750
728
|
*/
|
|
751
729
|
function getType(object) {
|
|
@@ -790,7 +768,6 @@ function getType(object) {
|
|
|
790
768
|
*
|
|
791
769
|
* @param arr - First part.
|
|
792
770
|
* @param newValue - The value to be aadded into the array.
|
|
793
|
-
*
|
|
794
771
|
* @returns A new array with all items from arr and newValue (which is last).
|
|
795
772
|
*/
|
|
796
773
|
function copyAndExtendArray(arr, newValue) {
|
|
@@ -800,7 +777,6 @@ function copyAndExtendArray(arr, newValue) {
|
|
|
800
777
|
* Used to extend an array and copy it. This is used to propagate paths recursively.
|
|
801
778
|
*
|
|
802
779
|
* @param arr - The array to be copied.
|
|
803
|
-
*
|
|
804
780
|
* @returns Shallow copy of arr.
|
|
805
781
|
*/
|
|
806
782
|
function copyArray(arr) {
|
|
@@ -810,7 +786,6 @@ function copyArray(arr) {
|
|
|
810
786
|
* Retrieve the absolute left value of a DOM element.
|
|
811
787
|
*
|
|
812
788
|
* @param elem - A dom element, for example a div.
|
|
813
|
-
*
|
|
814
789
|
* @returns The absolute left position of this element in the browser page.
|
|
815
790
|
*/
|
|
816
791
|
function getAbsoluteLeft(elem) {
|
|
@@ -820,7 +795,6 @@ function getAbsoluteLeft(elem) {
|
|
|
820
795
|
* Retrieve the absolute right value of a DOM element.
|
|
821
796
|
*
|
|
822
797
|
* @param elem - A dom element, for example a div.
|
|
823
|
-
*
|
|
824
798
|
* @returns The absolute right position of this element in the browser page.
|
|
825
799
|
*/
|
|
826
800
|
function getAbsoluteRight(elem) {
|
|
@@ -830,7 +804,6 @@ function getAbsoluteRight(elem) {
|
|
|
830
804
|
* Retrieve the absolute top value of a DOM element.
|
|
831
805
|
*
|
|
832
806
|
* @param elem - A dom element, for example a div.
|
|
833
|
-
*
|
|
834
807
|
* @returns The absolute top position of this element in the browser page.
|
|
835
808
|
*/
|
|
836
809
|
function getAbsoluteTop(elem) {
|
|
@@ -893,7 +866,6 @@ function forEach(object, callback) {
|
|
|
893
866
|
* Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.
|
|
894
867
|
*
|
|
895
868
|
* @param o - Object that contains the properties and methods.
|
|
896
|
-
*
|
|
897
869
|
* @returns An array of unordered values.
|
|
898
870
|
*/
|
|
899
871
|
const toArray = Object.values;
|
|
@@ -903,7 +875,6 @@ const toArray = Object.values;
|
|
|
903
875
|
* @param object - The object whose property will be updated.
|
|
904
876
|
* @param key - Name of the property to be updated.
|
|
905
877
|
* @param value - The new value to be assigned.
|
|
906
|
-
*
|
|
907
878
|
* @returns Whether the value was updated (true) or already strictly the same in the original object (false).
|
|
908
879
|
*/
|
|
909
880
|
function updateProperty(object, key, value) {
|
|
@@ -919,7 +890,6 @@ function updateProperty(object, key, value) {
|
|
|
919
890
|
* Throttle the given function to be only executed once per animation frame.
|
|
920
891
|
*
|
|
921
892
|
* @param fn - The original function.
|
|
922
|
-
*
|
|
923
893
|
* @returns The throttled function.
|
|
924
894
|
*/
|
|
925
895
|
function throttle(fn) {
|
|
@@ -1003,7 +973,6 @@ function preventDefault(event) {
|
|
|
1003
973
|
* Get HTML element which is the target of the event.
|
|
1004
974
|
*
|
|
1005
975
|
* @param event - The event.
|
|
1006
|
-
*
|
|
1007
976
|
* @returns The element or null if not obtainable.
|
|
1008
977
|
*/
|
|
1009
978
|
function getTarget(event = window.event) {
|
|
@@ -1034,7 +1003,6 @@ function getTarget(event = window.event) {
|
|
|
1034
1003
|
*
|
|
1035
1004
|
* @param element - The element to be tested.
|
|
1036
1005
|
* @param parent - The ancestor (not necessarily parent) of the element.
|
|
1037
|
-
*
|
|
1038
1006
|
* @returns True if parent is an ancestor of the element, false otherwise.
|
|
1039
1007
|
*/
|
|
1040
1008
|
function hasParent(element, parent) {
|
|
@@ -1058,7 +1026,6 @@ const option = {
|
|
|
1058
1026
|
*
|
|
1059
1027
|
* @param value - Value to be converted intoboolean, a function will be executed as `(() => unknown)`.
|
|
1060
1028
|
* @param defaultValue - If the value or the return value of the function == null then this will be returned.
|
|
1061
|
-
*
|
|
1062
1029
|
* @returns Corresponding boolean value, if none then the default value, if none then null.
|
|
1063
1030
|
*/
|
|
1064
1031
|
asBoolean(value, defaultValue) {
|
|
@@ -1075,7 +1042,6 @@ const option = {
|
|
|
1075
1042
|
*
|
|
1076
1043
|
* @param value - Value to be converted intonumber, a function will be executed as `(() => unknown)`.
|
|
1077
1044
|
* @param defaultValue - If the value or the return value of the function == null then this will be returned.
|
|
1078
|
-
*
|
|
1079
1045
|
* @returns Corresponding **boxed** number value, if none then the default value, if none then null.
|
|
1080
1046
|
*/
|
|
1081
1047
|
asNumber(value, defaultValue) {
|
|
@@ -1092,7 +1058,6 @@ const option = {
|
|
|
1092
1058
|
*
|
|
1093
1059
|
* @param value - Value to be converted intostring, a function will be executed as `(() => unknown)`.
|
|
1094
1060
|
* @param defaultValue - If the value or the return value of the function == null then this will be returned.
|
|
1095
|
-
*
|
|
1096
1061
|
* @returns Corresponding **boxed** string value, if none then the default value, if none then null.
|
|
1097
1062
|
*/
|
|
1098
1063
|
asString(value, defaultValue) {
|
|
@@ -1109,7 +1074,6 @@ const option = {
|
|
|
1109
1074
|
*
|
|
1110
1075
|
* @param value - Value to be converted intosize, a function will be executed as `(() => unknown)`.
|
|
1111
1076
|
* @param defaultValue - If the value or the return value of the function == null then this will be returned.
|
|
1112
|
-
*
|
|
1113
1077
|
* @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.
|
|
1114
1078
|
*/
|
|
1115
1079
|
asSize(value, defaultValue) {
|
|
@@ -1131,7 +1095,6 @@ const option = {
|
|
|
1131
1095
|
*
|
|
1132
1096
|
* @param value - Value to be converted into DOM Element, a function will be executed as `(() => unknown)`.
|
|
1133
1097
|
* @param defaultValue - If the value or the return value of the function == null then this will be returned.
|
|
1134
|
-
*
|
|
1135
1098
|
* @returns The DOM Element, if none then the default value, if none then null.
|
|
1136
1099
|
*/
|
|
1137
1100
|
asElement(value, defaultValue) {
|
|
@@ -1146,9 +1109,7 @@ const option = {
|
|
|
1146
1109
|
*
|
|
1147
1110
|
* @remarks
|
|
1148
1111
|
* {@link http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb}
|
|
1149
|
-
*
|
|
1150
1112
|
* @param hex - Hex color string (3 or 6 digits, with or without #).
|
|
1151
|
-
*
|
|
1152
1113
|
* @returns RGB color object.
|
|
1153
1114
|
*/
|
|
1154
1115
|
function hexToRGB(hex) {
|
|
@@ -1183,7 +1144,6 @@ function hexToRGB(hex) {
|
|
|
1183
1144
|
*
|
|
1184
1145
|
* @param color - The color string (hex, RGB, RGBA).
|
|
1185
1146
|
* @param opacity - The new opacity.
|
|
1186
|
-
*
|
|
1187
1147
|
* @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.
|
|
1188
1148
|
*/
|
|
1189
1149
|
function overrideOpacity(color, opacity) {
|
|
@@ -1213,7 +1173,6 @@ function overrideOpacity(color, opacity) {
|
|
|
1213
1173
|
* @param red - Red channel.
|
|
1214
1174
|
* @param green - Green channel.
|
|
1215
1175
|
* @param blue - Blue channel.
|
|
1216
|
-
*
|
|
1217
1176
|
* @returns Hex color string (for example: '#0acdc0').
|
|
1218
1177
|
*/
|
|
1219
1178
|
function RGBToHex(red, green, blue) {
|
|
@@ -1224,7 +1183,6 @@ function RGBToHex(red, green, blue) {
|
|
|
1224
1183
|
*
|
|
1225
1184
|
* @param inputColor - Shorthand color string or input color object.
|
|
1226
1185
|
* @param defaultColor - Full color object to fill in missing values in inputColor.
|
|
1227
|
-
*
|
|
1228
1186
|
* @returns Color object.
|
|
1229
1187
|
*/
|
|
1230
1188
|
function parseColor(inputColor, defaultColor) {
|
|
@@ -1346,11 +1304,9 @@ function parseColor(inputColor, defaultColor) {
|
|
|
1346
1304
|
*
|
|
1347
1305
|
* @remarks
|
|
1348
1306
|
* {@link http://www.javascripter.net/faq/rgb2hsv.htm}
|
|
1349
|
-
*
|
|
1350
1307
|
* @param red - Red channel.
|
|
1351
1308
|
* @param green - Green channel.
|
|
1352
1309
|
* @param blue - Blue channel.
|
|
1353
|
-
*
|
|
1354
1310
|
* @returns HSV color object.
|
|
1355
1311
|
*/
|
|
1356
1312
|
function RGBToHSV(red, green, blue) {
|
|
@@ -1430,11 +1386,9 @@ function removeCssText(element, cssText) {
|
|
|
1430
1386
|
*
|
|
1431
1387
|
* @remarks
|
|
1432
1388
|
* {@link https://gist.github.com/mjijackson/5311256}
|
|
1433
|
-
*
|
|
1434
1389
|
* @param h - Hue.
|
|
1435
1390
|
* @param s - Saturation.
|
|
1436
1391
|
* @param v - Value.
|
|
1437
|
-
*
|
|
1438
1392
|
* @returns RGB color object.
|
|
1439
1393
|
*/
|
|
1440
1394
|
function HSVToRGB(h, s, v) {
|
|
@@ -1478,7 +1432,6 @@ function HSVToRGB(h, s, v) {
|
|
|
1478
1432
|
* @param h - Hue.
|
|
1479
1433
|
* @param s - Saturation.
|
|
1480
1434
|
* @param v - Value.
|
|
1481
|
-
*
|
|
1482
1435
|
* @returns Hex color string.
|
|
1483
1436
|
*/
|
|
1484
1437
|
function HSVToHex(h, s, v) {
|
|
@@ -1489,7 +1442,6 @@ function HSVToHex(h, s, v) {
|
|
|
1489
1442
|
* Convert hex color string into HSV \<0, 1\>.
|
|
1490
1443
|
*
|
|
1491
1444
|
* @param hex - Hex color string.
|
|
1492
|
-
*
|
|
1493
1445
|
* @returns HSV color object.
|
|
1494
1446
|
*/
|
|
1495
1447
|
function hexToHSV(hex) {
|
|
@@ -1503,7 +1455,6 @@ function hexToHSV(hex) {
|
|
|
1503
1455
|
* Validate hex color string.
|
|
1504
1456
|
*
|
|
1505
1457
|
* @param hex - Unknown string that may contain a color.
|
|
1506
|
-
*
|
|
1507
1458
|
* @returns True if the string is valid, false otherwise.
|
|
1508
1459
|
*/
|
|
1509
1460
|
function isValidHex(hex) {
|
|
@@ -1514,7 +1465,6 @@ function isValidHex(hex) {
|
|
|
1514
1465
|
* Validate RGB color string.
|
|
1515
1466
|
*
|
|
1516
1467
|
* @param rgb - Unknown string that may contain a color.
|
|
1517
|
-
*
|
|
1518
1468
|
* @returns True if the string is valid, false otherwise.
|
|
1519
1469
|
*/
|
|
1520
1470
|
function isValidRGB(rgb) {
|
|
@@ -1524,7 +1474,6 @@ function isValidRGB(rgb) {
|
|
|
1524
1474
|
* Validate RGBA color string.
|
|
1525
1475
|
*
|
|
1526
1476
|
* @param rgba - Unknown string that may contain a color.
|
|
1527
|
-
*
|
|
1528
1477
|
* @returns True if the string is valid, false otherwise.
|
|
1529
1478
|
*/
|
|
1530
1479
|
function isValidRGBA(rgba) {
|
|
@@ -1536,7 +1485,6 @@ function isValidRGBA(rgba) {
|
|
|
1536
1485
|
*
|
|
1537
1486
|
* @param fields - Names of properties to be bridged.
|
|
1538
1487
|
* @param referenceObject - The original object.
|
|
1539
|
-
*
|
|
1540
1488
|
* @returns A new object inheriting from the referenceObject.
|
|
1541
1489
|
*/
|
|
1542
1490
|
function selectiveBridgeObject(fields, referenceObject) {
|
|
@@ -1561,7 +1509,6 @@ function selectiveBridgeObject(fields, referenceObject) {
|
|
|
1561
1509
|
* This is used for default options.
|
|
1562
1510
|
*
|
|
1563
1511
|
* @param referenceObject - The original object.
|
|
1564
|
-
*
|
|
1565
1512
|
* @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.
|
|
1566
1513
|
*/
|
|
1567
1514
|
function bridgeObject(referenceObject) {
|
|
@@ -1587,7 +1534,6 @@ function bridgeObject(referenceObject) {
|
|
|
1587
1534
|
*
|
|
1588
1535
|
* @param a - The array to be sorted (in-place).
|
|
1589
1536
|
* @param compare - An order comparator.
|
|
1590
|
-
*
|
|
1591
1537
|
* @returns The argument a.
|
|
1592
1538
|
*/
|
|
1593
1539
|
function insertSort(a, compare) {
|
|
@@ -1715,7 +1661,6 @@ function mergeOptions(mergeTarget, options, option, globalOptions = {}) {
|
|
|
1715
1661
|
* @param comparator - -1 is lower, 0 is equal, 1 is higher.
|
|
1716
1662
|
* @param field - Property name on an item (That is item[field]).
|
|
1717
1663
|
* @param field2 - Second property name on an item (That is item[field][field2]).
|
|
1718
|
-
*
|
|
1719
1664
|
* @returns Index of the found item or -1 if nothing was found.
|
|
1720
1665
|
*/
|
|
1721
1666
|
function binarySearchCustom(orderedItems, comparator, field, field2) {
|
|
@@ -1755,7 +1700,6 @@ function binarySearchCustom(orderedItems, comparator, field, field2) {
|
|
|
1755
1700
|
* @param field - Name of the property in items to be searched.
|
|
1756
1701
|
* @param sidePreference - If the target is between two values, should the index of the before or the after be returned?
|
|
1757
1702
|
* @param comparator - An optional comparator, returning -1, 0, 1 for \<, ===, \>.
|
|
1758
|
-
*
|
|
1759
1703
|
* @returns The index of found value or -1 if nothing was found.
|
|
1760
1704
|
*/
|
|
1761
1705
|
function binarySearchValue(orderedItems, target, field, sidePreference, comparator) {
|
|
@@ -1824,7 +1768,6 @@ const easingFunctions = {
|
|
|
1824
1768
|
* Provides no easing and no acceleration.
|
|
1825
1769
|
*
|
|
1826
1770
|
* @param t - Time.
|
|
1827
|
-
*
|
|
1828
1771
|
* @returns Value at time t.
|
|
1829
1772
|
*/
|
|
1830
1773
|
linear(t) {
|
|
@@ -1834,7 +1777,6 @@ const easingFunctions = {
|
|
|
1834
1777
|
* Accelerate from zero velocity.
|
|
1835
1778
|
*
|
|
1836
1779
|
* @param t - Time.
|
|
1837
|
-
*
|
|
1838
1780
|
* @returns Value at time t.
|
|
1839
1781
|
*/
|
|
1840
1782
|
easeInQuad(t) {
|
|
@@ -1844,7 +1786,6 @@ const easingFunctions = {
|
|
|
1844
1786
|
* Decelerate to zero velocity.
|
|
1845
1787
|
*
|
|
1846
1788
|
* @param t - Time.
|
|
1847
|
-
*
|
|
1848
1789
|
* @returns Value at time t.
|
|
1849
1790
|
*/
|
|
1850
1791
|
easeOutQuad(t) {
|
|
@@ -1854,7 +1795,6 @@ const easingFunctions = {
|
|
|
1854
1795
|
* Accelerate until halfway, then decelerate.
|
|
1855
1796
|
*
|
|
1856
1797
|
* @param t - Time.
|
|
1857
|
-
*
|
|
1858
1798
|
* @returns Value at time t.
|
|
1859
1799
|
*/
|
|
1860
1800
|
easeInOutQuad(t) {
|
|
@@ -1864,7 +1804,6 @@ const easingFunctions = {
|
|
|
1864
1804
|
* Accelerate from zero velocity.
|
|
1865
1805
|
*
|
|
1866
1806
|
* @param t - Time.
|
|
1867
|
-
*
|
|
1868
1807
|
* @returns Value at time t.
|
|
1869
1808
|
*/
|
|
1870
1809
|
easeInCubic(t) {
|
|
@@ -1874,7 +1813,6 @@ const easingFunctions = {
|
|
|
1874
1813
|
* Decelerate to zero velocity.
|
|
1875
1814
|
*
|
|
1876
1815
|
* @param t - Time.
|
|
1877
|
-
*
|
|
1878
1816
|
* @returns Value at time t.
|
|
1879
1817
|
*/
|
|
1880
1818
|
easeOutCubic(t) {
|
|
@@ -1884,7 +1822,6 @@ const easingFunctions = {
|
|
|
1884
1822
|
* Accelerate until halfway, then decelerate.
|
|
1885
1823
|
*
|
|
1886
1824
|
* @param t - Time.
|
|
1887
|
-
*
|
|
1888
1825
|
* @returns Value at time t.
|
|
1889
1826
|
*/
|
|
1890
1827
|
easeInOutCubic(t) {
|
|
@@ -1894,7 +1831,6 @@ const easingFunctions = {
|
|
|
1894
1831
|
* Accelerate from zero velocity.
|
|
1895
1832
|
*
|
|
1896
1833
|
* @param t - Time.
|
|
1897
|
-
*
|
|
1898
1834
|
* @returns Value at time t.
|
|
1899
1835
|
*/
|
|
1900
1836
|
easeInQuart(t) {
|
|
@@ -1904,7 +1840,6 @@ const easingFunctions = {
|
|
|
1904
1840
|
* Decelerate to zero velocity.
|
|
1905
1841
|
*
|
|
1906
1842
|
* @param t - Time.
|
|
1907
|
-
*
|
|
1908
1843
|
* @returns Value at time t.
|
|
1909
1844
|
*/
|
|
1910
1845
|
easeOutQuart(t) {
|
|
@@ -1914,7 +1849,6 @@ const easingFunctions = {
|
|
|
1914
1849
|
* Accelerate until halfway, then decelerate.
|
|
1915
1850
|
*
|
|
1916
1851
|
* @param t - Time.
|
|
1917
|
-
*
|
|
1918
1852
|
* @returns Value at time t.
|
|
1919
1853
|
*/
|
|
1920
1854
|
easeInOutQuart(t) {
|
|
@@ -1924,7 +1858,6 @@ const easingFunctions = {
|
|
|
1924
1858
|
* Accelerate from zero velocity.
|
|
1925
1859
|
*
|
|
1926
1860
|
* @param t - Time.
|
|
1927
|
-
*
|
|
1928
1861
|
* @returns Value at time t.
|
|
1929
1862
|
*/
|
|
1930
1863
|
easeInQuint(t) {
|
|
@@ -1934,7 +1867,6 @@ const easingFunctions = {
|
|
|
1934
1867
|
* Decelerate to zero velocity.
|
|
1935
1868
|
*
|
|
1936
1869
|
* @param t - Time.
|
|
1937
|
-
*
|
|
1938
1870
|
* @returns Value at time t.
|
|
1939
1871
|
*/
|
|
1940
1872
|
easeOutQuint(t) {
|
|
@@ -1944,7 +1876,6 @@ const easingFunctions = {
|
|
|
1944
1876
|
* Accelerate until halfway, then decelerate.
|
|
1945
1877
|
*
|
|
1946
1878
|
* @param t - Time.
|
|
1947
|
-
*
|
|
1948
1879
|
* @returns Value at time t.
|
|
1949
1880
|
*/
|
|
1950
1881
|
easeInOutQuint(t) {
|
|
@@ -2000,7 +1931,6 @@ function getScrollBarWidth() {
|
|
|
2000
1931
|
* @param pile - Array of objects, no required format.
|
|
2001
1932
|
* @param accessors - Array of property names.
|
|
2002
1933
|
* For example `object['foo']['bar']` → `['foo', 'bar']`.
|
|
2003
|
-
*
|
|
2004
1934
|
* @returns Value of the property with given accessors path from the first pile item where it's not undefined.
|
|
2005
1935
|
*/
|
|
2006
1936
|
function topMost(pile, accessors) {
|
|
@@ -2170,7 +2100,7 @@ const htmlColors = {
|
|
|
2170
2100
|
/**
|
|
2171
2101
|
* @param {number} [pixelRatio=1]
|
|
2172
2102
|
*/
|
|
2173
|
-
class ColorPicker {
|
|
2103
|
+
class ColorPicker$1 {
|
|
2174
2104
|
/**
|
|
2175
2105
|
* @param {number} [pixelRatio=1]
|
|
2176
2106
|
*/
|
|
@@ -2681,7 +2611,7 @@ class ColorPicker {
|
|
|
2681
2611
|
_bindHammer() {
|
|
2682
2612
|
this.drag = {};
|
|
2683
2613
|
this.pinch = {};
|
|
2684
|
-
this.hammer = new Hammer(this.colorPickerCanvas);
|
|
2614
|
+
this.hammer = new Hammer$1(this.colorPickerCanvas);
|
|
2685
2615
|
this.hammer.get("pinch").set({ enable: true });
|
|
2686
2616
|
|
|
2687
2617
|
this.hammer.on("hammer.input", (event) => {
|
|
@@ -2821,7 +2751,6 @@ class ColorPicker {
|
|
|
2821
2751
|
* Wrap given text (last argument) in HTML elements (all preceding arguments).
|
|
2822
2752
|
*
|
|
2823
2753
|
* @param {...any} rest - List of tag names followed by inner text.
|
|
2824
|
-
*
|
|
2825
2754
|
* @returns An element or a text node.
|
|
2826
2755
|
*/
|
|
2827
2756
|
function wrapInTag(...rest) {
|
|
@@ -2845,7 +2774,7 @@ function wrapInTag(...rest) {
|
|
|
2845
2774
|
*
|
|
2846
2775
|
* The options are matched with their counterparts in each of the modules and the values used in the configuration are
|
|
2847
2776
|
*/
|
|
2848
|
-
class Configurator {
|
|
2777
|
+
class Configurator$1 {
|
|
2849
2778
|
/**
|
|
2850
2779
|
* @param {object} parentModule | the location where parentModule.setOptions() can be called
|
|
2851
2780
|
* @param {object} defaultContainer | the default container of the module
|
|
@@ -2883,7 +2812,7 @@ class Configurator {
|
|
|
2883
2812
|
this.popupDiv = {};
|
|
2884
2813
|
this.popupLimit = 5;
|
|
2885
2814
|
this.popupHistory = {};
|
|
2886
|
-
this.colorPicker = new ColorPicker(pixelRatio);
|
|
2815
|
+
this.colorPicker = new ColorPicker$1(pixelRatio);
|
|
2887
2816
|
this.wrapper = undefined;
|
|
2888
2817
|
}
|
|
2889
2818
|
|
|
@@ -3619,7 +3548,7 @@ class Configurator {
|
|
|
3619
3548
|
/**
|
|
3620
3549
|
* Popup is a class to create a popup window with some text
|
|
3621
3550
|
*/
|
|
3622
|
-
class Popup {
|
|
3551
|
+
class Popup$1 {
|
|
3623
3552
|
/**
|
|
3624
3553
|
* @param {Element} container The container object.
|
|
3625
3554
|
* @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')
|
|
@@ -3756,12 +3685,12 @@ class Popup {
|
|
|
3756
3685
|
let errorFound = false;
|
|
3757
3686
|
let allOptions;
|
|
3758
3687
|
|
|
3759
|
-
const VALIDATOR_PRINT_STYLE = "background: #FFeeee; color: #dd0000";
|
|
3688
|
+
const VALIDATOR_PRINT_STYLE$1 = "background: #FFeeee; color: #dd0000";
|
|
3760
3689
|
|
|
3761
3690
|
/**
|
|
3762
3691
|
* Used to validate options.
|
|
3763
3692
|
*/
|
|
3764
|
-
class Validator {
|
|
3693
|
+
class Validator$1 {
|
|
3765
3694
|
/**
|
|
3766
3695
|
* Main function to be called
|
|
3767
3696
|
*
|
|
@@ -3778,7 +3707,7 @@ class Validator {
|
|
|
3778
3707
|
if (subObject !== undefined) {
|
|
3779
3708
|
usedOptions = referenceOptions[subObject];
|
|
3780
3709
|
}
|
|
3781
|
-
Validator.parse(options, usedOptions, []);
|
|
3710
|
+
Validator$1.parse(options, usedOptions, []);
|
|
3782
3711
|
return errorFound;
|
|
3783
3712
|
}
|
|
3784
3713
|
|
|
@@ -3793,7 +3722,7 @@ class Validator {
|
|
|
3793
3722
|
static parse(options, referenceOptions, path) {
|
|
3794
3723
|
for (const option in options) {
|
|
3795
3724
|
if (Object.prototype.hasOwnProperty.call(options, option)) {
|
|
3796
|
-
Validator.check(option, options, referenceOptions, path);
|
|
3725
|
+
Validator$1.check(option, options, referenceOptions, path);
|
|
3797
3726
|
}
|
|
3798
3727
|
}
|
|
3799
3728
|
}
|
|
@@ -3812,7 +3741,7 @@ class Validator {
|
|
|
3812
3741
|
referenceOptions[option] === undefined &&
|
|
3813
3742
|
referenceOptions.__any__ === undefined
|
|
3814
3743
|
) {
|
|
3815
|
-
Validator.getSuggestion(option, referenceOptions, path);
|
|
3744
|
+
Validator$1.getSuggestion(option, referenceOptions, path);
|
|
3816
3745
|
return;
|
|
3817
3746
|
}
|
|
3818
3747
|
|
|
@@ -3832,7 +3761,7 @@ class Validator {
|
|
|
3832
3761
|
|
|
3833
3762
|
// if the any-subgroup is not a predefined object in the configurator,
|
|
3834
3763
|
// we do not look deeper into the object.
|
|
3835
|
-
is_object = Validator.getType(options[option]) === "object";
|
|
3764
|
+
is_object = Validator$1.getType(options[option]) === "object";
|
|
3836
3765
|
}
|
|
3837
3766
|
|
|
3838
3767
|
let refOptionObj = referenceOptions[referenceOption];
|
|
@@ -3840,7 +3769,7 @@ class Validator {
|
|
|
3840
3769
|
refOptionObj = refOptionObj.__type__;
|
|
3841
3770
|
}
|
|
3842
3771
|
|
|
3843
|
-
Validator.checkFields(
|
|
3772
|
+
Validator$1.checkFields(
|
|
3844
3773
|
option,
|
|
3845
3774
|
options,
|
|
3846
3775
|
referenceOptions,
|
|
@@ -3870,18 +3799,18 @@ class Validator {
|
|
|
3870
3799
|
) {
|
|
3871
3800
|
const log = function (message) {
|
|
3872
3801
|
console.error(
|
|
3873
|
-
"%c" + message + Validator.printLocation(path, option),
|
|
3874
|
-
VALIDATOR_PRINT_STYLE
|
|
3802
|
+
"%c" + message + Validator$1.printLocation(path, option),
|
|
3803
|
+
VALIDATOR_PRINT_STYLE$1
|
|
3875
3804
|
);
|
|
3876
3805
|
};
|
|
3877
3806
|
|
|
3878
|
-
const optionType = Validator.getType(options[option]);
|
|
3807
|
+
const optionType = Validator$1.getType(options[option]);
|
|
3879
3808
|
const refOptionType = refOptionObj[optionType];
|
|
3880
3809
|
|
|
3881
3810
|
if (refOptionType !== undefined) {
|
|
3882
3811
|
// if the type is correct, we check if it is supposed to be one of a few select values
|
|
3883
3812
|
if (
|
|
3884
|
-
Validator.getType(refOptionType) === "array" &&
|
|
3813
|
+
Validator$1.getType(refOptionType) === "array" &&
|
|
3885
3814
|
refOptionType.indexOf(options[option]) === -1
|
|
3886
3815
|
) {
|
|
3887
3816
|
log(
|
|
@@ -3889,7 +3818,7 @@ class Validator {
|
|
|
3889
3818
|
option +
|
|
3890
3819
|
'".' +
|
|
3891
3820
|
" Allowed values are:" +
|
|
3892
|
-
Validator.print(refOptionType) +
|
|
3821
|
+
Validator$1.print(refOptionType) +
|
|
3893
3822
|
' not "' +
|
|
3894
3823
|
options[option] +
|
|
3895
3824
|
'". '
|
|
@@ -3897,7 +3826,7 @@ class Validator {
|
|
|
3897
3826
|
errorFound = true;
|
|
3898
3827
|
} else if (optionType === "object" && referenceOption !== "__any__") {
|
|
3899
3828
|
path = copyAndExtendArray(path, option);
|
|
3900
|
-
Validator.parse(
|
|
3829
|
+
Validator$1.parse(
|
|
3901
3830
|
options[option],
|
|
3902
3831
|
referenceOptions[referenceOption],
|
|
3903
3832
|
path
|
|
@@ -3909,7 +3838,7 @@ class Validator {
|
|
|
3909
3838
|
'Invalid type received for "' +
|
|
3910
3839
|
option +
|
|
3911
3840
|
'". Expected: ' +
|
|
3912
|
-
Validator.print(Object.keys(refOptionObj)) +
|
|
3841
|
+
Validator$1.print(Object.keys(refOptionObj)) +
|
|
3913
3842
|
". Received [" +
|
|
3914
3843
|
optionType +
|
|
3915
3844
|
'] "' +
|
|
@@ -3974,8 +3903,8 @@ class Validator {
|
|
|
3974
3903
|
* @static
|
|
3975
3904
|
*/
|
|
3976
3905
|
static getSuggestion(option, options, path) {
|
|
3977
|
-
const localSearch = Validator.findInOptions(option, options, path, false);
|
|
3978
|
-
const globalSearch = Validator.findInOptions(option, allOptions, [], true);
|
|
3906
|
+
const localSearch = Validator$1.findInOptions(option, options, path, false);
|
|
3907
|
+
const globalSearch = Validator$1.findInOptions(option, allOptions, [], true);
|
|
3979
3908
|
|
|
3980
3909
|
const localSearchThreshold = 8;
|
|
3981
3910
|
const globalSearchThreshold = 4;
|
|
@@ -3984,7 +3913,7 @@ class Validator {
|
|
|
3984
3913
|
if (localSearch.indexMatch !== undefined) {
|
|
3985
3914
|
msg =
|
|
3986
3915
|
" in " +
|
|
3987
|
-
Validator.printLocation(localSearch.path, option, "") +
|
|
3916
|
+
Validator$1.printLocation(localSearch.path, option, "") +
|
|
3988
3917
|
'Perhaps it was incomplete? Did you mean: "' +
|
|
3989
3918
|
localSearch.indexMatch +
|
|
3990
3919
|
'"?\n\n';
|
|
@@ -3994,9 +3923,9 @@ class Validator {
|
|
|
3994
3923
|
) {
|
|
3995
3924
|
msg =
|
|
3996
3925
|
" in " +
|
|
3997
|
-
Validator.printLocation(localSearch.path, option, "") +
|
|
3926
|
+
Validator$1.printLocation(localSearch.path, option, "") +
|
|
3998
3927
|
"Perhaps it was misplaced? Matching option found at: " +
|
|
3999
|
-
Validator.printLocation(
|
|
3928
|
+
Validator$1.printLocation(
|
|
4000
3929
|
globalSearch.path,
|
|
4001
3930
|
globalSearch.closestMatch,
|
|
4002
3931
|
""
|
|
@@ -4006,17 +3935,17 @@ class Validator {
|
|
|
4006
3935
|
'. Did you mean "' +
|
|
4007
3936
|
localSearch.closestMatch +
|
|
4008
3937
|
'"?' +
|
|
4009
|
-
Validator.printLocation(localSearch.path, option);
|
|
3938
|
+
Validator$1.printLocation(localSearch.path, option);
|
|
4010
3939
|
} else {
|
|
4011
3940
|
msg =
|
|
4012
3941
|
". Did you mean one of these: " +
|
|
4013
|
-
Validator.print(Object.keys(options)) +
|
|
4014
|
-
Validator.printLocation(path, option);
|
|
3942
|
+
Validator$1.print(Object.keys(options)) +
|
|
3943
|
+
Validator$1.printLocation(path, option);
|
|
4015
3944
|
}
|
|
4016
3945
|
|
|
4017
3946
|
console.error(
|
|
4018
3947
|
'%cUnknown option detected: "' + option + '"' + msg,
|
|
4019
|
-
VALIDATOR_PRINT_STYLE
|
|
3948
|
+
VALIDATOR_PRINT_STYLE$1
|
|
4020
3949
|
);
|
|
4021
3950
|
errorFound = true;
|
|
4022
3951
|
}
|
|
@@ -4040,7 +3969,7 @@ class Validator {
|
|
|
4040
3969
|
for (const op in options) {
|
|
4041
3970
|
let distance;
|
|
4042
3971
|
if (options[op].__type__ !== undefined && recursive === true) {
|
|
4043
|
-
const result = Validator.findInOptions(
|
|
3972
|
+
const result = Validator$1.findInOptions(
|
|
4044
3973
|
option,
|
|
4045
3974
|
options[op],
|
|
4046
3975
|
copyAndExtendArray(path, op)
|
|
@@ -4055,7 +3984,7 @@ class Validator {
|
|
|
4055
3984
|
if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {
|
|
4056
3985
|
indexMatch = op;
|
|
4057
3986
|
}
|
|
4058
|
-
distance = Validator.levenshteinDistance(option, op);
|
|
3987
|
+
distance = Validator$1.levenshteinDistance(option, op);
|
|
4059
3988
|
if (min > distance) {
|
|
4060
3989
|
closestMatch = op;
|
|
4061
3990
|
closestMatchPath = copyArray(path);
|
|
@@ -4166,13 +4095,13 @@ class Validator {
|
|
|
4166
4095
|
}
|
|
4167
4096
|
}
|
|
4168
4097
|
|
|
4169
|
-
const Activator
|
|
4170
|
-
const ColorPicker
|
|
4171
|
-
const Configurator
|
|
4172
|
-
const Hammer
|
|
4173
|
-
const Popup
|
|
4174
|
-
const VALIDATOR_PRINT_STYLE
|
|
4175
|
-
const Validator
|
|
4098
|
+
const Activator = Activator$1;
|
|
4099
|
+
const ColorPicker = ColorPicker$1;
|
|
4100
|
+
const Configurator = Configurator$1;
|
|
4101
|
+
const Hammer = Hammer$1;
|
|
4102
|
+
const Popup = Popup$1;
|
|
4103
|
+
const VALIDATOR_PRINT_STYLE = VALIDATOR_PRINT_STYLE$1;
|
|
4104
|
+
const Validator = Validator$1;
|
|
4176
4105
|
|
|
4177
|
-
export { Activator
|
|
4106
|
+
export { Activator, Alea, ColorPicker, Configurator, DELETE, HSVToHex, HSVToRGB, Hammer, Popup, RGBToHSV, RGBToHex, VALIDATOR_PRINT_STYLE, Validator, addClassName, addCssText, addEventListener, binarySearchCustom, binarySearchValue, bridgeObject, copyAndExtendArray, copyArray, deepExtend, deepObjectAssign, easingFunctions, equalArray, extend, fillIfDefined, forEach, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getScrollBarWidth, getTarget, getType, hasParent, hexToHSV, hexToRGB, insertSort, isDate, isNumber, isObject, isString, isValidHex, isValidRGB, isValidRGBA, mergeOptions, option, overrideOpacity, parseColor, preventDefault, pureDeepObjectAssign, recursiveDOMDelete, removeClassName, removeCssText, removeEventListener, selectiveBridgeObject, selectiveDeepExtend, selectiveExtend, selectiveNotDeepExtend, throttle, toArray, topMost, updateProperty };
|
|
4178
4107
|
//# sourceMappingURL=vis-util.js.map
|