@schukai/monster 1.26.1 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +11 -0
- package/README.md +3 -3
- package/dist/modules/constants.js +1 -1
- 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/buildtree.js +1 -1
- package/dist/modules/data/datasource/namespace.js +1 -1
- package/dist/modules/data/datasource/restapi/writeerror.js +1 -1
- package/dist/modules/data/datasource/restapi.js +1 -1
- package/dist/modules/data/datasource/storage/localstorage.js +1 -1
- package/dist/modules/data/datasource/storage/namespace.js +1 -1
- package/dist/modules/data/datasource/storage/sessionstorage.js +1 -1
- package/dist/modules/data/datasource/storage.js +1 -1
- package/dist/modules/data/datasource.js +1 -1
- package/dist/modules/data/diff.js +1 -1
- package/dist/modules/data/extend.js +1 -1
- package/dist/modules/data/namespace.js +1 -1
- package/dist/modules/data/pathfinder.js +1 -1
- package/dist/modules/data/pipe.js +1 -1
- package/dist/modules/data/transformer.js +1 -1
- package/dist/modules/dom/assembler.js +1 -1
- package/dist/modules/dom/attributes.js +2 -2
- package/dist/modules/dom/constants.js +2 -2
- package/dist/modules/dom/customcontrol.js +1 -1
- package/dist/modules/dom/customelement.js +1 -1
- package/dist/modules/dom/events.js +1 -1
- package/dist/modules/dom/focusmanager.js +1 -1
- package/dist/modules/dom/locale.js +1 -1
- package/dist/modules/dom/namespace.js +1 -1
- package/dist/modules/dom/resource/data.js +1 -1
- package/dist/modules/dom/resource/link/stylesheet.js +1 -1
- package/dist/modules/dom/resource/link.js +1 -1
- package/dist/modules/dom/resource/script.js +1 -1
- package/dist/modules/dom/resource.js +1 -1
- package/dist/modules/dom/resourcemanager.js +1 -1
- package/dist/modules/dom/template.js +2 -2
- 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 +1 -1
- package/dist/modules/i18n/formatter.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/modules/monster.js +1 -1
- package/dist/modules/namespace.js +1 -1
- package/dist/modules/text/formatter.js +1 -1
- package/dist/modules/text/namespace.js +1 -1
- package/dist/modules/types/base.js +1 -1
- package/dist/modules/types/basewithoptions.js +1 -1
- 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/node.js +1 -1
- package/dist/modules/types/nodelist.js +1 -1
- package/dist/modules/types/noderecursiveiterator.js +1 -1
- package/dist/modules/types/observer.js +1 -1
- package/dist/modules/types/observerlist.js +1 -1
- package/dist/modules/types/proxyobserver.js +1 -1
- package/dist/modules/types/queue.js +1 -1
- package/dist/modules/types/randomid.js +1 -1
- package/dist/modules/types/regex.js +1 -1
- package/dist/modules/types/stack.js +1 -1
- package/dist/modules/types/tokenlist.js +1 -1
- package/dist/modules/types/typeof.js +1 -1
- package/dist/modules/types/uniquequeue.js +1 -1
- package/dist/modules/types/uuid.js +1 -1
- package/dist/modules/types/validate.js +1 -1
- package/dist/modules/types/version.js +2 -2
- package/dist/modules/util/clone.js +1 -1
- package/dist/modules/util/comparator.js +1 -1
- package/dist/modules/util/freeze.js +1 -1
- package/dist/modules/util/namespace.js +1 -1
- package/dist/modules/util/processing.js +1 -1
- package/dist/modules/util/trimspaces.js +1 -1
- package/dist/monster.dev.js +731 -544
- package/dist/monster.dev.js.map +1 -1
- package/dist/monster.js +2 -2
- package/package.json +1 -1
- 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 +4 -4
- package/source/data/buildtree.js +2 -2
- package/source/data/datasource/restapi.js +3 -3
- package/source/data/datasource/storage/localstorage.js +2 -2
- package/source/data/datasource/storage/sessionstorage.js +2 -2
- package/source/data/datasource/storage.js +3 -3
- package/source/data/datasource.js +3 -3
- package/source/data/diff.js +3 -3
- package/source/data/extend.js +2 -2
- package/source/data/pathfinder.js +4 -4
- package/source/data/pipe.js +3 -3
- package/source/data/transformer.js +3 -3
- package/source/dom/assembler.js +2 -2
- package/source/dom/attributes.js +111 -28
- package/source/dom/constants.js +9 -1
- package/source/dom/customcontrol.js +1 -1
- package/source/dom/customelement.js +1 -1
- package/source/dom/events.js +6 -7
- package/source/dom/focusmanager.js +2 -2
- package/source/dom/locale.js +2 -2
- package/source/dom/resource/data.js +2 -2
- package/source/dom/resource/link/stylesheet.js +2 -2
- package/source/dom/resource/link.js +2 -2
- package/source/dom/resource/script.js +2 -2
- package/source/dom/resource.js +2 -2
- package/source/dom/resourcemanager.js +2 -2
- package/source/dom/template.js +41 -11
- package/source/dom/theme.js +3 -3
- package/source/dom/updater.js +134 -86
- package/source/dom/util.js +6 -6
- package/source/dom/worker/factory.js +2 -2
- package/source/i18n/formatter.js +4 -4
- package/source/i18n/locale.js +4 -4
- package/source/i18n/provider.js +2 -2
- package/source/i18n/providers/fetch.js +3 -3
- package/source/i18n/translations.js +4 -4
- 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 +2 -2
- package/source/math/random.js +2 -2
- package/source/namespace.js +1 -1
- package/source/text/formatter.js +3 -3
- package/source/types/base.js +2 -2
- package/source/types/basewithoptions.js +2 -2
- package/source/types/binary.js +4 -4
- package/source/types/dataurl.js +4 -4
- package/source/types/global.js +4 -4
- package/source/types/id.js +2 -2
- package/source/types/is.js +20 -20
- package/source/types/mediatype.js +4 -4
- package/source/types/node.js +2 -2
- package/source/types/nodelist.js +2 -2
- package/source/types/noderecursiveiterator.js +4 -4
- package/source/types/observer.js +3 -3
- package/source/types/observerlist.js +2 -2
- package/source/types/proxyobserver.js +5 -5
- package/source/types/queue.js +3 -3
- package/source/types/randomid.js +2 -2
- package/source/types/regex.js +2 -2
- package/source/types/stack.js +2 -2
- package/source/types/tokenlist.js +2 -2
- package/source/types/typeof.js +3 -3
- package/source/types/uniquequeue.js +2 -2
- package/source/types/uuid.js +2 -2
- package/source/types/validate.js +20 -20
- package/source/types/version.js +6 -6
- package/source/util/clone.js +2 -2
- package/source/util/comparator.js +3 -3
- package/source/util/freeze.js +2 -2
- package/source/util/processing.js +3 -3
- package/source/util/trimspaces.js +2 -2
- package/test/cases/dom/attributes.js +29 -6
- package/test/cases/dom/template.js +72 -14
- package/test/cases/dom/updater.js +102 -75
- package/test/cases/monster.js +1 -1
- package/test/web/monster-dev.html +3 -3
- package/test/web/monster.html +2 -2
- package/test/web/test.html +2 -2
- package/test/web/tests.js +2 -2
package/dist/monster.dev.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Monster 1.
|
|
1
|
+
/** Monster 1.27.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();
|
|
@@ -140,7 +140,7 @@ var Monster = new Namespace("Monster");
|
|
|
140
140
|
*
|
|
141
141
|
* ```
|
|
142
142
|
* <script type="module">
|
|
143
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
143
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
144
144
|
* function hello() {
|
|
145
145
|
* console.log('Hello World!');
|
|
146
146
|
* }
|
|
@@ -387,7 +387,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
387
387
|
*
|
|
388
388
|
* ```
|
|
389
389
|
* <script type="module">
|
|
390
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
390
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
391
391
|
* new Monster.Types.Base()
|
|
392
392
|
* </script>
|
|
393
393
|
* ```
|
|
@@ -396,7 +396,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
396
396
|
*
|
|
397
397
|
* ```
|
|
398
398
|
* <script type="module">
|
|
399
|
-
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
399
|
+
* import {Base} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/base.js';
|
|
400
400
|
* new Base()
|
|
401
401
|
* </script>
|
|
402
402
|
* ```
|
|
@@ -568,7 +568,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
568
568
|
*
|
|
569
569
|
* ```
|
|
570
570
|
* <script type="module">
|
|
571
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
571
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
572
572
|
* new Monster.Constraint.AndOperator();
|
|
573
573
|
* </script>
|
|
574
574
|
* ```
|
|
@@ -577,16 +577,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
577
577
|
*
|
|
578
578
|
* ```
|
|
579
579
|
* <script type="module">
|
|
580
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
580
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/andoperator.js';
|
|
581
581
|
* new AndOperator();
|
|
582
582
|
* </script>
|
|
583
583
|
* ```
|
|
584
584
|
*
|
|
585
585
|
* @example
|
|
586
586
|
*
|
|
587
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
588
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
589
|
-
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
587
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/valid.js';
|
|
588
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/invalid.js';
|
|
589
|
+
* import {AndOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/andoperator.js';
|
|
590
590
|
*
|
|
591
591
|
* new AndOperator(
|
|
592
592
|
* new Valid(), new Valid()).isValid()
|
|
@@ -688,7 +688,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
688
688
|
*
|
|
689
689
|
* ```
|
|
690
690
|
* <script type="module">
|
|
691
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
691
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
692
692
|
* new Monster.Constraint.Invalid();
|
|
693
693
|
* </script>
|
|
694
694
|
* ```
|
|
@@ -697,14 +697,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
697
697
|
*
|
|
698
698
|
* ```
|
|
699
699
|
* <script type="module">
|
|
700
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
700
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/invalid.js';
|
|
701
701
|
* new Invalid();
|
|
702
702
|
* </script>
|
|
703
703
|
* ```
|
|
704
704
|
*
|
|
705
705
|
* @example
|
|
706
706
|
*
|
|
707
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
707
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/invalid.js';
|
|
708
708
|
*
|
|
709
709
|
* new Invalid().isValid()
|
|
710
710
|
* .then(()=>console.log(true))
|
|
@@ -799,7 +799,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
799
799
|
*
|
|
800
800
|
* ```
|
|
801
801
|
* <script type="module">
|
|
802
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
802
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
803
803
|
* new Monster.Constraint.IsArray()
|
|
804
804
|
* </script>
|
|
805
805
|
* ```
|
|
@@ -808,14 +808,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
808
808
|
*
|
|
809
809
|
* ```
|
|
810
810
|
* <script type="module">
|
|
811
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
811
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/isarray.js';
|
|
812
812
|
* console.log(new IsArray())
|
|
813
813
|
* </script>
|
|
814
814
|
* ```
|
|
815
815
|
*
|
|
816
816
|
* @example
|
|
817
817
|
*
|
|
818
|
-
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
818
|
+
* import {IsArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/isarray.js';
|
|
819
819
|
*
|
|
820
820
|
* new IsArray()
|
|
821
821
|
* .isValid([])
|
|
@@ -904,7 +904,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
904
904
|
*
|
|
905
905
|
* ```
|
|
906
906
|
* <script type="module">
|
|
907
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
907
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
908
908
|
* Monster.Types.isIterable(null) // ↦ false
|
|
909
909
|
* Monster.Types.isIterable('hello') // ↦ true
|
|
910
910
|
* Monster.Types.isIterable([]) // ↦ true
|
|
@@ -915,7 +915,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
915
915
|
*
|
|
916
916
|
* ```
|
|
917
917
|
* <script type="module">
|
|
918
|
-
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
918
|
+
* import {isIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
919
919
|
* isIterable(null) // ↦ false
|
|
920
920
|
* isIterable('hello') // ↦ true
|
|
921
921
|
* isIterable([]) // ↦ true
|
|
@@ -943,7 +943,7 @@ function isIterable(value) {
|
|
|
943
943
|
*
|
|
944
944
|
* ```
|
|
945
945
|
* <script type="module">
|
|
946
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
946
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
947
947
|
* Monster.Types.isPrimitive('2') // ↦ false
|
|
948
948
|
* Monster.Types.isPrimitive([]) // ↦ true
|
|
949
949
|
* </script>
|
|
@@ -953,7 +953,7 @@ function isIterable(value) {
|
|
|
953
953
|
*
|
|
954
954
|
* ```
|
|
955
955
|
* <script type="module">
|
|
956
|
-
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
956
|
+
* import {isPrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
957
957
|
* isPrimitive('2')) // ↦ true
|
|
958
958
|
* isPrimitive([])) // ↦ false
|
|
959
959
|
* </script>
|
|
@@ -991,7 +991,7 @@ function isPrimitive(value) {
|
|
|
991
991
|
*
|
|
992
992
|
* ```
|
|
993
993
|
* <script type="module">
|
|
994
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
994
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
995
995
|
* Monster.Types.isSymbol('2') // ↦ false
|
|
996
996
|
* Monster.Types.isSymbol(Symbol('test') // ↦ true
|
|
997
997
|
* </script>
|
|
@@ -1001,7 +1001,7 @@ function isPrimitive(value) {
|
|
|
1001
1001
|
*
|
|
1002
1002
|
* ```
|
|
1003
1003
|
* <script type="module">
|
|
1004
|
-
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1004
|
+
* import {isSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1005
1005
|
* isSymbol(Symbol('a'))) // ↦ true
|
|
1006
1006
|
* isSymbol([]) // ↦ false
|
|
1007
1007
|
* </script>
|
|
@@ -1027,7 +1027,7 @@ function isSymbol(value) {
|
|
|
1027
1027
|
*
|
|
1028
1028
|
* ```
|
|
1029
1029
|
* <script type="module">
|
|
1030
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1030
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1031
1031
|
* Monster.Types.isBoolean('2') // ↦ false
|
|
1032
1032
|
* Monster.Types.isBoolean([]) // ↦ false
|
|
1033
1033
|
* Monster.Types.isBoolean(true) // ↦ true
|
|
@@ -1038,7 +1038,7 @@ function isSymbol(value) {
|
|
|
1038
1038
|
*
|
|
1039
1039
|
* ```
|
|
1040
1040
|
* <script type="module">
|
|
1041
|
-
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1041
|
+
* import {isBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1042
1042
|
* isBoolean('2')) // ↦ false
|
|
1043
1043
|
* isBoolean([])) // ↦ false
|
|
1044
1044
|
* isBoolean(2>4)) // ↦ true
|
|
@@ -1069,7 +1069,7 @@ function isBoolean(value) {
|
|
|
1069
1069
|
*
|
|
1070
1070
|
* ```
|
|
1071
1071
|
* <script type="module">
|
|
1072
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1072
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1073
1073
|
* Monster.Types.isString('2') // ↦ true
|
|
1074
1074
|
* Monster.Types.isString([]) // ↦ false
|
|
1075
1075
|
* </script>
|
|
@@ -1079,7 +1079,7 @@ function isBoolean(value) {
|
|
|
1079
1079
|
*
|
|
1080
1080
|
* ```
|
|
1081
1081
|
* <script type="module">
|
|
1082
|
-
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1082
|
+
* import {isString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1083
1083
|
* isString('2')) // ↦ true
|
|
1084
1084
|
* isString([])) // ↦ false
|
|
1085
1085
|
* </script>
|
|
@@ -1109,7 +1109,7 @@ function isString(value) {
|
|
|
1109
1109
|
*
|
|
1110
1110
|
* ```
|
|
1111
1111
|
* <script type="module">
|
|
1112
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1112
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1113
1113
|
* Monster.Types.isObject('2') // ↦ false
|
|
1114
1114
|
* Monster.Types.isObject([]) // ↦ false
|
|
1115
1115
|
* Monster.Types.isObject({}) // ↦ true
|
|
@@ -1120,7 +1120,7 @@ function isString(value) {
|
|
|
1120
1120
|
*
|
|
1121
1121
|
* ```
|
|
1122
1122
|
* <script type="module">
|
|
1123
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1123
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1124
1124
|
* isObject('2')) // ↦ false
|
|
1125
1125
|
* isObject([])) // ↦ false
|
|
1126
1126
|
* </script>
|
|
@@ -1153,7 +1153,7 @@ function isObject(value) {
|
|
|
1153
1153
|
*
|
|
1154
1154
|
* ```
|
|
1155
1155
|
* <script type="module">
|
|
1156
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1156
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1157
1157
|
* Monster.Types.isInstance('2') // ↦ false
|
|
1158
1158
|
* Monster.Types.isInstance([]) // ↦ false
|
|
1159
1159
|
* Monster.Types.isInstance({}) // ↦ true
|
|
@@ -1164,7 +1164,7 @@ function isObject(value) {
|
|
|
1164
1164
|
*
|
|
1165
1165
|
* ```
|
|
1166
1166
|
* <script type="module">
|
|
1167
|
-
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1167
|
+
* import {isInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1168
1168
|
* isInstance('2')) // ↦ false
|
|
1169
1169
|
* isInstance([])) // ↦ false
|
|
1170
1170
|
* </script>
|
|
@@ -1194,7 +1194,7 @@ function isInstance(value, instance) {
|
|
|
1194
1194
|
*
|
|
1195
1195
|
* ```
|
|
1196
1196
|
* <script type="module">
|
|
1197
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1197
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1198
1198
|
* Monster.Types.isArray('2') // ↦ false
|
|
1199
1199
|
* Monster.Types.isArray([]) // ↦ true
|
|
1200
1200
|
* </script>
|
|
@@ -1204,7 +1204,7 @@ function isInstance(value, instance) {
|
|
|
1204
1204
|
*
|
|
1205
1205
|
* ```
|
|
1206
1206
|
* <script type="module">
|
|
1207
|
-
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1207
|
+
* import {isArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1208
1208
|
* isArray('2')) // ↦ false
|
|
1209
1209
|
* isArray([])) // ↦ true
|
|
1210
1210
|
* </script>
|
|
@@ -1231,7 +1231,7 @@ function isArray(value) {
|
|
|
1231
1231
|
*
|
|
1232
1232
|
* ```
|
|
1233
1233
|
* <script type="module">
|
|
1234
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1234
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1235
1235
|
* Monster.Types.isFunction(()=>{}) // ↦ true
|
|
1236
1236
|
* Monster.Types.isFunction('2') // ↦ false
|
|
1237
1237
|
* Monster.Types.isFunction([]) // ↦ false
|
|
@@ -1242,7 +1242,7 @@ function isArray(value) {
|
|
|
1242
1242
|
*
|
|
1243
1243
|
* ```
|
|
1244
1244
|
* <script type="module">
|
|
1245
|
-
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1245
|
+
* import {isFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1246
1246
|
* isFunction(()=>{}) // ↦ true
|
|
1247
1247
|
* isFunction('2')) // ↦ false
|
|
1248
1248
|
* isFunction([])) // ↦ false
|
|
@@ -1276,7 +1276,7 @@ function isFunction(value) {
|
|
|
1276
1276
|
*
|
|
1277
1277
|
* ```
|
|
1278
1278
|
* <script type="module">
|
|
1279
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1279
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1280
1280
|
* Monster.Types.isInteger(()=>{}) // ↦ true
|
|
1281
1281
|
* Monster.Types.isInteger('2') // ↦ false
|
|
1282
1282
|
* Monster.Types.isInteger(2) // ↦ true
|
|
@@ -1287,7 +1287,7 @@ function isFunction(value) {
|
|
|
1287
1287
|
*
|
|
1288
1288
|
* ```
|
|
1289
1289
|
* <script type="module">
|
|
1290
|
-
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1290
|
+
* import {isInteger} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
1291
1291
|
* isInteger(()=>{}) // ↦ true
|
|
1292
1292
|
* isInteger('2')) // ↦ false
|
|
1293
1293
|
* isInteger(2)) // ↦ true
|
|
@@ -1360,7 +1360,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1360
1360
|
*
|
|
1361
1361
|
* ```
|
|
1362
1362
|
* <script type="module">
|
|
1363
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1363
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1364
1364
|
* console.log(new Monster.Constraint.IsObject())
|
|
1365
1365
|
* </script>
|
|
1366
1366
|
* ```
|
|
@@ -1369,14 +1369,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1369
1369
|
*
|
|
1370
1370
|
* ```
|
|
1371
1371
|
* <script type="module">
|
|
1372
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1372
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/isobject.js';
|
|
1373
1373
|
* console.log(new IsObject())
|
|
1374
1374
|
* </script>
|
|
1375
1375
|
* ```
|
|
1376
1376
|
*
|
|
1377
1377
|
* @example
|
|
1378
1378
|
*
|
|
1379
|
-
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1379
|
+
* import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/isobject.js';
|
|
1380
1380
|
*
|
|
1381
1381
|
* new IsObject()
|
|
1382
1382
|
* .isValid({})
|
|
@@ -1479,7 +1479,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1479
1479
|
*
|
|
1480
1480
|
* ```
|
|
1481
1481
|
* <script type="module">
|
|
1482
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1482
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1483
1483
|
* new Monster.Constraint.OrOperator();
|
|
1484
1484
|
* </script>
|
|
1485
1485
|
* ```
|
|
@@ -1488,16 +1488,16 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1488
1488
|
*
|
|
1489
1489
|
* ```
|
|
1490
1490
|
* <script type="module">
|
|
1491
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1491
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraint/oroperator.js';
|
|
1492
1492
|
* new OrOperator();
|
|
1493
1493
|
* </script>
|
|
1494
1494
|
* ```
|
|
1495
1495
|
*
|
|
1496
1496
|
* @example
|
|
1497
1497
|
*
|
|
1498
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1499
|
-
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1500
|
-
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1498
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/valid.js';
|
|
1499
|
+
* import {Invalid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/invalid.js';
|
|
1500
|
+
* import {OrOperator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/oroperator.js';
|
|
1501
1501
|
*
|
|
1502
1502
|
* new OrOperator(
|
|
1503
1503
|
* new Valid(), new Invalid()).isValid()
|
|
@@ -1622,7 +1622,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1622
1622
|
*
|
|
1623
1623
|
* ```
|
|
1624
1624
|
* <script type="module">
|
|
1625
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1625
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1626
1626
|
* new Monster.Constraint.Valid();
|
|
1627
1627
|
* </script>
|
|
1628
1628
|
* ```
|
|
@@ -1631,14 +1631,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1631
1631
|
*
|
|
1632
1632
|
* ```
|
|
1633
1633
|
* <script type="module">
|
|
1634
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1634
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/valid.js';
|
|
1635
1635
|
* new Valid();
|
|
1636
1636
|
* </script>
|
|
1637
1637
|
* ```
|
|
1638
1638
|
*
|
|
1639
1639
|
* @example
|
|
1640
1640
|
*
|
|
1641
|
-
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1641
|
+
* import {Valid} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/constraints/valid.js';
|
|
1642
1642
|
*
|
|
1643
1643
|
* new Valid().isValid()
|
|
1644
1644
|
* .then(()=>console.log(true))
|
|
@@ -1747,7 +1747,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
1747
1747
|
*
|
|
1748
1748
|
* ```
|
|
1749
1749
|
* <script type="module">
|
|
1750
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1750
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
1751
1751
|
* console.log(Monster.Data.buildMap())
|
|
1752
1752
|
* </script>
|
|
1753
1753
|
* ```
|
|
@@ -1756,7 +1756,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
1756
1756
|
*
|
|
1757
1757
|
* ```
|
|
1758
1758
|
* <script type="module">
|
|
1759
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1759
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/buildmap.js';
|
|
1760
1760
|
* console.log(buildMap())
|
|
1761
1761
|
* </script>
|
|
1762
1762
|
* ```
|
|
@@ -1767,7 +1767,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
1767
1767
|
*
|
|
1768
1768
|
* @example
|
|
1769
1769
|
*
|
|
1770
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
1770
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/buildmap.js';
|
|
1771
1771
|
* // a typical data structure as reported by an api
|
|
1772
1772
|
*
|
|
1773
1773
|
* let map;
|
|
@@ -1997,7 +1997,7 @@ function buildFlatMap(subject, selector, key, parentMap) {
|
|
|
1997
1997
|
* Alternatively to a string selector a callback can be specified. this must return a map.
|
|
1998
1998
|
*
|
|
1999
1999
|
* @example
|
|
2000
|
-
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2000
|
+
* import {buildMap} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/buildmap.js';
|
|
2001
2001
|
*
|
|
2002
2002
|
* let obj = {
|
|
2003
2003
|
* "data": [
|
|
@@ -2200,7 +2200,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2200
2200
|
*
|
|
2201
2201
|
* ```
|
|
2202
2202
|
* <script type="module">
|
|
2203
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2203
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2204
2204
|
* console.log(Monster.Types.validateIterable('2')) // ↦ TypeError
|
|
2205
2205
|
* console.log(Monster.Types.validateIterable([])) // ↦ value
|
|
2206
2206
|
* </script>
|
|
@@ -2210,7 +2210,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2210
2210
|
*
|
|
2211
2211
|
* ```
|
|
2212
2212
|
* <script type="module">
|
|
2213
|
-
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2213
|
+
* import {validateIterable} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2214
2214
|
* console.log(validateIterable('2')) // ↦ TypeError
|
|
2215
2215
|
* console.log(validateIterable([])) // ↦ value
|
|
2216
2216
|
* </script>
|
|
@@ -2241,7 +2241,7 @@ function validateIterable(value) {
|
|
|
2241
2241
|
*
|
|
2242
2242
|
* ```
|
|
2243
2243
|
* <script type="module">
|
|
2244
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2244
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2245
2245
|
* console.log(Monster.Types.validatePrimitive('2')) // ↦ value
|
|
2246
2246
|
* console.log(Monster.Types.validatePrimitive([])) // ↦ TypeError
|
|
2247
2247
|
* </script>
|
|
@@ -2251,7 +2251,7 @@ function validateIterable(value) {
|
|
|
2251
2251
|
*
|
|
2252
2252
|
* ```
|
|
2253
2253
|
* <script type="module">
|
|
2254
|
-
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2254
|
+
* import {validatePrimitive} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2255
2255
|
* console.log(validatePrimitive('2')) // ↦ value
|
|
2256
2256
|
* console.log(validatePrimitive([])) // ↦ TypeError
|
|
2257
2257
|
* </script>
|
|
@@ -2283,7 +2283,7 @@ function validatePrimitive(value) {
|
|
|
2283
2283
|
*
|
|
2284
2284
|
* ```
|
|
2285
2285
|
* <script type="module">
|
|
2286
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2286
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2287
2287
|
* console.log(Monster.Types.validateBoolean(true)) // ↦ value
|
|
2288
2288
|
* console.log(Monster.Types.validateBoolean('2')) // ↦ TypeError
|
|
2289
2289
|
* console.log(Monster.Types.validateBoolean([])) // ↦ TypeError
|
|
@@ -2294,7 +2294,7 @@ function validatePrimitive(value) {
|
|
|
2294
2294
|
*
|
|
2295
2295
|
* ```
|
|
2296
2296
|
* <script type="module">
|
|
2297
|
-
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2297
|
+
* import {validateBoolean} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2298
2298
|
* console.log(validateBoolean(false)) // ↦ value
|
|
2299
2299
|
* console.log(validateBoolean('2')) // ↦ TypeError
|
|
2300
2300
|
* console.log(validateBoolean([])) // ↦ TypeError
|
|
@@ -2325,7 +2325,7 @@ function validateBoolean(value) {
|
|
|
2325
2325
|
*
|
|
2326
2326
|
* ```
|
|
2327
2327
|
* <script type="module">
|
|
2328
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2328
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2329
2329
|
* console.log(Monster.Types.validateString('2')) // ↦ value
|
|
2330
2330
|
* console.log(Monster.Types.validateString([])) // ↦ TypeError
|
|
2331
2331
|
* </script>
|
|
@@ -2335,7 +2335,7 @@ function validateBoolean(value) {
|
|
|
2335
2335
|
*
|
|
2336
2336
|
* ```
|
|
2337
2337
|
* <script type="module">
|
|
2338
|
-
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2338
|
+
* import {validateString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2339
2339
|
* console.log(validateString('2')) // ↦ value
|
|
2340
2340
|
* console.log(validateString([])) // ↦ TypeError
|
|
2341
2341
|
* </script>
|
|
@@ -2364,7 +2364,7 @@ function validateString(value) {
|
|
|
2364
2364
|
*
|
|
2365
2365
|
* ```
|
|
2366
2366
|
* <script type="module">
|
|
2367
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2367
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2368
2368
|
* console.log(Monster.Types.validateObject({})) // ↦ value
|
|
2369
2369
|
* console.log(Monster.Types.validateObject('2')) // ↦ TypeError
|
|
2370
2370
|
* console.log(Monster.Types.validateObject([])) // ↦ TypeError
|
|
@@ -2375,7 +2375,7 @@ function validateString(value) {
|
|
|
2375
2375
|
*
|
|
2376
2376
|
* ```
|
|
2377
2377
|
* <script type="module">
|
|
2378
|
-
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2378
|
+
* import {validateObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2379
2379
|
* console.log(validateObject({})) // ↦ value
|
|
2380
2380
|
* console.log(validateObject('2')) // ↦ TypeError
|
|
2381
2381
|
* console.log(validateObject([])) // ↦ TypeError
|
|
@@ -2405,7 +2405,7 @@ function validateObject(value) {
|
|
|
2405
2405
|
*
|
|
2406
2406
|
* ```
|
|
2407
2407
|
* <script type="module">
|
|
2408
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2408
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2409
2409
|
* console.log(Monster.Types.validateInstance({}, Object)) // ↦ value
|
|
2410
2410
|
* console.log(Monster.Types.validateInstance('2', Object)) // ↦ TypeError
|
|
2411
2411
|
* console.log(Monster.Types.validateInstance([], Object)) // ↦ TypeError
|
|
@@ -2416,7 +2416,7 @@ function validateObject(value) {
|
|
|
2416
2416
|
*
|
|
2417
2417
|
* ```
|
|
2418
2418
|
* <script type="module">
|
|
2419
|
-
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2419
|
+
* import {validateInstance} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2420
2420
|
* console.log(validateInstance({}, Object)) // ↦ value
|
|
2421
2421
|
* console.log(validateInstance('2', Object)) // ↦ TypeError
|
|
2422
2422
|
* console.log(validateInstance([], Object)) // ↦ TypeError
|
|
@@ -2456,7 +2456,7 @@ function validateInstance(value, instance) {
|
|
|
2456
2456
|
*
|
|
2457
2457
|
* ```
|
|
2458
2458
|
* <script type="module">
|
|
2459
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2459
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2460
2460
|
* console.log(Monster.Types.validateArray('2')) // ↦ TypeError
|
|
2461
2461
|
* console.log(Monster.Types.validateArray([])) // ↦ value
|
|
2462
2462
|
* </script>
|
|
@@ -2466,7 +2466,7 @@ function validateInstance(value, instance) {
|
|
|
2466
2466
|
*
|
|
2467
2467
|
* ```
|
|
2468
2468
|
* <script type="module">
|
|
2469
|
-
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2469
|
+
* import {validateArray} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2470
2470
|
* console.log(validateArray('2')) // ↦ TypeError
|
|
2471
2471
|
* console.log(validateArray([])) // ↦ value
|
|
2472
2472
|
* </script>
|
|
@@ -2495,7 +2495,7 @@ function validateArray(value) {
|
|
|
2495
2495
|
*
|
|
2496
2496
|
* ```
|
|
2497
2497
|
* <script type="module">
|
|
2498
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2498
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2499
2499
|
* console.log(Monster.Types.validateSymbol('2')) // ↦ TypeError
|
|
2500
2500
|
* console.log(Monster.Types.validateSymbol([])) // ↦ value
|
|
2501
2501
|
* </script>
|
|
@@ -2505,7 +2505,7 @@ function validateArray(value) {
|
|
|
2505
2505
|
*
|
|
2506
2506
|
* ```
|
|
2507
2507
|
* <script type="module">
|
|
2508
|
-
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2508
|
+
* import {validateSymbol} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2509
2509
|
* console.log(validateSymbol('2')) // ↦ TypeError
|
|
2510
2510
|
* console.log(validateSymbol()) // ↦ value
|
|
2511
2511
|
* </script>
|
|
@@ -2534,7 +2534,7 @@ function validateSymbol(value) {
|
|
|
2534
2534
|
*
|
|
2535
2535
|
* ```
|
|
2536
2536
|
* <script type="module">
|
|
2537
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2537
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2538
2538
|
* console.log(Monster.Types.validateFunction(()=>{})) // ↦ value
|
|
2539
2539
|
* console.log(Monster.Types.validateFunction('2')) // ↦ TypeError
|
|
2540
2540
|
* console.log(Monster.Types.validateFunction([])) // ↦ TypeError
|
|
@@ -2545,7 +2545,7 @@ function validateSymbol(value) {
|
|
|
2545
2545
|
*
|
|
2546
2546
|
* ```
|
|
2547
2547
|
* <script type="module">
|
|
2548
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2548
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2549
2549
|
* console.log(validateFunction(()=>{})) // ↦ value
|
|
2550
2550
|
* console.log(validateFunction('2')) // ↦ TypeError
|
|
2551
2551
|
* console.log(validateFunction([])) // ↦ TypeError
|
|
@@ -2575,7 +2575,7 @@ function validateFunction(value) {
|
|
|
2575
2575
|
*
|
|
2576
2576
|
* ```
|
|
2577
2577
|
* <script type="module">
|
|
2578
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2578
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2579
2579
|
* console.log(Monster.Types.validateInteger(true)) // ↦ TypeError
|
|
2580
2580
|
* console.log(Monster.Types.validateInteger('2')) // ↦ TypeError
|
|
2581
2581
|
* console.log(Monster.Types.validateInteger(2)) // ↦ value
|
|
@@ -2586,7 +2586,7 @@ function validateFunction(value) {
|
|
|
2586
2586
|
*
|
|
2587
2587
|
* ```
|
|
2588
2588
|
* <script type="module">
|
|
2589
|
-
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2589
|
+
* import {validateFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/validate.js';
|
|
2590
2590
|
* console.log(validateInteger(true)) // ↦ TypeError
|
|
2591
2591
|
* console.log(validateInteger('2')) // ↦ TypeError
|
|
2592
2592
|
* console.log(validateInteger(2)) // ↦ value
|
|
@@ -2652,7 +2652,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2652
2652
|
*
|
|
2653
2653
|
* ```
|
|
2654
2654
|
* <script type="module">
|
|
2655
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2655
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2656
2656
|
* Monster.Util.clone({})
|
|
2657
2657
|
* </script>
|
|
2658
2658
|
* ```
|
|
@@ -2661,7 +2661,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2661
2661
|
*
|
|
2662
2662
|
* ```
|
|
2663
2663
|
* <script type="module">
|
|
2664
|
-
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2664
|
+
* import {clone} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/util/clone.js';
|
|
2665
2665
|
* clone({})
|
|
2666
2666
|
* </script>
|
|
2667
2667
|
* ```
|
|
@@ -2873,7 +2873,7 @@ function getGlobal() {
|
|
|
2873
2873
|
*
|
|
2874
2874
|
* ```
|
|
2875
2875
|
* <script type="module">
|
|
2876
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2876
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2877
2877
|
* Monster.Types.getGlobalObject('document')
|
|
2878
2878
|
* // ↦ { }
|
|
2879
2879
|
* </script>
|
|
@@ -2883,7 +2883,7 @@ function getGlobal() {
|
|
|
2883
2883
|
*
|
|
2884
2884
|
* ```
|
|
2885
2885
|
* <script type="module">
|
|
2886
|
-
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2886
|
+
* import {getGlobalObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/global.js';
|
|
2887
2887
|
* getGlobalObject('document')
|
|
2888
2888
|
* // ↦ { }
|
|
2889
2889
|
* </script>
|
|
@@ -2915,7 +2915,7 @@ function getGlobalObject(name) {
|
|
|
2915
2915
|
*
|
|
2916
2916
|
* ```
|
|
2917
2917
|
* <script type="module">
|
|
2918
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2918
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2919
2919
|
* console.log(Monster.Types.getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
|
2920
2920
|
* </script>
|
|
2921
2921
|
* ```
|
|
@@ -2924,7 +2924,7 @@ function getGlobalObject(name) {
|
|
|
2924
2924
|
*
|
|
2925
2925
|
* ```
|
|
2926
2926
|
* <script type="module">
|
|
2927
|
-
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2927
|
+
* import {getGlobalFunction} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/global.js';
|
|
2928
2928
|
* console.log(getGlobalFunction('parseInt')) // ↦ f parseInt() { }
|
|
2929
2929
|
* </script>
|
|
2930
2930
|
* ```
|
|
@@ -2975,7 +2975,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2975
2975
|
*
|
|
2976
2976
|
* ```
|
|
2977
2977
|
* <script type="module">
|
|
2978
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2978
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
2979
2979
|
* console.log(Monster.Types.typeOf())
|
|
2980
2980
|
* </script>
|
|
2981
2981
|
* ```
|
|
@@ -2984,14 +2984,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2984
2984
|
*
|
|
2985
2985
|
* ```
|
|
2986
2986
|
* <script type="module">
|
|
2987
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2987
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/typeof.js';
|
|
2988
2988
|
* console.log(typeOf())
|
|
2989
2989
|
* </script>
|
|
2990
2990
|
* ```
|
|
2991
2991
|
*
|
|
2992
2992
|
* @example
|
|
2993
2993
|
*
|
|
2994
|
-
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
2994
|
+
* import {typeOf} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/typeof.js';
|
|
2995
2995
|
*
|
|
2996
2996
|
* console.log(typeOf(undefined)); // ↦ undefined
|
|
2997
2997
|
* console.log(typeOf("")); // ↦ string
|
|
@@ -3110,7 +3110,7 @@ var WILDCARD = '*';
|
|
|
3110
3110
|
*
|
|
3111
3111
|
* ```
|
|
3112
3112
|
* <script type="module">
|
|
3113
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3113
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
3114
3114
|
* console.log(new Monster.Data.Pathfinder())
|
|
3115
3115
|
* </script>
|
|
3116
3116
|
* ```
|
|
@@ -3119,7 +3119,7 @@ var WILDCARD = '*';
|
|
|
3119
3119
|
*
|
|
3120
3120
|
* ```
|
|
3121
3121
|
* <script type="module">
|
|
3122
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3122
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/pathfinder.js';
|
|
3123
3123
|
* console.log(new Pathfinder())
|
|
3124
3124
|
* </script>
|
|
3125
3125
|
* ```
|
|
@@ -3161,7 +3161,7 @@ var WILDCARD = '*';
|
|
|
3161
3161
|
*
|
|
3162
3162
|
* @example
|
|
3163
3163
|
*
|
|
3164
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3164
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/pathfinder.js';
|
|
3165
3165
|
*
|
|
3166
3166
|
* let value = new Pathfinder({
|
|
3167
3167
|
* a: {
|
|
@@ -3187,7 +3187,7 @@ var WILDCARD = '*';
|
|
|
3187
3187
|
*
|
|
3188
3188
|
* @example
|
|
3189
3189
|
*
|
|
3190
|
-
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3190
|
+
* import {Pathfinder} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/pathfinder.js';
|
|
3191
3191
|
*
|
|
3192
3192
|
* let p = new Pathfinder({
|
|
3193
3193
|
* a: {
|
|
@@ -3602,7 +3602,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
3602
3602
|
*
|
|
3603
3603
|
* ```
|
|
3604
3604
|
* <script type="module">
|
|
3605
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3605
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
3606
3606
|
* console.log(new Monster.Types.Stack())
|
|
3607
3607
|
* </script>
|
|
3608
3608
|
* ```
|
|
@@ -3611,7 +3611,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
3611
3611
|
*
|
|
3612
3612
|
* ```
|
|
3613
3613
|
* <script type="module">
|
|
3614
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3614
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/stack.js';
|
|
3615
3615
|
* console.log(new Stack())
|
|
3616
3616
|
* </script>
|
|
3617
3617
|
* ```
|
|
@@ -3746,7 +3746,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
3746
3746
|
*
|
|
3747
3747
|
* ```
|
|
3748
3748
|
* <script type="module">
|
|
3749
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3749
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
3750
3750
|
* Monster.Data.Diff(a, b)
|
|
3751
3751
|
* </script>
|
|
3752
3752
|
* ```
|
|
@@ -3755,14 +3755,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
3755
3755
|
*
|
|
3756
3756
|
* ```
|
|
3757
3757
|
* <script type="module">
|
|
3758
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3758
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/diff.js';
|
|
3759
3759
|
* Diff(a, b)
|
|
3760
3760
|
* </script>
|
|
3761
3761
|
* ```
|
|
3762
3762
|
*
|
|
3763
3763
|
* @example
|
|
3764
3764
|
*
|
|
3765
|
-
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
3765
|
+
* import {Diff} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/diff.js';
|
|
3766
3766
|
*
|
|
3767
3767
|
* // given are two objects x and y.
|
|
3768
3768
|
*
|
|
@@ -4008,7 +4008,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4008
4008
|
*
|
|
4009
4009
|
* ```
|
|
4010
4010
|
* <script type="module">
|
|
4011
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4011
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
4012
4012
|
* Monster.Data.extend(a, b)
|
|
4013
4013
|
* </script>
|
|
4014
4014
|
* ```
|
|
@@ -4017,7 +4017,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4017
4017
|
*
|
|
4018
4018
|
* ```
|
|
4019
4019
|
* <script type="module">
|
|
4020
|
-
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4020
|
+
* import {extend} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/extend.js';
|
|
4021
4021
|
* extend(a, b)
|
|
4022
4022
|
* </script>
|
|
4023
4023
|
* ```
|
|
@@ -4146,7 +4146,7 @@ var DELIMITER = '|';
|
|
|
4146
4146
|
*
|
|
4147
4147
|
* ```
|
|
4148
4148
|
* <script type="module">
|
|
4149
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4149
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
4150
4150
|
* new Monster.Data.Pipe()
|
|
4151
4151
|
* </script>
|
|
4152
4152
|
* ```
|
|
@@ -4155,7 +4155,7 @@ var DELIMITER = '|';
|
|
|
4155
4155
|
*
|
|
4156
4156
|
* ```
|
|
4157
4157
|
* <script type="module">
|
|
4158
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4158
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/pipe.js';
|
|
4159
4159
|
* new Pipe()
|
|
4160
4160
|
* </script>
|
|
4161
4161
|
* ```
|
|
@@ -4166,7 +4166,7 @@ var DELIMITER = '|';
|
|
|
4166
4166
|
* the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.
|
|
4167
4167
|
*
|
|
4168
4168
|
* @example
|
|
4169
|
-
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4169
|
+
* import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/pipe.js';
|
|
4170
4170
|
*
|
|
4171
4171
|
* let obj = {
|
|
4172
4172
|
* a: {
|
|
@@ -4328,7 +4328,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
4328
4328
|
*
|
|
4329
4329
|
* ```
|
|
4330
4330
|
* <script type="module">
|
|
4331
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4331
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
4332
4332
|
* new Monster.Data.Transformer()
|
|
4333
4333
|
* </script>
|
|
4334
4334
|
* ```
|
|
@@ -4337,7 +4337,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
4337
4337
|
*
|
|
4338
4338
|
* ```
|
|
4339
4339
|
* <script type="module">
|
|
4340
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4340
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/transformer.js';
|
|
4341
4341
|
* new Transformer()
|
|
4342
4342
|
* </script>
|
|
4343
4343
|
* ```
|
|
@@ -4423,7 +4423,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
4423
4423
|
*
|
|
4424
4424
|
* @example
|
|
4425
4425
|
*
|
|
4426
|
-
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4426
|
+
* import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/data/transformer.js';
|
|
4427
4427
|
*
|
|
4428
4428
|
* const transformer = new Transformer("tolower")
|
|
4429
4429
|
*
|
|
@@ -4956,7 +4956,7 @@ var internalCounter = new Map();
|
|
|
4956
4956
|
*
|
|
4957
4957
|
* ```
|
|
4958
4958
|
* <script type="module">
|
|
4959
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4959
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
4960
4960
|
* console.log(new Monster.Types.ID())
|
|
4961
4961
|
* </script>
|
|
4962
4962
|
* ```
|
|
@@ -4965,7 +4965,7 @@ var internalCounter = new Map();
|
|
|
4965
4965
|
*
|
|
4966
4966
|
* ```
|
|
4967
4967
|
* <script type="module">
|
|
4968
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
4968
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/id.js';
|
|
4969
4969
|
* console.log(new ID())
|
|
4970
4970
|
* </script>
|
|
4971
4971
|
* ```
|
|
@@ -5088,7 +5088,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
|
5088
5088
|
*
|
|
5089
5089
|
* ```
|
|
5090
5090
|
* <script type="module">
|
|
5091
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5091
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
5092
5092
|
* console.log(new Monster.DOM.Assembler())
|
|
5093
5093
|
* </script>
|
|
5094
5094
|
* ```
|
|
@@ -5097,7 +5097,7 @@ var ATTRIBUTEPREFIX = "data-monster-";
|
|
|
5097
5097
|
*
|
|
5098
5098
|
* ```
|
|
5099
5099
|
* <script type="module">
|
|
5100
|
-
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5100
|
+
* import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/assembler.js';
|
|
5101
5101
|
* console.log(new Assembler())
|
|
5102
5102
|
* </script>
|
|
5103
5103
|
* ```
|
|
@@ -5238,7 +5238,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5238
5238
|
*
|
|
5239
5239
|
* ```
|
|
5240
5240
|
* <script type="module">
|
|
5241
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5241
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
5242
5242
|
* new Monster.Types.ProxyObserver()
|
|
5243
5243
|
* </script>
|
|
5244
5244
|
* ```
|
|
@@ -5247,7 +5247,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5247
5247
|
*
|
|
5248
5248
|
* ```
|
|
5249
5249
|
* <script type="module">
|
|
5250
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5250
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/proxyobserver.js';
|
|
5251
5251
|
* new ProxyObserver()
|
|
5252
5252
|
* </script>
|
|
5253
5253
|
* ```
|
|
@@ -5258,9 +5258,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5258
5258
|
*
|
|
5259
5259
|
* @example
|
|
5260
5260
|
*
|
|
5261
|
-
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5262
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5263
|
-
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5261
|
+
* import {ProxyObserver} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/proxyobserver.js';
|
|
5262
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/observer.js';
|
|
5263
|
+
* import {isObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/is.js';
|
|
5264
5264
|
*
|
|
5265
5265
|
* const o = new Observer(function () {
|
|
5266
5266
|
* if (isObject(this) && this instanceof ProxyObserver) {
|
|
@@ -5586,7 +5586,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5586
5586
|
*
|
|
5587
5587
|
* ```
|
|
5588
5588
|
* <script type="module">
|
|
5589
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5589
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
5590
5590
|
* console.log(new Monster.Types.Observer())
|
|
5591
5591
|
* </script>
|
|
5592
5592
|
* ```
|
|
@@ -5595,7 +5595,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5595
5595
|
*
|
|
5596
5596
|
* ```
|
|
5597
5597
|
* <script type="module">
|
|
5598
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5598
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/observer.js';
|
|
5599
5599
|
* console.log(new Observer())
|
|
5600
5600
|
* </script>
|
|
5601
5601
|
* ```
|
|
@@ -5629,7 +5629,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5629
5629
|
*
|
|
5630
5630
|
* @example
|
|
5631
5631
|
*
|
|
5632
|
-
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5632
|
+
* import {Observer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/observer.js';
|
|
5633
5633
|
*
|
|
5634
5634
|
* const observer = new Observer(function(a, b, c) {
|
|
5635
5635
|
* console.log(this, a, b, c); // ↦ "a", 2, true
|
|
@@ -5829,7 +5829,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5829
5829
|
*
|
|
5830
5830
|
* ```
|
|
5831
5831
|
* <script type="module">
|
|
5832
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5832
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
5833
5833
|
* new Monster.Types.TokenList("myclass row")
|
|
5834
5834
|
* </script>
|
|
5835
5835
|
* ```
|
|
@@ -5838,7 +5838,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
5838
5838
|
*
|
|
5839
5839
|
* ```
|
|
5840
5840
|
* <script type="module">
|
|
5841
|
-
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
5841
|
+
* import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/tokenlist.js';
|
|
5842
5842
|
* new TokenList("myclass row")
|
|
5843
5843
|
* </script>
|
|
5844
5844
|
* ```
|
|
@@ -6261,7 +6261,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
6261
6261
|
*
|
|
6262
6262
|
* ```
|
|
6263
6263
|
* <script type="module">
|
|
6264
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6264
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6265
6265
|
* new Monster.Types.UniqueQueue()
|
|
6266
6266
|
* </script>
|
|
6267
6267
|
* ```
|
|
@@ -6270,7 +6270,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
6270
6270
|
*
|
|
6271
6271
|
* ```
|
|
6272
6272
|
* <script type="module">
|
|
6273
|
-
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6273
|
+
* import {UniqueQueue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/uniquequeue.js';
|
|
6274
6274
|
* new UniqueQueue()
|
|
6275
6275
|
* </script>
|
|
6276
6276
|
* ```
|
|
@@ -6405,7 +6405,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
6405
6405
|
*
|
|
6406
6406
|
* ```
|
|
6407
6407
|
* <script type="module">
|
|
6408
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6408
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6409
6409
|
* new Monster.Types.Queue()
|
|
6410
6410
|
* </script>
|
|
6411
6411
|
* ```
|
|
@@ -6414,14 +6414,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
6414
6414
|
*
|
|
6415
6415
|
* ```
|
|
6416
6416
|
* <script type="module">
|
|
6417
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6417
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/queue.js';
|
|
6418
6418
|
* new Queue()
|
|
6419
6419
|
* </script>
|
|
6420
6420
|
* ```
|
|
6421
6421
|
*
|
|
6422
6422
|
* @example
|
|
6423
6423
|
*
|
|
6424
|
-
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6424
|
+
* import {Queue} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/queue.js';
|
|
6425
6425
|
*
|
|
6426
6426
|
* const queue = new Queue;
|
|
6427
6427
|
*
|
|
@@ -6590,7 +6590,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
6590
6590
|
*
|
|
6591
6591
|
* ```
|
|
6592
6592
|
* <script type="module">
|
|
6593
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6593
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6594
6594
|
* console.log(new Monster.Types.ObserverList())
|
|
6595
6595
|
* console.log(new Monster.Types.ObserverList())
|
|
6596
6596
|
* </script>
|
|
@@ -6600,7 +6600,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
6600
6600
|
*
|
|
6601
6601
|
* ```
|
|
6602
6602
|
* <script type="module">
|
|
6603
|
-
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6603
|
+
* import {ObserverList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/observerlist.js';
|
|
6604
6604
|
* console.log(ObserverList())
|
|
6605
6605
|
* console.log(ObserverList())
|
|
6606
6606
|
* </script>
|
|
@@ -6732,7 +6732,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6732
6732
|
/* harmony export */ "addAttributeToken": function() { return /* binding */ addAttributeToken; },
|
|
6733
6733
|
/* harmony export */ "toggleAttributeToken": function() { return /* binding */ toggleAttributeToken; },
|
|
6734
6734
|
/* harmony export */ "getLinkedObjects": function() { return /* binding */ getLinkedObjects; },
|
|
6735
|
-
/* harmony export */ "findClosestObjectLink": function() { return /* binding */ findClosestObjectLink; }
|
|
6735
|
+
/* harmony export */ "findClosestObjectLink": function() { return /* binding */ findClosestObjectLink; },
|
|
6736
|
+
/* harmony export */ "findClosestByClass": function() { return /* binding */ findClosestByClass; }
|
|
6736
6737
|
/* harmony export */ });
|
|
6737
6738
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
6738
6739
|
/* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
|
|
@@ -6759,7 +6760,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6759
6760
|
*
|
|
6760
6761
|
* ```
|
|
6761
6762
|
* <script type="module">
|
|
6762
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6763
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6763
6764
|
* console.log(Monster.DOM.findClosestObjectLink())
|
|
6764
6765
|
* </script>
|
|
6765
6766
|
* ```
|
|
@@ -6768,7 +6769,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6768
6769
|
*
|
|
6769
6770
|
* ```
|
|
6770
6771
|
* <script type="module">
|
|
6771
|
-
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6772
|
+
* import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/updater.js';
|
|
6772
6773
|
* console.log(findClosestObjectLink())
|
|
6773
6774
|
* </script>
|
|
6774
6775
|
* ```
|
|
@@ -6789,7 +6790,7 @@ function findClosestObjectLink(element) {
|
|
|
6789
6790
|
*
|
|
6790
6791
|
* ```
|
|
6791
6792
|
* <script type="module">
|
|
6792
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6793
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6793
6794
|
* Monster.DOM.addToObjectLink();
|
|
6794
6795
|
* </script>
|
|
6795
6796
|
* ```
|
|
@@ -6798,7 +6799,7 @@ function findClosestObjectLink(element) {
|
|
|
6798
6799
|
*
|
|
6799
6800
|
* ```
|
|
6800
6801
|
* <script type="module">
|
|
6801
|
-
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6802
|
+
* import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
6802
6803
|
* addToObjectLink();
|
|
6803
6804
|
* </script>
|
|
6804
6805
|
* ```
|
|
@@ -6830,7 +6831,7 @@ function addToObjectLink(element, symbol, object) {
|
|
|
6830
6831
|
*
|
|
6831
6832
|
* ```
|
|
6832
6833
|
* <script type="module">
|
|
6833
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6834
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6834
6835
|
* Monster.DOM.removeObjectLink();
|
|
6835
6836
|
* </script>
|
|
6836
6837
|
* ```
|
|
@@ -6839,7 +6840,7 @@ function addToObjectLink(element, symbol, object) {
|
|
|
6839
6840
|
*
|
|
6840
6841
|
* ```
|
|
6841
6842
|
* <script type="module">
|
|
6842
|
-
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6843
|
+
* import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
6843
6844
|
* removeObjectLink();
|
|
6844
6845
|
* </script>
|
|
6845
6846
|
* ```
|
|
@@ -6870,7 +6871,7 @@ function removeObjectLink(element, symbol) {
|
|
|
6870
6871
|
*
|
|
6871
6872
|
* ```
|
|
6872
6873
|
* <script type="module">
|
|
6873
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6874
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6874
6875
|
* Monster.DOM.hasObjectLink();
|
|
6875
6876
|
* </script>
|
|
6876
6877
|
* ```
|
|
@@ -6879,7 +6880,7 @@ function removeObjectLink(element, symbol) {
|
|
|
6879
6880
|
*
|
|
6880
6881
|
* ```
|
|
6881
6882
|
* <script type="module">
|
|
6882
|
-
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6883
|
+
* import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
6883
6884
|
* hasObjectLink();
|
|
6884
6885
|
* </script>
|
|
6885
6886
|
* ```
|
|
@@ -6915,7 +6916,7 @@ function hasObjectLink(element, symbol) {
|
|
|
6915
6916
|
*
|
|
6916
6917
|
* ```
|
|
6917
6918
|
* <script type="module">
|
|
6918
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6919
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6919
6920
|
* Monster.DOM.getLinkedObjects();
|
|
6920
6921
|
* </script>
|
|
6921
6922
|
* ```
|
|
@@ -6924,7 +6925,7 @@ function hasObjectLink(element, symbol) {
|
|
|
6924
6925
|
*
|
|
6925
6926
|
* ```
|
|
6926
6927
|
* <script type="module">
|
|
6927
|
-
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6928
|
+
* import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
6928
6929
|
* getLinkedObjects();
|
|
6929
6930
|
* </script>
|
|
6930
6931
|
* ```
|
|
@@ -6958,7 +6959,7 @@ function getLinkedObjects(element, symbol) {
|
|
|
6958
6959
|
*
|
|
6959
6960
|
* ```
|
|
6960
6961
|
* <script type="module">
|
|
6961
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6962
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
6962
6963
|
* Monster.DOM.toggleAttributeToken();
|
|
6963
6964
|
* </script>
|
|
6964
6965
|
* ```
|
|
@@ -6967,7 +6968,7 @@ function getLinkedObjects(element, symbol) {
|
|
|
6967
6968
|
*
|
|
6968
6969
|
* ```
|
|
6969
6970
|
* <script type="module">
|
|
6970
|
-
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
6971
|
+
* import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
6971
6972
|
* toggleAttributeToken();
|
|
6972
6973
|
* </script>
|
|
6973
6974
|
* ```
|
|
@@ -7002,7 +7003,7 @@ function toggleAttributeToken(element, key, token) {
|
|
|
7002
7003
|
*
|
|
7003
7004
|
* ```
|
|
7004
7005
|
* <script type="module">
|
|
7005
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7006
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7006
7007
|
* Monster.DOM.addAttributeToken();
|
|
7007
7008
|
* </script>
|
|
7008
7009
|
* ```
|
|
@@ -7011,7 +7012,7 @@ function toggleAttributeToken(element, key, token) {
|
|
|
7011
7012
|
*
|
|
7012
7013
|
* ```
|
|
7013
7014
|
* <script type="module">
|
|
7014
|
-
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7015
|
+
* import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7015
7016
|
* addAttributeToken();
|
|
7016
7017
|
* </script>
|
|
7017
7018
|
* ```
|
|
@@ -7048,7 +7049,7 @@ function addAttributeToken(element, key, token) {
|
|
|
7048
7049
|
*
|
|
7049
7050
|
* ```
|
|
7050
7051
|
* <script type="module">
|
|
7051
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7052
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7052
7053
|
* Monster.DOM.removeAttributeToken();
|
|
7053
7054
|
* </script>
|
|
7054
7055
|
* ```
|
|
@@ -7057,7 +7058,7 @@ function addAttributeToken(element, key, token) {
|
|
|
7057
7058
|
*
|
|
7058
7059
|
* ```
|
|
7059
7060
|
* <script type="module">
|
|
7060
|
-
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7061
|
+
* import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7061
7062
|
* removeAttributeToken();
|
|
7062
7063
|
* </script>
|
|
7063
7064
|
* ```
|
|
@@ -7093,7 +7094,7 @@ function removeAttributeToken(element, key, token) {
|
|
|
7093
7094
|
*
|
|
7094
7095
|
* ```
|
|
7095
7096
|
* <script type="module">
|
|
7096
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7097
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7097
7098
|
* Monster.DOM.containsAttributeToken();
|
|
7098
7099
|
* </script>
|
|
7099
7100
|
* ```
|
|
@@ -7102,7 +7103,7 @@ function removeAttributeToken(element, key, token) {
|
|
|
7102
7103
|
*
|
|
7103
7104
|
* ```
|
|
7104
7105
|
* <script type="module">
|
|
7105
|
-
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7106
|
+
* import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7106
7107
|
* containsAttributeToken();
|
|
7107
7108
|
* </script>
|
|
7108
7109
|
* ```
|
|
@@ -7135,7 +7136,7 @@ function containsAttributeToken(element, key, token) {
|
|
|
7135
7136
|
*
|
|
7136
7137
|
* ```
|
|
7137
7138
|
* <script type="module">
|
|
7138
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7139
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7139
7140
|
* Monster.DOM.replaceAttributeToken();
|
|
7140
7141
|
* </script>
|
|
7141
7142
|
* ```
|
|
@@ -7144,7 +7145,7 @@ function containsAttributeToken(element, key, token) {
|
|
|
7144
7145
|
*
|
|
7145
7146
|
* ```
|
|
7146
7147
|
* <script type="module">
|
|
7147
|
-
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7148
|
+
* import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7148
7149
|
* replaceAttributeToken();
|
|
7149
7150
|
* </script>
|
|
7150
7151
|
* ```
|
|
@@ -7180,7 +7181,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
|
7180
7181
|
*
|
|
7181
7182
|
* ```
|
|
7182
7183
|
* <script type="module">
|
|
7183
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7184
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7184
7185
|
* Monster.DOM.clearAttributeTokens();
|
|
7185
7186
|
* </script>
|
|
7186
7187
|
* ```
|
|
@@ -7189,7 +7190,7 @@ function replaceAttributeToken(element, key, from, to) {
|
|
|
7189
7190
|
*
|
|
7190
7191
|
* ```
|
|
7191
7192
|
* <script type="module">
|
|
7192
|
-
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7193
|
+
* import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7193
7194
|
* clearAttributeTokens();
|
|
7194
7195
|
* </script>
|
|
7195
7196
|
* ```
|
|
@@ -7215,11 +7216,29 @@ function clearAttributeTokens(element, key) {
|
|
|
7215
7216
|
return element;
|
|
7216
7217
|
}
|
|
7217
7218
|
/**
|
|
7219
|
+
* This function searches, starting from an `HTMLElemement`, for the next element that has a certain attribute.
|
|
7220
|
+
*
|
|
7221
|
+
* ```html
|
|
7222
|
+
* <div data-my-attribute="2" id="2">
|
|
7223
|
+
* <div id="1"></div>
|
|
7224
|
+
* </div>
|
|
7225
|
+
* ```
|
|
7226
|
+
*
|
|
7227
|
+
* ```javascript
|
|
7228
|
+
* // if no value is specified (undefined), then only the attribute is checked.
|
|
7229
|
+
* findClosestByAttribute(document.getElementById('1'),'data-my-attribute'); // ↦ node with id 2
|
|
7230
|
+
* findClosestByAttribute(document.getElementById('2'),'data-my-attribute'); // ↦ node with id 2
|
|
7231
|
+
*
|
|
7232
|
+
* // if a value is specified, for example an empty string, then the name and the value are checked.
|
|
7233
|
+
* findClosestByAttribute(document.getElementById('1'),'data-my-attribute', ''); // ↦ undefined
|
|
7234
|
+
* findClosestByAttribute(document.getElementById('1'),'data-my-attribute', '2'); // ↦ node with id 2
|
|
7235
|
+
* ```
|
|
7236
|
+
*
|
|
7218
7237
|
* You can call the method via the monster namespace `new Monster.DOM.findClosestByAttribute()`.
|
|
7219
7238
|
*
|
|
7220
7239
|
* ```
|
|
7221
7240
|
* <script type="module">
|
|
7222
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7241
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7223
7242
|
* Monster.DOM.findClosestByAttribute();
|
|
7224
7243
|
* </script>
|
|
7225
7244
|
* ```
|
|
@@ -7228,7 +7247,7 @@ function clearAttributeTokens(element, key) {
|
|
|
7228
7247
|
*
|
|
7229
7248
|
* ```
|
|
7230
7249
|
* <script type="module">
|
|
7231
|
-
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7250
|
+
* import {findClosestByAttribute} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7232
7251
|
* findClosestByAttribute();
|
|
7233
7252
|
* </script>
|
|
7234
7253
|
* ```
|
|
@@ -7240,14 +7259,21 @@ function clearAttributeTokens(element, key) {
|
|
|
7240
7259
|
* @param {string} key
|
|
7241
7260
|
* @param {string|undefined} value
|
|
7242
7261
|
* @return {HTMLElement|undefined}
|
|
7262
|
+
* @summary find closest node
|
|
7243
7263
|
*/
|
|
7244
7264
|
|
|
7245
7265
|
|
|
7246
7266
|
function findClosestByAttribute(element, key, value) {
|
|
7247
7267
|
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateInstance)(element, (0,_types_global_js__WEBPACK_IMPORTED_MODULE_1__.getGlobalFunction)('HTMLElement'));
|
|
7248
7268
|
|
|
7249
|
-
if (element.hasAttribute(key)
|
|
7250
|
-
|
|
7269
|
+
if (element.hasAttribute(key)) {
|
|
7270
|
+
if (value === undefined) {
|
|
7271
|
+
return element;
|
|
7272
|
+
}
|
|
7273
|
+
|
|
7274
|
+
if (element.getAttribute(key) === value) {
|
|
7275
|
+
return element;
|
|
7276
|
+
}
|
|
7251
7277
|
}
|
|
7252
7278
|
|
|
7253
7279
|
var selector = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(key);
|
|
@@ -7258,11 +7284,71 @@ function findClosestByAttribute(element, key, value) {
|
|
|
7258
7284
|
return result;
|
|
7259
7285
|
}
|
|
7260
7286
|
|
|
7287
|
+
return undefined;
|
|
7288
|
+
}
|
|
7289
|
+
/**
|
|
7290
|
+
* This function searches, starting from an `HTMLElemement`, for the next element that has a certain attribute.
|
|
7291
|
+
*
|
|
7292
|
+
* ```html
|
|
7293
|
+
* <div class="myclass" id="2">
|
|
7294
|
+
* <div id="1"></div>
|
|
7295
|
+
* </div>
|
|
7296
|
+
* ```
|
|
7297
|
+
*
|
|
7298
|
+
* ```javascript
|
|
7299
|
+
* // if no value is specified (undefined), then only the attribute is checked.
|
|
7300
|
+
* findClosestByClass(document.getElementById('1'),'myclass'); // ↦ node with id 2
|
|
7301
|
+
* findClosestByClass(document.getElementById('2'),'myclass'); // ↦ node with id 2
|
|
7302
|
+
* ```
|
|
7303
|
+
*
|
|
7304
|
+
* You can call the method via the monster namespace `new Monster.DOM.findClosestByClass()`.
|
|
7305
|
+
*
|
|
7306
|
+
* ```
|
|
7307
|
+
* <script type="module">
|
|
7308
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7309
|
+
* Monster.DOM.findClosestByClass();
|
|
7310
|
+
* </script>
|
|
7311
|
+
* ```
|
|
7312
|
+
*
|
|
7313
|
+
* Alternatively, you can also integrate this function individually.
|
|
7314
|
+
*
|
|
7315
|
+
* ```
|
|
7316
|
+
* <script type="module">
|
|
7317
|
+
* import {findClosestByClass} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/attributes.js';
|
|
7318
|
+
* findClosestByClass();
|
|
7319
|
+
* </script>
|
|
7320
|
+
* ```
|
|
7321
|
+
*
|
|
7322
|
+
* @since 1.27.0
|
|
7323
|
+
* @copyright schukai GmbH
|
|
7324
|
+
* @memberOf Monster.DOM
|
|
7325
|
+
* @param {HTMLElement} element
|
|
7326
|
+
* @param {string} className
|
|
7327
|
+
* @return {HTMLElement|undefined}
|
|
7328
|
+
* @summary find closest node
|
|
7329
|
+
*/
|
|
7330
|
+
|
|
7331
|
+
|
|
7332
|
+
function findClosestByClass(element, className) {
|
|
7333
|
+
var _element$classList;
|
|
7334
|
+
|
|
7335
|
+
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateInstance)(element, (0,_types_global_js__WEBPACK_IMPORTED_MODULE_1__.getGlobalFunction)('HTMLElement'));
|
|
7336
|
+
|
|
7337
|
+
if (element !== null && element !== void 0 && (_element$classList = element.classList) !== null && _element$classList !== void 0 && _element$classList.contains((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(className))) {
|
|
7338
|
+
return element;
|
|
7339
|
+
}
|
|
7340
|
+
|
|
7341
|
+
var result = element.closest('.' + className);
|
|
7342
|
+
|
|
7343
|
+
if (result instanceof HTMLElement) {
|
|
7344
|
+
return result;
|
|
7345
|
+
}
|
|
7346
|
+
|
|
7261
7347
|
return undefined;
|
|
7262
7348
|
} // exports
|
|
7263
7349
|
|
|
7264
7350
|
|
|
7265
|
-
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);
|
|
7351
|
+
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', findClosestByClass, getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);
|
|
7266
7352
|
|
|
7267
7353
|
|
|
7268
7354
|
/***/ }),
|
|
@@ -7320,7 +7406,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7320
7406
|
/* harmony export */ "ATTRIBUTE_DISABLED": function() { return /* binding */ ATTRIBUTE_DISABLED; },
|
|
7321
7407
|
/* harmony export */ "ATTRIBUTE_ERRORMESSAGE": function() { return /* binding */ ATTRIBUTE_ERRORMESSAGE; },
|
|
7322
7408
|
/* harmony export */ "ATTRIBUTE_VALUE": function() { return /* binding */ ATTRIBUTE_VALUE; },
|
|
7323
|
-
/* harmony export */ "objectUpdaterLinkSymbol": function() { return /* binding */ objectUpdaterLinkSymbol; }
|
|
7409
|
+
/* harmony export */ "objectUpdaterLinkSymbol": function() { return /* binding */ objectUpdaterLinkSymbol; },
|
|
7410
|
+
/* harmony export */ "ATTRIBUTE_TEMPLATE_PREFIX": function() { return /* binding */ ATTRIBUTE_TEMPLATE_PREFIX; }
|
|
7324
7411
|
/* harmony export */ });
|
|
7325
7412
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
7326
7413
|
|
|
@@ -7408,6 +7495,13 @@ var ATTRIBUTE_UPDATER_REMOVE = ATTRIBUTE_PREFIX + 'remove';
|
|
|
7408
7495
|
*/
|
|
7409
7496
|
|
|
7410
7497
|
var ATTRIBUTE_UPDATER_BIND = ATTRIBUTE_PREFIX + 'bind';
|
|
7498
|
+
/**
|
|
7499
|
+
* @memberOf Monster.DOM
|
|
7500
|
+
* @type {string}
|
|
7501
|
+
* @since 1.27.0
|
|
7502
|
+
*/
|
|
7503
|
+
|
|
7504
|
+
var ATTRIBUTE_TEMPLATE_PREFIX = ATTRIBUTE_PREFIX + 'template-prefix';
|
|
7411
7505
|
/**
|
|
7412
7506
|
* @memberOf Monster.DOM
|
|
7413
7507
|
* @type {string}
|
|
@@ -7746,7 +7840,7 @@ var attachedInternalSymbol = Symbol('attachedInternal');
|
|
|
7746
7840
|
*
|
|
7747
7841
|
* ```
|
|
7748
7842
|
* <script type="module">
|
|
7749
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
7843
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
7750
7844
|
* document.createElement('monster-')
|
|
7751
7845
|
* </script>
|
|
7752
7846
|
* ```
|
|
@@ -8281,7 +8375,7 @@ var attributeObserverSymbol = Symbol('attributeObserver');
|
|
|
8281
8375
|
*
|
|
8282
8376
|
* ```
|
|
8283
8377
|
* <script type="module">
|
|
8284
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
8378
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
8285
8379
|
* document.createElement('monster-')
|
|
8286
8380
|
* </script>
|
|
8287
8381
|
* ```
|
|
@@ -9147,7 +9241,7 @@ var internal = Symbol('internal');
|
|
|
9147
9241
|
*
|
|
9148
9242
|
* ```
|
|
9149
9243
|
* <script type="module">
|
|
9150
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9244
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9151
9245
|
* new Monster.Types.DataUrl()
|
|
9152
9246
|
* </script>
|
|
9153
9247
|
* ```
|
|
@@ -9156,7 +9250,7 @@ var internal = Symbol('internal');
|
|
|
9156
9250
|
*
|
|
9157
9251
|
* ```
|
|
9158
9252
|
* <script type="module">
|
|
9159
|
-
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9253
|
+
* import {DataUrl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/dataurl.js';
|
|
9160
9254
|
* new DataUrl()
|
|
9161
9255
|
* </script>
|
|
9162
9256
|
* ```
|
|
@@ -9236,7 +9330,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
|
9236
9330
|
*
|
|
9237
9331
|
* ```
|
|
9238
9332
|
* <script type="module">
|
|
9239
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9333
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9240
9334
|
* console.log(Monster.Types.parseDataURL())
|
|
9241
9335
|
* </script>
|
|
9242
9336
|
* ```
|
|
@@ -9245,7 +9339,7 @@ var DataUrl = /*#__PURE__*/function (_Base) {
|
|
|
9245
9339
|
*
|
|
9246
9340
|
* ```
|
|
9247
9341
|
* <script type="module">
|
|
9248
|
-
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9342
|
+
* import {parseDataURL} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/dataurl.js';
|
|
9249
9343
|
* console.log(parseDataURL())
|
|
9250
9344
|
* </script>
|
|
9251
9345
|
* ```
|
|
@@ -9383,7 +9477,7 @@ var internal = Symbol('internal');
|
|
|
9383
9477
|
*
|
|
9384
9478
|
* ```
|
|
9385
9479
|
* <script type="module">
|
|
9386
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9480
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9387
9481
|
* console.log(new Monster.Types.MediaType())
|
|
9388
9482
|
* </script>
|
|
9389
9483
|
* ```
|
|
@@ -9392,7 +9486,7 @@ var internal = Symbol('internal');
|
|
|
9392
9486
|
*
|
|
9393
9487
|
* ```
|
|
9394
9488
|
* <script type="module">
|
|
9395
|
-
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9489
|
+
* import {MediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/mediatype.js';
|
|
9396
9490
|
* console.log(new MediaType())
|
|
9397
9491
|
* </script>
|
|
9398
9492
|
* ```
|
|
@@ -9510,7 +9604,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
|
9510
9604
|
*
|
|
9511
9605
|
* ```
|
|
9512
9606
|
* <script type="module">
|
|
9513
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9607
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9514
9608
|
* console.log(Monster.Types.parseMediaType())
|
|
9515
9609
|
* </script>
|
|
9516
9610
|
* ```
|
|
@@ -9519,7 +9613,7 @@ var MediaType = /*#__PURE__*/function (_Base) {
|
|
|
9519
9613
|
*
|
|
9520
9614
|
* ```
|
|
9521
9615
|
* <script type="module">
|
|
9522
|
-
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9616
|
+
* import {parseMediaType} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/dataurl.js';
|
|
9523
9617
|
* console.log(parseMediaType())
|
|
9524
9618
|
* </script>
|
|
9525
9619
|
* ```
|
|
@@ -9618,7 +9712,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9618
9712
|
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
9619
9713
|
/* harmony import */ var _types_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
|
|
9620
9714
|
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
|
|
9621
|
-
/* harmony import */ var
|
|
9715
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33);
|
|
9716
|
+
/* harmony import */ var _theme_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39);
|
|
9622
9717
|
|
|
9623
9718
|
/**
|
|
9624
9719
|
* @author schukai GmbH
|
|
@@ -9651,12 +9746,13 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9651
9746
|
|
|
9652
9747
|
|
|
9653
9748
|
|
|
9749
|
+
|
|
9654
9750
|
/**
|
|
9655
9751
|
* you can call the method via the monster namespace `new Monster.DOM.Template()`.
|
|
9656
9752
|
*
|
|
9657
9753
|
* ```
|
|
9658
9754
|
* <script type="module">
|
|
9659
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9755
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9660
9756
|
* new Monster.DOM.Template()
|
|
9661
9757
|
* </script>
|
|
9662
9758
|
* ```
|
|
@@ -9665,7 +9761,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9665
9761
|
*
|
|
9666
9762
|
* ```
|
|
9667
9763
|
* <script type="module">
|
|
9668
|
-
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9764
|
+
* import {Template} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/template.js';
|
|
9669
9765
|
* new Template()
|
|
9670
9766
|
* </script>
|
|
9671
9767
|
* ```
|
|
@@ -9743,7 +9839,7 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
|
9743
9839
|
*
|
|
9744
9840
|
* ```
|
|
9745
9841
|
* <script type="module">
|
|
9746
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9842
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9747
9843
|
* Monster.DOM.findDocumentTemplate()
|
|
9748
9844
|
* </script>
|
|
9749
9845
|
* ```
|
|
@@ -9752,14 +9848,14 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
|
9752
9848
|
*
|
|
9753
9849
|
* ```
|
|
9754
9850
|
* <script type="module">
|
|
9755
|
-
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9851
|
+
* import {findTemplate} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/template.js';
|
|
9756
9852
|
* findDocumentTemplate()
|
|
9757
9853
|
* </script>
|
|
9758
9854
|
* ```
|
|
9759
9855
|
*
|
|
9760
9856
|
* @example
|
|
9761
9857
|
*
|
|
9762
|
-
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
9858
|
+
* import { findDocumentTemplate } from "https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/template.js";
|
|
9763
9859
|
*
|
|
9764
9860
|
* const template = document.createElement("template");
|
|
9765
9861
|
* template.id = "myTemplate";
|
|
@@ -9800,9 +9896,18 @@ var Template = /*#__PURE__*/function (_Base) {
|
|
|
9800
9896
|
|
|
9801
9897
|
function findDocumentTemplate(id, currentNode) {
|
|
9802
9898
|
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_3__.validateString)(id);
|
|
9899
|
+
var document = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalObject)('document');
|
|
9900
|
+
var HTMLTemplateElement = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('HTMLTemplateElement');
|
|
9901
|
+
var DocumentFragment = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('DocumentFragment');
|
|
9902
|
+
var Document = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('Document');
|
|
9903
|
+
var prefixID;
|
|
9803
9904
|
|
|
9804
9905
|
if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {
|
|
9805
9906
|
if (currentNode instanceof Node) {
|
|
9907
|
+
if (currentNode.hasAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_TEMPLATE_PREFIX)) {
|
|
9908
|
+
prefixID = currentNode.getAttribute(_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_TEMPLATE_PREFIX);
|
|
9909
|
+
}
|
|
9910
|
+
|
|
9806
9911
|
currentNode = currentNode.getRootNode();
|
|
9807
9912
|
|
|
9808
9913
|
if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {
|
|
@@ -9811,22 +9916,40 @@ function findDocumentTemplate(id, currentNode) {
|
|
|
9811
9916
|
}
|
|
9812
9917
|
|
|
9813
9918
|
if (!(currentNode instanceof Document || currentNode instanceof DocumentFragment)) {
|
|
9814
|
-
currentNode =
|
|
9919
|
+
currentNode = document;
|
|
9920
|
+
}
|
|
9921
|
+
}
|
|
9922
|
+
|
|
9923
|
+
var template;
|
|
9924
|
+
var theme = (0,_theme_js__WEBPACK_IMPORTED_MODULE_5__.getDocumentTheme)();
|
|
9925
|
+
|
|
9926
|
+
if (prefixID) {
|
|
9927
|
+
var themedPrefixID = prefixID + '-' + id + '-' + theme.getName(); // current + themedPrefixID
|
|
9928
|
+
|
|
9929
|
+
template = currentNode.getElementById(themedPrefixID);
|
|
9930
|
+
|
|
9931
|
+
if (template instanceof HTMLTemplateElement) {
|
|
9932
|
+
return new Template(template);
|
|
9933
|
+
} // document + themedPrefixID
|
|
9934
|
+
|
|
9935
|
+
|
|
9936
|
+
template = document.getElementById(themedPrefixID);
|
|
9937
|
+
|
|
9938
|
+
if (template instanceof HTMLTemplateElement) {
|
|
9939
|
+
return new Template(template);
|
|
9815
9940
|
}
|
|
9816
9941
|
}
|
|
9817
9942
|
|
|
9818
|
-
var HTMLTemplateElement = (0,_types_global_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalFunction)('HTMLTemplateElement');
|
|
9819
|
-
var theme = (0,_theme_js__WEBPACK_IMPORTED_MODULE_4__.getDocumentTheme)();
|
|
9820
9943
|
var themedID = id + '-' + theme.getName(); // current + themedID
|
|
9821
9944
|
|
|
9822
|
-
|
|
9945
|
+
template = currentNode.getElementById(themedID);
|
|
9823
9946
|
|
|
9824
9947
|
if (template instanceof HTMLTemplateElement) {
|
|
9825
9948
|
return new Template(template);
|
|
9826
9949
|
} // document + themedID
|
|
9827
9950
|
|
|
9828
9951
|
|
|
9829
|
-
template =
|
|
9952
|
+
template = document.getElementById(themedID);
|
|
9830
9953
|
|
|
9831
9954
|
if (template instanceof HTMLTemplateElement) {
|
|
9832
9955
|
return new Template(template);
|
|
@@ -9840,7 +9963,7 @@ function findDocumentTemplate(id, currentNode) {
|
|
|
9840
9963
|
} // document + ID
|
|
9841
9964
|
|
|
9842
9965
|
|
|
9843
|
-
template =
|
|
9966
|
+
template = document.getElementById(id);
|
|
9844
9967
|
|
|
9845
9968
|
if (template instanceof HTMLTemplateElement) {
|
|
9846
9969
|
return new Template(template);
|
|
@@ -9904,7 +10027,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9904
10027
|
*
|
|
9905
10028
|
* ```
|
|
9906
10029
|
* <script type="module">
|
|
9907
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
10030
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
9908
10031
|
* console.log(new Monster.DOM.Theme())
|
|
9909
10032
|
* </script>
|
|
9910
10033
|
* ```
|
|
@@ -9913,14 +10036,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9913
10036
|
*
|
|
9914
10037
|
* ```
|
|
9915
10038
|
* <script type="module">
|
|
9916
|
-
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
10039
|
+
* import {Theme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/theme.js';
|
|
9917
10040
|
* console.log(new Theme())
|
|
9918
10041
|
* </script>
|
|
9919
10042
|
* ```
|
|
9920
10043
|
*
|
|
9921
10044
|
* @example
|
|
9922
10045
|
*
|
|
9923
|
-
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
10046
|
+
* import {getDocumentTheme} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/theme.js';
|
|
9924
10047
|
*
|
|
9925
10048
|
* const theme = getDocumentTheme();
|
|
9926
10049
|
* console.log(theme.getName());
|
|
@@ -10010,23 +10133,25 @@ function getDocumentTheme() {
|
|
|
10010
10133
|
|
|
10011
10134
|
__webpack_require__.r(__webpack_exports__);
|
|
10012
10135
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10013
|
-
/* harmony export */ "Monster": function() { return /* reexport safe */
|
|
10136
|
+
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_5__.Monster; },
|
|
10014
10137
|
/* harmony export */ "Updater": function() { return /* binding */ Updater; }
|
|
10015
10138
|
/* harmony export */ });
|
|
10016
|
-
/* harmony import */ var
|
|
10017
|
-
/* harmony import */ var
|
|
10018
|
-
/* harmony import */ var
|
|
10019
|
-
/* harmony import */ var
|
|
10020
|
-
/* harmony import */ var
|
|
10021
|
-
/* harmony import */ var
|
|
10022
|
-
/* harmony import */ var
|
|
10023
|
-
/* harmony import */ var
|
|
10024
|
-
/* harmony import */ var
|
|
10025
|
-
/* harmony import */ var
|
|
10026
|
-
/* harmony import */ var
|
|
10027
|
-
/* harmony import */ var
|
|
10028
|
-
/* harmony import */ var
|
|
10029
|
-
/* harmony import */ var
|
|
10139
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
10140
|
+
/* harmony import */ var _data_diff_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
|
|
10141
|
+
/* harmony import */ var _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
10142
|
+
/* harmony import */ var _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22);
|
|
10143
|
+
/* harmony import */ var _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33);
|
|
10144
|
+
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
|
|
10145
|
+
/* harmony import */ var _types_base_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
|
|
10146
|
+
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9);
|
|
10147
|
+
/* harmony import */ var _types_observer_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(27);
|
|
10148
|
+
/* harmony import */ var _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
|
|
10149
|
+
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(14);
|
|
10150
|
+
/* harmony import */ var _util_clone_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(15);
|
|
10151
|
+
/* harmony import */ var _util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(41);
|
|
10152
|
+
/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(42);
|
|
10153
|
+
/* harmony import */ var _template_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(38);
|
|
10154
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43);
|
|
10030
10155
|
|
|
10031
10156
|
/**
|
|
10032
10157
|
* @author schukai GmbH
|
|
@@ -10090,6 +10215,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
10090
10215
|
|
|
10091
10216
|
|
|
10092
10217
|
|
|
10218
|
+
|
|
10219
|
+
|
|
10093
10220
|
/**
|
|
10094
10221
|
* The updater class connects an object with the dom. In this way, structures and contents in the DOM can be programmatically adapted via attributes.
|
|
10095
10222
|
*
|
|
@@ -10100,7 +10227,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
10100
10227
|
*
|
|
10101
10228
|
* ```
|
|
10102
10229
|
* <script type="module">
|
|
10103
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
10230
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
10104
10231
|
* new Monster.DOM.Updater()
|
|
10105
10232
|
* </script>
|
|
10106
10233
|
* ```
|
|
@@ -10109,14 +10236,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
10109
10236
|
*
|
|
10110
10237
|
* ```
|
|
10111
10238
|
* <script type="module">
|
|
10112
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
10239
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/updater.js';
|
|
10113
10240
|
* new Updater()
|
|
10114
10241
|
* </script>
|
|
10115
10242
|
* ```
|
|
10116
10243
|
*
|
|
10117
10244
|
* @example
|
|
10118
10245
|
*
|
|
10119
|
-
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
10246
|
+
* import {Updater} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/updater.js';
|
|
10120
10247
|
*
|
|
10121
10248
|
* // First we prepare the html document.
|
|
10122
10249
|
* // This is done here via script, but can also be inserted into the document as pure html.
|
|
@@ -10130,7 +10257,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
10130
10257
|
* let obj = {
|
|
10131
10258
|
* headline: "Hello World",
|
|
10132
10259
|
* };
|
|
10133
|
-
*
|
|
10260
|
+
*
|
|
10134
10261
|
* // Now comes the real magic. we pass the updater the parent HTMLElement
|
|
10135
10262
|
* // and the desired data structure.
|
|
10136
10263
|
* const updater = new Updater(body, obj);
|
|
@@ -10175,28 +10302,27 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10175
10302
|
* @type {HTMLElement}
|
|
10176
10303
|
*/
|
|
10177
10304
|
|
|
10178
|
-
_this.element = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_9__.validateInstance)(element, HTMLElement);
|
|
10179
10305
|
if (subject === undefined) subject = {};
|
|
10180
|
-
var a = subject;
|
|
10181
10306
|
|
|
10182
|
-
if (!(0,
|
|
10183
|
-
subject = new
|
|
10307
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isInstance)(subject, _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_9__.ProxyObserver)) {
|
|
10308
|
+
subject = new _types_proxyobserver_js__WEBPACK_IMPORTED_MODULE_9__.ProxyObserver(subject);
|
|
10184
10309
|
}
|
|
10185
10310
|
|
|
10186
|
-
_this.
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
|
|
10191
|
-
|
|
10192
|
-
|
|
10311
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol] = {
|
|
10312
|
+
element: (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_10__.validateInstance)(element, HTMLElement),
|
|
10313
|
+
last: {},
|
|
10314
|
+
callbacks: new Map(),
|
|
10315
|
+
eventTypes: ['keyup', 'click', 'change', 'drop', 'touchend', 'input'],
|
|
10316
|
+
subject: subject
|
|
10317
|
+
};
|
|
10193
10318
|
|
|
10319
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.set('checkstate', getCheckStateCallback.call(_assertThisInitialized(_this)));
|
|
10194
10320
|
|
|
10195
|
-
_this.subject
|
|
10196
|
-
var s = _this.subject.getRealSubject();
|
|
10321
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.attachObserver(new _types_observer_js__WEBPACK_IMPORTED_MODULE_8__.Observer(function () {
|
|
10322
|
+
var s = _this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
|
|
10197
10323
|
|
|
10198
|
-
var diffResult = (0,
|
|
10199
|
-
_this.last = (0,
|
|
10324
|
+
var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_1__.diff)(_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].last, s);
|
|
10325
|
+
_this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].last = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(s);
|
|
10200
10326
|
|
|
10201
10327
|
for (var _i = 0, _Object$entries = Object.entries(diffResult); _i < _Object$entries.length; _i++) {
|
|
10202
10328
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
@@ -10208,7 +10334,7 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10208
10334
|
updateAttributes.call(_assertThisInitialized(_this), change);
|
|
10209
10335
|
}
|
|
10210
10336
|
}));
|
|
10211
|
-
|
|
10337
|
+
|
|
10212
10338
|
return _this;
|
|
10213
10339
|
}
|
|
10214
10340
|
/**
|
|
@@ -10224,7 +10350,7 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10224
10350
|
_createClass(Updater, [{
|
|
10225
10351
|
key: "setEventTypes",
|
|
10226
10352
|
value: function setEventTypes(types) {
|
|
10227
|
-
this.eventTypes = (0,
|
|
10353
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].eventTypes = (0,_types_validate_js__WEBPACK_IMPORTED_MODULE_10__.validateArray)(types);
|
|
10228
10354
|
return this;
|
|
10229
10355
|
}
|
|
10230
10356
|
/**
|
|
@@ -10238,6 +10364,7 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10238
10364
|
*
|
|
10239
10365
|
* @since 1.9.0
|
|
10240
10366
|
* @return {Updater}
|
|
10367
|
+
* @throws {Error} the bind argument must start as a value with a path
|
|
10241
10368
|
*/
|
|
10242
10369
|
|
|
10243
10370
|
}, {
|
|
@@ -10245,13 +10372,17 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10245
10372
|
value: function enableEventProcessing() {
|
|
10246
10373
|
this.disableEventProcessing();
|
|
10247
10374
|
|
|
10248
|
-
var _iterator = _createForOfIteratorHelper(this.eventTypes),
|
|
10375
|
+
var _iterator = _createForOfIteratorHelper(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].eventTypes),
|
|
10249
10376
|
_step;
|
|
10250
10377
|
|
|
10251
10378
|
try {
|
|
10252
10379
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
10253
10380
|
var type = _step.value;
|
|
10254
|
-
|
|
10381
|
+
// @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
|
|
10382
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.addEventListener(type, getControlEventHandler.call(this), {
|
|
10383
|
+
capture: true,
|
|
10384
|
+
passive: true
|
|
10385
|
+
});
|
|
10255
10386
|
}
|
|
10256
10387
|
} catch (err) {
|
|
10257
10388
|
_iterator.e(err);
|
|
@@ -10271,13 +10402,13 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10271
10402
|
}, {
|
|
10272
10403
|
key: "disableEventProcessing",
|
|
10273
10404
|
value: function disableEventProcessing() {
|
|
10274
|
-
var _iterator2 = _createForOfIteratorHelper(this.eventTypes),
|
|
10405
|
+
var _iterator2 = _createForOfIteratorHelper(this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].eventTypes),
|
|
10275
10406
|
_step2;
|
|
10276
10407
|
|
|
10277
10408
|
try {
|
|
10278
10409
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
10279
10410
|
var type = _step2.value;
|
|
10280
|
-
this.element.removeEventListener(type, getControlEventHandler.call(this));
|
|
10411
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.removeEventListener(type, getControlEventHandler.call(this));
|
|
10281
10412
|
}
|
|
10282
10413
|
} catch (err) {
|
|
10283
10414
|
_iterator2.e(err);
|
|
@@ -10306,10 +10437,23 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10306
10437
|
value: function run() {
|
|
10307
10438
|
// the key __init__has no further meaning and is only
|
|
10308
10439
|
// used to create the diff for empty objects.
|
|
10309
|
-
this.last = {
|
|
10440
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].last = {
|
|
10310
10441
|
'__init__': true
|
|
10311
10442
|
};
|
|
10312
|
-
return this.subject.notifyObservers();
|
|
10443
|
+
return this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.notifyObservers();
|
|
10444
|
+
}
|
|
10445
|
+
/**
|
|
10446
|
+
* Gets the values of bound elements and changes them in subject
|
|
10447
|
+
*
|
|
10448
|
+
* @since 1.27.0
|
|
10449
|
+
* @return {Monster.DOM.Updater}
|
|
10450
|
+
*/
|
|
10451
|
+
|
|
10452
|
+
}, {
|
|
10453
|
+
key: "retrieve",
|
|
10454
|
+
value: function retrieve() {
|
|
10455
|
+
retrieveFromBindings.call(this);
|
|
10456
|
+
return this;
|
|
10313
10457
|
}
|
|
10314
10458
|
/**
|
|
10315
10459
|
* If you have passed a ProxyObserver in the constructor, you will get the object that the ProxyObserver manages here.
|
|
@@ -10324,7 +10468,7 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10324
10468
|
}, {
|
|
10325
10469
|
key: "getSubject",
|
|
10326
10470
|
value: function getSubject() {
|
|
10327
|
-
return this.subject.getSubject();
|
|
10471
|
+
return this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getSubject();
|
|
10328
10472
|
}
|
|
10329
10473
|
/**
|
|
10330
10474
|
* This method can be used to register commands that can be called via call: instruction.
|
|
@@ -10340,13 +10484,13 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10340
10484
|
}, {
|
|
10341
10485
|
key: "setCallback",
|
|
10342
10486
|
value: function setCallback(name, callback) {
|
|
10343
|
-
this.callbacks.set(name, callback);
|
|
10487
|
+
this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.set(name, callback);
|
|
10344
10488
|
return this;
|
|
10345
10489
|
}
|
|
10346
10490
|
}]);
|
|
10347
10491
|
|
|
10348
10492
|
return Updater;
|
|
10349
|
-
}(
|
|
10493
|
+
}(_types_base_js__WEBPACK_IMPORTED_MODULE_6__.Base);
|
|
10350
10494
|
/**
|
|
10351
10495
|
* @private
|
|
10352
10496
|
* @since 1.9.0
|
|
@@ -10358,12 +10502,13 @@ var Updater = /*#__PURE__*/function (_Base) {
|
|
|
10358
10502
|
function getCheckStateCallback() {
|
|
10359
10503
|
var self = this;
|
|
10360
10504
|
return function (current) {
|
|
10505
|
+
// this is a reference to the current object (therefore no array function here)
|
|
10361
10506
|
if (this instanceof HTMLInputElement) {
|
|
10362
10507
|
if (['radio', 'checkbox'].indexOf(this.type) !== -1) {
|
|
10363
10508
|
return this.value + "" === current + "" ? 'true' : undefined;
|
|
10364
10509
|
}
|
|
10365
10510
|
} else if (this instanceof HTMLOptionElement) {
|
|
10366
|
-
if ((0,
|
|
10511
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(current) && current.indexOf(this.value) !== -1) {
|
|
10367
10512
|
return 'true';
|
|
10368
10513
|
}
|
|
10369
10514
|
|
|
@@ -10381,6 +10526,7 @@ var symbol = Symbol('EventHandler');
|
|
|
10381
10526
|
* @private
|
|
10382
10527
|
* @return {function}
|
|
10383
10528
|
* @this Updater
|
|
10529
|
+
* @throws {Error} the bind argument must start as a value with a path
|
|
10384
10530
|
*/
|
|
10385
10531
|
|
|
10386
10532
|
function getControlEventHandler() {
|
|
@@ -10389,97 +10535,112 @@ function getControlEventHandler() {
|
|
|
10389
10535
|
if (self[symbol]) {
|
|
10390
10536
|
return self[symbol];
|
|
10391
10537
|
}
|
|
10392
|
-
|
|
10393
|
-
var pathfinder = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_1__.Pathfinder(this.subject.getSubject());
|
|
10394
10538
|
/**
|
|
10395
10539
|
* @throws {Error} the bind argument must start as a value with a path.
|
|
10396
10540
|
* @throws {Error} unsupported object
|
|
10397
10541
|
* @param {Event} event
|
|
10398
10542
|
*/
|
|
10399
10543
|
|
|
10400
|
-
self[symbol] = function (event) {
|
|
10401
|
-
var _element$constructor, _Object$getOwnPropert;
|
|
10402
10544
|
|
|
10403
|
-
|
|
10545
|
+
self[symbol] = function (event) {
|
|
10546
|
+
var element = (0,_events_js__WEBPACK_IMPORTED_MODULE_13__.findTargetElementFromEvent)(event, _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND);
|
|
10404
10547
|
|
|
10405
|
-
if (
|
|
10548
|
+
if (element === undefined) {
|
|
10406
10549
|
return;
|
|
10407
10550
|
}
|
|
10408
10551
|
|
|
10409
|
-
|
|
10552
|
+
retrieveAndSetValue.call(self, element);
|
|
10553
|
+
};
|
|
10410
10554
|
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10555
|
+
return self[symbol];
|
|
10556
|
+
}
|
|
10557
|
+
/**
|
|
10558
|
+
* @throws {Error} the bind argument must start as a value with a path
|
|
10559
|
+
* @param {HTMLElement} element
|
|
10560
|
+
* @return void
|
|
10561
|
+
*/
|
|
10414
10562
|
|
|
10415
|
-
path = path.substr(5);
|
|
10416
|
-
var value;
|
|
10417
10563
|
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
case 'checkbox':
|
|
10421
|
-
value = element.checked ? element.value : undefined;
|
|
10422
|
-
break;
|
|
10564
|
+
function retrieveAndSetValue(element) {
|
|
10565
|
+
var _element$constructor, _Object$getOwnPropert;
|
|
10423
10566
|
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
}
|
|
10428
|
-
} else if (element instanceof HTMLTextAreaElement) {
|
|
10429
|
-
value = element.value;
|
|
10430
|
-
} else if (element instanceof HTMLSelectElement) {
|
|
10431
|
-
switch (element.type) {
|
|
10432
|
-
case 'select-one':
|
|
10433
|
-
value = element.value;
|
|
10434
|
-
break;
|
|
10435
|
-
|
|
10436
|
-
case 'select-multiple':
|
|
10437
|
-
value = element.value;
|
|
10438
|
-
var options = element === null || element === void 0 ? void 0 : element.selectedOptions;
|
|
10439
|
-
if (options === undefined) options = element.querySelectorAll(":scope option:checked");
|
|
10440
|
-
value = Array.from(options).map(function (_ref) {
|
|
10441
|
-
var value = _ref.value;
|
|
10442
|
-
return value;
|
|
10443
|
-
});
|
|
10444
|
-
break;
|
|
10445
|
-
} // values from customelements
|
|
10567
|
+
var self = this;
|
|
10568
|
+
var pathfinder = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getSubject());
|
|
10569
|
+
var path = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND);
|
|
10446
10570
|
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
throw new Error("unsupported object");
|
|
10451
|
-
}
|
|
10571
|
+
if (path.indexOf('path:') !== 0) {
|
|
10572
|
+
throw new Error('the bind argument must start as a value with a path');
|
|
10573
|
+
}
|
|
10452
10574
|
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
pf.setVia(path, value);
|
|
10456
|
-
var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_0__.diff)(copy, self.subject.getRealSubject());
|
|
10575
|
+
path = path.substr(5);
|
|
10576
|
+
var value;
|
|
10457
10577
|
|
|
10458
|
-
|
|
10459
|
-
|
|
10578
|
+
if (element instanceof HTMLInputElement) {
|
|
10579
|
+
switch (element.type) {
|
|
10580
|
+
case 'checkbox':
|
|
10581
|
+
value = element.checked ? element.value : undefined;
|
|
10582
|
+
break;
|
|
10583
|
+
|
|
10584
|
+
default:
|
|
10585
|
+
value = element.value;
|
|
10586
|
+
break;
|
|
10460
10587
|
}
|
|
10461
|
-
}
|
|
10588
|
+
} else if (element instanceof HTMLTextAreaElement) {
|
|
10589
|
+
value = element.value;
|
|
10590
|
+
} else if (element instanceof HTMLSelectElement) {
|
|
10591
|
+
switch (element.type) {
|
|
10592
|
+
case 'select-one':
|
|
10593
|
+
value = element.value;
|
|
10594
|
+
break;
|
|
10462
10595
|
|
|
10463
|
-
|
|
10596
|
+
case 'select-multiple':
|
|
10597
|
+
value = element.value;
|
|
10598
|
+
var options = element === null || element === void 0 ? void 0 : element.selectedOptions;
|
|
10599
|
+
if (options === undefined) options = element.querySelectorAll(":scope option:checked");
|
|
10600
|
+
value = Array.from(options).map(function (_ref) {
|
|
10601
|
+
var value = _ref.value;
|
|
10602
|
+
return value;
|
|
10603
|
+
});
|
|
10604
|
+
break;
|
|
10605
|
+
} // values from customelements
|
|
10606
|
+
|
|
10607
|
+
} else if (element !== null && element !== void 0 && (_element$constructor = element.constructor) !== null && _element$constructor !== void 0 && _element$constructor.prototype && !!((_Object$getOwnPropert = Object.getOwnPropertyDescriptor(element.constructor.prototype, 'value')) !== null && _Object$getOwnPropert !== void 0 && _Object$getOwnPropert['get']) || element.hasOwnProperty('value')) {
|
|
10608
|
+
value = element === null || element === void 0 ? void 0 : element['value'];
|
|
10609
|
+
} else {
|
|
10610
|
+
throw new Error("unsupported object");
|
|
10611
|
+
}
|
|
10612
|
+
|
|
10613
|
+
var copy = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject());
|
|
10614
|
+
var pf = new _data_pathfinder_js__WEBPACK_IMPORTED_MODULE_2__.Pathfinder(copy);
|
|
10615
|
+
pf.setVia(path, value);
|
|
10616
|
+
var diffResult = (0,_data_diff_js__WEBPACK_IMPORTED_MODULE_1__.diff)(copy, self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject());
|
|
10617
|
+
|
|
10618
|
+
if (diffResult.length > 0) {
|
|
10619
|
+
pathfinder.setVia(path, value);
|
|
10620
|
+
}
|
|
10464
10621
|
}
|
|
10465
10622
|
/**
|
|
10466
|
-
* @
|
|
10467
|
-
* @
|
|
10468
|
-
* @param {object} change
|
|
10469
|
-
* @return {void}
|
|
10623
|
+
* @since 1.27.0
|
|
10624
|
+
* @return void
|
|
10470
10625
|
*/
|
|
10471
10626
|
|
|
10472
10627
|
|
|
10473
|
-
function
|
|
10474
|
-
var
|
|
10628
|
+
function retrieveFromBindings() {
|
|
10629
|
+
var self = this;
|
|
10630
|
+
|
|
10631
|
+
if (self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.matches('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND + ']')) {
|
|
10632
|
+
retrieveAndSetValue.call(self, element);
|
|
10633
|
+
}
|
|
10634
|
+
|
|
10635
|
+
var _iterator3 = _createForOfIteratorHelper(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_BIND + ']').entries()),
|
|
10475
10636
|
_step3;
|
|
10476
10637
|
|
|
10477
10638
|
try {
|
|
10478
10639
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
10479
10640
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
10480
|
-
|
|
10641
|
+
_element = _step3$value[1];
|
|
10481
10642
|
|
|
10482
|
-
|
|
10643
|
+
retrieveAndSetValue.call(self, _element);
|
|
10483
10644
|
}
|
|
10484
10645
|
} catch (err) {
|
|
10485
10646
|
_iterator3.e(err);
|
|
@@ -10487,6 +10648,33 @@ function removeElement(change) {
|
|
|
10487
10648
|
_iterator3.f();
|
|
10488
10649
|
}
|
|
10489
10650
|
}
|
|
10651
|
+
/**
|
|
10652
|
+
* @private
|
|
10653
|
+
* @since 1.8.0
|
|
10654
|
+
* @param {object} change
|
|
10655
|
+
* @return {void}
|
|
10656
|
+
*/
|
|
10657
|
+
|
|
10658
|
+
|
|
10659
|
+
function removeElement(change) {
|
|
10660
|
+
var self = this;
|
|
10661
|
+
|
|
10662
|
+
var _iterator4 = _createForOfIteratorHelper(self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll(':scope [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REMOVE + ']').entries()),
|
|
10663
|
+
_step4;
|
|
10664
|
+
|
|
10665
|
+
try {
|
|
10666
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
10667
|
+
var _step4$value = _slicedToArray(_step4.value, 2),
|
|
10668
|
+
_element2 = _step4$value[1];
|
|
10669
|
+
|
|
10670
|
+
_element2.parentNode.removeChild(_element2);
|
|
10671
|
+
}
|
|
10672
|
+
} catch (err) {
|
|
10673
|
+
_iterator4.e(err);
|
|
10674
|
+
} finally {
|
|
10675
|
+
_iterator4.f();
|
|
10676
|
+
}
|
|
10677
|
+
}
|
|
10490
10678
|
/**
|
|
10491
10679
|
* @private
|
|
10492
10680
|
* @since 1.8.0
|
|
@@ -10504,56 +10692,56 @@ function insertElement(change) {
|
|
|
10504
10692
|
var _this2 = this;
|
|
10505
10693
|
|
|
10506
10694
|
var self = this;
|
|
10507
|
-
var subject = self.subject.getRealSubject();
|
|
10508
|
-
var document = (0,
|
|
10695
|
+
var subject = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
|
|
10696
|
+
var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_15__.getDocument)();
|
|
10509
10697
|
var mem = new WeakSet();
|
|
10510
10698
|
var wd = 0;
|
|
10511
10699
|
|
|
10512
10700
|
while (true) {
|
|
10513
10701
|
var found = false;
|
|
10514
10702
|
wd++;
|
|
10515
|
-
var p = (0,
|
|
10516
|
-
if (!(0,
|
|
10703
|
+
var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
|
|
10704
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(p)) return this;
|
|
10517
10705
|
|
|
10518
10706
|
while (p.length > 0) {
|
|
10519
10707
|
var current = p.join('.');
|
|
10520
|
-
var list = this.element.querySelectorAll(':scope [' +
|
|
10708
|
+
var list = this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll(':scope [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT + '*="path:' + current + '"]').entries();
|
|
10521
10709
|
|
|
10522
|
-
var
|
|
10523
|
-
|
|
10710
|
+
var _iterator5 = _createForOfIteratorHelper(list),
|
|
10711
|
+
_step5;
|
|
10524
10712
|
|
|
10525
10713
|
try {
|
|
10526
10714
|
var _loop = function _loop() {
|
|
10527
|
-
var
|
|
10528
|
-
containerElement =
|
|
10715
|
+
var _step5$value = _slicedToArray(_step5.value, 2),
|
|
10716
|
+
containerElement = _step5$value[1];
|
|
10529
10717
|
|
|
10530
10718
|
if (mem.has(containerElement)) return "continue";
|
|
10531
10719
|
mem.add(containerElement);
|
|
10532
10720
|
found = true;
|
|
10533
|
-
var attributes = containerElement.getAttribute(
|
|
10534
|
-
var def = (0,
|
|
10721
|
+
var attributes = containerElement.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT);
|
|
10722
|
+
var def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
|
|
10535
10723
|
var i = def.indexOf(' ');
|
|
10536
|
-
var key = (0,
|
|
10724
|
+
var key = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(0, i));
|
|
10537
10725
|
var refPrefix = key + '-';
|
|
10538
|
-
var cmd = (0,
|
|
10726
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(i)); // this case is actually excluded by the query but is nevertheless checked again here
|
|
10539
10727
|
|
|
10540
10728
|
if (cmd.indexOf('|') > 0) {
|
|
10541
10729
|
throw new Error("pipes are not allowed when cloning a node.");
|
|
10542
10730
|
}
|
|
10543
10731
|
|
|
10544
|
-
var pipe = new
|
|
10732
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
|
10545
10733
|
|
|
10546
|
-
_this2.callbacks.forEach(function (f, n) {
|
|
10734
|
+
_this2[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
|
10547
10735
|
pipe.setCallback(n, f);
|
|
10548
10736
|
});
|
|
10549
10737
|
|
|
10550
10738
|
var value = void 0;
|
|
10551
10739
|
|
|
10552
10740
|
try {
|
|
10553
|
-
containerElement.removeAttribute(
|
|
10741
|
+
containerElement.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
|
10554
10742
|
value = pipe.run(subject);
|
|
10555
10743
|
} catch (e) {
|
|
10556
|
-
containerElement.setAttribute(
|
|
10744
|
+
containerElement.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
|
10557
10745
|
}
|
|
10558
10746
|
|
|
10559
10747
|
var dataPath = cmd.split(':').pop();
|
|
@@ -10563,7 +10751,7 @@ function insertElement(change) {
|
|
|
10563
10751
|
insertPoint = containerElement.lastChild;
|
|
10564
10752
|
}
|
|
10565
10753
|
|
|
10566
|
-
if (!(0,
|
|
10754
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isIterable)(value)) {
|
|
10567
10755
|
throw new Error('the value is not iterable');
|
|
10568
10756
|
}
|
|
10569
10757
|
|
|
@@ -10577,7 +10765,7 @@ function insertElement(change) {
|
|
|
10577
10765
|
var ref = refPrefix + _i3;
|
|
10578
10766
|
var currentPath = dataPath + "." + _i3;
|
|
10579
10767
|
available.add(ref);
|
|
10580
|
-
var refElement = containerElement.querySelector('[' +
|
|
10768
|
+
var refElement = containerElement.querySelector('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE + '="' + ref + '"]');
|
|
10581
10769
|
|
|
10582
10770
|
if (refElement instanceof HTMLElement) {
|
|
10583
10771
|
insertPoint = refElement;
|
|
@@ -10587,27 +10775,27 @@ function insertElement(change) {
|
|
|
10587
10775
|
appendNewDocumentFragment(containerElement, key, ref, currentPath);
|
|
10588
10776
|
}
|
|
10589
10777
|
|
|
10590
|
-
var nodes = containerElement.querySelectorAll('[' +
|
|
10778
|
+
var nodes = containerElement.querySelectorAll('[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE + '*="' + refPrefix + '"]');
|
|
10591
10779
|
|
|
10592
10780
|
for (var _i4 = 0, _Object$entries3 = Object.entries(nodes); _i4 < _Object$entries3.length; _i4++) {
|
|
10593
10781
|
var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i4], 2),
|
|
10594
10782
|
node = _Object$entries3$_i[1];
|
|
10595
10783
|
|
|
10596
|
-
if (!available.has(node.getAttribute(
|
|
10784
|
+
if (!available.has(node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE))) {
|
|
10597
10785
|
containerElement.removeChild(node);
|
|
10598
10786
|
}
|
|
10599
10787
|
}
|
|
10600
10788
|
};
|
|
10601
10789
|
|
|
10602
|
-
for (
|
|
10790
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
10603
10791
|
var _ret = _loop();
|
|
10604
10792
|
|
|
10605
10793
|
if (_ret === "continue") continue;
|
|
10606
10794
|
}
|
|
10607
10795
|
} catch (err) {
|
|
10608
|
-
|
|
10796
|
+
_iterator5.e(err);
|
|
10609
10797
|
} finally {
|
|
10610
|
-
|
|
10798
|
+
_iterator5.f();
|
|
10611
10799
|
}
|
|
10612
10800
|
|
|
10613
10801
|
p.pop();
|
|
@@ -10633,7 +10821,7 @@ function insertElement(change) {
|
|
|
10633
10821
|
|
|
10634
10822
|
|
|
10635
10823
|
function appendNewDocumentFragment(container, key, ref, path) {
|
|
10636
|
-
var template = (0,
|
|
10824
|
+
var template = (0,_template_js__WEBPACK_IMPORTED_MODULE_14__.findDocumentTemplate)(key, container);
|
|
10637
10825
|
var nodes = template.createDocumentFragment();
|
|
10638
10826
|
|
|
10639
10827
|
for (var _i5 = 0, _Object$entries4 = Object.entries(nodes.childNodes); _i5 < _Object$entries4.length; _i5++) {
|
|
@@ -10642,7 +10830,7 @@ function appendNewDocumentFragment(container, key, ref, path) {
|
|
|
10642
10830
|
|
|
10643
10831
|
if (node instanceof HTMLElement) {
|
|
10644
10832
|
applyRecursive(node, key, path);
|
|
10645
|
-
node.setAttribute(
|
|
10833
|
+
node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_INSERT_REFERENCE, ref);
|
|
10646
10834
|
}
|
|
10647
10835
|
|
|
10648
10836
|
container.appendChild(node);
|
|
@@ -10660,15 +10848,15 @@ function appendNewDocumentFragment(container, key, ref, path) {
|
|
|
10660
10848
|
|
|
10661
10849
|
function applyRecursive(node, key, path) {
|
|
10662
10850
|
if (node instanceof HTMLElement) {
|
|
10663
|
-
if (node.hasAttribute(
|
|
10664
|
-
var value = node.getAttribute(
|
|
10665
|
-
node.setAttribute(
|
|
10851
|
+
if (node.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE)) {
|
|
10852
|
+
var value = node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
|
|
10853
|
+
node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE, value.replaceAll("path:" + key, "path:" + path));
|
|
10666
10854
|
}
|
|
10667
10855
|
|
|
10668
|
-
if (node.hasAttribute(
|
|
10669
|
-
var _value = node.getAttribute(
|
|
10856
|
+
if (node.hasAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES)) {
|
|
10857
|
+
var _value = node.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
|
10670
10858
|
|
|
10671
|
-
node.setAttribute(
|
|
10859
|
+
node.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES, _value.replaceAll("path:" + key, "path:" + path));
|
|
10672
10860
|
}
|
|
10673
10861
|
|
|
10674
10862
|
for (var _i6 = 0, _Object$entries5 = Object.entries(node.childNodes); _i6 < _Object$entries5.length; _i6++) {
|
|
@@ -10690,10 +10878,10 @@ function applyRecursive(node, key, path) {
|
|
|
10690
10878
|
|
|
10691
10879
|
function updateContent(change) {
|
|
10692
10880
|
var self = this;
|
|
10693
|
-
var subject = self.subject.getRealSubject();
|
|
10694
|
-
var p = (0,
|
|
10695
|
-
runUpdateContent.call(this, this.element, p, subject);
|
|
10696
|
-
var slots = this.element.querySelectorAll('slot');
|
|
10881
|
+
var subject = self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
|
|
10882
|
+
var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
|
|
10883
|
+
runUpdateContent.call(this, this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element, p, subject);
|
|
10884
|
+
var slots = this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element.querySelectorAll('slot');
|
|
10697
10885
|
|
|
10698
10886
|
if (slots.length > 0) {
|
|
10699
10887
|
for (var _i7 = 0, _Object$entries6 = Object.entries(slots); _i7 < _Object$entries6.length; _i7++) {
|
|
@@ -10702,9 +10890,9 @@ function updateContent(change) {
|
|
|
10702
10890
|
|
|
10703
10891
|
for (var _i8 = 0, _Object$entries7 = Object.entries(slot.assignedNodes()); _i8 < _Object$entries7.length; _i8++) {
|
|
10704
10892
|
var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i8], 2),
|
|
10705
|
-
|
|
10893
|
+
_element3 = _Object$entries7$_i[1];
|
|
10706
10894
|
|
|
10707
|
-
runUpdateContent.call(this,
|
|
10895
|
+
runUpdateContent.call(this, _element3, p, subject);
|
|
10708
10896
|
}
|
|
10709
10897
|
}
|
|
10710
10898
|
}
|
|
@@ -10722,16 +10910,16 @@ function updateContent(change) {
|
|
|
10722
10910
|
function runUpdateContent(container, parts, subject) {
|
|
10723
10911
|
var _this3 = this;
|
|
10724
10912
|
|
|
10725
|
-
if (!(0,
|
|
10913
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(parts)) return;
|
|
10726
10914
|
if (!(container instanceof HTMLElement)) return;
|
|
10727
|
-
parts = (0,
|
|
10915
|
+
parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(parts);
|
|
10728
10916
|
var mem = new WeakSet();
|
|
10729
10917
|
|
|
10730
10918
|
while (parts.length > 0) {
|
|
10731
10919
|
var current = parts.join('.');
|
|
10732
10920
|
parts.pop(); // Unfortunately, static data is always changed as well, since it is not possible to react to changes here.
|
|
10733
10921
|
|
|
10734
|
-
var query = '[' +
|
|
10922
|
+
var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE + '^="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE + '^="static:"]';
|
|
10735
10923
|
var e = container.querySelectorAll('' + query);
|
|
10736
10924
|
var iterator = new Set(_toConsumableArray(e));
|
|
10737
10925
|
|
|
@@ -10742,21 +10930,21 @@ function runUpdateContent(container, parts, subject) {
|
|
|
10742
10930
|
iterator.forEach(function (key, element) {
|
|
10743
10931
|
if (mem.has(element)) return;
|
|
10744
10932
|
mem.add(element);
|
|
10745
|
-
var attributes = element.getAttribute(
|
|
10746
|
-
var cmd = (0,
|
|
10747
|
-
var pipe = new
|
|
10933
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_REPLACE);
|
|
10934
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(attributes);
|
|
10935
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
|
10748
10936
|
|
|
10749
|
-
_this3.callbacks.forEach(function (f, n) {
|
|
10937
|
+
_this3[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
|
10750
10938
|
pipe.setCallback(n, f);
|
|
10751
10939
|
});
|
|
10752
10940
|
|
|
10753
10941
|
var value;
|
|
10754
10942
|
|
|
10755
10943
|
try {
|
|
10756
|
-
element.removeAttribute(
|
|
10944
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
|
10757
10945
|
value = pipe.run(subject);
|
|
10758
10946
|
} catch (e) {
|
|
10759
|
-
element.setAttribute(
|
|
10947
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
|
10760
10948
|
}
|
|
10761
10949
|
|
|
10762
10950
|
if (value instanceof HTMLElement) {
|
|
@@ -10781,9 +10969,9 @@ function runUpdateContent(container, parts, subject) {
|
|
|
10781
10969
|
|
|
10782
10970
|
|
|
10783
10971
|
function updateAttributes(change) {
|
|
10784
|
-
var subject = this.subject.getRealSubject();
|
|
10785
|
-
var p = (0,
|
|
10786
|
-
runUpdateAttributes.call(this, this.element, p, subject);
|
|
10972
|
+
var subject = this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].subject.getRealSubject();
|
|
10973
|
+
var p = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(change === null || change === void 0 ? void 0 : change['path']);
|
|
10974
|
+
runUpdateAttributes.call(this, this[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].element, p, subject);
|
|
10787
10975
|
}
|
|
10788
10976
|
/**
|
|
10789
10977
|
* @private
|
|
@@ -10799,15 +10987,15 @@ function runUpdateAttributes(container, parts, subject) {
|
|
|
10799
10987
|
var _this4 = this;
|
|
10800
10988
|
|
|
10801
10989
|
var self = this;
|
|
10802
|
-
if (!(0,
|
|
10803
|
-
parts = (0,
|
|
10990
|
+
if (!(0,_types_is_js__WEBPACK_IMPORTED_MODULE_7__.isArray)(parts)) return;
|
|
10991
|
+
parts = (0,_util_clone_js__WEBPACK_IMPORTED_MODULE_11__.clone)(parts);
|
|
10804
10992
|
var mem = new WeakSet();
|
|
10805
10993
|
|
|
10806
10994
|
while (parts.length > 0) {
|
|
10807
10995
|
var current = parts.join('.');
|
|
10808
10996
|
parts.pop();
|
|
10809
10997
|
var iterator = new Set();
|
|
10810
|
-
var query = '[' +
|
|
10998
|
+
var query = '[' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES + '*="path:' + current + '"], [' + _dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES + '^="static:"]';
|
|
10811
10999
|
var e = container.querySelectorAll(query);
|
|
10812
11000
|
|
|
10813
11001
|
if (e.length > 0) {
|
|
@@ -10821,27 +11009,27 @@ function runUpdateAttributes(container, parts, subject) {
|
|
|
10821
11009
|
iterator.forEach(function (key, element) {
|
|
10822
11010
|
if (mem.has(element)) return;
|
|
10823
11011
|
mem.add(element);
|
|
10824
|
-
var attributes = element.getAttribute(
|
|
11012
|
+
var attributes = element.getAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_UPDATER_ATTRIBUTES);
|
|
10825
11013
|
|
|
10826
11014
|
var _loop2 = function _loop2() {
|
|
10827
11015
|
var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
|
|
10828
11016
|
def = _Object$entries8$_i[1];
|
|
10829
11017
|
|
|
10830
|
-
def = (0,
|
|
11018
|
+
def = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def);
|
|
10831
11019
|
var i = def.indexOf(' ');
|
|
10832
|
-
var name = (0,
|
|
10833
|
-
var cmd = (0,
|
|
10834
|
-
var pipe = new
|
|
10835
|
-
self.callbacks.forEach(function (f, n) {
|
|
11020
|
+
var name = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(0, i));
|
|
11021
|
+
var cmd = (0,_util_trimspaces_js__WEBPACK_IMPORTED_MODULE_12__.trimSpaces)(def.substr(i));
|
|
11022
|
+
var pipe = new _data_pipe_js__WEBPACK_IMPORTED_MODULE_3__.Pipe(cmd);
|
|
11023
|
+
self[_constants_js__WEBPACK_IMPORTED_MODULE_0__.internalSymbol].callbacks.forEach(function (f, n) {
|
|
10836
11024
|
pipe.setCallback(n, f, element);
|
|
10837
11025
|
});
|
|
10838
11026
|
var value = void 0;
|
|
10839
11027
|
|
|
10840
11028
|
try {
|
|
10841
|
-
element.removeAttribute(
|
|
11029
|
+
element.removeAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE);
|
|
10842
11030
|
value = pipe.run(subject);
|
|
10843
11031
|
} catch (e) {
|
|
10844
|
-
element.setAttribute(
|
|
11032
|
+
element.setAttribute(_dom_constants_js__WEBPACK_IMPORTED_MODULE_4__.ATTRIBUTE_ERRORMESSAGE, e.message);
|
|
10845
11033
|
}
|
|
10846
11034
|
|
|
10847
11035
|
if (value === undefined) {
|
|
@@ -10939,7 +11127,7 @@ function handleInputControlAttributeUpdate(element, name, value) {
|
|
|
10939
11127
|
}
|
|
10940
11128
|
}
|
|
10941
11129
|
|
|
10942
|
-
(0,
|
|
11130
|
+
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_5__.assignToNamespace)('Monster.DOM', Updater);
|
|
10943
11131
|
|
|
10944
11132
|
|
|
10945
11133
|
/***/ }),
|
|
@@ -10985,7 +11173,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
10985
11173
|
*
|
|
10986
11174
|
* ```
|
|
10987
11175
|
* <script type="module">
|
|
10988
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11176
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
10989
11177
|
* Monster.Util.trimSpaces(" hello ")
|
|
10990
11178
|
* </script>
|
|
10991
11179
|
* ```
|
|
@@ -10994,7 +11182,7 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
|
10994
11182
|
*
|
|
10995
11183
|
* ```
|
|
10996
11184
|
* <script type="module">
|
|
10997
|
-
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11185
|
+
* import {trimSpaces} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/util/trimspaces.js';
|
|
10998
11186
|
* trimSpaces(' hello \\ ')
|
|
10999
11187
|
* </script>
|
|
11000
11188
|
* ```
|
|
@@ -11068,6 +11256,156 @@ function trimSpaces(value) {
|
|
|
11068
11256
|
/* 42 */
|
|
11069
11257
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11070
11258
|
|
|
11259
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11260
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11261
|
+
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
|
11262
|
+
/* harmony export */ "findTargetElementFromEvent": function() { return /* binding */ findTargetElementFromEvent; },
|
|
11263
|
+
/* harmony export */ "fireEvent": function() { return /* binding */ fireEvent; }
|
|
11264
|
+
/* harmony export */ });
|
|
11265
|
+
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
11266
|
+
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
11267
|
+
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
|
|
11268
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
|
|
11269
|
+
|
|
11270
|
+
/**
|
|
11271
|
+
* @author schukai GmbH
|
|
11272
|
+
*/
|
|
11273
|
+
|
|
11274
|
+
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; } } }; }
|
|
11275
|
+
|
|
11276
|
+
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); }
|
|
11277
|
+
|
|
11278
|
+
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; }
|
|
11279
|
+
|
|
11280
|
+
|
|
11281
|
+
|
|
11282
|
+
|
|
11283
|
+
|
|
11284
|
+
/**
|
|
11285
|
+
* You can call the function via the monster namespace `new Monster.DOM.fireEvent()`.
|
|
11286
|
+
*
|
|
11287
|
+
* ```
|
|
11288
|
+
* <script type="module">
|
|
11289
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11290
|
+
* console.log(new Monster.DOM.fireEvent())
|
|
11291
|
+
* </script>
|
|
11292
|
+
* ```
|
|
11293
|
+
*
|
|
11294
|
+
* Alternatively, you can also integrate this function individually.
|
|
11295
|
+
*
|
|
11296
|
+
* ```
|
|
11297
|
+
* <script type="module">
|
|
11298
|
+
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/events.js';
|
|
11299
|
+
* console.log(fireEvent())
|
|
11300
|
+
* </script>
|
|
11301
|
+
* ```
|
|
11302
|
+
*
|
|
11303
|
+
* @param {HTMLElement|HTMLCollection|NodeList} element
|
|
11304
|
+
* @param {string} type
|
|
11305
|
+
* @return {void}
|
|
11306
|
+
* @since 1.10.0
|
|
11307
|
+
* @copyright schukai GmbH
|
|
11308
|
+
* @memberOf Monster.DOM
|
|
11309
|
+
* @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
|
|
11310
|
+
* @summary Construct and send and event
|
|
11311
|
+
*/
|
|
11312
|
+
|
|
11313
|
+
function fireEvent(element, type) {
|
|
11314
|
+
var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.getDocument)();
|
|
11315
|
+
|
|
11316
|
+
if (element instanceof HTMLElement) {
|
|
11317
|
+
if (type === 'click') {
|
|
11318
|
+
element.click();
|
|
11319
|
+
return;
|
|
11320
|
+
}
|
|
11321
|
+
|
|
11322
|
+
var event = new Event((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateString)(type), {
|
|
11323
|
+
bubbles: true,
|
|
11324
|
+
cancelable: true
|
|
11325
|
+
});
|
|
11326
|
+
element.dispatchEvent(event);
|
|
11327
|
+
} else if (element instanceof HTMLCollection || element instanceof NodeList) {
|
|
11328
|
+
var _iterator = _createForOfIteratorHelper(element),
|
|
11329
|
+
_step;
|
|
11330
|
+
|
|
11331
|
+
try {
|
|
11332
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
11333
|
+
var e = _step.value;
|
|
11334
|
+
fireEvent(e, type);
|
|
11335
|
+
}
|
|
11336
|
+
} catch (err) {
|
|
11337
|
+
_iterator.e(err);
|
|
11338
|
+
} finally {
|
|
11339
|
+
_iterator.f();
|
|
11340
|
+
}
|
|
11341
|
+
} else {
|
|
11342
|
+
throw new TypeError('value is not an instance of HTMLElement or HTMLCollection');
|
|
11343
|
+
}
|
|
11344
|
+
}
|
|
11345
|
+
/**
|
|
11346
|
+
* This function gets the path `Event.composedPath()` from an event and tries to find the next element
|
|
11347
|
+
* up the tree `element.closest()` with the attribute and value. If no value, or a value that is undefined or null,
|
|
11348
|
+
* is specified, only the attribute is searched.
|
|
11349
|
+
*
|
|
11350
|
+
* You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.
|
|
11351
|
+
*
|
|
11352
|
+
* ```
|
|
11353
|
+
* <script type="module">
|
|
11354
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11355
|
+
* new Monster.DOM.findTargetElementFromEvent()
|
|
11356
|
+
* </script>
|
|
11357
|
+
* ```
|
|
11358
|
+
*
|
|
11359
|
+
* Alternatively, you can also integrate this function individually.
|
|
11360
|
+
*
|
|
11361
|
+
* ```
|
|
11362
|
+
* <script type="module">
|
|
11363
|
+
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/events.js';
|
|
11364
|
+
* findTargetElementFromEvent()
|
|
11365
|
+
* </script>
|
|
11366
|
+
* ```
|
|
11367
|
+
*
|
|
11368
|
+
* @since 1.14.0
|
|
11369
|
+
* @param {Event} event
|
|
11370
|
+
* @param {string} attributeName
|
|
11371
|
+
* @param {string|null|undefined} attributeValue
|
|
11372
|
+
* @throws {Error} unsupported event
|
|
11373
|
+
* @memberOf Monster.DOM
|
|
11374
|
+
* @throws {TypeError} value is not a string
|
|
11375
|
+
* @throws {TypeError} value is not an instance of HTMLElement
|
|
11376
|
+
* @summary Help function to find the appropriate control
|
|
11377
|
+
*/
|
|
11378
|
+
|
|
11379
|
+
|
|
11380
|
+
function findTargetElementFromEvent(event, attributeName, attributeValue) {
|
|
11381
|
+
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateInstance)(event, Event);
|
|
11382
|
+
|
|
11383
|
+
if (typeof event.composedPath !== 'function') {
|
|
11384
|
+
throw new Error('unsupported event');
|
|
11385
|
+
}
|
|
11386
|
+
|
|
11387
|
+
var path = event.composedPath(); // closest cannot be used here, because closest is not correct for slotted elements
|
|
11388
|
+
|
|
11389
|
+
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(path)) {
|
|
11390
|
+
for (var i = 0; i < path.length; i++) {
|
|
11391
|
+
var o = path[i];
|
|
11392
|
+
|
|
11393
|
+
if (o instanceof HTMLElement && o.hasAttribute(attributeName) && (attributeValue === undefined || o.getAttribute(attributeName) === attributeValue)) {
|
|
11394
|
+
return o;
|
|
11395
|
+
}
|
|
11396
|
+
}
|
|
11397
|
+
}
|
|
11398
|
+
|
|
11399
|
+
return undefined;
|
|
11400
|
+
}
|
|
11401
|
+
|
|
11402
|
+
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', findTargetElementFromEvent, fireEvent);
|
|
11403
|
+
|
|
11404
|
+
|
|
11405
|
+
/***/ }),
|
|
11406
|
+
/* 43 */
|
|
11407
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11408
|
+
|
|
11071
11409
|
__webpack_require__.r(__webpack_exports__);
|
|
11072
11410
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11073
11411
|
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
|
@@ -11093,7 +11431,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
11093
11431
|
*
|
|
11094
11432
|
* ```
|
|
11095
11433
|
* <script type="module">
|
|
11096
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11434
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11097
11435
|
* console.log(Monster.DOM.getDocument())
|
|
11098
11436
|
* </script>
|
|
11099
11437
|
* ```
|
|
@@ -11102,7 +11440,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
11102
11440
|
*
|
|
11103
11441
|
* ```
|
|
11104
11442
|
* <script type="module">
|
|
11105
|
-
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11443
|
+
* import {getDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/util.js';
|
|
11106
11444
|
* console.log(getDocument())
|
|
11107
11445
|
* </script>
|
|
11108
11446
|
* ```
|
|
@@ -11157,7 +11495,7 @@ function getDocument() {
|
|
|
11157
11495
|
*
|
|
11158
11496
|
* ```
|
|
11159
11497
|
* <script type="module">
|
|
11160
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11498
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11161
11499
|
* console.log(Monster.DOM.getWindow())
|
|
11162
11500
|
* </script>
|
|
11163
11501
|
* ```
|
|
@@ -11166,7 +11504,7 @@ function getDocument() {
|
|
|
11166
11504
|
*
|
|
11167
11505
|
* ```
|
|
11168
11506
|
* <script type="module">
|
|
11169
|
-
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11507
|
+
* import {getWindow} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/util.js';
|
|
11170
11508
|
* console.log(getWindow(null))
|
|
11171
11509
|
* </script>
|
|
11172
11510
|
* ```
|
|
@@ -11226,7 +11564,7 @@ function getWindow() {
|
|
|
11226
11564
|
*
|
|
11227
11565
|
* ```
|
|
11228
11566
|
* <script type="module">
|
|
11229
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11567
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11230
11568
|
* console.log(Monster.DOM.getDocumentFragmentFromString())
|
|
11231
11569
|
* </script>
|
|
11232
11570
|
* ```
|
|
@@ -11235,7 +11573,7 @@ function getWindow() {
|
|
|
11235
11573
|
*
|
|
11236
11574
|
* ```
|
|
11237
11575
|
* <script type="module">
|
|
11238
|
-
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11576
|
+
* import {getDocumentFragmentFromString} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/util.js';
|
|
11239
11577
|
* console.log(getDocumentFragmentFromString('<div></div>'))
|
|
11240
11578
|
* </script>
|
|
11241
11579
|
* ```
|
|
@@ -11287,157 +11625,6 @@ function getDocumentFragmentFromString(html) {
|
|
|
11287
11625
|
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', getWindow, getDocument, getDocumentFragmentFromString);
|
|
11288
11626
|
|
|
11289
11627
|
|
|
11290
|
-
/***/ }),
|
|
11291
|
-
/* 43 */
|
|
11292
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11293
|
-
|
|
11294
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11295
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11296
|
-
/* harmony export */ "Monster": function() { return /* reexport safe */ _namespace_js__WEBPACK_IMPORTED_MODULE_0__.Monster; },
|
|
11297
|
-
/* harmony export */ "findTargetElementFromEvent": function() { return /* binding */ findTargetElementFromEvent; },
|
|
11298
|
-
/* harmony export */ "fireEvent": function() { return /* binding */ fireEvent; }
|
|
11299
|
-
/* harmony export */ });
|
|
11300
|
-
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
11301
|
-
/* harmony import */ var _types_is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
|
|
11302
|
-
/* harmony import */ var _types_validate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
|
|
11303
|
-
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
|
|
11304
|
-
|
|
11305
|
-
/**
|
|
11306
|
-
* @author schukai GmbH
|
|
11307
|
-
*/
|
|
11308
|
-
|
|
11309
|
-
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; } } }; }
|
|
11310
|
-
|
|
11311
|
-
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); }
|
|
11312
|
-
|
|
11313
|
-
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; }
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
/**
|
|
11320
|
-
* You can call the function via the monster namespace `new Monster.DOM.fireEvent()`.
|
|
11321
|
-
*
|
|
11322
|
-
* ```
|
|
11323
|
-
* <script type="module">
|
|
11324
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
|
|
11325
|
-
* console.log(new Monster.DOM.fireEvent())
|
|
11326
|
-
* </script>
|
|
11327
|
-
* ```
|
|
11328
|
-
*
|
|
11329
|
-
* Alternatively, you can also integrate this function individually.
|
|
11330
|
-
*
|
|
11331
|
-
* ```
|
|
11332
|
-
* <script type="module">
|
|
11333
|
-
* import {fireEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/events.js';
|
|
11334
|
-
* console.log(fireEvent())
|
|
11335
|
-
* </script>
|
|
11336
|
-
* ```
|
|
11337
|
-
*
|
|
11338
|
-
* @param {HTMLElement|HTMLCollection|NodeList} element
|
|
11339
|
-
* @param {string} type
|
|
11340
|
-
* @return {void}
|
|
11341
|
-
* @since 1.10.0
|
|
11342
|
-
* @copyright schukai GmbH
|
|
11343
|
-
* @memberOf Monster.DOM
|
|
11344
|
-
* @throws {TypeError} value is not an instance of HTMLElement or HTMLCollection
|
|
11345
|
-
* @summary Construct and send and event
|
|
11346
|
-
*/
|
|
11347
|
-
|
|
11348
|
-
function fireEvent(element, type) {
|
|
11349
|
-
var document = (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.getDocument)();
|
|
11350
|
-
|
|
11351
|
-
if (element instanceof HTMLElement) {
|
|
11352
|
-
if (type === 'click') {
|
|
11353
|
-
element.click();
|
|
11354
|
-
return;
|
|
11355
|
-
}
|
|
11356
|
-
|
|
11357
|
-
var event = new Event((0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateString)(type), {
|
|
11358
|
-
bubbles: true,
|
|
11359
|
-
cancelable: true
|
|
11360
|
-
});
|
|
11361
|
-
element.dispatchEvent(event);
|
|
11362
|
-
} else if (element instanceof HTMLCollection || element instanceof NodeList) {
|
|
11363
|
-
var _iterator = _createForOfIteratorHelper(element),
|
|
11364
|
-
_step;
|
|
11365
|
-
|
|
11366
|
-
try {
|
|
11367
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
11368
|
-
var e = _step.value;
|
|
11369
|
-
fireEvent(e, type);
|
|
11370
|
-
}
|
|
11371
|
-
} catch (err) {
|
|
11372
|
-
_iterator.e(err);
|
|
11373
|
-
} finally {
|
|
11374
|
-
_iterator.f();
|
|
11375
|
-
}
|
|
11376
|
-
} else {
|
|
11377
|
-
throw new TypeError('value is not an instance of HTMLElement or HTMLCollection');
|
|
11378
|
-
}
|
|
11379
|
-
}
|
|
11380
|
-
/**
|
|
11381
|
-
* This function gets the path `Event.composedPath()` from an event and tries to find the next element
|
|
11382
|
-
* up the tree `element.closest()` with the attribute and value. If no value, or a value that is undefined or null,
|
|
11383
|
-
* is specified, only the attribute is searched.
|
|
11384
|
-
*
|
|
11385
|
-
* You can call the function via the monster namespace `new Monster.DOM.findTargetElementFromEvent()`.
|
|
11386
|
-
*
|
|
11387
|
-
* ```
|
|
11388
|
-
* <script type="module">
|
|
11389
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/monster.js';
|
|
11390
|
-
* console.log(new Monster.DOM.findTargetElementFromEvent())
|
|
11391
|
-
* </script>
|
|
11392
|
-
* ```
|
|
11393
|
-
*
|
|
11394
|
-
* Alternatively, you can also integrate this function individually.
|
|
11395
|
-
*
|
|
11396
|
-
* ```
|
|
11397
|
-
* <script type="module">
|
|
11398
|
-
* import {findTargetElementFromEvent} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.26.1/dist/modules/dom/events.js';
|
|
11399
|
-
* console.log(findTargetElementFromEvent())
|
|
11400
|
-
* </script>
|
|
11401
|
-
* ```
|
|
11402
|
-
*
|
|
11403
|
-
* @since 1.14.0
|
|
11404
|
-
* @param {Event} event
|
|
11405
|
-
* @param {string} attributeName
|
|
11406
|
-
* @param {string|null|undefined} attributeValue
|
|
11407
|
-
* @throws {Error} unsupported event
|
|
11408
|
-
* @memberOf Monster.DOM
|
|
11409
|
-
* @throws {TypeError} value is not a string
|
|
11410
|
-
* @throws {TypeError} value is not an instance of HTMLElement
|
|
11411
|
-
* @summary Help function to find the appropriate control
|
|
11412
|
-
*/
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
function findTargetElementFromEvent(event, attributeName, attributeValue) {
|
|
11416
|
-
(0,_types_validate_js__WEBPACK_IMPORTED_MODULE_2__.validateInstance)(event, Event);
|
|
11417
|
-
|
|
11418
|
-
if (typeof event.composedPath !== 'function') {
|
|
11419
|
-
throw new Error('unsupported event');
|
|
11420
|
-
}
|
|
11421
|
-
|
|
11422
|
-
var path = event.composedPath();
|
|
11423
|
-
var element = path === null || path === void 0 ? void 0 : path[0]; // closest cannot be used here, because closest is not correct for slotted elements
|
|
11424
|
-
|
|
11425
|
-
if ((0,_types_is_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(path)) {
|
|
11426
|
-
for (var i = 0; i < path.length; i++) {
|
|
11427
|
-
var o = path[i];
|
|
11428
|
-
|
|
11429
|
-
if (o instanceof HTMLElement && o.hasAttribute(attributeName) && (attributeValue === undefined || o.getAttribute(attributeName) === attributeValue)) {
|
|
11430
|
-
return o;
|
|
11431
|
-
}
|
|
11432
|
-
}
|
|
11433
|
-
}
|
|
11434
|
-
|
|
11435
|
-
return undefined;
|
|
11436
|
-
}
|
|
11437
|
-
|
|
11438
|
-
(0,_namespace_js__WEBPACK_IMPORTED_MODULE_0__.assignToNamespace)('Monster.DOM', findTargetElementFromEvent, fireEvent);
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
11628
|
/***/ }),
|
|
11442
11629
|
/* 44 */
|
|
11443
11630
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -11449,7 +11636,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11449
11636
|
/* harmony export */ });
|
|
11450
11637
|
/* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45);
|
|
11451
11638
|
/* harmony import */ var _namespace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
11452
|
-
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
11639
|
+
/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43);
|
|
11453
11640
|
|
|
11454
11641
|
/**
|
|
11455
11642
|
* @author schukai GmbH
|
|
@@ -11476,7 +11663,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
|
11476
11663
|
*
|
|
11477
11664
|
* ```
|
|
11478
11665
|
* <script type="module">
|
|
11479
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11666
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11480
11667
|
* new Monster.DOM.getLocaleOfDocument()
|
|
11481
11668
|
* </script>
|
|
11482
11669
|
* ```
|
|
@@ -11485,7 +11672,7 @@ var DEFAULT_LANGUAGE = 'en';
|
|
|
11485
11672
|
*
|
|
11486
11673
|
* ```
|
|
11487
11674
|
* <script type="module">
|
|
11488
|
-
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11675
|
+
* import {getLocaleOfDocument} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/dom/locale.js';
|
|
11489
11676
|
* new getLocaleOfDocument()
|
|
11490
11677
|
* </script>
|
|
11491
11678
|
* ```
|
|
@@ -11578,7 +11765,7 @@ var localeStringSymbol = Symbol('localeString');
|
|
|
11578
11765
|
*
|
|
11579
11766
|
* ```
|
|
11580
11767
|
* <script type="module">
|
|
11581
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11768
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11582
11769
|
* new Monster.I18n.Locale()
|
|
11583
11770
|
* </script>
|
|
11584
11771
|
* ```
|
|
@@ -11587,7 +11774,7 @@ var localeStringSymbol = Symbol('localeString');
|
|
|
11587
11774
|
*
|
|
11588
11775
|
* ```
|
|
11589
11776
|
* <script type="module">
|
|
11590
|
-
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11777
|
+
* import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/locale.js';
|
|
11591
11778
|
* new Locale()
|
|
11592
11779
|
* </script>
|
|
11593
11780
|
* ```
|
|
@@ -11780,7 +11967,7 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
|
11780
11967
|
*
|
|
11781
11968
|
* ```
|
|
11782
11969
|
* <script type="module">
|
|
11783
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11970
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11784
11971
|
* new Monster.I18n.createLocale()
|
|
11785
11972
|
* </script>
|
|
11786
11973
|
* ```
|
|
@@ -11789,7 +11976,7 @@ var Locale = /*#__PURE__*/function (_Base) {
|
|
|
11789
11976
|
*
|
|
11790
11977
|
* ```
|
|
11791
11978
|
* <script type="module">
|
|
11792
|
-
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
11979
|
+
* import {createLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/locale.js';
|
|
11793
11980
|
* createLocale()
|
|
11794
11981
|
* </script>
|
|
11795
11982
|
* ```
|
|
@@ -11965,7 +12152,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
11965
12152
|
*
|
|
11966
12153
|
* ```
|
|
11967
12154
|
* <script type="module">
|
|
11968
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12155
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
11969
12156
|
* new Monster.I18n.Provider()
|
|
11970
12157
|
* </script>
|
|
11971
12158
|
* ```
|
|
@@ -11974,7 +12161,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
11974
12161
|
*
|
|
11975
12162
|
* ```
|
|
11976
12163
|
* <script type="module">
|
|
11977
|
-
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12164
|
+
* import {Provider} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/provider.js';
|
|
11978
12165
|
* new Provider()
|
|
11979
12166
|
* </script>
|
|
11980
12167
|
* ```
|
|
@@ -12075,7 +12262,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
12075
12262
|
*
|
|
12076
12263
|
* ```
|
|
12077
12264
|
* <script type="module">
|
|
12078
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12265
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
12079
12266
|
* new Monster.Types.BaseWithOptions()
|
|
12080
12267
|
* </script>
|
|
12081
12268
|
* ```
|
|
@@ -12084,7 +12271,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
12084
12271
|
*
|
|
12085
12272
|
* ```
|
|
12086
12273
|
* <script type="module">
|
|
12087
|
-
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12274
|
+
* import {BaseWithOptions} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/basewithoptions.js';
|
|
12088
12275
|
* new BaseWithOptions()
|
|
12089
12276
|
* </script>
|
|
12090
12277
|
* ```
|
|
@@ -12225,7 +12412,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
12225
12412
|
*
|
|
12226
12413
|
* ```
|
|
12227
12414
|
* <script type="module">
|
|
12228
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12415
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
12229
12416
|
* new Monster.I18n.Translations()
|
|
12230
12417
|
* </script>
|
|
12231
12418
|
* ```
|
|
@@ -12234,15 +12421,15 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
12234
12421
|
*
|
|
12235
12422
|
* ```
|
|
12236
12423
|
* <script type="module">
|
|
12237
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12424
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/translations.js';
|
|
12238
12425
|
* new Translations()
|
|
12239
12426
|
* </script>
|
|
12240
12427
|
* ```
|
|
12241
12428
|
*
|
|
12242
12429
|
* @example
|
|
12243
12430
|
*
|
|
12244
|
-
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12245
|
-
* import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12431
|
+
* import {Translations} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/translations.js';
|
|
12432
|
+
* import {parseLocale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/locale.js';
|
|
12246
12433
|
*
|
|
12247
12434
|
* const translation = new Translations(parseLocale('en-GB'));
|
|
12248
12435
|
*
|
|
@@ -12514,7 +12701,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
12514
12701
|
*
|
|
12515
12702
|
* ```
|
|
12516
12703
|
* <script type="module">
|
|
12517
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12704
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
12518
12705
|
* new Monster.I18n.Providers.Fetch()
|
|
12519
12706
|
* </script>
|
|
12520
12707
|
* ```
|
|
@@ -12523,14 +12710,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
12523
12710
|
*
|
|
12524
12711
|
* ```
|
|
12525
12712
|
* <script type="module">
|
|
12526
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12713
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/providers/fetch.js';
|
|
12527
12714
|
* new Fetch()
|
|
12528
12715
|
* </script>
|
|
12529
12716
|
* ```
|
|
12530
12717
|
*
|
|
12531
12718
|
* @example <caption>das ist ein test</caption>
|
|
12532
12719
|
*
|
|
12533
|
-
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12720
|
+
* import {Fetch} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/i18n/providers/fetch.js';
|
|
12534
12721
|
*
|
|
12535
12722
|
* // fetch from API
|
|
12536
12723
|
* const translation = new Fetch('https://example.com/${language}.json').getTranslation('en-GB');
|
|
@@ -12760,7 +12947,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
|
12760
12947
|
*
|
|
12761
12948
|
* ```
|
|
12762
12949
|
* <script type="module">
|
|
12763
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12950
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
12764
12951
|
* new Monster.Text.Formatter()
|
|
12765
12952
|
* </script>
|
|
12766
12953
|
* ```
|
|
@@ -12769,7 +12956,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
|
12769
12956
|
*
|
|
12770
12957
|
* ```
|
|
12771
12958
|
* <script type="module">
|
|
12772
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
12959
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/text/formatter.js';
|
|
12773
12960
|
* new Formatter()
|
|
12774
12961
|
* </script>
|
|
12775
12962
|
* ```
|
|
@@ -12814,7 +13001,7 @@ var workingDataSymbol = Symbol('workingData');
|
|
|
12814
13001
|
*
|
|
12815
13002
|
* @example
|
|
12816
13003
|
*
|
|
12817
|
-
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13004
|
+
* import {Formatter} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/text/formatter.js';
|
|
12818
13005
|
*
|
|
12819
13006
|
* new Formatter({
|
|
12820
13007
|
* a: {
|
|
@@ -13159,7 +13346,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13159
13346
|
*
|
|
13160
13347
|
* ```
|
|
13161
13348
|
* <script type="module">
|
|
13162
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13349
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
13163
13350
|
* console.log(new Monster.Logging.Handler())
|
|
13164
13351
|
* </script>
|
|
13165
13352
|
* ```
|
|
@@ -13168,7 +13355,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13168
13355
|
*
|
|
13169
13356
|
* ```
|
|
13170
13357
|
* <script type="module">
|
|
13171
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13358
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/logging/handler.js';
|
|
13172
13359
|
* console.log(new Handler())
|
|
13173
13360
|
* </script>
|
|
13174
13361
|
* ```
|
|
@@ -13406,7 +13593,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13406
13593
|
*
|
|
13407
13594
|
* ```
|
|
13408
13595
|
* <script type="module">
|
|
13409
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13596
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
13410
13597
|
* console.log(new Monster.Logging.LogEntry())
|
|
13411
13598
|
* </script>
|
|
13412
13599
|
* ```
|
|
@@ -13415,7 +13602,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13415
13602
|
*
|
|
13416
13603
|
* ```
|
|
13417
13604
|
* <script type="module">
|
|
13418
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13605
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/logging/logentry.js';
|
|
13419
13606
|
* console.log(new LogEntry())
|
|
13420
13607
|
* </script>
|
|
13421
13608
|
* ```
|
|
@@ -13601,7 +13788,7 @@ var OFF = 0;
|
|
|
13601
13788
|
*
|
|
13602
13789
|
* ```
|
|
13603
13790
|
* <script type="module">
|
|
13604
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13791
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
13605
13792
|
* new Monster.Logging.Logger()
|
|
13606
13793
|
* </script>
|
|
13607
13794
|
* ```
|
|
@@ -13610,7 +13797,7 @@ var OFF = 0;
|
|
|
13610
13797
|
*
|
|
13611
13798
|
* ```
|
|
13612
13799
|
* <script type="module">
|
|
13613
|
-
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
13800
|
+
* import {ID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/logging/logger.js';
|
|
13614
13801
|
* new Logger()
|
|
13615
13802
|
* </script>
|
|
13616
13803
|
* ```
|
|
@@ -13910,7 +14097,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13910
14097
|
*
|
|
13911
14098
|
* ```
|
|
13912
14099
|
* <script type="module">
|
|
13913
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14100
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
13914
14101
|
* console.log(new Monster.Logging.Handler.ConsoleHandler())
|
|
13915
14102
|
* </script>
|
|
13916
14103
|
* ```
|
|
@@ -13919,7 +14106,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
13919
14106
|
*
|
|
13920
14107
|
* ```
|
|
13921
14108
|
* <script type="module">
|
|
13922
|
-
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14109
|
+
* import {ConsoleHandler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/logging/handler/console.js';
|
|
13923
14110
|
* console.log(new ConsoleHandler())
|
|
13924
14111
|
* </script>
|
|
13925
14112
|
* ```
|
|
@@ -13995,7 +14182,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13995
14182
|
*
|
|
13996
14183
|
* ```
|
|
13997
14184
|
* <script type="module">
|
|
13998
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14185
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
13999
14186
|
* Monster.Math.random(1,10)
|
|
14000
14187
|
* // ↦ 5
|
|
14001
14188
|
* </script>
|
|
@@ -14005,7 +14192,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14005
14192
|
*
|
|
14006
14193
|
* ```
|
|
14007
14194
|
* <script type="module">
|
|
14008
|
-
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14195
|
+
* import {random} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/math/random.js';
|
|
14009
14196
|
* random(1,10)
|
|
14010
14197
|
* // ↦ 5
|
|
14011
14198
|
* </script>
|
|
@@ -14162,7 +14349,7 @@ var internalCounter = 0;
|
|
|
14162
14349
|
*
|
|
14163
14350
|
* ```
|
|
14164
14351
|
* <script type="module">
|
|
14165
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14352
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
14166
14353
|
* console.log(new Monster.Types.RandomID())
|
|
14167
14354
|
* </script>
|
|
14168
14355
|
* ```
|
|
@@ -14171,7 +14358,7 @@ var internalCounter = 0;
|
|
|
14171
14358
|
*
|
|
14172
14359
|
* ```
|
|
14173
14360
|
* <script type="module">
|
|
14174
|
-
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14361
|
+
* import {RandomID} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/randomid.js';
|
|
14175
14362
|
* console.log(new RandomID())
|
|
14176
14363
|
* </script>
|
|
14177
14364
|
* ```
|
|
@@ -14254,7 +14441,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14254
14441
|
*
|
|
14255
14442
|
* ```
|
|
14256
14443
|
* <script type="module">
|
|
14257
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14444
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
14258
14445
|
* console.log(new Monster.Types.Version('1.2.3')) // ↦ 1.2.3
|
|
14259
14446
|
* console.log(new Monster.Types.Version('1')) // ↦ 1.0.0
|
|
14260
14447
|
* </script>
|
|
@@ -14264,7 +14451,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14264
14451
|
*
|
|
14265
14452
|
* ```
|
|
14266
14453
|
* <script type="module">
|
|
14267
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14454
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/version.js';
|
|
14268
14455
|
* console.log(new Version('1.2.3')) // ↦ 1.2.3
|
|
14269
14456
|
* console.log(new Version('1')) // ↦ 1.0.0
|
|
14270
14457
|
* </script>
|
|
@@ -14272,7 +14459,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14272
14459
|
*
|
|
14273
14460
|
* @example
|
|
14274
14461
|
*
|
|
14275
|
-
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14462
|
+
* import {Version} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/version.js';
|
|
14276
14463
|
*
|
|
14277
14464
|
* new Version('1.0.0') // ↦ 1.0.0
|
|
14278
14465
|
* new Version(1) // ↦ 1.0.0
|
|
@@ -14406,7 +14593,7 @@ var monsterVersion;
|
|
|
14406
14593
|
*
|
|
14407
14594
|
* ```
|
|
14408
14595
|
* <script type="module">
|
|
14409
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14596
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
14410
14597
|
* console.log(Monster.getVersion())
|
|
14411
14598
|
* </script>
|
|
14412
14599
|
* ```
|
|
@@ -14415,7 +14602,7 @@ var monsterVersion;
|
|
|
14415
14602
|
*
|
|
14416
14603
|
* ```
|
|
14417
14604
|
* <script type="module">
|
|
14418
|
-
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14605
|
+
* import {getVersion} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/types/version.js';
|
|
14419
14606
|
* console.log(getVersion())
|
|
14420
14607
|
* </script>
|
|
14421
14608
|
* ```
|
|
@@ -14434,7 +14621,7 @@ function getVersion() {
|
|
|
14434
14621
|
/**#@+ dont touch, replaced by make with package.json version */
|
|
14435
14622
|
|
|
14436
14623
|
|
|
14437
|
-
monsterVersion = new Version('1.
|
|
14624
|
+
monsterVersion = new Version('1.27.0');
|
|
14438
14625
|
/**#@-*/
|
|
14439
14626
|
|
|
14440
14627
|
return monsterVersion;
|
|
@@ -14490,7 +14677,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14490
14677
|
*
|
|
14491
14678
|
* ```
|
|
14492
14679
|
* <script type="module">
|
|
14493
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14680
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
14494
14681
|
* new Monster.Util.Comparator()
|
|
14495
14682
|
* </script>
|
|
14496
14683
|
* ```
|
|
@@ -14499,7 +14686,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14499
14686
|
*
|
|
14500
14687
|
* ```
|
|
14501
14688
|
* <script type="module">
|
|
14502
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14689
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/util/comparator.js';
|
|
14503
14690
|
* console.log(new Comparator())
|
|
14504
14691
|
* </script>
|
|
14505
14692
|
* ```
|
|
@@ -14524,7 +14711,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
14524
14711
|
*
|
|
14525
14712
|
* @example
|
|
14526
14713
|
*
|
|
14527
|
-
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14714
|
+
* import {Comparator} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/util/comparator.js';
|
|
14528
14715
|
*
|
|
14529
14716
|
* console.log(new Comparator().lessThanOrEqual(2, 5))
|
|
14530
14717
|
* // ↦ true
|
|
@@ -14737,7 +14924,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14737
14924
|
*
|
|
14738
14925
|
* ```
|
|
14739
14926
|
* <script type="module">
|
|
14740
|
-
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14927
|
+
* import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/monster.js';
|
|
14741
14928
|
* Monster.Util.deepFreeze({})
|
|
14742
14929
|
* </script>
|
|
14743
14930
|
* ```
|
|
@@ -14746,7 +14933,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14746
14933
|
*
|
|
14747
14934
|
* ```
|
|
14748
14935
|
* <script type="module">
|
|
14749
|
-
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.
|
|
14936
|
+
* import {deepFreeze} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.27.0/dist/modules/util/freeze.js';
|
|
14750
14937
|
* deepFreeze({})
|
|
14751
14938
|
* </script>
|
|
14752
14939
|
* ```
|
|
@@ -14869,12 +15056,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14869
15056
|
/* harmony import */ var _dom_constants_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(33);
|
|
14870
15057
|
/* harmony import */ var _dom_customcontrol_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(34);
|
|
14871
15058
|
/* harmony import */ var _dom_customelement_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(35);
|
|
14872
|
-
/* harmony import */ var _dom_events_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
|
|
15059
|
+
/* harmony import */ var _dom_events_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(42);
|
|
14873
15060
|
/* harmony import */ var _dom_locale_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(44);
|
|
14874
15061
|
/* harmony import */ var _dom_template_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(38);
|
|
14875
15062
|
/* harmony import */ var _dom_theme_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(39);
|
|
14876
15063
|
/* harmony import */ var _dom_updater_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(40);
|
|
14877
|
-
/* harmony import */ var _dom_util_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(
|
|
15064
|
+
/* harmony import */ var _dom_util_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(43);
|
|
14878
15065
|
/* harmony import */ var _i18n_locale_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(45);
|
|
14879
15066
|
/* harmony import */ var _i18n_provider_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(46);
|
|
14880
15067
|
/* harmony import */ var _i18n_providers_fetch_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(49);
|