@schukai/monster 3.69.2 → 3.71.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +29 -4
- package/package.json +1 -1
- package/source/components/datatable/dataset.mjs +278 -202
- package/source/components/datatable/datasource/dom.mjs +1 -1
- package/source/components/datatable/datasource/rest.mjs +410 -404
- package/source/components/datatable/filter.mjs +1 -0
- package/source/components/datatable/save-button.mjs +1 -9
- package/source/components/datatable/style/datatable.pcss +1 -1
- package/source/components/datatable/style/filter-controls-defaults.pcss +1 -1
- package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +8 -17
- package/source/components/form/context-error.mjs +2 -0
- package/source/components/form/context-help.mjs +1 -0
- package/source/components/form/field-set.mjs +222 -225
- package/source/components/form/form.mjs +185 -545
- package/source/components/form/select.mjs +24 -9
- package/source/components/form/style/field-set.pcss +84 -7
- package/source/components/form/style/form.pcss +5 -3
- package/source/components/form/style/select.pcss +5 -4
- package/source/components/form/stylesheet/field-set.mjs +7 -14
- package/source/components/form/stylesheet/form.mjs +8 -17
- package/source/components/form/stylesheet/select.mjs +7 -14
- package/source/components/layout/style/collapse.pcss +0 -2
- package/source/components/layout/stylesheet/collapse.mjs +7 -14
- package/source/components/style/form.pcss +66 -3
- package/source/components/style/mixin/property.pcss +8 -1
- package/source/components/style/typography.pcss +4 -12
- package/source/components/stylesheet/form.mjs +8 -17
- package/source/components/stylesheet/mixin/form.mjs +7 -16
- package/source/components/stylesheet/mixin/property.mjs +6 -13
- package/source/components/stylesheet/typography.mjs +7 -16
- package/source/data/datasource/server/restapi.mjs +191 -180
- package/source/data/datasource/server.mjs +118 -74
- package/source/data/diff.mjs +1 -1
- package/source/dom/customelement.mjs +4 -0
- package/source/dom/updater.mjs +1 -1
- package/source/types/tokenlist.mjs +2 -2
- package/test/cases/components/form/form.mjs +1 -182
- package/test/cases/components/host/details.mjs +1 -1
- package/test/cases/components/host/host.mjs +1 -1
- package/test/cases/components/host/overlay.mjs +1 -1
- package/test/cases/data/diff.mjs +37 -0
- package/test/cases/dom/customcontrol.mjs +1 -1
- package/test/cases/dom/customelement.mjs +2 -2
- package/source/components/style/mixin/form.pcss +0 -242
@@ -77,9 +77,6 @@ class SaveButton extends CustomElement {
|
|
77
77
|
* @property {Object} classes The classes
|
78
78
|
* @property {string} classes.bar The bar class
|
79
79
|
* @property {string} classes.badge The badge class
|
80
|
-
* @property {object} mapping The mapping
|
81
|
-
* @property {string} mapping.data The data
|
82
|
-
* @property {number} mapping.index The index
|
83
80
|
* @property {Array} ignoreChanges The ignore changes (regex)
|
84
81
|
* @property {Array} data The data
|
85
82
|
* @return {Object}
|
@@ -105,11 +102,6 @@ class SaveButton extends CustomElement {
|
|
105
102
|
|
106
103
|
changes: "0",
|
107
104
|
|
108
|
-
mapping: {
|
109
|
-
data: "dataset",
|
110
|
-
index: 0,
|
111
|
-
},
|
112
|
-
|
113
105
|
ignoreChanges: [],
|
114
106
|
|
115
107
|
data: {},
|
@@ -304,7 +296,7 @@ function initEventHandler() {
|
|
304
296
|
);
|
305
297
|
})
|
306
298
|
.catch((error) => {
|
307
|
-
addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE,
|
299
|
+
addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, error.toString());
|
308
300
|
});
|
309
301
|
});
|
310
302
|
}, 1);
|
@@ -8,7 +8,7 @@
|
|
8
8
|
@import "../../style/link.pcss";
|
9
9
|
@import "../../style/space.pcss";
|
10
10
|
@import "../../style/icons.pcss";
|
11
|
-
@import "../../style/
|
11
|
+
@import "../../style/form.pcss";
|
12
12
|
|
13
13
|
@import "../../style/mixin/button.pcss";
|
14
14
|
@import "../../style/mixin/typography.pcss";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright © schukai GmbH and all contributing authors,
|
2
|
+
* Copyright © schukai GmbH and all contributing authors, 2024. All rights reserved.
|
3
3
|
* Node module: @schukai/monster
|
4
4
|
*
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
@@ -8,14 +8,12 @@
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
|
-
*
|
12
|
-
* SPDX-License-Identifier: AGPL-3.0
|
13
11
|
*/
|
14
12
|
|
15
|
-
import {
|
16
|
-
import {
|
13
|
+
import {addAttributeToken} from "../../../dom/attributes.mjs";
|
14
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../../dom/constants.mjs";
|
17
15
|
|
18
|
-
export {
|
16
|
+
export {FilterControlsDefaultsStyleSheet}
|
19
17
|
|
20
18
|
/**
|
21
19
|
* @private
|
@@ -24,17 +22,10 @@ export { FilterControlsDefaultsStyleSheet };
|
|
24
22
|
const FilterControlsDefaultsStyleSheet = new CSSStyleSheet();
|
25
23
|
|
26
24
|
try {
|
27
|
-
|
28
|
-
`
|
25
|
+
FilterControlsDefaultsStyleSheet.insertRule(`
|
29
26
|
@layer filtercontrolsdefaults {
|
30
|
-
[data-monster-role=control]{outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}div[data-monster-role=popper]{align-content:center;background:var(--monster-bg-color-primary-1);border-color:var(--monster-bg-color-primary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);box-shadow:var(--monster-box-shadow-1);box-sizing:border-box;color:var(--monster-color-primary-1);display:none;justify-content:space-between;left:0;padding:1.1em;position:absolute;top:0;width:-moz-max-content;width:max-content;z-index:var(--monster-z-index-modal)}div[data-monster-role=popper] div[data-monster-role=arrow]{background:var(--monster-bg-color-primary-1);height:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);pointer-events:none;position:absolute;width:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);z-index:-1}div[data-monster-role=control]{display:flex;height:100%;position:relative}div[data-monster-role=control] .form-container{margin:0 auto;max-width:600px}div[data-monster-role=control] .form-container .form-group{margin-bottom:.2rem}div[data-monster-role=control] .form-container .form-group input[type=number]{text-align:right;width:5rem}div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-inner-spin-button,div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-outer-spin-button{margin-left:10px}div[data-monster-role=control] .form-container .form-group input[type=radio]{accent-color:var(--monster-bg-color-primary-3)}[data-monster-role=popper]{position:absolute}
|
31
|
-
}`,
|
32
|
-
0,
|
33
|
-
);
|
27
|
+
[data-monster-role=control]{outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}div[data-monster-role=popper]{align-content:center;background:var(--monster-bg-color-primary-1);border-color:var(--monster-bg-color-primary-4);border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width);box-shadow:var(--monster-box-shadow-1);box-sizing:border-box;color:var(--monster-color-primary-1);display:none;justify-content:space-between;left:0;padding:1.1em;position:absolute;top:0;width:-moz-max-content;width:max-content;z-index:var(--monster-z-index-modal)}div[data-monster-role=popper] div[data-monster-role=arrow]{background:var(--monster-bg-color-primary-1);height:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);pointer-events:none;position:absolute;width:calc(max(var(--monster-popper-witharrrow-distance), -1 * var(--monster-popper-witharrrow-distance))*2);z-index:-1}input,meter,progress,select,textarea{accent-color:var(--monster-color-secondary-2);background-color:var(--monster-bg-color-primary-1);border-color:var(--monster-theme-control-border-color);border-radius:var(--monster-theme-control-border-radius);border-style:var(--monster-theme-control-border-style);border-width:var(--monster-theme-control-border-width);box-sizing:border-box;color:var(--monster-color-primary-1);font-family:inherit;font-size:100%;margin:0;outline:none}input,select,textarea{height:-moz-fit-content;height:fit-content;padding:.4rem .6rem}textarea{min-height:6rem;resize:vertical}input[type=color]{height:2rem;margin:0;padding:.1rem;width:2rem}input:hover:not([type=radio]):not([type=checkbox]):not([type=range]),select:hover,textarea:hover{box-shadow:var(--monster-box-shadow-2);transition:background .8s,color .25s .0833333333s}input:focus,select:focus,textarea:focus{outline:1px dashed var(--monster-color-selection-3);outline-offset:3px}div[data-monster-role=control]{display:flex;height:100%;position:relative}div[data-monster-role=control] .form-container{margin:0 auto;max-width:600px}div[data-monster-role=control] .form-container .form-group{margin-bottom:.2rem}div[data-monster-role=control] .form-container .form-group input[type=number]{text-align:right;width:5rem}div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-inner-spin-button,div[data-monster-role=control] .form-container .form-group input[type=number]::-webkit-outer-spin-button{margin-left:10px}div[data-monster-role=control] .form-container .form-group input[type=radio]{accent-color:var(--monster-bg-color-primary-3)}[data-monster-role=popper]{position:absolute}
|
28
|
+
}`, 0);
|
34
29
|
} catch (e) {
|
35
|
-
|
36
|
-
document.getRootNode().querySelector("html"),
|
37
|
-
ATTRIBUTE_ERRORMESSAGE,
|
38
|
-
e + "",
|
39
|
-
);
|
30
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
40
31
|
}
|
@@ -12,25 +12,25 @@
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
13
13
|
*/
|
14
14
|
|
15
|
-
import {
|
16
|
-
import {
|
15
|
+
import {instanceSymbol} from "../../constants.mjs";
|
16
|
+
import {addAttributeToken} from "../../dom/attributes.mjs";
|
17
17
|
import {
|
18
|
-
|
19
|
-
|
18
|
+
ATTRIBUTE_ERRORMESSAGE,
|
19
|
+
ATTRIBUTE_ROLE,
|
20
20
|
} from "../../dom/constants.mjs";
|
21
|
-
import {
|
21
|
+
import {CustomControl} from "../../dom/customcontrol.mjs";
|
22
22
|
import {
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
assembleMethodSymbol,
|
24
|
+
getSlottedElements,
|
25
|
+
registerCustomElement,
|
26
26
|
} from "../../dom/customelement.mjs";
|
27
|
-
import {
|
28
|
-
import {
|
27
|
+
import {isFunction} from "../../types/is.mjs";
|
28
|
+
import {FieldSetStyleSheet} from "./stylesheet/field-set.mjs";
|
29
29
|
import "../layout/collapse.mjs";
|
30
30
|
import "./toggle-switch.mjs";
|
31
31
|
|
32
|
-
export {
|
33
|
-
|
32
|
+
export {FieldSet};
|
33
|
+
|
34
34
|
/**
|
35
35
|
* @private
|
36
36
|
* @type {symbol}
|
@@ -101,179 +101,178 @@ const extendedSwitchElementSymbol = Symbol("extendedSwitchElement");
|
|
101
101
|
* @summary A simple FieldSet
|
102
102
|
*/
|
103
103
|
class FieldSet extends CustomControl {
|
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
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
104
|
+
/**
|
105
|
+
* This method is called by the `instanceof` operator.
|
106
|
+
* @returns {symbol}
|
107
|
+
*/
|
108
|
+
static get [instanceSymbol]() {
|
109
|
+
return Symbol.for("@schukai/monster/components/form/fieldset@@instance");
|
110
|
+
}
|
111
|
+
|
112
|
+
/**
|
113
|
+
* @return {Components.Form.FieldSet
|
114
|
+
*/
|
115
|
+
[assembleMethodSymbol]() {
|
116
|
+
super[assembleMethodSymbol]();
|
117
|
+
initControlReferences.call(this);
|
118
|
+
initEventHandler.call(this);
|
119
|
+
updateExtendedFields.call(this);
|
120
|
+
return this;
|
121
|
+
}
|
122
|
+
|
123
|
+
/**
|
124
|
+
* To set the options via the html tag the attribute `data-monster-options` must be used.
|
125
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
126
|
+
*
|
127
|
+
* The individual configuration values can be found in the table.
|
128
|
+
*
|
129
|
+
* @property {Object} templates Template definitions
|
130
|
+
* @property {string} templates.main Main template
|
131
|
+
* @property {Object} labels Label definitions
|
132
|
+
* @property {Object} actions Callbacks
|
133
|
+
* @property {string} actions.click="throw Error" Callback when clicked
|
134
|
+
* @property {Object} features Features
|
135
|
+
* @property {Object} classes CSS classes
|
136
|
+
* @property {boolean} disabled=false Disabled state
|
137
|
+
*/
|
138
|
+
get defaults() {
|
139
|
+
return Object.assign({}, super.defaults, {
|
140
|
+
templates: {
|
141
|
+
main: getTemplate(),
|
142
|
+
},
|
143
|
+
labels: {
|
144
|
+
"toggle-switch-on": "✔",
|
145
|
+
"toggle-switch-off": "✖",
|
146
|
+
"toggle-switch-label": "Expand",
|
147
|
+
title: "",
|
148
|
+
},
|
149
|
+
classes: {},
|
150
|
+
disabled: false,
|
151
|
+
features: {},
|
152
|
+
actions: {
|
153
|
+
click: () => {
|
154
|
+
throw new Error("the click action is not defined");
|
155
|
+
},
|
156
|
+
},
|
157
|
+
value: null,
|
158
|
+
});
|
159
|
+
}
|
160
|
+
|
161
|
+
/**
|
162
|
+
*
|
163
|
+
* @return {string}
|
164
|
+
*/
|
165
|
+
static getTag() {
|
166
|
+
return "monster-field-set";
|
167
|
+
}
|
168
|
+
|
169
|
+
/**
|
170
|
+
*
|
171
|
+
* @return {CSSStyleSheet[]}
|
172
|
+
*/
|
173
|
+
static getCSSStyleSheet() {
|
174
|
+
return [FieldSetStyleSheet];
|
175
|
+
}
|
176
|
+
|
177
|
+
/**
|
178
|
+
* The FieldSet.click() method simulates a click on the internal element.
|
179
|
+
*
|
180
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click}
|
181
|
+
*/
|
182
|
+
click() {
|
183
|
+
if (this.getOption("disabled") === true) {
|
184
|
+
return;
|
185
|
+
}
|
186
|
+
|
187
|
+
if (
|
188
|
+
this[fieldSetElementSymbol] &&
|
189
|
+
isFunction(this[fieldSetElementSymbol].click)
|
190
|
+
) {
|
191
|
+
this[fieldSetElementSymbol].click();
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
/**
|
196
|
+
* The Button.focus() method sets focus on the internal element.
|
197
|
+
*
|
198
|
+
* @param {Object} options
|
199
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus}
|
200
|
+
*/
|
201
|
+
focus(options) {
|
202
|
+
if (this.getOption("disabled") === true) {
|
203
|
+
return;
|
204
|
+
}
|
205
|
+
|
206
|
+
if (
|
207
|
+
this[fieldSetElementSymbol] &&
|
208
|
+
isFunction(this[fieldSetElementSymbol].focus)
|
209
|
+
) {
|
210
|
+
this[fieldSetElementSymbol].focus(options);
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
/**
|
215
|
+
* The Button.blur() method removes focus from the internal element.
|
216
|
+
*/
|
217
|
+
blur() {
|
218
|
+
if (
|
219
|
+
this[fieldSetElementSymbol] &&
|
220
|
+
isFunction(this[fieldSetElementSymbol].blur)
|
221
|
+
) {
|
222
|
+
this[fieldSetElementSymbol].blur();
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
/**
|
227
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals}
|
228
|
+
* @return {boolean}
|
229
|
+
*/
|
230
|
+
static get formAssociated() {
|
231
|
+
return true;
|
232
|
+
}
|
233
|
+
|
234
|
+
/**
|
235
|
+
* The current value of the form control.
|
236
|
+
*
|
237
|
+
* ```js
|
238
|
+
* e = document.querySelector('monster-field-set');
|
239
|
+
* console.log(e.value)
|
240
|
+
* ```
|
241
|
+
*
|
242
|
+
* @property {string}
|
243
|
+
*/
|
244
|
+
get value() {
|
245
|
+
return this.getOption("value");
|
246
|
+
}
|
247
|
+
|
248
|
+
/**
|
249
|
+
* Set value of the form control.
|
250
|
+
*
|
251
|
+
* ```
|
252
|
+
* e = document.querySelector('monster-field-set');
|
253
|
+
* e.value=1
|
254
|
+
* ```
|
255
|
+
*
|
256
|
+
* @property {string} value
|
257
|
+
* @throws {Error} unsupported type
|
258
|
+
*/
|
259
|
+
set value(value) {
|
260
|
+
this.setOption("value", value);
|
261
|
+
try {
|
262
|
+
this?.setFormValue(this.value);
|
263
|
+
} catch (e) {
|
264
|
+
addAttributeToken(this, ATTRIBUTE_ERRORMESSAGE, e.message);
|
265
|
+
}
|
266
|
+
}
|
267
267
|
}
|
268
268
|
|
269
269
|
function updateExtendedFields() {
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
}
|
270
|
+
const nodes = getSlottedElements.call(this, "", "extended");
|
271
|
+
if (nodes.size > 0) {
|
272
|
+
this[extendedSwitchSymbol].classList.remove("hidden");
|
273
|
+
} else {
|
274
|
+
this[extendedSwitchSymbol].classList.add("hidden");
|
275
|
+
}
|
277
276
|
}
|
278
277
|
|
279
278
|
/**
|
@@ -282,53 +281,53 @@ function updateExtendedFields() {
|
|
282
281
|
* @fires Monster.Components.Form.event:monster-field-set-clicked
|
283
282
|
*/
|
284
283
|
function initEventHandler() {
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
284
|
+
this[toggleSwitchElementSymbol].setOption(
|
285
|
+
"labels.toggle-switch-on",
|
286
|
+
this.getOption("labels.toggle-switch-on"),
|
287
|
+
);
|
288
|
+
this[toggleSwitchElementSymbol].setOption(
|
289
|
+
"labels.toggle-switch-off",
|
290
|
+
this.getOption("labels.toggle-switch-off"),
|
291
|
+
);
|
292
|
+
|
293
|
+
this[toggleSwitchElementSymbol].setOption("actions.on", () => {
|
294
|
+
this[collapseElementSymbol].open();
|
295
|
+
});
|
296
|
+
|
297
|
+
this[toggleSwitchElementSymbol].setOption("actions.off", () => {
|
298
|
+
this[collapseElementSymbol].close();
|
299
|
+
});
|
300
|
+
|
301
|
+
return this;
|
303
302
|
}
|
304
303
|
|
305
304
|
/**
|
306
305
|
* @private
|
307
306
|
*/
|
308
307
|
function initControlReferences() {
|
309
|
-
|
310
|
-
|
311
|
-
|
308
|
+
this[fieldSetElementSymbol] = this.shadowRoot.querySelector(
|
309
|
+
`[${ATTRIBUTE_ROLE}="control"]`,
|
310
|
+
);
|
312
311
|
|
313
|
-
|
314
|
-
|
315
|
-
|
312
|
+
this[extendedSwitchElementSymbol] = this.shadowRoot.querySelector(
|
313
|
+
`[${ATTRIBUTE_ROLE}="extended-switch"]`,
|
314
|
+
);
|
316
315
|
|
317
|
-
|
318
|
-
|
319
|
-
|
316
|
+
this[collapseElementSymbol] = this.shadowRoot.querySelector(
|
317
|
+
`[${ATTRIBUTE_ROLE}="collapse"]`,
|
318
|
+
);
|
320
319
|
|
321
|
-
|
322
|
-
|
323
|
-
|
320
|
+
this[headerElementSymbol] = this.shadowRoot.querySelector(
|
321
|
+
`[${ATTRIBUTE_ROLE}="header"]`,
|
322
|
+
);
|
324
323
|
|
325
|
-
|
326
|
-
|
327
|
-
|
324
|
+
this[extendedSwitchSymbol] = this.shadowRoot.querySelector(
|
325
|
+
`[${ATTRIBUTE_ROLE}="extended-switch"]`,
|
326
|
+
);
|
328
327
|
|
329
|
-
|
330
|
-
|
331
|
-
|
328
|
+
this[toggleSwitchElementSymbol] = this.shadowRoot.querySelector(
|
329
|
+
`monster-toggle-switch`,
|
330
|
+
);
|
332
331
|
}
|
333
332
|
|
334
333
|
/**
|
@@ -336,8 +335,8 @@ function initControlReferences() {
|
|
336
335
|
* @return {string}
|
337
336
|
*/
|
338
337
|
function getTemplate() {
|
339
|
-
|
340
|
-
|
338
|
+
// language=HTML
|
339
|
+
return `
|
341
340
|
<div data-monster-role="control" part="control">
|
342
341
|
<div data-monster-role="header">
|
343
342
|
<div data-monster-replace="path:labels.title" data-monster-role="title"></div>
|
@@ -346,16 +345,14 @@ function getTemplate() {
|
|
346
345
|
<monster-toggle-switch></monster-toggle-switch>
|
347
346
|
</div>
|
348
347
|
</div>
|
349
|
-
<div>
|
348
|
+
<div data-monster-role="container">
|
350
349
|
<div class="collapse-alignment">
|
351
|
-
<slot></slot>
|
350
|
+
<slot part="content"></slot>
|
352
351
|
</div>
|
353
352
|
<monster-collapse data-monster-role="collapse">
|
354
|
-
<slot name="extended"></slot>
|
353
|
+
<slot name="extended" part="extended"></slot>
|
355
354
|
</monster-collapse>
|
356
355
|
</div>
|
357
|
-
|
358
|
-
|
359
356
|
</div>`;
|
360
357
|
}
|
361
358
|
|