blue-web 1.30.2 → 1.31.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/dist/js/layout.bundle.js +1 -1
- package/dist/js/layout.d.ts +31 -1
- package/dist/js/layout.js +155 -5
- package/dist/js/progress.bundle.js +1 -1
- package/dist/js/progress.js +11 -9
- package/dist/merged.scss +55 -1
- package/dist/style.css +45 -2
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +3 -3
- package/dist/style.scss +1 -1
- package/dist/styles/_layout.scss +54 -0
- package/package.json +63 -88
package/dist/js/layout.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={533:(e,t,o)=>{o.d(t,{A:()=>
|
|
1
|
+
(()=>{"use strict";var e={533:(e,t,o)=>{o.d(t,{A:()=>s,T:()=>l});const n=new Map;function l(e){if(!e)return;if(n.has(e)&&s(e),!e.querySelector(".offcanvas"))return;const t=new AbortController;n.set(e,t),window.addEventListener("popstate",()=>null==e?void 0:e.close(),{signal:t.signal}),window.addEventListener("resize",()=>{const t=e.querySelector(".offcanvas");t&&"fixed"!==getComputedStyle(t).position&&(null==e||e.close())},{signal:t.signal});const o=history.pushState;history.pushState=function(){for(var t=arguments.length,n=new Array(t),l=0;l<t;l++)n[l]=arguments[l];o.apply(history,n),null==e||e.close()};const l=history.replaceState;history.replaceState=function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];l.apply(history,o),null==e||e.close()}}function s(e){const t=n.get(e);t&&(t.abort(),n.delete(e))}"undefined"!=typeof window&&(window.blueWeb=window.blueWeb||{},window.blueWeb.modalResponsive={init:l,dispose:s})}},t={};function o(n){var l=t[n];if(void 0!==l)return l.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n=o(533);const l=new Map;function s(e){const t=l.get(e);if(!t)return;const{controller:o,modalEl:s}=t;o.abort(),s&&(0,n.A)(s),l.delete(e)}function i(e,t){t<0?e.splitterPos=0:e.maxPos&&t>e.maxPos?e.splitterPos=e.maxPos:e.splitterPos=t}function r(e,t){const o=localStorage.getItem("blueLayoutInspectorSize"),n=o?Number.parseInt(o,10):NaN;i(t,t.viewSize-(Number.isFinite(n)?n:244)),t.resizable=!0,t.dataset.blueInspectorSize=(t.viewSize-t.splitterPos).toString(),e.dataset.blueSplitterEnabled=""}function a(e,t){i(t,t.maxPos||t.viewSize),t.resizable=!1,delete e.dataset.blueSplitterEnabled}function u(e){const t="string"==typeof e?document.querySelector(e):e;if(!t)return;const o=l.get(t);if(null==o||!o.splitterEl||!o.inspectorEl)return;const{splitterEl:n,inspectorEl:s}=o,i="fixed"===getComputedStyle(s).position?s.open:n.resizable,r=t.dataset.blueInspectorOpen;i?t.dataset.blueInspectorOpen="":delete t.dataset.blueInspectorOpen,r!==t.dataset.blueInspectorOpen&&t.dispatchEvent(new Event("blue-inspector-change"))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"show-modal";const o="string"==typeof e?document.querySelector(e):e;if(!o)return;const n=l.get(o);if(null==n||!n.splitterEl||!n.inspectorEl)return;const{splitterEl:s,inspectorEl:i}=n;"fixed"===getComputedStyle(i).position?"show"===t?i.show():i.showModal():(r(o,s),localStorage.setItem("blueLayoutInspectorEnabled","")),u(o)}function d(e){const t="string"==typeof e?document.querySelector(e):e;if(!t)return;const o=l.get(t);if(null==o||!o.splitterEl||!o.inspectorEl)return;const{splitterEl:n,inspectorEl:s}=o;"fixed"===getComputedStyle(s).position?s.close():(a(t,n),localStorage.removeItem("blueLayoutInspectorEnabled")),u(t)}"undefined"!=typeof window&&(window.blueWeb=window.blueWeb||{},window.blueWeb.layout={init:function(e){if(!e)return;l.has(e)&&s(e);const t=e.querySelector('[data-blue-toggle="layout-side"]'),o=e.querySelector(".blue-layout-side"),c=e.querySelector(".blue-layout-side > dialog"),d=e.querySelector(".blue-layout-main > sp-split-view.blue-layout-splitter"),p=e.querySelector(".blue-layout-inspector");if(!t||!o||!c)return;const g=new AbortController,b={toggleLayoutSideEl:t,layoutSideEl:o,modalEl:c,splitterEl:d,inspectorEl:p,controller:g};return l.set(e,b),null!=localStorage.getItem("blueLayoutSideShrink")&&(o.classList.add("d-lg-none","w-lg-0"),t.setAttribute("aria-expanded","false")),t.addEventListener("click",()=>function(e){const t=l.get(e);if(!t)return;const{layoutSideEl:o,toggleLayoutSideEl:n}=t;if(!o||!n)return;o.classList.toggle("d-lg-none"),o.classList.toggle("w-lg-0");const s=!o.classList.contains("d-lg-none");n.setAttribute("aria-expanded",s.toString()),s?localStorage.removeItem("blueLayoutSideShrink"):localStorage.setItem("blueLayoutSideShrink","")}(e),{signal:g.signal}),d&&p&&((0,n.T)(p),function(e,t){const{splitterEl:o,inspectorEl:n,controller:l}=t;o&&n&&l&&(null!=localStorage.getItem("blueLayoutInspectorEnabled")&&"fixed"!==getComputedStyle(n).position?r(e,o):a(e,o),u(e),window.addEventListener("resize",()=>{o&&(n&&"none"===getComputedStyle(n).display||!o.resizable?(a(e,o),u(e)):o.resizable&&o.dataset.blueInspectorSize&&(i(o,o.viewSize-parseInt(o.dataset.blueInspectorSize)),u(e)))},{signal:l.signal}),o.addEventListener("change",e=>{const t=e.target;let o=t.viewSize-t.splitterPos;o&&(o=Math.round(o),t.dataset.blueInspectorSize=o.toString(),localStorage.setItem("blueLayoutInspectorSize",o.toString()))},{signal:l.signal}),n.addEventListener("close",()=>{u(e)},{signal:l.signal}))}(e,b)),(0,n.T)(c),o.classList.add("with-transition"),b},dispose:s,instances:l,toggleInspector:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"show-modal";const o="string"==typeof e?document.querySelector(e):e;if(!o)return;const n=l.get(o);if(null==n||!n.splitterEl||!n.inspectorEl)return;const{splitterEl:s,inspectorEl:i}=n;("fixed"===getComputedStyle(i).position?i.open:s.resizable)?d(e):c(e,t)},openInspector:c,closeInspector:d})})();
|
package/dist/js/layout.d.ts
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
type SpSplitViewBaseType = HTMLElement & {
|
|
2
|
+
resizable?: boolean;
|
|
3
|
+
collapsible?: boolean;
|
|
4
|
+
splitterPos: number;
|
|
5
|
+
minPos?: number;
|
|
6
|
+
maxPos?: number;
|
|
7
|
+
primaryMin?: string | number | null;
|
|
8
|
+
primaryMax?: string | number | null;
|
|
9
|
+
secondaryMin?: string | number | null;
|
|
10
|
+
viewSize: number;
|
|
11
|
+
};
|
|
12
|
+
export type Instance = {
|
|
13
|
+
toggleLayoutSideEl: Element | null;
|
|
14
|
+
layoutSideEl: Element | null;
|
|
15
|
+
modalEl: HTMLDialogElement | null;
|
|
16
|
+
splitterEl: SpSplitViewBaseType | null;
|
|
17
|
+
inspectorEl: HTMLDialogElement | null;
|
|
18
|
+
controller: AbortController;
|
|
19
|
+
};
|
|
20
|
+
export declare function init(layoutEl: HTMLElement): {
|
|
21
|
+
toggleLayoutSideEl: Element;
|
|
22
|
+
layoutSideEl: Element;
|
|
23
|
+
modalEl: HTMLDialogElement;
|
|
24
|
+
splitterEl: SpSplitViewBaseType | null;
|
|
25
|
+
inspectorEl: HTMLDialogElement | null;
|
|
26
|
+
controller: AbortController;
|
|
27
|
+
} | undefined;
|
|
2
28
|
export declare function dispose(layoutEl: HTMLElement): void;
|
|
29
|
+
export declare function openInspector(layoutTarget: HTMLElement | string, showCommand?: "show-modal" | "show" | undefined): void;
|
|
30
|
+
export declare function closeInspector(layoutTarget: HTMLElement | string): void;
|
|
31
|
+
export declare function toggleInspector(layoutTarget: HTMLElement | string, showCommand?: "show-modal" | "show" | undefined): void;
|
|
32
|
+
export {};
|
package/dist/js/layout.js
CHANGED
|
@@ -8,16 +8,20 @@ export function init(layoutEl) {
|
|
|
8
8
|
const toggleLayoutSideEl = layoutEl.querySelector('[data-blue-toggle="layout-side"]');
|
|
9
9
|
const layoutSideEl = layoutEl.querySelector(".blue-layout-side");
|
|
10
10
|
const modalEl = layoutEl.querySelector(".blue-layout-side > dialog");
|
|
11
|
+
const splitterEl = layoutEl.querySelector(".blue-layout-main > sp-split-view.blue-layout-splitter");
|
|
12
|
+
const inspectorEl = layoutEl.querySelector(".blue-layout-inspector");
|
|
11
13
|
if (!toggleLayoutSideEl || !layoutSideEl || !modalEl) return;
|
|
12
14
|
const controller = new AbortController();
|
|
13
15
|
const instance = {
|
|
14
16
|
toggleLayoutSideEl,
|
|
15
17
|
layoutSideEl,
|
|
16
18
|
modalEl,
|
|
19
|
+
splitterEl,
|
|
20
|
+
inspectorEl,
|
|
17
21
|
controller
|
|
18
22
|
};
|
|
19
23
|
instances.set(layoutEl, instance);
|
|
20
|
-
const entry = localStorage.getItem("
|
|
24
|
+
const entry = localStorage.getItem("blueLayoutSideShrink");
|
|
21
25
|
const shrink = entry != null;
|
|
22
26
|
if (shrink) {
|
|
23
27
|
layoutSideEl.classList.add("d-lg-none", "w-lg-0");
|
|
@@ -26,8 +30,13 @@ export function init(layoutEl) {
|
|
|
26
30
|
toggleLayoutSideEl.addEventListener("click", () => toggleSidebar(layoutEl), {
|
|
27
31
|
signal: controller.signal
|
|
28
32
|
});
|
|
33
|
+
if (splitterEl && inspectorEl) {
|
|
34
|
+
mrInit(inspectorEl);
|
|
35
|
+
initInspector(layoutEl, instance);
|
|
36
|
+
}
|
|
29
37
|
mrInit(modalEl);
|
|
30
38
|
layoutSideEl.classList.add("with-transition");
|
|
39
|
+
return instance;
|
|
31
40
|
}
|
|
32
41
|
export function dispose(layoutEl) {
|
|
33
42
|
const instance = instances.get(layoutEl);
|
|
@@ -47,20 +56,161 @@ function toggleSidebar(layoutEl) {
|
|
|
47
56
|
layoutSideEl,
|
|
48
57
|
toggleLayoutSideEl
|
|
49
58
|
} = instance;
|
|
59
|
+
if (!layoutSideEl || !toggleLayoutSideEl) return;
|
|
50
60
|
layoutSideEl.classList.toggle("d-lg-none");
|
|
51
61
|
layoutSideEl.classList.toggle("w-lg-0");
|
|
52
62
|
const expanded = !layoutSideEl.classList.contains("d-lg-none");
|
|
53
|
-
toggleLayoutSideEl.setAttribute("aria-expanded", expanded);
|
|
63
|
+
toggleLayoutSideEl.setAttribute("aria-expanded", expanded.toString());
|
|
54
64
|
if (expanded) {
|
|
55
|
-
localStorage.removeItem("
|
|
65
|
+
localStorage.removeItem("blueLayoutSideShrink");
|
|
66
|
+
} else {
|
|
67
|
+
localStorage.setItem("blueLayoutSideShrink", "");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function setSplitterPosition(splitterEl, value) {
|
|
71
|
+
if (value < 0) splitterEl.splitterPos = 0;else if (splitterEl.maxPos && value > splitterEl.maxPos) splitterEl.splitterPos = splitterEl.maxPos;else splitterEl.splitterPos = value;
|
|
72
|
+
}
|
|
73
|
+
function enableSplitter(layoutEl, splitterEl) {
|
|
74
|
+
const inspectorSizeEntry = localStorage.getItem("blueLayoutInspectorSize");
|
|
75
|
+
const inspectorSize = inspectorSizeEntry ? Number.parseInt(inspectorSizeEntry, 10) : NaN;
|
|
76
|
+
setSplitterPosition(splitterEl, splitterEl.viewSize - (Number.isFinite(inspectorSize) ? inspectorSize : 244));
|
|
77
|
+
splitterEl.resizable = true;
|
|
78
|
+
splitterEl.dataset.blueInspectorSize = (splitterEl.viewSize - splitterEl.splitterPos).toString();
|
|
79
|
+
layoutEl.dataset.blueSplitterEnabled = "";
|
|
80
|
+
}
|
|
81
|
+
function disableSplitter(layoutEl, splitterEl) {
|
|
82
|
+
setSplitterPosition(splitterEl, splitterEl.maxPos || splitterEl.viewSize);
|
|
83
|
+
splitterEl.resizable = false;
|
|
84
|
+
delete layoutEl.dataset.blueSplitterEnabled;
|
|
85
|
+
}
|
|
86
|
+
function initInspector(layoutEl, instance) {
|
|
87
|
+
const {
|
|
88
|
+
splitterEl,
|
|
89
|
+
inspectorEl,
|
|
90
|
+
controller
|
|
91
|
+
} = instance;
|
|
92
|
+
if (!splitterEl || !inspectorEl || !controller) return;
|
|
93
|
+
const enabled = localStorage.getItem("blueLayoutInspectorEnabled") != null;
|
|
94
|
+
if (enabled && getComputedStyle(inspectorEl).position !== "fixed") {
|
|
95
|
+
enableSplitter(layoutEl, splitterEl);
|
|
96
|
+
} else {
|
|
97
|
+
disableSplitter(layoutEl, splitterEl);
|
|
98
|
+
}
|
|
99
|
+
updateInspectorState(layoutEl);
|
|
100
|
+
window.addEventListener("resize", () => {
|
|
101
|
+
if (splitterEl) {
|
|
102
|
+
if (inspectorEl && getComputedStyle(inspectorEl).display === "none" || !splitterEl.resizable) {
|
|
103
|
+
disableSplitter(layoutEl, splitterEl);
|
|
104
|
+
updateInspectorState(layoutEl);
|
|
105
|
+
} else if (splitterEl.resizable && splitterEl.dataset.blueInspectorSize) {
|
|
106
|
+
setSplitterPosition(splitterEl, splitterEl.viewSize - parseInt(splitterEl.dataset.blueInspectorSize));
|
|
107
|
+
updateInspectorState(layoutEl);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
signal: controller.signal
|
|
112
|
+
});
|
|
113
|
+
splitterEl.addEventListener("change", e => {
|
|
114
|
+
const splitterEl = e.target;
|
|
115
|
+
let secondPaneSize = splitterEl.viewSize - splitterEl.splitterPos;
|
|
116
|
+
if (secondPaneSize) {
|
|
117
|
+
secondPaneSize = Math.round(secondPaneSize);
|
|
118
|
+
splitterEl.dataset.blueInspectorSize = secondPaneSize.toString();
|
|
119
|
+
localStorage.setItem("blueLayoutInspectorSize", secondPaneSize.toString());
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
signal: controller.signal
|
|
123
|
+
});
|
|
124
|
+
inspectorEl.addEventListener("close", () => {
|
|
125
|
+
updateInspectorState(layoutEl);
|
|
126
|
+
}, {
|
|
127
|
+
signal: controller.signal
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function updateInspectorState(layoutTarget) {
|
|
131
|
+
const layoutEl = typeof layoutTarget === "string" ? document.querySelector(layoutTarget) : layoutTarget;
|
|
132
|
+
if (!layoutEl) return;
|
|
133
|
+
const instance = instances.get(layoutEl);
|
|
134
|
+
if (!(instance !== null && instance !== void 0 && instance.splitterEl) || !instance.inspectorEl) return;
|
|
135
|
+
const {
|
|
136
|
+
splitterEl,
|
|
137
|
+
inspectorEl
|
|
138
|
+
} = instance;
|
|
139
|
+
const isOpen = getComputedStyle(inspectorEl).position === "fixed" ? inspectorEl.open : splitterEl.resizable;
|
|
140
|
+
const previousState = layoutEl.dataset.blueInspectorOpen;
|
|
141
|
+
if (isOpen) layoutEl.dataset.blueInspectorOpen = "";else delete layoutEl.dataset.blueInspectorOpen;
|
|
142
|
+
if (previousState !== layoutEl.dataset.blueInspectorOpen) {
|
|
143
|
+
layoutEl.dispatchEvent(new Event("blue-inspector-change"));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
export function openInspector(layoutTarget) {
|
|
147
|
+
let showCommand = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "show-modal";
|
|
148
|
+
const layoutEl = typeof layoutTarget === "string" ? document.querySelector(layoutTarget) : layoutTarget;
|
|
149
|
+
if (!layoutEl) return;
|
|
150
|
+
const instance = instances.get(layoutEl);
|
|
151
|
+
if (!(instance !== null && instance !== void 0 && instance.splitterEl) || !instance.inspectorEl) return;
|
|
152
|
+
const {
|
|
153
|
+
splitterEl,
|
|
154
|
+
inspectorEl
|
|
155
|
+
} = instance;
|
|
156
|
+
if (getComputedStyle(inspectorEl).position === "fixed") {
|
|
157
|
+
// Is active as dialog
|
|
158
|
+
if (showCommand === "show") {
|
|
159
|
+
inspectorEl.show();
|
|
160
|
+
} else {
|
|
161
|
+
inspectorEl.showModal();
|
|
162
|
+
}
|
|
163
|
+
} else {
|
|
164
|
+
// Is active as split view
|
|
165
|
+
enableSplitter(layoutEl, splitterEl);
|
|
166
|
+
localStorage.setItem("blueLayoutInspectorEnabled", "");
|
|
167
|
+
}
|
|
168
|
+
updateInspectorState(layoutEl);
|
|
169
|
+
}
|
|
170
|
+
export function closeInspector(layoutTarget) {
|
|
171
|
+
const layoutEl = typeof layoutTarget === "string" ? document.querySelector(layoutTarget) : layoutTarget;
|
|
172
|
+
if (!layoutEl) return;
|
|
173
|
+
const instance = instances.get(layoutEl);
|
|
174
|
+
if (!(instance !== null && instance !== void 0 && instance.splitterEl) || !instance.inspectorEl) return;
|
|
175
|
+
const {
|
|
176
|
+
splitterEl,
|
|
177
|
+
inspectorEl
|
|
178
|
+
} = instance;
|
|
179
|
+
if (getComputedStyle(inspectorEl).position === "fixed") {
|
|
180
|
+
// Is active as dialog
|
|
181
|
+
inspectorEl.close();
|
|
182
|
+
} else {
|
|
183
|
+
// Is active as split view
|
|
184
|
+
disableSplitter(layoutEl, splitterEl);
|
|
185
|
+
localStorage.removeItem("blueLayoutInspectorEnabled");
|
|
186
|
+
}
|
|
187
|
+
updateInspectorState(layoutEl);
|
|
188
|
+
}
|
|
189
|
+
export function toggleInspector(layoutTarget) {
|
|
190
|
+
let showCommand = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "show-modal";
|
|
191
|
+
const layoutEl = typeof layoutTarget === "string" ? document.querySelector(layoutTarget) : layoutTarget;
|
|
192
|
+
if (!layoutEl) return;
|
|
193
|
+
const instance = instances.get(layoutEl);
|
|
194
|
+
if (!(instance !== null && instance !== void 0 && instance.splitterEl) || !instance.inspectorEl) return;
|
|
195
|
+
const {
|
|
196
|
+
splitterEl,
|
|
197
|
+
inspectorEl
|
|
198
|
+
} = instance;
|
|
199
|
+
const isOpen = getComputedStyle(inspectorEl).position === "fixed" ? inspectorEl.open : splitterEl.resizable;
|
|
200
|
+
if (isOpen) {
|
|
201
|
+
closeInspector(layoutTarget);
|
|
56
202
|
} else {
|
|
57
|
-
|
|
203
|
+
openInspector(layoutTarget, showCommand);
|
|
58
204
|
}
|
|
59
205
|
}
|
|
60
206
|
if (typeof window !== "undefined") {
|
|
61
207
|
window.blueWeb = window.blueWeb || {};
|
|
62
208
|
window.blueWeb.layout = {
|
|
63
209
|
init,
|
|
64
|
-
dispose
|
|
210
|
+
dispose,
|
|
211
|
+
instances,
|
|
212
|
+
toggleInspector,
|
|
213
|
+
openInspector,
|
|
214
|
+
closeInspector
|
|
65
215
|
};
|
|
66
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";function e(e,
|
|
1
|
+
(()=>{"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach(function(e){r(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function r(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}window.blueWeb=window.blueWeb||{},window.blueWeb.progress={instances:new Map([])},window.blueWeb.progress=t(t({},window.blueWeb.progress),{},{start:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blueWebProgress",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Loading data",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fixed-top";const o="string"==typeof t||t instanceof String?document.querySelector(t.toString()):t;let i=document.getElementById(e);i||(i=document.createElement("div"),i.id=e,i.className="progress ".concat(n," rounded-0"),i.setAttribute("style","--bs-progress-height: 0.25rem"),i.setAttribute("role","progressbar"),i.setAttribute("aria-label",r),i.setAttribute("aria-valuemin","0"),i.setAttribute("aria-valuemax","100"),i.innerHTML='<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 0%"></div>',o.appendChild(i));const s=i.querySelector(".progress-bar");if(s){window.blueWeb.progress.instances.set(e,0);var a=setInterval(function(){var t;let r=window.blueWeb.progress.instances.get(e);r+=Math.random()*(r<90?5:.1),r=Math.min(r,99),window.blueWeb.progress.instances.set(e,r),s.style.width=r+"%",null===(t=i)||void 0===t||t.setAttribute("aria-valuenow",Math.round(r).toString()),r>=100&&clearInterval(a)},200)}},stop:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"blueWebProgress";const t=document.getElementById(e);t&&(window.blueWeb.progress.instances.set(e,100),setTimeout(()=>{t.remove()},500))}}),window.blueWeb.progress})();
|
package/dist/js/progress.js
CHANGED
|
@@ -5,7 +5,7 @@ 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
|
-
|
|
8
|
+
instances: new Map([])
|
|
9
9
|
};
|
|
10
10
|
window.blueWeb.progress = _objectSpread(_objectSpread({}, window.blueWeb.progress), {}, {
|
|
11
11
|
start: function () {
|
|
@@ -29,20 +29,22 @@ window.blueWeb.progress = _objectSpread(_objectSpread({}, window.blueWeb.progres
|
|
|
29
29
|
}
|
|
30
30
|
const progressBar = progressEl.querySelector(".progress-bar");
|
|
31
31
|
if (!progressBar) return;
|
|
32
|
-
window.blueWeb.progress.
|
|
32
|
+
window.blueWeb.progress.instances.set(id, 0);
|
|
33
33
|
var interval = setInterval(function () {
|
|
34
34
|
var _progressEl;
|
|
35
|
+
let progress = window.blueWeb.progress.instances.get(id);
|
|
35
36
|
// Simuliere einen natürlichen Anstieg
|
|
36
|
-
var increment = Math.random() * (
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
var increment = Math.random() * (progress < 90 ? 5 : 0.1); // Zufälliger Anstieg zwischen 0 und 5
|
|
38
|
+
progress += increment;
|
|
39
|
+
progress = Math.min(progress, 99); // Fortschritt darf nicht über 100% gehen
|
|
40
|
+
window.blueWeb.progress.instances.set(id, progress);
|
|
39
41
|
|
|
40
42
|
// Aktualisiere die Progressbar
|
|
41
|
-
progressBar.style.width =
|
|
42
|
-
(_progressEl = progressEl) === null || _progressEl === void 0 || _progressEl.setAttribute("aria-valuenow", Math.round(
|
|
43
|
+
progressBar.style.width = progress + "%";
|
|
44
|
+
(_progressEl = progressEl) === null || _progressEl === void 0 || _progressEl.setAttribute("aria-valuenow", Math.round(progress).toString());
|
|
43
45
|
|
|
44
46
|
// Stoppe das Intervall, wenn 100% erreicht sind
|
|
45
|
-
if (
|
|
47
|
+
if (progress >= 100) {
|
|
46
48
|
clearInterval(interval);
|
|
47
49
|
}
|
|
48
50
|
}, 200); // Update alle 200ms
|
|
@@ -51,7 +53,7 @@ window.blueWeb.progress = _objectSpread(_objectSpread({}, window.blueWeb.progres
|
|
|
51
53
|
let id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "blueWebProgress";
|
|
52
54
|
const progressEl = document.getElementById(id);
|
|
53
55
|
if (!progressEl) return;
|
|
54
|
-
window.blueWeb.progress.
|
|
56
|
+
window.blueWeb.progress.instances.set(id, 100);
|
|
55
57
|
setTimeout(() => {
|
|
56
58
|
progressEl.remove();
|
|
57
59
|
}, 500);
|
package/dist/merged.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blue Web v1.
|
|
2
|
+
* Blue Web v1.31.0 (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
|
|
|
@@ -12126,6 +12126,60 @@ dialog.blue-modal:has(.offcanvas-start) {
|
|
|
12126
12126
|
}
|
|
12127
12127
|
}
|
|
12128
12128
|
|
|
12129
|
+
.blue-layout-splitter {
|
|
12130
|
+
height: 100%;
|
|
12131
|
+
|
|
12132
|
+
// Set styles for sp-split-view
|
|
12133
|
+
&:is(sp-split-view) {
|
|
12134
|
+
--mod-splitview-handle-background-color: transparent;
|
|
12135
|
+
--mod-splitview-handle-background-color-down: var(--bs-primary-text-emphasis);
|
|
12136
|
+
--mod-splitview-handle-background-color-hover: var(--bs-gray-400);
|
|
12137
|
+
--mod-splitview-handle-background-color-key-focus: var(--bs-gray-300);
|
|
12138
|
+
--mod-splitview-handle-background-color-mouse-focus: var(--bs-gray-300);
|
|
12139
|
+
--mod-splitview-handle-width: 6px;
|
|
12140
|
+
--mod-splitview-handle-height: 6px;
|
|
12141
|
+
--mod-splitview-gripper-width: 0;
|
|
12142
|
+
--mod-splitview-gripper-border-width-vertical: 0;
|
|
12143
|
+
--mod-splitview-gripper-border-width-horizontal: 0;
|
|
12144
|
+
|
|
12145
|
+
@media (prefers-color-scheme: dark) {
|
|
12146
|
+
& {
|
|
12147
|
+
--mod-splitview-handle-background-color: transparent;
|
|
12148
|
+
--mod-splitview-handle-background-color-down: var(--bs-primary-text-emphasis);
|
|
12149
|
+
--mod-splitview-handle-background-color-hover: var(--bs-gray-600);
|
|
12150
|
+
--mod-splitview-handle-background-color-key-focus: var(--bs-gray-700);
|
|
12151
|
+
--mod-splitview-handle-background-color-mouse-focus: var(--bs-gray-700);
|
|
12152
|
+
}
|
|
12153
|
+
}
|
|
12154
|
+
|
|
12155
|
+
&:not([resizable]) {
|
|
12156
|
+
& > *:first-child {
|
|
12157
|
+
width: 100%;
|
|
12158
|
+
height: 100%;
|
|
12159
|
+
}
|
|
12160
|
+
& > *:last-child {
|
|
12161
|
+
@include media-breakpoint-up(lg) {
|
|
12162
|
+
display: none;
|
|
12163
|
+
}
|
|
12164
|
+
}
|
|
12165
|
+
}
|
|
12166
|
+
}
|
|
12167
|
+
}
|
|
12168
|
+
|
|
12169
|
+
.blue-layout-inspector {
|
|
12170
|
+
&:not([open]) {
|
|
12171
|
+
& > .offcanvas {
|
|
12172
|
+
--spacing: 0.5rem;
|
|
12173
|
+
width: 100%;
|
|
12174
|
+
height: calc(100% - var(--spacing));
|
|
12175
|
+
|
|
12176
|
+
& > .offcanvas-body {
|
|
12177
|
+
padding-inline: var(--spacing);
|
|
12178
|
+
}
|
|
12179
|
+
}
|
|
12180
|
+
}
|
|
12181
|
+
}
|
|
12182
|
+
|
|
12129
12183
|
// Collapse with details and animated
|
|
12130
12184
|
.blue-collapse {
|
|
12131
12185
|
interpolate-size: allow-keywords;
|