New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bpui/dialog

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bpui/dialog - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

dist/index.css

2

dist/index.common.min.js
/*!
* bpui dialog v0.0.9
* bpui dialog v0.0.10
* Copyright (c) 2020 Copyright bp All Rights Reserved.
* Released under the MIT License.
*/'use strict';function _interopDefault(a){return a&&"object"==typeof a&&"default"in a?a["default"]:a}var bpLibs=_interopDefault(require("@bpui/libs")),febs=_interopDefault(require("febs-browser")),Vue=_interopDefault(require("vue")),utils=require("@bpui/component-utils");const GlobalDialogComponents=Symbol("GlobalDialogComponents");function registerDialogComponents(a){window[GlobalDialogComponents]=febs.utils.mergeMap(a)}function getComponents(){return window[GlobalDialogComponents]}const ApiClass="bp-apiClass",AlertClass="bp-alertClass";function hideDialog(a){a?a.vm.hide().then(()=>{$(`.${a.id}`).remove()}):utils.mask.removeAllApiModal("."+AlertClass)}const hideAlert=hideDialog,hideConfirm=hideDialog;function showAlert(a){let b=getComponents().alert;if(!b)throw new Error("dialog alert component is null");("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.title=a.title||"",a=febs.utils.mergeMap(b.data(),a);let d=febs.utils.mergeMap(b,{data:()=>a}),c="c"+febs.crypt.uuid();$(`<div id="${c}"></div>`).appendTo($("body"));let e=new Vue({render:b=>b(d,{class:[ApiClass,AlertClass,c],on:{confirm:()=>{a.confirm?a.confirm({vm:e.$children[0].$children[0],id:c}):e.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})}}})}).$mount(`#${c}`);return e.$children[0].$children[0].show().then(()=>{}),{vm:e.$children[0].$children[0],id:c}}function showConfirm(a){let b=getComponents().confirm;if(!b)throw new Error("dialog confirm component is null");"string"==typeof a&&(a={content:a}),a.title=a.title||"",a=febs.utils.mergeMap(b.data(),a);let d=febs.utils.mergeMap(b,{data:()=>a}),c="c"+febs.crypt.uuid();$(`<div id="${c}"></div>`).appendTo($("body"));let e=new Vue({render:b=>b(d,{class:[ApiClass,AlertClass,c],on:{confirm:()=>{a.confirm?a.confirm({vm:e.$children[0].$children[0],id:c}):e.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})},cancel:()=>{a.cancel?a.cancel({vm:e.$children[0].$children[0],id:c}):e.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})}}})}).$mount(`#${c}`);return e.$children[0].$children[0].show().then(()=>{}),{vm:e.$children[0].$children[0],id:c}}var apiDialog=Object.freeze({__proto__:null,hideDialog:hideDialog,hideAlert:hideAlert,hideConfirm:hideConfirm,showAlert:showAlert,showConfirm:showConfirm});const GlobalLoadingTimeout=Symbol("GlobalLoadingTimeout"),GlobalLoading=Symbol("GlobalLoading"),ApiClass$1="bp-apiClass",LoadingClass="bp-loadingClass";function onHandlerRouter(){window[GlobalLoading]=null}function isLoadingVisible(){return 0<$("."+LoadingClass).length}function hideLoading(){window[GlobalLoadingTimeout]&&(clearTimeout(window[GlobalLoadingTimeout].tm),window[GlobalLoadingTimeout]=null),window[GlobalLoading]&&window[GlobalLoading].$children[0].hide()}function showLoading(a){bpLibs.router.off("routeChanged",onHandlerRouter),bpLibs.router.on("routeChanged",onHandlerRouter),a||(a="");let b=getComponents().loading;if(!b)throw new Error("dialog loading component is null");if(!window[GlobalLoading]){let a="c"+febs.crypt.uuid();$(`<div id="${a}"></div>`).appendTo($("body"));let c=new Vue({render:c=>c(b,{class:[ApiClass$1,LoadingClass,a]})}).$mount(`#${a}`);window[GlobalLoading]=c.$children[0]}("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.delay=a.delay||0,0>a.delay&&(a.delay=0);let c=Date.now();window[GlobalLoadingTimeout]&&(window[GlobalLoadingTimeout].now>c+a.delay?(clearTimeout(window[GlobalLoadingTimeout].tm),window[GlobalLoadingTimeout]=null):window[GlobalLoadingTimeout].cfg=febs.utils.mergeMap(a));{c+=a.delay;let d=setTimeout(()=>{let a=window[GlobalLoadingTimeout].cfg;window[GlobalLoadingTimeout]=null,a=febs.utils.mergeMap(b.data(),a),window[GlobalLoading].$data.content=a.content,window[GlobalLoading].$children[0].show()},a.delay);window[GlobalLoadingTimeout]={tm:d,now:c,cfg:febs.utils.mergeMap(a)}}}var apiLoading=Object.freeze({__proto__:null,isLoadingVisible:isLoadingVisible,hideLoading:hideLoading,showLoading:showLoading});const ApiClass$2="bp-apiClass",GlobalToastTimeout=Symbol("GlobalToastTimeout"),GlobalToast=Symbol("GlobalToast");function showToast(a){a||(a="");let b=getComponents().toast;if(!b)throw new Error("dialog toast component is null");("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.durable=a.durable||0,0>a.durable&&(a.durable=0),0==a.durable&&(a.durable=4e3);let c="c"+febs.crypt.uuid();if($(`<div id="${c}"></div>`).appendTo($("body")),window[GlobalToastTimeout]){clearTimeout(window[GlobalToastTimeout].tm);let a=window[GlobalToastTimeout].id,b=window[GlobalToast];window[GlobalToastTimeout]=null,b&&(window[GlobalToast]=null,b.hide().then(()=>{$("."+a).remove()}))}let d=new Vue({render:a=>a(b,{class:[ApiClass$2,c]})}).$mount(`#${c}`);d.$children[0].$data.content=a.content,d.$children[0].$children[0].show().then(()=>{}),window[GlobalToast]=d.$children[0].$children[0];let e=setTimeout(()=>{let a=window[GlobalToastTimeout];if(window[GlobalToastTimeout]=null,a){let b=window[GlobalToast],c=a.id;window[GlobalToast]=null,b&&b.hide().then(()=>{c&&0<c.length&&$("."+c).remove()})}},a.durable);window[GlobalToastTimeout]={tm:e,id:c}}var apiToast=Object.freeze({__proto__:null,showToast:showToast}),apiWidget={...apiDialog,...apiLoading,...apiToast};let _Vue;function install(a){install.installed&&_Vue===a||(install.installed=!0,_Vue=a,Object.defineProperty(a.prototype,"$bpWidget",{get:function(){return apiWidget}}))}function VuePlugin(){return{install}}var script={components:{},props:{visible:Boolean,mask:{default:!0,type:Boolean},maskClose:{default:!1,type:Boolean},preventEvent:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object},watch:{visible(a){a?this.show().then(()=>{}):this.hide().then(()=>{})}},mounted(){this.visible&&this.show().then(()=>{})},methods:{show:function(){return new Promise(a=>{utils.mask.showWidget(this.$el,this.mask,this.preventEvent,()=>{this.$emit("update:visible",!0),a()})})},hide:function(){return new Promise(a=>{utils.mask.hideWidget(this.$el,()=>{this.$emit("update:visible",!1),a()})})}}};function normalizeComponent(a,b,c,d,e,f,g,h,i,j){"boolean"!=typeof g&&(i=h,h=g,g=!1);const k="function"==typeof c?c.options:c;a&&a.render&&(k.render=a.render,k.staticRenderFns=a.staticRenderFns,k._compiled=!0,e&&(k.functional=!0)),d&&(k._scopeId=d);let l;if(f?(l=function(a){a=a||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,a||"undefined"==typeof __VUE_SSR_CONTEXT__||(a=__VUE_SSR_CONTEXT__),b&&b.call(this,i(a)),a&&a._registeredComponents&&a._registeredComponents.add(f)},k._ssrRegister=l):b&&(l=g?function(a){b.call(this,j(a,this.$root.$options.shadowRoot))}:function(a){b.call(this,h(a))}),l)if(k.functional){const a=k.render;k.render=function(b,c){return l.call(c),a(b,c)}}else{const a=k.beforeCreate;k.beforeCreate=a?[].concat(a,l):[l]}return c}const isOldIE="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function createInjector(){return(a,b)=>addStyle(a,b)}let HEAD;const styles={};function addStyle(a,b){const c=isOldIE?b.media||"default":a,d=styles[c]||(styles[c]={ids:new Set,styles:[]});if(!d.ids.has(a)){d.ids.add(a);let c=b.source;if(b.map&&(c+="\n/*# sourceURL="+b.map.sources[0]+" */",c+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(b.map))))+" */"),d.element||(d.element=document.createElement("style"),d.element.type="text/css",b.media&&d.element.setAttribute("media",b.media),void 0===HEAD&&(HEAD=document.head||document.getElementsByTagName("head")[0]),HEAD.appendChild(d.element)),"styleSheet"in d.element)d.styles.push(c),d.element.styleSheet.cssText=d.styles.filter(Boolean).join("\n");else{const a=d.ids.size-1,b=document.createTextNode(c),e=d.element.childNodes;e[a]&&d.element.removeChild(e[a]),e.length?d.element.insertBefore(b,e[a]):d.element.appendChild(b)}}}const __vue_script__=script;var __vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("div",{staticClass:"bp-widget",on:{click:function(){a.maskClose?a.hide().then(function(){}):function(){}}}},[c("div",{staticClass:"bp-widget__content",class:a.pageClass,style:a.pageStyle,on:{click:function(a){a.stopPropagation()}}},[a._t("default")],2)])},__vue_staticRenderFns__=[];__vue_render__._withStripped=!0;const __vue_inject_styles__=function(a){a&&a("data-v-023bb380_0",{source:"\n\n/*# sourceMappingURL=widget.vue.map */",map:{version:3,sources:["widget.vue"],names:[],mappings:";;AAEA,qCAAqC",file:"widget.vue"},media:void 0})},__vue_scope_id__=void 0,__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,__vue_component__=normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,!1,createInjector,void 0,void 0);var script$1={components:{bpIcon:bpLibs.VueObject.bpIcon,widget:__vue_component__},props:{visible:Boolean,mask:{default:!0,type:Boolean},maskClose:Boolean,pageClass:String|Array,pageStyle:String|Array|Object,showClose:{default:!0,type:Boolean},title:String},data(){return{visibleReal:!1,footClass:null}},watch:{visible(a){this.visibleReal=a},visibleReal(a){this.$emit("update:visible",a)}},beforeMount(){this.visibleReal=this.visible;let a=this.$slots.foot;a&&a[0]&&a[0].children&&(1==a[0].children.length?this.footClass="bp-dialog__footOneButton":2==a[0].children.length?this.footClass="bp-dialog__footTwoButton":3==a[0].children.length&&(this.footClass="bp-dialog__footThreeButton"))},beforeDestroy(){},mounted(){},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()}}};const __vue_script__$1=script$1;var __vue_render__$1=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-dialog",attrs:{visible:a.visibleReal,maskClose:a.maskClose,mask:a.mask,pageClass:a.pageClass,pageStyle:a.pageStyle,preventEvent:!0},on:{"update:visible":function(b){a.visibleReal=b}}},[a.$slots.title?c("div",{staticClass:"bp-dialog__title bp-ellipsis"},[a._t("title")],2):a.title?c("div",{staticClass:"bp-dialog__title bp-ellipsis"},[a._v(a._s(a.title))]):a._e(),a._v(" "),c("div",{staticClass:"bp-dialog__main"},[a._t("default")],2),a._v(" "),a.$slots.foot?c("div",{staticClass:"bp-dialog__foot",class:a.footClass},[a._t("foot")],2):a._e(),a._v(" "),a.showClose?c("bp-icon",{staticClass:"bp-dialog__close",attrs:{name:"bp-dialog_close"},on:{click:function(){a.hide().then(function(){})}}}):a._e()],1)},__vue_staticRenderFns__$1=[];__vue_render__$1._withStripped=!0;const __vue_inject_styles__$1=function(a){a&&a("data-v-ea2f065a_0",{source:"\n\n/*# sourceMappingURL=dialog.vue.map */",map:{version:3,sources:["dialog.vue"],names:[],mappings:";;AAEA,qCAAqC",file:"dialog.vue"},media:void 0})},__vue_scope_id__$1=void 0,__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1,__vue_component__$1=normalizeComponent({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,!1,createInjector,void 0,void 0);var script$2={components:{bpDialog:__vue_component__$1},data(){return{title:"",content:"",okText:"\u786E\u8BA4"}}};const __vue_script__$2=script$2;var __vue_render__$2=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("bp-dialog",{attrs:{title:a.title,showClose:!1}},[a._v("\n "+a._s(a.content)+"\n "),c("div",{attrs:{slot:"foot"},slot:"foot"},[c("button",{on:{click:function(){return a.$emit("confirm")}}},[a._v(a._s(a.okText))])])])},__vue_staticRenderFns__$2=[];__vue_render__$2._withStripped=!0;const __vue_inject_styles__$2=function(a){a&&a("data-v-43a24251_0",{source:"\n\n/*# sourceMappingURL=alert.vue.map */",map:{version:3,sources:["alert.vue"],names:[],mappings:";;AAEA,oCAAoC",file:"alert.vue"},media:void 0})},__vue_scope_id__$2=void 0,__vue_module_identifier__$2=void 0,__vue_is_functional_template__$2=!1,__vue_component__$2=normalizeComponent({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$2,__vue_scope_id__$2,__vue_is_functional_template__$2,__vue_module_identifier__$2,!1,createInjector,void 0,void 0);var script$3={components:{bpDialog:__vue_component__$1},data(){return{title:"",content:"",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88"}}};const __vue_script__$3=script$3;var __vue_render__$3=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("bp-dialog",{attrs:{title:a.title,showClose:!1}},[a._v("\n "+a._s(a.content)+"\n "),c("div",{attrs:{slot:"foot"},slot:"foot"},[c("button",{staticStyle:{"font-weight":"500"},on:{click:function(){return a.$emit("cancel")}}},[a._v(a._s(a.cancelText))]),a._v(" "),c("button",{on:{click:function(){return a.$emit("confirm")}}},[a._v(a._s(a.okText))])])])},__vue_staticRenderFns__$3=[];__vue_render__$3._withStripped=!0;const __vue_inject_styles__$3=function(a){a&&a("data-v-2be9015f_0",{source:"\n\n/*# sourceMappingURL=confirm.vue.map */",map:{version:3,sources:["confirm.vue"],names:[],mappings:";;AAEA,sCAAsC",file:"confirm.vue"},media:void 0})},__vue_scope_id__$3=void 0,__vue_module_identifier__$3=void 0,__vue_is_functional_template__$3=!1,__vue_component__$3=normalizeComponent({render:__vue_render__$3,staticRenderFns:__vue_staticRenderFns__$3},__vue_inject_styles__$3,__vue_script__$3,__vue_scope_id__$3,__vue_is_functional_template__$3,__vue_module_identifier__$3,!1,createInjector,void 0,void 0);var script$4={components:{bpIcon:bpLibs.VueObject.bpIcon,widget:__vue_component__},data(){return{content:""}}};const __vue_script__$4=script$4;var __vue_render__$4=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-loading",attrs:{mask:!1,preventEvent:!0}},[c("div",{staticClass:"bp-loading__main"},[c("bp-icon",{attrs:{name:"loading"}})],1),a._v(" "),c("div",{staticClass:"bp-loading__text"},[a._v("\n "+a._s(a.content)+"\n ")])])},__vue_staticRenderFns__$4=[];__vue_render__$4._withStripped=!0;const __vue_inject_styles__$4=function(a){a&&a("data-v-1e2576e8_0",{source:"\n\n/*# sourceMappingURL=loading.vue.map */",map:{version:3,sources:["loading.vue"],names:[],mappings:";;AAEA,sCAAsC",file:"loading.vue"},media:void 0})},__vue_scope_id__$4=void 0,__vue_module_identifier__$4=void 0,__vue_is_functional_template__$4=!1,__vue_component__$4=normalizeComponent({render:__vue_render__$4,staticRenderFns:__vue_staticRenderFns__$4},__vue_inject_styles__$4,__vue_script__$4,__vue_scope_id__$4,__vue_is_functional_template__$4,__vue_module_identifier__$4,!1,createInjector,void 0,void 0);var script$5={components:{widget:__vue_component__},data(){return{content:""}}};const __vue_script__$5=script$5;var __vue_render__$5=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-toast",staticStyle:{height:"0 !important"},attrs:{mask:!1,preventEvent:!1}},[c("div",{staticClass:"bp-toast__main"},[a._v("\n "+a._s(a.content)+"\n ")])])},__vue_staticRenderFns__$5=[];__vue_render__$5._withStripped=!0;const __vue_inject_styles__$5=function(a){a&&a("data-v-3deca22f_0",{source:"\n\n/*# sourceMappingURL=toast.vue.map */",map:{version:3,sources:["toast.vue"],names:[],mappings:";;AAEA,oCAAoC",file:"toast.vue"},media:void 0})},__vue_scope_id__$5=void 0,__vue_module_identifier__$5=void 0,__vue_is_functional_template__$5=!1,__vue_component__$5=normalizeComponent({render:__vue_render__$5,staticRenderFns:__vue_staticRenderFns__$5},__vue_inject_styles__$5,__vue_script__$5,__vue_scope_id__$5,__vue_is_functional_template__$5,__vue_module_identifier__$5,!1,createInjector,void 0,void 0);function init(){bpLibs.icons.registerAliasIcon("bp-dialog_close","cancel"),registerDialogComponents({alert:__vue_component__$2,confirm:__vue_component__$3,loading:__vue_component__$4,toast:__vue_component__$5})}init();var index={init,VuePlugin,registerDialogComponents,apiWidget,bpDialog:__vue_component__$1,bpWidget:__vue_component__};module.exports=index;
/*!
* bpui dialog v0.0.9
* bpui dialog v0.0.10
* Copyright (c) 2020 Copyright bp All Rights Reserved.
* Released under the MIT License.
*/import bpLibs from"@bpui/libs";import febs from"febs-browser";import Vue from"vue";import{mask}from"@bpui/component-utils";const GlobalDialogComponents=Symbol("GlobalDialogComponents");function registerDialogComponents(a){window[GlobalDialogComponents]=febs.utils.mergeMap(a)}function getComponents(){return window[GlobalDialogComponents]}const ApiClass="bp-apiClass",AlertClass="bp-alertClass";function hideDialog(a){a?a.vm.hide().then(()=>{$(`.${a.id}`).remove()}):mask.removeAllApiModal("."+AlertClass)}const hideAlert=hideDialog,hideConfirm=hideDialog;function showAlert(a){let b=getComponents().alert;if(!b)throw new Error("dialog alert component is null");("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.title=a.title||"",a=febs.utils.mergeMap(b.data(),a);let d=febs.utils.mergeMap(b,{data:()=>a}),c="c"+febs.crypt.uuid();$(`<div id="${c}"></div>`).appendTo($("body"));let e=new Vue({render:b=>b(d,{class:[ApiClass,AlertClass,c],on:{confirm:()=>{a.confirm?a.confirm({vm:e.$children[0].$children[0],id:c}):e.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})}}})}).$mount(`#${c}`);return e.$children[0].$children[0].show().then(()=>{}),{vm:e.$children[0].$children[0],id:c}}function showConfirm(a){let b=getComponents().confirm;if(!b)throw new Error("dialog confirm component is null");"string"==typeof a&&(a={content:a}),a.title=a.title||"",a=febs.utils.mergeMap(b.data(),a);let d=febs.utils.mergeMap(b,{data:()=>a}),c="c"+febs.crypt.uuid();$(`<div id="${c}"></div>`).appendTo($("body"));let e=new Vue({render:b=>b(d,{class:[ApiClass,AlertClass,c],on:{confirm:()=>{a.confirm?a.confirm({vm:e.$children[0].$children[0],id:c}):e.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})},cancel:()=>{a.cancel?a.cancel({vm:e.$children[0].$children[0],id:c}):e.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})}}})}).$mount(`#${c}`);return e.$children[0].$children[0].show().then(()=>{}),{vm:e.$children[0].$children[0],id:c}}var apiDialog=Object.freeze({__proto__:null,hideDialog:hideDialog,hideAlert:hideAlert,hideConfirm:hideConfirm,showAlert:showAlert,showConfirm:showConfirm});const GlobalLoadingTimeout=Symbol("GlobalLoadingTimeout"),GlobalLoading=Symbol("GlobalLoading"),ApiClass$1="bp-apiClass",LoadingClass="bp-loadingClass";function onHandlerRouter(){window[GlobalLoading]=null}function isLoadingVisible(){return 0<$("."+LoadingClass).length}function hideLoading(){window[GlobalLoadingTimeout]&&(clearTimeout(window[GlobalLoadingTimeout].tm),window[GlobalLoadingTimeout]=null),window[GlobalLoading]&&window[GlobalLoading].$children[0].hide()}function showLoading(a){bpLibs.router.off("routeChanged",onHandlerRouter),bpLibs.router.on("routeChanged",onHandlerRouter),a||(a="");let b=getComponents().loading;if(!b)throw new Error("dialog loading component is null");if(!window[GlobalLoading]){let a="c"+febs.crypt.uuid();$(`<div id="${a}"></div>`).appendTo($("body"));let c=new Vue({render:c=>c(b,{class:[ApiClass$1,LoadingClass,a]})}).$mount(`#${a}`);window[GlobalLoading]=c.$children[0]}("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.delay=a.delay||0,0>a.delay&&(a.delay=0);let c=Date.now();window[GlobalLoadingTimeout]&&(window[GlobalLoadingTimeout].now>c+a.delay?(clearTimeout(window[GlobalLoadingTimeout].tm),window[GlobalLoadingTimeout]=null):window[GlobalLoadingTimeout].cfg=febs.utils.mergeMap(a));{c+=a.delay;let d=setTimeout(()=>{let a=window[GlobalLoadingTimeout].cfg;window[GlobalLoadingTimeout]=null,a=febs.utils.mergeMap(b.data(),a),window[GlobalLoading].$data.content=a.content,window[GlobalLoading].$children[0].show()},a.delay);window[GlobalLoadingTimeout]={tm:d,now:c,cfg:febs.utils.mergeMap(a)}}}var apiLoading=Object.freeze({__proto__:null,isLoadingVisible:isLoadingVisible,hideLoading:hideLoading,showLoading:showLoading});const ApiClass$2="bp-apiClass",GlobalToastTimeout=Symbol("GlobalToastTimeout"),GlobalToast=Symbol("GlobalToast");function showToast(a){a||(a="");let b=getComponents().toast;if(!b)throw new Error("dialog toast component is null");("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.durable=a.durable||0,0>a.durable&&(a.durable=0),0==a.durable&&(a.durable=4e3);let c="c"+febs.crypt.uuid();if($(`<div id="${c}"></div>`).appendTo($("body")),window[GlobalToastTimeout]){clearTimeout(window[GlobalToastTimeout].tm);let a=window[GlobalToastTimeout].id,b=window[GlobalToast];window[GlobalToastTimeout]=null,b&&(window[GlobalToast]=null,b.hide().then(()=>{$("."+a).remove()}))}let d=new Vue({render:a=>a(b,{class:[ApiClass$2,c]})}).$mount(`#${c}`);d.$children[0].$data.content=a.content,d.$children[0].$children[0].show().then(()=>{}),window[GlobalToast]=d.$children[0].$children[0];let e=setTimeout(()=>{let a=window[GlobalToastTimeout];if(window[GlobalToastTimeout]=null,a){let b=window[GlobalToast],c=a.id;window[GlobalToast]=null,b&&b.hide().then(()=>{c&&0<c.length&&$("."+c).remove()})}},a.durable);window[GlobalToastTimeout]={tm:e,id:c}}var apiToast=Object.freeze({__proto__:null,showToast:showToast}),apiWidget={...apiDialog,...apiLoading,...apiToast};let _Vue;function install(a){install.installed&&_Vue===a||(install.installed=!0,_Vue=a,Object.defineProperty(a.prototype,"$bpWidget",{get:function(){return apiWidget}}))}function VuePlugin(){return{install}}var script={components:{},props:{visible:Boolean,mask:{default:!0,type:Boolean},maskClose:{default:!1,type:Boolean},preventEvent:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object},watch:{visible(a){a?this.show().then(()=>{}):this.hide().then(()=>{})}},mounted(){this.visible&&this.show().then(()=>{})},methods:{show:function(){return new Promise(a=>{mask.showWidget(this.$el,this.mask,this.preventEvent,()=>{this.$emit("update:visible",!0),a()})})},hide:function(){return new Promise(a=>{mask.hideWidget(this.$el,()=>{this.$emit("update:visible",!1),a()})})}}};function normalizeComponent(a,b,c,d,e,f,g,h,i,j){"boolean"!=typeof g&&(i=h,h=g,g=!1);const k="function"==typeof c?c.options:c;a&&a.render&&(k.render=a.render,k.staticRenderFns=a.staticRenderFns,k._compiled=!0,e&&(k.functional=!0)),d&&(k._scopeId=d);let l;if(f?(l=function(a){a=a||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,a||"undefined"==typeof __VUE_SSR_CONTEXT__||(a=__VUE_SSR_CONTEXT__),b&&b.call(this,i(a)),a&&a._registeredComponents&&a._registeredComponents.add(f)},k._ssrRegister=l):b&&(l=g?function(a){b.call(this,j(a,this.$root.$options.shadowRoot))}:function(a){b.call(this,h(a))}),l)if(k.functional){const a=k.render;k.render=function(b,c){return l.call(c),a(b,c)}}else{const a=k.beforeCreate;k.beforeCreate=a?[].concat(a,l):[l]}return c}const isOldIE="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function createInjector(){return(a,b)=>addStyle(a,b)}let HEAD;const styles={};function addStyle(a,b){const c=isOldIE?b.media||"default":a,d=styles[c]||(styles[c]={ids:new Set,styles:[]});if(!d.ids.has(a)){d.ids.add(a);let c=b.source;if(b.map&&(c+="\n/*# sourceURL="+b.map.sources[0]+" */",c+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(b.map))))+" */"),d.element||(d.element=document.createElement("style"),d.element.type="text/css",b.media&&d.element.setAttribute("media",b.media),void 0===HEAD&&(HEAD=document.head||document.getElementsByTagName("head")[0]),HEAD.appendChild(d.element)),"styleSheet"in d.element)d.styles.push(c),d.element.styleSheet.cssText=d.styles.filter(Boolean).join("\n");else{const a=d.ids.size-1,b=document.createTextNode(c),e=d.element.childNodes;e[a]&&d.element.removeChild(e[a]),e.length?d.element.insertBefore(b,e[a]):d.element.appendChild(b)}}}const __vue_script__=script;var __vue_render__=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("div",{staticClass:"bp-widget",on:{click:function(){a.maskClose?a.hide().then(function(){}):function(){}}}},[c("div",{staticClass:"bp-widget__content",class:a.pageClass,style:a.pageStyle,on:{click:function(a){a.stopPropagation()}}},[a._t("default")],2)])},__vue_staticRenderFns__=[];__vue_render__._withStripped=!0;const __vue_inject_styles__=function(a){a&&a("data-v-023bb380_0",{source:"\n\n/*# sourceMappingURL=widget.vue.map */",map:{version:3,sources:["widget.vue"],names:[],mappings:";;AAEA,qCAAqC",file:"widget.vue"},media:void 0})},__vue_scope_id__=void 0,__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,__vue_component__=normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,!1,createInjector,void 0,void 0);var script$1={components:{bpIcon:bpLibs.VueObject.bpIcon,widget:__vue_component__},props:{visible:Boolean,mask:{default:!0,type:Boolean},maskClose:Boolean,pageClass:String|Array,pageStyle:String|Array|Object,showClose:{default:!0,type:Boolean},title:String},data(){return{visibleReal:!1,footClass:null}},watch:{visible(a){this.visibleReal=a},visibleReal(a){this.$emit("update:visible",a)}},beforeMount(){this.visibleReal=this.visible;let a=this.$slots.foot;a&&a[0]&&a[0].children&&(1==a[0].children.length?this.footClass="bp-dialog__footOneButton":2==a[0].children.length?this.footClass="bp-dialog__footTwoButton":3==a[0].children.length&&(this.footClass="bp-dialog__footThreeButton"))},beforeDestroy(){},mounted(){},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()}}};const __vue_script__$1=script$1;var __vue_render__$1=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-dialog",attrs:{visible:a.visibleReal,maskClose:a.maskClose,mask:a.mask,pageClass:a.pageClass,pageStyle:a.pageStyle,preventEvent:!0},on:{"update:visible":function(b){a.visibleReal=b}}},[a.$slots.title?c("div",{staticClass:"bp-dialog__title bp-ellipsis"},[a._t("title")],2):a.title?c("div",{staticClass:"bp-dialog__title bp-ellipsis"},[a._v(a._s(a.title))]):a._e(),a._v(" "),c("div",{staticClass:"bp-dialog__main"},[a._t("default")],2),a._v(" "),a.$slots.foot?c("div",{staticClass:"bp-dialog__foot",class:a.footClass},[a._t("foot")],2):a._e(),a._v(" "),a.showClose?c("bp-icon",{staticClass:"bp-dialog__close",attrs:{name:"bp-dialog_close"},on:{click:function(){a.hide().then(function(){})}}}):a._e()],1)},__vue_staticRenderFns__$1=[];__vue_render__$1._withStripped=!0;const __vue_inject_styles__$1=function(a){a&&a("data-v-ea2f065a_0",{source:"\n\n/*# sourceMappingURL=dialog.vue.map */",map:{version:3,sources:["dialog.vue"],names:[],mappings:";;AAEA,qCAAqC",file:"dialog.vue"},media:void 0})},__vue_scope_id__$1=void 0,__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1,__vue_component__$1=normalizeComponent({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,!1,createInjector,void 0,void 0);var script$2={components:{bpDialog:__vue_component__$1},data(){return{title:"",content:"",okText:"\u786E\u8BA4"}}};const __vue_script__$2=script$2;var __vue_render__$2=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("bp-dialog",{attrs:{title:a.title,showClose:!1}},[a._v("\n "+a._s(a.content)+"\n "),c("div",{attrs:{slot:"foot"},slot:"foot"},[c("button",{on:{click:function(){return a.$emit("confirm")}}},[a._v(a._s(a.okText))])])])},__vue_staticRenderFns__$2=[];__vue_render__$2._withStripped=!0;const __vue_inject_styles__$2=function(a){a&&a("data-v-43a24251_0",{source:"\n\n/*# sourceMappingURL=alert.vue.map */",map:{version:3,sources:["alert.vue"],names:[],mappings:";;AAEA,oCAAoC",file:"alert.vue"},media:void 0})},__vue_scope_id__$2=void 0,__vue_module_identifier__$2=void 0,__vue_is_functional_template__$2=!1,__vue_component__$2=normalizeComponent({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$2,__vue_scope_id__$2,__vue_is_functional_template__$2,__vue_module_identifier__$2,!1,createInjector,void 0,void 0);var script$3={components:{bpDialog:__vue_component__$1},data(){return{title:"",content:"",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88"}}};const __vue_script__$3=script$3;var __vue_render__$3=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("bp-dialog",{attrs:{title:a.title,showClose:!1}},[a._v("\n "+a._s(a.content)+"\n "),c("div",{attrs:{slot:"foot"},slot:"foot"},[c("button",{staticStyle:{"font-weight":"500"},on:{click:function(){return a.$emit("cancel")}}},[a._v(a._s(a.cancelText))]),a._v(" "),c("button",{on:{click:function(){return a.$emit("confirm")}}},[a._v(a._s(a.okText))])])])},__vue_staticRenderFns__$3=[];__vue_render__$3._withStripped=!0;const __vue_inject_styles__$3=function(a){a&&a("data-v-2be9015f_0",{source:"\n\n/*# sourceMappingURL=confirm.vue.map */",map:{version:3,sources:["confirm.vue"],names:[],mappings:";;AAEA,sCAAsC",file:"confirm.vue"},media:void 0})},__vue_scope_id__$3=void 0,__vue_module_identifier__$3=void 0,__vue_is_functional_template__$3=!1,__vue_component__$3=normalizeComponent({render:__vue_render__$3,staticRenderFns:__vue_staticRenderFns__$3},__vue_inject_styles__$3,__vue_script__$3,__vue_scope_id__$3,__vue_is_functional_template__$3,__vue_module_identifier__$3,!1,createInjector,void 0,void 0);var script$4={components:{bpIcon:bpLibs.VueObject.bpIcon,widget:__vue_component__},data(){return{content:""}}};const __vue_script__$4=script$4;var __vue_render__$4=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-loading",attrs:{mask:!1,preventEvent:!0}},[c("div",{staticClass:"bp-loading__main"},[c("bp-icon",{attrs:{name:"loading"}})],1),a._v(" "),c("div",{staticClass:"bp-loading__text"},[a._v("\n "+a._s(a.content)+"\n ")])])},__vue_staticRenderFns__$4=[];__vue_render__$4._withStripped=!0;const __vue_inject_styles__$4=function(a){a&&a("data-v-1e2576e8_0",{source:"\n\n/*# sourceMappingURL=loading.vue.map */",map:{version:3,sources:["loading.vue"],names:[],mappings:";;AAEA,sCAAsC",file:"loading.vue"},media:void 0})},__vue_scope_id__$4=void 0,__vue_module_identifier__$4=void 0,__vue_is_functional_template__$4=!1,__vue_component__$4=normalizeComponent({render:__vue_render__$4,staticRenderFns:__vue_staticRenderFns__$4},__vue_inject_styles__$4,__vue_script__$4,__vue_scope_id__$4,__vue_is_functional_template__$4,__vue_module_identifier__$4,!1,createInjector,void 0,void 0);var script$5={components:{widget:__vue_component__},data(){return{content:""}}};const __vue_script__$5=script$5;var __vue_render__$5=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-toast",staticStyle:{height:"0 !important"},attrs:{mask:!1,preventEvent:!1}},[c("div",{staticClass:"bp-toast__main"},[a._v("\n "+a._s(a.content)+"\n ")])])},__vue_staticRenderFns__$5=[];__vue_render__$5._withStripped=!0;const __vue_inject_styles__$5=function(a){a&&a("data-v-3deca22f_0",{source:"\n\n/*# sourceMappingURL=toast.vue.map */",map:{version:3,sources:["toast.vue"],names:[],mappings:";;AAEA,oCAAoC",file:"toast.vue"},media:void 0})},__vue_scope_id__$5=void 0,__vue_module_identifier__$5=void 0,__vue_is_functional_template__$5=!1,__vue_component__$5=normalizeComponent({render:__vue_render__$5,staticRenderFns:__vue_staticRenderFns__$5},__vue_inject_styles__$5,__vue_script__$5,__vue_scope_id__$5,__vue_is_functional_template__$5,__vue_module_identifier__$5,!1,createInjector,void 0,void 0);function init(){bpLibs.icons.registerAliasIcon("bp-dialog_close","cancel"),registerDialogComponents({alert:__vue_component__$2,confirm:__vue_component__$3,loading:__vue_component__$4,toast:__vue_component__$5})}init();var index={init,VuePlugin,registerDialogComponents,apiWidget,bpDialog:__vue_component__$1,bpWidget:__vue_component__};export default index;
/*!
* bpui dialog v0.0.9
* bpui dialog v0.0.10
* Copyright (c) 2020 Copyright bp All Rights Reserved.
* Released under the MIT License.
*/(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("@bpui/libs"),require("febs-browser"),require("vue"),require("@bpui/component-utils")):"function"==typeof define&&define.amd?define(["@bpui/libs","febs-browser","vue","@bpui/component-utils"],b):(a=a||self,a.bpDialog=b(a.bpLibs,a.febs,a.Vue,a.bpComponentUtils))})(this,function(a,b,d,e){'use strict';function f(a){window[s]=b.utils.mergeMap(a)}function g(){return window[s]}function h(a){a?a.vm.hide().then(()=>{$(`.${a.id}`).remove()}):e.mask.removeAllApiModal(".bp-alertClass")}function i(a){let e=g().alert;if(!e)throw new Error("dialog alert component is null");("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.title=a.title||"",a=b.utils.mergeMap(e.data(),a);let f=b.utils.mergeMap(e,{data:()=>a}),c="c"+b.crypt.uuid();$(`<div id="${c}"></div>`).appendTo($("body"));let h=new d({render:b=>b(f,{class:[t,u,c],on:{confirm:()=>{a.confirm?a.confirm({vm:h.$children[0].$children[0],id:c}):h.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})}}})}).$mount(`#${c}`);return h.$children[0].$children[0].show().then(()=>{}),{vm:h.$children[0].$children[0],id:c}}function j(a){let e=g().confirm;if(!e)throw new Error("dialog confirm component is null");"string"==typeof a&&(a={content:a}),a.title=a.title||"",a=b.utils.mergeMap(e.data(),a);let f=b.utils.mergeMap(e,{data:()=>a}),c="c"+b.crypt.uuid();$(`<div id="${c}"></div>`).appendTo($("body"));let h=new d({render:b=>b(f,{class:[t,u,c],on:{confirm:()=>{a.confirm?a.confirm({vm:h.$children[0].$children[0],id:c}):h.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})},cancel:()=>{a.cancel?a.cancel({vm:h.$children[0].$children[0],id:c}):h.$children[0].$children[0].hide().then(()=>{$(`.${c}`).remove()})}}})}).$mount(`#${c}`);return h.$children[0].$children[0].show().then(()=>{}),{vm:h.$children[0].$children[0],id:c}}function k(){window[x]=null}function l(c){a.router.off("routeChanged",k),a.router.on("routeChanged",k),c||(c="");let e=g().loading;if(!e)throw new Error("dialog loading component is null");if(!window[x]){let a="c"+b.crypt.uuid();$(`<div id="${a}"></div>`).appendTo($("body"));let c=new d({render:b=>b(e,{class:[y,z,a]})}).$mount(`#${a}`);window[x]=c.$children[0]}("string"==typeof c||"number"==typeof c)&&(c={content:c.toString()}),c.delay=c.delay||0,0>c.delay&&(c.delay=0);let f=Date.now();window[w]&&(window[w].now>f+c.delay?(clearTimeout(window[w].tm),window[w]=null):window[w].cfg=b.utils.mergeMap(c));{f+=c.delay;let a=setTimeout(()=>{let a=window[w].cfg;window[w]=null,a=b.utils.mergeMap(e.data(),a),window[x].$data.content=a.content,window[x].$children[0].show()},c.delay);window[w]={tm:a,now:f,cfg:b.utils.mergeMap(c)}}}function m(a){a||(a="");let c=g().toast;if(!c)throw new Error("dialog toast component is null");("string"==typeof a||"number"==typeof a)&&(a={content:a.toString()}),a.durable=a.durable||0,0>a.durable&&(a.durable=0),0==a.durable&&(a.durable=4e3);let e="c"+b.crypt.uuid();if($(`<div id="${e}"></div>`).appendTo($("body")),window[C]){clearTimeout(window[C].tm);let a=window[C].id,b=window[D];window[C]=null,b&&(window[D]=null,b.hide().then(()=>{$("."+a).remove()}))}let f=new d({render:a=>a(c,{class:[B,e]})}).$mount(`#${e}`);f.$children[0].$data.content=a.content,f.$children[0].$children[0].show().then(()=>{}),window[D]=f.$children[0].$children[0];let h=setTimeout(()=>{let a=window[C];if(window[C]=null,a){let b=window[D],c=a.id;window[D]=null,b&&b.hide().then(()=>{c&&0<c.length&&$("."+c).remove()})}},a.durable);window[C]={tm:h,id:e}}function n(a){n.installed&&G===a||(n.installed=!0,G=a,Object.defineProperty(a.prototype,"$bpWidget",{get:function(){return F}}))}function o(a,b,c,d,e,f,g,h,i,j){"boolean"!=typeof g&&(i=h,h=g,g=!1);const k="function"==typeof c?c.options:c;a&&a.render&&(k.render=a.render,k.staticRenderFns=a.staticRenderFns,k._compiled=!0,e&&(k.functional=!0)),d&&(k._scopeId=d);let l;if(f?(l=function(a){a=a||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,a||"undefined"==typeof __VUE_SSR_CONTEXT__||(a=__VUE_SSR_CONTEXT__),b&&b.call(this,i(a)),a&&a._registeredComponents&&a._registeredComponents.add(f)},k._ssrRegister=l):b&&(l=g?function(a){b.call(this,j(a,this.$root.$options.shadowRoot))}:function(a){b.call(this,h(a))}),l)if(k.functional){const a=k.render;k.render=function(b,c){return l.call(c),a(b,c)}}else{const a=k.beforeCreate;k.beforeCreate=a?[].concat(a,l):[l]}return c}function p(){return(a,b)=>q(a,b)}function q(a,b){const c=I?b.media||"default":a,d=K[c]||(K[c]={ids:new Set,styles:[]});if(!d.ids.has(a)){d.ids.add(a);let c=b.source;if(b.map&&(c+="\n/*# sourceURL="+b.map.sources[0]+" */",c+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(b.map))))+" */"),d.element||(d.element=document.createElement("style"),d.element.type="text/css",b.media&&d.element.setAttribute("media",b.media),void 0===J&&(J=document.head||document.getElementsByTagName("head")[0]),J.appendChild(d.element)),"styleSheet"in d.element)d.styles.push(c),d.element.styleSheet.cssText=d.styles.filter(Boolean).join("\n");else{const a=d.ids.size-1,b=document.createTextNode(c),e=d.element.childNodes;e[a]&&d.element.removeChild(e[a]),e.length?d.element.insertBefore(b,e[a]):d.element.appendChild(b)}}}function r(){a.icons.registerAliasIcon("bp-dialog_close","cancel"),f({alert:S,confirm:V,loading:Y,toast:aa})}a=a&&a.hasOwnProperty("default")?a["default"]:a,b=b&&b.hasOwnProperty("default")?b["default"]:b,d=d&&d.hasOwnProperty("default")?d["default"]:d;const s=Symbol("GlobalDialogComponents"),t="bp-apiClass",u="bp-alertClass";var v=Object.freeze({__proto__:null,hideDialog:h,hideAlert:h,hideConfirm:h,showAlert:i,showConfirm:j});const w=Symbol("GlobalLoadingTimeout"),x=Symbol("GlobalLoading"),y="bp-apiClass",z="bp-loadingClass";var A=Object.freeze({__proto__:null,isLoadingVisible:function(){return 0<$(".bp-loadingClass").length},hideLoading:function(){window[w]&&(clearTimeout(window[w].tm),window[w]=null),window[x]&&window[x].$children[0].hide()},showLoading:l});const B="bp-apiClass",C=Symbol("GlobalToastTimeout"),D=Symbol("GlobalToast");var E=Object.freeze({__proto__:null,showToast:m}),F={...v,...A,...E};let G;var H={components:{},props:{visible:Boolean,mask:{default:!0,type:Boolean},maskClose:{default:!1,type:Boolean},preventEvent:{default:!0,type:Boolean},pageClass:String|Array,pageStyle:String|Array|Object},watch:{visible(a){a?this.show().then(()=>{}):this.hide().then(()=>{})}},mounted(){this.visible&&this.show().then(()=>{})},methods:{show:function(){return new Promise(a=>{e.mask.showWidget(this.$el,this.mask,this.preventEvent,()=>{this.$emit("update:visible",!0),a()})})},hide:function(){return new Promise(a=>{e.mask.hideWidget(this.$el,()=>{this.$emit("update:visible",!1),a()})})}}};const I="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());let J;const K={};var L=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("div",{staticClass:"bp-widget",on:{click:function(){a.maskClose?a.hide().then(function(){}):function(){}}}},[c("div",{staticClass:"bp-widget__content",class:a.pageClass,style:a.pageStyle,on:{click:function(a){a.stopPropagation()}}},[a._t("default")],2)])};L._withStripped=!0;const M=o({render:L,staticRenderFns:[]},function(a){a&&a("data-v-023bb380_0",{source:"\n\n/*# sourceMappingURL=widget.vue.map */",map:{version:3,sources:["widget.vue"],names:[],mappings:";;AAEA,qCAAqC",file:"widget.vue"},media:void 0})},H,void 0,!1,void 0,!1,p,void 0,void 0);var N={components:{bpIcon:a.VueObject.bpIcon,widget:M},props:{visible:Boolean,mask:{default:!0,type:Boolean},maskClose:Boolean,pageClass:String|Array,pageStyle:String|Array|Object,showClose:{default:!0,type:Boolean},title:String},data(){return{visibleReal:!1,footClass:null}},watch:{visible(a){this.visibleReal=a},visibleReal(a){this.$emit("update:visible",a)}},beforeMount(){this.visibleReal=this.visible;let a=this.$slots.foot;a&&a[0]&&a[0].children&&(1==a[0].children.length?this.footClass="bp-dialog__footOneButton":2==a[0].children.length?this.footClass="bp-dialog__footTwoButton":3==a[0].children.length&&(this.footClass="bp-dialog__footThreeButton"))},beforeDestroy(){},mounted(){},methods:{show:function(){return this.$refs.widget.show()},hide:function(){return this.$refs.widget.hide()}}};var O=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-dialog",attrs:{visible:a.visibleReal,maskClose:a.maskClose,mask:a.mask,pageClass:a.pageClass,pageStyle:a.pageStyle,preventEvent:!0},on:{"update:visible":function(b){a.visibleReal=b}}},[a.$slots.title?c("div",{staticClass:"bp-dialog__title bp-ellipsis"},[a._t("title")],2):a.title?c("div",{staticClass:"bp-dialog__title bp-ellipsis"},[a._v(a._s(a.title))]):a._e(),a._v(" "),c("div",{staticClass:"bp-dialog__main"},[a._t("default")],2),a._v(" "),a.$slots.foot?c("div",{staticClass:"bp-dialog__foot",class:a.footClass},[a._t("foot")],2):a._e(),a._v(" "),a.showClose?c("bp-icon",{staticClass:"bp-dialog__close",attrs:{name:"bp-dialog_close"},on:{click:function(){a.hide().then(function(){})}}}):a._e()],1)};O._withStripped=!0;const P=o({render:O,staticRenderFns:[]},function(a){a&&a("data-v-ea2f065a_0",{source:"\n\n/*# sourceMappingURL=dialog.vue.map */",map:{version:3,sources:["dialog.vue"],names:[],mappings:";;AAEA,qCAAqC",file:"dialog.vue"},media:void 0})},N,void 0,!1,void 0,!1,p,void 0,void 0);var Q={components:{bpDialog:P},data(){return{title:"",content:"",okText:"\u786E\u8BA4"}}};var R=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("bp-dialog",{attrs:{title:a.title,showClose:!1}},[a._v("\n "+a._s(a.content)+"\n "),c("div",{attrs:{slot:"foot"},slot:"foot"},[c("button",{on:{click:function(){return a.$emit("confirm")}}},[a._v(a._s(a.okText))])])])};R._withStripped=!0;const S=o({render:R,staticRenderFns:[]},function(a){a&&a("data-v-43a24251_0",{source:"\n\n/*# sourceMappingURL=alert.vue.map */",map:{version:3,sources:["alert.vue"],names:[],mappings:";;AAEA,oCAAoC",file:"alert.vue"},media:void 0})},Q,void 0,!1,void 0,!1,p,void 0,void 0);var T={components:{bpDialog:P},data(){return{title:"",content:"",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88"}}};var U=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("bp-dialog",{attrs:{title:a.title,showClose:!1}},[a._v("\n "+a._s(a.content)+"\n "),c("div",{attrs:{slot:"foot"},slot:"foot"},[c("button",{staticStyle:{"font-weight":"500"},on:{click:function(){return a.$emit("cancel")}}},[a._v(a._s(a.cancelText))]),a._v(" "),c("button",{on:{click:function(){return a.$emit("confirm")}}},[a._v(a._s(a.okText))])])])};U._withStripped=!0;const V=o({render:U,staticRenderFns:[]},function(a){a&&a("data-v-2be9015f_0",{source:"\n\n/*# sourceMappingURL=confirm.vue.map */",map:{version:3,sources:["confirm.vue"],names:[],mappings:";;AAEA,sCAAsC",file:"confirm.vue"},media:void 0})},T,void 0,!1,void 0,!1,p,void 0,void 0);var W={components:{bpIcon:a.VueObject.bpIcon,widget:M},data(){return{content:""}}};var X=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-loading",attrs:{mask:!1,preventEvent:!0}},[c("div",{staticClass:"bp-loading__main"},[c("bp-icon",{attrs:{name:"loading"}})],1),a._v(" "),c("div",{staticClass:"bp-loading__text"},[a._v("\n "+a._s(a.content)+"\n ")])])};X._withStripped=!0;const Y=o({render:X,staticRenderFns:[]},function(a){a&&a("data-v-1e2576e8_0",{source:"\n\n/*# sourceMappingURL=loading.vue.map */",map:{version:3,sources:["loading.vue"],names:[],mappings:";;AAEA,sCAAsC",file:"loading.vue"},media:void 0})},W,void 0,!1,void 0,!1,p,void 0,void 0);var Z={components:{widget:M},data(){return{content:""}}};var _=function(){var a=this,b=a.$createElement,c=a._self._c||b;return c("widget",{ref:"widget",staticClass:"bp-toast",staticStyle:{height:"0 !important"},attrs:{mask:!1,preventEvent:!1}},[c("div",{staticClass:"bp-toast__main"},[a._v("\n "+a._s(a.content)+"\n ")])])};_._withStripped=!0;const aa=o({render:_,staticRenderFns:[]},function(a){a&&a("data-v-3deca22f_0",{source:"\n\n/*# sourceMappingURL=toast.vue.map */",map:{version:3,sources:["toast.vue"],names:[],mappings:";;AAEA,oCAAoC",file:"toast.vue"},media:void 0})},Z,void 0,!1,void 0,!1,p,void 0,void 0);r();return{init:r,VuePlugin:function(){return{install:n}},registerDialogComponents:f,apiWidget:F,bpDialog:P,bpWidget:M}});
{
"description": "dialog",
"dependencies": {
"@bpui/button": "0.0.5",
"@bpui/component-utils": "0.0.18",
"@bpui/libs": "0.0.28",
"@bpui/button": "0.0.7",
"@bpui/component-utils": "0.0.19",
"@bpui/libs": "0.0.29",
"vue": "^2.6.11"

@@ -40,3 +40,3 @@ },

"name": "@bpui/dialog",
"version": "0.0.9"
"version": "0.0.10"
}

@@ -12,1 +12,13 @@ # dialog

```
style
```css
/* scss */
import '@bpui/libs/style';
import '@bpui/dialog/style';
/* css */
<link href="~@bpui/dialog/dist/index.css" rel="stylesheet" type="text/css"/>
```

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