@schukai/monster 3.64.1 → 3.65.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 +19 -0
- package/example/components/form/button.mjs +1 -1
- package/example/components/form/field-set.mjs +4 -0
- package/example/components/form/select.mjs +1 -1
- package/package.json +2 -1
- package/source/components/datatable/datatable/header.mjs +228 -221
- package/source/components/datatable/style/dataset.pcss +1 -0
- package/source/components/datatable/style/datatable.pcss +1 -0
- package/source/components/datatable/stylesheet/dataset.mjs +1 -1
- package/source/components/datatable/stylesheet/datatable.mjs +1 -1
- package/source/components/form/button.mjs +263 -281
- package/source/components/form/field-set.mjs +300 -0
- package/source/components/form/popper.mjs +13 -480
- package/source/components/form/style/field-set.pcss +13 -0
- package/source/components/form/stylesheet/button-bar.mjs +1 -1
- package/source/components/form/stylesheet/confirm-button.mjs +1 -1
- package/source/components/form/stylesheet/field-set.mjs +31 -0
- package/source/components/form/stylesheet/form.mjs +1 -1
- package/source/components/host/collapse.mjs +14 -516
- package/source/components/host/config-manager.mjs +9 -2
- package/source/components/host/constants.mjs +9 -4
- package/source/components/host/details.mjs +14 -253
- package/source/components/host/stylesheet/host.mjs +1 -1
- package/source/components/host/stylesheet/overlay.mjs +1 -1
- package/source/components/layout/collapse.mjs +542 -0
- package/source/components/layout/details.mjs +271 -0
- package/source/components/layout/popper.mjs +476 -0
- package/source/components/layout/tabs.mjs +3 -3
- package/source/components/layout/width-toggle.mjs +3 -3
- package/source/components/navigation/style/table-of-content.pcss +84 -0
- package/source/components/navigation/stylesheet/table-of-content.mjs +31 -0
- package/source/components/navigation/table-of-content.mjs +418 -0
- package/source/components/state/stylesheet/state.mjs +1 -1
- package/source/components/style/link.pcss +0 -1
- package/source/components/style/mixin/typography.pcss +7 -7
- package/source/components/style/typography.pcss +1 -1
- package/source/components/stylesheet/typography.mjs +1 -1
- package/source/dom/ready.mjs +10 -4
- package/source/monster.mjs +5 -84
- package/source/types/proxyobserver.mjs +4 -2
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/tests.js +4 -4
- package/source/components/form/form-field.mjs +0 -341
- package/source/components/form/style/form-field.pcss +0 -4
- package/source/components/form/stylesheet/form-field.mjs +0 -31
- /package/source/components/{host → layout}/style/collapse.pcss +0 -0
- /package/source/components/{host → layout}/style/details.pcss +0 -0
- /package/source/components/{form → layout}/style/popper.pcss +0 -0
- /package/source/components/{host → layout}/stylesheet/collapse.mjs +0 -0
- /package/source/components/{host → layout}/stylesheet/details.mjs +0 -0
- /package/source/components/{form → layout}/stylesheet/popper.mjs +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.65.0] - 2024-04-15
|
|
3
|
+
|
|
4
|
+
### Add Features
|
|
5
|
+
|
|
6
|
+
- new toc control finished [#189](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/189)
|
|
7
|
+
- new toc component [#189](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/189)
|
|
8
|
+
- new toc component [#189](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/189)
|
|
9
|
+
- new toc component [#188](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/188)
|
|
10
|
+
- new component field-set [#186](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/186)
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
- documetation script
|
|
14
|
+
- wip showroom
|
|
15
|
+
- update build scripts [#186](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/186)
|
|
16
|
+
### Code Refactoring
|
|
17
|
+
|
|
18
|
+
- move popper to layout namespace [#190](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/190) [#189](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/189)
|
|
19
|
+
|
|
2
20
|
## [3.64.1] - 2024-04-07
|
|
3
21
|
|
|
4
22
|
### Bug Fixes
|
|
@@ -6,6 +24,7 @@
|
|
|
6
24
|
- monster.mjs
|
|
7
25
|
### Changes
|
|
8
26
|
|
|
27
|
+
- release and publish to npm new version 3.64.1
|
|
9
28
|
- update license text
|
|
10
29
|
- fix import statements
|
|
11
30
|
- add showroot files
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schukai/monster",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.65.0",
|
|
4
4
|
"description": "Monster is a simple library for creating fast, robust and lightweight websites.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@floating-ui/dom": "^1.6.3",
|
|
44
44
|
"@popperjs/core": "^2.11.8",
|
|
45
|
+
"estraverse": "^5.3.0",
|
|
45
46
|
"vite-plugin-directory-index": "^3.0.1"
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
3
|
-
*
|
|
2
|
+
* Copyright © schukai GmbH and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
|
+
* Node module: @schukai/monster
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
6
|
+
* The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
|
|
7
|
+
*
|
|
8
|
+
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
|
+
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
+
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
|
4
11
|
*/
|
|
5
12
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
13
|
+
import {Base} from "../../../types/base.mjs";
|
|
14
|
+
import {equipWithInternal} from "../../../types/internal.mjs";
|
|
15
|
+
import {instanceSymbol} from "../../../constants.mjs";
|
|
16
|
+
import {Observer} from "../../../types/observer.mjs";
|
|
17
|
+
import {ATTRIBUTE_DATATABLE_SORTABLE} from "../../constants.mjs";
|
|
11
18
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
validateIterable,
|
|
20
|
+
validateInstance,
|
|
14
21
|
} from "../../../types/validate.mjs";
|
|
15
22
|
|
|
16
23
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
Header,
|
|
25
|
+
DIRECTION_ASC,
|
|
26
|
+
DIRECTION_DESC,
|
|
27
|
+
DIRECTION_NONE,
|
|
28
|
+
createOrderStatement,
|
|
22
29
|
};
|
|
23
30
|
|
|
24
31
|
/**
|
|
@@ -36,7 +43,7 @@ const DIRECTION_ASC = "asc";
|
|
|
36
43
|
const DIRECTION_DESC = "desc";
|
|
37
44
|
|
|
38
45
|
/**
|
|
39
|
-
* no direction and no order
|
|
46
|
+
* no direction and no order statement
|
|
40
47
|
*
|
|
41
48
|
* @private
|
|
42
49
|
* @type {string}
|
|
@@ -51,178 +58,178 @@ const DIRECTION_NONE = "";
|
|
|
51
58
|
* @summary A datatable
|
|
52
59
|
*/
|
|
53
60
|
class Header extends Base {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
61
|
+
constructor() {
|
|
62
|
+
super();
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* - attachInternalObserver
|
|
66
|
+
* - detachInternalObserver
|
|
67
|
+
* - containsInternalObserver
|
|
68
|
+
* - setInternal
|
|
69
|
+
* - setInternals
|
|
70
|
+
* - getInternal
|
|
71
|
+
*/
|
|
72
|
+
equipWithInternal.call(this);
|
|
73
|
+
|
|
74
|
+
this.attachInternalObserver(
|
|
75
|
+
new Observer(() => {
|
|
76
|
+
updateStruct.call(this);
|
|
77
|
+
}),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* This method is called by the `instanceof` operator.
|
|
83
|
+
* @returns {symbol}
|
|
84
|
+
*/
|
|
85
|
+
static get [instanceSymbol]() {
|
|
86
|
+
return Symbol.for("@schukai/monster/components/datatable/header@@instance");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @returns {object}
|
|
92
|
+
*/
|
|
93
|
+
get internalDefaults() {
|
|
94
|
+
return {
|
|
95
|
+
field: undefined,
|
|
96
|
+
html: undefined,
|
|
97
|
+
order: undefined,
|
|
98
|
+
direction: undefined,
|
|
99
|
+
label: undefined,
|
|
100
|
+
labelKey: undefined,
|
|
101
|
+
classes: undefined,
|
|
102
|
+
index: undefined,
|
|
103
|
+
mode: undefined,
|
|
104
|
+
grid: undefined,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
changeDirection() {
|
|
109
|
+
let direction = this.getInternal("direction");
|
|
110
|
+
if (direction === DIRECTION_ASC) {
|
|
111
|
+
direction = DIRECTION_DESC;
|
|
112
|
+
} else if (direction === DIRECTION_DESC) {
|
|
113
|
+
direction = DIRECTION_NONE;
|
|
114
|
+
} else {
|
|
115
|
+
direction = DIRECTION_ASC;
|
|
116
|
+
}
|
|
117
|
+
this.setInternal("direction", direction);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @param direction
|
|
123
|
+
*/
|
|
124
|
+
setDirection(direction) {
|
|
125
|
+
this.setInternal("direction", direction);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @param {string} field
|
|
130
|
+
*/
|
|
131
|
+
set field(field) {
|
|
132
|
+
this.setInternal("field", String(field));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @param {string} direction
|
|
137
|
+
*/
|
|
138
|
+
set direction(direction) {
|
|
139
|
+
this.setInternal("direction", String(direction));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
set labelKey(labelKey) {
|
|
143
|
+
this.setInternal("labelKey", String(labelKey));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {string} label
|
|
148
|
+
*/
|
|
149
|
+
set label(label) {
|
|
150
|
+
this.setInternal("label", String(label));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @param {string} classes
|
|
155
|
+
*/
|
|
156
|
+
set classes(classes) {
|
|
157
|
+
this.setInternal("classes", String(classes));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @param {number} index
|
|
162
|
+
*/
|
|
163
|
+
set index(index) {
|
|
164
|
+
this.setInternal("index", String(index));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @param {string} grid
|
|
169
|
+
*/
|
|
170
|
+
get grid() {
|
|
171
|
+
return this.getInternal("grid");
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @returns {string}
|
|
176
|
+
*/
|
|
177
|
+
get labelKey() {
|
|
178
|
+
return this.getInternal("labelKey");
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @returns {string}
|
|
183
|
+
*/
|
|
184
|
+
get html() {
|
|
185
|
+
return this.getInternal("html");
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
get order() {
|
|
189
|
+
return this.getInternal("order");
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @returns {string}
|
|
194
|
+
*/
|
|
195
|
+
get field() {
|
|
196
|
+
return this.getInternal("field");
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @returns {string}
|
|
201
|
+
*/
|
|
202
|
+
get index() {
|
|
203
|
+
return this.getInternal("index");
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @returns {string}
|
|
208
|
+
*/
|
|
209
|
+
get classes() {
|
|
210
|
+
return this.getInternal("classes");
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @returns {string}
|
|
215
|
+
*/
|
|
216
|
+
get label() {
|
|
217
|
+
return this.getInternal("label");
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @returns {string}
|
|
222
|
+
*/
|
|
223
|
+
get direction() {
|
|
224
|
+
return this.getInternal("direction");
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* @returns {string}
|
|
229
|
+
*/
|
|
230
|
+
get mode() {
|
|
231
|
+
return this.getInternal("mode");
|
|
232
|
+
}
|
|
226
233
|
}
|
|
227
234
|
|
|
228
235
|
/**
|
|
@@ -231,44 +238,44 @@ class Header extends Base {
|
|
|
231
238
|
* @returns {string}
|
|
232
239
|
*/
|
|
233
240
|
function createOrderStatement(headers) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
241
|
+
validateIterable(headers);
|
|
242
|
+
|
|
243
|
+
const oderStatement = [];
|
|
244
|
+
for (const header of headers) {
|
|
245
|
+
validateInstance(header, Header);
|
|
246
|
+
const order = header.getInternal("order");
|
|
247
|
+
|
|
248
|
+
if (!order) {
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
oderStatement.push(order);
|
|
252
|
+
}
|
|
253
|
+
return oderStatement.join(",");
|
|
247
254
|
}
|
|
248
255
|
|
|
249
256
|
/**
|
|
250
257
|
* @private
|
|
251
258
|
*/
|
|
252
259
|
function updateStruct() {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
260
|
+
const label = this.getInternal("label");
|
|
261
|
+
const direction = this.getInternal("direction");
|
|
262
|
+
const field = this.getInternal("field");
|
|
263
|
+
|
|
264
|
+
let order = "";
|
|
265
|
+
|
|
266
|
+
if (!field) {
|
|
267
|
+
this.setInternal("order", order);
|
|
268
|
+
this.setInternal("html", label);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (direction) {
|
|
273
|
+
order = `${field} ${direction}`.trim();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
this.setInternal("order", order);
|
|
277
|
+
this.setInternal(
|
|
278
|
+
"html",
|
|
279
|
+
`<a href="#" ${ATTRIBUTE_DATATABLE_SORTABLE}="${order}">${label}</a>`,
|
|
280
|
+
);
|
|
274
281
|
}
|