@schukai/monster 3.80.2 → 3.80.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/package.json +1 -1
- package/source/components/content/copy.mjs +7 -4
- package/source/components/datatable/change-button.mjs +1 -1
- package/source/components/datatable/columnbar.mjs +1 -1
- package/source/components/datatable/dataset.mjs +3 -3
- package/source/components/datatable/datasource/dom.mjs +2 -2
- package/source/components/datatable/datasource/rest.mjs +7 -7
- package/source/components/datatable/datasource.mjs +3 -3
- package/source/components/datatable/datatable/header.mjs +11 -11
- package/source/components/datatable/datatable.mjs +15 -15
- package/source/components/datatable/embedded-pagination.mjs +2 -2
- package/source/components/datatable/filter/date-range.mjs +5 -5
- package/source/components/datatable/filter/input.mjs +2 -2
- package/source/components/datatable/filter/range.mjs +3 -3
- package/source/components/datatable/filter/settings.mjs +5 -5
- package/source/components/datatable/filter/util.mjs +3 -3
- package/source/components/datatable/filter-button.mjs +1 -1
- package/source/components/datatable/filter.mjs +11 -11
- package/source/components/datatable/pagination.mjs +3 -3
- package/source/components/datatable/save-button.mjs +1 -1
- package/source/components/datatable/status.mjs +1 -1
- package/source/components/form/action-button.mjs +2 -2
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +3 -3
- package/source/components/form/confirm-button.mjs +4 -4
- package/source/components/form/context-error.mjs +4 -4
- package/source/components/form/context-help.mjs +1 -1
- package/source/components/form/field-set.mjs +2 -2
- package/source/components/form/form.mjs +3 -3
- package/source/components/form/message-state-button.mjs +6 -6
- package/source/components/form/popper-button.mjs +1 -1
- package/source/components/form/reload.mjs +5 -22
- package/source/components/form/select.mjs +2015 -1958
- package/source/components/form/shadow-reload.mjs +1 -1
- package/source/components/form/state-button.mjs +1 -1
- package/source/components/form/style/select.pcss +3 -1
- package/source/components/form/stylesheet/select.mjs +7 -14
- package/source/components/form/template.mjs +4 -4
- package/source/components/form/toggle-switch.mjs +1 -1
- package/source/components/form/tree-select.mjs +1 -1
- package/source/components/form/util/floating-ui.mjs +1 -1
- package/source/components/host/call-button.mjs +1 -1
- package/source/components/host/config-manager.mjs +6 -6
- package/source/components/host/host.mjs +8 -8
- package/source/components/host/overlay.mjs +13 -13
- package/source/components/host/toggle-button.mjs +1 -1
- package/source/components/host/util.mjs +1 -1
- package/source/components/host/viewer.mjs +5 -5
- package/source/components/layout/collapse.mjs +20 -19
- package/source/components/layout/details.mjs +5 -5
- package/source/components/layout/iframe.mjs +2 -2
- package/source/components/layout/panel.mjs +3 -3
- package/source/components/layout/popper.mjs +1 -1
- package/source/components/layout/slider.mjs +6 -6
- package/source/components/layout/split-panel.mjs +3 -3
- package/source/components/layout/tabs.mjs +3 -9
- package/source/components/layout/width-toggle.mjs +4 -4
- package/source/components/navigation/table-of-content.mjs +3 -3
- package/source/components/notify/message.mjs +0 -1
- package/source/components/state/log/entry.mjs +6 -6
- package/source/components/state/log.mjs +3 -39
- package/source/components/state/state.mjs +1 -1
- package/source/components/tree-menu/dragable-tree-menu.mjs +2 -2
- package/source/components/tree-menu/tree-menu.mjs +1 -1
- package/source/constraints/abstract.mjs +2 -2
- package/source/constraints/abstractoperator.mjs +1 -1
- package/source/constraints/andoperator.mjs +5 -5
- package/source/constraints/invalid.mjs +5 -5
- package/source/constraints/isarray.mjs +5 -5
- package/source/constraints/isobject.mjs +5 -5
- package/source/constraints/oroperator.mjs +5 -5
- package/source/constraints/valid.mjs +4 -4
- package/source/data/buildmap.mjs +2 -1
- package/source/data/datasource/dom.mjs +1 -1
- package/source/data/datasource/server/restapi/data-fetch-error.mjs +1 -1
- package/source/data/datasource/server/restapi/writeerror.mjs +1 -1
- package/source/data/datasource/server/restapi.mjs +2 -2
- package/source/data/datasource/server/webconnect.mjs +4 -4
- package/source/data/datasource/server.mjs +5 -5
- package/source/data/datasource/storage/localstorage.mjs +1 -1
- package/source/data/datasource/storage/sessionstorage.mjs +1 -1
- package/source/data/datasource/storage.mjs +1 -1
- package/source/data/datasource.mjs +4 -5
- package/source/data/pathfinder.mjs +10 -9
- package/source/data/pipe.mjs +5 -4
- package/source/data/transformer.mjs +23 -11
- package/source/dom/assembler.mjs +2 -2
- package/source/dom/attributes.mjs +2 -2
- package/source/dom/customcontrol.mjs +1 -1
- package/source/dom/customelement.mjs +36 -67
- package/source/dom/dimension.mjs +3 -3
- package/source/dom/focusmanager.mjs +1 -1
- package/source/dom/locale.mjs +1 -1
- package/source/dom/resource/data.mjs +1 -1
- package/source/dom/resource/link/stylesheet.mjs +1 -1
- package/source/dom/resource/link.mjs +1 -1
- package/source/dom/resource/script.mjs +1 -1
- package/source/dom/template.mjs +2 -2
- package/source/dom/theme.mjs +2 -2
- package/source/dom/updater.mjs +5 -6
- package/source/dom/util/extract-keys.mjs +1 -1
- package/source/dom/util/init-options-from-attributes.mjs +1 -1
- package/source/dom/util/set-option-from-attribute.mjs +1 -1
- package/source/dom/util.mjs +9 -9
- package/source/i18n/formatter.mjs +1 -1
- package/source/i18n/locale.mjs +2 -2
- package/source/i18n/provider.mjs +1 -1
- package/source/i18n/providers/embed.mjs +1 -3
- package/source/i18n/translations.mjs +2 -2
- package/source/logging/handler/console.mjs +1 -1
- package/source/logging/handler.mjs +11 -11
- package/source/logging/logentry.mjs +2 -2
- package/source/logging/logger.mjs +11 -11
- package/source/math/random.mjs +2 -2
- package/source/monster.mjs +1 -0
- package/source/net/webconnect/message.mjs +3 -3
- package/source/net/webconnect.mjs +10 -10
- package/source/text/bracketed-key-value-hash.mjs +2 -2
- package/source/text/generate-range-comparison-expression.mjs +1 -1
- package/source/types/base.mjs +4 -4
- package/source/types/basewithoptions.mjs +3 -4
- package/source/types/dataurl.mjs +6 -8
- package/source/types/global.mjs +2 -2
- package/source/types/internal.mjs +3 -3
- package/source/types/is.mjs +10 -20
- package/source/types/mediatype.mjs +1 -1
- package/source/types/node.mjs +1 -1
- package/source/types/nodelist.mjs +7 -7
- package/source/types/observablequeue.mjs +7 -7
- package/source/types/observer.mjs +6 -6
- package/source/types/proxyobserver.mjs +8 -8
- package/source/types/queue.mjs +3 -3
- package/source/types/stack.mjs +3 -3
- package/source/types/tokenlist.mjs +12 -12
- package/source/types/uniquequeue.mjs +2 -2
- package/source/types/version.mjs +4 -4
- package/source/util/clone.mjs +2 -2
- package/source/util/comparator.mjs +1 -2
- package/source/util/deadmansswitch.mjs +7 -5
- package/source/util/freeze.mjs +1 -1
- package/source/util/processing.mjs +2 -2
- package/source/util/runtime.mjs +1 -1
@@ -69,7 +69,7 @@ const timerCallbackSymbol = Symbol("timerCallback");
|
|
69
69
|
class Iframe extends CustomElement {
|
70
70
|
/**
|
71
71
|
* This method is called by the `instanceof` operator.
|
72
|
-
* @
|
72
|
+
* @return {symbol}
|
73
73
|
*/
|
74
74
|
static get [instanceSymbol]() {
|
75
75
|
return Symbol.for("@schukai/monster/components/layout/iframe@@instance");
|
@@ -191,7 +191,7 @@ function calcHeight() {
|
|
191
191
|
/**
|
192
192
|
* Calculate the maximum height of an element based on the window's inner height
|
193
193
|
* @param element
|
194
|
-
* @
|
194
|
+
* @return {*}
|
195
195
|
*/
|
196
196
|
function calculateMaximumHeight(element) {
|
197
197
|
let totalBottomBorder = 0;
|
@@ -57,7 +57,7 @@ const timerCallbackSymbol = Symbol("timerCallback");
|
|
57
57
|
class Panel extends CustomElement {
|
58
58
|
/**
|
59
59
|
* This method is called by the `instanceof` operator.
|
60
|
-
* @
|
60
|
+
* @return {symbol}
|
61
61
|
*/
|
62
62
|
static get [instanceSymbol]() {
|
63
63
|
return Symbol.for("@schukai/monster/components/layout/panel");
|
@@ -84,7 +84,7 @@ class Panel extends CustomElement {
|
|
84
84
|
|
85
85
|
/**
|
86
86
|
*
|
87
|
-
* @
|
87
|
+
* @return {Monster.Components.Host.Viewer}
|
88
88
|
*/
|
89
89
|
[assembleMethodSymbol]() {
|
90
90
|
super[assembleMethodSymbol]();
|
@@ -152,7 +152,7 @@ function calcHeight() {
|
|
152
152
|
/**
|
153
153
|
* Calculate the maximum height of an element based on the window's inner height
|
154
154
|
* @param element
|
155
|
-
* @
|
155
|
+
* @return {*}
|
156
156
|
*/
|
157
157
|
function calculateMaximumHeight(element) {
|
158
158
|
let totalBottomBorder = 0;
|
@@ -98,7 +98,7 @@ const arrowElementSymbol = Symbol("arrowElement");
|
|
98
98
|
class Popper extends CustomElement {
|
99
99
|
/**
|
100
100
|
* This method is called by the `instanceof` operator.
|
101
|
-
* @
|
101
|
+
* @return {symbol}
|
102
102
|
*/
|
103
103
|
static get [instanceSymbol]() {
|
104
104
|
return Symbol.for("@schukai/monster/components/layout/popper@@instance");
|
@@ -74,7 +74,7 @@ const ATTRIBUTE_CLONE_FROM = ATTRIBUTE_PREFIX + "clone-from";
|
|
74
74
|
class Slider extends CustomElement {
|
75
75
|
/**
|
76
76
|
* This method is called by the `instanceof` operator.
|
77
|
-
* @
|
77
|
+
* @return {symbol}
|
78
78
|
*/
|
79
79
|
static get [instanceSymbol]() {
|
80
80
|
return Symbol.for("@schukai/monster/components/layout/slider@@instance");
|
@@ -170,7 +170,7 @@ class Slider extends CustomElement {
|
|
170
170
|
* moves the slider to the given index
|
171
171
|
*
|
172
172
|
* @param index
|
173
|
-
* @
|
173
|
+
* @return {void}
|
174
174
|
*/
|
175
175
|
moveTo(index) {
|
176
176
|
return moveTo.call(this, index);
|
@@ -366,7 +366,7 @@ function initCarousel() {
|
|
366
366
|
|
367
367
|
/**
|
368
368
|
* @private
|
369
|
-
* @
|
369
|
+
* @return {{slides: unknown[], totalSlides: number}}
|
370
370
|
*/
|
371
371
|
function getSlidesAndTotal() {
|
372
372
|
const slides = Array.from(getSlottedElements.call(this, ":scope", null));
|
@@ -376,7 +376,7 @@ function getSlidesAndTotal() {
|
|
376
376
|
|
377
377
|
/**
|
378
378
|
* @private
|
379
|
-
* @
|
379
|
+
* @return {number}
|
380
380
|
*/
|
381
381
|
function next() {
|
382
382
|
const { slides, totalSlides } = getSlidesAndTotal.call(this);
|
@@ -399,7 +399,7 @@ function next() {
|
|
399
399
|
|
400
400
|
/**
|
401
401
|
* @private
|
402
|
-
* @
|
402
|
+
* @return {number}
|
403
403
|
*/
|
404
404
|
function prev() {
|
405
405
|
const prevIndex = this[configSymbol].currentIndex - 1;
|
@@ -584,7 +584,7 @@ function startDragging(e, type) {
|
|
584
584
|
* @private
|
585
585
|
* @param e
|
586
586
|
* @param type
|
587
|
-
* @
|
587
|
+
* @return {*|number|number}
|
588
588
|
*/
|
589
589
|
function getPositionX(e, type) {
|
590
590
|
return type === "mouse" ? e.pageX : e.touches[0].clientX;
|
@@ -80,7 +80,7 @@ const TYPE_HORIZONTAL = "horizontal";
|
|
80
80
|
class SplitPanel extends CustomElement {
|
81
81
|
/**
|
82
82
|
* This method is called by the `instanceof` operator.
|
83
|
-
* @
|
83
|
+
* @return {symbol}
|
84
84
|
*/
|
85
85
|
static get [instanceSymbol]() {
|
86
86
|
return Symbol.for("@schukai/monster/components/layout/split-panel");
|
@@ -151,7 +151,7 @@ class SplitPanel extends CustomElement {
|
|
151
151
|
|
152
152
|
/**
|
153
153
|
*
|
154
|
-
* @
|
154
|
+
* @return {Monster.Components.Host.Viewer}
|
155
155
|
*/
|
156
156
|
[assembleMethodSymbol]() {
|
157
157
|
super[assembleMethodSymbol]();
|
@@ -200,7 +200,7 @@ class SplitPanel extends CustomElement {
|
|
200
200
|
|
201
201
|
/**
|
202
202
|
* Set the dimensions of the panel based on the split type.
|
203
|
-
* @fires
|
203
|
+
* @fires monster-dimension-changed
|
204
204
|
*/
|
205
205
|
function applyPanelDimensions() {
|
206
206
|
const splitType = this.getOption("splitType");
|
@@ -154,8 +154,7 @@ const resizeObserverSymbol = Symbol("resizeObserver");
|
|
154
154
|
class Tabs extends CustomElement {
|
155
155
|
/**
|
156
156
|
* This method is called by the `instanceof` operator.
|
157
|
-
* @
|
158
|
-
* @since 1.10.0
|
157
|
+
* @return {symbol}
|
159
158
|
*/
|
160
159
|
static get [instanceSymbol]() {
|
161
160
|
return Symbol.for("@schukai/monster/components/layout/tabs");
|
@@ -316,7 +315,7 @@ class Tabs extends CustomElement {
|
|
316
315
|
*
|
317
316
|
* The tabs have to be named with the `data-monster-name` attribute.
|
318
317
|
*
|
319
|
-
* @
|
318
|
+
* @return {string|null}
|
320
319
|
*/
|
321
320
|
getActiveTab() {
|
322
321
|
const nodes = getSlottedElements.call(this);
|
@@ -664,14 +663,9 @@ function initEventHandler() {
|
|
664
663
|
}
|
665
664
|
};
|
666
665
|
|
667
|
-
/**
|
668
|
-
* event:monster-tab-remove
|
669
|
-
* @event Monster.Components.Layout.event:monster-tab-remove
|
670
|
-
*/
|
671
|
-
|
672
666
|
/**
|
673
667
|
* @param {Event} event
|
674
|
-
* @fires
|
668
|
+
* @fires monster-tab-remove
|
675
669
|
*/
|
676
670
|
this[removeTabEventHandler] = (event) => {
|
677
671
|
const element = findTargetElementFromEvent(
|
@@ -70,7 +70,7 @@ const MODE_WIDE = "wide";
|
|
70
70
|
class WidthToggle extends CustomElement {
|
71
71
|
/**
|
72
72
|
* This method is called by the `instanceof` operator.
|
73
|
-
* @
|
73
|
+
* @return {symbol}
|
74
74
|
*/
|
75
75
|
static get [instanceSymbol]() {
|
76
76
|
return Symbol.for(
|
@@ -106,7 +106,7 @@ class WidthToggle extends CustomElement {
|
|
106
106
|
}
|
107
107
|
|
108
108
|
/**
|
109
|
-
* @
|
109
|
+
* @return {void}
|
110
110
|
*/
|
111
111
|
[assembleMethodSymbol]() {
|
112
112
|
super[assembleMethodSymbol]();
|
@@ -126,7 +126,7 @@ class WidthToggle extends CustomElement {
|
|
126
126
|
|
127
127
|
/**
|
128
128
|
* @param {string} mode
|
129
|
-
* @
|
129
|
+
* @return {WidthToggle}
|
130
130
|
* @throws {Error} no shadow-root is defined
|
131
131
|
*/
|
132
132
|
setWidth(mode) {
|
@@ -143,7 +143,7 @@ class WidthToggle extends CustomElement {
|
|
143
143
|
}
|
144
144
|
|
145
145
|
/**
|
146
|
-
* @
|
146
|
+
* @return {CSSStyleSheet[]}
|
147
147
|
*/
|
148
148
|
static getCSSStyleSheet() {
|
149
149
|
return [WidthToggleStyleSheet];
|
@@ -83,7 +83,7 @@ const scrollableEventHandlerSymbol = Symbol("scrollableEventHandler");
|
|
83
83
|
class TableOfContent extends CustomElement {
|
84
84
|
/**
|
85
85
|
* This method is called by the `instanceof` operator.
|
86
|
-
* @
|
86
|
+
* @return {symbol}
|
87
87
|
*/
|
88
88
|
static get [instanceSymbol]() {
|
89
89
|
return Symbol.for(
|
@@ -354,7 +354,7 @@ function initNavigation() {
|
|
354
354
|
* Recursively creates a nested list (UL) from a list of heading elements.
|
355
355
|
* @param {HTMLElement[]} nodeList - The list of heading elements.
|
356
356
|
* @param {number} currentLevel - The current heading level we are processing.
|
357
|
-
* @
|
357
|
+
* @return {{sublist: HTMLUListElement, lastIndex: number}} An object containing the sublist and the index of the last processed element.
|
358
358
|
*/
|
359
359
|
function createListFromHeadings(nodeList, currentLevel = 1) {
|
360
360
|
const self = this;
|
@@ -409,7 +409,7 @@ function createListFromHeadings(nodeList, currentLevel = 1) {
|
|
409
409
|
|
410
410
|
/**
|
411
411
|
* @private
|
412
|
-
* @
|
412
|
+
* @return {*[]}
|
413
413
|
*/
|
414
414
|
function getHeadings() {
|
415
415
|
const allHeadings = [];
|
@@ -96,7 +96,6 @@ const removeEventHandlerSymbol = Symbol("removeEventHandler");
|
|
96
96
|
* @copyright schukai GmbH
|
97
97
|
* @memberOf Monster.Components.Notify
|
98
98
|
* @summary A highly configurable select control
|
99
|
-
* @fires Monster.Components.Notify.event:monster-xxxx
|
100
99
|
*/
|
101
100
|
class Message extends CustomElement {
|
102
101
|
/**
|
@@ -55,7 +55,7 @@ class Entry extends Base {
|
|
55
55
|
|
56
56
|
/**
|
57
57
|
* This method is called by the `instanceof` operator.
|
58
|
-
* @
|
58
|
+
* @return {symbol}
|
59
59
|
*/
|
60
60
|
static get [instanceSymbol]() {
|
61
61
|
return Symbol.for("@schukai/component-state/log/entry");
|
@@ -63,7 +63,7 @@ class Entry extends Base {
|
|
63
63
|
|
64
64
|
/**
|
65
65
|
*
|
66
|
-
* @
|
66
|
+
* @return {object}
|
67
67
|
*/
|
68
68
|
get internalDefaults() {
|
69
69
|
return {
|
@@ -75,7 +75,7 @@ class Entry extends Base {
|
|
75
75
|
}
|
76
76
|
|
77
77
|
/**
|
78
|
-
* @
|
78
|
+
* @return {string}
|
79
79
|
*/
|
80
80
|
get title() {
|
81
81
|
return this.getInternal("title");
|
@@ -89,7 +89,7 @@ class Entry extends Base {
|
|
89
89
|
}
|
90
90
|
|
91
91
|
/**
|
92
|
-
* @
|
92
|
+
* @return {string}
|
93
93
|
*/
|
94
94
|
get message() {
|
95
95
|
return this.getInternal("message");
|
@@ -103,7 +103,7 @@ class Entry extends Base {
|
|
103
103
|
}
|
104
104
|
|
105
105
|
/**
|
106
|
-
* @
|
106
|
+
* @return {string}
|
107
107
|
*/
|
108
108
|
get user() {
|
109
109
|
return this.getInternal("user");
|
@@ -117,7 +117,7 @@ class Entry extends Base {
|
|
117
117
|
}
|
118
118
|
|
119
119
|
/**
|
120
|
-
* @
|
120
|
+
* @return {Date}
|
121
121
|
*/
|
122
122
|
get date() {
|
123
123
|
return this.getInternal("date");
|
@@ -38,47 +38,11 @@ const logElementSymbol = Symbol("logElement");
|
|
38
38
|
*/
|
39
39
|
const emptyStateElementSymbol = Symbol("emptyStateElement");
|
40
40
|
|
41
|
-
/**
|
42
|
-
* Log is a control to show a log message.
|
43
|
-
*
|
44
|
-
* <img src="./images/log.png">
|
45
|
-
*
|
46
|
-
* Dependencies: the system uses functions of the [monsterjs](https://monsterjs.org/) library
|
47
|
-
*
|
48
|
-
* You can create this control either by specifying the HTML tag <monster-state />` directly in the HTML or using
|
49
|
-
* Javascript via the `document.createElement('monster-state');` method.
|
50
|
-
*
|
51
|
-
* ```html
|
52
|
-
* <monster-log></monster-log>
|
53
|
-
* ```
|
54
|
-
*
|
55
|
-
* Or you can create this CustomControl directly in Javascript:
|
56
|
-
*
|
57
|
-
* ```js
|
58
|
-
* import {Log} from '@schukai/component-state/source/log.js';
|
59
|
-
* document.createElement('monster-log');
|
60
|
-
* ```
|
61
|
-
*
|
62
|
-
* @externalExample ../../../example/components/state/log.mjs
|
63
|
-
* @startuml log.png
|
64
|
-
* skinparam monochrome true
|
65
|
-
* skinparam shadowing false
|
66
|
-
* HTMLElement <|-- CustomElement
|
67
|
-
* CustomElement <|-- Log
|
68
|
-
* @enduml
|
69
|
-
*
|
70
|
-
* @copyright schukai GmbH
|
71
|
-
* @memberOf Monster.Components.State
|
72
|
-
* @summary Log is a control to show a log message.
|
73
|
-
*/
|
74
|
-
|
75
41
|
/**
|
76
42
|
* A Log component
|
77
43
|
*
|
78
44
|
* @fragments /fragments/components/layout/collapse/
|
79
45
|
*
|
80
|
-
* @example /examples/components/layout/collapse-simple
|
81
|
-
*
|
82
46
|
* @since 3.74.0
|
83
47
|
* @copyright schukai GmbH
|
84
48
|
* @summary A Log component to show a log message.
|
@@ -96,7 +60,7 @@ class Log extends CustomElement {
|
|
96
60
|
|
97
61
|
/**
|
98
62
|
* This method is called by the `instanceof` operator.
|
99
|
-
* @
|
63
|
+
* @return {symbol}
|
100
64
|
*/
|
101
65
|
static get [instanceSymbol]() {
|
102
66
|
return Symbol.for("@schukai/monster/components/state/log@@instance");
|
@@ -153,7 +117,7 @@ class Log extends CustomElement {
|
|
153
117
|
/**
|
154
118
|
* Add an entry to the log
|
155
119
|
* @param entry
|
156
|
-
* @
|
120
|
+
* @return {Log}
|
157
121
|
*/
|
158
122
|
addEntry(entry) {
|
159
123
|
validateInstance(entry, Entry);
|
@@ -171,7 +135,7 @@ class Log extends CustomElement {
|
|
171
135
|
* Add a log message
|
172
136
|
* @param message
|
173
137
|
* @param date
|
174
|
-
* @
|
138
|
+
* @return {Log}
|
175
139
|
*/
|
176
140
|
addMessage(message, date) {
|
177
141
|
if (!date) {
|
@@ -50,7 +50,7 @@ class State extends CustomControl {
|
|
50
50
|
|
51
51
|
/**
|
52
52
|
* This method is called by the `instanceof` operator.
|
53
|
-
* @
|
53
|
+
* @return {symbol}
|
54
54
|
*/
|
55
55
|
static get [instanceSymbol]() {
|
56
56
|
return Symbol.for("@schukai/monster/components/state/state@@instance");
|
@@ -128,7 +128,7 @@
|
|
128
128
|
// * @copyright schukai GmbH
|
129
129
|
// * @memberOf Monster.Components.TreeMenu
|
130
130
|
// * @summary A TreeMenu control
|
131
|
-
// * @fires
|
131
|
+
// * @fires monster-fetched
|
132
132
|
// */
|
133
133
|
// class TreeMenu extends CustomElement {
|
134
134
|
// /**
|
@@ -613,7 +613,7 @@
|
|
613
613
|
// // * @throws {Error} request failed
|
614
614
|
// // * @throws {Error} not found
|
615
615
|
// // * @throws {Error} undefined status or type
|
616
|
-
// // * @fires
|
616
|
+
// // * @fires monster-fetched
|
617
617
|
// // */
|
618
618
|
// // function initIntersectionObserver() {
|
619
619
|
// // const self = this;
|
@@ -80,7 +80,7 @@ const openEntryEventHandlerSymbol = Symbol("openEntryEventHandler");
|
|
80
80
|
class TreeMenu extends CustomElement {
|
81
81
|
/**
|
82
82
|
* This method is called by the `instanceof` operator.
|
83
|
-
* @
|
83
|
+
* @return {symbol}
|
84
84
|
*/
|
85
85
|
static get [instanceSymbol]() {
|
86
86
|
return Symbol.for("@schukai/monster/components/tree-menu@@instance");
|
@@ -37,7 +37,7 @@ class AbstractConstraint extends Base {
|
|
37
37
|
* this method must return a promise containing the result of the check.
|
38
38
|
*
|
39
39
|
* @param {*} value
|
40
|
-
* @
|
40
|
+
* @return {Promise}
|
41
41
|
*/
|
42
42
|
isValid(value) {
|
43
43
|
return Promise.reject(value);
|
@@ -45,7 +45,7 @@ class AbstractConstraint extends Base {
|
|
45
45
|
|
46
46
|
/**
|
47
47
|
* This method is called by the `instanceof` operator.
|
48
|
-
* @
|
48
|
+
* @return {symbol}
|
49
49
|
* @since 2.1.0
|
50
50
|
*/
|
51
51
|
static get [instanceSymbol]() {
|
@@ -23,19 +23,19 @@ export { AndOperator };
|
|
23
23
|
*
|
24
24
|
* The AndOperator is used to link several constraints. The constraint is fulfilled if all constraints of the operators are fulfilled.
|
25
25
|
*
|
26
|
-
* @
|
26
|
+
* @example /examples/libraries/constraints/andoperator/ A simple example
|
27
|
+
*
|
27
28
|
* @license AGPLv3
|
28
29
|
* @since 1.3.0
|
29
30
|
* @copyright schukai GmbH
|
30
|
-
* @memberOf Monster.Constraints
|
31
31
|
* @summary A and operator constraint
|
32
32
|
*/
|
33
33
|
class AndOperator extends AbstractOperator {
|
34
34
|
/**
|
35
|
-
*
|
35
|
+
* This method returns a promise containing the result of the check.
|
36
36
|
*
|
37
37
|
* @param {*} value
|
38
|
-
* @
|
38
|
+
* @return {Promise}
|
39
39
|
*/
|
40
40
|
isValid(value) {
|
41
41
|
return Promise.all([
|
@@ -46,7 +46,7 @@ class AndOperator extends AbstractOperator {
|
|
46
46
|
|
47
47
|
/**
|
48
48
|
* This method is called by the `instanceof` operator.
|
49
|
-
* @
|
49
|
+
* @return {symbol}
|
50
50
|
* @since 2.1.0
|
51
51
|
*/
|
52
52
|
static get [instanceSymbol]() {
|
@@ -23,19 +23,19 @@ export { Invalid };
|
|
23
23
|
*
|
24
24
|
* The invalid constraint allows an always invalid query to be performed. this constraint is mainly intended for testing.
|
25
25
|
*
|
26
|
-
* @
|
26
|
+
* @example /examples/libraries/constraints/invalid/ A simple example
|
27
|
+
*
|
27
28
|
* @license AGPLv3
|
28
29
|
* @since 1.3.0
|
29
30
|
* @copyright schukai GmbH
|
30
|
-
* @memberOf Monster.Constraints
|
31
31
|
* @summary A constraint that always invalid
|
32
32
|
*/
|
33
33
|
class Invalid extends AbstractConstraint {
|
34
34
|
/**
|
35
|
-
* this method
|
35
|
+
* this method returns a rejected promise
|
36
36
|
*
|
37
37
|
* @param {*} value
|
38
|
-
* @
|
38
|
+
* @return {Promise}
|
39
39
|
*/
|
40
40
|
isValid(value) {
|
41
41
|
return Promise.reject(value);
|
@@ -43,7 +43,7 @@ class Invalid extends AbstractConstraint {
|
|
43
43
|
|
44
44
|
/**
|
45
45
|
* This method is called by the `instanceof` operator.
|
46
|
-
* @
|
46
|
+
* @return {symbol}
|
47
47
|
* @since 2.1.0
|
48
48
|
*/
|
49
49
|
static get [instanceSymbol]() {
|
@@ -22,19 +22,19 @@ export { IsArray };
|
|
22
22
|
*
|
23
23
|
* The uniform API of the constraints allows chains to be formed.
|
24
24
|
*
|
25
|
-
* @
|
25
|
+
* @example /examples/libraries/constraints/isarray/ A simple example
|
26
|
+
*
|
26
27
|
* @license AGPLv3
|
27
28
|
* @since 1.3.0
|
28
29
|
* @copyright schukai GmbH
|
29
|
-
* @memberOf Monster.Constraints
|
30
30
|
* @summary A constraint to check if a value is an array
|
31
31
|
*/
|
32
32
|
class IsArray extends AbstractConstraint {
|
33
33
|
/**
|
34
|
-
* this method
|
34
|
+
* this method returns a promise containing the result of the check.
|
35
35
|
*
|
36
36
|
* @param {*} value
|
37
|
-
* @
|
37
|
+
* @return {Promise}
|
38
38
|
*/
|
39
39
|
isValid(value) {
|
40
40
|
if (isArray(value)) {
|
@@ -46,7 +46,7 @@ class IsArray extends AbstractConstraint {
|
|
46
46
|
|
47
47
|
/**
|
48
48
|
* This method is called by the `instanceof` operator.
|
49
|
-
* @
|
49
|
+
* @return {symbol}
|
50
50
|
* @since 2.1.0
|
51
51
|
*/
|
52
52
|
static get [instanceSymbol]() {
|
@@ -22,19 +22,19 @@ export { IsObject };
|
|
22
22
|
*
|
23
23
|
* The uniform API of the constraints allows chains to be formed.
|
24
24
|
*
|
25
|
-
* @
|
25
|
+
* @example /examples/libraries/constraints/isobject/ A simple example
|
26
|
+
*
|
26
27
|
* @license AGPLv3
|
27
28
|
* @since 1.3.0
|
28
29
|
* @copyright schukai GmbH
|
29
|
-
* @memberOf Monster.Constraints
|
30
30
|
* @summary A constraint to check if a value is an object
|
31
31
|
*/
|
32
32
|
class IsObject extends AbstractConstraint {
|
33
33
|
/**
|
34
|
-
* this method
|
34
|
+
* this method returns a promise containing the result of the check.
|
35
35
|
*
|
36
36
|
* @param {*} value
|
37
|
-
* @
|
37
|
+
* @return {Promise}
|
38
38
|
*/
|
39
39
|
isValid(value) {
|
40
40
|
if (isObject(value)) {
|
@@ -46,7 +46,7 @@ class IsObject extends AbstractConstraint {
|
|
46
46
|
|
47
47
|
/**
|
48
48
|
* This method is called by the `instanceof` operator.
|
49
|
-
* @
|
49
|
+
* @return {symbol}
|
50
50
|
* @since 2.1.0
|
51
51
|
*/
|
52
52
|
static get [instanceSymbol]() {
|
@@ -23,19 +23,19 @@ export { OrOperator };
|
|
23
23
|
*
|
24
24
|
* The OrOperator is used to link several constraints. The constraint is fulfilled if one of the constraints is fulfilled.
|
25
25
|
*
|
26
|
-
* @
|
26
|
+
* @example /examples/libraries/constraints/oroperator/ A simple example
|
27
|
+
*
|
27
28
|
* @license AGPLv3
|
28
29
|
* @since 1.3.0
|
29
30
|
* @copyright schukai GmbH
|
30
|
-
* @memberOf Monster.Constraints
|
31
31
|
* @summary A or operator
|
32
32
|
*/
|
33
33
|
class OrOperator extends AbstractOperator {
|
34
34
|
/**
|
35
|
-
* this method
|
35
|
+
* this method returns a promise containing the result of the check.
|
36
36
|
*
|
37
37
|
* @param {*} value
|
38
|
-
* @
|
38
|
+
* @return {Promise}
|
39
39
|
*/
|
40
40
|
isValid(value) {
|
41
41
|
var self = this;
|
@@ -74,7 +74,7 @@ class OrOperator extends AbstractOperator {
|
|
74
74
|
|
75
75
|
/**
|
76
76
|
* This method is called by the `instanceof` operator.
|
77
|
-
* @
|
77
|
+
* @return {symbol}
|
78
78
|
* @since 2.1.0
|
79
79
|
*/
|
80
80
|
static get [instanceSymbol]() {
|
@@ -23,11 +23,11 @@ export { Valid };
|
|
23
23
|
*
|
24
24
|
* The valid constraint allows an always valid query to be performed. this constraint is mainly intended for testing.
|
25
25
|
*
|
26
|
-
* @
|
26
|
+
* @example /examples/libraries/constraints/valid/ A simple example
|
27
|
+
*
|
27
28
|
* @license AGPLv3
|
28
29
|
* @since 1.3.0
|
29
30
|
* @copyright schukai GmbH
|
30
|
-
* @memberOf Monster.Constraints
|
31
31
|
* @summary A constraint that always valid
|
32
32
|
*/
|
33
33
|
class Valid extends AbstractConstraint {
|
@@ -35,7 +35,7 @@ class Valid extends AbstractConstraint {
|
|
35
35
|
* this method return a promise containing the result of the check.
|
36
36
|
*
|
37
37
|
* @param {*} value
|
38
|
-
* @
|
38
|
+
* @return {Promise}
|
39
39
|
*/
|
40
40
|
isValid(value) {
|
41
41
|
return Promise.resolve(value);
|
@@ -43,7 +43,7 @@ class Valid extends AbstractConstraint {
|
|
43
43
|
|
44
44
|
/**
|
45
45
|
* This method is called by the `instanceof` operator.
|
46
|
-
* @
|
46
|
+
* @return {symbol}
|
47
47
|
* @since 2.1.0
|
48
48
|
*/
|
49
49
|
static get [instanceSymbol]() {
|
package/source/data/buildmap.mjs
CHANGED
@@ -33,9 +33,10 @@ const PARENT = "^";
|
|
33
33
|
* The templates determine the appearance of the keys and the value of the map. Either a single value
|
34
34
|
* id can be taken or a composite key ${id} ${name} can be used.
|
35
35
|
*
|
36
|
-
* If you want to access values of the parent data set, you have to use the ^ character, for example ${id} ${^.name}.
|
36
|
+
* If you want to access the values of the parent data set, you have to use the ^ character, for example, ${id} ${^.name}.
|
37
37
|
*
|
38
38
|
* @externalExample ../../example/data/buildmap.mjs
|
39
|
+
*
|
39
40
|
* @param {*} subject - The data object from which the map will be created
|
40
41
|
* @param {string|Monster.Data~exampleSelectorCallback} selector - The path to the data object, or a callback that returns a map.
|
41
42
|
* @param {string} [valueTemplate] - A template for the value of the map.
|
@@ -40,7 +40,7 @@ class DomStorage extends Datasource {
|
|
40
40
|
|
41
41
|
/**
|
42
42
|
* This method is called by the `instanceof` operator.
|
43
|
-
* @
|
43
|
+
* @return {symbol}
|
44
44
|
*/
|
45
45
|
static get [instanceSymbol]() {
|
46
46
|
return Symbol.for("@schukai/monster/data/datasource/storage/dom-storage");
|