@schukai/monster 3.94.1 → 3.95.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
CHANGED
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.12","@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":"3.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.12","@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":"3.95.0"}
|
@@ -81,6 +81,8 @@ class Log extends CustomElement {
|
|
81
81
|
* @property {string} templates.main Main template
|
82
82
|
* @property {Object} labels Labels
|
83
83
|
* @property {string} labels.nothingToReport Label for empty state
|
84
|
+
* @property {Object} classes Classes
|
85
|
+
* @property {string} classes.direction Direction of the log: ascending or descending
|
84
86
|
* @property {number} updateFrequency Update frequency in milliseconds for the timestamp
|
85
87
|
*/
|
86
88
|
get defaults() {
|
@@ -93,8 +95,8 @@ class Log extends CustomElement {
|
|
93
95
|
nothingToReport: "There is nothing to report yet.",
|
94
96
|
},
|
95
97
|
|
96
|
-
|
97
|
-
direction: "
|
98
|
+
features: {
|
99
|
+
direction: "ascending",
|
98
100
|
},
|
99
101
|
|
100
102
|
updateFrequency: 10000,
|
@@ -123,8 +125,7 @@ class Log extends CustomElement {
|
|
123
125
|
* @return {Log}
|
124
126
|
*/
|
125
127
|
clear() {
|
126
|
-
this[logElementSymbol].
|
127
|
-
this[emptyStateElementSymbol].style.display = "block";
|
128
|
+
this[logElementSymbol].setOption("entries", []);
|
128
129
|
return this;
|
129
130
|
}
|
130
131
|
|
@@ -141,7 +142,11 @@ class Log extends CustomElement {
|
|
141
142
|
}
|
142
143
|
|
143
144
|
const entries = this.getOption("entries");
|
144
|
-
|
145
|
+
if (this.getOption("features.direction") === "ascending") {
|
146
|
+
entries.unshift(entry);
|
147
|
+
} else {
|
148
|
+
entries.push(entry);
|
149
|
+
}
|
145
150
|
|
146
151
|
/** this field is not used, but triggers a change event */
|
147
152
|
this.setOption("length", entries.length - 1);
|