@schukai/monster 3.85.0 → 3.85.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/content/copy.mjs +381 -317
- package/source/components/datatable/columnbar.mjs +15 -36
- package/source/components/datatable/datasource/dom.mjs +1 -0
- package/source/components/datatable/datatable.mjs +757 -765
- package/source/components/datatable/stylesheet/datatable.mjs +7 -14
- package/source/components/datatable/util.mjs +1 -0
- package/source/dom/ready.mjs +1 -1
- package/source/util/deadmansswitch.mjs +13 -1
|
@@ -55,43 +55,17 @@ const dotsContainerElementSymbol = Symbol("dotsContainerElement");
|
|
|
55
55
|
*/
|
|
56
56
|
const popperInstanceSymbol = Symbol("popperInstance");
|
|
57
57
|
|
|
58
|
+
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* <img src="./images/column-bar.png">
|
|
62
|
-
*
|
|
63
|
-
* You can create this control either by specifying the HTML tag <monster-column-bar />` directly in the HTML or using
|
|
64
|
-
* Javascript via the `document.createElement('monster-column-bar');` method.
|
|
65
|
-
*
|
|
66
|
-
* ```html
|
|
67
|
-
* <monster-column-bar></monster-column-bar>
|
|
68
|
-
* ```
|
|
60
|
+
* A column bar for a datatable
|
|
69
61
|
*
|
|
70
|
-
*
|
|
62
|
+
* @fragments /fragments/components/datatable/datatable/
|
|
71
63
|
*
|
|
72
|
-
*
|
|
73
|
-
* import '@schukai/monster/components/datatable/column-bar.mjs';
|
|
74
|
-
* document.createElement('monster-column-bar');
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* The Body should have a class "hidden" to ensure that the styles are applied correctly.
|
|
78
|
-
*
|
|
79
|
-
* ```css
|
|
80
|
-
* body.hidden {
|
|
81
|
-
* visibility: hidden;
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @startuml column-bar.png
|
|
86
|
-
* skinparam monochrome true
|
|
87
|
-
* skinparam shadowing false
|
|
88
|
-
* HTMLElement <|-- CustomElement
|
|
89
|
-
* CustomElement <|-- ColumnBar
|
|
90
|
-
* @enduml
|
|
64
|
+
* @example /examples/components/datatable/empty
|
|
91
65
|
*
|
|
92
66
|
* @copyright schukai GmbH
|
|
93
|
-
* @summary
|
|
94
|
-
|
|
67
|
+
* @summary The ColumnBar component is used to show and configure the columns of a datatable.
|
|
68
|
+
**/
|
|
95
69
|
class ColumnBar extends CustomElement {
|
|
96
70
|
/**
|
|
97
71
|
* This method is called by the `instanceof` operator.
|
|
@@ -137,7 +111,7 @@ class ColumnBar extends CustomElement {
|
|
|
137
111
|
|
|
138
112
|
/**
|
|
139
113
|
*
|
|
140
|
-
* @return {
|
|
114
|
+
* @return {void}
|
|
141
115
|
*/
|
|
142
116
|
[assembleMethodSymbol]() {
|
|
143
117
|
super[assembleMethodSymbol]();
|
|
@@ -147,7 +121,7 @@ class ColumnBar extends CustomElement {
|
|
|
147
121
|
}
|
|
148
122
|
|
|
149
123
|
/**
|
|
150
|
-
* @return {
|
|
124
|
+
* @return {CSSStyleSheet[]}
|
|
151
125
|
*/
|
|
152
126
|
static getCSSStyleSheet() {
|
|
153
127
|
return [ColumnBarStyleSheet];
|
|
@@ -156,7 +130,7 @@ class ColumnBar extends CustomElement {
|
|
|
156
130
|
|
|
157
131
|
/**
|
|
158
132
|
* @private
|
|
159
|
-
* @return {
|
|
133
|
+
* @return {ColumnBar}
|
|
160
134
|
*/
|
|
161
135
|
function initControlReferences() {
|
|
162
136
|
if (!this.shadowRoot) {
|
|
@@ -166,12 +140,15 @@ function initControlReferences() {
|
|
|
166
140
|
this[settingsButtonElementSymbol] = this.shadowRoot.querySelector(
|
|
167
141
|
"[data-monster-role=settings-button]",
|
|
168
142
|
);
|
|
143
|
+
|
|
169
144
|
this[settingsLayerElementSymbol] = this.shadowRoot.querySelector(
|
|
170
145
|
"[data-monster-role=settings-layer]",
|
|
171
146
|
);
|
|
147
|
+
|
|
172
148
|
this[dotsContainerElementSymbol] = this.shadowRoot.querySelector(
|
|
173
149
|
"[data-monster-role=dots]",
|
|
174
150
|
);
|
|
151
|
+
|
|
175
152
|
return this;
|
|
176
153
|
}
|
|
177
154
|
|
|
@@ -199,6 +176,7 @@ function initEventHandler() {
|
|
|
199
176
|
);
|
|
200
177
|
|
|
201
178
|
self[dotsContainerElementSymbol].addEventListener("click", function (event) {
|
|
179
|
+
|
|
202
180
|
const element = findTargetElementFromEvent(
|
|
203
181
|
event,
|
|
204
182
|
"data-monster-role",
|
|
@@ -220,6 +198,7 @@ function initEventHandler() {
|
|
|
220
198
|
});
|
|
221
199
|
|
|
222
200
|
self[settingsButtonEventHandlerSymbol] = (event) => {
|
|
201
|
+
|
|
223
202
|
const clickTarget = event.composedPath()?.[0];
|
|
224
203
|
if (
|
|
225
204
|
self[settingsLayerElementSymbol] === clickTarget ||
|
|
@@ -227,7 +206,7 @@ function initEventHandler() {
|
|
|
227
206
|
) {
|
|
228
207
|
return;
|
|
229
208
|
}
|
|
230
|
-
|
|
209
|
+
|
|
231
210
|
document.body.removeEventListener(
|
|
232
211
|
"click",
|
|
233
212
|
self[settingsButtonEventHandlerSymbol],
|