@schukai/monster 3.53.0 → 3.55.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.md +16 -0
- package/package.json +1 -1
- package/source/components/datatable/datasource/rest.mjs +358 -309
- package/source/components/datatable/datatable/header.mjs +8 -0
- package/source/components/datatable/datatable.mjs +606 -557
- package/source/components/datatable/embedded-pagination.mjs +50 -62
- package/source/components/datatable/filter/util.mjs +122 -0
- package/source/components/datatable/filter.mjs +893 -708
- package/source/components/datatable/pagination.mjs +335 -310
- package/source/components/datatable/status.mjs +248 -0
- package/source/components/datatable/style/datatable.pcss +1 -0
- package/source/components/datatable/style/embedded-pagination.pcss +59 -2
- package/source/components/datatable/style/filter.pcss +4 -0
- package/source/components/datatable/style/pagination.pcss +28 -4
- package/source/components/datatable/style/status.pcss +42 -0
- package/source/components/datatable/stylesheet/column-bar.mjs +1 -1
- package/source/components/datatable/stylesheet/datatable.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-button.mjs +1 -1
- package/source/components/datatable/stylesheet/filter.mjs +1 -1
- package/source/components/datatable/stylesheet/pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/status.mjs +27 -0
- package/source/components/form/action-button.mjs +1 -1
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +1 -1
- package/source/components/form/button.mjs +1 -1
- package/source/components/form/confirm-button.mjs +1 -1
- package/source/components/form/context-error.mjs +275 -0
- package/source/components/form/context-help.mjs +5 -5
- package/source/components/form/form.mjs +2 -2
- package/source/components/form/message-state-button.mjs +2 -2
- package/source/components/form/popper-button.mjs +7 -4
- package/source/components/form/popper.mjs +317 -309
- package/source/components/form/reload.mjs +1 -1
- package/source/components/form/select.mjs +9 -3
- package/source/components/form/shadow-reload.mjs +1 -1
- package/source/components/form/state-button.mjs +2 -1
- package/source/components/form/style/context-error.pcss +32 -0
- package/source/components/form/style/context-help.pcss +22 -5
- package/source/components/form/stylesheet/context-error.mjs +27 -0
- package/source/components/form/stylesheet/context-help.mjs +1 -1
- package/source/components/form/stylesheet/select.mjs +1 -1
- package/source/components/form/stylesheet/tabs.mjs +1 -1
- package/source/components/form/tabs.mjs +757 -707
- package/source/components/form/template.mjs +1 -1
- package/source/components/form/tree-select.mjs +1 -1
- package/source/components/host/collapse.mjs +22 -5
- package/source/components/host/config-manager.mjs +39 -2
- package/source/components/host/host.mjs +14 -0
- package/source/components/host/stylesheet/call-button.mjs +1 -1
- package/source/components/host/stylesheet/overlay.mjs +1 -1
- package/source/components/host/stylesheet/toggle-button.mjs +1 -1
- package/source/components/host/util.mjs +6 -1
- package/source/components/notify/stylesheet/message.mjs +1 -1
- package/source/components/stylesheet/icons.mjs +1 -1
- package/source/data/transformer.mjs +39 -42
- package/source/dom/customelement.mjs +1 -1
- package/source/dom/updater.mjs +700 -688
- package/source/dom/util.mjs +42 -0
- package/source/i18n/providers/embed.mjs +3 -3
- package/source/monster.mjs +6 -0
- package/source/text/formatter.mjs +2 -2
- package/source/types/observer.mjs +1 -1
- package/source/types/version.mjs +1 -1
- package/source/util/sleep.mjs +18 -0
- package/test/cases/components/form/button.mjs +2 -1
- package/test/cases/components/form/select.mjs +1 -1
- package/test/cases/components/form/tree-select.mjs +1 -1
- package/test/cases/data/transformer.mjs +2 -2
- package/test/cases/dom/updater.mjs +67 -46
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +18 -13
package/source/dom/util.mjs
CHANGED
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
findElementWithIdUpwards,
|
|
16
16
|
getContainingDocument,
|
|
17
17
|
getRegisteredCustomElements,
|
|
18
|
+
findElementWithSelectorUpwards,
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -207,6 +208,47 @@ function findElementWithIdUpwards(element, targetId) {
|
|
|
207
208
|
return findElementWithIdUpwards(element.parentElement, targetId);
|
|
208
209
|
}
|
|
209
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Recursively searches upwards from a given element to find an ancestor element
|
|
213
|
+
* with a specified selector, considering both normal DOM and shadow DOM.
|
|
214
|
+
* This method is useful for finding a parent element with a specific class.
|
|
215
|
+
*
|
|
216
|
+
* @param {HTMLElement|ShadowRoot} element - The starting element or shadow root to search from.
|
|
217
|
+
* @param {string} selector - The selector of the target element to find.
|
|
218
|
+
* @returns {HTMLElement|null} - The ancestor element with the specified selector, or null if not found.
|
|
219
|
+
* @memberOf Monster.DOM
|
|
220
|
+
* @since 3.55.0
|
|
221
|
+
*/
|
|
222
|
+
function findElementWithSelectorUpwards(element, selector) {
|
|
223
|
+
if (!element) {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Search within the current element's shadow root, if it exists
|
|
228
|
+
if (element.shadowRoot) {
|
|
229
|
+
const target = element.shadowRoot.querySelector(selector);
|
|
230
|
+
if (target) {
|
|
231
|
+
return target;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (element === document.documentElement) {
|
|
236
|
+
const target = document.querySelector(selector);
|
|
237
|
+
if (target) {
|
|
238
|
+
return target;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// If the current element is inside a shadow root, search its host's ancestors
|
|
243
|
+
const rootNode = element.getRootNode();
|
|
244
|
+
if (rootNode && rootNode instanceof ShadowRoot) {
|
|
245
|
+
return findElementWithSelectorUpwards(rootNode.host, selector);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Otherwise, search the current element's parent
|
|
249
|
+
return findElementWithSelectorUpwards(element.parentElement, selector);
|
|
250
|
+
}
|
|
251
|
+
|
|
210
252
|
/**
|
|
211
253
|
* @private
|
|
212
254
|
* @param {HTMLElement} element
|
|
@@ -141,7 +141,7 @@ class Embed extends Provider {
|
|
|
141
141
|
* `script[data-monster-role=translations]` is searched for and the translations are assigned to the element.
|
|
142
142
|
*
|
|
143
143
|
* @param element
|
|
144
|
-
* @returns {Promise<unknown[]>}
|
|
144
|
+
* @returns {Promise<Awaited<unknown>[]>}
|
|
145
145
|
*/
|
|
146
146
|
static assignTranslationsToElement(element) {
|
|
147
147
|
const d = getDocument();
|
|
@@ -152,13 +152,13 @@ class Embed extends Provider {
|
|
|
152
152
|
|
|
153
153
|
const list = d.querySelectorAll("script[data-monster-role=translations]");
|
|
154
154
|
if (list === null) {
|
|
155
|
-
return;
|
|
155
|
+
return Promise.resolve([]);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
const promises = [];
|
|
159
159
|
|
|
160
160
|
list.forEach((translationElement) => {
|
|
161
|
-
const p = new Embed(translationElement);
|
|
161
|
+
const p = new Embed(translationElement, {});
|
|
162
162
|
promises.push(p.assignToElement(undefined, element));
|
|
163
163
|
});
|
|
164
164
|
|
package/source/monster.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
/**
|
|
2
3
|
* Copyright schukai GmbH and contributors 2023. All Rights Reserved.
|
|
3
4
|
* Node module: @schukai/monster
|
|
@@ -27,6 +28,7 @@ export * from "./components/form/state-button.mjs";
|
|
|
27
28
|
export * from "./components/form/popper.mjs";
|
|
28
29
|
export * from "./components/form/select.mjs";
|
|
29
30
|
export * from "./components/form/confirm-button.mjs";
|
|
31
|
+
export * from "./components/form/context-error.mjs";
|
|
30
32
|
export * from "./components/form/action-button.mjs";
|
|
31
33
|
export * from "./components/form/form.mjs";
|
|
32
34
|
export * from "./components/form/api-button.mjs";
|
|
@@ -45,6 +47,7 @@ export * from "./components/form/stylesheet/state-button.mjs";
|
|
|
45
47
|
export * from "./components/form/stylesheet/popper.mjs";
|
|
46
48
|
export * from "./components/form/stylesheet/select.mjs";
|
|
47
49
|
export * from "./components/form/stylesheet/confirm-button.mjs";
|
|
50
|
+
export * from "./components/form/stylesheet/context-error.mjs";
|
|
48
51
|
export * from "./components/form/stylesheet/action-button.mjs";
|
|
49
52
|
export * from "./components/form/stylesheet/form.mjs";
|
|
50
53
|
export * from "./components/form/stylesheet/api-button.mjs";
|
|
@@ -93,6 +96,7 @@ export * from "./components/datatable/util.mjs";
|
|
|
93
96
|
export * from "./components/datatable/filter.mjs";
|
|
94
97
|
export * from "./components/datatable/dataset.mjs";
|
|
95
98
|
export * from "./components/datatable/embedded-pagination.mjs";
|
|
99
|
+
export * from "./components/datatable/status.mjs";
|
|
96
100
|
export * from "./components/datatable/constants.mjs";
|
|
97
101
|
export * from "./components/datatable/stylesheet/select-filter.mjs";
|
|
98
102
|
export * from "./components/datatable/stylesheet/datasource.mjs";
|
|
@@ -105,6 +109,7 @@ export * from "./components/datatable/stylesheet/filter.mjs";
|
|
|
105
109
|
export * from "./components/datatable/stylesheet/dataset.mjs";
|
|
106
110
|
export * from "./components/datatable/stylesheet/embedded-pagination.mjs";
|
|
107
111
|
export * from "./components/datatable/stylesheet/filter-controls-defaults.mjs";
|
|
112
|
+
export * from "./components/datatable/stylesheet/status.mjs";
|
|
108
113
|
export * from "./components/datatable/stylesheet/filter-range.mjs";
|
|
109
114
|
export * from "./components/state/log/entry.mjs";
|
|
110
115
|
export * from "./components/state/state.mjs";
|
|
@@ -120,6 +125,7 @@ export * from "./components/stylesheet/spinner.mjs";
|
|
|
120
125
|
export * from "./components/stylesheet/control.mjs";
|
|
121
126
|
export * from "./components/stylesheet/card.mjs";
|
|
122
127
|
export * from "./components/stylesheet/common.mjs";
|
|
128
|
+
export * from "./components/stylesheet/icons.mjs";
|
|
123
129
|
export * from "./components/stylesheet/popper.mjs";
|
|
124
130
|
export * from "./components/stylesheet/theme.mjs";
|
|
125
131
|
export * from "./components/stylesheet/data-grid.mjs";
|
|
@@ -112,8 +112,8 @@ class Formatter extends BaseWithOptions {
|
|
|
112
112
|
/**
|
|
113
113
|
* Default values for the markers are `${` and `}`
|
|
114
114
|
*
|
|
115
|
-
* @param
|
|
116
|
-
* @
|
|
115
|
+
* @param object
|
|
116
|
+
* @param options
|
|
117
117
|
*/
|
|
118
118
|
constructor(object, options) {
|
|
119
119
|
super(options);
|
|
@@ -135,7 +135,7 @@ class Observer extends Base {
|
|
|
135
135
|
|
|
136
136
|
setTimeout(() => {
|
|
137
137
|
try {
|
|
138
|
-
// the queue and the
|
|
138
|
+
// the queue and the `setTimeout` ensure that an object is not
|
|
139
139
|
// informed of the same change more than once.
|
|
140
140
|
if (self.queue.isEmpty()) {
|
|
141
141
|
resolve();
|
package/source/types/version.mjs
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright schukai GmbH and contributors 2023. All Rights Reserved.
|
|
3
|
+
* Node module: @schukai/monster
|
|
4
|
+
* This file is licensed under the AGPLv3 License.
|
|
5
|
+
* License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param milliseconds
|
|
12
|
+
* @returns {Promise<unknown>}
|
|
13
|
+
* @since 3.55.0
|
|
14
|
+
* @memberOf Monster.Util
|
|
15
|
+
*/
|
|
16
|
+
export function Sleep(milliseconds) {
|
|
17
|
+
return new Promise(resolve => setTimeout(resolve, milliseconds));
|
|
18
|
+
}
|
|
@@ -103,6 +103,7 @@ describe('Button', function () {
|
|
|
103
103
|
|
|
104
104
|
setTimeout(() => {
|
|
105
105
|
try {
|
|
106
|
+
|
|
106
107
|
const options = button.shadowRoot.querySelector('button');
|
|
107
108
|
|
|
108
109
|
expect(options).is.instanceof(HTMLButtonElement);
|
|
@@ -112,7 +113,7 @@ describe('Button', function () {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
done();
|
|
115
|
-
},
|
|
116
|
+
}, 100)
|
|
116
117
|
|
|
117
118
|
|
|
118
119
|
});
|
|
@@ -110,13 +110,13 @@ describe('Transformer', function () {
|
|
|
110
110
|
[' if:a: ', false, undefined], // without \\
|
|
111
111
|
[' if:a:\\ ', false, " "],
|
|
112
112
|
[' if:a:\\ ', true, "a"],
|
|
113
|
+
['default:undefined:bool', undefined, false],
|
|
113
114
|
['default:yes', null, 'yes'],
|
|
114
115
|
['default:yes', undefined, 'yes'],
|
|
115
116
|
['default:1:bool', undefined, true],
|
|
116
117
|
['default:on:bool', undefined, true],
|
|
117
118
|
['default:true:bool', undefined, true],
|
|
118
119
|
['default:yes:bool', undefined, true],
|
|
119
|
-
['default:undefined:bool', undefined, false],
|
|
120
120
|
['default:false:bool', undefined, false],
|
|
121
121
|
['default:1:int', undefined, 1],
|
|
122
122
|
['default:1:string', undefined, '1'],
|
|
@@ -190,7 +190,7 @@ describe('Transformer', function () {
|
|
|
190
190
|
});
|
|
191
191
|
|
|
192
192
|
const r = t.run(b);
|
|
193
|
-
expect(r).to.be.eql(c);
|
|
193
|
+
expect(r).to.be.eql(c, "Transformer.run(" + JSON.stringify(a) + ").run(" + JSON.stringify(b) + ") should return " + JSON.stringify(c));
|
|
194
194
|
});
|
|
195
195
|
});
|
|
196
196
|
|
|
@@ -177,15 +177,19 @@ describe('DOM', function () {
|
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
179
|
|
|
180
|
+
let promise = u.run();
|
|
180
181
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
182
|
+
setTimeout(() => {
|
|
183
|
+
promise.then(() => {
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
done(new Error("should never called!"));
|
|
186
|
+
}, 100);
|
|
187
|
+
}).catch((e) => {
|
|
188
|
+
expect(e).is.instanceOf(Error);
|
|
189
|
+
expect(e + "").to.be.equal('Error: the value is not iterable');
|
|
190
|
+
done();
|
|
191
|
+
})
|
|
192
|
+
}, 100);
|
|
189
193
|
|
|
190
194
|
});
|
|
191
195
|
|
|
@@ -232,13 +236,15 @@ describe('DOM', function () {
|
|
|
232
236
|
);
|
|
233
237
|
|
|
234
238
|
d.run().then(() => {
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
expect(typeof d).is.equal('object');
|
|
241
|
+
for (let i = 0; i < 6; i++) {
|
|
242
|
+
expect(element).contain.html('<li data-monster-replace="path:a.b.' + i + ' | tojson" data-monster-insert-reference="current-' + i + '">{"i":"' + i + '"}</li>');
|
|
243
|
+
}
|
|
235
244
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
expect(element).contain.html('<li data-monster-replace="path:a.b.' + i + ' | tojson" data-monster-insert-reference="current-' + i + '">{"i":"' + i + '"}</li>');
|
|
239
|
-
}
|
|
245
|
+
done();
|
|
246
|
+
}, 100);
|
|
240
247
|
|
|
241
|
-
done();
|
|
242
248
|
}).catch(
|
|
243
249
|
e => {
|
|
244
250
|
done(new Error(e))
|
|
@@ -490,6 +496,7 @@ describe('DOM', function () {
|
|
|
490
496
|
it('should add lower hello and HELLOyes!', function (done) {
|
|
491
497
|
let element = document.getElementById('test1')
|
|
492
498
|
|
|
499
|
+
|
|
493
500
|
let d = new Updater(
|
|
494
501
|
element,
|
|
495
502
|
{
|
|
@@ -497,24 +504,28 @@ describe('DOM', function () {
|
|
|
497
504
|
}
|
|
498
505
|
);
|
|
499
506
|
|
|
507
|
+
|
|
500
508
|
d.setCallback('myformatter', function (a) {
|
|
501
509
|
return a + 'yes!'
|
|
502
510
|
})
|
|
503
511
|
|
|
504
|
-
setTimeout(() => {
|
|
505
|
-
d.run().then(() => {
|
|
506
512
|
|
|
513
|
+
d.run().then(() => {
|
|
514
|
+
setTimeout(() => {
|
|
507
515
|
expect(typeof d).is.equal('object');
|
|
508
516
|
expect(element).contain.html('<div data-monster-replace="path:text | tolower">hallo</div>');
|
|
509
517
|
expect(element).contain.html('<div data-monster-replace="path:text | call:myformatter">HALLOyes!</div>');
|
|
510
518
|
expect(element).contain.html('<div data-monster-replace="static:hello\\ ">hello </div>');
|
|
511
519
|
|
|
512
520
|
return done();
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
521
|
+
|
|
522
|
+
}, 100);
|
|
523
|
+
|
|
524
|
+
}).catch(
|
|
525
|
+
e => {
|
|
526
|
+
done(new Error(e))
|
|
527
|
+
})
|
|
528
|
+
|
|
518
529
|
|
|
519
530
|
});
|
|
520
531
|
});
|
|
@@ -546,13 +557,16 @@ describe('DOM', function () {
|
|
|
546
557
|
|
|
547
558
|
|
|
548
559
|
d.run().then(() => {
|
|
560
|
+
setTimeout(() => {
|
|
561
|
+
expect(typeof d).is.equal('object');
|
|
562
|
+
expect(element).contain.html('<div data-monster-insert="myid path:a.b">');
|
|
563
|
+
expect(element).contain.html('<p data-monster-insert="myinnerid path:a.b" data-monster-insert-reference="myid-0">');
|
|
564
|
+
expect(element).contain.html('<span data-monster-replace="path:a.b.0 | tojson" data-monster-insert-reference="myinnerid-0">{"i":"0"}</span>');
|
|
565
|
+
|
|
566
|
+
done();
|
|
549
567
|
|
|
550
|
-
|
|
551
|
-
expect(element).contain.html('<div data-monster-insert="myid path:a.b">');
|
|
552
|
-
expect(element).contain.html('<p data-monster-insert="myinnerid path:a.b" data-monster-insert-reference="myid-0">');
|
|
553
|
-
expect(element).contain.html('<span data-monster-replace="path:a.b.0 | tojson" data-monster-insert-reference="myinnerid-0">{"i":"0"}</span>');
|
|
568
|
+
}, 100);
|
|
554
569
|
|
|
555
|
-
done();
|
|
556
570
|
}).catch(
|
|
557
571
|
e => {
|
|
558
572
|
done(new Error(e))
|
|
@@ -608,27 +622,30 @@ describe('DOM', function () {
|
|
|
608
622
|
|
|
609
623
|
d.run().then(() => {
|
|
610
624
|
|
|
625
|
+
setTimeout(() => {
|
|
626
|
+
expect(element).contain.html('<div data-monster-attributes="class path:a.b" class="div-class">');
|
|
627
|
+
expect(element).contain.html('<input data-monster-attributes="value path:a.c" id="input1" value="hello">');
|
|
628
|
+
expect(element).contain.html('<textarea name="textarea" id="textarea" data-monster-attributes="value path:a.textarea" value="test">');
|
|
629
|
+
expect(element).contain.html('<input data-monster-attributes="checked path:a.radio" type="radio" name="radio" value="r1" id="radio" checked="true">');
|
|
611
630
|
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
631
|
+
expect(text.value, 'text control').to.be.equal(d.getSubject()['a']['c']);
|
|
632
|
+
expect(radio.checked, 'radio control').to.be.equal(true);
|
|
633
|
+
expect(textarea.value, 'textarea control').to.be.equal(d.getSubject()['a']['textarea']);
|
|
634
|
+
expect(select.selectedIndex, 'select control').to.be.equal(1); // [0=>other-value, 1=>value2]
|
|
616
635
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
636
|
+
let multiselectSelectedOptions = [];
|
|
637
|
+
for (const [index, obj] of Object.entries(multiselect.selectedOptions)) {
|
|
638
|
+
multiselectSelectedOptions.push(obj.value);
|
|
639
|
+
}
|
|
621
640
|
|
|
622
|
-
let multiselectSelectedOptions = [];
|
|
623
|
-
for (const [index, obj] of Object.entries(multiselect.selectedOptions)) {
|
|
624
|
-
multiselectSelectedOptions.push(obj.value);
|
|
625
|
-
}
|
|
626
641
|
|
|
642
|
+
expect(JSON.stringify(multiselectSelectedOptions), 'multiselect control').to.be.equal(JSON.stringify(d.getSubject()['a']['multiselect']));
|
|
643
|
+
expect(checkbox.checked, 'checkbox control').to.be.true;
|
|
644
|
+
|
|
645
|
+
done();
|
|
627
646
|
|
|
628
|
-
|
|
629
|
-
expect(checkbox.checked, 'checkbox control').to.be.true;
|
|
647
|
+
}, 100);
|
|
630
648
|
|
|
631
|
-
done();
|
|
632
649
|
}).catch(
|
|
633
650
|
e => {
|
|
634
651
|
done(new Error(e))
|
|
@@ -726,14 +743,18 @@ describe('DOM', function () {
|
|
|
726
743
|
);
|
|
727
744
|
setTimeout(() => {
|
|
728
745
|
d.run().then(() => {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
746
|
+
|
|
747
|
+
setTimeout(() => {
|
|
748
|
+
|
|
749
|
+
try {
|
|
750
|
+
expect(containerElement).contain.html('<div>yeah! <b>Test</b>!</div>');
|
|
751
|
+
} catch (e) {
|
|
752
|
+
return done(e);
|
|
753
|
+
}
|
|
734
754
|
|
|
735
755
|
|
|
736
|
-
|
|
756
|
+
done()
|
|
757
|
+
}, 100)
|
|
737
758
|
})
|
|
738
759
|
}, 100)
|
|
739
760
|
|
package/test/cases/monster.mjs
CHANGED
package/test/web/test.html
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
|
18
|
-
<h1 style='margin-bottom: 0.1em;'>Monster
|
|
19
|
-
<div id="lastupdate" style='font-size:0.7em'>last update
|
|
18
|
+
<h1 style='margin-bottom: 0.1em;'>Monster 3.54.0</h1>
|
|
19
|
+
<div id="lastupdate" style='font-size:0.7em'>last update Mi 29. Nov 15:34:53 CET 2023</div>
|
|
20
20
|
</div>
|
|
21
21
|
<div id="mocha-errors"
|
|
22
22
|
style="color: red;font-weight: bold;display: flex;align-items: center;justify-content: center;flex-direction: column;margin:20px;"></div>
|
package/test/web/tests.js
CHANGED
|
@@ -4,6 +4,7 @@ try {
|
|
|
4
4
|
try {
|
|
5
5
|
try {
|
|
6
6
|
try {
|
|
7
|
+
try {
|
|
7
8
|
(() => {
|
|
8
9
|
var __create = Object.create;
|
|
9
10
|
var __defProp = Object.defineProperty;
|
|
@@ -10418,7 +10419,7 @@ try {
|
|
|
10418
10419
|
* @since 2.1.0
|
|
10419
10420
|
*/
|
|
10420
10421
|
static get [instanceSymbol]() {
|
|
10421
|
-
return Symbol.for("@schukai/
|
|
10422
|
+
return Symbol.for("@schukai/monster/components/form/reload");
|
|
10422
10423
|
}
|
|
10423
10424
|
/**
|
|
10424
10425
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -21606,7 +21607,7 @@ ${key.data.toString("base64")}
|
|
|
21606
21607
|
* @since 2.1.0
|
|
21607
21608
|
*/
|
|
21608
21609
|
static get [instanceSymbol]() {
|
|
21609
|
-
return Symbol.for("@schukai/
|
|
21610
|
+
return Symbol.for("@schukai/monster/components/form/tabs");
|
|
21610
21611
|
}
|
|
21611
21612
|
/**
|
|
21612
21613
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -22162,7 +22163,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
22162
22163
|
* @since 2.1.0
|
|
22163
22164
|
*/
|
|
22164
22165
|
static get [instanceSymbol]() {
|
|
22165
|
-
return Symbol.for("@schukai/
|
|
22166
|
+
return Symbol.for("@schukai/monster/components/form/button@@instance");
|
|
22166
22167
|
}
|
|
22167
22168
|
/**
|
|
22168
22169
|
*
|
|
@@ -22449,7 +22450,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
22449
22450
|
* @since 2.1.0
|
|
22450
22451
|
*/
|
|
22451
22452
|
static get [instanceSymbol]() {
|
|
22452
|
-
return Symbol.for("@schukai/
|
|
22453
|
+
return Symbol.for("@schukai/monster/components/form/state-button@@instance");
|
|
22453
22454
|
}
|
|
22454
22455
|
/**
|
|
22455
22456
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -25508,7 +25509,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
25508
25509
|
* @since 2.1.0
|
|
25509
25510
|
*/
|
|
25510
25511
|
static get [instanceSymbol]() {
|
|
25511
|
-
return Symbol.for("@schukai/
|
|
25512
|
+
return Symbol.for("@schukai/monster/components/form/select@@instance");
|
|
25512
25513
|
}
|
|
25513
25514
|
/**
|
|
25514
25515
|
* The current selection of the Select
|
|
@@ -26122,7 +26123,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
26122
26123
|
* @returns {symbol}
|
|
26123
26124
|
*/
|
|
26124
26125
|
static get [instanceSymbol]() {
|
|
26125
|
-
return Symbol.for("@schukai/
|
|
26126
|
+
return Symbol.for("@schukai/monster/components/form/popper@@instance");
|
|
26126
26127
|
}
|
|
26127
26128
|
/**
|
|
26128
26129
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -26373,7 +26374,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
26373
26374
|
* @since 2.1.0
|
|
26374
26375
|
*/
|
|
26375
26376
|
static get [instanceSymbol]() {
|
|
26376
|
-
return Symbol.for("@schukai/
|
|
26377
|
+
return Symbol.for("@schukai/monster/components/form/popper-button@@instance");
|
|
26377
26378
|
}
|
|
26378
26379
|
/**
|
|
26379
26380
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -26663,7 +26664,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
26663
26664
|
* @since 2.1.0
|
|
26664
26665
|
*/
|
|
26665
26666
|
static get [instanceSymbol]() {
|
|
26666
|
-
return Symbol.for("@schukai/
|
|
26667
|
+
return Symbol.for("@schukai/monster/components/form/message-state-button@@instance");
|
|
26667
26668
|
}
|
|
26668
26669
|
/**
|
|
26669
26670
|
*
|
|
@@ -26994,7 +26995,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
26994
26995
|
* @since 2.1.0
|
|
26995
26996
|
*/
|
|
26996
26997
|
static get [instanceSymbol]() {
|
|
26997
|
-
return Symbol.for("@schukai/
|
|
26998
|
+
return Symbol.for("@schukai/monster/components/form/confirm-button@@instance");
|
|
26998
26999
|
}
|
|
26999
27000
|
/**
|
|
27000
27001
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -28552,7 +28553,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
28552
28553
|
init_customelement();
|
|
28553
28554
|
init_form();
|
|
28554
28555
|
ATTRIBUTE_FORM_DATASOURCE_ACTION = `${ATTRIBUTE_PREFIX}datasource-action`;
|
|
28555
|
-
formDataSymbol = Symbol.for("@schukai/
|
|
28556
|
+
formDataSymbol = Symbol.for("@schukai/monster/components/form/form@@formdata");
|
|
28556
28557
|
formDataUpdaterSymbol = Symbol.for(
|
|
28557
28558
|
"@schukai/component-form/form@@formdata-updater-link"
|
|
28558
28559
|
);
|
|
@@ -28578,7 +28579,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
28578
28579
|
* @since 2.1.0
|
|
28579
28580
|
*/
|
|
28580
28581
|
static get [instanceSymbol]() {
|
|
28581
|
-
return Symbol.for("@schukai/
|
|
28582
|
+
return Symbol.for("@schukai/monster/components/form/form");
|
|
28582
28583
|
}
|
|
28583
28584
|
/**
|
|
28584
28585
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -29388,7 +29389,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
29388
29389
|
* @since 2.1.0
|
|
29389
29390
|
*/
|
|
29390
29391
|
static get [instanceSymbol]() {
|
|
29391
|
-
return Symbol.for("@schukai/
|
|
29392
|
+
return Symbol.for("@schukai/monster/components/form/tree-select@@instance");
|
|
29392
29393
|
}
|
|
29393
29394
|
/**
|
|
29394
29395
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -29614,7 +29615,7 @@ span.monster-fx-ripple{animation:monster-fx-ripple .6s linear;background-color:h
|
|
|
29614
29615
|
* @since 2.1.0
|
|
29615
29616
|
*/
|
|
29616
29617
|
static get [instanceSymbol]() {
|
|
29617
|
-
return Symbol.for("@schukai/
|
|
29618
|
+
return Symbol.for("@schukai/monster/components/form/template");
|
|
29618
29619
|
}
|
|
29619
29620
|
/**
|
|
29620
29621
|
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
|
@@ -48098,3 +48099,7 @@ document.getElementById('mocha-stats').style.backgroundColor = 'red';
|
|
|
48098
48099
|
document.getElementById('mocha-errors').insertAdjacentHTML('afterbegin', e );
|
|
48099
48100
|
document.getElementById('mocha-stats').style.backgroundColor = 'red';
|
|
48100
48101
|
}
|
|
48102
|
+
} catch (e) {
|
|
48103
|
+
document.getElementById('mocha-errors').insertAdjacentHTML('afterbegin', e );
|
|
48104
|
+
document.getElementById('mocha-stats').style.backgroundColor = 'red';
|
|
48105
|
+
}
|