blue-web 1.2.1 → 1.3.1
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 +2 -0
- package/dist/js/dialog.bundle.js.LICENSE.txt +5 -0
- package/dist/js/progress.bundle.js +1 -0
- package/dist/js/progress.d.ts +2 -0
- package/dist/js/progress.js +60 -0
- package/dist/js/shared.bundle.js +0 -0
- package/dist/js/utils.bundle.js +1 -0
- package/dist/style.css +34 -12
- package/dist/style.min.css +3 -3
- package/dist/style.scss +2 -1
- package/dist/styles/_grid-layout.scss +40 -0
- package/dist/styles/_layout.scss +0 -5
- package/dist/styles/_menu-item.scss +5 -0
- package/dist/styles/_sidebar.scss +7 -0
- package/dist/styles/mixins/_sidebar.scss +0 -6
- package/package.json +7 -4
- package/dist/js/modal.bundle.js +0 -2
- package/dist/js/modal.js +0 -55
package/dist/style.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blue Web v1.
|
|
2
|
+
* Blue Web v1.3.1 (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
|
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
@import "./styles/_router";
|
|
26
26
|
@import "./styles/_status";
|
|
27
27
|
@import "./styles/_layout";
|
|
28
|
+
@import "./styles/_grid-layout";
|
|
28
29
|
@import "./styles/menu-item";
|
|
29
30
|
@import "./styles/_sidebar";
|
|
30
31
|
@import "./styles/_search";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// New approach to use the `Layout` component by using CSS `display: grid`.
|
|
2
|
+
// Markup should look something like this:
|
|
3
|
+
// ```html
|
|
4
|
+
// <div class="blue-layout blue-grid-layout">
|
|
5
|
+
// <header class="blue-grid-layout-header"></header>
|
|
6
|
+
// <nav class="blue-grid-layout-side"></nav>
|
|
7
|
+
// <main class="blue-grid-layout-main"></main>
|
|
8
|
+
// </div>
|
|
9
|
+
// ```
|
|
10
|
+
|
|
11
|
+
.blue-grid-layout {
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: 0 auto;
|
|
14
|
+
grid-template-rows: $normal-size;
|
|
15
|
+
height: 100vh;
|
|
16
|
+
height: 100dvh;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (min-width: 600px) {
|
|
20
|
+
.blue-grid-layout {
|
|
21
|
+
grid-template-columns: $normal-size auto;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: 1400px) {
|
|
26
|
+
.blue-grid-layout {
|
|
27
|
+
grid-template-columns: var(--blue-sidebar-width) auto;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.blue-grid-layout-header {
|
|
32
|
+
grid-column: 1 / 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.blue-grid-layout-main {
|
|
36
|
+
overflow: auto;
|
|
37
|
+
--bs-bg-opacity: 1;
|
|
38
|
+
background-color: #{rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity))};
|
|
39
|
+
border-radius: var(--bs-border-radius);
|
|
40
|
+
}
|
package/dist/styles/_layout.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "UI components built on top of Bootstrap 5",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"homepage": "https://bruegmann.github.io/blue-web/v1",
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"start": "react-scripts start",
|
|
16
|
-
"build-docs": "react-scripts build && node indexCssSections.js",
|
|
16
|
+
"build-docs": "react-scripts build && node indexCssSections.js && node indexJsSections.js",
|
|
17
17
|
"build-types": "tsc --declaration --emitDeclarationOnly --declarationDir ./dist/js --noEmit false --project tsconfig.build.json",
|
|
18
18
|
"build": "babel ./src/js --out-dir ./dist/js --extensions \".tsx,.js,.ts\"",
|
|
19
|
+
"build-bundles": "webpack",
|
|
19
20
|
"build-css": "node ./setVersionToStyleScss.js && node-sass ./dist/style.scss ./dist/style.css && npx postcss ./dist/style.css --use autoprefixer -r && npx postcss ./dist/style.css --use postcss-minify -o ./dist/style.min.css",
|
|
20
21
|
"build-neu-css": "node-sass ./dist/neu.scss ./dist/neu.css && npx postcss ./dist/neu.css --use autoprefixer -r && npx postcss ./dist/neu.css --use postcss-minify -o ./dist/neu.min.css",
|
|
21
|
-
"build-release": "npm run build-types && npm run build && npm run build-css",
|
|
22
|
+
"build-release": "npm run build-types && npm run build && npm run build-bundles && npm run build-css",
|
|
22
23
|
"test": "react-scripts test",
|
|
23
24
|
"eject": "react-scripts eject",
|
|
24
25
|
"predeploy": "npm run build-docs",
|
|
@@ -64,7 +65,9 @@
|
|
|
64
65
|
"react-scripts": "^5.0.1",
|
|
65
66
|
"react-syntax-highlighter": "^15.4.3",
|
|
66
67
|
"reactstrap": "^9.0.0-0",
|
|
67
|
-
"typescript": "^4.3.5"
|
|
68
|
+
"typescript": "^4.3.5",
|
|
69
|
+
"webpack": "^5.95.0",
|
|
70
|
+
"webpack-cli": "^5.1.4"
|
|
68
71
|
},
|
|
69
72
|
"eslintConfig": {
|
|
70
73
|
"extends": "react-app"
|
package/dist/js/modal.bundle.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see modal.bundle.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={11:function(t,e,n){t.exports=function(t,e,n,i){"use strict";return class extends n{constructor(e,n){super(),(e=i.getElement(e))&&(this._element=e,this._config=this._getConfig(n),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),e.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,n=!0){i.executeAfterTransition(t,e,n)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(e){return t.get(i.getElement(e),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}}(n(269),n(956),n(105),n(35))},269:function(t){t.exports=function(){"use strict";const t=new Map;return{set(e,n,i){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(n)||0===s.size?s.set(n,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,n)=>t.has(e)&&t.get(e).get(n)||null,remove(e,n){if(!t.has(e))return;const i=t.get(e);i.delete(n),0===i.size&&t.delete(e)}}}()},956:function(t,e,n){t.exports=function(t){"use strict";const e=/[^.]*(?=\..*)\.|.*/,n=/\..*/,i=/::\d+$/,s={};let o=1;const r={mouseenter:"mouseover",mouseleave:"mouseout"},l=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function a(t,e){return e&&`${e}::${o++}`||t.uidEvent||o++}function c(t){const e=a(t);return t.uidEvent=e,s[e]=s[e]||{},s[e]}function u(t,e,n=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===n))}function d(t,e,n){const i="string"==typeof e,s=i?n:e||n;let o=g(t);return l.has(o)||(o=t),[i,s,o]}function h(t,n,i,s,o){if("string"!=typeof n||!t)return;let[l,h,f]=d(n,i,s);if(n in r){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};h=t(h)}const m=c(t),g=m[f]||(m[f]={}),b=u(g,h,l?i:null);if(b)return void(b.oneOff=b.oneOff&&o);const y=a(h,n.replace(e,"")),E=l?function(t,e,n){return function i(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const l of o)if(l===r)return _(s,{delegateTarget:r}),i.oneOff&&p.off(t,s.type,e,n),n.apply(r,[s])}}(t,i,h):function(t,e){return function n(i){return _(i,{delegateTarget:t}),n.oneOff&&p.off(t,i.type,e),e.apply(t,[i])}}(t,h);E.delegationSelector=l?i:null,E.callable=h,E.oneOff=o,E.uidEvent=y,g[y]=E,t.addEventListener(f,E,l)}function f(t,e,n,i,s){const o=u(e[n],i,s);o&&(t.removeEventListener(n,o,Boolean(s)),delete e[n][o.uidEvent])}function m(t,e,n,i){const s=e[n]||{};for(const[o,r]of Object.entries(s))o.includes(i)&&f(t,e,n,r.callable,r.delegationSelector)}function g(t){return t=t.replace(n,""),r[t]||t}const p={on(t,e,n,i){h(t,e,n,i,!1)},one(t,e,n,i){h(t,e,n,i,!0)},off(t,e,n,s){if("string"!=typeof e||!t)return;const[o,r,l]=d(e,n,s),a=l!==e,u=c(t),h=u[l]||{},g=e.startsWith(".");if(void 0===r){if(g)for(const n of Object.keys(u))m(t,u,n,e.slice(1));for(const[n,s]of Object.entries(h)){const o=n.replace(i,"");a&&!e.includes(o)||f(t,u,l,s.callable,s.delegationSelector)}}else{if(!Object.keys(h).length)return;f(t,u,l,r,o?n:null)}},trigger(e,n,i){if("string"!=typeof n||!e)return null;const s=t.getjQuery();let o=null,r=!0,l=!0,a=!1;n!==g(n)&&s&&(o=s.Event(n,i),s(e).trigger(o),r=!o.isPropagationStopped(),l=!o.isImmediatePropagationStopped(),a=o.isDefaultPrevented());const c=_(new Event(n,{bubbles:r,cancelable:!0}),i);return a&&c.preventDefault(),l&&e.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function _(t,e={}){for(const[n,i]of Object.entries(e))try{t[n]=i}catch(e){Object.defineProperty(t,n,{configurable:!0,get:()=>i})}return t}return p}(n(35))},333:function(t){t.exports=function(){"use strict";function t(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function e(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}return{setDataAttribute(t,n,i){t.setAttribute(`data-bs-${e(n)}`,i)},removeDataAttribute(t,n){t.removeAttribute(`data-bs-${e(n)}`)},getDataAttributes(e){if(!e)return{};const n={},i=Object.keys(e.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),n[i]=t(e.dataset[s])}return n},getDataAttribute:(n,i)=>t(n.getAttribute(`data-bs-${e(i)}`))}}()},411:function(t,e,n){t.exports=function(t){"use strict";const e=e=>{let n=e.getAttribute("data-bs-target");if(!n||"#"===n){let t=e.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),n=t&&"#"!==t?t.trim():null}return n?n.split(",").map((e=>t.parseSelector(e))).join(","):null},n={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const n=[];let i=t.parentNode.closest(e);for(;i;)n.push(i),i=i.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const n=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(n,e).filter((e=>!t.isDisabled(e)&&t.isVisible(e)))},getSelectorFromElement(t){const i=e(t);return i&&n.findOne(i)?i:null},getElementFromSelector(t){const i=e(t);return i?n.findOne(i):null},getMultipleElementsFromSelector(t){const i=e(t);return i?n.find(i):[]}};return n}(n(35))},635:function(t,e,n){t.exports=function(t,e,n,i,s,o,r,l){"use strict";const a=".bs.modal",c=`hide${a}`,u=`hidePrevented${a}`,d=`hidden${a}`,h=`show${a}`,f=`shown${a}`,m=`resize${a}`,g=`click.dismiss${a}`,p=`mousedown.dismiss${a}`,_=`keydown.dismiss${a}`,b=`click${a}.data-api`,y="modal-open",E="show",v="modal-static",A={backdrop:!0,focus:!0,keyboard:!0},w={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class T extends t{constructor(t,e){super(t,e),this._dialog=n.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new l,this._addEventListeners()}static get Default(){return A}static get DefaultType(){return w}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||e.trigger(this._element,h,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(y),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(e.trigger(this._element,c).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(E),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){e.off(window,a),e.off(this._dialog,a),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new i({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new o({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const i=n.findOne(".modal-body",this._dialog);i&&(i.scrollTop=0),r.reflow(this._element),this._element.classList.add(E);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,e.trigger(this._element,f,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){e.on(this._element,_,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),e.on(window,m,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),e.on(this._element,p,(t=>{e.one(this._element,g,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(y),this._resetAdjustments(),this._scrollBar.reset(),e.trigger(this._element,d)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(e.trigger(this._element,u).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._element.style.overflowY;"hidden"===n||this._element.classList.contains(v)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(v),this._queueCallback((()=>{this._element.classList.remove(v),this._queueCallback((()=>{this._element.style.overflowY=n}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),n=e>0;if(n&&!t){const t=r.isRTL()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!n&&t){const t=r.isRTL()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const n=T.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===n[t])throw new TypeError(`No method named "${t}"`);n[t](e)}}))}}return e.on(document,b,'[data-bs-toggle="modal"]',(function(t){const i=n.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),e.one(i,h,(t=>{t.defaultPrevented||e.one(i,d,(()=>{r.isVisible(this)&&this.focus()}))}));const s=n.findOne(".modal.show");s&&T.getInstance(s).hide(),T.getOrCreateInstance(i).toggle(this)})),s.enableDismissTrigger(T),r.defineJQueryPlugin(T),T}(n(11),n(956),n(411),n(877),n(248),n(936),n(35),n(673))},877:function(t,e,n){t.exports=function(t,e,n){"use strict";const i="backdrop",s="show",o=`mousedown.bs.${i}`,r={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},l={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};return class extends e{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return r}static get DefaultType(){return l}static get NAME(){return i}show(t){if(!this._config.isVisible)return void n.execute(t);this._append();const e=this._getElement();this._config.isAnimated&&n.reflow(e),e.classList.add(s),this._emulateAnimation((()=>{n.execute(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(s),this._emulateAnimation((()=>{this.dispose(),n.execute(t)}))):n.execute(t)}dispose(){this._isAppended&&(t.off(this._element,o),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=n.getElement(t.rootElement),t}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),t.on(e,o,(()=>{n.execute(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){n.executeAfterTransition(t,this._getElement(),this._config.isAnimated)}}}(n(956),n(105),n(35))},248:function(t,e,n){!function(t,e,n,i){"use strict";t.enableDismissTrigger=(t,s="hide")=>{const o=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;e.on(document,o,`[data-bs-dismiss="${r}"]`,(function(e){if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),i.isDisabled(this))return;const o=n.getElementFromSelector(this)||this.closest(`.${r}`);t.getOrCreateInstance(o)[s]()}))},Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e,n(956),n(411),n(35))},105:function(t,e,n){t.exports=function(t,e){"use strict";return class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(n,i){const s=e.isElement(i)?t.getDataAttribute(i,"config"):{};return{...this.constructor.Default,..."object"==typeof s?s:{},...e.isElement(i)?t.getDataAttributes(i):{},..."object"==typeof n?n:{}}}_typeCheckConfig(t,n=this.constructor.DefaultType){for(const[i,s]of Object.entries(n)){const n=t[i],o=e.isElement(n)?"element":e.toType(n);if(!new RegExp(s).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${s}".`)}}}}(n(333),n(35))},936:function(t,e,n){t.exports=function(t,e,n){"use strict";const i=".bs.focustrap",s=`focusin${i}`,o=`keydown.tab${i}`,r="backward",l={autofocus:!0,trapElement:null},a={autofocus:"boolean",trapElement:"element"};return class extends n{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return l}static get DefaultType(){return a}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),t.off(document,i),t.on(document,s,(t=>this._handleFocusin(t))),t.on(document,o,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,t.off(document,i))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const i=e.focusableChildren(n);0===i.length?n.focus():this._lastTabNavDirection===r?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?r:"forward")}}}(n(956),n(411),n(105))},35:function(t,e){!function(t){"use strict";const e="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),i=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const i=Number.parseFloat(e),s=Number.parseFloat(n);return i||s?(e=e.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(n))):0},s=t=>{t.dispatchEvent(new Event(e))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?r(t.parentNode):null},l=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,a=[],c=t=>{"loading"===document.readyState?(a.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of a)t()})),a.push(t)):t()},u=(t,e=[],n=t)=>"function"==typeof t?t(...e):n;t.defineJQueryPlugin=t=>{c((()=>{const e=l();if(e){const n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}}))},t.execute=u,t.executeAfterTransition=(t,n,o=!0)=>{if(!o)return void u(t);const r=i(n)+5;let l=!1;const a=({target:i})=>{i===n&&(l=!0,n.removeEventListener(e,a),u(t))};n.addEventListener(e,a),setTimeout((()=>{l||s(n)}),r)},t.findShadowRoot=r,t.getElement=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,t.getNextActiveElement=(t,e,n,i)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!n&&i?t[s-1]:t[0]:(o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},t.getTransitionDurationFromElement=i,t.getUID=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},t.getjQuery=l,t.isDisabled=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),t.isElement=o,t.isRTL=()=>"rtl"===document.documentElement.dir,t.isVisible=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const e=t.closest("summary");if(e&&e.parentNode!==n)return!1;if(null===e)return!1}return e},t.noop=()=>{},t.onDOMContentLoaded=c,t.parseSelector=n,t.reflow=t=>{t.offsetHeight},t.toType=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),t.triggerTransitionEnd=s,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}(e)},673:function(t,e,n){t.exports=function(t,e,n){"use strict";const i=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",s=".sticky-top",o="padding-right",r="margin-right";return class{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,o,(e=>e+t)),this._setElementAttributes(i,o,(e=>e+t)),this._setElementAttributes(s,r,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,o),this._resetElementAttributes(i,o),this._resetElementAttributes(s,r)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,n){const i=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+i)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${n(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(e,n){const i=e.style.getPropertyValue(n);i&&t.setDataAttribute(e,n,i)}_resetElementAttributes(e,n){this._applyManipulationCallback(e,(e=>{const i=t.getDataAttribute(e,n);null!==i?(t.removeDataAttribute(e,n),e.style.setProperty(n,i)):e.style.removeProperty(n)}))}_applyManipulationCallback(t,i){if(n.isElement(t))i(t);else for(const n of e.find(t,this._element))i(n)}}}(n(333),n(411),n(35))}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}(()=>{"use strict";n(635)})()})();
|
package/dist/js/modal.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
if (typeof define === "function" && define.amd) {
|
|
3
|
-
define(["exports", "./utils", "./shared", "bootstrap"], factory);
|
|
4
|
-
} else if (typeof exports !== "undefined") {
|
|
5
|
-
factory(exports, require("./utils"), require("./shared"), require("bootstrap"));
|
|
6
|
-
} else {
|
|
7
|
-
var mod = {
|
|
8
|
-
exports: {}
|
|
9
|
-
};
|
|
10
|
-
factory(mod.exports, global.utils, global.shared, global.bootstrap);
|
|
11
|
-
global.modal = mod.exports;
|
|
12
|
-
}
|
|
13
|
-
})(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _utils, _shared, bootstrap) {
|
|
14
|
-
"use strict";
|
|
15
|
-
|
|
16
|
-
Object.defineProperty(_exports, "__esModule", {
|
|
17
|
-
value: true
|
|
18
|
-
});
|
|
19
|
-
_exports.verify = verify;
|
|
20
|
-
bootstrap = _interopRequireWildcard(bootstrap);
|
|
21
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
22
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
-
async function verify(text, options) {
|
|
24
|
-
const id = (0, _utils.guid)();
|
|
25
|
-
const addToDom = () => {
|
|
26
|
-
document.body.insertAdjacentHTML("beforeend", /* html */" <div\nclass=\"modal fade\"\nid=\"".concat(id, "\"\ntabindex=\"-1\"\naria-labelledby=\"").concat(id, "-label\"\naria-hidden=\"true\"\n>\n<div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h1 class=\"modal-title fs-5\" id=\"").concat(id, "-label\">\n ").concat((options === null || options === void 0 ? void 0 : options.title) || (0, _shared.getPhrase)("Message"), "\n </h1>\n <button\n type=\"button\"\n class=\"btn-close\"\n data-bs-dismiss=\"modal\"\n aria-label=\"Close\"\n ></button>\n </div>\n <div class=\"modal-body\">").concat(text, "</div>\n <div class=\"modal-footer\">\n <button\n type=\"button\"\n class=\"btn blue-btn-plain-primary\"\n data-bs-dismiss=\"modal\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n data-role=\"confirm\"\n >\n Confirm\n </button>\n </div>\n </div>\n</div>\n</div>"));
|
|
27
|
-
};
|
|
28
|
-
if (!document.getElementById(id)) {
|
|
29
|
-
addToDom();
|
|
30
|
-
}
|
|
31
|
-
return new Promise(resolve => {
|
|
32
|
-
var _modalEl$querySelecto;
|
|
33
|
-
const modalEl = document.getElementById(id);
|
|
34
|
-
const modal = new bootstrap.Modal(modalEl);
|
|
35
|
-
const removeFromDom = () => {
|
|
36
|
-
const modalEl = document.getElementById(id);
|
|
37
|
-
if (modalEl) {
|
|
38
|
-
modalEl.removeEventListener("hidden.bs.modal", onHidden);
|
|
39
|
-
modalEl.remove();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const onHidden = () => {
|
|
43
|
-
removeFromDom();
|
|
44
|
-
resolve(false);
|
|
45
|
-
};
|
|
46
|
-
modal.show();
|
|
47
|
-
modalEl === null || modalEl === void 0 || modalEl.addEventListener("hidden.bs.modal", onHidden);
|
|
48
|
-
modalEl === null || modalEl === void 0 || (_modalEl$querySelecto = modalEl.querySelector("[data-role=confirm]")) === null || _modalEl$querySelecto === void 0 || _modalEl$querySelecto.addEventListener("click", () => {
|
|
49
|
-
modal.hide();
|
|
50
|
-
removeFromDom();
|
|
51
|
-
resolve(true);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
});
|