@schukai/monster 3.69.2 → 3.71.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.md +29 -4
  2. package/package.json +1 -1
  3. package/source/components/datatable/dataset.mjs +278 -202
  4. package/source/components/datatable/datasource/dom.mjs +1 -1
  5. package/source/components/datatable/datasource/rest.mjs +410 -404
  6. package/source/components/datatable/filter.mjs +1 -0
  7. package/source/components/datatable/save-button.mjs +1 -9
  8. package/source/components/datatable/style/datatable.pcss +1 -1
  9. package/source/components/datatable/style/filter-controls-defaults.pcss +1 -1
  10. package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +8 -17
  11. package/source/components/form/context-error.mjs +2 -0
  12. package/source/components/form/context-help.mjs +1 -0
  13. package/source/components/form/field-set.mjs +222 -225
  14. package/source/components/form/form.mjs +185 -545
  15. package/source/components/form/select.mjs +24 -9
  16. package/source/components/form/style/field-set.pcss +84 -7
  17. package/source/components/form/style/form.pcss +5 -3
  18. package/source/components/form/style/select.pcss +5 -4
  19. package/source/components/form/stylesheet/field-set.mjs +7 -14
  20. package/source/components/form/stylesheet/form.mjs +8 -17
  21. package/source/components/form/stylesheet/select.mjs +7 -14
  22. package/source/components/layout/style/collapse.pcss +0 -2
  23. package/source/components/layout/stylesheet/collapse.mjs +7 -14
  24. package/source/components/style/form.pcss +66 -3
  25. package/source/components/style/mixin/property.pcss +8 -1
  26. package/source/components/style/typography.pcss +4 -12
  27. package/source/components/stylesheet/form.mjs +8 -17
  28. package/source/components/stylesheet/mixin/form.mjs +7 -16
  29. package/source/components/stylesheet/mixin/property.mjs +6 -13
  30. package/source/components/stylesheet/typography.mjs +7 -16
  31. package/source/data/datasource/server/restapi.mjs +191 -180
  32. package/source/data/datasource/server.mjs +118 -74
  33. package/source/data/diff.mjs +1 -1
  34. package/source/dom/customelement.mjs +4 -0
  35. package/source/dom/updater.mjs +1 -1
  36. package/source/types/tokenlist.mjs +2 -2
  37. package/test/cases/components/form/form.mjs +1 -182
  38. package/test/cases/components/host/details.mjs +1 -1
  39. package/test/cases/components/host/host.mjs +1 -1
  40. package/test/cases/components/host/overlay.mjs +1 -1
  41. package/test/cases/data/diff.mjs +37 -0
  42. package/test/cases/dom/customcontrol.mjs +1 -1
  43. package/test/cases/dom/customelement.mjs +2 -2
  44. package/source/components/style/mixin/form.pcss +0 -242
@@ -12,13 +12,14 @@
12
12
  * SPDX-License-Identifier: AGPL-3.0
13
13
  */
14
14
 
15
- import { internalSymbol, instanceSymbol } from "../../../constants.mjs";
16
- import { isObject, isFunction } from "../../../types/is.mjs";
17
- import { Server } from "../server.mjs";
18
- import { WriteError } from "./restapi/writeerror.mjs";
19
- import { DataFetchError } from "./restapi/data-fetch-error.mjs";
15
+ import {internalSymbol, instanceSymbol} from "../../../constants.mjs";
16
+ import {isObject, isFunction, isArray} from "../../../types/is.mjs";
17
+ import {diff} from "../../diff.mjs";
18
+ import {Server} from "../server.mjs";
19
+ import {WriteError} from "./restapi/writeerror.mjs";
20
+ import {DataFetchError} from "./restapi/data-fetch-error.mjs";
20
21
 
21
- export { RestAPI };
22
+ export {RestAPI};
22
23
 
23
24
  /**
24
25
  * @type {symbol}
@@ -27,9 +28,10 @@ export { RestAPI };
27
28
  * @since 3.12.0
28
29
  */
29
30
  const rawDataSymbol = Symbol.for(
30
- "@schukai/monster/data/datasource/server/restapi/rawdata",
31
+ "@schukai/monster/data/datasource/server/restapi/rawdata",
31
32
  );
32
33
 
34
+
33
35
  /**
34
36
  * The RestAPI is a class that enables a REST API server.
35
37
  *
@@ -41,138 +43,145 @@ const rawDataSymbol = Symbol.for(
41
43
  * @summary The RestAPI is a class that binds a REST API server.
42
44
  */
43
45
  class RestAPI extends Server {
44
- /**
45
- *
46
- * @param {Object} [options] options contains definitions for the datasource.
47
- */
48
- constructor(options) {
49
- super();
50
-
51
- if (isObject(options)) {
52
- this.setOptions(options);
53
- }
54
- }
55
-
56
- /**
57
- * This method is called by the `instanceof` operator.
58
- * @returns {symbol}
59
- * @since 2.1.0
60
- */
61
- static get [instanceSymbol]() {
62
- return Symbol.for("@schukai/monster/data/datasource/server/restapi");
63
- }
64
-
65
- /**
66
- * @property {Object} write={} Options
67
- * @property {Object} write.init={} An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request|Request constructor}
68
- * @property {string} write.init.method=POST
69
- * @property {Object} write.init.headers Object containing any custom headers that you want to apply to the request.
70
- * @property {string} write.responseCallback Callback function to be executed after the request has been completed.
71
- * @property {string} write.acceptedStatus=[200,201]
72
- * @property {string} write.url URL
73
- * @property {Object} write.mapping the mapping is applied before writing.
74
- * @property {String} write.mapping.transformer Transformer to select the appropriate entries
75
- * @property {Monster.Data.Datasource~exampleCallback[]} write.mapping.callback with the help of the callback, the structures can be adjusted before writing.
76
- * @property {Object} write.report
77
- * @property {String} write.report.path Path to validations
78
- * @property {Object} write.sheathing
79
- * @property {Object} write.sheathing.object Object to be wrapped
80
- * @property {string} write.sheathing.path Path to the data
81
- * @property {Object} read={} Options
82
- * @property {Object} read.init={} An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request|Request constructor}
83
- * @property {string} read.init.method=GET
84
- * @property {string} read.acceptedStatus=[200]
85
- * @property {string} read.url URL
86
- * @property {Object} read.mapping the mapping is applied after reading.
87
- * @property {String} read.mapping.transformer Transformer to select the appropriate entries
88
- * @property {Monster.Data.Datasource~exampleCallback[]} read.mapping.callback with the help of the callback, the structures can be adjusted after reading.
89
- */
90
- get defaults() {
91
- return Object.assign({}, super.defaults, {
92
- write: {
93
- init: {
94
- method: "POST",
95
- },
96
- responseCallback: undefined,
97
- acceptedStatus: [200, 201],
98
- url: null,
99
- mapping: {
100
- transformer: undefined,
101
- callbacks: [],
102
- },
103
- sheathing: {
104
- object: undefined,
105
- path: undefined,
106
- },
107
- report: {
108
- path: undefined,
109
- },
110
- },
111
- read: {
112
- init: {
113
- method: "GET",
114
- },
115
- responseCallback: undefined,
116
- acceptedStatus: [200],
117
- url: null,
118
- mapping: {
119
- transformer: undefined,
120
- callbacks: [],
121
- },
122
- },
123
- });
124
- }
125
-
126
- /**
127
- * @return {Promise}
128
- * @throws {Error} the options does not contain a valid json definition
129
- * @throws {TypeError} value is not a object
130
- * @throws {Error} the data cannot be read
131
- */
132
- read() {
133
- let init = this.getOption("read.init");
134
- if (!isObject(init)) init = {};
135
- if (!init["method"]) init["method"] = "GET";
136
-
137
- let callback = this.getOption("read.responseCallback");
138
- if (!callback)
139
- callback = (obj) => {
140
- this.set(this.transformServerPayload.call(this, obj));
141
- };
142
-
143
- return fetchData.call(this, init, "read", callback);
144
- }
145
-
146
- /**
147
- * @return {Promise}
148
- * @throws {WriteError} the data cannot be written
149
- */
150
- write() {
151
- let init = this.getOption("write.init");
152
- if (!isObject(init)) init = {};
153
- if (typeof init["headers"] !== "object") {
154
- init["headers"] = {
155
- "Content-Type": "application/json",
156
- };
157
- }
158
- if (!init["method"]) init["method"] = "POST";
159
-
160
- const obj = this.prepareServerPayload(this.get());
161
- init["body"] = JSON.stringify(obj);
162
-
163
- const callback = this.getOption("write.responseCallback");
164
- return fetchData.call(this, init, "write", callback);
165
- }
166
-
167
- /**
168
- * @return {RestAPI}
169
- */
170
- getClone() {
171
- return new RestAPI(
172
- this[internalSymbol].getRealSubject()["options"].read,
173
- this[internalSymbol].getRealSubject()["options"].write,
174
- );
175
- }
46
+ /**
47
+ *
48
+ * @param {Object} [options] options contains definitions for the datasource.
49
+ */
50
+ constructor(options) {
51
+ super();
52
+
53
+ if (isObject(options)) {
54
+ this.setOptions(options);
55
+ }
56
+ }
57
+
58
+ /**
59
+ * This method is called by the `instanceof` operator.
60
+ * @returns {symbol}
61
+ * @since 2.1.0
62
+ */
63
+ static get [instanceSymbol]() {
64
+ return Symbol.for("@schukai/monster/data/datasource/server/restapi");
65
+ }
66
+
67
+ /**
68
+ * @property {Object} write={} Options
69
+ * @property {Object} write.init={} An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request|Request constructor}
70
+ * @property {string} write.init.method=POST
71
+ * @property {Object} write.init.headers Object containing any custom headers that you want to apply to the request.
72
+ * @property {string} write.responseCallback Callback function to be executed after the request has been completed.
73
+ * @property {string} write.acceptedStatus=[200,201]
74
+ * @property {string} write.url URL
75
+ * @property {Object} write.mapping the mapping is applied before writing.
76
+ * @property {String} write.mapping.transformer Transformer to select the appropriate entries
77
+ * @property {Monster.Data.Datasource~exampleCallback[]} write.mapping.callback with the help of the callback, the structures can be adjusted before writing.
78
+ * @property {Object} write.report
79
+ * @property {String} write.report.path Path to validations
80
+ * @property {Object} write.partial
81
+ * @property {Function} write.partial.callback Callback function to be executed after the request has been completed. (obj, diffResult) => obj
82
+ * @property {Object} write.sheathing
83
+ * @property {Object} write.sheathing.object Object to be wrapped
84
+ * @property {string} write.sheathing.path Path to the data
85
+ * @property {Object} read={} Options
86
+ * @property {Object} read.init={} An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request|Request constructor}
87
+ * @property {string} read.init.method=GET
88
+ * @property {string} read.acceptedStatus=[200]
89
+ * @property {string} read.url URL
90
+ * @property {Object} read.mapping the mapping is applied after reading.
91
+ * @property {String} read.mapping.transformer Transformer to select the appropriate entries
92
+ * @property {Monster.Data.Datasource~exampleCallback[]} read.mapping.callback with the help of the callback, the structures can be adjusted after reading.
93
+ */
94
+ get defaults() {
95
+ return Object.assign({}, super.defaults, {
96
+ write: {
97
+ init: {
98
+ method: "POST",
99
+ },
100
+ responseCallback: undefined,
101
+ acceptedStatus: [200, 201],
102
+ url: null,
103
+ mapping: {
104
+ transformer: undefined,
105
+ callbacks: [],
106
+ },
107
+ sheathing: {
108
+ object: undefined,
109
+ path: undefined,
110
+ },
111
+ report: {
112
+ path: undefined,
113
+ },
114
+
115
+ partial: {
116
+ callback: null,
117
+ }
118
+ },
119
+ read: {
120
+ init: {
121
+ method: "GET",
122
+ },
123
+ responseCallback: undefined,
124
+ acceptedStatus: [200],
125
+ url: null,
126
+ mapping: {
127
+ transformer: undefined,
128
+ callbacks: [],
129
+ },
130
+ },
131
+ });
132
+ }
133
+
134
+ /**
135
+ * @return {Promise}
136
+ * @throws {Error} the options does not contain a valid json definition
137
+ * @throws {TypeError} value is not a object
138
+ * @throws {Error} the data cannot be read
139
+ */
140
+ read() {
141
+ let init = this.getOption("read.init");
142
+ if (!isObject(init)) init = {};
143
+ if (!init["method"]) init["method"] = "GET";
144
+
145
+ let callback = this.getOption("read.responseCallback");
146
+ if (!callback) {
147
+ callback = (obj) => {
148
+ this.set(this.transformServerPayload.call(this, obj));
149
+ };
150
+ }
151
+
152
+ return fetchData.call(this, init, "read", callback);
153
+ }
154
+
155
+ /**
156
+ * @return {Promise}
157
+ * @throws {WriteError} the data cannot be written
158
+ */
159
+ write() {
160
+ let init = this.getOption("write.init");
161
+ if (!isObject(init)) init = {};
162
+ if (typeof init["headers"] !== "object") {
163
+ init["headers"] = {
164
+ "Content-Type": "application/json",
165
+ };
166
+ }
167
+ if (!init["method"]) init["method"] = "POST";
168
+
169
+ const obj = this.prepareServerPayload(this.get());
170
+ init["body"] = JSON.stringify(obj);
171
+
172
+ const callback = this.getOption("write.responseCallback");
173
+ return fetchData.call(this, init, "write", callback);
174
+ }
175
+
176
+ /**
177
+ * @return {RestAPI}
178
+ */
179
+ getClone() {
180
+ return new RestAPI(
181
+ this[internalSymbol].getRealSubject()["options"].read,
182
+ this[internalSymbol].getRealSubject()["options"].write,
183
+ );
184
+ }
176
185
  }
177
186
 
178
187
  /**
@@ -183,45 +192,47 @@ class RestAPI extends Server {
183
192
  * @returns {Promise<string>}
184
193
  */
185
194
  function fetchData(init, key, callback) {
186
- let response;
187
-
188
- return fetch(this.getOption(`${key}.url`), init)
189
- .then((resp) => {
190
- response = resp;
191
-
192
- const acceptedStatus = this.getOption(`${key}.acceptedStatus`, [200]);
193
-
194
- if (acceptedStatus.indexOf(resp.status) === -1) {
195
- throw new DataFetchError(
196
- `the response does not contain a accepted status (actual: ${resp.status}).`,
197
- response,
198
- );
199
- }
200
-
201
- return resp.text();
202
- })
203
- .then((body) => {
204
- let obj;
205
-
206
- try {
207
- obj = JSON.parse(body);
208
-
209
- response[rawDataSymbol] = obj;
210
- } catch (e) {
211
- if (body.length > 100) {
212
- body = `${body.substring(0, 97)}...`;
213
- }
214
-
215
- throw new DataFetchError(
216
- `the response does not contain a valid json (actual: ${body}).`,
217
- response,
218
- );
219
- }
220
-
221
- if (callback && isFunction(callback)) {
222
- callback(obj);
223
- }
224
-
225
- return response;
226
- });
195
+ let response;
196
+
197
+ return fetch(this.getOption(`${key}.url`), init)
198
+ .then((resp) => {
199
+ response = resp;
200
+
201
+ const acceptedStatus = this.getOption(`${key}.acceptedStatus`, [200]).map(Number);
202
+
203
+ if (acceptedStatus.indexOf(resp.status) === -1) {
204
+ throw new DataFetchError(
205
+ `the response does not contain an accepted status (actual: ${resp.status}).`,
206
+ response,
207
+ );
208
+ }
209
+
210
+ return resp.text();
211
+ })
212
+ .then((body) => {
213
+ let obj;
214
+
215
+ try {
216
+ obj = JSON.parse(body);
217
+
218
+ response[rawDataSymbol] = obj;
219
+ } catch (e) {
220
+ if (body.length > 100) {
221
+ body = `${body.substring(0, 97)}...`;
222
+ }
223
+
224
+ throw new DataFetchError(
225
+ `the response does not contain a valid json (actual: ${body}).`,
226
+ response,
227
+ );
228
+ }
229
+
230
+ if (callback && isFunction(callback)) {
231
+ callback(obj);
232
+ }
233
+
234
+ return response;
235
+ }).catch((e) => {
236
+ throw e;
237
+ });
227
238
  }
@@ -12,13 +12,21 @@
12
12
  * SPDX-License-Identifier: AGPL-3.0
13
13
  */
14
14
 
15
- import { internalSymbol, instanceSymbol } from "../../constants.mjs";
16
- import { isObject } from "../../types/is.mjs";
17
- import { Datasource } from "../datasource.mjs";
18
- import { Pathfinder } from "../pathfinder.mjs";
19
- import { Pipe } from "../pipe.mjs";
15
+ import {instanceSymbol} from "../../constants.mjs";
16
+ import {isArray, isFunction, isObject} from "../../types/is.mjs";
17
+ import {Datasource} from "../datasource.mjs";
18
+ import {diff} from "../diff.mjs";
19
+ import {Pathfinder} from "../pathfinder.mjs";
20
+ import {Pipe} from "../pipe.mjs";
20
21
 
21
- export { Server };
22
+ export {Server};
23
+
24
+
25
+ /**
26
+ * @private
27
+ * @type {symbol}
28
+ */
29
+ const serverVersionSymbol = Symbol("serverVersion");
22
30
 
23
31
  /**
24
32
  * Base class for all server data sources
@@ -30,54 +38,82 @@ export { Server };
30
38
  * @summary The Server class encapsulates the access to a server datasource
31
39
  */
32
40
  class Server extends Datasource {
33
- /**
34
- * This method is called by the `instanceof` operator.
35
- * @returns {symbol}
36
- */
37
- static get [instanceSymbol]() {
38
- return Symbol.for("@schukai/monster/data/datasource/server");
39
- }
40
-
41
- /**
42
- * This prepares the data that comes from the server.
43
- * Should not be called directly.
44
- *
45
- * @private
46
- * @param {Object} payload
47
- * @returns {Object}
48
- */
49
- transformServerPayload(payload) {
50
- payload = doTransform.call(this, "read", payload);
51
-
52
- const dataPath = this.getOption("read.path");
53
- if (dataPath) {
54
- payload = new Pathfinder(payload).getVia(dataPath);
55
- }
56
-
57
- return payload;
58
- }
59
-
60
- /**
61
- * This prepares the data for writing and should not be called directly.
62
- *
63
- * @private
64
- * @param {Object} payload
65
- * @returns {Object}
66
- */
67
- prepareServerPayload(payload) {
68
- payload = doTransform.call(this, "write", payload);
69
-
70
- const sheathingObject = this.getOption("write.sheathing.object");
71
- const sheathingPath = this.getOption("write.sheathing.path");
72
-
73
- if (sheathingObject && sheathingPath) {
74
- const sub = payload;
75
- payload = sheathingObject;
76
- new Pathfinder(payload).setVia(sheathingPath, sub);
77
- }
78
-
79
- return payload;
80
- }
41
+ /**
42
+ * This method is called by the `instanceof` operator.
43
+ * @returns {symbol}
44
+ */
45
+ static get [instanceSymbol]() {
46
+ return Symbol.for("@schukai/monster/data/datasource/server");
47
+ }
48
+
49
+ /**
50
+ * This prepares the data that comes from the server.
51
+ * Should not be called directly.
52
+ *
53
+ * @private
54
+ * @param {Object} payload
55
+ * @returns {Object}
56
+ */
57
+ transformServerPayload(payload) {
58
+ payload = doTransform.call(this, "read", payload);
59
+ this[serverVersionSymbol] = payload;
60
+
61
+ const dataPath = this.getOption("read.path");
62
+ if (dataPath) {
63
+ payload = new Pathfinder(payload).getVia(dataPath);
64
+ }
65
+
66
+ return payload;
67
+ }
68
+
69
+ /**
70
+ * This prepares the data for writing and should not be called directly.
71
+ *
72
+ * @private
73
+ * @param {Object} payload
74
+ * @returns {Object}
75
+ */
76
+ prepareServerPayload(payload) {
77
+ payload = doTransform.call(this, "write", payload);
78
+ payload = doDiff.call(this, payload);
79
+
80
+ const sheathingObject = this.getOption("write.sheathing.object");
81
+ const sheathingPath = this.getOption("write.sheathing.path");
82
+
83
+ if (sheathingObject && sheathingPath) {
84
+ const sub = payload;
85
+ payload = sheathingObject;
86
+ new Pathfinder(payload).setVia(sheathingPath, sub);
87
+ }
88
+
89
+ return payload;
90
+ }
91
+ }
92
+
93
+ /**
94
+ *
95
+ * @param obj
96
+ * @returns {*}
97
+ */
98
+ function doDiff(obj) {
99
+ if (this[serverVersionSymbol] === null || this[serverVersionSymbol] === undefined) {
100
+ return obj;
101
+ }
102
+
103
+ const callback = this.getOption("write.partial.callback");
104
+ if (!isFunction(callback)) {
105
+ return obj;
106
+ }
107
+
108
+ const results = diff(this[serverVersionSymbol], obj);
109
+ if (!results) {
110
+ return obj;
111
+ }
112
+
113
+ obj = callback(obj, results);
114
+ this[serverVersionSymbol] = obj;
115
+
116
+ return obj;
81
117
  }
82
118
 
83
119
  /**
@@ -87,24 +123,32 @@ class Server extends Datasource {
87
123
  * @returns {Object}
88
124
  */
89
125
  function doTransform(type, obj) {
90
- const transformation = this.getOption(`${type}.mapping.transformer`);
91
- if (transformation !== undefined && transformation !== null) {
92
- const pipe = new Pipe(transformation);
93
- const callbacks = this.getOption(`${type}.mapping.callbacks`);
94
-
95
- if (isObject(callbacks)) {
96
- for (const key in callbacks) {
97
- if (
98
- callbacks.hasOwnProperty(key) &&
99
- typeof callbacks[key] === "function"
100
- ) {
101
- pipe.setCallback(key, callbacks[key]);
102
- }
103
- }
104
- }
105
-
106
- obj = pipe.run(obj);
107
- }
108
-
109
- return obj;
126
+ const transformation = this.getOption(`${type}.mapping.transformer`);
127
+ if (transformation !== undefined && transformation !== null) {
128
+ const pipe = new Pipe(transformation);
129
+ const callbacks = this.getOption(`${type}.mapping.callbacks`);
130
+
131
+ if (isArray(callbacks)) {
132
+ for (const callback of callbacks) {
133
+ if (typeof callback === "function") {
134
+ pipe.setCallback(callback);
135
+ }
136
+ }
137
+ }
138
+
139
+ if (isObject(callbacks)) {
140
+ for (const key in callbacks) {
141
+ if (
142
+ callbacks.hasOwnProperty(key) &&
143
+ typeof callbacks[key] === "function"
144
+ ) {
145
+ pipe.setCallback(key, callbacks[key]);
146
+ }
147
+ }
148
+ }
149
+
150
+ obj = pipe.run(obj);
151
+ }
152
+
153
+ return obj;
110
154
  }
@@ -183,4 +183,4 @@ function getOperator(a, b) {
183
183
  }
184
184
 
185
185
  return operator;
186
- }
186
+ }
@@ -327,6 +327,7 @@ class CustomElement extends HTMLElement {
327
327
  * @property {Object} templates Specifies the templates used by the control.
328
328
  * @property {string} templates.main=undefined Specifies the main template used by the control.
329
329
  * @property {Object} templateMapping Specifies the mapping of templates.
330
+ * @property {string} display=block Specifies the display mode of the control.
330
331
  * @since 1.8.0
331
332
  */
332
333
  get defaults() {
@@ -338,6 +339,7 @@ class CustomElement extends HTMLElement {
338
339
  main: undefined,
339
340
  },
340
341
  templateMapping: {},
342
+ display: "block"
341
343
  };
342
344
  }
343
345
 
@@ -595,6 +597,8 @@ class CustomElement extends HTMLElement {
595
597
  let elements;
596
598
  let nodeList;
597
599
 
600
+ this.style.setProperty("display", this.getOption("display"));
601
+
598
602
  // Extract options from attributes and set them
599
603
  const AttributeOptions = getOptionsFromAttributes.call(this);
600
604
  if (
@@ -44,7 +44,7 @@ import { findDocumentTemplate } from "./template.mjs";
44
44
  export { Updater, addObjectWithUpdaterToElement };
45
45
 
46
46
  /**
47
- * The updater class connects an object with the dom. In this way, structures and contents in the DOM can be
47
+ * The updater class connects an object with the DOM. In this way, structures and contents in the DOM can be
48
48
  * programmatically adapted via attributes.
49
49
  *
50
50
  * For example, to include a string from an object, the attribute `data-monster-replace` can be used.