hisonvue 1.1.21 → 1.1.23
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.
- package/LICENSE +21 -21
- package/README.md +260 -260
- package/dist/{HAccordion-Djhoj_2Q.mjs → HAccordion-BFl1mLFn.mjs} +2 -2
- package/dist/{HAccordion-a5UZil7t.js → HAccordion-D4VuY7dP.js} +1 -1
- package/dist/{HBaggie-CD26mD1p.js → HBaggie-B2-hUbeO.js} +1 -1
- package/dist/{HBaggie-YMHv54ny.mjs → HBaggie-Cu0cqy_0.mjs} +2 -2
- package/dist/{HBanner-DEcDBbAa.js → HBanner-Bbp_22he.js} +1 -1
- package/dist/{HBanner-Glkj36dA.mjs → HBanner-CJhgh8Av.mjs} +2 -2
- package/dist/{HButton-DlOQpSFM.mjs → HButton-BJy7qJxO.mjs} +2 -2
- package/dist/{HButton-zN47uq3g.js → HButton-CnI66WaY.js} +1 -1
- package/dist/{HCalendar-PxP8M1kE.js → HCalendar-Birc716P.js} +2 -2
- package/dist/{HCalendar-Cr2oVDTO.mjs → HCalendar-CkzhtP-a.mjs} +2 -2
- package/dist/{HCaption-BbrgZlbJ.mjs → HCaption-CvfOGjLH.mjs} +1 -1
- package/dist/{HCaption-DxOZcWcP.js → HCaption-o7zHNPFi.js} +1 -1
- package/dist/{HChart-BcslvuI8.mjs → HChart-9HpLcSAF.mjs} +1 -1
- package/dist/{HChart-D217Yxxq.js → HChart-CRNhurrL.js} +1 -1
- package/dist/HDrawer-C4C1soyr.js +1 -0
- package/dist/{HDrawer-DlMTX7M_.mjs → HDrawer-_GV5YZAt.mjs} +163 -163
- package/dist/{HDropdown-BhJOYbaN.js → HDropdown-CZOjJzGI.js} +1 -1
- package/dist/{HDropdown-CvV8k1qQ.mjs → HDropdown-rOSEF1le.mjs} +2 -2
- package/dist/{HFileset-C6dqnLa8.js → HFileset-BWdpsZxK.js} +1 -1
- package/dist/{HFileset-x00ZXjyE.mjs → HFileset-DEtMGoeG.mjs} +1 -1
- package/dist/{HGap-Do40sUXA.mjs → HGap-Bu7F233f.mjs} +1 -1
- package/dist/{HGap-BgzODoWp.js → HGap-DzddYH3m.js} +1 -1
- package/dist/{HGrid-Dp7v84g5.mjs → HGrid--_YRxc-I.mjs} +1 -1
- package/dist/{HGrid-CAU32_zq.js → HGrid-Bt_iy9Kt.js} +1 -1
- package/dist/{HImagebox-FYftlSK2.mjs → HImagebox-BOE4P4WI.mjs} +1 -1
- package/dist/{HImagebox-XTSKnoBD.js → HImagebox-BSjnoCEL.js} +1 -1
- package/dist/HInput-BPqc5Yki.js +1 -0
- package/dist/{HInput-CInEGmfe.mjs → HInput-WrTJ-7Za.mjs} +364 -451
- package/dist/HInputGroup-B9TLmdJA.mjs +320 -0
- package/dist/HInputGroup-CmYq67bE.js +1 -0
- package/dist/{HLabel-uSniKpDF.js → HLabel-BOD2RCZp.js} +1 -1
- package/dist/{HLabel-B4n5-mtx.mjs → HLabel-D5wM-IkN.mjs} +2 -2
- package/dist/{HLayout-BsPro3dN.mjs → HLayout-B5lrXA5M.mjs} +1 -1
- package/dist/{HLayout-wEq-lzHN.js → HLayout-ddBZkvt_.js} +1 -1
- package/dist/{HList-DcV0Ssb3.js → HList-CAsiBzwq.js} +1 -1
- package/dist/{HList-Dko7kLGO.mjs → HList-qvvMg1GY.mjs} +2 -2
- package/dist/{HModal-BkjH2wMJ.js → HModal-CK9wkc73.js} +1 -1
- package/dist/{HModal-D_vWZ5My.mjs → HModal-DxuxiUAp.mjs} +1 -1
- package/dist/{HNote-CbfXDxO2.mjs → HNote-8-eRuRxV.mjs} +2 -2
- package/dist/HNote-DAiqR0NK.js +1 -0
- package/dist/{HPagination-HDTloKdH.js → HPagination-D2EbHt09.js} +1 -1
- package/dist/{HPagination-Cq2OV1tY.mjs → HPagination-DSfxM1dp.mjs} +2 -2
- package/dist/{HParagraph-BUGeL78g.mjs → HParagraph-BwXjwyuQ.mjs} +1 -1
- package/dist/{HParagraph-Bg2lZxZR.js → HParagraph-CBsf7TXw.js} +1 -1
- package/dist/{HPopup-Lqxe1H-e.mjs → HPopup-CFt35psB.mjs} +1 -1
- package/dist/{HPopup-3KITyE24.js → HPopup-DF9ffRS8.js} +1 -1
- package/dist/{HSpinner-BqVl4t2n.js → HSpinner-CUBK5bDY.js} +1 -1
- package/dist/{HSpinner-VJJNUuXg.mjs → HSpinner-DYOnQbZ_.mjs} +1 -1
- package/dist/{HTable-6O4rYicc.mjs → HTable-CTqwvXER.mjs} +1 -1
- package/dist/{HTable-DzbCLDIn.js → HTable-Y-8ga-98.js} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +97 -64
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-5k-aAQlJ.js → index-B6cKtmm6.js} +3 -3
- package/dist/{index-Cvhi7T4w.mjs → index-HfC1PNxb.mjs} +5 -7
- package/dist/{setButtonCssEvent-BScAn_gY.mjs → setButtonCssEvent-DKQg_9AF.mjs} +1 -1
- package/dist/{setButtonCssEvent-BI-R9EJt.js → setButtonCssEvent-fK8lE3Ve.js} +1 -1
- package/nuxt/module.mjs +40 -40
- package/nuxt/plugin.mjs +21 -21
- package/nuxt/warn-filter.mjs +41 -41
- package/package.json +56 -56
- package/dist/HDrawer-CtMgceI2.js +0 -1
- package/dist/HInput-DxhtO9q3.js +0 -1
- package/dist/HInputGroup-Cou5-12U.mjs +0 -281
- package/dist/HInputGroup-DrjZO_7J.js +0 -1
- package/dist/HNote-DQr6iUu0.js +0 -1
|
@@ -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-
|
|
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-HfC1PNxb.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
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),c=require("./index-B6cKtmm6.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 +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-B6cKtmm6.js"),te=require("./HButton-CnI66WaY.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,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-
|
|
3
|
-
import Te from "./HButton-
|
|
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-HfC1PNxb.mjs";
|
|
3
|
+
import Te from "./HButton-BJy7qJxO.mjs";
|
|
4
4
|
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
const Ae = {
|
|
6
6
|
/**
|
|
@@ -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-
|
|
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-HfC1PNxb.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"),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-B6cKtmm6.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 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-
|
|
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-HfC1PNxb.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 = {
|
|
@@ -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-B6cKtmm6.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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-B6cKtmm6.js"),V=require("./scrollManager-CEEWQwoK.js"),A=require("./_plugin-vue_export-helper-BHFhmbuH.js"),H={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:1500},position:{type:String,default:t.ScreenPosition.middleCenter,validator:s=>t.SCREEN_POSITION_VALUES.includes(s)},overlayStyle:{type:[String,Object,Array],required:!1},timeoutMs:{type:Number,default:0},spinnerType:{type:String,default:"ring",validator:s=>["ring","dots","bars","pulse"].includes(s)}},O=e.defineComponent({name:"HSpinner",props:H,inheritAttrs:!1,emits:["mounted","responsive-change","open","close","toggle"],setup(s,{emit:o}){const l=s.id||t.getUUID(),y=`hspinner:${l}`,k=t.useDevice(),N=e.ref(null),I=e.ref(null),i=e.ref(s.visible),c=e.ref(s.zIndex??1400),m=e.ref(s.position),f=e.ref(s.overlayStyle),p=e.ref(s.timeoutMs??0),u=e.ref(s.spinnerType),B=e.computed(()=>i.value?"":"hison-display-none"),L=e.computed(()=>`hison-spinner-type-${u.value}`),h=e.ref([]),C=()=>{h.value=t.extractResponsiveClasses(t.toClassString(s.class)||"",k.value),t.addComponentNameToClass(h.value,"size",t.hisonCloser.componentStyle.size),t.addComponentNameToClass(h.value,"color","primary")},R=e.computed(()=>{const n={zIndex:c.value};switch(n.left="",n.right="",n.top="",n.bottom="",n.transform="none",m.value){case t.ScreenPosition.topLeft:n.left="5%",n.top="5%";break;case t.ScreenPosition.topCenter:n.left="50%",n.top="5%",n.transform="translateX(-50%)";break;case t.ScreenPosition.topRight:n.right="5%",n.top="5%";break;case t.ScreenPosition.middleLeft:n.left="5%",n.top="50%",n.transform="translateY(-50%)";break;case t.ScreenPosition.middleCenter:n.left="50%",n.top="50%",n.transform="translate(-50%, -50%)";break;case t.ScreenPosition.middleRight:n.right="5%",n.top="50%",n.transform="translateY(-50%)";break;case t.ScreenPosition.bottomLeft:n.left="5%",n.bottom="5%";break;case t.ScreenPosition.bottomCenter:n.left="50%",n.bottom="5%",n.transform="translateX(-50%)";break;case t.ScreenPosition.bottomRight:n.right="5%",n.bottom="5%";break}return n}),M=e.computed(()=>{const r={zIndex:(c.value??1400)-1},d=f.value;return d?Array.isArray(d)?[{...r},...d]:typeof d=="string"?[r,d]:{...r,...d}:r});let g=null;const T=()=>{g!=null&&(clearTimeout(g),g=null)},b=()=>{T(),p.value>0&&(g=window.setTimeout(()=>{v()},p.value))},w=()=>V.acquireScrollLock(l),E=()=>V.releaseScrollLock(l),S=async()=>{i.value||(i.value=!0,w(),await e.nextTick(),b(),o("open",e.unref(a)))},v=async()=>{if(i.value)try{T()}finally{i.value=!1,E(),o("close",e.unref(a))}},q=async()=>{i.value?await v():await S(),o("toggle",e.unref(a))},a=e.ref(null),z=()=>{t.hisonCloser.component.spinnerList[l]&&t.hisonCloser.component.spinnerList[l].isHisonvueComponent&&console.warn(`[Hisonvue] The spinner ID is at risk of being duplicated. ${l}`),t.registerReloadable(y,()=>{P(),e.nextTick(z)}),C(),i.value&&(w(),b()),a.value={isHisonvueComponent:!0,getId:()=>l,getType:()=>"spinner",isVisible:()=>i.value,open:S,close:v,toggle:q,setVisible:n=>n?S():v(),getZIndex:()=>c.value,setZIndex:n=>{c.value=n},getPosition:()=>m.value,setPosition:n=>{m.value=n},getTimeout:()=>p.value,setTimeout:n=>{p.value=Math.max(0,Number(n)||0),i.value&&b()},getSpinnerType:()=>u.value,setSpinnerType:n=>{u.value=n},getOverlayStyle:()=>f.value,setOverlayStyle:n=>{f.value=n},reload:()=>t.reloadHisonComponent(y)},t.hisonCloser.component.spinnerList[l]=a.value,o("mounted",a.value)},P=()=>{t.unregisterReloadable(y),delete t.hisonCloser.component.spinnerList[l],T(),i.value&&E()};return e.onMounted(z),e.onBeforeUnmount(P),e.watch(k,n=>{C(),o("responsive-change",n)}),e.watch(()=>s.visible,n=>{const r=!!n;r!==i.value&&(r?S():v())}),e.watch(()=>s.zIndex,n=>{const r=Number(n??1400);r!==c.value&&(c.value=r)}),e.watch(()=>s.position,n=>{n&&n!==m.value&&(m.value=n)}),e.watch(()=>s.overlayStyle,n=>{n!==f.value&&(f.value=n)}),e.watch(()=>s.timeoutMs,n=>{const r=Math.max(0,Number(n)||0);r!==p.value&&(p.value=r,i.value&&b())}),e.watch(()=>s.spinnerType,n=>{n&&n!==u.value&&(u.value=n)}),e.watch(()=>s.class,()=>{C()}),{id:l,props:s,wrapperRef:N,spinnerRef:I,visible:i,visibleClass:B,responsiveClassList:h,overlayStyleWithZ:M,wrapperStyle:R,spinnerType:u,spinnerTypeClass:L,spinnerMethods:e.computed(()=>e.unref(a))}}}),$={key:0,class:"hison-spinner-ring"},j={key:1,class:"hison-spinner-dots"},U={key:2,class:"hison-spinner-bars"},Z={key:3,class:"hison-spinner-pulse"};function x(s,o,l,y,k,N){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-layer-host",s.visibleClass])},[s.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hison-spinner-overlay",style:e.normalizeStyle(s.overlayStyleWithZ)},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"wrapperRef",class:e.normalizeClass(["hison-spinner-wrapper",...s.responsiveClassList]),style:e.normalizeStyle(s.wrapperStyle)},[e.createElementVNode("div",{ref:"spinnerRef",class:e.normalizeClass(["hison-spinner",s.spinnerTypeClass]),style:e.normalizeStyle(s.props.style),role:"status","aria-live":"polite","aria-busy":"true"},[e.renderSlot(s.$slots,"spinner",{spinnerEl:s.spinnerRef,spinner:s.spinnerMethods,type:s.spinnerType},()=>[s.spinnerType==="ring"?(e.openBlock(),e.createElementBlock("div",$,o[0]||(o[0]=[e.createStaticVNode('<span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span>',7)]))):s.spinnerType==="dots"?(e.openBlock(),e.createElementBlock("div",j,o[1]||(o[1]=[e.createElementVNode("span",{class:"hison-spinner-dot"},null,-1),e.createElementVNode("span",{class:"hison-spinner-dot"},null,-1),e.createElementVNode("span",{class:"hison-spinner-dot"},null,-1)]))):s.spinnerType==="bars"?(e.openBlock(),e.createElementBlock("div",U,o[2]||(o[2]=[e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1),e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1),e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1),e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1)]))):(e.openBlock(),e.createElementBlock("div",Z,o[3]||(o[3]=[e.createElementVNode("span",{class:"hison-spinner-pulse-span"},null,-1)])))])],6)],6)],2)}const D=A._export_sfc(O,[["render",x]]);exports.default=D;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Y, ref as o, computed as S, onMounted as x, onBeforeUnmount as F, watch as p, unref as R, nextTick as q, createElementBlock as y, openBlock as m, normalizeClass as A, createCommentVNode as G, createElementVNode as r, normalizeStyle as $, renderSlot as J, createStaticVNode as K } from "vue";
|
|
2
|
-
import { S as Q, i as l, g as _, u as ee, e as se, t as ne, b as B, h as C, r as te, c as ie, d as ae } from "./index-
|
|
2
|
+
import { S as Q, i as l, g as _, u as ee, e as se, t as ne, b as B, h as C, r as te, c as ie, d as ae } from "./index-HfC1PNxb.mjs";
|
|
3
3
|
import { a as oe, r as re } from "./scrollManager-BGnq4wyt.mjs";
|
|
4
4
|
import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
const pe = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Xe, ref as a, computed as s, onMounted as Ye, onBeforeUnmount as Ze, watch as r, nextTick as f, createElementBlock as P, openBlock as G, normalizeClass as O, createElementVNode as he, normalizeStyle as Je, createCommentVNode as le, renderSlot as j, createTextVNode as Qe, toDisplayString as We } from "vue";
|
|
2
|
-
import { B as xe, f as I, a1 as ae, a2 as se, T as ne, w as de, g as _e, u as et, e as tt, t as ot, b as Ce, h as N, r as rt, c as lt, d as at } from "./index-
|
|
2
|
+
import { B as xe, f as I, a1 as ae, a2 as se, T as ne, w as de, g as _e, u as et, e as tt, t as ot, b as Ce, h as N, r as rt, c as lt, d as at } from "./index-HfC1PNxb.mjs";
|
|
3
3
|
import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const nt = {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),l=require("./index-5k-aAQlJ.js"),He=require("./_plugin-vue_export-helper-BHFhmbuH.js"),qe={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},headerCellClass:{type:[String,Array,Object],required:!1},bodyCellClass:{type:[String,Array,Object],required:!1},footerCellClass:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},headerCellStyle:{type:[String,Object,Array],required:!1},bodyCellStyle:{type:[String,Object,Array],required:!1},footerCellStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},caption:{type:String,default:""},striped:{type:String,default:"row"},hoverable:{type:String,default:"row"},border:{type:Boolean,default:!1},headerBorderTop:{type:Boolean,default:!1},headerBorderBottom:{type:Boolean,default:!1},headerBorderLeft:{type:Boolean,default:!1},headerBorderRight:{type:Boolean,default:!1},bodyBorderTop:{type:Boolean,default:!1},bodyBorderBottom:{type:Boolean,default:!1},bodyBorderLeft:{type:Boolean,default:!1},bodyBorderRight:{type:Boolean,default:!1},footerBorderTop:{type:Boolean,default:!1},footerBorderBottom:{type:Boolean,default:!1},footerBorderLeft:{type:Boolean,default:!1},footerBorderRight:{type:Boolean,default:!1},headerTextAlign:{type:String,default:l.TextAlign.center,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},bodyTextAlign:{type:String,default:l.TextAlign.left,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},footerTextAlign:{type:String,default:l.TextAlign.right,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},headerVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},bodyVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},footerVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},backgroundType:{type:String,default:l.BackgroundType.empty,validator:o=>l.BACKGROUND_TYPE_VALUES.includes(o)}},$e=t.defineComponent({name:"HTable",props:qe,inheritAttrs:!1,emits:["mounted","responsive-change"],setup(o,{emit:j}){const J=t.ref(null),$=t.ref(null),s=t.ref(null),N=t.ref(null),i=o.id?o.id:l.getUUID(),U=`htable:${i}`,Q=l.useDevice(),z=t.ref(null),f=t.ref(o.visible),ae=t.computed(()=>f.value?"":"hison-display-none"),v=t.ref(o.caption||""),u=t.ref(!!o.border),c=t.ref(o.striped??"row"),d=t.ref(o.hoverable??"row"),h=t.ref(o.backgroundType||l.BackgroundType.empty),y=t.ref(!!o.headerBorderTop),B=t.ref(!!o.headerBorderBottom),g=t.ref(!!o.headerBorderLeft),b=t.ref(!!o.headerBorderRight),m=t.ref(!!o.bodyBorderTop),C=t.ref(!!o.bodyBorderBottom),A=t.ref(!!o.bodyBorderLeft),T=t.ref(!!o.bodyBorderRight),p=t.ref(!!o.footerBorderTop),S=t.ref(!!o.footerBorderBottom),L=t.ref(!!o.footerBorderLeft),w=t.ref(!!o.footerBorderRight),V=t.ref(o.headerTextAlign),R=t.ref(o.bodyTextAlign),k=t.ref(o.footerTextAlign),E=t.ref(o.headerVerticalAlign),H=t.ref(o.bodyVerticalAlign),q=t.ref(o.footerVerticalAlign),se=t.computed(()=>u.value?"hison-border":""),ne=t.computed(()=>{switch(h.value){case l.BackgroundType.empty:return"hison-bg-empty";case l.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),de=t.computed(()=>c.value==="row"?"is-striped-row":c.value==="col"?"is-striped-col":null),ie=t.computed(()=>d.value==="row"?"is-hover-row":d.value==="col"?"is-hover-col":null),ue=t.computed(()=>y.value?"hison-header-border-top":""),ce=t.computed(()=>B.value?"hison-header-border-bottom":""),fe=t.computed(()=>g.value?"hison-header-border-left":""),ve=t.computed(()=>b.value?"hison-header-border-right":""),he=t.computed(()=>m.value?"hison-body-border-top":""),ye=t.computed(()=>C.value?"hison-body-border-bottom":""),Be=t.computed(()=>A.value?"hison-body-border-left":""),ge=t.computed(()=>T.value?"hison-body-border-right":""),be=t.computed(()=>p.value?"hison-footer-border-top":""),me=t.computed(()=>S.value?"hison-footer-border-bottom":""),Ce=t.computed(()=>L.value?"hison-footer-border-left":""),Ae=t.computed(()=>w.value?"hison-footer-border-right":""),I=(e,r)=>{const a=e==="thead"?"hison-thead":e==="tbody"?"hison-tbody":"hison-tfoot";switch(r){case"center":return`${a}-ta-center`;case"right":return`${a}-ta-right`;default:return`${a}-ta-left`}},M=(e,r)=>{const a=e==="thead"?"hison-thead":e==="tbody"?"hison-tbody":"hison-tfoot";switch(r){case"top":return`${a}-valign-top`;case"bottom":return`${a}-valign-bottom`;default:return`${a}-valign-middle`}},Te=t.computed(()=>I("thead",V.value)),pe=t.computed(()=>I("tbody",R.value)),Se=t.computed(()=>I("tfoot",k.value)),Le=t.computed(()=>M("thead",E.value)),we=t.computed(()=>M("tbody",H.value)),Ve=t.computed(()=>M("tfoot",q.value)),F=t.ref([]),G=()=>{F.value=l.extractResponsiveClasses(l.toClassString(o.class)||"",Q.value),l.addComponentNameToClass(F.value,"size",l.hisonCloser.componentStyle.size),l.addComponentNameToClass(F.value,"color","primary")};let D=-1;const W=()=>{const e=s.value;e&&(e.querySelectorAll("td.is-col-hover-cell").forEach(r=>r.classList.remove("is-col-hover-cell")),D=-1)},Re=e=>{const r=s.value;r&&(W(),r.querySelectorAll("tr").forEach(a=>{const n=a.querySelectorAll("td")[e];n&&n.classList.add("is-col-hover-cell")}),D=e)},_=e=>{if(d.value!=="col")return;const r=e.target;if(!r||r.tagName!=="TD")return;const n=r.cellIndex;n!==D&&Re(n)},ee=()=>{d.value==="col"&&W()},ke=e=>e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()).replace(/^ms-/,"-ms-"),te=e=>e?typeof e=="string"?e.trim().split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(te):Object.entries(e).filter(([,r])=>!!r).map(([r])=>r):[],Ee=e=>{if(!e)return[];if(typeof e=="string"){const r={};return e.split(";").forEach(a=>{const[n,O]=a.split(":");!n||!O||(r[n.trim()]=O.trim())}),[r]}return Array.isArray(e)?e.filter(Boolean):typeof e=="object"?[e]:[]},P=(e,r)=>{const a=Ee(r);if(a.length)for(const n of a)for(const[O,Z]of Object.entries(n)){if(Z==null||Z==="")continue;const le=ke(O);e.style.getPropertyValue(le)||e.style.setProperty(le,String(Z))}},x=(e,r)=>{const a=te(r);a.length&&e.classList.add(...a)},X=()=>{const e=$.value;if(!e)return;Array.from(e.querySelectorAll("th")).forEach(a=>{x(a,o.headerCellClass),P(a,o.headerCellStyle)})},K=()=>{const e=s.value;if(!e)return;Array.from(e.querySelectorAll("td")).forEach(a=>{x(a,o.bodyCellClass),P(a,o.bodyCellStyle)})},Y=()=>{const e=N.value;if(!e)return;Array.from(e.querySelectorAll("td")).forEach(a=>{x(a,o.footerCellClass),P(a,o.footerCellStyle)})},oe=async()=>{l.hisonCloser.component.tableList[i]&&l.hisonCloser.component.tableList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The table ID is at risk of being duplicated. ${i}`),l.registerReloadable(U,()=>{re(),setTimeout(oe)}),G(),s.value&&(s.value.addEventListener("mouseover",_),s.value.addEventListener("mouseleave",ee)),await t.nextTick(),X(),K(),Y(),z.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"table",isVisible:()=>f.value,setVisible:e=>{f.value=e},isBorder:()=>u.value,setBorder:e=>{u.value=e},isHeaderBorderTop:()=>y.value,setHeaderBorderTop:e=>{y.value=e},isHeaderBorderBottom:()=>B.value,setHeaderBorderBottom:e=>{B.value=e},isHeaderBorderLeft:()=>g.value,setHeaderBorderLeft:e=>{g.value=e},isHeaderBorderRight:()=>b.value,setHeaderBorderRight:e=>{b.value=e},isBodyBorderTop:()=>m.value,setBodyBorderTop:e=>{m.value=e},isBodyBorderBottom:()=>C.value,setBodyBorderBottom:e=>{C.value=e},isBodyBorderLeft:()=>A.value,setBodyBorderLeft:e=>{A.value=e},isBodyBorderRight:()=>T.value,setBodyBorderRight:e=>{T.value=e},isFooterBorderTop:()=>p.value,setFooterBorderTop:e=>{p.value=e},isFooterBorderBottom:()=>S.value,setFooterBorderBottom:e=>{S.value=e},isFooterBorderLeft:()=>L.value,setFooterBorderLeft:e=>{L.value=e},isFooterBorderRight:()=>w.value,setFooterBorderRight:e=>{w.value=e},getStriped:()=>c.value,setStriped:e=>{c.value=e},getHoverable:()=>d.value,setHoverable:e=>{d.value=e},getCaption:()=>v.value,setCaption:e=>{v.value=e},getBackgroundType:()=>h.value,setBackgroundType:e=>{h.value=e},getHeaderTextAlign:()=>V.value,setHeaderTextAlign:e=>{V.value=e},getBodyTextAlign:()=>R.value,setBodyTextAlign:e=>{R.value=e},getFooterTextAlign:()=>k.value,setFooterTextAlign:e=>{k.value=e},getHeaderVerticalAlign:()=>E.value,setHeaderVerticalAlign:e=>{E.value=e},getBodyVerticalAlign:()=>H.value,setBodyVerticalAlign:e=>{H.value=e},getFooterVerticalAlign:()=>q.value,setFooterVerticalAlign:e=>{q.value=e},getRowCount:()=>{const e=s.value;return e?e.querySelectorAll(":scope > tr").length:0},getRowElement:e=>{const r=s.value;if(!r||!Number.isInteger(e)||e<0)return null;const a=r.querySelectorAll(":scope > tr");return e>=a.length?null:a[e]},getHeadElement:()=>$.value,getBodyElement:()=>s.value,getFootElement:()=>N.value,reload:()=>l.reloadHisonComponent(U)},l.hisonCloser.component.tableList[i]=z.value,j("mounted",z.value)},re=()=>{s.value&&(s.value.removeEventListener("mouseover",_),s.value.removeEventListener("mouseleave",ee)),l.unregisterReloadable(U),delete l.hisonCloser.component.tableList[i]};return t.onMounted(oe),t.onBeforeUnmount(re),t.watch(Q,e=>{G(),j("responsive-change",e)}),t.watch(()=>o.visible,e=>{const r=!!e;r!==f.value&&(f.value=r)}),t.watch(()=>o.caption,e=>{const r=e??"";r!==v.value&&(v.value=r)}),t.watch(()=>o.border,e=>{const r=!!e;r!==u.value&&(u.value=r)}),t.watch(()=>o.backgroundType,e=>{e&&e!==h.value&&(h.value=e)}),t.watch(()=>o.striped,e=>{const r=e??"row";r!==c.value&&(c.value=r)}),t.watch(()=>o.hoverable,e=>{const r=e??"row";r!==d.value&&(d.value=r)}),t.watch(()=>o.headerBorderTop,e=>{const r=!!e;r!==y.value&&(y.value=r)}),t.watch(()=>o.headerBorderBottom,e=>{const r=!!e;r!==B.value&&(B.value=r)}),t.watch(()=>o.headerBorderLeft,e=>{const r=!!e;r!==g.value&&(g.value=r)}),t.watch(()=>o.headerBorderRight,e=>{const r=!!e;r!==b.value&&(b.value=r)}),t.watch(()=>o.bodyBorderTop,e=>{const r=!!e;r!==m.value&&(m.value=r)}),t.watch(()=>o.bodyBorderBottom,e=>{const r=!!e;r!==C.value&&(C.value=r)}),t.watch(()=>o.bodyBorderLeft,e=>{const r=!!e;r!==A.value&&(A.value=r)}),t.watch(()=>o.bodyBorderRight,e=>{const r=!!e;r!==T.value&&(T.value=r)}),t.watch(()=>o.footerBorderTop,e=>{const r=!!e;r!==p.value&&(p.value=r)}),t.watch(()=>o.footerBorderBottom,e=>{const r=!!e;r!==S.value&&(S.value=r)}),t.watch(()=>o.footerBorderLeft,e=>{const r=!!e;r!==L.value&&(L.value=r)}),t.watch(()=>o.footerBorderRight,e=>{const r=!!e;r!==w.value&&(w.value=r)}),t.watch(()=>o.headerTextAlign,e=>{e&&e!==V.value&&(V.value=e)}),t.watch(()=>o.bodyTextAlign,e=>{e&&e!==R.value&&(R.value=e)}),t.watch(()=>o.footerTextAlign,e=>{e&&e!==k.value&&(k.value=e)}),t.watch(()=>o.headerVerticalAlign,e=>{e&&e!==E.value&&(E.value=e)}),t.watch(()=>o.bodyVerticalAlign,e=>{e&&e!==H.value&&(H.value=e)}),t.watch(()=>o.footerVerticalAlign,e=>{e&&e!==q.value&&(q.value=e)}),t.watch(()=>o.headerCellClass,()=>t.nextTick(X)),t.watch(()=>o.headerCellStyle,()=>t.nextTick(X)),t.watch(()=>o.bodyCellClass,()=>t.nextTick(K)),t.watch(()=>o.bodyCellStyle,()=>t.nextTick(K)),t.watch(()=>o.footerCellClass,()=>t.nextTick(Y)),t.watch(()=>o.footerCellStyle,()=>t.nextTick(Y)),t.watch(()=>o.class,()=>{G()}),{props:o,tableRef:J,theadRef:$,tbodyRef:s,tfootRef:N,visibleClass:ae,stripedClass:de,hoverableClass:ie,caption:v,border:u,borderClass:se,tableBackgroundTypeClass:ne,responsiveClassList:F,headerBorderTopClass:ue,bodyBorderTopClass:he,footerBorderTopClass:be,headerBorderBottomClass:ce,bodyBorderBottomClass:ye,footerBorderBottomClass:me,headerBorderLeftClass:fe,bodyBorderLeftClass:Be,footerBorderLeftClass:Ce,headerBorderRightClass:ve,bodyBorderRightClass:ge,footerBorderRightClass:Ae,headerTextAlignClass:Te,bodyTextAlignClass:pe,footerTextAlignClass:Se,headerVAlignClass:Le,bodyVAlignClass:we,footerVAlignClass:Ve}}}),Ne={key:0,class:"hison-table-caption"};function Fe(o,j,J,$,s,N){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...o.responsiveClassList,o.visibleClass])},[t.createElementVNode("table",{ref:"tableRef",class:t.normalizeClass(["hison-table",o.borderClass,o.tableBackgroundTypeClass,o.stripedClass,o.hoverableClass]),style:t.normalizeStyle(o.props.style)},[o.$slots.caption||o.caption?(t.openBlock(),t.createElementBlock("caption",Ne,[t.renderSlot(o.$slots,"caption",{},()=>[t.createTextVNode(t.toDisplayString(o.caption),1)])])):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"colgroup"),o.$slots.thead?(t.openBlock(),t.createElementBlock("thead",{key:1,ref:"theadRef",class:t.normalizeClass([o.headerBorderTopClass,o.headerBorderBottomClass,o.headerBorderLeftClass,o.headerBorderRightClass,o.headerTextAlignClass,o.headerVAlignClass])},[t.renderSlot(o.$slots,"thead")],2)):t.createCommentVNode("",!0),t.createElementVNode("tbody",{ref:"tbodyRef",class:t.normalizeClass([o.bodyBorderTopClass,o.bodyBorderBottomClass,o.bodyBorderLeftClass,o.bodyBorderRightClass,o.bodyTextAlignClass,o.bodyVAlignClass])},[t.renderSlot(o.$slots,"default")],2),o.$slots.tfoot?(t.openBlock(),t.createElementBlock("tfoot",{key:2,ref:"tfootRef",class:t.normalizeClass([o.footerBorderTopClass,o.footerBorderBottomClass,o.footerBorderLeftClass,o.footerBorderRightClass,o.footerTextAlignClass,o.footerVAlignClass])},[t.renderSlot(o.$slots,"tfoot")],2)):t.createCommentVNode("",!0)],6)],2)}const Oe=He._export_sfc($e,[["render",Fe]]);exports.default=Oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),l=require("./index-B6cKtmm6.js"),He=require("./_plugin-vue_export-helper-BHFhmbuH.js"),qe={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},headerCellClass:{type:[String,Array,Object],required:!1},bodyCellClass:{type:[String,Array,Object],required:!1},footerCellClass:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},headerCellStyle:{type:[String,Object,Array],required:!1},bodyCellStyle:{type:[String,Object,Array],required:!1},footerCellStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},caption:{type:String,default:""},striped:{type:String,default:"row"},hoverable:{type:String,default:"row"},border:{type:Boolean,default:!1},headerBorderTop:{type:Boolean,default:!1},headerBorderBottom:{type:Boolean,default:!1},headerBorderLeft:{type:Boolean,default:!1},headerBorderRight:{type:Boolean,default:!1},bodyBorderTop:{type:Boolean,default:!1},bodyBorderBottom:{type:Boolean,default:!1},bodyBorderLeft:{type:Boolean,default:!1},bodyBorderRight:{type:Boolean,default:!1},footerBorderTop:{type:Boolean,default:!1},footerBorderBottom:{type:Boolean,default:!1},footerBorderLeft:{type:Boolean,default:!1},footerBorderRight:{type:Boolean,default:!1},headerTextAlign:{type:String,default:l.TextAlign.center,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},bodyTextAlign:{type:String,default:l.TextAlign.left,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},footerTextAlign:{type:String,default:l.TextAlign.right,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},headerVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},bodyVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},footerVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},backgroundType:{type:String,default:l.BackgroundType.empty,validator:o=>l.BACKGROUND_TYPE_VALUES.includes(o)}},$e=t.defineComponent({name:"HTable",props:qe,inheritAttrs:!1,emits:["mounted","responsive-change"],setup(o,{emit:j}){const J=t.ref(null),$=t.ref(null),s=t.ref(null),N=t.ref(null),i=o.id?o.id:l.getUUID(),U=`htable:${i}`,Q=l.useDevice(),z=t.ref(null),f=t.ref(o.visible),ae=t.computed(()=>f.value?"":"hison-display-none"),v=t.ref(o.caption||""),u=t.ref(!!o.border),c=t.ref(o.striped??"row"),d=t.ref(o.hoverable??"row"),h=t.ref(o.backgroundType||l.BackgroundType.empty),y=t.ref(!!o.headerBorderTop),B=t.ref(!!o.headerBorderBottom),g=t.ref(!!o.headerBorderLeft),b=t.ref(!!o.headerBorderRight),m=t.ref(!!o.bodyBorderTop),C=t.ref(!!o.bodyBorderBottom),A=t.ref(!!o.bodyBorderLeft),T=t.ref(!!o.bodyBorderRight),p=t.ref(!!o.footerBorderTop),S=t.ref(!!o.footerBorderBottom),L=t.ref(!!o.footerBorderLeft),w=t.ref(!!o.footerBorderRight),V=t.ref(o.headerTextAlign),R=t.ref(o.bodyTextAlign),k=t.ref(o.footerTextAlign),E=t.ref(o.headerVerticalAlign),H=t.ref(o.bodyVerticalAlign),q=t.ref(o.footerVerticalAlign),se=t.computed(()=>u.value?"hison-border":""),ne=t.computed(()=>{switch(h.value){case l.BackgroundType.empty:return"hison-bg-empty";case l.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),de=t.computed(()=>c.value==="row"?"is-striped-row":c.value==="col"?"is-striped-col":null),ie=t.computed(()=>d.value==="row"?"is-hover-row":d.value==="col"?"is-hover-col":null),ue=t.computed(()=>y.value?"hison-header-border-top":""),ce=t.computed(()=>B.value?"hison-header-border-bottom":""),fe=t.computed(()=>g.value?"hison-header-border-left":""),ve=t.computed(()=>b.value?"hison-header-border-right":""),he=t.computed(()=>m.value?"hison-body-border-top":""),ye=t.computed(()=>C.value?"hison-body-border-bottom":""),Be=t.computed(()=>A.value?"hison-body-border-left":""),ge=t.computed(()=>T.value?"hison-body-border-right":""),be=t.computed(()=>p.value?"hison-footer-border-top":""),me=t.computed(()=>S.value?"hison-footer-border-bottom":""),Ce=t.computed(()=>L.value?"hison-footer-border-left":""),Ae=t.computed(()=>w.value?"hison-footer-border-right":""),I=(e,r)=>{const a=e==="thead"?"hison-thead":e==="tbody"?"hison-tbody":"hison-tfoot";switch(r){case"center":return`${a}-ta-center`;case"right":return`${a}-ta-right`;default:return`${a}-ta-left`}},M=(e,r)=>{const a=e==="thead"?"hison-thead":e==="tbody"?"hison-tbody":"hison-tfoot";switch(r){case"top":return`${a}-valign-top`;case"bottom":return`${a}-valign-bottom`;default:return`${a}-valign-middle`}},Te=t.computed(()=>I("thead",V.value)),pe=t.computed(()=>I("tbody",R.value)),Se=t.computed(()=>I("tfoot",k.value)),Le=t.computed(()=>M("thead",E.value)),we=t.computed(()=>M("tbody",H.value)),Ve=t.computed(()=>M("tfoot",q.value)),F=t.ref([]),G=()=>{F.value=l.extractResponsiveClasses(l.toClassString(o.class)||"",Q.value),l.addComponentNameToClass(F.value,"size",l.hisonCloser.componentStyle.size),l.addComponentNameToClass(F.value,"color","primary")};let D=-1;const W=()=>{const e=s.value;e&&(e.querySelectorAll("td.is-col-hover-cell").forEach(r=>r.classList.remove("is-col-hover-cell")),D=-1)},Re=e=>{const r=s.value;r&&(W(),r.querySelectorAll("tr").forEach(a=>{const n=a.querySelectorAll("td")[e];n&&n.classList.add("is-col-hover-cell")}),D=e)},_=e=>{if(d.value!=="col")return;const r=e.target;if(!r||r.tagName!=="TD")return;const n=r.cellIndex;n!==D&&Re(n)},ee=()=>{d.value==="col"&&W()},ke=e=>e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()).replace(/^ms-/,"-ms-"),te=e=>e?typeof e=="string"?e.trim().split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(te):Object.entries(e).filter(([,r])=>!!r).map(([r])=>r):[],Ee=e=>{if(!e)return[];if(typeof e=="string"){const r={};return e.split(";").forEach(a=>{const[n,O]=a.split(":");!n||!O||(r[n.trim()]=O.trim())}),[r]}return Array.isArray(e)?e.filter(Boolean):typeof e=="object"?[e]:[]},P=(e,r)=>{const a=Ee(r);if(a.length)for(const n of a)for(const[O,Z]of Object.entries(n)){if(Z==null||Z==="")continue;const le=ke(O);e.style.getPropertyValue(le)||e.style.setProperty(le,String(Z))}},x=(e,r)=>{const a=te(r);a.length&&e.classList.add(...a)},X=()=>{const e=$.value;if(!e)return;Array.from(e.querySelectorAll("th")).forEach(a=>{x(a,o.headerCellClass),P(a,o.headerCellStyle)})},K=()=>{const e=s.value;if(!e)return;Array.from(e.querySelectorAll("td")).forEach(a=>{x(a,o.bodyCellClass),P(a,o.bodyCellStyle)})},Y=()=>{const e=N.value;if(!e)return;Array.from(e.querySelectorAll("td")).forEach(a=>{x(a,o.footerCellClass),P(a,o.footerCellStyle)})},oe=async()=>{l.hisonCloser.component.tableList[i]&&l.hisonCloser.component.tableList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The table ID is at risk of being duplicated. ${i}`),l.registerReloadable(U,()=>{re(),setTimeout(oe)}),G(),s.value&&(s.value.addEventListener("mouseover",_),s.value.addEventListener("mouseleave",ee)),await t.nextTick(),X(),K(),Y(),z.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"table",isVisible:()=>f.value,setVisible:e=>{f.value=e},isBorder:()=>u.value,setBorder:e=>{u.value=e},isHeaderBorderTop:()=>y.value,setHeaderBorderTop:e=>{y.value=e},isHeaderBorderBottom:()=>B.value,setHeaderBorderBottom:e=>{B.value=e},isHeaderBorderLeft:()=>g.value,setHeaderBorderLeft:e=>{g.value=e},isHeaderBorderRight:()=>b.value,setHeaderBorderRight:e=>{b.value=e},isBodyBorderTop:()=>m.value,setBodyBorderTop:e=>{m.value=e},isBodyBorderBottom:()=>C.value,setBodyBorderBottom:e=>{C.value=e},isBodyBorderLeft:()=>A.value,setBodyBorderLeft:e=>{A.value=e},isBodyBorderRight:()=>T.value,setBodyBorderRight:e=>{T.value=e},isFooterBorderTop:()=>p.value,setFooterBorderTop:e=>{p.value=e},isFooterBorderBottom:()=>S.value,setFooterBorderBottom:e=>{S.value=e},isFooterBorderLeft:()=>L.value,setFooterBorderLeft:e=>{L.value=e},isFooterBorderRight:()=>w.value,setFooterBorderRight:e=>{w.value=e},getStriped:()=>c.value,setStriped:e=>{c.value=e},getHoverable:()=>d.value,setHoverable:e=>{d.value=e},getCaption:()=>v.value,setCaption:e=>{v.value=e},getBackgroundType:()=>h.value,setBackgroundType:e=>{h.value=e},getHeaderTextAlign:()=>V.value,setHeaderTextAlign:e=>{V.value=e},getBodyTextAlign:()=>R.value,setBodyTextAlign:e=>{R.value=e},getFooterTextAlign:()=>k.value,setFooterTextAlign:e=>{k.value=e},getHeaderVerticalAlign:()=>E.value,setHeaderVerticalAlign:e=>{E.value=e},getBodyVerticalAlign:()=>H.value,setBodyVerticalAlign:e=>{H.value=e},getFooterVerticalAlign:()=>q.value,setFooterVerticalAlign:e=>{q.value=e},getRowCount:()=>{const e=s.value;return e?e.querySelectorAll(":scope > tr").length:0},getRowElement:e=>{const r=s.value;if(!r||!Number.isInteger(e)||e<0)return null;const a=r.querySelectorAll(":scope > tr");return e>=a.length?null:a[e]},getHeadElement:()=>$.value,getBodyElement:()=>s.value,getFootElement:()=>N.value,reload:()=>l.reloadHisonComponent(U)},l.hisonCloser.component.tableList[i]=z.value,j("mounted",z.value)},re=()=>{s.value&&(s.value.removeEventListener("mouseover",_),s.value.removeEventListener("mouseleave",ee)),l.unregisterReloadable(U),delete l.hisonCloser.component.tableList[i]};return t.onMounted(oe),t.onBeforeUnmount(re),t.watch(Q,e=>{G(),j("responsive-change",e)}),t.watch(()=>o.visible,e=>{const r=!!e;r!==f.value&&(f.value=r)}),t.watch(()=>o.caption,e=>{const r=e??"";r!==v.value&&(v.value=r)}),t.watch(()=>o.border,e=>{const r=!!e;r!==u.value&&(u.value=r)}),t.watch(()=>o.backgroundType,e=>{e&&e!==h.value&&(h.value=e)}),t.watch(()=>o.striped,e=>{const r=e??"row";r!==c.value&&(c.value=r)}),t.watch(()=>o.hoverable,e=>{const r=e??"row";r!==d.value&&(d.value=r)}),t.watch(()=>o.headerBorderTop,e=>{const r=!!e;r!==y.value&&(y.value=r)}),t.watch(()=>o.headerBorderBottom,e=>{const r=!!e;r!==B.value&&(B.value=r)}),t.watch(()=>o.headerBorderLeft,e=>{const r=!!e;r!==g.value&&(g.value=r)}),t.watch(()=>o.headerBorderRight,e=>{const r=!!e;r!==b.value&&(b.value=r)}),t.watch(()=>o.bodyBorderTop,e=>{const r=!!e;r!==m.value&&(m.value=r)}),t.watch(()=>o.bodyBorderBottom,e=>{const r=!!e;r!==C.value&&(C.value=r)}),t.watch(()=>o.bodyBorderLeft,e=>{const r=!!e;r!==A.value&&(A.value=r)}),t.watch(()=>o.bodyBorderRight,e=>{const r=!!e;r!==T.value&&(T.value=r)}),t.watch(()=>o.footerBorderTop,e=>{const r=!!e;r!==p.value&&(p.value=r)}),t.watch(()=>o.footerBorderBottom,e=>{const r=!!e;r!==S.value&&(S.value=r)}),t.watch(()=>o.footerBorderLeft,e=>{const r=!!e;r!==L.value&&(L.value=r)}),t.watch(()=>o.footerBorderRight,e=>{const r=!!e;r!==w.value&&(w.value=r)}),t.watch(()=>o.headerTextAlign,e=>{e&&e!==V.value&&(V.value=e)}),t.watch(()=>o.bodyTextAlign,e=>{e&&e!==R.value&&(R.value=e)}),t.watch(()=>o.footerTextAlign,e=>{e&&e!==k.value&&(k.value=e)}),t.watch(()=>o.headerVerticalAlign,e=>{e&&e!==E.value&&(E.value=e)}),t.watch(()=>o.bodyVerticalAlign,e=>{e&&e!==H.value&&(H.value=e)}),t.watch(()=>o.footerVerticalAlign,e=>{e&&e!==q.value&&(q.value=e)}),t.watch(()=>o.headerCellClass,()=>t.nextTick(X)),t.watch(()=>o.headerCellStyle,()=>t.nextTick(X)),t.watch(()=>o.bodyCellClass,()=>t.nextTick(K)),t.watch(()=>o.bodyCellStyle,()=>t.nextTick(K)),t.watch(()=>o.footerCellClass,()=>t.nextTick(Y)),t.watch(()=>o.footerCellStyle,()=>t.nextTick(Y)),t.watch(()=>o.class,()=>{G()}),{props:o,tableRef:J,theadRef:$,tbodyRef:s,tfootRef:N,visibleClass:ae,stripedClass:de,hoverableClass:ie,caption:v,border:u,borderClass:se,tableBackgroundTypeClass:ne,responsiveClassList:F,headerBorderTopClass:ue,bodyBorderTopClass:he,footerBorderTopClass:be,headerBorderBottomClass:ce,bodyBorderBottomClass:ye,footerBorderBottomClass:me,headerBorderLeftClass:fe,bodyBorderLeftClass:Be,footerBorderLeftClass:Ce,headerBorderRightClass:ve,bodyBorderRightClass:ge,footerBorderRightClass:Ae,headerTextAlignClass:Te,bodyTextAlignClass:pe,footerTextAlignClass:Se,headerVAlignClass:Le,bodyVAlignClass:we,footerVAlignClass:Ve}}}),Ne={key:0,class:"hison-table-caption"};function Fe(o,j,J,$,s,N){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...o.responsiveClassList,o.visibleClass])},[t.createElementVNode("table",{ref:"tableRef",class:t.normalizeClass(["hison-table",o.borderClass,o.tableBackgroundTypeClass,o.stripedClass,o.hoverableClass]),style:t.normalizeStyle(o.props.style)},[o.$slots.caption||o.caption?(t.openBlock(),t.createElementBlock("caption",Ne,[t.renderSlot(o.$slots,"caption",{},()=>[t.createTextVNode(t.toDisplayString(o.caption),1)])])):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"colgroup"),o.$slots.thead?(t.openBlock(),t.createElementBlock("thead",{key:1,ref:"theadRef",class:t.normalizeClass([o.headerBorderTopClass,o.headerBorderBottomClass,o.headerBorderLeftClass,o.headerBorderRightClass,o.headerTextAlignClass,o.headerVAlignClass])},[t.renderSlot(o.$slots,"thead")],2)):t.createCommentVNode("",!0),t.createElementVNode("tbody",{ref:"tbodyRef",class:t.normalizeClass([o.bodyBorderTopClass,o.bodyBorderBottomClass,o.bodyBorderLeftClass,o.bodyBorderRightClass,o.bodyTextAlignClass,o.bodyVAlignClass])},[t.renderSlot(o.$slots,"default")],2),o.$slots.tfoot?(t.openBlock(),t.createElementBlock("tfoot",{key:2,ref:"tfootRef",class:t.normalizeClass([o.footerBorderTopClass,o.footerBorderBottomClass,o.footerBorderLeftClass,o.footerBorderRightClass,o.footerTextAlignClass,o.footerVAlignClass])},[t.renderSlot(o.$slots,"tfoot")],2)):t.createCommentVNode("",!0)],6)],2)}const Oe=He._export_sfc($e,[["render",Fe]]);exports.default=Oe;
|
package/dist/hisonvue.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B6cKtmm6.js");exports.BACKGROUND_TYPE_VALUES=e.BACKGROUND_TYPE_VALUES;exports.BACK_IMAGE_ALIGN_VALUES=e.BACK_IMAGE_ALIGN_VALUES;exports.BACK_IMAGE_STYLE_VALUES=e.BACK_IMAGE_STYLE_VALUES;exports.BACK_IMAGE_VERTICAL_ALIGN_VALUES=e.BACK_IMAGE_VERTICAL_ALIGN_VALUES;exports.BackImageAlign=e.BackImageAlign;exports.BackImageRepeat=e.BackImageRepeat;exports.BackImageVerticalAlign=e.BackImageVerticalAlign;exports.BackgroundType=e.BackgroundType;exports.COLOR_SET_VALUES=e.COLOR_SET_VALUES;exports.CSS_VAR_RE=e.CSS_VAR_RE;exports.Color=e.Color;exports.DATA_STATUS_VALUES=e.DATA_STATUS_VALUES;exports.DROPDOWN_TRIGGER_VALUES=e.DROPDOWN_TRIGGER_VALUES;exports.DataStatus=e.DataStatus;exports.DayOfWeek=e.DayOfWeek;exports.DropdownTrigger=e.DropdownTrigger;exports.EDIT_MODE_VALUES=e.EDIT_MODE_VALUES;exports.EditMode=e.EditMode;exports.GRID_ALIGN_VALUES=e.GRID_ALIGN_VALUES;exports.GRID_DATE_FORMAT_VALUES=e.GRID_DATE_FORMAT_VALUES;exports.GRID_MONTH_FORMAT_VALUES=e.GRID_MONTH_FORMAT_VALUES;exports.GRID_VERTICAL_ALIGN_VALUES=e.GRID_VERTICAL_ALIGN_VALUES;exports.HAccordionClientOnly=e.HAccordionClientOnly;exports.HBaggieClientOnly=e.HBaggieClientOnly;exports.HBannerClientOnly=e.HBannerClientOnly;exports.HButtonClientOnly=e.HButtonClientOnly;exports.HCalendarClientOnly=e.HCalendarClientOnly;exports.HCalendarTimeFormat=e.HCalendarTimeFormat;exports.HCalendarView=e.HCalendarView;exports.HCaptionClientOnly=e.HCaptionClientOnly;exports.HChartClientOnly=e.HChartClientOnly;exports.HDrawerClientOnly=e.HDrawerClientOnly;exports.HDropdownClientOnly=e.HDropdownClientOnly;exports.HEX_COLOR_RE=e.HEX_COLOR_RE;exports.HFilesetClientOnly=e.HFilesetClientOnly;exports.HGapClientOnly=e.HGapClientOnly;exports.HGapLine=e.HGapLine;exports.HGapLineStyle=e.HGapLineStyle;exports.HGridClientOnly=e.HGridClientOnly;exports.HImageboxClientOnly=e.HImageboxClientOnly;exports.HInputClientOnly=e.HInputClientOnly;exports.HInputGroupClientOnly=e.HInputGroupClientOnly;exports.HLabelClientOnly=e.HLabelClientOnly;exports.HLayoutClientOnly=e.HLayoutClientOnly;exports.HListClientOnly=e.HListClientOnly;exports.HModalClientOnly=e.HModalClientOnly;exports.HNoteClientOnly=e.HNoteClientOnly;exports.HPaginationClientOnly=e.HPaginationClientOnly;exports.HParagraphClientOnly=e.HParagraphClientOnly;exports.HPopupClientOnly=e.HPopupClientOnly;exports.HSpinnerClientOnly=e.HSpinnerClientOnly;exports.HTableClientOnly=e.HTableClientOnly;exports.H_CALENDAR_TIME_FORMAT_VALUES=e.H_CALENDAR_TIME_FORMAT_VALUES;exports.H_CALENDAR_VIEW_VALUES=e.H_CALENDAR_VIEW_VALUES;exports.H_GAP_LINE_STYLE_VALUES=e.H_GAP_LINE_STYLE_VALUES;exports.H_GAP_RULE_VALUES=e.H_GAP_RULE_VALUES;exports.INPUT_TYPE_VALUES=e.INPUT_TYPE_VALUES;exports.InputType=e.InputType;exports.MODAL_PLACEMENT_VALUES=e.MODAL_PLACEMENT_VALUES;exports.ModalPlacement=e.ModalPlacement;exports.NOTE_MODE_BY_DEVICE_VALUES=e.NOTE_MODE_BY_DEVICE_VALUES;exports.SCREEN_POSITION_VALUES=e.SCREEN_POSITION_VALUES;exports.SELECTION_POLICY_VALUES=e.SELECTION_POLICY_VALUES;exports.SPINNER_TYPE_VALUES=e.SPINNER_TYPE_VALUES;exports.ScreenPosition=e.ScreenPosition;exports.Size=e.Size;exports.SpinnerType=e.SpinnerType;exports.TEXT_ALIGN_VALUES=e.TEXT_ALIGN_VALUES;exports.TOOL_POSITION_VALUES=e.TOOL_POSITION_VALUES;exports.TextAlign=e.TextAlign;exports.VERTICAL_ALIGN_VALUES=e.VERTICAL_ALIGN_VALUES;exports.VerticalAlign=e.VerticalAlign;exports.WHITE_SPACE_VALUES=e.WHITE_SPACE_VALUES;exports.WhiteSpace=e.WhiteSpace;exports.getDefaultHisonConfig=e.getDefaultHisonConfig;exports.hison=e.hison;exports.hisonvue=e.hisonvue;exports.isCssColorLike=e.isCssColorLike;exports.AllDateTimeFormat=e.Hisonjs_bundleExports.AllDateTimeFormat;exports.ApiDelete=e.Hisonjs_bundleExports.ApiDelete;exports.ApiDeleteUrl=e.Hisonjs_bundleExports.ApiDeleteUrl;exports.ApiGet=e.Hisonjs_bundleExports.ApiGet;exports.ApiGetUrl=e.Hisonjs_bundleExports.ApiGetUrl;exports.ApiPatch=e.Hisonjs_bundleExports.ApiPatch;exports.ApiPatchUrl=e.Hisonjs_bundleExports.ApiPatchUrl;exports.ApiPost=e.Hisonjs_bundleExports.ApiPost;exports.ApiPostUrl=e.Hisonjs_bundleExports.ApiPostUrl;exports.ApiPut=e.Hisonjs_bundleExports.ApiPut;exports.ApiPutUrl=e.Hisonjs_bundleExports.ApiPutUrl;exports.CachingModule=e.Hisonjs_bundleExports.CachingModule;exports.ColorSet=e.Vanillagrid2_bundleExports.ColorSet;exports.CountDateType=e.Hisonjs_bundleExports.CountDateType;exports.DataModel=e.Hisonjs_bundleExports.DataModel;exports.DataWrapper=e.Hisonjs_bundleExports.DataWrapper;exports.DateFormat=e.Hisonjs_bundleExports.DateFormat;exports.DateTimeFormat=e.Hisonjs_bundleExports.DateTimeFormat;exports.DayFormat=e.Hisonjs_bundleExports.DayFormat;exports.DayOfWeekFormat=e.Hisonjs_bundleExports.DayOfWeekFormat;exports.DayOfWeekFullName=e.Hisonjs_bundleExports.DayOfWeekFullName;exports.DayOfWeekFullNameKR=e.Hisonjs_bundleExports.DayOfWeekFullNameKR;exports.DayOfWeekShortName=e.Hisonjs_bundleExports.DayOfWeekShortName;exports.DayOfWeekShortNameKR=e.Hisonjs_bundleExports.DayOfWeekShortNameKR;exports.GridAlign=e.Vanillagrid2_bundleExports.Align;exports.GridBasicDataType=e.Vanillagrid2_bundleExports.BasicDataType;exports.GridDateFormat=e.Vanillagrid2_bundleExports.DateFormat;exports.GridMonthFormat=e.Vanillagrid2_bundleExports.MonthFormat;exports.GridRowStatus=e.Vanillagrid2_bundleExports.RowStatus;exports.GridVerticalAlign=e.Vanillagrid2_bundleExports.VerticalAlign;exports.HourFormat=e.Hisonjs_bundleExports.HourFormat;exports.HourMinuteFormat=e.Hisonjs_bundleExports.HourMinuteFormat;exports.MinuteFormat=e.Hisonjs_bundleExports.MinuteFormat;exports.MonthFormat=e.Hisonjs_bundleExports.MonthFormat;exports.MonthFullName=e.Hisonjs_bundleExports.MonthFullName;exports.MonthShortName=e.Hisonjs_bundleExports.MonthShortName;exports.NoteModeByDevice=e.Vanillanote2_bundleExports.NoteModeByDevice;exports.NoteToolPosition=e.Vanillanote2_bundleExports.ToolPosition;exports.SecondFormat=e.Hisonjs_bundleExports.SecondFormat;exports.SelectionPolicy=e.Vanillagrid2_bundleExports.SelectionPolicy;exports.TimeFormat=e.Hisonjs_bundleExports.TimeFormat;exports.YearFormat=e.Hisonjs_bundleExports.YearFormat;exports.YearMonthFormat=e.Hisonjs_bundleExports.YearMonthFormat;exports.createHison=e.Hisonjs_bundleExports.createHison;exports.getVanillagrid=e.Vanillagrid2_bundleExports.getVanillagrid;exports.getVanillagridConfig=e.Vanillagrid2_bundleExports.getVanillagridConfig;exports.getVanillanote=e.Vanillanote2_bundleExports.getVanillanote;exports.getVanillanoteConfig=e.Vanillanote2_bundleExports.getVanillanoteConfig;
|