@schukai/monster 3.52.1 → 3.53.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/source/components/datatable/columnbar.mjs +2 -3
- package/source/components/datatable/dataset.mjs +3 -5
- package/source/components/datatable/datasource/dom.mjs +5 -8
- package/source/components/datatable/datasource/rest.mjs +12 -18
- package/source/components/datatable/datasource.mjs +1 -1
- package/source/components/datatable/datatable/header.mjs +3 -5
- package/source/components/datatable/datatable.mjs +13 -18
- package/source/components/datatable/filter/date-range.mjs +15 -27
- package/source/components/datatable/filter/input.mjs +3 -5
- package/source/components/datatable/filter/range.mjs +10 -17
- package/source/components/datatable/filter/settings.mjs +6 -7
- package/source/components/datatable/filter.mjs +14 -21
- package/source/components/datatable/pagination.mjs +5 -7
- package/source/components/datatable/util.mjs +1 -2
- package/source/components/form/action-button.mjs +2 -3
- package/source/components/form/api-button.mjs +5 -9
- package/source/components/form/button-bar.mjs +15 -27
- package/source/components/form/button.mjs +2 -2
- package/source/components/form/confirm-button.mjs +9 -12
- package/source/components/form/form.mjs +8 -14
- package/source/components/form/message-state-button.mjs +4 -5
- package/source/components/form/popper-button.mjs +7 -11
- package/source/components/form/popper.mjs +7 -11
- package/source/components/form/reload.mjs +5 -7
- package/source/components/form/select.mjs +42 -74
- package/source/components/form/tabs.mjs +41 -45
- package/source/components/form/template.mjs +6 -9
- package/source/components/form/tree-select.mjs +7 -10
- package/source/components/form/util/popper.mjs +1 -2
- package/source/components/host/call-button.mjs +4 -6
- package/source/components/host/collapse.mjs +14 -22
- package/source/components/host/config-manager.mjs +7 -9
- package/source/components/host/details.mjs +5 -8
- package/source/components/host/host.mjs +7 -12
- package/source/components/host/overlay.mjs +4 -6
- package/source/components/host/viewer.mjs +2 -3
- package/source/components/notify/message.mjs +10 -13
- package/source/components/notify/notify.mjs +4 -6
- package/source/components/state/log/entry.mjs +1 -1
- package/source/components/state/log.mjs +6 -11
- package/source/components/style/icons.pcss +110 -0
- package/source/components/style/mixin/icon.pcss +43 -0
- package/source/components/stylesheet/icons.mjs +27 -0
- package/source/components/tree-menu/tree-menu.mjs +9 -14
- package/source/data/transformer.mjs +9 -4
- package/source/dom/customelement.mjs +1 -1
- package/source/dom/util.mjs +4 -5
- package/source/monster.mjs +0 -1
- package/source/types/observer.mjs +4 -4
- package/source/types/version.mjs +1 -1
- package/source/util/clone.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,10 +1,23 @@
|
|
1
1
|
|
2
|
+
## [3.53.0] - 2023-11-11
|
3
|
+
|
4
|
+
### Add Features
|
5
|
+
|
6
|
+
- new icons (css) [#130](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/130)
|
7
|
+
### Changes
|
8
|
+
|
9
|
+
- tidy code
|
10
|
+
- tidy code
|
11
|
+
|
2
12
|
## [3.52.1] - 2023-11-05
|
3
13
|
|
4
14
|
### Bug Fixes
|
5
15
|
|
6
16
|
- only 10 tabs can be activated [#129](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/129)
|
7
17
|
- fix some css bugs [#128](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/128)
|
18
|
+
### Changes
|
19
|
+
|
20
|
+
- release and publish to npm new version 3.52.1
|
8
21
|
|
9
22
|
## [3.52.0] - 2023-11-03
|
10
23
|
|
package/README.md
CHANGED
@@ -76,7 +76,7 @@ We do try to work around some browser bugs, but on the whole we don't use polyfi
|
|
76
76
|
However, many functions can be mapped via [polyfill.io](https://polyfill.io/) and thus the compatibility can be increased.
|
77
77
|
|
78
78
|
```html
|
79
|
-
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=Array.
|
79
|
+
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=AbortController,Array.prototype.entries,Array.prototype.fill,Array.prototype.find,Array.prototype.includes,Array.prototype.keys,Array.prototype.sort,Array.prototype.values,atob,AudioContext,blissfuljs,Blob,CharacterData.prototype.nextElementSibling,CharacterData.prototype.previousElementSibling,CharacterData.prototype.remove,console,console.error,console.log,CSS.supports,CustomEvent,DocumentFragment,DocumentFragment.prototype.append,DocumentFragment.prototype.prepend,DOMRect,DOMTokenList,DOMTokenList.prototype.forEach,DOMTokenList.prototype.replace,Element.prototype.append,Element.prototype.getAttributeNames,Element.prototype.prepend,Element.prototype.remove,Element.prototype.scroll,Event,EventSource,fetch,Function.prototype.name,globalThis,HTMLDocument,HTMLPictureElement,HTMLTemplateElement,IntersectionObserver,IntersectionObserverEntry,Intl,Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules,Map,Math.log2,MutationObserver,Node.prototype.contains,Node.prototype.getRootNode,Node.prototype.isConnected,Node.prototype.isSameNode,NodeList.prototype.forEach,Number.isFinite,Number.isInteger,Object.assign,Object.entries,Object.freeze,Object.getOwnPropertyNames,Object.prototype.toString,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,requestAnimationFrame,ResizeObserver,Set,String.prototype.includes,String.prototype.matchAll,String.prototype.padStart,Symbol,Symbol.for,Symbol.hasInstance,Symbol.iterator,TextDecoder,TextEncoder,Uint16Array,Uint8Array,URLSearchParams,WeakSet"
|
80
80
|
crossorigin="anonymous"
|
81
81
|
referrerpolicy="no-referrer"></script>
|
82
82
|
```
|
package/package.json
CHANGED
@@ -133,7 +133,7 @@ class ColumnBar extends CustomElement {
|
|
133
133
|
*
|
134
134
|
* @return {Monster.Components.Form.Form}
|
135
135
|
*/
|
136
|
-
[assembleMethodSymbol]() {
|
136
|
+
[assembleMethodSymbol]() {
|
137
137
|
super[assembleMethodSymbol]();
|
138
138
|
|
139
139
|
initControlReferences.call(this);
|
@@ -152,8 +152,7 @@ class ColumnBar extends CustomElement {
|
|
152
152
|
* @private
|
153
153
|
* @return {Monster.Components.Datatable.Form}
|
154
154
|
*/
|
155
|
-
function initControlReferences() {
|
156
|
-
|
155
|
+
function initControlReferences() {
|
157
156
|
if (!this.shadowRoot) {
|
158
157
|
throw new Error("no shadow-root is defined");
|
159
158
|
}
|
@@ -130,7 +130,7 @@ class DataSet extends CustomElement {
|
|
130
130
|
*
|
131
131
|
* @return {Monster.Components.Form.Form}
|
132
132
|
*/
|
133
|
-
[assembleMethodSymbol]() {
|
133
|
+
[assembleMethodSymbol]() {
|
134
134
|
super[assembleMethodSymbol]();
|
135
135
|
|
136
136
|
// initControlReferences.call(self);
|
@@ -174,8 +174,7 @@ class DataSet extends CustomElement {
|
|
174
174
|
/**
|
175
175
|
* @private
|
176
176
|
*/
|
177
|
-
function initEventHandler() {
|
178
|
-
|
177
|
+
function initEventHandler() {
|
179
178
|
this[attributeObserverSymbol][ATTRIBUTE_DATATABLE_INDEX] = () => {
|
180
179
|
const index = this.getAttribute(ATTRIBUTE_DATATABLE_INDEX);
|
181
180
|
if (index) {
|
@@ -188,8 +187,7 @@ function initEventHandler() {;
|
|
188
187
|
*
|
189
188
|
* @param {Onject} options
|
190
189
|
*/
|
191
|
-
function updateOptionsFromArguments(options) {
|
192
|
-
|
190
|
+
function updateOptionsFromArguments(options) {
|
193
191
|
const index = this.getAttribute(ATTRIBUTE_DATATABLE_INDEX);
|
194
192
|
|
195
193
|
if (index !== null && index !== undefined) {
|
@@ -74,7 +74,7 @@ class Dom extends Datasource {
|
|
74
74
|
*
|
75
75
|
* @return {Monster.Components.Form.Form}
|
76
76
|
*/
|
77
|
-
[assembleMethodSymbol]() {
|
77
|
+
[assembleMethodSymbol]() {
|
78
78
|
super[assembleMethodSymbol]();
|
79
79
|
initEventHandler.call(this);
|
80
80
|
updateDataSource.call(this);
|
@@ -100,11 +100,10 @@ class Dom extends Datasource {
|
|
100
100
|
* Reloads the data
|
101
101
|
* @returns {Promise<never>|*}
|
102
102
|
*/
|
103
|
-
reload() {
|
104
|
-
}
|
103
|
+
reload() {}
|
105
104
|
|
106
105
|
connectedCallback() {
|
107
|
-
super.connectedCallback()
|
106
|
+
super.connectedCallback();
|
108
107
|
|
109
108
|
if (this.getOption("features.autoInit")) {
|
110
109
|
updateDataSource.call(this);
|
@@ -115,8 +114,7 @@ class Dom extends Datasource {
|
|
115
114
|
/**
|
116
115
|
* @private
|
117
116
|
*/
|
118
|
-
function initEventHandler() {
|
119
|
-
|
117
|
+
function initEventHandler() {
|
120
118
|
/**
|
121
119
|
* @param {Event} event
|
122
120
|
*/
|
@@ -134,8 +132,7 @@ function initEventHandler() {;
|
|
134
132
|
/**
|
135
133
|
* @private
|
136
134
|
*/
|
137
|
-
function updateDataSource() {
|
138
|
-
|
135
|
+
function updateDataSource() {
|
139
136
|
let data = null;
|
140
137
|
getSlottedElements.call(this).forEach((element) => {
|
141
138
|
if (!(element instanceof HTMLScriptElement)) {
|
@@ -139,7 +139,7 @@ class Rest extends Datasource {
|
|
139
139
|
* @param {string} orderBy
|
140
140
|
* @returns {Monster.Components.Datatable.Datasource.Rest}
|
141
141
|
*/
|
142
|
-
setParameters({ page, query, orderBy }) {
|
142
|
+
setParameters({ page, query, orderBy }) {
|
143
143
|
const parameters = this.getOption("read.parameters");
|
144
144
|
if (query !== undefined) {
|
145
145
|
parameters.query = `${query}`;
|
@@ -157,7 +157,7 @@ class Rest extends Datasource {
|
|
157
157
|
*
|
158
158
|
* @return {Monster.Components.Form.Form}
|
159
159
|
*/
|
160
|
-
[assembleMethodSymbol]() {
|
160
|
+
[assembleMethodSymbol]() {
|
161
161
|
super[assembleMethodSymbol]();
|
162
162
|
|
163
163
|
initEventHandler.call(this);
|
@@ -176,8 +176,7 @@ class Rest extends Datasource {
|
|
176
176
|
* Fetches the data from the rest api
|
177
177
|
* @returns {Promise<never>|*}
|
178
178
|
*/
|
179
|
-
fetch() {
|
180
|
-
|
179
|
+
fetch() {
|
181
180
|
const opt = clone(this.getOption("read"));
|
182
181
|
this[dataSourceSymbol].setOption("read", opt);
|
183
182
|
|
@@ -225,7 +224,7 @@ class Rest extends Datasource {
|
|
225
224
|
* @private
|
226
225
|
*/
|
227
226
|
connectedCallback() {
|
228
|
-
super.connectedCallback()
|
227
|
+
super.connectedCallback();
|
229
228
|
|
230
229
|
setTimeout(() => {
|
231
230
|
if (this.getOption("features.filter", false) === true) {
|
@@ -238,7 +237,7 @@ class Rest extends Datasource {
|
|
238
237
|
* @private
|
239
238
|
*/
|
240
239
|
disconnectedCallback() {
|
241
|
-
super.disconnectedCallback()
|
240
|
+
super.disconnectedCallback();
|
242
241
|
removeFilter.call(this);
|
243
242
|
}
|
244
243
|
}
|
@@ -246,7 +245,7 @@ class Rest extends Datasource {
|
|
246
245
|
/**
|
247
246
|
* @private
|
248
247
|
*/
|
249
|
-
function removeFilter() {
|
248
|
+
function removeFilter() {
|
250
249
|
const filterID = this.getOption("filter.id", undefined);
|
251
250
|
if (!filterID) return;
|
252
251
|
|
@@ -260,7 +259,7 @@ function removeFilter() {;
|
|
260
259
|
/**
|
261
260
|
* @private
|
262
261
|
*/
|
263
|
-
function initFilter() {
|
262
|
+
function initFilter() {
|
264
263
|
const filterID = this.getOption("filter.id", undefined);
|
265
264
|
|
266
265
|
if (!filterID)
|
@@ -277,8 +276,7 @@ function initFilter() {;
|
|
277
276
|
this[filterObserverSymbol] = new Observer(() => {
|
278
277
|
const query = filterControl.getOption("query", undefined);
|
279
278
|
this.setParameters({ query: query });
|
280
|
-
this
|
281
|
-
.fetch()
|
279
|
+
this.fetch()
|
282
280
|
.then(() => {
|
283
281
|
this.dispatchEvent(new CustomEvent("reload", { bubbles: true }));
|
284
282
|
filterControl?.showSuccess();
|
@@ -319,8 +317,7 @@ function initFilter() {;
|
|
319
317
|
/**
|
320
318
|
* @private
|
321
319
|
*/
|
322
|
-
function initAutoInit() {
|
323
|
-
|
320
|
+
function initAutoInit() {
|
324
321
|
const autoInit = this.getOption("features.autoInit");
|
325
322
|
validateBoolean(autoInit);
|
326
323
|
|
@@ -332,8 +329,7 @@ function initAutoInit() {;
|
|
332
329
|
}
|
333
330
|
|
334
331
|
setTimeout(() => {
|
335
|
-
this
|
336
|
-
.fetch()
|
332
|
+
this.fetch()
|
337
333
|
.then(() => {
|
338
334
|
fireCustomEvent(this, "monster-datasource-fetched", {
|
339
335
|
datasource: this,
|
@@ -349,8 +345,7 @@ function initAutoInit() {;
|
|
349
345
|
}, 0);
|
350
346
|
}
|
351
347
|
|
352
|
-
function initEventHandler() {
|
353
|
-
|
348
|
+
function initEventHandler() {
|
354
349
|
this[intersectionObserverHandlerSymbol] = (entries) => {
|
355
350
|
entries.forEach((entry) => {
|
356
351
|
if (entry.isIntersecting) {
|
@@ -370,8 +365,7 @@ function initEventHandler() {;
|
|
370
365
|
};
|
371
366
|
}
|
372
367
|
|
373
|
-
function initIntersectionObserver() {
|
374
|
-
|
368
|
+
function initIntersectionObserver() {
|
375
369
|
this.classList.add("intersection-observer");
|
376
370
|
|
377
371
|
const options = {
|
@@ -52,7 +52,7 @@ const DIRECTION_NONE = "";
|
|
52
52
|
*/
|
53
53
|
class Header extends Base {
|
54
54
|
constructor() {
|
55
|
-
super()
|
55
|
+
super();
|
56
56
|
|
57
57
|
/**
|
58
58
|
* - attachInternalObserver
|
@@ -98,8 +98,7 @@ class Header extends Base {
|
|
98
98
|
};
|
99
99
|
}
|
100
100
|
|
101
|
-
changeDirection() {
|
102
|
-
|
101
|
+
changeDirection() {
|
103
102
|
let direction = this.getInternal("direction");
|
104
103
|
if (direction === DIRECTION_ASC) {
|
105
104
|
direction = DIRECTION_DESC;
|
@@ -242,8 +241,7 @@ function createOrderStatement(headers) {
|
|
242
241
|
/**
|
243
242
|
* @private
|
244
243
|
*/
|
245
|
-
function updateStruct() {
|
246
|
-
|
244
|
+
function updateStruct() {
|
247
245
|
const label = this.getInternal("label");
|
248
246
|
const direction = this.getInternal("direction");
|
249
247
|
const field = this.getInternal("field");
|
@@ -218,8 +218,7 @@ class DataTable extends CustomElement {
|
|
218
218
|
*
|
219
219
|
* @return {Monster.Components.Form.Form}
|
220
220
|
*/
|
221
|
-
[assembleMethodSymbol]() {
|
222
|
-
|
221
|
+
[assembleMethodSymbol]() {
|
223
222
|
const rawKey = this.getOption("templateMapping.row-key");
|
224
223
|
|
225
224
|
if (rawKey === null) {
|
@@ -328,7 +327,7 @@ function getFilterConfigKey() {
|
|
328
327
|
* @private
|
329
328
|
* @returns {Promise}
|
330
329
|
*/
|
331
|
-
function getHostConfig(callback) {
|
330
|
+
function getHostConfig(callback) {
|
332
331
|
const document = getDocument();
|
333
332
|
const host = document.querySelector("monster-host");
|
334
333
|
|
@@ -354,7 +353,7 @@ function getHostConfig(callback) {;
|
|
354
353
|
/**
|
355
354
|
* @private
|
356
355
|
*/
|
357
|
-
function updateColumnBar() {
|
356
|
+
function updateColumnBar() {
|
358
357
|
if (!this[columnBarElementSymbol]) {
|
359
358
|
return;
|
360
359
|
}
|
@@ -380,8 +379,7 @@ function updateColumnBar() {;
|
|
380
379
|
/**
|
381
380
|
* @private
|
382
381
|
*/
|
383
|
-
function updateHeaderFromColumnBar() {
|
384
|
-
|
382
|
+
function updateHeaderFromColumnBar() {
|
385
383
|
if (!this[columnBarElementSymbol]) {
|
386
384
|
return;
|
387
385
|
}
|
@@ -414,8 +412,7 @@ function updateHeaderFromColumnBar() {;
|
|
414
412
|
/**
|
415
413
|
* @private
|
416
414
|
*/
|
417
|
-
function updateConfigColumnBar() {
|
418
|
-
|
415
|
+
function updateConfigColumnBar() {
|
419
416
|
if (!this[columnBarElementSymbol]) {
|
420
417
|
return;
|
421
418
|
}
|
@@ -496,8 +493,7 @@ function initEventHandler() {
|
|
496
493
|
/**
|
497
494
|
* @private
|
498
495
|
*/
|
499
|
-
function initGridAndStructs(hostConfig) {
|
500
|
-
|
496
|
+
function initGridAndStructs(hostConfig) {
|
501
497
|
const rowID = this.getOption("templateMapping.row-key");
|
502
498
|
|
503
499
|
if (!this[gridElementSymbol]) {
|
@@ -618,8 +614,7 @@ function initGridAndStructs(hostConfig) {;
|
|
618
614
|
/**
|
619
615
|
* @private
|
620
616
|
*/
|
621
|
-
function updateGrid() {
|
622
|
-
|
617
|
+
function updateGrid() {
|
623
618
|
if (!this[gridElementSymbol]) {
|
624
619
|
throw new Error("no grid element is defined");
|
625
620
|
}
|
@@ -667,7 +662,7 @@ function updateGrid() {;
|
|
667
662
|
* @param {Monster.Components.Datatable.Header[]} headers
|
668
663
|
* @param {bool} doFetch
|
669
664
|
*/
|
670
|
-
function setDataSource({ orderBy }, doFetch) {
|
665
|
+
function setDataSource({ orderBy }, doFetch) {
|
671
666
|
const datasource = this[datasourceLinkedElementSymbol];
|
672
667
|
|
673
668
|
if (!datasource) {
|
@@ -687,8 +682,7 @@ function setDataSource({ orderBy }, doFetch) {;
|
|
687
682
|
* @private
|
688
683
|
* @return {Monster.Components.Datatable.Form}
|
689
684
|
*/
|
690
|
-
function initControlReferences() {
|
691
|
-
|
685
|
+
function initControlReferences() {
|
692
686
|
if (!this.shadowRoot) {
|
693
687
|
throw new Error("no shadow-root is defined");
|
694
688
|
}
|
@@ -711,8 +705,7 @@ function initControlReferences() {;
|
|
711
705
|
* @throws {TypeError} incorrect arguments passed for the datasource
|
712
706
|
* @throws {Error} the datasource could not be initialized
|
713
707
|
*/
|
714
|
-
function initOptionsFromArguments() {
|
715
|
-
|
708
|
+
function initOptionsFromArguments() {
|
716
709
|
const options = {};
|
717
710
|
const selector = this.getAttribute(ATTRIBUTE_DATASOURCE_SELECTOR);
|
718
711
|
|
@@ -720,7 +713,9 @@ function initOptionsFromArguments() {;
|
|
720
713
|
options.datasource = { selector: selector };
|
721
714
|
}
|
722
715
|
|
723
|
-
const breakpoint = this.getAttribute(
|
716
|
+
const breakpoint = this.getAttribute(
|
717
|
+
ATTRIBUTE_DATATABLE_RESPONSIVE_BREAKPOINT,
|
718
|
+
);
|
724
719
|
if (breakpoint) {
|
725
720
|
options.responsive = {};
|
726
721
|
options.responsive.breakpoint = parseInt(breakpoint);
|
@@ -152,7 +152,7 @@ class DateRange extends AbstractBase {
|
|
152
152
|
*
|
153
153
|
* @return {FilterButton}
|
154
154
|
*/
|
155
|
-
[assembleMethodSymbol]() {
|
155
|
+
[assembleMethodSymbol]() {
|
156
156
|
super[assembleMethodSymbol]();
|
157
157
|
|
158
158
|
initControlReferences.call(this);
|
@@ -249,7 +249,7 @@ class DateRange extends AbstractBase {
|
|
249
249
|
connectedCallback() {
|
250
250
|
super.connectedCallback();
|
251
251
|
|
252
|
-
const document = getDocument()
|
252
|
+
const document = getDocument();
|
253
253
|
|
254
254
|
for (const [, type] of Object.entries(["click", "touch"])) {
|
255
255
|
// close on outside ui-events
|
@@ -311,8 +311,7 @@ class DateRange extends AbstractBase {
|
|
311
311
|
* @param {HTMLElement} group
|
312
312
|
* @param {string} type
|
313
313
|
*/
|
314
|
-
function updateMainFilterValueFromPopperChange(group, type) {
|
315
|
-
|
314
|
+
function updateMainFilterValueFromPopperChange(group, type) {
|
316
315
|
function calculateTargetDate(diff) {
|
317
316
|
if (isNaN(diff)) {
|
318
317
|
diff = 0;
|
@@ -405,8 +404,7 @@ function updateMainFilterValueFromPopperChange(group, type) {;
|
|
405
404
|
* @private
|
406
405
|
* @return {initEventHandler}
|
407
406
|
*/
|
408
|
-
function initEventHandler() {
|
409
|
-
|
407
|
+
function initEventHandler() {
|
410
408
|
this[closeEventHandler] = (event) => {
|
411
409
|
const path = event.composedPath();
|
412
410
|
|
@@ -536,8 +534,7 @@ function initEventHandler() {;
|
|
536
534
|
/**
|
537
535
|
* @private
|
538
536
|
*/
|
539
|
-
function attachResizeObserver() {
|
540
|
-
|
537
|
+
function attachResizeObserver() {
|
541
538
|
// against flickering
|
542
539
|
this[resizeObserverSymbol] = new ResizeObserver((entries) => {
|
543
540
|
if (this[timerCallbackSymbol] instanceof DeadMansSwitch) {
|
@@ -557,7 +554,7 @@ function attachResizeObserver() {;
|
|
557
554
|
this[resizeObserverSymbol].observe(this.parentElement);
|
558
555
|
}
|
559
556
|
|
560
|
-
function disconnectResizeObserver() {
|
557
|
+
function disconnectResizeObserver() {
|
561
558
|
if (this[resizeObserverSymbol] instanceof ResizeObserver) {
|
562
559
|
this[resizeObserverSymbol].disconnect();
|
563
560
|
}
|
@@ -566,8 +563,7 @@ function disconnectResizeObserver() {;
|
|
566
563
|
/**
|
567
564
|
* @private
|
568
565
|
*/
|
569
|
-
function hide() {
|
570
|
-
|
566
|
+
function hide() {
|
571
567
|
this[popperElementSymbol].style.display = "none";
|
572
568
|
removeAttributeToken(this[controlElementSymbol], "class", "open");
|
573
569
|
}
|
@@ -576,8 +572,7 @@ function hide() {;
|
|
576
572
|
* @private
|
577
573
|
* @this PopperButton
|
578
574
|
*/
|
579
|
-
function show() {
|
580
|
-
|
575
|
+
function show() {
|
581
576
|
if (this.getOption("disabled", false) === true) {
|
582
577
|
return;
|
583
578
|
}
|
@@ -605,8 +600,7 @@ function show() {;
|
|
605
600
|
/**
|
606
601
|
* @private
|
607
602
|
*/
|
608
|
-
function clearAndDisableFormGroups() {
|
609
|
-
|
603
|
+
function clearAndDisableFormGroups() {
|
610
604
|
this[radioInputsElementSymbol].forEach((radio) => {
|
611
605
|
radio.checked = false;
|
612
606
|
});
|
@@ -626,8 +620,7 @@ function clearAndDisableFormGroups() {;
|
|
626
620
|
* @private
|
627
621
|
* @returns {string}
|
628
622
|
*/
|
629
|
-
function guessRangeTypeFromCurrentValue() {
|
630
|
-
|
623
|
+
function guessRangeTypeFromCurrentValue() {
|
631
624
|
const value = this[inputElementSymbol].value.trim();
|
632
625
|
|
633
626
|
if (value === "") {
|
@@ -658,8 +651,7 @@ function guessRangeTypeFromCurrentValue() {;
|
|
658
651
|
return "invalid";
|
659
652
|
}
|
660
653
|
|
661
|
-
function getRangeTypeFromForm() {
|
662
|
-
|
654
|
+
function getRangeTypeFromForm() {
|
663
655
|
const group = this[formContainerElementSymbol].querySelector(
|
664
656
|
"input[type=radio][name=rangeType]:checked",
|
665
657
|
);
|
@@ -714,8 +706,7 @@ function calculateDateRangeFromToday(date, unit) {
|
|
714
706
|
/**
|
715
707
|
* @private
|
716
708
|
*/
|
717
|
-
function updatePopperInputsFromMainValue() {
|
718
|
-
|
709
|
+
function updatePopperInputsFromMainValue() {
|
719
710
|
const featuresMoreThan = this.getOption("features.moreThan", false);
|
720
711
|
const featuresWithin = this.getOption("features.within", false);
|
721
712
|
|
@@ -886,8 +877,7 @@ function updatePopperInputsFromMainValue() {;
|
|
886
877
|
* @private
|
887
878
|
* @return {Monster.Components.Datatable.Filter.Range}
|
888
879
|
*/
|
889
|
-
function initControlReferences() {
|
890
|
-
|
880
|
+
function initControlReferences() {
|
891
881
|
if (!this.shadowRoot) {
|
892
882
|
throw new Error("no shadow-root is defined");
|
893
883
|
}
|
@@ -926,16 +916,14 @@ function initControlReferences() {;
|
|
926
916
|
* @param {object} options
|
927
917
|
* @return {object}
|
928
918
|
*/
|
929
|
-
function initOptionsFromArguments(options) {
|
930
|
-
|
919
|
+
function initOptionsFromArguments(options) {
|
931
920
|
return options;
|
932
921
|
}
|
933
922
|
|
934
923
|
/**
|
935
924
|
* @private
|
936
925
|
*/
|
937
|
-
function updatePopper() {
|
938
|
-
|
926
|
+
function updatePopper() {
|
939
927
|
if (this[popperElementSymbol].style.display !== STYLE_DISPLAY_MODE_BLOCK) {
|
940
928
|
return;
|
941
929
|
}
|
@@ -105,7 +105,7 @@ class Input extends AbstractBase {
|
|
105
105
|
*
|
106
106
|
* @return {FilterButton}
|
107
107
|
*/
|
108
|
-
[assembleMethodSymbol]() {
|
108
|
+
[assembleMethodSymbol]() {
|
109
109
|
super[assembleMethodSymbol]();
|
110
110
|
|
111
111
|
initControlReferences.call(this);
|
@@ -140,8 +140,7 @@ class Input extends AbstractBase {
|
|
140
140
|
* @private
|
141
141
|
* @return {FilterButton}
|
142
142
|
*/
|
143
|
-
function initControlReferences() {
|
144
|
-
|
143
|
+
function initControlReferences() {
|
145
144
|
if (!this.shadowRoot) {
|
146
145
|
throw new Error("no shadow-root is defined");
|
147
146
|
}
|
@@ -155,8 +154,7 @@ function initControlReferences() {;
|
|
155
154
|
/**
|
156
155
|
* @private
|
157
156
|
*/
|
158
|
-
function initEventHandler() {
|
159
|
-
}
|
157
|
+
function initEventHandler() {}
|
160
158
|
|
161
159
|
/**
|
162
160
|
* @private
|
@@ -122,7 +122,7 @@ class Range extends AbstractBase {
|
|
122
122
|
*
|
123
123
|
* @return {FilterButton}
|
124
124
|
*/
|
125
|
-
[assembleMethodSymbol]() {
|
125
|
+
[assembleMethodSymbol]() {
|
126
126
|
super[assembleMethodSymbol]();
|
127
127
|
|
128
128
|
initControlReferences.call(this);
|
@@ -205,7 +205,7 @@ class Range extends AbstractBase {
|
|
205
205
|
connectedCallback() {
|
206
206
|
super.connectedCallback();
|
207
207
|
|
208
|
-
const document = getDocument()
|
208
|
+
const document = getDocument();
|
209
209
|
|
210
210
|
for (const [, type] of Object.entries(["click", "touch"])) {
|
211
211
|
// close on outside ui-events
|
@@ -319,8 +319,7 @@ function updateFilterValue(type, self, value, element) {
|
|
319
319
|
* @private
|
320
320
|
* @return {initEventHandler}
|
321
321
|
*/
|
322
|
-
function initEventHandler() {
|
323
|
-
|
322
|
+
function initEventHandler() {
|
324
323
|
this[closeEventHandler] = (event) => {
|
325
324
|
const path = event.composedPath();
|
326
325
|
|
@@ -450,8 +449,7 @@ function initEventHandler() {;
|
|
450
449
|
/**
|
451
450
|
* @private
|
452
451
|
*/
|
453
|
-
function attachResizeObserver() {
|
454
|
-
|
452
|
+
function attachResizeObserver() {
|
455
453
|
// against flickering
|
456
454
|
this[resizeObserverSymbol] = new ResizeObserver((entries) => {
|
457
455
|
if (this[timerCallbackSymbol] instanceof DeadMansSwitch) {
|
@@ -471,7 +469,7 @@ function attachResizeObserver() {;
|
|
471
469
|
this[resizeObserverSymbol].observe(this.parentElement);
|
472
470
|
}
|
473
471
|
|
474
|
-
function disconnectResizeObserver() {
|
472
|
+
function disconnectResizeObserver() {
|
475
473
|
if (this[resizeObserverSymbol] instanceof ResizeObserver) {
|
476
474
|
this[resizeObserverSymbol].disconnect();
|
477
475
|
}
|
@@ -480,8 +478,7 @@ function disconnectResizeObserver() {;
|
|
480
478
|
/**
|
481
479
|
* @private
|
482
480
|
*/
|
483
|
-
function hide() {
|
484
|
-
|
481
|
+
function hide() {
|
485
482
|
this[popperElementSymbol].style.display = "none";
|
486
483
|
removeAttributeToken(this[controlElementSymbol], "class", "open");
|
487
484
|
}
|
@@ -490,8 +487,7 @@ function hide() {;
|
|
490
487
|
* @private
|
491
488
|
* @this PopperButton
|
492
489
|
*/
|
493
|
-
function show() {
|
494
|
-
|
490
|
+
function show() {
|
495
491
|
if (this.getOption("disabled", false) === true) {
|
496
492
|
return;
|
497
493
|
}
|
@@ -563,8 +559,7 @@ function updateInputFromValue() {
|
|
563
559
|
* @private
|
564
560
|
* @return {Monster.Components.Datatable.Filter.Range}
|
565
561
|
*/
|
566
|
-
function initControlReferences() {
|
567
|
-
|
562
|
+
function initControlReferences() {
|
568
563
|
if (!this.shadowRoot) {
|
569
564
|
throw new Error("no shadow-root is defined");
|
570
565
|
}
|
@@ -593,16 +588,14 @@ function initControlReferences() {;
|
|
593
588
|
* @param {object} options
|
594
589
|
* @return {object}
|
595
590
|
*/
|
596
|
-
function initOptionsFromArguments(options) {
|
597
|
-
|
591
|
+
function initOptionsFromArguments(options) {
|
598
592
|
return options;
|
599
593
|
}
|
600
594
|
|
601
595
|
/**
|
602
596
|
* @private
|
603
597
|
*/
|
604
|
-
function updatePopper() {
|
605
|
-
|
598
|
+
function updatePopper() {
|
606
599
|
if (this[popperElementSymbol].style.display !== STYLE_DISPLAY_MODE_BLOCK) {
|
607
600
|
return;
|
608
601
|
}
|