@schukai/monster 3.121.0 → 4.1.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
@@ -2,6 +2,28 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [4.1.0] - 2025-05-11
|
6
|
+
|
7
|
+
### Add Features
|
8
|
+
|
9
|
+
- Improve button naming consistency in login component [#313](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/313)
|
10
|
+
### Bug Fixes
|
11
|
+
|
12
|
+
- part export button-button:login-button-button-button [#313](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/313)
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## [4.0.1] - 2025-05-10
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
- Enhance fetch mocks and option mappings for select components
|
21
|
+
- The status check is wrong
|
22
|
+
|
23
|
+
## [4.0.0] - 2025-05-10
|
24
|
+
|
25
|
+
|
26
|
+
|
5
27
|
## [3.121.0] - 2025-05-10
|
6
28
|
|
7
29
|
### Add Features
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.0","@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":"
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.0","@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.1.0"}
|
@@ -1579,7 +1579,7 @@ function getTemplate() {
|
|
1579
1579
|
button:login-button-button,
|
1580
1580
|
popper:login-button-popper,
|
1581
1581
|
message:login-button-message,
|
1582
|
-
button-button:login-button-button,
|
1582
|
+
button-button:login-button-button-button,
|
1583
1583
|
button-control:login-button-control"
|
1584
1584
|
data-monster-replace="path:labels.login"></monster-message-state-button>
|
1585
1585
|
<a href="#" data-monster-role="forgot-password-link" part="forgot-password-link"
|
@@ -1618,7 +1618,7 @@ function getTemplate() {
|
|
1618
1618
|
button:forgot-password-button-button,
|
1619
1619
|
popper:forgot-password-button-popper,
|
1620
1620
|
message:forgot-password-button-message,
|
1621
|
-
button-button:forgot-password-button-button,
|
1621
|
+
button-button:forgot-password-button-button-button,
|
1622
1622
|
button-control:forgot-password-button-control"
|
1623
1623
|
data-monster-attributes="accesskey path:accessKeys.password"
|
1624
1624
|
data-monster-replace="path:labels.requestLink"></monster-message-state-button>
|
@@ -1660,7 +1660,7 @@ function getTemplate() {
|
|
1660
1660
|
button:second-factor-button-button,
|
1661
1661
|
popper:second-factor-button-popper,
|
1662
1662
|
message:second-factor-button-message,
|
1663
|
-
button-button:second-factor-button-button,
|
1663
|
+
button-button:second-factor-button-button-button,
|
1664
1664
|
button-control:second-factor-button-control"
|
1665
1665
|
data-monster-replace="path:labels.sendSecondFactorDigits"></monster-message-state-button>
|
1666
1666
|
|
@@ -2454,7 +2454,7 @@ function fetchData(url) {
|
|
2454
2454
|
self[isLoadingSymbol] = false;
|
2455
2455
|
delayWatch = true;
|
2456
2456
|
|
2457
|
-
if (response.status >= 200 && response.status < 300) {
|
2457
|
+
if (!(response.status >= 200 && response.status < 300)) {
|
2458
2458
|
throw new Error(`HTTP error! status: ${response.status}`);
|
2459
2459
|
}
|
2460
2460
|
|
@@ -58,19 +58,22 @@ describe('Select', function () {
|
|
58
58
|
|
59
59
|
describe('With fetch', function () {
|
60
60
|
|
61
|
-
beforeEach(() => {
|
61
|
+
beforeEach((done) => {
|
62
62
|
let mocks = document.getElementById('mocks');
|
63
63
|
mocks.innerHTML = html1;
|
64
64
|
|
65
65
|
global['fetch'] = function (url, options) {
|
66
|
-
|
67
66
|
let headers = new Map;
|
68
67
|
headers.set('content-type', 'application/json');
|
69
|
-
|
70
68
|
return new Promise((resolve, reject) => {
|
71
69
|
resolve({
|
70
|
+
ok:true,
|
71
|
+
status:200,
|
72
72
|
headers: headers,
|
73
73
|
text: function () {
|
74
|
+
|
75
|
+
|
76
|
+
|
74
77
|
return new Promise((resolve2, reject2) => {
|
75
78
|
|
76
79
|
let json = JSON.parse(`[
|
@@ -110,7 +113,7 @@ describe('Select', function () {
|
|
110
113
|
})
|
111
114
|
|
112
115
|
};
|
113
|
-
|
116
|
+
done()
|
114
117
|
|
115
118
|
})
|
116
119
|
|
@@ -126,12 +129,6 @@ describe('Select', function () {
|
|
126
129
|
mocks.innerHTML = html2;
|
127
130
|
});
|
128
131
|
|
129
|
-
afterEach(() => {
|
130
|
-
let mocks = document.getElementById('mocks');
|
131
|
-
mocks.innerHTML = "";
|
132
|
-
global['fetch'] = fetchReference;
|
133
|
-
})
|
134
|
-
|
135
132
|
describe('create from template', function () {
|
136
133
|
it('should contains monster-select', function () {
|
137
134
|
expect(document.getElementById('test2')).contain.html('<monster-select');
|
@@ -148,14 +145,14 @@ describe('Select', function () {
|
|
148
145
|
|
149
146
|
it('should have options', function (done) {
|
150
147
|
|
151
|
-
this.timeout(
|
148
|
+
this.timeout(5000)
|
152
149
|
|
153
150
|
let mocks = document.getElementById('mocks');
|
154
151
|
const select = document.createElement('monster-select');
|
155
|
-
select.setOption('url', 'https://monsterjs.org/assets/examples/countries.json')
|
152
|
+
select.setOption('url', 'https://monsterjs.org/assets/examples/countries.json') // url is not used in this test, see fetch mock
|
156
153
|
select.setOption('mapping.selector', '*')
|
157
|
-
select.setOption('mapping.labelTemplate', '${
|
158
|
-
select.setOption('mapping.valueTemplate', '${
|
154
|
+
select.setOption('mapping.labelTemplate', '${id}')
|
155
|
+
select.setOption('mapping.valueTemplate', '${id}')
|
159
156
|
|
160
157
|
select.addEventListener('monster-options-set', (e) => {
|
161
158
|
setTimeout(() => {
|
@@ -63,6 +63,8 @@ describe('Treeselect', function () {
|
|
63
63
|
return new Promise((resolve, reject) => {
|
64
64
|
resolve({
|
65
65
|
headers: headers,
|
66
|
+
ok:true,
|
67
|
+
status:200,
|
66
68
|
text: function () {
|
67
69
|
return new Promise((resolve2, reject2) => {
|
68
70
|
|
@@ -141,8 +143,8 @@ describe('Treeselect', function () {
|
|
141
143
|
treeselect.setOption('url', 'https://monsterjs.org/assets/examples/countries.json');
|
142
144
|
|
143
145
|
treeselect.setOption('mapping.selector', '*');
|
144
|
-
treeselect.setOption('mapping.labelTemplate', '${
|
145
|
-
treeselect.setOption('mapping.valueTemplate', '${
|
146
|
+
treeselect.setOption('mapping.labelTemplate', '${id}')
|
147
|
+
treeselect.setOption('mapping.valueTemplate', '${id}')
|
146
148
|
treeselect.addEventListener('monster-options-set', (e) => {
|
147
149
|
setTimeout(() => {
|
148
150
|
|