diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index ddcf18f0..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - - env: { - node: true - }, - - plugins: ['babel'], - - extends: [ - 'plugin:babel', - 'plugin:vue/essential', - 'eslint:recommended', - '@vue/prettier' - ], - - parserOptions: { - ecmaVersion: 2020 - }, - - rules: { - 'no-console': 'off', - 'no-debugger': 'off', - 'babel/camelcase': 1 - }, - - overrides: [ - { - files: [ - '**/*.spec.{j,t}s?(x)' - // '**/tests/unit/**/*.spec.{j,t}s?(x)' - ], - env: { - jest: true - } - } - ] -} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6313b56c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c8289f64..f85abe37 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: euvl +github: febe95 diff --git a/.gitignore b/.gitignore index f80a2a1c..25841898 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ *.map node_modules/ npm-debug.log -demo/dist/* docs/.vuepress/dist +docs/.vuepress/.cache +docs/.vuepress/.temp diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..3369a77f --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +lockfile-version=1 diff --git a/LICENSE.md b/LICENSE.md index 845bb442..690cb00e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Yev Vlasenko +Copyright (c) 2025 Felix Bernhard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index f88ed58b..25a03ef8 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,38 @@
-# Vue.js modal +# Vue.js modal (Vue 3) Easy to use, highly customizable Vue.js modal library. +> [!NOTE] +> This is a fork of the original [`vue-js-modal`](https://github.com/euvl/vue-js-modal) by [euvl](https://github.com/euvl). +> The fork is based on the 2.0.1 branch. The `master` branch contains some new but broken functionality (slots in dynamic modals). + ### 😎 [Examples](http://vue-js-modal.yev.io/) ### 🤓 [Documentation](https://euvl.github.io/vue-js-modal/) -### 🤖 [Changelog](https://github.com/euvl/vue-js-modal/releases/tag/2.0.0-rc4) - -### 🙌 [Looking for maintainers](https://github.com/euvl/vue-js-modal/issues/588) +### 🤖 [Changelog](https://github.com/febe95/vue-js-modal/releases/) -### 💰 [Sponsorship](https://github.com/sponsors/euvl) +### 💰 [Sponsorship](https://github.com/sponsors/febe95)) [](https://badge.fury.io/js/vue-js-modal) [](https://www.npmjs.com/package/vue-js-modal) [](https://www.npmjs.com/package/vue-js-modal) -# ⚠️⚠️⚠️ 2.0.0-rc.X version: - -Version 2.0.0 release candidates will have breaking changes until it is 2.0.1. If you need a more stable version, please use 1.3.34. - -If you notice any bugs or regressings please do not hesitate to report any issues. - -
-
-
-
-
d?X(e,r,i,!0,!1,p):k(t,n,o,r,i,a,l,c,p)},z=(e,t,n,o,r,i,a,l,c)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const o=e[u],s=t[u]=c?Bs(t[u]):Ls(t[u]);if(!Ss(o,s))break;b(o,s,n,null,r,i,a,l,c),u++}for(;u<=p&&u<=h;){const o=e[p],s=t[h]=c?Bs(t[h]):Ls(t[h]);if(!Ss(o,s))break;b(o,s,n,null,r,i,a,l,c),p--,h--}if(u>p){if(u<=h){const e=h+1,s=e {{ text }}
And I render HTML!"})},showTitleDialog(){this.$modal.show("dialog",{title:"Information",text:"Check out, I have a title 😎"})},showButtonsDialog(){this.$modal.show("dialog",{title:"The standard Lorem Ipsum passage",text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",buttons:[{title:"Cancel",handler:()=>{this.$modal.hide("dialog")}},{title:"Like",default:!0,handler:()=>{alert("Like action")}},{title:"Repost",handler:()=>{alert("Repost action")}}]})},showDynamicRuntimeModal(){this.$modal.show({template:'\n \n ',props:["text"]},{text:"Text has been passed as a property."},{height:"auto"})},showDynamicComponentModal(){this.$modal.show(L,{text:"This text is passed as a property"})},showDynamicComponentModalWithModalParams(){let e=0;const t=setInterval((()=>{5===e?clearInterval(t):e++;const n=`dynamic-modal-${Math.random()}`;this.$modal.show({template:'\n \n ',props:["name"],methods:{closeByName(){this.$modal.hide(n)},closeByEvent(){this.$emit("close")}}},{name:n},{name:n,height:"auto"})}),300)},dialogEvent(e){console.log("Dialog event: "+e)}}};n(846);const P=(0,a.A)(B,[["render",function(t,n,o,s,a,l){const c=(0,e.resolveComponent)("demo-error-modal"),u=(0,e.resolveComponent)("demo-login-modal"),d=(0,e.resolveComponent)("demo-dog-profile-modal"),p=(0,e.resolveComponent)("demo-conditional-modal"),h=(0,e.resolveComponent)("demo-size-modal"),f=(0,e.resolveComponent)("demo-adaptive-modal"),m=(0,e.resolveComponent)("demo-resizable-modal"),g=(0,e.resolveComponent)("demo-draggable-modal"),v=(0,e.resolveComponent)("v-dialog");return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createVNode)(c),(0,e.createVNode)(u),(0,e.createVNode)(d),(0,e.createVNode)(p),(0,e.createVNode)(h),(0,e.createVNode)(f),(0,e.createVNode)(m),(0,e.createVNode)(g),(0,e.createVNode)(v,{onBeforeOpened:n[0]||(n[0]=e=>l.dialogEvent("before-open")),onBeforeClosed:n[1]||(n[1]=e=>l.dialogEvent("before-close")),onOpened:n[2]||(n[2]=e=>l.dialogEvent("opened")),onClosed:n[3]||(n[3]=e=>l.dialogEvent("closed"))}),n[23]||(n[23]=(0,e.createElementVNode)("pre",{style:{"line-height":"1.5"}}," \n npm install --save vue-js-modal\n\n ...\n import VModal from 'vue-js-modal'\n Vue.use(VModal)\n ",-1)),(0,e.createElementVNode)("div",r,[(0,e.createElementVNode)("button",{class:"btn",onClick:n[4]||(n[4]=e=>t.$modal.show("example-resizable"))},"Resizable"),(0,e.createElementVNode)("button",{class:"btn",onClick:n[5]||(n[5]=e=>t.$modal.show("example-adaptive"))},"Adaptive"),(0,e.createElementVNode)("button",{class:"btn",onClick:n[6]||(n[6]=e=>t.$modal.show("example-draggable"))},"Draggable"),n[20]||(n[20]=(0,e.createElementVNode)("br",null,null,-1)),(0,e.createElementVNode)("button",{class:"btn green",onClick:n[7]||(n[7]=e=>t.$modal.show("dog-profile"))},"Demo: Dog Profile photo"),(0,e.createElementVNode)("button",{class:"btn green",onClick:n[8]||(n[8]=e=>t.$modal.show("error-modal"))},"Demo: Error handling"),(0,e.createElementVNode)("button",{class:"btn green",onClick:n[9]||(n[9]=e=>t.$modal.show("demo-login"))},"Demo: Login"),(0,e.createElementVNode)("button",{class:"btn green",onClick:n[10]||(n[10]=e=>t.$modal.show("size-modal"))},"Demo: Width: 60%, Height: auto"),(0,e.createElementVNode)("button",{class:(0,e.normalizeClass)(a.canBeShown?"btn green":"btn red"),onClick:n[11]||(n[11]=(...e)=>l.conditionalShow&&l.conditionalShow(...e))},[n[18]||(n[18]=(0,e.createTextVNode)(" Can ")),a.canBeShown?(0,e.createCommentVNode)("",!0):((0,e.openBlock)(),(0,e.createElementBlock)("b",i,"NOT")),n[19]||(n[19]=(0,e.createTextVNode)(" be shown "))],2),n[21]||(n[21]=(0,e.createElementVNode)("br",null,null,-1)),(0,e.createElementVNode)("button",{class:"btn",onClick:n[12]||(n[12]=(...e)=>l.showBasicDialog&&l.showBasicDialog(...e))},"Dialog: basic"),(0,e.createElementVNode)("button",{class:"btn",onClick:n[13]||(n[13]=(...e)=>l.showTitleDialog&&l.showTitleDialog(...e))},"Dialog: title"),(0,e.createElementVNode)("button",{class:"btn",onClick:n[14]||(n[14]=(...e)=>l.showButtonsDialog&&l.showButtonsDialog(...e))},"Dialog: buttons"),n[22]||(n[22]=(0,e.createElementVNode)("br",null,null,-1)),(0,e.createElementVNode)("button",{class:"btn",onClick:n[15]||(n[15]=(...e)=>l.showDynamicRuntimeModal&&l.showDynamicRuntimeModal(...e))},"Dynamic: Runtime Modal"),(0,e.createElementVNode)("button",{class:"btn",onClick:n[16]||(n[16]=(...e)=>l.showDynamicComponentModal&&l.showDynamicComponentModal(...e))},"Dynamic: Component Modal"),(0,e.createElementVNode)("button",{class:"btn",onClick:n[17]||(n[17]=(...e)=>l.showDynamicComponentModalWithModalParams&&l.showDynamicComponentModalWithModalParams(...e))},"Dynamic: Component Modal with modal params")])],64)}]]),D=(0,e.createApp)(P);D.use(o(),{dialog:!0,dynamicDefaults:{draggable:!0}}),D.mount("#app")})()})();
+//# sourceMappingURL=build.js.map
\ No newline at end of file
diff --git a/demo/index.html b/demo/index.html
index 86009634..ea92956c 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -20,7 +20,7 @@