@schukai/monster 3.102.1 → 3.102.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
CHANGED
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.102.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.102.2"}
|
@@ -2614,63 +2614,63 @@ function initEventHandler() {
|
|
2614
2614
|
|
2615
2615
|
const types = self.getOption("toggleEventType", ["click"]);
|
2616
2616
|
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2621
|
-
|
2622
|
-
|
2623
|
-
|
2624
|
-
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2628
|
-
|
2617
|
+
for (const [, type] of Object.entries(types)) {
|
2618
|
+
self[controlElementSymbol]
|
2619
|
+
.querySelector(`[${ATTRIBUTE_ROLE}="container"]`)
|
2620
|
+
.addEventListener(type, function (event) {
|
2621
|
+
const element = findTargetElementFromEvent(
|
2622
|
+
event,
|
2623
|
+
ATTRIBUTE_ROLE,
|
2624
|
+
"remove-badge",
|
2625
|
+
);
|
2626
|
+
if (element instanceof HTMLElement) {
|
2627
|
+
return;
|
2628
|
+
}
|
2629
2629
|
|
2630
|
-
|
2631
|
-
|
2630
|
+
toggle.call(self);
|
2631
|
+
});
|
2632
2632
|
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2637
|
-
|
2638
|
-
|
2633
|
+
self[controlElementSymbol]
|
2634
|
+
.querySelector(`[${ATTRIBUTE_ROLE}="status-or-remove-badges"]`)
|
2635
|
+
.addEventListener(type, function (event) {
|
2636
|
+
if (self.getOption("disabled", undefined) === true) {
|
2637
|
+
return;
|
2638
|
+
}
|
2639
2639
|
|
2640
|
-
|
2641
|
-
|
2642
|
-
|
2643
|
-
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
2649
|
-
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
|
2654
|
-
|
2655
|
-
|
2656
|
-
|
2657
|
-
|
2658
|
-
|
2640
|
+
const path = event.composedPath();
|
2641
|
+
const element = path?.[0];
|
2642
|
+
if (element instanceof HTMLElement) {
|
2643
|
+
const control = element.closest(
|
2644
|
+
`[${ATTRIBUTE_ROLE}="status-or-remove-badges"]`,
|
2645
|
+
);
|
2646
|
+
if (control instanceof HTMLElement) {
|
2647
|
+
if (control.classList.contains("clear")) {
|
2648
|
+
clearSelection.call(self);
|
2649
|
+
|
2650
|
+
fireCustomEvent(self, "monster-selection-cleared", {});
|
2651
|
+
} else {
|
2652
|
+
const element = findTargetElementFromEvent(
|
2653
|
+
event,
|
2654
|
+
ATTRIBUTE_ROLE,
|
2655
|
+
"remove-badge",
|
2656
|
+
);
|
2657
|
+
if (element instanceof HTMLElement) {
|
2658
|
+
return;
|
2659
|
+
}
|
2660
|
+
|
2661
|
+
toggle.call(self);
|
2659
2662
|
}
|
2660
|
-
|
2661
|
-
toggle.call(self);
|
2662
2663
|
}
|
2663
2664
|
}
|
2664
|
-
}
|
2665
|
-
});
|
2665
|
+
});
|
2666
2666
|
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2667
|
+
// badge, selection
|
2668
|
+
self.addEventListener(type, self[clearOptionEventHandler]);
|
2669
|
+
}
|
2670
2670
|
|
2671
|
-
|
2672
|
-
|
2673
|
-
|
2671
|
+
self.addEventListener("monster-change", self[changeEventHandler]);
|
2672
|
+
self.addEventListener("input", self[inputEventHandler]);
|
2673
|
+
self.addEventListener("keydown", self[keyEventHandler]);
|
2674
2674
|
|
2675
2675
|
return self;
|
2676
2676
|
}
|
@@ -23,6 +23,7 @@ import { Observer } from "../../types/observer.mjs";
|
|
23
23
|
import { SplitPanelStyleSheet } from "./stylesheet/split-panel.mjs";
|
24
24
|
import { instanceSymbol } from "../../constants.mjs";
|
25
25
|
import { internalSymbol } from "../../constants.mjs";
|
26
|
+
import {getDocument} from "../../dom/util.mjs";
|
26
27
|
|
27
28
|
export { SplitPanel, TYPE_VERTICAL, TYPE_HORIZONTAL };
|
28
29
|
|
@@ -69,6 +70,8 @@ const TYPE_HORIZONTAL = "horizontal";
|
|
69
70
|
*
|
70
71
|
* @fragments /fragments/components/layout/split-panel/
|
71
72
|
*
|
73
|
+
* @issue https://localhost.alvine.dev:8440/development/issues/closed/184.html
|
74
|
+
*
|
72
75
|
* @example /examples/components/layout/split-panel-simple
|
73
76
|
*
|
74
77
|
* @since 3.54.0
|
@@ -294,6 +297,8 @@ function initEventHandler() {
|
|
294
297
|
});
|
295
298
|
}
|
296
299
|
|
300
|
+
let userSelectDefault = getDocument().body.style.userSelect;
|
301
|
+
|
297
302
|
this[draggerElementSymbol].addEventListener("mousedown", () => {
|
298
303
|
self[internalSymbol].getSubject().isDragging = true;
|
299
304
|
|
@@ -317,6 +322,8 @@ function initEventHandler() {
|
|
317
322
|
return;
|
318
323
|
}
|
319
324
|
|
325
|
+
getDocument().body.style.userSelect = "none";
|
326
|
+
|
320
327
|
if (self.getOption("splitType") === TYPE_HORIZONTAL) {
|
321
328
|
const containerOffsetTop = self[splitScreenElementSymbol].offsetTop;
|
322
329
|
const topPanel = self[startPanelElementSymbol];
|
@@ -370,6 +377,10 @@ function initEventHandler() {
|
|
370
377
|
|
371
378
|
const dragEventHandler = (e) => {
|
372
379
|
self[internalSymbol].getSubject().isDragging = false;
|
380
|
+
|
381
|
+
|
382
|
+
document.body.style.userSelect = userSelectDefault;
|
383
|
+
|
373
384
|
document.removeEventListener("mousemove", eventListener);
|
374
385
|
document.removeEventListener("mouseup", eventListener);
|
375
386
|
};
|