@schukai/monster 3.80.0 → 3.80.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/source/components/content/copy.mjs +1 -1
- package/source/components/layout/collapse.mjs +4 -4
- package/source/components/style/space.pcss +1 -1
- package/source/components/tree-menu/dragable-tree-menu.mjs +664 -664
- package/source/components/tree-menu/tree-menu.mjs +1 -24
- package/source/data/datasource/server/restapi/data-fetch-error.mjs +0 -1
- package/source/dom/customcontrol.mjs +0 -25
- package/source/dom/customelement.mjs +1 -9
- package/source/i18n/formatter.mjs +0 -2
- package/source/i18n/locale.mjs +0 -2
- package/source/i18n/provider.mjs +0 -2
- package/source/i18n/translations.mjs +0 -1
- package/source/logging/handler/console.mjs +0 -1
- package/source/logging/handler.mjs +0 -1
- package/source/logging/logger.mjs +2 -11
- package/source/monster.mjs +0 -1
- package/source/net/webconnect/message.mjs +0 -1
- package/source/types/base.mjs +1 -3
- package/source/types/basewithoptions.mjs +1 -2
- package/source/types/nodelist.mjs +0 -1
- package/source/types/noderecursiveiterator.mjs +1 -5
- package/source/types/observablequeue.mjs +0 -4
- package/source/types/observer.mjs +0 -3
- package/source/types/observerlist.mjs +0 -2
- package/source/types/proxyobserver.mjs +0 -2
- package/source/types/queue.mjs +0 -3
- package/source/types/randomid.mjs +0 -1
- package/source/types/regex.mjs +0 -1
- package/source/types/stack.mjs +1 -2
- package/source/types/tokenlist.mjs +0 -2
- package/source/types/typeof.mjs +0 -2
- package/source/types/uniquequeue.mjs +0 -1
- package/source/types/uuid.mjs +1 -2
- package/source/types/version.mjs +2 -5
- package/source/util/processing/callback.mjs +56 -0
- package/source/util/processing.mjs +2 -40
- package/test/web/test.html +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © schukai GmbH and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
|
+
* Node module: @schukai/monster
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
6
|
+
* The full text of the license can be found at: https://www.gnu.org/licenses/agpl-3.0.en.html
|
|
7
|
+
*
|
|
8
|
+
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
|
+
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
+
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
|
11
|
+
*
|
|
12
|
+
* SPDX-License-Identifier: AGPL-3.0
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { internalSymbol } from "../../constants.mjs";
|
|
16
|
+
import { getGlobalFunction } from "../../types/global.mjs";
|
|
17
|
+
import { validateFunction, validateInteger } from "../../types/validate.mjs";
|
|
18
|
+
|
|
19
|
+
export { Callback };
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
class Callback {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param {function} callback
|
|
28
|
+
* @param {int|undefined} time
|
|
29
|
+
* @throws {TypeError} value is not a function
|
|
30
|
+
* @throws {TypeError} value is not an integer
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
constructor(callback, time) {
|
|
34
|
+
this[internalSymbol] = {
|
|
35
|
+
callback: validateFunction(callback),
|
|
36
|
+
time: validateInteger(time ?? 0),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @private
|
|
42
|
+
* @param {*} data
|
|
43
|
+
* @return {Promise}
|
|
44
|
+
*/
|
|
45
|
+
run(data) {
|
|
46
|
+
return new Promise((resolve, reject) => {
|
|
47
|
+
getGlobalFunction("setTimeout")(() => {
|
|
48
|
+
try {
|
|
49
|
+
resolve(this[internalSymbol].callback(data));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
reject(e);
|
|
52
|
+
}
|
|
53
|
+
}, this[internalSymbol].time);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -14,52 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
import { internalSymbol } from "../constants.mjs";
|
|
16
16
|
import { Base } from "../types/base.mjs";
|
|
17
|
-
import { getGlobalFunction } from "../types/global.mjs";
|
|
18
17
|
import { isFunction, isInteger } from "../types/is.mjs";
|
|
19
18
|
import { Queue } from "../types/queue.mjs";
|
|
20
|
-
import {
|
|
19
|
+
import { Callback } from "./processing/callback.mjs";
|
|
21
20
|
|
|
22
21
|
export { Processing };
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
class Callback {
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @param {function} callback
|
|
31
|
-
* @param {int|undefined} time
|
|
32
|
-
* @throws {TypeError} value is not a function
|
|
33
|
-
* @throws {TypeError} value is not an integer
|
|
34
|
-
* @private
|
|
35
|
-
*/
|
|
36
|
-
constructor(callback, time) {
|
|
37
|
-
this[internalSymbol] = {
|
|
38
|
-
callback: validateFunction(callback),
|
|
39
|
-
time: validateInteger(time ?? 0),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @private
|
|
45
|
-
* @param {*} data
|
|
46
|
-
* @return {Promise}
|
|
47
|
-
*/
|
|
48
|
-
run(data) {
|
|
49
|
-
return new Promise((resolve, reject) => {
|
|
50
|
-
getGlobalFunction("setTimeout")(() => {
|
|
51
|
-
try {
|
|
52
|
-
resolve(this[internalSymbol].callback(data));
|
|
53
|
-
} catch (e) {
|
|
54
|
-
reject(e);
|
|
55
|
-
}
|
|
56
|
-
}, this[internalSymbol].time);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* This class allows to execute several functions in order.
|
|
24
|
+
* This class allows executing several functions in order.
|
|
63
25
|
*
|
|
64
26
|
* Functions and timeouts can be passed. If a timeout is passed, it applies to all further functions.
|
|
65
27
|
* In the example
|
package/test/web/test.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<body>
|
|
11
11
|
<div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
|
|
12
12
|
<h1 style='margin-bottom: 0.1em;'>Monster 3.79.0</h1>
|
|
13
|
-
<div id="lastupdate" style='font-size:0.7em'>last update So 6. Okt 14:
|
|
13
|
+
<div id="lastupdate" style='font-size:0.7em'>last update So 6. Okt 14:35:17 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>
|