@schukai/monster 3.56.1 → 3.58.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +46 -0
- package/example/components/form/toggle-switch.mjs +7 -0
- package/package.json +1 -1
- package/source/components/datatable/change-button.mjs +8 -4
- package/source/components/datatable/dataset.mjs +1 -1
- package/source/components/datatable/filter.mjs +0 -1
- package/source/components/form/button.mjs +3 -3
- package/source/components/form/select.mjs +55 -15
- package/source/components/form/style/button-bar.pcss +2 -0
- package/source/components/form/style/button.pcss +2 -0
- package/source/components/form/style/select.pcss +1 -1
- package/source/components/form/style/toggle-switch.pcss +74 -0
- package/source/components/form/stylesheet/button-bar.mjs +1 -1
- package/source/components/form/stylesheet/button.mjs +1 -1
- package/source/components/form/stylesheet/select.mjs +1 -1
- package/source/components/form/stylesheet/toggle-switch.mjs +27 -0
- package/source/components/form/tabs.mjs +0 -1
- package/source/components/form/toggle-switch.mjs +430 -0
- package/source/data/transformer.mjs +30 -0
- package/source/dom/attributes.mjs +1 -1
- package/source/dom/customcontrol.mjs +6 -2
- package/source/dom/customelement.mjs +43 -5
- package/source/dom/events.mjs +3 -3
- package/source/dom/updater.mjs +43 -16
- package/source/i18n/translations.mjs +1 -1
- package/source/monster.mjs +7 -0
- package/source/types/version.mjs +1 -1
- package/test/cases/components/form/select.mjs +1 -1
- package/test/cases/components/form/toggle-switch.mjs +310 -0
- package/test/cases/components/form/tree-select.mjs +1 -8
- package/test/cases/data/transformer.mjs +16 -0
- package/test/cases/dom/customcontrol.mjs +53 -8
- package/test/cases/dom/customelement-initfromscripthost.mjs +0 -4
- package/test/cases/dom/customelement.mjs +30 -26
- package/test/cases/dom/updater.mjs +14 -3
- package/test/cases/monster.mjs +1 -1
- package/test/util/jsdom.mjs +9 -10
- package/test/web/import.js +1 -0
- package/test/web/test.html +2 -2
- package/test/web/tests.js +3966 -1415
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
import chai from "chai"
|
4
|
-
|
4
|
+
|
5
5
|
import {ID} from "../../../source/types/id.mjs";
|
6
6
|
import {Observer} from "../../../source/types/observer.mjs";
|
7
7
|
import {ProxyObserver} from "../../../source/types/proxyobserver.mjs";
|
@@ -110,11 +110,22 @@ let html4 = `
|
|
110
110
|
`;
|
111
111
|
|
112
112
|
|
113
|
+
|
113
114
|
describe('DOM', function () {
|
114
115
|
|
116
|
+
let Updater = null;
|
117
|
+
|
115
118
|
before(function (done) {
|
116
|
-
|
117
|
-
|
119
|
+
const options = {
|
120
|
+
}
|
121
|
+
initJSDOM(options).then(() => {
|
122
|
+
|
123
|
+
import("../../../source/dom/updater.mjs").then((m) => {
|
124
|
+
Updater = m.Updater;
|
125
|
+
done();
|
126
|
+
}).catch((e) => {
|
127
|
+
done(e)
|
128
|
+
});
|
118
129
|
});
|
119
130
|
});
|
120
131
|
|
package/test/cases/monster.mjs
CHANGED
package/test/util/jsdom.mjs
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
import {extend} from "../../source/data/extend.mjs";
|
4
4
|
import {getGlobal} from "../../source/types/global.mjs";
|
5
|
-
//import Storage from "dom-storage";
|
6
5
|
|
7
6
|
export const isBrowser = new Function("try {return this===window;}catch(e){ return false;}");
|
8
7
|
export const isNode = new Function("try {return this===global;}catch(e){return false;}");
|
@@ -16,8 +15,6 @@ let JSDOMExport = null;
|
|
16
15
|
*/
|
17
16
|
function initJSDOM(options) {
|
18
17
|
if (typeof window === "object" && window['DOMParser']) return Promise.resolve();
|
19
|
-
|
20
|
-
|
21
18
|
|
22
19
|
const g = getGlobal();
|
23
20
|
|
@@ -40,8 +37,8 @@ function initJSDOM(options) {
|
|
40
37
|
</body>`, options);
|
41
38
|
|
42
39
|
g['window'] = window;
|
43
|
-
|
44
|
-
return new Promise(resolve =>
|
40
|
+
|
41
|
+
return new Promise((resolve, reject) =>
|
45
42
|
window.addEventListener("load", () => {
|
46
43
|
|
47
44
|
[
|
@@ -83,18 +80,20 @@ function initJSDOM(options) {
|
|
83
80
|
g[key] = window[key]
|
84
81
|
});
|
85
82
|
|
86
|
-
|
87
83
|
import("dom-storage").then(({default: Storage}) => {
|
88
|
-
|
89
|
-
|
84
|
+
|
90
85
|
g.localStorage = new Storage(null, {strict: true});
|
91
86
|
g.sessionStorage = new Storage(null, {strict: true});
|
92
87
|
|
93
88
|
window['localStorage'] = g.localStorage;
|
94
89
|
window['sessionStorage'] = g.sessionStorage;
|
95
|
-
});
|
96
90
|
|
97
|
-
|
91
|
+
resolve(g);
|
92
|
+
|
93
|
+
}).catch(e => {
|
94
|
+
console.error("Error loading dom-storage", e);
|
95
|
+
reject(e);
|
96
|
+
});
|
98
97
|
|
99
98
|
})
|
100
99
|
);
|
package/test/web/import.js
CHANGED
@@ -8,6 +8,7 @@ import "../cases/components/form/confirm-button.mjs";
|
|
8
8
|
import "../cases/components/form/form.mjs";
|
9
9
|
import "../cases/components/form/tree-select.mjs";
|
10
10
|
import "../cases/components/form/button.mjs";
|
11
|
+
import "../cases/components/form/toggle-switch.mjs";
|
11
12
|
import "../cases/components/form/template.mjs";
|
12
13
|
import "../cases/components/notify/message.mjs";
|
13
14
|
import "../cases/components/notify/notify.mjs";
|
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 3.
|
19
|
-
<div id="lastupdate" style='font-size:0.7em'>last update
|
18
|
+
<h1 style='margin-bottom: 0.1em;'>Monster 3.57.0</h1>
|
19
|
+
<div id="lastupdate" style='font-size:0.7em'>last update So 17. Mär 11:35:11 CET 2024</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>
|