@schukai/monster 4.95.0 → 4.96.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
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.4","@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":"4.
|
|
1
|
+
{"author":"Volker Schukai","dependencies":{"@floating-ui/dom":"^1.7.4","@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":"4.96.0"}
|
|
@@ -502,25 +502,27 @@ function updateDotsVisibility() {
|
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
504
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
let visibleDots =
|
|
512
|
-
if (
|
|
513
|
-
visibleDots = Math.min(
|
|
505
|
+
const configLimit = enforceMaxVisible
|
|
506
|
+
? configuredMaxVisible
|
|
507
|
+
: Number.POSITIVE_INFINITY;
|
|
508
|
+
const baseLimit = Math.min(maxDots, configLimit, dots.length);
|
|
509
|
+
const needsIndicator = baseLimit < dots.length;
|
|
510
|
+
|
|
511
|
+
let visibleDots = baseLimit;
|
|
512
|
+
if (needsIndicator) {
|
|
513
|
+
visibleDots = Math.min(Math.max(1, maxDots - 1), configLimit, dots.length);
|
|
514
514
|
}
|
|
515
515
|
for (let i = visibleDots; i < dots.length; i++) {
|
|
516
516
|
dots[i].classList.add("dots-overflow-hidden");
|
|
517
517
|
}
|
|
518
518
|
|
|
519
519
|
const hiddenCount = dots.length - visibleDots;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
if (hiddenCount > 0) {
|
|
521
|
+
const overflowIndicator = document.createElement("li");
|
|
522
|
+
overflowIndicator.className = "dots-overflow-indicator";
|
|
523
|
+
overflowIndicator.textContent = `+${hiddenCount}`;
|
|
524
|
+
dotsContainer.appendChild(overflowIndicator);
|
|
525
|
+
}
|
|
524
526
|
} finally {
|
|
525
527
|
this[dotsUpdateInProgressSymbol] = false;
|
|
526
528
|
}
|