hisonvue 1.1.21 → 1.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{HAccordion-a5UZil7t.js → HAccordion-CKbaRrfY.js} +1 -1
- package/dist/{HAccordion-Djhoj_2Q.mjs → HAccordion-CNWAodMp.mjs} +2 -2
- package/dist/{HBaggie-CD26mD1p.js → HBaggie-BQYZO1MF.js} +1 -1
- package/dist/{HBaggie-YMHv54ny.mjs → HBaggie-C-OS7n2D.mjs} +2 -2
- package/dist/{HBanner-DEcDBbAa.js → HBanner-8AQVAGPP.js} +1 -1
- package/dist/{HBanner-Glkj36dA.mjs → HBanner-D0ImN6h1.mjs} +2 -2
- package/dist/{HButton-zN47uq3g.js → HButton-C1AtcoQd.js} +1 -1
- package/dist/{HButton-DlOQpSFM.mjs → HButton-CuoH95_k.mjs} +2 -2
- package/dist/{HCalendar-Cr2oVDTO.mjs → HCalendar-CnuUn3Xk.mjs} +1 -1
- package/dist/{HCalendar-PxP8M1kE.js → HCalendar-DFXWXkci.js} +1 -1
- package/dist/{HCaption-DxOZcWcP.js → HCaption-BaelSNHR.js} +1 -1
- package/dist/{HCaption-BbrgZlbJ.mjs → HCaption-Di8ePmqg.mjs} +1 -1
- package/dist/{HChart-D217Yxxq.js → HChart-DKfoM5dM.js} +1 -1
- package/dist/{HChart-BcslvuI8.mjs → HChart-xM2KDiJi.mjs} +1 -1
- package/dist/HDrawer-A3BpOuup.js +1 -0
- package/dist/{HDrawer-DlMTX7M_.mjs → HDrawer-Vt4JA6pk.mjs} +163 -163
- package/dist/{HDropdown-CvV8k1qQ.mjs → HDropdown-BBEH646p.mjs} +2 -2
- package/dist/{HDropdown-BhJOYbaN.js → HDropdown-Dj7h-JPP.js} +1 -1
- package/dist/{HFileset-C6dqnLa8.js → HFileset-B9EmgNi1.js} +1 -1
- package/dist/{HFileset-x00ZXjyE.mjs → HFileset-oi7P1lcc.mjs} +1 -1
- package/dist/{HGap-Do40sUXA.mjs → HGap-Bp1hRvbT.mjs} +1 -1
- package/dist/{HGap-BgzODoWp.js → HGap-Dy_H_-in.js} +1 -1
- package/dist/{HGrid-Dp7v84g5.mjs → HGrid-Bc13aqjL.mjs} +1 -1
- package/dist/{HGrid-CAU32_zq.js → HGrid-DDbU5kIr.js} +1 -1
- package/dist/{HImagebox-FYftlSK2.mjs → HImagebox-8Uwvm5U0.mjs} +1 -1
- package/dist/{HImagebox-XTSKnoBD.js → HImagebox-BVeQuB4p.js} +1 -1
- package/dist/{HInput-DxhtO9q3.js → HInput-DHK28wmp.js} +1 -1
- package/dist/{HInput-CInEGmfe.mjs → HInput-DoSKCROI.mjs} +1 -1
- package/dist/{HInputGroup-Cou5-12U.mjs → HInputGroup-DSUZqea5.mjs} +1 -1
- package/dist/{HInputGroup-DrjZO_7J.js → HInputGroup-gD-E8vgq.js} +1 -1
- package/dist/{HLabel-uSniKpDF.js → HLabel-BAbaNhJP.js} +1 -1
- package/dist/{HLabel-B4n5-mtx.mjs → HLabel-DQVACpDP.mjs} +2 -2
- package/dist/{HLayout-BsPro3dN.mjs → HLayout-BoHgIQcJ.mjs} +1 -1
- package/dist/{HLayout-wEq-lzHN.js → HLayout-CgaYkiuH.js} +1 -1
- package/dist/{HList-Dko7kLGO.mjs → HList-BQEDGW7_.mjs} +2 -2
- package/dist/{HList-DcV0Ssb3.js → HList-BROYxKwn.js} +1 -1
- package/dist/{HModal-BkjH2wMJ.js → HModal-DTqm3PfL.js} +1 -1
- package/dist/{HModal-D_vWZ5My.mjs → HModal-GpwcBz5c.mjs} +1 -1
- package/dist/HNote-BotCfjhk.js +1 -0
- package/dist/{HNote-CbfXDxO2.mjs → HNote-Dv8mltb0.mjs} +2 -2
- package/dist/{HPagination-Cq2OV1tY.mjs → HPagination-DG0I3Orn.mjs} +2 -2
- package/dist/{HPagination-HDTloKdH.js → HPagination-DyqohdbC.js} +1 -1
- package/dist/{HParagraph-Bg2lZxZR.js → HParagraph-BheX7M-W.js} +1 -1
- package/dist/{HParagraph-BUGeL78g.mjs → HParagraph-dWlO5RLM.mjs} +1 -1
- package/dist/{HPopup-3KITyE24.js → HPopup-BcGomDSy.js} +1 -1
- package/dist/{HPopup-Lqxe1H-e.mjs → HPopup-BrkB_lUB.mjs} +1 -1
- package/dist/{HSpinner-BqVl4t2n.js → HSpinner-CjjGcQJD.js} +1 -1
- package/dist/{HSpinner-VJJNUuXg.mjs → HSpinner-D6VNpQLM.mjs} +1 -1
- package/dist/{HTable-DzbCLDIn.js → HTable-BdNtBsjD.js} +1 -1
- package/dist/{HTable-6O4rYicc.mjs → HTable-D2HYTuO9.mjs} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-Cvhi7T4w.mjs → index-CGr5-mvg.mjs} +1 -1
- package/dist/{index-5k-aAQlJ.js → index-DcB16odB.js} +1 -1
- package/dist/{setButtonCssEvent-BI-R9EJt.js → setButtonCssEvent-CTLQPvWj.js} +1 -1
- package/dist/{setButtonCssEvent-BScAn_gY.mjs → setButtonCssEvent-T2QV1cDz.mjs} +1 -1
- package/package.json +1 -1
- package/dist/HDrawer-CtMgceI2.js +0 -1
- package/dist/HNote-DQr6iUu0.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as D, ref as n, computed as i, onMounted as P, onBeforeUnmount as q, watch as s, nextTick as O, createElementBlock as S, openBlock as L, normalizeClass as U, createElementVNode as j, normalizeStyle as T, createCommentVNode as M } from "vue";
|
|
2
|
-
import { z as Y, A as K, B as J, f as b, g as Q, u as X, F as V, o as Z, h as c, e as ee, t as te, b as W, a as le, r as ne, c as se, d as ae } from "./index-
|
|
2
|
+
import { z as Y, A as K, B as J, f as b, g as Q, u as X, F as V, o as Z, h as c, e as ee, t as te, b as W, a as le, r as ne, c as se, d as ae } from "./index-CGr5-mvg.mjs";
|
|
3
3
|
import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const ie = {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-DcB16odB.js"),A=require("./_plugin-vue_export-helper-BHFhmbuH.js"),R={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},border:{type:Boolean,default:!1},backgroundType:{type:String,default:n.BackgroundType.empty,validator:l=>n.BACKGROUND_TYPE_VALUES.includes(l)},line:{type:String,default:"none",validator:l=>n.H_GAP_RULE_VALUES.includes(l)},lineStyle:{type:String,default:"solid",validator:l=>n.H_GAP_LINE_STYLE_VALUES.includes(l)},lineWidth:{type:[Number,String],default:1},lineColor:{type:String,default:""}},V=t.defineComponent({name:"HGap",props:R,inheritAttrs:!1,emits:["mounted","responsive-change"],setup(l,{emit:y}){const h=t.ref(null),g=t.ref(null),a=l.id?l.id:n.getUUID(),f=`hgap:${a}`,C=n.useDevice(),u=t.ref(l.visible),c=t.ref(l.border??!1),d=t.ref(l.backgroundType??n.BackgroundType.empty),v=t.ref(l.line),i=t.ref(l.lineStyle||"solid"),r=t.ref(l.lineWidth??1),p=t.ref(l.lineColor||""),b=t.computed(()=>{var w,$;const e=String(p.value||"").trim(),o=n.getHexCodeFromColorText(e);if(o)return o;if(e)return e;const k=n.getSpecificClassValueFromClassList(s.value,"color"),B=k?n.getHexCodeFromColorText(k):null;return B||(($=(w=n.hisonCloser)==null?void 0:w.componentStyle)==null?void 0:$.mutedColor)||"#999999"}),S=t.computed(()=>{const e=r.value;return typeof e=="number"?`${e}px`:String(e||"1px")}),z=t.computed(()=>({borderTop:`${S.value} ${i.value} ${b.value}`})),E=t.computed(()=>({borderLeft:`${S.value} ${i.value} ${b.value}`})),H=t.computed(()=>u.value?"":"hison-display-none"),N=t.computed(()=>c.value?"hison-border":""),_=t.computed(()=>{switch(d.value){case n.BackgroundType.empty:return"hison-bg-empty";case n.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),s=t.ref([]),m=()=>{s.value=n.extractResponsiveClasses(n.toClassString(l.class)||"",C.value),n.addComponentNameToClass(s.value,"size",n.hisonCloser.componentStyle.size),n.addComponentNameToClass(s.value,"color","primary"),n.getIndexSpecificClassNameFromClassList(s.value,"col")===-1&&s.value.push("hison-col-12")},L=()=>{n.hisonCloser.component.gapList[a]&&n.hisonCloser.component.gapList[a].isHisonvueComponent&&console.warn(`[Hisonvue] The gap ID is at risk of being duplicated. ${a}`),n.registerReloadable(f,()=>{T(),t.nextTick(L)}),m(),g.value={isHisonvueComponent:!0,getId:()=>a,getType:()=>"gap",isVisible:()=>u.value,setVisible:e=>{u.value=e},isBorder:()=>c.value,setBorder:e=>{c.value=e},getBackgroundType:()=>d.value,setBackgroundType:e=>{d.value=e},getLine:()=>v.value,setLine:e=>{v.value=e},getLineStyle:()=>i.value,setLineStyle:e=>{i.value=e},getLineWidth:()=>r.value,setLineWidth:e=>{r.value=e},getLineColor:()=>p.value,setLineColor:e=>{p.value=e??""},reload:()=>n.reloadHisonComponent(f)},n.hisonCloser.component.gapList[a]=g.value,y("mounted",g.value)},T=()=>{n.unregisterReloadable(f),delete n.hisonCloser.component.gapList[a]};return t.onMounted(L),t.onBeforeUnmount(T),t.watch(C,e=>{m(),y("responsive-change",e)}),t.watch(()=>l.visible,e=>{const o=!!e;o!==u.value&&(u.value=o)}),t.watch(()=>l.border,e=>{const o=!!e;o!==c.value&&(c.value=o)}),t.watch(()=>l.backgroundType,e=>{e&&e!==d.value&&(d.value=e)}),t.watch(()=>l.line,e=>{(e==="none"||e==="horizontal"||e==="vertical")&&e!==v.value&&(v.value=e)}),t.watch(()=>l.lineStyle,e=>{["solid","dashed","dotted","double","groove","ridge","inset","outset"].includes(e)&&e!==i.value&&(i.value=e)}),t.watch(()=>l.lineWidth,e=>{const o=typeof e=="number"&&Number.isFinite(e)&&e>=0||typeof e=="string"?e:r.value;o!==r.value&&(r.value=o)}),t.watch(()=>l.lineColor,e=>{const o=(e??"").toString();o!==p.value&&(p.value=o)}),t.watch(()=>l.class,()=>{m()}),{gapRef:h,props:l,line:v,visibleClass:H,borderClass:N,backgroundTypeClass:_,responsiveClassList:s,horizontalStyle:z,verticalStyle:E}}});function U(l,y,h,g,a,f){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...l.responsiveClassList,l.visibleClass])},[t.createElementVNode("div",{ref:"gapRef",class:t.normalizeClass(["hison-gap",l.borderClass,l.backgroundTypeClass]),style:t.normalizeStyle(l.props.style)},[l.line==="horizontal"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"hison-gap-line-horizontal",style:t.normalizeStyle(l.horizontalStyle)},null,4)):l.line==="vertical"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"hison-gap-line-vertical",style:t.normalizeStyle(l.verticalStyle)},null,4)):t.createCommentVNode("",!0)],6)],2)}const x=A._export_sfc(V,[["render",U]]);exports.default=x;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as N, ref as c, computed as H, onMounted as T, onBeforeUnmount as U, watch as F, triggerRef as $, nextTick as P, createElementBlock as K, openBlock as j, normalizeStyle as W, normalizeClass as Y, createElementVNode as Z, mergeProps as J } from "vue";
|
|
2
|
-
import { G as X, I as Q, J as ee, K as te, L as ie, M as le, g as re, u as oe, e as z, t as G, o as b, a as ne, l as h, F as _, h as S, v as y, d as B, r as ae, c as ue } from "./index-
|
|
2
|
+
import { G as X, I as Q, J as ee, K as te, L as ie, M as le, g as re, u as oe, e as z, t as G, o as b, a as ne, l as h, F as _, h as S, v as y, d as B, r as ae, c as ue } from "./index-CGr5-mvg.mjs";
|
|
3
3
|
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const se = {
|
|
5
5
|
modelValue: Array,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("./index-5k-aAQlJ.js"),z=require("./_plugin-vue_export-helper-BHFhmbuH.js"),H={modelValue:Array,id:{type:String,required:!0},columns:{type:Array,required:!0},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object],required:!1},name:{type:String,required:!1},locked:{type:Boolean,default:!1},lockedColor:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},redoable:{type:Boolean,default:!0},redoCount:{type:Number,required:!1},visible:{type:Boolean,default:!0},headerVisible:{type:Boolean,default:!0},rownumVisible:{type:Boolean,default:!0},rownumSize:{type:String,required:!1},rownumLockedColor:{type:Boolean,default:!1},statusVisible:{type:Boolean,default:!0},statusLockedColor:{type:Boolean,default:!1},selectionPolicy:{type:String,required:!1,validator:e=>i.SELECTION_POLICY_VALUES.includes(e)},nullValue:{type:String,required:!1},dateFormat:{type:String,required:!1,validator:e=>i.GRID_DATE_FORMAT_VALUES.includes(e)},monthFormat:{type:String,required:!1,validator:e=>i.GRID_MONTH_FORMAT_VALUES.includes(e)},alterRow:{type:Boolean,default:!0},frozenColCount:{type:Number,required:!1},frozenRowCount:{type:Number,required:!1},sortable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},allCheckable:{type:Boolean,default:!0},checkedValue:{type:String,required:!1},uncheckedValue:{type:String,required:!1},width:{type:String,required:!1},height:{type:String,required:!1},margin:{type:String,required:!1},padding:{type:String,required:!1},sizeLevel:{type:Number,required:!1},verticalAlign:{type:String,required:!1,validator:e=>i.GRID_VERTICAL_ALIGN_VALUES.includes(e)},cellFontSize:{type:String,required:!1},cellMinHeight:{type:String,required:!1},horizenBorderSize:{type:Number,required:!1},verticalBorderSize:{type:Number,required:!1},gridFontFamily:{type:String,required:!1},editorFontFamily:{type:String,required:!1},overflowWrap:{type:String,required:!1},wordBreak:{type:String,required:!1},whiteSpace:{type:String,required:!1},linkHasUnderLine:{type:Boolean,required:!1},invertColor:{type:Boolean,default:!1},color:{type:String,required:!1,validator:e=>i.COLOR_SET_VALUES.includes(e)||i.isCssColorLike(e)},gridBorderColor:{type:String,required:!1},headerCellBackColor:{type:String,required:!1},headerCellBorderColor:{type:String,required:!1},headerCellFontColor:{type:String,required:!1},footerCellBackColor:{type:String,required:!1},footerCellBorderColor:{type:String,required:!1},footerCellFontColor:{type:String,required:!1},bodyBackColor:{type:String,required:!1},bodyCellBackColor:{type:String,required:!1},bodyCellBorderColor:{type:String,required:!1},bodyCellFontColor:{type:String,required:!1},editorBackColor:{type:String,required:!1},editorFontColor:{type:String,required:!1},selectCellBackColor:{type:String,required:!1},selectCellFontColor:{type:String,required:!1},selectColBackColor:{type:String,required:!1},selectColFontColor:{type:String,required:!1},selectRowBackColor:{type:String,required:!1},selectRowFontColor:{type:String,required:!1},mouseoverCellBackColor:{type:String,required:!1},mouseoverCellFontColor:{type:String,required:!1},lockCellBackColor:{type:String,required:!1},lockCellFontColor:{type:String,required:!1},alterRowBackColor:{type:String,required:!1},alterRowFontColor:{type:String,required:!1},buttonFontColor:{type:String,required:!1},buttonBorderColor:{type:String,required:!1},buttonBackColor:{type:String,required:!1},buttonHoverFontColor:{type:String,required:!1},buttonHoverBackColor:{type:String,required:!1},buttonActiveFontColor:{type:String,required:!1},buttonActiveBackColor:{type:String,required:!1},linkFontColor:{type:String,required:!1},linkHoverFontColor:{type:String,required:!1},linkActiveFontColor:{type:String,required:!1},linkVisitedFontColor:{type:String,required:!1},linkFocusFontColor:{type:String,required:!1}},D={activeCell:Function,activeCells:Function,activeRow:Function,activeRows:Function,activeCol:Function,activeCols:Function,beforeChange:Function,afterChange:Function,beforeClickCell:Function,afterClickCell:Function,clickSelect:Function,clickCheckbox:Function,clickButton:Function,clickLink:Function,beforeDblClickCell:Function,afterDblClickCell:Function,beforeClickHeader:Function,afterClickHeader:Function,beforeDblClickHeader:Function,afterDblClickHeader:Function,beforeEditEnter:Function,afterEditEnter:Function,editEnding:Function,clickFilter:Function,chooseFilter:Function,paste:Function,copy:Function,resize:Function,keydownEditor:Function,inputEditor:Function,keydownGrid:Function},G=n.defineComponent({name:"HGrid",props:{...H,...D},emits:["mounted","responsive-change"],setup(e,{emit:b}){const d=i.hisonCloser.grid,g=n.ref(null),t=n.ref(null),f=e.id?e.id:i.getUUID(),C=`hgrid:${f}`,k=i.useDevice(),v=n.ref(e.visible),O=n.computed(()=>v.value?"":"hison-display-none"),q=n.ref([]),L=["columns","id","class","style","visible"],F=n.ref(0),m=()=>{n.triggerRef(F)},h=n.ref(""),y=n.ref(!1),S=n.ref(!0);let B=!1;const p=n.computed(()=>{F.value;const r=i.extractResponsiveClasses(i.toClassString(e.class)||"",k.value),o=i.getSpecificClassValueFromClassList(r,"color")??"primary",c=i.getSpecificClassValueFromClassList(r,"size");i.getIndexSpecificClassNameFromClassList(r,"col")===-1&&r.push("hison-col-12"),q.value=r;const l={};l["data-id"]=f;for(const[a,s]of Object.entries(e))L.includes(a)||s!=null&&(l[a.replace(/[A-Z]/g,u=>"-"+u.toLowerCase())]=String(s));return l["size-level"]=l["size-level"]&&i.hison.utils.isNumber(l["size-level"])?String(Math.min(Math.max(Number(l["size-level"]),1),9)):E(5,c),o&&!l.color&&(l.color=o),l.color&&(l.color=i.getHexCodeFromColorText(l.color)??l.color),(e.invertColor||i.hisonCloser.componentStyle.invertColor)&&(l["invert-color"]="true"),h.value=l.color,l}),E=(r,o)=>{switch(o=o??i.hisonCloser.componentStyle.size,o){case i.Size.xs:r-=3;break;case i.Size.s:r-=2;break;case i.Size.m:break;case i.Size.l:r+=2;break;case i.Size.xl:r+=3;break}return String(Math.min(Math.max(r,1),9))},w=()=>{if(!S.value)return;i.unregisterReloadable(C),i.registerReloadable(C,()=>{S.value&&(i.unregisterReloadable(C),A(),m(),n.nextTick(()=>{S.value&&w()}))}),B||(d.init(),B=!0);const r=g.value;if(!r)return;const o=r.querySelector("[data-vanillagrid]");if(!o)return;Array.from(o.querySelectorAll("[data-col]")).forEach(l=>l.remove()),e.columns.forEach(l=>{const a=document.createElement("div");a.setAttribute("data-col","");for(const s in l){const u=l[s];if(u!=null){const R=s.replace(/([A-Z])/g,"-$1").toLowerCase();a.setAttribute(R,String(u))}}o.appendChild(a)}),d.mountGrid(r),o.style.border="none",o.style.boxShadow=`0 0.5px 1px 0.5px ${h.value}`;const c=d.getGrid(f);if(c&&(c.getId=()=>f),t.value=c,t.value){t.value.isHisonvueComponent=!0,t.value.getId=()=>f,t.value.getType=()=>"grid","isGridVisible"in t.value&&delete t.value.isGridVisible,"setGridVisible"in t.value&&delete t.value.setGridVisible,t.value.isVisible=()=>v.value,t.value.setVisible=a=>{v.value=a},t.value.getDataModel=()=>new i.hison.data.DataModel(t.value.getValues()),t.value.setDataModel=a=>{if(!(!a||a.getRowCount()==0))return t.value.load(a)},t.value.reload=()=>i.reloadHisonComponent(C);const l=t.value.load.bind(t.value);t.value.load=a=>a&&a.getIsDataModel&&a.getIsDataModel()?l(a.getRows()):l(a)}t.value&&(typeof e.activeCell=="function"&&t.value.setOnActiveCell(e.activeCell),typeof e.activeCells=="function"&&t.value.setOnActiveCells(e.activeCells),typeof e.activeRow=="function"&&t.value.setOnActiveRow(e.activeRow),typeof e.activeRows=="function"&&t.value.setOnActiveRows(e.activeRows),typeof e.activeCol=="function"&&t.value.setOnActiveCol(e.activeCol),typeof e.activeCols=="function"&&t.value.setOnActiveCols(e.activeCols),typeof e.beforeChange=="function"&&t.value.setOnBeforeChange(e.beforeChange),typeof e.afterChange=="function"&&t.value.setOnAfterChange(e.afterChange),typeof e.beforeClickCell=="function"&&t.value.setOnBeforeClickCell(e.beforeClickCell),typeof e.afterClickCell=="function"&&t.value.setOnAfterClickCell(e.afterClickCell),typeof e.clickSelect=="function"&&t.value.setOnClickSelect(e.clickSelect),typeof e.clickCheckbox=="function"&&t.value.setOnClickCheckbox(e.clickCheckbox),typeof e.clickButton=="function"&&t.value.setOnClickButton(e.clickButton),typeof e.clickLink=="function"&&t.value.setOnClickLink(e.clickLink),typeof e.beforeDblClickCell=="function"&&t.value.setOnBeforeDblClickCell(e.beforeDblClickCell),typeof e.afterDblClickCell=="function"&&t.value.setOnAfterDblClickCell(e.afterDblClickCell),typeof e.beforeClickHeader=="function"&&t.value.setOnBeforeClickHeader(e.beforeClickHeader),typeof e.afterClickHeader=="function"&&t.value.setOnAfterClickHeader(e.afterClickHeader),typeof e.beforeDblClickHeader=="function"&&t.value.setOnBeforeDblClickHeader(e.beforeDblClickHeader),typeof e.afterDblClickHeader=="function"&&t.value.setOnAfterDblClickHeader(e.afterDblClickHeader),typeof e.beforeEditEnter=="function"&&t.value.setOnBeforeEditEnter(e.beforeEditEnter),typeof e.afterEditEnter=="function"&&t.value.setOnAfterEditEnter(e.afterEditEnter),typeof e.editEnding=="function"&&t.value.setOnEditEnding(e.editEnding),typeof e.clickFilter=="function"&&t.value.setOnClickFilter(e.clickFilter),typeof e.chooseFilter=="function"&&t.value.setOnChooseFilter(e.chooseFilter),typeof e.paste=="function"&&t.value.setOnPaste(e.paste),typeof e.copy=="function"&&t.value.setOnCopy(e.copy),typeof e.resize=="function"&&t.value.setOnResize(e.resize),typeof e.keydownEditor=="function"&&t.value.setOnKeydownEditor(e.keydownEditor),typeof e.inputEditor=="function"&&t.value.setOnInputEditor(e.inputEditor),typeof e.keydownGrid=="function"&&t.value.setOnKeydownGrid(e.keydownGrid)),y.value=!1,r.__hgridDestroyed=!1,b("mounted",t.value)},A=()=>{i.unregisterReloadable(C);const r=g.value;if(!(!r||y.value)){if(!r.isConnected){y.value=!0;return}try{d.unmountGrid(r)}catch(o){console.warn("[HGrid] unmountGrid skipped:",o)}y.value=!0,r.__hgridDestroyed=!0,t.value=null}};return n.onMounted(w),n.onBeforeUnmount(()=>{S.value=!1,A()}),n.watch(k,r=>{if(y.value)return;const o=t.value;if(!o||typeof o.setGridSizeLevel!="function")return;const c=i.extractResponsiveClasses(i.toClassString(e.class)||"",k.value),l=i.getSpecificClassValueFromClassList(c,"color"),a=i.getSpecificClassValueFromClassList(c,"size"),s=e.sizeLevel&&i.hison.utils.isNumber(String(e.sizeLevel))?String(Math.min(Math.max(Number(e.sizeLevel),1),9)):E(5,a);o.setGridSizeLevel(Number(s));let u="";l&&!e.color&&(u=l),u&&(u=i.getHexCodeFromColorText(u)??u,typeof o.setGridColor=="function"&&o.setGridColor(u),(e.invertColor||i.hisonCloser.componentStyle.invertColor)&&typeof o.invertColor=="function"&&o.invertColor(!0)),b("responsive-change",r)}),n.watch(()=>e.visible,r=>{const o=!!r;o!==v.value&&(v.value=o)}),n.watch(()=>e.class,()=>{m()}),{editorWrap:g,props:e,bindAttrs:p,responsiveClassList:q,visibleClass:O}}});function _(e,b,d,g,t,f){return n.openBlock(),n.createElementBlock("div",{ref:"editorWrap",class:n.normalizeClass(["hison-grid","hison-wrapper",...e.responsiveClassList,e.visibleClass]),style:n.normalizeStyle(e.props.style)},[n.createElementVNode("div",n.mergeProps({"data-vanillagrid":""},e.bindAttrs),null,16)],6)}const V=z._export_sfc(G,[["render",_]]);exports.default=V;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("./index-DcB16odB.js"),z=require("./_plugin-vue_export-helper-BHFhmbuH.js"),H={modelValue:Array,id:{type:String,required:!0},columns:{type:Array,required:!0},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object],required:!1},name:{type:String,required:!1},locked:{type:Boolean,default:!1},lockedColor:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},redoable:{type:Boolean,default:!0},redoCount:{type:Number,required:!1},visible:{type:Boolean,default:!0},headerVisible:{type:Boolean,default:!0},rownumVisible:{type:Boolean,default:!0},rownumSize:{type:String,required:!1},rownumLockedColor:{type:Boolean,default:!1},statusVisible:{type:Boolean,default:!0},statusLockedColor:{type:Boolean,default:!1},selectionPolicy:{type:String,required:!1,validator:e=>i.SELECTION_POLICY_VALUES.includes(e)},nullValue:{type:String,required:!1},dateFormat:{type:String,required:!1,validator:e=>i.GRID_DATE_FORMAT_VALUES.includes(e)},monthFormat:{type:String,required:!1,validator:e=>i.GRID_MONTH_FORMAT_VALUES.includes(e)},alterRow:{type:Boolean,default:!0},frozenColCount:{type:Number,required:!1},frozenRowCount:{type:Number,required:!1},sortable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},allCheckable:{type:Boolean,default:!0},checkedValue:{type:String,required:!1},uncheckedValue:{type:String,required:!1},width:{type:String,required:!1},height:{type:String,required:!1},margin:{type:String,required:!1},padding:{type:String,required:!1},sizeLevel:{type:Number,required:!1},verticalAlign:{type:String,required:!1,validator:e=>i.GRID_VERTICAL_ALIGN_VALUES.includes(e)},cellFontSize:{type:String,required:!1},cellMinHeight:{type:String,required:!1},horizenBorderSize:{type:Number,required:!1},verticalBorderSize:{type:Number,required:!1},gridFontFamily:{type:String,required:!1},editorFontFamily:{type:String,required:!1},overflowWrap:{type:String,required:!1},wordBreak:{type:String,required:!1},whiteSpace:{type:String,required:!1},linkHasUnderLine:{type:Boolean,required:!1},invertColor:{type:Boolean,default:!1},color:{type:String,required:!1,validator:e=>i.COLOR_SET_VALUES.includes(e)||i.isCssColorLike(e)},gridBorderColor:{type:String,required:!1},headerCellBackColor:{type:String,required:!1},headerCellBorderColor:{type:String,required:!1},headerCellFontColor:{type:String,required:!1},footerCellBackColor:{type:String,required:!1},footerCellBorderColor:{type:String,required:!1},footerCellFontColor:{type:String,required:!1},bodyBackColor:{type:String,required:!1},bodyCellBackColor:{type:String,required:!1},bodyCellBorderColor:{type:String,required:!1},bodyCellFontColor:{type:String,required:!1},editorBackColor:{type:String,required:!1},editorFontColor:{type:String,required:!1},selectCellBackColor:{type:String,required:!1},selectCellFontColor:{type:String,required:!1},selectColBackColor:{type:String,required:!1},selectColFontColor:{type:String,required:!1},selectRowBackColor:{type:String,required:!1},selectRowFontColor:{type:String,required:!1},mouseoverCellBackColor:{type:String,required:!1},mouseoverCellFontColor:{type:String,required:!1},lockCellBackColor:{type:String,required:!1},lockCellFontColor:{type:String,required:!1},alterRowBackColor:{type:String,required:!1},alterRowFontColor:{type:String,required:!1},buttonFontColor:{type:String,required:!1},buttonBorderColor:{type:String,required:!1},buttonBackColor:{type:String,required:!1},buttonHoverFontColor:{type:String,required:!1},buttonHoverBackColor:{type:String,required:!1},buttonActiveFontColor:{type:String,required:!1},buttonActiveBackColor:{type:String,required:!1},linkFontColor:{type:String,required:!1},linkHoverFontColor:{type:String,required:!1},linkActiveFontColor:{type:String,required:!1},linkVisitedFontColor:{type:String,required:!1},linkFocusFontColor:{type:String,required:!1}},D={activeCell:Function,activeCells:Function,activeRow:Function,activeRows:Function,activeCol:Function,activeCols:Function,beforeChange:Function,afterChange:Function,beforeClickCell:Function,afterClickCell:Function,clickSelect:Function,clickCheckbox:Function,clickButton:Function,clickLink:Function,beforeDblClickCell:Function,afterDblClickCell:Function,beforeClickHeader:Function,afterClickHeader:Function,beforeDblClickHeader:Function,afterDblClickHeader:Function,beforeEditEnter:Function,afterEditEnter:Function,editEnding:Function,clickFilter:Function,chooseFilter:Function,paste:Function,copy:Function,resize:Function,keydownEditor:Function,inputEditor:Function,keydownGrid:Function},G=n.defineComponent({name:"HGrid",props:{...H,...D},emits:["mounted","responsive-change"],setup(e,{emit:b}){const d=i.hisonCloser.grid,g=n.ref(null),t=n.ref(null),f=e.id?e.id:i.getUUID(),C=`hgrid:${f}`,k=i.useDevice(),v=n.ref(e.visible),O=n.computed(()=>v.value?"":"hison-display-none"),q=n.ref([]),L=["columns","id","class","style","visible"],F=n.ref(0),m=()=>{n.triggerRef(F)},h=n.ref(""),y=n.ref(!1),S=n.ref(!0);let B=!1;const p=n.computed(()=>{F.value;const r=i.extractResponsiveClasses(i.toClassString(e.class)||"",k.value),o=i.getSpecificClassValueFromClassList(r,"color")??"primary",c=i.getSpecificClassValueFromClassList(r,"size");i.getIndexSpecificClassNameFromClassList(r,"col")===-1&&r.push("hison-col-12"),q.value=r;const l={};l["data-id"]=f;for(const[a,s]of Object.entries(e))L.includes(a)||s!=null&&(l[a.replace(/[A-Z]/g,u=>"-"+u.toLowerCase())]=String(s));return l["size-level"]=l["size-level"]&&i.hison.utils.isNumber(l["size-level"])?String(Math.min(Math.max(Number(l["size-level"]),1),9)):E(5,c),o&&!l.color&&(l.color=o),l.color&&(l.color=i.getHexCodeFromColorText(l.color)??l.color),(e.invertColor||i.hisonCloser.componentStyle.invertColor)&&(l["invert-color"]="true"),h.value=l.color,l}),E=(r,o)=>{switch(o=o??i.hisonCloser.componentStyle.size,o){case i.Size.xs:r-=3;break;case i.Size.s:r-=2;break;case i.Size.m:break;case i.Size.l:r+=2;break;case i.Size.xl:r+=3;break}return String(Math.min(Math.max(r,1),9))},w=()=>{if(!S.value)return;i.unregisterReloadable(C),i.registerReloadable(C,()=>{S.value&&(i.unregisterReloadable(C),A(),m(),n.nextTick(()=>{S.value&&w()}))}),B||(d.init(),B=!0);const r=g.value;if(!r)return;const o=r.querySelector("[data-vanillagrid]");if(!o)return;Array.from(o.querySelectorAll("[data-col]")).forEach(l=>l.remove()),e.columns.forEach(l=>{const a=document.createElement("div");a.setAttribute("data-col","");for(const s in l){const u=l[s];if(u!=null){const R=s.replace(/([A-Z])/g,"-$1").toLowerCase();a.setAttribute(R,String(u))}}o.appendChild(a)}),d.mountGrid(r),o.style.border="none",o.style.boxShadow=`0 0.5px 1px 0.5px ${h.value}`;const c=d.getGrid(f);if(c&&(c.getId=()=>f),t.value=c,t.value){t.value.isHisonvueComponent=!0,t.value.getId=()=>f,t.value.getType=()=>"grid","isGridVisible"in t.value&&delete t.value.isGridVisible,"setGridVisible"in t.value&&delete t.value.setGridVisible,t.value.isVisible=()=>v.value,t.value.setVisible=a=>{v.value=a},t.value.getDataModel=()=>new i.hison.data.DataModel(t.value.getValues()),t.value.setDataModel=a=>{if(!(!a||a.getRowCount()==0))return t.value.load(a)},t.value.reload=()=>i.reloadHisonComponent(C);const l=t.value.load.bind(t.value);t.value.load=a=>a&&a.getIsDataModel&&a.getIsDataModel()?l(a.getRows()):l(a)}t.value&&(typeof e.activeCell=="function"&&t.value.setOnActiveCell(e.activeCell),typeof e.activeCells=="function"&&t.value.setOnActiveCells(e.activeCells),typeof e.activeRow=="function"&&t.value.setOnActiveRow(e.activeRow),typeof e.activeRows=="function"&&t.value.setOnActiveRows(e.activeRows),typeof e.activeCol=="function"&&t.value.setOnActiveCol(e.activeCol),typeof e.activeCols=="function"&&t.value.setOnActiveCols(e.activeCols),typeof e.beforeChange=="function"&&t.value.setOnBeforeChange(e.beforeChange),typeof e.afterChange=="function"&&t.value.setOnAfterChange(e.afterChange),typeof e.beforeClickCell=="function"&&t.value.setOnBeforeClickCell(e.beforeClickCell),typeof e.afterClickCell=="function"&&t.value.setOnAfterClickCell(e.afterClickCell),typeof e.clickSelect=="function"&&t.value.setOnClickSelect(e.clickSelect),typeof e.clickCheckbox=="function"&&t.value.setOnClickCheckbox(e.clickCheckbox),typeof e.clickButton=="function"&&t.value.setOnClickButton(e.clickButton),typeof e.clickLink=="function"&&t.value.setOnClickLink(e.clickLink),typeof e.beforeDblClickCell=="function"&&t.value.setOnBeforeDblClickCell(e.beforeDblClickCell),typeof e.afterDblClickCell=="function"&&t.value.setOnAfterDblClickCell(e.afterDblClickCell),typeof e.beforeClickHeader=="function"&&t.value.setOnBeforeClickHeader(e.beforeClickHeader),typeof e.afterClickHeader=="function"&&t.value.setOnAfterClickHeader(e.afterClickHeader),typeof e.beforeDblClickHeader=="function"&&t.value.setOnBeforeDblClickHeader(e.beforeDblClickHeader),typeof e.afterDblClickHeader=="function"&&t.value.setOnAfterDblClickHeader(e.afterDblClickHeader),typeof e.beforeEditEnter=="function"&&t.value.setOnBeforeEditEnter(e.beforeEditEnter),typeof e.afterEditEnter=="function"&&t.value.setOnAfterEditEnter(e.afterEditEnter),typeof e.editEnding=="function"&&t.value.setOnEditEnding(e.editEnding),typeof e.clickFilter=="function"&&t.value.setOnClickFilter(e.clickFilter),typeof e.chooseFilter=="function"&&t.value.setOnChooseFilter(e.chooseFilter),typeof e.paste=="function"&&t.value.setOnPaste(e.paste),typeof e.copy=="function"&&t.value.setOnCopy(e.copy),typeof e.resize=="function"&&t.value.setOnResize(e.resize),typeof e.keydownEditor=="function"&&t.value.setOnKeydownEditor(e.keydownEditor),typeof e.inputEditor=="function"&&t.value.setOnInputEditor(e.inputEditor),typeof e.keydownGrid=="function"&&t.value.setOnKeydownGrid(e.keydownGrid)),y.value=!1,r.__hgridDestroyed=!1,b("mounted",t.value)},A=()=>{i.unregisterReloadable(C);const r=g.value;if(!(!r||y.value)){if(!r.isConnected){y.value=!0;return}try{d.unmountGrid(r)}catch(o){console.warn("[HGrid] unmountGrid skipped:",o)}y.value=!0,r.__hgridDestroyed=!0,t.value=null}};return n.onMounted(w),n.onBeforeUnmount(()=>{S.value=!1,A()}),n.watch(k,r=>{if(y.value)return;const o=t.value;if(!o||typeof o.setGridSizeLevel!="function")return;const c=i.extractResponsiveClasses(i.toClassString(e.class)||"",k.value),l=i.getSpecificClassValueFromClassList(c,"color"),a=i.getSpecificClassValueFromClassList(c,"size"),s=e.sizeLevel&&i.hison.utils.isNumber(String(e.sizeLevel))?String(Math.min(Math.max(Number(e.sizeLevel),1),9)):E(5,a);o.setGridSizeLevel(Number(s));let u="";l&&!e.color&&(u=l),u&&(u=i.getHexCodeFromColorText(u)??u,typeof o.setGridColor=="function"&&o.setGridColor(u),(e.invertColor||i.hisonCloser.componentStyle.invertColor)&&typeof o.invertColor=="function"&&o.invertColor(!0)),b("responsive-change",r)}),n.watch(()=>e.visible,r=>{const o=!!r;o!==v.value&&(v.value=o)}),n.watch(()=>e.class,()=>{m()}),{editorWrap:g,props:e,bindAttrs:p,responsiveClassList:q,visibleClass:O}}});function _(e,b,d,g,t,f){return n.openBlock(),n.createElementBlock("div",{ref:"editorWrap",class:n.normalizeClass(["hison-grid","hison-wrapper",...e.responsiveClassList,e.visibleClass]),style:n.normalizeStyle(e.props.style)},[n.createElementVNode("div",n.mergeProps({"data-vanillagrid":""},e.bindAttrs),null,16)],6)}const V=z._export_sfc(G,[["render",_]]);exports.default=V;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Me, ref as a, computed as v, onMounted as Be, onBeforeUnmount as Le, watch as u, nextTick as J, resolveComponent as Ae, createElementBlock as T, openBlock as w, normalizeStyle as ne, normalizeClass as E, createElementVNode as K, withModifiers as U, renderSlot as j, createCommentVNode as xe, toDisplayString as O, createBlock as ze, withCtx as Q, Fragment as Ee, createVNode as ie } from "vue";
|
|
2
|
-
import { E as Ne, y as b, g as Ve, l as N, u as Re, j as ae, t as X, h as m, e as Ue, a as je, b as se, r as Oe, c as He } from "./index-
|
|
2
|
+
import { E as Ne, y as b, g as Ve, l as N, u as Re, j as ae, t as X, h as m, e as Ue, a as je, b as se, r as Oe, c as He } from "./index-CGr5-mvg.mjs";
|
|
3
3
|
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const We = {
|
|
5
5
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),a=require("./index-DcB16odB.js"),me=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},imgStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},editMode:{type:String,default:a.EditMode.editable,validator:t=>a.EDIT_MODE_VALUES.includes(t)},modelValue:{type:Object,default:null},attId:{type:String,default:""},addButtonText:{type:String,default:"Add"},removeButtonText:{type:String,default:"Remove"},placeholder:{type:String,default:"There is no image"},enableDrop:{type:Boolean,default:!0},allowedTypes:{type:[String,Array],default:()=>[".jpg",".jpeg",".png",".gif","image/*"]},disallowedTypes:{type:[String,Array],default:void 0},maxFileSize:{type:Number,default:1/0},border:{type:Boolean,default:!1},onDisallowedType:Function,onMaxFileSizeExceeded:Function,tabIndex:{type:[Number,String],default:null,validator:t=>t===null||t===""||!isNaN(+t)&&isFinite(+t)}},fe=o.defineComponent({name:"HImagebox",props:ce,emits:["mounted","responsive-change","update:modelValue","add","remove","focus","blur","change","preview-click","preview-dblclick","preview-contextmenu","preview-pointerenter","preview-pointerleave","preview-pointerdown","preview-pointerup"],setup(t,{emit:n}){const y=o.ref(null),u=t.id?t.id:a.getUUID(),x=`himagebox:${u}`,d=o.ref(null),v=o.ref(t.visible),i=o.ref(t.editMode),b=o.computed(()=>i.value===a.EditMode.disable),z=o.computed(()=>i.value===a.EditMode.readonly),T=o.ref(t.border??!1),q=o.computed(()=>i.value!==a.EditMode.editable?`hison-imagebox-${i.value}`:""),W=o.computed(()=>v.value?"":"hison-display-none"),G=o.computed(()=>T.value?"hison-border":""),F=o.ref(t.attId||""),L=o.ref(!1),h=o.ref(t.enableDrop),k=o.ref(t.placeholder),M=o.ref(t.addButtonText),P=o.ref(t.removeButtonText),m=o.ref(Array.isArray(t.allowedTypes)?t.allowedTypes:t.allowedTypes?t.allowedTypes.split(","):[]),g=o.ref(Array.isArray(t.disallowedTypes)?t.disallowedTypes:t.disallowedTypes?t.disallowedTypes.split(","):[]),c=o.ref(t.maxFileSize??a.hison.getMaxFilesetSize()),f=o.ref(typeof t.onDisallowedType=="function"?t.onDisallowedType:void 0),C=o.ref(typeof t.onMaxFileSizeExceeded=="function"?t.onMaxFileSizeExceeded:void 0),r=o.ref(t.modelValue),I=o.ref(!1),J=o.computed(()=>{if(m.value.length===0)return"";const e=new Set(g.value.map(s=>s.toLowerCase())),l=m.value.filter(s=>!e.has(s.toLowerCase()));return l.length>0?l.join(","):void 0}),D=o.ref(null),p=e=>{if(!e||e.isDeleted){D.value=null;return}if(e.filePath)D.value=e.filePath;else if(e.file instanceof File){const l=new FileReader;l.onload=s=>{var $;return D.value=String((($=s.target)==null?void 0:$.result)||"")},l.readAsDataURL(e.file)}else e.fileName&&e.fileName.startsWith("data:")?D.value=e.fileName:D.value=null};p(r.value);const w=(e,l)=>{n(e,{event:l,api:d.value})},K=e=>w("preview-click",e),Q=e=>w("preview-dblclick",e),X=e=>w("preview-contextmenu",e),Y=e=>w("preview-pointerenter",e),Z=e=>w("preview-pointerleave",e),_=e=>w("preview-pointerdown",e),ee=e=>w("preview-pointerup",e),B=o.ref(t.tabIndex!==null&&t.tabIndex!==""?Number(t.tabIndex):null),N=a.useDevice(),S=o.ref([]),A=()=>{S.value=a.extractResponsiveClasses(a.toClassString(t.class)||"",N.value),a.getIndexSpecificClassNameFromClassList(S.value,"col")===-1&&S.value.push("hison-col-12"),a.addComponentNameToClass(S.value,"size",a.hisonCloser.componentStyle.size),a.addComponentNameToClass(S.value,"color","primary")},te=o.computed(()=>{const e=[];return e.push(...a.extractPrefixedClasses(a.toClassString(t.class)||"","size")),e.push(...a.extractPrefixedClasses(a.toClassString(t.class)||"","color")),e}),oe=o.computed(()=>i.value!==a.EditMode.readonly),le=o.computed(()=>!!r.value&&i.value!==a.EditMode.readonly),ne=e=>{var $,O,H;const l=e.type,s="."+(($=e.name.split(".").pop())==null?void 0:$.toLowerCase());return m.value.length>0&&!m.value.some(E=>E===l||E===s)?(console.warn(`File type not in allowedTypes: ${l} / ${s}`),(O=f.value)==null||O.call(f,e,m.value,null),!1):g.value.length>0&&g.value.some(E=>E===l||E===s)?(console.warn(`File type is in disallowedTypes: ${l} / ${s}`),(H=f.value)==null||H.call(f,e,null,g.value),!1):!0},ie=e=>{var l;return typeof c.value=="number"&&Number.isFinite(c.value)&&e.size>c.value?(console.warn(`File too large: ${e.name}
|
|
2
2
|
Max size: ${c.value} Byte`),(l=C.value)==null||l.call(C,e,e.size,c.value),!1):!0},V=e=>{if(!ne(e)||!ie(e))return;const l=e.name.split(".").pop()||"",s={fileName:e.name,fileSize:e.size,extension:l,file:e,isNew:!0};r.value=s,p(s),I.value=!0,n("update:modelValue",s),n("add",s,d.value),n("change",s,d.value)},ae=e=>{if(i.value!==a.EditMode.editable)return;const l=e.target.files;!l||!l.length||(V(l[0]),o.nextTick(()=>{y.value&&(y.value.value="")}))},se=e=>{!h.value||i.value!==a.EditMode.editable||z.value||b.value||(L.value=!0)},re=e=>{var l;L.value=!1,!(!h.value||i.value!==a.EditMode.editable)&&(z.value||b.value||!((l=e.dataTransfer)!=null&&l.files)||!e.dataTransfer.files.length||V(e.dataTransfer.files[0]))},ue=()=>{if(i.value!==a.EditMode.editable)return;const e=r.value;e&&e.file&&!e.fileId?r.value=null:e&&e.fileId&&(r.value={...e,isDeleted:!0}),p(null),I.value=!0,n("update:modelValue",r.value),n("remove",e,d.value),n("change",r.value,d.value)},de=()=>{var e;(e=y.value)==null||e.click()},R=e=>{if(!e||!e.getIsDataModel||!e.getIsDataModel()||e.getRowCount()===0)return;const l=e.getRow(0);r.value=l,p(l)},U=()=>{a.hisonCloser.component.imageboxList[u]&&a.hisonCloser.component.imageboxList[u].isHisonvueComponent&&console.warn(`[Hisonvue] The imagebox ID is at risk of being duplicated. ${u}`),a.registerReloadable(x,()=>{j(),o.nextTick(U)}),y.value&&(A(),d.value={isHisonvueComponent:!0,getId:()=>u,getType:()=>"imagebox",isVisible:()=>v.value,setVisible:e=>v.value=e,getEditMode:()=>i.value,setEditMode:e=>{var l,s;i.value=e,(l=a.hisonCloser.component.buttonList[`hison_imagebox_add_button_${u}`])==null||l.setDisable(b.value),(s=a.hisonCloser.component.buttonList[`hison_imagebox_remove_button_${u}`])==null||s.setDisable(b.value)},getValue:()=>a.hison.utils.deepCopyObject(r.value),setValue:e=>{r.value=a.hison.utils.deepCopyObject(e),p(e)},getDataModel:()=>r.value?new a.hison.data.DataModel(r.value):null,setDataModel:e=>{R(e)},load:e=>{e&&e.getIsDataModel&&e.getIsDataModel()?R(e):r.value=a.hison.utils.deepCopyObject(e)},getAttId:()=>F.value,setAttId:e=>{F.value=e},getAddButtonText:()=>M.value,setAddButtonText:e=>M.value=e,getRemoveButtonText:()=>P.value,setRemoveButtonText:e=>P.value=e,getPlaceholder:()=>k.value,setPlaceholder:e=>k.value=e,isEnableDrop:()=>h.value,setEnableDrop:e=>{h.value=e},getAllowedTypes:()=>m.value,setAllowedTypes:e=>m.value=e,getDisallowedTypes:()=>g.value,setDisallowedTypes:e=>{g.value=e},getMaxFileSize:()=>c.value,setMaxFileSize:e=>c.value=e,setOnDisallowedType:e=>{f.value=e},setOnMaxFileSizeExceeded:e=>{C.value=e},isModified:()=>I.value,setModified:e=>I.value=e,isBorder:()=>T.value,setBorder:e=>{T.value=e},getTabIndex:()=>B.value,setTabIndex:e=>{B.value=e!=null?Number(e):null},focus:()=>{var e;(e=a.hisonCloser.component.buttonList[`hison_imagebox_add_button_${u}`])==null||e.focus()},reload:()=>a.reloadHisonComponent(x)},a.hisonCloser.component.imageboxList[u]=d.value,n("mounted",d.value))},j=()=>{delete a.hisonCloser.component.imageboxList[u]};return o.onMounted(U),o.onBeforeUnmount(j),o.watch(()=>t.modelValue,e=>{e!==r.value&&(r.value=e,p(e))}),o.watch(N,e=>{A(),n("responsive-change",e)}),o.watch(()=>t.visible,e=>{const l=!!e;l!==v.value&&(v.value=l)}),o.watch(()=>t.editMode,e=>{e&&e!==i.value&&(i.value=e,o.nextTick(()=>{var l,s;(l=a.hisonCloser.component.buttonList[`hison_imagebox_add_button_${u}`])==null||l.setDisable(b.value),(s=a.hisonCloser.component.buttonList[`hison_imagebox_remove_button_${u}`])==null||s.setDisable(b.value)}))}),o.watch(()=>t.border,e=>{const l=!!e;l!==T.value&&(T.value=l)}),o.watch(()=>t.attId,e=>{const l=e||"";l!==F.value&&(F.value=l)}),o.watch(()=>t.allowedTypes,e=>{const l=Array.isArray(e)?e:e?String(e).split(","):[];l.toString()!==m.value.toString()&&(m.value=l)}),o.watch(()=>t.disallowedTypes,e=>{const l=Array.isArray(e)?e:e?String(e).split(","):[];l.toString()!==g.value.toString()&&(g.value=l)}),o.watch(()=>t.maxFileSize,e=>{const l=Number(e);(Number.isFinite(l)||l===1/0)&&l!==c.value&&(c.value=l)}),o.watch(()=>t.onDisallowedType,e=>{const l=typeof e=="function"?e:void 0;l!==f.value&&(f.value=l)}),o.watch(()=>t.onMaxFileSizeExceeded,e=>{const l=typeof e=="function"?e:void 0;l!==C.value&&(C.value=l)}),o.watch(()=>t.placeholder,e=>{const l=e??"";l!==k.value&&(k.value=l)}),o.watch(()=>t.addButtonText,e=>{const l=e??"";l!==M.value&&(M.value=l)}),o.watch(()=>t.removeButtonText,e=>{const l=e??"";l!==P.value&&(P.value=l)}),o.watch(()=>t.enableDrop,e=>{const l=!!e;l!==h.value&&(h.value=l)}),o.watch(()=>t.modelValue,e=>{e!==r.value&&(r.value=e,p(e))}),o.watch(()=>t.tabIndex,e=>{const l=e===null||e===""?null:Number(e);l!==B.value&&(B.value=l)}),o.watch(()=>t.class,()=>{A()}),{fileInputRef:y,id:u,props:t,imgStyle:o.computed(()=>t.imgStyle||{}),imageValue:r,imageboxMethods:d,visibleClass:W,editModeClass:q,borderClass:G,responsiveClassList:S,buttonClassList:te,disable:b,readonly:z,addButtonText:M,removeButtonText:P,placeholder:k,isDragging:L,previewUrl:D,showAddButton:oe,showRemoveButton:le,accept:J,tabIndex:B,handleDragEnter:se,handleDrop:re,openFileDialog:de,removeImage:ue,onFileChange:ae,onPreviewClick:K,onPreviewDblClick:Q,onPreviewContextMenu:X,onPreviewPointerEnter:Y,onPreviewPointerLeave:Z,onPreviewPointerDown:_,onPreviewPointerUp:ee}}}),ge=["src"],be={class:"img-placeholder"},pe={key:2,class:"imgbox-btn-row"},we={key:1,class:"hison-imagebox-add-text"},ye={key:1,class:"hison-imagebox-add-text"},he={key:1,class:"hison-imagebox-remove-text"},Ce=["id","accept"];function De(t,n,y,u,x,d){const v=o.resolveComponent("HButton");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["hison-imagebox",...t.responsiveClassList,t.visibleClass,t.borderClass,t.editModeClass]),style:o.normalizeStyle(t.props.style)},[o.createElementVNode("div",{class:o.normalizeClass(["img-preview",{"drag-over":t.isDragging}]),onDragover:n[11]||(n[11]=o.withModifiers(()=>{},["prevent"])),onDragenter:n[12]||(n[12]=o.withModifiers((...i)=>t.handleDragEnter&&t.handleDragEnter(...i),["prevent"])),onDragleave:n[13]||(n[13]=o.withModifiers(i=>t.isDragging=!1,["prevent"])),onDrop:n[14]||(n[14]=o.withModifiers((...i)=>t.handleDrop&&t.handleDrop(...i),["prevent"]))},[t.previewUrl?(o.openBlock(),o.createElementBlock("img",{key:0,src:t.previewUrl,class:"preview-img",style:o.normalizeStyle([t.imgStyle]),onClick:n[0]||(n[0]=(...i)=>t.onPreviewClick&&t.onPreviewClick(...i)),onDblclick:n[1]||(n[1]=(...i)=>t.onPreviewDblClick&&t.onPreviewDblClick(...i)),onContextmenu:n[2]||(n[2]=(...i)=>t.onPreviewContextMenu&&t.onPreviewContextMenu(...i)),onPointerenter:n[3]||(n[3]=(...i)=>t.onPreviewPointerEnter&&t.onPreviewPointerEnter(...i)),onPointerleave:n[4]||(n[4]=(...i)=>t.onPreviewPointerLeave&&t.onPreviewPointerLeave(...i)),onPointerdown:n[5]||(n[5]=(...i)=>t.onPreviewPointerDown&&t.onPreviewPointerDown(...i)),onPointerup:n[6]||(n[6]=(...i)=>t.onPreviewPointerUp&&t.onPreviewPointerUp(...i))},null,44,ge)):o.renderSlot(t.$slots,"empty",{key:1},()=>[o.createElementVNode("div",be,o.toDisplayString(t.placeholder),1)]),t.readonly?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",pe,[t.imageValue?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createVNode(v,{id:`hison_imagebox_add_button_${t.id}`,disable:t.disable,class:o.normalizeClass(["hison-col-6",...t.buttonClassList]),onClick:t.openFileDialog,onFocus:n[9]||(n[9]=i=>t.$emit("focus",t.imageboxMethods)),onBlur:n[10]||(n[10]=i=>t.$emit("blur",t.imageboxMethods))},{default:o.withCtx(()=>[t.$slots["add-button"]?o.renderSlot(t.$slots,"add-button",{key:0,add:t.openFileDialog}):(o.openBlock(),o.createElementBlock("span",ye,o.toDisplayString(t.addButtonText),1))]),_:3},8,["id","disable","class","onClick"]),o.createVNode(v,{id:`hison_imagebox_remove_button_${t.id}`,disable:t.disable,class:o.normalizeClass(["hison-col-6",...t.buttonClassList]),onClick:t.removeImage},{default:o.withCtx(()=>[t.$slots["remove-button"]?o.renderSlot(t.$slots,"remove-button",{key:0,remove:t.removeImage}):(o.openBlock(),o.createElementBlock("span",he,o.toDisplayString(t.removeButtonText),1))]),_:3},8,["id","disable","class","onClick"])],64)):(o.openBlock(),o.createBlock(v,{key:0,id:`hison_imagebox_add_button_${t.id}`,disable:t.disable,class:o.normalizeClass(["hison-col-12",...t.buttonClassList]),tabindex:t.tabIndex??void 0,onClick:t.openFileDialog,onFocus:n[7]||(n[7]=i=>t.$emit("focus",t.imageboxMethods)),onBlur:n[8]||(n[8]=i=>t.$emit("blur",t.imageboxMethods))},{default:o.withCtx(()=>[t.$slots["add-button"]?o.renderSlot(t.$slots,"add-button",{key:0,add:t.openFileDialog}):(o.openBlock(),o.createElementBlock("span",we,o.toDisplayString(t.addButtonText),1))]),_:3},8,["id","disable","class","tabindex","onClick"]))]))],34),o.createElementVNode("input",{id:`hison_imagebox_${t.id}`,ref:"fileInputRef",type:"file",accept:t.accept||void 0,multiple:!1,hidden:"",onChange:n[15]||(n[15]=(...i)=>t.onFileChange&&t.onFileChange(...i))},null,40,Ce)],6)}const Se=me._export_sfc(fe,[["render",De]]);exports.default=Se;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("./index-5k-aAQlJ.js"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.js"),ze={id:{type:String,required:!1},name:{type:String,required:!1},modelValue:{type:[String,Number,Boolean,Object,Array,Date],default:null},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},inputType:{type:String,required:!1,validator:e=>u.INPUT_TYPE_VALUES.includes(e)},format:{type:String,required:!1},nullText:{type:String,default:""},maxNumber:{type:[String,Number],required:!1},minNumber:{type:[String,Number],required:!1},roundNumber:{type:[String,Number],required:!1},maxLength:{type:[String,Number],required:!1},maxByte:{type:[String,Number],required:!1},placeholder:{type:String,required:!1},placeholderColor:{type:String,default:"primary"},editMode:{type:String,default:u.EditMode.editable,validator:e=>["editable","disable","readonly"].includes(e)},required:{type:Boolean,default:!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:e=>e==null||u.TEXT_ALIGN_VALUES.includes(e)},border:{type:Boolean,default:!0},options:{type:Array,required:!1,default:()=>[]},checkedText:{type:String,default:"Y"},uncheckedText:{type:String,default:"N"},tabIndex:{type:[Number,String],default:null,validator:e=>e===null||e===""||!isNaN(+e)&&isFinite(+e)},inputTextdHandler:{type:Function,default:void 0},toggleStyle:{type:String,default:"default",validator:e=>["default","switch"].includes(e)}},O=new WeakSet,j=new WeakSet,te=e=>{const n=e.currentTarget;if(u.hisonCloser.event.cssEvent.input_onBeforeFocus(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.add("hison-input-on-active"),u.hisonCloser.event.cssEvent.input_onAfterFocus(e)},ie=e=>{const n=e.currentTarget;if(u.hisonCloser.event.cssEvent.input_onBeforeBlur(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.remove("hison-input-on-active"),n.classList.remove("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterBlur(e)},ue=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeMouseover(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.add("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterMouseover(e)}},le=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeMouseout(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.remove("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterMouseout(e)}},se=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeTouchstart(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.add("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterTouchstart(e)}},re=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeTouchend(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.remove("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterTouchend(e)}},de=e=>{const n=e.currentTarget;n.readOnly||n.classList.remove("hison-input-on-mouseover")},Ke=e=>{O.has(e)||(O.add(e),e.addEventListener("mouseenter",ue),e.addEventListener("mouseleave",le),e.addEventListener("touchstart",se,{passive:!1,capture:!0}),e.addEventListener("touchend",re,{passive:!1,capture:!0}),e.addEventListener("touchcancel",de,{passive:!1,capture:!0}))},Ue=e=>{O.has(e)&&(O.delete(e),e.removeEventListener("mouseenter",ue),e.removeEventListener("mouseleave",le),e.removeEventListener("touchstart",se,{capture:!0}),e.removeEventListener("touchend",re,{capture:!0}),e.removeEventListener("touchcancel",de,{capture:!0}),e.classList.remove("hison-input-on-mouseover"))},He=e=>{j.has(e)||(j.add(e),e.addEventListener("focus",te),e.addEventListener("blur",ie))},Oe=e=>{j.has(e)&&(j.delete(e),e.removeEventListener("focus",te),e.removeEventListener("blur",ie),e.classList.remove("hison-input-on-active"),e.classList.remove("hison-input-on-mouseover"))},je=i.defineComponent({name:"HInput",props:ze,inheritAttrs:!1,emits:["update:modelValue","mounted","responsive-change","click","dblclick","mousedown","mouseup","mouseenter","mouseleave","mouseover","mouseout","mousemove","pointerdown","pointerup","pointermove","pointerenter","pointerleave","touchstart","touchend","touchmove","touchcancel","focus","blur","input","change","compositionstart","compositionupdate","compositionend","keydown","keyup","dragstart","dragend","drag","drop","copy","cut","paste","wheel","contextmenu"],setup(e,{emit:n}){const m=i.ref(null),b=i.ref(null),f=i.ref(null),p=e.id?e.id:u.getUUID(),o=i.ref(e.name??p),ae=i.computed(()=>o.value),W=`hinput:${p}`,c=u.useDevice(),w=i.ref([]),Y=()=>{w.value=u.extractResponsiveClasses(u.toClassString(e.class)||"",c.value),u.getIndexSpecificClassNameFromClassList(w.value,"col")===-1&&w.value.push("hison-col-12"),u.addComponentNameToClass(w.value,"size",u.hisonCloser.componentStyle.size),u.addComponentNameToClass(w.value,"color","primary")},r=i.ref(e.inputType??u.InputType.text),X=i.computed(()=>{switch(r.value){case u.InputType.checkbox:return"checkbox";case u.InputType.radio:return"radio";case u.InputType.select:return"select";case u.InputType.range:return"range";case u.InputType.color:return"color";default:return"text"}}),pe=i.computed(()=>{switch(r.value){case u.InputType.mask:case u.InputType.digit:return"text";default:return r.value}}),L=i.ref(e.toggleStyle??"default"),M=i.ref(e.format??null),T=i.ref(u.hison.utils.isNumeric(e.maxNumber)?Number(e.maxNumber):null),$=i.ref(u.hison.utils.isNumeric(e.minNumber)?Number(e.minNumber):null),B=i.ref(u.hison.utils.isInteger(e.roundNumber)||u.hison.utils.isNegativeInteger(e.roundNumber)||e.roundNumber==="0"?Number(e.roundNumber):null),C=i.ref(u.hison.utils.isPositiveInteger(e.maxLength)?Number(e.maxLength):null),h=i.ref(u.hison.utils.isPositiveInteger(e.maxByte)?Number(e.maxByte):null),J=t=>{switch(t){case u.InputType.number:case u.InputType.digit:return u.TextAlign.right;case u.InputType.date:case u.InputType.month:case u.InputType.time:return u.TextAlign.center;default:return u.TextAlign.left}},k=i.ref(e.textAlign??J(r.value)),me=i.computed(()=>({textAlign:k.value})),E=i.ref(e.border??!0),ve=t=>(t=String(t),C.value&&(t=t.substring(0,C.value)),h.value&&(t=u.hison.utils.getCutByteLength(t,h.value)),t),fe=t=>(t=Number(t),T.value&&t>T.value&&(t=T.value),$.value&&t<$.value&&(t=$.value),B.value&&(t=u.hison.utils.getRound(t,B.value)),t),Q=t=>{if(u.isNullOrUndefined(t))return r.value===u.InputType.checkbox||r.value===u.InputType.radio?!1:t;try{switch(r.value){case u.InputType.text:case u.InputType.password:case u.InputType.email:case u.InputType.mask:case u.InputType.digit:case u.InputType.textarea:r.value===u.InputType.mask&&(t=u.getMaskValue(t,M.value??"")),r.value===u.InputType.digit&&(t=u.getDigitsOnly(t)),t=ve(t);break;case u.InputType.number:r.value===u.InputType.number&&(t=fe(t));break;case u.InputType.date:t&&(t=u.hison.utils.getDateWithFormat(t,u.Hisonjs_bundleExports.DateFormat["yyyy-MM-dd"]));break;case u.InputType.month:t&&(t=u.hison.utils.getDateWithFormat(t,u.Hisonjs_bundleExports.YearMonthFormat["yyyy-MM"]));break;case u.InputType.time:t&&(t=u.hison.utils.getDateWithFormat(t,u.Hisonjs_bundleExports.TimeFormat["HH:mm:ss"]));break;case u.InputType.checkbox:case u.InputType.radio:t=!!t;default:break}}catch(l){console.warn("[HInput] Failed to format value",t,l)}return t},s=i.ref(Q(e.modelValue)),ye=i.computed(()=>s.value),v=i.ref(null),F=i.ref(e.visible),P=i.ref(e.title??""),S=i.ref(e.nullText??""),y=i.ref(e.editMode),Me=i.computed(()=>y.value===u.EditMode.disable),Z=i.computed(()=>y.value===u.EditMode.readonly),ge=i.computed(()=>E.value&&!Z.value?"hison-border":""),be=i.computed(()=>y.value!==u.EditMode.editable?[`hison-input-${y.value}`,`hison-input-${X.value}-${y.value}`]:[]),A=i.ref(e.required),Te=i.computed(()=>A.value?["hison-input-required",`hison-input-${X.value}-required`]:[]),V=i.ref(e.placeholder??""),D=i.ref(e.placeholderColor??"primary"),$e=t=>{if(!t)return null;const l=t.trim();return["primary","muted","info","success","danger","warning","custom1","custom2","custom3","custom4","custom5"].includes(l)?`var(--hison-${l}-emptyTextColor)`:l},Ce=i.computed(()=>{const t=$e(D.value);return t?{"--hison-input-placeholder-color":t}:{}}),q=i.ref(e.fontBold),he=i.computed(()=>{if(q.value)return"hison-font-bold"}),R=i.ref(e.fontItalic),ke=i.computed(()=>{if(R.value)return"hison-font-italic"}),z=i.ref(e.fontThruline),Ie=i.computed(()=>{if(z.value)return"hison-font-thruline"}),K=i.ref(e.fontUnderline),we=i.computed(()=>{if(K.value)return"hison-font-underline"}),Be=i.computed(()=>F.value?"":"hison-display-none"),G=i.ref(!1),g=i.ref(!1),U=i.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),_=i.inject("registerToInputGroup",null),d=i.inject("notifyInputGroupStatus",null),N=i.inject("radioMembershipChanged",null),x=t=>{if(r.value===u.InputType.checkbox||r.value===u.InputType.radio)return t?e.checkedText:e.uncheckedText;if(u.isNullOrUndefined(t)||t==="")return S.value??"";if(e.inputTextdHandler)return e.inputTextdHandler(t);let l=String(t);try{switch(r.value){case u.InputType.password:l="•".repeat(t.length);break;case u.InputType.number:l=u.hison.utils.getNumberFormat(t,M.value??u.hison.getNumberFormat());break;case u.InputType.date:l=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getDateFormat());break;case u.InputType.month:l=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getYearMonthFormat());break;case u.InputType.time:l=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getTimeFormat());break;case u.InputType.select:const I=m.value,oe=I.selectedIndex;l=oe>=0?I.options[oe].text:"";break}}catch(I){console.warn("[HInput] Failed to format value",t,I),l=""}return l},H=i.ref(""),Ne=t=>{y.value===u.EditMode.editable&&(G.value=!0),i.nextTick(()=>{var l;(l=m.value)==null||l.focus()})},Le=t=>{let l=m.value.value;(r.value===u.InputType.mask||r.value===u.InputType.digit||(C.value||h.value)&&(r.value===u.InputType.text||r.value===u.InputType.email||r.value===u.InputType.password||r.value===u.InputType.textarea))&&(l=Q(l),m.value.value=l),s.value=l,g.value=!0,d==null||d(p,s.value),n("input",t,f.value,s.value),n("update:modelValue",s.value)},Ee=t=>{v.value=s.value,n("focus",t,f.value)},Fe=t=>{v.value!==s.value&&(a(s.value,!0,!0),g.value=!0,d==null||d(p,s.value)),G.value=!1,n("blur",t,f.value)},a=(t,l=!0,I=!1)=>{s.value=l?Q(t):t,H.value=x(s.value),r.value===u.InputType.checkbox||r.value===u.InputType.radio?m.value.checked=!!s.value:m.value.value=s.value,I&&n("change",v.value,s.value,f.value)},Pe=t=>{const l=t.target;a(l.value,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},Se=t=>{const l=t.target;a(l.value,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},Ae=t=>{const l=t.target;a(l.checked,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},Ve=t=>{const l=t.target;a(l.checked,!1,!0),g.value=!0,d&&o.value?d(o.value,l.checked?p:null):d==null||d(p,s.value),n("update:modelValue",s.value)},De=t=>{const l=t.target;a(l.value,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},qe=t=>{if(Z.value&&(t.code==="Space"||t.code==="Enter")){t.preventDefault(),t.stopPropagation();return}n("keydown",t,f.value)},ee=()=>{u.hisonCloser.component.inputList[p]&&u.hisonCloser.component.inputList[p].isHisonvueComponent&&console.warn(`[Hisonvue] The input ID is at risk of being duplicated. ${p}`),u.registerReloadable(W,()=>{ne(),i.nextTick(ee)}),m.value&&(Y(),b.value&&Ke(b.value),r.value!==u.InputType.checkbox&&r.value!==u.InputType.radio&&r.value!==u.InputType.range&&r.value!==u.InputType.color&&He(m.value),a(s.value,!1),f.value={isHisonvueComponent:!0,getId:()=>p,getType:()=>"input",getName:()=>o.value,setName:t=>{if(t===o.value)return;const l=o.value;o.value=t,r.value===u.InputType.radio&&(N==null||N(p,l,t,!!s.value))},getText:()=>H.value,getValue:()=>s.value,setValue:t=>{v.value=s.value,s.value=t,a(s.value)},getTitle:()=>P.value,setTitle:t=>{P.value=t},isVisible:()=>F.value,setVisible:t=>{F.value=t},getInputType:()=>r.value,setInputType:t=>{r.value=u.InputType[t],v.value=s.value,a(s.value),e.textAlign==null&&(k.value=J(r.value))},getFormat:()=>M.value??"",setFormat:t=>{M.value=t,v.value=s.value,a(s.value)},getNullText:()=>S.value,setNullText:t=>{S.value=t,(u.isNullOrUndefined(s.value)||s.value==="")&&(H.value=x(s.value))},getEditMode:()=>y.value,setEditMode:t=>{y.value=t},getMaxNumber:()=>T.value,setMaxNumber:t=>{u.hison.utils.isNumeric(t)&&(T.value=t,v.value=s.value,r.value===u.InputType.number&&a(s.value))},getMinNumber:()=>$.value,setMinNumber:t=>{u.hison.utils.isNumeric(t)&&($.value=t,v.value=s.value,r.value===u.InputType.number&&a(s.value))},getRoundNumber:()=>B.value,setRoundNumber:t=>{!u.hison.utils.isPositiveInteger(t)&&!u.hison.utils.isNegativeInteger(t)&&t!==0||(B.value=t,v.value=s.value,r.value===u.InputType.number&&a(s.value))},getMaxLength:()=>C.value,setMaxLength:t=>{u.hison.utils.isPositiveInteger(t)&&(C.value=t),v.value=s.value,a(s.value)},getMaxByte:()=>h.value,setMaxByte:t=>{u.hison.utils.isPositiveInteger(t)&&(h.value=t),v.value=s.value,a(s.value)},getRequired:()=>A.value,setRequired:t=>{A.value=t},getPlaceholder:()=>V.value,setPlaceholder:t=>{V.value=t},getPlaceholderColor:()=>D.value,setPlaceholderColor:t=>{const l=(t??"").trim();D.value=l.length>0?l:"primary"},isFontBold:()=>q.value,setFontBold:t=>{q.value=t},isFontItalic:()=>R.value,setFontItalic:t=>{R.value=t},isFontThruline:()=>z.value,setFontThruline:t=>{z.value=t},isFontUnderline:()=>K.value,setFontUnderline:t=>{K.value=t},getTextAlign:()=>k.value,setTextAlign:t=>{(t===u.TextAlign.left||t===u.TextAlign.center||t===u.TextAlign.right)&&(k.value=t)},isBorder:()=>E.value,setBorder:t=>{E.value=t},isModified:()=>g.value,setModified:t=>{g.value=t},getToggleStyle:()=>L.value,setToggleStyle:t=>{(t==="default"||t==="switch")&&(L.value=t)},getTabIndex:()=>U.value,setTabIndex:t=>{U.value=t!=null?Number(t):null},focus:()=>{var t;b.value?b.value.focus():(t=m.value)==null||t.focus()},reload:()=>u.reloadHisonComponent(W)},u.hisonCloser.component.inputList[p]=f.value,_&&_(p),n("mounted",f.value))},ne=()=>{u.unregisterReloadable(W),delete u.hisonCloser.component.inputList[p],r.value!==u.InputType.checkbox&&r.value!==u.InputType.radio&&r.value!==u.InputType.range&&r.value!==u.InputType.color&&Oe(m.value),b.value&&Ue(b.value)};return i.onMounted(ee),i.onBeforeUnmount(ne),i.watch(c,t=>{Y(),n("responsive-change",t)}),i.watch(()=>e.modelValue,t=>{a(t,!1)}),i.watch(()=>e.name,t=>{if(t&&t!==o.value){const l=o.value;o.value=t,r.value===u.InputType.radio&&(N==null||N(p,l,t,!!s.value))}}),i.watch(()=>e.visible,t=>{const l=!!t;l!==F.value&&(F.value=l)}),i.watch(()=>e.title,t=>{const l=t??"";l!==P.value&&(P.value=l)}),i.watch(()=>e.nullText,t=>{const l=t??"";l!==S.value&&(S.value=l,(u.isNullOrUndefined(s.value)||s.value==="")&&(H.value=x(s.value)))}),i.watch(()=>e.inputType,t=>{t&&t!==r.value&&(r.value=t,e.textAlign==null&&(k.value=J(r.value)),a(s.value))}),i.watch(()=>e.format,t=>{const l=t??null;l!==M.value&&(M.value=l,a(s.value))}),i.watch(()=>e.maxNumber,t=>{const l=u.hison.utils.isNumeric(t)?Number(t):null;l!==T.value&&(T.value=l,r.value===u.InputType.number&&a(s.value))}),i.watch(()=>e.minNumber,t=>{const l=u.hison.utils.isNumeric(t)?Number(t):null;l!==$.value&&($.value=l,r.value===u.InputType.number&&a(s.value))}),i.watch(()=>e.roundNumber,t=>{const l=u.hison.utils.isInteger(t)||u.hison.utils.isNegativeInteger(t)||t==="0"?Number(t):null;l!==B.value&&(B.value=l,r.value===u.InputType.number&&a(s.value))}),i.watch(()=>e.maxLength,t=>{const l=u.hison.utils.isPositiveInteger(t)?Number(t):null;l!==C.value&&(C.value=l,a(s.value))}),i.watch(()=>e.maxByte,t=>{const l=u.hison.utils.isPositiveInteger(t)?Number(t):null;l!==h.value&&(h.value=l,a(s.value))}),i.watch(()=>e.textAlign,t=>{t&&t!==k.value&&(t===u.TextAlign.left||t===u.TextAlign.center||t===u.TextAlign.right)&&(k.value=t)}),i.watch(()=>e.border,t=>{const l=!!t;l!==E.value&&(E.value=l)}),i.watch(()=>e.placeholder,t=>{const l=t??"";l!==V.value&&(V.value=l)}),i.watch(()=>e.placeholderColor,t=>{const l=t??"primary";l!==D.value&&(D.value=l)}),i.watch(()=>e.required,t=>{const l=!!t;l!==A.value&&(A.value=l)}),i.watch(()=>e.fontBold,t=>{const l=!!t;l!==q.value&&(q.value=l)}),i.watch(()=>e.fontItalic,t=>{const l=!!t;l!==R.value&&(R.value=l)}),i.watch(()=>e.fontThruline,t=>{const l=!!t;l!==z.value&&(z.value=l)}),i.watch(()=>e.fontUnderline,t=>{const l=!!t;l!==K.value&&(K.value=l)}),i.watch(()=>e.editMode,t=>{t&&t!==y.value&&(y.value=t)}),i.watch(()=>e.tabIndex,t=>{const l=t===null||t===""?null:Number(t);l!==U.value&&(U.value=l)}),i.watch(()=>e.class,()=>{Y()}),i.watch(()=>e.toggleStyle,t=>{const l=t??"default";l!==L.value&&(l==="default"||l==="switch")&&(L.value=l)}),{inputRef:m,inputTextRef:b,inputMethods:i.computed(()=>i.unref(f)),inputValue:ye,editing:G,props:e,id:p,nameAttr:ae,responsiveClassList:w,visibleClass:Be,editModeClassList:be,requiredClassList:Te,fontBoldClass:he,fontItalicClass:ke,fontThrulineClass:Ie,fontUnderlineClass:we,textAlignStyle:me,placeholderColorStyle:Ce,borderClass:ge,disable:Me,readonly:Z,inputType:r,inputExpressionType:X,inputAttrType:pe,title:P,placeholder:V,maxNumber:T,minNumber:$,spanText:H,toggleStyle:L,tabIndex:U,onInput:Le,onTextInputFocus:Ne,onFocus:Ee,onBlur:Fe,onRangeChange:Pe,onColorChange:Se,onCheckboxChange:Ae,onRadioChange:Ve,onSelectChange:De,onKeydown:qe}}}),We=["id","name","value","disabled","readonly","title","tabindex"],Ye=["id","name","value","disabled","readonly","checked","title","tabindex"],Xe=["id","name","disabled","readonly","checked","title","tabindex"],Je=["id","name","disabled","readonly","checked","title","tabindex"],Qe=["id","name","disabled","readonly","checked","title","tabindex"],Ze=["id","name","disabled","readonly","checked","title","tabindex"],Ge=["id","name","value","disabled","readonly","title","tabindex"],xe=["value"],ce=["id","name","value","disabled","readonly","placeholder","title","maxlength","tabindex"],_e=["id","name","value","disabled","readonly","title","placeholder","tabindex"],en=["id","name","value","disabled","readonly","type","title","placeholder","max","min","tabindex"];function nn(e,n,m,b,f,p){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["hison-wrapper","hison-s-input-margin-adjustment",...e.responsiveClassList,e.visibleClass])},[e.inputType==="range"?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["hison-input","hison-input-range-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"range",class:i.normalizeClass([`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList]),value:e.inputValue,disabled:e.disable,readonly:e.readonly,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[0]||(n[0]=(...o)=>e.onRangeChange&&e.onRangeChange(...o)),onFocus:n[1]||(n[1]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[2]||(n[2]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[3]||(n[3]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[4]||(n[4]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[5]||(n[5]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[6]||(n[6]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[7]||(n[7]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[8]||(n[8]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[9]||(n[9]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[10]||(n[10]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[11]||(n[11]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[12]||(n[12]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[13]||(n[13]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[14]||(n[14]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[15]||(n[15]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[16]||(n[16]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[17]||(n[17]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[18]||(n[18]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[19]||(n[19]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[20]||(n[20]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[21]||(n[21]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,We)],4)):e.inputType==="color"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["hison-input","hison-input-color-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"color",class:i.normalizeClass([`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList]),value:e.inputValue,disabled:e.disable,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[22]||(n[22]=(...o)=>e.onColorChange&&e.onColorChange(...o)),onFocus:n[23]||(n[23]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[24]||(n[24]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[25]||(n[25]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[26]||(n[26]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[27]||(n[27]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[28]||(n[28]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[29]||(n[29]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[30]||(n[30]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[31]||(n[31]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[32]||(n[32]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[33]||(n[33]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[34]||(n[34]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[35]||(n[35]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[36]||(n[36]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[37]||(n[37]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[38]||(n[38]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[39]||(n[39]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[40]||(n[40]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[41]||(n[41]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[42]||(n[42]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[43]||(n[43]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,Ye)],4)):e.inputType==="checkbox"?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["hison-input","hison-input-checkbox-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[e.toggleStyle!=="switch"?(i.openBlock(),i.createElementBlock("input",{key:0,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"checkbox",class:i.normalizeClass([`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList]),disabled:e.disable,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[44]||(n[44]=(...o)=>e.onCheckboxChange&&e.onCheckboxChange(...o)),onFocus:n[45]||(n[45]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[46]||(n[46]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[47]||(n[47]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[48]||(n[48]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[49]||(n[49]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[50]||(n[50]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[51]||(n[51]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[52]||(n[52]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[53]||(n[53]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[54]||(n[54]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[55]||(n[55]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[56]||(n[56]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[57]||(n[57]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[58]||(n[58]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[59]||(n[59]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[60]||(n[60]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[61]||(n[61]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[62]||(n[62]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[63]||(n[63]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[64]||(n[64]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[65]||(n[65]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,Xe)):(i.openBlock(),i.createElementBlock("label",{key:1,class:i.normalizeClass(["hison-input-checkbox-switch",...e.editModeClassList])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"checkbox",class:"hison-cswitch-input",disabled:e.disable,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[66]||(n[66]=(...o)=>e.onCheckboxChange&&e.onCheckboxChange(...o)),onFocus:n[67]||(n[67]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[68]||(n[68]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[69]||(n[69]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[70]||(n[70]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[71]||(n[71]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[72]||(n[72]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[73]||(n[73]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[74]||(n[74]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[75]||(n[75]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[76]||(n[76]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[77]||(n[77]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[78]||(n[78]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[79]||(n[79]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[80]||(n[80]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[81]||(n[81]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[82]||(n[82]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[83]||(n[83]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[84]||(n[84]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[85]||(n[85]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[86]||(n[86]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[87]||(n[87]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,40,Je),i.createElementVNode("span",{class:i.normalizeClass(["hison-switch-visual",[...e.editModeClassList,...e.requiredClassList]]),"aria-hidden":"true"},null,2)],2))],4)):e.inputType==="radio"?(i.openBlock(),i.createElementBlock("div",{key:3,class:i.normalizeClass(["hison-input","hison-input-radio-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[e.toggleStyle!=="switch"?(i.openBlock(),i.createElementBlock("input",{key:0,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"radio",class:i.normalizeClass([`hison-input-${e.inputType}`,"hison-input-radio--default",...e.editModeClassList,...e.requiredClassList]),disabled:e.disable||e.readonly,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[88]||(n[88]=(...o)=>e.onRadioChange&&e.onRadioChange(...o)),onFocus:n[89]||(n[89]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[90]||(n[90]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[91]||(n[91]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[92]||(n[92]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[93]||(n[93]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[94]||(n[94]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[95]||(n[95]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[96]||(n[96]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[97]||(n[97]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[98]||(n[98]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[99]||(n[99]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[100]||(n[100]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[101]||(n[101]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[102]||(n[102]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[103]||(n[103]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[104]||(n[104]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[105]||(n[105]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[106]||(n[106]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[107]||(n[107]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[108]||(n[108]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[109]||(n[109]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,Qe)):(i.openBlock(),i.createElementBlock("label",{key:1,class:i.normalizeClass(["hison-input-radio-switch",...e.editModeClassList])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"radio",class:"hison-radio-switch-input",disabled:e.disable||e.readonly,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[110]||(n[110]=(...o)=>e.onRadioChange&&e.onRadioChange(...o)),onFocus:n[111]||(n[111]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[112]||(n[112]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[113]||(n[113]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[114]||(n[114]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[115]||(n[115]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[116]||(n[116]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[117]||(n[117]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[118]||(n[118]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[119]||(n[119]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[120]||(n[120]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[121]||(n[121]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[122]||(n[122]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[123]||(n[123]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[124]||(n[124]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[125]||(n[125]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[126]||(n[126]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[127]||(n[127]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[128]||(n[128]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[129]||(n[129]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[130]||(n[130]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[131]||(n[131]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,40,Ze),i.createElementVNode("span",{class:i.normalizeClass(["hison-switch-visual",[...e.editModeClassList,...e.requiredClassList]]),"aria-hidden":"true"},null,2)],2))],4)):e.inputType==="select"?(i.openBlock(),i.createElementBlock("select",{key:4,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),class:i.normalizeClass(["hison-input",`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList,e.fontBoldClass,e.fontItalicClass,e.fontThrulineClass,e.fontUnderlineClass,e.borderClass]),value:e.inputValue,disabled:e.disable,readonly:e.readonly,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[132]||(n[132]=(...o)=>e.onSelectChange&&e.onSelectChange(...o)),onFocus:n[133]||(n[133]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[134]||(n[134]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[135]||(n[135]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[136]||(n[136]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[137]||(n[137]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[138]||(n[138]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[139]||(n[139]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[140]||(n[140]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[141]||(n[141]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[142]||(n[142]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[143]||(n[143]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[144]||(n[144]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[145]||(n[145]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[146]||(n[146]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[147]||(n[147]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[148]||(n[148]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[149]||(n[149]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[150]||(n[150]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[151]||(n[151]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[152]||(n[152]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[153]||(n[153]=o=>e.$emit("contextmenu",o,e.inputMethods))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.props.options,o=>(i.openBlock(),i.createElementBlock("option",{key:o.value,value:o.value},i.toDisplayString(o.text),9,xe))),128))],46,Ge)):e.inputType==="textarea"?(i.openBlock(),i.createElementBlock("textarea",{key:5,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,class:i.normalizeClass(["hison-input",`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList,e.fontBoldClass,e.fontItalicClass,e.fontThrulineClass,e.fontUnderlineClass,e.borderClass]),value:e.inputValue,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),disabled:e.disable,readonly:e.readonly,placeholder:e.placeholder||void 0,title:e.title||void 0,maxlength:e.maxLength||void 0,tabindex:e.tabIndex??void 0,onInput:n[154]||(n[154]=(...o)=>e.onInput&&e.onInput(...o)),onFocus:n[155]||(n[155]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[156]||(n[156]=(...o)=>e.onBlur&&e.onBlur(...o))},i.toDisplayString(e.inputValue),47,ce)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:6},[i.withDirectives(i.createElementVNode("input",{ref:"inputTextRef",id:`input_text_${e.id}`,name:`input_text_${e.nameAttr}`,class:i.normalizeClass(["hison-input",`hison-input-text-${e.inputType}`,...e.editModeClassList,...e.requiredClassList,e.fontBoldClass,e.fontItalicClass,e.fontThrulineClass,e.fontUnderlineClass,e.borderClass]),type:"text",value:e.spanText,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),disabled:e.disable,readonly:e.readonly,title:e.title||void 0,placeholder:e.placeholder||void 0,tabindex:e.tabIndex??void 0,onFocus:n[157]||(n[157]=(...o)=>e.onTextInputFocus&&e.onTextInputFocus(...o)),onClick:n[158]||(n[158]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[159]||(n[159]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[160]||(n[160]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[161]||(n[161]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[162]||(n[162]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[163]||(n[163]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[164]||(n[164]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[165]||(n[165]=o=>e.$emit("mouseout",o,e.inputMethods)),onMousemove:n[166]||(n[166]=o=>e.$emit("mousemove",o,e.inputMethods)),onPointerdown:n[167]||(n[167]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[168]||(n[168]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[169]||(n[169]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[170]||(n[170]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[171]||(n[171]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[172]||(n[172]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[173]||(n[173]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[174]||(n[174]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[175]||(n[175]=o=>e.$emit("touchcancel",o,e.inputMethods))},null,46,_e),[[i.vShow,!e.editing]]),i.withDirectives(i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,class:i.normalizeClass(["hison-input",`hison-input-${e.inputType}`,...e.editModeClassList,e.borderClass]),value:e.inputValue,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),disabled:e.disable,readonly:e.readonly,type:e.inputType,title:e.title||void 0,placeholder:e.placeholder||void 0,max:e.maxNumber||void 0,min:e.minNumber||void 0,tabindex:e.tabIndex??void 0,onFocus:n[176]||(n[176]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[177]||(n[177]=(...o)=>e.onBlur&&e.onBlur(...o)),onInput:n[178]||(n[178]=(...o)=>e.onInput&&e.onInput(...o)),onCompositionstart:n[179]||(n[179]=o=>e.$emit("compositionstart",o,e.inputMethods)),onCompositionupdate:n[180]||(n[180]=o=>e.$emit("compositionupdate",o,e.inputMethods)),onCompositionend:n[181]||(n[181]=o=>e.$emit("compositionend",o,e.inputMethods)),onKeydown:n[182]||(n[182]=o=>e.$emit("keydown",o,e.inputMethods)),onKeyup:n[183]||(n[183]=o=>e.$emit("keyup",o,e.inputMethods)),onDragstart:n[184]||(n[184]=o=>e.$emit("dragstart",o,e.inputMethods)),onDragend:n[185]||(n[185]=o=>e.$emit("dragend",o,e.inputMethods)),onDrag:n[186]||(n[186]=o=>e.$emit("drag",o,e.inputMethods)),onDrop:n[187]||(n[187]=o=>e.$emit("drop",o,e.inputMethods)),onCopy:n[188]||(n[188]=o=>e.$emit("copy",o,e.inputMethods)),onCut:n[189]||(n[189]=o=>e.$emit("cut",o,e.inputMethods)),onPaste:n[190]||(n[190]=o=>e.$emit("paste",o,e.inputMethods)),onWheel:n[191]||(n[191]=o=>e.$emit("wheel",o,e.inputMethods)),onContextmenu:n[192]||(n[192]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,46,en),[[i.vShow,e.editing]])],64))],2)}const on=Re._export_sfc(je,[["render",nn],["__scopeId","data-v-f3c99304"]]);exports.default=on;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("./index-DcB16odB.js"),Re=require("./_plugin-vue_export-helper-BHFhmbuH.js"),ze={id:{type:String,required:!1},name:{type:String,required:!1},modelValue:{type:[String,Number,Boolean,Object,Array,Date],default:null},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},inputType:{type:String,required:!1,validator:e=>u.INPUT_TYPE_VALUES.includes(e)},format:{type:String,required:!1},nullText:{type:String,default:""},maxNumber:{type:[String,Number],required:!1},minNumber:{type:[String,Number],required:!1},roundNumber:{type:[String,Number],required:!1},maxLength:{type:[String,Number],required:!1},maxByte:{type:[String,Number],required:!1},placeholder:{type:String,required:!1},placeholderColor:{type:String,default:"primary"},editMode:{type:String,default:u.EditMode.editable,validator:e=>["editable","disable","readonly"].includes(e)},required:{type:Boolean,default:!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:e=>e==null||u.TEXT_ALIGN_VALUES.includes(e)},border:{type:Boolean,default:!0},options:{type:Array,required:!1,default:()=>[]},checkedText:{type:String,default:"Y"},uncheckedText:{type:String,default:"N"},tabIndex:{type:[Number,String],default:null,validator:e=>e===null||e===""||!isNaN(+e)&&isFinite(+e)},inputTextdHandler:{type:Function,default:void 0},toggleStyle:{type:String,default:"default",validator:e=>["default","switch"].includes(e)}},O=new WeakSet,j=new WeakSet,te=e=>{const n=e.currentTarget;if(u.hisonCloser.event.cssEvent.input_onBeforeFocus(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.add("hison-input-on-active"),u.hisonCloser.event.cssEvent.input_onAfterFocus(e)},ie=e=>{const n=e.currentTarget;if(u.hisonCloser.event.cssEvent.input_onBeforeBlur(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.remove("hison-input-on-active"),n.classList.remove("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterBlur(e)},ue=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeMouseover(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.add("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterMouseover(e)}},le=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeMouseout(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.remove("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterMouseout(e)}},se=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeTouchstart(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.add("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterTouchstart(e)}},re=e=>{const n=e.currentTarget;if(!n.readOnly){if(u.hisonCloser.event.cssEvent.input_onBeforeTouchend(e)===!1){e.stopPropagation(),e.preventDefault();return}n.classList.remove("hison-input-on-mouseover"),u.hisonCloser.event.cssEvent.input_onAfterTouchend(e)}},de=e=>{const n=e.currentTarget;n.readOnly||n.classList.remove("hison-input-on-mouseover")},Ke=e=>{O.has(e)||(O.add(e),e.addEventListener("mouseenter",ue),e.addEventListener("mouseleave",le),e.addEventListener("touchstart",se,{passive:!1,capture:!0}),e.addEventListener("touchend",re,{passive:!1,capture:!0}),e.addEventListener("touchcancel",de,{passive:!1,capture:!0}))},Ue=e=>{O.has(e)&&(O.delete(e),e.removeEventListener("mouseenter",ue),e.removeEventListener("mouseleave",le),e.removeEventListener("touchstart",se,{capture:!0}),e.removeEventListener("touchend",re,{capture:!0}),e.removeEventListener("touchcancel",de,{capture:!0}),e.classList.remove("hison-input-on-mouseover"))},He=e=>{j.has(e)||(j.add(e),e.addEventListener("focus",te),e.addEventListener("blur",ie))},Oe=e=>{j.has(e)&&(j.delete(e),e.removeEventListener("focus",te),e.removeEventListener("blur",ie),e.classList.remove("hison-input-on-active"),e.classList.remove("hison-input-on-mouseover"))},je=i.defineComponent({name:"HInput",props:ze,inheritAttrs:!1,emits:["update:modelValue","mounted","responsive-change","click","dblclick","mousedown","mouseup","mouseenter","mouseleave","mouseover","mouseout","mousemove","pointerdown","pointerup","pointermove","pointerenter","pointerleave","touchstart","touchend","touchmove","touchcancel","focus","blur","input","change","compositionstart","compositionupdate","compositionend","keydown","keyup","dragstart","dragend","drag","drop","copy","cut","paste","wheel","contextmenu"],setup(e,{emit:n}){const m=i.ref(null),b=i.ref(null),f=i.ref(null),p=e.id?e.id:u.getUUID(),o=i.ref(e.name??p),ae=i.computed(()=>o.value),W=`hinput:${p}`,c=u.useDevice(),w=i.ref([]),Y=()=>{w.value=u.extractResponsiveClasses(u.toClassString(e.class)||"",c.value),u.getIndexSpecificClassNameFromClassList(w.value,"col")===-1&&w.value.push("hison-col-12"),u.addComponentNameToClass(w.value,"size",u.hisonCloser.componentStyle.size),u.addComponentNameToClass(w.value,"color","primary")},r=i.ref(e.inputType??u.InputType.text),X=i.computed(()=>{switch(r.value){case u.InputType.checkbox:return"checkbox";case u.InputType.radio:return"radio";case u.InputType.select:return"select";case u.InputType.range:return"range";case u.InputType.color:return"color";default:return"text"}}),pe=i.computed(()=>{switch(r.value){case u.InputType.mask:case u.InputType.digit:return"text";default:return r.value}}),L=i.ref(e.toggleStyle??"default"),M=i.ref(e.format??null),T=i.ref(u.hison.utils.isNumeric(e.maxNumber)?Number(e.maxNumber):null),$=i.ref(u.hison.utils.isNumeric(e.minNumber)?Number(e.minNumber):null),B=i.ref(u.hison.utils.isInteger(e.roundNumber)||u.hison.utils.isNegativeInteger(e.roundNumber)||e.roundNumber==="0"?Number(e.roundNumber):null),C=i.ref(u.hison.utils.isPositiveInteger(e.maxLength)?Number(e.maxLength):null),h=i.ref(u.hison.utils.isPositiveInteger(e.maxByte)?Number(e.maxByte):null),J=t=>{switch(t){case u.InputType.number:case u.InputType.digit:return u.TextAlign.right;case u.InputType.date:case u.InputType.month:case u.InputType.time:return u.TextAlign.center;default:return u.TextAlign.left}},k=i.ref(e.textAlign??J(r.value)),me=i.computed(()=>({textAlign:k.value})),E=i.ref(e.border??!0),ve=t=>(t=String(t),C.value&&(t=t.substring(0,C.value)),h.value&&(t=u.hison.utils.getCutByteLength(t,h.value)),t),fe=t=>(t=Number(t),T.value&&t>T.value&&(t=T.value),$.value&&t<$.value&&(t=$.value),B.value&&(t=u.hison.utils.getRound(t,B.value)),t),Q=t=>{if(u.isNullOrUndefined(t))return r.value===u.InputType.checkbox||r.value===u.InputType.radio?!1:t;try{switch(r.value){case u.InputType.text:case u.InputType.password:case u.InputType.email:case u.InputType.mask:case u.InputType.digit:case u.InputType.textarea:r.value===u.InputType.mask&&(t=u.getMaskValue(t,M.value??"")),r.value===u.InputType.digit&&(t=u.getDigitsOnly(t)),t=ve(t);break;case u.InputType.number:r.value===u.InputType.number&&(t=fe(t));break;case u.InputType.date:t&&(t=u.hison.utils.getDateWithFormat(t,u.Hisonjs_bundleExports.DateFormat["yyyy-MM-dd"]));break;case u.InputType.month:t&&(t=u.hison.utils.getDateWithFormat(t,u.Hisonjs_bundleExports.YearMonthFormat["yyyy-MM"]));break;case u.InputType.time:t&&(t=u.hison.utils.getDateWithFormat(t,u.Hisonjs_bundleExports.TimeFormat["HH:mm:ss"]));break;case u.InputType.checkbox:case u.InputType.radio:t=!!t;default:break}}catch(l){console.warn("[HInput] Failed to format value",t,l)}return t},s=i.ref(Q(e.modelValue)),ye=i.computed(()=>s.value),v=i.ref(null),F=i.ref(e.visible),P=i.ref(e.title??""),S=i.ref(e.nullText??""),y=i.ref(e.editMode),Me=i.computed(()=>y.value===u.EditMode.disable),Z=i.computed(()=>y.value===u.EditMode.readonly),ge=i.computed(()=>E.value&&!Z.value?"hison-border":""),be=i.computed(()=>y.value!==u.EditMode.editable?[`hison-input-${y.value}`,`hison-input-${X.value}-${y.value}`]:[]),A=i.ref(e.required),Te=i.computed(()=>A.value?["hison-input-required",`hison-input-${X.value}-required`]:[]),V=i.ref(e.placeholder??""),D=i.ref(e.placeholderColor??"primary"),$e=t=>{if(!t)return null;const l=t.trim();return["primary","muted","info","success","danger","warning","custom1","custom2","custom3","custom4","custom5"].includes(l)?`var(--hison-${l}-emptyTextColor)`:l},Ce=i.computed(()=>{const t=$e(D.value);return t?{"--hison-input-placeholder-color":t}:{}}),q=i.ref(e.fontBold),he=i.computed(()=>{if(q.value)return"hison-font-bold"}),R=i.ref(e.fontItalic),ke=i.computed(()=>{if(R.value)return"hison-font-italic"}),z=i.ref(e.fontThruline),Ie=i.computed(()=>{if(z.value)return"hison-font-thruline"}),K=i.ref(e.fontUnderline),we=i.computed(()=>{if(K.value)return"hison-font-underline"}),Be=i.computed(()=>F.value?"":"hison-display-none"),G=i.ref(!1),g=i.ref(!1),U=i.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),_=i.inject("registerToInputGroup",null),d=i.inject("notifyInputGroupStatus",null),N=i.inject("radioMembershipChanged",null),x=t=>{if(r.value===u.InputType.checkbox||r.value===u.InputType.radio)return t?e.checkedText:e.uncheckedText;if(u.isNullOrUndefined(t)||t==="")return S.value??"";if(e.inputTextdHandler)return e.inputTextdHandler(t);let l=String(t);try{switch(r.value){case u.InputType.password:l="•".repeat(t.length);break;case u.InputType.number:l=u.hison.utils.getNumberFormat(t,M.value??u.hison.getNumberFormat());break;case u.InputType.date:l=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getDateFormat());break;case u.InputType.month:l=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getYearMonthFormat());break;case u.InputType.time:l=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getTimeFormat());break;case u.InputType.select:const I=m.value,oe=I.selectedIndex;l=oe>=0?I.options[oe].text:"";break}}catch(I){console.warn("[HInput] Failed to format value",t,I),l=""}return l},H=i.ref(""),Ne=t=>{y.value===u.EditMode.editable&&(G.value=!0),i.nextTick(()=>{var l;(l=m.value)==null||l.focus()})},Le=t=>{let l=m.value.value;(r.value===u.InputType.mask||r.value===u.InputType.digit||(C.value||h.value)&&(r.value===u.InputType.text||r.value===u.InputType.email||r.value===u.InputType.password||r.value===u.InputType.textarea))&&(l=Q(l),m.value.value=l),s.value=l,g.value=!0,d==null||d(p,s.value),n("input",t,f.value,s.value),n("update:modelValue",s.value)},Ee=t=>{v.value=s.value,n("focus",t,f.value)},Fe=t=>{v.value!==s.value&&(a(s.value,!0,!0),g.value=!0,d==null||d(p,s.value)),G.value=!1,n("blur",t,f.value)},a=(t,l=!0,I=!1)=>{s.value=l?Q(t):t,H.value=x(s.value),r.value===u.InputType.checkbox||r.value===u.InputType.radio?m.value.checked=!!s.value:m.value.value=s.value,I&&n("change",v.value,s.value,f.value)},Pe=t=>{const l=t.target;a(l.value,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},Se=t=>{const l=t.target;a(l.value,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},Ae=t=>{const l=t.target;a(l.checked,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},Ve=t=>{const l=t.target;a(l.checked,!1,!0),g.value=!0,d&&o.value?d(o.value,l.checked?p:null):d==null||d(p,s.value),n("update:modelValue",s.value)},De=t=>{const l=t.target;a(l.value,!1,!0),g.value=!0,d==null||d(p,s.value),n("update:modelValue",s.value)},qe=t=>{if(Z.value&&(t.code==="Space"||t.code==="Enter")){t.preventDefault(),t.stopPropagation();return}n("keydown",t,f.value)},ee=()=>{u.hisonCloser.component.inputList[p]&&u.hisonCloser.component.inputList[p].isHisonvueComponent&&console.warn(`[Hisonvue] The input ID is at risk of being duplicated. ${p}`),u.registerReloadable(W,()=>{ne(),i.nextTick(ee)}),m.value&&(Y(),b.value&&Ke(b.value),r.value!==u.InputType.checkbox&&r.value!==u.InputType.radio&&r.value!==u.InputType.range&&r.value!==u.InputType.color&&He(m.value),a(s.value,!1),f.value={isHisonvueComponent:!0,getId:()=>p,getType:()=>"input",getName:()=>o.value,setName:t=>{if(t===o.value)return;const l=o.value;o.value=t,r.value===u.InputType.radio&&(N==null||N(p,l,t,!!s.value))},getText:()=>H.value,getValue:()=>s.value,setValue:t=>{v.value=s.value,s.value=t,a(s.value)},getTitle:()=>P.value,setTitle:t=>{P.value=t},isVisible:()=>F.value,setVisible:t=>{F.value=t},getInputType:()=>r.value,setInputType:t=>{r.value=u.InputType[t],v.value=s.value,a(s.value),e.textAlign==null&&(k.value=J(r.value))},getFormat:()=>M.value??"",setFormat:t=>{M.value=t,v.value=s.value,a(s.value)},getNullText:()=>S.value,setNullText:t=>{S.value=t,(u.isNullOrUndefined(s.value)||s.value==="")&&(H.value=x(s.value))},getEditMode:()=>y.value,setEditMode:t=>{y.value=t},getMaxNumber:()=>T.value,setMaxNumber:t=>{u.hison.utils.isNumeric(t)&&(T.value=t,v.value=s.value,r.value===u.InputType.number&&a(s.value))},getMinNumber:()=>$.value,setMinNumber:t=>{u.hison.utils.isNumeric(t)&&($.value=t,v.value=s.value,r.value===u.InputType.number&&a(s.value))},getRoundNumber:()=>B.value,setRoundNumber:t=>{!u.hison.utils.isPositiveInteger(t)&&!u.hison.utils.isNegativeInteger(t)&&t!==0||(B.value=t,v.value=s.value,r.value===u.InputType.number&&a(s.value))},getMaxLength:()=>C.value,setMaxLength:t=>{u.hison.utils.isPositiveInteger(t)&&(C.value=t),v.value=s.value,a(s.value)},getMaxByte:()=>h.value,setMaxByte:t=>{u.hison.utils.isPositiveInteger(t)&&(h.value=t),v.value=s.value,a(s.value)},getRequired:()=>A.value,setRequired:t=>{A.value=t},getPlaceholder:()=>V.value,setPlaceholder:t=>{V.value=t},getPlaceholderColor:()=>D.value,setPlaceholderColor:t=>{const l=(t??"").trim();D.value=l.length>0?l:"primary"},isFontBold:()=>q.value,setFontBold:t=>{q.value=t},isFontItalic:()=>R.value,setFontItalic:t=>{R.value=t},isFontThruline:()=>z.value,setFontThruline:t=>{z.value=t},isFontUnderline:()=>K.value,setFontUnderline:t=>{K.value=t},getTextAlign:()=>k.value,setTextAlign:t=>{(t===u.TextAlign.left||t===u.TextAlign.center||t===u.TextAlign.right)&&(k.value=t)},isBorder:()=>E.value,setBorder:t=>{E.value=t},isModified:()=>g.value,setModified:t=>{g.value=t},getToggleStyle:()=>L.value,setToggleStyle:t=>{(t==="default"||t==="switch")&&(L.value=t)},getTabIndex:()=>U.value,setTabIndex:t=>{U.value=t!=null?Number(t):null},focus:()=>{var t;b.value?b.value.focus():(t=m.value)==null||t.focus()},reload:()=>u.reloadHisonComponent(W)},u.hisonCloser.component.inputList[p]=f.value,_&&_(p),n("mounted",f.value))},ne=()=>{u.unregisterReloadable(W),delete u.hisonCloser.component.inputList[p],r.value!==u.InputType.checkbox&&r.value!==u.InputType.radio&&r.value!==u.InputType.range&&r.value!==u.InputType.color&&Oe(m.value),b.value&&Ue(b.value)};return i.onMounted(ee),i.onBeforeUnmount(ne),i.watch(c,t=>{Y(),n("responsive-change",t)}),i.watch(()=>e.modelValue,t=>{a(t,!1)}),i.watch(()=>e.name,t=>{if(t&&t!==o.value){const l=o.value;o.value=t,r.value===u.InputType.radio&&(N==null||N(p,l,t,!!s.value))}}),i.watch(()=>e.visible,t=>{const l=!!t;l!==F.value&&(F.value=l)}),i.watch(()=>e.title,t=>{const l=t??"";l!==P.value&&(P.value=l)}),i.watch(()=>e.nullText,t=>{const l=t??"";l!==S.value&&(S.value=l,(u.isNullOrUndefined(s.value)||s.value==="")&&(H.value=x(s.value)))}),i.watch(()=>e.inputType,t=>{t&&t!==r.value&&(r.value=t,e.textAlign==null&&(k.value=J(r.value)),a(s.value))}),i.watch(()=>e.format,t=>{const l=t??null;l!==M.value&&(M.value=l,a(s.value))}),i.watch(()=>e.maxNumber,t=>{const l=u.hison.utils.isNumeric(t)?Number(t):null;l!==T.value&&(T.value=l,r.value===u.InputType.number&&a(s.value))}),i.watch(()=>e.minNumber,t=>{const l=u.hison.utils.isNumeric(t)?Number(t):null;l!==$.value&&($.value=l,r.value===u.InputType.number&&a(s.value))}),i.watch(()=>e.roundNumber,t=>{const l=u.hison.utils.isInteger(t)||u.hison.utils.isNegativeInteger(t)||t==="0"?Number(t):null;l!==B.value&&(B.value=l,r.value===u.InputType.number&&a(s.value))}),i.watch(()=>e.maxLength,t=>{const l=u.hison.utils.isPositiveInteger(t)?Number(t):null;l!==C.value&&(C.value=l,a(s.value))}),i.watch(()=>e.maxByte,t=>{const l=u.hison.utils.isPositiveInteger(t)?Number(t):null;l!==h.value&&(h.value=l,a(s.value))}),i.watch(()=>e.textAlign,t=>{t&&t!==k.value&&(t===u.TextAlign.left||t===u.TextAlign.center||t===u.TextAlign.right)&&(k.value=t)}),i.watch(()=>e.border,t=>{const l=!!t;l!==E.value&&(E.value=l)}),i.watch(()=>e.placeholder,t=>{const l=t??"";l!==V.value&&(V.value=l)}),i.watch(()=>e.placeholderColor,t=>{const l=t??"primary";l!==D.value&&(D.value=l)}),i.watch(()=>e.required,t=>{const l=!!t;l!==A.value&&(A.value=l)}),i.watch(()=>e.fontBold,t=>{const l=!!t;l!==q.value&&(q.value=l)}),i.watch(()=>e.fontItalic,t=>{const l=!!t;l!==R.value&&(R.value=l)}),i.watch(()=>e.fontThruline,t=>{const l=!!t;l!==z.value&&(z.value=l)}),i.watch(()=>e.fontUnderline,t=>{const l=!!t;l!==K.value&&(K.value=l)}),i.watch(()=>e.editMode,t=>{t&&t!==y.value&&(y.value=t)}),i.watch(()=>e.tabIndex,t=>{const l=t===null||t===""?null:Number(t);l!==U.value&&(U.value=l)}),i.watch(()=>e.class,()=>{Y()}),i.watch(()=>e.toggleStyle,t=>{const l=t??"default";l!==L.value&&(l==="default"||l==="switch")&&(L.value=l)}),{inputRef:m,inputTextRef:b,inputMethods:i.computed(()=>i.unref(f)),inputValue:ye,editing:G,props:e,id:p,nameAttr:ae,responsiveClassList:w,visibleClass:Be,editModeClassList:be,requiredClassList:Te,fontBoldClass:he,fontItalicClass:ke,fontThrulineClass:Ie,fontUnderlineClass:we,textAlignStyle:me,placeholderColorStyle:Ce,borderClass:ge,disable:Me,readonly:Z,inputType:r,inputExpressionType:X,inputAttrType:pe,title:P,placeholder:V,maxNumber:T,minNumber:$,spanText:H,toggleStyle:L,tabIndex:U,onInput:Le,onTextInputFocus:Ne,onFocus:Ee,onBlur:Fe,onRangeChange:Pe,onColorChange:Se,onCheckboxChange:Ae,onRadioChange:Ve,onSelectChange:De,onKeydown:qe}}}),We=["id","name","value","disabled","readonly","title","tabindex"],Ye=["id","name","value","disabled","readonly","checked","title","tabindex"],Xe=["id","name","disabled","readonly","checked","title","tabindex"],Je=["id","name","disabled","readonly","checked","title","tabindex"],Qe=["id","name","disabled","readonly","checked","title","tabindex"],Ze=["id","name","disabled","readonly","checked","title","tabindex"],Ge=["id","name","value","disabled","readonly","title","tabindex"],xe=["value"],ce=["id","name","value","disabled","readonly","placeholder","title","maxlength","tabindex"],_e=["id","name","value","disabled","readonly","title","placeholder","tabindex"],en=["id","name","value","disabled","readonly","type","title","placeholder","max","min","tabindex"];function nn(e,n,m,b,f,p){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["hison-wrapper","hison-s-input-margin-adjustment",...e.responsiveClassList,e.visibleClass])},[e.inputType==="range"?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["hison-input","hison-input-range-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"range",class:i.normalizeClass([`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList]),value:e.inputValue,disabled:e.disable,readonly:e.readonly,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[0]||(n[0]=(...o)=>e.onRangeChange&&e.onRangeChange(...o)),onFocus:n[1]||(n[1]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[2]||(n[2]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[3]||(n[3]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[4]||(n[4]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[5]||(n[5]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[6]||(n[6]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[7]||(n[7]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[8]||(n[8]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[9]||(n[9]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[10]||(n[10]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[11]||(n[11]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[12]||(n[12]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[13]||(n[13]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[14]||(n[14]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[15]||(n[15]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[16]||(n[16]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[17]||(n[17]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[18]||(n[18]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[19]||(n[19]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[20]||(n[20]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[21]||(n[21]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,We)],4)):e.inputType==="color"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["hison-input","hison-input-color-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"color",class:i.normalizeClass([`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList]),value:e.inputValue,disabled:e.disable,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[22]||(n[22]=(...o)=>e.onColorChange&&e.onColorChange(...o)),onFocus:n[23]||(n[23]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[24]||(n[24]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[25]||(n[25]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[26]||(n[26]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[27]||(n[27]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[28]||(n[28]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[29]||(n[29]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[30]||(n[30]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[31]||(n[31]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[32]||(n[32]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[33]||(n[33]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[34]||(n[34]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[35]||(n[35]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[36]||(n[36]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[37]||(n[37]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[38]||(n[38]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[39]||(n[39]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[40]||(n[40]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[41]||(n[41]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[42]||(n[42]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[43]||(n[43]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,Ye)],4)):e.inputType==="checkbox"?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["hison-input","hison-input-checkbox-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[e.toggleStyle!=="switch"?(i.openBlock(),i.createElementBlock("input",{key:0,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"checkbox",class:i.normalizeClass([`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList]),disabled:e.disable,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[44]||(n[44]=(...o)=>e.onCheckboxChange&&e.onCheckboxChange(...o)),onFocus:n[45]||(n[45]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[46]||(n[46]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[47]||(n[47]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[48]||(n[48]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[49]||(n[49]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[50]||(n[50]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[51]||(n[51]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[52]||(n[52]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[53]||(n[53]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[54]||(n[54]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[55]||(n[55]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[56]||(n[56]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[57]||(n[57]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[58]||(n[58]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[59]||(n[59]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[60]||(n[60]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[61]||(n[61]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[62]||(n[62]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[63]||(n[63]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[64]||(n[64]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[65]||(n[65]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,Xe)):(i.openBlock(),i.createElementBlock("label",{key:1,class:i.normalizeClass(["hison-input-checkbox-switch",...e.editModeClassList])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"checkbox",class:"hison-cswitch-input",disabled:e.disable,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[66]||(n[66]=(...o)=>e.onCheckboxChange&&e.onCheckboxChange(...o)),onFocus:n[67]||(n[67]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[68]||(n[68]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[69]||(n[69]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[70]||(n[70]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[71]||(n[71]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[72]||(n[72]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[73]||(n[73]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[74]||(n[74]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[75]||(n[75]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[76]||(n[76]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[77]||(n[77]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[78]||(n[78]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[79]||(n[79]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[80]||(n[80]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[81]||(n[81]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[82]||(n[82]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[83]||(n[83]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[84]||(n[84]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[85]||(n[85]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[86]||(n[86]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[87]||(n[87]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,40,Je),i.createElementVNode("span",{class:i.normalizeClass(["hison-switch-visual",[...e.editModeClassList,...e.requiredClassList]]),"aria-hidden":"true"},null,2)],2))],4)):e.inputType==="radio"?(i.openBlock(),i.createElementBlock("div",{key:3,class:i.normalizeClass(["hison-input","hison-input-radio-div"]),style:i.normalizeStyle([e.textAlignStyle,e.props.style])},[e.toggleStyle!=="switch"?(i.openBlock(),i.createElementBlock("input",{key:0,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"radio",class:i.normalizeClass([`hison-input-${e.inputType}`,"hison-input-radio--default",...e.editModeClassList,...e.requiredClassList]),disabled:e.disable||e.readonly,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[88]||(n[88]=(...o)=>e.onRadioChange&&e.onRadioChange(...o)),onFocus:n[89]||(n[89]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[90]||(n[90]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[91]||(n[91]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[92]||(n[92]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[93]||(n[93]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[94]||(n[94]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[95]||(n[95]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[96]||(n[96]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[97]||(n[97]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[98]||(n[98]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[99]||(n[99]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[100]||(n[100]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[101]||(n[101]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[102]||(n[102]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[103]||(n[103]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[104]||(n[104]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[105]||(n[105]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[106]||(n[106]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[107]||(n[107]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[108]||(n[108]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[109]||(n[109]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,42,Qe)):(i.openBlock(),i.createElementBlock("label",{key:1,class:i.normalizeClass(["hison-input-radio-switch",...e.editModeClassList])},[i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,type:"radio",class:"hison-radio-switch-input",disabled:e.disable||e.readonly,readonly:e.readonly,checked:e.inputValue===!0,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[110]||(n[110]=(...o)=>e.onRadioChange&&e.onRadioChange(...o)),onFocus:n[111]||(n[111]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[112]||(n[112]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[113]||(n[113]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[114]||(n[114]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[115]||(n[115]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[116]||(n[116]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[117]||(n[117]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[118]||(n[118]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[119]||(n[119]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[120]||(n[120]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[121]||(n[121]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[122]||(n[122]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[123]||(n[123]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[124]||(n[124]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[125]||(n[125]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[126]||(n[126]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[127]||(n[127]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[128]||(n[128]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[129]||(n[129]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[130]||(n[130]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[131]||(n[131]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,40,Ze),i.createElementVNode("span",{class:i.normalizeClass(["hison-switch-visual",[...e.editModeClassList,...e.requiredClassList]]),"aria-hidden":"true"},null,2)],2))],4)):e.inputType==="select"?(i.openBlock(),i.createElementBlock("select",{key:4,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),class:i.normalizeClass(["hison-input",`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList,e.fontBoldClass,e.fontItalicClass,e.fontThrulineClass,e.fontUnderlineClass,e.borderClass]),value:e.inputValue,disabled:e.disable,readonly:e.readonly,title:e.title||void 0,tabindex:e.tabIndex??void 0,onChange:n[132]||(n[132]=(...o)=>e.onSelectChange&&e.onSelectChange(...o)),onFocus:n[133]||(n[133]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[134]||(n[134]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[135]||(n[135]=(...o)=>e.onKeydown&&e.onKeydown(...o)),onClick:n[136]||(n[136]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[137]||(n[137]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[138]||(n[138]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[139]||(n[139]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[140]||(n[140]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[141]||(n[141]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[142]||(n[142]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[143]||(n[143]=o=>e.$emit("mouseout",o,e.inputMethods)),onPointerdown:n[144]||(n[144]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[145]||(n[145]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[146]||(n[146]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[147]||(n[147]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[148]||(n[148]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[149]||(n[149]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[150]||(n[150]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[151]||(n[151]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[152]||(n[152]=o=>e.$emit("touchcancel",o,e.inputMethods)),onContextmenu:n[153]||(n[153]=o=>e.$emit("contextmenu",o,e.inputMethods))},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.props.options,o=>(i.openBlock(),i.createElementBlock("option",{key:o.value,value:o.value},i.toDisplayString(o.text),9,xe))),128))],46,Ge)):e.inputType==="textarea"?(i.openBlock(),i.createElementBlock("textarea",{key:5,ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,class:i.normalizeClass(["hison-input",`hison-input-${e.inputType}`,...e.editModeClassList,...e.requiredClassList,e.fontBoldClass,e.fontItalicClass,e.fontThrulineClass,e.fontUnderlineClass,e.borderClass]),value:e.inputValue,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),disabled:e.disable,readonly:e.readonly,placeholder:e.placeholder||void 0,title:e.title||void 0,maxlength:e.maxLength||void 0,tabindex:e.tabIndex??void 0,onInput:n[154]||(n[154]=(...o)=>e.onInput&&e.onInput(...o)),onFocus:n[155]||(n[155]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[156]||(n[156]=(...o)=>e.onBlur&&e.onBlur(...o))},i.toDisplayString(e.inputValue),47,ce)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:6},[i.withDirectives(i.createElementVNode("input",{ref:"inputTextRef",id:`input_text_${e.id}`,name:`input_text_${e.nameAttr}`,class:i.normalizeClass(["hison-input",`hison-input-text-${e.inputType}`,...e.editModeClassList,...e.requiredClassList,e.fontBoldClass,e.fontItalicClass,e.fontThrulineClass,e.fontUnderlineClass,e.borderClass]),type:"text",value:e.spanText,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),disabled:e.disable,readonly:e.readonly,title:e.title||void 0,placeholder:e.placeholder||void 0,tabindex:e.tabIndex??void 0,onFocus:n[157]||(n[157]=(...o)=>e.onTextInputFocus&&e.onTextInputFocus(...o)),onClick:n[158]||(n[158]=o=>e.$emit("click",o,e.inputMethods)),onDblclick:n[159]||(n[159]=o=>e.$emit("dblclick",o,e.inputMethods)),onMousedown:n[160]||(n[160]=o=>e.$emit("mousedown",o,e.inputMethods)),onMouseup:n[161]||(n[161]=o=>e.$emit("mouseup",o,e.inputMethods)),onMouseenter:n[162]||(n[162]=o=>e.$emit("mouseenter",o,e.inputMethods)),onMouseleave:n[163]||(n[163]=o=>e.$emit("mouseleave",o,e.inputMethods)),onMouseover:n[164]||(n[164]=o=>e.$emit("mouseover",o,e.inputMethods)),onMouseout:n[165]||(n[165]=o=>e.$emit("mouseout",o,e.inputMethods)),onMousemove:n[166]||(n[166]=o=>e.$emit("mousemove",o,e.inputMethods)),onPointerdown:n[167]||(n[167]=o=>e.$emit("pointerdown",o,e.inputMethods)),onPointerup:n[168]||(n[168]=o=>e.$emit("pointerup",o,e.inputMethods)),onPointermove:n[169]||(n[169]=o=>e.$emit("pointermove",o,e.inputMethods)),onPointerenter:n[170]||(n[170]=o=>e.$emit("pointerenter",o,e.inputMethods)),onPointerleave:n[171]||(n[171]=o=>e.$emit("pointerleave",o,e.inputMethods)),onTouchstart:n[172]||(n[172]=o=>e.$emit("touchstart",o,e.inputMethods)),onTouchend:n[173]||(n[173]=o=>e.$emit("touchend",o,e.inputMethods)),onTouchmove:n[174]||(n[174]=o=>e.$emit("touchmove",o,e.inputMethods)),onTouchcancel:n[175]||(n[175]=o=>e.$emit("touchcancel",o,e.inputMethods))},null,46,_e),[[i.vShow,!e.editing]]),i.withDirectives(i.createElementVNode("input",{ref:"inputRef",id:`${e.id}`,name:`${e.nameAttr}`,class:i.normalizeClass(["hison-input",`hison-input-${e.inputType}`,...e.editModeClassList,e.borderClass]),value:e.inputValue,style:i.normalizeStyle([e.textAlignStyle,e.placeholderColorStyle,e.props.style]),disabled:e.disable,readonly:e.readonly,type:e.inputType,title:e.title||void 0,placeholder:e.placeholder||void 0,max:e.maxNumber||void 0,min:e.minNumber||void 0,tabindex:e.tabIndex??void 0,onFocus:n[176]||(n[176]=(...o)=>e.onFocus&&e.onFocus(...o)),onBlur:n[177]||(n[177]=(...o)=>e.onBlur&&e.onBlur(...o)),onInput:n[178]||(n[178]=(...o)=>e.onInput&&e.onInput(...o)),onCompositionstart:n[179]||(n[179]=o=>e.$emit("compositionstart",o,e.inputMethods)),onCompositionupdate:n[180]||(n[180]=o=>e.$emit("compositionupdate",o,e.inputMethods)),onCompositionend:n[181]||(n[181]=o=>e.$emit("compositionend",o,e.inputMethods)),onKeydown:n[182]||(n[182]=o=>e.$emit("keydown",o,e.inputMethods)),onKeyup:n[183]||(n[183]=o=>e.$emit("keyup",o,e.inputMethods)),onDragstart:n[184]||(n[184]=o=>e.$emit("dragstart",o,e.inputMethods)),onDragend:n[185]||(n[185]=o=>e.$emit("dragend",o,e.inputMethods)),onDrag:n[186]||(n[186]=o=>e.$emit("drag",o,e.inputMethods)),onDrop:n[187]||(n[187]=o=>e.$emit("drop",o,e.inputMethods)),onCopy:n[188]||(n[188]=o=>e.$emit("copy",o,e.inputMethods)),onCut:n[189]||(n[189]=o=>e.$emit("cut",o,e.inputMethods)),onPaste:n[190]||(n[190]=o=>e.$emit("paste",o,e.inputMethods)),onWheel:n[191]||(n[191]=o=>e.$emit("wheel",o,e.inputMethods)),onContextmenu:n[192]||(n[192]=o=>e.$emit("contextmenu",o,e.inputMethods))},null,46,en),[[i.vShow,e.editing]])],64))],2)}const on=Re._export_sfc(je,[["render",nn],["__scopeId","data-v-f3c99304"]]);exports.default=on;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as tn, ref as r, computed as f, inject as ae, onMounted as un, onBeforeUnmount as sn, watch as a, unref as ln, nextTick as be, createElementBlock as b, openBlock as y, normalizeClass as M, normalizeStyle as P, createElementVNode as I, Fragment as ye, renderList as rn, toDisplayString as $e, withDirectives as Ce, vShow as Te } from "vue";
|
|
2
|
-
import { T as dn, y as c, N as an, h as g, g as mn, u as vn, O as u, l as d, P as _, w as N, e as pn, t as fn, a as Mn, b as ke, Q as me, R as gn, U as bn, r as yn, c as $n, d as Cn } from "./index-
|
|
2
|
+
import { T as dn, y as c, N as an, h as g, g as mn, u as vn, O as u, l as d, P as _, w as N, e as pn, t as fn, a as Mn, b as ke, Q as me, R as gn, U as bn, r as yn, c as $n, d as Cn } from "./index-CGr5-mvg.mjs";
|
|
3
3
|
import { _ as Tn } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const kn = {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as U, ref as h, provide as I, onMounted as T, onBeforeUnmount as $, watch as _, createElementBlock as H, openBlock as L, renderSlot as q } from "vue";
|
|
2
|
-
import { V as A, W as g, E as P, g as k, y as C, l as c, h as D, r as B, c as w, d as x } from "./index-
|
|
2
|
+
import { V as A, W as g, E as P, g as k, y as C, l as c, h as D, r as B, c as w, d as x } from "./index-CGr5-mvg.mjs";
|
|
3
3
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const z = {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),n=require("./index-DcB16odB.js"),G=require("./_plugin-vue_export-helper-BHFhmbuH.js"),I={id:{type:String,required:!1},editMode:{type:String,required:!1,validator:l=>l==null||n.EDIT_MODE_VALUES.includes(l)},status:{type:String,required:!1,default:n.DataStatus.R,validator:l=>n.DATA_STATUS_VALUES.includes(l)},modelValue:{type:Object,default:()=>({})}},O=s.defineComponent({name:"HInputGroup",props:I,emits:["update:modelValue","mounted"],setup(l,{emit:m}){const b=s.ref(null),S=s.ref(null),h=l.id??n.getUUID(),V=`hinputGroup:${h}`,D=s.ref(l.editMode??n.EditMode.editable),g=s.ref(l.status??n.DataStatus.R),f=s.ref([]),r=s.ref({}),p=s.ref({});s.provide("registerToInputGroup",e=>{var t,o,u,i,d;if(!f.value.includes(e)){f.value.push(e),f.value.sort((v,C)=>v.localeCompare(C));const c=l.modelValue??{};c&&Object.prototype.hasOwnProperty.call(c,e)&&((o=(t=n.hison.component.getInput(e))==null?void 0:t.setValue)==null||o.call(t,c[e]));const a=n.hison.component.getInput(e);if(((u=a==null?void 0:a.getInputType)==null?void 0:u.call(a))==="radio"){const v=((i=a.getName)==null?void 0:i.call(a))||e;r.value[v]||(r.value[v]=[]),r.value[v].includes(e)||r.value[v].push(e),(d=a.getValue)!=null&&d.call(a)?p.value[v]=e:Object.prototype.hasOwnProperty.call(p.value,v)||(p.value[v]=null)}}}),s.provide("radioMembershipChanged",(e,t,o,u)=>{var i,d;if(t!==o){if(t&&r.value[t]){if(r.value[t]=r.value[t].filter(c=>c!==e),p.value[t]===e){p.value[t]=null;const c={...l.modelValue||{}};c[t]=null,m("update:modelValue",c,e)}r.value[t].length===0&&(delete r.value[t],delete p.value[t])}if(r.value[o]||(r.value[o]=[]),r.value[o].includes(e)||r.value[o].push(e),u){p.value[o]=e;for(const a of r.value[o])(d=(i=n.hison.component.getInput(a))==null?void 0:i.setValue)==null||d.call(i,a===e);const c={...l.modelValue||{}};c[o]=e,m("update:modelValue",c,e),g.value!==n.DataStatus.U&&(g.value=n.DataStatus.U)}else Object.prototype.hasOwnProperty.call(p.value,o)||(p.value[o]=null)}}),s.provide("notifyInputGroupStatus",(e,t)=>{var u,i;if(r.value[e]){const d=e,c=t;p.value[d]=c;for(const v of r.value[d])(i=(u=n.hison.component.getInput(v))==null?void 0:u.setValue)==null||i.call(u,v===c);const a={...l.modelValue||{}};a[d]=c,m("update:modelValue",a,c??void 0),g.value!==n.DataStatus.U&&(g.value=n.DataStatus.U);return}g.value!==n.DataStatus.U&&(g.value=n.DataStatus.U);const o={...l.modelValue,[e]:t};m("update:modelValue",o,e)});const y=()=>{const e={};if(!f.value)return e;f.value.forEach(t=>{var u,i;const o=n.hison.component.getInput(t);o&&((u=o.getInputType)==null?void 0:u.call(o))!=="radio"&&(e[t]=(i=o.getValue)==null?void 0:i.call(o))});for(const[t,o]of Object.entries(r.value)){let u=p.value[t]??null;u&&!o.includes(u)&&(u=null),e[t]=u}return e},M=e=>{if(!(!e||typeof e!="object")){Object.keys(e).forEach(t=>{var o,u;if(f.value.includes(t)){const i=e[t];(u=(o=n.hison.component.getInput(t))==null?void 0:o.setValue)==null||u.call(o,i)}});for(const[t,o]of Object.entries(r.value)){if(!Object.prototype.hasOwnProperty.call(e,t))continue;const u=e[t];o.forEach(i=>{var a;const d=n.hison.component.getInput(i);if(!d)return;const c=u===i;(a=d.setValue)==null||a.call(d,c)}),p.value[t]=u??null}}},E=()=>{n.hisonCloser.component.inputGroupList[h]&&n.hisonCloser.component.inputGroupList[h].isHisonvueComponent&&console.warn(`[Hisonvue] The input group ID is at risk of being duplicated. ${h}`),n.registerReloadable(V,()=>{_(),setTimeout(E)}),b.value&&(S.value={isHisonvueComponent:!0,getId:()=>h,getType:()=>"inputGroup",clear:(e=!0)=>{f.value.forEach(t=>{const o=n.hison.component.getInput(t);o&&o.setValue(null)}),e&&(g.value=n.DataStatus.C)},getDataModel:()=>new n.hison.data.DataModel(y()),setDataModel:e=>{if(e.getRowCount()>0)return M(e.getRow(0))},getDataObject:()=>y(),setDataObject:e=>M(e),load:e=>{if(e&&e.getIsDataModel&&e.getIsDataModel()){const t=e;if(t.getColumnCount()===0||t.getRowCount()===0)return;M(t.getRow(0))}else e&&typeof e=="object"&&M(e)},getStatus:()=>g.value,setStatus:e=>{g.value=n.DataStatus[e]},isModified:()=>{for(const e of f.value){const t=n.hison.component.getInput(e);if(t&&t.isModified())return!0}return!1},initModified:()=>{f.value.forEach(e=>{const t=n.hison.component.getInput(e);t&&t.setModified(!1)})},checkRequired:()=>{var e,t;for(const o of f.value){const u=n.hison.component.getInput(o);if((e=u==null?void 0:u.getRequired)!=null&&e.call(u)&&!((t=u.getValue)!=null&&t.call(u)))return u}return null},getEditMode:()=>D.value,setEditMode:e=>{D.value=e,f.value.forEach(t=>{const o=n.hison.component.getInput(t);o&&o.setEditMode(e)})},focus:e=>{var t;if(e)return(t=n.hison.component.getInput(e))==null?void 0:t.focus();for(const o of f.value){const u=n.hison.component.getInput(o);if(u&&u.getEditMode()===n.EditMode.editable)return u.focus()}},reload:()=>n.reloadHisonComponent(V)},n.hisonCloser.component.inputGroupList[h]=S.value,m("mounted",S.value))},_=()=>{n.unregisterReloadable(V),delete n.hisonCloser.component.inputGroupList[h],f.value=[]};return s.onMounted(E),s.onBeforeUnmount(_),s.watch(()=>l.modelValue,e=>{M(e)},{deep:!0}),s.watch(()=>l.modelValue,e=>{M(e)},{deep:!0}),s.watch(()=>l.editMode,e=>{e&&e!==D.value&&(D.value=e,f.value.forEach(t=>{var o,u;return(u=(o=n.hison.component.getInput(t))==null?void 0:o.setEditMode)==null?void 0:u.call(o,D.value)}))}),s.watch(()=>l.status,e=>{e&&e!==g.value&&(g.value=e)}),{inputGroupRef:b,props:l}}}),j={ref:"inputGroupRef",class:"hison-data-group"};function R(l,m,b,S,h,V){return s.openBlock(),s.createElementBlock("div",j,[s.renderSlot(l.$slots,"default")],512)}const U=G._export_sfc(O,[["render",R]]);exports.default=U;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./index-DcB16odB.js"),M=require("./setButtonCssEvent-CTLQPvWj.js"),ie=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:!0},title:{type:String,required:!1},text:{type:String,required:!1},href:{type:String,default:null},anchorAttrs:{type:Object,default:()=>({})},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:l=>l==null||a.TEXT_ALIGN_VALUES.includes(l)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:a.BackgroundType.empty,validator:l=>a.BACKGROUND_TYPE_VALUES.includes(l)},toggleTarget:{type:String,default:null},translate:{type:Boolean,default:!0},tabIndex:{type:[Number,String],default:null,validator:l=>l===null||l===""||!isNaN(+l)&&isFinite(+l)}},de=t.defineComponent({name:"HLabel",props:ce,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(l,{emit:o,slots:G}){const v=t.ref(null),g=t.ref(null),r=l.id?l.id:a.getUUID(),s=`hlabel:${r}`,F=a.useDevice(),U=t.useSlots(),T=t.ref(l.visible),c=t.ref(l.title||""),y=t.ref(l.textAlign??a.TextAlign.left),J=t.computed(()=>({textAlign:y.value})),d=t.ref(l.href??null),u=t.ref({...l.anchorAttrs||{}}),h=t.computed(()=>!!(d.value&&String(d.value).trim())),X=t.computed(()=>{const e={...u.value};return c.value&&e.title==null&&(e.title=c.value),e.href=d.value||void 0,e.download===!0&&(e.download=""),String(e.target||"")==="_blank"&&(e.rel==null||String(e.rel).trim()==="")&&(e.rel="noopener noreferrer"),e}),N=t.computed(()=>U.default?U.default():[]),H=t.computed(()=>N.value.length>0&&N.value.every(e=>e.type===t.Text)),A=t.computed(()=>!!U.default&&!H.value),Y=t.computed(()=>A.value?"div":h.value?"a":"span"),C=t.ref(l.fontBold),Q=t.computed(()=>{if(C.value)return"hison-font-bold"}),p=t.ref(l.fontItalic),W=t.computed(()=>{if(p.value)return"hison-font-italic"}),k=t.ref(l.fontThruline),Z=t.computed(()=>{if(k.value)return"hison-font-thruline-important"}),B=t.ref(l.fontUnderline),_=t.computed(()=>{if(B.value)return"hison-font-underline-important"}),w=t.ref(l.border??!1),S=t.ref(l.backgroundType||a.BackgroundType.empty),ee=t.computed(()=>T.value?"":"hison-display-none"),te=t.computed(()=>w.value?"hison-border":""),le=t.computed(()=>{switch(S.value){case a.BackgroundType.empty:return"hison-bg-empty";case a.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),i=t.ref(l.text||"");t.onMounted(()=>{if(H.value){const e=N.value.map(n=>String(n.children??"")).join("");i.value=e}});const f=t.ref(l.toggleTarget??null),m=t.computed(()=>!!(f.value&&String(f.value).trim())),b=t.ref(l.translate),ne=t.computed(()=>b.value===!1?"notranslate":""),ae=t.computed(()=>b.value===!1?"no":void 0),I=t.ref(l.tabIndex!==null&&l.tabIndex!==""?Number(l.tabIndex):null),E=t.ref([]),L=()=>{E.value=a.extractResponsiveClasses(a.toClassString(l.class)||"",F.value),a.addComponentNameToClass(E.value,"size",a.hisonCloser.componentStyle.size),a.addComponentNameToClass(E.value,"color","primary")},q=()=>{var O,D,R,j,P,z;if(!m.value)return;const e=String(f.value),n=(O=a.hisonCloser.component.inputList)==null?void 0:O[e];if(!n||!n.isHisonvueComponent)return;const x=(D=n.getInputType)==null?void 0:D.call(n),ue=(R=n.getEditMode)==null?void 0:R.call(n);if(x!=="checkbox"&&x!=="radio"||ue!=="editable")return;const re=!!((j=n.getValue)!=null&&j.call(n));x==="checkbox"?(P=n.setValue)==null||P.call(n,!re):(z=n.setValue)==null||z.call(n,!0)},oe=e=>{m.value&&q(),o("click",e,g.value)},se=e=>{if(m.value&&q(),!h.value)return;const n=v.value;n&&n.tagName==="A"&&n.click()},$=(e=!0)=>{const n=v.value;if(n){if(M.removeButtonCssEvent(n),m.value){M.addButtonCssEvent(n);return}e&&h.value&&n.tagName==="A"&&M.addButtonCssEvent(n)}},V=()=>{a.hisonCloser.component.labelList[r]&&a.hisonCloser.component.labelList[r].isHisonvueComponent&&console.warn(`[Hisonvue] The label ID is at risk of being duplicated. ${r}`),a.registerReloadable(s,()=>{K(),t.nextTick(V)}),L(),t.nextTick(()=>$(!0)),g.value={isHisonvueComponent:!0,getId:()=>r,getType:()=>"label",isVisible:()=>T.value,setVisible:e=>{T.value=e},getTitle:()=>c.value,setTitle:e=>{c.value=e},getText:()=>A.value?"":i.value,setText:e=>{A.value||(i.value=e)},getHref:()=>d.value??"",setHref:e=>{d.value=e??null},getAnchorAttrs:()=>({...u.value}),replaceAnchorAttrs:e=>{u.value={...e}},mergeAnchorAttrs:e=>{u.value={...u.value,...e}},setAnchorAttr:(e,n)=>{u.value={...u.value,[e]:n}},removeAnchorAttr:e=>{const n={...u.value};delete n[e],u.value=n},isFontBold:()=>C.value,setFontBold:e=>{C.value=e},isFontItalic:()=>p.value,setFontItalic:e=>{p.value=e},isFontThruline:()=>k.value,setFontThruline:e=>{k.value=e},isFontUnderline:()=>B.value,setFontUnderline:e=>{B.value=e},getTextAlign:()=>y.value,setTextAlign:e=>{(e===a.TextAlign.left||e===a.TextAlign.center||e===a.TextAlign.right)&&(y.value=e)},isBorder:()=>w.value,setBorder:e=>{w.value=e},getBackgroundType:()=>S.value,setBackgroundType:e=>{S.value=e},getToggleTarget:()=>f.value,setToggleTarget:e=>{f.value=e},isTranslate:()=>b.value,setTranslate:e=>{b.value=e},reload:()=>a.reloadHisonComponent(s),getTabIndex:()=>I.value,setTabIndex:e=>{I.value=e!=null?Number(e):null},focus:()=>{const e=v.value;e&&h.value&&e.tagName==="A"&&e.focus()}},a.hisonCloser.component.labelList[r]=g.value,o("mounted",g.value)},K=()=>{a.unregisterReloadable(s);const e=v.value;e&&M.removeButtonCssEvent(e),delete a.hisonCloser.component.labelList[r]};return t.onMounted(V),t.onBeforeUnmount(K),t.watch(F,e=>{L(),o("responsive-change",e)}),t.watch(h,e=>{t.nextTick(()=>$(e))},{flush:"post"}),t.watch(m,e=>{t.nextTick(()=>$(e))},{flush:"post"}),t.watch(()=>l.visible,e=>{const n=!!e;n!==T.value&&(T.value=n)}),t.watch(()=>l.title,e=>{const n=e??"";n!==c.value&&(c.value=n)}),t.watch(()=>l.text,e=>{if(!A.value){const n=e??"";n!==i.value&&(i.value=n)}}),t.watch(N,e=>{if(H.value){const n=e.map(x=>String(x.children??"")).join("");n!==i.value&&(i.value=n)}}),t.watch(()=>l.href,e=>{const n=e??null;n!==d.value&&(d.value=n)}),t.watch(()=>l.anchorAttrs,e=>{const n={...e||{}};JSON.stringify(n)!==JSON.stringify(u.value)&&(u.value=n)}),t.watch(()=>l.fontBold,e=>{const n=!!e;n!==C.value&&(C.value=n)}),t.watch(()=>l.fontItalic,e=>{const n=!!e;n!==p.value&&(p.value=n)}),t.watch(()=>l.fontThruline,e=>{const n=!!e;n!==k.value&&(k.value=n)}),t.watch(()=>l.fontUnderline,e=>{const n=!!e;n!==B.value&&(B.value=n)}),t.watch(()=>l.textAlign,e=>{e&&e!==y.value&&(e===a.TextAlign.left||e===a.TextAlign.center||e===a.TextAlign.right)&&(y.value=e)}),t.watch(()=>l.border,e=>{const n=!!e;n!==w.value&&(w.value=n)}),t.watch(()=>l.backgroundType,e=>{e&&e!==S.value&&(S.value=e)}),t.watch(()=>l.toggleTarget,e=>{const n=e??null;n!==f.value&&(f.value=n)}),t.watch(()=>l.translate,e=>{const n=!!e;n!==b.value&&(b.value=n)}),t.watch(()=>l.tabIndex,e=>{const n=e===null||e===""?null:Number(e);n!==I.value&&(I.value=n)}),t.watch(()=>l.class,()=>{L()}),{labelRef:v,labelMethods:t.computed(()=>t.unref(g)),props:l,title:c,hasHref:h,hasToggleTarget:m,hasElementSlot:A,renderTag:Y,internalText:i,computedAnchorAttrs:X,visibleClass:ee,fontBoldClass:Q,fontItalicClass:W,fontThrulineClass:Z,fontUnderlineClass:_,textAlignStyle:J,translateAttr:ae,translateClass:ne,borderClass:te,backgroundTypeClass:le,responsiveClassList:E,tabIndex:I,onClick:oe,onKeyActivate:se}}}),fe={key:2,class:"hison-label-text"};function ve(l,o,G,v,g,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...l.responsiveClassList,l.visibleClass])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.renderTag),t.mergeProps({ref:"labelRef",class:["hison-label",l.hasHref?"hison-label-link":null,l.hasToggleTarget?"hison-label-has-toggle-target":null,l.fontBoldClass,l.fontItalicClass,l.fontThrulineClass,l.fontUnderlineClass,l.borderClass,l.backgroundTypeClass,l.translateClass],style:[l.textAlignStyle,l.props.style],title:l.title||void 0,tabindex:l.tabIndex??void 0,translate:l.translateAttr},l.renderTag==="a"?l.computedAnchorAttrs:void 0,{onClick:l.onClick,onMousedown:o[0]||(o[0]=s=>l.$emit("mousedown",s,l.labelMethods)),onMouseup:o[1]||(o[1]=s=>l.$emit("mouseup",s,l.labelMethods)),onMouseover:o[2]||(o[2]=s=>l.$emit("mouseover",s,l.labelMethods)),onMouseout:o[3]||(o[3]=s=>l.$emit("mouseout",s,l.labelMethods)),onKeydown:[t.withKeys(t.withModifiers(l.onKeyActivate,["prevent"]),["enter"]),t.withKeys(t.withModifiers(l.onKeyActivate,["prevent"]),["space"])]}),{default:t.withCtx(()=>[l.hasElementSlot?t.renderSlot(l.$slots,"default",{key:0}):l.hasHref?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(l.internalText),1)],64)):(t.openBlock(),t.createElementBlock("span",fe,t.toDisplayString(l.internalText),1))]),_:3},16,["class","style","title","tabindex","translate","onClick","onKeydown"]))],2)}const ge=ie._export_sfc(de,[["render",ve]]);exports.default=ge;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Se, ref as a, useSlots as Be, computed as o, Text as ke, onMounted as Z, onBeforeUnmount as Ie, watch as n, nextTick as $, unref as pe, createElementBlock as D, openBlock as F, normalizeClass as we, createBlock as Ne, resolveDynamicComponent as Ue, mergeProps as Le, withKeys as _, withModifiers as ee, withCtx as Me, renderSlot as He, Fragment as Ee, createTextVNode as $e, toDisplayString as te } from "vue";
|
|
2
|
-
import { B as Fe, f as x, T as xe, g as Ve, u as Ke, w as g, e as Oe, t as Re, b as le, h as A, r as De, c as je, d as qe } from "./index-
|
|
3
|
-
import { r as ne, a as ae } from "./setButtonCssEvent-
|
|
2
|
+
import { B as Fe, f as x, T as xe, g as Ve, u as Ke, w as g, e as Oe, t as Re, b as le, h as A, r as De, c as je, d as qe } from "./index-CGr5-mvg.mjs";
|
|
3
|
+
import { r as ne, a as ae } from "./setButtonCssEvent-T2QV1cDz.mjs";
|
|
4
4
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
const Ge = {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as A, ref as d, computed as m, onMounted as B, onBeforeUnmount as $, watch as b, unref as L, nextTick as M, createElementBlock as R, openBlock as V, normalizeStyle as p, normalizeClass as q, createElementVNode as E, renderSlot as H } from "vue";
|
|
2
|
-
import { X as T, Y as U, Z as w, g as G, u as N, F as I, e as W, t as z, a as P, b as j, h as k, r as D, c as F, d as K } from "./index-
|
|
2
|
+
import { X as T, Y as U, Z as w, g as G, u as N, F as I, e as W, t as z, a as P, b as j, h as k, r as D, c as F, d as K } from "./index-CGr5-mvg.mjs";
|
|
3
3
|
import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const O = {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),o=require("./index-DcB16odB.js"),C=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:!0},backImageSrc:{type:String,required:!1},backImageRepeat:{type:String,required:!1,validator:e=>e==null||o.BACK_IMAGE_STYLE_VALUES.includes(e)?!0:/^(repeat-x|repeat-y|repeat|no-repeat)(\s+\S+\/\S+)?$/.test(e)||/^(cover|contain)$/.test(e)||/[\/\s]/.test(e)},backImageWidth:{type:String,required:!1},backImageAlign:{type:String,required:!1,validator:e=>e==null||o.BACK_IMAGE_ALIGN_VALUES.includes(e)},backImageVerticalAlign:{type:String,required:!1,validator:e=>e==null||o.BACK_IMAGE_VERTICAL_ALIGN_VALUES.includes(e)},backColor:{type:String,required:!1},border:{type:Boolean,default:!1},height:{type:String,required:!1}},S=a.defineComponent({name:"HLayout",props:h,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(e,{emit:n}){const l=a.ref(null),u=a.ref(null),r=e.id?e.id:o.getUUID(),m=`hlayout:${r}`,s=o.useDevice(),c=a.ref(e.visible),y=a.computed(()=>c.value?"":"hison-display-none"),d=a.ref(e.border??!1),f=a.computed(()=>d.value?"hison-border":""),I=a.computed(()=>{const t={};if(e.backImageSrc&&(t.backgroundImage=`url(${e.backImageSrc})`,t.backgroundRepeat=e.backImageRepeat||"no-repeat",t.backgroundSize=e.backImageWidth||"auto",t.backgroundPosition=`${e.backImageAlign||"center"} ${e.backImageVerticalAlign||"center"}`),e.backColor){const i=o.getHexCodeFromColorText(e.backColor)||e.backColor;t.backgroundColor=i}return e.height&&(t.height=e.height),t}),g=a.ref([]),b=()=>{g.value=o.extractResponsiveClasses(o.toClassString(e.class)||"",s.value),o.getIndexSpecificClassNameFromClassList(g.value,"col")===-1&&g.value.push("hison-col-12"),o.addComponentNameToClass(g.value,"color","primary")},k=()=>{o.hisonCloser.component.layoutList[r]&&o.hisonCloser.component.layoutList[r].isHisonvueComponent&&console.warn(`[Hisonvue] The layout ID is at risk of being duplicated. ${r}`),o.registerReloadable(m,()=>{v(),a.nextTick(k)}),l.value&&(b(),u.value={isHisonvueComponent:!0,getId:()=>r,getType:()=>"layout",isVisible:()=>c.value,setVisible:t=>{c.value=t},getBackImageSrc:()=>e.backImageSrc||"",setBackImageSrc:t=>{l.value&&(l.value.style.backgroundImage=`url(${t})`)},getBackImageRepeat:()=>e.backImageRepeat||"",setBackImageRepeat:t=>{l.value&&(l.value.style.backgroundRepeat=t)},getBackImageWidth:()=>e.backImageWidth||"",setBackImageWidth:t=>{l.value&&(l.value.style.backgroundSize=t)},getBackImageAlign:()=>e.backImageAlign||"",setBackImageAlign:t=>{if(l.value){const i=e.backImageVerticalAlign||"center";l.value.style.backgroundPosition=`${t} ${i}`}},getBackImageVerticalAlign:()=>e.backImageVerticalAlign||"",setBackImageVerticalAlign:t=>{if(l.value){const i=e.backImageAlign||"center";l.value.style.backgroundPosition=`${i} ${t}`}},getBackColor:()=>e.backColor||"",setBackColor:t=>{l.value&&(l.value.style.backgroundColor=o.getHexCodeFromColorText(t)||t)},isBorder:()=>d.value,setBorder:t=>{d.value=t},getHeight:()=>e.height||"",setHeight:t=>{l.value&&(l.value.style.height=t)},reload:()=>o.reloadHisonComponent(m)},o.hisonCloser.component.layoutList[r]=u.value,n("mounted",u.value))},v=()=>{o.unregisterReloadable(m),delete o.hisonCloser.component.layoutList[r]};return a.onMounted(k),a.onBeforeUnmount(v),a.watch(s,t=>{b(),n("responsive-change",t)}),a.watch(()=>e.visible,t=>{const i=!!t;i!==c.value&&(c.value=i)}),a.watch(()=>e.border,t=>{const i=!!t;i!==d.value&&(d.value=i)}),a.watch(()=>e.class,()=>{b()}),{layoutRef:l,layoutMethods:a.computed(()=>a.unref(u)),props:e,responsiveClassList:g,visibleClass:y,borderClass:f,computedBackStyle:I}}});function A(e,n,l,u,r,m){return a.openBlock(),a.createElementBlock("div",{ref:"layoutRef",class:a.normalizeClass(["hison-layout",...e.responsiveClassList,e.visibleClass,e.borderClass]),style:a.normalizeStyle([e.props.style,e.computedBackStyle]),onClick:n[0]||(n[0]=s=>e.$emit("click",s,e.layoutMethods)),onMousedown:n[1]||(n[1]=s=>e.$emit("mousedown",s,e.layoutMethods)),onMouseup:n[2]||(n[2]=s=>e.$emit("mouseup",s,e.layoutMethods)),onMouseover:n[3]||(n[3]=s=>e.$emit("mouseover",s,e.layoutMethods)),onMouseout:n[4]||(n[4]=s=>e.$emit("mouseout",s,e.layoutMethods))},[n[5]||(n[5]=a.createElementVNode("div",{class:"hison-layout-frame-adjust"},null,-1)),a.renderSlot(e.$slots,"default")],38)}const B=C._export_sfc(S,[["render",A]]);exports.default=B;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as ge, ref as a, computed as d, onMounted as he, onBeforeUnmount as Ie, watch as i, Comment as ke, Text as Ce, Fragment as U, nextTick as J, createElementBlock as m, openBlock as r, normalizeClass as D, createBlock as Q, resolveDynamicComponent as X, withKeys as Z, normalizeStyle as N, withModifiers as x, withCtx as Te, renderList as _, createElementVNode as V, createCommentVNode as ee, toDisplayString as R, renderSlot as Be } from "vue";
|
|
2
|
-
import { B as te, f as p, g as Se, u as Le, e as we, t as Me, b as se, h as A, r as Ee, c as Ne, d as Re } from "./index-
|
|
3
|
-
import { r as ne, a as Ae } from "./setButtonCssEvent-
|
|
2
|
+
import { B as te, f as p, g as Se, u as Le, e as we, t as Me, b as se, h as A, r as Ee, c as Ne, d as Re } from "./index-CGr5-mvg.mjs";
|
|
3
|
+
import { r as ne, a as Ae } from "./setButtonCssEvent-T2QV1cDz.mjs";
|
|
4
4
|
import { _ as $e } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
5
|
const ze = {
|
|
6
6
|
/**
|