@pnotify/confirm
Advanced tools
Comparing version
@@ -6,2 +6,14 @@ # Change Log | ||
# [5.1.0](https://github.com/sciactive/pnotify/compare/v5.0.1...v5.1.0) (2020-04-21) | ||
### Features | ||
* add almost working types to modules ([82c5ce3](https://github.com/sciactive/pnotify/commit/82c5ce391dfc426ab503dd39653373325c3c4c60)) | ||
* complete types for modules and core ([9b04b0f](https://github.com/sciactive/pnotify/commit/9b04b0fc76da7f9efcff7887d85e3cdfbcd66db1)), closes [#366](https://github.com/sciactive/pnotify/issues/366) | ||
## [5.0.1](https://github.com/sciactive/pnotify/compare/v5.0.0...v5.0.1) (2020-04-18) | ||
@@ -8,0 +20,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.PNotifyConfirm=n():t.PNotifyConfirm=n()}(window,(function(){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=1)}([function(t,n,e){},function(t,n,e){"use strict";function o(){}e.r(n);function r(t){return t()}function l(){return Object.create(null)}function i(t){t.forEach(r)}function u(t){return"function"==typeof t}function c(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}new Set;function s(t,n){t.appendChild(n)}function f(t,n,e){t.insertBefore(n,e||null)}function p(t){t.parentNode.removeChild(t)}function a(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function m(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function y(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function h(t,n){(null!=n||t.value)&&(t.value=n)}function g(t,n,e,o){t.style.setProperty(n,e,o?"important":"")}class b{constructor(t,n=null){this.e=a("div"),this.a=n,this.u(t)}m(t,n=null){for(let e=0;e<this.n.length;e+=1)f(t,this.n[e],n);this.t=t}u(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}p(t){this.d(),this.u(t),this.m(this.t,this.a)}d(){this.n.forEach(p)}}let $;function x(t){$=t}const v=[],S=[],C=[],k=[],_=Promise.resolve();let w=!1;function j(){w||(w=!0,_.then(L))}function M(t){C.push(t)}let O=!1;const T=new Set;function L(){if(!O){O=!0;do{for(let t=0;t<v.length;t+=1){const n=v[t];x(n),E(n.$$)}for(v.length=0;S.length;)S.pop()();for(let t=0;t<C.length;t+=1){const n=C[t];T.has(n)||(T.add(n),n())}C.length=0}while(v.length);for(;k.length;)k.pop()();w=!1,O=!1,T.clear()}}function E(t){if(null!==t.fragment){t.update(),i(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(M)}}const P=new Set;function N(t,n){t&&t.i&&(P.delete(t),t.i(n))}"undefined"!=typeof window?window:global;new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);let A;function V(t,n){const e=t.$$;null!==e.fragment&&(i(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function q(t,n,e,c,s,f,p=[-1]){const a=$;x(t);const d=n.props||{},m=t.$$={fragment:null,ctx:null,props:f,update:o,not_equal:s,bound:l(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:l(),dirty:p};let y=!1;var h;m.ctx=e?e(t,d,(n,e,...o)=>{const r=o.length?o[0]:e;return m.ctx&&s(m.ctx[n],m.ctx[n]=r)&&(m.bound[n]&&m.bound[n](r),y&&function(t,n){-1===t.$$.dirty[0]&&(v.push(t),j(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}(t,n)),e}):[],m.update(),y=!0,i(m.before_update),m.fragment=!!c&&c(m.ctx),n.target&&(n.hydrate?m.fragment&&m.fragment.l((h=n.target,Array.from(h.childNodes))):m.fragment&&m.fragment.c(),n.intro&&N(t.$$.fragment),function(t,n,e){const{fragment:o,on_mount:l,on_destroy:c,after_update:s}=t.$$;o&&o.m(n,e),M(()=>{const n=l.map(r).filter(u);c?c.push(...n):i(n),t.$$.on_mount=[]}),s.forEach(M)}(t,n.target,n.anchor),L()),x(a)}"function"==typeof HTMLElement&&(A=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}$destroy(){V(this,1),this.$destroy=o}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(){}});class H{$destroy(){V(this,1),this.$destroy=o}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(){}}e(0);function B(t,n,e){const o=t.slice();return o[21]=n[e],o}function D(t){let n,e,o,r,l,i=t[3]&&K(t),u=t[7],c=[];for(let n=0;n<u.length;n+=1)c[n]=J(B(t,u,n));return{c(){n=a("div"),i&&i.c(),e=d(" "),o=a("div");for(let t=0;t<c.length;t+=1)c[t].c();y(o,"class",r="\n pnotify-action-bar\n "+t[1].getStyle("action-bar")+"\n "),g(o,"justify-content",t[6]),y(n,"class",l="\n pnotify-confirm\n "+t[1].getStyle("text")+"\n "+t[1].getStyle("confirm")+"\n ")},m(r,l){f(r,n,l),i&&i.m(n,null),s(n,e),s(n,o);for(let t=0;t<c.length;t+=1)c[t].m(o,null);t[20](o)},p(t,s){if(t[3]?i?i.p(t,s):(i=K(t),i.c(),i.m(n,e)):i&&(i.d(1),i=null),2178&s){let n;for(u=t[7],n=0;n<u.length;n+=1){const e=B(t,u,n);c[n]?c[n].p(e,s):(c[n]=J(e),c[n].c(),c[n].m(o,null))}for(;n<c.length;n+=1)c[n].d(1);c.length=u.length}2&s&&r!==(r="\n pnotify-action-bar\n "+t[1].getStyle("action-bar")+"\n ")&&y(o,"class",r),64&s&&g(o,"justify-content",t[6]),2&s&&l!==(l="\n pnotify-confirm\n "+t[1].getStyle("text")+"\n "+t[1].getStyle("confirm")+"\n ")&&y(n,"class",l)},d(e){e&&p(n),i&&i.d(),function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(c,e),t[20](null)}}}function K(t){let n,e;function o(t,n){return t[5]?F:z}let r=o(t),l=r(t);return{c(){n=a("div"),l.c(),y(n,"class",e="\n pnotify-prompt-bar\n "+t[1].getStyle("prompt-bar")+"\n ")},m(t,e){f(t,n,e),l.m(n,null)},p(t,i){r===(r=o(t))&&l?l.p(t,i):(l.d(1),l=r(t),l&&(l.c(),l.m(n,null))),2&i&&e!==(e="\n pnotify-prompt-bar\n "+t[1].getStyle("prompt-bar")+"\n ")&&y(n,"class",e)},d(t){t&&p(n),l.d()}}}function z(t){let n,e,o;return{c(){n=a("input"),y(n,"type","text"),y(n,"class",e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")},m(e,r){f(e,n,r),t[17](n),h(n,t[0]),o=[m(n,"keypress",t[12]),m(n,"input",t[18])]},p(t,o){18&o&&e!==(e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")&&y(n,"class",e),1&o&&n.value!==t[0]&&h(n,t[0])},d(e){e&&p(n),t[17](null),i(o)}}}function F(t){let n,e,o;return{c(){n=a("textarea"),y(n,"rows","5"),y(n,"class",e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")},m(e,r){f(e,n,r),t[15](n),h(n,t[0]),o=[m(n,"keypress",t[12]),m(n,"input",t[16])]},p(t,o){18&o&&e!==(e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")&&y(n,"class",e),1&o&&h(n,t[0])},d(e){e&&p(n),t[15](null),i(o)}}}function G(t){let n,e=t[21].text+"";return{c(){n=d(e)},m(t,e){f(t,n,e)},p(t,o){var r,l;128&o&&e!==(e=t[21].text+"")&&(l=""+(l=e),(r=n).data!==l&&(r.data=l))},d(t){t&&p(n)}}}function I(t){let n,e=t[21].text+"";return{c(){n=new b(e,null)},m(t,e){n.m(t,e)},p(t,o){128&o&&e!==(e=t[21].text+"")&&n.p(e)},d(t){t&&n.d()}}}function J(t){let n,e,o;function r(t,n){return t[21].textTrusted?I:G}let l=r(t),i=l(t);function u(...n){return t[19](t[21],...n)}return{c(){n=a("button"),i.c(),y(n,"type","button"),y(n,"class",e="\n pnotify-action-button\n "+t[1].getStyle("btn")+"\n "+(t[21].primary?t[1].getStyle("btn-primary"):t[1].getStyle("btn-secondary"))+"\n "+(t[21].addClass?t[21].addClass:"")+"\n ")},m(t,e){f(t,n,e),i.m(n,null),o=m(n,"click",u)},p(o,u){l===(l=r(t=o))&&i?i.p(t,u):(i.d(1),i=l(t),i&&(i.c(),i.m(n,null))),130&u&&e!==(e="\n pnotify-action-button\n "+t[1].getStyle("btn")+"\n "+(t[21].primary?t[1].getStyle("btn-primary"):t[1].getStyle("btn-secondary"))+"\n "+(t[21].addClass?t[21].addClass:"")+"\n ")&&y(n,"class",e)},d(t){t&&p(n),i.d(),o()}}}function Q(t){let n,e=(t[2]||t[3])&&D(t);return{c(){e&&e.c(),n=d("")},m(t,o){e&&e.m(t,o),f(t,n,o)},p(t,[o]){t[2]||t[3]?e?e.p(t,o):(e=D(t),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},i:o,o:o,d(t){e&&e.d(t),t&&p(n)}}}e.d(n,"position",(function(){return R})),e.d(n,"defaults",(function(){return U}));const R="AppendContent",U={confirm:!1,prompt:!1,promptClass:"",promptValue:"",promptMultiLine:!1,focus:null,align:"flex-end",buttons:[{text:"Ok",textTrusted:!1,addClass:"",primary:!0,promptTrigger:!0,click:(t,n)=>{t.close(),t.fire("pnotify:confirm",{notice:t,value:n})}},{text:"Cancel",textTrusted:!1,addClass:"",click:t=>{t.close(),t.fire("pnotify:cancel",{notice:t})}}]};function W(t,n,e){let o,r,l,{self:i=null}=n,{confirm:u=U.confirm}=n,{prompt:c=U.prompt}=n,{promptClass:s=U.promptClass}=n,{promptValue:f=U.promptValue}=n,{promptMultiLine:p=U.promptMultiLine}=n,{focus:a=U.focus}=n,{align:d=U.align}=n,{buttons:m=U.buttons}=n,y=!1;function h(t,n){t.click&&t.click(i,c?f:null,n)}i.on("pnotify:afterOpen",()=>{e(14,y=!0)});return t.$set=t=>{"self"in t&&e(1,i=t.self),"confirm"in t&&e(2,u=t.confirm),"prompt"in t&&e(3,c=t.prompt),"promptClass"in t&&e(4,s=t.promptClass),"promptValue"in t&&e(0,f=t.promptValue),"promptMultiLine"in t&&e(5,p=t.promptMultiLine),"focus"in t&&e(13,a=t.focus),"align"in t&&e(6,d=t.align),"buttons"in t&&e(7,m=t.buttons)},t.$$.update=()=>{if(26542&t.$$.dirty&&y)if(c&&!1!==a)p?o&&(o.focus(),e(14,y=!1)):r&&(r.focus(),e(14,y=!1));else if(u&&(!0===a||null===a&&!0===i.stack.modal)&&m.length&&l){let t=m.length-1;for(;t>0&&!m[t].promptTrigger;)t--;l.children[t].focus(),e(14,y=!1)}},[f,i,u,c,s,p,d,m,o,r,l,h,function(t){if(13===t.keyCode&&!t.shiftKey){t.preventDefault();const{buttons:n}=this.get();for(let e=0;e<n.length;e++)n[e].promptTrigger&&n[e].click&&n[e].click(i,c?f:null,t)}},a,y,function(t){S[t?"unshift":"push"](()=>{e(8,o=t)})},function(){f=this.value,e(0,f)},function(t){S[t?"unshift":"push"](()=>{e(9,r=t)})},function(){f=this.value,e(0,f)},(t,n)=>h(t,n),function(t){S[t?"unshift":"push"](()=>{e(10,l=t)})}]}n.default=class extends H{constructor(t){super(),q(this,t,W,Q,c,{self:1,confirm:2,prompt:3,promptClass:4,promptValue:0,promptMultiLine:5,focus:13,align:6,buttons:7})}}}])})); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.PNotifyConfirm=n():t.PNotifyConfirm=n()}(window,(function(){return function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=1)}([function(t,n,e){},function(t,n,e){"use strict";function o(){}e.r(n),e.d(n,"position",(function(){return R})),e.d(n,"defaults",(function(){return U}));function r(t){return t()}function i(){return Object.create(null)}function l(t){t.forEach(r)}function u(t){return"function"==typeof t}function c(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}new Set;function s(t,n){t.appendChild(n)}function f(t,n,e){t.insertBefore(n,e||null)}function p(t){t.parentNode.removeChild(t)}function a(t){return document.createElement(t)}function d(t){return document.createTextNode(t)}function m(t,n,e,o){return t.addEventListener(n,e,o),()=>t.removeEventListener(n,e,o)}function y(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function h(t,n){(null!=n||t.value)&&(t.value=n)}function g(t,n,e,o){t.style.setProperty(n,e,o?"important":"")}class b{constructor(t,n=null){this.e=a("div"),this.a=n,this.u(t)}m(t,n=null){for(let e=0;e<this.n.length;e+=1)f(t,this.n[e],n);this.t=t}u(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}p(t){this.d(),this.u(t),this.m(this.t,this.a)}d(){this.n.forEach(p)}}new Set;let $;function x(t){$=t}const v=[],S=[],C=[],k=[],_=Promise.resolve();let w=!1;function j(){w||(w=!0,_.then(E))}function M(t){C.push(t)}let O=!1;const L=new Set;function E(){if(!O){O=!0;do{for(let t=0;t<v.length;t+=1){const n=v[t];x(n),T(n.$$)}for(v.length=0;S.length;)S.pop()();for(let t=0;t<C.length;t+=1){const n=C[t];L.has(n)||(L.add(n),n())}C.length=0}while(v.length);for(;k.length;)k.pop()();w=!1,O=!1,L.clear()}}function T(t){if(null!==t.fragment){t.update(),l(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(M)}}const P=new Set;function N(t,n){t&&t.i&&(P.delete(t),t.i(n))}"undefined"!=typeof window?window:global;new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);let A;function V(t,n){const e=t.$$;null!==e.fragment&&(l(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function q(t,n,e,c,s,f,a=[-1]){const d=$;x(t);const m=n.props||{},y=t.$$={fragment:null,ctx:null,props:f,update:o,not_equal:s,bound:i(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(d?d.$$.context:[]),callbacks:i(),dirty:a};let h=!1;if(y.ctx=e?e(t,m,(n,e,...o)=>{const r=o.length?o[0]:e;return y.ctx&&s(y.ctx[n],y.ctx[n]=r)&&(y.bound[n]&&y.bound[n](r),h&&function(t,n){-1===t.$$.dirty[0]&&(v.push(t),j(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}(t,n)),e}):[],y.update(),h=!0,l(y.before_update),y.fragment=!!c&&c(y.ctx),n.target){if(n.hydrate){const t=(g=n.target,Array.from(g.childNodes));y.fragment&&y.fragment.l(t),t.forEach(p)}else y.fragment&&y.fragment.c();n.intro&&N(t.$$.fragment),function(t,n,e){const{fragment:o,on_mount:i,on_destroy:c,after_update:s}=t.$$;o&&o.m(n,e),M(()=>{const n=i.map(r).filter(u);c?c.push(...n):l(n),t.$$.on_mount=[]}),s.forEach(M)}(t,n.target,n.anchor),E()}var g;x(d)}"function"==typeof HTMLElement&&(A=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}$destroy(){V(this,1),this.$destroy=o}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(){}});class H{$destroy(){V(this,1),this.$destroy=o}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(){}}e(0);function B(t,n,e){const o=t.slice();return o[21]=n[e],o}function D(t){let n,e,o,r,i,l=t[3]&&K(t),u=t[7],c=[];for(let n=0;n<u.length;n+=1)c[n]=J(B(t,u,n));return{c(){n=a("div"),l&&l.c(),e=d(" "),o=a("div");for(let t=0;t<c.length;t+=1)c[t].c();y(o,"class",r="\n pnotify-action-bar\n "+t[1].getStyle("action-bar")+"\n "),g(o,"justify-content",t[6]),y(n,"class",i="\n pnotify-confirm\n "+t[1].getStyle("text")+"\n "+t[1].getStyle("confirm")+"\n ")},m(r,i){f(r,n,i),l&&l.m(n,null),s(n,e),s(n,o);for(let t=0;t<c.length;t+=1)c[t].m(o,null);t[20](o)},p(t,s){if(t[3]?l?l.p(t,s):(l=K(t),l.c(),l.m(n,e)):l&&(l.d(1),l=null),2178&s){let n;for(u=t[7],n=0;n<u.length;n+=1){const e=B(t,u,n);c[n]?c[n].p(e,s):(c[n]=J(e),c[n].c(),c[n].m(o,null))}for(;n<c.length;n+=1)c[n].d(1);c.length=u.length}2&s&&r!==(r="\n pnotify-action-bar\n "+t[1].getStyle("action-bar")+"\n ")&&y(o,"class",r),64&s&&g(o,"justify-content",t[6]),2&s&&i!==(i="\n pnotify-confirm\n "+t[1].getStyle("text")+"\n "+t[1].getStyle("confirm")+"\n ")&&y(n,"class",i)},d(e){e&&p(n),l&&l.d(),function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(c,e),t[20](null)}}}function K(t){let n,e;function o(t,n){return t[5]?F:z}let r=o(t),i=r(t);return{c(){n=a("div"),i.c(),y(n,"class",e="\n pnotify-prompt-bar\n "+t[1].getStyle("prompt-bar")+"\n ")},m(t,e){f(t,n,e),i.m(n,null)},p(t,l){r===(r=o(t))&&i?i.p(t,l):(i.d(1),i=r(t),i&&(i.c(),i.m(n,null))),2&l&&e!==(e="\n pnotify-prompt-bar\n "+t[1].getStyle("prompt-bar")+"\n ")&&y(n,"class",e)},d(t){t&&p(n),i.d()}}}function z(t){let n,e,o;return{c(){n=a("input"),y(n,"type","text"),y(n,"class",e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")},m(e,r,i){f(e,n,r),t[17](n),h(n,t[0]),i&&l(o),o=[m(n,"keypress",t[12]),m(n,"input",t[18])]},p(t,o){18&o&&e!==(e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")&&y(n,"class",e),1&o&&n.value!==t[0]&&h(n,t[0])},d(e){e&&p(n),t[17](null),l(o)}}}function F(t){let n,e,o;return{c(){n=a("textarea"),y(n,"rows","5"),y(n,"class",e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")},m(e,r,i){f(e,n,r),t[15](n),h(n,t[0]),i&&l(o),o=[m(n,"keypress",t[12]),m(n,"input",t[16])]},p(t,o){18&o&&e!==(e="\n pnotify-prompt-input\n "+t[1].getStyle("input")+"\n "+t[4]+"\n ")&&y(n,"class",e),1&o&&h(n,t[0])},d(e){e&&p(n),t[15](null),l(o)}}}function G(t){let n,e=t[21].text+"";return{c(){n=d(e)},m(t,e){f(t,n,e)},p(t,o){var r,i;128&o&&e!==(e=t[21].text+"")&&(i=""+(i=e),(r=n).data!==i&&(r.data=i))},d(t){t&&p(n)}}}function I(t){let n,e=t[21].text+"";return{c(){n=new b(e,null)},m(t,e){n.m(t,e)},p(t,o){128&o&&e!==(e=t[21].text+"")&&n.p(e)},d(t){t&&n.d()}}}function J(t){let n,e,o;function r(t,n){return t[21].textTrusted?I:G}let i=r(t),l=i(t);function u(...n){return t[19](t[21],...n)}return{c(){n=a("button"),l.c(),y(n,"type","button"),y(n,"class",e="\n pnotify-action-button\n "+t[1].getStyle("btn")+"\n "+(t[21].primary?t[1].getStyle("btn-primary"):t[1].getStyle("btn-secondary"))+"\n "+(t[21].addClass?t[21].addClass:"")+"\n ")},m(t,e,r){f(t,n,e),l.m(n,null),r&&o(),o=m(n,"click",u)},p(o,u){i===(i=r(t=o))&&l?l.p(t,u):(l.d(1),l=i(t),l&&(l.c(),l.m(n,null))),130&u&&e!==(e="\n pnotify-action-button\n "+t[1].getStyle("btn")+"\n "+(t[21].primary?t[1].getStyle("btn-primary"):t[1].getStyle("btn-secondary"))+"\n "+(t[21].addClass?t[21].addClass:"")+"\n ")&&y(n,"class",e)},d(t){t&&p(n),l.d(),o()}}}function Q(t){let n,e=(t[2]||t[3])&&D(t);return{c(){e&&e.c(),n=d("")},m(t,o){e&&e.m(t,o),f(t,n,o)},p(t,[o]){t[2]||t[3]?e?e.p(t,o):(e=D(t),e.c(),e.m(n.parentNode,n)):e&&(e.d(1),e=null)},i:o,o:o,d(t){e&&e.d(t),t&&p(n)}}}const R="AppendContent",U={confirm:!1,prompt:!1,promptClass:"",promptValue:"",promptMultiLine:!1,focus:null,align:"flex-end",buttons:[{text:"Ok",primary:!0,promptTrigger:!0,click:(t,n)=>{t.close(),t.fire("pnotify:confirm",{notice:t,value:n})}},{text:"Cancel",click:t=>{t.close(),t.fire("pnotify:cancel",{notice:t})}}]};function W(t,n,e){let o,r,i,{self:l=null}=n,{confirm:u=U.confirm}=n,{prompt:c=U.prompt}=n,{promptClass:s=U.promptClass}=n,{promptValue:f=U.promptValue}=n,{promptMultiLine:p=U.promptMultiLine}=n,{focus:a=U.focus}=n,{align:d=U.align}=n,{buttons:m=U.buttons}=n,y=!1;function h(t,n){t.click&&t.click(l,c?f:null,n)}l.on("pnotify:afterOpen",()=>{e(14,y=!0)});return t.$set=t=>{"self"in t&&e(1,l=t.self),"confirm"in t&&e(2,u=t.confirm),"prompt"in t&&e(3,c=t.prompt),"promptClass"in t&&e(4,s=t.promptClass),"promptValue"in t&&e(0,f=t.promptValue),"promptMultiLine"in t&&e(5,p=t.promptMultiLine),"focus"in t&&e(13,a=t.focus),"align"in t&&e(6,d=t.align),"buttons"in t&&e(7,m=t.buttons)},t.$$.update=()=>{if(26542&t.$$.dirty&&y)if(c&&!1!==a)p?o&&(o.focus(),e(14,y=!1)):r&&(r.focus(),e(14,y=!1));else if(u&&(!0===a||null===a&&!0===l.stack.modal)&&m.length&&i){let t=m.length-1;for(;t>0&&!m[t].promptTrigger;)t--;i.children[t].focus(),e(14,y=!1)}},[f,l,u,c,s,p,d,m,o,r,i,h,function(t){if(13===t.keyCode&&!t.shiftKey){t.preventDefault();const{buttons:n}=this.get();for(let e=0;e<n.length;e++)n[e].promptTrigger&&n[e].click&&n[e].click(l,c?f:null,t)}},a,y,function(t){S[t?"unshift":"push"](()=>{e(8,o=t)})},function(){f=this.value,e(0,f)},function(t){S[t?"unshift":"push"](()=>{e(9,r=t)})},function(){f=this.value,e(0,f)},(t,n)=>h(t,n),function(t){S[t?"unshift":"push"](()=>{e(10,i=t)})}]}n.default=class extends H{constructor(t){super(),q(this,t,W,Q,c,{self:1,confirm:2,prompt:3,promptClass:4,promptValue:0,promptMultiLine:5,focus:13,align:6,buttons:7})}}}])})); |
{ | ||
"name": "@pnotify/confirm", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "PNotify - Confirm Module", | ||
@@ -38,2 +38,3 @@ "keywords": [ | ||
"svelte": "index.svelte", | ||
"types": "index.d.ts", | ||
"publishConfig": { | ||
@@ -43,17 +44,17 @@ "access": "public" | ||
"dependencies": { | ||
"@pnotify/core": "^5.0.1" | ||
"@pnotify/core": "^5.1.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.8.6", | ||
"@babel/preset-env": "^7.8.6", | ||
"babel-loader": "^8.0.6", | ||
"css-loader": "^3.4.2", | ||
"@babel/core": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"babel-loader": "^8.1.0", | ||
"css-loader": "^3.5.2", | ||
"mini-css-extract-plugin": "^0.9.0", | ||
"style-loader": "^1.1.3", | ||
"svelte": "^3.19.1", | ||
"style-loader": "^1.1.4", | ||
"svelte": "^3.20.1", | ||
"svelte-loader": "^2.13.6", | ||
"webpack": "^4.41.6", | ||
"webpack": "^4.42.1", | ||
"webpack-cli": "^3.3.11" | ||
}, | ||
"gitHead": "c4a246df81884d4304dfb5b7cc56fee9a7a4b60b" | ||
"gitHead": "f069afd87342b2c2d36ca8c2830b0ec818f65419" | ||
} |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
33553
7.16%8
14.29%158
150.79%1
Infinity%Updated