hisonvue 1.1.21 → 1.1.22

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 (59) hide show
  1. package/dist/{HAccordion-a5UZil7t.js → HAccordion-CKbaRrfY.js} +1 -1
  2. package/dist/{HAccordion-Djhoj_2Q.mjs → HAccordion-CNWAodMp.mjs} +2 -2
  3. package/dist/{HBaggie-CD26mD1p.js → HBaggie-BQYZO1MF.js} +1 -1
  4. package/dist/{HBaggie-YMHv54ny.mjs → HBaggie-C-OS7n2D.mjs} +2 -2
  5. package/dist/{HBanner-DEcDBbAa.js → HBanner-8AQVAGPP.js} +1 -1
  6. package/dist/{HBanner-Glkj36dA.mjs → HBanner-D0ImN6h1.mjs} +2 -2
  7. package/dist/{HButton-zN47uq3g.js → HButton-C1AtcoQd.js} +1 -1
  8. package/dist/{HButton-DlOQpSFM.mjs → HButton-CuoH95_k.mjs} +2 -2
  9. package/dist/{HCalendar-Cr2oVDTO.mjs → HCalendar-CnuUn3Xk.mjs} +1 -1
  10. package/dist/{HCalendar-PxP8M1kE.js → HCalendar-DFXWXkci.js} +1 -1
  11. package/dist/{HCaption-DxOZcWcP.js → HCaption-BaelSNHR.js} +1 -1
  12. package/dist/{HCaption-BbrgZlbJ.mjs → HCaption-Di8ePmqg.mjs} +1 -1
  13. package/dist/{HChart-D217Yxxq.js → HChart-DKfoM5dM.js} +1 -1
  14. package/dist/{HChart-BcslvuI8.mjs → HChart-xM2KDiJi.mjs} +1 -1
  15. package/dist/HDrawer-A3BpOuup.js +1 -0
  16. package/dist/{HDrawer-DlMTX7M_.mjs → HDrawer-Vt4JA6pk.mjs} +163 -163
  17. package/dist/{HDropdown-CvV8k1qQ.mjs → HDropdown-BBEH646p.mjs} +2 -2
  18. package/dist/{HDropdown-BhJOYbaN.js → HDropdown-Dj7h-JPP.js} +1 -1
  19. package/dist/{HFileset-C6dqnLa8.js → HFileset-B9EmgNi1.js} +1 -1
  20. package/dist/{HFileset-x00ZXjyE.mjs → HFileset-oi7P1lcc.mjs} +1 -1
  21. package/dist/{HGap-Do40sUXA.mjs → HGap-Bp1hRvbT.mjs} +1 -1
  22. package/dist/{HGap-BgzODoWp.js → HGap-Dy_H_-in.js} +1 -1
  23. package/dist/{HGrid-Dp7v84g5.mjs → HGrid-Bc13aqjL.mjs} +1 -1
  24. package/dist/{HGrid-CAU32_zq.js → HGrid-DDbU5kIr.js} +1 -1
  25. package/dist/{HImagebox-FYftlSK2.mjs → HImagebox-8Uwvm5U0.mjs} +1 -1
  26. package/dist/{HImagebox-XTSKnoBD.js → HImagebox-BVeQuB4p.js} +1 -1
  27. package/dist/{HInput-DxhtO9q3.js → HInput-DHK28wmp.js} +1 -1
  28. package/dist/{HInput-CInEGmfe.mjs → HInput-DoSKCROI.mjs} +1 -1
  29. package/dist/{HInputGroup-Cou5-12U.mjs → HInputGroup-DSUZqea5.mjs} +1 -1
  30. package/dist/{HInputGroup-DrjZO_7J.js → HInputGroup-gD-E8vgq.js} +1 -1
  31. package/dist/{HLabel-uSniKpDF.js → HLabel-BAbaNhJP.js} +1 -1
  32. package/dist/{HLabel-B4n5-mtx.mjs → HLabel-DQVACpDP.mjs} +2 -2
  33. package/dist/{HLayout-BsPro3dN.mjs → HLayout-BoHgIQcJ.mjs} +1 -1
  34. package/dist/{HLayout-wEq-lzHN.js → HLayout-CgaYkiuH.js} +1 -1
  35. package/dist/{HList-Dko7kLGO.mjs → HList-BQEDGW7_.mjs} +2 -2
  36. package/dist/{HList-DcV0Ssb3.js → HList-BROYxKwn.js} +1 -1
  37. package/dist/{HModal-BkjH2wMJ.js → HModal-DTqm3PfL.js} +1 -1
  38. package/dist/{HModal-D_vWZ5My.mjs → HModal-GpwcBz5c.mjs} +1 -1
  39. package/dist/HNote-BotCfjhk.js +1 -0
  40. package/dist/{HNote-CbfXDxO2.mjs → HNote-Dv8mltb0.mjs} +2 -2
  41. package/dist/{HPagination-Cq2OV1tY.mjs → HPagination-DG0I3Orn.mjs} +2 -2
  42. package/dist/{HPagination-HDTloKdH.js → HPagination-DyqohdbC.js} +1 -1
  43. package/dist/{HParagraph-Bg2lZxZR.js → HParagraph-BheX7M-W.js} +1 -1
  44. package/dist/{HParagraph-BUGeL78g.mjs → HParagraph-dWlO5RLM.mjs} +1 -1
  45. package/dist/{HPopup-3KITyE24.js → HPopup-BcGomDSy.js} +1 -1
  46. package/dist/{HPopup-Lqxe1H-e.mjs → HPopup-BrkB_lUB.mjs} +1 -1
  47. package/dist/{HSpinner-BqVl4t2n.js → HSpinner-CjjGcQJD.js} +1 -1
  48. package/dist/{HSpinner-VJJNUuXg.mjs → HSpinner-D6VNpQLM.mjs} +1 -1
  49. package/dist/{HTable-DzbCLDIn.js → HTable-BdNtBsjD.js} +1 -1
  50. package/dist/{HTable-6O4rYicc.mjs → HTable-D2HYTuO9.mjs} +1 -1
  51. package/dist/hisonvue.cjs.js +1 -1
  52. package/dist/hisonvue.es.js +2 -2
  53. package/dist/{index-Cvhi7T4w.mjs → index-CGr5-mvg.mjs} +1 -1
  54. package/dist/{index-5k-aAQlJ.js → index-DcB16odB.js} +1 -1
  55. package/dist/{setButtonCssEvent-BI-R9EJt.js → setButtonCssEvent-CTLQPvWj.js} +1 -1
  56. package/dist/{setButtonCssEvent-BScAn_gY.mjs → setButtonCssEvent-T2QV1cDz.mjs} +1 -1
  57. package/package.json +1 -1
  58. package/dist/HDrawer-CtMgceI2.js +0 -1
  59. package/dist/HNote-DQr6iUu0.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-5k-aAQlJ.js"),R=require("./setButtonCssEvent-BI-R9EJt.js"),_=require("./_plugin-vue_export-helper-BHFhmbuH.js"),ee={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},listItemStyle:{type:[String,Object,Array],required:!1},listItemInnerStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},border:{type:Boolean,default:!1},listBorder:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},listBackgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},listType:{type:String,default:"ul",validator:n=>n==="ul"||n==="ol"},bulletChar:{type:String,default:"•"},showMarker:{type:Boolean,default:!0},textList:{type:Array,default:()=>[]},addEvent:{type:Boolean,default:!1},columns:{type:Number,default:1,validator:n=>Number.isInteger(n)&&n>0},columnGap:{type:[Number,String],default:0},tabIndex:{type:[Number,String],default:null,validator:n=>n===null||n===""||!isNaN(+n)&&isFinite(+n)}},te=e.defineComponent({name:"HList",props:ee,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(n,{emit:s,slots:w}){const z=e.ref(null),u=e.ref([]),E=e.ref([]),i=n.id?n.id:o.getUUID(),d=`hlist:${i}`,a=o.useDevice(),g=e.ref(null),k=e.ref(n.visible),H=e.computed(()=>k.value?"":"hison-display-none"),v=e.ref(n.listType||"ul"),h=e.ref(n.bulletChar||"•"),b=e.ref(n.showMarker!==!1),B=e.ref(n.border??!1),C=e.ref(n.listBorder??!1),I=e.ref(n.backgroundType||o.BackgroundType.empty),T=e.ref(n.listBackgroundType||o.BackgroundType.empty),c=e.ref(!!n.addEvent),f=e.ref(n.columns??1),y=e.ref(n.columnGap??0),O=e.computed(()=>B.value?"hison-border":""),U=e.computed(()=>C.value?"hison-border":""),F=e.computed(()=>{switch(I.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),K=e.computed(()=>{switch(T.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),j=e.computed(()=>{var t;return((t=w.default)==null?void 0:t.call(w))??[]}),p=e.ref(n.tabIndex!==null&&n.tabIndex!==""?Number(n.tabIndex):null),P=e.computed(()=>{const t={};if(f.value>1){t.display="flex",t.flexWrap="wrap";const l=y.value;if(l!=null){const r=typeof l=="number"?`${l}px`:l;t.columnGap=r}t.listStyleType="none",t.paddingLeft=0}return t}),Y=e.computed(()=>{const t={};if(f.value>1){const l=Math.max(1,Math.floor(f.value)),r=y.value,m=r==null?"0px":typeof r=="number"?`${r}px`:String(r);m==="0"||m==="0px"?t.flex=`0 0 ${100/l}%`:t.flex=`0 0 calc((100% - (${l-1} * ${m})) / ${l})`}return t}),$=(t,l=[])=>{if(!t||t.length===0)return l;for(const r of t)if(r.type!==e.Comment&&r.type!==e.Text)if(r.type===e.Fragment){const m=r.children;$(m,l)}else l.push(r);return l},M=e.computed(()=>$(j.value)),W=e.computed(()=>M.value.length>0),L=e.ref(Array.isArray(n.textList)?n.textList:[]),D=e.computed(()=>L.value??[]),J=e.computed(()=>v.value),N=e.ref([]),A=()=>{N.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",a.value),o.addComponentNameToClass(N.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(N.value,"color","primary")},S=(t=!0)=>{e.nextTick(()=>{u.value.forEach(l=>{l&&(R.removeButtonCssEvent(l),t&&c.value&&R.addButtonCssEvent(l))})})},Q=t=>{c.value&&s("click",t,g.value)},X=(t,l)=>{c.value&&s(t,l,g.value)},V=()=>{o.hisonCloser.component.listList[i]&&o.hisonCloser.component.listList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The list ID is at risk of being duplicated. ${i}`),o.registerReloadable(d,()=>{q(),e.nextTick(V)}),A(),S(!0),g.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"list",isVisible:()=>k.value,setVisible:t=>{k.value=t},getListType:()=>v.value,setListType:t=>{v.value=t},isShowMarker:()=>b.value,setShowMarker:t=>{b.value=t},getBulletChar:()=>h.value,setBulletChar:t=>{h.value=t},isBorder:()=>B.value,setBorder:t=>{B.value=t},isListBorder:()=>C.value,setListBorder:t=>{C.value=t},getBackgroundType:()=>I.value,setBackgroundType:t=>{I.value=t},getListBackgroundType:()=>T.value,setListBackgroundType:t=>{T.value=t},getTextList:()=>[...D.value],setTextList:t=>{L.value=Array.isArray(t)?t:[]},isAddEvent:()=>c.value,setAddEvent:t=>{c.value=!!t,S(!0)},getTabIndex:()=>p.value,setTabIndex:t=>{p.value=t!=null?Number(t):null},getListRowCount:()=>u.value.length,getListItem:t=>!Number.isInteger(t)||t<0||t>=u.value.length?null:u.value[t]??null,getColumns:()=>f.value,setColumns:t=>{const l=Number(t),r=!Number.isFinite(l)||l<=1?1:Math.floor(l);f.value=r},getColumnGap:()=>y.value,setColumnGap:t=>{t==null?y.value=0:y.value=t},focus:(t=0)=>{var m;if(!c.value)return;const l=p.value;if(l==null||l===-1||!Number.isInteger(t)||t<0||t>=u.value.length)return;const r=u.value[t];(m=r==null?void 0:r.focus)==null||m.call(r)},reload:()=>o.reloadHisonComponent(d)},o.hisonCloser.component.listList[i]=g.value,s("mounted",g.value)},q=()=>{o.unregisterReloadable(d),u.value.forEach(t=>t&&R.removeButtonCssEvent(t)),delete o.hisonCloser.component.listList[i]};e.onMounted(V),e.onBeforeUnmount(q);const G=t=>{if(!t)return null;if(t instanceof Element)return t;const l=t.$el;return l instanceof Element?l:null},Z=t=>{const l=G(t);l&&(u.value.includes(l)||u.value.push(l))},x=t=>{const l=G(t);l&&(E.value.includes(l)||E.value.push(l))};return e.watch(a,t=>{A(),s("responsive-change",t)}),e.watch(()=>n.visible,t=>{const l=!!t;l!==k.value&&(k.value=l)}),e.watch(()=>n.border,t=>{const l=!!t;l!==B.value&&(B.value=l)}),e.watch(()=>n.listBorder,t=>{const l=!!t;l!==C.value&&(C.value=l)}),e.watch(()=>n.backgroundType,t=>{t&&t!==I.value&&(I.value=t)}),e.watch(()=>n.listBackgroundType,t=>{t&&t!==T.value&&(T.value=t)}),e.watch(()=>n.listType,t=>{const l=t==="ol"?"ol":"ul";l!==v.value&&(v.value=l)}),e.watch(()=>n.bulletChar,t=>{const l=t??"•";l!==h.value&&(h.value=l)}),e.watch(()=>n.showMarker,t=>{const l=t!==!1;l!==b.value&&(b.value=l)}),e.watch(()=>n.textList,t=>{L.value=Array.isArray(t)?t:[]}),e.watch(()=>n.addEvent,t=>{const l=!!t;l!==c.value&&(c.value=l,S(!0))}),e.watch(()=>n.columns,t=>{const l=typeof t=="number"?t:Number(t),r=!Number.isFinite(l)||l<=1?1:Math.floor(l);r!==f.value&&(f.value=r)}),e.watch(()=>n.columnGap,t=>{const l=t??0;l!==y.value&&(y.value=l)}),e.watch(()=>n.tabIndex,t=>{const l=t===null||t===""?null:Number(t);l!==p.value&&(p.value=l)}),e.watch(()=>n.class,()=>{A()}),e.watch(M,()=>{S(!0)}),e.watch(L,()=>{S(!0)},{deep:!0}),{props:n,listRef:z,itemRefs:u,itemInnerRefs:E,renderTag:J,listType:v,bulletChar:h,showMarker:b,visibleClass:H,borderClass:O,listBorderClass:U,backgroundTypeClass:F,listBackgroundTypeClass:K,responsiveClassList:N,hasElementSlot:W,elementNodes:M,normalizedItems:D,listLayoutStyle:P,listItemLayoutStyle:Y,tabIndex:p,setItemRef:Z,setItemInnerRef:x,onItemClick:Q,emitItem:X}}}),ne=["tabindex"],le={key:0,class:"hison-list-marker"},se={key:0},oe={key:1},re={class:"hison-list-content"},ae=["tabindex"],ie={key:0,class:"hison-list-marker"},ue={key:0},de={key:1},ce={class:"hison-list-content"},me={key:1,class:"hison-list-item-text"};function fe(n,s,w,z,u,E){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-wrapper",...n.responsiveClassList,n.visibleClass])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.renderTag),{ref:"listRef",class:e.normalizeClass(["hison-list",n.borderClass,n.backgroundTypeClass]),style:e.normalizeStyle([n.props.style,n.listLayoutStyle]),onKeydown:[e.withKeys(e.withModifiers(n.onItemClick,["prevent"]),["enter"]),e.withKeys(e.withModifiers(n.onItemClick,["prevent"]),["space"])]},{default:e.withCtx(()=>[n.hasElementSlot?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.elementNodes,(i,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["hison-list-item",n.listBorderClass,n.listBackgroundTypeClass]),style:e.normalizeStyle([n.listItemLayoutStyle,n.props.listItemStyle]),ref_for:!0,ref:n.setItemRef,tabindex:n.tabIndex??void 0,onClick:s[0]||(s[0]=(...a)=>n.onItemClick&&n.onItemClick(...a)),onMousedown:s[1]||(s[1]=a=>n.emitItem("mousedown",a)),onMouseup:s[2]||(s[2]=a=>n.emitItem("mouseup",a)),onMouseover:s[3]||(s[3]=a=>n.emitItem("mouseover",a)),onMouseout:s[4]||(s[4]=a=>n.emitItem("mouseout",a))},[e.createElementVNode("div",{class:"hison-list-item-inner",style:e.normalizeStyle(n.props.listItemInnerStyle),ref_for:!0,ref:n.setItemInnerRef},[n.showMarker?(e.openBlock(),e.createElementBlock("div",le,[n.listType==="ol"?(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(d+1)+".",1)):(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(n.bulletChar),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",re,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i)))])],4)],46,ne))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.normalizedItems,(i,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["hison-list-item",n.listBorderClass,n.listBackgroundTypeClass]),style:e.normalizeStyle([n.listItemLayoutStyle,n.props.listItemStyle]),ref_for:!0,ref:n.setItemRef,tabindex:n.tabIndex??void 0,onClick:s[5]||(s[5]=(...a)=>n.onItemClick&&n.onItemClick(...a)),onMousedown:s[6]||(s[6]=a=>n.emitItem("mousedown",a)),onMouseup:s[7]||(s[7]=a=>n.emitItem("mouseup",a)),onMouseover:s[8]||(s[8]=a=>n.emitItem("mouseover",a)),onMouseout:s[9]||(s[9]=a=>n.emitItem("mouseout",a))},[e.createElementVNode("div",{class:"hison-list-item-inner",style:e.normalizeStyle(n.props.listItemInnerStyle),ref_for:!0,ref:n.setItemInnerRef},[n.showMarker?(e.openBlock(),e.createElementBlock("div",ie,[n.listType==="ol"?(e.openBlock(),e.createElementBlock("span",ue,e.toDisplayString(d+1)+".",1)):(e.openBlock(),e.createElementBlock("span",de,e.toDisplayString(n.bulletChar),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",ce,[n.$slots.item?e.renderSlot(n.$slots,"item",{key:0,item:i,index:d}):(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(String(i??"")),1))])],4)],46,ae))),128))]),_:3},40,["class","style","onKeydown"]))],2)}const ye=_._export_sfc(te,[["render",fe]]);exports.default=ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DcB16odB.js"),R=require("./setButtonCssEvent-CTLQPvWj.js"),_=require("./_plugin-vue_export-helper-BHFhmbuH.js"),ee={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},listItemStyle:{type:[String,Object,Array],required:!1},listItemInnerStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},border:{type:Boolean,default:!1},listBorder:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},listBackgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},listType:{type:String,default:"ul",validator:n=>n==="ul"||n==="ol"},bulletChar:{type:String,default:"•"},showMarker:{type:Boolean,default:!0},textList:{type:Array,default:()=>[]},addEvent:{type:Boolean,default:!1},columns:{type:Number,default:1,validator:n=>Number.isInteger(n)&&n>0},columnGap:{type:[Number,String],default:0},tabIndex:{type:[Number,String],default:null,validator:n=>n===null||n===""||!isNaN(+n)&&isFinite(+n)}},te=e.defineComponent({name:"HList",props:ee,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(n,{emit:s,slots:w}){const z=e.ref(null),u=e.ref([]),E=e.ref([]),i=n.id?n.id:o.getUUID(),d=`hlist:${i}`,a=o.useDevice(),g=e.ref(null),k=e.ref(n.visible),H=e.computed(()=>k.value?"":"hison-display-none"),v=e.ref(n.listType||"ul"),h=e.ref(n.bulletChar||"•"),b=e.ref(n.showMarker!==!1),B=e.ref(n.border??!1),C=e.ref(n.listBorder??!1),I=e.ref(n.backgroundType||o.BackgroundType.empty),T=e.ref(n.listBackgroundType||o.BackgroundType.empty),c=e.ref(!!n.addEvent),f=e.ref(n.columns??1),y=e.ref(n.columnGap??0),O=e.computed(()=>B.value?"hison-border":""),U=e.computed(()=>C.value?"hison-border":""),F=e.computed(()=>{switch(I.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),K=e.computed(()=>{switch(T.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),j=e.computed(()=>{var t;return((t=w.default)==null?void 0:t.call(w))??[]}),p=e.ref(n.tabIndex!==null&&n.tabIndex!==""?Number(n.tabIndex):null),P=e.computed(()=>{const t={};if(f.value>1){t.display="flex",t.flexWrap="wrap";const l=y.value;if(l!=null){const r=typeof l=="number"?`${l}px`:l;t.columnGap=r}t.listStyleType="none",t.paddingLeft=0}return t}),Y=e.computed(()=>{const t={};if(f.value>1){const l=Math.max(1,Math.floor(f.value)),r=y.value,m=r==null?"0px":typeof r=="number"?`${r}px`:String(r);m==="0"||m==="0px"?t.flex=`0 0 ${100/l}%`:t.flex=`0 0 calc((100% - (${l-1} * ${m})) / ${l})`}return t}),$=(t,l=[])=>{if(!t||t.length===0)return l;for(const r of t)if(r.type!==e.Comment&&r.type!==e.Text)if(r.type===e.Fragment){const m=r.children;$(m,l)}else l.push(r);return l},M=e.computed(()=>$(j.value)),W=e.computed(()=>M.value.length>0),L=e.ref(Array.isArray(n.textList)?n.textList:[]),D=e.computed(()=>L.value??[]),J=e.computed(()=>v.value),N=e.ref([]),A=()=>{N.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",a.value),o.addComponentNameToClass(N.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(N.value,"color","primary")},S=(t=!0)=>{e.nextTick(()=>{u.value.forEach(l=>{l&&(R.removeButtonCssEvent(l),t&&c.value&&R.addButtonCssEvent(l))})})},Q=t=>{c.value&&s("click",t,g.value)},X=(t,l)=>{c.value&&s(t,l,g.value)},V=()=>{o.hisonCloser.component.listList[i]&&o.hisonCloser.component.listList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The list ID is at risk of being duplicated. ${i}`),o.registerReloadable(d,()=>{q(),e.nextTick(V)}),A(),S(!0),g.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"list",isVisible:()=>k.value,setVisible:t=>{k.value=t},getListType:()=>v.value,setListType:t=>{v.value=t},isShowMarker:()=>b.value,setShowMarker:t=>{b.value=t},getBulletChar:()=>h.value,setBulletChar:t=>{h.value=t},isBorder:()=>B.value,setBorder:t=>{B.value=t},isListBorder:()=>C.value,setListBorder:t=>{C.value=t},getBackgroundType:()=>I.value,setBackgroundType:t=>{I.value=t},getListBackgroundType:()=>T.value,setListBackgroundType:t=>{T.value=t},getTextList:()=>[...D.value],setTextList:t=>{L.value=Array.isArray(t)?t:[]},isAddEvent:()=>c.value,setAddEvent:t=>{c.value=!!t,S(!0)},getTabIndex:()=>p.value,setTabIndex:t=>{p.value=t!=null?Number(t):null},getListRowCount:()=>u.value.length,getListItem:t=>!Number.isInteger(t)||t<0||t>=u.value.length?null:u.value[t]??null,getColumns:()=>f.value,setColumns:t=>{const l=Number(t),r=!Number.isFinite(l)||l<=1?1:Math.floor(l);f.value=r},getColumnGap:()=>y.value,setColumnGap:t=>{t==null?y.value=0:y.value=t},focus:(t=0)=>{var m;if(!c.value)return;const l=p.value;if(l==null||l===-1||!Number.isInteger(t)||t<0||t>=u.value.length)return;const r=u.value[t];(m=r==null?void 0:r.focus)==null||m.call(r)},reload:()=>o.reloadHisonComponent(d)},o.hisonCloser.component.listList[i]=g.value,s("mounted",g.value)},q=()=>{o.unregisterReloadable(d),u.value.forEach(t=>t&&R.removeButtonCssEvent(t)),delete o.hisonCloser.component.listList[i]};e.onMounted(V),e.onBeforeUnmount(q);const G=t=>{if(!t)return null;if(t instanceof Element)return t;const l=t.$el;return l instanceof Element?l:null},Z=t=>{const l=G(t);l&&(u.value.includes(l)||u.value.push(l))},x=t=>{const l=G(t);l&&(E.value.includes(l)||E.value.push(l))};return e.watch(a,t=>{A(),s("responsive-change",t)}),e.watch(()=>n.visible,t=>{const l=!!t;l!==k.value&&(k.value=l)}),e.watch(()=>n.border,t=>{const l=!!t;l!==B.value&&(B.value=l)}),e.watch(()=>n.listBorder,t=>{const l=!!t;l!==C.value&&(C.value=l)}),e.watch(()=>n.backgroundType,t=>{t&&t!==I.value&&(I.value=t)}),e.watch(()=>n.listBackgroundType,t=>{t&&t!==T.value&&(T.value=t)}),e.watch(()=>n.listType,t=>{const l=t==="ol"?"ol":"ul";l!==v.value&&(v.value=l)}),e.watch(()=>n.bulletChar,t=>{const l=t??"•";l!==h.value&&(h.value=l)}),e.watch(()=>n.showMarker,t=>{const l=t!==!1;l!==b.value&&(b.value=l)}),e.watch(()=>n.textList,t=>{L.value=Array.isArray(t)?t:[]}),e.watch(()=>n.addEvent,t=>{const l=!!t;l!==c.value&&(c.value=l,S(!0))}),e.watch(()=>n.columns,t=>{const l=typeof t=="number"?t:Number(t),r=!Number.isFinite(l)||l<=1?1:Math.floor(l);r!==f.value&&(f.value=r)}),e.watch(()=>n.columnGap,t=>{const l=t??0;l!==y.value&&(y.value=l)}),e.watch(()=>n.tabIndex,t=>{const l=t===null||t===""?null:Number(t);l!==p.value&&(p.value=l)}),e.watch(()=>n.class,()=>{A()}),e.watch(M,()=>{S(!0)}),e.watch(L,()=>{S(!0)},{deep:!0}),{props:n,listRef:z,itemRefs:u,itemInnerRefs:E,renderTag:J,listType:v,bulletChar:h,showMarker:b,visibleClass:H,borderClass:O,listBorderClass:U,backgroundTypeClass:F,listBackgroundTypeClass:K,responsiveClassList:N,hasElementSlot:W,elementNodes:M,normalizedItems:D,listLayoutStyle:P,listItemLayoutStyle:Y,tabIndex:p,setItemRef:Z,setItemInnerRef:x,onItemClick:Q,emitItem:X}}}),ne=["tabindex"],le={key:0,class:"hison-list-marker"},se={key:0},oe={key:1},re={class:"hison-list-content"},ae=["tabindex"],ie={key:0,class:"hison-list-marker"},ue={key:0},de={key:1},ce={class:"hison-list-content"},me={key:1,class:"hison-list-item-text"};function fe(n,s,w,z,u,E){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-wrapper",...n.responsiveClassList,n.visibleClass])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.renderTag),{ref:"listRef",class:e.normalizeClass(["hison-list",n.borderClass,n.backgroundTypeClass]),style:e.normalizeStyle([n.props.style,n.listLayoutStyle]),onKeydown:[e.withKeys(e.withModifiers(n.onItemClick,["prevent"]),["enter"]),e.withKeys(e.withModifiers(n.onItemClick,["prevent"]),["space"])]},{default:e.withCtx(()=>[n.hasElementSlot?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.elementNodes,(i,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["hison-list-item",n.listBorderClass,n.listBackgroundTypeClass]),style:e.normalizeStyle([n.listItemLayoutStyle,n.props.listItemStyle]),ref_for:!0,ref:n.setItemRef,tabindex:n.tabIndex??void 0,onClick:s[0]||(s[0]=(...a)=>n.onItemClick&&n.onItemClick(...a)),onMousedown:s[1]||(s[1]=a=>n.emitItem("mousedown",a)),onMouseup:s[2]||(s[2]=a=>n.emitItem("mouseup",a)),onMouseover:s[3]||(s[3]=a=>n.emitItem("mouseover",a)),onMouseout:s[4]||(s[4]=a=>n.emitItem("mouseout",a))},[e.createElementVNode("div",{class:"hison-list-item-inner",style:e.normalizeStyle(n.props.listItemInnerStyle),ref_for:!0,ref:n.setItemInnerRef},[n.showMarker?(e.openBlock(),e.createElementBlock("div",le,[n.listType==="ol"?(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(d+1)+".",1)):(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(n.bulletChar),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",re,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i)))])],4)],46,ne))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.normalizedItems,(i,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["hison-list-item",n.listBorderClass,n.listBackgroundTypeClass]),style:e.normalizeStyle([n.listItemLayoutStyle,n.props.listItemStyle]),ref_for:!0,ref:n.setItemRef,tabindex:n.tabIndex??void 0,onClick:s[5]||(s[5]=(...a)=>n.onItemClick&&n.onItemClick(...a)),onMousedown:s[6]||(s[6]=a=>n.emitItem("mousedown",a)),onMouseup:s[7]||(s[7]=a=>n.emitItem("mouseup",a)),onMouseover:s[8]||(s[8]=a=>n.emitItem("mouseover",a)),onMouseout:s[9]||(s[9]=a=>n.emitItem("mouseout",a))},[e.createElementVNode("div",{class:"hison-list-item-inner",style:e.normalizeStyle(n.props.listItemInnerStyle),ref_for:!0,ref:n.setItemInnerRef},[n.showMarker?(e.openBlock(),e.createElementBlock("div",ie,[n.listType==="ol"?(e.openBlock(),e.createElementBlock("span",ue,e.toDisplayString(d+1)+".",1)):(e.openBlock(),e.createElementBlock("span",de,e.toDisplayString(n.bulletChar),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",ce,[n.$slots.item?e.renderSlot(n.$slots,"item",{key:0,item:i,index:d}):(e.openBlock(),e.createElementBlock("span",me,e.toDisplayString(String(i??"")),1))])],4)],46,ae))),128))]),_:3},40,["class","style","onKeydown"]))],2)}const ye=_._export_sfc(te,[["render",fe]]);exports.default=ye;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-5k-aAQlJ.js"),Ce=require("./scrollManager-CEEWQwoK.js"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.js"),He={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!1},border:{type:Boolean,default:!0},backgroundType:{type:String,default:n.BackgroundType.empty,validator:o=>n.BACKGROUND_TYPE_VALUES.includes(o)},zIndex:{type:Number,default:1300},position:{type:String,default:n.ScreenPosition.middleCenter,validator:o=>n.SCREEN_POSITION_VALUES.includes(o)},headerVisible:{type:Boolean,default:!0},footerVisible:{type:Boolean,default:!0},caption:{type:String,default:null},captionBorder:{type:Boolean,default:!1},captionBackgroundType:{type:String,default:n.BackgroundType.filled,validator:o=>n.BACKGROUND_TYPE_VALUES.includes(o)},captionPlacement:{type:String,default:"header-center"},closeButtonVisible:{type:Boolean,default:!0},closeButtonText:{type:String,default:"X"},closeButtonTitle:{type:String,default:"close"},closeButtonBorder:{type:Boolean,default:!0},closeButtonBackgroundType:{type:String,default:n.BackgroundType.empty,validator:o=>n.BACKGROUND_TYPE_VALUES.includes(o)},closeButtonPlacement:{type:String,default:"footer-right"},closeClickOverlay:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},overlayStyle:{type:[String,Object,Array],required:!1},scrollLock:{type:Boolean,default:!0},enterAnimationClass:{type:String,required:!1},leaveAnimationClass:{type:String,required:!1}},ze=e.defineComponent({name:"HModal",props:He,inheritAttrs:!1,emits:["mounted","responsive-change","open","close"],setup(o,{emit:m,slots:E}){const c=o.id||n.getUUID(),P=`hmodal:${c}`,I=n.useDevice(),d=e.ref(null),a=e.ref(o.visible),u=e.ref(o.headerVisible),C=e.ref(o.footerVisible),v=e.ref(o.closeButtonVisible),h=e.ref(o.caption??null),S=e.ref(o.captionBorder),w=e.ref(o.captionBackgroundType),T=e.ref(o.closeButtonBorder),V=e.ref(o.closeButtonBackgroundType),$=e.ref(o.closeClickOverlay),L=e.ref(o.showOverlay),k=e.ref(o.scrollLock),N=e.ref(o.border),H=e.ref(o.backgroundType||n.BackgroundType.empty),s=e.ref(o.closeButtonPlacement),r=e.ref(o.captionPlacement),y=e.ref(o.zIndex??1e3),z=e.ref(o.position),ve=e.computed(()=>{const t={zIndex:y.value};switch(t.left="",t.right="",t.top="",t.bottom="",t.transform="none",z.value){case n.ScreenPosition.topLeft:t.left="0",t.top="0";break;case n.ScreenPosition.topCenter:t.left="50%",t.top="0",t.transform="translateX(-50%)";break;case n.ScreenPosition.topRight:t.right="0",t.top="0";break;case n.ScreenPosition.middleLeft:t.left="0",t.top="50%",t.transform="translateY(-50%)";break;case n.ScreenPosition.middleCenter:t.left="50%",t.top="50%",t.transform="translate(-50%, -50%)";break;case n.ScreenPosition.middleRight:t.right="0",t.top="50%",t.transform="translateY(-50%)";break;case n.ScreenPosition.bottomLeft:t.left="0",t.bottom="0";break;case n.ScreenPosition.bottomCenter:t.left="50%",t.bottom="0",t.transform="translateX(-50%)";break;case n.ScreenPosition.bottomRight:t.right="0",t.bottom="0";break}return t}),he=e.computed(()=>{const l={zIndex:(y.value??1e3)-1},g=o.overlayStyle;return g?Array.isArray(g)?[{...l},...g]:typeof g=="string"?[l,g]:{...l,...g}:l}),pe=e.computed(()=>a.value?"":"hison-display-none"),fe=e.computed(()=>{switch(H.value){case"transparent":return"hison-bg-transparent";case"filled":return"hison-bg-filled";default:return"hison-bg-empty"}}),ke=e.computed(()=>N.value?"hison-border":""),O=e.ref([]),q=()=>{O.value=n.extractResponsiveClasses(n.toClassString(o.class)||"",I.value),n.addComponentNameToClass(O.value,"size",n.hisonCloser.componentStyle.size),n.addComponentNameToClass(O.value,"color","primary")},ye=e.computed(()=>[...n.extractPrefixedClasses(n.toClassString(o.class)||"","size"),...n.extractPrefixedClasses(n.toClassString(o.class)||"","color")]),Be=e.computed(()=>a.value&&L.value),be=e.computed(()=>!!E.header),ge=e.computed(()=>!!E.footer),i=t=>t.split("-")[1]||"left",j=e.computed(()=>!!(h.value&&h.value.trim().length)),U=e.computed(()=>j.value&&r.value.startsWith("header")),W=e.computed(()=>v.value&&s.value.startsWith("header")),Z=e.computed(()=>U.value&&i(r.value)==="left"),G=e.computed(()=>U.value&&i(r.value)==="center"),K=e.computed(()=>U.value&&i(r.value)==="right"),X=e.computed(()=>W.value&&i(s.value)==="left"),J=e.computed(()=>W.value&&i(s.value)==="center"),Q=e.computed(()=>W.value&&i(s.value)==="right"),_=e.computed(()=>Z.value||X.value),x=e.computed(()=>G.value||J.value),ee=e.computed(()=>K.value||Q.value),M=e.computed(()=>j.value&&r.value.startsWith("footer")),D=e.computed(()=>v.value&&s.value.startsWith("footer")),oe=e.computed(()=>M.value&&i(r.value)==="left"),te=e.computed(()=>M.value&&i(r.value)==="center"),le=e.computed(()=>M.value&&i(r.value)==="right"),ne=e.computed(()=>D.value&&i(s.value)==="left"),ae=e.computed(()=>D.value&&i(s.value)==="center"),se=e.computed(()=>D.value&&i(s.value)==="right"),re=e.computed(()=>oe.value||ne.value),ie=e.computed(()=>te.value||ae.value),ce=e.computed(()=>le.value||se.value),Se=e.computed(()=>u.value&&(be.value||_.value||x.value||ee.value)),we=e.computed(()=>C.value&&(ge.value||re.value||ie.value||ce.value)),R=()=>{k.value&&Ce.acquireScrollLock(c)},F=()=>{k.value&&Ce.releaseScrollLock(c)},B=e.ref(null),Te=t=>{$.value&&b()},Ve=t=>{b()},p=e.ref(o.enterAnimationClass||"hison-modal-enter"),f=e.ref(o.leaveAnimationClass||"hison-modal-leave"),Y=e.ref(null),ue=async()=>{const t=Y.value;!t||!p.value||(t.classList.remove(f.value),t.offsetWidth,t.classList.add(p.value))},$e=async()=>{const t=Y.value;!t||!f.value||(t.classList.remove(p.value),t.offsetWidth,t.classList.add(f.value),await new Promise(l=>setTimeout(l,200)))},A=async()=>{a.value||(a.value=!0,R(),await e.nextTick(),ue(),m("open",e.unref(B)))},b=async()=>{if(a.value)try{await $e()}finally{a.value=!1,F(),m("close",e.unref(B))}},Le=async()=>a.value?b():A(),de=()=>{n.hisonCloser.component.modalList[c]&&n.hisonCloser.component.modalList[c].isHisonvueComponent&&console.warn(`[Hisonvue] The modal ID is at risk of being duplicated. ${c}`),n.registerReloadable(P,()=>{me(),e.nextTick(de)}),q(),a.value&&(R(),e.nextTick(ue)),B.value={isHisonvueComponent:!0,getId:()=>c,getType:()=>"modal",isVisible:()=>a.value,open:A,close:b,toggle:Le,setVisible:t=>t?A():b(),getZIndex:()=>y.value,setZIndex:t=>{y.value=t},getPosition:()=>z.value,setPosition:t=>{z.value=t},isHeaderVisible:()=>u.value,setHeaderVisible:t=>{u.value=t},isFooterVisible:()=>C.value,setFooterVisible:t=>{C.value=t},getCaption:()=>h.value||"",setCaption:t=>{h.value=t},isCaptionBorder:()=>S.value,setCaptionBorder:t=>{S.value=t},getCaptionBackgroundType:()=>w.value,setCaptionBackgroundType:t=>{w.value=t},isCloseButtonVisible:()=>v.value,setCloseButtonVisible:t=>{v.value=t},isCloseButtonBorder:()=>T.value,setCloseButtonBorder:t=>{T.value=t},getCloseButtonBackgroundType:()=>V.value,setCloseButtonBackgroundType:t=>{V.value=t},getButtonPlacement:()=>s.value,setButtonPlacement:t=>{s.value=t},getCaptionPlacement:()=>r.value,setCaptionPlacement:t=>{r.value=t},isCloseClickOverlay:()=>$.value,setCloseClickOverlay:t=>{$.value=t},isOverlayShown:()=>L.value,setOverlayShown:t=>{L.value=t},isBorder:()=>N.value,setBorder:t=>{N.value=t},getBackgroundType:()=>H.value,setBackgroundType:t=>{H.value=t},isScrollLocked:()=>k.value,setScrollLock:t=>{k.value=t,a.value&&(t?R():F())},getAnimationClasses:()=>({enter:p.value,leave:f.value}),setAnimationClasses:t=>{"enter"in t&&(p.value=t.enter||""),"leave"in t&&(f.value=t.leave||"")},reload:()=>n.reloadHisonComponent(P)},n.hisonCloser.component.modalList[c]=B.value,m("mounted",B.value)},me=()=>{n.unregisterReloadable(P),delete n.hisonCloser.component.modalList[c],a.value&&F()};return e.onMounted(de),e.onBeforeUnmount(me),e.watch(I,t=>{q(),m("responsive-change",t)}),e.watch(()=>o.visible,t=>{const l=!!t;l&&!a.value?A():!l&&a.value&&b()}),e.watch(()=>o.headerVisible,t=>{const l=!!t;l!==u.value&&(u.value=l)}),e.watch(()=>o.footerVisible,t=>{const l=!!t;l!==C.value&&(C.value=l)}),e.watch(()=>o.closeButtonVisible,t=>{const l=!!t;l!==v.value&&(v.value=l)}),e.watch(()=>o.caption,t=>{const l=t??null;l!==h.value&&(h.value=l)}),e.watch(()=>o.captionBorder,t=>{const l=!!t;l!==S.value&&(S.value=l)}),e.watch(()=>o.captionBackgroundType,t=>{t&&t!==w.value&&(w.value=t)}),e.watch(()=>o.closeButtonBorder,t=>{const l=!!t;l!==T.value&&(T.value=l)}),e.watch(()=>o.closeButtonBackgroundType,t=>{t&&t!==V.value&&(V.value=t)}),e.watch(()=>o.closeButtonPlacement,t=>{t&&t!==s.value&&(s.value=t)}),e.watch(()=>o.captionPlacement,t=>{t&&t!==r.value&&(r.value=t)}),e.watch(()=>o.closeClickOverlay,t=>{const l=!!t;l!==$.value&&($.value=l)}),e.watch(()=>o.showOverlay,t=>{const l=!!t;l!==L.value&&(L.value=l)}),e.watch(()=>o.scrollLock,t=>{const l=!!t;l!==k.value&&(k.value=l,a.value&&(l?R():F()))}),e.watch(()=>o.border,t=>{const l=!!t;l!==N.value&&(N.value=l)}),e.watch(()=>o.backgroundType,t=>{t&&t!==H.value&&(H.value=t)}),e.watch(()=>o.zIndex,t=>{const l=Number(t??1300);l!==y.value&&(y.value=l)}),e.watch(()=>o.position,t=>{t&&t!==z.value&&(z.value=t)}),e.watch(()=>o.enterAnimationClass,t=>{const l=t||"hison-modal-enter";l!==p.value&&(p.value=l)}),e.watch(()=>o.leaveAnimationClass,t=>{const l=t||"hison-modal-leave";l!==f.value&&(f.value=l)}),e.watch(()=>o.class,()=>{q()}),{id:c,props:o,modalRef:Y,modalWrapperRef:d,caption:h,responsiveClassList:O,visibleClass:pe,borderClass:ke,backgroundTypeClass:fe,isOverlayVisible:Be,headerVisibleComputed:Se,footerVisibleComputed:we,headerHasLeft:_,headerHasCenter:x,headerHasRight:ee,showHeaderCaptionLeft:Z,showHeaderCaptionCenter:G,showHeaderCaptionRight:K,showHeaderCloseLeft:X,showHeaderCloseCenter:J,showHeaderCloseRight:Q,footerHasLeft:re,footerHasCenter:ie,footerHasRight:ce,showFooterCaptionLeft:oe,showFooterCaptionCenter:te,showFooterCaptionRight:le,showFooterCloseLeft:ne,showFooterCloseCenter:ae,showFooterCloseRight:se,childClassList:ye,overlayStyleWithZ:he,wrapperStyle:ve,onOverlayClick:Te,onClickCloseButton:Ve,modalMethods:e.computed(()=>e.unref(B)),closeButtonVisible:v,buttonPlacement:s,captionPlacement:r,closeButtonText:o.closeButtonText,closeButtonTitle:o.closeButtonTitle,closeButtonBorder:T,closeButtonBackgroundType:V,captionBorder:S,captionBackgroundType:w}}});function Pe(o,m,E,c,P,I){const d=e.resolveComponent("HLabel"),a=e.resolveComponent("HButton"),u=e.resolveComponent("HLayout");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-layer-host",o.visibleClass])},[o.isOverlayVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hison-modal-overlay",style:e.normalizeStyle(o.overlayStyleWithZ),onClick:m[0]||(m[0]=(...C)=>o.onOverlayClick&&o.onOverlayClick(...C))},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"modalWrapperRef",class:e.normalizeClass(["hison-modal-wrapper",...o.responsiveClassList]),style:e.normalizeStyle(o.wrapperStyle)},[e.createElementVNode("div",{ref:"modalRef",class:e.normalizeClass(["hison-modal",o.borderClass,o.backgroundTypeClass]),style:e.normalizeStyle(o.props.style),role:"dialog"},[o.headerVisibleComputed?(e.openBlock(),e.createBlock(u,{key:0,id:`hison_modal_header_layout_${o.id}`,class:e.normalizeClass(["hison-modal-header",...o.childClassList])},{default:e.withCtx(()=>[o.$slots.header?e.renderSlot(o.$slots,"header",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.headerHasLeft?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.showHeaderCaptionLeft?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-left","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showHeaderCloseLeft?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"header-left"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-left","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.headerHasCenter?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.showHeaderCaptionCenter?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-center","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showHeaderCloseCenter?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"header-center"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-center","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.headerHasRight?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[o.showHeaderCaptionRight?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-right","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showHeaderCloseRight?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"header-right"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-right","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))]),_:3},8,["id","class"])):e.createCommentVNode("",!0),e.createVNode(u,{id:`hison_modal_body_layout_${o.id}`,class:e.normalizeClass(["hison-modal-body",...o.childClassList])},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id","class"]),o.footerVisibleComputed?(e.openBlock(),e.createBlock(u,{key:1,id:`hison_modal_footer_layout_${o.id}`,class:e.normalizeClass(["hison-modal-footer",...o.childClassList])},{default:e.withCtx(()=>[o.$slots.footer?e.renderSlot(o.$slots,"footer",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.footerHasLeft?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.showFooterCaptionLeft?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-left","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showFooterCloseLeft?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"footer-left"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-left","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.footerHasCenter?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.showFooterCaptionCenter?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-center","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showFooterCloseCenter?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"footer-center"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-center","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.footerHasRight?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[o.showFooterCaptionRight?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-right","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showFooterCloseRight?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"footer-right"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-right","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))]),_:3},8,["id","class"])):e.createCommentVNode("",!0)],6)],6)],2)}const Oe=Ne._export_sfc(ze,[["render",Pe]]);exports.default=Oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DcB16odB.js"),Ce=require("./scrollManager-CEEWQwoK.js"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.js"),He={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!1},border:{type:Boolean,default:!0},backgroundType:{type:String,default:n.BackgroundType.empty,validator:o=>n.BACKGROUND_TYPE_VALUES.includes(o)},zIndex:{type:Number,default:1300},position:{type:String,default:n.ScreenPosition.middleCenter,validator:o=>n.SCREEN_POSITION_VALUES.includes(o)},headerVisible:{type:Boolean,default:!0},footerVisible:{type:Boolean,default:!0},caption:{type:String,default:null},captionBorder:{type:Boolean,default:!1},captionBackgroundType:{type:String,default:n.BackgroundType.filled,validator:o=>n.BACKGROUND_TYPE_VALUES.includes(o)},captionPlacement:{type:String,default:"header-center"},closeButtonVisible:{type:Boolean,default:!0},closeButtonText:{type:String,default:"X"},closeButtonTitle:{type:String,default:"close"},closeButtonBorder:{type:Boolean,default:!0},closeButtonBackgroundType:{type:String,default:n.BackgroundType.empty,validator:o=>n.BACKGROUND_TYPE_VALUES.includes(o)},closeButtonPlacement:{type:String,default:"footer-right"},closeClickOverlay:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},overlayStyle:{type:[String,Object,Array],required:!1},scrollLock:{type:Boolean,default:!0},enterAnimationClass:{type:String,required:!1},leaveAnimationClass:{type:String,required:!1}},ze=e.defineComponent({name:"HModal",props:He,inheritAttrs:!1,emits:["mounted","responsive-change","open","close"],setup(o,{emit:m,slots:E}){const c=o.id||n.getUUID(),P=`hmodal:${c}`,I=n.useDevice(),d=e.ref(null),a=e.ref(o.visible),u=e.ref(o.headerVisible),C=e.ref(o.footerVisible),v=e.ref(o.closeButtonVisible),h=e.ref(o.caption??null),S=e.ref(o.captionBorder),w=e.ref(o.captionBackgroundType),T=e.ref(o.closeButtonBorder),V=e.ref(o.closeButtonBackgroundType),$=e.ref(o.closeClickOverlay),L=e.ref(o.showOverlay),k=e.ref(o.scrollLock),N=e.ref(o.border),H=e.ref(o.backgroundType||n.BackgroundType.empty),s=e.ref(o.closeButtonPlacement),r=e.ref(o.captionPlacement),y=e.ref(o.zIndex??1e3),z=e.ref(o.position),ve=e.computed(()=>{const t={zIndex:y.value};switch(t.left="",t.right="",t.top="",t.bottom="",t.transform="none",z.value){case n.ScreenPosition.topLeft:t.left="0",t.top="0";break;case n.ScreenPosition.topCenter:t.left="50%",t.top="0",t.transform="translateX(-50%)";break;case n.ScreenPosition.topRight:t.right="0",t.top="0";break;case n.ScreenPosition.middleLeft:t.left="0",t.top="50%",t.transform="translateY(-50%)";break;case n.ScreenPosition.middleCenter:t.left="50%",t.top="50%",t.transform="translate(-50%, -50%)";break;case n.ScreenPosition.middleRight:t.right="0",t.top="50%",t.transform="translateY(-50%)";break;case n.ScreenPosition.bottomLeft:t.left="0",t.bottom="0";break;case n.ScreenPosition.bottomCenter:t.left="50%",t.bottom="0",t.transform="translateX(-50%)";break;case n.ScreenPosition.bottomRight:t.right="0",t.bottom="0";break}return t}),he=e.computed(()=>{const l={zIndex:(y.value??1e3)-1},g=o.overlayStyle;return g?Array.isArray(g)?[{...l},...g]:typeof g=="string"?[l,g]:{...l,...g}:l}),pe=e.computed(()=>a.value?"":"hison-display-none"),fe=e.computed(()=>{switch(H.value){case"transparent":return"hison-bg-transparent";case"filled":return"hison-bg-filled";default:return"hison-bg-empty"}}),ke=e.computed(()=>N.value?"hison-border":""),O=e.ref([]),q=()=>{O.value=n.extractResponsiveClasses(n.toClassString(o.class)||"",I.value),n.addComponentNameToClass(O.value,"size",n.hisonCloser.componentStyle.size),n.addComponentNameToClass(O.value,"color","primary")},ye=e.computed(()=>[...n.extractPrefixedClasses(n.toClassString(o.class)||"","size"),...n.extractPrefixedClasses(n.toClassString(o.class)||"","color")]),Be=e.computed(()=>a.value&&L.value),be=e.computed(()=>!!E.header),ge=e.computed(()=>!!E.footer),i=t=>t.split("-")[1]||"left",j=e.computed(()=>!!(h.value&&h.value.trim().length)),U=e.computed(()=>j.value&&r.value.startsWith("header")),W=e.computed(()=>v.value&&s.value.startsWith("header")),Z=e.computed(()=>U.value&&i(r.value)==="left"),G=e.computed(()=>U.value&&i(r.value)==="center"),K=e.computed(()=>U.value&&i(r.value)==="right"),X=e.computed(()=>W.value&&i(s.value)==="left"),J=e.computed(()=>W.value&&i(s.value)==="center"),Q=e.computed(()=>W.value&&i(s.value)==="right"),_=e.computed(()=>Z.value||X.value),x=e.computed(()=>G.value||J.value),ee=e.computed(()=>K.value||Q.value),M=e.computed(()=>j.value&&r.value.startsWith("footer")),D=e.computed(()=>v.value&&s.value.startsWith("footer")),oe=e.computed(()=>M.value&&i(r.value)==="left"),te=e.computed(()=>M.value&&i(r.value)==="center"),le=e.computed(()=>M.value&&i(r.value)==="right"),ne=e.computed(()=>D.value&&i(s.value)==="left"),ae=e.computed(()=>D.value&&i(s.value)==="center"),se=e.computed(()=>D.value&&i(s.value)==="right"),re=e.computed(()=>oe.value||ne.value),ie=e.computed(()=>te.value||ae.value),ce=e.computed(()=>le.value||se.value),Se=e.computed(()=>u.value&&(be.value||_.value||x.value||ee.value)),we=e.computed(()=>C.value&&(ge.value||re.value||ie.value||ce.value)),R=()=>{k.value&&Ce.acquireScrollLock(c)},F=()=>{k.value&&Ce.releaseScrollLock(c)},B=e.ref(null),Te=t=>{$.value&&b()},Ve=t=>{b()},p=e.ref(o.enterAnimationClass||"hison-modal-enter"),f=e.ref(o.leaveAnimationClass||"hison-modal-leave"),Y=e.ref(null),ue=async()=>{const t=Y.value;!t||!p.value||(t.classList.remove(f.value),t.offsetWidth,t.classList.add(p.value))},$e=async()=>{const t=Y.value;!t||!f.value||(t.classList.remove(p.value),t.offsetWidth,t.classList.add(f.value),await new Promise(l=>setTimeout(l,200)))},A=async()=>{a.value||(a.value=!0,R(),await e.nextTick(),ue(),m("open",e.unref(B)))},b=async()=>{if(a.value)try{await $e()}finally{a.value=!1,F(),m("close",e.unref(B))}},Le=async()=>a.value?b():A(),de=()=>{n.hisonCloser.component.modalList[c]&&n.hisonCloser.component.modalList[c].isHisonvueComponent&&console.warn(`[Hisonvue] The modal ID is at risk of being duplicated. ${c}`),n.registerReloadable(P,()=>{me(),e.nextTick(de)}),q(),a.value&&(R(),e.nextTick(ue)),B.value={isHisonvueComponent:!0,getId:()=>c,getType:()=>"modal",isVisible:()=>a.value,open:A,close:b,toggle:Le,setVisible:t=>t?A():b(),getZIndex:()=>y.value,setZIndex:t=>{y.value=t},getPosition:()=>z.value,setPosition:t=>{z.value=t},isHeaderVisible:()=>u.value,setHeaderVisible:t=>{u.value=t},isFooterVisible:()=>C.value,setFooterVisible:t=>{C.value=t},getCaption:()=>h.value||"",setCaption:t=>{h.value=t},isCaptionBorder:()=>S.value,setCaptionBorder:t=>{S.value=t},getCaptionBackgroundType:()=>w.value,setCaptionBackgroundType:t=>{w.value=t},isCloseButtonVisible:()=>v.value,setCloseButtonVisible:t=>{v.value=t},isCloseButtonBorder:()=>T.value,setCloseButtonBorder:t=>{T.value=t},getCloseButtonBackgroundType:()=>V.value,setCloseButtonBackgroundType:t=>{V.value=t},getButtonPlacement:()=>s.value,setButtonPlacement:t=>{s.value=t},getCaptionPlacement:()=>r.value,setCaptionPlacement:t=>{r.value=t},isCloseClickOverlay:()=>$.value,setCloseClickOverlay:t=>{$.value=t},isOverlayShown:()=>L.value,setOverlayShown:t=>{L.value=t},isBorder:()=>N.value,setBorder:t=>{N.value=t},getBackgroundType:()=>H.value,setBackgroundType:t=>{H.value=t},isScrollLocked:()=>k.value,setScrollLock:t=>{k.value=t,a.value&&(t?R():F())},getAnimationClasses:()=>({enter:p.value,leave:f.value}),setAnimationClasses:t=>{"enter"in t&&(p.value=t.enter||""),"leave"in t&&(f.value=t.leave||"")},reload:()=>n.reloadHisonComponent(P)},n.hisonCloser.component.modalList[c]=B.value,m("mounted",B.value)},me=()=>{n.unregisterReloadable(P),delete n.hisonCloser.component.modalList[c],a.value&&F()};return e.onMounted(de),e.onBeforeUnmount(me),e.watch(I,t=>{q(),m("responsive-change",t)}),e.watch(()=>o.visible,t=>{const l=!!t;l&&!a.value?A():!l&&a.value&&b()}),e.watch(()=>o.headerVisible,t=>{const l=!!t;l!==u.value&&(u.value=l)}),e.watch(()=>o.footerVisible,t=>{const l=!!t;l!==C.value&&(C.value=l)}),e.watch(()=>o.closeButtonVisible,t=>{const l=!!t;l!==v.value&&(v.value=l)}),e.watch(()=>o.caption,t=>{const l=t??null;l!==h.value&&(h.value=l)}),e.watch(()=>o.captionBorder,t=>{const l=!!t;l!==S.value&&(S.value=l)}),e.watch(()=>o.captionBackgroundType,t=>{t&&t!==w.value&&(w.value=t)}),e.watch(()=>o.closeButtonBorder,t=>{const l=!!t;l!==T.value&&(T.value=l)}),e.watch(()=>o.closeButtonBackgroundType,t=>{t&&t!==V.value&&(V.value=t)}),e.watch(()=>o.closeButtonPlacement,t=>{t&&t!==s.value&&(s.value=t)}),e.watch(()=>o.captionPlacement,t=>{t&&t!==r.value&&(r.value=t)}),e.watch(()=>o.closeClickOverlay,t=>{const l=!!t;l!==$.value&&($.value=l)}),e.watch(()=>o.showOverlay,t=>{const l=!!t;l!==L.value&&(L.value=l)}),e.watch(()=>o.scrollLock,t=>{const l=!!t;l!==k.value&&(k.value=l,a.value&&(l?R():F()))}),e.watch(()=>o.border,t=>{const l=!!t;l!==N.value&&(N.value=l)}),e.watch(()=>o.backgroundType,t=>{t&&t!==H.value&&(H.value=t)}),e.watch(()=>o.zIndex,t=>{const l=Number(t??1300);l!==y.value&&(y.value=l)}),e.watch(()=>o.position,t=>{t&&t!==z.value&&(z.value=t)}),e.watch(()=>o.enterAnimationClass,t=>{const l=t||"hison-modal-enter";l!==p.value&&(p.value=l)}),e.watch(()=>o.leaveAnimationClass,t=>{const l=t||"hison-modal-leave";l!==f.value&&(f.value=l)}),e.watch(()=>o.class,()=>{q()}),{id:c,props:o,modalRef:Y,modalWrapperRef:d,caption:h,responsiveClassList:O,visibleClass:pe,borderClass:ke,backgroundTypeClass:fe,isOverlayVisible:Be,headerVisibleComputed:Se,footerVisibleComputed:we,headerHasLeft:_,headerHasCenter:x,headerHasRight:ee,showHeaderCaptionLeft:Z,showHeaderCaptionCenter:G,showHeaderCaptionRight:K,showHeaderCloseLeft:X,showHeaderCloseCenter:J,showHeaderCloseRight:Q,footerHasLeft:re,footerHasCenter:ie,footerHasRight:ce,showFooterCaptionLeft:oe,showFooterCaptionCenter:te,showFooterCaptionRight:le,showFooterCloseLeft:ne,showFooterCloseCenter:ae,showFooterCloseRight:se,childClassList:ye,overlayStyleWithZ:he,wrapperStyle:ve,onOverlayClick:Te,onClickCloseButton:Ve,modalMethods:e.computed(()=>e.unref(B)),closeButtonVisible:v,buttonPlacement:s,captionPlacement:r,closeButtonText:o.closeButtonText,closeButtonTitle:o.closeButtonTitle,closeButtonBorder:T,closeButtonBackgroundType:V,captionBorder:S,captionBackgroundType:w}}});function Pe(o,m,E,c,P,I){const d=e.resolveComponent("HLabel"),a=e.resolveComponent("HButton"),u=e.resolveComponent("HLayout");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-layer-host",o.visibleClass])},[o.isOverlayVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hison-modal-overlay",style:e.normalizeStyle(o.overlayStyleWithZ),onClick:m[0]||(m[0]=(...C)=>o.onOverlayClick&&o.onOverlayClick(...C))},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"modalWrapperRef",class:e.normalizeClass(["hison-modal-wrapper",...o.responsiveClassList]),style:e.normalizeStyle(o.wrapperStyle)},[e.createElementVNode("div",{ref:"modalRef",class:e.normalizeClass(["hison-modal",o.borderClass,o.backgroundTypeClass]),style:e.normalizeStyle(o.props.style),role:"dialog"},[o.headerVisibleComputed?(e.openBlock(),e.createBlock(u,{key:0,id:`hison_modal_header_layout_${o.id}`,class:e.normalizeClass(["hison-modal-header",...o.childClassList])},{default:e.withCtx(()=>[o.$slots.header?e.renderSlot(o.$slots,"header",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.headerHasLeft?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.showHeaderCaptionLeft?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-left","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showHeaderCloseLeft?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"header-left"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-left","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.headerHasCenter?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.showHeaderCaptionCenter?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-center","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showHeaderCloseCenter?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"header-center"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-center","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.headerHasRight?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[o.showHeaderCaptionRight?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-right","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showHeaderCloseRight?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"header-right"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-right","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))]),_:3},8,["id","class"])):e.createCommentVNode("",!0),e.createVNode(u,{id:`hison_modal_body_layout_${o.id}`,class:e.normalizeClass(["hison-modal-body",...o.childClassList])},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["id","class"]),o.footerVisibleComputed?(e.openBlock(),e.createBlock(u,{key:1,id:`hison_modal_footer_layout_${o.id}`,class:e.normalizeClass(["hison-modal-footer",...o.childClassList])},{default:e.withCtx(()=>[o.$slots.footer?e.renderSlot(o.$slots,"footer",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.footerHasLeft?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.showFooterCaptionLeft?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-left","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showFooterCloseLeft?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"footer-left"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-left","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.footerHasCenter?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.showFooterCaptionCenter?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-center","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showFooterCloseCenter?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"footer-center"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-center","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),o.footerHasRight?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[o.showFooterCaptionRight?(e.openBlock(),e.createBlock(d,{key:0,id:`hison_modal_caption_label_${o.id}`,class:e.normalizeClass(["hison-modal-caption","hison-pos-right","hison-pos-vertical-center",...o.childClassList]),text:o.caption??"",border:o.captionBorder,"background-type":o.captionBackgroundType},null,8,["id","class","text","border","background-type"])):e.createCommentVNode("",!0),o.showFooterCloseRight?e.renderSlot(o.$slots,"close-button",{key:1,onClick:o.onClickCloseButton,text:o.closeButtonText,title:o.closeButtonTitle||"Close",placement:"footer-right"},()=>[e.createVNode(a,{id:`hison_modal_close_button_${o.id}`,class:e.normalizeClass(["hison-modal-close-btn","hison-pos-right","hison-pos-vertical-center","hison-size-s","hison-color-danger"]),text:o.closeButtonText,title:o.closeButtonTitle||"Close",border:o.closeButtonBorder,"background-type":o.closeButtonBackgroundType,onClick:o.onClickCloseButton},e.createSlots({default:e.withCtx(()=>[o.$slots["close-label"]?e.renderSlot(o.$slots,"close-label",{key:0}):e.createCommentVNode("",!0)]),_:2},[o.$slots["close-icon"]?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","text","title","border","background-type","onClick"])]):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))]),_:3},8,["id","class"])):e.createCommentVNode("",!0)],6)],6)],2)}const Oe=Ne._export_sfc(ze,[["render",Pe]]);exports.default=Oe;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as Qe, ref as a, computed as l, onMounted as _e, onBeforeUnmount as xe, watch as n, unref as ae, nextTick as ne, resolveComponent as ie, createElementBlock as C, openBlock as u, normalizeClass as c, createCommentVNode as s, createElementVNode as ze, normalizeStyle as re, createBlock as m, createVNode as H, withCtx as d, renderSlot as r, Fragment as B, createSlots as A } from "vue";
2
- import { B as ue, f as J, S as eo, i as b, g as oo, u as to, j as Ae, t as ce, e as lo, b as Fe, h as D, r as so, c as ao, d as no } from "./index-Cvhi7T4w.mjs";
2
+ import { B as ue, f as J, S as eo, i as b, g as oo, u as to, j as Ae, t as ce, e as lo, b as Fe, h as D, r as so, c as ao, d as no } from "./index-CGr5-mvg.mjs";
3
3
  import { a as io, r as ro } from "./scrollManager-BGnq4wyt.mjs";
4
4
  import { _ as uo } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  const co = {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),c=require("./index-DcB16odB.js"),P=require("./_plugin-vue_export-helper-BHFhmbuH.js"),j={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},editMode:{type:String,default:c.EditMode.editable,validator:e=>["editable","disable","readonly"].includes(e)},noteModeByDevice:{type:String,required:!1,validator:e=>e==null||c.NOTE_MODE_BY_DEVICE_VALUES.includes(e)},toolPosition:{type:String,required:!1,validator:e=>e==null||c.TOOL_POSITION_VALUES.includes(e)},toolDefaultLine:{type:Number,required:!1},toolToggle:{type:Boolean,default:!1},textareaWidth:{type:String,required:!1},textareaHeight:{type:String,required:!1},textareaMaxWidth:{type:String,required:!1},textareaMaxHeight:{type:String,required:!1},textareaHeightIsModify:{type:Boolean,default:!1},placeholderIsVisible:{type:Boolean,default:!1},placeholderAddTop:{type:Number,required:!1},placeholderAddLeft:{type:Number,required:!1},placeholderWidth:{type:String,required:!1},placeholderColor:{type:String,required:!1},placeholderBackgroundColor:{type:String,required:!1},placeholderTitle:{type:String,required:!1},placeholderTextContent:{type:String,required:!1},attFilePreventTypes:{type:String,required:!1},attFileAcceptTypes:{type:String,required:!1},attFileMaxSize:{type:Number,required:!1,default:20*1024*1024},attImagePreventTypes:{type:String,required:!1},attImageAcceptTypes:{type:String,required:!1},attImageMaxSize:{type:Number,required:!1,default:20*1024*1024},defaultFontSize:{type:Number,required:!1},defaultLineHeight:{type:Number,required:!1},defaultFontFamily:{type:String,required:!1},defaultToolFontFamily:{type:String,required:!1},addFontFamily:{type:String,required:!1},removeFontFamily:{type:String,required:!1},language:{type:String,required:!1},recodeLimit:{type:String,required:!1},sizeLevelDesktop:{type:Number,required:!1},sizeLevelMobile:{type:Number,required:!1},color:{type:String,required:!1},invertColor:{type:Boolean,default:!1},usingParagraphStyle:{type:Boolean,default:!0},usingBold:{type:Boolean,default:!0},usingUnderline:{type:Boolean,default:!0},usingItalic:{type:Boolean,default:!0},usingUl:{type:Boolean,default:!0},usingOl:{type:Boolean,default:!0},usingTextAlign:{type:Boolean,default:!0},usingAttLink:{type:Boolean,default:!0},usingAttFile:{type:Boolean,default:!0},usingAttImage:{type:Boolean,default:!0},usingAttVideo:{type:Boolean,default:!0},usingFontSize:{type:Boolean,default:!0},usingLetterSpacing:{type:Boolean,default:!0},usingLineHeight:{type:Boolean,default:!0},usingFontFamily:{type:Boolean,default:!0},usingColorText:{type:Boolean,default:!0},usingColorBack:{type:Boolean,default:!0},usingFormatClear:{type:Boolean,default:!0},usingUndo:{type:Boolean,default:!0},usingRedo:{type:Boolean,default:!0},usingHelp:{type:Boolean,default:!0},usingParagraphAllStyle:{type:Boolean,default:!0},usingCharacterStyle:{type:Boolean,default:!0},usingCharacterSize:{type:Boolean,default:!0},usingAttachFile:{type:Boolean,default:!0},usingDo:{type:Boolean,default:!0},required:{type:Boolean,default:!1},modelValue:{type:Object,required:!1},tabIndex:{type:[Number,String],default:null,validator:e=>e===null||e===""||!isNaN(+e)&&isFinite(+e)}},K={textareaBeforeClick:Function,textareaAfterClick:Function,textareaBeforeFocus:Function,textareaAfterFocus:Function,textareaBeforeBlur:Function,textareaAfterBlur:Function,paragraphStyleSelectBeforeClick:Function,paragraphStyleSelectAfterClick:Function,toolToggleBeforeClick:Function,toolToggleAfterClick:Function,styleNomalBeforeClick:Function,styleNomalAfterClick:Function,styleHeader1BeforeClick:Function,styleHeader1AfterClick:Function,styleHeader2BeforeClick:Function,styleHeader2AfterClick:Function,styleHeader3BeforeClick:Function,styleHeader3AfterClick:Function,styleHeader4BeforeClick:Function,styleHeader4AfterClick:Function,styleHeader5BeforeClick:Function,styleHeader5AfterClick:Function,styleHeader6BeforeClick:Function,styleHeader6AfterClick:Function,boldBeforeClick:Function,boldAfterClick:Function,underlineBeforeClick:Function,underlineAfterClick:Function,italicBeforeClick:Function,italicAfterClick:Function,ulBeforeClick:Function,ulAfterClick:Function,olBeforeClick:Function,olAfterClick:Function,textAlignSelectBeforeClick:Function,textAlignSelectAfterClick:Function,textAlignLeftBeforeClick:Function,textAlignLeftAfterClick:Function,textAlignCenterBeforeClick:Function,textAlignCenterAfterClick:Function,textAlignRightBeforeClick:Function,textAlignRightAfterClick:Function,attLinkBeforeClick:Function,attLinkAfterClick:Function,attFileBeforeClick:Function,attFileAfterClick:Function,attImageBeforeClick:Function,attImageAfterClick:Function,attVideoBeforeClick:Function,attVideoAfterClick:Function,fontSizeBoxBeforeClick:Function,fontSizeBoxAfterClick:Function,fontSizeBeforeClick:Function,fontSizeAfterClick:Function,fontSizeBeforeInput:Function,fontSizeAfterInput:Function,fontSizeBeforeBlur:Function,fontSizeAfterBlur:Function,letterSpacingBoxBeforeClick:Function,letterSpacingBoxAfterClick:Function,letterSpacingBeforeClick:Function,letterSpacingAfterClick:Function,letterSpacingBeforeInput:Function,letterSpacingAfterInput:Function,letterSpacingBeforeBlur:Function,letterSpacingAfterBlur:Function,lineHeightBoxBeforeClick:Function,lineHeightBoxAfterClick:Function,lineHeightBeforeClick:Function,lineHeightAfterClick:Function,lineHeightBeforeInput:Function,lineHeightAfterInput:Function,lineHeightBeforeBlur:Function,lineHeightAfterBlur:Function,fontFamilySelectBeforeClick:Function,fontFamilySelectAfterClick:Function,colorTextSelectBeforeClick:Function,colorTextSelectAfterClick:Function,colorTextSelectBoxBeforeClick:Function,colorTextSelectBoxAfterClick:Function,colorText0BeforeClick:Function,colorText0AfterClick:Function,colorText1BeforeClick:Function,colorText1AfterClick:Function,colorText2BeforeClick:Function,colorText2AfterClick:Function,colorText3BeforeClick:Function,colorText3AfterClick:Function,colorText4BeforeClick:Function,colorText4AfterClick:Function,colorText5BeforeClick:Function,colorText5AfterClick:Function,colorText6BeforeClick:Function,colorText6AfterClick:Function,colorText7BeforeClick:Function,colorText7AfterClick:Function,colorTextRBeforeClick:Function,colorTextRAfterClick:Function,colorTextRBeforeInput:Function,colorTextRAfterInput:Function,colorTextRBeforeBlur:Function,colorTextRAfterBlur:Function,colorTextGBeforeClick:Function,colorTextGAfterClick:Function,colorTextGBeforeInput:Function,colorTextGAfterInput:Function,colorTextGBeforeBlur:Function,colorTextGAfterBlur:Function,colorTextBBeforeClick:Function,colorTextBAfterClick:Function,colorTextBBeforeInput:Function,colorTextBAfterInput:Function,colorTextBBeforeBlur:Function,colorTextBAfterBlur:Function,colorTextOpacityBeforeClick:Function,colorTextOpacityAfterClick:Function,colorTextOpacityBeforeInput:Function,colorTextOpacityAfterInput:Function,colorTextOpacityBeforeBlur:Function,colorTextOpacityAfterBlur:Function,colorBackSelectBeforeClick:Function,colorBackSelectAfterClick:Function,colorBackSelectBoxBeforeClick:Function,colorBackSelectBoxAfterClick:Function,colorBack0BeforeClick:Function,colorBack0AfterClick:Function,colorBack1BeforeClick:Function,colorBack1AfterClick:Function,colorBack2BeforeClick:Function,colorBack2AfterClick:Function,colorBack3BeforeClick:Function,colorBack3AfterClick:Function,colorBack4BeforeClick:Function,colorBack4AfterClick:Function,colorBack5BeforeClick:Function,colorBack5AfterClick:Function,colorBack6BeforeClick:Function,colorBack6AfterClick:Function,colorBack7BeforeClick:Function,colorBack7AfterClick:Function,colorBackRBeforeClick:Function,colorBackRAfterClick:Function,colorBackRBeforeInput:Function,colorBackRAfterInput:Function,colorBackRBeforeBlur:Function,colorBackRAfterBlur:Function,colorBackGBeforeClick:Function,colorBackGAfterClick:Function,colorBackGBeforeInput:Function,colorBackGAfterInput:Function,colorBackGBeforeBlur:Function,colorBackGAfterBlur:Function,colorBackBBeforeClick:Function,colorBackBAfterClick:Function,colorBackBBeforeInput:Function,colorBackBAfterInput:Function,colorBackBBeforeBlur:Function,colorBackBAfterBlur:Function,colorBackOpacityBeforeClick:Function,colorBackOpacityAfterClick:Function,colorBackOpacityBeforeInput:Function,colorBackOpacityAfterInput:Function,colorBackOpacityBeforeBlur:Function,colorBackOpacityAfterBlur:Function,formatClearBeforeClick:Function,formatClearAfterClick:Function,undoBeforeClick:Function,undoAfterClick:Function,redoBeforeClick:Function,redoAfterClick:Function,helpBeforeClick:Function,helpAfterClick:Function,modalBackBeforeClick:Function,modalBackAfterClick:Function,attLinkModalBeforeClick:Function,attLinkModalAfterClick:Function,attLinkTextBeforeInput:Function,attLinkTextAfterInput:Function,attLinkTextBeforeBlur:Function,attLinkTextAfterBlur:Function,attLinkHrefBeforeInput:Function,attLinkHrefAfterInput:Function,attLinkHrefBeforeBlur:Function,attLinkHrefAfterBlur:Function,attLinkInsertBeforeClick:Function,attLinkInsertAfterClick:Function,attFileModalBeforeClick:Function,attFileModalAfterClick:Function,attFileUploadBeforeClick:Function,attFileUploadAfterClick:Function,attFileUploadDivBeforeDragover:Function,attFileUploadDivAfterDragover:Function,attFileUploadDivBeforeDrop:Function,attFileUploadDivAfterDrop:Function,attFileUploadDivBeforeClick:Function,attFileUploadDivAfterClick:Function,attFileUploadBeforeInput:Function,attFileUploadAfterInput:Function,attFileUploadBeforeBlur:Function,attFileUploadAfterBlur:Function,attFileInsertBeforeClick:Function,attFileInsertAfterClick:Function,attLinkTooltipEditBeforeClick:Function,attLinkTooltipEditAfterClick:Function,attLinkTooltipUnlinkBeforeClick:Function,attLinkTooltipUnlinkAfterClick:Function,attImageModalBeforeClick:Function,attImageModalAfterClick:Function,attImageUploadViewBeforeDragover:Function,attImageUploadViewAfterDragover:Function,attImageUploadViewBeforeDrop:Function,attImageUploadViewAfterDrop:Function,attImageUploadViewBeforeClick:Function,attImageUploadViewAfterClick:Function,attImageViewPreBeforeClick:Function,attImageViewPreAfterClick:Function,attImageViewNextBeforeClick:Function,attImageViewNextAfterClick:Function,attImageUploadBeforeInput:Function,attImageUploadAfterInput:Function,attImageUploadBeforeBlur:Function,attImageUploadAfterBlur:Function,attImageURLBeforeInput:Function,attImageURLAfterInput:Function,attImageURLBeforeBlur:Function,attImageURLAfterBlur:Function,attImageInsertBeforeClick:Function,attImageInsertAfterClick:Function,attVideoModalBeforeClick:Function,attVideoModalAfterClick:Function,attVideoEmbedIdBeforeInput:Function,attVideoEmbedIdAfterInput:Function,attVideoEmbedIdBeforeBlur:Function,attVideoEmbedIdAfterBlur:Function,attVideoWidthBeforeInput:Function,attVideoWidthAfterInput:Function,attVideoWidthBeforeBlur:Function,attVideoWidthAfterBlur:Function,attVideoHeightBeforeInput:Function,attVideoHeightAfterInput:Function,attVideoHeightBeforeBlur:Function,attVideoHeightAfterBlur:Function,attVideoInsertBeforeClick:Function,attVideoInsertAfterClick:Function,attImageAndVideoTooltipWidthBeforeInput:Function,attImageAndVideoTooltipWidthAfterInput:Function,attImageAndVideoTooltipWidthBeforeBlur:Function,attImageAndVideoTooltipWidthAfterBlur:Function,attImageAndVideoTooltipWidthBeforeKeyup:Function,attImageAndVideoTooltipWidthAfterKeyup:Function,attImageAndVideoTooltipFloatRadioNoneBeforeClick:Function,attImageAndVideoTooltipFloatRadioNoneAfterClick:Function,attImageAndVideoTooltipFloatRadioLeftBeforeClick:Function,attImageAndVideoTooltipFloatRadioLeftAfterClick:Function,attImageAndVideoTooltipFloatRadioRightBeforeClick:Function,attImageAndVideoTooltipFloatRadioRightAfterClick:Function,attImageAndVideoTooltipShapeRadioSquareBeforeClick:Function,attImageAndVideoTooltipShapeRadioSquareAfterClick:Function,attImageAndVideoTooltipShapeRadioRadiusBeforeClick:Function,attImageAndVideoTooltipShapeRadioRadiusAfterClick:Function,attImageAndVideoTooltipShapeRadioCircleBeforeClick:Function,attImageAndVideoTooltipShapeRadioCircleAfterClick:Function,helpModalBeforeClick:Function,helpModalAfterClick:Function,placeholderBeforeClick:Function,placeholderAfterClick:Function},J=l.defineComponent({name:"HNote",props:{...j,...K},emits:["update:modelValue","mounted","responsive-change"],setup(e,{emit:v}){const _=c.hisonCloser.note,F=l.ref(null),B=l.ref(null),A=e.id?e.id:c.getUUID(),g=`hnote:${A}`,a=l.ref(!1),u=l.ref(!0);let s=!1;const y=l.ref(e.required),D=l.computed(()=>{if(y.value)return"hison-note-required"}),h=c.useDevice(),I=l.ref(e.visible),O=l.computed(()=>I.value?"":"hison-display-none"),C=l.ref(e.editMode),M=l.computed(()=>{if(C.value!==c.EditMode.editable)return`hison-note-${C.value}`}),T=l.ref(!1),m=l.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),S=(o,n)=>{if(!o)return;const t=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]","[tabindex]"].join(",");o.querySelectorAll(t).forEach(r=>{n?r.setAttribute("tabindex","-1"):r.getAttribute("tabindex")==="-1"&&r.removeAttribute("tabindex")})},E=()=>{var t;const o=B.value;if(!o)return;const n=(t=o._elements)==null?void 0:t.textarea;n&&(C.value!==c.EditMode.editable?(n.removeAttribute("contenteditable"),n.removeAttribute("role"),n.removeAttribute("aria-multiline"),n.removeAttribute("spellcheck"),n.removeAttribute("autocorrect"),S(o,!0)):(n.setAttribute("contenteditable","true"),n.setAttribute("role","textbox"),n.setAttribute("aria-multiline","true"),n.setAttribute("spellcheck","true"),n.setAttribute("autocorrect","true"),S(o,!1)))},V=l.ref([]),N=["modelValue","id","class","style","visible","editMode"],b=l.ref(0),w=()=>{l.triggerRef(b)},z=l.computed(()=>{b.value;const o=c.extractResponsiveClasses(c.toClassString(e.class)||"",h.value),n=c.getSpecificClassValueFromClassList(o,"color"),t=c.getSpecificClassValueFromClassList(o,"size");c.getIndexSpecificClassNameFromClassList(o,"col")===-1&&o.push("hison-col-12"),V.value=o;const f={};f["data-id"]=A;for(const[r,i]of Object.entries(e))N.includes(r)||i!=null&&(f[r.replace(/[A-Z]/g,k=>"-"+k.toLowerCase())]=String(i));if(f["size-level-desktop"]=f["size-level-desktop"]&&c.hison.utils.isNumber(f["size-level-desktop"])?String(Math.min(Math.max(Number(f["size-level-desktop"]),1),9)):R(3,t),f["size-level-mobile"]=f["size-level-mobile"]&&c.hison.utils.isNumber(f["size-level-mobile"])?String(Math.min(Math.max(Number(f["size-level-mobile"]),1),9)):R(5,t),n&&!f.color&&(f.color=n),f.color){const r=c.getHexCodeFromColorText(f.color)??f.color;f["main-color"]=r,delete f.color}return(e.invertColor||c.hisonCloser.componentStyle.invertColor)&&(f["invert-color"]="true"),f}),R=(o,n)=>{switch(n=n??c.hisonCloser.componentStyle.size,n){case c.Size.xs:o-=3;break;case c.Size.s:o-=2;break;case c.Size.m:break;case c.Size.l:o+=2;break;case c.Size.xl:o+=3;break}return String(Math.min(Math.max(o,1),9))},x=new MutationObserver(o=>{var f;const n=(f=o[0])==null?void 0:f.target;!n||a.value||!q(n)||W()}),q=o=>{var t;let n=o;for(;n&&!(n instanceof Element);)n=n.parentNode;return((t=n==null?void 0:n.closest)==null?void 0:t.call(n,"[data-vanillanote]"))||null},G=(o,n)=>{if(!o||!n||o.html!==n.html||o.plainText!==n.plainText||JSON.stringify(o.links)!==JSON.stringify(n.links)||JSON.stringify(o.files)!==JSON.stringify(n.files)||JSON.stringify(o.images)!==JSON.stringify(n.images)||JSON.stringify(o.videos)!==JSON.stringify(n.videos))return!1;const t=Object.keys(o.fileObjects||{}),f=Object.keys(n.fileObjects||{});if(t.length!==f.length||!t.every(k=>f.includes(k)))return!1;const r=Object.keys(o.imageObjects||{}),i=Object.keys(n.imageObjects||{});return!(r.length!==i.length||!r.every(k=>i.includes(k)))},W=()=>{B.value&&(T.value=!0,v("update:modelValue",B.value.getNoteData()))},d=()=>{u.value&&(c.unregisterReloadable(g),L(),w(),l.nextTick(()=>{u.value&&H()}))},H=()=>{var f,r;if(!u.value)return;c.unregisterReloadable(g),c.registerReloadable(g,()=>{u.value&&d()}),s||(_.init(),s=!0);const o=F.value;if(!o)return;_.mountNote(o);const n=_.getNote(A);n&&(n.getId=()=>A),B.value=n;const t=B.value;if(e.modelValue&&t&&t.setNoteData(e.modelValue),m.value&&((f=t==null?void 0:t._elements)!=null&&f.textarea)&&t._elements.textarea.setAttribute("tabIndex",String(m.value)),t&&(t.isHisonvueComponent=!0,t.getId=()=>A,t.getType=()=>"note",t.getRequired=()=>y.value,t.setRequired=i=>{y.value=i},t.isVisible=()=>I.value,t.setVisible=i=>{I.value=i},t.getEditMode=()=>C.value,t.setEditMode=i=>{C.value=i,E()},t.isModified=()=>T.value,t.initModified=()=>T.value=!1,t.getTabIndex=()=>m.value,t.setTabIndex=i=>{m.value=i!=null?Number(i):null},t.focus=()=>{var i,k,U;(U=(k=(i=t._elements)==null?void 0:i.textarea)==null?void 0:k.focus)==null||U.call(k)},t.getDataModel=()=>{const i=t.getNoteData();return new c.hison.data.DataModel(i)},t.setDataModel=i=>{if(!i||i.getRowCount()==0)return;const k={html:i.hasColumn("html")?i.getValue(0,"html"):"",plainText:i.hasColumn("plainText")?i.getValue(0,"plainText"):"",links:i.hasColumn("links")?i.getValue(0,"links"):[],files:i.hasColumn("files")?i.getValue(0,"files"):[],images:i.hasColumn("images")?i.getValue(0,"images"):[],videos:i.hasColumn("videos")?i.getValue(0,"videos"):[],fileObjects:i.hasColumn("fileObjects")?i.getValue(0,"fileObjects"):{},imageObjects:i.hasColumn("imageObjects")?i.getValue(0,"imageObjects"):{}};return t.setNoteData(k)},t.load=i=>{i&&i.getIsDataModel&&i.getIsDataModel()?t.setDataModel(i):t.setNoteData(i)},t.reload=()=>c.reloadHisonComponent(g)),t){const i=(r=t._elements)==null?void 0:r.textarea;i&&x.observe(i,{characterData:!0,childList:!0,subtree:!0})}t&&(t._cssEvents.target_onBeforeClick=c.hisonCloser.event.cssEvent.button_onBeforeClick,t._cssEvents.target_onAfterClick=c.hisonCloser.event.cssEvent.button_onAfterClick,t._cssEvents.target_onBeforeMouseover=c.hisonCloser.event.cssEvent.button_onBeforeMouseover,t._cssEvents.target_onAfterMouseover=c.hisonCloser.event.cssEvent.button_onAfterMouseover,t._cssEvents.target_onBeforeMouseout=c.hisonCloser.event.cssEvent.button_onBeforeMouseout,t._cssEvents.target_onAfterMouseout=c.hisonCloser.event.cssEvent.button_onAfterMouseout,t._cssEvents.target_onBeforeTouchstart=c.hisonCloser.event.cssEvent.button_onBeforeTouchstart,t._cssEvents.target_onAfterTouchstart=c.hisonCloser.event.cssEvent.button_onAfterTouchstart,t._cssEvents.target_onBeforeTouchend=c.hisonCloser.event.cssEvent.button_onBeforeTouchend,t._cssEvents.target_onAfterTouchend=c.hisonCloser.event.cssEvent.button_onAfterTouchend,typeof e.textareaBeforeClick=="function"&&(t._elementEvents.textarea_onBeforeClick=e.textareaBeforeClick),typeof e.textareaAfterClick=="function"&&(t._elementEvents.textarea_onAfterClick=e.textareaAfterClick),typeof e.textareaBeforeFocus=="function"&&(t._elementEvents.textarea_onBeforeFocus=e.textareaBeforeFocus),typeof e.textareaAfterFocus=="function"&&(t._elementEvents.textarea_onAfterFocus=e.textareaAfterFocus),typeof e.textareaBeforeBlur=="function"&&(t._elementEvents.textarea_onBeforeBlur=e.textareaBeforeBlur),typeof e.textareaAfterBlur=="function"&&(t._elementEvents.textarea_onAfterBlur=e.textareaAfterBlur),typeof e.paragraphStyleSelectBeforeClick=="function"&&(t._elementEvents.paragraphStyleSelect_onBeforeClick=e.paragraphStyleSelectBeforeClick),typeof e.paragraphStyleSelectAfterClick=="function"&&(t._elementEvents.paragraphStyleSelect_onAfterClick=e.paragraphStyleSelectAfterClick),typeof e.toolToggleBeforeClick=="function"&&(t._elementEvents.toolToggleButton_onBeforeClick=e.toolToggleBeforeClick),typeof e.toolToggleAfterClick=="function"&&(t._elementEvents.toolToggleButton_onAfterClick=e.toolToggleAfterClick),typeof e.styleNomalBeforeClick=="function"&&(t._elementEvents.styleNomal_onBeforeClick=e.styleNomalBeforeClick),typeof e.styleNomalAfterClick=="function"&&(t._elementEvents.styleNomal_onAfterClick=e.styleNomalAfterClick),typeof e.styleHeader1BeforeClick=="function"&&(t._elementEvents.styleHeader1_onBeforeClick=e.styleHeader1BeforeClick),typeof e.styleHeader1AfterClick=="function"&&(t._elementEvents.styleHeader1_onAfterClick=e.styleHeader1AfterClick),typeof e.styleHeader2BeforeClick=="function"&&(t._elementEvents.styleHeader2_onBeforeClick=e.styleHeader2BeforeClick),typeof e.styleHeader2AfterClick=="function"&&(t._elementEvents.styleHeader2_onAfterClick=e.styleHeader2AfterClick),typeof e.styleHeader3BeforeClick=="function"&&(t._elementEvents.styleHeader3_onBeforeClick=e.styleHeader3BeforeClick),typeof e.styleHeader3AfterClick=="function"&&(t._elementEvents.styleHeader3_onAfterClick=e.styleHeader3AfterClick),typeof e.styleHeader4BeforeClick=="function"&&(t._elementEvents.styleHeader4_onBeforeClick=e.styleHeader4BeforeClick),typeof e.styleHeader4AfterClick=="function"&&(t._elementEvents.styleHeader4_onAfterClick=e.styleHeader4AfterClick),typeof e.styleHeader5BeforeClick=="function"&&(t._elementEvents.styleHeader5_onBeforeClick=e.styleHeader5BeforeClick),typeof e.styleHeader5AfterClick=="function"&&(t._elementEvents.styleHeader5_onAfterClick=e.styleHeader5AfterClick),typeof e.styleHeader6BeforeClick=="function"&&(t._elementEvents.styleHeader6_onBeforeClick=e.styleHeader6BeforeClick),typeof e.styleHeader6AfterClick=="function"&&(t._elementEvents.styleHeader6_onAfterClick=e.styleHeader6AfterClick),typeof e.boldBeforeClick=="function"&&(t._elementEvents.boldButton_onBeforeClick=e.boldBeforeClick),typeof e.boldAfterClick=="function"&&(t._elementEvents.boldButton_onAfterClick=e.boldAfterClick),typeof e.underlineBeforeClick=="function"&&(t._elementEvents.underlineButton_onBeforeClick=e.underlineBeforeClick),typeof e.underlineAfterClick=="function"&&(t._elementEvents.underlineButton_onAfterClick=e.underlineAfterClick),typeof e.italicBeforeClick=="function"&&(t._elementEvents.italicButton_onBeforeClick=e.italicBeforeClick),typeof e.italicAfterClick=="function"&&(t._elementEvents.italicButton_onAfterClick=e.italicAfterClick),typeof e.ulBeforeClick=="function"&&(t._elementEvents.ulButton_onBeforeClick=e.ulBeforeClick),typeof e.ulAfterClick=="function"&&(t._elementEvents.ulButton_onAfterClick=e.ulAfterClick),typeof e.olBeforeClick=="function"&&(t._elementEvents.olButton_onBeforeClick=e.olBeforeClick),typeof e.olAfterClick=="function"&&(t._elementEvents.olButton_onAfterClick=e.olAfterClick),typeof e.textAlignSelectBeforeClick=="function"&&(t._elementEvents.textAlignSelect_onBeforeClick=e.textAlignSelectBeforeClick),typeof e.textAlignSelectAfterClick=="function"&&(t._elementEvents.textAlignSelect_onAfterClick=e.textAlignSelectAfterClick),typeof e.textAlignLeftBeforeClick=="function"&&(t._elementEvents.textAlignLeft_onBeforeClick=e.textAlignLeftBeforeClick),typeof e.textAlignLeftAfterClick=="function"&&(t._elementEvents.textAlignLeft_onAfterClick=e.textAlignLeftAfterClick),typeof e.textAlignCenterBeforeClick=="function"&&(t._elementEvents.textAlignCenter_onBeforeClick=e.textAlignCenterBeforeClick),typeof e.textAlignCenterAfterClick=="function"&&(t._elementEvents.textAlignCenter_onAfterClick=e.textAlignCenterAfterClick),typeof e.textAlignRightBeforeClick=="function"&&(t._elementEvents.textAlignRight_onBeforeClick=e.textAlignRightBeforeClick),typeof e.textAlignRightAfterClick=="function"&&(t._elementEvents.textAlignRight_onAfterClick=e.textAlignRightAfterClick),typeof e.attLinkBeforeClick=="function"&&(t._elementEvents.attLinkButton_onBeforeClick=e.attLinkBeforeClick),typeof e.attLinkAfterClick=="function"&&(t._elementEvents.attLinkButton_onAfterClick=e.attLinkAfterClick),typeof e.attFileBeforeClick=="function"&&(t._elementEvents.attFileButton_onBeforeClick=e.attFileBeforeClick),typeof e.attFileAfterClick=="function"&&(t._elementEvents.attFileButton_onAfterClick=e.attFileAfterClick),typeof e.attImageBeforeClick=="function"&&(t._elementEvents.attImageButton_onBeforeClick=e.attImageBeforeClick),typeof e.attImageAfterClick=="function"&&(t._elementEvents.attImageButton_onAfterClick=e.attImageAfterClick),typeof e.attVideoBeforeClick=="function"&&(t._elementEvents.attVideoButton_onBeforeClick=e.attVideoBeforeClick),typeof e.attVideoAfterClick=="function"&&(t._elementEvents.attVideoButton_onAfterClick=e.attVideoAfterClick),typeof e.fontSizeBoxBeforeClick=="function"&&(t._elementEvents.fontSizeInputBox_onBeforeClick=e.fontSizeBoxBeforeClick),typeof e.fontSizeBoxAfterClick=="function"&&(t._elementEvents.fontSizeInputBox_onAfterClick=e.fontSizeBoxAfterClick),typeof e.fontSizeBeforeClick=="function"&&(t._elementEvents.fontSizeInput_onBeforeClick=e.fontSizeBeforeClick),typeof e.fontSizeAfterClick=="function"&&(t._elementEvents.fontSizeInput_onAfterClick=e.fontSizeAfterClick),typeof e.fontSizeBeforeInput=="function"&&(t._elementEvents.fontSizeInput_onBeforeInput=e.fontSizeBeforeInput),typeof e.fontSizeAfterInput=="function"&&(t._elementEvents.fontSizeInput_onAfterInput=e.fontSizeAfterInput),typeof e.fontSizeBeforeBlur=="function"&&(t._elementEvents.fontSizeInput_onBeforeBlur=e.fontSizeBeforeBlur),typeof e.fontSizeAfterBlur=="function"&&(t._elementEvents.fontSizeInput_onAfterBlur=e.fontSizeAfterBlur),typeof e.letterSpacingBoxBeforeClick=="function"&&(t._elementEvents.letterSpacingInputBox_onBeforeClick=e.letterSpacingBoxBeforeClick),typeof e.letterSpacingBoxAfterClick=="function"&&(t._elementEvents.letterSpacingInputBox_onAfterClick=e.letterSpacingBoxAfterClick),typeof e.letterSpacingBeforeClick=="function"&&(t._elementEvents.letterSpacingInput_onBeforeClick=e.letterSpacingBeforeClick),typeof e.letterSpacingAfterClick=="function"&&(t._elementEvents.letterSpacingInput_onAfterClick=e.letterSpacingAfterClick),typeof e.letterSpacingBeforeInput=="function"&&(t._elementEvents.letterSpacingInput_onBeforeInput=e.letterSpacingBeforeInput),typeof e.letterSpacingAfterInput=="function"&&(t._elementEvents.letterSpacingInput_onAfterInput=e.letterSpacingAfterInput),typeof e.letterSpacingBeforeBlur=="function"&&(t._elementEvents.letterSpacingInput_onBeforeBlur=e.letterSpacingBeforeBlur),typeof e.letterSpacingAfterBlur=="function"&&(t._elementEvents.letterSpacingInput_onAfterBlur=e.letterSpacingAfterBlur),typeof e.lineHeightBoxBeforeClick=="function"&&(t._elementEvents.lineHeightInputBox_onBeforeClick=e.lineHeightBoxBeforeClick),typeof e.lineHeightBoxAfterClick=="function"&&(t._elementEvents.lineHeightInputBox_onAfterClick=e.lineHeightBoxAfterClick),typeof e.lineHeightBeforeClick=="function"&&(t._elementEvents.lineHeightInput_onBeforeClick=e.lineHeightBeforeClick),typeof e.lineHeightAfterClick=="function"&&(t._elementEvents.lineHeightInput_onAfterClick=e.lineHeightAfterClick),typeof e.lineHeightBeforeInput=="function"&&(t._elementEvents.lineHeightInput_onBeforeInput=e.lineHeightBeforeInput),typeof e.lineHeightAfterInput=="function"&&(t._elementEvents.lineHeightInput_onAfterInput=e.lineHeightAfterInput),typeof e.lineHeightBeforeBlur=="function"&&(t._elementEvents.lineHeightInput_onBeforeBlur=e.lineHeightBeforeBlur),typeof e.lineHeightAfterBlur=="function"&&(t._elementEvents.lineHeightInput_onAfterBlur=e.lineHeightAfterBlur),typeof e.fontFamilySelectBeforeClick=="function"&&(t._elementEvents.fontFamilySelect_onBeforeClick=e.fontFamilySelectBeforeClick),typeof e.fontFamilySelectAfterClick=="function"&&(t._elementEvents.fontFamilySelect_onAfterClick=e.fontFamilySelectAfterClick),typeof e.colorTextSelectBeforeClick=="function"&&(t._elementEvents.colorTextSelect_onBeforeClick=e.colorTextSelectBeforeClick),typeof e.colorTextSelectAfterClick=="function"&&(t._elementEvents.colorTextSelect_onAfterClick=e.colorTextSelectAfterClick),typeof e.colorTextSelectBoxBeforeClick=="function"&&(t._elementEvents.colorTextSelectBox_onBeforeClick=e.colorTextSelectBoxBeforeClick),typeof e.colorTextSelectBoxAfterClick=="function"&&(t._elementEvents.colorTextSelectBox_onAfterClick=e.colorTextSelectBoxAfterClick),typeof e.colorText0BeforeClick=="function"&&(t._elementEvents.colorText0_onBeforeClick=e.colorText0BeforeClick),typeof e.colorText0AfterClick=="function"&&(t._elementEvents.colorText0_onAfterClick=e.colorText0AfterClick),typeof e.colorText1BeforeClick=="function"&&(t._elementEvents.colorText1_onBeforeClick=e.colorText1BeforeClick),typeof e.colorText1AfterClick=="function"&&(t._elementEvents.colorText1_onAfterClick=e.colorText1AfterClick),typeof e.colorText2BeforeClick=="function"&&(t._elementEvents.colorText2_onBeforeClick=e.colorText2BeforeClick),typeof e.colorText2AfterClick=="function"&&(t._elementEvents.colorText2_onAfterClick=e.colorText2AfterClick),typeof e.colorText3BeforeClick=="function"&&(t._elementEvents.colorText3_onBeforeClick=e.colorText3BeforeClick),typeof e.colorText3AfterClick=="function"&&(t._elementEvents.colorText3_onAfterClick=e.colorText3AfterClick),typeof e.colorText4BeforeClick=="function"&&(t._elementEvents.colorText4_onBeforeClick=e.colorText4BeforeClick),typeof e.colorText4AfterClick=="function"&&(t._elementEvents.colorText4_onAfterClick=e.colorText4AfterClick),typeof e.colorText5BeforeClick=="function"&&(t._elementEvents.colorText5_onBeforeClick=e.colorText5BeforeClick),typeof e.colorText5AfterClick=="function"&&(t._elementEvents.colorText5_onAfterClick=e.colorText5AfterClick),typeof e.colorText6BeforeClick=="function"&&(t._elementEvents.colorText6_onBeforeClick=e.colorText6BeforeClick),typeof e.colorText6AfterClick=="function"&&(t._elementEvents.colorText6_onAfterClick=e.colorText6AfterClick),typeof e.colorText7BeforeClick=="function"&&(t._elementEvents.colorText7_onBeforeClick=e.colorText7BeforeClick),typeof e.colorText7AfterClick=="function"&&(t._elementEvents.colorText7_onAfterClick=e.colorText7AfterClick),typeof e.colorTextRBeforeClick=="function"&&(t._elementEvents.colorTextRInput_onBeforeClick=e.colorTextRBeforeClick),typeof e.colorTextRAfterClick=="function"&&(t._elementEvents.colorTextRInput_onAfterClick=e.colorTextRAfterClick),typeof e.colorTextRBeforeInput=="function"&&(t._elementEvents.colorTextRInput_onBeforeInput=e.colorTextRBeforeInput),typeof e.colorTextRAfterInput=="function"&&(t._elementEvents.colorTextRInput_onAfterInput=e.colorTextRAfterInput),typeof e.colorTextRBeforeBlur=="function"&&(t._elementEvents.colorTextRInput_onBeforeBlur=e.colorTextRBeforeBlur),typeof e.colorTextRAfterBlur=="function"&&(t._elementEvents.colorTextRInput_onAfterBlur=e.colorTextRAfterBlur),typeof e.colorTextGBeforeClick=="function"&&(t._elementEvents.colorTextGInput_onBeforeClick=e.colorTextGBeforeClick),typeof e.colorTextGAfterClick=="function"&&(t._elementEvents.colorTextGInput_onAfterClick=e.colorTextGAfterClick),typeof e.colorTextGBeforeInput=="function"&&(t._elementEvents.colorTextGInput_onBeforeInput=e.colorTextGBeforeInput),typeof e.colorTextGAfterInput=="function"&&(t._elementEvents.colorTextGInput_onAfterInput=e.colorTextGAfterInput),typeof e.colorTextGBeforeBlur=="function"&&(t._elementEvents.colorTextGInput_onBeforeBlur=e.colorTextGBeforeBlur),typeof e.colorTextGAfterBlur=="function"&&(t._elementEvents.colorTextGInput_onAfterBlur=e.colorTextGAfterBlur),typeof e.colorTextBBeforeClick=="function"&&(t._elementEvents.colorTextBInput_onBeforeClick=e.colorTextBBeforeClick),typeof e.colorTextBAfterClick=="function"&&(t._elementEvents.colorTextBInput_onAfterClick=e.colorTextBAfterClick),typeof e.colorTextBBeforeInput=="function"&&(t._elementEvents.colorTextBInput_onBeforeInput=e.colorTextBBeforeInput),typeof e.colorTextBAfterInput=="function"&&(t._elementEvents.colorTextBInput_onAfterInput=e.colorTextBAfterInput),typeof e.colorTextBBeforeBlur=="function"&&(t._elementEvents.colorTextBInput_onBeforeBlur=e.colorTextBBeforeBlur),typeof e.colorTextBAfterBlur=="function"&&(t._elementEvents.colorTextBInput_onAfterBlur=e.colorTextBAfterBlur),typeof e.colorTextOpacityBeforeClick=="function"&&(t._elementEvents.colorTextOpacityInput_onBeforeClick=e.colorTextOpacityBeforeClick),typeof e.colorTextOpacityAfterClick=="function"&&(t._elementEvents.colorTextOpacityInput_onAfterClick=e.colorTextOpacityAfterClick),typeof e.colorTextOpacityBeforeInput=="function"&&(t._elementEvents.colorTextOpacityInput_onBeforeInput=e.colorTextOpacityBeforeInput),typeof e.colorTextOpacityAfterInput=="function"&&(t._elementEvents.colorTextOpacityInput_onAfterInput=e.colorTextOpacityAfterInput),typeof e.colorTextOpacityBeforeBlur=="function"&&(t._elementEvents.colorTextOpacityInput_onBeforeBlur=e.colorTextOpacityBeforeBlur),typeof e.colorTextOpacityAfterBlur=="function"&&(t._elementEvents.colorTextOpacityInput_onAfterBlur=e.colorTextOpacityAfterBlur),typeof e.colorBackSelectBeforeClick=="function"&&(t._elementEvents.colorBackSelect_onBeforeClick=e.colorBackSelectBeforeClick),typeof e.colorBackSelectAfterClick=="function"&&(t._elementEvents.colorBackSelect_onAfterClick=e.colorBackSelectAfterClick),typeof e.colorBackSelectBoxBeforeClick=="function"&&(t._elementEvents.colorBackSelectBox_onBeforeClick=e.colorBackSelectBoxBeforeClick),typeof e.colorBackSelectBoxAfterClick=="function"&&(t._elementEvents.colorBackSelectBox_onAfterClick=e.colorBackSelectBoxAfterClick),typeof e.colorBack0BeforeClick=="function"&&(t._elementEvents.colorBack0_onBeforeClick=e.colorBack0BeforeClick),typeof e.colorBack0AfterClick=="function"&&(t._elementEvents.colorBack0_onAfterClick=e.colorBack0AfterClick),typeof e.colorBack1BeforeClick=="function"&&(t._elementEvents.colorBack1_onBeforeClick=e.colorBack1BeforeClick),typeof e.colorBack1AfterClick=="function"&&(t._elementEvents.colorBack1_onAfterClick=e.colorBack1AfterClick),typeof e.colorBack2BeforeClick=="function"&&(t._elementEvents.colorBack2_onBeforeClick=e.colorBack2BeforeClick),typeof e.colorBack2AfterClick=="function"&&(t._elementEvents.colorBack2_onAfterClick=e.colorBack2AfterClick),typeof e.colorBack3BeforeClick=="function"&&(t._elementEvents.colorBack3_onBeforeClick=e.colorBack3BeforeClick),typeof e.colorBack3AfterClick=="function"&&(t._elementEvents.colorBack3_onAfterClick=e.colorBack3AfterClick),typeof e.colorBack4BeforeClick=="function"&&(t._elementEvents.colorBack4_onBeforeClick=e.colorBack4BeforeClick),typeof e.colorBack4AfterClick=="function"&&(t._elementEvents.colorBack4_onAfterClick=e.colorBack4AfterClick),typeof e.colorBack5BeforeClick=="function"&&(t._elementEvents.colorBack5_onBeforeClick=e.colorBack5BeforeClick),typeof e.colorBack5AfterClick=="function"&&(t._elementEvents.colorBack5_onAfterClick=e.colorBack5AfterClick),typeof e.colorBack6BeforeClick=="function"&&(t._elementEvents.colorBack6_onBeforeClick=e.colorBack6BeforeClick),typeof e.colorBack6AfterClick=="function"&&(t._elementEvents.colorBack6_onAfterClick=e.colorBack6AfterClick),typeof e.colorBack7BeforeClick=="function"&&(t._elementEvents.colorBack7_onBeforeClick=e.colorBack7BeforeClick),typeof e.colorBack7AfterClick=="function"&&(t._elementEvents.colorBack7_onAfterClick=e.colorBack7AfterClick),typeof e.colorBackRBeforeClick=="function"&&(t._elementEvents.colorBackRInput_onBeforeClick=e.colorBackRBeforeClick),typeof e.colorBackRAfterClick=="function"&&(t._elementEvents.colorBackRInput_onAfterClick=e.colorBackRAfterClick),typeof e.colorBackRBeforeInput=="function"&&(t._elementEvents.colorBackRInput_onBeforeInput=e.colorBackRBeforeInput),typeof e.colorBackRAfterInput=="function"&&(t._elementEvents.colorBackRInput_onAfterInput=e.colorBackRAfterInput),typeof e.colorBackRBeforeBlur=="function"&&(t._elementEvents.colorBackRInput_onBeforeBlur=e.colorBackRBeforeBlur),typeof e.colorBackRAfterBlur=="function"&&(t._elementEvents.colorBackRInput_onAfterBlur=e.colorBackRAfterBlur),typeof e.colorBackGBeforeClick=="function"&&(t._elementEvents.colorBackGInput_onBeforeClick=e.colorBackGBeforeClick),typeof e.colorBackGAfterClick=="function"&&(t._elementEvents.colorBackGInput_onAfterClick=e.colorBackGAfterClick),typeof e.colorBackGBeforeInput=="function"&&(t._elementEvents.colorBackGInput_onBeforeInput=e.colorBackGBeforeInput),typeof e.colorBackGAfterInput=="function"&&(t._elementEvents.colorBackGInput_onAfterInput=e.colorBackGAfterInput),typeof e.colorBackGBeforeBlur=="function"&&(t._elementEvents.colorBackGInput_onBeforeBlur=e.colorBackGBeforeBlur),typeof e.colorBackGAfterBlur=="function"&&(t._elementEvents.colorBackGInput_onAfterBlur=e.colorBackGAfterBlur),typeof e.colorBackBBeforeClick=="function"&&(t._elementEvents.colorBackBInput_onBeforeClick=e.colorBackBBeforeClick),typeof e.colorBackBAfterClick=="function"&&(t._elementEvents.colorBackBInput_onAfterClick=e.colorBackBAfterClick),typeof e.colorBackBBeforeInput=="function"&&(t._elementEvents.colorBackBInput_onBeforeInput=e.colorBackBBeforeInput),typeof e.colorBackBAfterInput=="function"&&(t._elementEvents.colorBackBInput_onAfterInput=e.colorBackBAfterInput),typeof e.colorBackBBeforeBlur=="function"&&(t._elementEvents.colorBackBInput_onBeforeBlur=e.colorBackBBeforeBlur),typeof e.colorBackBAfterBlur=="function"&&(t._elementEvents.colorBackBInput_onAfterBlur=e.colorBackBAfterBlur),typeof e.colorBackOpacityBeforeClick=="function"&&(t._elementEvents.colorBackOpacityInput_onBeforeClick=e.colorBackOpacityBeforeClick),typeof e.colorBackOpacityAfterClick=="function"&&(t._elementEvents.colorBackOpacityInput_onAfterClick=e.colorBackOpacityAfterClick),typeof e.colorBackOpacityBeforeInput=="function"&&(t._elementEvents.colorBackOpacityInput_onBeforeInput=e.colorBackOpacityBeforeInput),typeof e.colorBackOpacityAfterInput=="function"&&(t._elementEvents.colorBackOpacityInput_onAfterInput=e.colorBackOpacityAfterInput),typeof e.colorBackOpacityBeforeBlur=="function"&&(t._elementEvents.colorBackOpacityInput_onBeforeBlur=e.colorBackOpacityBeforeBlur),typeof e.colorBackOpacityAfterBlur=="function"&&(t._elementEvents.colorBackOpacityInput_onAfterBlur=e.colorBackOpacityAfterBlur),typeof e.formatClearBeforeClick=="function"&&(t._elementEvents.formatClearButton_onBeforeClick=e.formatClearBeforeClick),typeof e.formatClearAfterClick=="function"&&(t._elementEvents.formatClearButton_onAfterClick=e.formatClearAfterClick),typeof e.undoBeforeClick=="function"&&(t._elementEvents.undoButton_onBeforeClick=e.undoBeforeClick),typeof e.undoAfterClick=="function"&&(t._elementEvents.undoButton_onAfterClick=e.undoAfterClick),typeof e.redoBeforeClick=="function"&&(t._elementEvents.redoButton_onBeforeClick=e.redoBeforeClick),typeof e.redoAfterClick=="function"&&(t._elementEvents.redoButton_onAfterClick=e.redoAfterClick),typeof e.helpBeforeClick=="function"&&(t._elementEvents.helpButton_onBeforeClick=e.helpBeforeClick),typeof e.helpAfterClick=="function"&&(t._elementEvents.helpButton_onAfterClick=e.helpAfterClick),typeof e.modalBackBeforeClick=="function"&&(t._elementEvents.modalBack_onBeforeClick=e.modalBackBeforeClick),typeof e.modalBackAfterClick=="function"&&(t._elementEvents.modalBack_onAfterClick=e.modalBackAfterClick),typeof e.attLinkModalBeforeClick=="function"&&(t._elementEvents.attLinkModal_onBeforeClick=e.attLinkModalBeforeClick),typeof e.attLinkModalAfterClick=="function"&&(t._elementEvents.attLinkModal_onAfterClick=e.attLinkModalAfterClick),typeof e.attLinkTextBeforeInput=="function"&&(t._elementEvents.attLinkText_onBeforeInput=e.attLinkTextBeforeInput),typeof e.attLinkTextAfterInput=="function"&&(t._elementEvents.attLinkText_onAfterInput=e.attLinkTextAfterInput),typeof e.attLinkTextBeforeBlur=="function"&&(t._elementEvents.attLinkText_onBeforeBlur=e.attLinkTextBeforeBlur),typeof e.attLinkTextAfterBlur=="function"&&(t._elementEvents.attLinkText_onAfterBlur=e.attLinkTextAfterBlur),typeof e.attLinkHrefBeforeInput=="function"&&(t._elementEvents.attLinkHref_onBeforeInput=e.attLinkHrefBeforeInput),typeof e.attLinkHrefAfterInput=="function"&&(t._elementEvents.attLinkHref_onAfterInput=e.attLinkHrefAfterInput),typeof e.attLinkHrefBeforeBlur=="function"&&(t._elementEvents.attLinkHref_onBeforeBlur=e.attLinkHrefBeforeBlur),typeof e.attLinkHrefAfterBlur=="function"&&(t._elementEvents.attLinkHref_onAfterBlur=e.attLinkHrefAfterBlur),typeof e.attLinkInsertBeforeClick=="function"&&(t._elementEvents.attLinkInsertButton_onBeforeClick=e.attLinkInsertBeforeClick),typeof e.attLinkInsertAfterClick=="function"&&(t._elementEvents.attLinkInsertButton_onAfterClick=e.attLinkInsertAfterClick),typeof e.attFileModalBeforeClick=="function"&&(t._elementEvents.attFileModal_onBeforeClick=e.attFileModalBeforeClick),typeof e.attFileModalAfterClick=="function"&&(t._elementEvents.attFileModal_onAfterClick=e.attFileModalAfterClick),typeof e.attFileUploadBeforeClick=="function"&&(t._elementEvents.attFileUploadButton_onBeforeClick=e.attFileUploadBeforeClick),typeof e.attFileUploadAfterClick=="function"&&(t._elementEvents.attFileUploadButton_onAfterClick=e.attFileUploadAfterClick),typeof e.attFileUploadDivBeforeDragover=="function"&&(t._elementEvents.attFileUploadDiv_onBeforeDragover=e.attFileUploadDivBeforeDragover),typeof e.attFileUploadDivAfterDragover=="function"&&(t._elementEvents.attFileUploadDiv_onAfterDragover=e.attFileUploadDivAfterDragover),typeof e.attFileUploadDivBeforeDrop=="function"&&(t._elementEvents.attFileUploadDiv_onBeforeDrop=e.attFileUploadDivBeforeDrop),typeof e.attFileUploadDivAfterDrop=="function"&&(t._elementEvents.attFileUploadDiv_onAfterDrop=e.attFileUploadDivAfterDrop),typeof e.attFileUploadDivBeforeClick=="function"&&(t._elementEvents.attFileUploadDiv_onBeforeClick=e.attFileUploadDivBeforeClick),typeof e.attFileUploadDivAfterClick=="function"&&(t._elementEvents.attFileUploadDiv_onAfterClick=e.attFileUploadDivAfterClick),typeof e.attFileUploadBeforeInput=="function"&&(t._elementEvents.attFileUpload_onBeforeInput=e.attFileUploadBeforeInput),typeof e.attFileUploadAfterInput=="function"&&(t._elementEvents.attFileUpload_onAfterInput=e.attFileUploadAfterInput),typeof e.attFileUploadBeforeBlur=="function"&&(t._elementEvents.attFileUpload_onBeforeBlur=e.attFileUploadBeforeBlur),typeof e.attFileUploadAfterBlur=="function"&&(t._elementEvents.attFileUpload_onAfterBlur=e.attFileUploadAfterBlur),typeof e.attFileInsertBeforeClick=="function"&&(t._elementEvents.attFileInsertButton_onBeforeClick=e.attFileInsertBeforeClick),typeof e.attFileInsertAfterClick=="function"&&(t._elementEvents.attFileInsertButton_onAfterClick=e.attFileInsertAfterClick),typeof e.attLinkTooltipEditBeforeClick=="function"&&(t._elementEvents.attLinkTooltipEditButton_onBeforeClick=e.attLinkTooltipEditBeforeClick),typeof e.attLinkTooltipEditAfterClick=="function"&&(t._elementEvents.attLinkTooltipEditButton_onAfterClick=e.attLinkTooltipEditAfterClick),typeof e.attLinkTooltipUnlinkBeforeClick=="function"&&(t._elementEvents.attLinkTooltipUnlinkButton_onBeforeClick=e.attLinkTooltipUnlinkBeforeClick),typeof e.attLinkTooltipUnlinkAfterClick=="function"&&(t._elementEvents.attLinkTooltipUnlinkButton_onAfterClick=e.attLinkTooltipUnlinkAfterClick),typeof e.attImageModalBeforeClick=="function"&&(t._elementEvents.attImageModal_onBeforeClick=e.attImageModalBeforeClick),typeof e.attImageModalAfterClick=="function"&&(t._elementEvents.attImageModal_onAfterClick=e.attImageModalAfterClick),typeof e.attImageUploadViewBeforeDragover=="function"&&(t._elementEvents.attImageUploadButtonAndView_onBeforeDragover=e.attImageUploadViewBeforeDragover),typeof e.attImageUploadViewAfterDragover=="function"&&(t._elementEvents.attImageUploadButtonAndView_onAfterDragover=e.attImageUploadViewAfterDragover),typeof e.attImageUploadViewBeforeDrop=="function"&&(t._elementEvents.attImageUploadButtonAndView_onBeforeDrop=e.attImageUploadViewBeforeDrop),typeof e.attImageUploadViewAfterDrop=="function"&&(t._elementEvents.attImageUploadButtonAndView_onAfterDrop=e.attImageUploadViewAfterDrop),typeof e.attImageUploadViewBeforeClick=="function"&&(t._elementEvents.attImageUploadButtonAndView_onBeforeClick=e.attImageUploadViewBeforeClick),typeof e.attImageUploadViewAfterClick=="function"&&(t._elementEvents.attImageUploadButtonAndView_onAfterClick=e.attImageUploadViewAfterClick),typeof e.attImageViewPreBeforeClick=="function"&&(t._elementEvents.attImageViewPreButton_onBeforeClick=e.attImageViewPreBeforeClick),typeof e.attImageViewPreAfterClick=="function"&&(t._elementEvents.attImageViewPreButton_onAfterClick=e.attImageViewPreAfterClick),typeof e.attImageViewNextBeforeClick=="function"&&(t._elementEvents.attImageViewNextButton_onBeforeClick=e.attImageViewNextBeforeClick),typeof e.attImageViewNextAfterClick=="function"&&(t._elementEvents.attImageViewNextButton_onAfterClick=e.attImageViewNextAfterClick),typeof e.attImageUploadBeforeInput=="function"&&(t._elementEvents.attImageUpload_onBeforeInput=e.attImageUploadBeforeInput),typeof e.attImageUploadAfterInput=="function"&&(t._elementEvents.attImageUpload_onAfterInput=e.attImageUploadAfterInput),typeof e.attImageUploadBeforeBlur=="function"&&(t._elementEvents.attImageUpload_onBeforeBlur=e.attImageUploadBeforeBlur),typeof e.attImageUploadAfterBlur=="function"&&(t._elementEvents.attImageUpload_onAfterBlur=e.attImageUploadAfterBlur),typeof e.attImageURLBeforeInput=="function"&&(t._elementEvents.attImageURL_onBeforeInput=e.attImageURLBeforeInput),typeof e.attImageURLAfterInput=="function"&&(t._elementEvents.attImageURL_onAfterInput=e.attImageURLAfterInput),typeof e.attImageURLBeforeBlur=="function"&&(t._elementEvents.attImageURL_onBeforeBlur=e.attImageURLBeforeBlur),typeof e.attImageURLAfterBlur=="function"&&(t._elementEvents.attImageURL_onAfterBlur=e.attImageURLAfterBlur),typeof e.attImageInsertBeforeClick=="function"&&(t._elementEvents.attImageInsertButton_onBeforeClick=e.attImageInsertBeforeClick),typeof e.attImageInsertAfterClick=="function"&&(t._elementEvents.attImageInsertButton_onAfterClick=e.attImageInsertAfterClick),typeof e.attVideoModalBeforeClick=="function"&&(t._elementEvents.attVideoModal_onBeforeClick=e.attVideoModalBeforeClick),typeof e.attVideoModalAfterClick=="function"&&(t._elementEvents.attVideoModal_onAfterClick=e.attVideoModalAfterClick),typeof e.attVideoEmbedIdBeforeInput=="function"&&(t._elementEvents.attVideoEmbedId_onBeforeInput=e.attVideoEmbedIdBeforeInput),typeof e.attVideoEmbedIdAfterInput=="function"&&(t._elementEvents.attVideoEmbedId_onAfterInput=e.attVideoEmbedIdAfterInput),typeof e.attVideoEmbedIdBeforeBlur=="function"&&(t._elementEvents.attVideoEmbedId_onBeforeBlur=e.attVideoEmbedIdBeforeBlur),typeof e.attVideoEmbedIdAfterBlur=="function"&&(t._elementEvents.attVideoEmbedId_onAfterBlur=e.attVideoEmbedIdAfterBlur),typeof e.attVideoWidthBeforeInput=="function"&&(t._elementEvents.attVideoWidth_onBeforeInput=e.attVideoWidthBeforeInput),typeof e.attVideoWidthAfterInput=="function"&&(t._elementEvents.attVideoWidth_onAfterInput=e.attVideoWidthAfterInput),typeof e.attVideoWidthBeforeBlur=="function"&&(t._elementEvents.attVideoWidth_onBeforeBlur=e.attVideoWidthBeforeBlur),typeof e.attVideoWidthAfterBlur=="function"&&(t._elementEvents.attVideoWidth_onAfterBlur=e.attVideoWidthAfterBlur),typeof e.attVideoHeightBeforeInput=="function"&&(t._elementEvents.attVideoHeight_onBeforeInput=e.attVideoHeightBeforeInput),typeof e.attVideoHeightAfterInput=="function"&&(t._elementEvents.attVideoHeight_onAfterInput=e.attVideoHeightAfterInput),typeof e.attVideoHeightBeforeBlur=="function"&&(t._elementEvents.attVideoHeight_onBeforeBlur=e.attVideoHeightBeforeBlur),typeof e.attVideoHeightAfterBlur=="function"&&(t._elementEvents.attVideoHeight_onAfterBlur=e.attVideoHeightAfterBlur),typeof e.attVideoInsertBeforeClick=="function"&&(t._elementEvents.attVideoInsertButton_onBeforeClick=e.attVideoInsertBeforeClick),typeof e.attVideoInsertAfterClick=="function"&&(t._elementEvents.attVideoInsertButton_onAfterClick=e.attVideoInsertAfterClick),typeof e.attImageAndVideoTooltipWidthBeforeInput=="function"&&(t._elementEvents.attImageAndVideoTooltipWidthInput_onBeforeInput=e.attImageAndVideoTooltipWidthBeforeInput),typeof e.attImageAndVideoTooltipWidthAfterInput=="function"&&(t._elementEvents.attImageAndVideoTooltipWidthInput_onAfterInput=e.attImageAndVideoTooltipWidthAfterInput),typeof e.attImageAndVideoTooltipWidthBeforeBlur=="function"&&(t._elementEvents.attImageAndVideoTooltipWidthInput_onBeforeBlur=e.attImageAndVideoTooltipWidthBeforeBlur),typeof e.attImageAndVideoTooltipWidthAfterBlur=="function"&&(t._elementEvents.attImageAndVideoTooltipWidthInput_onAfterBlur=e.attImageAndVideoTooltipWidthAfterBlur),typeof e.attImageAndVideoTooltipWidthBeforeKeyup=="function"&&(t._elementEvents.attImageAndVideoTooltipWidthInput_onBeforeKeyup=e.attImageAndVideoTooltipWidthBeforeKeyup),typeof e.attImageAndVideoTooltipWidthAfterKeyup=="function"&&(t._elementEvents.attImageAndVideoTooltipWidthInput_onAfterKeyup=e.attImageAndVideoTooltipWidthAfterKeyup),typeof e.attImageAndVideoTooltipFloatRadioNoneBeforeClick=="function"&&(t._elementEvents.attImageAndVideoTooltipFloatRadioNone_onBeforeClick=e.attImageAndVideoTooltipFloatRadioNoneBeforeClick),typeof e.attImageAndVideoTooltipFloatRadioNoneAfterClick=="function"&&(t._elementEvents.attImageAndVideoTooltipFloatRadioNone_onAfterClick=e.attImageAndVideoTooltipFloatRadioNoneAfterClick),typeof e.attImageAndVideoTooltipFloatRadioLeftBeforeClick=="function"&&(t._elementEvents.attImageAndVideoTooltipFloatRadioLeft_onBeforeClick=e.attImageAndVideoTooltipFloatRadioLeftBeforeClick),typeof e.attImageAndVideoTooltipFloatRadioLeftAfterClick=="function"&&(t._elementEvents.attImageAndVideoTooltipFloatRadioLeft_onAfterClick=e.attImageAndVideoTooltipFloatRadioLeftAfterClick),typeof e.attImageAndVideoTooltipFloatRadioRightBeforeClick=="function"&&(t._elementEvents.attImageAndVideoTooltipFloatRadioRight_onBeforeClick=e.attImageAndVideoTooltipFloatRadioRightBeforeClick),typeof e.attImageAndVideoTooltipFloatRadioRightAfterClick=="function"&&(t._elementEvents.attImageAndVideoTooltipFloatRadioRight_onAfterClick=e.attImageAndVideoTooltipFloatRadioRightAfterClick),typeof e.attImageAndVideoTooltipShapeRadioSquareBeforeClick=="function"&&(t._elementEvents.attImageAndVideoTooltipShapeRadioSquare_onBeforeClick=e.attImageAndVideoTooltipShapeRadioSquareBeforeClick),typeof e.attImageAndVideoTooltipShapeRadioSquareAfterClick=="function"&&(t._elementEvents.attImageAndVideoTooltipShapeRadioSquare_onAfterClick=e.attImageAndVideoTooltipShapeRadioSquareAfterClick),typeof e.attImageAndVideoTooltipShapeRadioRadiusBeforeClick=="function"&&(t._elementEvents.attImageAndVideoTooltipShapeRadioRadius_onBeforeClick=e.attImageAndVideoTooltipShapeRadioRadiusBeforeClick),typeof e.attImageAndVideoTooltipShapeRadioRadiusAfterClick=="function"&&(t._elementEvents.attImageAndVideoTooltipShapeRadioRadius_onAfterClick=e.attImageAndVideoTooltipShapeRadioRadiusAfterClick),typeof e.attImageAndVideoTooltipShapeRadioCircleBeforeClick=="function"&&(t._elementEvents.attImageAndVideoTooltipShapeRadioCircle_onBeforeClick=e.attImageAndVideoTooltipShapeRadioCircleBeforeClick),typeof e.attImageAndVideoTooltipShapeRadioCircleAfterClick=="function"&&(t._elementEvents.attImageAndVideoTooltipShapeRadioCircle_onAfterClick=e.attImageAndVideoTooltipShapeRadioCircleAfterClick),typeof e.helpModalBeforeClick=="function"&&(t._elementEvents.helpModal_onBeforeClick=e.helpModalBeforeClick),typeof e.helpModalAfterClick=="function"&&(t._elementEvents.helpModal_onAfterClick=e.helpModalAfterClick),typeof e.placeholderBeforeClick=="function"&&(t._elementEvents.placeholder_onBeforeClick=e.placeholderBeforeClick),typeof e.placeholderAfterClick=="function"&&(t._elementEvents.placeholder_onAfterClick=e.placeholderAfterClick)),E(),a.value=!1,o.__hnoteDestroyed=!1,v("mounted",t)},L=()=>{c.unregisterReloadable(g);const o=F.value;if(!o||a.value){x.disconnect();return}if(!o.isConnected){a.value=!0,x.disconnect(),B.value=null;return}try{_.unmountNote(o)}catch(n){console.warn("[HNote] unmountNote skipped:",n)}x.disconnect(),a.value=!0,o.__hnoteDestroyed=!0,B.value=null};return l.onMounted(H),l.onBeforeUnmount(()=>{u.value=!1,L()}),l.watch(h,o=>{!u.value||a.value||(d(),v("responsive-change",o))}),l.watch(()=>e.modelValue,o=>{if(a.value||!B.value)return;const n=B.value.getNoteData();G(n,o)||B.value.setNoteData(o)}),l.watch(()=>e.visible,o=>{const n=!!o;n!==I.value&&(I.value=n)}),l.watch(()=>e.editMode,o=>{o&&o!==C.value&&(C.value=o,E())}),l.watch(()=>e.required,o=>{const n=!!o;n!==y.value&&(y.value=n)}),l.watch(()=>e.tabIndex,o=>{var t,f;const n=o===null||o===""?null:Number(o);if(n!==m.value){m.value=n;const r=(f=(t=B.value)==null?void 0:t._elements)==null?void 0:f.textarea;r&&(n==null?r.removeAttribute("tabIndex"):r.setAttribute("tabIndex",String(n)))}}),l.watch(()=>e.class,()=>{!u.value||a.value||d()}),l.watch(()=>[e.noteModeByDevice,e.toolPosition,e.toolDefaultLine,e.toolToggle],()=>{!u.value||a.value||d()}),l.watch(()=>[e.textareaWidth,e.textareaHeight,e.textareaMaxWidth,e.textareaMaxHeight,e.textareaHeightIsModify],()=>{!u.value||a.value||d()}),l.watch(()=>[e.placeholderIsVisible,e.placeholderAddTop,e.placeholderAddLeft,e.placeholderWidth,e.placeholderColor,e.placeholderBackgroundColor,e.placeholderTitle,e.placeholderTextContent],()=>{!u.value||a.value||d()}),l.watch(()=>[e.attFilePreventTypes,e.attFileAcceptTypes,e.attFileMaxSize,e.attImagePreventTypes,e.attImageAcceptTypes,e.attImageMaxSize],()=>{!u.value||a.value||d()}),l.watch(()=>[e.defaultFontSize,e.defaultLineHeight,e.defaultFontFamily,e.defaultToolFontFamily,e.addFontFamily,e.removeFontFamily,e.language,e.recodeLimit],()=>{!u.value||a.value||d()}),l.watch(()=>[e.sizeLevelDesktop,e.sizeLevelMobile,e.invertColor,e.color],()=>{!u.value||a.value||d()}),l.watch(()=>[e.usingParagraphStyle,e.usingBold,e.usingUnderline,e.usingItalic,e.usingUl,e.usingOl,e.usingTextAlign,e.usingAttLink,e.usingAttFile,e.usingAttImage,e.usingAttVideo,e.usingFontSize,e.usingLetterSpacing,e.usingLineHeight,e.usingFontFamily,e.usingColorText,e.usingColorBack,e.usingFormatClear,e.usingUndo,e.usingRedo,e.usingHelp,e.usingParagraphAllStyle,e.usingCharacterStyle,e.usingCharacterSize,e.usingAttachFile,e.usingDo],()=>{!u.value||a.value||d()}),{editorWrap:F,props:e,bindAttrs:z,responsiveClassList:V,visibleClass:O,requiredClass:D,editModeClass:M}}});function $(e,v,_,F,B,A){return l.openBlock(),l.createElementBlock("div",{ref:"editorWrap",class:l.normalizeClass(["hison-note","hison-wrap",...e.responsiveClassList,e.visibleClass,e.requiredClass,e.editModeClass]),style:l.normalizeStyle(e.props.style)},[l.createElementVNode("div",l.mergeProps({"data-vanillanote":""},e.bindAttrs),null,16)],6)}const Y=P._export_sfc(J,[["render",$]]);exports.default=Y;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as Z, ref as d, computed as s, onMounted as Q, onBeforeUnmount as p, watch as a, nextTick as ee, triggerRef as te, createElementBlock as ne, openBlock as oe, normalizeStyle as ie, normalizeClass as le, createElementVNode as fe, mergeProps as ce } from "vue";
2
- import { _ as re, $ as ae, y as b, g as ue, u as Be, e as ke, t as de, o as w, a as Ce, l as V, F as Ae, h as u, v as F, d as R, r as me, c as _e } from "./index-Cvhi7T4w.mjs";
2
+ import { _ as re, $ as ae, y as b, g as ue, u as Be, e as ke, t as de, o as w, a as Ce, l as V, F as Ae, h as u, v as F, d as R, r as me, c as _e } from "./index-CGr5-mvg.mjs";
3
3
  import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
4
  const ye = {
5
5
  /**
@@ -857,7 +857,7 @@ const ye = {
857
857
  r.value && C();
858
858
  }), H || (g.init(), H = !0);
859
859
  const o = T.value;
860
- if (!o || c.value) return;
860
+ if (!o) return;
861
861
  g.mountNote(o);
862
862
  const n = g.getNote(m);
863
863
  n && (n.getId = () => m), B.value = n;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as ce, ref as r, computed as d, onMounted as fe, onBeforeUnmount as ke, watch as v, nextTick as ye, resolveComponent as pe, createElementBlock as k, openBlock as g, normalizeStyle as he, normalizeClass as p, createBlock as F, createCommentVNode as R, withCtx as A, renderSlot as z, Fragment as h, createTextVNode as D, renderList as Ne, toDisplayString as Pe } from "vue";
2
- import { B as Ce, f as we, g as $e, u as Ie, j as ae, t as j, e as Le, b as oe, h as N, r as Me, c as Be, d as Se } from "./index-Cvhi7T4w.mjs";
3
- import Te from "./HButton-DlOQpSFM.mjs";
2
+ import { B as Ce, f as we, g as $e, u as Ie, j as ae, t as j, e as Le, b as oe, h as N, r as Me, c as Be, d as Se } from "./index-CGr5-mvg.mjs";
3
+ import Te from "./HButton-CuoH95_k.mjs";
4
4
  import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  const Ae = {
6
6
  /**
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-5k-aAQlJ.js"),te=require("./HButton-zN47uq3g.js"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.js"),oe={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},gap:{type:[Number,String],default:"0.25rem"},border:{type:Boolean,default:!0},backgroundType:{type:String,default:r.BackgroundType.empty,validator:e=>r.BACKGROUND_TYPE_VALUES.includes(e)},clickInterval:{type:Number,default:0},modelValue:{type:Number,default:1},totalItems:{type:Number,required:!1,default:void 0},pageSize:{type:Number,default:10},totalPages:{type:Number,required:!1,default:void 0},maxButtons:{type:Number,default:5},tabIndex:{type:[Number,String],default:null,validator:e=>e===null||e===""||!isNaN(+e)&&isFinite(+e)},showPrev:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0}},ne=t.defineComponent({name:"HPagination",components:{HButton:te.default},props:oe,emits:["mounted","responsive-change","update:modelValue","change","first-click","first-mouseover","first-mouseout","prev-click","prev-mouseover","prev-mouseout","next-click","next-mouseover","next-mouseout","last-click","last-mouseover","last-mouseout","page-click","page-mouseover","page-mouseout"],setup(e,{emit:s}){const u=e.id?e.id:r.getUUID(),S=`hpagination:${u}`,g=t.ref(null),L=r.useDevice(),c=t.ref([]),n=()=>{c.value=r.extractResponsiveClasses(r.toClassString(e.class)||"",L.value),r.addComponentNameToClass(c.value,"size",r.hisonCloser.componentStyle.size),r.addComponentNameToClass(c.value,"color","primary")},l=t.computed(()=>{const a=[];return a.push(...r.extractPrefixedClasses(r.toClassString(e.class)||"","size")),a.push(...r.extractPrefixedClasses(r.toClassString(e.class)||"","color")),a}),v=t.ref(!!e.visible),j=t.computed(()=>v.value?"":"hison-display-none"),M=a=>typeof a=="number"?`${a}px`:a??"0.25rem",f=t.ref(M(e.gap)),W=t.computed(()=>{const a={gap:f.value},o=e.style;return Array.isArray(o)?[...o,a]:typeof o=="string"?[o,a]:{...o,...a}}),k=t.ref(!!e.border),p=t.ref(e.backgroundType),y=t.ref(Number(e.clickInterval||0)),K=t.computed(()=>!!e.disable),T=t.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),i=t.ref(F(e.modelValue));function F(a){const o=Number(a);return Number.isFinite(o)&&o>=1?Math.floor(o):1}const m=t.computed(()=>{if(e.totalPages&&e.totalPages>0)return Math.floor(e.totalPages);const a=Math.max(0,Number(e.totalItems||0)),o=Math.max(1,Number(e.pageSize||10));return Math.max(1,Math.ceil(a/o))}),V=t.computed(()=>i.value<=1),z=t.computed(()=>i.value<=1),A=t.computed(()=>i.value>=m.value),D=t.computed(()=>i.value>=m.value),h=t.ref(!!e.showPrev),N=t.ref(!!e.showNext),C=t.ref(!!e.showFirst),B=t.ref(!!e.showLast),Y=t.computed(()=>Math.max(3,Number(e.maxButtons||7))),J=t.computed(()=>{const a=m.value,o=Math.min(Math.max(1,i.value),a),d=Y.value;if(a<=d)return Array.from({length:a},(I,ee)=>ee+1);const w=Math.floor(d/2);let P=o-w,$=P+d-1;P<1&&(P=1,$=d),$>a&&($=a,P=a-d+1);const O=[];for(let I=P;I<=$;I++)O.push(I);return O}),Q=t.computed(()=>"hison-pagination-button-active"),X=(a,o,d,w)=>{s(`${a}-${o}`,{event:d,button:w,api:g.value,currentPage:i.value,totalPages:m.value})},Z=(a,o,d,w)=>{s(`page-${a}`,{event:d,page:o,isActive:o===i.value,button:w,api:g.value})},b=a=>{const o=m.value,d=Math.min(Math.max(1,Math.floor(a)),o);d!==i.value&&(i.value=d,s("update:modelValue",d),s("change",d,g.value))},E=()=>{z.value||b(i.value-1)},H=()=>{A.value||b(i.value+1)},q=()=>{V.value||b(1)},R=()=>{D.value||b(m.value)},x=a=>{const o=r.hisonCloser.component.buttonList[a];return o?(o.focus(),!0):!1},_=()=>{const a=[`hison_pagination_page_${i.value}_${u}`,`hison_pagination_prev_${u}`,`hison_pagination_next_${u}`,`hison_pagination_first_${u}`,`hison_pagination_last_${u}`];for(const o of a)if(x(o))break},U=()=>{r.hisonCloser.component.paginationList[u]&&r.hisonCloser.component.paginationList[u].isHisonvueComponent&&console.warn(`[Hisonvue] The pagination ID is at risk of being duplicated. ${u}`),r.registerReloadable(S,()=>{G(),t.nextTick(U)}),n(),g.value={isHisonvueComponent:!0,getId:()=>u,getType:()=>"pagination",isVisible:()=>v.value,setVisible:a=>{v.value=a},getGap:()=>f.value,setGap:a=>{f.value=M(a)},getCurrentPage:()=>i.value,setCurrentPage:a=>{b(a)},getTotalPages:()=>m.value,setTotalPages:a=>{const o=Math.min(Math.max(1,i.value),Math.max(1,Math.floor(a)));o!==i.value&&(i.value=o,s("update:modelValue",o),s("change",o,g.value))},getTotalItems:()=>Number(e.totalItems||0),getPageSize:()=>Number(e.pageSize||10),goPrev:E,goNext:H,goFirst:q,goLast:R,isShowPrev:()=>h.value,setShowPrev:a=>{h.value=!!a},isShowNext:()=>N.value,setShowNext:a=>{N.value=!!a},isShowFirst:()=>C.value,setShowFirst:a=>{C.value=!!a},isShowLast:()=>B.value,setShowLast:a=>{B.value=!!a},isBorder:()=>k.value,setBorder:a=>{k.value=a},getBackgroundType:()=>p.value,setBackgroundType:a=>{p.value=a},getClickInterval:()=>y.value,setClickInterval:a=>{y.value=Number(a)||0},getTabIndex:()=>T.value,setTabIndex:a=>{T.value=a!=null?Number(a):null},focus:_,reload:()=>r.reloadHisonComponent(S)},r.hisonCloser.component.paginationList[u]=g.value,s("mounted",g.value)},G=()=>{r.unregisterReloadable(S),delete r.hisonCloser.component.paginationList[u]};return t.onMounted(U),t.onBeforeUnmount(G),t.watch(L,a=>{n(),s("responsive-change",a)}),t.watch(()=>e.class,n),t.watch(()=>e.gap,a=>{const o=M(a);o!==f.value&&(f.value=o)}),t.watch(()=>e.visible,a=>{const o=!!a;o!==v.value&&(v.value=o)}),t.watch(()=>e.border,a=>{const o=!!a;o!==k.value&&(k.value=o)}),t.watch(()=>e.backgroundType,a=>{const o=a;o!==p.value&&(p.value=o)}),t.watch(()=>e.clickInterval,a=>{const o=Number(a)||0;o!==y.value&&(y.value=o)}),t.watch(()=>e.modelValue,a=>{const o=F(a);o!==i.value&&(i.value=o)}),t.watch([()=>e.totalItems,()=>e.pageSize,()=>e.totalPages],()=>{const a=m.value;i.value>a&&(i.value=a,s("update:modelValue",a),s("change",a,g.value))}),t.watch(()=>e.showPrev,a=>{const o=!!a;o!==h.value&&(h.value=o)}),t.watch(()=>e.showNext,a=>{const o=!!a;o!==N.value&&(N.value=o)}),t.watch(()=>e.showFirst,a=>{const o=!!a;o!==C.value&&(C.value=o)}),t.watch(()=>e.showLast,a=>{const o=!!a;o!==B.value&&(B.value=o)}),{id:u,props:e,containerStyle:W,responsiveClassList:c,buttonClassList:l,visibleClass:j,border:k,backgroundType:p,clickInterval:y,tabIndex:T,disableAll:K,currentPage:i,totalPages:m,isFirstDisabled:V,isPrevDisabled:z,isNextDisabled:A,isLastDisabled:D,pageWindow:J,activeButtonClass:Q,showPrev:h,showNext:N,showFirst:C,showLast:B,emitNav:X,emitPageEvt:Z,goPrev:E,goNext:H,goFirst:q,goLast:R,goPage:b}}});function se(e,s,u,S,g,L){const c=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-pagination",...e.responsiveClassList,e.visibleClass]),style:t.normalizeStyle(e.containerStyle)},[e.showFirst?(t.openBlock(),t.createBlock(c,{key:0,id:`hison_pagination_first_${e.id}`,disable:e.isFirstDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"First",onClick:s[0]||(s[0]=(n,l)=>{e.goFirst(),e.emitNav("first","click",n,l)}),onMouseover:s[1]||(s[1]=(n,l)=>e.emitNav("first","mouseover",n,l)),onMouseout:s[2]||(s[2]=(n,l)=>e.emitNav("first","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.first?t.renderSlot(e.$slots,"first",{key:0,goFirst:e.goFirst}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("«")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0),e.showPrev?(t.openBlock(),t.createBlock(c,{key:1,id:`hison_pagination_prev_${e.id}`,disable:e.isPrevDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"Previous",onClick:s[3]||(s[3]=(n,l)=>{e.goPrev(),e.emitNav("prev","click",n,l)}),onMouseover:s[4]||(s[4]=(n,l)=>e.emitNav("prev","mouseover",n,l)),onMouseout:s[5]||(s[5]=(n,l)=>e.emitNav("prev","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.prev?t.renderSlot(e.$slots,"prev",{key:0,goPrev:e.goPrev}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("‹")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.pageWindow,n=>(t.openBlock(),t.createBlock(c,{key:`p-${n}`,id:`hison_pagination_page_${n}_${e.id}`,disable:e.disableAll,class:t.normalizeClass([...e.buttonClassList,n===e.currentPage?e.activeButtonClass:""]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,title:String(n),onClick:(l,v)=>{e.goPage(n),e.emitPageEvt("click",n,l,v)},onMouseover:(l,v)=>e.emitPageEvt("mouseover",n,l,v),onMouseout:(l,v)=>e.emitPageEvt("mouseout",n,l,v)},{default:t.withCtx(()=>[e.$slots.page?t.renderSlot(e.$slots,"page",{key:0,page:n,goPage:e.goPage,isActive:n===e.currentPage}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n),1)],64))]),_:2},1032,["id","disable","class","border","background-type","click-interval","title","onClick","onMouseover","onMouseout"]))),128)),e.showNext?(t.openBlock(),t.createBlock(c,{key:2,id:`hison_pagination_next_${e.id}`,disable:e.isNextDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"Next",onClick:s[6]||(s[6]=(n,l)=>{e.goNext(),e.emitNav("next","click",n,l)}),onMouseover:s[7]||(s[7]=(n,l)=>e.emitNav("next","mouseover",n,l)),onMouseout:s[8]||(s[8]=(n,l)=>e.emitNav("next","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.next?t.renderSlot(e.$slots,"next",{key:0,goNext:e.goNext}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("›")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0),e.showLast?(t.openBlock(),t.createBlock(c,{key:3,id:`hison_pagination_last_${e.id}`,disable:e.isLastDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"Last",onClick:s[9]||(s[9]=(n,l)=>{e.goLast(),e.emitNav("last","click",n,l)}),onMouseover:s[10]||(s[10]=(n,l)=>e.emitNav("last","mouseover",n,l)),onMouseout:s[11]||(s[11]=(n,l)=>e.emitNav("last","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.last?t.renderSlot(e.$slots,"last",{key:0,goLast:e.goLast}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("»")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0)],6)}const le=ae._export_sfc(ne,[["render",se]]);exports.default=le;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-DcB16odB.js"),te=require("./HButton-C1AtcoQd.js"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.js"),oe={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},disable:{type:Boolean,default:!1},gap:{type:[Number,String],default:"0.25rem"},border:{type:Boolean,default:!0},backgroundType:{type:String,default:r.BackgroundType.empty,validator:e=>r.BACKGROUND_TYPE_VALUES.includes(e)},clickInterval:{type:Number,default:0},modelValue:{type:Number,default:1},totalItems:{type:Number,required:!1,default:void 0},pageSize:{type:Number,default:10},totalPages:{type:Number,required:!1,default:void 0},maxButtons:{type:Number,default:5},tabIndex:{type:[Number,String],default:null,validator:e=>e===null||e===""||!isNaN(+e)&&isFinite(+e)},showPrev:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0}},ne=t.defineComponent({name:"HPagination",components:{HButton:te.default},props:oe,emits:["mounted","responsive-change","update:modelValue","change","first-click","first-mouseover","first-mouseout","prev-click","prev-mouseover","prev-mouseout","next-click","next-mouseover","next-mouseout","last-click","last-mouseover","last-mouseout","page-click","page-mouseover","page-mouseout"],setup(e,{emit:s}){const u=e.id?e.id:r.getUUID(),S=`hpagination:${u}`,g=t.ref(null),L=r.useDevice(),c=t.ref([]),n=()=>{c.value=r.extractResponsiveClasses(r.toClassString(e.class)||"",L.value),r.addComponentNameToClass(c.value,"size",r.hisonCloser.componentStyle.size),r.addComponentNameToClass(c.value,"color","primary")},l=t.computed(()=>{const a=[];return a.push(...r.extractPrefixedClasses(r.toClassString(e.class)||"","size")),a.push(...r.extractPrefixedClasses(r.toClassString(e.class)||"","color")),a}),v=t.ref(!!e.visible),j=t.computed(()=>v.value?"":"hison-display-none"),M=a=>typeof a=="number"?`${a}px`:a??"0.25rem",f=t.ref(M(e.gap)),W=t.computed(()=>{const a={gap:f.value},o=e.style;return Array.isArray(o)?[...o,a]:typeof o=="string"?[o,a]:{...o,...a}}),k=t.ref(!!e.border),p=t.ref(e.backgroundType),y=t.ref(Number(e.clickInterval||0)),K=t.computed(()=>!!e.disable),T=t.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),i=t.ref(F(e.modelValue));function F(a){const o=Number(a);return Number.isFinite(o)&&o>=1?Math.floor(o):1}const m=t.computed(()=>{if(e.totalPages&&e.totalPages>0)return Math.floor(e.totalPages);const a=Math.max(0,Number(e.totalItems||0)),o=Math.max(1,Number(e.pageSize||10));return Math.max(1,Math.ceil(a/o))}),V=t.computed(()=>i.value<=1),z=t.computed(()=>i.value<=1),A=t.computed(()=>i.value>=m.value),D=t.computed(()=>i.value>=m.value),h=t.ref(!!e.showPrev),N=t.ref(!!e.showNext),C=t.ref(!!e.showFirst),B=t.ref(!!e.showLast),Y=t.computed(()=>Math.max(3,Number(e.maxButtons||7))),J=t.computed(()=>{const a=m.value,o=Math.min(Math.max(1,i.value),a),d=Y.value;if(a<=d)return Array.from({length:a},(I,ee)=>ee+1);const w=Math.floor(d/2);let P=o-w,$=P+d-1;P<1&&(P=1,$=d),$>a&&($=a,P=a-d+1);const O=[];for(let I=P;I<=$;I++)O.push(I);return O}),Q=t.computed(()=>"hison-pagination-button-active"),X=(a,o,d,w)=>{s(`${a}-${o}`,{event:d,button:w,api:g.value,currentPage:i.value,totalPages:m.value})},Z=(a,o,d,w)=>{s(`page-${a}`,{event:d,page:o,isActive:o===i.value,button:w,api:g.value})},b=a=>{const o=m.value,d=Math.min(Math.max(1,Math.floor(a)),o);d!==i.value&&(i.value=d,s("update:modelValue",d),s("change",d,g.value))},E=()=>{z.value||b(i.value-1)},H=()=>{A.value||b(i.value+1)},q=()=>{V.value||b(1)},R=()=>{D.value||b(m.value)},x=a=>{const o=r.hisonCloser.component.buttonList[a];return o?(o.focus(),!0):!1},_=()=>{const a=[`hison_pagination_page_${i.value}_${u}`,`hison_pagination_prev_${u}`,`hison_pagination_next_${u}`,`hison_pagination_first_${u}`,`hison_pagination_last_${u}`];for(const o of a)if(x(o))break},U=()=>{r.hisonCloser.component.paginationList[u]&&r.hisonCloser.component.paginationList[u].isHisonvueComponent&&console.warn(`[Hisonvue] The pagination ID is at risk of being duplicated. ${u}`),r.registerReloadable(S,()=>{G(),t.nextTick(U)}),n(),g.value={isHisonvueComponent:!0,getId:()=>u,getType:()=>"pagination",isVisible:()=>v.value,setVisible:a=>{v.value=a},getGap:()=>f.value,setGap:a=>{f.value=M(a)},getCurrentPage:()=>i.value,setCurrentPage:a=>{b(a)},getTotalPages:()=>m.value,setTotalPages:a=>{const o=Math.min(Math.max(1,i.value),Math.max(1,Math.floor(a)));o!==i.value&&(i.value=o,s("update:modelValue",o),s("change",o,g.value))},getTotalItems:()=>Number(e.totalItems||0),getPageSize:()=>Number(e.pageSize||10),goPrev:E,goNext:H,goFirst:q,goLast:R,isShowPrev:()=>h.value,setShowPrev:a=>{h.value=!!a},isShowNext:()=>N.value,setShowNext:a=>{N.value=!!a},isShowFirst:()=>C.value,setShowFirst:a=>{C.value=!!a},isShowLast:()=>B.value,setShowLast:a=>{B.value=!!a},isBorder:()=>k.value,setBorder:a=>{k.value=a},getBackgroundType:()=>p.value,setBackgroundType:a=>{p.value=a},getClickInterval:()=>y.value,setClickInterval:a=>{y.value=Number(a)||0},getTabIndex:()=>T.value,setTabIndex:a=>{T.value=a!=null?Number(a):null},focus:_,reload:()=>r.reloadHisonComponent(S)},r.hisonCloser.component.paginationList[u]=g.value,s("mounted",g.value)},G=()=>{r.unregisterReloadable(S),delete r.hisonCloser.component.paginationList[u]};return t.onMounted(U),t.onBeforeUnmount(G),t.watch(L,a=>{n(),s("responsive-change",a)}),t.watch(()=>e.class,n),t.watch(()=>e.gap,a=>{const o=M(a);o!==f.value&&(f.value=o)}),t.watch(()=>e.visible,a=>{const o=!!a;o!==v.value&&(v.value=o)}),t.watch(()=>e.border,a=>{const o=!!a;o!==k.value&&(k.value=o)}),t.watch(()=>e.backgroundType,a=>{const o=a;o!==p.value&&(p.value=o)}),t.watch(()=>e.clickInterval,a=>{const o=Number(a)||0;o!==y.value&&(y.value=o)}),t.watch(()=>e.modelValue,a=>{const o=F(a);o!==i.value&&(i.value=o)}),t.watch([()=>e.totalItems,()=>e.pageSize,()=>e.totalPages],()=>{const a=m.value;i.value>a&&(i.value=a,s("update:modelValue",a),s("change",a,g.value))}),t.watch(()=>e.showPrev,a=>{const o=!!a;o!==h.value&&(h.value=o)}),t.watch(()=>e.showNext,a=>{const o=!!a;o!==N.value&&(N.value=o)}),t.watch(()=>e.showFirst,a=>{const o=!!a;o!==C.value&&(C.value=o)}),t.watch(()=>e.showLast,a=>{const o=!!a;o!==B.value&&(B.value=o)}),{id:u,props:e,containerStyle:W,responsiveClassList:c,buttonClassList:l,visibleClass:j,border:k,backgroundType:p,clickInterval:y,tabIndex:T,disableAll:K,currentPage:i,totalPages:m,isFirstDisabled:V,isPrevDisabled:z,isNextDisabled:A,isLastDisabled:D,pageWindow:J,activeButtonClass:Q,showPrev:h,showNext:N,showFirst:C,showLast:B,emitNav:X,emitPageEvt:Z,goPrev:E,goNext:H,goFirst:q,goLast:R,goPage:b}}});function se(e,s,u,S,g,L){const c=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-pagination",...e.responsiveClassList,e.visibleClass]),style:t.normalizeStyle(e.containerStyle)},[e.showFirst?(t.openBlock(),t.createBlock(c,{key:0,id:`hison_pagination_first_${e.id}`,disable:e.isFirstDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"First",onClick:s[0]||(s[0]=(n,l)=>{e.goFirst(),e.emitNav("first","click",n,l)}),onMouseover:s[1]||(s[1]=(n,l)=>e.emitNav("first","mouseover",n,l)),onMouseout:s[2]||(s[2]=(n,l)=>e.emitNav("first","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.first?t.renderSlot(e.$slots,"first",{key:0,goFirst:e.goFirst}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("«")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0),e.showPrev?(t.openBlock(),t.createBlock(c,{key:1,id:`hison_pagination_prev_${e.id}`,disable:e.isPrevDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"Previous",onClick:s[3]||(s[3]=(n,l)=>{e.goPrev(),e.emitNav("prev","click",n,l)}),onMouseover:s[4]||(s[4]=(n,l)=>e.emitNav("prev","mouseover",n,l)),onMouseout:s[5]||(s[5]=(n,l)=>e.emitNav("prev","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.prev?t.renderSlot(e.$slots,"prev",{key:0,goPrev:e.goPrev}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("‹")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.pageWindow,n=>(t.openBlock(),t.createBlock(c,{key:`p-${n}`,id:`hison_pagination_page_${n}_${e.id}`,disable:e.disableAll,class:t.normalizeClass([...e.buttonClassList,n===e.currentPage?e.activeButtonClass:""]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,title:String(n),onClick:(l,v)=>{e.goPage(n),e.emitPageEvt("click",n,l,v)},onMouseover:(l,v)=>e.emitPageEvt("mouseover",n,l,v),onMouseout:(l,v)=>e.emitPageEvt("mouseout",n,l,v)},{default:t.withCtx(()=>[e.$slots.page?t.renderSlot(e.$slots,"page",{key:0,page:n,goPage:e.goPage,isActive:n===e.currentPage}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n),1)],64))]),_:2},1032,["id","disable","class","border","background-type","click-interval","title","onClick","onMouseover","onMouseout"]))),128)),e.showNext?(t.openBlock(),t.createBlock(c,{key:2,id:`hison_pagination_next_${e.id}`,disable:e.isNextDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"Next",onClick:s[6]||(s[6]=(n,l)=>{e.goNext(),e.emitNav("next","click",n,l)}),onMouseover:s[7]||(s[7]=(n,l)=>e.emitNav("next","mouseover",n,l)),onMouseout:s[8]||(s[8]=(n,l)=>e.emitNav("next","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.next?t.renderSlot(e.$slots,"next",{key:0,goNext:e.goNext}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("›")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0),e.showLast?(t.openBlock(),t.createBlock(c,{key:3,id:`hison_pagination_last_${e.id}`,disable:e.isLastDisabled||e.disableAll,class:t.normalizeClass([...e.buttonClassList]),border:e.border,"background-type":e.backgroundType,"click-interval":e.clickInterval,tabindex:e.tabIndex??void 0,title:"Last",onClick:s[9]||(s[9]=(n,l)=>{e.goLast(),e.emitNav("last","click",n,l)}),onMouseover:s[10]||(s[10]=(n,l)=>e.emitNav("last","mouseover",n,l)),onMouseout:s[11]||(s[11]=(n,l)=>e.emitNav("last","mouseout",n,l))},{default:t.withCtx(()=>[e.$slots.last?t.renderSlot(e.$slots,"last",{key:0,goLast:e.goLast}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("»")],64))]),_:3},8,["id","disable","class","border","background-type","click-interval","tabindex"])):t.createCommentVNode("",!0)],6)}const le=ae._export_sfc(ne,[["render",se]]);exports.default=le;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./index-5k-aAQlJ.js"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.js"),de={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},text:{type:String,required:!1},fontBold:{type:Boolean,default:!1},fontItalic:{type:Boolean,default:!1},fontThruline:{type:Boolean,default:!1},fontUnderline:{type:Boolean,default:!1},textAlign:{type:String,default:null,validator:n=>n==null||o.TEXT_ALIGN_VALUES.includes(n)},verticalAlign:{type:String,default:o.VerticalAlign.top,validator:n=>o.VERTICAL_ALIGN_VALUES.includes(n)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},whiteSpace:{type:String,default:null,validator:n=>n==null||o.WHITE_SPACE_VALUES.includes(n)},copyEnabled:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!1},copyButtonText:{type:String,default:"copy"},translate:{type:Boolean,default:!0}},pe=t.defineComponent({name:"HParagraph",props:de,inheritAttrs:!1,emits:["mounted","responsive-change","copy-click","copied","copy-error"],setup(n,{emit:l}){const I=t.ref(null),d=t.ref(null),i=n.id?n.id:o.getUUID(),P=t.computed(()=>`hison_paragraph_copy_button_${i}`),y=`hparagraph:${i}`,u=o.useDevice(),L=t.useSlots(),h=t.ref(n.visible),g=t.ref(n.title||""),p=t.ref(n.text||""),C=t.ref(n.fontBold),m=t.ref(n.fontItalic),b=t.ref(n.fontThruline),w=t.ref(n.fontUnderline),T=t.ref(n.textAlign??o.TextAlign.left),S=t.ref(n.verticalAlign),B=t.ref(n.border),f=t.ref(n.backgroundType),k=t.ref(n.whiteSpace),s=t.ref(n.copyEnabled),A=t.ref(n.showCopyButton),E=t.ref(n.copyButtonText),U=t.computed(()=>L.default?L.default():[]),D=t.computed(()=>U.value.length>0&&U.value.every(e=>e.type===t.Text)),V=t.computed(()=>!!L.default&&!D.value),x=t.computed(()=>!!L.default&&U.value.length>0);t.onMounted(()=>{if(D.value){const e=U.value.map(a=>String(a.children??"")).join("");p.value=e}});const z=t.computed(()=>h.value?"":"hison-display-none"),M=t.computed(()=>B.value?"hison-border":""),G=t.computed(()=>{switch(f.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),O=t.computed(()=>C.value?"hison-font-bold":""),j=t.computed(()=>m.value?"hison-font-italic":""),W=t.computed(()=>b.value?"hison-font-thruline":""),X=t.computed(()=>w.value?"hison-font-underline":""),Y=t.computed(()=>s.value?"":"hison-no-select"),v=t.ref(n.translate),J=t.computed(()=>v.value===!1?"notranslate":""),Q=t.computed(()=>v.value===!1?"no":void 0),N=t.ref([]),R=()=>{N.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",u.value),o.addComponentNameToClass(N.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(N.value,"color","primary")},Z=t.computed(()=>{const e=[];return e.push(...o.extractPrefixedClasses(o.toClassString(n.class)||"","color")),e}),_=t.computed(()=>k.value??"pre-wrap"),ee=t.computed(()=>{switch(_.value){case"normal":return"hison-ws-normal";case"pre":return"hison-ws-pre";case"pre-wrap":return"hison-ws-pre-wrap";case"pre-line":return"hison-ws-pre-line";case"break-spaces":return"hison-ws-break-spaces";default:return""}}),te=t.computed(()=>{switch(T.value){case"center":return"hison-ta-center";case"right":return"hison-ta-right";default:return"hison-ta-left"}}),ne=t.computed(()=>{switch(S.value){case"middle":return"hison-valign-middle";case"bottom":return"hison-valign-bottom";default:return""}}),ae=()=>{const e=I.value;return e?e.innerText??"":""};function H(){const e=typeof window<"u"?window.getSelection():null;return!!e&&!e.isCollapsed&&e.toString().length>0}const F=async()=>{if(!s.value)return!1;const e=ae();try{if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}try{const a=document.createRange(),c=I.value;if(!c)throw new Error("no element");a.selectNodeContents(c);const r=window.getSelection();r==null||r.removeAllRanges(),r==null||r.addRange(a);const ue=document.execCommand("copy");return r==null||r.removeAllRanges(),ue}catch{return!1}},$=async(e,a)=>{l("copy-click",{src:e,event:a,api:d.value});try{const c=await F();l("copied",c,d.value)}catch(c){l("copy-error",c,d.value)}},oe=async e=>{await $("button",e)},le=async e=>{const a=/Mac|iPod|iPhone|iPad/.test(navigator.platform),c=(a?e.metaKey:e.ctrlKey)&&(e.key==="c"||e.key==="C"),r=(a?e.metaKey:e.ctrlKey)&&(e.key==="x"||e.key==="X");if(!s.value&&(c||r)){e.preventDefault(),e.stopPropagation();return}if(s.value&&c){if(H())return;e.preventDefault(),e.stopPropagation(),await $("keyboard",e)}},se=async e=>{if(!s.value){e.preventDefault();return}H()||(e.preventDefault(),await $("native",e))},re=e=>{s.value||e.preventDefault()},ie=e=>{s.value||e.preventDefault()},K=()=>{o.hisonCloser.component.paragraphList[i]&&o.hisonCloser.component.paragraphList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The paragraph ID is at risk of being duplicated. ${i}`),o.registerReloadable(y,()=>{q(),t.nextTick(K)}),R(),d.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"paragraph",isVisible:()=>h.value,setVisible:e=>{h.value=e},getTitle:()=>g.value,setTitle:e=>{g.value=e||""},getText:()=>V.value?"":p.value,setText:e=>{V.value||(p.value=e??"")},getTextAlign:()=>T.value,setTextAlign:e=>{(e==="left"||e==="center"||e==="right")&&(T.value=e)},getVerticalAlign:()=>S.value,setVerticalAlign:e=>{S.value=e},isFontBold:()=>C.value,setFontBold:e=>{C.value=e},isFontItalic:()=>m.value,setFontItalic:e=>{m.value=e},isFontThruline:()=>b.value,setFontThruline:e=>{b.value=e},isFontUnderline:()=>w.value,setFontUnderline:e=>{w.value=e},isBorder:()=>B.value,setBorder:e=>{B.value=e},getBackgroundType:()=>f.value,setBackgroundType:e=>{f.value=e},getWhiteSpace:()=>k.value,setWhiteSpace:e=>{k.value=e},getCopyButtonText:()=>E.value,setCopyButtonText:e=>{E.value=e},isCopyEnabled:()=>s.value,setCopyEnabled:e=>{s.value=e},isShowCopyButton:()=>A.value,setShowCopyButton:e=>{A.value=e},copy:async()=>await F(),isTranslate:()=>v.value,setTranslate:e=>{v.value=e},reload:()=>o.reloadHisonComponent(y)},o.hisonCloser.component.paragraphList[i]=d.value,l("mounted",d.value)},q=()=>{o.unregisterReloadable(y),delete o.hisonCloser.component.paragraphList[i]};return t.onMounted(K),t.onBeforeUnmount(q),t.watch(u,e=>{R(),l("responsive-change",e)}),t.watch(()=>n.visible,e=>{const a=!!e;a!==h.value&&(h.value=a)}),t.watch(()=>n.title,e=>{const a=e??"";a!==g.value&&(g.value=a)}),t.watch(()=>n.text,e=>{const a=e??"";!V.value&&a!==p.value&&(p.value=a)}),t.watch(()=>n.fontBold,e=>{const a=!!e;a!==C.value&&(C.value=a)}),t.watch(()=>n.fontItalic,e=>{const a=!!e;a!==m.value&&(m.value=a)}),t.watch(()=>n.fontThruline,e=>{const a=!!e;a!==b.value&&(b.value=a)}),t.watch(()=>n.fontUnderline,e=>{const a=!!e;a!==w.value&&(w.value=a)}),t.watch(()=>n.textAlign,e=>{e&&e!==T.value&&(e==="left"||e==="center"||e==="right")&&(T.value=e)}),t.watch(()=>n.verticalAlign,e=>{e&&e!==S.value&&(e==="top"||e==="middle"||e==="bottom")&&(S.value=e)}),t.watch(()=>n.whiteSpace,e=>{const a=e??null;a!==k.value&&(k.value=a)}),t.watch(()=>n.border,e=>{const a=!!e;a!==B.value&&(B.value=a)}),t.watch(()=>n.backgroundType,e=>{e&&e!==f.value&&(f.value=e)}),t.watch(()=>n.copyEnabled,e=>{const a=!!e;a!==s.value&&(s.value=a)}),t.watch(()=>n.showCopyButton,e=>{const a=!!e;a!==A.value&&(A.value=a)}),t.watch(()=>n.copyButtonText,e=>{const a=e??"copy";a!==E.value&&(E.value=a)}),t.watch(()=>n.translate,e=>{const a=!!e;a!==v.value&&(v.value=a)}),t.watch(()=>n.class,()=>{R()}),{paraRef:I,paragraphMethods:t.computed(()=>t.unref(d)),props:n,id:i,copyButtonId:P,title:g,visibleClass:z,borderClass:M,backgroundType:f,backgroundTypeClass:G,fontBoldClass:O,fontItalicClass:j,fontThrulineClass:W,fontUnderlineClass:X,responsiveClassList:N,buttonClassList:Z,internalText:p,copyButtonText:E,copyEnabled:s,showCopyButton:A,hasElementSlot:V,hasAnySlot:x,whiteSpaceClass:ee,textAlignClass:te,verticalAlignClass:ne,copyGuardClass:Y,translateClass:J,translateAttr:Q,onKeydown:le,onCopyEvent:se,onCutEvent:re,onSelectStart:ie,onCopyButtonClick:oe}}}),fe={key:0,class:"hison-paragraph-copybtn"},ve=["title","translate"];function ye(n,l,I,d,i,P){const y=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper","hison-paragraph-wrapper",...n.responsiveClassList,n.visibleClass])},[n.copyEnabled&&n.showCopyButton?(t.openBlock(),t.createElementBlock("div",fe,[t.renderSlot(n.$slots,"copy-button",{onClick:n.onCopyButtonClick,text:n.copyButtonText},()=>[t.createVNode(y,{id:n.copyButtonId,class:t.normalizeClass([...n.buttonClassList,"hison-size-s"]),border:!0,text:n.copyButtonText,"background-type":n.backgroundType,onClick:n.onCopyButtonClick,title:"Copy content"},t.createSlots({default:t.withCtx(()=>[n.$slots["copy-label"]?t.renderSlot(n.$slots,"copy-label",{key:0}):t.createCommentVNode("",!0)]),_:2},[n.$slots["copy-icon"]?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(n.$slots,"copy-icon")]),key:"0"}:void 0]),1032,["id","class","text","background-type","onClick"])])])):t.createCommentVNode("",!0),t.createElementVNode("p",{ref:"paraRef",class:t.normalizeClass(["hison-paragraph",[n.borderClass,n.backgroundTypeClass,n.fontBoldClass,n.fontItalicClass,n.fontThrulineClass,n.fontUnderlineClass,n.whiteSpaceClass,n.textAlignClass,n.verticalAlignClass,n.copyGuardClass,n.translateClass]]),style:t.normalizeStyle(n.props.style),title:n.title||void 0,translate:n.translateAttr,tabindex:"0",onKeydown:l[0]||(l[0]=(...u)=>n.onKeydown&&n.onKeydown(...u)),onCopy:l[1]||(l[1]=(...u)=>n.onCopyEvent&&n.onCopyEvent(...u)),onCut:l[2]||(l[2]=(...u)=>n.onCutEvent&&n.onCutEvent(...u)),onSelectstart:l[3]||(l[3]=(...u)=>n.onSelectStart&&n.onSelectStart(...u))},[n.hasElementSlot?t.renderSlot(n.$slots,"default",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n.internalText),1)],64))],46,ve)],2)}const he=ce._export_sfc(pe,[["render",ye]]);exports.default=he;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./index-DcB16odB.js"),ce=require("./_plugin-vue_export-helper-BHFhmbuH.js"),de={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},text:{type:String,required:!1},fontBold:{type:Boolean,default:!1},fontItalic:{type:Boolean,default:!1},fontThruline:{type:Boolean,default:!1},fontUnderline:{type:Boolean,default:!1},textAlign:{type:String,default:null,validator:n=>n==null||o.TEXT_ALIGN_VALUES.includes(n)},verticalAlign:{type:String,default:o.VerticalAlign.top,validator:n=>o.VERTICAL_ALIGN_VALUES.includes(n)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},whiteSpace:{type:String,default:null,validator:n=>n==null||o.WHITE_SPACE_VALUES.includes(n)},copyEnabled:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!1},copyButtonText:{type:String,default:"copy"},translate:{type:Boolean,default:!0}},pe=t.defineComponent({name:"HParagraph",props:de,inheritAttrs:!1,emits:["mounted","responsive-change","copy-click","copied","copy-error"],setup(n,{emit:l}){const I=t.ref(null),d=t.ref(null),i=n.id?n.id:o.getUUID(),P=t.computed(()=>`hison_paragraph_copy_button_${i}`),y=`hparagraph:${i}`,u=o.useDevice(),L=t.useSlots(),h=t.ref(n.visible),g=t.ref(n.title||""),p=t.ref(n.text||""),C=t.ref(n.fontBold),m=t.ref(n.fontItalic),b=t.ref(n.fontThruline),w=t.ref(n.fontUnderline),T=t.ref(n.textAlign??o.TextAlign.left),S=t.ref(n.verticalAlign),B=t.ref(n.border),f=t.ref(n.backgroundType),k=t.ref(n.whiteSpace),s=t.ref(n.copyEnabled),A=t.ref(n.showCopyButton),E=t.ref(n.copyButtonText),U=t.computed(()=>L.default?L.default():[]),D=t.computed(()=>U.value.length>0&&U.value.every(e=>e.type===t.Text)),V=t.computed(()=>!!L.default&&!D.value),x=t.computed(()=>!!L.default&&U.value.length>0);t.onMounted(()=>{if(D.value){const e=U.value.map(a=>String(a.children??"")).join("");p.value=e}});const z=t.computed(()=>h.value?"":"hison-display-none"),M=t.computed(()=>B.value?"hison-border":""),G=t.computed(()=>{switch(f.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),O=t.computed(()=>C.value?"hison-font-bold":""),j=t.computed(()=>m.value?"hison-font-italic":""),W=t.computed(()=>b.value?"hison-font-thruline":""),X=t.computed(()=>w.value?"hison-font-underline":""),Y=t.computed(()=>s.value?"":"hison-no-select"),v=t.ref(n.translate),J=t.computed(()=>v.value===!1?"notranslate":""),Q=t.computed(()=>v.value===!1?"no":void 0),N=t.ref([]),R=()=>{N.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",u.value),o.addComponentNameToClass(N.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(N.value,"color","primary")},Z=t.computed(()=>{const e=[];return e.push(...o.extractPrefixedClasses(o.toClassString(n.class)||"","color")),e}),_=t.computed(()=>k.value??"pre-wrap"),ee=t.computed(()=>{switch(_.value){case"normal":return"hison-ws-normal";case"pre":return"hison-ws-pre";case"pre-wrap":return"hison-ws-pre-wrap";case"pre-line":return"hison-ws-pre-line";case"break-spaces":return"hison-ws-break-spaces";default:return""}}),te=t.computed(()=>{switch(T.value){case"center":return"hison-ta-center";case"right":return"hison-ta-right";default:return"hison-ta-left"}}),ne=t.computed(()=>{switch(S.value){case"middle":return"hison-valign-middle";case"bottom":return"hison-valign-bottom";default:return""}}),ae=()=>{const e=I.value;return e?e.innerText??"":""};function H(){const e=typeof window<"u"?window.getSelection():null;return!!e&&!e.isCollapsed&&e.toString().length>0}const F=async()=>{if(!s.value)return!1;const e=ae();try{if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}try{const a=document.createRange(),c=I.value;if(!c)throw new Error("no element");a.selectNodeContents(c);const r=window.getSelection();r==null||r.removeAllRanges(),r==null||r.addRange(a);const ue=document.execCommand("copy");return r==null||r.removeAllRanges(),ue}catch{return!1}},$=async(e,a)=>{l("copy-click",{src:e,event:a,api:d.value});try{const c=await F();l("copied",c,d.value)}catch(c){l("copy-error",c,d.value)}},oe=async e=>{await $("button",e)},le=async e=>{const a=/Mac|iPod|iPhone|iPad/.test(navigator.platform),c=(a?e.metaKey:e.ctrlKey)&&(e.key==="c"||e.key==="C"),r=(a?e.metaKey:e.ctrlKey)&&(e.key==="x"||e.key==="X");if(!s.value&&(c||r)){e.preventDefault(),e.stopPropagation();return}if(s.value&&c){if(H())return;e.preventDefault(),e.stopPropagation(),await $("keyboard",e)}},se=async e=>{if(!s.value){e.preventDefault();return}H()||(e.preventDefault(),await $("native",e))},re=e=>{s.value||e.preventDefault()},ie=e=>{s.value||e.preventDefault()},K=()=>{o.hisonCloser.component.paragraphList[i]&&o.hisonCloser.component.paragraphList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The paragraph ID is at risk of being duplicated. ${i}`),o.registerReloadable(y,()=>{q(),t.nextTick(K)}),R(),d.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"paragraph",isVisible:()=>h.value,setVisible:e=>{h.value=e},getTitle:()=>g.value,setTitle:e=>{g.value=e||""},getText:()=>V.value?"":p.value,setText:e=>{V.value||(p.value=e??"")},getTextAlign:()=>T.value,setTextAlign:e=>{(e==="left"||e==="center"||e==="right")&&(T.value=e)},getVerticalAlign:()=>S.value,setVerticalAlign:e=>{S.value=e},isFontBold:()=>C.value,setFontBold:e=>{C.value=e},isFontItalic:()=>m.value,setFontItalic:e=>{m.value=e},isFontThruline:()=>b.value,setFontThruline:e=>{b.value=e},isFontUnderline:()=>w.value,setFontUnderline:e=>{w.value=e},isBorder:()=>B.value,setBorder:e=>{B.value=e},getBackgroundType:()=>f.value,setBackgroundType:e=>{f.value=e},getWhiteSpace:()=>k.value,setWhiteSpace:e=>{k.value=e},getCopyButtonText:()=>E.value,setCopyButtonText:e=>{E.value=e},isCopyEnabled:()=>s.value,setCopyEnabled:e=>{s.value=e},isShowCopyButton:()=>A.value,setShowCopyButton:e=>{A.value=e},copy:async()=>await F(),isTranslate:()=>v.value,setTranslate:e=>{v.value=e},reload:()=>o.reloadHisonComponent(y)},o.hisonCloser.component.paragraphList[i]=d.value,l("mounted",d.value)},q=()=>{o.unregisterReloadable(y),delete o.hisonCloser.component.paragraphList[i]};return t.onMounted(K),t.onBeforeUnmount(q),t.watch(u,e=>{R(),l("responsive-change",e)}),t.watch(()=>n.visible,e=>{const a=!!e;a!==h.value&&(h.value=a)}),t.watch(()=>n.title,e=>{const a=e??"";a!==g.value&&(g.value=a)}),t.watch(()=>n.text,e=>{const a=e??"";!V.value&&a!==p.value&&(p.value=a)}),t.watch(()=>n.fontBold,e=>{const a=!!e;a!==C.value&&(C.value=a)}),t.watch(()=>n.fontItalic,e=>{const a=!!e;a!==m.value&&(m.value=a)}),t.watch(()=>n.fontThruline,e=>{const a=!!e;a!==b.value&&(b.value=a)}),t.watch(()=>n.fontUnderline,e=>{const a=!!e;a!==w.value&&(w.value=a)}),t.watch(()=>n.textAlign,e=>{e&&e!==T.value&&(e==="left"||e==="center"||e==="right")&&(T.value=e)}),t.watch(()=>n.verticalAlign,e=>{e&&e!==S.value&&(e==="top"||e==="middle"||e==="bottom")&&(S.value=e)}),t.watch(()=>n.whiteSpace,e=>{const a=e??null;a!==k.value&&(k.value=a)}),t.watch(()=>n.border,e=>{const a=!!e;a!==B.value&&(B.value=a)}),t.watch(()=>n.backgroundType,e=>{e&&e!==f.value&&(f.value=e)}),t.watch(()=>n.copyEnabled,e=>{const a=!!e;a!==s.value&&(s.value=a)}),t.watch(()=>n.showCopyButton,e=>{const a=!!e;a!==A.value&&(A.value=a)}),t.watch(()=>n.copyButtonText,e=>{const a=e??"copy";a!==E.value&&(E.value=a)}),t.watch(()=>n.translate,e=>{const a=!!e;a!==v.value&&(v.value=a)}),t.watch(()=>n.class,()=>{R()}),{paraRef:I,paragraphMethods:t.computed(()=>t.unref(d)),props:n,id:i,copyButtonId:P,title:g,visibleClass:z,borderClass:M,backgroundType:f,backgroundTypeClass:G,fontBoldClass:O,fontItalicClass:j,fontThrulineClass:W,fontUnderlineClass:X,responsiveClassList:N,buttonClassList:Z,internalText:p,copyButtonText:E,copyEnabled:s,showCopyButton:A,hasElementSlot:V,hasAnySlot:x,whiteSpaceClass:ee,textAlignClass:te,verticalAlignClass:ne,copyGuardClass:Y,translateClass:J,translateAttr:Q,onKeydown:le,onCopyEvent:se,onCutEvent:re,onSelectStart:ie,onCopyButtonClick:oe}}}),fe={key:0,class:"hison-paragraph-copybtn"},ve=["title","translate"];function ye(n,l,I,d,i,P){const y=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper","hison-paragraph-wrapper",...n.responsiveClassList,n.visibleClass])},[n.copyEnabled&&n.showCopyButton?(t.openBlock(),t.createElementBlock("div",fe,[t.renderSlot(n.$slots,"copy-button",{onClick:n.onCopyButtonClick,text:n.copyButtonText},()=>[t.createVNode(y,{id:n.copyButtonId,class:t.normalizeClass([...n.buttonClassList,"hison-size-s"]),border:!0,text:n.copyButtonText,"background-type":n.backgroundType,onClick:n.onCopyButtonClick,title:"Copy content"},t.createSlots({default:t.withCtx(()=>[n.$slots["copy-label"]?t.renderSlot(n.$slots,"copy-label",{key:0}):t.createCommentVNode("",!0)]),_:2},[n.$slots["copy-icon"]?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(n.$slots,"copy-icon")]),key:"0"}:void 0]),1032,["id","class","text","background-type","onClick"])])])):t.createCommentVNode("",!0),t.createElementVNode("p",{ref:"paraRef",class:t.normalizeClass(["hison-paragraph",[n.borderClass,n.backgroundTypeClass,n.fontBoldClass,n.fontItalicClass,n.fontThrulineClass,n.fontUnderlineClass,n.whiteSpaceClass,n.textAlignClass,n.verticalAlignClass,n.copyGuardClass,n.translateClass]]),style:t.normalizeStyle(n.props.style),title:n.title||void 0,translate:n.translateAttr,tabindex:"0",onKeydown:l[0]||(l[0]=(...u)=>n.onKeydown&&n.onKeydown(...u)),onCopy:l[1]||(l[1]=(...u)=>n.onCopyEvent&&n.onCopyEvent(...u)),onCut:l[2]||(l[2]=(...u)=>n.onCutEvent&&n.onCutEvent(...u)),onSelectstart:l[3]||(l[3]=(...u)=>n.onSelectStart&&n.onSelectStart(...u))},[n.hasElementSlot?t.renderSlot(n.$slots,"default",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n.internalText),1)],64))],46,ve)],2)}const he=ce._export_sfc(pe,[["render",ye]]);exports.default=he;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as we, ref as o, computed as a, useSlots as Be, Text as Se, onMounted as X, onBeforeUnmount as ke, watch as l, unref as Ae, nextTick as Ee, resolveComponent as Ie, createElementBlock as H, openBlock as K, normalizeClass as x, createCommentVNode as Y, createElementVNode as Le, renderSlot as N, createVNode as Ue, createSlots as Ve, withCtx as J, normalizeStyle as Re, Fragment as $e, createTextVNode as De, toDisplayString as Ne } from "vue";
2
- import { a0 as Pe, B as Fe, f as G, a1 as He, a2 as Ke, T as xe, g as Ge, u as qe, w as ze, j as Me, t as Q, e as je, b as Z, h as L, r as Oe, c as We, d as Xe } from "./index-Cvhi7T4w.mjs";
2
+ import { a0 as Pe, B as Fe, f as G, a1 as He, a2 as Ke, T as xe, g as Ge, u as qe, w as ze, j as Me, t as Q, e as je, b as Z, h as L, r as Oe, c as We, d as Xe } from "./index-CGr5-mvg.mjs";
3
3
  import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
4
  const Je = {
5
5
  /**
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-5k-aAQlJ.js"),Z=require("./scrollManager-CEEWQwoK.js"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.js"),Ce={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!1},border:{type:Boolean,default:!0},zIndex:{type:Number,default:1200},position:{type:String,default:n.ScreenPosition.middleCenter,validator:l=>n.SCREEN_POSITION_VALUES.includes(l)},left:{type:Number,default:null},top:{type:Number,default:null},width:{type:Number,default:null},height:{type:Number,default:null},draggable:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},closeClickOverlay:{type:Boolean,default:!0},overlayStyle:{type:[String,Object,Array],required:!1},scrollLock:{type:Boolean,default:!0},enterAnimationClass:{type:String,required:!1},leaveAnimationClass:{type:String,required:!1}},Se=t.defineComponent({name:"HPopup",props:Ce,inheritAttrs:!1,emits:["mounted","responsive-change","open","close"],setup(l,{emit:c,slots:G}){const i=l.id||n.getUUID(),z=`hpopup:${i}`,E=n.useDevice(),w=t.ref(null),v=t.ref(null),s=t.ref(l.visible),J=t.ref(!0),f=t.ref(l.zIndex??1100),L=t.ref(l.position),r=t.ref(l.left??null),u=t.ref(l.top??null),m=t.ref(l.width??null),h=t.ref(l.height??null),B=t.ref(l.showOverlay),P=t.ref(l.closeClickOverlay),y=t.ref(l.scrollLock),d=t.ref(l.enterAnimationClass||"hison-popup-enter"),p=t.ref(l.leaveAnimationClass||"hison-popup-leave"),K=t.computed(()=>s.value?"":"hison-display-none"),N=t.ref([]),I=()=>{N.value=n.extractResponsiveClasses(n.toClassString(l.class)||"",E.value),n.addComponentNameToClass(N.value,"size",n.hisonCloser.componentStyle.size),n.addComponentNameToClass(N.value,"color","primary")},Q=t.computed(()=>[...n.extractPrefixedClasses(n.toClassString(l.class)||"","color")]),_=t.computed(()=>s.value&&B.value),ee=()=>{P.value&&g()},te=t.computed(()=>{const e={zIndex:f.value,position:"fixed"};if(r.value!=null||u.value!=null)return e.left=`${r.value??0}px`,e.top=`${u.value??0}px`,e;switch(e.left="",e.right="",e.top="",e.bottom="",e.transform="none",L.value){case n.ScreenPosition.topLeft:e.left="0",e.top="0";break;case n.ScreenPosition.topCenter:e.left="50%",e.top="0",e.transform="translateX(-50%)";break;case n.ScreenPosition.topRight:e.right="0",e.top="0";break;case n.ScreenPosition.middleLeft:e.left="0",e.top="50%",e.transform="translateY(-50%)";break;case n.ScreenPosition.middleCenter:e.left="50%",e.top="50%",e.transform="translate(-50%, -50%)";break;case n.ScreenPosition.middleRight:e.right="0",e.top="50%",e.transform="translateY(-50%)";break;case n.ScreenPosition.bottomLeft:e.left="0",e.bottom="0";break;case n.ScreenPosition.bottomCenter:e.left="50%",e.bottom="0",e.transform="translateX(-50%)";break;case n.ScreenPosition.bottomRight:e.right="0",e.bottom="0";break}return e}),le=t.computed(()=>{const o={zIndex:(f.value??1100)-1},a=l.overlayStyle;return a?Array.isArray(a)?[{...o},...a]:typeof a=="string"?[o,a]:{...o,...a}:o}),oe=t.computed(()=>{const e={};return m.value!=null&&(e.width=`${m.value}px`),h.value!=null&&(e.height=`${h.value}px`),e}),b=t.ref(l.border),ne=t.computed(()=>b.value?"hison-border":"hison-border-none"),se=t.computed(()=>b.value?"filled":"empty"),A=()=>{y.value&&Z.acquireScrollLock(i)},V=()=>{y.value&&Z.releaseScrollLock(i)},D=async()=>{const e=v.value;!e||!d.value||(e.classList.remove(p.value),e.offsetWidth,e.classList.add(d.value))},ae=async()=>{const e=v.value;!e||!p.value||(e.classList.remove(d.value),e.offsetWidth,e.classList.add(p.value),await new Promise(o=>setTimeout(o,200)))},$=async()=>{s.value||(s.value=!0,A(),await t.nextTick(),D(),c("open",t.unref(k)))},g=async()=>{if(s.value)try{await ae()}finally{s.value=!1,V(),c("close",t.unref(k))}},ie=async()=>s.value?g():$(),re=()=>{g()},C=t.ref(l.draggable),T=t.ref(!1);let x=0,X=0,U=0,Y=0,S=null,O=null;const ue=()=>{if(r.value==null&&u.value==null){const e=w.value;if(!e)return;const o=e.getBoundingClientRect();r.value=Math.round(o.left),u.value=Math.round(o.top)}},ce=(e,o)=>{const a=w.value;if(!a)return{l:e,t:o};const q=window.innerWidth,W=window.innerHeight,pe=a.offsetWidth,fe=a.offsetHeight,me=0,he=0,ye=Math.max(0,q-pe),be=Math.max(0,W-fe);return{l:Math.min(Math.max(e,me),ye),t:Math.min(Math.max(o,he),be)}},ve=(e,o)=>{O={l:e,t:o},S==null&&(S=requestAnimationFrame(()=>{O&&(r.value=O.l,u.value=O.t,O=null),S=null}))},M=e=>{if(!T.value)return;const o=e.clientX-x,a=e.clientY-X,{l:q,t:W}=ce(U+o,Y+a);ve(q,W)},R=()=>{T.value&&(T.value=!1,document.removeEventListener("pointermove",M,!0),document.removeEventListener("pointerup",R,!0),document.body.style.userSelect="")},de=e=>{!C.value||e.target.closest(".hison-popup-close-btn")||(ue(),T.value=!0,x=e.clientX,X=e.clientY,U=r.value??0,Y=u.value??0,document.body.style.userSelect="none",document.addEventListener("pointermove",M,!0),document.addEventListener("pointerup",R,!0))},H=()=>{S!=null&&(cancelAnimationFrame(S),S=null),document.removeEventListener("pointermove",M,!0),document.removeEventListener("pointerup",R,!0),document.body.style.userSelect="",T.value=!1},k=t.ref(null),j=()=>{n.hisonCloser.component.popupList[i]&&n.hisonCloser.component.popupList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The popup ID is at risk of being duplicated. ${i}`),n.registerReloadable(z,()=>{F(),t.nextTick(j)}),I(),s.value&&(A(),t.nextTick(D)),k.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"popup",isVisible:()=>s.value,open:$,close:g,toggle:ie,setVisible:e=>e?$():g(),getZIndex:()=>f.value,setZIndex:e=>{f.value=e},getPosition:()=>L.value,setPosition:e=>{L.value=e},getLeft:()=>r.value,setLeft:e=>{r.value=e},getTop:()=>u.value,setTop:e=>{u.value=e},getWidth:()=>m.value,setWidth:e=>{m.value=e},getHeight:()=>h.value,setHeight:e=>{h.value=e},isDraggable:()=>C.value,setDraggable:e=>{C.value=e,e||H()},isOverlayShown:()=>B.value,setOverlayShown:e=>{B.value=e},isCloseClickOverlay:()=>P.value,setCloseClickOverlay:e=>{P.value=e},isScrollLocked:()=>y.value,setScrollLock:e=>{y.value=e,s.value&&(e?A():V())},isBorder:()=>b.value,setBorder:e=>{b.value=e},getAnimationClasses:()=>({enter:d.value,leave:p.value}),setAnimationClasses:e=>{"enter"in e&&(d.value=e.enter||""),"leave"in e&&(p.value=e.leave||"")},reload:()=>n.reloadHisonComponent(z)},n.hisonCloser.component.popupList[i]=k.value,c("mounted",k.value)},F=()=>{H(),n.unregisterReloadable(z),delete n.hisonCloser.component.popupList[i],s.value&&V()};return t.onMounted(j),t.onBeforeUnmount(F),t.watch(E,e=>{I(),c("responsive-change",e)}),t.watch(()=>l.visible,e=>{const o=!!e;o!==s.value&&(o?$():g())}),t.watch(()=>l.zIndex,e=>{const o=Number(e??1100);o!==f.value&&(f.value=o)}),t.watch(()=>l.position,e=>{e&&e!==L.value&&(L.value=e)}),t.watch(()=>l.left,e=>{const o=e==null?null:Number(e);o!==r.value&&(r.value=o)}),t.watch(()=>l.top,e=>{const o=e==null?null:Number(e);o!==u.value&&(u.value=o)}),t.watch(()=>l.width,e=>{const o=e==null?null:Number(e);o!==m.value&&(m.value=o)}),t.watch(()=>l.height,e=>{const o=e==null?null:Number(e);o!==h.value&&(h.value=o)}),t.watch(()=>l.draggable,e=>{const o=!!e;o!==C.value&&(C.value=o,o||H())}),t.watch(()=>l.showOverlay,e=>{const o=!!e;o!==B.value&&(B.value=o)}),t.watch(()=>l.closeClickOverlay,e=>{const o=!!e;o!==P.value&&(P.value=o)}),t.watch(()=>l.scrollLock,e=>{const o=!!e;o!==y.value&&(y.value=o,s.value&&(o?A():V()))}),t.watch(()=>l.border,e=>{const o=!!e;o!==b.value&&(b.value=o)}),t.watch(()=>l.enterAnimationClass,e=>{const o=e||"hison-popup-enter";o!==d.value&&(d.value=o)}),t.watch(()=>l.leaveAnimationClass,e=>{const o=e||"hison-popup-leave";o!==p.value&&(p.value=o)}),t.watch(()=>l.class,()=>{I()}),{id:i,props:l,popupRef:v,popupWrapperRef:w,visibleClass:K,responsiveClassList:N,childClassList:Q,borderClass:ne,wrapperStyle:te,overlayStyleWithZ:le,isOverlayVisible:_,sizeStyle:oe,closeButtonVisible:J,closeButtonBackgroundType:se,closeButtonText:"X",closeButtonTitle:"Close",draggable:C,onClickCloseButton:re,onOverlayClick:ee,onTopbarPointerDown:de,popupMethods:t.computed(()=>t.unref(k))}}}),ke={class:t.normalizeClass(["hison-popup-body"])};function we(l,c,G,i,z,E){const w=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-layer-host",l.visibleClass])},[l.isOverlayVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"hison-popup-overlay",style:t.normalizeStyle(l.overlayStyleWithZ),onClick:c[0]||(c[0]=(...v)=>l.onOverlayClick&&l.onOverlayClick(...v))},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"popupWrapperRef",class:t.normalizeClass(["hison-popup-wrapper",...l.responsiveClassList]),style:t.normalizeStyle(l.wrapperStyle)},[t.createElementVNode("div",{ref:"popupRef",class:t.normalizeClass(["hison-popup",l.borderClass]),style:t.normalizeStyle([l.sizeStyle,l.props.style]),role:"dialog"},[t.createElementVNode("div",{class:t.normalizeClass(["hison-popup-topbar",l.draggable?"hison-draggable":""]),onPointerdown:c[1]||(c[1]=(...v)=>l.onTopbarPointerDown&&l.onTopbarPointerDown(...v))},[l.closeButtonVisible?t.renderSlot(l.$slots,"close-button",{key:0,onClick:l.onClickCloseButton,text:l.closeButtonText,title:l.closeButtonTitle||"Close"},()=>[t.createVNode(w,{id:`hison_popup_close_${l.id}`,class:t.normalizeClass(["hison-popup-close-btn","hison-pos-right","hison-pos-vertical-center","hison-size-s",...l.childClassList]),text:l.closeButtonText,title:l.closeButtonTitle||"Close",border:!1,"background-type":l.closeButtonBackgroundType,onClick:l.onClickCloseButton},t.createSlots({default:t.withCtx(()=>[l.$slots["close-label"]?t.renderSlot(l.$slots,"close-label",{key:0}):t.createCommentVNode("",!0)]),_:2},[l.$slots["close-icon"]?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","class","text","title","background-type","onClick"])]):t.createCommentVNode("",!0)],34),t.createElementVNode("div",ke,[t.renderSlot(l.$slots,"default")])],6)],6)],2)}const Le=ge._export_sfc(Se,[["render",we]]);exports.default=Le;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-DcB16odB.js"),Z=require("./scrollManager-CEEWQwoK.js"),ge=require("./_plugin-vue_export-helper-BHFhmbuH.js"),Ce={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!1},border:{type:Boolean,default:!0},zIndex:{type:Number,default:1200},position:{type:String,default:n.ScreenPosition.middleCenter,validator:l=>n.SCREEN_POSITION_VALUES.includes(l)},left:{type:Number,default:null},top:{type:Number,default:null},width:{type:Number,default:null},height:{type:Number,default:null},draggable:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},closeClickOverlay:{type:Boolean,default:!0},overlayStyle:{type:[String,Object,Array],required:!1},scrollLock:{type:Boolean,default:!0},enterAnimationClass:{type:String,required:!1},leaveAnimationClass:{type:String,required:!1}},Se=t.defineComponent({name:"HPopup",props:Ce,inheritAttrs:!1,emits:["mounted","responsive-change","open","close"],setup(l,{emit:c,slots:G}){const i=l.id||n.getUUID(),z=`hpopup:${i}`,E=n.useDevice(),w=t.ref(null),v=t.ref(null),s=t.ref(l.visible),J=t.ref(!0),f=t.ref(l.zIndex??1100),L=t.ref(l.position),r=t.ref(l.left??null),u=t.ref(l.top??null),m=t.ref(l.width??null),h=t.ref(l.height??null),B=t.ref(l.showOverlay),P=t.ref(l.closeClickOverlay),y=t.ref(l.scrollLock),d=t.ref(l.enterAnimationClass||"hison-popup-enter"),p=t.ref(l.leaveAnimationClass||"hison-popup-leave"),K=t.computed(()=>s.value?"":"hison-display-none"),N=t.ref([]),I=()=>{N.value=n.extractResponsiveClasses(n.toClassString(l.class)||"",E.value),n.addComponentNameToClass(N.value,"size",n.hisonCloser.componentStyle.size),n.addComponentNameToClass(N.value,"color","primary")},Q=t.computed(()=>[...n.extractPrefixedClasses(n.toClassString(l.class)||"","color")]),_=t.computed(()=>s.value&&B.value),ee=()=>{P.value&&g()},te=t.computed(()=>{const e={zIndex:f.value,position:"fixed"};if(r.value!=null||u.value!=null)return e.left=`${r.value??0}px`,e.top=`${u.value??0}px`,e;switch(e.left="",e.right="",e.top="",e.bottom="",e.transform="none",L.value){case n.ScreenPosition.topLeft:e.left="0",e.top="0";break;case n.ScreenPosition.topCenter:e.left="50%",e.top="0",e.transform="translateX(-50%)";break;case n.ScreenPosition.topRight:e.right="0",e.top="0";break;case n.ScreenPosition.middleLeft:e.left="0",e.top="50%",e.transform="translateY(-50%)";break;case n.ScreenPosition.middleCenter:e.left="50%",e.top="50%",e.transform="translate(-50%, -50%)";break;case n.ScreenPosition.middleRight:e.right="0",e.top="50%",e.transform="translateY(-50%)";break;case n.ScreenPosition.bottomLeft:e.left="0",e.bottom="0";break;case n.ScreenPosition.bottomCenter:e.left="50%",e.bottom="0",e.transform="translateX(-50%)";break;case n.ScreenPosition.bottomRight:e.right="0",e.bottom="0";break}return e}),le=t.computed(()=>{const o={zIndex:(f.value??1100)-1},a=l.overlayStyle;return a?Array.isArray(a)?[{...o},...a]:typeof a=="string"?[o,a]:{...o,...a}:o}),oe=t.computed(()=>{const e={};return m.value!=null&&(e.width=`${m.value}px`),h.value!=null&&(e.height=`${h.value}px`),e}),b=t.ref(l.border),ne=t.computed(()=>b.value?"hison-border":"hison-border-none"),se=t.computed(()=>b.value?"filled":"empty"),A=()=>{y.value&&Z.acquireScrollLock(i)},V=()=>{y.value&&Z.releaseScrollLock(i)},D=async()=>{const e=v.value;!e||!d.value||(e.classList.remove(p.value),e.offsetWidth,e.classList.add(d.value))},ae=async()=>{const e=v.value;!e||!p.value||(e.classList.remove(d.value),e.offsetWidth,e.classList.add(p.value),await new Promise(o=>setTimeout(o,200)))},$=async()=>{s.value||(s.value=!0,A(),await t.nextTick(),D(),c("open",t.unref(k)))},g=async()=>{if(s.value)try{await ae()}finally{s.value=!1,V(),c("close",t.unref(k))}},ie=async()=>s.value?g():$(),re=()=>{g()},C=t.ref(l.draggable),T=t.ref(!1);let x=0,X=0,U=0,Y=0,S=null,O=null;const ue=()=>{if(r.value==null&&u.value==null){const e=w.value;if(!e)return;const o=e.getBoundingClientRect();r.value=Math.round(o.left),u.value=Math.round(o.top)}},ce=(e,o)=>{const a=w.value;if(!a)return{l:e,t:o};const q=window.innerWidth,W=window.innerHeight,pe=a.offsetWidth,fe=a.offsetHeight,me=0,he=0,ye=Math.max(0,q-pe),be=Math.max(0,W-fe);return{l:Math.min(Math.max(e,me),ye),t:Math.min(Math.max(o,he),be)}},ve=(e,o)=>{O={l:e,t:o},S==null&&(S=requestAnimationFrame(()=>{O&&(r.value=O.l,u.value=O.t,O=null),S=null}))},M=e=>{if(!T.value)return;const o=e.clientX-x,a=e.clientY-X,{l:q,t:W}=ce(U+o,Y+a);ve(q,W)},R=()=>{T.value&&(T.value=!1,document.removeEventListener("pointermove",M,!0),document.removeEventListener("pointerup",R,!0),document.body.style.userSelect="")},de=e=>{!C.value||e.target.closest(".hison-popup-close-btn")||(ue(),T.value=!0,x=e.clientX,X=e.clientY,U=r.value??0,Y=u.value??0,document.body.style.userSelect="none",document.addEventListener("pointermove",M,!0),document.addEventListener("pointerup",R,!0))},H=()=>{S!=null&&(cancelAnimationFrame(S),S=null),document.removeEventListener("pointermove",M,!0),document.removeEventListener("pointerup",R,!0),document.body.style.userSelect="",T.value=!1},k=t.ref(null),j=()=>{n.hisonCloser.component.popupList[i]&&n.hisonCloser.component.popupList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The popup ID is at risk of being duplicated. ${i}`),n.registerReloadable(z,()=>{F(),t.nextTick(j)}),I(),s.value&&(A(),t.nextTick(D)),k.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"popup",isVisible:()=>s.value,open:$,close:g,toggle:ie,setVisible:e=>e?$():g(),getZIndex:()=>f.value,setZIndex:e=>{f.value=e},getPosition:()=>L.value,setPosition:e=>{L.value=e},getLeft:()=>r.value,setLeft:e=>{r.value=e},getTop:()=>u.value,setTop:e=>{u.value=e},getWidth:()=>m.value,setWidth:e=>{m.value=e},getHeight:()=>h.value,setHeight:e=>{h.value=e},isDraggable:()=>C.value,setDraggable:e=>{C.value=e,e||H()},isOverlayShown:()=>B.value,setOverlayShown:e=>{B.value=e},isCloseClickOverlay:()=>P.value,setCloseClickOverlay:e=>{P.value=e},isScrollLocked:()=>y.value,setScrollLock:e=>{y.value=e,s.value&&(e?A():V())},isBorder:()=>b.value,setBorder:e=>{b.value=e},getAnimationClasses:()=>({enter:d.value,leave:p.value}),setAnimationClasses:e=>{"enter"in e&&(d.value=e.enter||""),"leave"in e&&(p.value=e.leave||"")},reload:()=>n.reloadHisonComponent(z)},n.hisonCloser.component.popupList[i]=k.value,c("mounted",k.value)},F=()=>{H(),n.unregisterReloadable(z),delete n.hisonCloser.component.popupList[i],s.value&&V()};return t.onMounted(j),t.onBeforeUnmount(F),t.watch(E,e=>{I(),c("responsive-change",e)}),t.watch(()=>l.visible,e=>{const o=!!e;o!==s.value&&(o?$():g())}),t.watch(()=>l.zIndex,e=>{const o=Number(e??1100);o!==f.value&&(f.value=o)}),t.watch(()=>l.position,e=>{e&&e!==L.value&&(L.value=e)}),t.watch(()=>l.left,e=>{const o=e==null?null:Number(e);o!==r.value&&(r.value=o)}),t.watch(()=>l.top,e=>{const o=e==null?null:Number(e);o!==u.value&&(u.value=o)}),t.watch(()=>l.width,e=>{const o=e==null?null:Number(e);o!==m.value&&(m.value=o)}),t.watch(()=>l.height,e=>{const o=e==null?null:Number(e);o!==h.value&&(h.value=o)}),t.watch(()=>l.draggable,e=>{const o=!!e;o!==C.value&&(C.value=o,o||H())}),t.watch(()=>l.showOverlay,e=>{const o=!!e;o!==B.value&&(B.value=o)}),t.watch(()=>l.closeClickOverlay,e=>{const o=!!e;o!==P.value&&(P.value=o)}),t.watch(()=>l.scrollLock,e=>{const o=!!e;o!==y.value&&(y.value=o,s.value&&(o?A():V()))}),t.watch(()=>l.border,e=>{const o=!!e;o!==b.value&&(b.value=o)}),t.watch(()=>l.enterAnimationClass,e=>{const o=e||"hison-popup-enter";o!==d.value&&(d.value=o)}),t.watch(()=>l.leaveAnimationClass,e=>{const o=e||"hison-popup-leave";o!==p.value&&(p.value=o)}),t.watch(()=>l.class,()=>{I()}),{id:i,props:l,popupRef:v,popupWrapperRef:w,visibleClass:K,responsiveClassList:N,childClassList:Q,borderClass:ne,wrapperStyle:te,overlayStyleWithZ:le,isOverlayVisible:_,sizeStyle:oe,closeButtonVisible:J,closeButtonBackgroundType:se,closeButtonText:"X",closeButtonTitle:"Close",draggable:C,onClickCloseButton:re,onOverlayClick:ee,onTopbarPointerDown:de,popupMethods:t.computed(()=>t.unref(k))}}}),ke={class:t.normalizeClass(["hison-popup-body"])};function we(l,c,G,i,z,E){const w=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-layer-host",l.visibleClass])},[l.isOverlayVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"hison-popup-overlay",style:t.normalizeStyle(l.overlayStyleWithZ),onClick:c[0]||(c[0]=(...v)=>l.onOverlayClick&&l.onOverlayClick(...v))},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"popupWrapperRef",class:t.normalizeClass(["hison-popup-wrapper",...l.responsiveClassList]),style:t.normalizeStyle(l.wrapperStyle)},[t.createElementVNode("div",{ref:"popupRef",class:t.normalizeClass(["hison-popup",l.borderClass]),style:t.normalizeStyle([l.sizeStyle,l.props.style]),role:"dialog"},[t.createElementVNode("div",{class:t.normalizeClass(["hison-popup-topbar",l.draggable?"hison-draggable":""]),onPointerdown:c[1]||(c[1]=(...v)=>l.onTopbarPointerDown&&l.onTopbarPointerDown(...v))},[l.closeButtonVisible?t.renderSlot(l.$slots,"close-button",{key:0,onClick:l.onClickCloseButton,text:l.closeButtonText,title:l.closeButtonTitle||"Close"},()=>[t.createVNode(w,{id:`hison_popup_close_${l.id}`,class:t.normalizeClass(["hison-popup-close-btn","hison-pos-right","hison-pos-vertical-center","hison-size-s",...l.childClassList]),text:l.closeButtonText,title:l.closeButtonTitle||"Close",border:!1,"background-type":l.closeButtonBackgroundType,onClick:l.onClickCloseButton},t.createSlots({default:t.withCtx(()=>[l.$slots["close-label"]?t.renderSlot(l.$slots,"close-label",{key:0}):t.createCommentVNode("",!0)]),_:2},[l.$slots["close-icon"]?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"close-icon")]),key:"0"}:void 0]),1032,["id","class","text","title","background-type","onClick"])]):t.createCommentVNode("",!0)],34),t.createElementVNode("div",ke,[t.renderSlot(l.$slots,"default")])],6)],6)],2)}const Le=ge._export_sfc(Se,[["render",we]]);exports.default=Le;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as Ie, ref as o, computed as d, onMounted as Re, onBeforeUnmount as Me, watch as n, unref as F, nextTick as Z, resolveComponent as Ee, createElementBlock as ne, openBlock as se, normalizeClass as B, createCommentVNode as G, createElementVNode as V, normalizeStyle as J, renderSlot as W, createVNode as He, createSlots as Ve, withCtx as ae } from "vue";
2
- import { S as We, i as c, g as De, u as qe, j as Xe, t as ie, e as xe, b as re, h as z, r as Ue, c as Ye, d as je } from "./index-Cvhi7T4w.mjs";
2
+ import { S as We, i as c, g as De, u as qe, j as Xe, t as ie, e as xe, b as re, h as z, r as Ue, c as Ye, d as je } from "./index-CGr5-mvg.mjs";
3
3
  import { a as Fe, r as Ze } from "./scrollManager-BGnq4wyt.mjs";
4
4
  import { _ as Ge } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
5
  const Je = {