@schukai/monster 4.67.0 → 4.69.0
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 +23 -0
- package/package.json +1 -1
- package/source/components/content/image-editor.mjs +3251 -0
- package/source/components/datatable/filter/date-presets.mjs +18 -6
- package/source/components/datatable/filter/date-time.mjs +7 -4
- package/source/components/datatable/filter/date.mjs +7 -4
- package/source/components/datatable/filter/text-operator.mjs +14 -5
- package/source/components/datatable/filter/time.mjs +7 -4
- package/source/components/files/file-manager.mjs +2464 -0
- package/source/components/files/stylesheet/file-manager.mjs +55 -0
- package/source/components/layout/panel.mjs +16 -1
- package/source/components/layout/split-panel.mjs +8 -0
- package/source/components/layout/tabs.mjs +48 -19
- package/source/monster.mjs +11 -5
- package/source/types/version.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +2 -2
- package/test/web/tests.js +62 -23
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
assembleMethodSymbol,
|
|
18
18
|
registerCustomElement,
|
|
19
19
|
} from "../../../dom/customelement.mjs";
|
|
20
|
+
import { CustomControl } from "../../../dom/customcontrol.mjs";
|
|
20
21
|
import { FilterControlsDefaultsStyleSheet } from "../stylesheet/filter-controls-defaults.mjs";
|
|
21
22
|
import { FilterStyleSheet } from "../stylesheet/filter.mjs";
|
|
22
|
-
import { AbstractBase } from "./abstract-base.mjs";
|
|
23
23
|
import { getLocaleOfDocument } from "../../../dom/locale.mjs";
|
|
24
24
|
|
|
25
25
|
export { DatePresets };
|
|
@@ -32,18 +32,24 @@ export { DatePresets };
|
|
|
32
32
|
const selectElementSymbol = Symbol("selectElement");
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* The
|
|
35
|
+
* The FilterDatePresets component provides pre-defined date ranges.
|
|
36
|
+
*
|
|
37
|
+
* @fragments /fragments/components/datatable/filter/date-presets
|
|
38
|
+
*
|
|
39
|
+
* @example /examples/components/datatable/filter-controls Filter controls
|
|
36
40
|
*
|
|
37
41
|
* @copyright Volker Schukai
|
|
38
42
|
* @summary The FilterDatePresets component provides quick date presets.
|
|
39
43
|
*/
|
|
40
|
-
class DatePresets extends
|
|
44
|
+
class DatePresets extends CustomControl {
|
|
41
45
|
/**
|
|
42
46
|
* This method is called by the `instanceof` operator.
|
|
43
47
|
* @return {symbol}
|
|
44
48
|
*/
|
|
45
49
|
static get [instanceSymbol]() {
|
|
46
|
-
return Symbol.for(
|
|
50
|
+
return Symbol.for(
|
|
51
|
+
"@schukai/monster/components/filter/date-presets@@instance",
|
|
52
|
+
);
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
/**
|
|
@@ -379,8 +385,14 @@ function buildPresets(labels) {
|
|
|
379
385
|
{ label: labels.yesterday, value: yesterday },
|
|
380
386
|
{ label: labels.last7, value: last7 },
|
|
381
387
|
{ label: labels.last30, value: last30 },
|
|
382
|
-
{
|
|
383
|
-
|
|
388
|
+
{
|
|
389
|
+
label: labels.thisMonth,
|
|
390
|
+
value: buildRange(thisMonthStart, thisMonthEnd),
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
label: labels.lastMonth,
|
|
394
|
+
value: buildRange(lastMonthStart, lastMonthEnd),
|
|
395
|
+
},
|
|
384
396
|
];
|
|
385
397
|
}
|
|
386
398
|
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
import { instanceSymbol } from "../../../constants.mjs";
|
|
16
16
|
import {
|
|
17
17
|
assembleMethodSymbol,
|
|
18
|
-
CustomElement,
|
|
19
18
|
registerCustomElement,
|
|
20
19
|
} from "../../../dom/customelement.mjs";
|
|
20
|
+
import { CustomControl } from "../../../dom/customcontrol.mjs";
|
|
21
21
|
import { FilterControlsDefaultsStyleSheet } from "../stylesheet/filter-controls-defaults.mjs";
|
|
22
22
|
import { FilterStyleSheet } from "../stylesheet/filter.mjs";
|
|
23
|
-
import { AbstractBase } from "./abstract-base.mjs";
|
|
24
23
|
|
|
25
24
|
export { DateTimeFilter };
|
|
26
25
|
|
|
@@ -32,12 +31,16 @@ export { DateTimeFilter };
|
|
|
32
31
|
const inputElementSymbol = Symbol("inputElement");
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
|
-
* The
|
|
34
|
+
* The FilterDateTime component is used to filter by a date and time value.
|
|
35
|
+
*
|
|
36
|
+
* @fragments /fragments/components/datatable/filter/date-time
|
|
37
|
+
*
|
|
38
|
+
* @example /examples/components/datatable/filter-controls Filter controls
|
|
36
39
|
*
|
|
37
40
|
* @copyright Volker Schukai
|
|
38
41
|
* @summary The FilterDateTime component is used to show and handle datetime values.
|
|
39
42
|
*/
|
|
40
|
-
class DateTimeFilter extends
|
|
43
|
+
class DateTimeFilter extends CustomControl {
|
|
41
44
|
/**
|
|
42
45
|
* This method is called by the `instanceof` operator.
|
|
43
46
|
* @return {symbol}
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
import { instanceSymbol } from "../../../constants.mjs";
|
|
16
16
|
import {
|
|
17
17
|
assembleMethodSymbol,
|
|
18
|
-
CustomElement,
|
|
19
18
|
registerCustomElement,
|
|
20
19
|
} from "../../../dom/customelement.mjs";
|
|
20
|
+
import { CustomControl } from "../../../dom/customcontrol.mjs";
|
|
21
21
|
import { FilterControlsDefaultsStyleSheet } from "../stylesheet/filter-controls-defaults.mjs";
|
|
22
22
|
import { FilterStyleSheet } from "../stylesheet/filter.mjs";
|
|
23
|
-
import { AbstractBase } from "./abstract-base.mjs";
|
|
24
23
|
|
|
25
24
|
export { DateFilter };
|
|
26
25
|
|
|
@@ -32,12 +31,16 @@ export { DateFilter };
|
|
|
32
31
|
const inputElementSymbol = Symbol("inputElement");
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
|
-
* The
|
|
34
|
+
* The FilterDate component is used to filter by a single date.
|
|
35
|
+
*
|
|
36
|
+
* @fragments /fragments/components/datatable/filter/date
|
|
37
|
+
*
|
|
38
|
+
* @example /examples/components/datatable/filter-controls Filter controls
|
|
36
39
|
*
|
|
37
40
|
* @copyright Volker Schukai
|
|
38
41
|
* @summary The FilterDate component is used to show and handle date values.
|
|
39
42
|
*/
|
|
40
|
-
class DateFilter extends
|
|
43
|
+
class DateFilter extends CustomControl {
|
|
41
44
|
/**
|
|
42
45
|
* This method is called by the `instanceof` operator.
|
|
43
46
|
* @return {symbol}
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
assembleMethodSymbol,
|
|
18
18
|
registerCustomElement,
|
|
19
19
|
} from "../../../dom/customelement.mjs";
|
|
20
|
+
import { CustomControl } from "../../../dom/customcontrol.mjs";
|
|
20
21
|
import { FilterControlsDefaultsStyleSheet } from "../stylesheet/filter-controls-defaults.mjs";
|
|
21
22
|
import { FilterStyleSheet } from "../stylesheet/filter.mjs";
|
|
22
|
-
import { AbstractBase } from "./abstract-base.mjs";
|
|
23
23
|
import { getLocaleOfDocument } from "../../../dom/locale.mjs";
|
|
24
24
|
import "../../form/input-group.mjs";
|
|
25
25
|
|
|
@@ -40,18 +40,24 @@ const operatorElementSymbol = Symbol("operatorElement");
|
|
|
40
40
|
const inputElementSymbol = Symbol("inputElement");
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* The
|
|
43
|
+
* The FilterTextOperator component combines operator and input fields for text filters.
|
|
44
|
+
*
|
|
45
|
+
* @fragments /fragments/components/datatable/filter/text-operator
|
|
46
|
+
*
|
|
47
|
+
* @example /examples/components/datatable/filter-controls Filter controls
|
|
44
48
|
*
|
|
45
49
|
* @copyright Volker Schukai
|
|
46
50
|
* @summary The FilterTextOperator component combines operator and query input.
|
|
47
51
|
*/
|
|
48
|
-
class TextOperator extends
|
|
52
|
+
class TextOperator extends CustomControl {
|
|
49
53
|
/**
|
|
50
54
|
* This method is called by the `instanceof` operator.
|
|
51
55
|
* @return {symbol}
|
|
52
56
|
*/
|
|
53
57
|
static get [instanceSymbol]() {
|
|
54
|
-
return Symbol.for(
|
|
58
|
+
return Symbol.for(
|
|
59
|
+
"@schukai/monster/components/filter/text-operator@@instance",
|
|
60
|
+
);
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
/**
|
|
@@ -353,7 +359,10 @@ function parseValue(value) {
|
|
|
353
359
|
const operators = ["!=", "<>", "^=", "$=", "=", ":"];
|
|
354
360
|
for (const op of operators) {
|
|
355
361
|
if (value.startsWith(op)) {
|
|
356
|
-
return {
|
|
362
|
+
return {
|
|
363
|
+
operator: op === "<>" ? "!=" : op,
|
|
364
|
+
query: value.slice(op.length),
|
|
365
|
+
};
|
|
357
366
|
}
|
|
358
367
|
}
|
|
359
368
|
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
import { instanceSymbol } from "../../../constants.mjs";
|
|
16
16
|
import {
|
|
17
17
|
assembleMethodSymbol,
|
|
18
|
-
CustomElement,
|
|
19
18
|
registerCustomElement,
|
|
20
19
|
} from "../../../dom/customelement.mjs";
|
|
20
|
+
import { CustomControl } from "../../../dom/customcontrol.mjs";
|
|
21
21
|
import { FilterControlsDefaultsStyleSheet } from "../stylesheet/filter-controls-defaults.mjs";
|
|
22
22
|
import { FilterStyleSheet } from "../stylesheet/filter.mjs";
|
|
23
|
-
import { AbstractBase } from "./abstract-base.mjs";
|
|
24
23
|
|
|
25
24
|
export { TimeFilter };
|
|
26
25
|
|
|
@@ -32,12 +31,16 @@ export { TimeFilter };
|
|
|
32
31
|
const inputElementSymbol = Symbol("inputElement");
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
|
-
* The
|
|
34
|
+
* The FilterTime component is used to filter by a time value.
|
|
35
|
+
*
|
|
36
|
+
* @fragments /fragments/components/datatable/filter/time
|
|
37
|
+
*
|
|
38
|
+
* @example /examples/components/datatable/filter-controls Filter controls
|
|
36
39
|
*
|
|
37
40
|
* @copyright Volker Schukai
|
|
38
41
|
* @summary The FilterTime component is used to show and handle time values.
|
|
39
42
|
*/
|
|
40
|
-
class TimeFilter extends
|
|
43
|
+
class TimeFilter extends CustomControl {
|
|
41
44
|
/**
|
|
42
45
|
* This method is called by the `instanceof` operator.
|
|
43
46
|
* @return {symbol}
|