Socket
Socket
Sign inDemoInstall

vuedl

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuedl - npm Package Compare versions

Comparing version 0.0.13 to 0.1.0

src/__index.js

4

.eslintrc.js

@@ -27,5 +27,7 @@ module.exports = {

'vue/require-default-prop': 'off',
'no-useless-escape': 'off'
'no-useless-escape': 'off',
'vue/component-name-in-template-casing': 'off',
'vue/multiline-html-element-content-newline': 'off'
},
globals: {}
}

@@ -33,9 +33,2 @@ 'use strict';

isActive: function isActive(val) {
// debugger
// if (this.isLayout) {
// this.$children.forEach(vm => {
// if (vm.isActive !== undefined) {
// vm.isActive = val
// }
// })
if (this._dialogInstance) {

@@ -91,3 +84,2 @@ if (this._dialogInstance.isActive !== undefined) {

if (!val) {
// window.removeEventListener('popstate', this.close)
this._destroy();

@@ -100,5 +92,2 @@ }

mounted: function mounted() {
// this.$nextTick(() => {
// window.addEventListener('popstate', this.close)
// })
this.isActive = true;

@@ -146,10 +135,4 @@ },

/* template */
var __vue_render__ = function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { staticClass: "dialog-layout" }, [_vm._t("default")], 2)
};
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"dialog-layout"},[_vm._t("default")],2)};
var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true;

@@ -173,3 +156,3 @@ /* style */

// For security concerns, we use only base name in production mode.
component.__file = "/Users/yarik/Projects/clones/vuedl/src/components/DefaultLayout.vue";
component.__file = "DefaultLayout.vue";

@@ -186,4 +169,2 @@ if (!component.render) {

return component

@@ -211,2 +192,13 @@ }

if (css.map) {
// https://developer.chrome.com/devtools/docs/javascript-debugging
// this makes source maps inside style tags work properly in Chrome
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
// http://stackoverflow.com/a/26603875
code +=
'\n/*# sourceMappingURL=data:application/json;base64,' +
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
' */';
}
if (isOldIE) {

@@ -262,3 +254,3 @@ style.element = style.element || document.querySelector('style[data-group=' + group + ']');

undefined
)
);

@@ -390,4 +382,2 @@ /*

*/
// const debug = Debug('vuedl:dialog')
var seed = 1;

@@ -413,3 +403,3 @@ var Dialog = function Dialog(component, ref) {

this._resolvers = [];
this.container = findContainer(container); // debug('created')
this.container = findContainer(container);
};

@@ -425,4 +415,3 @@

var LayoutCtor, layout, DialogCtor, dialog;
if (Vue.prototype.$isServer) { return $return(); } // debug('before show', { params, options })
// create layout
if (Vue.prototype.$isServer) { return $return(); } // create layout

@@ -497,4 +486,3 @@ LayoutCtor = Vue.extend({

Dialog.prototype.remove = function remove () {
// debug('remove')
this.onDestroyed && this.onDestroyed(this); // this.element.parentNode.removeChild(this.element)
this.onDestroyed && this.onDestroyed(this);

@@ -512,5 +500,4 @@ this._processResultPromises();

return;
} // debug('processResultPromises', result)
}
this._resolvers.forEach(function (resolver) { return resolver(result); });

@@ -522,3 +509,2 @@

Dialog.prototype.onReturn = function onReturn (result) {
// debug('onReturn', result)
this._processResultPromises(result);

@@ -550,3 +536,3 @@

Dialog.prototype.close = function close () {
this._vm.close();
this._vm && this._vm.close();
};

@@ -594,3 +580,2 @@

*/
var proxyHandler = {

@@ -829,14 +814,2 @@ get: function get(target, name) {

// watch: {
// 'wrapper.isActive' (val) {
// console.log('watch.isActive', val)
// if (val) {
// this.originalValue = this.returnValue
// } else {
// // console.log('emit', this.originalValue)
// // this.$emit('submit', this.originalValue)
// this.$emit('update:returnValue', this.originalValue)
// }
// }
// },
methods: {

@@ -852,3 +825,3 @@ return: function return$1(value) {

var _Actionable = {
var actionable = {
name: 'Actionable',

@@ -873,8 +846,6 @@ mixins: [Returnable],

actionlist: function actionlist() {
var this$1 = this;
var actions = [];
for (var key in this$1.actions) {
var action = this$1.actions[key];
for (var key in this.actions) {
var action = this.actions[key];

@@ -895,2 +866,6 @@ if (typeof action === 'string') {

if (!this.isActionVisible(action)) {
continue;
}
if (typeof action.icon === 'string') {

@@ -1017,3 +992,3 @@ action.icon = {

var _Confirmable = {
var confirmable = {
name: 'Confirmable',

@@ -1068,3 +1043,3 @@ props: {

var _Notifiable = {
var notifiable = {
props: {

@@ -1105,3 +1080,3 @@ verticalOffset: Number,

return ( obj = {}, obj[this.verticalProperty] = ((this.verticalOffset) + "px"), obj['max-width'] = ((this.width) + "px"), obj['z-index'] = this.zIndex, obj);
return ( obj = {}, obj[this.verticalProperty] = ((this.verticalOffset) + "px"), obj['max-width'] = ((this.width) + "px"), obj['z-index'] = this.zIndex, obj );
}

@@ -1168,10 +1143,7 @@

/*
* vuedl
*
* (c) Savaryn Yaroslav <yariksav@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/* eslint-disable import/prefer-default-export */
// Import vue components
// install function executed by Vue.use()
function install(Vue$$1, options) {

@@ -1188,10 +1160,11 @@ if ( options === void 0 ) options = {};

});
}
var Actionable = _Actionable;
var Activable$1 = Activable;
var Confirmable = _Confirmable;
var Notifiable = _Notifiable;
var Recordable$1 = Recordable;
var Returnable$1 = Returnable; // Auto-install
} // Create module definition for Vue.use()
var plugin = {
install: install // To auto-install when vue is found
/* global window global */
};
var GlobalVue = null;

@@ -1206,13 +1179,11 @@

if (GlobalVue) {
GlobalVue.use({
install: install
});
}
GlobalVue.use(plugin);
} // To allow use as module (npm/webpack/etc.) export components
exports.install = install;
exports.Actionable = Actionable;
exports.Activable = Activable$1;
exports.Confirmable = Confirmable;
exports.Notifiable = Notifiable;
exports.Recordable = Recordable$1;
exports.Returnable = Returnable$1;
exports.default = plugin;
exports.Actionable = actionable;
exports.Activable = Activable;
exports.Confirmable = confirmable;
exports.Notifiable = notifiable;
exports.Recordable = Recordable;
exports.Returnable = Returnable;

@@ -27,9 +27,2 @@ import Vue from 'vue';

isActive: function isActive(val) {
// debugger
// if (this.isLayout) {
// this.$children.forEach(vm => {
// if (vm.isActive !== undefined) {
// vm.isActive = val
// }
// })
if (this._dialogInstance) {

@@ -85,3 +78,2 @@ if (this._dialogInstance.isActive !== undefined) {

if (!val) {
// window.removeEventListener('popstate', this.close)
this._destroy();

@@ -94,5 +86,2 @@ }

mounted: function mounted() {
// this.$nextTick(() => {
// window.addEventListener('popstate', this.close)
// })
this.isActive = true;

@@ -140,10 +129,4 @@ },

/* template */
var __vue_render__ = function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { staticClass: "dialog-layout" }, [_vm._t("default")], 2)
};
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"dialog-layout"},[_vm._t("default")],2)};
var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true;

@@ -167,3 +150,3 @@ /* style */

// For security concerns, we use only base name in production mode.
component.__file = "/Users/yarik/Projects/clones/vuedl/src/components/DefaultLayout.vue";
component.__file = "DefaultLayout.vue";

@@ -180,4 +163,2 @@ if (!component.render) {

return component

@@ -205,2 +186,13 @@ }

if (css.map) {
// https://developer.chrome.com/devtools/docs/javascript-debugging
// this makes source maps inside style tags work properly in Chrome
code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
// http://stackoverflow.com/a/26603875
code +=
'\n/*# sourceMappingURL=data:application/json;base64,' +
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
' */';
}
if (isOldIE) {

@@ -256,3 +248,3 @@ style.element = style.element || document.querySelector('style[data-group=' + group + ']');

undefined
)
);

@@ -384,4 +376,2 @@ /*

*/
// const debug = Debug('vuedl:dialog')
var seed = 1;

@@ -407,3 +397,3 @@ var Dialog = function Dialog(component, ref) {

this._resolvers = [];
this.container = findContainer(container); // debug('created')
this.container = findContainer(container);
};

@@ -419,4 +409,3 @@

var LayoutCtor, layout, DialogCtor, dialog;
if (Vue.prototype.$isServer) { return $return(); } // debug('before show', { params, options })
// create layout
if (Vue.prototype.$isServer) { return $return(); } // create layout

@@ -491,4 +480,3 @@ LayoutCtor = Vue.extend({

Dialog.prototype.remove = function remove () {
// debug('remove')
this.onDestroyed && this.onDestroyed(this); // this.element.parentNode.removeChild(this.element)
this.onDestroyed && this.onDestroyed(this);

@@ -506,5 +494,4 @@ this._processResultPromises();

return;
} // debug('processResultPromises', result)
}
this._resolvers.forEach(function (resolver) { return resolver(result); });

@@ -516,3 +503,2 @@

Dialog.prototype.onReturn = function onReturn (result) {
// debug('onReturn', result)
this._processResultPromises(result);

@@ -544,3 +530,3 @@

Dialog.prototype.close = function close () {
this._vm.close();
this._vm && this._vm.close();
};

@@ -588,3 +574,2 @@

*/
var proxyHandler = {

@@ -823,14 +808,2 @@ get: function get(target, name) {

// watch: {
// 'wrapper.isActive' (val) {
// console.log('watch.isActive', val)
// if (val) {
// this.originalValue = this.returnValue
// } else {
// // console.log('emit', this.originalValue)
// // this.$emit('submit', this.originalValue)
// this.$emit('update:returnValue', this.originalValue)
// }
// }
// },
methods: {

@@ -846,3 +819,3 @@ return: function return$1(value) {

var _Actionable = {
var actionable = {
name: 'Actionable',

@@ -867,8 +840,6 @@ mixins: [Returnable],

actionlist: function actionlist() {
var this$1 = this;
var actions = [];
for (var key in this$1.actions) {
var action = this$1.actions[key];
for (var key in this.actions) {
var action = this.actions[key];

@@ -889,2 +860,6 @@ if (typeof action === 'string') {

if (!this.isActionVisible(action)) {
continue;
}
if (typeof action.icon === 'string') {

@@ -1011,3 +986,3 @@ action.icon = {

var _Confirmable = {
var confirmable = {
name: 'Confirmable',

@@ -1062,3 +1037,3 @@ props: {

var _Notifiable = {
var notifiable = {
props: {

@@ -1099,3 +1074,3 @@ verticalOffset: Number,

return ( obj = {}, obj[this.verticalProperty] = ((this.verticalOffset) + "px"), obj['max-width'] = ((this.width) + "px"), obj['z-index'] = this.zIndex, obj);
return ( obj = {}, obj[this.verticalProperty] = ((this.verticalOffset) + "px"), obj['max-width'] = ((this.width) + "px"), obj['z-index'] = this.zIndex, obj );
}

@@ -1162,10 +1137,7 @@

/*
* vuedl
*
* (c) Savaryn Yaroslav <yariksav@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/* eslint-disable import/prefer-default-export */
// Import vue components
// install function executed by Vue.use()
function install(Vue$$1, options) {

@@ -1182,10 +1154,11 @@ if ( options === void 0 ) options = {};

});
}
var Actionable = _Actionable;
var Activable$1 = Activable;
var Confirmable = _Confirmable;
var Notifiable = _Notifiable;
var Recordable$1 = Recordable;
var Returnable$1 = Returnable; // Auto-install
} // Create module definition for Vue.use()
var plugin = {
install: install // To auto-install when vue is found
/* global window global */
};
var GlobalVue = null;

@@ -1200,7 +1173,6 @@

if (GlobalVue) {
GlobalVue.use({
install: install
});
}
GlobalVue.use(plugin);
} // To allow use as module (npm/webpack/etc.) export components
export { install, Actionable, Activable$1 as Activable, Confirmable, Notifiable, Recordable$1 as Recordable, Returnable$1 as Returnable };
export default plugin;
export { actionable as Actionable, Activable, confirmable as Confirmable, notifiable as Notifiable, Recordable, Returnable };

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],e):e(t.vuedl={},t.Vue)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n={computed:{$parameters:function(){return this.$options.propsData},isNewRecord:function(){return!this.$options.primaryKey||!this.$options.propsData||!this.$options.propsData[this.$options.primaryKey]}}},r={name:"Activable",data:function(){return{isActive:!1}},watch:{isActive:function(t){this._dialogInstance?void 0!==this._dialogInstance.isActive&&(this._dialogInstance.isActive=t):this.$parent&&void 0!==this.$parent.isActive&&(this.$parent.isActive=t)}},methods:{close:function(){this.isActive=!1}}},o={name:"Layoutable",mixins:[r],props:{width:{type:[String,Number],default:function(){return 450}},persistent:Boolean},data:function(){return{loading:!1}},computed:{isLayout:function(){return!0},getWidth:function(){return"string"==typeof this.width?this.width:this.width+"px"}},watch:{isActive:function(t){t||this._destroy()}},mounted:function(){this.isActive=!0},methods:{_destroy:function(){this.$destroy()},dismiss:function(){this.persistent||this.loading||(this.isActive=!1)},close:function(){this.isActive=!1}},beforeDestroy:function(){void 0!==this.$el.remove?this.$el.remove():this.$el.parentNode.removeChild(this.$el)}};var i=function(){this.__data__=[],this.size=0};var s=function(t,e){return t===e||t!=t&&e!=e};var a=function(t,e){for(var n=t.length;n--;)if(s(t[n][0],e))return n;return-1},c=Array.prototype.splice;var u=function(t){var e=this.__data__,n=a(e,t);return!(n<0||(n==e.length-1?e.pop():c.call(e,n,1),--this.size,0))};var f=function(t){var e=this.__data__,n=a(e,t);return n<0?void 0:e[n][1]};var h=function(t){return a(this.__data__,t)>-1};var l=function(t,e){var n=this.__data__,r=a(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function p(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}p.prototype.clear=i,p.prototype.delete=u,p.prototype.get=f,p.prototype.has=h,p.prototype.set=l;var v=p;var d=function(){this.__data__=new v,this.size=0};var y=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var _=function(t){return this.__data__.get(t)};var m=function(t){return this.__data__.has(t)},b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t,e){return t(e={exports:{}},e.exports),e.exports}var w="object"==typeof b&&b&&b.Object===Object&&b,j="object"==typeof self&&self&&self.Object===Object&&self,O=w||j||Function("return this")(),A=O.Symbol,x=Object.prototype,$=x.hasOwnProperty,P=x.toString,D=A?A.toStringTag:void 0;var S=function(t){var e=$.call(t,D),n=t[D];try{t[D]=void 0;var r=!0}catch(t){}var o=P.call(t);return r&&(e?t[D]=n:delete t[D]),o},k=Object.prototype.toString;var C=function(t){return k.call(t)},z="[object Null]",T="[object Undefined]",E=A?A.toStringTag:void 0;var L=function(t){return null==t?void 0===t?T:z:E&&E in Object(t)?S(t):C(t)};var I=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},R="[object AsyncFunction]",F="[object Function]",N="[object GeneratorFunction]",V="[object Proxy]";var B,U=function(t){if(!I(t))return!1;var e=L(t);return e==F||e==N||e==R||e==V},q=O["__core-js_shared__"],M=(B=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"";var W=function(t){return!!M&&M in t},K=Function.prototype.toString;var H=function(t){if(null!=t){try{return K.call(t)}catch(t){}try{return t+""}catch(t){}}return""},G=/^\[object .+?Constructor\]$/,J=Function.prototype,Q=Object.prototype,X=J.toString,Y=Q.hasOwnProperty,Z=RegExp("^"+X.call(Y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var tt=function(t){return!(!I(t)||W(t))&&(U(t)?Z:G).test(H(t))};var et=function(t,e){return null==t?void 0:t[e]};var nt=function(t,e){var n=et(t,e);return tt(n)?n:void 0},rt=nt(O,"Map"),ot=nt(Object,"create");var it=function(){this.__data__=ot?ot(null):{},this.size=0};var st=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},at="__lodash_hash_undefined__",ct=Object.prototype.hasOwnProperty;var ut=function(t){var e=this.__data__;if(ot){var n=e[t];return n===at?void 0:n}return ct.call(e,t)?e[t]:void 0},ft=Object.prototype.hasOwnProperty;var ht=function(t){var e=this.__data__;return ot?void 0!==e[t]:ft.call(e,t)},lt="__lodash_hash_undefined__";var pt=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ot&&void 0===e?lt:e,this};function vt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}vt.prototype.clear=it,vt.prototype.delete=st,vt.prototype.get=ut,vt.prototype.has=ht,vt.prototype.set=pt;var dt=vt;var yt=function(){this.size=0,this.__data__={hash:new dt,map:new(rt||v),string:new dt}};var _t=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var mt=function(t,e){var n=t.__data__;return _t(e)?n["string"==typeof e?"string":"hash"]:n.map};var bt=function(t){var e=mt(this,t).delete(t);return this.size-=e?1:0,e};var gt=function(t){return mt(this,t).get(t)};var wt=function(t){return mt(this,t).has(t)};var jt=function(t,e){var n=mt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ot.prototype.clear=yt,Ot.prototype.delete=bt,Ot.prototype.get=gt,Ot.prototype.has=wt,Ot.prototype.set=jt;var At=Ot,xt=200;var $t=function(t,e){var n=this.__data__;if(n instanceof v){var r=n.__data__;if(!rt||r.length<xt-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new At(r)}return n.set(t,e),this.size=n.size,this};function Pt(t){var e=this.__data__=new v(t);this.size=e.size}Pt.prototype.clear=d,Pt.prototype.delete=y,Pt.prototype.get=_,Pt.prototype.has=m,Pt.prototype.set=$t;var Dt=Pt,St=function(){try{var t=nt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var kt=function(t,e,n){"__proto__"==e&&St?St(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n};var Ct=function(t,e,n){(void 0===n||s(t[e],n))&&(void 0!==n||e in t)||kt(t,e,n)};var zt=function(t){return function(e,n,r){for(var o=-1,i=Object(e),s=r(e),a=s.length;a--;){var c=s[t?a:++o];if(!1===n(i[c],c,i))break}return e}}(),Tt=g(function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,o=r&&r.exports===n?O.Buffer:void 0,i=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=i?i(n):new t.constructor(n);return t.copy(r),r}}),Et=O.Uint8Array;var Lt=function(t){var e=new t.constructor(t.byteLength);return new Et(e).set(new Et(t)),e};var It=function(t,e){var n=e?Lt(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var Rt=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e},Ft=Object.create,Nt=function(){function t(){}return function(e){if(!I(e))return{};if(Ft)return Ft(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var Vt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object),Bt=Object.prototype;var Ut=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Bt)};var qt=function(t){return"function"!=typeof t.constructor||Ut(t)?{}:Nt(Vt(t))};var Mt=function(t){return null!=t&&"object"==typeof t},Wt="[object Arguments]";var Kt=function(t){return Mt(t)&&L(t)==Wt},Ht=Object.prototype,Gt=Ht.hasOwnProperty,Jt=Ht.propertyIsEnumerable,Qt=Kt(function(){return arguments}())?Kt:function(t){return Mt(t)&&Gt.call(t,"callee")&&!Jt.call(t,"callee")},Xt=Array.isArray,Yt=9007199254740991;var Zt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Yt};var te=function(t){return null!=t&&Zt(t.length)&&!U(t)};var ee=function(t){return Mt(t)&&te(t)};var ne=function(){return!1},re=g(function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,o=r&&r.exports===n?O.Buffer:void 0,i=(o?o.isBuffer:void 0)||ne;t.exports=i}),oe="[object Object]",ie=Function.prototype,se=Object.prototype,ae=ie.toString,ce=se.hasOwnProperty,ue=ae.call(Object);var fe=function(t){if(!Mt(t)||L(t)!=oe)return!1;var e=Vt(t);if(null===e)return!0;var n=ce.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ae.call(n)==ue},he={};he["[object Float32Array]"]=he["[object Float64Array]"]=he["[object Int8Array]"]=he["[object Int16Array]"]=he["[object Int32Array]"]=he["[object Uint8Array]"]=he["[object Uint8ClampedArray]"]=he["[object Uint16Array]"]=he["[object Uint32Array]"]=!0,he["[object Arguments]"]=he["[object Array]"]=he["[object ArrayBuffer]"]=he["[object Boolean]"]=he["[object DataView]"]=he["[object Date]"]=he["[object Error]"]=he["[object Function]"]=he["[object Map]"]=he["[object Number]"]=he["[object Object]"]=he["[object RegExp]"]=he["[object Set]"]=he["[object String]"]=he["[object WeakMap]"]=!1;var le=function(t){return Mt(t)&&Zt(t.length)&&!!he[L(t)]};var pe=function(t){return function(e){return t(e)}},ve=g(function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,o=r&&r.exports===n&&w.process,i=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}),de=ve&&ve.isTypedArray,ye=de?pe(de):le;var _e=function(t,e){return"__proto__"==e?void 0:t[e]},me=Object.prototype.hasOwnProperty;var be=function(t,e,n){var r=t[e];me.call(t,e)&&s(r,n)&&(void 0!==n||e in t)||kt(t,e,n)};var ge=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),o?kt(n,a,c):be(n,a,c)}return n};var we=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},je=9007199254740991,Oe=/^(?:0|[1-9]\d*)$/;var Ae=function(t,e){var n=typeof t;return!!(e=null==e?je:e)&&("number"==n||"symbol"!=n&&Oe.test(t))&&t>-1&&t%1==0&&t<e},xe=Object.prototype.hasOwnProperty;var $e=function(t,e){var n=Xt(t),r=!n&&Qt(t),o=!n&&!r&&re(t),i=!n&&!r&&!o&&ye(t),s=n||r||o||i,a=s?we(t.length,String):[],c=a.length;for(var u in t)!e&&!xe.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ae(u,c))||a.push(u);return a};var Pe=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},De=Object.prototype.hasOwnProperty;var Se=function(t){if(!I(t))return Pe(t);var e=Ut(t),n=[];for(var r in t)("constructor"!=r||!e&&De.call(t,r))&&n.push(r);return n};var ke=function(t){return te(t)?$e(t,!0):Se(t)};var Ce=function(t){return ge(t,ke(t))};var ze=function(t,e,n,r,o,i,s){var a=_e(t,n),c=_e(e,n),u=s.get(c);if(u)Ct(t,n,u);else{var f=i?i(a,c,n+"",t,e,s):void 0,h=void 0===f;if(h){var l=Xt(c),p=!l&&re(c),v=!l&&!p&&ye(c);f=c,l||p||v?Xt(a)?f=a:ee(a)?f=Rt(a):p?(h=!1,f=Tt(c,!0)):v?(h=!1,f=It(c,!0)):f=[]:fe(c)||Qt(c)?(f=a,Qt(a)?f=Ce(a):(!I(a)||r&&U(a))&&(f=qt(c))):h=!1}h&&(s.set(c,f),o(f,c,r,i,s),s.delete(c)),Ct(t,n,f)}};var Te=function t(e,n,r,o,i){e!==n&&zt(n,function(s,a){if(I(s))i||(i=new Dt),ze(e,n,a,r,t,o,i);else{var c=o?o(_e(e,a),s,a+"",e,n,i):void 0;void 0===c&&(c=s),Ct(e,a,c)}},ke)};var Ee=function(t){return t};var Le=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Ie=Math.max;var Re=function(t,e,n){return e=Ie(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Ie(r.length-e,0),s=Array(i);++o<i;)s[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(s),Le(t,this,a)}};var Fe=function(t){return function(){return t}},Ne=St?function(t,e){return St(t,"toString",{configurable:!0,enumerable:!1,value:Fe(e),writable:!0})}:Ee,Ve=800,Be=16,Ue=Date.now;var qe=function(t){var e=0,n=0;return function(){var r=Ue(),o=Be-(r-n);if(n=r,o>0){if(++e>=Ve)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Ne);var Me=function(t,e){return qe(Re(t,e,Ee),t+"")};var We=function(t,e,n){if(!I(n))return!1;var r=typeof e;return!!("number"==r?te(n)&&Ae(e,n.length):"string"==r&&e in n)&&s(n[e],t)};var Ke=function(t){return Me(function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,s&&We(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),e=Object(e);++r<o;){var a=n[r];a&&t(e,a,r,i)}return e})}(function(t,e,n){Te(t,e,n)}),He={},Ge=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"dialog-layout"},[this._t("default")],2)};Ge._withStripped=!0;var Je,Qe,Xe,Ye,Ze,tn=(Je={render:Ge,staticRenderFns:[]},Xe=void 0,Ye=!1,(Ze=("function"==typeof(Qe=He)?Qe.options:Qe)||{}).__file="/Users/yarik/Projects/clones/vuedl/src/components/DefaultLayout.vue",Ze.render||(Ze.render=Je.render,Ze.staticRenderFns=Je.staticRenderFns,Ze._compiled=!0,Ye&&(Ze.functional=!0)),Ze._scopeId=Xe,Ze),en=function(){return{}};function nn(t){t&&!t._isDestroyed&&"function"==typeof t.$destroy&&t.$destroy()}function rn(t){var e;return(e="string"==typeof t?document.querySelector(t):t)||(e=document.body),e}function on(t,e){return new Promise(function(n,r){if(!Array.isArray(t)){if(!t)return n(null);t=[t]}return n(Promise.all(t.map(function(t){var n=[];if(t.options.asyncData&&"function"==typeof t.options.asyncData){var r=function(t,e){var n;return(n=2===t.length?new Promise(function(n){t(e,function(t,r){t&&e.error(t),n(r=r||{})})}):t(e))&&(n instanceof Promise||"function"==typeof n.then)||(n=Promise.resolve(n)),n}(t.options.asyncData,e);r.then(function(e){return function(t,e){var n=t.options.data||en;!e&&t.options.hasAsyncData||(t.options.hasAsyncData=!0,t.options.data=function(){var r=n.call(this);return this.$ssrContext&&(e=this.$ssrContext.asyncData[t.cid]),Object.assign({},r,e)},t._Ctor&&t._Ctor.options&&(t._Ctor.options.data=t.options.data))}(t,e),e}),n.push(r)}else n.push(null);return t.options.fetch?n.push(t.options.fetch(e)):n.push(null),Promise.all(n)})))})}var sn=1,an=function(t,e){void 0===e&&(e={});var n=e.layout,r=e.container;if(!t)throw Error("Component was not setted");this._layout=n||{component:tn,options:{}},this._component=t,this._vm=null,this._vmDialog=null,this._options={},this.id=++sn,this._resolvers=[],this.container=rn(r)},cn={showed:{configurable:!0},element:{configurable:!0},hasAsyncPreload:{configurable:!0},vm:{configurable:!0},vmd:{configurable:!0}};an.prototype.show=function(t,r){return void 0===t&&(t={}),void 0===r&&(r={}),new Promise(function(i,s){var a,c,u,f;if(e.prototype.$isServer)return i();if(a=(a=e.extend({mixins:[o]})).extend(this._layout.component),c=new a(Ke({propsData:Object.assign({},this._layout.options,t)},this.context,r)),u=e.extend(Object.assign({},this._component,{parent:c})),this._component.primaryKey&&(u=u.extend({mixins:[n]})),this.hasAsyncPreload)return Promise.resolve(on(u,Object.assign({},this.context,{params:t}))).then(function(t){try{return h.call(this)}catch(t){return s(t)}}.bind(this),s);function h(){return(f=new u(Ke({propsData:t},this.context,r))).$mount(),c.$slots.default=f._vnode,c.$mount(),c.$on("hook:destroyed",this._onDestroyed.bind(this)),c.$on("submit",this.onReturn.bind(this)),f.$on("submit",this.onReturn.bind(this)),this._vm=c,this._vm._dialogInstance=f,this._vmDialog=f,this.container=r.container?rn(r.container):this.container,this.container.appendChild(this.element),i(this)}return h.call(this)}.bind(this))},an.prototype.wait=function(){var t=this;return new Promise(function(e){t._resolvers.push(e)})},an.prototype._onDestroyed=function(){this.remove()},an.prototype.remove=function(){this.onDestroyed&&this.onDestroyed(this),this._processResultPromises(),nn(this._vm),nn(this._vmDialog),this._vm=null,this._vmDialog=null},an.prototype._processResultPromises=function(t){this._resolvers.length&&(this._resolvers.forEach(function(e){return e(t)}),this._resolvers=[])},an.prototype.onReturn=function(t){this._processResultPromises(t),this.close()},cn.showed.get=function(){return!!this._vm&&!this._vm._isDestroyed},cn.element.get=function(){return this._vm&&this._vm.$el},cn.hasAsyncPreload.get=function(){return this._component&&(this._component.asyncData||this._component.fetch)},cn.vm.get=function(){return this._vm},cn.vmd.get=function(){return this._vmDialog},an.prototype.close=function(){this._vm.close()},Object.defineProperties(an.prototype,cn);var un=function(t){this._component=t,this._vm=null};un.prototype.show=function(){if(!this._vm){var t=e.extend(this._component);this._vm=new t,this._vm.$mount(),document.body.appendChild(this._vm.$el)}this._vm.visible=!0},un.prototype.hide=function(){this._vm.visible=!1};var fn={get:function(t,e){return"symbol"==typeof e||"inspect"===e?t[e]:t[e]?t[e]:t._components[e]?t.createFunctionWrapper(e):t[e]}},hn=function(t){void 0===t&&(t={});var n=t.context,r=t.container;return this._context=n||{},an.prototype.context=n||{},this._components={},this._layouts={},this._overlays={},this._container=r,this._emitter=new e({}),this._instances=[],new Proxy(this,fn)},ln={context:{configurable:!0}};ln.context.get=function(){return this._context},hn.prototype.layout=function(t,e,n){void 0===n&&(n={}),this._layouts[t]={component:e,options:n}},hn.prototype.getLayout=function(t){if("function"==typeof t){var e=t.call(this._context);return t=this._layouts[e.name||"default"],Object.assign({},t,{options:e})}if("object"==typeof t&&"function"==typeof t.render)return{component:t};if(Array.isArray(t)){var n=t[0],r=t[1]||{},o="object"==typeof n&&"function"==typeof n.render?{component:n}:this._layouts[n];return o&&{component:o.component,options:Object.assign({},o.options,r)}}return this._layouts[t]},hn.prototype.overlay=function(t,e){if(void 0===e){if(this._overlays[t])return this._overlays[t];throw new Error('Overlay "'+t+" not found\n Please register it by calling dialog.overlay('"+t+"', component)")}this._overlays[t]=new un(e)},hn.prototype.getComponent=function(t){if(!this._components[t])throw new Error('Component "'+t+"\" was not found.\n Please register it by calling dialog.register('"+t+"', component)");return this._components[t]},hn.prototype.component=function(t,e,n){if(void 0===n&&(n={}),void 0===e)return this._components[t];this._components[t]={component:e,options:n}},hn.prototype.create=function(t){if(!t)throw new Error("Component is incorrect");var e=this.getLayout(t.layout||"default"),n=new an(t,{layout:e,context:this._context,container:this._container});return this._emitter.$emit("created",{dialog:n}),n},hn.prototype.show=function(t,e){return void 0===e&&(e={}),new Promise(function(n,r){var o,i,s;i=!!(o=this.create(t)).hasAsyncPreload&&(t.overlay||"default"),(s=i&&this._overlays[i]&&this.overlay(i))&&s.show();var a=function(t){try{throw this._emitter.$emit("error",{error:t,dialog:o}),s&&s.hide(),t}catch(t){return r(t)}}.bind(this);try{return Promise.resolve(o.show(e)).then(function(t){try{return this._emitter.$emit("shown",{dialog:o}),s&&s.hide(),o.onDestroyed=this.onDialogDestroyed.bind(this),n(e.waitForResult?o.wait():o)}catch(t){return a(t)}}.bind(this),a)}catch(t){a(t)}}.bind(this))},hn.prototype.createFunctionWrapper=function(t){var e=this,n=this.getComponent(t);return function(t){return e.show(n.component,Object.assign({},n.options,t))}},hn.prototype.showAndWait=function(t,e){return new Promise(function(n,r){return Promise.resolve(this.show(t,e)).then(function(t){try{return n(t.wait())}catch(t){return r(t)}},r)}.bind(this))},hn.prototype.on=function(t,e){this._emitter.$on(t,e)},hn.prototype.off=function(t,e){this._emitter.$off(t,e)},hn.prototype.once=function(t,e){this._emitter.$once(t,e)},hn.prototype.onDialogDestroyed=function(t){this._emitter.$emit("destroyed",{dialog:t})},Object.defineProperties(hn.prototype,ln);var pn={name:"Returnable",props:{returnValue:null},data:function(){return{originalValue:this.returnValue,returnResovers:[]}},methods:{return:function(t){this.originalValue=t,this.$root.$emit("submit",this.originalValue),this.$emit("submit",this.originalValue)}}},vn=[];function dn(t,e){void 0===e&&(e={});var n=e.property||"$dialog",r=new hn(e);Object.defineProperty(t.prototype,n,{get:function(){return r}})}var yn={name:"Actionable",mixins:[pn],data:function(){return{loadingAction:null}},props:{actions:{type:[Array,Object],default:function(){return[]}},handle:Function,params:Object},computed:{actionlist:function(){var t=[];for(var e in this.actions){var n=this.actions[e];"string"==typeof n&&(n={text:n}),n.key||(n.key=isNaN(e)?e:n.text||e),["true","false"].indexOf(n.key)>=0&&(n.key=JSON.parse(n.key)),"string"==typeof n.icon&&(n.icon={text:n.icon}),t.push(n)}return t}},methods:{trigger:function(t){var e=this.actionlist.find(function(e){return e.key===t});e&&!this.isActionDisabled(e)&&this.isActionVisible(e)&&this.onActionClick(e)},setLoadingToInstance:function(t,e){t&&void 0!==t.loading&&(t.loading=e)},setLoadingState:function(t){this.$emit("loading",t),!t&&(this.loadingAction=null),this.setLoadingToInstance(this.$root,t),this.setLoadingToInstance(this.$root._dialogInstance,t)},get:function(t,e){return void 0===t?e:"function"==typeof t?t(this.params):t},isActionDisabled:function(t){return this.get(t.disabled,!1)},isActionVisible:function(t){return this.get(t.visible,!0)},isActionInLoading:function(t){return this.loadingAction===t.key||this.get(t.loading)},onActionClick:function(t){return new Promise(function(e,n){var r,o;if(r=void 0===t.closable||!0===t.closable,"function"!=typeof(o=t.handle||this.handle))return r&&this.return(t.key),c.call(this);this.loadingAction=t.key,this.setLoadingState(!0);var i=function(){try{return c.call(this)}catch(t){return n(t)}}.bind(this),s=function(t){try{throw this.setLoadingState(!1),console.log("error",t),t}catch(t){return n(t)}}.bind(this);try{var a;return Promise.resolve(o(this.params)).then(function(e){try{return a=e,this.setLoadingState(!1),!1!==a&&r&&this.return(a||t.key),i()}catch(t){return s(t)}}.bind(this),s)}catch(t){s(t)}function c(){return e()}}.bind(this))}}},_n=r,mn={name:"Confirmable",props:{type:{type:String},text:{type:String,reqiured:!0},title:{type:String},actions:{type:[Array,Object]}}},bn={props:{verticalOffset:Number,showClose:{type:Boolean,default:function(){return!0}},position:{type:String,default:function(){return"top-right"}},timeout:{type:[Number,Boolean],default:function(){return 4500}},width:{type:Number,default:function(){return 330}},zIndex:{type:Number,default:function(){return 2e3}}},computed:{horizontalClass:function(){return this.position.indexOf("right")>-1?"right":"left"},verticalProperty:function(){return/^top-/.test(this.position)?"top":"bottom"},getStyle:function(){var t;return(t={})[this.verticalProperty]=this.verticalOffset+"px",t["max-width"]=this.width+"px",t["z-index"]=this.zIndex,t}},methods:{_destroy:function(){this.$el.addEventListener("transitionend",this.onTransitionEnd)},onTransitionEnd:function(){this.$el.removeEventListener("transitionend",this.onTransitionEnd),this.$destroy()},clearTimer:function(){clearTimeout(this.timer)},startTimer:function(){this.timeout>0&&(this.timer=setTimeout(this.close,this.timeout))},keydown:function(t){46===t.keyCode||8===t.keyCode?this.clearTimer():27===t.keyCode?this.close():this.startTimer()},close:function(){this.isActive=!1}},watch:{isActive:function(t){var e,n,r;t?(n=(e=this).position,r=10,vn.filter(function(t){return t.position===n}).forEach(function(t){r+=t.$el.offsetHeight+10}),vn.push(e),e.verticalOffset=r):function(t){var e=vn.findIndex(function(e){return e===t});if(!(e<0)){vn.splice(e,1);var n=vn.length,r=t.position;if(n){var o=10;vn.filter(function(t){return t.position===r}).forEach(function(t){t.verticalOffset=o,o+=t.$el.offsetHeight+10})}}}(this)}},mounted:function(){this.startTimer(),document.addEventListener("keydown",this.keydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.keydown)}},gn=n,wn=pn,jn=null;"undefined"!=typeof window?jn=window.Vue:"undefined"!=typeof global&&(jn=global.Vue),jn&&jn.use({install:dn}),t.install=dn,t.Actionable=yn,t.Activable=_n,t.Confirmable=mn,t.Notifiable=bn,t.Recordable=gn,t.Returnable=wn,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n(t.vuedl={},t.Vue)}(this,function(t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var e={computed:{$parameters:function(){return this.$options.propsData},isNewRecord:function(){return!this.$options.primaryKey||!this.$options.propsData||!this.$options.propsData[this.$options.primaryKey]}}},r={name:"Activable",data:function(){return{isActive:!1}},watch:{isActive:function(t){this._dialogInstance?void 0!==this._dialogInstance.isActive&&(this._dialogInstance.isActive=t):this.$parent&&void 0!==this.$parent.isActive&&(this.$parent.isActive=t)}},methods:{close:function(){this.isActive=!1}}},i={name:"Layoutable",mixins:[r],props:{width:{type:[String,Number],default:function(){return 450}},persistent:Boolean},data:function(){return{loading:!1}},computed:{isLayout:function(){return!0},getWidth:function(){return"string"==typeof this.width?this.width:this.width+"px"}},watch:{isActive:function(t){t||this._destroy()}},mounted:function(){this.isActive=!0},methods:{_destroy:function(){this.$destroy()},dismiss:function(){this.persistent||this.loading||(this.isActive=!1)},close:function(){this.isActive=!1}},beforeDestroy:function(){void 0!==this.$el.remove?this.$el.remove():this.$el.parentNode.removeChild(this.$el)}};var o=function(){this.__data__=[],this.size=0};var s=function(t,n){return t===n||t!=t&&n!=n};var u=function(t,n){for(var e=t.length;e--;)if(s(t[e][0],n))return e;return-1},a=Array.prototype.splice;var c=function(t){var n=this.__data__,e=u(n,t);return!(e<0||(e==n.length-1?n.pop():a.call(n,e,1),--this.size,0))};var f=function(t){var n=this.__data__,e=u(n,t);return e<0?void 0:n[e][1]};var h=function(t){return u(this.__data__,t)>-1};var l=function(t,n){var e=this.__data__,r=u(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this};function p(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}p.prototype.clear=o,p.prototype.delete=c,p.prototype.get=f,p.prototype.has=h,p.prototype.set=l;var v=p;var d=function(){this.__data__=new v,this.size=0};var y=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e};var _=function(t){return this.__data__.get(t)};var b=function(t){return this.__data__.has(t)},g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(t,n){return t(n={exports:{}},n.exports),n.exports}var w="object"==typeof g&&g&&g.Object===Object&&g,j="object"==typeof self&&self&&self.Object===Object&&self,A=w||j||Function("return this")(),O=A.Symbol,$=Object.prototype,P=$.hasOwnProperty,x=$.toString,S=O?O.toStringTag:void 0;var z=function(t){var n=P.call(t,S),e=t[S];try{t[S]=void 0}catch(t){}var r=x.call(t);return n?t[S]=e:delete t[S],r},E=Object.prototype.toString;var L=function(t){return E.call(t)},T="[object Null]",F="[object Undefined]",I=O?O.toStringTag:void 0;var D=function(t){return null==t?void 0===t?F:T:I&&I in Object(t)?z(t):L(t)};var R=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)},k="[object AsyncFunction]",N="[object Function]",V="[object GeneratorFunction]",B="[object Proxy]";var q,U=function(t){if(!R(t))return!1;var n=D(t);return n==N||n==V||n==k||n==B},W=A["__core-js_shared__"],K=(q=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"";var G=function(t){return!!K&&K in t},J=Function.prototype.toString;var H=function(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Q=/^\[object .+?Constructor\]$/,X=Function.prototype,Y=Object.prototype,Z=X.toString,M=Y.hasOwnProperty,C=RegExp("^"+Z.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var tt=function(t){return!(!R(t)||G(t))&&(U(t)?C:Q).test(H(t))};var nt=function(t,n){return null==t?void 0:t[n]};var et=function(t,n){var e=nt(t,n);return tt(e)?e:void 0},rt=et(A,"Map"),it=et(Object,"create");var ot=function(){this.__data__=it?it(null):{},this.size=0};var st=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},ut="__lodash_hash_undefined__",at=Object.prototype.hasOwnProperty;var ct=function(t){var n=this.__data__;if(it){var e=n[t];return e===ut?void 0:e}return at.call(n,t)?n[t]:void 0},ft=Object.prototype.hasOwnProperty;var ht=function(t){var n=this.__data__;return it?void 0!==n[t]:ft.call(n,t)},lt="__lodash_hash_undefined__";var pt=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=it&&void 0===n?lt:n,this};function vt(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}vt.prototype.clear=ot,vt.prototype.delete=st,vt.prototype.get=ct,vt.prototype.has=ht,vt.prototype.set=pt;var dt=vt;var yt=function(){this.size=0,this.__data__={hash:new dt,map:new(rt||v),string:new dt}};var _t=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t};var bt=function(t,n){var e=t.__data__;return _t(n)?e["string"==typeof n?"string":"hash"]:e.map};var gt=function(t){var n=bt(this,t).delete(t);return this.size-=n?1:0,n};var mt=function(t){return bt(this,t).get(t)};var wt=function(t){return bt(this,t).has(t)};var jt=function(t,n){var e=bt(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this};function At(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}At.prototype.clear=yt,At.prototype.delete=gt,At.prototype.get=mt,At.prototype.has=wt,At.prototype.set=jt;var Ot=At,$t=200;var Pt=function(t,n){var e=this.__data__;if(e instanceof v){var r=e.__data__;if(!rt||r.length<$t-1)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Ot(r)}return e.set(t,n),this.size=e.size,this};function xt(t){var n=this.__data__=new v(t);this.size=n.size}xt.prototype.clear=d,xt.prototype.delete=y,xt.prototype.get=_,xt.prototype.has=b,xt.prototype.set=Pt;var St=xt,zt=function(){try{var t=et(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Et=function(t,n,e){"__proto__"==n&&zt?zt(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e};var Lt=function(t,n,e){(void 0===e||s(t[n],e))&&(void 0!==e||n in t)||Et(t,n,e)};var Tt=function(t){return function(n,e,r){for(var i=-1,o=Object(n),s=r(n),u=s.length;u--;){var a=s[t?u:++i];if(!1===e(o[a],a,o))break}return n}}(),Ft=m(function(t,n){var e=n&&!n.nodeType&&n,r=e&&t&&!t.nodeType&&t,i=r&&r.exports===e?A.Buffer:void 0,o=i?i.allocUnsafe:void 0;t.exports=function(t,n){if(n)return t.slice();var e=t.length,r=o?o(e):new t.constructor(e);return t.copy(r),r}}),It=A.Uint8Array;var Dt=function(t){var n=new t.constructor(t.byteLength);return new It(n).set(new It(t)),n};var Rt=function(t,n){var e=n?Dt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)};var kt=function(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n},Nt=Object.create,Vt=function(){function t(){}return function(n){if(!R(n))return{};if(Nt)return Nt(n);t.prototype=n;var e=new t;return t.prototype=void 0,e}}();var Bt=function(t,n){return function(e){return t(n(e))}}(Object.getPrototypeOf,Object),qt=Object.prototype;var Ut=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||qt)};var Wt=function(t){return"function"!=typeof t.constructor||Ut(t)?{}:Vt(Bt(t))};var Kt=function(t){return null!=t&&"object"==typeof t},Gt="[object Arguments]";var Jt=function(t){return Kt(t)&&D(t)==Gt},Ht=Object.prototype,Qt=Ht.hasOwnProperty,Xt=Ht.propertyIsEnumerable,Yt=Jt(function(){return arguments}())?Jt:function(t){return Kt(t)&&Qt.call(t,"callee")&&!Xt.call(t,"callee")},Zt=Array.isArray,Mt=9007199254740991;var Ct=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Mt};var tn=function(t){return null!=t&&Ct(t.length)&&!U(t)};var nn=function(t){return Kt(t)&&tn(t)};var en=function(){return!1},rn=m(function(t,n){var e=n&&!n.nodeType&&n,r=e&&t&&!t.nodeType&&t,i=r&&r.exports===e?A.Buffer:void 0,o=(i?i.isBuffer:void 0)||en;t.exports=o}),on="[object Object]",sn=Function.prototype,un=Object.prototype,an=sn.toString,cn=un.hasOwnProperty,fn=an.call(Object);var hn=function(t){if(!Kt(t)||D(t)!=on)return!1;var n=Bt(t);if(null===n)return!0;var e=cn.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&an.call(e)==fn},ln={};ln["[object Float32Array]"]=ln["[object Float64Array]"]=ln["[object Int8Array]"]=ln["[object Int16Array]"]=ln["[object Int32Array]"]=ln["[object Uint8Array]"]=ln["[object Uint8ClampedArray]"]=ln["[object Uint16Array]"]=ln["[object Uint32Array]"]=!0,ln["[object Arguments]"]=ln["[object Array]"]=ln["[object ArrayBuffer]"]=ln["[object Boolean]"]=ln["[object DataView]"]=ln["[object Date]"]=ln["[object Error]"]=ln["[object Function]"]=ln["[object Map]"]=ln["[object Number]"]=ln["[object Object]"]=ln["[object RegExp]"]=ln["[object Set]"]=ln["[object String]"]=ln["[object WeakMap]"]=!1;var pn=function(t){return Kt(t)&&Ct(t.length)&&!!ln[D(t)]};var vn=function(t){return function(n){return t(n)}},dn=m(function(t,n){var e=n&&!n.nodeType&&n,r=e&&t&&!t.nodeType&&t,i=r&&r.exports===e&&w.process,o=function(){try{var t=r&&r.require&&r.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=o}),yn=dn&&dn.isTypedArray,_n=yn?vn(yn):pn;var bn=function(t,n){if("__proto__"!=n)return t[n]},gn=Object.prototype.hasOwnProperty;var mn=function(t,n,e){var r=t[n];gn.call(t,n)&&s(r,e)&&(void 0!==e||n in t)||Et(t,n,e)};var wn=function(t,n,e,r){var i=!e;e||(e={});for(var o=-1,s=n.length;++o<s;){var u=n[o],a=r?r(e[u],t[u],u,e,t):void 0;void 0===a&&(a=t[u]),i?Et(e,u,a):mn(e,u,a)}return e};var jn=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r},An=9007199254740991,On=/^(?:0|[1-9]\d*)$/;var $n=function(t,n){var e=typeof t;return!!(n=null==n?An:n)&&("number"==e||"symbol"!=e&&On.test(t))&&t>-1&&t%1==0&&t<n},Pn=Object.prototype.hasOwnProperty;var xn=function(t,n){var e=Zt(t),r=!e&&Yt(t),i=!e&&!r&&rn(t),o=!e&&!r&&!i&&_n(t),s=e||r||i||o,u=s?jn(t.length,String):[],a=u.length;for(var c in t)!n&&!Pn.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||$n(c,a))||u.push(c);return u};var Sn=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n},zn=Object.prototype.hasOwnProperty;var En=function(t){if(!R(t))return Sn(t);var n=Ut(t),e=[];for(var r in t)("constructor"!=r||!n&&zn.call(t,r))&&e.push(r);return e};var Ln=function(t){return tn(t)?xn(t,!0):En(t)};var Tn=function(t){return wn(t,Ln(t))};var Fn=function(t,n,e,r,i,o,s){var u=bn(t,e),a=bn(n,e),c=s.get(a);if(c)Lt(t,e,c);else{var f=o?o(u,a,e+"",t,n,s):void 0,h=void 0===f;if(h){var l=Zt(a),p=!l&&rn(a),v=!l&&!p&&_n(a);f=a,l||p||v?Zt(u)?f=u:nn(u)?f=kt(u):p?(h=!1,f=Ft(a,!0)):v?(h=!1,f=Rt(a,!0)):f=[]:hn(a)||Yt(a)?(f=u,Yt(u)?f=Tn(u):R(u)&&!U(u)||(f=Wt(a))):h=!1}h&&(s.set(a,f),i(f,a,r,o,s),s.delete(a)),Lt(t,e,f)}};var In=function t(n,e,r,i,o){n!==e&&Tt(e,function(s,u){if(R(s))o||(o=new St),Fn(n,e,u,r,t,i,o);else{var a=i?i(bn(n,u),s,u+"",n,e,o):void 0;void 0===a&&(a=s),Lt(n,u,a)}},Ln)};var Dn=function(t){return t};var Rn=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)},kn=Math.max;var Nn=function(t,n,e){return n=kn(void 0===n?t.length-1:n,0),function(){for(var r=arguments,i=-1,o=kn(r.length-n,0),s=Array(o);++i<o;)s[i]=r[n+i];i=-1;for(var u=Array(n+1);++i<n;)u[i]=r[i];return u[n]=e(s),Rn(t,this,u)}};var Vn=function(t){return function(){return t}},Bn=zt?function(t,n){return zt(t,"toString",{configurable:!0,enumerable:!1,value:Vn(n),writable:!0})}:Dn,qn=800,Un=16,Wn=Date.now;var Kn=function(t){var n=0,e=0;return function(){var r=Wn(),i=Un-(r-e);if(e=r,i>0){if(++n>=qn)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}(Bn);var Gn=function(t,n){return Kn(Nn(t,n,Dn),t+"")};var Jn=function(t,n,e){if(!R(e))return!1;var r=typeof n;return!!("number"==r?tn(e)&&$n(n,e.length):"string"==r&&n in e)&&s(e[n],t)};var Hn=function(t){return Gn(function(n,e){var r=-1,i=e.length,o=i>1?e[i-1]:void 0,s=i>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&Jn(e[0],e[1],s)&&(o=i<3?void 0:o,i=1),n=Object(n);++r<i;){var u=e[r];u&&t(n,u,r,o)}return n})}(function(t,n,e){In(t,n,e)});var Qn,Xn,Yn,Zn,Mn,Cn=(Qn={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"dialog-layout"},[this._t("default")],2)},staticRenderFns:[]},Yn=void 0,Zn=!1,(Mn=("function"==typeof(Xn={})?Xn.options:Xn)||{}).__file="DefaultLayout.vue",Mn.render||(Mn.render=Qn.render,Mn.staticRenderFns=Qn.staticRenderFns,Mn._compiled=!0,Zn&&(Mn.functional=!0)),Mn._scopeId=Yn,Mn),te=function(){return{}};function ne(t){t&&!t._isDestroyed&&"function"==typeof t.$destroy&&t.$destroy()}function ee(t){var n;return(n="string"==typeof t?document.querySelector(t):t)||(n=document.body),n}function re(t,n){return new Promise(function(e,r){if(!Array.isArray(t)){if(!t)return e(null);t=[t]}return e(Promise.all(t.map(function(t){var e=[];if(t.options.asyncData&&"function"==typeof t.options.asyncData){var r=function(t,n){var e;return(e=2===t.length?new Promise(function(e){t(n,function(t,r){t&&n.error(t),e(r=r||{})})}):t(n))&&(e instanceof Promise||"function"==typeof e.then)||(e=Promise.resolve(e)),e}(t.options.asyncData,n);r.then(function(n){return function(t,n){var e=t.options.data||te;!n&&t.options.hasAsyncData||(t.options.hasAsyncData=!0,t.options.data=function(){var r=e.call(this);return this.$ssrContext&&(n=this.$ssrContext.asyncData[t.cid]),Object.assign({},r,n)},t._Ctor&&t._Ctor.options&&(t._Ctor.options.data=t.options.data))}(t,n),n}),e.push(r)}else e.push(null);return t.options.fetch?e.push(t.options.fetch(n)):e.push(null),Promise.all(e)})))})}var ie=1,oe=function(t,n){void 0===n&&(n={});var e=n.layout,r=n.container;if(!t)throw Error("Component was not setted");this._layout=e||{component:Cn,options:{}},this._component=t,this._vm=null,this._vmDialog=null,this._options={},this.id=++ie,this._resolvers=[],this.container=ee(r)},se={showed:{configurable:!0},element:{configurable:!0},hasAsyncPreload:{configurable:!0},vm:{configurable:!0},vmd:{configurable:!0}};oe.prototype.show=function(t,r){return void 0===t&&(t={}),void 0===r&&(r={}),new Promise(function(o,s){var u,a,c,f;if(n.prototype.$isServer)return o();if(u=(u=n.extend({mixins:[i]})).extend(this._layout.component),a=new u(Hn({propsData:Object.assign({},this._layout.options,t)},this.context,r)),c=n.extend(Object.assign({},this._component,{parent:a})),this._component.primaryKey&&(c=c.extend({mixins:[e]})),this.hasAsyncPreload)return Promise.resolve(re(c,Object.assign({},this.context,{params:t}))).then(function(t){try{return h.call(this)}catch(t){return s(t)}}.bind(this),s);function h(){return(f=new c(Hn({propsData:t},this.context,r))).$mount(),a.$slots.default=f._vnode,a.$mount(),a.$on("hook:destroyed",this._onDestroyed.bind(this)),a.$on("submit",this.onReturn.bind(this)),f.$on("submit",this.onReturn.bind(this)),this._vm=a,this._vm._dialogInstance=f,this._vmDialog=f,this.container=r.container?ee(r.container):this.container,this.container.appendChild(this.element),o(this)}return h.call(this)}.bind(this))},oe.prototype.wait=function(){var t=this;return new Promise(function(n){t._resolvers.push(n)})},oe.prototype._onDestroyed=function(){this.remove()},oe.prototype.remove=function(){this.onDestroyed&&this.onDestroyed(this),this._processResultPromises(),ne(this._vm),ne(this._vmDialog),this._vm=null,this._vmDialog=null},oe.prototype._processResultPromises=function(t){this._resolvers.length&&(this._resolvers.forEach(function(n){return n(t)}),this._resolvers=[])},oe.prototype.onReturn=function(t){this._processResultPromises(t),this.close()},se.showed.get=function(){return!!this._vm&&!this._vm._isDestroyed},se.element.get=function(){return this._vm&&this._vm.$el},se.hasAsyncPreload.get=function(){return this._component&&(this._component.asyncData||this._component.fetch)},se.vm.get=function(){return this._vm},se.vmd.get=function(){return this._vmDialog},oe.prototype.close=function(){this._vm&&this._vm.close()},Object.defineProperties(oe.prototype,se);var ue=function(t){this._component=t,this._vm=null};ue.prototype.show=function(){if(!this._vm){var t=n.extend(this._component);this._vm=new t,this._vm.$mount(),document.body.appendChild(this._vm.$el)}this._vm.visible=!0},ue.prototype.hide=function(){this._vm.visible=!1};var ae={get:function(t,n){return"symbol"==typeof n||"inspect"===n?t[n]:t[n]?t[n]:t._components[n]?t.createFunctionWrapper(n):t[n]}},ce=function(t){void 0===t&&(t={});var e=t.context,r=t.container;return this._context=e||{},oe.prototype.context=e||{},this._components={},this._layouts={},this._overlays={},this._container=r,this._emitter=new n({}),this._instances=[],new Proxy(this,ae)},fe={context:{configurable:!0}};fe.context.get=function(){return this._context},ce.prototype.layout=function(t,n,e){void 0===e&&(e={}),this._layouts[t]={component:n,options:e}},ce.prototype.getLayout=function(t){if("function"==typeof t){var n=t.call(this._context);return t=this._layouts[n.name||"default"],Object.assign({},t,{options:n})}if("object"==typeof t&&"function"==typeof t.render)return{component:t};if(Array.isArray(t)){var e=t[0],r=t[1]||{},i="object"==typeof e&&"function"==typeof e.render?{component:e}:this._layouts[e];return i&&{component:i.component,options:Object.assign({},i.options,r)}}return this._layouts[t]},ce.prototype.overlay=function(t,n){if(void 0===n){if(this._overlays[t])return this._overlays[t];throw new Error('Overlay "'+t+" not found\n Please register it by calling dialog.overlay('"+t+"', component)")}this._overlays[t]=new ue(n)},ce.prototype.getComponent=function(t){if(!this._components[t])throw new Error('Component "'+t+"\" was not found.\n Please register it by calling dialog.register('"+t+"', component)");return this._components[t]},ce.prototype.component=function(t,n,e){if(void 0===e&&(e={}),void 0===n)return this._components[t];this._components[t]={component:n,options:e}},ce.prototype.create=function(t){if(!t)throw new Error("Component is incorrect");var n=this.getLayout(t.layout||"default"),e=new oe(t,{layout:n,context:this._context,container:this._container});return this._emitter.$emit("created",{dialog:e}),e},ce.prototype.show=function(t,n){return void 0===n&&(n={}),new Promise(function(e,r){var i,o,s;o=!!(i=this.create(t)).hasAsyncPreload&&(t.overlay||"default"),(s=o&&this._overlays[o]&&this.overlay(o))&&s.show();var u=function(t){try{throw this._emitter.$emit("error",{error:t,dialog:i}),s&&s.hide(),t}catch(t){return r(t)}}.bind(this);try{return Promise.resolve(i.show(n)).then(function(t){try{return this._emitter.$emit("shown",{dialog:i}),s&&s.hide(),i.onDestroyed=this.onDialogDestroyed.bind(this),e(n.waitForResult?i.wait():i)}catch(t){return u(t)}}.bind(this),u)}catch(t){u(t)}}.bind(this))},ce.prototype.createFunctionWrapper=function(t){var n=this,e=this.getComponent(t);return function(t){return n.show(e.component,Object.assign({},e.options,t))}},ce.prototype.showAndWait=function(t,n){return new Promise(function(e,r){return Promise.resolve(this.show(t,n)).then(function(t){try{return e(t.wait())}catch(t){return r(t)}},r)}.bind(this))},ce.prototype.on=function(t,n){this._emitter.$on(t,n)},ce.prototype.off=function(t,n){this._emitter.$off(t,n)},ce.prototype.once=function(t,n){this._emitter.$once(t,n)},ce.prototype.onDialogDestroyed=function(t){this._emitter.$emit("destroyed",{dialog:t})},Object.defineProperties(ce.prototype,fe);var he={name:"Returnable",props:{returnValue:null},data:function(){return{originalValue:this.returnValue,returnResovers:[]}},methods:{return:function(t){this.originalValue=t,this.$root.$emit("submit",this.originalValue),this.$emit("submit",this.originalValue)}}},le={name:"Actionable",mixins:[he],data:function(){return{loadingAction:null}},props:{actions:{type:[Array,Object],default:function(){return[]}},handle:Function,params:Object},computed:{actionlist:function(){var t=[];for(var n in this.actions){var e=this.actions[n];"string"==typeof e&&(e={text:e}),e.key||(e.key=isNaN(n)?n:e.text||n),["true","false"].indexOf(e.key)>=0&&(e.key=JSON.parse(e.key)),this.isActionVisible(e)&&("string"==typeof e.icon&&(e.icon={text:e.icon}),t.push(e))}return t}},methods:{trigger:function(t){var n=this.actionlist.find(function(n){return n.key===t});n&&!this.isActionDisabled(n)&&this.isActionVisible(n)&&this.onActionClick(n)},setLoadingToInstance:function(t,n){t&&void 0!==t.loading&&(t.loading=n)},setLoadingState:function(t){this.$emit("loading",t),!t&&(this.loadingAction=null),this.setLoadingToInstance(this.$root,t),this.setLoadingToInstance(this.$root._dialogInstance,t)},get:function(t,n){return void 0===t?n:"function"==typeof t?t(this.params):t},isActionDisabled:function(t){return this.get(t.disabled,!1)},isActionVisible:function(t){return this.get(t.visible,!0)},isActionInLoading:function(t){return this.loadingAction===t.key||this.get(t.loading)},onActionClick:function(t){return new Promise(function(n,e){var r,i;if(r=void 0===t.closable||!0===t.closable,"function"!=typeof(i=t.handle||this.handle))return r&&this.return(t.key),a.call(this);this.loadingAction=t.key,this.setLoadingState(!0);var o=function(){try{return a.call(this)}catch(t){return e(t)}}.bind(this),s=function(t){try{throw this.setLoadingState(!1),console.log("error",t),t}catch(t){return e(t)}}.bind(this);try{var u;return Promise.resolve(i(this.params)).then(function(n){try{return u=n,this.setLoadingState(!1),!1!==u&&r&&this.return(u||t.key),o()}catch(t){return s(t)}}.bind(this),s)}catch(t){s(t)}function a(){return n()}}.bind(this))}}},pe={name:"Confirmable",props:{type:{type:String},text:{type:String,reqiured:!0},title:{type:String},actions:{type:[Array,Object]}}},ve=[],de={props:{verticalOffset:Number,showClose:{type:Boolean,default:function(){return!0}},position:{type:String,default:function(){return"top-right"}},timeout:{type:[Number,Boolean],default:function(){return 4500}},width:{type:Number,default:function(){return 330}},zIndex:{type:Number,default:function(){return 2e3}}},computed:{horizontalClass:function(){return this.position.indexOf("right")>-1?"right":"left"},verticalProperty:function(){return/^top-/.test(this.position)?"top":"bottom"},getStyle:function(){var t;return(t={})[this.verticalProperty]=this.verticalOffset+"px",t["max-width"]=this.width+"px",t["z-index"]=this.zIndex,t}},methods:{_destroy:function(){this.$el.addEventListener("transitionend",this.onTransitionEnd)},onTransitionEnd:function(){this.$el.removeEventListener("transitionend",this.onTransitionEnd),this.$destroy()},clearTimer:function(){clearTimeout(this.timer)},startTimer:function(){this.timeout>0&&(this.timer=setTimeout(this.close,this.timeout))},keydown:function(t){46===t.keyCode||8===t.keyCode?this.clearTimer():27===t.keyCode?this.close():this.startTimer()},close:function(){this.isActive=!1}},watch:{isActive:function(t){var n,e,r;t?(e=(n=this).position,r=10,ve.filter(function(t){return t.position===e}).forEach(function(t){r+=t.$el.offsetHeight+10}),ve.push(n),n.verticalOffset=r):function(t){var n=ve.findIndex(function(n){return n===t});if(!(n<0)){ve.splice(n,1);var e=ve.length,r=t.position;if(e){var i=10;ve.filter(function(t){return t.position===r}).forEach(function(t){t.verticalOffset=i,i+=t.$el.offsetHeight+10})}}}(this)}},mounted:function(){this.startTimer(),document.addEventListener("keydown",this.keydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.keydown)}};var ye={install:function(t,n){void 0===n&&(n={});var e=n.property||"$dialog",r=new ce(n);Object.defineProperty(t.prototype,e,{get:function(){return r}})}},_e=null;"undefined"!=typeof window?_e=window.Vue:"undefined"!=typeof global&&(_e=global.Vue),_e&&_e.use(ye),t.default=ye,t.Actionable=le,t.Activable=r,t.Confirmable=pe,t.Notifiable=de,t.Recordable=e,t.Returnable=he,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=vuedl.min.js.map
{
"name": "vuedl",
"version": "0.0.13",
"version": "0.1.0",
"description": "Vue dialog helper",

@@ -44,23 +44,24 @@ "scripts": {

"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^8.2.6",
"babel-jest": "^23.4.2",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"bili": "^3.1.2",
"bili": "^3.4.2",
"coveralls": "^3.0.2",
"debug": "^3.1.0",
"eslint": "^5.3.0",
"eslint-config-standard": "^11.0.0",
"debug": "^4.1.0",
"eslint": "^5.10.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^21.21.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^3.1.0",
"eslint-plugin-vue": "^4.7.1",
"jest": "^23.5.0",
"lodash": "^4.17.10",
"eslint-plugin-jest": "^22.1.2",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^5.0.0",
"jest": "^23.6.0",
"lodash": "^4.17.11",
"merge": ">=1.2.1",
"rollup-plugin-vue": "^4.3.2",
"vue": "^2.4.4",
"vue-jest": "^2.6.0",
"vue-template-compiler": "^2.5.17",
"vue": "^2.5.21",
"vue-jest": "^3.0.2",
"vue-template-compiler": "^2.5.21",
"vue-test-utils": "^1.0.0-beta.11"

@@ -67,0 +68,0 @@ },

@@ -22,5 +22,2 @@ /*

// import Debug from 'debug'
// const debug = Debug('vuedl:dialog')
let seed = 1

@@ -32,3 +29,3 @@ export default class Dialog {

}
this._layout = layout || {component: DefaultLayout, options: {}}
this._layout = layout || { component: DefaultLayout, options: {} }
this._component = component

@@ -41,3 +38,2 @@ this._vm = null

this.container = findContainer(container)
// debug('created')
}

@@ -47,4 +43,2 @@

if (Vue.prototype.$isServer) return
// debug('before show', { params, options })
// create layout

@@ -67,5 +61,3 @@ let LayoutCtor = Vue.extend({

if (this.hasAsyncPreload) {
// let res =
await ensureAsyncDatas(DialogCtor, { ...this.context, params })
// debug('async datas', res)
}

@@ -106,5 +98,3 @@

remove () {
// debug('remove')
this.onDestroyed && this.onDestroyed(this)
// this.element.parentNode.removeChild(this.element)
this._processResultPromises()

@@ -121,3 +111,2 @@ destroyVueElement(this._vm)

}
// debug('processResultPromises', result)
this._resolvers.forEach(resolver => resolver(result))

@@ -128,3 +117,2 @@ this._resolvers = []

onReturn (result) {
// debug('onReturn', result)
this._processResultPromises(result)

@@ -155,4 +143,4 @@ this.close()

close () {
this._vm.close()
this._vm && this._vm.close()
}
}

@@ -1,19 +0,7 @@

/*
* vuedl
*
* (c) Savaryn Yaroslav <yariksav@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
// Import vue components
import DialogManager from './manager'
import _Actionable from './mixins/actionable'
import _Activable from './mixins/activable'
import _Confirmable from './mixins/confirmable'
import _Notifiable from './mixins/notifiable'
import _Recordable from './mixins/recordable'
import _Returnable from './mixins/returnable'
// import * as components from './components/index'
export function install (Vue, options = {}) {
// install function executed by Vue.use()
function install (Vue, options = {}) {
const property = options.property || '$dialog'

@@ -28,11 +16,9 @@ const manager = new DialogManager(options)

}
// Create module definition for Vue.use()
const plugin = {
install
}
export const Actionable = _Actionable
export const Activable = _Activable
export const Confirmable = _Confirmable
export const Notifiable = _Notifiable
export const Recordable = _Recordable
export const Returnable = _Returnable
// Auto-install
// To auto-install when vue is found
/* global window global */
let GlobalVue = null

@@ -45,5 +31,7 @@ if (typeof window !== 'undefined') {

if (GlobalVue) {
GlobalVue.use({
install
})
GlobalVue.use(plugin)
}
// To allow use as module (npm/webpack/etc.) export components
export * from './mixins/index'
export default plugin

@@ -13,3 +13,2 @@ /*

import Overlay from './overlay'
// import Notification from './notification'

@@ -16,0 +15,0 @@ const proxyHandler = {

@@ -0,1 +1,2 @@

import Returnable from './returnable'

@@ -37,2 +38,5 @@

}
if (!this.isActionVisible(action)) {
continue
}
if (typeof action.icon === 'string') {

@@ -39,0 +43,0 @@ action.icon = {

@@ -12,9 +12,2 @@ export default {

isActive (val) {
// debugger
// if (this.isLayout) {
// this.$children.forEach(vm => {
// if (vm.isActive !== undefined) {
// vm.isActive = val
// }
// })
if (this._dialogInstance) {

@@ -21,0 +14,0 @@ if (this._dialogInstance.isActive !== undefined) {

@@ -34,3 +34,2 @@ import Activable from './activable'

if (!val) {
// window.removeEventListener('popstate', this.close)
this._destroy()

@@ -42,5 +41,2 @@ }

mounted () {
// this.$nextTick(() => {
// window.addEventListener('popstate', this.close)
// })
this.isActive = true

@@ -47,0 +43,0 @@ },

@@ -16,15 +16,2 @@ /* @vue/component */

// watch: {
// 'wrapper.isActive' (val) {
// console.log('watch.isActive', val)
// if (val) {
// this.originalValue = this.returnValue
// } else {
// // console.log('emit', this.originalValue)
// // this.$emit('submit', this.originalValue)
// this.$emit('update:returnValue', this.originalValue)
// }
// }
// },
methods: {

@@ -31,0 +18,0 @@ return (value) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc