@digitalwalletcorp/vue-core 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { f as a, h as s, a as n, i as _, j as o, k as e, l as c, m as i, o as t, p as m, q as f, b as r, d as l, s as $, t as p, e as d, u as b, v as g, w as u } from "./warning-popper.vue_vue_type_style_index_0_lang-zt-jCsvz.js";
1
+ import { f as a, h as s, a as n, i as _, j as o, k as e, l as c, m as i, o as t, p as m, q as f, b as r, d as l, s as $, t as p, e as d, u as b, v as g, w as u } from "./warning-popper.vue_vue_type_style_index_0_lang-BKV_FX6k.js";
2
2
  const y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3
3
  __proto__: null,
4
4
  AccordionFieldset: a,
@@ -1 +1 @@
1
- "use strict";const n=require("./warning-popper.vue_vue_type_style_index_0_lang-CxVzqsbn.cjs"),_=Object.freeze(Object.defineProperty({__proto__:null,AccordionFieldset:n._sfc_main$5,AccordionSection:n._sfc_main$6,CopyButton:n._sfc_main$1,DarkModeSelector:n._sfc_main$7,DataTable:n._sfc_main$8,HelpButton:n._sfc_main$9,HelpPopper:n._sfc_main$10,HourglassLoading:n._sfc_main$11,IntersectionLazyComponent:n._sfc_main$12,LabelButton:n._sfc_main$13,LabelIcon:n._sfc_main$14,ModalDialog:n._sfc_main$2,OverlayBox:n._sfc_main$3,PageSection:n._sfc_main$15,PageTitle:n._sfc_main$16,ScreenLoading:n._sfc_main$4,TabContent:n._sfc_main$17,TabGroup:n._sfc_main$18,WarningPopper:n._sfc_main$19},Symbol.toStringTag,{value:"Module"}));exports.components=_;
1
+ "use strict";const n=require("./warning-popper.vue_vue_type_style_index_0_lang-CHmkjVCO.cjs"),_=Object.freeze(Object.defineProperty({__proto__:null,AccordionFieldset:n._sfc_main$5,AccordionSection:n._sfc_main$6,CopyButton:n._sfc_main$1,DarkModeSelector:n._sfc_main$7,DataTable:n._sfc_main$8,HelpButton:n._sfc_main$9,HelpPopper:n._sfc_main$10,HourglassLoading:n._sfc_main$11,IntersectionLazyComponent:n._sfc_main$12,LabelButton:n._sfc_main$13,LabelIcon:n._sfc_main$14,ModalDialog:n._sfc_main$2,OverlayBox:n._sfc_main$3,PageSection:n._sfc_main$15,PageTitle:n._sfc_main$16,ScreenLoading:n._sfc_main$4,TabContent:n._sfc_main$17,TabGroup:n._sfc_main$18,WarningPopper:n._sfc_main$19},Symbol.toStringTag,{value:"Module"}));exports.components=_;
@@ -3,7 +3,6 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
3
3
  props: __VLS_PrettifyLocal<DataTableProps<T> & {
4
4
  "onEmit:selectRow"?: ((value: T | undefined, index: number) => any) | undefined;
5
5
  "onEmit:changeSort"?: ((context: DataTableSortContext) => any) | undefined;
6
- "onEmit:sortData"?: ((dataList: T[]) => any) | undefined;
7
6
  "onEmit:updateHeader"?: ((headers: DataTableHeader<T>[]) => any) | undefined;
8
7
  "onEmit:dblclickRow"?: ((value: T, index: number) => any) | undefined;
9
8
  "onEmit:changeLimit"?: ((limit: number) => any) | undefined;
@@ -3,7 +3,6 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
3
3
  props: __VLS_PrettifyLocal<DataTableProps<T> & {
4
4
  "onEmit:selectRow"?: ((value: T | undefined, index: number) => any) | undefined;
5
5
  "onEmit:changeSort"?: ((context: DataTableSortContext) => any) | undefined;
6
- "onEmit:sortData"?: ((dataList: T[]) => any) | undefined;
7
6
  "onEmit:updateHeader"?: ((headers: DataTableHeader<T>[]) => any) | undefined;
8
7
  "onEmit:dblclickRow"?: ((value: T, index: number) => any) | undefined;
9
8
  "onEmit:changeLimit"?: ((limit: number) => any) | undefined;
@@ -42,6 +42,10 @@ export interface ShowFloatingComponentOptions {
42
42
  /** ウィンドウが閉じ終わって取り外されたときに呼ぶ関数。ハンドル・利用者の操作・closeAllFloatingComponents のどれで閉じても呼ぶ */
43
43
  onClose?: () => void;
44
44
  }
45
+ export interface ShowFloatingMessageOptions extends ShowFloatingComponentOptions {
46
+ /** trueを指定した場合、文字列をHTMLとして表示する。オブジェクトには影響しない */
47
+ html?: boolean;
48
+ }
45
49
  /**
46
50
  * FloatingComponent を body の末尾に描画し、中身にコンポーネントを表示する。
47
51
  * 中身のコンポーネントには、渡した props に加えて close と setLoading を props として渡す。
@@ -55,15 +59,15 @@ export interface ShowFloatingComponentOptions {
55
59
  export declare function showFloatingComponent(component: Component, props?: Record<string, unknown>, options?: ShowFloatingComponentOptions): FloatingComponentHandle;
56
60
  /**
57
61
  * FloatingComponent を body の末尾に描画し、中身に文字列を表示する。
58
- * 文字列は HTML として解釈せず、改行や空白をそのまま表示する。オブジェクトは整形した JSON で表示する。
59
- * 見出しのコピーボタンは、copyValue を指定しなければ表示した文字列をコピーする。
62
+ * 文字列は改行や空白をそのまま表示し、html を指定すれば HTML として表示する。オブジェクトは整形した JSON で表示する。
63
+ * 見出しのコピーボタンは、copyValue を指定しなければ渡した文字列をコピーする。
60
64
  * ブラウザでのみ動作する
61
65
  *
62
66
  * @param {string | object} message 表示する文字列またはオブジェクト
63
- * @param {ShowFloatingComponentOptions} [options]
67
+ * @param {ShowFloatingMessageOptions} [options]
64
68
  * @returns {FloatingComponentHandle}
65
69
  */
66
- export declare function showFloatingMessage(message: string | object, options?: ShowFloatingComponentOptions): FloatingComponentHandle;
70
+ export declare function showFloatingMessage(message: string | object, options?: ShowFloatingMessageOptions): FloatingComponentHandle;
67
71
  /**
68
72
  * 開いている FloatingComponent をすべて閉じる
69
73
  */
@@ -42,6 +42,10 @@ export interface ShowFloatingComponentOptions {
42
42
  /** ウィンドウが閉じ終わって取り外されたときに呼ぶ関数。ハンドル・利用者の操作・closeAllFloatingComponents のどれで閉じても呼ぶ */
43
43
  onClose?: () => void;
44
44
  }
45
+ export interface ShowFloatingMessageOptions extends ShowFloatingComponentOptions {
46
+ /** trueを指定した場合、文字列をHTMLとして表示する。オブジェクトには影響しない */
47
+ html?: boolean;
48
+ }
45
49
  /**
46
50
  * FloatingComponent を body の末尾に描画し、中身にコンポーネントを表示する。
47
51
  * 中身のコンポーネントには、渡した props に加えて close と setLoading を props として渡す。
@@ -55,15 +59,15 @@ export interface ShowFloatingComponentOptions {
55
59
  export declare function showFloatingComponent(component: Component, props?: Record<string, unknown>, options?: ShowFloatingComponentOptions): FloatingComponentHandle;
56
60
  /**
57
61
  * FloatingComponent を body の末尾に描画し、中身に文字列を表示する。
58
- * 文字列は HTML として解釈せず、改行や空白をそのまま表示する。オブジェクトは整形した JSON で表示する。
59
- * 見出しのコピーボタンは、copyValue を指定しなければ表示した文字列をコピーする。
62
+ * 文字列は改行や空白をそのまま表示し、html を指定すれば HTML として表示する。オブジェクトは整形した JSON で表示する。
63
+ * 見出しのコピーボタンは、copyValue を指定しなければ渡した文字列をコピーする。
60
64
  * ブラウザでのみ動作する
61
65
  *
62
66
  * @param {string | object} message 表示する文字列またはオブジェクト
63
- * @param {ShowFloatingComponentOptions} [options]
67
+ * @param {ShowFloatingMessageOptions} [options]
64
68
  * @returns {FloatingComponentHandle}
65
69
  */
66
- export declare function showFloatingMessage(message: string | object, options?: ShowFloatingComponentOptions): FloatingComponentHandle;
70
+ export declare function showFloatingMessage(message: string | object, options?: ShowFloatingMessageOptions): FloatingComponentHandle;
67
71
  /**
68
72
  * 開いている FloatingComponent をすべて閉じる
69
73
  */
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./warning-popper.vue_vue_type_style_index_0_lang-CxVzqsbn.cjs"),e=require("vue"),F=require("@digitalwalletcorp/vue-svg-icons"),W="$index",B=o=>{const t=[];for(const n of o)if(n.csv===!0)t.push({header:n,column:{}});else if(Array.isArray(n.csv))for(const a of n.csv)a.disabled||t.push({header:n,column:a});return t},N=o=>B(o).map(({header:t,column:n})=>r.resolveLabel(n.label??t.label)),P=(o,t,n)=>B(o).map(({header:a,column:l})=>{if(l.format)return l.format(t);const s=l.key??a.id;return s===W?n:r.getValueByPath(t,s)}),z=e.defineComponent({__name:"floating-component",props:{open:{type:Boolean},title:{},anchor:{},dragMode:{},loading:{type:Boolean},closeLabel:{},copyValue:{type:[String,Number,Function]},copyLabel:{},closeOnDblClick:{type:Boolean},lockScroll:{type:Boolean},initialSize:{},headerClass:{type:[Boolean,null,String,Object,Array]},headerStyle:{type:[Boolean,null,String,Object,Array]}},emits:["update:open","emit:close"],setup(o,{emit:t}){const n=o,a=t,l=e.ref(),s=e.ref(r.nextWindowOrder()),c=()=>{s.value=r.nextWindowOrder()},d=()=>{n.closeOnDblClick&&a("update:open",!1)},i=()=>{const u=l.value;if(!u?.element)return;const m=u.element.getBoundingClientRect();let p=n.initialSize?.width??m.width;window.innerWidth<p&&(p=window.innerWidth*.9);let f=n.initialSize?.height??-1;window.innerHeight<f&&(f=window.innerHeight*.9),u.size.width=p,u.size.height=f;const _=document.documentElement.scrollLeft,b=document.documentElement.scrollTop;if(n.anchor){const V={width:p,height:0<=f?f:m.height},M={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight},v=r.computeAnchoredPosition(n.anchor.getBoundingClientRect(),V,M,{placement:"bottom-start",offset:0,margin:0,arrowMargin:0});u.position.x=v.left+_,u.position.y=v.top+b}else u.position.x=10+_,u.position.y=10+b};return e.onMounted(()=>{n.open&&i()}),(u,m)=>(e.openBlock(),e.createBlock(e.Transition,{name:"dwui-floating-component-fade",onAfterLeave:m[1]||(m[1]=p=>a("emit:close"))},{default:e.withCtx(()=>[n.open?(e.openBlock(),e.createBlock(r._sfc_main,{key:0,ref_key:"refWindow",ref:l,class:e.normalizeClass(["dwui-floating-component",{"dwui-lock-scroll":n.lockScroll}]),name:"dwui-floating-component",style:e.normalizeStyle({"--dwui-order-window":s.value}),"drag-mode":n.dragMode,loading:n.loading,"close-label":n.closeLabel,"clamp-bottom":!1,"header-class":n.headerClass,"header-style":n.headerStyle,onPointerdownCapture:c,onDblclick:d,"onEmit:close":m[0]||(m[0]=p=>a("update:open",!1))},e.createSlots({title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:2},[n.copyValue!=null?{name:"actions",fn:e.withCtx(()=>[e.createVNode(r._sfc_main$1,{class:"dwui-floating-component-copy-button",value:n.copyValue,"aria-label":n.copyLabel},null,8,["value","aria-label"])]),key:"0"}:void 0]),1032,["class","style","drag-mode","loading","close-label","header-class","header-style"])):e.createCommentVNode("",!0)]),_:3}))}});function x(o,t,n){const a=document.createElement("div");document.body.appendChild(a);const l=e.ref(!0),s=e.ref(!1),c={close:()=>{l.value=!1},setLoading:u=>{s.value=u}},d=e.defineComponent(()=>()=>o({open:l.value,loading:s.value,"onUpdate:open":u=>{l.value=u},"onEmit:close":()=>{n.delete(c),e.render(null,a),a.remove(),t.onClosed?.(),t.onClose?.()}},c)),i=e.h(d);return t.appContext&&(i.appContext=t.appContext),e.render(i,a),n.add(c),c}function S(o){const t=e.getCurrentInstance();if(!t)throw new Error(`${o}() must be called inside setup().`);const n=new Set;return e.onBeforeUnmount(()=>{for(const a of n)a.close()}),{appContext:t.appContext,own:a=>{const l=a(()=>{n.delete(l)});return n.add(l),l}}}const $=new Set,h=(o,t,n)=>{const{appContext:a,onClose:l,...s}=t??{};return x((c,d)=>e.h(z,{closeLabel:"Close",copyLabel:"Copy",closeOnDblClick:!1,lockScroll:!1,...s,...c},{default:()=>o(d)}),{appContext:a,onClose:l,onClosed:n},$)},L=(o,t)=>n=>e.h(o,{...t,...n}),E=o=>typeof o=="string"?o:JSON.stringify(o,null,2),D=o=>()=>e.h("div",{class:"dwui-floating-component-message"},o);function I(o,t,n){return h(L(o,t),n)}function H(o,t){const n=E(o);return h(D(n),{copyValue:n,...t})}function R(){for(const o of[...$])o.close()}function j(){const o=S("useFloatingComponent"),t=n=>({appContext:o.appContext,...n});return{showFloatingComponent:(n,a,l)=>o.own(s=>h(L(n,a),t(l),s)),showFloatingMessage:(n,a)=>{const l=E(n);return o.own(s=>h(D(l),t({copyValue:l,...a}),s))}}}function w(o,t){const{icon:n,appContext:a,...l}=t??{};return new Promise(s=>{const c=document.createElement("div");document.body.appendChild(c);const d=e.h(r._sfc_main$2,{...l,message:o,open:!0,"onEmit:close":i=>{e.render(null,c),c.remove(),s(i)}},n?{icon:()=>e.h(n)}:void 0);a&&(d.appContext=a),e.render(d,c)})}function q(o,t){return w(o,{...t,type:"info"})}function G(o,t){return w(o,{...t,type:"confirm"})}function U(o,t){return w(o,{...t,type:"warn"})}function J(o,t){return w(o,{...t,type:"error"})}const O=new Set,T=(o,t,n,a)=>{const{appContext:l,onClose:s,...c}=n??{};return x((d,i)=>e.h(r._sfc_main$3,{...c,...d},{default:()=>e.h(o,{...t,close:i.close,setLoading:i.setLoading})}),{appContext:l,onClose:s,onClosed:a},O)};function K(o,t,n){return T(o,t,n)}function X(){for(const o of[...O])o.close()}function Y(){const o=S("useOverlayBox");return{showOverlayBox:(t,n,a)=>o.own(l=>T(t,n,{appContext:o.appContext,...a},l))}}function Q(o){const t=document.createElement("div");document.body.appendChild(t);const n=()=>{e.render(null,t),t.remove()};return e.render(e.h(r._sfc_main$4,{...o,loading:!0}),t),{close:n}}const Z=["aria-label","title"],ee=["title","onClick"],ne={key:0,class:"dwui-snackbar-header"},oe={key:0,class:"dwui-snackbar-title"},te={key:1,class:"dwui-snackbar-label"},ae={class:"dwui-snackbar-message"},le={key:1,class:"dwui-snackbar-timestamp"},se=e.defineComponent({__name:"snackbar-container",props:{placement:{},direction:{},items:{}},emits:["emit:close","emit:clear","emit:afterLeave"],setup(o,{emit:t}){const n=o,a=t,l=e.computed(()=>{const[c,d="center"]=n.placement.split("-");return[`dwui-snackbar-container-${c}`,`dwui-snackbar-container-${d}`,`dwui-snackbar-container-${n.direction}`]}),s=e.computed(()=>n.items.filter(c=>c.clearable).at(-1)?.clearLabel);return(c,d)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div",name:"dwui-snackbar-fade",class:e.normalizeClass(["dwui-snackbar-container",l.value]),role:"status",onAfterLeave:d[1]||(d[1]=i=>a("emit:afterLeave"))},{default:e.withCtx(()=>[s.value!=null?(e.openBlock(),e.createElementBlock("button",{key:"clear",type:"button",class:"dwui-snackbar-clear-button","aria-label":s.value,title:s.value,onClick:d[0]||(d[0]=i=>a("emit:clear"))},[e.createVNode(e.unref(F.SvgWastebasket))],8,Z)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,i=>(e.openBlock(),e.createElementBlock("button",{key:i.id,type:"button",class:e.normalizeClass(["dwui-snackbar",i.class]),style:e.normalizeStyle(i.style),title:i.message,onClick:u=>a("emit:close",i.id)},[i.title||i.label?(e.openBlock(),e.createElementBlock("span",ne,[i.title?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),i.label?(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(i.label),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",ae,e.toDisplayString(i.message),1),i.timestamp?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(i.timestamp),1)):e.createCommentVNode("",!0)],14,ee))),128))]),_:1},8,["class"]))}}),re=50,g=new Map,y=new Map;let k=0;const C=(o,t,n)=>{const a=o.findIndex(s=>s.id===t);if(a<0)return;o.splice(a,1);const l=y.get(t);y.delete(t),clearTimeout(l?.timer),l?.onClose?.(n)},A=o=>{const t=o.map(n=>n.id);for(let n=0;n<t.length;n++)setTimeout(()=>C(o,t[n],"clear"),re*n)},ie=(o,t)=>{const n=`${o} ${t}`,a=g.get(n);if(a)return a;const l=document.createElement("div");document.body.appendChild(l);const s=e.shallowReactive([]);return g.set(n,s),e.render(e.h(se,{placement:o,direction:t,items:s,"onEmit:close":c=>C(s,c,"click"),"onEmit:clear":()=>A(s),"onEmit:afterLeave":()=>{s.length===0&&g.get(n)===s&&(g.delete(n),e.render(null,l),l.remove())}}),l),s};function ce(o,t){const{placement:n="bottom",direction:a="overlap",duration:l,clearable:s=!1,clearLabel:c="Clear all",onClose:d,...i}=t??{},u=ie(n,a);k+=1;const m=k;return u.push({...i,id:m,message:o,clearable:s,clearLabel:c}),y.set(m,{timer:l?setTimeout(()=>C(u,m,"duration"),l):void 0,onClose:d}),{close:()=>C(u,m,"handle")}}function de(){for(const o of g.values())A(o)}exports.AccordionFieldset=r._sfc_main$5;exports.AccordionSection=r._sfc_main$6;exports.CopyButton=r._sfc_main$1;exports.DarkModeSelector=r._sfc_main$7;exports.DataTable=r._sfc_main$8;exports.HelpButton=r._sfc_main$9;exports.HelpPopper=r._sfc_main$10;exports.HourglassLoading=r._sfc_main$11;exports.IntersectionLazyComponent=r._sfc_main$12;exports.LabelButton=r._sfc_main$13;exports.LabelIcon=r._sfc_main$14;exports.ModalDialog=r._sfc_main$2;exports.OverlayBox=r._sfc_main$3;exports.PageSection=r._sfc_main$15;exports.PageTitle=r._sfc_main$16;exports.ScreenLoading=r._sfc_main$4;exports.TabContent=r._sfc_main$17;exports.TabGroup=r._sfc_main$18;exports.WarningPopper=r._sfc_main$19;exports.closeAllFloatingComponents=R;exports.closeAllOverlayBoxes=X;exports.closeAllSnackbars=de;exports.headersToCsvColumns=N;exports.rowToCsvColumns=P;exports.showConfirmationDialog=G;exports.showErrorDialog=J;exports.showFloatingComponent=I;exports.showFloatingMessage=H;exports.showInformationDialog=q;exports.showModalDialog=w;exports.showOverlayBox=K;exports.showScreenLoading=Q;exports.showSnackbar=ce;exports.showWarningDialog=U;exports.useFloatingComponent=j;exports.useOverlayBox=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./warning-popper.vue_vue_type_style_index_0_lang-CHmkjVCO.cjs"),e=require("vue"),F=require("@digitalwalletcorp/vue-svg-icons"),W="$index",x=o=>{const t=[];for(const n of o)if(n.csv===!0)t.push({header:n,column:{}});else if(Array.isArray(n.csv))for(const a of n.csv)a.disabled||t.push({header:n,column:a});return t},N=o=>x(o).map(({header:t,column:n})=>r.resolveLabel(n.label??t.label)),P=(o,t,n)=>x(o).map(({header:a,column:l})=>{if(l.format)return l.format(t);const s=l.key??a.id;return s===W?n:r.getValueByPath(t,s)}),z=e.defineComponent({__name:"floating-component",props:{open:{type:Boolean},title:{},anchor:{},dragMode:{},loading:{type:Boolean},closeLabel:{},copyValue:{type:[String,Number,Function]},copyLabel:{},closeOnDblClick:{type:Boolean},lockScroll:{type:Boolean},initialSize:{},headerClass:{type:[Boolean,null,String,Object,Array]},headerStyle:{type:[Boolean,null,String,Object,Array]}},emits:["update:open","emit:close"],setup(o,{emit:t}){const n=o,a=t,l=e.ref(),s=e.ref(r.nextWindowOrder()),c=()=>{s.value=r.nextWindowOrder()},d=()=>{n.closeOnDblClick&&a("update:open",!1)},i=()=>{const u=l.value;if(!u?.element)return;const p=u.element.getBoundingClientRect();let m=n.initialSize?.width??p.width;window.innerWidth<m&&(m=window.innerWidth*.9);let f=n.initialSize?.height??-1;window.innerHeight<f&&(f=window.innerHeight*.9),u.size.width=m,u.size.height=f;const b=document.documentElement.scrollLeft,v=document.documentElement.scrollTop;if(n.anchor){const M={width:m,height:0<=f?f:p.height},V={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight},k=r.computeAnchoredPosition(n.anchor.getBoundingClientRect(),M,V,{placement:"bottom-start",offset:0,margin:0,arrowMargin:0});u.position.x=k.left+b,u.position.y=k.top+v}else u.position.x=10+b,u.position.y=10+v};return e.onMounted(()=>{n.open&&i()}),(u,p)=>(e.openBlock(),e.createBlock(e.Transition,{name:"dwui-floating-component-fade",onAfterLeave:p[1]||(p[1]=m=>a("emit:close"))},{default:e.withCtx(()=>[n.open?(e.openBlock(),e.createBlock(r._sfc_main,{key:0,ref_key:"refWindow",ref:l,class:e.normalizeClass(["dwui-floating-component",{"dwui-lock-scroll":n.lockScroll}]),name:"dwui-floating-component",style:e.normalizeStyle({"--dwui-order-window":s.value}),"drag-mode":n.dragMode,loading:n.loading,"close-label":n.closeLabel,"clamp-bottom":!1,"header-class":n.headerClass,"header-style":n.headerStyle,onPointerdownCapture:c,onDblclick:d,"onEmit:close":p[0]||(p[0]=m=>a("update:open",!1))},e.createSlots({title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:2},[n.copyValue!=null?{name:"actions",fn:e.withCtx(()=>[e.createVNode(r._sfc_main$1,{class:"dwui-floating-component-copy-button",value:n.copyValue,"aria-label":n.copyLabel},null,8,["value","aria-label"])]),key:"0"}:void 0]),1032,["class","style","drag-mode","loading","close-label","header-class","header-style"])):e.createCommentVNode("",!0)]),_:3}))}});function S(o,t,n){const a=document.createElement("div");document.body.appendChild(a);const l=e.ref(!0),s=e.ref(!1),c={close:()=>{l.value=!1},setLoading:u=>{s.value=u}},d=e.defineComponent(()=>()=>o({open:l.value,loading:s.value,"onUpdate:open":u=>{l.value=u},"onEmit:close":()=>{n.delete(c),e.render(null,a),a.remove(),t.onClosed?.(),t.onClose?.()}},c)),i=e.h(d);return t.appContext&&(i.appContext=t.appContext),e.render(i,a),n.add(c),c}function $(o){const t=e.getCurrentInstance();if(!t)throw new Error(`${o}() must be called inside setup().`);const n=new Set;return e.onBeforeUnmount(()=>{for(const a of n)a.close()}),{appContext:t.appContext,own:a=>{const l=a(()=>{n.delete(l)});return n.add(l),l}}}const L=new Set,h=(o,t,n)=>{const{appContext:a,onClose:l,...s}=t??{};return S((c,d)=>e.h(z,{closeLabel:"Close",copyLabel:"Copy",closeOnDblClick:!1,lockScroll:!1,...s,...c},{default:()=>o(d)}),{appContext:a,onClose:l,onClosed:n},L)},E=(o,t)=>n=>e.h(o,{...t,...n}),_=o=>typeof o=="string"?o:JSON.stringify(o,null,2),D=(o,t)=>()=>t&&typeof o=="string"?e.h("div",{class:"dwui-floating-component-message",innerHTML:o}):e.h("div",{class:"dwui-floating-component-message"},_(o));function I(o,t,n){return h(E(o,t),n)}function H(o,t){const{html:n,...a}=t??{};return h(D(o,n),{copyValue:_(o),...a})}function R(){for(const o of[...L])o.close()}function j(){const o=$("useFloatingComponent"),t=n=>({appContext:o.appContext,...n});return{showFloatingComponent:(n,a,l)=>o.own(s=>h(E(n,a),t(l),s)),showFloatingMessage:(n,a)=>{const{html:l,...s}=a??{};return o.own(c=>h(D(n,l),t({copyValue:_(n),...s}),c))}}}function g(o,t){const{icon:n,appContext:a,...l}=t??{};return new Promise(s=>{const c=document.createElement("div");document.body.appendChild(c);const d=e.h(r._sfc_main$2,{...l,message:o,open:!0,"onEmit:close":i=>{e.render(null,c),c.remove(),s(i)}},n?{icon:()=>e.h(n)}:void 0);a&&(d.appContext=a),e.render(d,c)})}function q(o,t){return g(o,{...t,type:"info"})}function G(o,t){return g(o,{...t,type:"confirm"})}function U(o,t){return g(o,{...t,type:"warn"})}function J(o,t){return g(o,{...t,type:"error"})}const O=new Set,T=(o,t,n,a)=>{const{appContext:l,onClose:s,...c}=n??{};return S((d,i)=>e.h(r._sfc_main$3,{...c,...d},{default:()=>e.h(o,{...t,close:i.close,setLoading:i.setLoading})}),{appContext:l,onClose:s,onClosed:a},O)};function K(o,t,n){return T(o,t,n)}function X(){for(const o of[...O])o.close()}function Y(){const o=$("useOverlayBox");return{showOverlayBox:(t,n,a)=>o.own(l=>T(t,n,{appContext:o.appContext,...a},l))}}function Q(o){const t=document.createElement("div");document.body.appendChild(t);const n=()=>{e.render(null,t),t.remove()};return e.render(e.h(r._sfc_main$4,{...o,loading:!0}),t),{close:n}}const Z=["aria-label","title"],ee=["title","onClick"],ne={key:0,class:"dwui-snackbar-header"},oe={key:0,class:"dwui-snackbar-title"},te={key:1,class:"dwui-snackbar-label"},ae={class:"dwui-snackbar-message"},le={key:1,class:"dwui-snackbar-timestamp"},se=e.defineComponent({__name:"snackbar-container",props:{placement:{},direction:{},items:{}},emits:["emit:close","emit:clear","emit:afterLeave"],setup(o,{emit:t}){const n=o,a=t,l=e.computed(()=>{const[c,d="center"]=n.placement.split("-");return[`dwui-snackbar-container-${c}`,`dwui-snackbar-container-${d}`,`dwui-snackbar-container-${n.direction}`]}),s=e.computed(()=>n.items.filter(c=>c.clearable).at(-1)?.clearLabel);return(c,d)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div",name:"dwui-snackbar-fade",class:e.normalizeClass(["dwui-snackbar-container",l.value]),role:"status",onAfterLeave:d[1]||(d[1]=i=>a("emit:afterLeave"))},{default:e.withCtx(()=>[s.value!=null?(e.openBlock(),e.createElementBlock("button",{key:"clear",type:"button",class:"dwui-snackbar-clear-button","aria-label":s.value,title:s.value,onClick:d[0]||(d[0]=i=>a("emit:clear"))},[e.createVNode(e.unref(F.SvgWastebasket))],8,Z)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,i=>(e.openBlock(),e.createElementBlock("button",{key:i.id,type:"button",class:e.normalizeClass(["dwui-snackbar",i.class]),style:e.normalizeStyle(i.style),title:i.message,onClick:u=>a("emit:close",i.id)},[i.title||i.label?(e.openBlock(),e.createElementBlock("span",ne,[i.title?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(i.title),1)):e.createCommentVNode("",!0),i.label?(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(i.label),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",ae,e.toDisplayString(i.message),1),i.timestamp?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(i.timestamp),1)):e.createCommentVNode("",!0)],14,ee))),128))]),_:1},8,["class"]))}}),re=50,w=new Map,y=new Map;let B=0;const C=(o,t,n)=>{const a=o.findIndex(s=>s.id===t);if(a<0)return;o.splice(a,1);const l=y.get(t);y.delete(t),clearTimeout(l?.timer),l?.onClose?.(n)},A=o=>{const t=o.map(n=>n.id);for(let n=0;n<t.length;n++)setTimeout(()=>C(o,t[n],"clear"),re*n)},ie=(o,t)=>{const n=`${o} ${t}`,a=w.get(n);if(a)return a;const l=document.createElement("div");document.body.appendChild(l);const s=e.shallowReactive([]);return w.set(n,s),e.render(e.h(se,{placement:o,direction:t,items:s,"onEmit:close":c=>C(s,c,"click"),"onEmit:clear":()=>A(s),"onEmit:afterLeave":()=>{s.length===0&&w.get(n)===s&&(w.delete(n),e.render(null,l),l.remove())}}),l),s};function ce(o,t){const{placement:n="bottom",direction:a="overlap",duration:l,clearable:s=!1,clearLabel:c="Clear all",onClose:d,...i}=t??{},u=ie(n,a);B+=1;const p=B;return u.push({...i,id:p,message:o,clearable:s,clearLabel:c}),y.set(p,{timer:l?setTimeout(()=>C(u,p,"duration"),l):void 0,onClose:d}),{close:()=>C(u,p,"handle")}}function de(){for(const o of w.values())A(o)}exports.AccordionFieldset=r._sfc_main$5;exports.AccordionSection=r._sfc_main$6;exports.CopyButton=r._sfc_main$1;exports.DarkModeSelector=r._sfc_main$7;exports.DataTable=r._sfc_main$8;exports.HelpButton=r._sfc_main$9;exports.HelpPopper=r._sfc_main$10;exports.HourglassLoading=r._sfc_main$11;exports.IntersectionLazyComponent=r._sfc_main$12;exports.LabelButton=r._sfc_main$13;exports.LabelIcon=r._sfc_main$14;exports.ModalDialog=r._sfc_main$2;exports.OverlayBox=r._sfc_main$3;exports.PageSection=r._sfc_main$15;exports.PageTitle=r._sfc_main$16;exports.ScreenLoading=r._sfc_main$4;exports.TabContent=r._sfc_main$17;exports.TabGroup=r._sfc_main$18;exports.WarningPopper=r._sfc_main$19;exports.closeAllFloatingComponents=R;exports.closeAllOverlayBoxes=X;exports.closeAllSnackbars=de;exports.headersToCsvColumns=N;exports.rowToCsvColumns=P;exports.showConfirmationDialog=G;exports.showErrorDialog=J;exports.showFloatingComponent=I;exports.showFloatingMessage=H;exports.showInformationDialog=q;exports.showModalDialog=g;exports.showOverlayBox=K;exports.showScreenLoading=Q;exports.showSnackbar=ce;exports.showWarningDialog=U;exports.useFloatingComponent=j;exports.useOverlayBox=Y;
package/lib/index.d.cts CHANGED
@@ -20,7 +20,7 @@ export type { Props as WarningPopperProps, Emits as WarningPopperEmits, Slots as
20
20
  export { headersToCsvColumns, rowToCsvColumns } from './helpers/data-table-csv.cjs';
21
21
  export type { DataTableControlsPlacement, DataTableCsvColumn, DataTableEmits, DataTableHeader, DataTableLabels, DataTableProps, DataTableResolvedLabels, DataTableSlots, DataTableSortContext, DataTableSortMode, DataTableValueType } from './types/data-table.cjs';
22
22
  export { closeAllFloatingComponents, showFloatingComponent, showFloatingMessage, useFloatingComponent } from './helpers/show-floating-component.cjs';
23
- export type { FloatingComponentContentProps, FloatingComponentHandle, ShowFloatingComponentOptions } from './helpers/show-floating-component.cjs';
23
+ export type { FloatingComponentContentProps, FloatingComponentHandle, ShowFloatingComponentOptions, ShowFloatingMessageOptions } from './helpers/show-floating-component.cjs';
24
24
  export { showConfirmationDialog, showErrorDialog, showInformationDialog, showModalDialog, showWarningDialog } from './helpers/show-modal-dialog.cjs';
25
25
  export type { ShowModalDialogOptions } from './helpers/show-modal-dialog.cjs';
26
26
  export type { ModalDialogButton, ModalDialogImage, ModalDialogResult, ModalDialogType } from './types/modal-dialog.cjs';
package/lib/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export type { Props as WarningPopperProps, Emits as WarningPopperEmits, Slots as
20
20
  export { headersToCsvColumns, rowToCsvColumns } from './helpers/data-table-csv';
21
21
  export type { DataTableControlsPlacement, DataTableCsvColumn, DataTableEmits, DataTableHeader, DataTableLabels, DataTableProps, DataTableResolvedLabels, DataTableSlots, DataTableSortContext, DataTableSortMode, DataTableValueType } from './types/data-table';
22
22
  export { closeAllFloatingComponents, showFloatingComponent, showFloatingMessage, useFloatingComponent } from './helpers/show-floating-component';
23
- export type { FloatingComponentContentProps, FloatingComponentHandle, ShowFloatingComponentOptions } from './helpers/show-floating-component';
23
+ export type { FloatingComponentContentProps, FloatingComponentHandle, ShowFloatingComponentOptions, ShowFloatingMessageOptions } from './helpers/show-floating-component';
24
24
  export { showConfirmationDialog, showErrorDialog, showInformationDialog, showModalDialog, showWarningDialog } from './helpers/show-modal-dialog';
25
25
  export type { ShowModalDialogOptions } from './helpers/show-modal-dialog';
26
26
  export type { ModalDialogButton, ModalDialogImage, ModalDialogResult, ModalDialogType } from './types/modal-dialog';
package/lib/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { r as K, g as X, n as T, _ as Y, a as Q, c as Z, b as ee, d as ne, e as te } from "./warning-popper.vue_vue_type_style_index_0_lang-zt-jCsvz.js";
2
- import { f as Xe, h as Ye, i as Qe, j as Ze, k as en, l as nn, m as tn, o as on, p as an, q as sn, s as ln, t as rn, u as cn, v as dn, w as un } from "./warning-popper.vue_vue_type_style_index_0_lang-zt-jCsvz.js";
3
- import { defineComponent as E, ref as v, onMounted as oe, openBlock as u, createBlock as L, Transition as ae, withCtx as b, normalizeStyle as W, normalizeClass as S, createSlots as se, renderSlot as le, createTextVNode as re, toDisplayString as y, createVNode as P, createCommentVNode as g, getCurrentInstance as ie, onBeforeUnmount as ce, render as m, h as p, computed as A, TransitionGroup as de, createElementBlock as f, unref as ue, Fragment as pe, renderList as me, createElementVNode as fe, shallowReactive as we } from "vue";
1
+ import { r as K, g as X, n as A, _ as Y, a as Q, c as Z, b as ee, d as ne, e as te } from "./warning-popper.vue_vue_type_style_index_0_lang-BKV_FX6k.js";
2
+ import { f as Xe, h as Ye, i as Qe, j as Ze, k as en, l as nn, m as tn, o as on, p as an, q as sn, s as ln, t as rn, u as cn, v as dn, w as un } from "./warning-popper.vue_vue_type_style_index_0_lang-BKV_FX6k.js";
3
+ import { defineComponent as E, ref as C, onMounted as oe, openBlock as p, createBlock as L, Transition as ae, withCtx as b, normalizeStyle as P, normalizeClass as S, createSlots as se, renderSlot as le, createTextVNode as re, toDisplayString as y, createVNode as F, createCommentVNode as g, getCurrentInstance as ie, onBeforeUnmount as ce, render as m, h as u, computed as M, TransitionGroup as de, createElementBlock as f, unref as ue, Fragment as pe, renderList as me, createElementVNode as fe, shallowReactive as we } from "vue";
4
4
  import { SvgWastebasket as ge } from "@digitalwalletcorp/vue-svg-icons";
5
- const he = "$index", F = (n) => {
5
+ const he = "$index", H = (n) => {
6
6
  const t = [];
7
7
  for (const e of n)
8
8
  if (e.csv === !0)
@@ -11,7 +11,7 @@ const he = "$index", F = (n) => {
11
11
  for (const o of e.csv)
12
12
  o.disabled || t.push({ header: e, column: o });
13
13
  return t;
14
- }, Te = (n) => F(n).map(({ header: t, column: e }) => K(e.label ?? t.label)), Ae = (n, t, e) => F(n).map(({ header: o, column: a }) => {
14
+ }, De = (n) => H(n).map(({ header: t, column: e }) => K(e.label ?? t.label)), Ae = (n, t, e) => H(n).map(({ header: o, column: a }) => {
15
15
  if (a.format)
16
16
  return a.format(t);
17
17
  const s = a.key ?? o.id;
@@ -35,8 +35,8 @@ const he = "$index", F = (n) => {
35
35
  },
36
36
  emits: ["update:open", "emit:close"],
37
37
  setup(n, { emit: t }) {
38
- const e = n, o = t, a = v(), s = v(T()), r = () => {
39
- s.value = T();
38
+ const e = n, o = t, a = C(), s = C(A()), r = () => {
39
+ s.value = A();
40
40
  }, i = () => {
41
41
  e.closeOnDblClick && o("update:open", !1);
42
42
  }, l = () => {
@@ -48,7 +48,7 @@ const he = "$index", F = (n) => {
48
48
  window.innerWidth < w && (w = window.innerWidth * 0.9);
49
49
  let h = e.initialSize?.height ?? -1;
50
50
  window.innerHeight < h && (h = window.innerHeight * 0.9), c.size.width = w, c.size.height = h;
51
- const $ = document.documentElement.scrollLeft, D = document.documentElement.scrollTop;
51
+ const O = document.documentElement.scrollLeft, T = document.documentElement.scrollTop;
52
52
  if (e.anchor) {
53
53
  const q = {
54
54
  width: w,
@@ -56,30 +56,30 @@ const he = "$index", F = (n) => {
56
56
  }, J = {
57
57
  width: document.documentElement.clientWidth,
58
58
  height: document.documentElement.clientHeight
59
- }, O = Z(e.anchor.getBoundingClientRect(), q, J, {
59
+ }, D = Z(e.anchor.getBoundingClientRect(), q, J, {
60
60
  placement: "bottom-start",
61
61
  offset: 0,
62
62
  margin: 0,
63
63
  arrowMargin: 0
64
64
  });
65
- c.position.x = O.left + $, c.position.y = O.top + D;
65
+ c.position.x = D.left + O, c.position.y = D.top + T;
66
66
  } else
67
- c.position.x = 10 + $, c.position.y = 10 + D;
67
+ c.position.x = 10 + O, c.position.y = 10 + T;
68
68
  };
69
69
  return oe(() => {
70
70
  e.open && l();
71
- }), (c, d) => (u(), L(ae, {
71
+ }), (c, d) => (p(), L(ae, {
72
72
  name: "dwui-floating-component-fade",
73
73
  onAfterLeave: d[1] || (d[1] = (w) => o("emit:close"))
74
74
  }, {
75
75
  default: b(() => [
76
- e.open ? (u(), L(Y, {
76
+ e.open ? (p(), L(Y, {
77
77
  key: 0,
78
78
  ref_key: "refWindow",
79
79
  ref: a,
80
80
  class: S(["dwui-floating-component", { "dwui-lock-scroll": e.lockScroll }]),
81
81
  name: "dwui-floating-component",
82
- style: W({ "--dwui-order-window": s.value }),
82
+ style: P({ "--dwui-order-window": s.value }),
83
83
  "drag-mode": e.dragMode,
84
84
  loading: e.loading,
85
85
  "close-label": e.closeLabel,
@@ -101,7 +101,7 @@ const he = "$index", F = (n) => {
101
101
  e.copyValue != null ? {
102
102
  name: "actions",
103
103
  fn: b(() => [
104
- P(Q, {
104
+ F(Q, {
105
105
  class: "dwui-floating-component-copy-button",
106
106
  value: e.copyValue,
107
107
  "aria-label": e.copyLabel
@@ -118,7 +118,7 @@ const he = "$index", F = (n) => {
118
118
  function V(n, t, e) {
119
119
  const o = document.createElement("div");
120
120
  document.body.appendChild(o);
121
- const a = v(!0), s = v(!1), r = {
121
+ const a = C(!0), s = C(!1), r = {
122
122
  close: () => {
123
123
  a.value = !1;
124
124
  },
@@ -134,10 +134,10 @@ function V(n, t, e) {
134
134
  "onEmit:close": () => {
135
135
  e.delete(r), m(null, o), o.remove(), t.onClosed?.(), t.onClose?.();
136
136
  }
137
- }, r)), l = p(i);
137
+ }, r)), l = u(i);
138
138
  return t.appContext && (l.appContext = t.appContext), m(l, o), e.add(r), r;
139
139
  }
140
- function H(n) {
140
+ function I(n) {
141
141
  const t = ie();
142
142
  if (!t)
143
143
  throw new Error(`${n}() must be called inside setup().`);
@@ -155,9 +155,9 @@ function H(n) {
155
155
  }
156
156
  };
157
157
  }
158
- const I = /* @__PURE__ */ new Set(), k = (n, t, e) => {
158
+ const z = /* @__PURE__ */ new Set(), k = (n, t, e) => {
159
159
  const { appContext: o, onClose: a, ...s } = t ?? {};
160
- return V((r, i) => p(be, {
160
+ return V((r, i) => u(be, {
161
161
  closeLabel: "Close",
162
162
  copyLabel: "Copy",
163
163
  closeOnDblClick: !1,
@@ -166,88 +166,88 @@ const I = /* @__PURE__ */ new Set(), k = (n, t, e) => {
166
166
  ...r
167
167
  }, {
168
168
  default: () => n(i)
169
- }), { appContext: o, onClose: a, onClosed: e }, I);
170
- }, z = (n, t) => (e) => p(n, {
169
+ }), { appContext: o, onClose: a, onClosed: e }, z);
170
+ }, N = (n, t) => (e) => u(n, {
171
171
  ...t,
172
172
  ...e
173
- }), N = (n) => typeof n == "string" ? n : JSON.stringify(n, null, 2), R = (n) => () => p("div", { class: "dwui-floating-component-message" }, n);
173
+ }), $ = (n) => typeof n == "string" ? n : JSON.stringify(n, null, 2), R = (n, t) => () => t && typeof n == "string" ? u("div", { class: "dwui-floating-component-message", innerHTML: n }) : u("div", { class: "dwui-floating-component-message" }, $(n));
174
174
  function Me(n, t, e) {
175
- return k(z(n, t), e);
175
+ return k(N(n, t), e);
176
176
  }
177
177
  function We(n, t) {
178
- const e = N(n);
179
- return k(R(e), {
180
- copyValue: e,
181
- ...t
178
+ const { html: e, ...o } = t ?? {};
179
+ return k(R(n, e), {
180
+ copyValue: $(n),
181
+ ...o
182
182
  });
183
183
  }
184
184
  function Pe() {
185
- for (const n of [...I])
185
+ for (const n of [...z])
186
186
  n.close();
187
187
  }
188
188
  function Fe() {
189
- const n = H("useFloatingComponent"), t = (e) => ({
189
+ const n = I("useFloatingComponent"), t = (e) => ({
190
190
  appContext: n.appContext,
191
191
  ...e
192
192
  });
193
193
  return {
194
- showFloatingComponent: (e, o, a) => n.own((s) => k(z(e, o), t(a), s)),
194
+ showFloatingComponent: (e, o, a) => n.own((s) => k(N(e, o), t(a), s)),
195
195
  showFloatingMessage: (e, o) => {
196
- const a = N(e);
197
- return n.own((s) => k(R(a), t({
198
- copyValue: a,
199
- ...o
200
- }), s));
196
+ const { html: a, ...s } = o ?? {};
197
+ return n.own((r) => k(R(e, a), t({
198
+ copyValue: $(e),
199
+ ...s
200
+ }), r));
201
201
  }
202
202
  };
203
203
  }
204
- function _(n, t) {
204
+ function x(n, t) {
205
205
  const { icon: e, appContext: o, ...a } = t ?? {};
206
206
  return new Promise((s) => {
207
207
  const r = document.createElement("div");
208
208
  document.body.appendChild(r);
209
- const i = p(ee, {
209
+ const i = u(ee, {
210
210
  ...a,
211
211
  message: n,
212
212
  open: !0,
213
213
  "onEmit:close": (l) => {
214
214
  m(null, r), r.remove(), s(l);
215
215
  }
216
- }, e ? { icon: () => p(e) } : void 0);
216
+ }, e ? { icon: () => u(e) } : void 0);
217
217
  o && (i.appContext = o), m(i, r);
218
218
  });
219
219
  }
220
- function Ve(n, t) {
221
- return _(n, {
220
+ function He(n, t) {
221
+ return x(n, {
222
222
  ...t,
223
223
  type: "info"
224
224
  });
225
225
  }
226
- function He(n, t) {
227
- return _(n, {
226
+ function Ve(n, t) {
227
+ return x(n, {
228
228
  ...t,
229
229
  type: "confirm"
230
230
  });
231
231
  }
232
232
  function Ie(n, t) {
233
- return _(n, {
233
+ return x(n, {
234
234
  ...t,
235
235
  type: "warn"
236
236
  });
237
237
  }
238
238
  function ze(n, t) {
239
- return _(n, {
239
+ return x(n, {
240
240
  ...t,
241
241
  type: "error"
242
242
  });
243
243
  }
244
244
  const j = /* @__PURE__ */ new Set(), G = (n, t, e, o) => {
245
245
  const { appContext: a, onClose: s, ...r } = e ?? {};
246
- return V((i, l) => p(ne, {
246
+ return V((i, l) => u(ne, {
247
247
  ...r,
248
248
  ...i
249
249
  }, {
250
- default: () => p(n, {
250
+ default: () => u(n, {
251
251
  ...t,
252
252
  close: l.close,
253
253
  setLoading: l.setLoading
@@ -262,7 +262,7 @@ function Re() {
262
262
  n.close();
263
263
  }
264
264
  function je() {
265
- const n = H("useOverlayBox");
265
+ const n = I("useOverlayBox");
266
266
  return {
267
267
  showOverlayBox: (t, e, o) => n.own((a) => G(t, e, {
268
268
  appContext: n.appContext,
@@ -276,21 +276,21 @@ function Ge(n) {
276
276
  const e = () => {
277
277
  m(null, t), t.remove();
278
278
  };
279
- return m(p(te, {
279
+ return m(u(te, {
280
280
  ...n,
281
281
  loading: !0
282
282
  }), t), { close: e };
283
283
  }
284
- const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
284
+ const ye = ["aria-label", "title"], ve = ["title", "onClick"], Ce = {
285
285
  key: 0,
286
286
  class: "dwui-snackbar-header"
287
287
  }, ke = {
288
288
  key: 0,
289
289
  class: "dwui-snackbar-title"
290
- }, xe = {
290
+ }, _e = {
291
291
  key: 1,
292
292
  class: "dwui-snackbar-label"
293
- }, _e = { class: "dwui-snackbar-message" }, Le = {
293
+ }, xe = { class: "dwui-snackbar-message" }, Le = {
294
294
  key: 1,
295
295
  class: "dwui-snackbar-timestamp"
296
296
  }, Se = /* @__PURE__ */ E({
@@ -302,15 +302,15 @@ const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
302
302
  },
303
303
  emits: ["emit:close", "emit:clear", "emit:afterLeave"],
304
304
  setup(n, { emit: t }) {
305
- const e = n, o = t, a = A(() => {
305
+ const e = n, o = t, a = M(() => {
306
306
  const [r, i = "center"] = e.placement.split("-");
307
307
  return [
308
308
  `dwui-snackbar-container-${r}`,
309
309
  `dwui-snackbar-container-${i}`,
310
310
  `dwui-snackbar-container-${e.direction}`
311
311
  ];
312
- }), s = A(() => e.items.filter((r) => r.clearable).at(-1)?.clearLabel);
313
- return (r, i) => (u(), L(de, {
312
+ }), s = M(() => e.items.filter((r) => r.clearable).at(-1)?.clearLabel);
313
+ return (r, i) => (p(), L(de, {
314
314
  tag: "div",
315
315
  name: "dwui-snackbar-fade",
316
316
  class: S(["dwui-snackbar-container", a.value]),
@@ -318,7 +318,7 @@ const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
318
318
  onAfterLeave: i[1] || (i[1] = (l) => o("emit:afterLeave"))
319
319
  }, {
320
320
  default: b(() => [
321
- s.value != null ? (u(), f("button", {
321
+ s.value != null ? (p(), f("button", {
322
322
  key: "clear",
323
323
  type: "button",
324
324
  class: "dwui-snackbar-clear-button",
@@ -326,30 +326,30 @@ const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
326
326
  title: s.value,
327
327
  onClick: i[0] || (i[0] = (l) => o("emit:clear"))
328
328
  }, [
329
- P(ue(ge))
329
+ F(ue(ge))
330
330
  ], 8, ye)) : g("", !0),
331
- (u(!0), f(pe, null, me(e.items, (l) => (u(), f("button", {
331
+ (p(!0), f(pe, null, me(e.items, (l) => (p(), f("button", {
332
332
  key: l.id,
333
333
  type: "button",
334
334
  class: S(["dwui-snackbar", l.class]),
335
- style: W(l.style),
335
+ style: P(l.style),
336
336
  title: l.message,
337
337
  onClick: (c) => o("emit:close", l.id)
338
338
  }, [
339
- l.title || l.label ? (u(), f("span", ve, [
340
- l.title ? (u(), f("span", ke, y(l.title), 1)) : g("", !0),
341
- l.label ? (u(), f("span", xe, y(l.label), 1)) : g("", !0)
339
+ l.title || l.label ? (p(), f("span", Ce, [
340
+ l.title ? (p(), f("span", ke, y(l.title), 1)) : g("", !0),
341
+ l.label ? (p(), f("span", _e, y(l.label), 1)) : g("", !0)
342
342
  ])) : g("", !0),
343
- fe("span", _e, y(l.message), 1),
344
- l.timestamp ? (u(), f("span", Le, y(l.timestamp), 1)) : g("", !0)
345
- ], 14, Ce))), 128))
343
+ fe("span", xe, y(l.message), 1),
344
+ l.timestamp ? (p(), f("span", Le, y(l.timestamp), 1)) : g("", !0)
345
+ ], 14, ve))), 128))
346
346
  ]),
347
347
  _: 1
348
348
  }, 8, ["class"]));
349
349
  }
350
- }), Be = 50, C = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
351
- let M = 0;
352
- const x = (n, t, e) => {
350
+ }), Be = 50, v = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
351
+ let W = 0;
352
+ const _ = (n, t, e) => {
353
353
  const o = n.findIndex((s) => s.id === t);
354
354
  if (o < 0)
355
355
  return;
@@ -359,22 +359,22 @@ const x = (n, t, e) => {
359
359
  }, U = (n) => {
360
360
  const t = n.map((e) => e.id);
361
361
  for (let e = 0; e < t.length; e++)
362
- setTimeout(() => x(n, t[e], "clear"), Be * e);
362
+ setTimeout(() => _(n, t[e], "clear"), Be * e);
363
363
  }, Ee = (n, t) => {
364
- const e = `${n} ${t}`, o = C.get(e);
364
+ const e = `${n} ${t}`, o = v.get(e);
365
365
  if (o)
366
366
  return o;
367
367
  const a = document.createElement("div");
368
368
  document.body.appendChild(a);
369
369
  const s = we([]);
370
- return C.set(e, s), m(p(Se, {
370
+ return v.set(e, s), m(u(Se, {
371
371
  placement: n,
372
372
  direction: t,
373
373
  items: s,
374
- "onEmit:close": (r) => x(s, r, "click"),
374
+ "onEmit:close": (r) => _(s, r, "click"),
375
375
  "onEmit:clear": () => U(s),
376
376
  "onEmit:afterLeave": () => {
377
- s.length === 0 && C.get(e) === s && (C.delete(e), m(null, a), a.remove());
377
+ s.length === 0 && v.get(e) === s && (v.delete(e), m(null, a), a.remove());
378
378
  }
379
379
  }), a), s;
380
380
  };
@@ -388,8 +388,8 @@ function Ue(n, t) {
388
388
  onClose: i,
389
389
  ...l
390
390
  } = t ?? {}, c = Ee(e, o);
391
- M += 1;
392
- const d = M;
391
+ W += 1;
392
+ const d = W;
393
393
  return c.push({
394
394
  ...l,
395
395
  id: d,
@@ -397,14 +397,14 @@ function Ue(n, t) {
397
397
  clearable: s,
398
398
  clearLabel: r
399
399
  }), B.set(d, {
400
- timer: a ? setTimeout(() => x(c, d, "duration"), a) : void 0,
400
+ timer: a ? setTimeout(() => _(c, d, "duration"), a) : void 0,
401
401
  onClose: i
402
402
  }), {
403
- close: () => x(c, d, "handle")
403
+ close: () => _(c, d, "handle")
404
404
  };
405
405
  }
406
406
  function qe() {
407
- for (const n of C.values())
407
+ for (const n of v.values())
408
408
  U(n);
409
409
  }
410
410
  export {
@@ -430,14 +430,14 @@ export {
430
430
  Pe as closeAllFloatingComponents,
431
431
  Re as closeAllOverlayBoxes,
432
432
  qe as closeAllSnackbars,
433
- Te as headersToCsvColumns,
433
+ De as headersToCsvColumns,
434
434
  Ae as rowToCsvColumns,
435
- He as showConfirmationDialog,
435
+ Ve as showConfirmationDialog,
436
436
  ze as showErrorDialog,
437
437
  Me as showFloatingComponent,
438
438
  We as showFloatingMessage,
439
- Ve as showInformationDialog,
440
- _ as showModalDialog,
439
+ He as showInformationDialog,
440
+ x as showModalDialog,
441
441
  Ne as showOverlayBox,
442
442
  Ge as showScreenLoading,
443
443
  Ue as showSnackbar,
package/lib/nuxt.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@nuxt/kit"),r=require("./components-HaiHcseF.cjs");var t=typeof document<"u"?document.currentScript:null;const u=e.defineNuxtModule({meta:{name:"@digitalwalletcorp/vue-core",configKey:"vueCore"},setup(){const n=e.createResolver(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("nuxt.cjs",document.baseURI).href);for(const o of Object.keys(r.components))e.addComponent({name:o,export:o,filePath:n.resolve("./index")})}});exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@nuxt/kit"),r=require("./components-CKql5lWg.cjs");var t=typeof document<"u"?document.currentScript:null;const u=e.defineNuxtModule({meta:{name:"@digitalwalletcorp/vue-core",configKey:"vueCore"},setup(){const n=e.createResolver(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("nuxt.cjs",document.baseURI).href);for(const o of Object.keys(r.components))e.addComponent({name:o,export:o,filePath:n.resolve("./index")})}});exports.default=u;
package/lib/nuxt.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineNuxtModule as t, createResolver as r, addComponent as n } from "@nuxt/kit";
2
- import { c as a } from "./components-2zQ2SZuY.js";
2
+ import { c as a } from "./components-BuTJ1wX8.js";
3
3
  const c = t({
4
4
  meta: {
5
5
  name: "@digitalwalletcorp/vue-core",
package/lib/register.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-HaiHcseF.cjs");function r(e){for(const[o,n]of Object.entries(t.components))e.component(o,n)}exports.registerComponents=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-CKql5lWg.cjs");function r(e){for(const[o,n]of Object.entries(t.components))e.component(o,n)}exports.registerComponents=r;
package/lib/register.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as t } from "./components-2zQ2SZuY.js";
1
+ import { c as t } from "./components-BuTJ1wX8.js";
2
2
  function m(o) {
3
3
  for (const [n, e] of Object.entries(t))
4
4
  o.component(n, e);