blue-web 1.21.7 → 1.21.8
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/dist/js/progress.bundle.js +1 -1
- package/dist/js/progress.js +63 -32
- package/dist/merged.scss +3 -3
- package/dist/style.css +4 -4
- package/dist/style.min.css +3 -3
- package/dist/style.scss +1 -1
- package/dist/styles/_anchor.scss +1 -1
- package/dist/styles/_layout.scss +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function r(r){for(var o=1;o<arguments.length;o++){var
|
|
1
|
+
(()=>{"use strict";function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function r(r){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?e(Object(s),!0).forEach(function(e){t(r,e,s[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(s,e))})}return r}function t(e,r,t){return(r=function(e){var r=function(e){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}window.blueWeb=window.blueWeb||{},window.blueWeb.progress={progress:0,interval:null,showTimeout:null,isVisible:!1},window.blueWeb.progress=r(r({},window.blueWeb.progress),{},{start:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blueWebProgress",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Loading data",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fixed-top",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:300;const i="string"==typeof r||r instanceof String?document.querySelector(r.toString()):r;window.blueWeb.progress.progress=0,window.blueWeb.progress.isVisible=!1,window.blueWeb.progress.showTimeout=setTimeout(()=>{let r=document.getElementById(e);r||(r=document.createElement("div"),r.id=e,r.className="progress ".concat(o," rounded-0"),r.setAttribute("style","--bs-progress-height: 0.25rem"),r.setAttribute("role","progressbar"),r.setAttribute("aria-label",t),r.setAttribute("aria-valuemin","0"),r.setAttribute("aria-valuemax","100"),r.innerHTML='<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 0%"></div>',i.appendChild(r)),window.blueWeb.progress.isVisible=!0;const s=r.querySelector(".progress-bar");s&&(window.blueWeb.progress.interval=setInterval(function(){var e,t=5*Math.random();window.blueWeb.progress.progress+=t,window.blueWeb.progress.progress=Math.min(window.blueWeb.progress.progress,90),s.style.width=window.blueWeb.progress.progress+"%",null===(e=r)||void 0===e||e.setAttribute("aria-valuenow",Math.round(window.blueWeb.progress.progress).toString()),window.blueWeb.progress.progress>=90&&clearInterval(window.blueWeb.progress.interval)},200))},s)},stop:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blueWebProgress";window.blueWeb.progress.showTimeout&&clearTimeout(window.blueWeb.progress.showTimeout),window.blueWeb.progress.interval&&clearInterval(window.blueWeb.progress.interval);const r=document.getElementById(e);if(!r||!window.blueWeb.progress.isVisible)return void(window.blueWeb.progress.isVisible=!1);const t=r.querySelector(".progress-bar");t&&(window.blueWeb.progress.progress=100,t.style.width="100%",r.setAttribute("aria-valuenow","100"),setTimeout(()=>{r.remove(),window.blueWeb.progress.isVisible=!1},300))}}),window.blueWeb.progress})();
|
package/dist/js/progress.js
CHANGED
|
@@ -5,7 +5,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
window.blueWeb = window.blueWeb || {};
|
|
7
7
|
window.blueWeb.progress = {
|
|
8
|
-
progress: 0
|
|
8
|
+
progress: 0,
|
|
9
|
+
interval: null,
|
|
10
|
+
showTimeout: null,
|
|
11
|
+
isVisible: false
|
|
9
12
|
};
|
|
10
13
|
window.blueWeb.progress = _objectSpread(_objectSpread({}, window.blueWeb.progress), {}, {
|
|
11
14
|
start: function () {
|
|
@@ -13,48 +16,76 @@ window.blueWeb.progress = _objectSpread(_objectSpread({}, window.blueWeb.progres
|
|
|
13
16
|
let parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document.body;
|
|
14
17
|
let ariaLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "Loading data";
|
|
15
18
|
let positionClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "fixed-top";
|
|
19
|
+
let toleranceTime = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 300;
|
|
16
20
|
const parentEl = typeof parent === "string" || parent instanceof String ? document.querySelector(parent.toString()) : parent;
|
|
17
|
-
let progressEl = document.getElementById(id);
|
|
18
|
-
if (!progressEl) {
|
|
19
|
-
progressEl = document.createElement("div");
|
|
20
|
-
progressEl.id = id;
|
|
21
|
-
progressEl.className = "progress ".concat(positionClass, " rounded-0");
|
|
22
|
-
progressEl.setAttribute("style", "--bs-progress-height: 0.25rem");
|
|
23
|
-
progressEl.setAttribute("role", "progressbar");
|
|
24
|
-
progressEl.setAttribute("aria-label", ariaLabel);
|
|
25
|
-
progressEl.setAttribute("aria-valuemin", "0");
|
|
26
|
-
progressEl.setAttribute("aria-valuemax", "100");
|
|
27
|
-
progressEl.innerHTML = /*html*/"<div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 0%\"></div>";
|
|
28
|
-
parentEl.appendChild(progressEl);
|
|
29
|
-
}
|
|
30
|
-
const progressBar = progressEl.querySelector(".progress-bar");
|
|
31
|
-
if (!progressBar) return;
|
|
32
21
|
window.blueWeb.progress.progress = 0;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
window.blueWeb.progress.isVisible = false;
|
|
23
|
+
window.blueWeb.progress.showTimeout = setTimeout(() => {
|
|
24
|
+
let progressEl = document.getElementById(id);
|
|
25
|
+
if (!progressEl) {
|
|
26
|
+
progressEl = document.createElement("div");
|
|
27
|
+
progressEl.id = id;
|
|
28
|
+
progressEl.className = "progress ".concat(positionClass, " rounded-0");
|
|
29
|
+
progressEl.setAttribute("style", "--bs-progress-height: 0.25rem");
|
|
30
|
+
progressEl.setAttribute("role", "progressbar");
|
|
31
|
+
progressEl.setAttribute("aria-label", ariaLabel);
|
|
32
|
+
progressEl.setAttribute("aria-valuemin", "0");
|
|
33
|
+
progressEl.setAttribute("aria-valuemax", "100");
|
|
34
|
+
progressEl.innerHTML = /*html*/"<div class=\"progress-bar progress-bar-striped progress-bar-animated\" style=\"width: 0%\"></div>";
|
|
35
|
+
parentEl.appendChild(progressEl);
|
|
36
|
+
}
|
|
37
|
+
window.blueWeb.progress.isVisible = true;
|
|
38
|
+
const progressBar = progressEl.querySelector(".progress-bar");
|
|
39
|
+
if (!progressBar) return;
|
|
40
|
+
window.blueWeb.progress.interval = setInterval(function () {
|
|
41
|
+
var _progressEl;
|
|
42
|
+
// Simuliere einen natürlichen Anstieg
|
|
43
|
+
var increment = Math.random() * 5; // Zufälliger Anstieg zwischen 0 und 5
|
|
44
|
+
window.blueWeb.progress.progress += increment;
|
|
45
|
+
window.blueWeb.progress.progress = Math.min(window.blueWeb.progress.progress, 90); // Fortschritt darf nicht über 90% gehen während des Ladens
|
|
39
46
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
// Aktualisiere die Progressbar
|
|
48
|
+
progressBar.style.width = window.blueWeb.progress.progress + "%";
|
|
49
|
+
(_progressEl = progressEl) === null || _progressEl === void 0 || _progressEl.setAttribute("aria-valuenow", Math.round(window.blueWeb.progress.progress).toString());
|
|
43
50
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
// Stoppe das Intervall, wenn 90% erreicht sind
|
|
52
|
+
if (window.blueWeb.progress.progress >= 90) {
|
|
53
|
+
clearInterval(window.blueWeb.progress.interval);
|
|
54
|
+
}
|
|
55
|
+
}, 200); // Update alle 200ms
|
|
56
|
+
}, toleranceTime);
|
|
49
57
|
},
|
|
50
58
|
stop: function () {
|
|
51
59
|
let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "blueWebProgress";
|
|
60
|
+
// Stoppe Timeout falls noch nicht abgelaufen
|
|
61
|
+
if (window.blueWeb.progress.showTimeout) {
|
|
62
|
+
clearTimeout(window.blueWeb.progress.showTimeout);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Stoppe das Intervall
|
|
66
|
+
if (window.blueWeb.progress.interval) {
|
|
67
|
+
clearInterval(window.blueWeb.progress.interval);
|
|
68
|
+
}
|
|
52
69
|
const progressEl = document.getElementById(id);
|
|
53
|
-
|
|
70
|
+
|
|
71
|
+
// Wenn der Ladebalken noch nicht sichtbar war, entferne nichts
|
|
72
|
+
if (!progressEl || !window.blueWeb.progress.isVisible) {
|
|
73
|
+
window.blueWeb.progress.isVisible = false;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const progressBar = progressEl.querySelector(".progress-bar");
|
|
77
|
+
if (!progressBar) return;
|
|
78
|
+
|
|
79
|
+
// Setze auf 100%
|
|
54
80
|
window.blueWeb.progress.progress = 100;
|
|
81
|
+
progressBar.style.width = "100%";
|
|
82
|
+
progressEl.setAttribute("aria-valuenow", "100");
|
|
83
|
+
|
|
84
|
+
// Entferne nach kurzer Verzögerung
|
|
55
85
|
setTimeout(() => {
|
|
56
86
|
progressEl.remove();
|
|
57
|
-
|
|
87
|
+
window.blueWeb.progress.isVisible = false;
|
|
88
|
+
}, 300);
|
|
58
89
|
}
|
|
59
90
|
});
|
|
60
91
|
export default window.blueWeb.progress;
|
package/dist/merged.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blue Web v1.21.
|
|
2
|
+
* Blue Web v1.21.8 (https://bruegmann.github.io/blue-web)
|
|
3
3
|
* Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-web/blob/master/LICENSE).
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -11963,7 +11963,7 @@ dialog.blue-modal:has(.offcanvas-start) {
|
|
|
11963
11963
|
}
|
|
11964
11964
|
|
|
11965
11965
|
.blue-layout-body {
|
|
11966
|
-
--spacing: 0.
|
|
11966
|
+
--spacing: 0.5rem;
|
|
11967
11967
|
--blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
|
|
11968
11968
|
--bs-link-hover-color: #{$link-hover-color};
|
|
11969
11969
|
|
|
@@ -12112,7 +12112,7 @@ dialog.blue-modal:has(.offcanvas-start) {
|
|
|
12112
12112
|
}
|
|
12113
12113
|
|
|
12114
12114
|
.blue-anchored {
|
|
12115
|
-
position-try: flip-inline;
|
|
12115
|
+
position-try: flip-inline, flip-block;
|
|
12116
12116
|
position-area: bottom span-right;
|
|
12117
12117
|
position: fixed;
|
|
12118
12118
|
|