@schukai/monster 1.21.1 → 1.25.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG +48 -1
- package/README.md +4 -4
- package/dist/modules/constants.js +2 -2
- package/dist/modules/constraints/abstract.js +1 -1
- package/dist/modules/constraints/abstractoperator.js +1 -1
- package/dist/modules/constraints/andoperator.js +1 -1
- package/dist/modules/constraints/invalid.js +1 -1
- package/dist/modules/constraints/isarray.js +1 -1
- package/dist/modules/constraints/isobject.js +1 -1
- package/dist/modules/constraints/namespace.js +1 -1
- package/dist/modules/constraints/oroperator.js +1 -1
- package/dist/modules/constraints/valid.js +1 -1
- package/dist/modules/data/buildmap.js +1 -1
- package/dist/modules/data/datasource/namespace.js +2 -0
- package/dist/modules/data/datasource/restapi/writeerror.js +2 -0
- package/dist/modules/data/datasource/restapi.js +2 -0
- package/dist/modules/data/datasource/storage/localstorage.js +2 -0
- package/dist/modules/data/datasource/storage/namespace.js +2 -0
- package/dist/modules/data/datasource/storage/sessionstorage.js +2 -0
- package/dist/modules/data/datasource/storage.js +2 -0
- package/dist/modules/data/datasource.js +2 -0
- package/dist/modules/data/diff.js +2 -2
- package/dist/modules/data/extend.js +1 -1
- package/dist/modules/data/namespace.js +1 -1
- package/dist/modules/data/pathfinder.js +2 -2
- package/dist/modules/data/pipe.js +1 -1
- package/dist/modules/data/transformer.js +2 -2
- package/dist/modules/dom/assembler.js +1 -1
- package/dist/modules/dom/attributes.js +1 -1
- package/dist/modules/dom/constants.js +2 -2
- package/dist/modules/dom/customcontrol.js +2 -2
- package/dist/modules/dom/customelement.js +2 -2
- package/dist/modules/dom/events.js +1 -1
- package/dist/modules/dom/focusmanager.js +2 -0
- package/dist/modules/dom/locale.js +1 -1
- package/dist/modules/dom/namespace.js +1 -1
- package/dist/modules/dom/resource/data.js +2 -0
- package/dist/modules/dom/resource/link/stylesheet.js +2 -0
- package/dist/modules/dom/resource/link.js +2 -0
- package/dist/modules/dom/resource/script.js +2 -0
- package/dist/modules/dom/resource.js +2 -0
- package/dist/modules/dom/resourcemanager.js +2 -0
- package/dist/modules/dom/template.js +1 -1
- package/dist/modules/dom/theme.js +1 -1
- package/dist/modules/dom/updater.js +2 -2
- package/dist/modules/dom/util.js +1 -1
- package/dist/modules/dom/worker/factory.js +2 -0
- package/dist/modules/i18n/locale.js +1 -1
- package/dist/modules/i18n/namespace.js +1 -1
- package/dist/modules/i18n/provider.js +1 -1
- package/dist/modules/i18n/providers/fetch.js +2 -2
- package/dist/modules/i18n/providers/namespace.js +1 -1
- package/dist/modules/i18n/translations.js +1 -1
- package/dist/modules/logging/handler/console.js +1 -1
- package/dist/modules/logging/handler/namespace.js +1 -1
- package/dist/modules/logging/handler.js +1 -1
- package/dist/modules/logging/logentry.js +1 -1
- package/dist/modules/logging/logger.js +1 -1
- package/dist/modules/logging/namespace.js +1 -1
- package/dist/modules/math/namespace.js +1 -1
- package/dist/modules/math/random.js +2 -2
- package/dist/modules/monster.js +1 -1
- package/dist/modules/namespace.js +1 -1
- package/dist/modules/text/formatter.js +2 -2
- package/dist/modules/text/namespace.js +1 -1
- package/dist/modules/types/base.js +1 -1
- package/dist/modules/types/basewithoptions.js +2 -2
- package/dist/modules/types/binary.js +1 -1
- package/dist/modules/types/dataurl.js +1 -1
- package/dist/modules/types/global.js +1 -1
- package/dist/modules/types/id.js +1 -1
- package/dist/modules/types/is.js +1 -1
- package/dist/modules/types/mediatype.js +1 -1
- package/dist/modules/types/namespace.js +1 -1
- package/dist/modules/types/observer.js +1 -1
- package/dist/modules/types/observerlist.js +2 -2
- package/dist/modules/types/proxyobserver.js +2 -2
- package/dist/modules/types/queue.js +1 -1
- package/dist/modules/types/randomid.js +1 -1
- package/dist/modules/types/stack.js +1 -1
- package/dist/modules/types/tokenlist.js +2 -2
- package/dist/modules/types/typeof.js +1 -1
- package/dist/modules/types/uniquequeue.js +1 -1
- package/dist/modules/types/uuid.js +2 -0
- package/dist/modules/types/validate.js +1 -1
- package/dist/modules/types/version.js +2 -2
- package/dist/modules/util/clone.js +2 -2
- package/dist/modules/util/comparator.js +2 -2
- package/dist/modules/util/freeze.js +1 -1
- package/dist/modules/util/namespace.js +1 -1
- package/dist/modules/util/processing.js +2 -2
- package/dist/modules/util/trimspaces.js +2 -0
- package/dist/monster.dev.js +1499 -732
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -2
- package/package.json +1 -1
- package/source/constants.js +16 -7
- package/source/constraints/andoperator.js +5 -5
- package/source/constraints/invalid.js +3 -3
- package/source/constraints/isarray.js +3 -3
- package/source/constraints/isobject.js +3 -3
- package/source/constraints/oroperator.js +5 -5
- package/source/constraints/valid.js +3 -3
- package/source/data/buildmap.js +6 -6
- package/source/data/datasource/namespace.js +16 -0
- package/source/data/datasource/restapi/writeerror.js +49 -0
- package/source/data/datasource/restapi.js +266 -0
- package/source/data/datasource/storage/localstorage.js +64 -0
- package/source/data/datasource/storage/namespace.js +16 -0
- package/source/data/datasource/storage/sessionstorage.js +61 -0
- package/source/data/datasource/storage.js +131 -0
- package/source/data/datasource.js +246 -0
- package/source/data/diff.js +8 -8
- package/source/data/extend.js +5 -5
- package/source/data/pathfinder.js +12 -6
- package/source/data/pipe.js +6 -5
- package/source/data/transformer.js +131 -24
- package/source/dom/assembler.js +2 -2
- package/source/dom/attributes.js +24 -24
- package/source/dom/constants.js +305 -12
- package/source/dom/customcontrol.js +40 -19
- package/source/dom/customelement.js +182 -103
- package/source/dom/events.js +6 -6
- package/source/dom/focusmanager.js +251 -0
- package/source/dom/locale.js +4 -3
- package/source/dom/resource/data.js +170 -0
- package/source/dom/resource/link/stylesheet.js +54 -0
- package/source/dom/resource/link.js +125 -0
- package/source/dom/resource/script.js +112 -0
- package/source/dom/resource.js +268 -0
- package/source/dom/resourcemanager.js +214 -0
- package/source/dom/template.js +40 -10
- package/source/dom/theme.js +3 -3
- package/source/dom/updater.js +114 -58
- package/source/dom/util.js +6 -6
- package/source/dom/worker/factory.js +134 -0
- package/source/i18n/locale.js +8 -8
- package/source/i18n/provider.js +4 -4
- package/source/i18n/providers/fetch.js +8 -13
- package/source/i18n/translations.js +6 -5
- package/source/logging/handler/console.js +2 -2
- package/source/logging/handler.js +2 -2
- package/source/logging/logentry.js +2 -2
- package/source/logging/logger.js +4 -4
- package/source/math/random.js +11 -5
- package/source/namespace.js +1 -1
- package/source/text/formatter.js +82 -7
- package/source/types/base.js +4 -4
- package/source/types/basewithoptions.js +10 -15
- package/source/types/binary.js +8 -8
- package/source/types/dataurl.js +6 -6
- package/source/types/global.js +9 -7
- package/source/types/id.js +2 -2
- package/source/types/is.js +23 -23
- package/source/types/mediatype.js +4 -4
- package/source/types/observer.js +3 -3
- package/source/types/observerlist.js +3 -3
- package/source/types/proxyobserver.js +24 -7
- package/source/types/queue.js +5 -5
- package/source/types/randomid.js +2 -2
- package/source/types/stack.js +2 -2
- package/source/types/tokenlist.js +8 -9
- package/source/types/typeof.js +3 -3
- package/source/types/uniquequeue.js +4 -4
- package/source/types/uuid.js +102 -0
- package/source/types/validate.js +20 -20
- package/source/types/version.js +6 -6
- package/source/util/clone.js +5 -6
- package/source/util/comparator.js +5 -5
- package/source/util/freeze.js +5 -5
- package/source/util/processing.js +33 -36
- package/source/util/trimspaces.js +85 -0
- package/test/cases/data/datasource/restapi.js +89 -0
- package/test/cases/data/datasource/storage/localstorage.js +47 -0
- package/test/cases/data/datasource/storage/sessionstorage.js +47 -0
- package/test/cases/data/datasource.js +60 -0
- package/test/cases/data/diff.js +4 -4
- package/test/cases/data/pathfinder.js +18 -9
- package/test/cases/data/pipe.js +26 -2
- package/test/cases/data/transformer.js +41 -10
- package/test/cases/dom/customcontrol.js +6 -5
- package/test/cases/dom/customelement.js +25 -26
- package/test/cases/dom/focusmanager.js +111 -0
- package/test/cases/dom/locale.js +1 -4
- package/test/cases/dom/resource/data.js +129 -0
- package/test/cases/dom/resource/link/stylesheet.js +101 -0
- package/test/cases/dom/resource/link.js +101 -0
- package/test/cases/dom/resource/script.js +115 -0
- package/test/cases/dom/resourcemanager.js +118 -0
- package/test/cases/dom/updater.js +42 -19
- package/test/cases/dom/worker/factory.js +63 -0
- package/test/cases/monster.js +1 -1
- package/test/cases/text/formatter.js +38 -6
- package/test/cases/types/proxyobserver.js +55 -11
- package/test/cases/types/uuid.js +42 -0
- package/test/cases/util/freeze.js +30 -4
- package/test/cases/util/trimspaces.js +24 -0
- package/test/util/cleanupdom.js +48 -0
- package/test/util/jsdom.js +23 -9
- package/test/util/localstorage.js +81 -0
- package/test/web/import.js +13 -0
- package/test/web/monster-dev.html +3 -3
- package/test/web/monster.html +2 -2
- package/test/web/test.html +3 -3
- package/test/web/tests.js +7 -7
package/dist/monster.dev.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/** Monster 1.
|
1
|
+
/** Monster 1.25.0, © 2021 schukai GmbH, Released under the AGPL 3.0 License. */
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
4
4
|
module.exports = factory();
|
@@ -19,7 +19,8 @@ return /******/ (function() { // webpackBootstrap
|
|
19
19
|
__webpack_require__.r(__webpack_exports__);
|
20
20
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
21
21
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
22
|
-
/* harmony export */ "
|
22
|
+
/* harmony export */ "internalSymbol": function() { return /* binding */ internalSymbol; },
|
23
|
+
/* harmony export */ "internalStateSymbol": function() { return /* binding */ internalStateSymbol; }
|
23
24
|
/* harmony export */ });
|
24
25
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
25
26
|
|
@@ -31,14 +32,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
31
32
|
*/
|
32
33
|
|
33
34
|
/**
|
34
|
-
*
|
35
|
-
*
|
35
|
+
* @private
|
36
|
+
* @type {symbol}
|
36
37
|
* @memberOf Monster
|
37
|
-
* @
|
38
|
-
|
38
|
+
* @since 1.24.0
|
39
|
+
*/
|
40
|
+
|
41
|
+
var internalSymbol = Symbol('internalData');
|
42
|
+
/**
|
43
|
+
* @private
|
44
|
+
* @type {symbol}
|
45
|
+
* @memberOf Monster
|
46
|
+
* @since 1.25.0
|
39
47
|
*/
|
40
48
|
|
41
|
-
var
|
49
|
+
var internalStateSymbol = Symbol('state');
|
42
50
|
|
43
51
|
|
44
52
|
/***/ }),
|
@@ -132,7 +140,7 @@ var Monster = new Namespace("Monster");
|
|
132
140
|
*
|
133
141
|
* ```
|
134
142
|
* <script type="module">
|
135
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
143
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/namespace.js';
|
136
144
|
* function hello() {
|
137
145
|
* console.log('Hello World!');
|
138
146
|
* }
|
@@ -374,8 +382,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
374
382
|
*
|
375
383
|
* ```
|
376
384
|
* <script type="module">
|
377
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
378
|
-
*
|
385
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/base.js';
|
386
|
+
* new Monster.Types.Base()
|
379
387
|
* </script>
|
380
388
|
* ```
|
381
389
|
*
|
@@ -383,8 +391,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
383
391
|
*
|
384
392
|
* ```
|
385
393
|
* <script type="module">
|
386
|
-
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
387
|
-
*
|
394
|
+
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/base.js';
|
395
|
+
* new Base()
|
388
396
|
* </script>
|
389
397
|
* ```
|
390
398
|
*
|
@@ -546,7 +554,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
546
554
|
*
|
547
555
|
* ```
|
548
556
|
* <script type="module">
|
549
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
557
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/andoperator.js';
|
550
558
|
* new Monster.Constraint.AndOperator();
|
551
559
|
* </script>
|
552
560
|
* ```
|
@@ -555,16 +563,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
555
563
|
*
|
556
564
|
* ```
|
557
565
|
* <script type="module">
|
558
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
566
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/andoperator.js';
|
559
567
|
* new AndOperator();
|
560
568
|
* </script>
|
561
569
|
* ```
|
562
570
|
*
|
563
571
|
* @example
|
564
572
|
*
|
565
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
566
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
567
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
573
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/valid.js';
|
574
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/invalid.js';
|
575
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/andoperator.js';
|
568
576
|
*
|
569
577
|
* new AndOperator(
|
570
578
|
* new Valid(), new Valid()).isValid()
|
@@ -661,7 +669,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
661
669
|
*
|
662
670
|
* ```
|
663
671
|
* <script type="module">
|
664
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
672
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/invalid.js';
|
665
673
|
* new Monster.Constraint.Invalid();
|
666
674
|
* </script>
|
667
675
|
* ```
|
@@ -670,14 +678,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
670
678
|
*
|
671
679
|
* ```
|
672
680
|
* <script type="module">
|
673
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
681
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/invalid.js';
|
674
682
|
* new Invalid();
|
675
683
|
* </script>
|
676
684
|
* ```
|
677
685
|
*
|
678
686
|
* @example
|
679
687
|
*
|
680
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
688
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/invalid.js';
|
681
689
|
*
|
682
690
|
* new Invalid().isValid()
|
683
691
|
* .then(()=>console.log(true))
|
@@ -767,7 +775,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
767
775
|
*
|
768
776
|
* ```
|
769
777
|
* <script type="module">
|
770
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
778
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/isarray.js';
|
771
779
|
* console.log(new Monster.Constraint.IsArray())
|
772
780
|
* </script>
|
773
781
|
* ```
|
@@ -776,14 +784,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
776
784
|
*
|
777
785
|
* ```
|
778
786
|
* <script type="module">
|
779
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
787
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/isarray.js';
|
780
788
|
* console.log(new IsArray())
|
781
789
|
* </script>
|
782
790
|
* ```
|
783
791
|
*
|
784
792
|
* @example
|
785
793
|
*
|
786
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
794
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/isarray.js';
|
787
795
|
*
|
788
796
|
* new IsArray()
|
789
797
|
* .isValid([])
|
@@ -869,7 +877,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
869
877
|
*
|
870
878
|
* ```
|
871
879
|
* <script type="module">
|
872
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
880
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
873
881
|
* console.log(Monster.Types.isIterable(null)) // ↦ false
|
874
882
|
* console.log(Monster.Types.isIterable('hello')) // ↦ true
|
875
883
|
* console.log(Monster.Types.isIterable([])) // ↦ true
|
@@ -880,10 +888,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
880
888
|
*
|
881
889
|
* ```
|
882
890
|
* <script type="module">
|
883
|
-
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
884
|
-
*
|
885
|
-
*
|
886
|
-
*
|
891
|
+
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
892
|
+
* isIterable(null) // ↦ false
|
893
|
+
* isIterable('hello') // ↦ true
|
894
|
+
* isIterable([]) // ↦ true
|
887
895
|
* </script>
|
888
896
|
* ```
|
889
897
|
*
|
@@ -906,7 +914,7 @@ function isIterable(value) {
|
|
906
914
|
*
|
907
915
|
* ```
|
908
916
|
* <script type="module">
|
909
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
917
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
910
918
|
* console.log(Monster.Types.isPrimitive('2')) // ↦ false
|
911
919
|
* console.log(Monster.Types.isPrimitive([])) // ↦ true
|
912
920
|
* </script>
|
@@ -916,7 +924,7 @@ function isIterable(value) {
|
|
916
924
|
*
|
917
925
|
* ```
|
918
926
|
* <script type="module">
|
919
|
-
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
927
|
+
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
920
928
|
* console.log(isPrimitive('2')) // ↦ true
|
921
929
|
* console.log(isPrimitive([])) // ↦ false
|
922
930
|
* </script>
|
@@ -952,7 +960,7 @@ function isPrimitive(value) {
|
|
952
960
|
*
|
953
961
|
* ```
|
954
962
|
* <script type="module">
|
955
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
963
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
956
964
|
* console.log(Monster.Types.isSymbol('2')) // ↦ false
|
957
965
|
* console.log(Monster.Types.isSymbol(Symbol('test')) // ↦ true
|
958
966
|
* </script>
|
@@ -962,7 +970,7 @@ function isPrimitive(value) {
|
|
962
970
|
*
|
963
971
|
* ```
|
964
972
|
* <script type="module">
|
965
|
-
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
973
|
+
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
966
974
|
* console.log(isSymbol(Symbol('a'))) // ↦ true
|
967
975
|
* console.log(isSymbol([]) // ↦ false
|
968
976
|
* </script>
|
@@ -986,7 +994,7 @@ function isSymbol(value) {
|
|
986
994
|
*
|
987
995
|
* ```
|
988
996
|
* <script type="module">
|
989
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
997
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
990
998
|
* console.log(Monster.Types.isBoolean('2')) // ↦ false
|
991
999
|
* console.log(Monster.Types.isBoolean([])) // ↦ false
|
992
1000
|
* console.log(Monster.Types.isBoolean(true)) // ↦ true
|
@@ -997,7 +1005,7 @@ function isSymbol(value) {
|
|
997
1005
|
*
|
998
1006
|
* ```
|
999
1007
|
* <script type="module">
|
1000
|
-
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1008
|
+
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1001
1009
|
* console.log(isBoolean('2')) // ↦ false
|
1002
1010
|
* console.log(isBoolean([])) // ↦ false
|
1003
1011
|
* console.log(isBoolean(2>4)) // ↦ true
|
@@ -1026,7 +1034,7 @@ function isBoolean(value) {
|
|
1026
1034
|
*
|
1027
1035
|
* ```
|
1028
1036
|
* <script type="module">
|
1029
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1037
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1030
1038
|
* console.log(Monster.Types.isString('2')) // ↦ true
|
1031
1039
|
* console.log(Monster.Types.isString([])) // ↦ false
|
1032
1040
|
* </script>
|
@@ -1036,7 +1044,7 @@ function isBoolean(value) {
|
|
1036
1044
|
*
|
1037
1045
|
* ```
|
1038
1046
|
* <script type="module">
|
1039
|
-
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1047
|
+
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1040
1048
|
* console.log(isString('2')) // ↦ true
|
1041
1049
|
* console.log(isString([])) // ↦ false
|
1042
1050
|
* </script>
|
@@ -1064,7 +1072,7 @@ function isString(value) {
|
|
1064
1072
|
*
|
1065
1073
|
* ```
|
1066
1074
|
* <script type="module">
|
1067
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1075
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1068
1076
|
* console.log(Monster.Types.isObject('2')) // ↦ false
|
1069
1077
|
* console.log(Monster.Types.isObject([])) // ↦ false
|
1070
1078
|
* console.log(Monster.Types.isObject({})) // ↦ true
|
@@ -1075,7 +1083,7 @@ function isString(value) {
|
|
1075
1083
|
*
|
1076
1084
|
* ```
|
1077
1085
|
* <script type="module">
|
1078
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1086
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1079
1087
|
* console.log(isObject('2')) // ↦ false
|
1080
1088
|
* console.log(isObject([])) // ↦ false
|
1081
1089
|
* </script>
|
@@ -1106,7 +1114,7 @@ function isObject(value) {
|
|
1106
1114
|
*
|
1107
1115
|
* ```
|
1108
1116
|
* <script type="module">
|
1109
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1117
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1110
1118
|
* console.log(Monster.Types.isInstance('2')) // ↦ false
|
1111
1119
|
* console.log(Monster.Types.isInstance([])) // ↦ false
|
1112
1120
|
* console.log(Monster.Types.isInstance({})) // ↦ true
|
@@ -1117,7 +1125,7 @@ function isObject(value) {
|
|
1117
1125
|
*
|
1118
1126
|
* ```
|
1119
1127
|
* <script type="module">
|
1120
|
-
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1128
|
+
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1121
1129
|
* console.log(isInstance('2')) // ↦ false
|
1122
1130
|
* console.log(isInstance([])) // ↦ false
|
1123
1131
|
* </script>
|
@@ -1145,7 +1153,7 @@ function isInstance(value, instance) {
|
|
1145
1153
|
*
|
1146
1154
|
* ```
|
1147
1155
|
* <script type="module">
|
1148
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1156
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1149
1157
|
* console.log(Monster.Types.isArray('2')) // ↦ false
|
1150
1158
|
* console.log(Monster.Types.isArray([])) // ↦ true
|
1151
1159
|
* </script>
|
@@ -1155,7 +1163,7 @@ function isInstance(value, instance) {
|
|
1155
1163
|
*
|
1156
1164
|
* ```
|
1157
1165
|
* <script type="module">
|
1158
|
-
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1166
|
+
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1159
1167
|
* console.log(isArray('2')) // ↦ false
|
1160
1168
|
* console.log(isArray([])) // ↦ true
|
1161
1169
|
* </script>
|
@@ -1183,7 +1191,7 @@ function isArray(value) {
|
|
1183
1191
|
*
|
1184
1192
|
* ```
|
1185
1193
|
* <script type="module">
|
1186
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1194
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1187
1195
|
* console.log(Monster.Types.isFunction(()=>{})) // ↦ true
|
1188
1196
|
* console.log(Monster.Types.isFunction('2')) // ↦ false
|
1189
1197
|
* console.log(Monster.Types.isFunction([])) // ↦ false
|
@@ -1194,7 +1202,7 @@ function isArray(value) {
|
|
1194
1202
|
*
|
1195
1203
|
* ```
|
1196
1204
|
* <script type="module">
|
1197
|
-
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1205
|
+
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1198
1206
|
* console.log(isFunction(()=>{})) // ↦ true
|
1199
1207
|
* console.log(isFunction('2')) // ↦ false
|
1200
1208
|
* console.log(isFunction([])) // ↦ false
|
@@ -1226,7 +1234,7 @@ function isFunction(value) {
|
|
1226
1234
|
*
|
1227
1235
|
* ```
|
1228
1236
|
* <script type="module">
|
1229
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1237
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1230
1238
|
* console.log(Monster.Types.isInteger(()=>{})) // ↦ true
|
1231
1239
|
* console.log(Monster.Types.isInteger('2')) // ↦ false
|
1232
1240
|
* console.log(Monster.Types.isInteger(2)) // ↦ true
|
@@ -1237,7 +1245,7 @@ function isFunction(value) {
|
|
1237
1245
|
*
|
1238
1246
|
* ```
|
1239
1247
|
* <script type="module">
|
1240
|
-
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1248
|
+
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
1241
1249
|
* console.log(isInteger(()=>{})) // ↦ true
|
1242
1250
|
* console.log(isInteger('2')) // ↦ false
|
1243
1251
|
* console.log(isInteger(2)) // ↦ true
|
@@ -1306,7 +1314,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1306
1314
|
*
|
1307
1315
|
* ```
|
1308
1316
|
* <script type="module">
|
1309
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1317
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/isobject.js';
|
1310
1318
|
* console.log(new Monster.Constraint.IsObject())
|
1311
1319
|
* </script>
|
1312
1320
|
* ```
|
@@ -1315,14 +1323,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1315
1323
|
*
|
1316
1324
|
* ```
|
1317
1325
|
* <script type="module">
|
1318
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1326
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/isobject.js';
|
1319
1327
|
* console.log(new IsObject())
|
1320
1328
|
* </script>
|
1321
1329
|
* ```
|
1322
1330
|
*
|
1323
1331
|
* @example
|
1324
1332
|
*
|
1325
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1333
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/isobject.js';
|
1326
1334
|
*
|
1327
1335
|
* new IsObject()
|
1328
1336
|
* .isValid({})
|
@@ -1420,7 +1428,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1420
1428
|
*
|
1421
1429
|
* ```
|
1422
1430
|
* <script type="module">
|
1423
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1431
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraint/oroperator.js';
|
1424
1432
|
* new Monster.Constraint.OrOperator();
|
1425
1433
|
* </script>
|
1426
1434
|
* ```
|
@@ -1429,16 +1437,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1429
1437
|
*
|
1430
1438
|
* ```
|
1431
1439
|
* <script type="module">
|
1432
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1440
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraint/oroperator.js';
|
1433
1441
|
* new OrOperator();
|
1434
1442
|
* </script>
|
1435
1443
|
* ```
|
1436
1444
|
*
|
1437
1445
|
* @example
|
1438
1446
|
*
|
1439
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1440
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1441
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1447
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/valid.js';
|
1448
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/invalid.js';
|
1449
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/oroperator.js';
|
1442
1450
|
*
|
1443
1451
|
* new OrOperator(
|
1444
1452
|
* new Valid(), new Invalid()).isValid()
|
@@ -1558,7 +1566,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1558
1566
|
*
|
1559
1567
|
* ```
|
1560
1568
|
* <script type="module">
|
1561
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1569
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/valid.js';
|
1562
1570
|
* new Monster.Constraint.Valid();
|
1563
1571
|
* </script>
|
1564
1572
|
* ```
|
@@ -1567,14 +1575,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
1567
1575
|
*
|
1568
1576
|
* ```
|
1569
1577
|
* <script type="module">
|
1570
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1578
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/valid.js';
|
1571
1579
|
* new Valid();
|
1572
1580
|
* </script>
|
1573
1581
|
* ```
|
1574
1582
|
*
|
1575
1583
|
* @example
|
1576
1584
|
*
|
1577
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1585
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/constraints/valid.js';
|
1578
1586
|
*
|
1579
1587
|
* new Valid().isValid()
|
1580
1588
|
* .then(()=>console.log(true))
|
@@ -1681,7 +1689,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1681
1689
|
*
|
1682
1690
|
* ```
|
1683
1691
|
* <script type="module">
|
1684
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1692
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/buildmap.js';
|
1685
1693
|
* console.log(Monster.Data.buildMap())
|
1686
1694
|
* </script>
|
1687
1695
|
* ```
|
@@ -1690,18 +1698,18 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1690
1698
|
*
|
1691
1699
|
* ```
|
1692
1700
|
* <script type="module">
|
1693
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1701
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/buildmap.js';
|
1694
1702
|
* console.log(buildMap())
|
1695
1703
|
* </script>
|
1696
1704
|
* ```
|
1697
|
-
*
|
1705
|
+
*
|
1698
1706
|
* The templates determine the appearance of the keys and the value of the map. Either a single value `id` can be taken or a composite key `${id} ${name}` can be used.
|
1699
|
-
*
|
1707
|
+
*
|
1700
1708
|
* If you want to access values of the parent data set, you have to use the `^` character `${id} ${^.name}`.
|
1701
1709
|
*
|
1702
1710
|
* @example
|
1703
1711
|
*
|
1704
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1712
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/buildmap.js';
|
1705
1713
|
* // a typical data structure as reported by an api
|
1706
1714
|
*
|
1707
1715
|
* let map;
|
@@ -1916,7 +1924,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
|
|
1916
1924
|
* Alternatively to a string selector a callback can be specified. this must return a map.
|
1917
1925
|
*
|
1918
1926
|
* @example
|
1919
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
1927
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/buildmap.js';
|
1920
1928
|
*
|
1921
1929
|
* let obj = {
|
1922
1930
|
* "data": [
|
@@ -2119,7 +2127,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2119
2127
|
*
|
2120
2128
|
* ```
|
2121
2129
|
* <script type="module">
|
2122
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2130
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2123
2131
|
* console.log(Monster.Types.validateIterable('2')) // ↦ TypeError
|
2124
2132
|
* console.log(Monster.Types.validateIterable([])) // ↦ value
|
2125
2133
|
* </script>
|
@@ -2129,7 +2137,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2129
2137
|
*
|
2130
2138
|
* ```
|
2131
2139
|
* <script type="module">
|
2132
|
-
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2140
|
+
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2133
2141
|
* console.log(validateIterable('2')) // ↦ TypeError
|
2134
2142
|
* console.log(validateIterable([])) // ↦ value
|
2135
2143
|
* </script>
|
@@ -2160,7 +2168,7 @@ function validateIterable(value) {
|
|
2160
2168
|
*
|
2161
2169
|
* ```
|
2162
2170
|
* <script type="module">
|
2163
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2171
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2164
2172
|
* console.log(Monster.Types.validatePrimitive('2')) // ↦ value
|
2165
2173
|
* console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError
|
2166
2174
|
* </script>
|
@@ -2170,7 +2178,7 @@ function validateIterable(value) {
|
|
2170
2178
|
*
|
2171
2179
|
* ```
|
2172
2180
|
* <script type="module">
|
2173
|
-
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2181
|
+
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2174
2182
|
* console.log(validatePrimitive('2')) // ↦ value
|
2175
2183
|
* console.log(validatePrimitive([])) // ↦ TypeError
|
2176
2184
|
* </script>
|
@@ -2202,7 +2210,7 @@ function validatePrimitive(value) {
|
|
2202
2210
|
*
|
2203
2211
|
* ```
|
2204
2212
|
* <script type="module">
|
2205
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2213
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2206
2214
|
* console.log(Monster.Types.validateBoolean(true)) // ↦ value
|
2207
2215
|
* console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError
|
2208
2216
|
* console.log(Monster.Types.validateBoolean([])) // ↦ TypeError
|
@@ -2213,7 +2221,7 @@ function validatePrimitive(value) {
|
|
2213
2221
|
*
|
2214
2222
|
* ```
|
2215
2223
|
* <script type="module">
|
2216
|
-
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2224
|
+
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2217
2225
|
* console.log(validateBoolean(false)) // ↦ value
|
2218
2226
|
* console.log(validateBoolean('2')) // ↦ TypeError
|
2219
2227
|
* console.log(validateBoolean([])) // ↦ TypeError
|
@@ -2244,7 +2252,7 @@ function validateBoolean(value) {
|
|
2244
2252
|
*
|
2245
2253
|
* ```
|
2246
2254
|
* <script type="module">
|
2247
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2255
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2248
2256
|
* console.log(Monster.Types.validateString('2')) // ↦ value
|
2249
2257
|
* console.log(Monster.Types.validateString([])) // ↦ TypeError
|
2250
2258
|
* </script>
|
@@ -2254,7 +2262,7 @@ function validateBoolean(value) {
|
|
2254
2262
|
*
|
2255
2263
|
* ```
|
2256
2264
|
* <script type="module">
|
2257
|
-
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2265
|
+
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2258
2266
|
* console.log(validateString('2')) // ↦ value
|
2259
2267
|
* console.log(validateString([])) // ↦ TypeError
|
2260
2268
|
* </script>
|
@@ -2283,7 +2291,7 @@ function validateString(value) {
|
|
2283
2291
|
*
|
2284
2292
|
* ```
|
2285
2293
|
* <script type="module">
|
2286
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2294
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2287
2295
|
* console.log(Monster.Types.validateObject({})) // ↦ value
|
2288
2296
|
* console.log(Monster.Types.validateObject('2')) // ↦ TypeError
|
2289
2297
|
* console.log(Monster.Types.validateObject([])) // ↦ TypeError
|
@@ -2294,7 +2302,7 @@ function validateString(value) {
|
|
2294
2302
|
*
|
2295
2303
|
* ```
|
2296
2304
|
* <script type="module">
|
2297
|
-
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2305
|
+
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2298
2306
|
* console.log(validateObject({})) // ↦ value
|
2299
2307
|
* console.log(validateObject('2')) // ↦ TypeError
|
2300
2308
|
* console.log(validateObject([])) // ↦ TypeError
|
@@ -2324,7 +2332,7 @@ function validateObject(value) {
|
|
2324
2332
|
*
|
2325
2333
|
* ```
|
2326
2334
|
* <script type="module">
|
2327
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2335
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2328
2336
|
* console.log(Monster.Types.validateInstance({}, Object)) // ↦ value
|
2329
2337
|
* console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError
|
2330
2338
|
* console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError
|
@@ -2335,7 +2343,7 @@ function validateObject(value) {
|
|
2335
2343
|
*
|
2336
2344
|
* ```
|
2337
2345
|
* <script type="module">
|
2338
|
-
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2346
|
+
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2339
2347
|
* console.log(validateInstance({}, Object)) // ↦ value
|
2340
2348
|
* console.log(validateInstance('2', Object)) // ↦ TypeError
|
2341
2349
|
* console.log(validateInstance([], Object)) // ↦ TypeError
|
@@ -2375,7 +2383,7 @@ function validateInstance(value, instance) {
|
|
2375
2383
|
*
|
2376
2384
|
* ```
|
2377
2385
|
* <script type="module">
|
2378
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2386
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2379
2387
|
* console.log(Monster.Types.validateArray('2')) // ↦ TypeError
|
2380
2388
|
* console.log(Monster.Types.validateArray([])) // ↦ value
|
2381
2389
|
* </script>
|
@@ -2385,7 +2393,7 @@ function validateInstance(value, instance) {
|
|
2385
2393
|
*
|
2386
2394
|
* ```
|
2387
2395
|
* <script type="module">
|
2388
|
-
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2396
|
+
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2389
2397
|
* console.log(validateArray('2')) // ↦ TypeError
|
2390
2398
|
* console.log(validateArray([])) // ↦ value
|
2391
2399
|
* </script>
|
@@ -2414,7 +2422,7 @@ function validateArray(value) {
|
|
2414
2422
|
*
|
2415
2423
|
* ```
|
2416
2424
|
* <script type="module">
|
2417
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2425
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2418
2426
|
* console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError
|
2419
2427
|
* console.log(Monster.Types.validateSymbol([])) // ↦ value
|
2420
2428
|
* </script>
|
@@ -2424,7 +2432,7 @@ function validateArray(value) {
|
|
2424
2432
|
*
|
2425
2433
|
* ```
|
2426
2434
|
* <script type="module">
|
2427
|
-
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2435
|
+
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2428
2436
|
* console.log(validateSymbol('2')) // ↦ TypeError
|
2429
2437
|
* console.log(validateSymbol()) // ↦ value
|
2430
2438
|
* </script>
|
@@ -2453,7 +2461,7 @@ function validateSymbol(value) {
|
|
2453
2461
|
*
|
2454
2462
|
* ```
|
2455
2463
|
* <script type="module">
|
2456
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2464
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2457
2465
|
* console.log(Monster.Types.validateFunction(()=>{})) // ↦ value
|
2458
2466
|
* console.log(Monster.Types.validateFunction('2')) // ↦ TypeError
|
2459
2467
|
* console.log(Monster.Types.validateFunction([])) // ↦ TypeError
|
@@ -2464,7 +2472,7 @@ function validateSymbol(value) {
|
|
2464
2472
|
*
|
2465
2473
|
* ```
|
2466
2474
|
* <script type="module">
|
2467
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2475
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2468
2476
|
* console.log(validateFunction(()=>{})) // ↦ value
|
2469
2477
|
* console.log(validateFunction('2')) // ↦ TypeError
|
2470
2478
|
* console.log(validateFunction([])) // ↦ TypeError
|
@@ -2494,7 +2502,7 @@ function validateFunction(value) {
|
|
2494
2502
|
*
|
2495
2503
|
* ```
|
2496
2504
|
* <script type="module">
|
2497
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2505
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2498
2506
|
* console.log(Monster.Types.validateInteger(true)) // ↦ TypeError
|
2499
2507
|
* console.log(Monster.Types.validateInteger('2')) // ↦ TypeError
|
2500
2508
|
* console.log(Monster.Types.validateInteger(2)) // ↦ value
|
@@ -2505,7 +2513,7 @@ function validateFunction(value) {
|
|
2505
2513
|
*
|
2506
2514
|
* ```
|
2507
2515
|
* <script type="module">
|
2508
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2516
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/validate.js';
|
2509
2517
|
* console.log(validateInteger(true)) // ↦ TypeError
|
2510
2518
|
* console.log(validateInteger('2')) // ↦ TypeError
|
2511
2519
|
* console.log(validateInteger(2)) // ↦ value
|
@@ -2571,8 +2579,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
2571
2579
|
*
|
2572
2580
|
* ```
|
2573
2581
|
* <script type="module">
|
2574
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2575
|
-
*
|
2582
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/clone.js';
|
2583
|
+
* Monster.Util.clone({})
|
2576
2584
|
* </script>
|
2577
2585
|
* ```
|
2578
2586
|
*
|
@@ -2580,14 +2588,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
2580
2588
|
*
|
2581
2589
|
* ```
|
2582
2590
|
* <script type="module">
|
2583
|
-
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2584
|
-
*
|
2591
|
+
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/clone.js';
|
2592
|
+
* clone({})
|
2585
2593
|
* </script>
|
2586
2594
|
* ```
|
2587
2595
|
*
|
2588
2596
|
* @param {*} obj object to be cloned
|
2589
2597
|
* @returns {*}
|
2590
|
-
*
|
2591
2598
|
* @since 1.0.0
|
2592
2599
|
* @memberOf Monster.Util
|
2593
2600
|
* @copyright schukai GmbH
|
@@ -2691,7 +2698,7 @@ function cloneObject(obj) {
|
|
2691
2698
|
continue;
|
2692
2699
|
}
|
2693
2700
|
|
2694
|
-
if (
|
2701
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_2__.isPrimitive)(obj[key])) {
|
2695
2702
|
copy[key] = obj[key];
|
2696
2703
|
continue;
|
2697
2704
|
}
|
@@ -2793,8 +2800,9 @@ function getGlobal() {
|
|
2793
2800
|
*
|
2794
2801
|
* ```
|
2795
2802
|
* <script type="module">
|
2796
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2797
|
-
*
|
2803
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/global.js';
|
2804
|
+
* Monster.Types.getGlobalObject('document')
|
2805
|
+
* // ↦ { }
|
2798
2806
|
* </script>
|
2799
2807
|
* ```
|
2800
2808
|
*
|
@@ -2802,8 +2810,9 @@ function getGlobal() {
|
|
2802
2810
|
*
|
2803
2811
|
* ```
|
2804
2812
|
* <script type="module">
|
2805
|
-
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2806
|
-
*
|
2813
|
+
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/global.js';
|
2814
|
+
* getGlobalObject('document')
|
2815
|
+
* // ↦ { }
|
2807
2816
|
* </script>
|
2808
2817
|
* ```
|
2809
2818
|
*
|
@@ -2833,7 +2842,7 @@ function getGlobalObject(name) {
|
|
2833
2842
|
*
|
2834
2843
|
* ```
|
2835
2844
|
* <script type="module">
|
2836
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2845
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/global.js';
|
2837
2846
|
* console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
2838
2847
|
* </script>
|
2839
2848
|
* ```
|
@@ -2842,7 +2851,7 @@ function getGlobalObject(name) {
|
|
2842
2851
|
*
|
2843
2852
|
* ```
|
2844
2853
|
* <script type="module">
|
2845
|
-
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2854
|
+
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/global.js';
|
2846
2855
|
* console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
2847
2856
|
* </script>
|
2848
2857
|
* ```
|
@@ -2850,7 +2859,7 @@ function getGlobalObject(name) {
|
|
2850
2859
|
* @since 1.6.0
|
2851
2860
|
* @memberOf Monster.Types
|
2852
2861
|
* @param {string} name
|
2853
|
-
* @
|
2862
|
+
* @return {objec}
|
2854
2863
|
* @throws {TypeError} value is not a function
|
2855
2864
|
* @throws {Error} the function is not defined
|
2856
2865
|
* @throws {TypeError} value is not a string
|
@@ -2893,7 +2902,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
2893
2902
|
*
|
2894
2903
|
* ```
|
2895
2904
|
* <script type="module">
|
2896
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2905
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/typeof.js';
|
2897
2906
|
* console.log(Monster.Types.typeOf())
|
2898
2907
|
* </script>
|
2899
2908
|
* ```
|
@@ -2902,14 +2911,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
2902
2911
|
*
|
2903
2912
|
* ```
|
2904
2913
|
* <script type="module">
|
2905
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2914
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/typeof.js';
|
2906
2915
|
* console.log(typeOf())
|
2907
2916
|
* </script>
|
2908
2917
|
* ```
|
2909
2918
|
*
|
2910
2919
|
* @example
|
2911
2920
|
*
|
2912
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
2921
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/typeof.js';
|
2913
2922
|
*
|
2914
2923
|
* console.log(typeOf(undefined)); // ↦ undefined
|
2915
2924
|
* console.log(typeOf("")); // ↦ string
|
@@ -3028,7 +3037,7 @@ var WILDCARD = '*';
|
|
3028
3037
|
*
|
3029
3038
|
* ```
|
3030
3039
|
* <script type="module">
|
3031
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3040
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pathfinder.js';
|
3032
3041
|
* console.log(new Monster.Data.Pathfinder())
|
3033
3042
|
* </script>
|
3034
3043
|
* ```
|
@@ -3037,7 +3046,7 @@ var WILDCARD = '*';
|
|
3037
3046
|
*
|
3038
3047
|
* ```
|
3039
3048
|
* <script type="module">
|
3040
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3049
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pathfinder.js';
|
3041
3050
|
* console.log(new Pathfinder())
|
3042
3051
|
* </script>
|
3043
3052
|
* ```
|
@@ -3079,7 +3088,7 @@ var WILDCARD = '*';
|
|
3079
3088
|
*
|
3080
3089
|
* @example
|
3081
3090
|
*
|
3082
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3091
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pathfinder.js';
|
3083
3092
|
*
|
3084
3093
|
* let value = new Pathfinder({
|
3085
3094
|
* a: {
|
@@ -3105,7 +3114,7 @@ var WILDCARD = '*';
|
|
3105
3114
|
*
|
3106
3115
|
* @example
|
3107
3116
|
*
|
3108
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3117
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pathfinder.js';
|
3109
3118
|
*
|
3110
3119
|
* let p = new Pathfinder({
|
3111
3120
|
* a: {
|
@@ -3340,8 +3349,12 @@ function getValueViaPath(subject, path, check) {
|
|
3340
3349
|
throw Error("the journey is not at its end (" + parts.join(DELIMITER) + ")");
|
3341
3350
|
}
|
3342
3351
|
|
3343
|
-
if (check === true
|
3344
|
-
|
3352
|
+
if (check === true) {
|
3353
|
+
var descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(subject), current);
|
3354
|
+
|
3355
|
+
if (!subject.hasOwnProperty(current) && descriptor === undefined) {
|
3356
|
+
throw Error('unknown value');
|
3357
|
+
}
|
3345
3358
|
}
|
3346
3359
|
|
3347
3360
|
return anchor;
|
@@ -3516,7 +3529,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
3516
3529
|
*
|
3517
3530
|
* ```
|
3518
3531
|
* <script type="module">
|
3519
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3532
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/stack.js';
|
3520
3533
|
* console.log(new Monster.Types.Stack())
|
3521
3534
|
* </script>
|
3522
3535
|
* ```
|
@@ -3525,7 +3538,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
3525
3538
|
*
|
3526
3539
|
* ```
|
3527
3540
|
* <script type="module">
|
3528
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3541
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/stack.js';
|
3529
3542
|
* console.log(new Stack())
|
3530
3543
|
* </script>
|
3531
3544
|
* ```
|
@@ -3636,7 +3649,7 @@ var Stack = /*#__PURE__*/function (_Base) {
|
|
3636
3649
|
__webpack_require__.r(__webpack_exports__);
|
3637
3650
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
3638
3651
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
3639
|
-
/* harmony export */ "
|
3652
|
+
/* harmony export */ "diff": function() { return /* binding */ diff; }
|
3640
3653
|
/* harmony export */ });
|
3641
3654
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
3642
3655
|
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
@@ -3660,8 +3673,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3660
3673
|
*
|
3661
3674
|
* ```
|
3662
3675
|
* <script type="module">
|
3663
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3664
|
-
*
|
3676
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/diff.js';
|
3677
|
+
* Monster.Data.Diff(a, b)
|
3665
3678
|
* </script>
|
3666
3679
|
* ```
|
3667
3680
|
*
|
@@ -3669,14 +3682,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3669
3682
|
*
|
3670
3683
|
* ```
|
3671
3684
|
* <script type="module">
|
3672
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3673
|
-
*
|
3685
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/diff.js';
|
3686
|
+
* Diff(a, b)
|
3674
3687
|
* </script>
|
3675
3688
|
* ```
|
3676
3689
|
*
|
3677
3690
|
* @example
|
3678
3691
|
*
|
3679
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3692
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/diff.js';
|
3680
3693
|
*
|
3681
3694
|
* // given are two objects x and y.
|
3682
3695
|
*
|
@@ -3724,7 +3737,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
3724
3737
|
* @memberOf Monster.Data
|
3725
3738
|
*/
|
3726
3739
|
|
3727
|
-
function
|
3740
|
+
function diff(first, second) {
|
3728
3741
|
return doDiff(first, second);
|
3729
3742
|
}
|
3730
3743
|
/**
|
@@ -3891,7 +3904,7 @@ function getOperator(a, b) {
|
|
3891
3904
|
return operator;
|
3892
3905
|
}
|
3893
3906
|
|
3894
|
-
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.Data',
|
3907
|
+
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.Data', diff);
|
3895
3908
|
|
3896
3909
|
|
3897
3910
|
/***/ }),
|
@@ -3915,15 +3928,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
3915
3928
|
|
3916
3929
|
|
3917
3930
|
/**
|
3918
|
-
*
|
3931
|
+
* Extend copies all enumerable own properties from one or
|
3919
3932
|
* more source objects to a target object. It returns the modified target object.
|
3920
3933
|
*
|
3921
3934
|
* You can call the method via the monster namespace `Monster.Data.extend()`.
|
3922
3935
|
*
|
3923
3936
|
* ```
|
3924
3937
|
* <script type="module">
|
3925
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3926
|
-
*
|
3938
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/extend.js';
|
3939
|
+
* Monster.Data.extend(a, b)
|
3927
3940
|
* </script>
|
3928
3941
|
* ```
|
3929
3942
|
*
|
@@ -3931,8 +3944,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
3931
3944
|
*
|
3932
3945
|
* ```
|
3933
3946
|
* <script type="module">
|
3934
|
-
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
3935
|
-
*
|
3947
|
+
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/extend.js';
|
3948
|
+
* extend(a, b)
|
3936
3949
|
* </script>
|
3937
3950
|
* ```
|
3938
3951
|
*
|
@@ -4060,8 +4073,8 @@ var DELIMITER = '|';
|
|
4060
4073
|
*
|
4061
4074
|
* ```
|
4062
4075
|
* <script type="module">
|
4063
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4064
|
-
*
|
4076
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pipe.js';
|
4077
|
+
* new Monster.Data.Pipe()
|
4065
4078
|
* </script>
|
4066
4079
|
* ```
|
4067
4080
|
*
|
@@ -4069,8 +4082,8 @@ var DELIMITER = '|';
|
|
4069
4082
|
*
|
4070
4083
|
* ```
|
4071
4084
|
* <script type="module">
|
4072
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4073
|
-
*
|
4085
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pipe.js';
|
4086
|
+
* new Pipe()
|
4074
4087
|
* </script>
|
4075
4088
|
* ```
|
4076
4089
|
*
|
@@ -4080,7 +4093,7 @@ var DELIMITER = '|';
|
|
4080
4093
|
* the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.
|
4081
4094
|
*
|
4082
4095
|
* @example
|
4083
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4096
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/pipe.js';
|
4084
4097
|
*
|
4085
4098
|
* let obj = {
|
4086
4099
|
* a: {
|
@@ -4242,8 +4255,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4242
4255
|
*
|
4243
4256
|
* ```
|
4244
4257
|
* <script type="module">
|
4245
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4246
|
-
*
|
4258
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/transformer.js';
|
4259
|
+
* new Monster.Data.Transformer()
|
4247
4260
|
* </script>
|
4248
4261
|
* ```
|
4249
4262
|
*
|
@@ -4251,12 +4264,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4251
4264
|
*
|
4252
4265
|
* ```
|
4253
4266
|
* <script type="module">
|
4254
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4255
|
-
*
|
4267
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/transformer.js';
|
4268
|
+
* new Transformer()
|
4256
4269
|
* </script>
|
4257
4270
|
* ```
|
4258
4271
|
*
|
4259
|
-
* A simple example is the conversion of all characters to lowercase. for this purpose the command tolower must be used.
|
4272
|
+
* A simple example is the conversion of all characters to lowercase. for this purpose the command `tolower` must be used.
|
4260
4273
|
*
|
4261
4274
|
* ```
|
4262
4275
|
* let t = new Transformer('tolower').run('ABC'); // ↦ abc
|
@@ -4268,16 +4281,23 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4268
4281
|
*
|
4269
4282
|
* | command | parameter | alias | description |
|
4270
4283
|
* |:-------------|:---------------------------|:------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
4271
|
-
* | base64
|
4284
|
+
* | to-base64 | | base64, btob | Converts the value to base64 |
|
4285
|
+
* | from-base64 | | atob | Converts the value from base64 |
|
4272
4286
|
* | call | function:param1:param2:... | | Calling a callback function. The function can be defined in three places: either globally, in the context `addCallback` or in the passed object |
|
4273
|
-
* | default |
|
4287
|
+
* | default | value:type | ?? | If the value is undefined the first argument is returned, otherwise the value. The third optional parameter specifies the desired type. If no type is specified, string is used. Valid types are bool, string, int, float, undefined and object. An object default value must be specified as a base64 encoded json string. (since 1.12.0) |
|
4288
|
+
* | debug | | | the passed value is output (console) and returned |
|
4274
4289
|
* | empty | | | Return empty String "" |
|
4290
|
+
* | first-key | default | | Can be applied to objects and returns the value of the first key. All keys of the object are fetched and sorted. (since 1.23.0) |
|
4275
4291
|
* | fromjson | | | Type conversion from a JSON string (since 1.12.0) |
|
4276
|
-
* | if | statement1:statement2 | ? | Is the ternary operator, the first parameter is the valid statement, the second is the false part. To use the current value in the queue, you can set the value keyword. On the other hand, if you want to have the static string "value", you have to put one backslash \\ in front of it and write value. the follow values are true: 'on', true, 'true' |
|
4292
|
+
* | if | statement1:statement2 | ? | Is the ternary operator, the first parameter is the valid statement, the second is the false part. To use the current value in the queue, you can set the value keyword. On the other hand, if you want to have the static string "value", you have to put one backslash \\ in front of it and write value. the follow values are true: 'on', true, 'true'. If you want to have a space, you also have to write \\ in front of the space. |
|
4277
4293
|
* | index | key:default | property, key | Fetches a value from an object, an array, a map or a set |
|
4294
|
+
* | last-key | default | | Can be applied to objects and returns the value of the last key. All keys of the object are fetched and sorted. (since 1.23.0) |
|
4278
4295
|
* | length | | count | Length of the string or entries of an array or object |
|
4279
4296
|
* | nop | | | Do nothing |
|
4297
|
+
* | nth-key | index:default | | Can be applied to objects and returns the value of the nth key. All keys of the object are fetched and sorted. (since 1.23.0) |
|
4298
|
+
* | nth-last-key | index:default | | Can be applied to objects and returns the value of the nth key from behind. All keys of the object are fetched and sorted. (since 1.23.0) |
|
4280
4299
|
* | path | path | | The access to an object is done via a Pathfinder object |
|
4300
|
+
* | path-exists | path | | Check if the specified path is available in the value (since 1.24.0) |
|
4281
4301
|
* | plaintext | | plain | All HTML tags are removed (*) |
|
4282
4302
|
* | prefix | text | | Adds a prefix |
|
4283
4303
|
* | rawurlencode | | | URL coding |
|
@@ -4287,13 +4307,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4287
4307
|
* | tointeger | | | Type conversion to an integer value |
|
4288
4308
|
* | tojson | | | Type conversion to a JSON string (since 1.8.0) |
|
4289
4309
|
* | tolower | | strtolower, tolowercase | The input value is converted to lowercase letters |
|
4290
|
-
* | tostring | | | Type conversion to a string
|
4310
|
+
* | tostring | | | Type conversion to a string. |
|
4291
4311
|
* | toupper | | strtoupper, touppercase | The input value is converted to uppercase letters |
|
4292
4312
|
* | trim | | | Remove spaces at the beginning and end |
|
4293
4313
|
* | ucfirst | | | First character large |
|
4294
4314
|
* | ucwords | | | Any word beginning large |
|
4295
4315
|
* | undefined | | | Return undefined |
|
4296
|
-
* | uniqid | | | Creates a string with a unique value (**)
|
4316
|
+
* | uniqid | | | Creates a string with a unique value (**)
|
4297
4317
|
*
|
4298
4318
|
* (*) for this functionality the extension [jsdom](https://www.npmjs.com/package/jsdom) must be loaded in the nodejs context.
|
4299
4319
|
*
|
@@ -4330,7 +4350,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
4330
4350
|
*
|
4331
4351
|
* @example
|
4332
4352
|
*
|
4333
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4353
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/data/transformer.js';
|
4334
4354
|
*
|
4335
4355
|
* const transformer = new Transformer("tolower")
|
4336
4356
|
*
|
@@ -4360,7 +4380,6 @@ var Transformer = /*#__PURE__*/function (_Base) {
|
|
4360
4380
|
_classCallCheck(this, Transformer);
|
4361
4381
|
|
4362
4382
|
_this = _super.call(this);
|
4363
|
-
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_5__.validateString)(definition);
|
4364
4383
|
_this.args = disassemble(definition);
|
4365
4384
|
_this.command = _this.args.shift();
|
4366
4385
|
_this.callbacks = new Map();
|
@@ -4428,7 +4447,7 @@ function disassemble(command) {
|
|
4428
4447
|
var regex = /*#__PURE__*/_wrapRegExp(/((\\(.)){1})/mig, {
|
4429
4448
|
pattern: 2,
|
4430
4449
|
char: 3
|
4431
|
-
}); // The separator for args must be
|
4450
|
+
}); // The separator for args must be escaped
|
4432
4451
|
// undefined string which should not occur normally and is also not a regex
|
4433
4452
|
|
4434
4453
|
|
@@ -4508,14 +4527,16 @@ function convertToString(value) {
|
|
4508
4527
|
* @throws {Error} unknown command
|
4509
4528
|
* @throws {TypeError} unsupported type
|
4510
4529
|
* @throws {Error} type not supported
|
4530
|
+
* @throws {Error} missing key parameter
|
4511
4531
|
*/
|
4512
4532
|
|
4513
4533
|
|
4514
4534
|
function transform(value) {
|
4515
4535
|
var _callback;
|
4516
4536
|
|
4537
|
+
var console = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalObject)('console');
|
4517
4538
|
var args = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_6__.clone)(this.args);
|
4518
|
-
var key;
|
4539
|
+
var key, defaultValue;
|
4519
4540
|
|
4520
4541
|
switch (this.command) {
|
4521
4542
|
case 'static':
|
@@ -4630,9 +4651,14 @@ function transform(value) {
|
|
4630
4651
|
|
4631
4652
|
throw new TypeError("unsupported type " + _typeof(value));
|
4632
4653
|
|
4654
|
+
case 'to-base64':
|
4655
|
+
case 'btoa':
|
4633
4656
|
case 'base64':
|
4634
|
-
convertToString(value);
|
4635
|
-
|
4657
|
+
return btoa(convertToString(value));
|
4658
|
+
|
4659
|
+
case 'atob':
|
4660
|
+
case 'from-base64':
|
4661
|
+
return atob(convertToString(value));
|
4636
4662
|
|
4637
4663
|
case 'empty':
|
4638
4664
|
return '';
|
@@ -4640,6 +4666,13 @@ function transform(value) {
|
|
4640
4666
|
case 'undefined':
|
4641
4667
|
return undefined;
|
4642
4668
|
|
4669
|
+
case 'debug':
|
4670
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_4__.isObject)(console)) {
|
4671
|
+
console.log(value);
|
4672
|
+
}
|
4673
|
+
|
4674
|
+
return value;
|
4675
|
+
|
4643
4676
|
case 'prefix':
|
4644
4677
|
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_5__.validateString)(value);
|
4645
4678
|
var prefix = args === null || args === void 0 ? void 0 : args[0];
|
@@ -4653,11 +4686,47 @@ function transform(value) {
|
|
4653
4686
|
case 'uniqid':
|
4654
4687
|
return new _types_id_js__WEBPACK_IMPORTED_MODULE_3__.ID().toString();
|
4655
4688
|
|
4689
|
+
case 'first-key':
|
4690
|
+
case 'last-key':
|
4691
|
+
case 'nth-last-key':
|
4692
|
+
case 'nth-key':
|
4693
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_4__.isObject)(value)) {
|
4694
|
+
throw new Error("type not supported");
|
4695
|
+
}
|
4696
|
+
|
4697
|
+
var keys = Object.keys(value).sort();
|
4698
|
+
|
4699
|
+
if (this.command === 'first-key') {
|
4700
|
+
key = 0;
|
4701
|
+
} else if (this.command === 'last-key') {
|
4702
|
+
key = keys.length - 1;
|
4703
|
+
} else {
|
4704
|
+
key = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_5__.validateInteger)(parseInt(args.shift()));
|
4705
|
+
|
4706
|
+
if (this.command === 'nth-last-key') {
|
4707
|
+
key = keys.length - key - 1;
|
4708
|
+
}
|
4709
|
+
}
|
4710
|
+
|
4711
|
+
defaultValue = args.shift() || '';
|
4712
|
+
var useKey = keys === null || keys === void 0 ? void 0 : keys[key];
|
4713
|
+
|
4714
|
+
if (value !== null && value !== void 0 && value[useKey]) {
|
4715
|
+
return value === null || value === void 0 ? void 0 : value[useKey];
|
4716
|
+
}
|
4717
|
+
|
4718
|
+
return defaultValue;
|
4719
|
+
|
4656
4720
|
case 'key':
|
4657
4721
|
case 'property':
|
4658
4722
|
case 'index':
|
4659
|
-
key = args.shift() ||
|
4660
|
-
|
4723
|
+
key = args.shift() || undefined;
|
4724
|
+
|
4725
|
+
if (key === undefined) {
|
4726
|
+
throw new Error("missing key parameter");
|
4727
|
+
}
|
4728
|
+
|
4729
|
+
defaultValue = args.shift() || undefined;
|
4661
4730
|
|
4662
4731
|
if (value instanceof Map) {
|
4663
4732
|
if (!value.has(key)) {
|
@@ -4677,9 +4746,29 @@ function transform(value) {
|
|
4677
4746
|
|
4678
4747
|
throw new Error("type not supported");
|
4679
4748
|
|
4749
|
+
case 'path-exists':
|
4750
|
+
key = args.shift();
|
4751
|
+
|
4752
|
+
if (key === undefined) {
|
4753
|
+
throw new Error("missing key parameter");
|
4754
|
+
}
|
4755
|
+
|
4756
|
+
return new _pathfinder_js__WEBPACK_IMPORTED_MODULE_7__.Pathfinder(value).exists(key);
|
4757
|
+
|
4680
4758
|
case 'path':
|
4681
|
-
key = args.shift()
|
4682
|
-
|
4759
|
+
key = args.shift();
|
4760
|
+
|
4761
|
+
if (key === undefined) {
|
4762
|
+
throw new Error("missing key parameter");
|
4763
|
+
}
|
4764
|
+
|
4765
|
+
var pf = new _pathfinder_js__WEBPACK_IMPORTED_MODULE_7__.Pathfinder(value);
|
4766
|
+
|
4767
|
+
if (!pf.exists(key)) {
|
4768
|
+
return undefined;
|
4769
|
+
}
|
4770
|
+
|
4771
|
+
return pf.getVia(key);
|
4683
4772
|
|
4684
4773
|
case 'substring':
|
4685
4774
|
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_5__.validateString)(value);
|
@@ -4690,12 +4779,43 @@ function transform(value) {
|
|
4690
4779
|
case 'nop':
|
4691
4780
|
return value;
|
4692
4781
|
|
4782
|
+
case '??':
|
4693
4783
|
case 'default':
|
4694
|
-
if (value !== undefined) {
|
4784
|
+
if (value !== undefined && value !== null) {
|
4695
4785
|
return value;
|
4696
4786
|
}
|
4697
4787
|
|
4698
|
-
|
4788
|
+
defaultValue = args.shift();
|
4789
|
+
var defaultType = args.shift();
|
4790
|
+
|
4791
|
+
if (defaultType === undefined) {
|
4792
|
+
defaultType = 'string';
|
4793
|
+
}
|
4794
|
+
|
4795
|
+
switch (defaultType) {
|
4796
|
+
case 'int':
|
4797
|
+
case 'integer':
|
4798
|
+
return parseInt(defaultValue);
|
4799
|
+
|
4800
|
+
case 'float':
|
4801
|
+
return parseFloat(defaultValue);
|
4802
|
+
|
4803
|
+
case 'undefined':
|
4804
|
+
return undefined;
|
4805
|
+
|
4806
|
+
case 'bool':
|
4807
|
+
case 'boolean':
|
4808
|
+
defaultValue = defaultValue.toLowerCase();
|
4809
|
+
return defaultValue !== 'undefined' && defaultValue !== '' && defaultValue !== 'off' && defaultValue !== 'false' && defaultValue !== 'false' || defaultValue === 'on' || defaultValue === 'true' || defaultValue === 'true';
|
4810
|
+
|
4811
|
+
case 'string':
|
4812
|
+
return "" + defaultValue;
|
4813
|
+
|
4814
|
+
case "object":
|
4815
|
+
return JSON.parse(atob(defaultValue));
|
4816
|
+
}
|
4817
|
+
|
4818
|
+
throw new Error("type not supported");
|
4699
4819
|
|
4700
4820
|
default:
|
4701
4821
|
throw new Error("unknown command " + this.command);
|
@@ -4763,7 +4883,7 @@ var internalCounter = new Map();
|
|
4763
4883
|
*
|
4764
4884
|
* ```
|
4765
4885
|
* <script type="module">
|
4766
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4886
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/id.js';
|
4767
4887
|
* console.log(new Monster.Types.ID())
|
4768
4888
|
* </script>
|
4769
4889
|
* ```
|
@@ -4772,7 +4892,7 @@ var internalCounter = new Map();
|
|
4772
4892
|
*
|
4773
4893
|
* ```
|
4774
4894
|
* <script type="module">
|
4775
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
4895
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/id.js';
|
4776
4896
|
* console.log(new ID())
|
4777
4897
|
* </script>
|
4778
4898
|
* ```
|
@@ -4892,7 +5012,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
4892
5012
|
*
|
4893
5013
|
* ```
|
4894
5014
|
* <script type="module">
|
4895
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5015
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/assembler.js';
|
4896
5016
|
* console.log(new Monster.DOM.Assembler())
|
4897
5017
|
* </script>
|
4898
5018
|
* ```
|
@@ -4901,7 +5021,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
4901
5021
|
*
|
4902
5022
|
* ```
|
4903
5023
|
* <script type="module">
|
4904
|
-
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5024
|
+
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/assembler.js';
|
4905
5025
|
* console.log(new Assembler())
|
4906
5026
|
* </script>
|
4907
5027
|
* ```
|
@@ -5000,6 +5120,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
5000
5120
|
/* harmony import */ var _observer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27);
|
5001
5121
|
/* harmony import */ var _observerlist_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
|
5002
5122
|
/* harmony import */ var _validate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14);
|
5123
|
+
/* harmony import */ var _data_extend_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21);
|
5003
5124
|
|
5004
5125
|
/**
|
5005
5126
|
* @author schukai GmbH
|
@@ -5033,6 +5154,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5033
5154
|
|
5034
5155
|
|
5035
5156
|
|
5157
|
+
|
5036
5158
|
/**
|
5037
5159
|
* An observer manages a callback function
|
5038
5160
|
*
|
@@ -5040,8 +5162,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5040
5162
|
*
|
5041
5163
|
* ```
|
5042
5164
|
* <script type="module">
|
5043
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5044
|
-
*
|
5165
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/proxyobserver.js';
|
5166
|
+
* new Monster.Types.ProxyObserver()
|
5045
5167
|
* </script>
|
5046
5168
|
* ```
|
5047
5169
|
*
|
@@ -5049,8 +5171,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5049
5171
|
*
|
5050
5172
|
* ```
|
5051
5173
|
* <script type="module">
|
5052
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5053
|
-
*
|
5174
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/proxyobserver.js';
|
5175
|
+
* new ProxyObserver()
|
5054
5176
|
* </script>
|
5055
5177
|
* ```
|
5056
5178
|
*
|
@@ -5060,9 +5182,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5060
5182
|
*
|
5061
5183
|
* @example
|
5062
5184
|
*
|
5063
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5064
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5065
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5185
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/proxyobserver.js';
|
5186
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/observer.js';
|
5187
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/is.js';
|
5066
5188
|
*
|
5067
5189
|
* const o = new Observer(function () {
|
5068
5190
|
* if (isObject(this) && this instanceof ProxyObserver) {
|
@@ -5134,6 +5256,25 @@ var ProxyObserver = /*#__PURE__*/function (_Base) {
|
|
5134
5256
|
value: function getSubject() {
|
5135
5257
|
return this.subject;
|
5136
5258
|
}
|
5259
|
+
/**
|
5260
|
+
* @since 1.24.0
|
5261
|
+
* @param {Object} obj
|
5262
|
+
* @return {Monster.Types.ProxyObserver}
|
5263
|
+
*/
|
5264
|
+
|
5265
|
+
}, {
|
5266
|
+
key: "setSubject",
|
5267
|
+
value: function setSubject(obj) {
|
5268
|
+
var i,
|
5269
|
+
k = Object.keys(this.subject);
|
5270
|
+
|
5271
|
+
for (i = 0; i < k.length; i++) {
|
5272
|
+
delete this.subject[k[i]];
|
5273
|
+
}
|
5274
|
+
|
5275
|
+
this.subject = (0,_data_extend_js__WEBPACK_IMPORTED_MODULE_6__.extend)(this.subject, obj);
|
5276
|
+
return this;
|
5277
|
+
}
|
5137
5278
|
/**
|
5138
5279
|
* get the proxied object
|
5139
5280
|
*
|
@@ -5369,7 +5510,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5369
5510
|
*
|
5370
5511
|
* ```
|
5371
5512
|
* <script type="module">
|
5372
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5513
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/observer.js';
|
5373
5514
|
* console.log(new Monster.Types.Observer())
|
5374
5515
|
* </script>
|
5375
5516
|
* ```
|
@@ -5378,7 +5519,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5378
5519
|
*
|
5379
5520
|
* ```
|
5380
5521
|
* <script type="module">
|
5381
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5522
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/observer.js';
|
5382
5523
|
* console.log(new Observer())
|
5383
5524
|
* </script>
|
5384
5525
|
* ```
|
@@ -5412,7 +5553,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5412
5553
|
*
|
5413
5554
|
* @example
|
5414
5555
|
*
|
5415
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5556
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/observer.js';
|
5416
5557
|
*
|
5417
5558
|
* const observer = new Observer(function(a, b, c) {
|
5418
5559
|
* console.log(this, a, b, c); // ↦ "a", 2, true
|
@@ -5612,9 +5753,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5612
5753
|
*
|
5613
5754
|
* ```
|
5614
5755
|
* <script type="module">
|
5615
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5616
|
-
*
|
5617
|
-
* console.log(new Monster.Types.TokenList("myclass row"))
|
5756
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/tokenlist.js';
|
5757
|
+
* new Monster.Types.TokenList("myclass row")
|
5618
5758
|
* </script>
|
5619
5759
|
* ```
|
5620
5760
|
*
|
@@ -5622,16 +5762,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
5622
5762
|
*
|
5623
5763
|
* ```
|
5624
5764
|
* <script type="module">
|
5625
|
-
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
5626
|
-
*
|
5627
|
-
* console.log(new TokenList("myclass row"))
|
5765
|
+
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/tokenlist.js';
|
5766
|
+
* new TokenList("myclass row")
|
5628
5767
|
* </script>
|
5629
5768
|
* ```
|
5630
5769
|
*
|
5631
5770
|
* This class implements the [iteration protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
|
5632
5771
|
*
|
5633
5772
|
* ```
|
5634
|
-
*
|
5773
|
+
* typeof new TokenList("myclass row")[Symbol.iterator];
|
5774
|
+
* // ↦ "function"
|
5635
5775
|
* ```
|
5636
5776
|
*
|
5637
5777
|
* @since 1.2.0
|
@@ -5852,7 +5992,7 @@ var TokenList = /*#__PURE__*/function (_Base, _Symbol$iterator) {
|
|
5852
5992
|
_iterator3.f();
|
5853
5993
|
}
|
5854
5994
|
} else if (typeof value !== "undefined") {
|
5855
|
-
throw new TypeError("unsupported value");
|
5995
|
+
throw new TypeError("unsupported value", "types/tokenlist.js");
|
5856
5996
|
}
|
5857
5997
|
|
5858
5998
|
return this;
|
@@ -5924,7 +6064,7 @@ var TokenList = /*#__PURE__*/function (_Base, _Symbol$iterator) {
|
|
5924
6064
|
_iterator4.f();
|
5925
6065
|
}
|
5926
6066
|
} else if (typeof value !== "undefined") {
|
5927
|
-
throw new TypeError("unsupported value");
|
6067
|
+
throw new TypeError("unsupported value", "types/tokenlist.js");
|
5928
6068
|
}
|
5929
6069
|
|
5930
6070
|
return this;
|
@@ -6045,8 +6185,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6045
6185
|
*
|
6046
6186
|
* ```
|
6047
6187
|
* <script type="module">
|
6048
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6049
|
-
*
|
6188
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/uniquequeue.js';
|
6189
|
+
* new Monster.Types.UniqueQueue()
|
6050
6190
|
* </script>
|
6051
6191
|
* ```
|
6052
6192
|
*
|
@@ -6054,8 +6194,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6054
6194
|
*
|
6055
6195
|
* ```
|
6056
6196
|
* <script type="module">
|
6057
|
-
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6058
|
-
*
|
6197
|
+
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/uniquequeue.js';
|
6198
|
+
* new UniqueQueue()
|
6059
6199
|
* </script>
|
6060
6200
|
* ```
|
6061
6201
|
*
|
@@ -6189,8 +6329,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6189
6329
|
*
|
6190
6330
|
* ```
|
6191
6331
|
* <script type="module">
|
6192
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6193
|
-
*
|
6332
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/queue.js';
|
6333
|
+
* new Monster.Types.Queue()
|
6194
6334
|
* </script>
|
6195
6335
|
* ```
|
6196
6336
|
*
|
@@ -6198,14 +6338,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6198
6338
|
*
|
6199
6339
|
* ```
|
6200
6340
|
* <script type="module">
|
6201
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6202
|
-
*
|
6341
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/queue.js';
|
6342
|
+
* new Queue()
|
6203
6343
|
* </script>
|
6204
6344
|
* ```
|
6205
6345
|
*
|
6206
6346
|
* @example
|
6207
6347
|
*
|
6208
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6348
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/queue.js';
|
6209
6349
|
*
|
6210
6350
|
* const queue = new Queue;
|
6211
6351
|
*
|
@@ -6374,7 +6514,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6374
6514
|
*
|
6375
6515
|
* ```
|
6376
6516
|
* <script type="module">
|
6377
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6517
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/observerlist.js';
|
6378
6518
|
* console.log(new Monster.Types.ObserverList())
|
6379
6519
|
* console.log(new Monster.Types.ObserverList())
|
6380
6520
|
* </script>
|
@@ -6384,7 +6524,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
6384
6524
|
*
|
6385
6525
|
* ```
|
6386
6526
|
* <script type="module">
|
6387
|
-
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6527
|
+
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/observerlist.js';
|
6388
6528
|
* console.log(ObserverList())
|
6389
6529
|
* console.log(ObserverList())
|
6390
6530
|
* </script>
|
@@ -6543,7 +6683,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
6543
6683
|
*
|
6544
6684
|
* ```
|
6545
6685
|
* <script type="module">
|
6546
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6686
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
|
6547
6687
|
* console.log(Monster.DOM.findClosestObjectLink())
|
6548
6688
|
* </script>
|
6549
6689
|
* ```
|
@@ -6552,7 +6692,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
6552
6692
|
*
|
6553
6693
|
* ```
|
6554
6694
|
* <script type="module">
|
6555
|
-
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6695
|
+
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
|
6556
6696
|
* console.log(findClosestObjectLink())
|
6557
6697
|
* </script>
|
6558
6698
|
* ```
|
@@ -6573,7 +6713,7 @@ function findClosestObjectLink(element) {
|
|
6573
6713
|
*
|
6574
6714
|
* ```
|
6575
6715
|
* <script type="module">
|
6576
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6716
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6577
6717
|
* Monster.DOM.addToObjectLink();
|
6578
6718
|
* </script>
|
6579
6719
|
* ```
|
@@ -6582,7 +6722,7 @@ function findClosestObjectLink(element) {
|
|
6582
6722
|
*
|
6583
6723
|
* ```
|
6584
6724
|
* <script type="module">
|
6585
|
-
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6725
|
+
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6586
6726
|
* addToObjectLink();
|
6587
6727
|
* </script>
|
6588
6728
|
* ```
|
@@ -6614,7 +6754,7 @@ function addToObjectLink(element, symbol, object) {
|
|
6614
6754
|
*
|
6615
6755
|
* ```
|
6616
6756
|
* <script type="module">
|
6617
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6757
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6618
6758
|
* Monster.DOM.removeObjectLink();
|
6619
6759
|
* </script>
|
6620
6760
|
* ```
|
@@ -6623,7 +6763,7 @@ function addToObjectLink(element, symbol, object) {
|
|
6623
6763
|
*
|
6624
6764
|
* ```
|
6625
6765
|
* <script type="module">
|
6626
|
-
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6766
|
+
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6627
6767
|
* removeObjectLink();
|
6628
6768
|
* </script>
|
6629
6769
|
* ```
|
@@ -6654,7 +6794,7 @@ function removeObjectLink(element, symbol) {
|
|
6654
6794
|
*
|
6655
6795
|
* ```
|
6656
6796
|
* <script type="module">
|
6657
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6797
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6658
6798
|
* Monster.DOM.hasObjectLink();
|
6659
6799
|
* </script>
|
6660
6800
|
* ```
|
@@ -6663,7 +6803,7 @@ function removeObjectLink(element, symbol) {
|
|
6663
6803
|
*
|
6664
6804
|
* ```
|
6665
6805
|
* <script type="module">
|
6666
|
-
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6806
|
+
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6667
6807
|
* hasObjectLink();
|
6668
6808
|
* </script>
|
6669
6809
|
* ```
|
@@ -6699,7 +6839,7 @@ function hasObjectLink(element, symbol) {
|
|
6699
6839
|
*
|
6700
6840
|
* ```
|
6701
6841
|
* <script type="module">
|
6702
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6842
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6703
6843
|
* Monster.DOM.getLinkedObjects();
|
6704
6844
|
* </script>
|
6705
6845
|
* ```
|
@@ -6708,7 +6848,7 @@ function hasObjectLink(element, symbol) {
|
|
6708
6848
|
*
|
6709
6849
|
* ```
|
6710
6850
|
* <script type="module">
|
6711
|
-
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6851
|
+
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6712
6852
|
* getLinkedObjects();
|
6713
6853
|
* </script>
|
6714
6854
|
* ```
|
@@ -6742,7 +6882,7 @@ function getLinkedObjects(element, symbol) {
|
|
6742
6882
|
*
|
6743
6883
|
* ```
|
6744
6884
|
* <script type="module">
|
6745
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6885
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6746
6886
|
* Monster.DOM.toggleAttributeToken();
|
6747
6887
|
* </script>
|
6748
6888
|
* ```
|
@@ -6751,7 +6891,7 @@ function getLinkedObjects(element, symbol) {
|
|
6751
6891
|
*
|
6752
6892
|
* ```
|
6753
6893
|
* <script type="module">
|
6754
|
-
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6894
|
+
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6755
6895
|
* toggleAttributeToken();
|
6756
6896
|
* </script>
|
6757
6897
|
* ```
|
@@ -6786,7 +6926,7 @@ function toggleAttributeToken(element, key, token) {
|
|
6786
6926
|
*
|
6787
6927
|
* ```
|
6788
6928
|
* <script type="module">
|
6789
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6929
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6790
6930
|
* Monster.DOM.addAttributeToken();
|
6791
6931
|
* </script>
|
6792
6932
|
* ```
|
@@ -6795,7 +6935,7 @@ function toggleAttributeToken(element, key, token) {
|
|
6795
6935
|
*
|
6796
6936
|
* ```
|
6797
6937
|
* <script type="module">
|
6798
|
-
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6938
|
+
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6799
6939
|
* addAttributeToken();
|
6800
6940
|
* </script>
|
6801
6941
|
* ```
|
@@ -6832,7 +6972,7 @@ function addAttributeToken(element, key, token) {
|
|
6832
6972
|
*
|
6833
6973
|
* ```
|
6834
6974
|
* <script type="module">
|
6835
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6975
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6836
6976
|
* Monster.DOM.removeAttributeToken();
|
6837
6977
|
* </script>
|
6838
6978
|
* ```
|
@@ -6841,7 +6981,7 @@ function addAttributeToken(element, key, token) {
|
|
6841
6981
|
*
|
6842
6982
|
* ```
|
6843
6983
|
* <script type="module">
|
6844
|
-
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
6984
|
+
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6845
6985
|
* removeAttributeToken();
|
6846
6986
|
* </script>
|
6847
6987
|
* ```
|
@@ -6877,7 +7017,7 @@ function removeAttributeToken(element, key, token) {
|
|
6877
7017
|
*
|
6878
7018
|
* ```
|
6879
7019
|
* <script type="module">
|
6880
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7020
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6881
7021
|
* Monster.DOM.containsAttributeToken();
|
6882
7022
|
* </script>
|
6883
7023
|
* ```
|
@@ -6886,7 +7026,7 @@ function removeAttributeToken(element, key, token) {
|
|
6886
7026
|
*
|
6887
7027
|
* ```
|
6888
7028
|
* <script type="module">
|
6889
|
-
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7029
|
+
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6890
7030
|
* containsAttributeToken();
|
6891
7031
|
* </script>
|
6892
7032
|
* ```
|
@@ -6919,7 +7059,7 @@ function containsAttributeToken(element, key, token) {
|
|
6919
7059
|
*
|
6920
7060
|
* ```
|
6921
7061
|
* <script type="module">
|
6922
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7062
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6923
7063
|
* Monster.DOM.replaceAttributeToken();
|
6924
7064
|
* </script>
|
6925
7065
|
* ```
|
@@ -6928,7 +7068,7 @@ function containsAttributeToken(element, key, token) {
|
|
6928
7068
|
*
|
6929
7069
|
* ```
|
6930
7070
|
* <script type="module">
|
6931
|
-
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7071
|
+
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6932
7072
|
* replaceAttributeToken();
|
6933
7073
|
* </script>
|
6934
7074
|
* ```
|
@@ -6964,7 +7104,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
6964
7104
|
*
|
6965
7105
|
* ```
|
6966
7106
|
* <script type="module">
|
6967
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7107
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6968
7108
|
* Monster.DOM.clearAttributeTokens();
|
6969
7109
|
* </script>
|
6970
7110
|
* ```
|
@@ -6973,7 +7113,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
6973
7113
|
*
|
6974
7114
|
* ```
|
6975
7115
|
* <script type="module">
|
6976
|
-
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7116
|
+
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
6977
7117
|
* clearAttributeTokens();
|
6978
7118
|
* </script>
|
6979
7119
|
* ```
|
@@ -7003,7 +7143,7 @@ function clearAttributeTokens(element, key) {
|
|
7003
7143
|
*
|
7004
7144
|
* ```
|
7005
7145
|
* <script type="module">
|
7006
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7146
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
7007
7147
|
* Monster.DOM.findClosestByAttribute();
|
7008
7148
|
* </script>
|
7009
7149
|
* ```
|
@@ -7012,7 +7152,7 @@ function clearAttributeTokens(element, key) {
|
|
7012
7152
|
*
|
7013
7153
|
* ```
|
7014
7154
|
* <script type="module">
|
7015
|
-
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
7155
|
+
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/attributes.js';
|
7016
7156
|
* findClosestByAttribute();
|
7017
7157
|
* </script>
|
7018
7158
|
* ```
|
@@ -7056,6 +7196,38 @@ function findClosestByAttribute(element, key, value) {
|
|
7056
7196
|
__webpack_require__.r(__webpack_exports__);
|
7057
7197
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7058
7198
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
7199
|
+
/* harmony export */ "ATTRIBUTE_HIDDEN": function() { return /* binding */ ATTRIBUTE_HIDDEN; },
|
7200
|
+
/* harmony export */ "ATTRIBUTE_EXPORTPARTS": function() { return /* binding */ ATTRIBUTE_EXPORTPARTS; },
|
7201
|
+
/* harmony export */ "ATTRIBUTE_ENTERKEYHINT": function() { return /* binding */ ATTRIBUTE_ENTERKEYHINT; },
|
7202
|
+
/* harmony export */ "ATTRIBUTE_DRAGGABLE": function() { return /* binding */ ATTRIBUTE_DRAGGABLE; },
|
7203
|
+
/* harmony export */ "ATTRIBUTE_DIR": function() { return /* binding */ ATTRIBUTE_DIR; },
|
7204
|
+
/* harmony export */ "ATTRIBUTE_CONTENTEDITABLE": function() { return /* binding */ ATTRIBUTE_CONTENTEDITABLE; },
|
7205
|
+
/* harmony export */ "ATTRIBUTE_AUTOFOCUS": function() { return /* binding */ ATTRIBUTE_AUTOFOCUS; },
|
7206
|
+
/* harmony export */ "ATTRIBUTE_AUTOCAPITALIZE": function() { return /* binding */ ATTRIBUTE_AUTOCAPITALIZE; },
|
7207
|
+
/* harmony export */ "ATTRIBUTE_ACCESSKEY": function() { return /* binding */ ATTRIBUTE_ACCESSKEY; },
|
7208
|
+
/* harmony export */ "TAG_SCRIPT": function() { return /* binding */ TAG_SCRIPT; },
|
7209
|
+
/* harmony export */ "TAG_LINK": function() { return /* binding */ TAG_LINK; },
|
7210
|
+
/* harmony export */ "ATTRIBUTE_INPUTMODE": function() { return /* binding */ ATTRIBUTE_INPUTMODE; },
|
7211
|
+
/* harmony export */ "ATTRIBUTE_IS": function() { return /* binding */ ATTRIBUTE_IS; },
|
7212
|
+
/* harmony export */ "ATTRIBUTE_ITEMPROP": function() { return /* binding */ ATTRIBUTE_ITEMPROP; },
|
7213
|
+
/* harmony export */ "ATTRIBUTE_ITEMID": function() { return /* binding */ ATTRIBUTE_ITEMID; },
|
7214
|
+
/* harmony export */ "ATTRIBUTE_ITEMREF": function() { return /* binding */ ATTRIBUTE_ITEMREF; },
|
7215
|
+
/* harmony export */ "ATTRIBUTE_ITEMSCOPE": function() { return /* binding */ ATTRIBUTE_ITEMSCOPE; },
|
7216
|
+
/* harmony export */ "TAG_STYLE": function() { return /* binding */ TAG_STYLE; },
|
7217
|
+
/* harmony export */ "ATTRIBUTE_ITEMTYPE": function() { return /* binding */ ATTRIBUTE_ITEMTYPE; },
|
7218
|
+
/* harmony export */ "ATTRIBUTE_HREF": function() { return /* binding */ ATTRIBUTE_HREF; },
|
7219
|
+
/* harmony export */ "ATTRIBUTE_LANG": function() { return /* binding */ ATTRIBUTE_LANG; },
|
7220
|
+
/* harmony export */ "ATTRIBUTE_PART": function() { return /* binding */ ATTRIBUTE_PART; },
|
7221
|
+
/* harmony export */ "ATTRIBUTE_SLOT": function() { return /* binding */ ATTRIBUTE_SLOT; },
|
7222
|
+
/* harmony export */ "ATTRIBUTE_SPELLCHECK": function() { return /* binding */ ATTRIBUTE_SPELLCHECK; },
|
7223
|
+
/* harmony export */ "ATTRIBUTE_SRC": function() { return /* binding */ ATTRIBUTE_SRC; },
|
7224
|
+
/* harmony export */ "ATTRIBUTE_TABINDEX": function() { return /* binding */ ATTRIBUTE_TABINDEX; },
|
7225
|
+
/* harmony export */ "ATTRIBUTE_TRANSLATE": function() { return /* binding */ ATTRIBUTE_TRANSLATE; },
|
7226
|
+
/* harmony export */ "ATTRIBUTE_NONCE": function() { return /* binding */ ATTRIBUTE_NONCE; },
|
7227
|
+
/* harmony export */ "ATTRIBUTE_TYPE": function() { return /* binding */ ATTRIBUTE_TYPE; },
|
7228
|
+
/* harmony export */ "ATTRIBUTE_TITLE": function() { return /* binding */ ATTRIBUTE_TITLE; },
|
7229
|
+
/* harmony export */ "ATTRIBUTE_CLASS": function() { return /* binding */ ATTRIBUTE_CLASS; },
|
7230
|
+
/* harmony export */ "ATTRIBUTE_ID": function() { return /* binding */ ATTRIBUTE_ID; },
|
7059
7231
|
/* harmony export */ "ATTRIBUTE_PREFIX": function() { return /* binding */ ATTRIBUTE_PREFIX; },
|
7060
7232
|
/* harmony export */ "ATTRIBUTE_OPTIONS": function() { return /* binding */ ATTRIBUTE_OPTIONS; },
|
7061
7233
|
/* harmony export */ "DEFAULT_THEME": function() { return /* binding */ DEFAULT_THEME; },
|
@@ -7069,7 +7241,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
7069
7241
|
/* harmony export */ "ATTRIBUTE_UPDATER_REMOVE": function() { return /* binding */ ATTRIBUTE_UPDATER_REMOVE; },
|
7070
7242
|
/* harmony export */ "ATTRIBUTE_UPDATER_BIND": function() { return /* binding */ ATTRIBUTE_UPDATER_BIND; },
|
7071
7243
|
/* harmony export */ "ATTRIBUTE_OBJECTLINK": function() { return /* binding */ ATTRIBUTE_OBJECTLINK; },
|
7072
|
-
/* harmony export */ "
|
7244
|
+
/* harmony export */ "ATTRIBUTE_DISABLED": function() { return /* binding */ ATTRIBUTE_DISABLED; },
|
7245
|
+
/* harmony export */ "ATTRIBUTE_ERRORMESSAGE": function() { return /* binding */ ATTRIBUTE_ERRORMESSAGE; },
|
7246
|
+
/* harmony export */ "ATTRIBUTE_VALUE": function() { return /* binding */ ATTRIBUTE_VALUE; },
|
7247
|
+
/* harmony export */ "objectUpdaterLinkSymbol": function() { return /* binding */ objectUpdaterLinkSymbol; }
|
7073
7248
|
/* harmony export */ });
|
7074
7249
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
7075
7250
|
|
@@ -7080,28 +7255,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
7080
7255
|
*/
|
7081
7256
|
|
7082
7257
|
/**
|
7258
|
+
* default theme
|
7083
7259
|
* @memberOf Monster.DOM
|
7084
|
-
* @since 1.8.0
|
7085
7260
|
* @type {string}
|
7086
7261
|
*/
|
7087
7262
|
|
7088
|
-
var
|
7263
|
+
var DEFAULT_THEME = 'monster';
|
7089
7264
|
/**
|
7090
|
-
* This is the name of the attribute to pass options to a control
|
7091
|
-
*
|
7092
7265
|
* @memberOf Monster.DOM
|
7093
7266
|
* @since 1.8.0
|
7094
7267
|
* @type {string}
|
7095
7268
|
*/
|
7096
7269
|
|
7097
|
-
var
|
7270
|
+
var ATTRIBUTE_PREFIX = 'data-monster-';
|
7098
7271
|
/**
|
7099
|
-
*
|
7272
|
+
* This is the name of the attribute to pass options to a control
|
7273
|
+
*
|
7100
7274
|
* @memberOf Monster.DOM
|
7275
|
+
* @since 1.8.0
|
7101
7276
|
* @type {string}
|
7102
7277
|
*/
|
7103
7278
|
|
7104
|
-
var
|
7279
|
+
var ATTRIBUTE_OPTIONS = ATTRIBUTE_PREFIX + 'options';
|
7105
7280
|
/**
|
7106
7281
|
* @memberOf Monster.DOM
|
7107
7282
|
* @type {string}
|
@@ -7164,6 +7339,20 @@ var ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind';
|
|
7164
7339
|
*/
|
7165
7340
|
|
7166
7341
|
var ATTRIBUTE_ROLE = ATTRIBUTE_PREFIX + 'role';
|
7342
|
+
/**
|
7343
|
+
* @memberOf Monster.DOM
|
7344
|
+
* @type {string}
|
7345
|
+
* @since 1.24.0
|
7346
|
+
*/
|
7347
|
+
|
7348
|
+
var ATTRIBUTE_DISABLED = 'disabled';
|
7349
|
+
/**
|
7350
|
+
* @memberOf Monster.DOM
|
7351
|
+
* @type {string}
|
7352
|
+
* @since 1.24.0
|
7353
|
+
*/
|
7354
|
+
|
7355
|
+
var ATTRIBUTE_VALUE = 'value';
|
7167
7356
|
/**
|
7168
7357
|
* @memberOf Monster.DOM
|
7169
7358
|
* @type {string}
|
@@ -7174,114 +7363,338 @@ var ATTRIBUTE_OBJECTLINK = ATTRIBUTE_PREFIX + 'objectlink';
|
|
7174
7363
|
/**
|
7175
7364
|
* @memberOf Monster.DOM
|
7176
7365
|
* @type {string}
|
7177
|
-
* @since 1.
|
7366
|
+
* @since 1.24.0
|
7178
7367
|
*/
|
7179
7368
|
|
7180
|
-
var
|
7369
|
+
var ATTRIBUTE_ERRORMESSAGE = ATTRIBUTE_PREFIX + 'error';
|
7370
|
+
/**
|
7371
|
+
* @memberOf Monster.DOM
|
7372
|
+
* @type {symbol}
|
7373
|
+
* @since 1.24.0
|
7374
|
+
*/
|
7181
7375
|
|
7376
|
+
var objectUpdaterLinkSymbol = Symbol('monsterUpdater');
|
7377
|
+
/**
|
7378
|
+
* @memberOf Monster.DOM
|
7379
|
+
* @type {string}
|
7380
|
+
* @since 1.25.0
|
7381
|
+
*/
|
7182
7382
|
|
7183
|
-
|
7184
|
-
|
7185
|
-
|
7383
|
+
var TAG_SCRIPT = 'script';
|
7384
|
+
/**
|
7385
|
+
* @memberOf Monster.DOM
|
7386
|
+
* @type {string}
|
7387
|
+
* @since 1.25.0
|
7388
|
+
*/
|
7186
7389
|
|
7187
|
-
|
7188
|
-
|
7189
|
-
|
7190
|
-
|
7191
|
-
|
7192
|
-
|
7193
|
-
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
7194
|
-
/* harmony import */ var _customelement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35);
|
7390
|
+
var TAG_STYLE = 'style';
|
7391
|
+
/**
|
7392
|
+
* @memberOf Monster.DOM
|
7393
|
+
* @type {string}
|
7394
|
+
* @since 1.25.0
|
7395
|
+
*/
|
7195
7396
|
|
7397
|
+
var TAG_LINK = 'link';
|
7398
|
+
/**
|
7399
|
+
* @memberOf Monster.DOM
|
7400
|
+
* @type {string}
|
7401
|
+
* @since 1.25.0
|
7402
|
+
*/
|
7196
7403
|
|
7197
|
-
|
7404
|
+
var ATTRIBUTE_ID = 'id';
|
7405
|
+
/**
|
7406
|
+
* @memberOf Monster.DOM
|
7407
|
+
* @type {string}
|
7408
|
+
* @since 1.25.0
|
7409
|
+
*/
|
7198
7410
|
|
7199
|
-
|
7411
|
+
var ATTRIBUTE_CLASS = 'class';
|
7412
|
+
/**
|
7413
|
+
* @memberOf Monster.DOM
|
7414
|
+
* @type {string}
|
7415
|
+
* @since 1.25.0
|
7416
|
+
*/
|
7200
7417
|
|
7201
|
-
|
7418
|
+
var ATTRIBUTE_TITLE = 'title';
|
7419
|
+
/**
|
7420
|
+
* @memberOf Monster.DOM
|
7421
|
+
* @type {string}
|
7422
|
+
* @since 1.25.0
|
7423
|
+
*/
|
7202
7424
|
|
7203
|
-
|
7425
|
+
var ATTRIBUTE_SRC = 'src';
|
7426
|
+
/**
|
7427
|
+
* @memberOf Monster.DOM
|
7428
|
+
* @type {string}
|
7429
|
+
* @since 1.25.0
|
7430
|
+
*/
|
7204
7431
|
|
7205
|
-
|
7432
|
+
var ATTRIBUTE_HREF = 'href';
|
7433
|
+
/**
|
7434
|
+
* @memberOf Monster.DOM
|
7435
|
+
* @type {string}
|
7436
|
+
* @since 1.25.0
|
7437
|
+
*/
|
7206
7438
|
|
7207
|
-
|
7439
|
+
var ATTRIBUTE_TYPE = 'type';
|
7440
|
+
/**
|
7441
|
+
* @memberOf Monster.DOM
|
7442
|
+
* @type {string}
|
7443
|
+
* @since 1.25.0
|
7444
|
+
*/
|
7208
7445
|
|
7209
|
-
|
7446
|
+
var ATTRIBUTE_NONCE = 'nonce';
|
7447
|
+
/**
|
7448
|
+
* @memberOf Monster.DOM
|
7449
|
+
* @type {string}
|
7450
|
+
* @since 1.25.0
|
7451
|
+
*/
|
7210
7452
|
|
7211
|
-
|
7453
|
+
var ATTRIBUTE_TRANSLATE = 'translate';
|
7454
|
+
/**
|
7455
|
+
* @memberOf Monster.DOM
|
7456
|
+
* @type {string}
|
7457
|
+
* @since 1.25.0
|
7458
|
+
*/
|
7212
7459
|
|
7213
|
-
|
7460
|
+
var ATTRIBUTE_TABINDEX = 'tabindex';
|
7461
|
+
/**
|
7462
|
+
* @memberOf Monster.DOM
|
7463
|
+
* @type {string}
|
7464
|
+
* @since 1.25.0
|
7465
|
+
*/
|
7214
7466
|
|
7215
|
-
|
7467
|
+
var ATTRIBUTE_SPELLCHECK = 'spellcheck';
|
7468
|
+
/**
|
7469
|
+
* @memberOf Monster.DOM
|
7470
|
+
* @type {string}
|
7471
|
+
* @since 1.25.0
|
7472
|
+
*/
|
7216
7473
|
|
7217
|
-
|
7474
|
+
var ATTRIBUTE_SLOT = 'slot';
|
7475
|
+
/**
|
7476
|
+
* @memberOf Monster.DOM
|
7477
|
+
* @type {string}
|
7478
|
+
* @since 1.25.0
|
7479
|
+
*/
|
7218
7480
|
|
7219
|
-
|
7481
|
+
var ATTRIBUTE_PART = 'part';
|
7482
|
+
/**
|
7483
|
+
* @memberOf Monster.DOM
|
7484
|
+
* @type {string}
|
7485
|
+
* @since 1.25.0
|
7486
|
+
*/
|
7220
7487
|
|
7221
|
-
|
7488
|
+
var ATTRIBUTE_LANG = 'lang';
|
7489
|
+
/**
|
7490
|
+
* @memberOf Monster.DOM
|
7491
|
+
* @type {string}
|
7492
|
+
* @since 1.25.0
|
7493
|
+
*/
|
7222
7494
|
|
7495
|
+
var ATTRIBUTE_ITEMTYPE = 'itemtype';
|
7496
|
+
/**
|
7497
|
+
* @memberOf Monster.DOM
|
7498
|
+
* @type {string}
|
7499
|
+
* @since 1.25.0
|
7500
|
+
*/
|
7223
7501
|
|
7502
|
+
var ATTRIBUTE_ITEMSCOPE = 'itemscope';
|
7224
7503
|
/**
|
7225
|
-
* @
|
7504
|
+
* @memberOf Monster.DOM
|
7505
|
+
* @type {string}
|
7506
|
+
* @since 1.25.0
|
7226
7507
|
*/
|
7227
7508
|
|
7509
|
+
var ATTRIBUTE_ITEMREF = 'itemref';
|
7510
|
+
/**
|
7511
|
+
* @memberOf Monster.DOM
|
7512
|
+
* @type {string}
|
7513
|
+
* @since 1.25.0
|
7514
|
+
*/
|
7228
7515
|
|
7516
|
+
var ATTRIBUTE_ITEMID = 'itemid';
|
7517
|
+
/**
|
7518
|
+
* @memberOf Monster.DOM
|
7519
|
+
* @type {string}
|
7520
|
+
* @since 1.25.0
|
7521
|
+
*/
|
7229
7522
|
|
7523
|
+
var ATTRIBUTE_ITEMPROP = 'itemprop';
|
7230
7524
|
/**
|
7231
|
-
* @
|
7232
|
-
* @type {
|
7525
|
+
* @memberOf Monster.DOM
|
7526
|
+
* @type {string}
|
7527
|
+
* @since 1.25.0
|
7233
7528
|
*/
|
7234
7529
|
|
7235
|
-
var
|
7530
|
+
var ATTRIBUTE_IS = 'is';
|
7236
7531
|
/**
|
7237
|
-
* To define a new HTML control we need the power of CustomElement
|
7238
|
-
*
|
7239
|
-
* IMPORTANT: after defining a `CustomElement`, the `registerCustomElement` method must be called
|
7240
|
-
* with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.
|
7241
|
-
*
|
7242
|
-
* <img src="./images/customcontrol-class.png">
|
7243
|
-
*
|
7244
|
-
* This control uses `attachInternals()` to integrate the control into a form.
|
7245
|
-
* If the target environment does not support this method, the [polyfill](https://www.npmjs.com/package/element-internals-polyfill ) can be used.
|
7246
|
-
*
|
7247
|
-
* You can create the object via the monster namespace `new Monster.DOM.CustomControl()`.
|
7248
|
-
*
|
7249
|
-
* ```
|
7250
|
-
* <script type="module">
|
7251
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.21.1/dist/modules/dom/customcontrol.js';
|
7252
|
-
* console.log(new Monster.DOM.CustomControl())
|
7253
|
-
* </script>
|
7254
|
-
* ```
|
7255
|
-
*
|
7256
|
-
* Alternatively, you can also integrate this function individually.
|
7257
|
-
*
|
7258
|
-
* ```
|
7259
|
-
* <script type="module">
|
7260
|
-
* import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.21.1/dist/modules/dom/customcontrol.js';
|
7261
|
-
* console.log(new CustomControl())
|
7262
|
-
* </script>
|
7263
|
-
* ```
|
7264
|
-
*
|
7265
|
-
* @startuml customcontrol-class.png
|
7266
|
-
* skinparam monochrome true
|
7267
|
-
* skinparam shadowing false
|
7268
|
-
* HTMLElement <|-- CustomElement
|
7269
|
-
* CustomElement <|-- CustomControl
|
7270
|
-
* @enduml
|
7271
|
-
*
|
7272
|
-
* @summary A base class for customcontrols based on CustomElement
|
7273
|
-
* @see {@link https://www.npmjs.com/package/element-internals-polyfill}
|
7274
|
-
* @see {@link https://github.com/WICG/webcomponents}
|
7275
|
-
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements}
|
7276
|
-
* @since 1.14.0
|
7277
|
-
* @copyright schukai GmbH
|
7278
7532
|
* @memberOf Monster.DOM
|
7533
|
+
* @type {string}
|
7534
|
+
* @since 1.25.0
|
7279
7535
|
*/
|
7280
7536
|
|
7281
|
-
var
|
7282
|
-
|
7537
|
+
var ATTRIBUTE_INPUTMODE = 'inputmode';
|
7538
|
+
/**
|
7539
|
+
* @memberOf Monster.DOM
|
7540
|
+
* @type {string}
|
7541
|
+
* @since 1.25.0
|
7542
|
+
*/
|
7283
7543
|
|
7284
|
-
|
7544
|
+
var ATTRIBUTE_ACCESSKEY = 'accesskey';
|
7545
|
+
/**
|
7546
|
+
* @memberOf Monster.DOM
|
7547
|
+
* @type {string}
|
7548
|
+
* @since 1.25.0
|
7549
|
+
*/
|
7550
|
+
|
7551
|
+
var ATTRIBUTE_AUTOCAPITALIZE = 'autocapitalize';
|
7552
|
+
/**
|
7553
|
+
* @memberOf Monster.DOM
|
7554
|
+
* @type {string}
|
7555
|
+
* @since 1.25.0
|
7556
|
+
*/
|
7557
|
+
|
7558
|
+
var ATTRIBUTE_AUTOFOCUS = 'autofocus';
|
7559
|
+
/**
|
7560
|
+
* @memberOf Monster.DOM
|
7561
|
+
* @type {string}
|
7562
|
+
* @since 1.25.0
|
7563
|
+
*/
|
7564
|
+
|
7565
|
+
var ATTRIBUTE_CONTENTEDITABLE = 'contenteditable';
|
7566
|
+
/**
|
7567
|
+
* @memberOf Monster.DOM
|
7568
|
+
* @type {string}
|
7569
|
+
* @since 1.25.0
|
7570
|
+
*/
|
7571
|
+
|
7572
|
+
var ATTRIBUTE_DIR = 'dir';
|
7573
|
+
/**
|
7574
|
+
* @memberOf Monster.DOM
|
7575
|
+
* @type {string}
|
7576
|
+
* @since 1.25.0
|
7577
|
+
*/
|
7578
|
+
|
7579
|
+
var ATTRIBUTE_DRAGGABLE = 'draggable';
|
7580
|
+
/**
|
7581
|
+
* @memberOf Monster.DOM
|
7582
|
+
* @type {string}
|
7583
|
+
* @since 1.25.0
|
7584
|
+
*/
|
7585
|
+
|
7586
|
+
var ATTRIBUTE_ENTERKEYHINT = 'enterkeyhint';
|
7587
|
+
/**
|
7588
|
+
* @memberOf Monster.DOM
|
7589
|
+
* @type {string}
|
7590
|
+
* @since 1.25.0
|
7591
|
+
*/
|
7592
|
+
|
7593
|
+
var ATTRIBUTE_EXPORTPARTS = 'exportparts';
|
7594
|
+
/**
|
7595
|
+
* @memberOf Monster.DOM
|
7596
|
+
* @type {string}
|
7597
|
+
* @since 1.25.0
|
7598
|
+
*/
|
7599
|
+
|
7600
|
+
var ATTRIBUTE_HIDDEN = 'hidden';
|
7601
|
+
|
7602
|
+
|
7603
|
+
/***/ }),
|
7604
|
+
/* 34 */
|
7605
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7606
|
+
|
7607
|
+
__webpack_require__.r(__webpack_exports__);
|
7608
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7609
|
+
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_1__.Monster; },
|
7610
|
+
/* harmony export */ "CustomControl": function() { return /* binding */ CustomControl; }
|
7611
|
+
/* harmony export */ });
|
7612
|
+
/* harmony import */ var _data_extend_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
|
7613
|
+
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
7614
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33);
|
7615
|
+
/* harmony import */ var _customelement_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35);
|
7616
|
+
|
7617
|
+
|
7618
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
7619
|
+
|
7620
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
7621
|
+
|
7622
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
7623
|
+
|
7624
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
7625
|
+
|
7626
|
+
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
|
7627
|
+
|
7628
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
7629
|
+
|
7630
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
7631
|
+
|
7632
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
7633
|
+
|
7634
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
7635
|
+
|
7636
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
7637
|
+
|
7638
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
7639
|
+
|
7640
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
7641
|
+
|
7642
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
7643
|
+
|
7644
|
+
|
7645
|
+
/**
|
7646
|
+
* @author schukai GmbH
|
7647
|
+
*/
|
7648
|
+
|
7649
|
+
|
7650
|
+
|
7651
|
+
|
7652
|
+
/**
|
7653
|
+
* @private
|
7654
|
+
* @type {symbol}
|
7655
|
+
*/
|
7656
|
+
|
7657
|
+
var attachedInternalSymbol = Symbol('attachedInternal');
|
7658
|
+
/**
|
7659
|
+
* To define a new HTML control we need the power of CustomElement
|
7660
|
+
*
|
7661
|
+
* IMPORTANT: after defining a `CustomElement`, the `registerCustomElement` method must be called
|
7662
|
+
* with the new class name. only then will the tag defined via the `getTag` method be made known to the DOM.
|
7663
|
+
*
|
7664
|
+
* <img src="./images/customcontrol-class.png">
|
7665
|
+
*
|
7666
|
+
* This control uses `attachInternals()` to integrate the control into a form.
|
7667
|
+
* If the target environment does not support this method, the [polyfill](https://www.npmjs.com/package/element-internals-polyfill ) can be used.
|
7668
|
+
*
|
7669
|
+
* You can create the object via the function `document.createElement()`.
|
7670
|
+
*
|
7671
|
+
* ```
|
7672
|
+
* <script type="module">
|
7673
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/customcontrol.js';
|
7674
|
+
* document.createElement('monster-')
|
7675
|
+
* </script>
|
7676
|
+
* ```
|
7677
|
+
*
|
7678
|
+
* @startuml customcontrol-class.png
|
7679
|
+
* skinparam monochrome true
|
7680
|
+
* skinparam shadowing false
|
7681
|
+
* HTMLElement <|-- CustomElement
|
7682
|
+
* CustomElement <|-- CustomControl
|
7683
|
+
* @enduml
|
7684
|
+
*
|
7685
|
+
* @summary A base class for customcontrols based on CustomElement
|
7686
|
+
* @see {@link https://www.npmjs.com/package/element-internals-polyfill}
|
7687
|
+
* @see {@link https://github.com/WICG/webcomponents}
|
7688
|
+
* @see {@link https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements}
|
7689
|
+
* @since 1.14.0
|
7690
|
+
* @copyright schukai GmbH
|
7691
|
+
* @memberOf Monster.DOM
|
7692
|
+
*/
|
7693
|
+
|
7694
|
+
var CustomControl = /*#__PURE__*/function (_CustomElement) {
|
7695
|
+
_inherits(CustomControl, _CustomElement);
|
7696
|
+
|
7697
|
+
var _super = _createSuper(CustomControl);
|
7285
7698
|
|
7286
7699
|
/**
|
7287
7700
|
* IMPORTANT: CustomControls instances are not created via the constructor, but either via a tag in the HTML or via <code>document.createElement()</code>.
|
@@ -7302,16 +7715,17 @@ var CustomControl = /*#__PURE__*/function (_CustomElement) {
|
|
7302
7715
|
* @property {Object}
|
7303
7716
|
* @private
|
7304
7717
|
*/
|
7305
|
-
_this[
|
7718
|
+
_this[attachedInternalSymbol] = _this.attachInternals();
|
7306
7719
|
}
|
7307
7720
|
|
7721
|
+
initObserver.call(_assertThisInitialized(_this));
|
7308
7722
|
return _this;
|
7309
7723
|
}
|
7310
7724
|
/**
|
7725
|
+
* This method determines which attributes are to be monitored by `attributeChangedCallback()`.
|
7311
7726
|
*
|
7312
|
-
* @
|
7313
|
-
* @since 1.
|
7314
|
-
* @return {boolean}
|
7727
|
+
* @return {string[]}
|
7728
|
+
* @since 1.15.0
|
7315
7729
|
*/
|
7316
7730
|
|
7317
7731
|
|
@@ -7560,6 +7974,21 @@ var CustomControl = /*#__PURE__*/function (_CustomElement) {
|
|
7560
7974
|
return (_getInternal$call8 = getInternal.call(this)) === null || _getInternal$call8 === void 0 ? void 0 : _getInternal$call8.reportValidity();
|
7561
7975
|
}
|
7562
7976
|
}], [{
|
7977
|
+
key: "observedAttributes",
|
7978
|
+
get: function get() {
|
7979
|
+
var list = _get(_getPrototypeOf(CustomControl), "observedAttributes", this);
|
7980
|
+
|
7981
|
+
list.push(_constants_js__WEBPACK_IMPORTED_MODULE_2__.ATTRIBUTE_VALUE);
|
7982
|
+
return list;
|
7983
|
+
}
|
7984
|
+
/**
|
7985
|
+
*
|
7986
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals}
|
7987
|
+
* @since 1.14.0
|
7988
|
+
* @return {boolean}
|
7989
|
+
*/
|
7990
|
+
|
7991
|
+
}, {
|
7563
7992
|
key: "formAssociated",
|
7564
7993
|
get: function get() {
|
7565
7994
|
return true;
|
@@ -7567,7 +7996,7 @@ var CustomControl = /*#__PURE__*/function (_CustomElement) {
|
|
7567
7996
|
}]);
|
7568
7997
|
|
7569
7998
|
return CustomControl;
|
7570
|
-
}(
|
7999
|
+
}(_customelement_js__WEBPACK_IMPORTED_MODULE_3__.CustomElement);
|
7571
8000
|
/**
|
7572
8001
|
* @private
|
7573
8002
|
* @return {object}
|
@@ -7579,11 +8008,25 @@ var CustomControl = /*#__PURE__*/function (_CustomElement) {
|
|
7579
8008
|
function getInternal() {
|
7580
8009
|
var self = this;
|
7581
8010
|
|
7582
|
-
if (!(
|
8011
|
+
if (!(attachedInternalSymbol in this)) {
|
7583
8012
|
throw new Error('ElementInternals is not supported and a polyfill is necessary');
|
7584
8013
|
}
|
7585
8014
|
|
7586
|
-
return this[
|
8015
|
+
return this[attachedInternalSymbol];
|
8016
|
+
}
|
8017
|
+
/**
|
8018
|
+
* @private
|
8019
|
+
* @return {object}
|
8020
|
+
* @this CustomControl
|
8021
|
+
*/
|
8022
|
+
|
8023
|
+
|
8024
|
+
function initObserver() {
|
8025
|
+
var self = this; // value
|
8026
|
+
|
8027
|
+
self[_customelement_js__WEBPACK_IMPORTED_MODULE_3__.attributeObserverSymbol]['value'] = function () {
|
8028
|
+
self.setOption('value', self.getAttribute('value'));
|
8029
|
+
};
|
7587
8030
|
}
|
7588
8031
|
|
7589
8032
|
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_1__.assignToNamespace)('Monster.DOM', CustomControl);
|
@@ -7599,7 +8042,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
7599
8042
|
/* harmony export */ "registerCustomElement": function() { return /* binding */ registerCustomElement; },
|
7600
8043
|
/* harmony export */ "CustomElement": function() { return /* binding */ CustomElement; },
|
7601
8044
|
/* harmony export */ "initMethodSymbol": function() { return /* binding */ initMethodSymbol; },
|
7602
|
-
/* harmony export */ "assembleMethodSymbol": function() { return /* binding */ assembleMethodSymbol; }
|
8045
|
+
/* harmony export */ "assembleMethodSymbol": function() { return /* binding */ assembleMethodSymbol; },
|
8046
|
+
/* harmony export */ "assignUpdaterToElement": function() { return /* binding */ assignUpdaterToElement; },
|
8047
|
+
/* harmony export */ "attributeObserverSymbol": function() { return /* binding */ attributeObserverSymbol; }
|
7603
8048
|
/* harmony export */ });
|
7604
8049
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
7605
8050
|
/* harmony import */ var _data_extend_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
@@ -7617,6 +8062,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
7617
8062
|
/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(38);
|
7618
8063
|
/* harmony import */ var _updater_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(40);
|
7619
8064
|
|
8065
|
+
/**
|
8066
|
+
* @author schukai GmbH
|
8067
|
+
*/
|
7620
8068
|
|
7621
8069
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
7622
8070
|
|
@@ -7626,13 +8074,21 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
7626
8074
|
|
7627
8075
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
7628
8076
|
|
8077
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
8078
|
+
|
8079
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8080
|
+
|
8081
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
8082
|
+
|
8083
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
8084
|
+
|
7629
8085
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
7630
8086
|
|
7631
|
-
function
|
8087
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
7632
8088
|
|
7633
|
-
function
|
8089
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
7634
8090
|
|
7635
|
-
function
|
8091
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
7636
8092
|
|
7637
8093
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
7638
8094
|
|
@@ -7663,10 +8119,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
7663
8119
|
|
7664
8120
|
|
7665
8121
|
|
7666
|
-
/**
|
7667
|
-
* @author schukai GmbH
|
7668
|
-
*/
|
7669
|
-
|
7670
8122
|
|
7671
8123
|
|
7672
8124
|
|
@@ -7680,29 +8132,24 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
7680
8132
|
|
7681
8133
|
|
7682
8134
|
/**
|
7683
|
-
* @
|
7684
|
-
* @type {symbol}
|
7685
|
-
*/
|
7686
|
-
|
7687
|
-
var internalDataSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPERTY_KEY_INTERNALDATA);
|
7688
|
-
/**
|
7689
|
-
* @private
|
8135
|
+
* @memberOf Monster.DOM
|
7690
8136
|
* @type {symbol}
|
7691
8137
|
*/
|
7692
8138
|
|
7693
|
-
var
|
8139
|
+
var initMethodSymbol = Symbol('initMethodSymbol');
|
7694
8140
|
/**
|
7695
8141
|
* @memberOf Monster.DOM
|
7696
8142
|
* @type {symbol}
|
7697
8143
|
*/
|
7698
8144
|
|
7699
|
-
var
|
8145
|
+
var assembleMethodSymbol = Symbol('assembleMethodSymbol');
|
7700
8146
|
/**
|
8147
|
+
* this symbol holds the attribute observer callbacks. The key is the attribute name.
|
7701
8148
|
* @memberOf Monster.DOM
|
7702
8149
|
* @type {symbol}
|
7703
8150
|
*/
|
7704
8151
|
|
7705
|
-
var
|
8152
|
+
var attributeObserverSymbol = Symbol('attributeObserver');
|
7706
8153
|
/**
|
7707
8154
|
* HTMLElement
|
7708
8155
|
* @external HTMLElement
|
@@ -7754,21 +8201,12 @@ var assembleMethodSymbol = Symbol('assembleMethodSymbol');
|
|
7754
8201
|
*
|
7755
8202
|
* <img src="./images/customelement-class.png">
|
7756
8203
|
*
|
7757
|
-
* You can create the object via the
|
8204
|
+
* You can create the object via the function `document.createElement()`.
|
7758
8205
|
*
|
7759
8206
|
* ```
|
7760
8207
|
* <script type="module">
|
7761
|
-
* import {
|
7762
|
-
*
|
7763
|
-
* </script>
|
7764
|
-
* ```
|
7765
|
-
*
|
7766
|
-
* Alternatively, you can also integrate this function individually.
|
7767
|
-
*
|
7768
|
-
* ```
|
7769
|
-
* <script type="module">
|
7770
|
-
* import {CustomElement} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.21.1/dist/modules/dom/customelement.js';
|
7771
|
-
* console.log(new CustomElement())
|
8208
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/customelement.js';
|
8209
|
+
* document.createElement('monster-')
|
7772
8210
|
* </script>
|
7773
8211
|
* ```
|
7774
8212
|
*
|
@@ -7879,9 +8317,10 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
7879
8317
|
_classCallCheck(this, CustomElement);
|
7880
8318
|
|
7881
8319
|
_this = _super.call(this);
|
7882
|
-
_this[
|
8320
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol] = new _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_8__.ProxyObserver({
|
7883
8321
|
'options': (0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)({}, _this.defaults, getOptionsFromAttributes.call(_assertThisInitialized(_this)))
|
7884
8322
|
});
|
8323
|
+
_this[attributeObserverSymbol] = {};
|
7885
8324
|
initOptionObserver.call(_assertThisInitialized(_this));
|
7886
8325
|
|
7887
8326
|
_this[initMethodSymbol]();
|
@@ -7932,12 +8371,11 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
7932
8371
|
* @property {string} templates.main=undefined Main template
|
7933
8372
|
*
|
7934
8373
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow
|
7935
|
-
* @return {{shadowMode: string, delegatesFocus: boolean}}
|
7936
8374
|
* @since 1.8.0
|
7937
8375
|
*/
|
7938
8376
|
function get() {
|
7939
8377
|
return {
|
7940
|
-
|
8378
|
+
ATTRIBUTE_DISABLED: this.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED),
|
7941
8379
|
shadowMode: 'open',
|
7942
8380
|
delegatesFocus: true,
|
7943
8381
|
templates: {
|
@@ -7965,7 +8403,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
7965
8403
|
* @returns {CustomElement}
|
7966
8404
|
*/
|
7967
8405
|
function attachObserver(observer) {
|
7968
|
-
this[
|
8406
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].attachObserver(observer);
|
7969
8407
|
return this;
|
7970
8408
|
}
|
7971
8409
|
/**
|
@@ -7978,7 +8416,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
7978
8416
|
}, {
|
7979
8417
|
key: "detachObserver",
|
7980
8418
|
value: function detachObserver(observer) {
|
7981
|
-
this[
|
8419
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].detachObserver(observer);
|
7982
8420
|
return this;
|
7983
8421
|
}
|
7984
8422
|
/**
|
@@ -7989,7 +8427,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
7989
8427
|
}, {
|
7990
8428
|
key: "containsObserver",
|
7991
8429
|
value: function containsObserver(observer) {
|
7992
|
-
return this[
|
8430
|
+
return this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].containsObserver(observer);
|
7993
8431
|
}
|
7994
8432
|
/**
|
7995
8433
|
* nested options can be specified by path `a.b.c`
|
@@ -8006,7 +8444,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8006
8444
|
var value;
|
8007
8445
|
|
8008
8446
|
try {
|
8009
|
-
value = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(this[
|
8447
|
+
value = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].getRealSubject()['options']).getVia(path);
|
8010
8448
|
} catch (e) {}
|
8011
8449
|
|
8012
8450
|
if (value === undefined) return defaultValue;
|
@@ -8024,7 +8462,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8024
8462
|
}, {
|
8025
8463
|
key: "setOption",
|
8026
8464
|
value: function setOption(path, value) {
|
8027
|
-
new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(this[
|
8465
|
+
new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].getSubject()['options']).setVia(path, value);
|
8028
8466
|
return this;
|
8029
8467
|
}
|
8030
8468
|
/**
|
@@ -8041,7 +8479,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8041
8479
|
}
|
8042
8480
|
|
8043
8481
|
var self = this;
|
8044
|
-
(0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)(self[
|
8482
|
+
(0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].getSubject()['options'], self.defaults, options);
|
8045
8483
|
return self;
|
8046
8484
|
}
|
8047
8485
|
/**
|
@@ -8067,12 +8505,12 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8067
8505
|
key: assembleMethodSymbol,
|
8068
8506
|
value: function value() {
|
8069
8507
|
var self = this;
|
8070
|
-
var elements;
|
8508
|
+
var elements, nodeList;
|
8071
8509
|
|
8072
|
-
if (
|
8510
|
+
if (self.getOption('shadowMode', false) !== false) {
|
8073
8511
|
try {
|
8074
|
-
initShadowRoot.call(
|
8075
|
-
elements =
|
8512
|
+
initShadowRoot.call(self);
|
8513
|
+
elements = self.shadowRoot.childNodes;
|
8076
8514
|
} catch (e) {}
|
8077
8515
|
|
8078
8516
|
try {
|
@@ -8081,37 +8519,20 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8081
8519
|
}
|
8082
8520
|
|
8083
8521
|
if (!(elements instanceof NodeList)) {
|
8084
|
-
|
8085
|
-
|
8086
|
-
|
8087
|
-
|
8088
|
-
var updater = new Set();
|
8089
|
-
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addToObjectLink)(this, objectLinkSymbol, updater);
|
8090
|
-
|
8091
|
-
var _loop = function _loop() {
|
8092
|
-
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
8093
|
-
element = _Object$entries$_i[1];
|
8094
|
-
|
8095
|
-
if (!(element instanceof HTMLElement)) return "continue";
|
8096
|
-
if (element instanceof HTMLTemplateElement) return "continue";
|
8097
|
-
var u = new _updater_js__WEBPACK_IMPORTED_MODULE_14__.Updater(element, (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(self[internalDataSymbol].getRealSubject()['options']));
|
8098
|
-
updater.add(u);
|
8099
|
-
u.run().then(function () {
|
8100
|
-
u.enableEventProcessing();
|
8101
|
-
});
|
8102
|
-
};
|
8103
|
-
|
8104
|
-
for (var _i = 0, _Object$entries = Object.entries(elements); _i < _Object$entries.length; _i++) {
|
8105
|
-
var _ret = _loop();
|
8106
|
-
|
8107
|
-
if (_ret === "continue") continue;
|
8522
|
+
if (!(elements instanceof NodeList)) {
|
8523
|
+
initHtmlContent.call(this);
|
8524
|
+
elements = this.childNodes;
|
8525
|
+
}
|
8108
8526
|
}
|
8109
8527
|
|
8110
|
-
|
8111
|
-
|
8528
|
+
try {
|
8529
|
+
nodeList = new Set([].concat(_toConsumableArray(elements), _toConsumableArray(getSlottedElements.call(self))));
|
8530
|
+
} catch (e) {
|
8531
|
+
nodeList = elements;
|
8112
8532
|
}
|
8113
8533
|
|
8114
|
-
|
8534
|
+
assignUpdaterToElement.call(self, nodeList, (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].getRealSubject()['options']));
|
8535
|
+
return self;
|
8115
8536
|
}
|
8116
8537
|
/**
|
8117
8538
|
* Called every time the element is inserted into the DOM. Useful for running setup code, such as
|
@@ -8126,7 +8547,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8126
8547
|
value: function connectedCallback() {
|
8127
8548
|
var self = this;
|
8128
8549
|
|
8129
|
-
if (!(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.hasObjectLink)(self,
|
8550
|
+
if (!(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.hasObjectLink)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.objectUpdaterLinkSymbol)) {
|
8130
8551
|
self[assembleMethodSymbol]();
|
8131
8552
|
}
|
8132
8553
|
}
|
@@ -8165,10 +8586,13 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8165
8586
|
}, {
|
8166
8587
|
key: "attributeChangedCallback",
|
8167
8588
|
value: function attributeChangedCallback(attrName, oldVal, newVal) {
|
8589
|
+
var _self$attributeObserv;
|
8590
|
+
|
8168
8591
|
var self = this;
|
8592
|
+
var callback = (_self$attributeObserv = self[attributeObserverSymbol]) === null || _self$attributeObserv === void 0 ? void 0 : _self$attributeObserv[attrName];
|
8169
8593
|
|
8170
|
-
if (
|
8171
|
-
|
8594
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isFunction)(callback)) {
|
8595
|
+
callback.call(self, newVal, oldVal);
|
8172
8596
|
}
|
8173
8597
|
}
|
8174
8598
|
/**
|
@@ -8197,7 +8621,7 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8197
8621
|
}], [{
|
8198
8622
|
key: "observedAttributes",
|
8199
8623
|
get: function get() {
|
8200
|
-
return [_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS];
|
8624
|
+
return [_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS, _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED];
|
8201
8625
|
}
|
8202
8626
|
}, {
|
8203
8627
|
key: "getTag",
|
@@ -8237,6 +8661,49 @@ var CustomElement = /*#__PURE__*/function (_HTMLElement) {
|
|
8237
8661
|
return CustomElement;
|
8238
8662
|
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
8239
8663
|
/**
|
8664
|
+
* @private
|
8665
|
+
* @param {String} filter
|
8666
|
+
* @return {*}
|
8667
|
+
* @this CustomElement
|
8668
|
+
* @since 1.23.0
|
8669
|
+
*/
|
8670
|
+
|
8671
|
+
|
8672
|
+
function getSlottedElements(filter) {
|
8673
|
+
var self = this;
|
8674
|
+
var result = new Set();
|
8675
|
+
|
8676
|
+
if (!(self.shadowRoot instanceof ShadowRoot)) {
|
8677
|
+
return result;
|
8678
|
+
}
|
8679
|
+
|
8680
|
+
var slots = self.shadowRoot.querySelectorAll('slot');
|
8681
|
+
|
8682
|
+
for (var _i = 0, _Object$entries = Object.entries(slots); _i < _Object$entries.length; _i++) {
|
8683
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
8684
|
+
slot = _Object$entries$_i[1];
|
8685
|
+
|
8686
|
+
slot.assignedElements().forEach(function (node) {
|
8687
|
+
if (!(node instanceof HTMLElement)) return;
|
8688
|
+
|
8689
|
+
if (filter !== undefined) {
|
8690
|
+
node.querySelectorAll(filter).forEach(function (n) {
|
8691
|
+
result.add(n);
|
8692
|
+
});
|
8693
|
+
|
8694
|
+
if (node.matches(filter)) {
|
8695
|
+
result.add(node);
|
8696
|
+
}
|
8697
|
+
} else {
|
8698
|
+
result.add(node);
|
8699
|
+
}
|
8700
|
+
});
|
8701
|
+
}
|
8702
|
+
|
8703
|
+
return result;
|
8704
|
+
}
|
8705
|
+
/**
|
8706
|
+
* @this CustomElement
|
8240
8707
|
* @private
|
8241
8708
|
* @param {Node} node
|
8242
8709
|
* @return {boolean}
|
@@ -8280,31 +8747,40 @@ function initOptionObserver() {
|
|
8280
8747
|
return;
|
8281
8748
|
}
|
8282
8749
|
|
8283
|
-
|
8284
|
-
var found = self.shadowRoot.querySelectorAll('button, command, fieldset, keygen, optgroup, option, select, textarea, input, [data-monster-objectlink]');
|
8750
|
+
lastDisabledValue = flag;
|
8285
8751
|
|
8286
|
-
|
8287
|
-
|
8288
|
-
|
8752
|
+
if (!(self.shadowRoot instanceof ShadowRoot)) {
|
8753
|
+
return;
|
8754
|
+
}
|
8289
8755
|
|
8290
|
-
|
8291
|
-
|
8292
|
-
|
8293
|
-
|
8294
|
-
|
8295
|
-
|
8756
|
+
var query = 'button, command, fieldset, keygen, optgroup, option, select, textarea, input, [data-monster-objectlink]';
|
8757
|
+
var elements = self.shadowRoot.querySelectorAll(query);
|
8758
|
+
var nodeList;
|
8759
|
+
|
8760
|
+
try {
|
8761
|
+
nodeList = new Set([].concat(_toConsumableArray(elements), _toConsumableArray(getSlottedElements.call(self, query))));
|
8762
|
+
} catch (e) {
|
8763
|
+
nodeList = elements;
|
8296
8764
|
}
|
8297
8765
|
|
8298
|
-
|
8766
|
+
for (var _i3 = 0, _arr2 = _toConsumableArray(nodeList); _i3 < _arr2.length; _i3++) {
|
8767
|
+
var element = _arr2[_i3];
|
8768
|
+
|
8769
|
+
if (flag === true) {
|
8770
|
+
element.setAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED, '');
|
8771
|
+
} else {
|
8772
|
+
element.removeAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED);
|
8773
|
+
}
|
8774
|
+
}
|
8299
8775
|
}));
|
8300
8776
|
self.attachObserver(new _types_observer_js__WEBPACK_IMPORTED_MODULE_7__.Observer(function () {
|
8301
8777
|
// not initialised
|
8302
|
-
if (!(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.hasObjectLink)(self,
|
8778
|
+
if (!(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.hasObjectLink)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.objectUpdaterLinkSymbol)) {
|
8303
8779
|
return;
|
8304
8780
|
} // inform every element
|
8305
8781
|
|
8306
8782
|
|
8307
|
-
var updaters = (0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.getLinkedObjects)(self,
|
8783
|
+
var updaters = (0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.getLinkedObjects)(self, _constants_js__WEBPACK_IMPORTED_MODULE_12__.objectUpdaterLinkSymbol);
|
8308
8784
|
|
8309
8785
|
var _iterator = _createForOfIteratorHelper(updaters),
|
8310
8786
|
_step;
|
@@ -8319,7 +8795,7 @@ function initOptionObserver() {
|
|
8319
8795
|
try {
|
8320
8796
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
8321
8797
|
var updater = _step2.value;
|
8322
|
-
var d = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(self[
|
8798
|
+
var d = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].getRealSubject()['options']);
|
8323
8799
|
Object.assign(updater.getSubject(), d);
|
8324
8800
|
}
|
8325
8801
|
} catch (err) {
|
@@ -8333,44 +8809,24 @@ function initOptionObserver() {
|
|
8333
8809
|
} finally {
|
8334
8810
|
_iterator.f();
|
8335
8811
|
}
|
8336
|
-
}));
|
8337
|
-
var observer = new MutationObserver(function (mutationsList, observer) {
|
8338
|
-
var _iterator3 = _createForOfIteratorHelper(mutationsList),
|
8339
|
-
_step3;
|
8812
|
+
})); // disabled
|
8340
8813
|
|
8341
|
-
|
8342
|
-
|
8343
|
-
|
8344
|
-
|
8345
|
-
|
8346
|
-
|
8347
|
-
|
8348
|
-
self.setOption('disabled', self.hasAttribute('disabled') ? true : undefined);
|
8349
|
-
break;
|
8814
|
+
self[attributeObserverSymbol][_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED] = function (newVal) {
|
8815
|
+
if (self.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED)) {
|
8816
|
+
self.setOption(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED, true);
|
8817
|
+
} else {
|
8818
|
+
self.setOption(_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_DISABLED, undefined);
|
8819
|
+
}
|
8820
|
+
}; // data-monster-options
|
8350
8821
|
|
8351
|
-
case _constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS:
|
8352
|
-
var options = getOptionsFromAttributes.call(self);
|
8353
8822
|
|
8354
|
-
|
8355
|
-
|
8356
|
-
}
|
8823
|
+
self[attributeObserverSymbol][_constants_js__WEBPACK_IMPORTED_MODULE_12__.ATTRIBUTE_OPTIONS] = function () {
|
8824
|
+
var options = getOptionsFromAttributes.call(self);
|
8357
8825
|
|
8358
|
-
|
8359
|
-
|
8360
|
-
}
|
8361
|
-
}
|
8362
|
-
} catch (err) {
|
8363
|
-
_iterator3.e(err);
|
8364
|
-
} finally {
|
8365
|
-
_iterator3.f();
|
8826
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isObject)(options)) {
|
8827
|
+
self.setOptions(options);
|
8366
8828
|
}
|
8367
|
-
}
|
8368
|
-
observer.observe(this, {
|
8369
|
-
attributes: true,
|
8370
|
-
attributeOldValue: true,
|
8371
|
-
childList: false,
|
8372
|
-
subtree: false
|
8373
|
-
});
|
8829
|
+
};
|
8374
8830
|
}
|
8375
8831
|
/**
|
8376
8832
|
* @private
|
@@ -8518,8 +8974,42 @@ function registerCustomElement(element) {
|
|
8518
8974
|
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateFunction)(element);
|
8519
8975
|
(0,_types_global_js__WEBPACK_IMPORTED_MODULE_5__.getGlobalObject)('customElements').define(element.getTag(), element);
|
8520
8976
|
}
|
8977
|
+
/**
|
8978
|
+
*
|
8979
|
+
* @param element
|
8980
|
+
* @param object
|
8981
|
+
* @return {Promise[]}
|
8982
|
+
* @since 1.23.0
|
8983
|
+
* @memberOf Monster.DOM
|
8984
|
+
*/
|
8985
|
+
|
8986
|
+
|
8987
|
+
function assignUpdaterToElement(elements, object) {
|
8988
|
+
var updaters = new Set();
|
8989
|
+
|
8990
|
+
if (elements instanceof NodeList) {
|
8991
|
+
elements = new Set(_toConsumableArray(elements));
|
8992
|
+
}
|
8993
|
+
|
8994
|
+
var result = [];
|
8995
|
+
elements.forEach(function (element) {
|
8996
|
+
if (!(element instanceof HTMLElement)) return;
|
8997
|
+
if (element instanceof HTMLTemplateElement) return;
|
8998
|
+
var u = new _updater_js__WEBPACK_IMPORTED_MODULE_14__.Updater(element, object);
|
8999
|
+
updaters.add(u);
|
9000
|
+
result.push(u.run().then(function () {
|
9001
|
+
return u.enableEventProcessing();
|
9002
|
+
}));
|
9003
|
+
});
|
9004
|
+
|
9005
|
+
if (updaters.size > 0) {
|
9006
|
+
(0,_attributes_js__WEBPACK_IMPORTED_MODULE_11__.addToObjectLink)(this, _constants_js__WEBPACK_IMPORTED_MODULE_12__.objectUpdaterLinkSymbol, updaters);
|
9007
|
+
}
|
9008
|
+
|
9009
|
+
return result;
|
9010
|
+
}
|
8521
9011
|
|
8522
|
-
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_3__.assignToNamespace)('Monster.DOM', CustomElement, registerCustomElement);
|
9012
|
+
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_3__.assignToNamespace)('Monster.DOM', CustomElement, registerCustomElement, assignUpdaterToElement);
|
8523
9013
|
|
8524
9014
|
|
8525
9015
|
/***/ }),
|
@@ -8581,8 +9071,8 @@ var internal = Symbol('internal');
|
|
8581
9071
|
*
|
8582
9072
|
* ```
|
8583
9073
|
* <script type="module">
|
8584
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
8585
|
-
*
|
9074
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/dataurl.js';
|
9075
|
+
* new Monster.Types.DataUrl()
|
8586
9076
|
* </script>
|
8587
9077
|
* ```
|
8588
9078
|
*
|
@@ -8590,8 +9080,8 @@ var internal = Symbol('internal');
|
|
8590
9080
|
*
|
8591
9081
|
* ```
|
8592
9082
|
* <script type="module">
|
8593
|
-
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
8594
|
-
*
|
9083
|
+
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/dataurl.js';
|
9084
|
+
* new DataUrl()
|
8595
9085
|
* </script>
|
8596
9086
|
* ```
|
8597
9087
|
*
|
@@ -8670,7 +9160,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
8670
9160
|
*
|
8671
9161
|
* ```
|
8672
9162
|
* <script type="module">
|
8673
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9163
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/dataurl.js';
|
8674
9164
|
* console.log(Monster.Types.parseDataURL())
|
8675
9165
|
* </script>
|
8676
9166
|
* ```
|
@@ -8679,7 +9169,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
8679
9169
|
*
|
8680
9170
|
* ```
|
8681
9171
|
* <script type="module">
|
8682
|
-
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9172
|
+
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/dataurl.js';
|
8683
9173
|
* console.log(parseDataURL())
|
8684
9174
|
* </script>
|
8685
9175
|
* ```
|
@@ -8817,7 +9307,7 @@ var internal = Symbol('internal');
|
|
8817
9307
|
*
|
8818
9308
|
* ```
|
8819
9309
|
* <script type="module">
|
8820
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9310
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/mediatype.js';
|
8821
9311
|
* console.log(new Monster.Types.MediaType())
|
8822
9312
|
* </script>
|
8823
9313
|
* ```
|
@@ -8826,7 +9316,7 @@ var internal = Symbol('internal');
|
|
8826
9316
|
*
|
8827
9317
|
* ```
|
8828
9318
|
* <script type="module">
|
8829
|
-
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9319
|
+
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/mediatype.js';
|
8830
9320
|
* console.log(new MediaType())
|
8831
9321
|
* </script>
|
8832
9322
|
* ```
|
@@ -8944,7 +9434,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
8944
9434
|
*
|
8945
9435
|
* ```
|
8946
9436
|
* <script type="module">
|
8947
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9437
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/dataurl.js';
|
8948
9438
|
* console.log(Monster.Types.parseMediaType())
|
8949
9439
|
* </script>
|
8950
9440
|
* ```
|
@@ -8953,7 +9443,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
8953
9443
|
*
|
8954
9444
|
* ```
|
8955
9445
|
* <script type="module">
|
8956
|
-
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9446
|
+
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/dataurl.js';
|
8957
9447
|
* console.log(parseMediaType())
|
8958
9448
|
* </script>
|
8959
9449
|
* ```
|
@@ -9090,8 +9580,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9090
9580
|
*
|
9091
9581
|
* ```
|
9092
9582
|
* <script type="module">
|
9093
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9094
|
-
*
|
9583
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/template.js';
|
9584
|
+
* new Monster.DOM.Template()
|
9095
9585
|
* </script>
|
9096
9586
|
* ```
|
9097
9587
|
*
|
@@ -9099,8 +9589,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9099
9589
|
*
|
9100
9590
|
* ```
|
9101
9591
|
* <script type="module">
|
9102
|
-
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9103
|
-
*
|
9592
|
+
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/template.js';
|
9593
|
+
* new Template()
|
9104
9594
|
* </script>
|
9105
9595
|
* ```
|
9106
9596
|
*
|
@@ -9162,7 +9652,7 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9162
9652
|
/**
|
9163
9653
|
* This method loads a template with the given ID and returns it.
|
9164
9654
|
*
|
9165
|
-
* To do this, it first
|
9655
|
+
* To do this, it first reads the theme of the document and looks for the `data-monster-theme-name` attribute in the HTML tag.
|
9166
9656
|
*
|
9167
9657
|
* ```
|
9168
9658
|
* <html data-monster-theme-name="my-theme">
|
@@ -9172,13 +9662,13 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9172
9662
|
*
|
9173
9663
|
* Now it is looked if there is a template with the given ID and theme `id-theme` and if yes it is returned.
|
9174
9664
|
* If there is no template a search for a template with the given ID `id` is done. If this is also not found, an error is thrown.
|
9175
|
-
*
|
9665
|
+
*
|
9176
9666
|
* You can call the method via the monster namespace `Monster.DOM.findDocumentTemplate()`.
|
9177
9667
|
*
|
9178
9668
|
* ```
|
9179
9669
|
* <script type="module">
|
9180
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9181
|
-
*
|
9670
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/template.js';
|
9671
|
+
* Monster.DOM.findDocumentTemplate()
|
9182
9672
|
* </script>
|
9183
9673
|
* ```
|
9184
9674
|
*
|
@@ -9186,11 +9676,41 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
9186
9676
|
*
|
9187
9677
|
* ```
|
9188
9678
|
* <script type="module">
|
9189
|
-
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9190
|
-
*
|
9679
|
+
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/template.js';
|
9680
|
+
* findDocumentTemplate()
|
9191
9681
|
* </script>
|
9192
9682
|
* ```
|
9193
9683
|
*
|
9684
|
+
* @example
|
9685
|
+
*
|
9686
|
+
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/template.js";
|
9687
|
+
*
|
9688
|
+
* const template = document.createElement("template");
|
9689
|
+
* template.id = "myTemplate";
|
9690
|
+
* template.innerHTML = "<p>my default template</p>";
|
9691
|
+
* document.body.appendChild(template);
|
9692
|
+
*
|
9693
|
+
* const themedTemplate = document.createElement("template");
|
9694
|
+
* themedTemplate.id = "myTemplate-myTheme";
|
9695
|
+
* themedTemplate.innerHTML = "<p>my themed template</p>";
|
9696
|
+
* document.body.appendChild(themedTemplate);
|
9697
|
+
*
|
9698
|
+
* // loads the temple and since no theme is set the default template
|
9699
|
+
* const template1 = findDocumentTemplate("myTemplate");
|
9700
|
+
* console.log(template1.createDocumentFragment());
|
9701
|
+
* // ↦ '<p>my default template</p>'
|
9702
|
+
*
|
9703
|
+
* // now we set our own theme
|
9704
|
+
* document
|
9705
|
+
* .querySelector("html")
|
9706
|
+
* .setAttribute("data-monster-theme-name", "myTheme");
|
9707
|
+
*
|
9708
|
+
* // now we don't get the default template,
|
9709
|
+
* // but the template with the theme in the id
|
9710
|
+
* const template2 = findDocumentTemplate("myTemplate");
|
9711
|
+
* console.log(template2.createDocumentFragment());
|
9712
|
+
* // ↦ '<p>my themed template</p>'
|
9713
|
+
*
|
9194
9714
|
* @param {string} id
|
9195
9715
|
* @param {Node} currentNode
|
9196
9716
|
* @return {Monster.DOM.Template}
|
@@ -9296,7 +9816,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9296
9816
|
*
|
9297
9817
|
* ```
|
9298
9818
|
* <script type="module">
|
9299
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9819
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/theme.js';
|
9300
9820
|
* console.log(new Monster.DOM.Theme())
|
9301
9821
|
* </script>
|
9302
9822
|
* ```
|
@@ -9305,14 +9825,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9305
9825
|
*
|
9306
9826
|
* ```
|
9307
9827
|
* <script type="module">
|
9308
|
-
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9828
|
+
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/theme.js';
|
9309
9829
|
* console.log(new Theme())
|
9310
9830
|
* </script>
|
9311
9831
|
* ```
|
9312
9832
|
*
|
9313
9833
|
* @example
|
9314
9834
|
*
|
9315
|
-
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9835
|
+
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/theme.js';
|
9316
9836
|
*
|
9317
9837
|
* const theme = getDocumentTheme();
|
9318
9838
|
* console.log(theme.getName());
|
@@ -9416,12 +9936,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
9416
9936
|
/* harmony import */ var _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26);
|
9417
9937
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(14);
|
9418
9938
|
/* harmony import */ var _util_clone_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(15);
|
9419
|
-
/* harmony import */ var
|
9420
|
-
/* harmony import */ var
|
9939
|
+
/* harmony import */ var _util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(41);
|
9940
|
+
/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(38);
|
9941
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(42);
|
9421
9942
|
|
9943
|
+
/**
|
9944
|
+
* @author schukai GmbH
|
9945
|
+
*/
|
9422
9946
|
|
9423
9947
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
9424
9948
|
|
9949
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
9950
|
+
|
9951
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
9952
|
+
|
9953
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
9954
|
+
|
9955
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
9956
|
+
|
9425
9957
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
9426
9958
|
|
9427
9959
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
@@ -9460,9 +9992,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9460
9992
|
|
9461
9993
|
|
9462
9994
|
|
9463
|
-
/**
|
9464
|
-
* @author schukai GmbH
|
9465
|
-
*/
|
9466
9995
|
|
9467
9996
|
|
9468
9997
|
|
@@ -9476,15 +10005,15 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9476
10005
|
/**
|
9477
10006
|
* The updater class connects an object with the dom. In this way, structures and contents in the DOM can be programmatically adapted via attributes.
|
9478
10007
|
*
|
9479
|
-
* For example, to include a string from an object, the attribute `data-monster-replace` can be used.
|
10008
|
+
* For example, to include a string from an object, the attribute `data-monster-replace` can be used.
|
9480
10009
|
* a further explanation can be found under {@tutorial dom-based-templating-implementation}.
|
9481
10010
|
*
|
9482
|
-
*
|
10011
|
+
* You can create an object of this class using the monster namespace `new Monster.DOM.Updater()`.
|
9483
10012
|
*
|
9484
10013
|
* ```
|
9485
10014
|
* <script type="module">
|
9486
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9487
|
-
*
|
10015
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
|
10016
|
+
* new Monster.DOM.Updater()
|
9488
10017
|
* </script>
|
9489
10018
|
* ```
|
9490
10019
|
*
|
@@ -9492,14 +10021,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9492
10021
|
*
|
9493
10022
|
* ```
|
9494
10023
|
* <script type="module">
|
9495
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
9496
|
-
*
|
10024
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
|
10025
|
+
* new Updater()
|
9497
10026
|
* </script>
|
9498
10027
|
* ```
|
9499
10028
|
*
|
9500
10029
|
* @example
|
9501
10030
|
*
|
9502
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10031
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/updater.js';
|
9503
10032
|
*
|
9504
10033
|
* // First we prepare the html document.
|
9505
10034
|
* // This is done here via script, but can also be inserted into the document as pure html.
|
@@ -9513,7 +10042,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
9513
10042
|
* let obj = {
|
9514
10043
|
* headline: "Hello World",
|
9515
10044
|
* };
|
9516
|
-
*
|
10045
|
+
*
|
9517
10046
|
* // Now comes the real magic. we pass the updater the parent HTMLElement
|
9518
10047
|
* // and the desired data structure.
|
9519
10048
|
* const updater = new Updater(body, obj);
|
@@ -9578,10 +10107,10 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
9578
10107
|
_this.subject = subject.attachObserver(new _types_observer_js__WEBPACK_IMPORTED_MODULE_7__.Observer(function () {
|
9579
10108
|
var s = _this.subject.getRealSubject();
|
9580
10109
|
|
9581
|
-
var
|
10110
|
+
var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_0__.diff)(_this.last, s);
|
9582
10111
|
_this.last = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(s);
|
9583
10112
|
|
9584
|
-
for (var _i = 0, _Object$entries = Object.entries(
|
10113
|
+
for (var _i = 0, _Object$entries = Object.entries(diffResult); _i < _Object$entries.length; _i++) {
|
9585
10114
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
9586
10115
|
change = _Object$entries$_i[1];
|
9587
10116
|
|
@@ -9611,6 +10140,13 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
9611
10140
|
return this;
|
9612
10141
|
}
|
9613
10142
|
/**
|
10143
|
+
* With this method, the eventlisteners are hooked in and the magic begins.
|
10144
|
+
*
|
10145
|
+
* ```
|
10146
|
+
* updater.run().then(() => {
|
10147
|
+
* updater.enableEventProcessing();
|
10148
|
+
* });
|
10149
|
+
* ```
|
9614
10150
|
*
|
9615
10151
|
* @since 1.9.0
|
9616
10152
|
* @return {Updater}
|
@@ -9638,6 +10174,7 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
9638
10174
|
return this;
|
9639
10175
|
}
|
9640
10176
|
/**
|
10177
|
+
* This method turns off the magic or who loves it more profane it removes the eventListener.
|
9641
10178
|
*
|
9642
10179
|
* @since 1.9.0
|
9643
10180
|
* @return {Updater}
|
@@ -9661,31 +10198,18 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
9661
10198
|
}
|
9662
10199
|
|
9663
10200
|
return this;
|
9664
|
-
}
|
9665
|
-
|
9666
|
-
// * @param {string} path
|
9667
|
-
// * @param {*} value
|
9668
|
-
// * @param {boolean} notifyAnyway
|
9669
|
-
// * @return {Updater}
|
9670
|
-
// * @since 1.15.0
|
9671
|
-
// */
|
9672
|
-
// setVia(path, value, notifyAnyway) {
|
9673
|
-
// if(isBoolean(notifyAnyway)&¬ifyAnyway===true) {
|
9674
|
-
// // the key __init__has no further meaning and is only
|
9675
|
-
// // used to create the diff for empty objects.
|
9676
|
-
// new Pathfinder(this.last).setVia(path, {'__init__': true});
|
9677
|
-
//
|
9678
|
-
// }
|
9679
|
-
//
|
9680
|
-
// new Pathfinder(this.subject.getSubject()).setVia(path, value);
|
9681
|
-
// return this;
|
9682
|
-
// }
|
9683
|
-
|
9684
|
-
/**
|
9685
|
-
* Let the magic begin
|
9686
|
-
*
|
10201
|
+
}
|
10202
|
+
/**
|
9687
10203
|
* The run method must be called for the update to start working.
|
10204
|
+
* The method ensures that changes are detected.
|
9688
10205
|
*
|
10206
|
+
* ```
|
10207
|
+
* updater.run().then(() => {
|
10208
|
+
* updater.enableEventProcessing();
|
10209
|
+
* });
|
10210
|
+
* ```
|
10211
|
+
*
|
10212
|
+
* @summary Let the magic begin
|
9689
10213
|
* @return {Promise}
|
9690
10214
|
*/
|
9691
10215
|
|
@@ -9700,13 +10224,13 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
9700
10224
|
return this.subject.notifyObservers();
|
9701
10225
|
}
|
9702
10226
|
/**
|
9703
|
-
* If you have passed a ProxyObserver in the constructor, you will get the
|
9704
|
-
* However, if you
|
10227
|
+
* If you have passed a ProxyObserver in the constructor, you will get the object that the ProxyObserver manages here.
|
10228
|
+
* However, if you passed a simple object, here you will get a proxy for that object.
|
9705
10229
|
*
|
9706
10230
|
* For changes the ProxyObserver must be used.
|
9707
10231
|
*
|
9708
10232
|
* @since 1.8.0
|
9709
|
-
* @return {
|
10233
|
+
* @return {Proxy}
|
9710
10234
|
*/
|
9711
10235
|
|
9712
10236
|
}, {
|
@@ -9841,9 +10365,9 @@ function getControlEventHandler() {
|
|
9841
10365
|
var copy = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(self.subject.getRealSubject());
|
9842
10366
|
var pf = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_1__.Pathfinder(copy);
|
9843
10367
|
pf.setVia(path, value);
|
9844
|
-
var
|
10368
|
+
var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_0__.diff)(copy, self.subject.getRealSubject());
|
9845
10369
|
|
9846
|
-
if (
|
10370
|
+
if (diffResult.length > 0) {
|
9847
10371
|
pathfinder.setVia(path, value);
|
9848
10372
|
}
|
9849
10373
|
};
|
@@ -9893,7 +10417,7 @@ function insertElement(change) {
|
|
9893
10417
|
|
9894
10418
|
var self = this;
|
9895
10419
|
var subject = self.subject.getRealSubject();
|
9896
|
-
var document = (0,
|
10420
|
+
var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_13__.getDocument)();
|
9897
10421
|
var mem = new WeakSet();
|
9898
10422
|
var wd = 0;
|
9899
10423
|
|
@@ -9919,11 +10443,11 @@ function insertElement(change) {
|
|
9919
10443
|
mem.add(containerElement);
|
9920
10444
|
found = true;
|
9921
10445
|
var attributes = containerElement.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_INSERT);
|
9922
|
-
var def =
|
10446
|
+
var def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(attributes);
|
9923
10447
|
var i = def.indexOf(' ');
|
9924
|
-
var key = def.substr(0, i)
|
10448
|
+
var key = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(0, i));
|
9925
10449
|
var refPrefix = key + '-';
|
9926
|
-
var cmd = def.substr(i)
|
10450
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(i)); // this case is actually excluded by the query but is nevertheless checked again here
|
9927
10451
|
|
9928
10452
|
if (cmd.indexOf('|') > 0) {
|
9929
10453
|
throw new Error("pipes are not allowed when cloning a node.");
|
@@ -9935,7 +10459,15 @@ function insertElement(change) {
|
|
9935
10459
|
pipe.setCallback(n, f);
|
9936
10460
|
});
|
9937
10461
|
|
9938
|
-
var value =
|
10462
|
+
var value = void 0;
|
10463
|
+
|
10464
|
+
try {
|
10465
|
+
containerElement.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE);
|
10466
|
+
value = pipe.run(subject);
|
10467
|
+
} catch (e) {
|
10468
|
+
containerElement.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
10469
|
+
}
|
10470
|
+
|
9939
10471
|
var dataPath = cmd.split(':').pop();
|
9940
10472
|
var insertPoint = void 0;
|
9941
10473
|
|
@@ -10013,7 +10545,7 @@ function insertElement(change) {
|
|
10013
10545
|
|
10014
10546
|
|
10015
10547
|
function appendNewDocumentFragment(container, key, ref, path) {
|
10016
|
-
var template = (0,
|
10548
|
+
var template = (0,_template_js__WEBPACK_IMPORTED_MODULE_12__.findDocumentTemplate)(key, container);
|
10017
10549
|
var nodes = template.createDocumentFragment();
|
10018
10550
|
|
10019
10551
|
for (var _i5 = 0, _Object$entries4 = Object.entries(nodes.childNodes); _i5 < _Object$entries4.length; _i5++) {
|
@@ -10073,6 +10605,21 @@ function updateContent(change) {
|
|
10073
10605
|
var subject = self.subject.getRealSubject();
|
10074
10606
|
var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(change === null || change === void 0 ? void 0 : change['path']);
|
10075
10607
|
runUpdateContent.call(this, this.element, p, subject);
|
10608
|
+
var slots = this.element.querySelectorAll('slot');
|
10609
|
+
|
10610
|
+
if (slots.length > 0) {
|
10611
|
+
for (var _i7 = 0, _Object$entries6 = Object.entries(slots); _i7 < _Object$entries6.length; _i7++) {
|
10612
|
+
var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i7], 2),
|
10613
|
+
slot = _Object$entries6$_i[1];
|
10614
|
+
|
10615
|
+
for (var _i8 = 0, _Object$entries7 = Object.entries(slot.assignedNodes()); _i8 < _Object$entries7.length; _i8++) {
|
10616
|
+
var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2),
|
10617
|
+
element = _Object$entries7$_i[1];
|
10618
|
+
|
10619
|
+
runUpdateContent.call(this, element, p, subject);
|
10620
|
+
}
|
10621
|
+
}
|
10622
|
+
}
|
10076
10623
|
}
|
10077
10624
|
/**
|
10078
10625
|
* @private
|
@@ -10088,6 +10635,7 @@ function runUpdateContent(container, parts, subject) {
|
|
10088
10635
|
var _this3 = this;
|
10089
10636
|
|
10090
10637
|
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_6__.isArray)(parts)) return;
|
10638
|
+
if (!(container instanceof HTMLElement)) return;
|
10091
10639
|
parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_10__.clone)(parts);
|
10092
10640
|
var mem = new WeakSet();
|
10093
10641
|
|
@@ -10095,47 +10643,44 @@ function runUpdateContent(container, parts, subject) {
|
|
10095
10643
|
var current = parts.join('.');
|
10096
10644
|
parts.pop(); // Unfortunately, static data is always changed as well, since it is not possible to react to changes here.
|
10097
10645
|
|
10098
|
-
var
|
10099
|
-
|
10646
|
+
var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE + '^="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE + '^="static:"]';
|
10647
|
+
var e = container.querySelectorAll('' + query);
|
10648
|
+
var iterator = new Set(_toConsumableArray(e));
|
10100
10649
|
|
10101
|
-
|
10102
|
-
|
10103
|
-
|
10104
|
-
element = _step5$value[1];
|
10650
|
+
if (container.matches(query)) {
|
10651
|
+
iterator.add(container);
|
10652
|
+
}
|
10105
10653
|
|
10106
|
-
|
10107
|
-
|
10108
|
-
|
10109
|
-
|
10110
|
-
|
10654
|
+
iterator.forEach(function (key, element) {
|
10655
|
+
if (mem.has(element)) return;
|
10656
|
+
mem.add(element);
|
10657
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_REPLACE);
|
10658
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(attributes);
|
10659
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__.Pipe(cmd);
|
10111
10660
|
|
10112
|
-
|
10113
|
-
|
10114
|
-
|
10661
|
+
_this3.callbacks.forEach(function (f, n) {
|
10662
|
+
pipe.setCallback(n, f);
|
10663
|
+
});
|
10115
10664
|
|
10116
|
-
|
10665
|
+
var value;
|
10117
10666
|
|
10118
|
-
|
10119
|
-
|
10120
|
-
|
10121
|
-
|
10667
|
+
try {
|
10668
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE);
|
10669
|
+
value = pipe.run(subject);
|
10670
|
+
} catch (e) {
|
10671
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
10672
|
+
}
|
10122
10673
|
|
10123
|
-
|
10124
|
-
|
10125
|
-
element.
|
10674
|
+
if (value instanceof HTMLElement) {
|
10675
|
+
while (element.firstChild) {
|
10676
|
+
element.removeChild(element.firstChild);
|
10126
10677
|
}
|
10127
|
-
};
|
10128
10678
|
|
10129
|
-
|
10130
|
-
|
10131
|
-
|
10132
|
-
if (_ret2 === "continue") continue;
|
10679
|
+
element.addNode(value);
|
10680
|
+
} else {
|
10681
|
+
element.innerHTML = value;
|
10133
10682
|
}
|
10134
|
-
}
|
10135
|
-
_iterator5.e(err);
|
10136
|
-
} finally {
|
10137
|
-
_iterator5.f();
|
10138
|
-
}
|
10683
|
+
});
|
10139
10684
|
}
|
10140
10685
|
}
|
10141
10686
|
/**
|
@@ -10173,57 +10718,57 @@ function runUpdateAttributes(container, parts, subject) {
|
|
10173
10718
|
while (parts.length > 0) {
|
10174
10719
|
var current = parts.join('.');
|
10175
10720
|
parts.pop();
|
10721
|
+
var iterator = new Set();
|
10722
|
+
var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES + '*="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES + '^="static:"]';
|
10723
|
+
var e = container.querySelectorAll(query);
|
10176
10724
|
|
10177
|
-
|
10178
|
-
|
10179
|
-
|
10180
|
-
try {
|
10181
|
-
var _loop3 = function _loop3() {
|
10182
|
-
var _step6$value = _slicedToArray(_step6.value, 2),
|
10183
|
-
element = _step6$value[1];
|
10725
|
+
if (e.length > 0) {
|
10726
|
+
iterator = new Set(_toConsumableArray(e));
|
10727
|
+
}
|
10184
10728
|
|
10185
|
-
|
10186
|
-
|
10187
|
-
|
10729
|
+
if (container.matches(query)) {
|
10730
|
+
iterator.add(container);
|
10731
|
+
}
|
10188
10732
|
|
10189
|
-
|
10190
|
-
|
10191
|
-
|
10733
|
+
iterator.forEach(function (key, element) {
|
10734
|
+
if (mem.has(element)) return;
|
10735
|
+
mem.add(element);
|
10736
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
10192
10737
|
|
10193
|
-
|
10194
|
-
|
10195
|
-
|
10196
|
-
var cmd = def.substr(i).trim();
|
10197
|
-
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__.Pipe(cmd);
|
10198
|
-
self.callbacks.forEach(function (f, n) {
|
10199
|
-
pipe.setCallback(n, f, element);
|
10200
|
-
});
|
10201
|
-
var value = pipe.run(subject);
|
10738
|
+
var _loop2 = function _loop2() {
|
10739
|
+
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
|
10740
|
+
def = _Object$entries8$_i[1];
|
10202
10741
|
|
10203
|
-
|
10204
|
-
|
10205
|
-
|
10206
|
-
|
10207
|
-
|
10742
|
+
def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def);
|
10743
|
+
var i = def.indexOf(' ');
|
10744
|
+
var name = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(0, i));
|
10745
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_11__.trimSpaces)(def.substr(i));
|
10746
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_2__.Pipe(cmd);
|
10747
|
+
self.callbacks.forEach(function (f, n) {
|
10748
|
+
pipe.setCallback(n, f, element);
|
10749
|
+
});
|
10750
|
+
var value = void 0;
|
10208
10751
|
|
10209
|
-
|
10210
|
-
|
10752
|
+
try {
|
10753
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE);
|
10754
|
+
value = pipe.run(subject);
|
10755
|
+
} catch (e) {
|
10756
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_3__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
10757
|
+
}
|
10211
10758
|
|
10212
|
-
|
10213
|
-
|
10759
|
+
if (value === undefined) {
|
10760
|
+
element.removeAttribute(name);
|
10761
|
+
} else if (element.getAttribute(name) !== value) {
|
10762
|
+
element.setAttribute(name, value);
|
10214
10763
|
}
|
10215
|
-
};
|
10216
10764
|
|
10217
|
-
|
10218
|
-
|
10765
|
+
handleInputControlAttributeUpdate.call(_this4, element, name, value);
|
10766
|
+
};
|
10219
10767
|
|
10220
|
-
|
10768
|
+
for (var _i9 = 0, _Object$entries8 = Object.entries(attributes.split(',')); _i9 < _Object$entries8.length; _i9++) {
|
10769
|
+
_loop2();
|
10221
10770
|
}
|
10222
|
-
}
|
10223
|
-
_iterator6.e(err);
|
10224
|
-
} finally {
|
10225
|
-
_iterator6.f();
|
10226
|
-
}
|
10771
|
+
});
|
10227
10772
|
}
|
10228
10773
|
}
|
10229
10774
|
/**
|
@@ -10242,10 +10787,10 @@ function handleInputControlAttributeUpdate(element, name, value) {
|
|
10242
10787
|
if (element instanceof HTMLSelectElement) {
|
10243
10788
|
switch (element.type) {
|
10244
10789
|
case 'select-multiple':
|
10245
|
-
for (var
|
10246
|
-
var _Object$
|
10247
|
-
index = _Object$
|
10248
|
-
opt = _Object$
|
10790
|
+
for (var _i10 = 0, _Object$entries9 = Object.entries(element.options); _i10 < _Object$entries9.length; _i10++) {
|
10791
|
+
var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i10], 2),
|
10792
|
+
index = _Object$entries9$_i[0],
|
10793
|
+
opt = _Object$entries9$_i[1];
|
10249
10794
|
|
10250
10795
|
if (value.indexOf(opt.value) !== -1) {
|
10251
10796
|
opt.selected = true;
|
@@ -10258,10 +10803,10 @@ function handleInputControlAttributeUpdate(element, name, value) {
|
|
10258
10803
|
|
10259
10804
|
case 'select-one':
|
10260
10805
|
// Only one value may be selected
|
10261
|
-
for (var
|
10262
|
-
var _Object$
|
10263
|
-
_index = _Object$
|
10264
|
-
_opt = _Object$
|
10806
|
+
for (var _i11 = 0, _Object$entries10 = Object.entries(element.options); _i11 < _Object$entries10.length; _i11++) {
|
10807
|
+
var _Object$entries10$_i = _slicedToArray(_Object$entries10[_i11], 2),
|
10808
|
+
_index = _Object$entries10$_i[0],
|
10809
|
+
_opt = _Object$entries10$_i[1];
|
10265
10810
|
|
10266
10811
|
if (_opt.value === value) {
|
10267
10812
|
element.selectedIndex = _index;
|
@@ -10313,6 +10858,128 @@ function handleInputControlAttributeUpdate(element, name, value) {
|
|
10313
10858
|
/* 41 */
|
10314
10859
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10315
10860
|
|
10861
|
+
__webpack_require__.r(__webpack_exports__);
|
10862
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
10863
|
+
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
10864
|
+
/* harmony export */ "trimSpaces": function() { return /* binding */ trimSpaces; }
|
10865
|
+
/* harmony export */ });
|
10866
|
+
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
10867
|
+
/* harmony import */ var _types_id_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
|
10868
|
+
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
10869
|
+
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
|
10870
|
+
|
10871
|
+
/**
|
10872
|
+
* @author schukai GmbH
|
10873
|
+
*/
|
10874
|
+
|
10875
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
10876
|
+
|
10877
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
10878
|
+
|
10879
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
10880
|
+
|
10881
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
10882
|
+
|
10883
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return _setPrototypeOf(_this, BabelRegExp.prototype); } _inherits(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
|
10884
|
+
|
10885
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
10886
|
+
|
10887
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
10888
|
+
|
10889
|
+
|
10890
|
+
|
10891
|
+
|
10892
|
+
|
10893
|
+
/**
|
10894
|
+
* This special trim function allows to trim spaces that have been protected by a special escape character.
|
10895
|
+
*
|
10896
|
+
* You can call the method via the monster namespace `Monster.Util.trimSpaces()`.
|
10897
|
+
*
|
10898
|
+
* ```
|
10899
|
+
* <script type="module">
|
10900
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/trimspaces.js';
|
10901
|
+
* Monster.Util.trimSpaces(" hello ")
|
10902
|
+
* </script>
|
10903
|
+
* ```
|
10904
|
+
*
|
10905
|
+
* Alternatively, you can also integrate this function individually.
|
10906
|
+
*
|
10907
|
+
* ```
|
10908
|
+
* <script type="module">
|
10909
|
+
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/trimspaces.js';
|
10910
|
+
* trimSpaces(' hello \\ ')
|
10911
|
+
* </script>
|
10912
|
+
* ```
|
10913
|
+
*
|
10914
|
+
* Hint: One stroke is escaped by the javascript interpreter, the second stroke escapes the stroke.
|
10915
|
+
*
|
10916
|
+
* ```text
|
10917
|
+
* a\ b ↦ a b
|
10918
|
+
* a\\ b ↦ a\ b
|
10919
|
+
* ```
|
10920
|
+
*
|
10921
|
+
* @since 1.24.0
|
10922
|
+
* @memberOf Monster.Util
|
10923
|
+
* @copyright schukai GmbH
|
10924
|
+
* @param {string} value
|
10925
|
+
* @return {string}
|
10926
|
+
* @throws {TypeError} value is not a string
|
10927
|
+
*/
|
10928
|
+
|
10929
|
+
function trimSpaces(value) {
|
10930
|
+
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(value);
|
10931
|
+
var placeholder = new Map();
|
10932
|
+
|
10933
|
+
var regex = /*#__PURE__*/_wrapRegExp(/((\\(.)){1})/mig, {
|
10934
|
+
pattern: 2,
|
10935
|
+
char: 3
|
10936
|
+
}); // The separator for args must be escaped
|
10937
|
+
// undefined string which should not occur normally and is also not a regex
|
10938
|
+
|
10939
|
+
|
10940
|
+
var result = value.matchAll(regex);
|
10941
|
+
|
10942
|
+
var _iterator = _createForOfIteratorHelper(result),
|
10943
|
+
_step;
|
10944
|
+
|
10945
|
+
try {
|
10946
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
10947
|
+
var m = _step.value;
|
10948
|
+
var g = m === null || m === void 0 ? void 0 : m['groups'];
|
10949
|
+
|
10950
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_2__.isObject)(g)) {
|
10951
|
+
continue;
|
10952
|
+
}
|
10953
|
+
|
10954
|
+
var p = g === null || g === void 0 ? void 0 : g['pattern'];
|
10955
|
+
var c = g === null || g === void 0 ? void 0 : g['char'];
|
10956
|
+
|
10957
|
+
if (p && c) {
|
10958
|
+
var r = '__' + new _types_id_js__WEBPACK_IMPORTED_MODULE_1__.ID().toString() + '__';
|
10959
|
+
placeholder.set(r, c);
|
10960
|
+
value = value.replace(p, r);
|
10961
|
+
}
|
10962
|
+
}
|
10963
|
+
} catch (err) {
|
10964
|
+
_iterator.e(err);
|
10965
|
+
} finally {
|
10966
|
+
_iterator.f();
|
10967
|
+
}
|
10968
|
+
|
10969
|
+
value = value.trim();
|
10970
|
+
placeholder.forEach(function (v, k) {
|
10971
|
+
value = value.replace(k, '\\' + v);
|
10972
|
+
});
|
10973
|
+
return value;
|
10974
|
+
}
|
10975
|
+
|
10976
|
+
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.Util', trimSpaces);
|
10977
|
+
|
10978
|
+
|
10979
|
+
/***/ }),
|
10980
|
+
/* 42 */
|
10981
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10982
|
+
|
10316
10983
|
__webpack_require__.r(__webpack_exports__);
|
10317
10984
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
10318
10985
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
@@ -10338,7 +11005,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
10338
11005
|
*
|
10339
11006
|
* ```
|
10340
11007
|
* <script type="module">
|
10341
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11008
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/util.js';
|
10342
11009
|
* console.log(Monster.DOM.getDocument())
|
10343
11010
|
* </script>
|
10344
11011
|
* ```
|
@@ -10347,7 +11014,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
10347
11014
|
*
|
10348
11015
|
* ```
|
10349
11016
|
* <script type="module">
|
10350
|
-
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11017
|
+
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/util.js';
|
10351
11018
|
* console.log(getDocument())
|
10352
11019
|
* </script>
|
10353
11020
|
* ```
|
@@ -10402,7 +11069,7 @@ function getDocument() {
|
|
10402
11069
|
*
|
10403
11070
|
* ```
|
10404
11071
|
* <script type="module">
|
10405
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11072
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/util.js';
|
10406
11073
|
* console.log(Monster.DOM.getWindow())
|
10407
11074
|
* </script>
|
10408
11075
|
* ```
|
@@ -10411,7 +11078,7 @@ function getDocument() {
|
|
10411
11078
|
*
|
10412
11079
|
* ```
|
10413
11080
|
* <script type="module">
|
10414
|
-
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11081
|
+
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/util.js';
|
10415
11082
|
* console.log(getWindow(null))
|
10416
11083
|
* </script>
|
10417
11084
|
* ```
|
@@ -10471,7 +11138,7 @@ function getWindow() {
|
|
10471
11138
|
*
|
10472
11139
|
* ```
|
10473
11140
|
* <script type="module">
|
10474
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11141
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/util.js';
|
10475
11142
|
* console.log(Monster.DOM.getDocumentFragmentFromString())
|
10476
11143
|
* </script>
|
10477
11144
|
* ```
|
@@ -10480,7 +11147,7 @@ function getWindow() {
|
|
10480
11147
|
*
|
10481
11148
|
* ```
|
10482
11149
|
* <script type="module">
|
10483
|
-
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11150
|
+
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/util.js';
|
10484
11151
|
* console.log(getDocumentFragmentFromString('<div></div>'))
|
10485
11152
|
* </script>
|
10486
11153
|
* ```
|
@@ -10533,7 +11200,7 @@ function getDocumentFragmentFromString(html) {
|
|
10533
11200
|
|
10534
11201
|
|
10535
11202
|
/***/ }),
|
10536
|
-
/*
|
11203
|
+
/* 43 */
|
10537
11204
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10538
11205
|
|
10539
11206
|
__webpack_require__.r(__webpack_exports__);
|
@@ -10545,7 +11212,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
10545
11212
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
10546
11213
|
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
10547
11214
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
|
10548
|
-
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
11215
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
|
10549
11216
|
|
10550
11217
|
/**
|
10551
11218
|
* @author schukai GmbH
|
@@ -10566,7 +11233,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
10566
11233
|
*
|
10567
11234
|
* ```
|
10568
11235
|
* <script type="module">
|
10569
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11236
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
|
10570
11237
|
* console.log(new Monster.DOM.fireEvent())
|
10571
11238
|
* </script>
|
10572
11239
|
* ```
|
@@ -10575,7 +11242,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
10575
11242
|
*
|
10576
11243
|
* ```
|
10577
11244
|
* <script type="module">
|
10578
|
-
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11245
|
+
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
|
10579
11246
|
* console.log(fireEvent())
|
10580
11247
|
* </script>
|
10581
11248
|
* ```
|
@@ -10624,14 +11291,14 @@ function fireEvent(element, type) {
|
|
10624
11291
|
}
|
10625
11292
|
/**
|
10626
11293
|
* This function gets the path `Event.composedPath()` from an event and tries to find the next element
|
10627
|
-
* up the tree `element.closest()` with the attribute and value. If no value, or a value that is undefined or null,
|
11294
|
+
* up the tree `element.closest()` with the attribute and value. If no value, or a value that is undefined or null,
|
10628
11295
|
* is specified, only the attribute is searched.
|
10629
11296
|
*
|
10630
11297
|
* You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.
|
10631
11298
|
*
|
10632
11299
|
* ```
|
10633
11300
|
* <script type="module">
|
10634
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11301
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
|
10635
11302
|
* console.log(new Monster.DOM.findTargetElementFromEvent())
|
10636
11303
|
* </script>
|
10637
11304
|
* ```
|
@@ -10640,7 +11307,7 @@ function fireEvent(element, type) {
|
|
10640
11307
|
*
|
10641
11308
|
* ```
|
10642
11309
|
* <script type="module">
|
10643
|
-
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11310
|
+
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/events.js';
|
10644
11311
|
* console.log(findTargetElementFromEvent())
|
10645
11312
|
* </script>
|
10646
11313
|
* ```
|
@@ -10684,7 +11351,7 @@ function findTargetElementFromEvent(event, attributeName, attributeValue) {
|
|
10684
11351
|
|
10685
11352
|
|
10686
11353
|
/***/ }),
|
10687
|
-
/*
|
11354
|
+
/* 44 */
|
10688
11355
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10689
11356
|
|
10690
11357
|
__webpack_require__.r(__webpack_exports__);
|
@@ -10692,11 +11359,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
10692
11359
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_1__.Monster; },
|
10693
11360
|
/* harmony export */ "getLocaleOfDocument": function() { return /* binding */ getLocaleOfDocument; }
|
10694
11361
|
/* harmony export */ });
|
10695
|
-
/* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
11362
|
+
/* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
|
10696
11363
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
10697
|
-
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
10698
|
-
|
10699
|
-
|
11364
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42);
|
10700
11365
|
|
10701
11366
|
/**
|
10702
11367
|
* @author schukai GmbH
|
@@ -10704,6 +11369,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
10704
11369
|
|
10705
11370
|
|
10706
11371
|
|
11372
|
+
|
10707
11373
|
/**
|
10708
11374
|
* @private
|
10709
11375
|
* @type {string}
|
@@ -10718,7 +11384,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
10718
11384
|
*
|
10719
11385
|
* ```
|
10720
11386
|
* <script type="module">
|
10721
|
-
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11387
|
+
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/locale.js';
|
10722
11388
|
* console.log(new Monster.DOM.getLocaleOfDocument())
|
10723
11389
|
* </script>
|
10724
11390
|
* ```
|
@@ -10727,7 +11393,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
10727
11393
|
*
|
10728
11394
|
* ```
|
10729
11395
|
* <script type="module">
|
10730
|
-
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11396
|
+
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/dom/locale.js';
|
10731
11397
|
* console.log(new getLocaleOfDocument())
|
10732
11398
|
* </script>
|
10733
11399
|
* ```
|
@@ -10759,7 +11425,7 @@ function getLocaleOfDocument() {
|
|
10759
11425
|
|
10760
11426
|
|
10761
11427
|
/***/ }),
|
10762
|
-
/*
|
11428
|
+
/* 45 */
|
10763
11429
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10764
11430
|
|
10765
11431
|
__webpack_require__.r(__webpack_exports__);
|
@@ -10820,8 +11486,8 @@ var localeStringSymbol = Symbol('localeString');
|
|
10820
11486
|
*
|
10821
11487
|
* ```
|
10822
11488
|
* <script type="module">
|
10823
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10824
|
-
*
|
11489
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/locale.js';
|
11490
|
+
* new Monster.I18n.Locale()
|
10825
11491
|
* </script>
|
10826
11492
|
* ```
|
10827
11493
|
*
|
@@ -10829,8 +11495,8 @@ var localeStringSymbol = Symbol('localeString');
|
|
10829
11495
|
*
|
10830
11496
|
* ```
|
10831
11497
|
* <script type="module">
|
10832
|
-
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
10833
|
-
*
|
11498
|
+
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/locale.js';
|
11499
|
+
* new Locale()
|
10834
11500
|
* </script>
|
10835
11501
|
* ```
|
10836
11502
|
*
|
@@ -11020,8 +11686,8 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
11020
11686
|
*
|
11021
11687
|
* ```
|
11022
11688
|
* <script type="module">
|
11023
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11024
|
-
*
|
11689
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/locale.js';
|
11690
|
+
* new Monster.I18n.createLocale()
|
11025
11691
|
* </script>
|
11026
11692
|
* ```
|
11027
11693
|
*
|
@@ -11029,8 +11695,8 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
11029
11695
|
*
|
11030
11696
|
* ```
|
11031
11697
|
* <script type="module">
|
11032
|
-
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11033
|
-
*
|
11698
|
+
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/locale.js';
|
11699
|
+
* createLocale()
|
11034
11700
|
* </script>
|
11035
11701
|
* ```
|
11036
11702
|
*
|
@@ -11155,7 +11821,7 @@ function parseLocale(locale) {
|
|
11155
11821
|
|
11156
11822
|
|
11157
11823
|
/***/ }),
|
11158
|
-
/*
|
11824
|
+
/* 46 */
|
11159
11825
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
11160
11826
|
|
11161
11827
|
__webpack_require__.r(__webpack_exports__);
|
@@ -11164,9 +11830,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
11164
11830
|
/* harmony export */ "Provider": function() { return /* binding */ Provider; }
|
11165
11831
|
/* harmony export */ });
|
11166
11832
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
11167
|
-
/* harmony import */ var _types_basewithoptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
11168
|
-
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
11169
|
-
/* harmony import */ var _translations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
11833
|
+
/* harmony import */ var _types_basewithoptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47);
|
11834
|
+
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45);
|
11835
|
+
/* harmony import */ var _translations_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48);
|
11170
11836
|
|
11171
11837
|
/**
|
11172
11838
|
* @author schukai GmbH
|
@@ -11205,8 +11871,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11205
11871
|
*
|
11206
11872
|
* ```
|
11207
11873
|
* <script type="module">
|
11208
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11209
|
-
*
|
11874
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/provider.js';
|
11875
|
+
* new Monster.I18n.Provider()
|
11210
11876
|
* </script>
|
11211
11877
|
* ```
|
11212
11878
|
*
|
@@ -11214,8 +11880,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11214
11880
|
*
|
11215
11881
|
* ```
|
11216
11882
|
* <script type="module">
|
11217
|
-
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11218
|
-
*
|
11883
|
+
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/provider.js';
|
11884
|
+
* new Provider()
|
11219
11885
|
* </script>
|
11220
11886
|
* ```
|
11221
11887
|
*
|
@@ -11261,7 +11927,7 @@ var Provider = /*#__PURE__*/function (_BaseWithOptions) {
|
|
11261
11927
|
|
11262
11928
|
|
11263
11929
|
/***/ }),
|
11264
|
-
/*
|
11930
|
+
/* 47 */
|
11265
11931
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
11266
11932
|
|
11267
11933
|
__webpack_require__.r(__webpack_exports__);
|
@@ -11276,6 +11942,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
11276
11942
|
/* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
|
11277
11943
|
/* harmony import */ var _validate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(14);
|
11278
11944
|
|
11945
|
+
/**
|
11946
|
+
* @author schukai GmbH
|
11947
|
+
*/
|
11279
11948
|
|
11280
11949
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
11281
11950
|
|
@@ -11302,19 +11971,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11302
11971
|
|
11303
11972
|
|
11304
11973
|
|
11305
|
-
/**
|
11306
|
-
* @author schukai GmbH
|
11307
|
-
*/
|
11308
|
-
|
11309
|
-
|
11310
11974
|
|
11311
11975
|
|
11312
|
-
/**
|
11313
|
-
* @private
|
11314
|
-
* @type {symbol}
|
11315
|
-
*/
|
11316
11976
|
|
11317
|
-
var optionsSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPERTY_KEY_INTERNALDATA);
|
11318
11977
|
/**
|
11319
11978
|
* This is the base class with options from which some monster classes are derived.
|
11320
11979
|
*
|
@@ -11322,8 +11981,8 @@ var optionsSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPER
|
|
11322
11981
|
*
|
11323
11982
|
* ```
|
11324
11983
|
* <script type="module">
|
11325
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11326
|
-
*
|
11984
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/basewithoptions.js';
|
11985
|
+
* new Monster.Types.BaseWithOptions()
|
11327
11986
|
* </script>
|
11328
11987
|
* ```
|
11329
11988
|
*
|
@@ -11331,8 +11990,8 @@ var optionsSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPER
|
|
11331
11990
|
*
|
11332
11991
|
* ```
|
11333
11992
|
* <script type="module">
|
11334
|
-
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11335
|
-
*
|
11993
|
+
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/basewithoptions.js';
|
11994
|
+
* new BaseWithOptions()
|
11336
11995
|
* </script>
|
11337
11996
|
* ```
|
11338
11997
|
*
|
@@ -11363,7 +12022,7 @@ var BaseWithOptions = /*#__PURE__*/function (_Base) {
|
|
11363
12022
|
options = {};
|
11364
12023
|
}
|
11365
12024
|
|
11366
|
-
_this[
|
12025
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol] = (0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)({}, _this.defaults, (0,_validate_js__WEBPACK_IMPORTED_MODULE_5__.validateObject)(options));
|
11367
12026
|
return _this;
|
11368
12027
|
}
|
11369
12028
|
/**
|
@@ -11393,7 +12052,7 @@ var BaseWithOptions = /*#__PURE__*/function (_Base) {
|
|
11393
12052
|
var value;
|
11394
12053
|
|
11395
12054
|
try {
|
11396
|
-
value = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(this[
|
12055
|
+
value = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol]).getVia(path);
|
11397
12056
|
} catch (e) {}
|
11398
12057
|
|
11399
12058
|
if (value === undefined) return defaultValue;
|
@@ -11408,7 +12067,7 @@ var BaseWithOptions = /*#__PURE__*/function (_Base) {
|
|
11408
12067
|
|
11409
12068
|
|
11410
12069
|
/***/ }),
|
11411
|
-
/*
|
12070
|
+
/* 48 */
|
11412
12071
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
11413
12072
|
|
11414
12073
|
__webpack_require__.r(__webpack_exports__);
|
@@ -11420,7 +12079,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
11420
12079
|
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
11421
12080
|
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
11422
12081
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
|
11423
|
-
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
12082
|
+
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45);
|
11424
12083
|
|
11425
12084
|
/**
|
11426
12085
|
* @author schukai GmbH
|
@@ -11472,8 +12131,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11472
12131
|
*
|
11473
12132
|
* ```
|
11474
12133
|
* <script type="module">
|
11475
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11476
|
-
*
|
12134
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/translations.js';
|
12135
|
+
* new Monster.I18n.Translations()
|
11477
12136
|
* </script>
|
11478
12137
|
* ```
|
11479
12138
|
*
|
@@ -11481,13 +12140,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11481
12140
|
*
|
11482
12141
|
* ```
|
11483
12142
|
* <script type="module">
|
11484
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11485
|
-
*
|
12143
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/translations.js';
|
12144
|
+
* new Translations()
|
11486
12145
|
* </script>
|
11487
12146
|
* ```
|
11488
12147
|
*
|
11489
12148
|
* @example
|
11490
12149
|
*
|
12150
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/translations.js';
|
11491
12151
|
* const translation = new Translations(parseLocale('en-GB'));
|
11492
12152
|
*
|
11493
12153
|
* translation.assignTranslations({
|
@@ -11496,7 +12156,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11496
12156
|
* });
|
11497
12157
|
*
|
11498
12158
|
* translation.getText('text1);
|
11499
|
-
* translation.getPluralRuleText('
|
12159
|
+
* translation.getPluralRuleText('text2',2);
|
11500
12160
|
*
|
11501
12161
|
* @since 1.13.0
|
11502
12162
|
* @copyright schukai GmbH
|
@@ -11684,7 +12344,7 @@ var Translations = /*#__PURE__*/function (_Base) {
|
|
11684
12344
|
|
11685
12345
|
|
11686
12346
|
/***/ }),
|
11687
|
-
/*
|
12347
|
+
/* 49 */
|
11688
12348
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
11689
12349
|
|
11690
12350
|
__webpack_require__.r(__webpack_exports__);
|
@@ -11695,14 +12355,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
11695
12355
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
11696
12356
|
/* harmony import */ var _data_extend_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
11697
12357
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
11698
|
-
/* harmony import */ var _text_formatter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
12358
|
+
/* harmony import */ var _text_formatter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50);
|
11699
12359
|
/* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16);
|
11700
12360
|
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
|
11701
12361
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14);
|
11702
|
-
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
11703
|
-
/* harmony import */ var _provider_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
11704
|
-
/* harmony import */ var _translations_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
12362
|
+
/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45);
|
12363
|
+
/* harmony import */ var _provider_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46);
|
12364
|
+
/* harmony import */ var _translations_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48);
|
11705
12365
|
|
12366
|
+
/**
|
12367
|
+
* @author schukai GmbH
|
12368
|
+
*/
|
11706
12369
|
|
11707
12370
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
11708
12371
|
|
@@ -11732,11 +12395,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11732
12395
|
|
11733
12396
|
|
11734
12397
|
|
11735
|
-
/**
|
11736
|
-
* @author schukai GmbH
|
11737
|
-
*/
|
11738
|
-
|
11739
|
-
|
11740
12398
|
|
11741
12399
|
|
11742
12400
|
|
@@ -11744,12 +12402,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11744
12402
|
|
11745
12403
|
|
11746
12404
|
|
11747
|
-
/**
|
11748
|
-
* @private
|
11749
|
-
* @type {symbol}
|
11750
|
-
*/
|
11751
12405
|
|
11752
|
-
var optionsSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPERTY_KEY_INTERNALDATA);
|
11753
12406
|
/**
|
11754
12407
|
* The fetch provider retrieves a JSON file from the given URL and returns a translation object.
|
11755
12408
|
*
|
@@ -11757,8 +12410,8 @@ var optionsSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPER
|
|
11757
12410
|
*
|
11758
12411
|
* ```
|
11759
12412
|
* <script type="module">
|
11760
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11761
|
-
*
|
12413
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/providers/fetch.js';
|
12414
|
+
* new Monster.I18n.Providers.Fetch()
|
11762
12415
|
* </script>
|
11763
12416
|
* ```
|
11764
12417
|
*
|
@@ -11766,8 +12419,8 @@ var optionsSymbol = Symbol.for(_constants_js__WEBPACK_IMPORTED_MODULE_0__.PROPER
|
|
11766
12419
|
*
|
11767
12420
|
* ```
|
11768
12421
|
* <script type="module">
|
11769
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11770
|
-
*
|
12422
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/i18n/providers/fetch.js';
|
12423
|
+
* new Fetch()
|
11771
12424
|
* </script>
|
11772
12425
|
* ```
|
11773
12426
|
*
|
@@ -11815,7 +12468,7 @@ var Fetch = /*#__PURE__*/function (_Provider) {
|
|
11815
12468
|
* @property {Object} options
|
11816
12469
|
*/
|
11817
12470
|
|
11818
|
-
_this[
|
12471
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol] = (0,_data_extend_js__WEBPACK_IMPORTED_MODULE_1__.extend)({}, _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(Fetch.prototype)), "defaults", _thisSuper), _this.defaults, (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_6__.validateObject)(options));
|
11819
12472
|
return _this;
|
11820
12473
|
}
|
11821
12474
|
/**
|
@@ -11882,7 +12535,7 @@ var Fetch = /*#__PURE__*/function (_Provider) {
|
|
11882
12535
|
|
11883
12536
|
|
11884
12537
|
/***/ }),
|
11885
|
-
/*
|
12538
|
+
/* 50 */
|
11886
12539
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
11887
12540
|
|
11888
12541
|
__webpack_require__.r(__webpack_exports__);
|
@@ -11898,6 +12551,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
11898
12551
|
|
11899
12552
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
11900
12553
|
|
12554
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
12555
|
+
|
12556
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
12557
|
+
|
12558
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
12559
|
+
|
12560
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12561
|
+
|
12562
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
12563
|
+
|
12564
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
12565
|
+
|
12566
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
12567
|
+
|
11901
12568
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
11902
12569
|
|
11903
12570
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
@@ -11935,8 +12602,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11935
12602
|
*
|
11936
12603
|
* ```
|
11937
12604
|
* <script type="module">
|
11938
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11939
|
-
*
|
12605
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/text/formatter.js';
|
12606
|
+
* new Monster.Text.Formatter()
|
11940
12607
|
* </script>
|
11941
12608
|
* ```
|
11942
12609
|
*
|
@@ -11944,13 +12611,30 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
11944
12611
|
*
|
11945
12612
|
* ```
|
11946
12613
|
* <script type="module">
|
11947
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
11948
|
-
*
|
12614
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/text/formatter.js';
|
12615
|
+
* new Formatter()
|
11949
12616
|
* </script>
|
11950
12617
|
* ```
|
11951
12618
|
*
|
12619
|
+
* ## Marker in marker
|
12620
|
+
*
|
12621
|
+
* Markers can be nested. Here, the inner marker is resolved first and then the outer marker.
|
12622
|
+
*
|
12623
|
+
* ```
|
12624
|
+
*
|
12625
|
+
* ```
|
12626
|
+
*
|
12627
|
+
* ## Marker with parameter
|
12628
|
+
*
|
12629
|
+
* A string can also bring its own values. These must then be separated from the key by a separator `::`.
|
12630
|
+
* The values themselves must be specified in key/value pairs. The key must be separated from the value by a separator `=`.
|
12631
|
+
*
|
12632
|
+
* When using a pipe, you must pay attention to the separators.
|
12633
|
+
*
|
11952
12634
|
* @example
|
11953
12635
|
*
|
12636
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/text/formatter.js';
|
12637
|
+
*
|
11954
12638
|
* new Formatter({
|
11955
12639
|
* a: {
|
11956
12640
|
* b: {
|
@@ -11984,31 +12668,69 @@ var Formatter = /*#__PURE__*/function (_Base) {
|
|
11984
12668
|
_classCallCheck(this, Formatter);
|
11985
12669
|
|
11986
12670
|
_this = _super.call(this);
|
12671
|
+
|
12672
|
+
if (object === undefined) {
|
12673
|
+
object = {};
|
12674
|
+
}
|
12675
|
+
|
11987
12676
|
_this.object = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateObject)(object);
|
11988
12677
|
_this.openMarker = '${';
|
11989
12678
|
_this.closeMarker = '}';
|
12679
|
+
_this.parameterDelimiter = '::';
|
12680
|
+
_this.parameterAssignment = '=';
|
11990
12681
|
return _this;
|
11991
12682
|
}
|
11992
12683
|
/**
|
11993
|
-
* Set new
|
12684
|
+
* Set new Parameter Character
|
11994
12685
|
*
|
11995
|
-
* Default values for the
|
12686
|
+
* Default values for the chars are `::` and `=`
|
11996
12687
|
*
|
11997
12688
|
* ```
|
11998
|
-
* formatter.
|
11999
|
-
* formatter.
|
12000
|
-
* formatter.
|
12689
|
+
* formatter.setParameterChars('#');
|
12690
|
+
* formatter.setParameterChars('[',']');
|
12691
|
+
* formatter.setParameterChars('i18n{','}');
|
12001
12692
|
* ```
|
12002
12693
|
*
|
12003
|
-
* @param {string}
|
12004
|
-
* @param {string}
|
12694
|
+
* @param {string} delimiter
|
12695
|
+
* @param {string} assignment
|
12005
12696
|
* @return {Formatter}
|
12006
|
-
* @since 1.
|
12697
|
+
* @since 1.24.0
|
12007
12698
|
* @throws {TypeError} value is not a string
|
12008
12699
|
*/
|
12009
12700
|
|
12010
12701
|
|
12011
12702
|
_createClass(Formatter, [{
|
12703
|
+
key: "setParameterChars",
|
12704
|
+
value: function setParameterChars(delimiter, assignment) {
|
12705
|
+
if (delimiter !== undefined) {
|
12706
|
+
this.parameterDelimiter = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(delimiter);
|
12707
|
+
}
|
12708
|
+
|
12709
|
+
if (assignment !== undefined) {
|
12710
|
+
this.parameterAssignment = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(assignment);
|
12711
|
+
}
|
12712
|
+
|
12713
|
+
return this;
|
12714
|
+
}
|
12715
|
+
/**
|
12716
|
+
* Set new Marker
|
12717
|
+
*
|
12718
|
+
* Default values for the markers are `${` and `}`
|
12719
|
+
*
|
12720
|
+
* ```
|
12721
|
+
* formatter.setMarker('#'); // open and close are both #
|
12722
|
+
* formatter.setMarker('[',']');
|
12723
|
+
* formatter.setMarker('i18n{','}');
|
12724
|
+
* ```
|
12725
|
+
*
|
12726
|
+
* @param {string} open
|
12727
|
+
* @param {string} close
|
12728
|
+
* @return {Formatter}
|
12729
|
+
* @since 1.12.0
|
12730
|
+
* @throws {TypeError} value is not a string
|
12731
|
+
*/
|
12732
|
+
|
12733
|
+
}, {
|
12012
12734
|
key: "setMarker",
|
12013
12735
|
value: function setMarker(open, close) {
|
12014
12736
|
if (close === undefined) {
|
@@ -12058,15 +12780,54 @@ function tokenizer(text) {
|
|
12058
12780
|
text = text.substring(startIndex);
|
12059
12781
|
}
|
12060
12782
|
|
12061
|
-
var endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker)
|
12783
|
+
var endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker);
|
12784
|
+
if (endIndex !== -1) endIndex += self.openMarker.length;
|
12785
|
+
var insideStartIndex = text.substring(self.openMarker.length).indexOf(self.openMarker);
|
12786
|
+
|
12787
|
+
if (insideStartIndex !== -1) {
|
12788
|
+
insideStartIndex += self.openMarker.length;
|
12789
|
+
|
12790
|
+
if (insideStartIndex < endIndex) {
|
12791
|
+
var sub = text.substring(insideStartIndex);
|
12792
|
+
var result = tokenizer.call(self, text.substring(insideStartIndex));
|
12793
|
+
text = text.substring(0, insideStartIndex) + result;
|
12794
|
+
endIndex = text.substring(self.openMarker.length).indexOf(self.closeMarker);
|
12795
|
+
if (endIndex !== -1) endIndex += self.openMarker.length;
|
12796
|
+
}
|
12797
|
+
}
|
12062
12798
|
|
12063
12799
|
if (endIndex === -1) {
|
12064
12800
|
throw new Error("syntax error in formatter template");
|
12065
12801
|
return;
|
12066
12802
|
}
|
12067
12803
|
|
12068
|
-
var command = "path:"
|
12069
|
-
|
12804
|
+
var command = "path:";
|
12805
|
+
var key = text.substring(self.openMarker.length, endIndex);
|
12806
|
+
var parts = key.split(self.parameterDelimiter);
|
12807
|
+
command += parts.shift();
|
12808
|
+
var temp = self.object;
|
12809
|
+
|
12810
|
+
var _iterator = _createForOfIteratorHelper(parts),
|
12811
|
+
_step;
|
12812
|
+
|
12813
|
+
try {
|
12814
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
12815
|
+
var kv = _step.value;
|
12816
|
+
|
12817
|
+
var _kv$split = kv.split(self.parameterAssignment),
|
12818
|
+
_kv$split2 = _slicedToArray(_kv$split, 2),
|
12819
|
+
k = _kv$split2[0],
|
12820
|
+
v = _kv$split2[1];
|
12821
|
+
|
12822
|
+
temp[k] = v;
|
12823
|
+
}
|
12824
|
+
} catch (err) {
|
12825
|
+
_iterator.e(err);
|
12826
|
+
} finally {
|
12827
|
+
_iterator.f();
|
12828
|
+
}
|
12829
|
+
|
12830
|
+
formatted.push((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(new _data_pipe_js__WEBPACK_IMPORTED_MODULE_0__.Pipe(command).run(temp)));
|
12070
12831
|
text = text.substring(endIndex + self.closeMarker.length);
|
12071
12832
|
}
|
12072
12833
|
|
@@ -12077,7 +12838,7 @@ function tokenizer(text) {
|
|
12077
12838
|
|
12078
12839
|
|
12079
12840
|
/***/ }),
|
12080
|
-
/*
|
12841
|
+
/* 51 */
|
12081
12842
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
12082
12843
|
|
12083
12844
|
__webpack_require__.r(__webpack_exports__);
|
@@ -12088,8 +12849,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
12088
12849
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
12089
12850
|
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
12090
12851
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
|
12091
|
-
/* harmony import */ var _logentry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
12092
|
-
/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
12852
|
+
/* harmony import */ var _logentry_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52);
|
12853
|
+
/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53);
|
12093
12854
|
|
12094
12855
|
/**
|
12095
12856
|
* @author schukai GmbH
|
@@ -12127,7 +12888,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12127
12888
|
*
|
12128
12889
|
* ```
|
12129
12890
|
* <script type="module">
|
12130
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12891
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/handler.js';
|
12131
12892
|
* console.log(new Monster.Logging.Handler())
|
12132
12893
|
* </script>
|
12133
12894
|
* ```
|
@@ -12136,7 +12897,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12136
12897
|
*
|
12137
12898
|
* ```
|
12138
12899
|
* <script type="module">
|
12139
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12900
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/handler.js';
|
12140
12901
|
* console.log(new Handler())
|
12141
12902
|
* </script>
|
12142
12903
|
* ```
|
@@ -12328,7 +13089,7 @@ var Handler = /*#__PURE__*/function (_Base) {
|
|
12328
13089
|
|
12329
13090
|
|
12330
13091
|
/***/ }),
|
12331
|
-
/*
|
13092
|
+
/* 52 */
|
12332
13093
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
12333
13094
|
|
12334
13095
|
__webpack_require__.r(__webpack_exports__);
|
@@ -12374,7 +13135,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12374
13135
|
*
|
12375
13136
|
* ```
|
12376
13137
|
* <script type="module">
|
12377
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13138
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/logentry.js';
|
12378
13139
|
* console.log(new Monster.Logging.LogEntry())
|
12379
13140
|
* </script>
|
12380
13141
|
* ```
|
@@ -12383,7 +13144,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12383
13144
|
*
|
12384
13145
|
* ```
|
12385
13146
|
* <script type="module">
|
12386
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13147
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/logentry.js';
|
12387
13148
|
* console.log(new LogEntry())
|
12388
13149
|
* </script>
|
12389
13150
|
* ```
|
@@ -12449,7 +13210,7 @@ var LogEntry = /*#__PURE__*/function (_Base) {
|
|
12449
13210
|
|
12450
13211
|
|
12451
13212
|
/***/ }),
|
12452
|
-
/*
|
13213
|
+
/* 53 */
|
12453
13214
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
12454
13215
|
|
12455
13216
|
__webpack_require__.r(__webpack_exports__);
|
@@ -12465,8 +13226,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
12465
13226
|
/* harmony export */ "FATAL": function() { return /* binding */ FATAL; },
|
12466
13227
|
/* harmony export */ "OFF": function() { return /* binding */ OFF; }
|
12467
13228
|
/* harmony export */ });
|
12468
|
-
/* harmony import */ var _logging_handler_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
12469
|
-
/* harmony import */ var _logging_logentry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
13229
|
+
/* harmony import */ var _logging_handler_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51);
|
13230
|
+
/* harmony import */ var _logging_logentry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52);
|
12470
13231
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
12471
13232
|
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
|
12472
13233
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
|
@@ -12569,8 +13330,8 @@ var OFF = 0;
|
|
12569
13330
|
*
|
12570
13331
|
* ```
|
12571
13332
|
* <script type="module">
|
12572
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12573
|
-
*
|
13333
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/logger.js';
|
13334
|
+
* new Monster.Logging.Logger()
|
12574
13335
|
* </script>
|
12575
13336
|
* ```
|
12576
13337
|
*
|
@@ -12578,8 +13339,8 @@ var OFF = 0;
|
|
12578
13339
|
*
|
12579
13340
|
* ```
|
12580
13341
|
* <script type="module">
|
12581
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12582
|
-
*
|
13342
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/logger.js';
|
13343
|
+
* new Logger()
|
12583
13344
|
* </script>
|
12584
13345
|
* ```
|
12585
13346
|
*
|
@@ -12824,7 +13585,7 @@ function triggerLog(loglevel) {
|
|
12824
13585
|
}
|
12825
13586
|
|
12826
13587
|
/***/ }),
|
12827
|
-
/*
|
13588
|
+
/* 54 */
|
12828
13589
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
12829
13590
|
|
12830
13591
|
__webpack_require__.r(__webpack_exports__);
|
@@ -12835,8 +13596,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
12835
13596
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
12836
13597
|
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
12837
13598
|
/* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
|
12838
|
-
/* harmony import */ var _handler_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
12839
|
-
/* harmony import */ var _logentry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
13599
|
+
/* harmony import */ var _handler_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
|
13600
|
+
/* harmony import */ var _logentry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52);
|
12840
13601
|
|
12841
13602
|
/**
|
12842
13603
|
* @author schukai GmbH
|
@@ -12878,7 +13639,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12878
13639
|
*
|
12879
13640
|
* ```
|
12880
13641
|
* <script type="module">
|
12881
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13642
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/handler/console.js';
|
12882
13643
|
* console.log(new Monster.Logging.Handler.ConsoleHandler())
|
12883
13644
|
* </script>
|
12884
13645
|
* ```
|
@@ -12887,7 +13648,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
12887
13648
|
*
|
12888
13649
|
* ```
|
12889
13650
|
* <script type="module">
|
12890
|
-
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13651
|
+
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/logging/handler/console.js';
|
12891
13652
|
* console.log(new ConsoleHandler())
|
12892
13653
|
* </script>
|
12893
13654
|
* ```
|
@@ -12939,7 +13700,7 @@ var ConsoleHandler = /*#__PURE__*/function (_Handler) {
|
|
12939
13700
|
|
12940
13701
|
|
12941
13702
|
/***/ }),
|
12942
|
-
/*
|
13703
|
+
/* 55 */
|
12943
13704
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
12944
13705
|
|
12945
13706
|
__webpack_require__.r(__webpack_exports__);
|
@@ -12963,8 +13724,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
12963
13724
|
*
|
12964
13725
|
* ```
|
12965
13726
|
* <script type="module">
|
12966
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12967
|
-
*
|
13727
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/math/random.js';
|
13728
|
+
* Monster.Math.random(1,10)
|
13729
|
+
* // ↦ 5
|
12968
13730
|
* </script>
|
12969
13731
|
* ```
|
12970
13732
|
*
|
@@ -12972,8 +13734,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
12972
13734
|
*
|
12973
13735
|
* ```
|
12974
13736
|
* <script type="module">
|
12975
|
-
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
12976
|
-
*
|
13737
|
+
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/math/random.js';
|
13738
|
+
* random(1,10)
|
13739
|
+
* // ↦ 5
|
12977
13740
|
* </script>
|
12978
13741
|
* ```
|
12979
13742
|
*
|
@@ -13066,14 +13829,18 @@ function create(min, max) {
|
|
13066
13829
|
return create(min, max);
|
13067
13830
|
}
|
13068
13831
|
|
13069
|
-
|
13832
|
+
if (rval < min) {
|
13833
|
+
rval += min;
|
13834
|
+
}
|
13835
|
+
|
13836
|
+
return rval;
|
13070
13837
|
}
|
13071
13838
|
|
13072
13839
|
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.Math', random);
|
13073
13840
|
|
13074
13841
|
|
13075
13842
|
/***/ }),
|
13076
|
-
/*
|
13843
|
+
/* 56 */
|
13077
13844
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
13078
13845
|
|
13079
13846
|
__webpack_require__.r(__webpack_exports__);
|
@@ -13081,7 +13848,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
13081
13848
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_1__.Monster; },
|
13082
13849
|
/* harmony export */ "RandomID": function() { return /* binding */ RandomID; }
|
13083
13850
|
/* harmony export */ });
|
13084
|
-
/* harmony import */ var _math_random_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
13851
|
+
/* harmony import */ var _math_random_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55);
|
13085
13852
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
13086
13853
|
/* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
|
13087
13854
|
/* harmony import */ var _id_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
|
@@ -13124,7 +13891,7 @@ var internalCounter = 0;
|
|
13124
13891
|
*
|
13125
13892
|
* ```
|
13126
13893
|
* <script type="module">
|
13127
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13894
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/randomid.js';
|
13128
13895
|
* console.log(new Monster.Types.RandomID())
|
13129
13896
|
* </script>
|
13130
13897
|
* ```
|
@@ -13133,7 +13900,7 @@ var internalCounter = 0;
|
|
13133
13900
|
*
|
13134
13901
|
* ```
|
13135
13902
|
* <script type="module">
|
13136
|
-
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13903
|
+
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/randomid.js';
|
13137
13904
|
* console.log(new RandomID())
|
13138
13905
|
* </script>
|
13139
13906
|
* ```
|
@@ -13172,7 +13939,7 @@ var RandomID = /*#__PURE__*/function (_ID) {
|
|
13172
13939
|
|
13173
13940
|
|
13174
13941
|
/***/ }),
|
13175
|
-
/*
|
13942
|
+
/* 57 */
|
13176
13943
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
13177
13944
|
|
13178
13945
|
__webpack_require__.r(__webpack_exports__);
|
@@ -13216,7 +13983,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13216
13983
|
*
|
13217
13984
|
* ```
|
13218
13985
|
* <script type="module">
|
13219
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13986
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/version.js';
|
13220
13987
|
* console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3
|
13221
13988
|
* console.log(new Monster.Types.Version('1')) // ↦ 1.0.0
|
13222
13989
|
* </script>
|
@@ -13226,7 +13993,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13226
13993
|
*
|
13227
13994
|
* ```
|
13228
13995
|
* <script type="module">
|
13229
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13996
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/version.js';
|
13230
13997
|
* console.log(new Version('1.2.3')) // ↦ 1.2.3
|
13231
13998
|
* console.log(new Version('1')) // ↦ 1.0.0
|
13232
13999
|
* </script>
|
@@ -13234,7 +14001,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13234
14001
|
*
|
13235
14002
|
* @example
|
13236
14003
|
*
|
13237
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14004
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/version.js';
|
13238
14005
|
*
|
13239
14006
|
* new Version('1.0.0') // ↦ 1.0.0
|
13240
14007
|
* new Version(1) // ↦ 1.0.0
|
@@ -13368,7 +14135,7 @@ var monsterVersion;
|
|
13368
14135
|
*
|
13369
14136
|
* ```
|
13370
14137
|
* <script type="module">
|
13371
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14138
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/version.js';
|
13372
14139
|
* console.log(Monster.getVersion())
|
13373
14140
|
* </script>
|
13374
14141
|
* ```
|
@@ -13377,7 +14144,7 @@ var monsterVersion;
|
|
13377
14144
|
*
|
13378
14145
|
* ```
|
13379
14146
|
* <script type="module">
|
13380
|
-
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14147
|
+
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/types/version.js';
|
13381
14148
|
* console.log(getVersion())
|
13382
14149
|
* </script>
|
13383
14150
|
* ```
|
@@ -13396,7 +14163,7 @@ function getVersion() {
|
|
13396
14163
|
/**#@+ dont touch, replaced by make with package.json version */
|
13397
14164
|
|
13398
14165
|
|
13399
|
-
monsterVersion = new Version('1.
|
14166
|
+
monsterVersion = new Version('1.25.0');
|
13400
14167
|
/**#@-*/
|
13401
14168
|
|
13402
14169
|
return monsterVersion;
|
@@ -13406,7 +14173,7 @@ function getVersion() {
|
|
13406
14173
|
|
13407
14174
|
|
13408
14175
|
/***/ }),
|
13409
|
-
/*
|
14176
|
+
/* 58 */
|
13410
14177
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
13411
14178
|
|
13412
14179
|
__webpack_require__.r(__webpack_exports__);
|
@@ -13452,8 +14219,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13452
14219
|
*
|
13453
14220
|
* ```
|
13454
14221
|
* <script type="module">
|
13455
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13456
|
-
*
|
14222
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/comparator.js';
|
14223
|
+
* new Monster.Util.Comparator()
|
13457
14224
|
* </script>
|
13458
14225
|
* ```
|
13459
14226
|
*
|
@@ -13461,7 +14228,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13461
14228
|
*
|
13462
14229
|
* ```
|
13463
14230
|
* <script type="module">
|
13464
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14231
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/comparator.js';
|
13465
14232
|
* console.log(new Comparator())
|
13466
14233
|
* </script>
|
13467
14234
|
* ```
|
@@ -13486,7 +14253,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
13486
14253
|
*
|
13487
14254
|
* @example
|
13488
14255
|
*
|
13489
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
14256
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/comparator.js';
|
13490
14257
|
*
|
13491
14258
|
* console.log(new Comparator().lessThanOrEqual(2, 5))
|
13492
14259
|
* // ↦ true
|
@@ -13535,7 +14302,7 @@ var Comparator = /*#__PURE__*/function (_Base) {
|
|
13535
14302
|
*/
|
13536
14303
|
_this.compare = function (a, b) {
|
13537
14304
|
if (_typeof(a) !== _typeof(b)) {
|
13538
|
-
throw new TypeError("impractical comparison");
|
14305
|
+
throw new TypeError("impractical comparison", "types/comparator.js");
|
13539
14306
|
}
|
13540
14307
|
|
13541
14308
|
if (a === b) {
|
@@ -13667,7 +14434,7 @@ var Comparator = /*#__PURE__*/function (_Base) {
|
|
13667
14434
|
|
13668
14435
|
|
13669
14436
|
/***/ }),
|
13670
|
-
/*
|
14437
|
+
/* 59 */
|
13671
14438
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
13672
14439
|
|
13673
14440
|
__webpack_require__.r(__webpack_exports__);
|
@@ -13699,8 +14466,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
13699
14466
|
*
|
13700
14467
|
* ```
|
13701
14468
|
* <script type="module">
|
13702
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13703
|
-
*
|
14469
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/freeze.js';
|
14470
|
+
* Monster.Util.deepFreeze({})
|
13704
14471
|
* </script>
|
13705
14472
|
* ```
|
13706
14473
|
*
|
@@ -13708,8 +14475,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
13708
14475
|
*
|
13709
14476
|
* ```
|
13710
14477
|
* <script type="module">
|
13711
|
-
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
13712
|
-
*
|
14478
|
+
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.25.0/dist/modules/util/freeze.js';
|
14479
|
+
* deepFreeze({})
|
13713
14480
|
* </script>
|
13714
14481
|
* ```
|
13715
14482
|
*
|
@@ -13831,25 +14598,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
13831
14598
|
/* harmony import */ var _dom_constants_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(33);
|
13832
14599
|
/* harmony import */ var _dom_customcontrol_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(34);
|
13833
14600
|
/* harmony import */ var _dom_customelement_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(35);
|
13834
|
-
/* harmony import */ var _dom_events_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
|
13835
|
-
/* harmony import */ var _dom_locale_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
|
14601
|
+
/* harmony import */ var _dom_events_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(43);
|
14602
|
+
/* harmony import */ var _dom_locale_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(44);
|
13836
14603
|
/* harmony import */ var _dom_template_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(38);
|
13837
14604
|
/* harmony import */ var _dom_theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(39);
|
13838
14605
|
/* harmony import */ var _dom_updater_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(40);
|
13839
|
-
/* harmony import */ var _dom_util_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
|
13840
|
-
/* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(
|
13841
|
-
/* harmony import */ var _i18n_provider_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(
|
13842
|
-
/* harmony import */ var _i18n_providers_fetch_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(
|
13843
|
-
/* harmony import */ var _i18n_translations_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(
|
13844
|
-
/* harmony import */ var _logging_handler_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(
|
13845
|
-
/* harmony import */ var _logging_handler_console_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(
|
13846
|
-
/* harmony import */ var _logging_logentry_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(
|
13847
|
-
/* harmony import */ var _logging_logger_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(
|
13848
|
-
/* harmony import */ var _math_random_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(
|
14606
|
+
/* harmony import */ var _dom_util_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(42);
|
14607
|
+
/* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(45);
|
14608
|
+
/* harmony import */ var _i18n_provider_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(46);
|
14609
|
+
/* harmony import */ var _i18n_providers_fetch_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(49);
|
14610
|
+
/* harmony import */ var _i18n_translations_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(48);
|
14611
|
+
/* harmony import */ var _logging_handler_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(51);
|
14612
|
+
/* harmony import */ var _logging_handler_console_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(54);
|
14613
|
+
/* harmony import */ var _logging_logentry_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(52);
|
14614
|
+
/* harmony import */ var _logging_logger_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(53);
|
14615
|
+
/* harmony import */ var _math_random_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(55);
|
13849
14616
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(2);
|
13850
|
-
/* harmony import */ var _text_formatter_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(
|
14617
|
+
/* harmony import */ var _text_formatter_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(50);
|
13851
14618
|
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(4);
|
13852
|
-
/* harmony import */ var _types_basewithoptions_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(
|
14619
|
+
/* harmony import */ var _types_basewithoptions_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(47);
|
13853
14620
|
/* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(16);
|
13854
14621
|
/* harmony import */ var _types_id_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(24);
|
13855
14622
|
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(9);
|
@@ -13857,16 +14624,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
13857
14624
|
/* harmony import */ var _types_observerlist_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(31);
|
13858
14625
|
/* harmony import */ var _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(26);
|
13859
14626
|
/* harmony import */ var _types_queue_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(30);
|
13860
|
-
/* harmony import */ var _types_randomid_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(
|
14627
|
+
/* harmony import */ var _types_randomid_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(56);
|
13861
14628
|
/* harmony import */ var _types_stack_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(19);
|
13862
14629
|
/* harmony import */ var _types_tokenlist_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(28);
|
13863
14630
|
/* harmony import */ var _types_typeof_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(17);
|
13864
14631
|
/* harmony import */ var _types_uniquequeue_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(29);
|
13865
14632
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(14);
|
13866
|
-
/* harmony import */ var _types_version_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(
|
14633
|
+
/* harmony import */ var _types_version_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(57);
|
13867
14634
|
/* harmony import */ var _util_clone_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(15);
|
13868
|
-
/* harmony import */ var _util_comparator_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(
|
13869
|
-
/* harmony import */ var _util_freeze_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(
|
14635
|
+
/* harmony import */ var _util_comparator_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(58);
|
14636
|
+
/* harmony import */ var _util_freeze_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(59);
|
13870
14637
|
/**
|
13871
14638
|
* @license
|
13872
14639
|
* Copyright 2021 schukai GmbH
|