@schukai/monster 4.130.0 → 4.131.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/package.json +1 -1
- package/source/components/form/action-button.mjs +2 -1
- package/source/components/form/context-hint.mjs +2 -0
- package/source/components/form/context-info.mjs +2 -0
- package/source/components/form/context-note.mjs +2 -0
- package/source/components/form/context-success.mjs +2 -0
- package/source/components/form/context-warning.mjs +2 -0
- package/source/components/form/message-state-button.mjs +2 -1
- package/source/components/form/state-button.mjs +2 -1
- package/source/components/layout/board.mjs +1 -0
- package/source/components/layout/collapse.mjs +1 -0
- package/source/components/layout/full-screen.mjs +1 -0
- package/source/components/layout/iframe.mjs +1 -0
- package/source/components/layout/overlay.mjs +1 -0
- package/source/components/layout/panel.mjs +1 -0
- package/source/components/layout/split-panel.mjs +1 -0
- package/source/components/layout/tabs.mjs +1 -1
- package/source/components/layout/vertical-tabs.mjs +1 -1
- package/source/components/layout/width-toggle.mjs +1 -0
- package/test/cases/components/layout/tabs.mjs +59 -0
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.6"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.
|
|
1
|
+
{"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.6"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"4.131.0"}
|
|
@@ -46,7 +46,8 @@ const containerElementSymbol = Symbol("containerElement");
|
|
|
46
46
|
*
|
|
47
47
|
* @fragments /fragments/components/form/action-button
|
|
48
48
|
*
|
|
49
|
-
* @example /examples/components/form/action-button
|
|
49
|
+
* @example /examples/components/form/action-button Inline menu
|
|
50
|
+
* @example /examples/components/form/action-button-bulk-actions Bulk action menu
|
|
50
51
|
*
|
|
51
52
|
* @issue https://localhost.alvine.dev:8440/development/issues/closed/264.html
|
|
52
53
|
*
|
|
@@ -24,6 +24,8 @@ export { ContextHint };
|
|
|
24
24
|
* A context hint control.
|
|
25
25
|
*
|
|
26
26
|
* @fragments /fragments/components/form/context-hint
|
|
27
|
+
* @example /examples/components/form/context-hint-inline
|
|
28
|
+
* @example /examples/components/form/context-hint-shortcuts
|
|
27
29
|
*
|
|
28
30
|
* @since 3.55.0
|
|
29
31
|
* @copyright Volker Schukai
|
|
@@ -24,6 +24,8 @@ export { ContextInfo };
|
|
|
24
24
|
* A context info control.
|
|
25
25
|
*
|
|
26
26
|
* @fragments /fragments/components/form/context-info
|
|
27
|
+
* @example /examples/components/form/context-info-workspace
|
|
28
|
+
* @example /examples/components/form/context-info-retention
|
|
27
29
|
*
|
|
28
30
|
* @since 3.55.0
|
|
29
31
|
* @copyright Volker Schukai
|
|
@@ -24,6 +24,8 @@ export { ContextNote };
|
|
|
24
24
|
* A context note control.
|
|
25
25
|
*
|
|
26
26
|
* @fragments /fragments/components/form/context-note
|
|
27
|
+
* @example /examples/components/form/context-note-handover
|
|
28
|
+
* @example /examples/components/form/context-note-review
|
|
27
29
|
*
|
|
28
30
|
* @since 3.55.0
|
|
29
31
|
* @copyright Volker Schukai
|
|
@@ -24,6 +24,8 @@ export { ContextSuccess };
|
|
|
24
24
|
* A context success control.
|
|
25
25
|
*
|
|
26
26
|
* @fragments /fragments/components/form/context-success
|
|
27
|
+
* @example /examples/components/form/context-success-domain
|
|
28
|
+
* @example /examples/components/form/context-success-checklist
|
|
27
29
|
*
|
|
28
30
|
* @since 3.55.0
|
|
29
31
|
* @copyright Volker Schukai
|
|
@@ -24,6 +24,8 @@ export { ContextWarning };
|
|
|
24
24
|
* A context warning control.
|
|
25
25
|
*
|
|
26
26
|
* @fragments /fragments/components/form/context-warning
|
|
27
|
+
* @example /examples/components/form/context-warning-retention
|
|
28
|
+
* @example /examples/components/form/context-warning-delete
|
|
27
29
|
*
|
|
28
30
|
* @since 3.55.0
|
|
29
31
|
* @copyright Volker Schukai
|
|
@@ -51,7 +51,8 @@ const MESSAGE_LAYOUT_WIDE = "wide";
|
|
|
51
51
|
* or manual actions.
|
|
52
52
|
*
|
|
53
53
|
* @fragments /fragments/components/form/message-state-button/
|
|
54
|
-
* @example /examples/components/form/message-state-button-simple
|
|
54
|
+
* @example /examples/components/form/message-state-button-simple Success message
|
|
55
|
+
* @example /examples/components/form/message-state-button-retry Retry and error message
|
|
55
56
|
*
|
|
56
57
|
* @since 2.11.0
|
|
57
58
|
* @copyright Volker Schukai
|
|
@@ -27,7 +27,8 @@ export { StateButton };
|
|
|
27
27
|
*
|
|
28
28
|
* @fragments /fragments/components/form/state-button/
|
|
29
29
|
*
|
|
30
|
-
* @example /examples/components/form/state-button-simple
|
|
30
|
+
* @example /examples/components/form/state-button-simple Simple state cycle
|
|
31
|
+
* @example /examples/components/form/state-button-deployment Deployment state sequence
|
|
31
32
|
*
|
|
32
33
|
* @since 1.5.0
|
|
33
34
|
* @copyright Volker Schukai
|
|
@@ -47,6 +47,7 @@ export const parkingElementSymbol = Symbol("parkingElement");
|
|
|
47
47
|
* @fragments /fragments/components/layout/board/
|
|
48
48
|
*
|
|
49
49
|
* @example /examples/components/layout/board-simple
|
|
50
|
+
* @example /examples/components/layout/board-kanban Kanban Board
|
|
50
51
|
*
|
|
51
52
|
* @since 3.116.0
|
|
52
53
|
* @copyright Volker Schukai
|
|
@@ -98,6 +98,7 @@ const nameSymbol = Symbol("name");
|
|
|
98
98
|
* @fragments /fragments/components/layout/collapse/
|
|
99
99
|
*
|
|
100
100
|
* @example /examples/components/layout/collapse-simple
|
|
101
|
+
* @example /examples/components/layout/collapse-with-events Collapse With Events
|
|
101
102
|
*
|
|
102
103
|
* @since 3.74.0
|
|
103
104
|
* @copyright Volker Schukai
|
|
@@ -53,6 +53,7 @@ export const fullScreenExitElementSymbol = Symbol("fullScreenExitElement");
|
|
|
53
53
|
* @fragments /fragments/components/layout/full-screen/
|
|
54
54
|
*
|
|
55
55
|
* @example /examples/components/layout/full-screen-simple
|
|
56
|
+
* @example /examples/components/layout/full-screen-media Focus Media View
|
|
56
57
|
*
|
|
57
58
|
* @since 4.10.0
|
|
58
59
|
* @copyright Volker Schukai
|
|
@@ -56,6 +56,7 @@ const timerCallbackSymbol = Symbol("timerCallback");
|
|
|
56
56
|
* @fragments /fragments/components/layout/iframe/
|
|
57
57
|
*
|
|
58
58
|
* @example /examples/components/layout/iframe-simple Simple iframe
|
|
59
|
+
* @example /examples/components/layout/iframe-with-toolbar Iframe With Toolbar
|
|
59
60
|
*
|
|
60
61
|
* @since 3.76.0
|
|
61
62
|
* @copyright Volker Schukai
|
|
@@ -70,6 +70,7 @@ const ATTRIBUTE_VALUE_OVERLAY_OPEN = "overlay-open";
|
|
|
70
70
|
* @fragments /fragments/components/layout/overlay/
|
|
71
71
|
*
|
|
72
72
|
* @example /examples/components/layout/overlay-simple
|
|
73
|
+
* @example /examples/components/layout/overlay-programmatic Programmatic Overlay Control
|
|
73
74
|
*
|
|
74
75
|
* @copyright Volker Schukai
|
|
75
76
|
* @summary The Overlay component is used to show an overlay and a button to open the overlay.
|
|
@@ -49,6 +49,7 @@ const timerCallbackSymbol = Symbol("timerCallback");
|
|
|
49
49
|
* @fragments /fragments/components/layout/panel/
|
|
50
50
|
*
|
|
51
51
|
* @example /examples/components/layout/panel-simple
|
|
52
|
+
* @example /examples/components/layout/panel-command-center Command Center Panel
|
|
52
53
|
*
|
|
53
54
|
* @since 3.54.0
|
|
54
55
|
* @copyright Volker Schukai
|
|
@@ -73,6 +73,7 @@ const TYPE_HORIZONTAL = "horizontal";
|
|
|
73
73
|
* @issue https://localhost.alvine.dev:8440/development/issues/closed/184.html
|
|
74
74
|
*
|
|
75
75
|
* @example /examples/components/layout/split-panel-simple
|
|
76
|
+
* @example /examples/components/layout/split-panel-presets Split Panel Presets
|
|
76
77
|
*
|
|
77
78
|
* @since 3.54.0
|
|
78
79
|
* @copyright Volker Schukai
|
|
@@ -60,6 +60,7 @@ const MODE_WIDE = "wide";
|
|
|
60
60
|
* @fragments /fragments/components/layout/width-toggle/
|
|
61
61
|
*
|
|
62
62
|
* @example /examples/components/layout/width-toggle-simple Toggle Width
|
|
63
|
+
* @example /examples/components/layout/width-toggle-reader Reader Width Toggle
|
|
63
64
|
*
|
|
64
65
|
* @since 3.57.0
|
|
65
66
|
* @copyright Volker Schukai
|
|
@@ -28,6 +28,21 @@ let html1 = `
|
|
|
28
28
|
</monster-tabs>
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
|
+
// language=html
|
|
32
|
+
let htmlActiveSecond = `
|
|
33
|
+
<monster-tabs id="mytabs">
|
|
34
|
+
<div data-monster-button-label="TAB1">
|
|
35
|
+
Das ist tab 1
|
|
36
|
+
</div>
|
|
37
|
+
<div data-monster-button-label="TAB2" class="active">
|
|
38
|
+
Das ist tab 2
|
|
39
|
+
</div>
|
|
40
|
+
<div data-monster-button-label="TAB3">
|
|
41
|
+
Das ist tab 3
|
|
42
|
+
</div>
|
|
43
|
+
</monster-tabs>
|
|
44
|
+
`;
|
|
45
|
+
|
|
31
46
|
let Tabs;
|
|
32
47
|
|
|
33
48
|
describe('Tabs', function () {
|
|
@@ -122,6 +137,50 @@ describe('Tabs', function () {
|
|
|
122
137
|
}, 0);
|
|
123
138
|
});
|
|
124
139
|
|
|
140
|
+
it('should open the first tab by default when no tab is predefined as active', function (done) {
|
|
141
|
+
|
|
142
|
+
let mocks = document.getElementById('mocks');
|
|
143
|
+
mocks.innerHTML = html1;
|
|
144
|
+
|
|
145
|
+
setTimeout(() => {
|
|
146
|
+
try {
|
|
147
|
+
const tabs = document.getElementById('mytabs');
|
|
148
|
+
expect(tabs).is.instanceof(Tabs);
|
|
149
|
+
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
expect(tabs.children[0].classList.contains('active')).to.equal(true);
|
|
152
|
+
expect(tabs.children[1].classList.contains('active')).to.equal(false);
|
|
153
|
+
expect(tabs.getActiveTab()).to.equal(tabs.children[0].getAttribute('id'));
|
|
154
|
+
done();
|
|
155
|
+
}, 100);
|
|
156
|
+
} catch (e) {
|
|
157
|
+
return done(e);
|
|
158
|
+
}
|
|
159
|
+
}, 0);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('should keep a predefined active tab instead of opening the first tab', function (done) {
|
|
163
|
+
|
|
164
|
+
let mocks = document.getElementById('mocks');
|
|
165
|
+
mocks.innerHTML = htmlActiveSecond;
|
|
166
|
+
|
|
167
|
+
setTimeout(() => {
|
|
168
|
+
try {
|
|
169
|
+
const tabs = document.getElementById('mytabs');
|
|
170
|
+
expect(tabs).is.instanceof(Tabs);
|
|
171
|
+
|
|
172
|
+
setTimeout(() => {
|
|
173
|
+
expect(tabs.children[0].classList.contains('active')).to.equal(false);
|
|
174
|
+
expect(tabs.children[1].classList.contains('active')).to.equal(true);
|
|
175
|
+
expect(tabs.getActiveTab()).to.equal(tabs.children[1].getAttribute('id'));
|
|
176
|
+
done();
|
|
177
|
+
}, 100);
|
|
178
|
+
} catch (e) {
|
|
179
|
+
return done(e);
|
|
180
|
+
}
|
|
181
|
+
}, 0);
|
|
182
|
+
});
|
|
183
|
+
|
|
125
184
|
});
|
|
126
185
|
|
|
127
186
|
|