blue-web 1.28.1 → 1.29.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/dialog.bundle.js +1 -1
- package/dist/js/dialog.js +4 -4
- package/dist/js/shared.js +2 -2
- package/dist/merged.scss +53 -2
- package/dist/style.css +52 -3
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +3 -3
- package/dist/style.scss +1 -1
- package/dist/styles/_devexpress.scss +52 -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"],
|
|
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=(0,o.Os)();return document.getElementById(m)||document.body.insertAdjacentHTML("beforeend",'<dialog class="blue-modal modal" id="'.concat(m,'" aria-labelledby="').concat(m,'-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(m,'-label">').concat(l,'</h1>\n </div>\n <div class="modal-body">\n ').concat("ask"===n?'<label for="'.concat(m,'-input" class="blue-label">').concat(e,'</label>\n <input\n type="').concat(d,'"\n ').concat(void 0!==u?' value="'.concat(u,'"'):"",'\n id="').concat(m,'-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(m,"').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(m),a=()=>{const n=document.getElementById(m);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.js
CHANGED
|
@@ -15,17 +15,17 @@ export async function verify(text) {
|
|
|
15
15
|
async function dialog(dialogType, text) {
|
|
16
16
|
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
17
17
|
let {
|
|
18
|
-
title = getPhrase("Message"),
|
|
18
|
+
title = getPhrase(dialogType === "verify" ? "Confirm" : dialogType === "ask" ? "Question" : "Message"),
|
|
19
19
|
icon = undefined,
|
|
20
20
|
switchPrimaryBtn = false,
|
|
21
|
-
acceptBtnText =
|
|
22
|
-
cancelBtnText =
|
|
21
|
+
acceptBtnText = "OK",
|
|
22
|
+
cancelBtnText = getPhrase("Cancel"),
|
|
23
23
|
inputType = "text",
|
|
24
24
|
defaultValue
|
|
25
25
|
} = typeof options === "string" ? JSON.parse(options) : options;
|
|
26
26
|
const id = guid();
|
|
27
27
|
const addToDom = () => {
|
|
28
|
-
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\">").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
|
|
28
|
+
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
29
|
};
|
|
30
30
|
if (!document.getElementById(id)) {
|
|
31
31
|
addToDom();
|
package/dist/js/shared.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const phrases = {
|
|
2
2
|
Cancel: ["Cancel", "Abbrechen"],
|
|
3
|
-
Yes: ["Yes", "Ja"],
|
|
4
|
-
No: ["No", "Nein"],
|
|
5
3
|
Message: ["Message", "Nachricht"],
|
|
4
|
+
Question: ["Question", "Frage"],
|
|
5
|
+
Confirm: ["Confirm", "Bestätigen"],
|
|
6
6
|
"Toggle menu": ["Toggle menu", "Menü umschalten"],
|
|
7
7
|
"Close all": ["Close all", "Alle schließen"],
|
|
8
8
|
Error: ["Error", "Fehler"],
|
package/dist/merged.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blue Web v1.
|
|
2
|
+
* Blue Web v1.29.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
|
|
|
@@ -12397,11 +12397,18 @@ dialog.blue-modal:has(.offcanvas-start) {
|
|
|
12397
12397
|
|
|
12398
12398
|
|
|
12399
12399
|
/* Make DevExpress components look more like Bootstrap/Blue */
|
|
12400
|
-
[class^="dxbl-"]:not(.dxbl-grid-expand-button)
|
|
12400
|
+
[class^="dxbl-"]:not(.dxbl-grid-expand-button):not(.dxbl-toolbar-item):not(
|
|
12401
|
+
:is(.dxbl-toolbar-btn-ellipsis > .dxbl-btn)
|
|
12402
|
+
) {
|
|
12401
12403
|
--dxbl-btn-padding-x: 0.75rem !important;
|
|
12402
12404
|
--dxbl-btn-padding-y: 0.375rem !important;
|
|
12403
12405
|
}
|
|
12404
12406
|
|
|
12407
|
+
.dxbl-toolbar-btn-ellipsis > .dxbl-btn {
|
|
12408
|
+
--dxbl-btn-padding-x: 0.475rem !important;
|
|
12409
|
+
--dxbl-btn-padding-y: 0.375rem !important;
|
|
12410
|
+
}
|
|
12411
|
+
|
|
12405
12412
|
[class^="dxbl-"] {
|
|
12406
12413
|
--dxbl-text-edit-border-radius: var(--bs-border-radius) !important;
|
|
12407
12414
|
--dxbl-text-edit-padding-x: 0.75rem !important;
|
|
@@ -12558,6 +12565,50 @@ body.modal-open .dxbl-popup-cell[style="z-index: 1050;"] {
|
|
|
12558
12565
|
border-top-right-radius: var(--bs-border-radius);
|
|
12559
12566
|
}
|
|
12560
12567
|
|
|
12568
|
+
.dxbl-edit-btn-dropdown {
|
|
12569
|
+
padding-inline: 0.25rem !important;
|
|
12570
|
+
}
|
|
12571
|
+
|
|
12572
|
+
@keyframes dxbl-btn-before-in {
|
|
12573
|
+
from {
|
|
12574
|
+
transform: scale(0.9);
|
|
12575
|
+
}
|
|
12576
|
+
to {
|
|
12577
|
+
transform: scale(1);
|
|
12578
|
+
}
|
|
12579
|
+
}
|
|
12580
|
+
|
|
12581
|
+
.dxbl-btn:not(.dxbl-disabled):not(:disabled):not(.dxbl-active):hover::before {
|
|
12582
|
+
animation: dxbl-btn-before-in 0.2s;
|
|
12583
|
+
|
|
12584
|
+
@media (prefers-reduced-motion) {
|
|
12585
|
+
animation: none;
|
|
12586
|
+
}
|
|
12587
|
+
}
|
|
12588
|
+
|
|
12589
|
+
.dxbl-toolbar-dropdown-toggle {
|
|
12590
|
+
width: 0.7rem !important;
|
|
12591
|
+
height: 0.7rem !important;
|
|
12592
|
+
}
|
|
12593
|
+
|
|
12594
|
+
.dxbl-modal-header {
|
|
12595
|
+
--dxbl-popup-header-bg: var(--bs-body-bg);
|
|
12596
|
+
--dxbl-popup-header-color: var(--bs-body-color);
|
|
12597
|
+
}
|
|
12598
|
+
|
|
12599
|
+
.dxbl-modal {
|
|
12600
|
+
--dxbl-popup-border-radius: var(--bs-border-radius-lg);
|
|
12601
|
+
}
|
|
12602
|
+
|
|
12603
|
+
.dxbl-checkbox:not(.dxbl-checkbox-switch):not(.dxbl-checkbox-radio) .dxbl-checkbox-check-element {
|
|
12604
|
+
border-radius: 0.25em;
|
|
12605
|
+
}
|
|
12606
|
+
|
|
12607
|
+
.dxbl-checkbox:not(.dxbl-disabled):not(:disabled):not(.dxbl-readonly) input,
|
|
12608
|
+
.dxbl-checkbox:not(.dxbl-disabled):not(:disabled):not(.dxbl-readonly) label {
|
|
12609
|
+
cursor: initial;
|
|
12610
|
+
}
|
|
12611
|
+
|
|
12561
12612
|
:root {
|
|
12562
12613
|
--bs-font-sans-serif: Inter, #{$font-family-sans-serif};
|
|
12563
12614
|
--blue-font-feature-settings: "liga" 1, "calt" 1, "cv05" 1, "cv07" 1, "tnum" 1, "zero" 1;
|