@schukai/monster 3.75.0 → 3.77.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +33 -8
- package/package.json +1 -1
- package/source/components/datatable/change-button.mjs +1 -1
- package/source/components/datatable/columnbar.mjs +1 -1
- package/source/components/datatable/dataset.mjs +1 -1
- package/source/components/datatable/datasource/dom.mjs +1 -1
- package/source/components/datatable/datasource/rest.mjs +1 -1
- package/source/components/datatable/datasource.mjs +1 -1
- package/source/components/datatable/datatable.mjs +1 -1
- package/source/components/datatable/filter/date-range.mjs +1 -1
- package/source/components/datatable/filter/input.mjs +1 -1
- package/source/components/datatable/filter/range.mjs +1 -1
- package/source/components/datatable/filter/select.mjs +1 -1
- package/source/components/datatable/filter-button.mjs +1 -1
- package/source/components/datatable/filter.mjs +1 -1
- package/source/components/datatable/pagination.mjs +1 -1
- package/source/components/datatable/save-button.mjs +1 -1
- package/source/components/datatable/status.mjs +1 -1
- package/source/components/form/action-button.mjs +1 -1
- package/source/components/form/api-button.mjs +1 -1
- package/source/components/form/button-bar.mjs +1 -1
- package/source/components/form/button.mjs +1 -1
- package/source/components/form/confirm-button.mjs +1 -1
- package/source/components/form/context-error.mjs +2 -2
- package/source/components/form/context-help.mjs +1 -1
- package/source/components/form/field-set.mjs +31 -44
- package/source/components/form/message-state-button.mjs +1 -1
- package/source/components/form/popper-button.mjs +1 -1
- package/source/components/form/reload.mjs +1 -1
- package/source/components/form/select.mjs +1 -1
- package/source/components/form/shadow-reload.mjs +1 -1
- package/source/components/form/state-button.mjs +1 -1
- package/source/components/form/style/field-set.pcss +164 -70
- package/source/components/form/stylesheet/field-set.mjs +7 -14
- package/source/components/form/template.mjs +1 -1
- package/source/components/form/toggle-switch.mjs +321 -340
- package/source/components/form/tree-select.mjs +1 -1
- package/source/components/host/call-button.mjs +1 -1
- package/source/components/host/collapse.mjs +1 -1
- package/source/components/host/config-manager.mjs +1 -1
- package/source/components/host/host.mjs +1 -1
- package/source/components/host/overlay.mjs +1 -1
- package/source/components/host/toggle-button.mjs +1 -1
- package/source/components/host/viewer.mjs +1 -1
- package/source/components/layout/collapse.mjs +361 -395
- package/source/components/layout/details.mjs +20 -50
- package/source/components/layout/iframe.mjs +358 -0
- package/source/components/layout/panel.mjs +11 -26
- package/source/components/layout/popper.mjs +1 -1
- package/source/components/layout/slider.mjs +12 -12
- package/source/components/layout/split-panel.mjs +8 -40
- package/source/components/layout/style/iframe.pcss +39 -0
- package/source/components/layout/style/panel.pcss +10 -3
- package/source/components/layout/style/split-panel.pcss +2 -0
- package/source/components/layout/stylesheet/iframe.mjs +38 -0
- package/source/components/layout/stylesheet/panel.mjs +1 -1
- package/source/components/layout/tabs.mjs +7 -36
- package/source/components/layout/width-toggle.mjs +26 -39
- package/source/components/navigation/table-of-content.mjs +1 -1
- package/source/components/state/log.mjs +167 -153
- package/source/components/state/state.mjs +9 -33
- package/source/components/stylesheet/form.mjs +6 -13
- package/source/components/tree-menu/tree-menu.mjs +16 -12
- package/source/math/random.mjs +2 -3
- package/source/monster.mjs +2 -1
- package/test/cases/components/form/button.mjs +2 -1
- package/test/cases/components/form/confirm-button.mjs +1 -1
- package/test/cases/components/form/form.mjs +1 -1
- package/test/cases/components/form/reload.mjs +1 -1
- package/test/cases/components/form/select.mjs +1 -1
- package/test/cases/components/form/state-button.mjs +1 -1
- package/test/cases/components/form/template.mjs +1 -1
- package/test/cases/components/form/toggle-switch.mjs +1 -1
- package/test/cases/components/form/tree-select.mjs +1 -1
- 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/components/layout/panel.mjs +1 -1
- package/test/cases/components/layout/slit-panel.mjs +1 -1
- package/test/cases/components/layout/tabs.mjs +1 -1
- package/test/cases/components/notify/message.mjs +1 -1
- package/test/cases/components/notify/notify.mjs +1 -1
- package/test/cases/dom/customcontrol.mjs +1 -1
- package/test/cases/dom/customelement-initfromscripthost.mjs +1 -1
- package/test/cases/dom/customelement.mjs +1 -1
- package/test/cases/dom/resource/data.mjs +1 -1
- package/test/cases/dom/resource/link/stylesheet.mjs +1 -1
- package/test/cases/dom/resource/link.mjs +1 -1
- package/test/cases/dom/resource/script.mjs +1 -1
- package/test/cases/dom/updater.mjs +1 -1
@@ -12,19 +12,19 @@
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
13
13
|
*/
|
14
14
|
|
15
|
-
import {
|
15
|
+
import {instanceSymbol} from "../../constants.mjs";
|
16
16
|
import {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
assembleMethodSymbol,
|
18
|
+
CustomElement,
|
19
|
+
getSlottedElements,
|
20
|
+
registerCustomElement,
|
21
21
|
} from "../../dom/customelement.mjs";
|
22
|
-
import {
|
23
|
-
import {
|
24
|
-
import {
|
22
|
+
import {LogStyleSheet} from "./stylesheet/log.mjs";
|
23
|
+
import {Entry} from "./log/entry.mjs";
|
24
|
+
import {validateInstance} from "../../types/validate.mjs";
|
25
25
|
import "./state.mjs";
|
26
26
|
|
27
|
-
export {
|
27
|
+
export {Log};
|
28
28
|
|
29
29
|
/**
|
30
30
|
* @private
|
@@ -71,118 +71,138 @@ const emptyStateElementSymbol = Symbol("emptyStateElement");
|
|
71
71
|
* @memberOf Monster.Components.State
|
72
72
|
* @summary Log is a control to show a log message.
|
73
73
|
*/
|
74
|
+
|
75
|
+
|
76
|
+
/**
|
77
|
+
* A Log component
|
78
|
+
*
|
79
|
+
* @fragments /fragments/components/layout/collapse/
|
80
|
+
*
|
81
|
+
* @example /examples/components/layout/collapse-simple
|
82
|
+
*
|
83
|
+
* @since 3.74.0
|
84
|
+
* @copyright schukai GmbH
|
85
|
+
* @summary A Log component to show a log message.
|
86
|
+
*/
|
74
87
|
class Log extends CustomElement {
|
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
|
-
|
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
|
-
|
88
|
+
/**
|
89
|
+
* @return {void}
|
90
|
+
*/
|
91
|
+
[assembleMethodSymbol]() {
|
92
|
+
super[assembleMethodSymbol]();
|
93
|
+
|
94
|
+
initControlReferences.call(this);
|
95
|
+
initEventHandler.call(this);
|
96
|
+
}
|
97
|
+
|
98
|
+
/**
|
99
|
+
* This method is called by the `instanceof` operator.
|
100
|
+
* @returns {symbol}
|
101
|
+
*/
|
102
|
+
static get [instanceSymbol]() {
|
103
|
+
return Symbol.for("@schukai/monster/components/state/log@@instance");
|
104
|
+
}
|
105
|
+
|
106
|
+
/**
|
107
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
108
|
+
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
109
|
+
*
|
110
|
+
* The individual configuration values can be found in the table.
|
111
|
+
*
|
112
|
+
* @property {Object} templates Template definitions
|
113
|
+
* @property {string} templates.main Main template
|
114
|
+
* @property {Object} labels Labels
|
115
|
+
* @property {string} labels.nothingToReport Label for empty state
|
116
|
+
*/
|
117
|
+
get defaults() {
|
118
|
+
return Object.assign({}, super.defaults, {
|
119
|
+
templates: {
|
120
|
+
main: getTemplate(),
|
121
|
+
},
|
122
|
+
|
123
|
+
labels: {
|
124
|
+
nothingToReport: "There is nothing to report yet.",
|
125
|
+
},
|
126
|
+
|
127
|
+
entries: [],
|
128
|
+
});
|
129
|
+
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
* @return {void}
|
133
|
+
*/
|
134
|
+
connectedCallback() {
|
135
|
+
super.connectedCallback();
|
136
|
+
|
137
|
+
const slottedElements = getSlottedElements.call(this);
|
138
|
+
if (slottedElements.size > 0) {
|
139
|
+
this[emptyStateElementSymbol].style.display = "none";
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Clear the log
|
145
|
+
*
|
146
|
+
* @return {Log}
|
147
|
+
*/
|
148
|
+
clear() {
|
149
|
+
this[logElementSymbol].innerHTML = "";
|
150
|
+
this[emptyStateElementSymbol].style.display = "block";
|
151
|
+
return this;
|
152
|
+
}
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Add an entry to the log
|
156
|
+
* @param entry
|
157
|
+
* @returns {Log}
|
158
|
+
*/
|
159
|
+
addEntry(entry) {
|
160
|
+
validateInstance(entry, Entry);
|
161
|
+
|
162
|
+
const entries = this.getOption("entries");
|
163
|
+
entries.push(entry);
|
164
|
+
|
165
|
+
/** this field is not used, but triggers a change event */
|
166
|
+
this.setOption("length", entries.length - 1);
|
167
|
+
|
168
|
+
return this;
|
169
|
+
}
|
170
|
+
|
171
|
+
/**
|
172
|
+
* Add a log message
|
173
|
+
* @param message
|
174
|
+
* @param date
|
175
|
+
* @returns {Log}
|
176
|
+
*/
|
177
|
+
addMessage(message, date) {
|
178
|
+
if (!date) {
|
179
|
+
date = new Date();
|
180
|
+
}
|
181
|
+
|
182
|
+
this.addEntry(
|
183
|
+
new Entry({
|
184
|
+
message: message,
|
185
|
+
date: date,
|
186
|
+
}),
|
187
|
+
);
|
188
|
+
|
189
|
+
return this;
|
190
|
+
}
|
191
|
+
|
192
|
+
/**
|
193
|
+
*
|
194
|
+
* @return {string}
|
195
|
+
*/
|
196
|
+
static getTag() {
|
197
|
+
return "monster-log";
|
198
|
+
}
|
199
|
+
|
200
|
+
/**
|
201
|
+
* @return {CSSStyleSheet[]}
|
202
|
+
*/
|
203
|
+
static getCSSStyleSheet() {
|
204
|
+
return [LogStyleSheet];
|
205
|
+
}
|
186
206
|
}
|
187
207
|
|
188
208
|
/**
|
@@ -191,43 +211,37 @@ class Log extends CustomElement {
|
|
191
211
|
* @throws {Error} no shadow-root is defined
|
192
212
|
*/
|
193
213
|
function initControlReferences() {
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
214
|
+
if (!this.shadowRoot) {
|
215
|
+
throw new Error("no shadow-root is defined");
|
216
|
+
}
|
217
|
+
|
218
|
+
this[logElementSymbol] = this.shadowRoot.querySelector(
|
219
|
+
"[data-monster-role=control]",
|
220
|
+
);
|
221
|
+
this[emptyStateElementSymbol] = this.shadowRoot.querySelector(
|
222
|
+
"[data-monster-role=empty-state]",
|
223
|
+
);
|
204
224
|
}
|
205
225
|
|
206
226
|
/**
|
207
227
|
* @private
|
208
228
|
*/
|
209
229
|
function initEventHandler() {
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
// self.toggle();
|
226
|
-
// }
|
227
|
-
//
|
228
|
-
// self[buttonElementSymbol].addEventListener('click', self[buttonEventHandlerSymbol]);
|
229
|
-
|
230
|
-
return this;
|
230
|
+
if (!this.shadowRoot) {
|
231
|
+
throw new Error("no shadow-root is defined");
|
232
|
+
}
|
233
|
+
|
234
|
+
this.shadowRoot.addEventListener("slotchange", (event) => {
|
235
|
+
const slottedElements = getSlottedElements.call(this);
|
236
|
+
|
237
|
+
if (slottedElements.size > 0) {
|
238
|
+
this[emptyStateElementSymbol].style.display = "none";
|
239
|
+
} else {
|
240
|
+
this[emptyStateElementSymbol].style.display = "block";
|
241
|
+
}
|
242
|
+
});
|
243
|
+
|
244
|
+
return this;
|
231
245
|
}
|
232
246
|
|
233
247
|
/**
|
@@ -235,8 +249,8 @@ function initEventHandler() {
|
|
235
249
|
* @return {string}
|
236
250
|
*/
|
237
251
|
function getTemplate() {
|
238
|
-
|
239
|
-
|
252
|
+
// language=HTML
|
253
|
+
return `
|
240
254
|
<template id="entry">
|
241
255
|
<li data-monster-role="entry">
|
242
256
|
<span></span>
|
@@ -29,44 +29,20 @@ export { State };
|
|
29
29
|
export const stateElementSymbol = Symbol("state");
|
30
30
|
|
31
31
|
/**
|
32
|
-
*
|
32
|
+
* A state component
|
33
33
|
*
|
34
|
-
*
|
34
|
+
* @fragments /fragments/components/state/state/
|
35
35
|
*
|
36
|
-
*
|
37
|
-
*
|
38
|
-
* You can create this control either by specifying the HTML tag <monster-state />` directly in the HTML or using
|
39
|
-
* Javascript via the `document.createElement('monster-state');` method.
|
40
|
-
*
|
41
|
-
* ```html
|
42
|
-
* <monster-state></monster-state>
|
43
|
-
* ```
|
44
|
-
*
|
45
|
-
* Or you can create this CustomControl directly in Javascript:
|
46
|
-
*
|
47
|
-
* ```js
|
48
|
-
* import {State} from '@schukai/component-state/source/state.js';
|
49
|
-
* document.createElement('monster-state');
|
50
|
-
* ```
|
51
|
-
*
|
52
|
-
* @externalExample ../../../example/components/state/state.mjs
|
53
|
-
* @startuml state.png
|
54
|
-
* skinparam monochrome true
|
55
|
-
* skinparam shadowing false
|
56
|
-
* HTMLElement <|-- CustomElement
|
57
|
-
* CustomElement <|-- CustomControl
|
58
|
-
* CustomControl <|-- State
|
59
|
-
* @enduml
|
36
|
+
* @example /examples/components/state/state-simple
|
60
37
|
*
|
61
38
|
* @since 1.5.0
|
62
39
|
* @copyright schukai GmbH
|
63
|
-
* @
|
64
|
-
* @summary
|
65
|
-
|
40
|
+
* @summary States tell users that there’s a state. That's it!
|
41
|
+
* @summary The state control is used in the log control, among other things.
|
42
|
+
**/
|
66
43
|
class State extends CustomControl {
|
67
44
|
/**
|
68
|
-
*
|
69
|
-
* @return {Monster.Components.State.State}
|
45
|
+
* @return {void}
|
70
46
|
*/
|
71
47
|
[assembleMethodSymbol]() {
|
72
48
|
super[assembleMethodSymbol]();
|
@@ -77,11 +53,11 @@ class State extends CustomControl {
|
|
77
53
|
* @returns {symbol}
|
78
54
|
*/
|
79
55
|
static get [instanceSymbol]() {
|
80
|
-
return Symbol.for("@schukai/
|
56
|
+
return Symbol.for("@schukai/monster/components/state/state@@instance");
|
81
57
|
}
|
82
58
|
|
83
59
|
/**
|
84
|
-
* To set the options via the
|
60
|
+
* To set the options via the HTML tag, the attribute `data-monster-options` must be used.
|
85
61
|
* @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
|
86
62
|
*
|
87
63
|
* The individual configuration values can be found in the table.
|
@@ -10,10 +10,10 @@
|
|
10
10
|
* For more information about purchasing a commercial license, please contact schukai GmbH.
|
11
11
|
*/
|
12
12
|
|
13
|
-
import {
|
14
|
-
import {
|
13
|
+
import {addAttributeToken} from "../../dom/attributes.mjs";
|
14
|
+
import {ATTRIBUTE_ERRORMESSAGE} from "../../dom/constants.mjs";
|
15
15
|
|
16
|
-
export {
|
16
|
+
export {FormStyleSheet}
|
17
17
|
|
18
18
|
/**
|
19
19
|
* @private
|
@@ -22,17 +22,10 @@ export { FormStyleSheet };
|
|
22
22
|
const FormStyleSheet = new CSSStyleSheet();
|
23
23
|
|
24
24
|
try {
|
25
|
-
|
26
|
-
`
|
25
|
+
FormStyleSheet.insertRule(`
|
27
26
|
@layer form {
|
28
27
|
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}
|
29
|
-
}`,
|
30
|
-
0,
|
31
|
-
);
|
28
|
+
}`, 0);
|
32
29
|
} catch (e) {
|
33
|
-
|
34
|
-
document.getRootNode().querySelector("html"),
|
35
|
-
ATTRIBUTE_ERRORMESSAGE,
|
36
|
-
e + "",
|
37
|
-
);
|
30
|
+
addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
|
38
31
|
}
|
@@ -12,6 +12,7 @@
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
13
13
|
*/
|
14
14
|
|
15
|
+
import {instanceSymbol} from "../../constants.mjs";
|
15
16
|
import { buildTree } from "../../data/buildtree.mjs";
|
16
17
|
import { Datasource } from "../datatable/datasource.mjs";
|
17
18
|
import { addAttributeToken } from "../../dom/attributes.mjs";
|
@@ -100,6 +101,17 @@ const openEntryEventHandlerSymbol = Symbol("openEntryEventHandler");
|
|
100
101
|
* @fires Monster.Components.TreeMenu.event:monster-fetched
|
101
102
|
*/
|
102
103
|
class TreeMenu extends CustomElement {
|
104
|
+
|
105
|
+
/**
|
106
|
+
* This method is called by the `instanceof` operator.
|
107
|
+
* @returns {symbol}
|
108
|
+
*/
|
109
|
+
static get [instanceSymbol]() {
|
110
|
+
return Symbol.for("@schukai/monster/components/tree-menu@@instance");
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
*/
|
103
115
|
constructor() {
|
104
116
|
super();
|
105
117
|
this[preventChangeSymbol] = false;
|
@@ -236,6 +248,10 @@ class TreeMenu extends CustomElement {
|
|
236
248
|
"[data-monster-insert-reference=entries-" + index + "]",
|
237
249
|
);
|
238
250
|
|
251
|
+
if (!currentNode) {
|
252
|
+
return;
|
253
|
+
}
|
254
|
+
|
239
255
|
currentNode.click();
|
240
256
|
|
241
257
|
let intend = parseInt(currentNode.getAttribute(ATTRIBUTE_INTEND));
|
@@ -253,11 +269,6 @@ class TreeMenu extends CustomElement {
|
|
253
269
|
if (i < intend) {
|
254
270
|
if (ref.getAttribute("data-monster-state") !== "open") {
|
255
271
|
ref.click();
|
256
|
-
|
257
|
-
//console.log(ref.getAttribute("data-monster-state") )
|
258
|
-
|
259
|
-
//refSet.add(ref)
|
260
|
-
//console.log(ref)
|
261
272
|
}
|
262
273
|
|
263
274
|
if (i === 0) {
|
@@ -267,13 +278,6 @@ class TreeMenu extends CustomElement {
|
|
267
278
|
}
|
268
279
|
ref = ref.previousElementSibling;
|
269
280
|
}
|
270
|
-
|
271
|
-
// if (refSet.size > 0) {
|
272
|
-
// console.log(refSet)
|
273
|
-
// refSet.forEach((ref) => {
|
274
|
-
// ref.click();
|
275
|
-
// })
|
276
|
-
// }
|
277
281
|
}
|
278
282
|
}
|
279
283
|
}
|
package/source/math/random.mjs
CHANGED
@@ -69,10 +69,9 @@ Math.log2 =
|
|
69
69
|
* @throws {Error} the distance is too small to create a random number.
|
70
70
|
*/
|
71
71
|
function create(min, max) {
|
72
|
-
let crypt;
|
73
72
|
const globalReference = getGlobal();
|
74
73
|
|
75
|
-
crypt =
|
74
|
+
const crypt =
|
76
75
|
globalReference?.["crypto"] ||
|
77
76
|
globalReference?.["msCrypto"] ||
|
78
77
|
globalReference?.["crypto"] ||
|
@@ -99,7 +98,7 @@ function create(min, max) {
|
|
99
98
|
crypt.getRandomValues(byteArray);
|
100
99
|
|
101
100
|
let p = (bytesNeeded - 1) * 8;
|
102
|
-
for (
|
101
|
+
for (let i = 0; i < bytesNeeded; i++) {
|
103
102
|
rval += byteArray[i] * Math.pow(2, p);
|
104
103
|
p -= 8;
|
105
104
|
}
|
package/source/monster.mjs
CHANGED
@@ -19,6 +19,7 @@
|
|
19
19
|
* @author schukai GmbH
|
20
20
|
*/
|
21
21
|
export * from "./components/layout/collapse.mjs";
|
22
|
+
export * from "./components/layout/iframe.mjs";
|
22
23
|
export * from "./components/layout/tabs.mjs";
|
23
24
|
export * from "./components/layout/split-panel.mjs";
|
24
25
|
export * from "./components/layout/popper.mjs";
|
@@ -54,7 +55,7 @@ export * from "./components/form/constants.mjs";
|
|
54
55
|
export * from "./components/notify/message.mjs";
|
55
56
|
export * from "./components/notify/notify.mjs";
|
56
57
|
export * from "./components/notify/constants.mjs";
|
57
|
-
export * from "./components/tree-menu/dragable-tree-menu.mjs";
|
58
|
+
//export * from "./components/tree-menu/dragable-tree-menu.mjs";
|
58
59
|
export * from "./components/tree-menu/tree-menu.mjs";
|
59
60
|
export * from "./components/host/collapse.mjs";
|
60
61
|
export * from "./components/host/config-manager.mjs";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {DataUrl} from "../../../../source/types/dataurl.mjs";
|
2
2
|
|
3
3
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
4
|
-
import chai from
|
4
|
+
import * as chai from 'chai';
|
5
5
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
6
6
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
7
7
|
import {ResizeObserverMock} from "../../../util/resize-observer.mjs";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
2
|
-
import chai from
|
2
|
+
import * as chai from 'chai';
|
3
3
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
4
4
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
5
5
|
import {Datasource} from "../../../../source/data/datasource.mjs";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
2
|
-
import chai from
|
2
|
+
import * as chai from 'chai';
|
3
3
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
4
4
|
import {setupIntersectionObserverMock} from "../../../util/intersection-mock.mjs";
|
5
5
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
2
|
-
import chai from
|
2
|
+
import * as chai from 'chai';
|
3
3
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
4
4
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
5
5
|
import {ResizeObserverMock} from "../../../util/resize-observer.mjs";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
2
|
-
import chai from
|
2
|
+
import * as chai from 'chai';
|
3
3
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
4
4
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
5
5
|
import {ResizeObserverMock} from "../../../util/resize-observer.mjs";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
2
|
-
import chai from
|
2
|
+
import * as chai from 'chai';
|
3
3
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
4
4
|
import {setupIntersectionObserverMock} from "../../../util/intersection-mock.mjs";
|
5
5
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {initJSDOM} from "../../../util/jsdom.mjs";
|
2
2
|
import {getGlobal} from "../../../../source/types/global.mjs";
|
3
|
-
import chai from
|
3
|
+
import * as chai from 'chai';
|
4
4
|
import {chaiDom} from "../../../util/chai-dom.mjs";
|
5
5
|
import {ResizeObserverMock} from "../../../util/resize-observer.mjs";
|
6
6
|
|