@schukai/monster 1.14.1 → 1.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. package/CHANGELOG +14 -0
  2. package/README.md +5 -5
  3. package/dist/modules/constants.js +2 -2
  4. package/dist/modules/constraints/abstract.js +2 -2
  5. package/dist/modules/constraints/abstractoperator.js +2 -2
  6. package/dist/modules/constraints/andoperator.js +2 -2
  7. package/dist/modules/constraints/invalid.js +2 -2
  8. package/dist/modules/constraints/isarray.js +2 -2
  9. package/dist/modules/constraints/isobject.js +2 -2
  10. package/dist/modules/constraints/namespace.js +1 -1
  11. package/dist/modules/constraints/oroperator.js +2 -2
  12. package/dist/modules/constraints/valid.js +2 -2
  13. package/dist/modules/data/buildmap.js +2 -2
  14. package/dist/modules/data/diff.js +2 -2
  15. package/dist/modules/data/extend.js +2 -2
  16. package/dist/modules/data/namespace.js +1 -1
  17. package/dist/modules/data/pathfinder.js +2 -2
  18. package/dist/modules/data/pipe.js +2 -2
  19. package/dist/modules/data/transformer.js +2 -2
  20. package/dist/modules/dom/assembler.js +2 -2
  21. package/dist/modules/dom/attributes.js +2 -2
  22. package/dist/modules/dom/constants.js +2 -2
  23. package/dist/modules/dom/customcontrol.js +2 -2
  24. package/dist/modules/dom/customelement.js +2 -2
  25. package/dist/modules/dom/events.js +2 -2
  26. package/dist/modules/dom/locale.js +2 -2
  27. package/dist/modules/dom/namespace.js +1 -1
  28. package/dist/modules/dom/template.js +2 -2
  29. package/dist/modules/dom/theme.js +2 -2
  30. package/dist/modules/dom/updater.js +2 -2
  31. package/dist/modules/dom/util.js +2 -2
  32. package/dist/modules/i18n/locale.js +2 -2
  33. package/dist/modules/i18n/namespace.js +1 -1
  34. package/dist/modules/i18n/provider.js +2 -2
  35. package/dist/modules/i18n/providers/fetch.js +2 -2
  36. package/dist/modules/i18n/providers/namespace.js +1 -1
  37. package/dist/modules/i18n/translations.js +2 -2
  38. package/dist/modules/logging/handler/console.js +2 -2
  39. package/dist/modules/logging/handler/namespace.js +1 -1
  40. package/dist/modules/logging/handler.js +2 -2
  41. package/dist/modules/logging/logentry.js +2 -2
  42. package/dist/modules/logging/logger.js +2 -2
  43. package/dist/modules/logging/namespace.js +1 -1
  44. package/dist/modules/math/namespace.js +1 -1
  45. package/dist/modules/math/random.js +2 -2
  46. package/dist/modules/monster.js +1 -1
  47. package/dist/modules/namespace.js +1 -1
  48. package/dist/modules/text/formatter.js +2 -2
  49. package/dist/modules/text/namespace.js +1 -1
  50. package/dist/modules/types/base.js +2 -2
  51. package/dist/modules/types/basewithoptions.js +2 -2
  52. package/dist/modules/types/global.js +2 -2
  53. package/dist/modules/types/id.js +2 -2
  54. package/dist/modules/types/is.js +2 -2
  55. package/dist/modules/types/namespace.js +1 -1
  56. package/dist/modules/types/observer.js +2 -2
  57. package/dist/modules/types/observerlist.js +2 -2
  58. package/dist/modules/types/proxyobserver.js +2 -2
  59. package/dist/modules/types/queue.js +2 -2
  60. package/dist/modules/types/randomid.js +2 -2
  61. package/dist/modules/types/stack.js +2 -2
  62. package/dist/modules/types/tokenlist.js +2 -2
  63. package/dist/modules/types/typeof.js +2 -2
  64. package/dist/modules/types/uniquequeue.js +2 -2
  65. package/dist/modules/types/validate.js +2 -2
  66. package/dist/modules/types/version.js +2 -2
  67. package/dist/modules/util/clone.js +2 -2
  68. package/dist/modules/util/comparator.js +2 -2
  69. package/dist/modules/util/freeze.js +2 -2
  70. package/dist/modules/util/namespace.js +1 -1
  71. package/dist/monster.dev.js +1096 -844
  72. package/dist/monster.dev.js.map +1 -1
  73. package/dist/monster.js +3 -3
  74. package/package.json +1 -1
  75. package/source/constants.js +6 -5
  76. package/source/constraints/abstract.js +2 -2
  77. package/source/constraints/abstractoperator.js +3 -3
  78. package/source/constraints/andoperator.js +7 -7
  79. package/source/constraints/invalid.js +6 -6
  80. package/source/constraints/isarray.js +6 -6
  81. package/source/constraints/isobject.js +6 -6
  82. package/source/constraints/oroperator.js +8 -8
  83. package/source/constraints/valid.js +6 -6
  84. package/source/data/buildmap.js +15 -15
  85. package/source/data/diff.js +6 -6
  86. package/source/data/extend.js +55 -13
  87. package/source/data/pathfinder.js +6 -7
  88. package/source/data/pipe.js +5 -5
  89. package/source/data/transformer.js +5 -6
  90. package/source/dom/assembler.js +5 -5
  91. package/source/dom/attributes.js +26 -26
  92. package/source/dom/constants.js +1 -2
  93. package/source/dom/customcontrol.js +14 -50
  94. package/source/dom/customelement.js +125 -28
  95. package/source/dom/events.js +7 -7
  96. package/source/dom/locale.js +5 -5
  97. package/source/dom/template.js +7 -7
  98. package/source/dom/theme.js +6 -6
  99. package/source/dom/updater.js +35 -13
  100. package/source/dom/util.js +9 -9
  101. package/source/i18n/locale.js +7 -7
  102. package/source/i18n/provider.js +5 -5
  103. package/source/i18n/providers/fetch.js +10 -10
  104. package/source/i18n/translations.js +5 -5
  105. package/source/logging/handler/console.js +4 -4
  106. package/source/logging/handler.js +4 -4
  107. package/source/logging/logentry.js +4 -4
  108. package/source/logging/logger.js +4 -4
  109. package/source/math/random.js +5 -5
  110. package/source/namespace.js +1 -1
  111. package/source/text/formatter.js +4 -5
  112. package/source/types/base.js +4 -5
  113. package/source/types/basewithoptions.js +9 -8
  114. package/source/types/global.js +6 -6
  115. package/source/types/id.js +6 -6
  116. package/source/types/is.js +22 -22
  117. package/source/types/observer.js +5 -5
  118. package/source/types/observerlist.js +4 -4
  119. package/source/types/proxyobserver.js +32 -26
  120. package/source/types/queue.js +13 -7
  121. package/source/types/randomid.js +5 -5
  122. package/source/types/stack.js +11 -4
  123. package/source/types/tokenlist.js +4 -4
  124. package/source/types/typeof.js +5 -5
  125. package/source/types/uniquequeue.js +11 -4
  126. package/source/types/validate.js +22 -22
  127. package/source/types/version.js +9 -9
  128. package/source/util/clone.js +4 -4
  129. package/source/util/comparator.js +6 -6
  130. package/source/util/freeze.js +4 -4
  131. package/test/cases/data/extend.js +66 -13
  132. package/test/cases/dom/customcontrol.js +16 -2
  133. package/test/cases/dom/customelement.js +64 -6
  134. package/test/cases/monster.js +1 -1
  135. package/test/cases/types/proxyobserver.js +9 -0
  136. package/test/web/monster-dev.html +3 -3
  137. package/test/web/monster.html +2 -2
  138. package/test/web/test.html +3 -3
  139. package/test/web/tests.js +3 -3
@@ -4,7 +4,7 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../namespace.js';
7
+ import {Monster, assignToNamespace} from '../namespace.js';
8
8
  import {Transformer} from './transformer.js';
9
9
  import {Base} from '../types/base.js';
10
10
  import {validateFunction, validateString} from '../types/validate.js';
@@ -19,7 +19,7 @@ const DELIMITER = '|';
19
19
  *
20
20
  * ```
21
21
  * <script type="module">
22
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/data/pipe.js';
22
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pipe.js';
23
23
  * console.log(new Monster.Data.Pipe())
24
24
  * </script>
25
25
  * ```
@@ -28,7 +28,7 @@ const DELIMITER = '|';
28
28
  *
29
29
  * ```
30
30
  * <script type="module">
31
- * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/data/pipe.js';
31
+ * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pipe.js';
32
32
  * console.log(new Pipe())
33
33
  * </script>
34
34
  * ```
@@ -39,7 +39,7 @@ const DELIMITER = '|';
39
39
  * the word is then converted to uppercase letters and a prefix Hello is added. the two backslash safe the space char.
40
40
  *
41
41
  * @example
42
- * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/data/pipe.js';
42
+ * import {Pipe} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/pipe.js';
43
43
  *
44
44
  * let obj = {
45
45
  * a: {
@@ -106,5 +106,5 @@ class Pipe extends Base {
106
106
  }
107
107
  }
108
108
 
109
- Monster.assignToNamespace('Monster.Data', Pipe);
109
+ assignToNamespace('Monster.Data', Pipe);
110
110
  export {Monster, Pipe}
@@ -3,8 +3,7 @@
3
3
  /**
4
4
  * @author schukai GmbH
5
5
  */
6
-
7
- import {Monster} from '../namespace.js';
6
+ import {Monster, assignToNamespace} from '../namespace.js';
8
7
  import {Base} from '../types/base.js';
9
8
  import {getGlobal} from "../types/global.js";
10
9
  import {
@@ -26,7 +25,7 @@ import {Pathfinder} from "./pathfinder.js";
26
25
  *
27
26
  * ```
28
27
  * <script type="module">
29
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/data/transformer.js';
28
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/transformer.js';
30
29
  * console.log(new Monster.Data.Transformer())
31
30
  * </script>
32
31
  * ```
@@ -35,7 +34,7 @@ import {Pathfinder} from "./pathfinder.js";
35
34
  *
36
35
  * ```
37
36
  * <script type="module">
38
- * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/data/transformer.js';
37
+ * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/transformer.js';
39
38
  * console.log(new Transformer())
40
39
  * </script>
41
40
  * ```
@@ -114,7 +113,7 @@ import {Pathfinder} from "./pathfinder.js";
114
113
  *
115
114
  * @example
116
115
  *
117
- * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/data/transformer.js';
116
+ * import {Transformer} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/data/transformer.js';
118
117
  *
119
118
  * const transformer = new Transformer("tolower")
120
119
  *
@@ -181,7 +180,7 @@ class Transformer extends Base {
181
180
  }
182
181
  }
183
182
 
184
- Monster.assignToNamespace('Monster.Data', Transformer);
183
+ assignToNamespace('Monster.Data', Transformer);
185
184
  export {Monster, Transformer}
186
185
 
187
186
  /**
@@ -3,8 +3,8 @@
3
3
  /**
4
4
  * @author schukai GmbH
5
5
  */
6
-
7
- import {Monster, Base} from '../types/base.js';
6
+ import {Monster, assignToNamespace} from '../namespace.js';
7
+ import { Base} from '../types/base.js';
8
8
  import {validateInstance, validateString} from "../types/validate.js";
9
9
  import {getGlobalFunction} from "../types/global.js";
10
10
  import {ProxyObserver} from "../types/proxyobserver.js";
@@ -23,7 +23,7 @@ const ATTRIBUTEPREFIX = "data-monster-";
23
23
  *
24
24
  * ```
25
25
  * <script type="module">
26
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/assembler.js';
26
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/assembler.js';
27
27
  * console.log(new Monster.DOM.Assembler())
28
28
  * </script>
29
29
  * ```
@@ -32,7 +32,7 @@ const ATTRIBUTEPREFIX = "data-monster-";
32
32
  *
33
33
  * ```
34
34
  * <script type="module">
35
- * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/assembler.js';
35
+ * import {Assembler} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/assembler.js';
36
36
  * console.log(new Assembler())
37
37
  * </script>
38
38
  * ```
@@ -95,5 +95,5 @@ class Assembler extends Base {
95
95
 
96
96
  }
97
97
 
98
- Monster.assignToNamespace('Monster.DOM', Assembler);
98
+ assignToNamespace('Monster.DOM', Assembler);
99
99
  export {Monster, ATTRIBUTEPREFIX, Assembler}
@@ -4,7 +4,7 @@
4
4
  * @author schukai GmbH
5
5
  */
6
6
 
7
- import {Monster} from '../namespace.js';
7
+ import {Monster, assignToNamespace} from '../namespace.js';
8
8
  import {getGlobalFunction} from "../types/global.js";
9
9
  import {isInstance} from "../types/is.js";
10
10
  import {TokenList} from "../types/tokenlist.js";
@@ -21,7 +21,7 @@ import {ATTRIBUTE_OBJECTLINK} from "./constants.js";
21
21
  *
22
22
  * ```
23
23
  * <script type="module">
24
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/updater.js';
24
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';
25
25
  * console.log(Monster.DOM.findClosestObjectLink())
26
26
  * </script>
27
27
  * ```
@@ -30,7 +30,7 @@ import {ATTRIBUTE_OBJECTLINK} from "./constants.js";
30
30
  *
31
31
  * ```
32
32
  * <script type="module">
33
- * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/updater.js';
33
+ * import {getUpdaterFromNode} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/updater.js';
34
34
  * console.log(findClosestObjectLink())
35
35
  * </script>
36
36
  * ```
@@ -51,7 +51,7 @@ function findClosestObjectLink(element) {
51
51
  *
52
52
  * ```
53
53
  * <script type="module">
54
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
54
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
55
55
  * Monster.DOM.addToObjectLink();
56
56
  * </script>
57
57
  * ```
@@ -60,7 +60,7 @@ function findClosestObjectLink(element) {
60
60
  *
61
61
  * ```
62
62
  * <script type="module">
63
- * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
63
+ * import {addToObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
64
64
  * addToObjectLink();
65
65
  * </script>
66
66
  * ```
@@ -93,7 +93,7 @@ function addToObjectLink(element, symbol, object) {
93
93
  *
94
94
  * ```
95
95
  * <script type="module">
96
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
96
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
97
97
  * Monster.DOM.removeObjectLink();
98
98
  * </script>
99
99
  * ```
@@ -102,7 +102,7 @@ function addToObjectLink(element, symbol, object) {
102
102
  *
103
103
  * ```
104
104
  * <script type="module">
105
- * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
105
+ * import {removeObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
106
106
  * removeObjectLink();
107
107
  * </script>
108
108
  * ```
@@ -135,7 +135,7 @@ function removeObjectLink(element, symbol) {
135
135
  *
136
136
  * ```
137
137
  * <script type="module">
138
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
138
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
139
139
  * Monster.DOM.hasObjectLink();
140
140
  * </script>
141
141
  * ```
@@ -144,7 +144,7 @@ function removeObjectLink(element, symbol) {
144
144
  *
145
145
  * ```
146
146
  * <script type="module">
147
- * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
147
+ * import {hasObjectLink} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
148
148
  * hasObjectLink();
149
149
  * </script>
150
150
  * ```
@@ -181,7 +181,7 @@ function hasObjectLink(element, symbol) {
181
181
  *
182
182
  * ```
183
183
  * <script type="module">
184
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
184
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
185
185
  * Monster.DOM.getLinkedObjects();
186
186
  * </script>
187
187
  * ```
@@ -190,7 +190,7 @@ function hasObjectLink(element, symbol) {
190
190
  *
191
191
  * ```
192
192
  * <script type="module">
193
- * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
193
+ * import {getLinkedObjects} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
194
194
  * getLinkedObjects();
195
195
  * </script>
196
196
  * ```
@@ -226,7 +226,7 @@ function getLinkedObjects(element, symbol) {
226
226
  *
227
227
  * ```
228
228
  * <script type="module">
229
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
229
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
230
230
  * Monster.DOM.toggleAttributeToken();
231
231
  * </script>
232
232
  * ```
@@ -235,7 +235,7 @@ function getLinkedObjects(element, symbol) {
235
235
  *
236
236
  * ```
237
237
  * <script type="module">
238
- * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
238
+ * import {toggleAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
239
239
  * toggleAttributeToken();
240
240
  * </script>
241
241
  * ```
@@ -270,7 +270,7 @@ function toggleAttributeToken(element, key, token) {
270
270
  *
271
271
  * ```
272
272
  * <script type="module">
273
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
273
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
274
274
  * Monster.DOM.addAttributeToken();
275
275
  * </script>
276
276
  * ```
@@ -279,7 +279,7 @@ function toggleAttributeToken(element, key, token) {
279
279
  *
280
280
  * ```
281
281
  * <script type="module">
282
- * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
282
+ * import {addAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
283
283
  * addAttributeToken();
284
284
  * </script>
285
285
  * ```
@@ -316,7 +316,7 @@ function addAttributeToken(element, key, token) {
316
316
  *
317
317
  * ```
318
318
  * <script type="module">
319
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
319
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
320
320
  * Monster.DOM.removeAttributeToken();
321
321
  * </script>
322
322
  * ```
@@ -325,7 +325,7 @@ function addAttributeToken(element, key, token) {
325
325
  *
326
326
  * ```
327
327
  * <script type="module">
328
- * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
328
+ * import {removeAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
329
329
  * removeAttributeToken();
330
330
  * </script>
331
331
  * ```
@@ -361,7 +361,7 @@ function removeAttributeToken(element, key, token) {
361
361
  *
362
362
  * ```
363
363
  * <script type="module">
364
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
364
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
365
365
  * Monster.DOM.containsAttributeToken();
366
366
  * </script>
367
367
  * ```
@@ -370,7 +370,7 @@ function removeAttributeToken(element, key, token) {
370
370
  *
371
371
  * ```
372
372
  * <script type="module">
373
- * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
373
+ * import {containsAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
374
374
  * containsAttributeToken();
375
375
  * </script>
376
376
  * ```
@@ -403,7 +403,7 @@ function containsAttributeToken(element, key, token) {
403
403
  *
404
404
  * ```
405
405
  * <script type="module">
406
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
406
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
407
407
  * Monster.DOM.replaceAttributeToken();
408
408
  * </script>
409
409
  * ```
@@ -412,7 +412,7 @@ function containsAttributeToken(element, key, token) {
412
412
  *
413
413
  * ```
414
414
  * <script type="module">
415
- * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
415
+ * import {replaceAttributeToken} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
416
416
  * replaceAttributeToken();
417
417
  * </script>
418
418
  * ```
@@ -448,7 +448,7 @@ function replaceAttributeToken(element, key, from, to) {
448
448
  *
449
449
  * ```
450
450
  * <script type="module">
451
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
451
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
452
452
  * Monster.DOM.clearAttributeTokens();
453
453
  * </script>
454
454
  * ```
@@ -457,7 +457,7 @@ function replaceAttributeToken(element, key, from, to) {
457
457
  *
458
458
  * ```
459
459
  * <script type="module">
460
- * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
460
+ * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
461
461
  * clearAttributeTokens();
462
462
  * </script>
463
463
  * ```
@@ -487,7 +487,7 @@ function clearAttributeTokens(element, key) {
487
487
  *
488
488
  * ```
489
489
  * <script type="module">
490
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
490
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
491
491
  * Monster.DOM.findClosestByAttribute();
492
492
  * </script>
493
493
  * ```
@@ -496,7 +496,7 @@ function clearAttributeTokens(element, key) {
496
496
  *
497
497
  * ```
498
498
  * <script type="module">
499
- * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/attributes.js';
499
+ * import {clearAttributeTokens} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/attributes.js';
500
500
  * findClosestByAttribute();
501
501
  * </script>
502
502
  * ```
@@ -536,7 +536,7 @@ function findClosestByAttribute(element, key, value) {
536
536
  }
537
537
 
538
538
  // exports
539
- Monster.assignToNamespace('Monster.DOM', getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);
539
+ assignToNamespace('Monster.DOM', getLinkedObjects, addToObjectLink, removeObjectLink, findClosestByAttribute, hasObjectLink, clearAttributeTokens, replaceAttributeToken, containsAttributeToken, removeAttributeToken, addAttributeToken, toggleAttributeToken);
540
540
  export {
541
541
  Monster,
542
542
  addToObjectLink,
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import {Monster} from "../namespace.js";
4
-
3
+ import {Monster, assignToNamespace} from '../namespace.js';
5
4
  /**
6
5
  * @author schukai GmbH
7
6
  */
@@ -3,11 +3,9 @@
3
3
  /**
4
4
  * @author schukai GmbH
5
5
  */
6
-
6
+ import {Monster, assignToNamespace} from '../namespace.js';
7
7
  import {extend} from "../data/extend.js";
8
- import {isArray} from "../types/is.js";
9
- import {OBJECTLINK_KEY_UPDATER} from "./constants.js";
10
- import {Monster, CustomElement} from "./customelement.js";
8
+ import { CustomElement} from "./customelement.js";
11
9
 
12
10
 
13
11
  /**
@@ -29,7 +27,7 @@ const internalSymbol = Symbol('internalSymbol');
29
27
  *
30
28
  * ```
31
29
  * <script type="module">
32
- * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/customcontrol.js';
30
+ * import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/customcontrol.js';
33
31
  * console.log(new Monster.DOM.CustomControl())
34
32
  * </script>
35
33
  * ```
@@ -38,7 +36,7 @@ const internalSymbol = Symbol('internalSymbol');
38
36
  *
39
37
  * ```
40
38
  * <script type="module">
41
- * import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.14.1/dist/modules/dom/customcontrol.js';
39
+ * import {CustomControl} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.15.0/dist/modules/dom/customcontrol.js';
42
40
  * console.log(new CustomControl())
43
41
  * </script>
44
42
  * ```
@@ -59,7 +57,7 @@ class CustomControl extends CustomElement {
59
57
  constructor() {
60
58
  super();
61
59
 
62
- if (typeof this['attachInternals'] === 'function' && this.getOption('formAssociated') === true) {
60
+ if (typeof this['attachInternals'] === 'function') {
63
61
  // currently only supported by chrome
64
62
  this[internalSymbol] = this.attachInternals();
65
63
  }
@@ -67,15 +65,15 @@ class CustomControl extends CustomElement {
67
65
  }
68
66
 
69
67
  /**
70
- * | option | description |
71
- * |----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
72
- * | formAssociated | Adding a static formAssociated property, with a true value, makes an autonomous custom element a form-associated custom element. |
68
+ * | option | description |
69
+ * |----------------|---------------------------------|
70
+ * | | |
73
71
  *
74
72
  * Derived classes can override and extend this method as follows.
75
73
  *
76
74
  * ```
77
75
  * get defaults() {
78
- * return Object.assign({}, super.defaults, {
76
+ * return extends{}, super.defaults, {
79
77
  * myValue:true
80
78
  * });
81
79
  * }
@@ -83,45 +81,11 @@ class CustomControl extends CustomElement {
83
81
  *
84
82
  * @see https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-face-example
85
83
  * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
86
- * @return {{shadowMode: string, delegatesFocus: boolean}}
84
+ * @return {object}
87
85
  * @since 1.14.0
88
86
  */
89
87
  get defaults() {
90
-
91
- return Object.assign({}, super.defaults, {
92
- formAssociated: true
93
- });
94
-
95
- }
96
-
97
- /**
98
- * This method determines which attributes are to be monitored by `attributeChangedCallback()`.
99
- *
100
- * @return {string[]}
101
- * @since 1.14.0
102
- */
103
- static get observedAttributes() {
104
- return [];
105
- }
106
-
107
- /**
108
- * This method can be implemented in a derived class. The attributes must be defined in `observedAttributes()`.
109
- *
110
- * @param {string} name
111
- * @param {string} oldValue
112
- * @param {string} newValue
113
- * @since 1.14.0
114
- * @throws {Error} attributes but no handles have been defined
115
- */
116
- attributeChangedCallback(name, oldValue, newValue) {
117
-
118
- const a = this.constructor.observedAttributes();
119
-
120
- if (!a || (isArray(a) && a.length > 0)) {
121
- throw new Error('attributes but no handles have been defined');
122
- }
123
-
124
-
88
+ return extend({}, super.defaults);
125
89
  }
126
90
 
127
91
  /**
@@ -325,13 +289,13 @@ class CustomControl extends CustomElement {
325
289
  */
326
290
  function getInternal() {
327
291
  const self = this;
328
-
292
+
329
293
  if (!(internalSymbol in this)) {
330
- throw new Error('the ElementInternals is not supported and a polyfill is necessary');
294
+ throw new Error('ElementInternals is not supported and a polyfill is necessary');
331
295
  }
332
296
 
333
297
  return this[internalSymbol];
334
298
  }
335
299
 
336
- Monster.assignToNamespace('Monster.DOM', CustomControl);
300
+ assignToNamespace('Monster.DOM', CustomControl);
337
301
  export {Monster, CustomControl}