@schukai/monster 3.96.0 → 3.96.1
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 +12 -0
- package/package.json +1 -1
- package/source/components/content/copy.mjs +1 -1
- package/source/components/datatable/dataset.mjs +7 -7
- package/source/components/datatable/datasource/rest.mjs +3 -3
- package/source/components/datatable/pagination.mjs +1 -1
- package/source/components/form/api-bar.mjs +1 -1
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +1 -1
- package/source/components/form/button.mjs +2 -2
- package/source/components/form/confirm-button.mjs +1 -1
- package/source/components/form/form.mjs +7 -5
- package/source/components/form/select.mjs +2014 -2006
- package/source/components/form/style/field-set.pcss +9 -0
- package/source/components/form/style/toggle-switch.pcss +3 -0
- package/source/components/form/stylesheet/field-set.mjs +7 -14
- package/source/components/form/stylesheet/toggle-switch.mjs +7 -14
- package/source/components/form/toggle-switch.mjs +386 -330
- package/source/components/layout/tabs.mjs +3 -3
- package/source/components/layout/width-toggle.mjs +1 -1
- package/source/components/navigation/table-of-content.mjs +1 -1
- package/source/components/notify/message.mjs +1 -1
- package/source/components/notify/notify.mjs +2 -2
- package/source/components/state/log.mjs +1 -1
- package/source/components/state/state.mjs +1 -1
- package/source/components/style/theme.css +4 -4
- package/source/dom/constants.mjs +8 -5
- package/source/dom/updater.mjs +3 -6
- package/test/cases/components/form/toggle-switch.mjs +80 -65
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## [3.96.1] - 2024-12-30
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
- **monster-toggle-switch:** bouncing effekt [#274](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/274)
|
10
|
+
- **toggle-switch:** repair test [#274](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/274)
|
11
|
+
### Changes
|
12
|
+
|
13
|
+
- update doc, small issues, etc [#274](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/274)
|
14
|
+
|
15
|
+
|
16
|
+
|
5
17
|
## [3.96.0] - 2024-12-29
|
6
18
|
|
7
19
|
### Add Features
|
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.96.
|
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.96.1"}
|
@@ -84,7 +84,7 @@ const resizeObserverSymbol = Symbol("resizeObserver");
|
|
84
84
|
*
|
85
85
|
* @fragments /fragments/components/content/copy/
|
86
86
|
*
|
87
|
-
* @example /examples/components/content/copy-simple
|
87
|
+
* @example /examples/components/content/copy-simple Copy
|
88
88
|
*
|
89
89
|
* @since 3.77.0
|
90
90
|
* @copyright schukai GmbH
|
@@ -20,7 +20,7 @@ import {
|
|
20
20
|
attributeObserverSymbol,
|
21
21
|
registerCustomElement,
|
22
22
|
} from "../../dom/customelement.mjs";
|
23
|
-
import {findElementWithSelectorUpwards} from "../../dom/util.mjs";
|
23
|
+
import {findElementWithSelectorUpwards, getDocument, getWindow} from "../../dom/util.mjs";
|
24
24
|
import {isString} from "../../types/is.mjs";
|
25
25
|
import {Observer} from "../../types/observer.mjs";
|
26
26
|
import {
|
@@ -42,8 +42,8 @@ export {DataSet};
|
|
42
42
|
*
|
43
43
|
* @fragments /fragments/components/datatable/dataset
|
44
44
|
*
|
45
|
-
* @example /examples/components/datatable/dataset-dom
|
46
|
-
* @example /examples/components/datatable/dataset-rest
|
45
|
+
* @example /examples/components/datatable/dataset-dom Dom dataset
|
46
|
+
* @example /examples/components/datatable/dataset-rest Rest dataset
|
47
47
|
*
|
48
48
|
* @issue https://localhost.alvine.dev:8443/development/issues/closed/272.html
|
49
49
|
*
|
@@ -56,7 +56,7 @@ class DataSet extends CustomElement {
|
|
56
56
|
* @return {symbol}
|
57
57
|
*/
|
58
58
|
static get [instanceSymbol]() {
|
59
|
-
return Symbol.for("@schukai/monster/components/dataset@@instance");
|
59
|
+
return Symbol.for("@schukai/monster/components/datatable/dataset@@instance");
|
60
60
|
}
|
61
61
|
|
62
62
|
/**
|
@@ -118,7 +118,7 @@ class DataSet extends CustomElement {
|
|
118
118
|
* @type {boolean}
|
119
119
|
*/
|
120
120
|
refreshOnMutation: {
|
121
|
-
selector: "input, select, textarea",
|
121
|
+
selector: "input, select, textarea, monster-select, monster-toggle-switch",
|
122
122
|
},
|
123
123
|
|
124
124
|
data: {},
|
@@ -139,12 +139,12 @@ class DataSet extends CustomElement {
|
|
139
139
|
/**
|
140
140
|
* This method is called when the component is created.
|
141
141
|
* @since 3.70.0
|
142
|
-
* @return {
|
142
|
+
* @return {Promise}
|
143
143
|
*/
|
144
144
|
refresh() {
|
145
145
|
// makes sure that handleDataSourceChanges is called
|
146
146
|
this.setOption("data", {});
|
147
|
-
return this;
|
147
|
+
return Promise.resolve(this);
|
148
148
|
}
|
149
149
|
|
150
150
|
/**
|
@@ -68,9 +68,9 @@ const filterObserverSymbol = Symbol("filterObserver");
|
|
68
68
|
*
|
69
69
|
* @fragments /fragments/components/datatable/datasource/rest
|
70
70
|
*
|
71
|
-
* @example /examples/components/datatable/datasource-rest-simple
|
72
|
-
* @example /examples/components/datatable/datasource-rest-auto-init
|
73
|
-
* @example /examples/components/datatable/datasource-rest-do-fetch
|
71
|
+
* @example /examples/components/datatable/datasource-rest-simple Simple Rest datasource
|
72
|
+
* @example /examples/components/datatable/datasource-rest-auto-init Auto init
|
73
|
+
* @example /examples/components/datatable/datasource-rest-do-fetch Rest datasource with fetch
|
74
74
|
*
|
75
75
|
* @issue https://localhost.alvine.dev:8443/development/issues/closed/272.html
|
76
76
|
*
|
@@ -75,7 +75,7 @@ const debounceSizeSymbol = Symbol("debounceSize");
|
|
75
75
|
*
|
76
76
|
* @fragments /fragments/components/datatable/pagination
|
77
77
|
*
|
78
|
-
* @example /examples/components/datatable/pagination-simple
|
78
|
+
* @example /examples/components/datatable/pagination-simple Pagination
|
79
79
|
*
|
80
80
|
* @copyright schukai GmbH
|
81
81
|
* @summary The Pagination component is used to show the current page and the total number of pages.
|
@@ -56,7 +56,7 @@ const containerElementSymbol = Symbol("containerElement");
|
|
56
56
|
*
|
57
57
|
* @fragments /fragments/components/form/api-button/
|
58
58
|
*
|
59
|
-
* @example /examples/components/form/api-button-simple
|
59
|
+
* @example /examples/components/form/api-button-simple API Button
|
60
60
|
*
|
61
61
|
* @since 3.32.0
|
62
62
|
* @copyright schukai GmbH
|
@@ -129,7 +129,7 @@ const ATTRIBUTE_POPPER_POSITION = "data-monster-popper-position";
|
|
129
129
|
*
|
130
130
|
* @fragments /fragments/components/form/button-bar/
|
131
131
|
*
|
132
|
-
* @example /examples/components/form/button-bar-simple
|
132
|
+
* @example /examples/components/form/button-bar-simple Button bar
|
133
133
|
*
|
134
134
|
* @copyright schukai GmbH
|
135
135
|
* @summary This is a button bar control that can be used to display a set of buttons.
|
@@ -44,8 +44,8 @@ export const buttonElementSymbol = Symbol("buttonElement");
|
|
44
44
|
*
|
45
45
|
* @fragments /fragments/components/form/button/
|
46
46
|
*
|
47
|
-
* @example /examples/components/form/button-simple
|
48
|
-
* @example /examples/components/form/button-with-click-event
|
47
|
+
* @example /examples/components/form/button-simple Simple Button
|
48
|
+
* @example /examples/components/form/button-with-click-event Button with event
|
49
49
|
*
|
50
50
|
* @copyright schukai GmbH
|
51
51
|
* @summary A beautiful button that can make your life easier and also looks good.
|
@@ -93,7 +93,7 @@ const cancelButtonElementSymbol = Symbol("cancelButtonElement");
|
|
93
93
|
*
|
94
94
|
* @fragments /fragments/components/form/confirm-button/
|
95
95
|
*
|
96
|
-
* @example /examples/components/form/confirm-button-simple
|
96
|
+
* @example /examples/components/form/confirm-button-simple confirm button
|
97
97
|
*
|
98
98
|
* @since 1.5.0
|
99
99
|
* @copyright schukai GmbH
|
@@ -83,7 +83,7 @@ class Form extends DataSet {
|
|
83
83
|
},
|
84
84
|
|
85
85
|
reportValidity: {
|
86
|
-
selector: "input,select,textarea",
|
86
|
+
selector: "input,select,textarea,monster-select,monster-toggle-switch",
|
87
87
|
},
|
88
88
|
|
89
89
|
eventProcessing: true,
|
@@ -130,12 +130,13 @@ class Form extends DataSet {
|
|
130
130
|
/**
|
131
131
|
* This method is called when the component is created.
|
132
132
|
* @since 3.70.0
|
133
|
-
* @return {
|
133
|
+
* @return {Promise}
|
134
134
|
*/
|
135
135
|
refresh() {
|
136
|
-
this.write()
|
137
|
-
|
138
|
-
|
136
|
+
return this.write().then(() => {
|
137
|
+
super.refresh();
|
138
|
+
return this;
|
139
|
+
})
|
139
140
|
}
|
140
141
|
|
141
142
|
/**
|
@@ -175,6 +176,7 @@ function initEventHandler() {
|
|
175
176
|
const events = this.getOption("writeBack.events");
|
176
177
|
for (const event of events) {
|
177
178
|
this.addEventListener(event, (e) => {
|
179
|
+
|
178
180
|
if (!this.reportValidity()) {
|
179
181
|
this.classList.add("invalid");
|
180
182
|
setTimeout(() => {
|