@schukai/monster 3.80.2 → 3.80.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/source/components/content/copy.mjs +7 -4
- package/source/components/datatable/change-button.mjs +1 -1
- package/source/components/datatable/columnbar.mjs +1 -1
- package/source/components/datatable/dataset.mjs +3 -3
- package/source/components/datatable/datasource/dom.mjs +2 -2
- package/source/components/datatable/datasource/rest.mjs +7 -7
- package/source/components/datatable/datasource.mjs +3 -3
- package/source/components/datatable/datatable/header.mjs +11 -11
- package/source/components/datatable/datatable.mjs +15 -15
- package/source/components/datatable/embedded-pagination.mjs +2 -2
- package/source/components/datatable/filter/date-range.mjs +5 -5
- package/source/components/datatable/filter/input.mjs +2 -2
- package/source/components/datatable/filter/range.mjs +3 -3
- package/source/components/datatable/filter/settings.mjs +5 -5
- package/source/components/datatable/filter/util.mjs +3 -3
- package/source/components/datatable/filter-button.mjs +1 -1
- package/source/components/datatable/filter.mjs +11 -11
- package/source/components/datatable/pagination.mjs +3 -3
- package/source/components/datatable/save-button.mjs +1 -1
- package/source/components/datatable/status.mjs +1 -1
- package/source/components/form/action-button.mjs +2 -2
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +3 -3
- package/source/components/form/confirm-button.mjs +4 -4
- package/source/components/form/context-error.mjs +4 -4
- package/source/components/form/context-help.mjs +1 -1
- package/source/components/form/field-set.mjs +2 -2
- package/source/components/form/form.mjs +3 -3
- package/source/components/form/message-state-button.mjs +6 -6
- package/source/components/form/popper-button.mjs +1 -1
- package/source/components/form/reload.mjs +5 -22
- package/source/components/form/select.mjs +11 -10
- package/source/components/form/shadow-reload.mjs +1 -1
- package/source/components/form/state-button.mjs +1 -1
- package/source/components/form/template.mjs +4 -4
- package/source/components/form/toggle-switch.mjs +1 -1
- package/source/components/form/tree-select.mjs +1 -1
- package/source/components/form/util/floating-ui.mjs +1 -1
- package/source/components/host/call-button.mjs +1 -1
- package/source/components/host/config-manager.mjs +6 -6
- package/source/components/host/host.mjs +8 -8
- package/source/components/host/overlay.mjs +13 -13
- package/source/components/host/toggle-button.mjs +1 -1
- package/source/components/host/util.mjs +1 -1
- package/source/components/host/viewer.mjs +5 -5
- package/source/components/layout/collapse.mjs +20 -19
- package/source/components/layout/details.mjs +5 -5
- package/source/components/layout/iframe.mjs +2 -2
- package/source/components/layout/panel.mjs +3 -3
- package/source/components/layout/popper.mjs +1 -1
- package/source/components/layout/slider.mjs +6 -6
- package/source/components/layout/split-panel.mjs +3 -3
- package/source/components/layout/tabs.mjs +3 -9
- package/source/components/layout/width-toggle.mjs +4 -4
- package/source/components/navigation/table-of-content.mjs +3 -3
- package/source/components/notify/message.mjs +0 -1
- package/source/components/state/log/entry.mjs +6 -6
- package/source/components/state/log.mjs +3 -39
- package/source/components/state/state.mjs +1 -1
- package/source/components/tree-menu/dragable-tree-menu.mjs +2 -2
- package/source/components/tree-menu/tree-menu.mjs +1 -1
- package/source/constraints/abstract.mjs +2 -2
- package/source/constraints/abstractoperator.mjs +1 -1
- package/source/constraints/andoperator.mjs +5 -5
- package/source/constraints/invalid.mjs +5 -5
- package/source/constraints/isarray.mjs +5 -5
- package/source/constraints/isobject.mjs +5 -5
- package/source/constraints/oroperator.mjs +5 -5
- package/source/constraints/valid.mjs +4 -4
- package/source/data/buildmap.mjs +2 -1
- package/source/data/datasource/dom.mjs +1 -1
- package/source/data/datasource/server/restapi/data-fetch-error.mjs +1 -1
- package/source/data/datasource/server/restapi/writeerror.mjs +1 -1
- package/source/data/datasource/server/restapi.mjs +2 -2
- package/source/data/datasource/server/webconnect.mjs +4 -4
- package/source/data/datasource/server.mjs +5 -5
- package/source/data/datasource/storage/localstorage.mjs +1 -1
- package/source/data/datasource/storage/sessionstorage.mjs +1 -1
- package/source/data/datasource/storage.mjs +1 -1
- package/source/data/datasource.mjs +4 -5
- package/source/data/pathfinder.mjs +10 -9
- package/source/data/pipe.mjs +5 -4
- package/source/data/transformer.mjs +23 -11
- package/source/dom/assembler.mjs +2 -2
- package/source/dom/attributes.mjs +2 -2
- package/source/dom/customcontrol.mjs +1 -1
- package/source/dom/customelement.mjs +36 -67
- package/source/dom/dimension.mjs +3 -3
- package/source/dom/focusmanager.mjs +1 -1
- package/source/dom/locale.mjs +1 -1
- package/source/dom/resource/data.mjs +1 -1
- package/source/dom/resource/link/stylesheet.mjs +1 -1
- package/source/dom/resource/link.mjs +1 -1
- package/source/dom/resource/script.mjs +1 -1
- package/source/dom/template.mjs +2 -2
- package/source/dom/theme.mjs +2 -2
- package/source/dom/updater.mjs +5 -6
- package/source/dom/util/extract-keys.mjs +1 -1
- package/source/dom/util/init-options-from-attributes.mjs +1 -1
- package/source/dom/util/set-option-from-attribute.mjs +1 -1
- package/source/dom/util.mjs +9 -9
- package/source/i18n/formatter.mjs +1 -1
- package/source/i18n/locale.mjs +2 -2
- package/source/i18n/provider.mjs +1 -1
- package/source/i18n/providers/embed.mjs +1 -3
- package/source/i18n/translations.mjs +2 -2
- package/source/logging/handler/console.mjs +1 -1
- package/source/logging/handler.mjs +11 -11
- package/source/logging/logentry.mjs +2 -2
- package/source/logging/logger.mjs +11 -11
- package/source/math/random.mjs +2 -2
- package/source/monster.mjs +1 -0
- package/source/net/webconnect/message.mjs +3 -3
- package/source/net/webconnect.mjs +10 -10
- package/source/text/bracketed-key-value-hash.mjs +2 -2
- package/source/text/generate-range-comparison-expression.mjs +1 -1
- package/source/types/base.mjs +4 -4
- package/source/types/basewithoptions.mjs +3 -4
- package/source/types/dataurl.mjs +6 -8
- package/source/types/global.mjs +2 -2
- package/source/types/internal.mjs +3 -3
- package/source/types/is.mjs +10 -20
- package/source/types/mediatype.mjs +1 -1
- package/source/types/node.mjs +1 -1
- package/source/types/nodelist.mjs +7 -7
- package/source/types/observablequeue.mjs +7 -7
- package/source/types/observer.mjs +6 -6
- package/source/types/proxyobserver.mjs +8 -8
- package/source/types/queue.mjs +3 -3
- package/source/types/stack.mjs +3 -3
- package/source/types/tokenlist.mjs +12 -12
- package/source/types/uniquequeue.mjs +2 -2
- package/source/types/version.mjs +4 -4
- package/source/util/clone.mjs +2 -2
- package/source/util/comparator.mjs +1 -2
- package/source/util/deadmansswitch.mjs +7 -5
- package/source/util/freeze.mjs +1 -1
- package/source/util/processing.mjs +2 -2
- package/source/util/runtime.mjs +1 -1
package/source/i18n/locale.mjs
CHANGED
@@ -109,7 +109,7 @@ class Locale extends Base {
|
|
109
109
|
|
110
110
|
/**
|
111
111
|
* This method is called by the `instanceof` operator.
|
112
|
-
* @
|
112
|
+
* @return {symbol}
|
113
113
|
* @since 3.27.0
|
114
114
|
*/
|
115
115
|
static get [instanceSymbol]() {
|
@@ -254,7 +254,7 @@ class Locale extends Base {
|
|
254
254
|
* ```
|
255
255
|
*
|
256
256
|
* @param {string} locale
|
257
|
-
* @
|
257
|
+
* @return {Locale}
|
258
258
|
* @license AGPLv3
|
259
259
|
* @since 1.14.0
|
260
260
|
* @copyright schukai GmbH
|
package/source/i18n/provider.mjs
CHANGED
@@ -30,9 +30,7 @@ export { Embed };
|
|
30
30
|
* @license AGPLv3
|
31
31
|
* @since 1.13.0
|
32
32
|
* @copyright schukai GmbH
|
33
|
-
* @memberOf Monster.I18n.Providers
|
34
33
|
* @see {@link https://datatracker.ietf.org/doc/html/rfc3066}
|
35
|
-
* @tutorial i18n-locale-and-formatter
|
36
34
|
*/
|
37
35
|
class Embed extends Provider {
|
38
36
|
/**
|
@@ -148,7 +146,7 @@ class Embed extends Provider {
|
|
148
146
|
* `script[data-monster-role=translations]` is searched for and the translations are assigned to the element.
|
149
147
|
*
|
150
148
|
* @param element
|
151
|
-
* @returns {Promise<Awaited<unknown>[]>}
|
149
|
+
* @returns {Promise<Awaited<*[]>>|Promise<Awaited<unknown>[]>}
|
152
150
|
*/
|
153
151
|
static assignTranslationsToElement(element) {
|
154
152
|
const d = getDocument();
|
@@ -56,7 +56,7 @@ class Translations extends Base {
|
|
56
56
|
|
57
57
|
/**
|
58
58
|
* This method is called by the `instanceof` operator.
|
59
|
-
* @
|
59
|
+
* @return {symbol}
|
60
60
|
* @since 3.27.0
|
61
61
|
*/
|
62
62
|
static get [instanceSymbol]() {
|
@@ -214,7 +214,7 @@ class Translations extends Base {
|
|
214
214
|
* Returns the translations for the current document.
|
215
215
|
*
|
216
216
|
* @param {HTMLElement|undefined} [element] - Element to search for translations. Default: element with objectlink @schukai/monster/i18n/translations@@link.
|
217
|
-
* @
|
217
|
+
* @return {Translations}
|
218
218
|
* @throws {Error} Element is not an HTMLElement.
|
219
219
|
* @throws {Error} Cannot find the element with translations. Add the translation object to the document.
|
220
220
|
* @throws {Error} This element has no translations.
|
@@ -45,7 +45,7 @@ class Handler extends Base {
|
|
45
45
|
* ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;
|
46
46
|
*
|
47
47
|
* @param {LogEntry} entry
|
48
|
-
* @
|
48
|
+
* @return {boolean}
|
49
49
|
*/
|
50
50
|
log(entry) {
|
51
51
|
validateInstance(entry, LogEntry);
|
@@ -61,7 +61,7 @@ class Handler extends Base {
|
|
61
61
|
* set loglevel
|
62
62
|
*
|
63
63
|
* @param {integer} loglevel
|
64
|
-
* @
|
64
|
+
* @return {Handler}
|
65
65
|
* @since 1.5.0
|
66
66
|
*/
|
67
67
|
setLogLevel(loglevel) {
|
@@ -73,7 +73,7 @@ class Handler extends Base {
|
|
73
73
|
/**
|
74
74
|
* get loglevel
|
75
75
|
*
|
76
|
-
* @
|
76
|
+
* @return {integer}
|
77
77
|
* @since 1.5.0
|
78
78
|
*/
|
79
79
|
getLogLevel() {
|
@@ -83,7 +83,7 @@ class Handler extends Base {
|
|
83
83
|
/**
|
84
84
|
* Set log level to All
|
85
85
|
*
|
86
|
-
* @
|
86
|
+
* @return {Handler}
|
87
87
|
* @since 1.5.0
|
88
88
|
*/
|
89
89
|
setAll() {
|
@@ -94,7 +94,7 @@ class Handler extends Base {
|
|
94
94
|
/**
|
95
95
|
* Set log level to Trace
|
96
96
|
*
|
97
|
-
* @
|
97
|
+
* @return {Handler}
|
98
98
|
* @since 1.5.0
|
99
99
|
*/
|
100
100
|
setTrace() {
|
@@ -105,7 +105,7 @@ class Handler extends Base {
|
|
105
105
|
/**
|
106
106
|
* Set log level to Debug
|
107
107
|
*
|
108
|
-
* @
|
108
|
+
* @return {Handler}
|
109
109
|
* @since 1.5.0
|
110
110
|
*/
|
111
111
|
setDebug() {
|
@@ -116,7 +116,7 @@ class Handler extends Base {
|
|
116
116
|
/**
|
117
117
|
* Set log level to Info
|
118
118
|
*
|
119
|
-
* @
|
119
|
+
* @return {Handler}
|
120
120
|
* @since 1.5.0
|
121
121
|
*/
|
122
122
|
setInfo() {
|
@@ -127,7 +127,7 @@ class Handler extends Base {
|
|
127
127
|
/**
|
128
128
|
* Set log level to Warn
|
129
129
|
*
|
130
|
-
* @
|
130
|
+
* @return {undefined}
|
131
131
|
* @since 1.5.0
|
132
132
|
*/
|
133
133
|
setWarn() {
|
@@ -138,7 +138,7 @@ class Handler extends Base {
|
|
138
138
|
/**
|
139
139
|
* Set log level to Error
|
140
140
|
*
|
141
|
-
* @
|
141
|
+
* @return {Handler}
|
142
142
|
* @since 1.5.0
|
143
143
|
*/
|
144
144
|
setError() {
|
@@ -149,7 +149,7 @@ class Handler extends Base {
|
|
149
149
|
/**
|
150
150
|
* Set log level to Fatal
|
151
151
|
*
|
152
|
-
* @
|
152
|
+
* @return {Handler}
|
153
153
|
* @since 1.5.0
|
154
154
|
*/
|
155
155
|
setFatal() {
|
@@ -160,7 +160,7 @@ class Handler extends Base {
|
|
160
160
|
/**
|
161
161
|
* Set log level to Off
|
162
162
|
*
|
163
|
-
* @
|
163
|
+
* @return {Handler}
|
164
164
|
* @since 1.5.0
|
165
165
|
*/
|
166
166
|
setOff() {
|
@@ -41,7 +41,7 @@ class LogEntry extends Base {
|
|
41
41
|
|
42
42
|
/**
|
43
43
|
*
|
44
|
-
* @
|
44
|
+
* @return {integerr}
|
45
45
|
*/
|
46
46
|
getLogLevel() {
|
47
47
|
return this.loglevel;
|
@@ -49,7 +49,7 @@ class LogEntry extends Base {
|
|
49
49
|
|
50
50
|
/**
|
51
51
|
*
|
52
|
-
* @
|
52
|
+
* @return {array}
|
53
53
|
*/
|
54
54
|
getArguments() {
|
55
55
|
return this.arguments;
|
@@ -84,7 +84,7 @@ class Logger extends Base {
|
|
84
84
|
/**
|
85
85
|
*
|
86
86
|
* @param {Handler} handler
|
87
|
-
* @
|
87
|
+
* @return {Logger}
|
88
88
|
* @throws {Error} the handler must be an instance of Handler
|
89
89
|
*/
|
90
90
|
addHandler(handler) {
|
@@ -100,7 +100,7 @@ class Logger extends Base {
|
|
100
100
|
/**
|
101
101
|
*
|
102
102
|
* @param {Handler} handler
|
103
|
-
* @
|
103
|
+
* @return {Logger}
|
104
104
|
* @throws {Error} the handler must be an instance of Handler
|
105
105
|
*/
|
106
106
|
removeHandler(handler) {
|
@@ -119,7 +119,7 @@ class Logger extends Base {
|
|
119
119
|
* ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;
|
120
120
|
*
|
121
121
|
* @param {*} arguments
|
122
|
-
* @
|
122
|
+
* @return {Logger}
|
123
123
|
* @since 1.5.0
|
124
124
|
*/
|
125
125
|
logTrace(...args) {
|
@@ -137,7 +137,7 @@ class Logger extends Base {
|
|
137
137
|
* ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;
|
138
138
|
*
|
139
139
|
* @param {*} arguments
|
140
|
-
* @
|
140
|
+
* @return {Logger}
|
141
141
|
* @since 1.5.0
|
142
142
|
*/
|
143
143
|
logDebug(...args) {
|
@@ -156,7 +156,7 @@ class Logger extends Base {
|
|
156
156
|
*
|
157
157
|
*
|
158
158
|
* @param {*} arguments
|
159
|
-
* @
|
159
|
+
* @return {Logger}
|
160
160
|
* @since 1.5.0
|
161
161
|
*/
|
162
162
|
logInfo(...args) {
|
@@ -174,7 +174,7 @@ class Logger extends Base {
|
|
174
174
|
* ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;
|
175
175
|
*
|
176
176
|
* @param {*} arguments
|
177
|
-
* @
|
177
|
+
* @return {Logger}
|
178
178
|
* @since 1.5.0
|
179
179
|
*/
|
180
180
|
logWarn(...args) {
|
@@ -192,7 +192,7 @@ class Logger extends Base {
|
|
192
192
|
* ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;
|
193
193
|
*
|
194
194
|
* @param {*} arguments
|
195
|
-
* @
|
195
|
+
* @return {Logger}
|
196
196
|
* @since 1.5.0
|
197
197
|
*/
|
198
198
|
logError(...args) {
|
@@ -210,7 +210,7 @@ class Logger extends Base {
|
|
210
210
|
* ALL > TRACE > DEBUG > INFO > WARN > ERROR > FATAL > OFF (ALL = 0xff;OFF = 0x00;
|
211
211
|
*
|
212
212
|
* @param {*} arguments
|
213
|
-
* @
|
213
|
+
* @return {Logger}
|
214
214
|
* @since 1.5.0
|
215
215
|
*/
|
216
216
|
logFatal(...args) {
|
@@ -226,7 +226,7 @@ class Logger extends Base {
|
|
226
226
|
* Labels
|
227
227
|
*
|
228
228
|
* @param {integer} level
|
229
|
-
* @
|
229
|
+
* @return {string}
|
230
230
|
*/
|
231
231
|
getLabel(level) {
|
232
232
|
validateInteger(level);
|
@@ -247,7 +247,7 @@ class Logger extends Base {
|
|
247
247
|
* Level
|
248
248
|
*
|
249
249
|
* @param {string} label
|
250
|
-
* @
|
250
|
+
* @return {integer}
|
251
251
|
*/
|
252
252
|
getLevel(label) {
|
253
253
|
validateString(label);
|
@@ -270,7 +270,7 @@ class Logger extends Base {
|
|
270
270
|
*
|
271
271
|
* @param {integer} loglevel
|
272
272
|
* @param {*} args
|
273
|
-
* @
|
273
|
+
* @return {Logger}
|
274
274
|
* @private
|
275
275
|
*/
|
276
276
|
function triggerLog(loglevel, ...args) {
|
package/source/math/random.mjs
CHANGED
@@ -21,7 +21,7 @@ export { random };
|
|
21
21
|
*
|
22
22
|
* @param {number} min starting value of the definition set (default is 0)
|
23
23
|
* @param {number} max end value of the definition set (default is 1000000000)
|
24
|
-
* @
|
24
|
+
* @return {number}
|
25
25
|
* @memberOf Monster.Math
|
26
26
|
* @throws {Error} missing crypt
|
27
27
|
* @throws {Error} we cannot generate numbers larger than 53 bits.
|
@@ -62,7 +62,7 @@ Math.log2 =
|
|
62
62
|
*
|
63
63
|
* @param {number} min
|
64
64
|
* @param {number} max
|
65
|
-
* @
|
65
|
+
* @return {number}
|
66
66
|
* @private
|
67
67
|
* @throws {Error} missing crypt
|
68
68
|
* @throws {Error} we cannot generate numbers larger than 53 bits.
|
package/source/monster.mjs
CHANGED
@@ -106,6 +106,7 @@ export * from "./util/deadmansswitch.mjs";
|
|
106
106
|
export * from "./util/comparator.mjs";
|
107
107
|
export * from "./util/freeze.mjs";
|
108
108
|
export * from "./util/clone.mjs";
|
109
|
+
export * from "./util/processing/callback.mjs";
|
109
110
|
export * from "./logging/handler/console.mjs";
|
110
111
|
export * from "./logging/logger.mjs";
|
111
112
|
export * from "./logging/handler.mjs";
|
@@ -40,14 +40,14 @@ class Message extends Base {
|
|
40
40
|
/**
|
41
41
|
* Returns the raw message.
|
42
42
|
*
|
43
|
-
* @
|
43
|
+
* @return {object}
|
44
44
|
*/
|
45
45
|
getData() {
|
46
46
|
return this[dataSymbol];
|
47
47
|
}
|
48
48
|
|
49
49
|
/**
|
50
|
-
* @
|
50
|
+
* @return {*}
|
51
51
|
*/
|
52
52
|
toJSON() {
|
53
53
|
return this[dataSymbol];
|
@@ -55,7 +55,7 @@ class Message extends Base {
|
|
55
55
|
|
56
56
|
/**
|
57
57
|
* @param {string} json
|
58
|
-
* @
|
58
|
+
* @return {Message}
|
59
59
|
* @throws {TypeError} value is not a string
|
60
60
|
*/
|
61
61
|
static fromJSON(json) {
|
@@ -209,7 +209,7 @@ class WebConnect extends BaseWithOptions {
|
|
209
209
|
|
210
210
|
/**
|
211
211
|
*
|
212
|
-
* @
|
212
|
+
* @return {Promise}
|
213
213
|
*/
|
214
214
|
connect() {
|
215
215
|
return new Promise((resolve, reject) => {
|
@@ -218,7 +218,7 @@ class WebConnect extends BaseWithOptions {
|
|
218
218
|
}
|
219
219
|
|
220
220
|
/**
|
221
|
-
* @
|
221
|
+
* @return {boolean}
|
222
222
|
*/
|
223
223
|
isConnected() {
|
224
224
|
return this[connectionSymbol]?.socket?.readyState === 1;
|
@@ -226,7 +226,7 @@ class WebConnect extends BaseWithOptions {
|
|
226
226
|
|
227
227
|
/**
|
228
228
|
* This method is called by the `instanceof` operator.
|
229
|
-
* @
|
229
|
+
* @return {symbol}
|
230
230
|
*/
|
231
231
|
static get [instanceSymbol]() {
|
232
232
|
return Symbol.for("@schukai/monster/net/webconnect");
|
@@ -259,7 +259,7 @@ class WebConnect extends BaseWithOptions {
|
|
259
259
|
*
|
260
260
|
* @param {Number} [code=1000] The close code.
|
261
261
|
* @param {String} [reason=""] The close reason.
|
262
|
-
* @
|
262
|
+
* @return {Promise}
|
263
263
|
* @see https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1
|
264
264
|
*/
|
265
265
|
close(statusCode, reason) {
|
@@ -286,7 +286,7 @@ class WebConnect extends BaseWithOptions {
|
|
286
286
|
/**
|
287
287
|
* Polls the receive queue for new messages.
|
288
288
|
*
|
289
|
-
* @
|
289
|
+
* @return {Message}
|
290
290
|
*/
|
291
291
|
poll() {
|
292
292
|
return this[receiveQueueSymbol].poll();
|
@@ -295,7 +295,7 @@ class WebConnect extends BaseWithOptions {
|
|
295
295
|
/**
|
296
296
|
* Are there any messages in the receive queue?
|
297
297
|
*
|
298
|
-
* @
|
298
|
+
* @return {boolean}
|
299
299
|
*/
|
300
300
|
dataReceived() {
|
301
301
|
return !this[receiveQueueSymbol].isEmpty();
|
@@ -304,7 +304,7 @@ class WebConnect extends BaseWithOptions {
|
|
304
304
|
/**
|
305
305
|
* Get Message from the receive queue, but do not remove it.
|
306
306
|
*
|
307
|
-
* @
|
307
|
+
* @return {Object}
|
308
308
|
*/
|
309
309
|
peek() {
|
310
310
|
return this[receiveQueueSymbol].peek();
|
@@ -314,7 +314,7 @@ class WebConnect extends BaseWithOptions {
|
|
314
314
|
* Attach a new observer
|
315
315
|
*
|
316
316
|
* @param {Observer} observer
|
317
|
-
* @
|
317
|
+
* @return {ProxyObserver}
|
318
318
|
*/
|
319
319
|
attachObserver(observer) {
|
320
320
|
this[receiveQueueSymbol].attachObserver(observer);
|
@@ -325,7 +325,7 @@ class WebConnect extends BaseWithOptions {
|
|
325
325
|
* Detach a observer
|
326
326
|
*
|
327
327
|
* @param {Observer} observer
|
328
|
-
* @
|
328
|
+
* @return {ProxyObserver}
|
329
329
|
*/
|
330
330
|
detachObserver(observer) {
|
331
331
|
this[receiveQueueSymbol].detachObserver(observer);
|
@@ -334,7 +334,7 @@ class WebConnect extends BaseWithOptions {
|
|
334
334
|
|
335
335
|
/**
|
336
336
|
* @param {Observer} observer
|
337
|
-
* @
|
337
|
+
* @return {boolean}
|
338
338
|
*/
|
339
339
|
containsObserver(observer) {
|
340
340
|
return this[receiveQueueSymbol].containsObserver(observer);
|
@@ -48,7 +48,7 @@ export { parseBracketedKeyValueHash, createBracketedKeyValueHash };
|
|
48
48
|
*
|
49
49
|
* @since 3.37.0
|
50
50
|
* @param {string} hashString - The string to parse, containing bracketed key-value pairs.
|
51
|
-
* @
|
51
|
+
* @return {Object} - An object representing the parsed result, with keys representing the selectors and values representing the key-value pairs associated with each selector.
|
52
52
|
* - Returns an empty object if there was an error during parsing. */
|
53
53
|
function parseBracketedKeyValueHash(hashString) {
|
54
54
|
const selectors = {};
|
@@ -207,7 +207,7 @@ function parseBracketedKeyValueHash(hashString) {
|
|
207
207
|
*
|
208
208
|
* @param {Object} object - The object containing selectors and key-value pairs.
|
209
209
|
* @param {boolean} addHashPrefix - Whether to add the hash prefix # to the beginning of the string.
|
210
|
-
* @
|
210
|
+
* @return {string} The hash selector string.
|
211
211
|
* @since 3.37.0
|
212
212
|
*/
|
213
213
|
function createBracketedKeyValueHash(object, addHashPrefix = true) {
|
@@ -58,7 +58,7 @@ export { generateRangeComparisonExpression };
|
|
58
58
|
* @param {string} [options.eqOp='=='] - The comparison operator for equality to use.
|
59
59
|
* @param {string} [options.geOp='>='] - The comparison operator for greater than or equal to to use.
|
60
60
|
* @param {string} [options.leOp='<='] - The comparison operator for less than or equal to to use.
|
61
|
-
* @
|
61
|
+
* @return {string} The generated comparison expression.
|
62
62
|
* @throws {Error} If the input is invalid.
|
63
63
|
* @memberOf Monster.Text
|
64
64
|
* @summary Generates a comparison expression based on a range of values.
|
package/source/types/base.mjs
CHANGED
@@ -43,7 +43,7 @@ export { Base };
|
|
43
43
|
*/
|
44
44
|
class Base extends Object {
|
45
45
|
/**
|
46
|
-
* @
|
46
|
+
* @return {string}
|
47
47
|
*/
|
48
48
|
toString() {
|
49
49
|
return JSON.stringify(this);
|
@@ -51,7 +51,7 @@ class Base extends Object {
|
|
51
51
|
|
52
52
|
/**
|
53
53
|
* This method is called by the `instanceof` operator.
|
54
|
-
* @
|
54
|
+
* @return {symbol}
|
55
55
|
* @since 2.1.0
|
56
56
|
*/
|
57
57
|
static get [instanceSymbol]() {
|
@@ -61,7 +61,7 @@ class Base extends Object {
|
|
61
61
|
/**
|
62
62
|
* This method is called by the `instanceof` operator.
|
63
63
|
* @param that
|
64
|
-
* @
|
64
|
+
* @return {boolean}
|
65
65
|
* @since 2.1.0
|
66
66
|
*/
|
67
67
|
static [Symbol.hasInstance](that) {
|
@@ -96,7 +96,7 @@ class Base extends Object {
|
|
96
96
|
*
|
97
97
|
* @private
|
98
98
|
* @param obj
|
99
|
-
* @
|
99
|
+
* @return {boolean|any|boolean}
|
100
100
|
* @since 2.1.0
|
101
101
|
*/
|
102
102
|
function checkInstanceSymbol(obj) {
|
@@ -26,13 +26,12 @@ export { BaseWithOptions };
|
|
26
26
|
* This class is actually only used as a base class.
|
27
27
|
*
|
28
28
|
* Classes that require the possibility of options can be derived directly from this class.
|
29
|
-
* Derived classes almost always override the `
|
29
|
+
* Derived classes almost always override the `default` getter with their own values.
|
30
30
|
*
|
31
|
-
* @externalExample ../../example/types/basewithoptions.mjs
|
32
31
|
* @license AGPLv3
|
33
32
|
* @since 1.13.0
|
34
33
|
* @copyright schukai GmbH
|
35
|
-
* @deprecated since 3.15.0
|
34
|
+
* @deprecated since 3.15.0
|
36
35
|
*/
|
37
36
|
class BaseWithOptions extends Base {
|
38
37
|
/**
|
@@ -51,7 +50,7 @@ class BaseWithOptions extends Base {
|
|
51
50
|
|
52
51
|
/**
|
53
52
|
* This getter provides the options. Derived classes overwrite
|
54
|
-
* this getter with their own values. It is good karma to always include
|
53
|
+
* this getter with their own values. It is a good karma to always include
|
55
54
|
* the values from the parent class.
|
56
55
|
*
|
57
56
|
* ```javascript
|
package/source/types/dataurl.mjs
CHANGED
@@ -30,12 +30,11 @@ export { DataUrl, parseDataURL };
|
|
30
30
|
const internal = Symbol("internal");
|
31
31
|
|
32
32
|
/**
|
33
|
-
* You can create an object via the monster namespace `new
|
33
|
+
* You can create an object via the monster namespace `new DataUrl()`.
|
34
34
|
*
|
35
35
|
* @license AGPLv3
|
36
36
|
* @since 1.8.0
|
37
37
|
* @copyright schukai GmbH
|
38
|
-
* @memberOf Monster.Types
|
39
38
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
40
39
|
* @see https://datatracker.ietf.org/doc/html/rfc2397
|
41
40
|
*/
|
@@ -43,7 +42,7 @@ class DataUrl extends Base {
|
|
43
42
|
/**
|
44
43
|
*
|
45
44
|
* @param {String} content
|
46
|
-
* @param {String|
|
45
|
+
* @param {String|MediaType} mediatype
|
47
46
|
* @param {boolean} base64=true
|
48
47
|
*/
|
49
48
|
constructor(content, mediatype, base64) {
|
@@ -62,7 +61,7 @@ class DataUrl extends Base {
|
|
62
61
|
|
63
62
|
/**
|
64
63
|
* This method is called by the `instanceof` operator.
|
65
|
-
* @
|
64
|
+
* @return {symbol}
|
66
65
|
* @since 2.1.0
|
67
66
|
*/
|
68
67
|
static get [instanceSymbol]() {
|
@@ -98,7 +97,7 @@ class DataUrl extends Base {
|
|
98
97
|
}
|
99
98
|
|
100
99
|
/**
|
101
|
-
* You can call the function via the monster namespace `
|
100
|
+
* You can call the function via the monster namespace `parseDataURL()`.
|
102
101
|
*
|
103
102
|
* Specification:
|
104
103
|
*
|
@@ -109,13 +108,12 @@ class DataUrl extends Base {
|
|
109
108
|
* parameter := attribute "=" value
|
110
109
|
* ```
|
111
110
|
*
|
112
|
-
* @param {String} dataurl
|
113
|
-
* @return {Monster.Types.DataUrl}
|
114
111
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
115
112
|
* @see https://datatracker.ietf.org/doc/html/rfc2397
|
116
113
|
* @throws {TypeError} incorrect or missing data protocol
|
117
114
|
* @throws {TypeError} malformed data url
|
118
|
-
* @
|
115
|
+
* @param {string} dataurl
|
116
|
+
* @return {DataUrl}
|
119
117
|
*/
|
120
118
|
function parseDataURL(dataurl) {
|
121
119
|
validateString(dataurl);
|
package/source/types/global.mjs
CHANGED
@@ -74,7 +74,7 @@ let globalReference;
|
|
74
74
|
* @license AGPLv3
|
75
75
|
* @since 1.6.0
|
76
76
|
* @memberOf Monster.Types
|
77
|
-
* @
|
77
|
+
* @return {object} globalThis
|
78
78
|
*/
|
79
79
|
function getGlobal() {
|
80
80
|
return globalReference;
|
@@ -107,7 +107,7 @@ function getGlobal() {
|
|
107
107
|
* @since 1.6.0
|
108
108
|
* @memberOf Monster.Types
|
109
109
|
* @param {string} name
|
110
|
-
* @
|
110
|
+
* @return {object}
|
111
111
|
* @throws {Error} the object is not defined
|
112
112
|
* @throws {TypeError} value is not a object
|
113
113
|
* @throws {TypeError} value is not a string
|
@@ -63,7 +63,7 @@ function equipWithInternal() {
|
|
63
63
|
* Attach a new observer
|
64
64
|
*
|
65
65
|
* @param {Observer} observer
|
66
|
-
* @
|
66
|
+
* @return {ProxyObserver}
|
67
67
|
*/
|
68
68
|
this["attachInternalObserver"] = (observer) => {
|
69
69
|
this[internalSymbol].attachObserver(observer);
|
@@ -74,7 +74,7 @@ function equipWithInternal() {
|
|
74
74
|
* Detach a observer
|
75
75
|
*
|
76
76
|
* @param {Observer} observer
|
77
|
-
* @
|
77
|
+
* @return {ProxyObserver}
|
78
78
|
*/
|
79
79
|
this["detachInternalObserver"] = (observer) => {
|
80
80
|
this[internalSymbol].detachObserver(observer);
|
@@ -85,7 +85,7 @@ function equipWithInternal() {
|
|
85
85
|
* Check if a observer is attached
|
86
86
|
*
|
87
87
|
* @param {Observer} observer
|
88
|
-
* @
|
88
|
+
* @return {boolean}
|
89
89
|
*/
|
90
90
|
this["containsInternalObserver"] = (observer) => {
|
91
91
|
return this[internalSymbol].containsObserver(observer);
|