st-comp 0.0.198 → 0.0.200

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.
Files changed (151) hide show
  1. package/auto-imports.d.ts +3 -0
  2. package/components.d.ts +0 -3
  3. package/es/ChartLayout.js +4 -4
  4. package/es/ConfigProvider.cjs +1 -1
  5. package/es/ConfigProvider.js +1 -1
  6. package/es/CustomFunction.cjs +1 -1
  7. package/es/CustomFunction.js +281 -217
  8. package/es/FactorWarning.cjs +1 -1
  9. package/es/FactorWarning.js +68 -71
  10. package/es/Kline.cjs +1 -1
  11. package/es/Kline.js +19 -21
  12. package/es/KlineBasic.cjs +1 -1
  13. package/es/KlineBasic.js +28 -30
  14. package/es/KlineConfig.cjs +1 -1
  15. package/es/KlineConfig.js +23 -25
  16. package/es/KlineNew.cjs +1 -1
  17. package/es/KlineNew.js +18 -20
  18. package/es/KlinePlus.cjs +1 -1
  19. package/es/KlinePlus.js +21 -23
  20. package/es/MonacoEditor.cjs +1 -1
  21. package/es/MonacoEditor.js +2 -2
  22. package/es/Pagination.cjs +1 -1
  23. package/es/Pagination.js +72 -74
  24. package/es/PasswordPrompt.cjs +1 -1
  25. package/es/PasswordPrompt.js +157 -9
  26. package/es/Pie.cjs +1 -1
  27. package/es/Pie.js +1 -1
  28. package/es/Table.cjs +1 -1
  29. package/es/Table.js +50 -53
  30. package/es/User.cjs +1 -1
  31. package/es/User.js +1 -1215
  32. package/es/VarSelectDialog.cjs +1 -1
  33. package/es/VarSelectDialog.js +26 -28
  34. package/es/VarietyAutoComplete.cjs +1 -1
  35. package/es/VarietyAutoComplete.js +18 -19
  36. package/es/VarietySearch.cjs +7 -7
  37. package/es/VarietySearch.js +693 -697
  38. package/es/VarietyTextCopy.cjs +1 -1
  39. package/es/VarietyTextCopy.js +12 -12
  40. package/es/VirtualTable.cjs +1 -1
  41. package/es/VirtualTable.js +79 -80
  42. package/es/{base-a5af3db3.js → base-8348063b.js} +38 -38
  43. package/es/{castArray-7741a212.js → castArray-3f45c3ec.js} +1 -1
  44. package/es/{config-provider-b16efd62.js → config-provider-1a687690.js} +6 -6
  45. package/es/{config-provider-a584d81e.cjs → config-provider-eb0460f1.cjs} +1 -1
  46. package/es/el-autocomplete-86c0d989.cjs +1 -0
  47. package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-d4cd96cd.js} +16 -16
  48. package/es/{el-button-c95adb85.js → el-button-2e680390.js} +33 -33
  49. package/es/{el-button-eec58cff.cjs → el-button-4ccd7122.cjs} +1 -1
  50. package/es/el-checkbox-group-dfdad075.cjs +1 -0
  51. package/es/el-checkbox-group-e26a4533.js +67 -0
  52. package/es/{el-dialog-ae86edb8.cjs → el-dialog-6413b4af.cjs} +1 -1
  53. package/es/{el-dialog-41ab8417.js → el-dialog-bafc4b2b.js} +6 -7
  54. package/es/{el-divider-4e059794.js → el-divider-93b0ee21.js} +1 -1
  55. package/es/{el-empty-33cb66f1.js → el-empty-56783dca.js} +3 -3
  56. package/es/el-form-item-41becb31.js +1749 -0
  57. package/es/el-form-item-95476197.cjs +12 -0
  58. package/es/{el-input-7fd293af.cjs → el-input-6c5ac889.cjs} +1 -1
  59. package/es/{el-input-2f75c4ba.js → el-input-735575f4.js} +34 -34
  60. package/es/{el-input-number-5193fe6d.js → el-input-number-6634a6ea.js} +35 -35
  61. package/es/{el-input-number-22e21d16.cjs → el-input-number-d5770776.cjs} +1 -1
  62. package/es/{el-loading-f6022062.js → el-loading-049dacc5.js} +5 -5
  63. package/es/{el-loading-cfd86c15.cjs → el-loading-98dcebee.cjs} +1 -1
  64. package/es/{el-menu-item-17dc717e.cjs → el-menu-item-828bc6fa.cjs} +1 -1
  65. package/es/{el-menu-item-7e881203.js → el-menu-item-8a210e21.js} +22 -22
  66. package/es/{el-message-5e6a6be9.cjs → el-message-a1ac37d4.cjs} +1 -1
  67. package/es/{el-message-e544a8f5.js → el-message-def216ae.js} +24 -24
  68. package/es/{el-overlay-09ad71cd.js → el-overlay-4ea38eab.js} +51 -51
  69. package/es/{el-overlay-9e34965f.cjs → el-overlay-69dfacb6.cjs} +1 -1
  70. package/es/{el-popconfirm-81dcd202.js → el-popconfirm-aace1104.js} +20 -20
  71. package/es/{el-popconfirm-70a976bf.cjs → el-popconfirm-bdeceeb7.cjs} +1 -1
  72. package/es/{_initCloneObject-52b6a510.cjs → el-popover-5421d52a.cjs} +1 -1
  73. package/es/{_initCloneObject-eaef9418.js → el-popover-7a1c6412.js} +9 -9
  74. package/es/{el-popper-b4f97157.js → el-popper-986a8371.js} +112 -115
  75. package/es/{el-popper-b6c99b28.cjs → el-popper-b962125f.cjs} +1 -1
  76. package/es/el-scrollbar-139aa96d.cjs +1 -0
  77. package/es/el-scrollbar-cdadd788.js +115 -0
  78. package/es/{el-segmented-f8fce9ac.cjs → el-segmented-6b057ed5.cjs} +1 -1
  79. package/es/{el-segmented-b868d074.js → el-segmented-f892ec18.js} +8 -8
  80. package/es/{el-select-95627997.js → el-select-2189a8ac.js} +41 -42
  81. package/es/el-select-e1046cc6.cjs +1 -0
  82. package/es/{el-table-column-72c50d58.js → el-table-column-91d69c86.js} +14 -14
  83. package/es/el-table-column-f1c4af89.cjs +14 -0
  84. package/es/{el-tag-66cab138.js → el-tag-75a7573a.js} +16 -16
  85. package/es/{el-tag-a33c4b22.cjs → el-tag-a15520b3.cjs} +1 -1
  86. package/es/{index-d77a7336.js → index-14c88a1a.js} +1 -1
  87. package/es/{index-11547a0c.cjs → index-16802b35.cjs} +1 -1
  88. package/es/{index-098c2447.cjs → index-1fb95601.cjs} +1 -1
  89. package/es/index-56ea97a9.js +122 -0
  90. package/es/{index-c108567d.cjs → index-5e0314ac.cjs} +1 -1
  91. package/es/{index-298075cf.cjs → index-680be212.cjs} +1 -1
  92. package/es/{index-bc8e277e.js → index-780e7fd2.js} +2 -2
  93. package/es/{index-d725fef6.cjs → index-78381381.cjs} +2 -2
  94. package/es/{index-a871c3eb.js → index-847d58bc.js} +62 -92
  95. package/es/index-8583c047.cjs +1 -0
  96. package/es/{index-7ed0999e.js → index-9cfb6ccf.js} +0 -2
  97. package/es/{index-e5566b94.js → index-c94b9543.js} +43 -43
  98. package/es/{index-8901a38c.cjs → index-cc200b99.cjs} +1 -1
  99. package/es/index-ce63356a.cjs +1 -0
  100. package/es/index-db1e1861.js +318 -0
  101. package/es/{index-960806da.js → index-e00ee015.js} +36 -36
  102. package/es/{index-844bdd85.js → index-f3a86049.js} +29 -29
  103. package/es/{index-d91dc23f.js → index-f45c2897.js} +20 -20
  104. package/es/{python-c27ba105.cjs → python-2e916d28.cjs} +1 -1
  105. package/es/{python-ecde9ff2.js → python-7cf0b6ba.js} +2 -2
  106. package/es/{raf-80ef0c0a.js → raf-8e5f0699.js} +1 -1
  107. package/es/{scroll-679bd6bf.js → scroll-c43468ab.js} +1 -1
  108. package/es/style.css +1 -1
  109. package/es/{use-form-common-props-fd9b61a0.cjs → use-form-common-props-d8866dc6.cjs} +1 -1
  110. package/es/{use-form-common-props-815d48a6.js → use-form-common-props-e6cba60f.js} +69 -69
  111. package/es/{use-global-config-30d7d8ce.cjs → use-global-config-72d50e62.cjs} +1 -1
  112. package/es/{use-global-config-b5e9d3d5.js → use-global-config-76ff2e3e.js} +14 -14
  113. package/es/{validator-764a9db0.js → validator-220652c5.js} +1 -1
  114. package/es/{validator-1b8a6128.cjs → validator-e759d43d.cjs} +1 -1
  115. package/es/{zh-cn-90317f62.cjs → zh-cn-33e7aee6.cjs} +1 -1
  116. package/es/{zh-cn-e963c628.js → zh-cn-c7fa42ea.js} +2 -2
  117. package/lib/bundle.js +1 -1
  118. package/lib/bundle.umd.cjs +205 -205
  119. package/lib/{index-a75ac019.js → index-410c490f.js} +19955 -19794
  120. package/lib/{python-0eadb75b.js → python-589861d2.js} +1 -1
  121. package/lib/style.css +1 -1
  122. package/package.json +1 -1
  123. package/packages/CustomFunction/index.vue +141 -30
  124. package/packages/User/components/EditInfoDialog/Mobile.vue +110 -0
  125. package/packages/User/components/EditInfoDialog/index.vue +136 -0
  126. package/packages/User/components/SetPasswordDialog.vue +6 -3
  127. package/packages/User/index.vue +7 -22
  128. package/es/debounce-62f5b6e8.cjs +0 -1
  129. package/es/debounce-8d53f4dd.js +0 -83
  130. package/es/dropdown-071c5d7e.cjs +0 -1
  131. package/es/dropdown-a59bba73.js +0 -178
  132. package/es/el-autocomplete-a07e9439.cjs +0 -1
  133. package/es/el-form-item-c3fe189b.cjs +0 -12
  134. package/es/el-form-item-eeb64520.js +0 -1269
  135. package/es/el-message-box-48d71ee5.cjs +0 -1
  136. package/es/el-message-box-81ffd21e.js +0 -550
  137. package/es/el-popover-0ea8fbf8.cjs +0 -1
  138. package/es/el-popover-4ed993c7.js +0 -1
  139. package/es/el-scrollbar-323542e7.js +0 -34
  140. package/es/el-scrollbar-bc3f790d.cjs +0 -1
  141. package/es/el-select-d8d91db1.cjs +0 -1
  142. package/es/el-table-column-079b76f5.cjs +0 -14
  143. package/es/index-1f7d4f70.js +0 -157
  144. package/es/index-57672682.js +0 -113
  145. package/es/index-88546436.js +0 -163
  146. package/es/index-9b9ef5dd.cjs +0 -1
  147. package/es/index-f3562b52.cjs +0 -1
  148. package/es/index-f967d6c1.cjs +0 -1
  149. package/es/vnode-5ddb7ed1.js +0 -14
  150. package/es/vnode-b906ae6d.cjs +0 -1
  151. package/packages/User/components/EditInfoDialog.vue +0 -132
@@ -1 +0,0 @@
1
- "use strict";const n=require("vue"),i=require("./base-ef747d02.cjs"),k=require("./use-form-common-props-fd9b61a0.cjs"),Q=require("./el-button-eec58cff.cjs"),Y=require("./el-input-7fd293af.cjs"),A=require("./el-overlay-9e34965f.cjs"),N=require("./index-098c2447.cjs"),z=require("./el-popper-b6c99b28.cjs"),x=require("./validator-1b8a6128.cjs"),_=require("./use-global-config-30d7d8ce.cjs"),F=require("./index-9780a537.cjs"),ee=require("./el-dialog-ae86edb8.cjs"),ne=i.buildProps({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:k.componentSizes,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),oe=n.defineComponent({name:"ElText"}),te=n.defineComponent({...oe,props:ne,setup(e){const t=e,l=n.ref(),c=k.useFormSize(),a=i.useNamespace("text"),s=n.computed(()=>[a.b(),a.m(t.type),a.m(c.value),a.is("truncated",t.truncated),a.is("line-clamp",!i.isUndefined(t.lineClamp))]),d=()=>{var u,m,o,B,f,T,M;if(n.useAttrs().title)return;let C=!1;const I=((u=l.value)==null?void 0:u.textContent)||"";if(t.truncated){const p=(m=l.value)==null?void 0:m.offsetWidth,h=(o=l.value)==null?void 0:o.scrollWidth;p&&h&&h>p&&(C=!0)}else if(!i.isUndefined(t.lineClamp)){const p=(B=l.value)==null?void 0:B.offsetHeight,h=(f=l.value)==null?void 0:f.scrollHeight;p&&h&&h>p&&(C=!0)}C?(T=l.value)==null||T.setAttribute("title",I):(M=l.value)==null||M.removeAttribute("title")};return n.onMounted(d),n.onUpdated(d),(u,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(u.tag),{ref_key:"textRef",ref:l,class:n.normalizeClass(n.unref(s)),style:n.normalizeStyle({"-webkit-line-clamp":u.lineClamp})},{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});var le=i._export_sfc(te,[["__file","text.vue"]]);const se=i.withInstall(le),D="_trap-focus-children",b=[],K=e=>{if(b.length===0)return;const t=b[b.length-1][D];if(t.length>0&&e.code===z.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const l=e.shiftKey,c=e.target===t[0],a=e.target===t[t.length-1];c&&l&&(e.preventDefault(),t[t.length-1].focus()),a&&!l&&(e.preventDefault(),t[0].focus())}},ae={beforeMount(e){e[D]=z.obtainAllFocusableElements(e),b.push(e),b.length<=1&&document.addEventListener("keydown",K)},updated(e){n.nextTick(()=>{e[D]=z.obtainAllFocusableElements(e)})},unmounted(){b.shift(),b.length===0&&document.removeEventListener("keydown",K)}},re=n.defineComponent({name:"ElMessageBox",directives:{TrapFocus:ae},components:{ElButton:Q.ElButton,ElFocusTrap:z.ElFocusTrap,ElInput:Y.ElInput,ElOverlay:A.ElOverlay,ElIcon:N.ElIcon,...k.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:x.isValidComponentSize},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:l,zIndex:c,ns:a,size:s}=_.useGlobalComponentSettings("message-box",n.computed(()=>e.buttonSize)),{t:d}=l,{nextZIndex:u}=c,m=n.ref(!1),o=n.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:n.markRaw(N.loading_default),cancelButtonLoadingIcon:n.markRaw(N.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:u()}),B=n.computed(()=>{const r=o.type;return{[a.bm("icon",r)]:r&&k.TypeComponentsMap[r]}}),f=F.useId(),T=F.useId(),M=n.computed(()=>{const r=o.type;return o.icon||r&&k.TypeComponentsMap[r]||""}),R=n.computed(()=>!!o.message),C=n.ref(),I=n.ref(),p=n.ref(),h=n.ref(),O=n.ref(),U=n.computed(()=>o.confirmButtonClass);n.watch(()=>o.inputValue,async r=>{await n.nextTick(),e.boxType==="prompt"&&r&&L()},{immediate:!0}),n.watch(()=>m.value,r=>{var v,g;r&&(e.boxType!=="prompt"&&(o.autofocus?p.value=(g=(v=O.value)==null?void 0:v.$el)!=null?g:C.value:p.value=C.value),o.zIndex=u()),e.boxType==="prompt"&&(r?n.nextTick().then(()=>{var q;h.value&&h.value.$el&&(o.autofocus?p.value=(q=Z())!=null?q:C.value:p.value=C.value)}):(o.editorErrorMessage="",o.validateError=!1))});const H=n.computed(()=>e.draggable),j=n.computed(()=>e.overflow),{isDragging:G}=ee.useDraggable(C,I,H,j);n.onMounted(async()=>{await n.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),n.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){m.value&&(m.value=!1,n.nextTick(()=>{o.action&&t("action",o.action)}))}const $=()=>{e.closeOnClickModal&&V(o.distinguishCancelAndClose?"close":"cancel")},W=A.useSameTarget($),X=r=>{if(o.inputType!=="textarea")return r.preventDefault(),V("confirm")},V=r=>{var v;e.boxType==="prompt"&&r==="confirm"&&!L()||(o.action=r,o.beforeClose?(v=o.beforeClose)==null||v.call(o,r,o,w):w())},L=()=>{if(e.boxType==="prompt"){const r=o.inputPattern;if(r&&!r.test(o.inputValue||""))return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;const v=o.inputValidator;if(i.isFunction(v)){const g=v(o.inputValue);if(g===!1)return o.editorErrorMessage=o.inputErrorMessage||d("el.messagebox.error"),o.validateError=!0,!1;if(i.isString(g))return o.editorErrorMessage=g,o.validateError=!0,!1}}return o.editorErrorMessage="",o.validateError=!1,!0},Z=()=>{var r,v;const g=(r=h.value)==null?void 0:r.$refs;return(v=g==null?void 0:g.input)!=null?v:g==null?void 0:g.textarea},P=()=>{V("close")},J=()=>{e.closeOnPressEscape&&P()};return e.lockScroll&&A.useLockscreen(m),{...n.toRefs(o),ns:a,overlayEvent:W,visible:m,hasMessage:R,typeClass:B,contentId:f,inputId:T,btnSize:s,iconComponent:M,confirmButtonClasses:U,rootRef:C,focusStartRef:p,headerRef:I,inputRef:h,isDragging:G,confirmRef:O,doClose:w,handleClose:P,onCloseRequested:J,handleWrapperClick:$,handleInputEnter:X,handleAction:V,t:d}}});function ie(e,t,l,c,a,s){const d=n.resolveComponent("el-icon"),u=n.resolveComponent("el-input"),m=n.resolveComponent("el-button"),o=n.resolveComponent("el-focus-trap"),B=n.resolveComponent("el-overlay");return n.openBlock(),n.createBlock(n.Transition,{name:"fade-in-linear",onAfterLeave:f=>e.$emit("vanish"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(B,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:n.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[n.createVNode(o,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:n.withCtx(()=>[n.createElementVNode("div",{ref:"rootRef",class:n.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:n.normalizeStyle(e.customStyle),tabindex:"-1",onClick:n.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"headerRef",class:n.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),n.createElementVNode("span",null,n.toDisplayString(e.title),1)],2),e.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:n.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[n.createVNode(d,{class:n.normalizeClass(e.ns.e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):n.createCommentVNode("v-if",!0)],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{id:e.contentId,class:n.normalizeClass(e.ns.e("content"))},[n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(n.openBlock(),n.createBlock(d,{key:0,class:n.normalizeClass([e.ns.e("status"),e.typeClass])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.hasMessage?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.e("message"))},[n.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:n.toDisplayString(e.message)},null,8,["for","textContent"]))])],2)):n.createCommentVNode("v-if",!0)],2),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("input"))},[n.createVNode(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":f=>e.inputValue=f,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:n.normalizeClass({invalid:e.validateError}),onKeydown:n.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("errormsg")),style:n.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},n.toDisplayString(e.editorErrorMessage),7)],2),[[n.vShow,e.showInput]])],10,["id"]),n.createElementVNode("div",{class:n.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(n.openBlock(),n.createBlock(m,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:n.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:f=>e.handleAction("cancel"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(m,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:n.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:f=>e.handleAction("confirm"),onKeydown:n.withKeys(n.withModifiers(f=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[n.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[n.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var ce=i._export_sfc(re,[["render",ie],["__file","index.vue"]]);const S=new Map,ue=e=>{let t=document.body;return e.appendTo&&(i.isString(e.appendTo)&&(t=document.querySelector(e.appendTo)),i.isElement(e.appendTo)&&(t=e.appendTo),i.isElement(t)||(t=document.body)),t},de=(e,t,l=null)=>{const c=n.createVNode(ce,e,i.isFunction(e.message)||n.isVNode(e.message)?{default:i.isFunction(e.message)?e.message:()=>e.message}:null);return c.appContext=l,n.render(c,t),ue(e).appendChild(t.firstElementChild),c.component},fe=()=>document.createElement("div"),me=(e,t)=>{const l=fe();e.onVanish=()=>{n.render(null,l),S.delete(a)},e.onAction=s=>{const d=S.get(a);let u;e.showInput?u={value:a.inputValue,action:s}:u=s,e.callback?e.callback(u,c.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?d.reject("close"):d.reject("cancel"):d.resolve(u)};const c=de(e,l,t),a=c.proxy;for(const s in e)i.hasOwn(e,s)&&!i.hasOwn(a.$props,s)&&(s==="closeIcon"&&i.isObject(e[s])?a[s]=n.markRaw(e[s]):a[s]=e[s]);return a.visible=!0,a};function E(e,t=null){if(!i.isClient)return Promise.reject();let l;return i.isString(e)||n.isVNode(e)?e={message:e}:l=e.callback,new Promise((c,a)=>{const s=me(e,t??E._context);S.set(s,{options:e,callback:l,resolve:c,reject:a})})}const pe=["alert","confirm","prompt"],ve={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};pe.forEach(e=>{E[e]=ge(e)});function ge(e){return(t,l,c,a)=>{let s="";return i.isObject(l)?(c=l,s=""):i.isUndefined(l)?s="":s=l,E(Object.assign({title:s,message:t,type:"",...ve[e]},c,{boxType:e}),a)}}E.close=()=>{S.forEach((e,t)=>{t.doClose()}),S.clear()};E._context=null;const y=E;y.install=e=>{y._context=e._context,e.config.globalProperties.$msgbox=y,e.config.globalProperties.$messageBox=y,e.config.globalProperties.$alert=y.alert,e.config.globalProperties.$confirm=y.confirm,e.config.globalProperties.$prompt=y.prompt};const Ce=y;exports.ElMessageBox=Ce;exports.ElText=se;
@@ -1,550 +0,0 @@
1
- import { defineComponent as Q, ref as k, computed as w, onMounted as me, onUpdated as Se, openBlock as f, createBlock as C, resolveDynamicComponent as I, normalizeClass as r, unref as Ie, normalizeStyle as G, withCtx as E, renderSlot as pe, useAttrs as Ae, nextTick as V, reactive as Re, markRaw as W, watch as se, onBeforeUnmount as $e, toRefs as ze, resolveComponent as z, Transition as Le, withDirectives as U, createVNode as A, createElementVNode as b, withModifiers as K, createElementBlock as j, createCommentVNode as S, toDisplayString as L, withKeys as N, vShow as q, createTextVNode as le, isVNode as ge, render as ve } from "vue";
2
- import { b as Ve, u as Oe, i as X, _ as he, w as Pe, x as Z, c as Y, s as De, y as ae, f as ye, z as ie } from "./base-a5af3db3.js";
3
- import { k as Fe, e as He, T as Ke, m as re } from "./use-form-common-props-815d48a6.js";
4
- import { E as Ne } from "./el-button-c95adb85.js";
5
- import { E as Ue } from "./el-input-2f75c4ba.js";
6
- import { E as je, b as qe, c as Ge } from "./el-overlay-09ad71cd.js";
7
- import { E as We, l as ue } from "./index-a871c3eb.js";
8
- import { o as ce, a as Xe, e as Ze } from "./el-popper-b4f97157.js";
9
- import { i as Je } from "./validator-764a9db0.js";
10
- import { u as Qe } from "./use-global-config-b5e9d3d5.js";
11
- import { u as de } from "./index-960806da.js";
12
- import { u as Ye } from "./el-dialog-41ab8417.js";
13
- const _e = Ve({
14
- type: {
15
- type: String,
16
- values: ["primary", "success", "info", "warning", "danger", ""],
17
- default: ""
18
- },
19
- size: {
20
- type: String,
21
- values: Fe,
22
- default: ""
23
- },
24
- truncated: Boolean,
25
- lineClamp: {
26
- type: [String, Number]
27
- },
28
- tag: {
29
- type: String,
30
- default: "span"
31
- }
32
- }), xe = Q({
33
- name: "ElText"
34
- }), en = /* @__PURE__ */ Q({
35
- ...xe,
36
- props: _e,
37
- setup(e) {
38
- const o = e, t = k(), i = He(), l = Oe("text"), s = w(() => [
39
- l.b(),
40
- l.m(o.type),
41
- l.m(i.value),
42
- l.is("truncated", o.truncated),
43
- l.is("line-clamp", !X(o.lineClamp))
44
- ]), c = () => {
45
- var u, m, n, M, d, P, D;
46
- if (Ae().title)
47
- return;
48
- let h = !1;
49
- const F = ((u = t.value) == null ? void 0 : u.textContent) || "";
50
- if (o.truncated) {
51
- const p = (m = t.value) == null ? void 0 : m.offsetWidth, y = (n = t.value) == null ? void 0 : n.scrollWidth;
52
- p && y && y > p && (h = !0);
53
- } else if (!X(o.lineClamp)) {
54
- const p = (M = t.value) == null ? void 0 : M.offsetHeight, y = (d = t.value) == null ? void 0 : d.scrollHeight;
55
- p && y && y > p && (h = !0);
56
- }
57
- h ? (P = t.value) == null || P.setAttribute("title", F) : (D = t.value) == null || D.removeAttribute("title");
58
- };
59
- return me(c), Se(c), (u, m) => (f(), C(I(u.tag), {
60
- ref_key: "textRef",
61
- ref: t,
62
- class: r(Ie(s)),
63
- style: G({ "-webkit-line-clamp": u.lineClamp })
64
- }, {
65
- default: E(() => [
66
- pe(u.$slots, "default")
67
- ]),
68
- _: 3
69
- }, 8, ["class", "style"]));
70
- }
71
- });
72
- var nn = /* @__PURE__ */ he(en, [["__file", "text.vue"]]);
73
- const Mn = Pe(nn), J = "_trap-focus-children", T = [], fe = (e) => {
74
- if (T.length === 0)
75
- return;
76
- const o = T[T.length - 1][J];
77
- if (o.length > 0 && e.code === Xe.tab) {
78
- if (o.length === 1) {
79
- e.preventDefault(), document.activeElement !== o[0] && o[0].focus();
80
- return;
81
- }
82
- const t = e.shiftKey, i = e.target === o[0], l = e.target === o[o.length - 1];
83
- i && t && (e.preventDefault(), o[o.length - 1].focus()), l && !t && (e.preventDefault(), o[0].focus());
84
- }
85
- }, on = {
86
- beforeMount(e) {
87
- e[J] = ce(e), T.push(e), T.length <= 1 && document.addEventListener("keydown", fe);
88
- },
89
- updated(e) {
90
- V(() => {
91
- e[J] = ce(e);
92
- });
93
- },
94
- unmounted() {
95
- T.shift(), T.length === 0 && document.removeEventListener("keydown", fe);
96
- }
97
- }, tn = Q({
98
- name: "ElMessageBox",
99
- directives: {
100
- TrapFocus: on
101
- },
102
- components: {
103
- ElButton: Ne,
104
- ElFocusTrap: Ze,
105
- ElInput: Ue,
106
- ElOverlay: je,
107
- ElIcon: We,
108
- ...Ke
109
- },
110
- inheritAttrs: !1,
111
- props: {
112
- buttonSize: {
113
- type: String,
114
- validator: Je
115
- },
116
- modal: {
117
- type: Boolean,
118
- default: !0
119
- },
120
- lockScroll: {
121
- type: Boolean,
122
- default: !0
123
- },
124
- showClose: {
125
- type: Boolean,
126
- default: !0
127
- },
128
- closeOnClickModal: {
129
- type: Boolean,
130
- default: !0
131
- },
132
- closeOnPressEscape: {
133
- type: Boolean,
134
- default: !0
135
- },
136
- closeOnHashChange: {
137
- type: Boolean,
138
- default: !0
139
- },
140
- center: Boolean,
141
- draggable: Boolean,
142
- overflow: Boolean,
143
- roundButton: Boolean,
144
- container: {
145
- type: String,
146
- default: "body"
147
- },
148
- boxType: {
149
- type: String,
150
- default: ""
151
- }
152
- },
153
- emits: ["vanish", "action"],
154
- setup(e, { emit: o }) {
155
- const {
156
- locale: t,
157
- zIndex: i,
158
- ns: l,
159
- size: s
160
- } = Qe("message-box", w(() => e.buttonSize)), { t: c } = t, { nextZIndex: u } = i, m = k(!1), n = Re({
161
- autofocus: !0,
162
- beforeClose: null,
163
- callback: null,
164
- cancelButtonText: "",
165
- cancelButtonClass: "",
166
- confirmButtonText: "",
167
- confirmButtonClass: "",
168
- customClass: "",
169
- customStyle: {},
170
- dangerouslyUseHTMLString: !1,
171
- distinguishCancelAndClose: !1,
172
- icon: "",
173
- closeIcon: "",
174
- inputPattern: null,
175
- inputPlaceholder: "",
176
- inputType: "text",
177
- inputValue: "",
178
- inputValidator: void 0,
179
- inputErrorMessage: "",
180
- message: "",
181
- modalFade: !0,
182
- modalClass: "",
183
- showCancelButton: !1,
184
- showConfirmButton: !0,
185
- type: "",
186
- title: void 0,
187
- showInput: !1,
188
- action: "",
189
- confirmButtonLoading: !1,
190
- cancelButtonLoading: !1,
191
- confirmButtonLoadingIcon: W(ue),
192
- cancelButtonLoadingIcon: W(ue),
193
- confirmButtonDisabled: !1,
194
- editorErrorMessage: "",
195
- validateError: !1,
196
- zIndex: u()
197
- }), M = w(() => {
198
- const a = n.type;
199
- return { [l.bm("icon", a)]: a && re[a] };
200
- }), d = de(), P = de(), D = w(() => {
201
- const a = n.type;
202
- return n.icon || a && re[a] || "";
203
- }), _ = w(() => !!n.message), h = k(), F = k(), p = k(), y = k(), x = k(), Ce = w(() => n.confirmButtonClass);
204
- se(() => n.inputValue, async (a) => {
205
- await V(), e.boxType === "prompt" && a && ne();
206
- }, { immediate: !0 }), se(() => m.value, (a) => {
207
- var g, v;
208
- a && (e.boxType !== "prompt" && (n.autofocus ? p.value = (v = (g = x.value) == null ? void 0 : g.$el) != null ? v : h.value : p.value = h.value), n.zIndex = u()), e.boxType === "prompt" && (a ? V().then(() => {
209
- var te;
210
- y.value && y.value.$el && (n.autofocus ? p.value = (te = Te()) != null ? te : h.value : p.value = h.value);
211
- }) : (n.editorErrorMessage = "", n.validateError = !1));
212
- });
213
- const be = w(() => e.draggable), Ee = w(() => e.overflow), { isDragging: we } = Ye(h, F, be, Ee);
214
- me(async () => {
215
- await V(), e.closeOnHashChange && window.addEventListener("hashchange", $);
216
- }), $e(() => {
217
- e.closeOnHashChange && window.removeEventListener("hashchange", $);
218
- });
219
- function $() {
220
- m.value && (m.value = !1, V(() => {
221
- n.action && o("action", n.action);
222
- }));
223
- }
224
- const ee = () => {
225
- e.closeOnClickModal && H(n.distinguishCancelAndClose ? "close" : "cancel");
226
- }, Be = Ge(ee), ke = (a) => {
227
- if (n.inputType !== "textarea")
228
- return a.preventDefault(), H("confirm");
229
- }, H = (a) => {
230
- var g;
231
- e.boxType === "prompt" && a === "confirm" && !ne() || (n.action = a, n.beforeClose ? (g = n.beforeClose) == null || g.call(n, a, n, $) : $());
232
- }, ne = () => {
233
- if (e.boxType === "prompt") {
234
- const a = n.inputPattern;
235
- if (a && !a.test(n.inputValue || ""))
236
- return n.editorErrorMessage = n.inputErrorMessage || c("el.messagebox.error"), n.validateError = !0, !1;
237
- const g = n.inputValidator;
238
- if (Z(g)) {
239
- const v = g(n.inputValue);
240
- if (v === !1)
241
- return n.editorErrorMessage = n.inputErrorMessage || c("el.messagebox.error"), n.validateError = !0, !1;
242
- if (Y(v))
243
- return n.editorErrorMessage = v, n.validateError = !0, !1;
244
- }
245
- }
246
- return n.editorErrorMessage = "", n.validateError = !1, !0;
247
- }, Te = () => {
248
- var a, g;
249
- const v = (a = y.value) == null ? void 0 : a.$refs;
250
- return (g = v == null ? void 0 : v.input) != null ? g : v == null ? void 0 : v.textarea;
251
- }, oe = () => {
252
- H("close");
253
- }, Me = () => {
254
- e.closeOnPressEscape && oe();
255
- };
256
- return e.lockScroll && qe(m), {
257
- ...ze(n),
258
- ns: l,
259
- overlayEvent: Be,
260
- visible: m,
261
- hasMessage: _,
262
- typeClass: M,
263
- contentId: d,
264
- inputId: P,
265
- btnSize: s,
266
- iconComponent: D,
267
- confirmButtonClasses: Ce,
268
- rootRef: h,
269
- focusStartRef: p,
270
- headerRef: F,
271
- inputRef: y,
272
- isDragging: we,
273
- confirmRef: x,
274
- doClose: $,
275
- handleClose: oe,
276
- onCloseRequested: Me,
277
- handleWrapperClick: ee,
278
- handleInputEnter: ke,
279
- handleAction: H,
280
- t: c
281
- };
282
- }
283
- });
284
- function sn(e, o, t, i, l, s) {
285
- const c = z("el-icon"), u = z("el-input"), m = z("el-button"), n = z("el-focus-trap"), M = z("el-overlay");
286
- return f(), C(Le, {
287
- name: "fade-in-linear",
288
- onAfterLeave: (d) => e.$emit("vanish"),
289
- persisted: ""
290
- }, {
291
- default: E(() => [
292
- U(A(M, {
293
- "z-index": e.zIndex,
294
- "overlay-class": [e.ns.is("message-box"), e.modalClass],
295
- mask: e.modal
296
- }, {
297
- default: E(() => [
298
- b("div", {
299
- role: "dialog",
300
- "aria-label": e.title,
301
- "aria-modal": "true",
302
- "aria-describedby": e.showInput ? void 0 : e.contentId,
303
- class: r(`${e.ns.namespace.value}-overlay-message-box`),
304
- onClick: e.overlayEvent.onClick,
305
- onMousedown: e.overlayEvent.onMousedown,
306
- onMouseup: e.overlayEvent.onMouseup
307
- }, [
308
- A(n, {
309
- loop: "",
310
- trapped: e.visible,
311
- "focus-trap-el": e.rootRef,
312
- "focus-start-el": e.focusStartRef,
313
- onReleaseRequested: e.onCloseRequested
314
- }, {
315
- default: E(() => [
316
- b("div", {
317
- ref: "rootRef",
318
- class: r([
319
- e.ns.b(),
320
- e.customClass,
321
- e.ns.is("draggable", e.draggable),
322
- e.ns.is("dragging", e.isDragging),
323
- { [e.ns.m("center")]: e.center }
324
- ]),
325
- style: G(e.customStyle),
326
- tabindex: "-1",
327
- onClick: K(() => {
328
- }, ["stop"])
329
- }, [
330
- e.title !== null && e.title !== void 0 ? (f(), j("div", {
331
- key: 0,
332
- ref: "headerRef",
333
- class: r([e.ns.e("header"), { "show-close": e.showClose }])
334
- }, [
335
- b("div", {
336
- class: r(e.ns.e("title"))
337
- }, [
338
- e.iconComponent && e.center ? (f(), C(c, {
339
- key: 0,
340
- class: r([e.ns.e("status"), e.typeClass])
341
- }, {
342
- default: E(() => [
343
- (f(), C(I(e.iconComponent)))
344
- ]),
345
- _: 1
346
- }, 8, ["class"])) : S("v-if", !0),
347
- b("span", null, L(e.title), 1)
348
- ], 2),
349
- e.showClose ? (f(), j("button", {
350
- key: 0,
351
- type: "button",
352
- class: r(e.ns.e("headerbtn")),
353
- "aria-label": e.t("el.messagebox.close"),
354
- onClick: (d) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"),
355
- onKeydown: N(K((d) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])
356
- }, [
357
- A(c, {
358
- class: r(e.ns.e("close"))
359
- }, {
360
- default: E(() => [
361
- (f(), C(I(e.closeIcon || "close")))
362
- ]),
363
- _: 1
364
- }, 8, ["class"])
365
- ], 42, ["aria-label", "onClick", "onKeydown"])) : S("v-if", !0)
366
- ], 2)) : S("v-if", !0),
367
- b("div", {
368
- id: e.contentId,
369
- class: r(e.ns.e("content"))
370
- }, [
371
- b("div", {
372
- class: r(e.ns.e("container"))
373
- }, [
374
- e.iconComponent && !e.center && e.hasMessage ? (f(), C(c, {
375
- key: 0,
376
- class: r([e.ns.e("status"), e.typeClass])
377
- }, {
378
- default: E(() => [
379
- (f(), C(I(e.iconComponent)))
380
- ]),
381
- _: 1
382
- }, 8, ["class"])) : S("v-if", !0),
383
- e.hasMessage ? (f(), j("div", {
384
- key: 1,
385
- class: r(e.ns.e("message"))
386
- }, [
387
- pe(e.$slots, "default", {}, () => [
388
- e.dangerouslyUseHTMLString ? (f(), C(I(e.showInput ? "label" : "p"), {
389
- key: 1,
390
- for: e.showInput ? e.inputId : void 0,
391
- innerHTML: e.message
392
- }, null, 8, ["for", "innerHTML"])) : (f(), C(I(e.showInput ? "label" : "p"), {
393
- key: 0,
394
- for: e.showInput ? e.inputId : void 0,
395
- textContent: L(e.message)
396
- }, null, 8, ["for", "textContent"]))
397
- ])
398
- ], 2)) : S("v-if", !0)
399
- ], 2),
400
- U(b("div", {
401
- class: r(e.ns.e("input"))
402
- }, [
403
- A(u, {
404
- id: e.inputId,
405
- ref: "inputRef",
406
- modelValue: e.inputValue,
407
- "onUpdate:modelValue": (d) => e.inputValue = d,
408
- type: e.inputType,
409
- placeholder: e.inputPlaceholder,
410
- "aria-invalid": e.validateError,
411
- class: r({ invalid: e.validateError }),
412
- onKeydown: N(e.handleInputEnter, ["enter"])
413
- }, null, 8, ["id", "modelValue", "onUpdate:modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
414
- b("div", {
415
- class: r(e.ns.e("errormsg")),
416
- style: G({
417
- visibility: e.editorErrorMessage ? "visible" : "hidden"
418
- })
419
- }, L(e.editorErrorMessage), 7)
420
- ], 2), [
421
- [q, e.showInput]
422
- ])
423
- ], 10, ["id"]),
424
- b("div", {
425
- class: r(e.ns.e("btns"))
426
- }, [
427
- e.showCancelButton ? (f(), C(m, {
428
- key: 0,
429
- loading: e.cancelButtonLoading,
430
- "loading-icon": e.cancelButtonLoadingIcon,
431
- class: r([e.cancelButtonClass]),
432
- round: e.roundButton,
433
- size: e.btnSize,
434
- onClick: (d) => e.handleAction("cancel"),
435
- onKeydown: N(K((d) => e.handleAction("cancel"), ["prevent"]), ["enter"])
436
- }, {
437
- default: E(() => [
438
- le(L(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
439
- ]),
440
- _: 1
441
- }, 8, ["loading", "loading-icon", "class", "round", "size", "onClick", "onKeydown"])) : S("v-if", !0),
442
- U(A(m, {
443
- ref: "confirmRef",
444
- type: "primary",
445
- loading: e.confirmButtonLoading,
446
- "loading-icon": e.confirmButtonLoadingIcon,
447
- class: r([e.confirmButtonClasses]),
448
- round: e.roundButton,
449
- disabled: e.confirmButtonDisabled,
450
- size: e.btnSize,
451
- onClick: (d) => e.handleAction("confirm"),
452
- onKeydown: N(K((d) => e.handleAction("confirm"), ["prevent"]), ["enter"])
453
- }, {
454
- default: E(() => [
455
- le(L(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
456
- ]),
457
- _: 1
458
- }, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
459
- [q, e.showConfirmButton]
460
- ])
461
- ], 2)
462
- ], 14, ["onClick"])
463
- ]),
464
- _: 3
465
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
466
- ], 42, ["aria-label", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
467
- ]),
468
- _: 3
469
- }, 8, ["z-index", "overlay-class", "mask"]), [
470
- [q, e.visible]
471
- ])
472
- ]),
473
- _: 3
474
- }, 8, ["onAfterLeave"]);
475
- }
476
- var ln = /* @__PURE__ */ he(tn, [["render", sn], ["__file", "index.vue"]]);
477
- const O = /* @__PURE__ */ new Map(), an = (e) => {
478
- let o = document.body;
479
- return e.appendTo && (Y(e.appendTo) && (o = document.querySelector(e.appendTo)), ie(e.appendTo) && (o = e.appendTo), ie(o) || (o = document.body)), o;
480
- }, rn = (e, o, t = null) => {
481
- const i = A(ln, e, Z(e.message) || ge(e.message) ? {
482
- default: Z(e.message) ? e.message : () => e.message
483
- } : null);
484
- return i.appContext = t, ve(i, o), an(e).appendChild(o.firstElementChild), i.component;
485
- }, un = () => document.createElement("div"), cn = (e, o) => {
486
- const t = un();
487
- e.onVanish = () => {
488
- ve(null, t), O.delete(l);
489
- }, e.onAction = (s) => {
490
- const c = O.get(l);
491
- let u;
492
- e.showInput ? u = { value: l.inputValue, action: s } : u = s, e.callback ? e.callback(u, i.proxy) : s === "cancel" || s === "close" ? e.distinguishCancelAndClose && s !== "cancel" ? c.reject("close") : c.reject("cancel") : c.resolve(u);
493
- };
494
- const i = rn(e, t, o), l = i.proxy;
495
- for (const s in e)
496
- ae(e, s) && !ae(l.$props, s) && (s === "closeIcon" && ye(e[s]) ? l[s] = W(e[s]) : l[s] = e[s]);
497
- return l.visible = !0, l;
498
- };
499
- function R(e, o = null) {
500
- if (!De)
501
- return Promise.reject();
502
- let t;
503
- return Y(e) || ge(e) ? e = {
504
- message: e
505
- } : t = e.callback, new Promise((i, l) => {
506
- const s = cn(e, o ?? R._context);
507
- O.set(s, {
508
- options: e,
509
- callback: t,
510
- resolve: i,
511
- reject: l
512
- });
513
- });
514
- }
515
- const dn = ["alert", "confirm", "prompt"], fn = {
516
- alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
517
- confirm: { showCancelButton: !0 },
518
- prompt: { showCancelButton: !0, showInput: !0 }
519
- };
520
- dn.forEach((e) => {
521
- R[e] = mn(e);
522
- });
523
- function mn(e) {
524
- return (o, t, i, l) => {
525
- let s = "";
526
- return ye(t) ? (i = t, s = "") : X(t) ? s = "" : s = t, R(Object.assign({
527
- title: s,
528
- message: o,
529
- type: "",
530
- ...fn[e]
531
- }, i, {
532
- boxType: e
533
- }), l);
534
- };
535
- }
536
- R.close = () => {
537
- O.forEach((e, o) => {
538
- o.doClose();
539
- }), O.clear();
540
- };
541
- R._context = null;
542
- const B = R;
543
- B.install = (e) => {
544
- B._context = e._context, e.config.globalProperties.$msgbox = B, e.config.globalProperties.$messageBox = B, e.config.globalProperties.$alert = B.alert, e.config.globalProperties.$confirm = B.confirm, e.config.globalProperties.$prompt = B.prompt;
545
- };
546
- const Sn = B;
547
- export {
548
- Sn as E,
549
- Mn as a
550
- };
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
-
@@ -1,34 +0,0 @@
1
- const o = 4, s = {
2
- vertical: {
3
- offset: "offsetHeight",
4
- scroll: "scrollTop",
5
- scrollSize: "scrollHeight",
6
- size: "height",
7
- key: "vertical",
8
- axis: "Y",
9
- client: "clientY",
10
- direction: "top"
11
- },
12
- horizontal: {
13
- offset: "offsetWidth",
14
- scroll: "scrollLeft",
15
- scrollSize: "scrollWidth",
16
- size: "width",
17
- key: "horizontal",
18
- axis: "X",
19
- client: "clientX",
20
- direction: "left"
21
- }
22
- }, i = ({
23
- move: e,
24
- size: l,
25
- bar: t
26
- }) => ({
27
- [t.size]: l,
28
- transform: `translate${t.axis}(${e}%)`
29
- });
30
- export {
31
- s as B,
32
- o as G,
33
- i as r
34
- };
@@ -1 +0,0 @@
1
- "use strict";const i={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},o=({move:e,size:l,bar:t})=>({[t.size]:l,transform:`translate${t.axis}(${e}%)`});exports.BAR_MAP=i;exports.GAP=4;exports.renderThumbStyle=o;