@schukai/monster 3.73.8 → 3.74.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +30 -0
- package/package.json +1 -1
- package/source/components/datatable/change-button.mjs +4 -4
- package/source/components/datatable/columnbar.mjs +2 -2
- package/source/components/datatable/dataset.mjs +2 -2
- package/source/components/datatable/datasource/rest.mjs +9 -8
- package/source/components/datatable/datatable.mjs +6 -6
- package/source/components/datatable/filter/date-range.mjs +6 -6
- package/source/components/datatable/filter/input.mjs +2 -2
- package/source/components/datatable/filter/range.mjs +4 -4
- package/source/components/datatable/filter/select.mjs +6 -2
- package/source/components/datatable/filter.mjs +4 -4
- package/source/components/datatable/save-button.mjs +4 -4
- package/source/components/datatable/stylesheet/change-button.mjs +1 -1
- package/source/components/datatable/stylesheet/column-bar.mjs +1 -1
- package/source/components/datatable/stylesheet/dataset.mjs +1 -1
- package/source/components/datatable/stylesheet/datatable.mjs +13 -6
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/filter-select.mjs +13 -6
- package/source/components/datatable/stylesheet/filter.mjs +13 -6
- package/source/components/datatable/stylesheet/pagination.mjs +1 -1
- package/source/components/datatable/stylesheet/save-button.mjs +1 -1
- package/source/components/datatable/stylesheet/status.mjs +1 -1
- package/source/components/datatable/util.mjs +2 -2
- package/source/components/form/action-button.mjs +12 -1
- package/source/components/form/api-button.mjs +16 -5
- package/source/components/form/button-bar.mjs +13 -1
- package/source/components/form/confirm-button.mjs +12 -1
- package/source/components/form/context-error.mjs +12 -1
- package/source/components/form/context-help.mjs +12 -1
- package/source/components/form/field-set.mjs +12 -1
- package/source/components/form/form.mjs +15 -0
- package/source/components/form/message-state-button.mjs +16 -1
- package/source/components/form/popper-button.mjs +16 -1
- package/source/components/form/reload.mjs +14 -2
- package/source/components/form/shadow-reload.mjs +5 -62
- package/source/components/form/state-button.mjs +4 -30
- package/source/components/form/stylesheet/action-button.mjs +1 -1
- package/source/components/form/stylesheet/field-set.mjs +1 -1
- package/source/components/form/stylesheet/state-button.mjs +1 -1
- package/source/components/form/stylesheet/toggle-switch.mjs +1 -1
- package/source/components/form/tabs.mjs +1 -37
- package/source/components/form/template.mjs +4 -29
- package/source/components/form/toggle-switch.mjs +16 -1
- package/source/components/form/tree-select.mjs +8 -36
- package/source/components/host/stylesheet/call-button.mjs +1 -1
- package/source/components/host/stylesheet/host.mjs +1 -1
- package/source/components/host/stylesheet/overlay.mjs +1 -1
- package/source/components/host/stylesheet/toggle-button.mjs +1 -1
- package/source/components/host/stylesheet/viewer.mjs +1 -1
- package/source/components/layout/popper.mjs +317 -317
- package/source/components/layout/slider.mjs +668 -0
- package/source/components/layout/style/slider.pcss +114 -0
- package/source/components/layout/stylesheet/collapse.mjs +1 -1
- package/source/components/layout/stylesheet/details.mjs +1 -1
- package/source/components/layout/stylesheet/panel.mjs +1 -1
- package/source/components/layout/stylesheet/slider.mjs +31 -0
- package/source/components/layout/stylesheet/tabs.mjs +1 -1
- package/source/components/navigation/stylesheet/table-of-content.mjs +14 -7
- package/source/components/navigation/table-of-content.mjs +22 -17
- package/source/components/notify/stylesheet/message.mjs +1 -1
- package/source/components/stylesheet/color.mjs +13 -6
- package/source/components/stylesheet/mixin/property.mjs +13 -6
- package/source/components/stylesheet/property.mjs +1 -1
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +1 -1
- package/source/components/tree-menu/tree-menu.mjs +23 -5
- package/source/data/buildtree.mjs +63 -63
- package/source/data/datasource/server/restapi.mjs +1 -2
- package/source/data/pathfinder.mjs +22 -19
- package/source/dom/events.mjs +1 -1
- package/source/dom/updater.mjs +771 -759
- package/source/text/generate-range-comparison-expression.mjs +1 -1
- package/source/types/base.mjs +1 -1
- package/source/types/id.mjs +1 -1
- package/source/types/node.mjs +141 -142
- package/source/types/observer.mjs +7 -8
- package/source/types/version.mjs +1 -1
- package/test/cases/data/buildmap.mjs +0 -1
- package/test/cases/data/pathfinder.mjs +2 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +240 -190
@@ -25,7 +25,7 @@ export { generateRangeComparisonExpression };
|
|
25
25
|
* The generateRangeComparisonExpression() function returns a string representation of the comparison expression.
|
26
26
|
*
|
27
27
|
* ## Options
|
28
|
-
* The
|
28
|
+
* The option parameter is an object that can have the following properties:
|
29
29
|
*
|
30
30
|
* urlEncode (boolean, default: false): if set to true, URL encodes the comparison operators.
|
31
31
|
* andOp (string, default: '&&'): the logical AND operator to use in the expression.
|
package/source/types/base.mjs
CHANGED
@@ -22,7 +22,7 @@ export { Base };
|
|
22
22
|
* This class has besides a `toString` which returns the json representation of the object
|
23
23
|
* also a functionality to check if an object is an instance of a class.
|
24
24
|
*
|
25
|
-
*
|
25
|
+
* Therefore, the class has a static method ` [Symbol.hasInstance](that)` which returns true if the object
|
26
26
|
* is an instance of the class.
|
27
27
|
*
|
28
28
|
* @see [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance](developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance)
|
package/source/types/id.mjs
CHANGED
@@ -28,7 +28,7 @@ const internalCounter = new Map();
|
|
28
28
|
* thus, the first id with the prefix `myid` will be `myid1` and the second id `myid2`.
|
29
29
|
* The ids are the same for every call, for example on a web page.
|
30
30
|
*
|
31
|
-
* So the ids can also be used for navigation. you
|
31
|
+
* So the ids can also be used for navigation. you have to take care that the order stays the same.
|
32
32
|
*
|
33
33
|
* As of version 1.6.0 there is the new RandomID. this ID class is continuous from now on.
|
34
34
|
*
|
package/source/types/node.mjs
CHANGED
@@ -12,13 +12,13 @@
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
13
13
|
*/
|
14
14
|
|
15
|
-
import {Base} from "./base.mjs";
|
16
|
-
import {isPrimitive} from "./is.mjs";
|
17
|
-
import {NodeList} from "./nodelist.mjs";
|
18
|
-
import {validateInstance} from "./validate.mjs";
|
19
|
-
import {instanceSymbol} from "../constants.mjs";
|
15
|
+
import { Base } from "./base.mjs";
|
16
|
+
import { isPrimitive } from "./is.mjs";
|
17
|
+
import { NodeList } from "./nodelist.mjs";
|
18
|
+
import { validateInstance } from "./validate.mjs";
|
19
|
+
import { instanceSymbol } from "../constants.mjs";
|
20
20
|
|
21
|
-
export {Node};
|
21
|
+
export { Node };
|
22
22
|
|
23
23
|
/**
|
24
24
|
* @private
|
@@ -43,120 +43,120 @@ const treeStructureSymbol = Symbol("treeStructure");
|
|
43
43
|
* @see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Iteration_protocols
|
44
44
|
*/
|
45
45
|
class Node extends Base {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
46
|
+
/**
|
47
|
+
* @param {*} [value]
|
48
|
+
*/
|
49
|
+
constructor(value) {
|
50
|
+
super();
|
51
|
+
this[internalValueSymbol] = value;
|
52
|
+
|
53
|
+
this[treeStructureSymbol] = {
|
54
|
+
parent: null,
|
55
|
+
childNodes: new NodeList(),
|
56
|
+
level: 0,
|
57
|
+
};
|
58
|
+
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* This method is called by the `instanceof` operator.
|
62
|
+
* @returns {symbol}
|
63
|
+
* @since 2.1.0
|
64
|
+
*/
|
65
|
+
static get [instanceSymbol]() {
|
66
|
+
return Symbol.for("@schukai/monster/types/node");
|
67
|
+
}
|
68
|
+
|
69
|
+
/**
|
70
|
+
* @property {*}
|
71
|
+
*/
|
72
|
+
get value() {
|
73
|
+
return this[internalValueSymbol];
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* @property {*}
|
78
|
+
*/
|
79
|
+
set value(value) {
|
80
|
+
this[internalValueSymbol] = value;
|
81
|
+
}
|
82
|
+
|
83
|
+
/**
|
84
|
+
* @property {Monster.Types.Node|null}
|
85
|
+
*/
|
86
|
+
get parent() {
|
87
|
+
return this[treeStructureSymbol].parent;
|
88
|
+
}
|
89
|
+
|
90
|
+
/**
|
91
|
+
* @property {integer}
|
92
|
+
*/
|
93
|
+
get level() {
|
94
|
+
return this[treeStructureSymbol].level;
|
95
|
+
}
|
96
|
+
|
97
|
+
/**
|
98
|
+
*
|
99
|
+
* @property {NodeList}
|
100
|
+
*/
|
101
|
+
get childNodes() {
|
102
|
+
return this[treeStructureSymbol].childNodes;
|
103
|
+
}
|
104
|
+
|
105
|
+
/**
|
106
|
+
*
|
107
|
+
* @property {NodeList}
|
108
|
+
*/
|
109
|
+
set childNodes(childNodes) {
|
110
|
+
this[treeStructureSymbol].childNodes = validateInstance(
|
111
|
+
childNodes,
|
112
|
+
NodeList,
|
113
|
+
);
|
114
|
+
setChildLevelAndParent.call(this, this, 1, new Set());
|
115
|
+
}
|
116
|
+
|
117
|
+
/**
|
118
|
+
* @return {Monster.Types.Node}
|
119
|
+
* @param {Node} node
|
120
|
+
*/
|
121
|
+
appendChild(node) {
|
122
|
+
this[treeStructureSymbol].childNodes.add(validateInstance(node, Node));
|
123
|
+
node[treeStructureSymbol].parent = this;
|
124
|
+
|
125
|
+
node[treeStructureSymbol].level = this.level + 1;
|
126
|
+
setChildLevelAndParent.call(this, node, 1, new Set());
|
127
|
+
return this;
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* @return {Monster.Types.Node}
|
132
|
+
* @param {Node} node
|
133
|
+
*/
|
134
|
+
removeChild(node) {
|
135
|
+
this[treeStructureSymbol].childNodes.remove(validateInstance(node, Node));
|
136
|
+
node[treeStructureSymbol].parent = null;
|
137
|
+
|
138
|
+
node[treeStructureSymbol].level = 0;
|
139
|
+
setChildLevelAndParent.call(this, node, -1, new Set());
|
140
|
+
return this;
|
141
|
+
}
|
142
|
+
|
143
|
+
/**
|
144
|
+
*
|
145
|
+
* @return {boolean}
|
146
|
+
*/
|
147
|
+
hasChildNodes() {
|
148
|
+
return this[treeStructureSymbol].childNodes.length > 0;
|
149
|
+
}
|
150
|
+
|
151
|
+
/**
|
152
|
+
* @return {Monster.Types.Node}
|
153
|
+
* @param {Node} node
|
154
|
+
*/
|
155
|
+
hasChild(node) {
|
156
|
+
return this[treeStructureSymbol].childNodes.has(
|
157
|
+
validateInstance(node, Node),
|
158
|
+
);
|
159
|
+
}
|
160
160
|
|
161
161
|
/**
|
162
162
|
* @since 1.28.0
|
@@ -192,7 +192,6 @@ class Node extends Base {
|
|
192
192
|
}
|
193
193
|
}
|
194
194
|
|
195
|
-
|
196
195
|
/**
|
197
196
|
* @private
|
198
197
|
* @param {Node} node
|
@@ -201,25 +200,25 @@ class Node extends Base {
|
|
201
200
|
* @return {setChildLevelAndParent}
|
202
201
|
*/
|
203
202
|
function setChildLevelAndParent(node, operand, visitedNodes) {
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
203
|
+
const self = this;
|
204
|
+
|
205
|
+
if (visitedNodes.has(node)) {
|
206
|
+
throw new Error(
|
207
|
+
"the node has already been visited and cannot be traversed again",
|
208
|
+
);
|
209
|
+
}
|
210
|
+
|
211
|
+
visitedNodes.add(node);
|
212
|
+
|
213
|
+
if (node !== this) {
|
214
|
+
node[treeStructureSymbol].parent = this;
|
215
|
+
}
|
216
|
+
|
217
|
+
node[treeStructureSymbol].childNodes.forEach(function (child) {
|
218
|
+
child[treeStructureSymbol].parent = node;
|
219
|
+
child[treeStructureSymbol].level =
|
220
|
+
node[treeStructureSymbol].level + operand;
|
221
|
+
setChildLevelAndParent.call(self, child, operand, visitedNodes);
|
222
|
+
});
|
223
|
+
return this;
|
225
224
|
}
|
@@ -132,17 +132,16 @@ class Observer extends Base {
|
|
132
132
|
update(subject) {
|
133
133
|
const self = this;
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
return;
|
139
|
-
}
|
135
|
+
if (!isObject(subject)) {
|
136
|
+
return Promise.reject("subject must be an object");
|
137
|
+
}
|
140
138
|
|
139
|
+
return new Promise(function (resolve, reject) {
|
141
140
|
self.queue.add(subject);
|
142
141
|
|
143
|
-
|
142
|
+
queueMicrotask(() => {
|
144
143
|
try {
|
145
|
-
// the queue and the `
|
144
|
+
// the queue and the `queueMicrotask` ensure that an object is not
|
146
145
|
// informed of the same change more than once.
|
147
146
|
if (self.queue.isEmpty()) {
|
148
147
|
resolve();
|
@@ -161,7 +160,7 @@ class Observer extends Base {
|
|
161
160
|
} catch (e) {
|
162
161
|
reject(e);
|
163
162
|
}
|
164
|
-
}
|
163
|
+
});
|
165
164
|
});
|
166
165
|
}
|
167
166
|
}
|
package/source/types/version.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED
package/test/web/test.html
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
</head>
|
10
10
|
<body>
|
11
11
|
<div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
12
|
-
<h1 style='margin-bottom: 0.1em;'>Monster 3.73.
|
13
|
-
<div id="lastupdate" style='font-size:0.7em'>last update
|
12
|
+
<h1 style='margin-bottom: 0.1em;'>Monster 3.73.9</h1>
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update So 15. Sep 19:44:25 CEST 2024</div>
|
14
14
|
</div>
|
15
15
|
<div id="mocha-errors"
|
16
16
|
style="color: red;font-weight: bold;display: flex;align-items: center;justify-content: center;flex-direction: column;margin:20px;"></div>
|