UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

3 lines (2 loc) 887 B
"use strict";var v=Object.defineProperty;var u=(n,e,t)=>e in n?v(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>u(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../common/event/NeonEventBus.cjs.js"),l=require("vue"),s=class s{static async show(e){return s.resolve(!1),await l.nextTick(),s.emit(e),new Promise(t=>o.NeonEventBus.on(this.resolveEventKey,r=>{t(r)}))}static resolve(e){o.NeonEventBus.emit(s.resolveEventKey,e)}static generateEventKey(){return`${o.NeonEventBus.messagePrefix}-dialog`}static emit(e){const t=s.generateEventKey();o.NeonEventBus.emit(t,e)}};i(s,"resolveEventKey",`${o.NeonEventBus.messagePrefix}-dialog-resolve`),i(s,"defaultDialogMessage",{open:!1,title:"",question:""});let a=s;exports.NeonDialogService=a; //# sourceMappingURL=NeonDialogService.cjs.js.map