blue-web 1.30.1 → 1.30.3
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/dialog.bundle.js +1 -1
- package/dist/js/dialog.d.ts +1 -0
- package/dist/js/dialog.js +7 -6
- package/dist/js/progress.bundle.js +1 -1
- package/dist/js/progress.js +11 -9
- package/dist/merged.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/dist/style.scss +1 -1
- package/package.json +2 -2
package/dist/js/dialog.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var n={762:(n,e,t)=>{function o(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}t.d(e,{Os:()=>a});const a=()=>o()+o()+"-"+o()+"-"+o()+"-"+o()+"-"+o()+o()+o()},786:(n,e,t)=>{t.d(e,{k:()=>a});const o={Cancel:["Cancel","Abbrechen"],Message:["Message","Nachricht"],Question:["Question","Frage"],Confirm:["Confirm","Bestätigen"],"Toggle menu":["Toggle menu","Menü umschalten"],"Close all":["Close all","Alle schließen"],Error:["Error","Fehler"],Information:["Information","Information"],Loading:["Loading","Laden"],Successful:["Successful","Erfolgreich"]};function a(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return e=e||navigator.language.toLowerCase().indexOf("de")>-1?"de-DE":"en-US",t=t||o,t[n]?e.indexOf("de-")>-1?t[n][1]:t[n][0]:n}}},e={};function t(o){var a=e[o];if(void 0!==a)return a.exports;var l=e[o]={exports:{}};return n[o](l,l.exports,t),l.exports}t.d=(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var o=t(762),a=t(786);async function l(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{title:l=(0,a.k)("verify"===n?"Confirm":"ask"===n?"Question":"Message"),icon:c,switchPrimaryBtn:i=!1,acceptBtnText:r="OK",cancelBtnText:s=(0,a.k)("Cancel"),inputType:d="text",defaultValue:u}="string"==typeof t?JSON.parse(t):t;const m
|
|
1
|
+
(()=>{"use strict";var n={762:(n,e,t)=>{function o(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}t.d(e,{Os:()=>a});const a=()=>o()+o()+"-"+o()+"-"+o()+"-"+o()+"-"+o()+o()+o()},786:(n,e,t)=>{t.d(e,{k:()=>a});const o={Cancel:["Cancel","Abbrechen"],Message:["Message","Nachricht"],Question:["Question","Frage"],Confirm:["Confirm","Bestätigen"],"Toggle menu":["Toggle menu","Menü umschalten"],"Close all":["Close all","Alle schließen"],Error:["Error","Fehler"],Information:["Information","Information"],Loading:["Loading","Laden"],Successful:["Successful","Erfolgreich"]};function a(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return e=e||navigator.language.toLowerCase().indexOf("de")>-1?"de-DE":"en-US",t=t||o,t[n]?e.indexOf("de-")>-1?t[n][1]:t[n][0]:n}}},e={};function t(o){var a=e[o];if(void 0!==a)return a.exports;var l=e[o]={exports:{}};return n[o](l,l.exports,t),l.exports}t.d=(n,e)=>{for(var o in e)t.o(e,o)&&!t.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);var o=t(762),a=t(786);async function l(n,e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{title:l=(0,a.k)("verify"===n?"Confirm":"ask"===n?"Question":"Message"),icon:c,switchPrimaryBtn:i=!1,acceptBtnText:r="OK",cancelBtnText:s=(0,a.k)("Cancel"),inputType:d="text",defaultValue:u,id:m}="string"==typeof t?JSON.parse(t):t;const b=m||(0,o.Os)();return document.getElementById(b)||document.body.insertAdjacentHTML("beforeend",'<dialog class="blue-modal modal" id="'.concat(b,'" aria-labelledby="').concat(b,'-label">\n <div class="modal-dialog">\n <div class="modal-content">\n <form>\n <div class="modal-header">\n ').concat(c?'<div class="me-2">'.concat(c,"</div>"):"",'\n <h1 class="modal-title fs-5" id="').concat(b,'-label">').concat(l,'</h1>\n </div>\n <div class="modal-body">\n ').concat("ask"===n?'<label for="'.concat(b,'-input" class="blue-label">').concat(e,'</label>\n <input\n type="').concat(d,'"\n ').concat(void 0!==u?' value="'.concat(u,'"'):"",'\n id="').concat(b,'-input"\n class="form-control"\n />'):e,'\n </div>\n <div class="modal-footer">\n ').concat("verify"===n||"ask"===n?'<button\n type="button"\n class="btn '.concat(i?"btn-primary":"blue-btn-plain-primary",'"\n onclick="document.getElementById(\'').concat(b,"').close()\"\n >\n ").concat(s,"\n </button>"):"",'\n <button\n type="submit"\n class="btn ').concat(i?"blue-btn-plain-primary":"btn-primary",'"\n >\n ').concat(r,'\n </button>\n </div>\n </form>\n </div>\n </div>\n\n <form method="dialog" class="blue-modal-backdrop">\n <button>').concat(s,"</button>\n </form>\n </dialog>")),new Promise(e=>{var t;const o=document.getElementById(b),a=()=>{const n=document.getElementById(b);n&&n.remove()};null==o||o.showModal(),null==o||o.addEventListener("close",()=>{a(),e(!1)}),null==o||null===(t=o.querySelector(".modal-content > form"))||void 0===t||t.addEventListener("submit",t=>{t.preventDefault(),"ask"===n&&(o.close(),a(),e((null==o?void 0:o.querySelector("input")).value||"")),o.close(),a(),e(!0)})})}window.blueWeb=window.blueWeb||{},window.blueWeb.dialog={ask:async function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await l("ask",n,e)},tell:async function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};await l("tell",n,e)},verify:async function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!0===await l("verify",n,e)}}})();
|
package/dist/js/dialog.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface DialogOptions {
|
|
|
7
7
|
cancelBtnText?: string;
|
|
8
8
|
inputType?: string;
|
|
9
9
|
defaultValue?: string;
|
|
10
|
+
id?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare function ask(text: string, options?: DialogOptions | string): Promise<string | boolean>;
|
|
12
13
|
export declare function tell(text: string, options?: DialogOptions | string): Promise<void>;
|
package/dist/js/dialog.js
CHANGED
|
@@ -21,20 +21,21 @@ async function dialog(dialogType, text) {
|
|
|
21
21
|
acceptBtnText = "OK",
|
|
22
22
|
cancelBtnText = getPhrase("Cancel"),
|
|
23
23
|
inputType = "text",
|
|
24
|
-
defaultValue
|
|
24
|
+
defaultValue,
|
|
25
|
+
id
|
|
25
26
|
} = typeof options === "string" ? JSON.parse(options) : options;
|
|
26
|
-
const
|
|
27
|
+
const _id = id || guid();
|
|
27
28
|
const addToDom = () => {
|
|
28
|
-
document.body.insertAdjacentHTML("beforeend", /* HTML */"<dialog class=\"blue-modal modal\" id=\"".concat(
|
|
29
|
+
document.body.insertAdjacentHTML("beforeend", /* HTML */"<dialog class=\"blue-modal modal\" id=\"".concat(_id, "\" aria-labelledby=\"").concat(_id, "-label\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <form>\n <div class=\"modal-header\">\n ").concat(icon ? /* html */"<div class=\"me-2\">".concat(icon, "</div>") : "", "\n <h1 class=\"modal-title fs-5\" id=\"").concat(_id, "-label\">").concat(title, "</h1>\n </div>\n <div class=\"modal-body\">\n ").concat(dialogType === "ask" ? /* HTML */"<label for=\"".concat(_id, "-input\" class=\"blue-label\">").concat(text, "</label>\n <input\n type=\"").concat(inputType, "\"\n ").concat(defaultValue !== undefined ? " value=\"".concat(defaultValue, "\"") : "", "\n id=\"").concat(_id, "-input\"\n class=\"form-control\"\n />") : text, "\n </div>\n <div class=\"modal-footer\">\n ").concat(dialogType === "verify" || dialogType === "ask" ? /* HTML */"<button\n type=\"button\"\n class=\"btn ".concat(switchPrimaryBtn ? "btn-primary" : "blue-btn-plain-primary", "\"\n onclick=\"document.getElementById('").concat(_id, "').close()\"\n >\n ").concat(cancelBtnText, "\n </button>") : "", "\n <button\n type=\"submit\"\n class=\"btn ").concat(switchPrimaryBtn ? "blue-btn-plain-primary" : "btn-primary", "\"\n >\n ").concat(acceptBtnText, "\n </button>\n </div>\n </form>\n </div>\n </div>\n\n <form method=\"dialog\" class=\"blue-modal-backdrop\">\n <button>").concat(cancelBtnText, "</button>\n </form>\n </dialog>"));
|
|
29
30
|
};
|
|
30
|
-
if (!document.getElementById(
|
|
31
|
+
if (!document.getElementById(_id)) {
|
|
31
32
|
addToDom();
|
|
32
33
|
}
|
|
33
34
|
return new Promise(resolve => {
|
|
34
35
|
var _modalEl$querySelecto;
|
|
35
|
-
const modalEl = document.getElementById(
|
|
36
|
+
const modalEl = document.getElementById(_id);
|
|
36
37
|
const removeFromDom = () => {
|
|
37
|
-
const modalEl = document.getElementById(
|
|
38
|
+
const modalEl = document.getElementById(_id);
|
|
38
39
|
if (modalEl) {
|
|
39
40
|
modalEl.remove();
|
|
40
41
|
}
|
|
@@ -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
package/dist/style.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
2
|
/*!
|
|
3
|
-
* Blue Web v1.30.
|
|
3
|
+
* Blue Web v1.30.3 (https://bruegmann.github.io/blue-web)
|
|
4
4
|
* Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-web/blob/master/LICENSE).
|
|
5
5
|
*/
|
|
6
6
|
:root {
|
package/dist/style.min.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";/*!
|
|
2
|
-
* Blue Web v1.30.
|
|
2
|
+
* Blue Web v1.30.3 (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
|
*/:root{--blue-app-bg:hsl(217,17%,98%);--blue-scrollbar-thumb-color-rgb:255,255,255;--blue-sidebar-width:16.563rem;--blue-sidebar-color:hsl(217,11%,15%);--blue-theme:var(--theme,hsl(217,17%,98%));--blue-shimmering:0.9;--blue-sidebar-bg:hsl(217,17%,98%);--blue-header-bg:hsl(217,17%,98%);--blue-header-height:3.429rem;--blue-header-color:hsl(217,11%,15%);--blue-action-link-bg-color:var(--blue-theme);--blue-menu-item-indicator-bg:hsl(221,97%,53%);--blue-menu-item-height:calc(var(--bs-btn-border-width,1px) + var(--bs-btn-padding-y,0.375rem) + var(--bs-btn-font-size,1rem) * var(--bs-btn-line-height,1.5) + var(--bs-btn-padding-y,0.375rem) + var(--bs-btn-border-width,1px));--blue-corner-shape:round}[data-bs-theme=dark]{--blue-app-bg:hsl(217,10%,8%);--blue-sidebar-color:#fff;--blue-sidebar-bg:hsl(217,10%,8%);--blue-header-bg:hsl(217,10%,8%);--blue-header-color:#fff;--blue-menu-item-indicator-bg:#fff}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes blAppearUp{from{margin-top:2.5rem}to{margin-top:0}}@keyframes blue-menu-item-dropdown{from{transform:translateY(-50%);opacity:0}}@keyframes enabledBlueAppPage{from{transform:scale(0.98);opacity:0}to{opacity:1}}@keyframes fadeInDown{from{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:none}}@keyframes alert-in{from{transform:scale(0,0);opacity:0.2;transition:0s}}@keyframes circlebounce{0%,100%{transform:scale(0)}50%{transform:scale(1)}}@keyframes scrolling{from{transform:translateX(-100%)}to{transform:translateX(100%)}}/*!
|
|
5
5
|
* Bootstrap v5.3.8 (https://getbootstrap.com/)
|
package/dist/style.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-web",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.3",
|
|
4
4
|
"description": "UI components built on top of Bootstrap 5",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"astro": "^5.16.5",
|
|
52
52
|
"autoprefixer": "^10.3.6",
|
|
53
53
|
"babel-loader": "^8.4.1",
|
|
54
|
-
"blue-react": "^11.3.
|
|
54
|
+
"blue-react": "^11.3.2",
|
|
55
55
|
"blue-themify": "^1.0.0",
|
|
56
56
|
"colorjs.io": "^0.5.2",
|
|
57
57
|
"gh-pages": "^3.1.0",
|