@schukai/monster 4.38.0 → 4.38.2
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 +19 -0
- package/package.json +1 -1
- package/source/components/data/kpi-tile.mjs +55 -55
- package/source/components/datatable/style/filter-button.pcss +2 -0
- package/source/components/datatable/stylesheet/filter-button.mjs +1 -1
- package/source/components/tree-menu/tree-menu.mjs +10 -2
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +3 -3
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [4.38.2] - 2025-07-25
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
- filter width
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [4.38.1] - 2025-07-23
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
- add event to tree-menu action, selected
|
18
|
+
### Changes
|
19
|
+
|
20
|
+
- update nix
|
21
|
+
|
22
|
+
|
23
|
+
|
5
24
|
## [4.38.0] - 2025-07-21
|
6
25
|
|
7
26
|
### Add Features
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.2","@popperjs/core":"^2.11.8"},"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.38.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.2","@popperjs/core":"^2.11.8"},"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.38.2"}
|
@@ -14,8 +14,8 @@ import { instanceSymbol } from "../../constants.mjs";
|
|
14
14
|
import { ATTRIBUTE_ROLE } from "../../dom/constants.mjs";
|
15
15
|
import { CustomElement } from "../../dom/customelement.mjs";
|
16
16
|
import {
|
17
|
-
|
18
|
-
|
17
|
+
assembleMethodSymbol,
|
18
|
+
registerCustomElement,
|
19
19
|
} from "../../dom/customelement.mjs";
|
20
20
|
import { KpiTileStyleSheet } from "./stylesheet/kpi-tile.mjs";
|
21
21
|
|
@@ -34,62 +34,62 @@ export { KpiTile };
|
|
34
34
|
* @summary A KPI Tile Control that displays key performance indicators in a tile format.
|
35
35
|
*/
|
36
36
|
class KpiTile extends CustomElement {
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
static get [instanceSymbol]() {
|
38
|
+
return Symbol.for("@schukai/monster/components/data/kpi/tile@@instance");
|
39
|
+
}
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
/**
|
42
|
+
* @returns {symbol}
|
43
|
+
* @summary Returns the instance symbol for the KPI Tile control.
|
44
|
+
*/
|
45
|
+
[assembleMethodSymbol]() {
|
46
|
+
super[assembleMethodSymbol]();
|
47
|
+
return this;
|
48
|
+
}
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
50
|
+
/**
|
51
|
+
* To set the option via the HTML Tag use the attribute `data-monster-options-`
|
52
|
+
* with the name of the option.
|
53
|
+
*
|
54
|
+
* @property {Object} templates
|
55
|
+
* @property {string} templates.main The main template for the KPI Tile control.
|
56
|
+
* @property {Object} values
|
57
|
+
* @property {string} values.main The main value displayed in the tile.
|
58
|
+
* @property {string} values.small The small value displayed in the tile.
|
59
|
+
* @property {string} values.top The top value displayed in the tile.
|
60
|
+
* @property {string} values.bottom The bottom value displayed in the tile.
|
61
|
+
* @returns {Object}
|
62
|
+
* @summary Returns the default options for the KPI Tile control.
|
63
|
+
*/
|
64
|
+
get defaults() {
|
65
|
+
return Object.assign({}, super.defaults, {
|
66
|
+
templates: {
|
67
|
+
main: getTemplate(),
|
68
|
+
},
|
69
|
+
values: {
|
70
|
+
main: null,
|
71
|
+
small: null,
|
72
|
+
top: null,
|
73
|
+
bottom: null,
|
74
|
+
},
|
75
|
+
});
|
76
|
+
}
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
78
|
+
/**
|
79
|
+
* @returns {string}
|
80
|
+
* @summary Returns the role of the control.
|
81
|
+
*/
|
82
|
+
static getTag() {
|
83
|
+
return "monster-kpi-tile";
|
84
|
+
}
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
/**
|
87
|
+
* @returns {string}
|
88
|
+
* @summary Returns the role of the control.
|
89
|
+
*/
|
90
|
+
static getCSSStyleSheet() {
|
91
|
+
return [KpiTileStyleSheet];
|
92
|
+
}
|
93
93
|
}
|
94
94
|
|
95
95
|
/**
|
@@ -98,7 +98,7 @@ class KpiTile extends CustomElement {
|
|
98
98
|
* @summary Returns the template for the KPI Tile control.
|
99
99
|
*/
|
100
100
|
function getTemplate() {
|
101
|
-
|
101
|
+
return `
|
102
102
|
<div data-monster-role="control" part="control">
|
103
103
|
<div class="top" data-monster-role="top" part="top" data-monster-replace="path:values.top">—</div>
|
104
104
|
<div data-monster-role="main" part="main" data-monster-replace="path:values.main">—</div>
|
@@ -25,7 +25,7 @@ try {
|
|
25
25
|
FilterButtonStyleSheet.insertRule(
|
26
26
|
`
|
27
27
|
@layer filterbutton {
|
28
|
-
:host{display:flex}[data-monster-role=control] a{align-items:center;background:none;color:var(--monster-color-primary-1);display:flex}:is([data-monster-role=control] a):after{background-color:var(--monster-color-primary-1);content:\"\";display:inline-block;height:16px;margin:0 3px 0 5px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filter-square' viewBox='0 0 16 16'%3E%3Cpath d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z'/%3E%3Cpath d='M6 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filter-square' viewBox='0 0 16 16'%3E%3Cpath d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z'/%3E%3Cpath d='M6 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E\");-webkit-mask-size:cover;mask-size:cover;width:16px}
|
28
|
+
:host{display:flex}[data-monster-role=control]{width:-moz-max-content;width:max-content}[data-monster-role=control] a{align-items:center;background:none;color:var(--monster-color-primary-1);display:flex}:is([data-monster-role=control] a):after{background-color:var(--monster-color-primary-1);content:\"\";display:inline-block;height:16px;margin:0 3px 0 5px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filter-square' viewBox='0 0 16 16'%3E%3Cpath d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z'/%3E%3Cpath d='M6 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-filter-square' viewBox='0 0 16 16'%3E%3Cpath d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z'/%3E%3Cpath d='M6 11.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E\");-webkit-mask-size:cover;mask-size:cover;width:16px}
|
29
29
|
}`,
|
30
30
|
0,
|
31
31
|
);
|
@@ -126,6 +126,14 @@ class TreeMenu extends CustomElement {
|
|
126
126
|
* @property {String} mapping.idTemplate template with the id placeholders in the form ${name}, where name is the key
|
127
127
|
* @property {String} mapping.parentKey the parent key
|
128
128
|
* @property {String} mapping.selection the selection
|
129
|
+
* @property {Function} mapping.filter a filter function to filter the entries
|
130
|
+
* @property {Object} classes
|
131
|
+
* @property {String} classes.control the class for the control element
|
132
|
+
* @property {String} classes.label the class for the label element
|
133
|
+
* @property {Object} actions
|
134
|
+
* @property {Function} actions.open the action to open an entry (arguments, etnry, index, event)
|
135
|
+
* @property {Function} actions.close the action to close an entry (arguments, etnry, index, event)
|
136
|
+
* @property {Function} actions.select the action to select an entry (arguments, etnry, index, event)
|
129
137
|
*/
|
130
138
|
get defaults() {
|
131
139
|
return Object.assign({}, super.defaults, {
|
@@ -157,7 +165,7 @@ class TreeMenu extends CustomElement {
|
|
157
165
|
open: null,
|
158
166
|
close: null,
|
159
167
|
select: (entry) => {
|
160
|
-
|
168
|
+
console.warn("select action is not defined", entry);
|
161
169
|
},
|
162
170
|
},
|
163
171
|
|
@@ -361,7 +369,7 @@ function initEventHandler() {
|
|
361
369
|
container.classList.add("selected");
|
362
370
|
|
363
371
|
if (isFunction(doAction)) {
|
364
|
-
doAction.call(this, currentEntry, index);
|
372
|
+
doAction.call(this, currentEntry, index, event);
|
365
373
|
}
|
366
374
|
return;
|
367
375
|
}
|
package/source/types/version.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED
package/test/web/test.html
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
12
|
-
<h1 style='margin-bottom: 0.1em;'>Monster 4.
|
13
|
-
<div id="lastupdate" style='font-size:0.7em'>last update
|
12
|
+
<h1 style='margin-bottom: 0.1em;'>Monster 4.38.0</h1>
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update Mi 23. Jul 15:15:52 CEST 2025</div>
|
14
14
|
</div>
|
15
15
|
<div id="mocha-errors"
|
16
16
|
style="color: red;font-weight: bold;display: flex;align-items: center;justify-content: center;flex-direction: column;margin:20px;"></div>
|