hisonvue 1.1.4 → 1.1.5
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-BzYBxdbM.mjs → HAccordion-2BXGsG5B.mjs} +2 -2
- package/dist/{HAccordion-Dv-0kIeJ.js → HAccordion-BXzQTj-T.js} +1 -1
- package/dist/{HBaggie-BrKjhTmV.js → HBaggie-DP-oXbIt.js} +1 -1
- package/dist/{HBaggie-L15S6qU_.mjs → HBaggie-DbUnI6Cg.mjs} +2 -2
- package/dist/{HBanner-_c3_uNZ-.js → HBanner-C_RVokKc.js} +1 -1
- package/dist/{HBanner-Cs789wZY.mjs → HBanner-DS1wAGBj.mjs} +2 -2
- package/dist/{HButton-C-5U9CYg.mjs → HButton-CJZsjgRh.mjs} +2 -2
- package/dist/{HButton-DOQKYh71.js → HButton-EmsUduJx.js} +1 -1
- package/dist/{HCalendar-BipekQSd.mjs → HCalendar-BHuielDt.mjs} +468 -458
- package/dist/{HCalendar-c2E04a6F.js → HCalendar-BQcg95QP.js} +2 -2
- package/dist/{HCaption-BdFi4pjO.mjs → HCaption-B_TLREQt.mjs} +1 -1
- package/dist/{HCaption-B9Z4Mpiq.js → HCaption-DnnfU-4f.js} +1 -1
- package/dist/HChart-C9gfq-PC.mjs +187 -0
- package/dist/HChart-CPILy-I8.js +1 -0
- package/dist/{HDrawer-ByedlBps.mjs → HDrawer-D_kSIGBU.mjs} +1 -1
- package/dist/{HDrawer-BQoL9a2M.js → HDrawer-tfvUaRKv.js} +1 -1
- package/dist/{HDropdown-B7jzU0cs.mjs → HDropdown-BIPy8aU4.mjs} +2 -2
- package/dist/{HDropdown-DTgQ8ftU.js → HDropdown-BjUvzvFC.js} +1 -1
- package/dist/{HFileset-BGoufA9f.mjs → HFileset-BtK0nmzk.mjs} +1 -1
- package/dist/{HFileset-Cjaw2O3B.js → HFileset-PW9YCJgS.js} +1 -1
- package/dist/{HGap-dZHCG6qG.js → HGap-BbdxTgBt.js} +1 -1
- package/dist/{HGap-o5cZ31NS.mjs → HGap-CW02Hxpc.mjs} +1 -1
- package/dist/{HGrid-WGfCDsSF.mjs → HGrid-CJ4-xVpR.mjs} +113 -86
- package/dist/HGrid-olge21bD.js +1 -0
- package/dist/{HImagebox-CffwxfLM.js → HImagebox-AXcA-jAB.js} +1 -1
- package/dist/{HImagebox-BPa0Q6fk.mjs → HImagebox-FTiJuOTN.mjs} +1 -1
- package/dist/{HInput-cbRg1F3h.js → HInput-CZ11eUJB.js} +1 -1
- package/dist/{HInput-CQ7d9LR-.mjs → HInput-Cqo_Tfru.mjs} +1 -1
- package/dist/{HInputGroup-B1osISBq.mjs → HInputGroup-SzCxRqaF.mjs} +1 -1
- package/dist/{HInputGroup-BsP87aLA.js → HInputGroup-zaJVW7RE.js} +1 -1
- package/dist/{HLabel-tg5p1PWE.mjs → HLabel-DEVMDggG.mjs} +2 -2
- package/dist/{HLabel-BPlT16ny.js → HLabel-jZG7tY-0.js} +1 -1
- package/dist/{HLayout-C1x5k8_W.js → HLayout-Fh65aaVI.js} +1 -1
- package/dist/{HLayout-DkGhoxFJ.mjs → HLayout-x_jVkIo4.mjs} +1 -1
- package/dist/{HList-B_W8rTjZ.js → HList-JIhEylRe.js} +1 -1
- package/dist/{HList-vGkLpoY9.mjs → HList-V-fyd5fw.mjs} +2 -2
- package/dist/{HModal-D-XuHQbV.mjs → HModal-B7pME4H2.mjs} +1 -1
- package/dist/{HModal-DAbW9nf8.js → HModal-M0YUil9A.js} +1 -1
- package/dist/HNote-C5nujdV1.js +1 -0
- package/dist/{HNote-_E_hiFhb.mjs → HNote-HqNrL-U2.mjs} +195 -137
- package/dist/{HPagination-C_vo9s9C.js → HPagination-6aWyrTI-.js} +1 -1
- package/dist/{HPagination-DZlbOqpd.mjs → HPagination-h8MaMUIE.mjs} +2 -2
- package/dist/{HParagraph-BjceB4Ns.mjs → HParagraph-CP1IofM4.mjs} +1 -1
- package/dist/{HParagraph-BIw7MBhH.js → HParagraph-IvsIOdD1.js} +1 -1
- package/dist/{HPopup-s9d8mVuM.js → HPopup-Cj5IaN9N.js} +1 -1
- package/dist/{HPopup-BYFWFdFV.mjs → HPopup-DUnn4AIb.mjs} +1 -1
- package/dist/{HSpinner-xBqdZckJ.js → HSpinner-HdIJ62aF.js} +1 -1
- package/dist/{HSpinner-RGpoM6-h.mjs → HSpinner-bShjHynQ.mjs} +1 -1
- package/dist/{HTable-DBqYOBFv.js → HTable-BgZ-XAZx.js} +1 -1
- package/dist/{HTable-EjjZX5VV.mjs → HTable-BuGAaqrq.mjs} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-C3MEbk_F.mjs → index-BU8h1J_W.mjs} +1 -1
- package/dist/{index-CwePYZaW.js → index-BzCcaeiL.js} +1 -1
- package/dist/{setButtonCssEvent-B9b6lRmT.mjs → setButtonCssEvent-C-ESkC60.mjs} +1 -1
- package/dist/{setButtonCssEvent-Cza1WBk4.js → setButtonCssEvent-Oy4ojn9y.js} +1 -1
- package/package.json +1 -1
- package/dist/HChart-DjFP4QD3.mjs +0 -179
- package/dist/HChart-JkV5z9ZG.js +0 -1
- package/dist/HGrid-D2han0jb.js +0 -1
- package/dist/HNote-nxbvJZx8.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { G as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
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, h as k, g as re, u as oe, e as z, t as G, o as b, a as ne, l as h, F as _, v as S, d as B, r as ae, c as ue } from "./index-BU8h1J_W.mjs";
|
|
3
|
+
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const se = {
|
|
5
5
|
modelValue: Array,
|
|
6
6
|
id: { type: String, required: !0 },
|
|
7
7
|
columns: {
|
|
@@ -46,7 +46,7 @@ const ne = {
|
|
|
46
46
|
selectionPolicy: {
|
|
47
47
|
type: String,
|
|
48
48
|
required: !1,
|
|
49
|
-
validator: (e) =>
|
|
49
|
+
validator: (e) => le.includes(e)
|
|
50
50
|
},
|
|
51
51
|
/* Value representing null in the grid. */
|
|
52
52
|
nullValue: { type: String, required: !1 },
|
|
@@ -59,7 +59,7 @@ const ne = {
|
|
|
59
59
|
dateFormat: {
|
|
60
60
|
type: String,
|
|
61
61
|
required: !1,
|
|
62
|
-
validator: (e) =>
|
|
62
|
+
validator: (e) => ie.includes(e)
|
|
63
63
|
},
|
|
64
64
|
/**
|
|
65
65
|
* The format of the month in the grid.
|
|
@@ -69,7 +69,7 @@ const ne = {
|
|
|
69
69
|
monthFormat: {
|
|
70
70
|
type: String,
|
|
71
71
|
required: !1,
|
|
72
|
-
validator: (e) =>
|
|
72
|
+
validator: (e) => te.includes(e)
|
|
73
73
|
},
|
|
74
74
|
/* Sets the alter-row of the grid (the function that alternates the colors of each row). */
|
|
75
75
|
alterRow: { type: Boolean, default: !0 },
|
|
@@ -104,7 +104,7 @@ const ne = {
|
|
|
104
104
|
verticalAlign: {
|
|
105
105
|
type: String,
|
|
106
106
|
required: !1,
|
|
107
|
-
validator: (e) =>
|
|
107
|
+
validator: (e) => ee.includes(e)
|
|
108
108
|
},
|
|
109
109
|
/* Specifies the default font-size of the grid cell. Enter a css text. The unit is px. */
|
|
110
110
|
cellFontSize: { type: String, required: !1 },
|
|
@@ -132,7 +132,7 @@ const ne = {
|
|
|
132
132
|
color: {
|
|
133
133
|
type: String,
|
|
134
134
|
required: !1,
|
|
135
|
-
validator: (e) =>
|
|
135
|
+
validator: (e) => X.includes(e) || Q(e)
|
|
136
136
|
},
|
|
137
137
|
/* Sets the border color of the grid. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
|
|
138
138
|
gridBorderColor: { type: String, required: !1 },
|
|
@@ -208,7 +208,7 @@ const ne = {
|
|
|
208
208
|
linkVisitedFontColor: { type: String, required: !1 },
|
|
209
209
|
/* Sets the font color of the link type cell on focus. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
|
|
210
210
|
linkFocusFontColor: { type: String, required: !1 }
|
|
211
|
-
},
|
|
211
|
+
}, fe = {
|
|
212
212
|
activeCell: Function,
|
|
213
213
|
activeCells: Function,
|
|
214
214
|
activeRow: Function,
|
|
@@ -240,106 +240,133 @@ const ne = {
|
|
|
240
240
|
keydownEditor: Function,
|
|
241
241
|
inputEditor: Function,
|
|
242
242
|
keydownGrid: Function
|
|
243
|
-
},
|
|
243
|
+
}, de = N({
|
|
244
244
|
name: "HGrid",
|
|
245
245
|
props: {
|
|
246
|
-
...
|
|
247
|
-
...
|
|
246
|
+
...se,
|
|
247
|
+
...fe
|
|
248
248
|
},
|
|
249
249
|
emits: ["mounted", "responsive-change"],
|
|
250
|
-
setup(e, { emit:
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
},
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
250
|
+
setup(e, { emit: m }) {
|
|
251
|
+
const f = k.grid, y = c(null), t = c(null), s = e.id ? e.id : re(), d = `hgrid:${s}`, q = oe(), C = c(e.visible), V = H(() => C.value ? "" : "hison-display-none"), E = c([]), I = ["columns", "id", "class", "style", "visible"], w = c(0), A = () => {
|
|
252
|
+
$(w);
|
|
253
|
+
}, O = c(""), v = c(!1), g = c(!0);
|
|
254
|
+
let L = !1;
|
|
255
|
+
const x = H(() => {
|
|
256
|
+
w.value;
|
|
257
|
+
const r = z(G(e.class) || "", q.value), l = b(r, "color") ?? "primary", a = b(r, "size");
|
|
258
|
+
ne(r, "col") === -1 && r.push("hison-col-12"), E.value = r;
|
|
257
259
|
const i = {};
|
|
258
260
|
i["data-id"] = s;
|
|
259
|
-
for (const [
|
|
260
|
-
|
|
261
|
-
return i["size-level"] = i["size-level"] &&
|
|
262
|
-
}),
|
|
263
|
-
switch (
|
|
264
|
-
case
|
|
265
|
-
|
|
261
|
+
for (const [o, u] of Object.entries(e))
|
|
262
|
+
I.includes(o) || u != null && (i[o.replace(/[A-Z]/g, (n) => "-" + n.toLowerCase())] = String(u));
|
|
263
|
+
return i["size-level"] = i["size-level"] && h.utils.isNumber(i["size-level"]) ? String(Math.min(Math.max(Number(i["size-level"]), 1), 9)) : R(5, a), l && !i.color && (i.color = l), i.color && (i.color = _(i.color) ?? i.color), (e.invertColor || k.componentStyle.invertColor) && (i["invert-color"] = "true"), O.value = i.color, i;
|
|
264
|
+
}), R = (r, l) => {
|
|
265
|
+
switch (l = l ?? k.componentStyle.size, l) {
|
|
266
|
+
case S.s:
|
|
267
|
+
r -= 2;
|
|
266
268
|
break;
|
|
267
|
-
case
|
|
269
|
+
case S.m:
|
|
268
270
|
break;
|
|
269
|
-
case
|
|
270
|
-
|
|
271
|
+
case S.l:
|
|
272
|
+
r += 2;
|
|
271
273
|
break;
|
|
272
|
-
case
|
|
273
|
-
|
|
274
|
+
case S.xl:
|
|
275
|
+
r += 3;
|
|
274
276
|
break;
|
|
275
277
|
}
|
|
276
|
-
return String(Math.min(Math.max(
|
|
277
|
-
},
|
|
278
|
-
if (
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
278
|
+
return String(Math.min(Math.max(r, 1), 9));
|
|
279
|
+
}, p = () => {
|
|
280
|
+
if (!g.value) return;
|
|
281
|
+
B(d), ae(d, () => {
|
|
282
|
+
g.value && (B(d), D(), A(), P(() => {
|
|
283
|
+
g.value && p();
|
|
284
|
+
}));
|
|
285
|
+
}), L || (f.init(), L = !0);
|
|
286
|
+
const r = y.value;
|
|
287
|
+
if (!r) return;
|
|
288
|
+
const l = r.querySelector("[data-vanillagrid]");
|
|
282
289
|
if (!l) return;
|
|
283
|
-
e.columns.forEach((
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
for (const
|
|
287
|
-
const
|
|
288
|
-
if (
|
|
289
|
-
const
|
|
290
|
-
|
|
290
|
+
Array.from(l.querySelectorAll("[data-col]")).forEach((i) => i.remove()), e.columns.forEach((i) => {
|
|
291
|
+
const o = document.createElement("div");
|
|
292
|
+
o.setAttribute("data-col", "");
|
|
293
|
+
for (const u in i) {
|
|
294
|
+
const n = i[u];
|
|
295
|
+
if (n != null) {
|
|
296
|
+
const M = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
297
|
+
o.setAttribute(M, String(n));
|
|
291
298
|
}
|
|
292
299
|
}
|
|
293
|
-
l.appendChild(
|
|
294
|
-
}),
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
t.value.isHisonvueComponent = !0, t.value.getId = () => s, t.value.getType = () => "grid", "isGridVisible" in t.value && delete t.value.isGridVisible, "setGridVisible" in t.value && delete t.value.setGridVisible, t.value.isVisible = () => C.value, t.value.setVisible = (
|
|
298
|
-
C.value =
|
|
299
|
-
}, t.value.getDataModel = () => new
|
|
300
|
-
if (!(!
|
|
301
|
-
return t.value.load(
|
|
302
|
-
}, t.value.reload = () =>
|
|
303
|
-
const
|
|
304
|
-
t.value.load = (
|
|
300
|
+
l.appendChild(o);
|
|
301
|
+
}), f.mountGrid(r), l.style.border = "none", l.style.boxShadow = `0 0.5px 1px 0.5px ${O.value}`;
|
|
302
|
+
const a = f.getGrid(s);
|
|
303
|
+
if (a && (a.getId = () => s), t.value = a, t.value) {
|
|
304
|
+
t.value.isHisonvueComponent = !0, t.value.getId = () => s, t.value.getType = () => "grid", "isGridVisible" in t.value && delete t.value.isGridVisible, "setGridVisible" in t.value && delete t.value.setGridVisible, t.value.isVisible = () => C.value, t.value.setVisible = (o) => {
|
|
305
|
+
C.value = o;
|
|
306
|
+
}, t.value.getDataModel = () => new h.data.DataModel(t.value.getValues()), t.value.setDataModel = (o) => {
|
|
307
|
+
if (!(!o || o.getRowCount() == 0))
|
|
308
|
+
return t.value.load(o);
|
|
309
|
+
}, t.value.reload = () => ue(d);
|
|
310
|
+
const i = t.value.load.bind(t.value);
|
|
311
|
+
t.value.load = (o) => o && o.getIsDataModel && o.getIsDataModel() ? i(o.getRows()) : i(o);
|
|
312
|
+
}
|
|
313
|
+
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)), v.value = !1, r.__hgridDestroyed = !1, m("mounted", t.value);
|
|
314
|
+
}, D = () => {
|
|
315
|
+
B(d);
|
|
316
|
+
const r = y.value;
|
|
317
|
+
if (!(!r || v.value)) {
|
|
318
|
+
if (!r.isConnected) {
|
|
319
|
+
v.value = !0;
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
try {
|
|
323
|
+
f.unmountGrid(r);
|
|
324
|
+
} catch (l) {
|
|
325
|
+
console.warn("[HGrid] unmountGrid skipped:", l);
|
|
326
|
+
}
|
|
327
|
+
v.value = !0, r.__hgridDestroyed = !0, t.value = null;
|
|
305
328
|
}
|
|
306
|
-
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)), k("mounted", t.value);
|
|
307
|
-
}, O = () => {
|
|
308
|
-
re(b), u.value && d.unmountGrid(u.value);
|
|
309
329
|
};
|
|
310
|
-
return
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
330
|
+
return T(p), U(() => {
|
|
331
|
+
g.value = !1, D();
|
|
332
|
+
}), F(q, (r) => {
|
|
333
|
+
if (v.value) return;
|
|
334
|
+
const l = t.value;
|
|
335
|
+
if (!l || typeof l.setGridSizeLevel != "function") return;
|
|
336
|
+
const a = z(G(e.class) || "", q.value), i = b(a, "color"), o = b(a, "size"), u = e.sizeLevel && h.utils.isNumber(String(e.sizeLevel)) ? String(Math.min(Math.max(Number(e.sizeLevel), 1), 9)) : R(5, o);
|
|
337
|
+
l.setGridSizeLevel(Number(u));
|
|
338
|
+
let n = "";
|
|
339
|
+
i && !e.color && (n = i), n && (n = _(n) ?? n, typeof l.setGridColor == "function" && l.setGridColor(n), (e.invertColor || k.componentStyle.invertColor) && typeof l.invertColor == "function" && l.invertColor(!0)), m("responsive-change", r);
|
|
340
|
+
}), F(
|
|
341
|
+
() => e.visible,
|
|
342
|
+
(r) => {
|
|
343
|
+
const l = !!r;
|
|
344
|
+
l !== C.value && (C.value = l);
|
|
345
|
+
}
|
|
346
|
+
), F(
|
|
347
|
+
() => e.class,
|
|
348
|
+
() => {
|
|
349
|
+
A();
|
|
317
350
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
const r = !!l;
|
|
321
|
-
r !== C.value && (C.value = r);
|
|
322
|
-
}), F(() => e.class, () => {
|
|
323
|
-
B();
|
|
324
|
-
}), {
|
|
325
|
-
editorWrap: u,
|
|
351
|
+
), {
|
|
352
|
+
editorWrap: y,
|
|
326
353
|
props: e,
|
|
327
|
-
bindAttrs:
|
|
328
|
-
responsiveClassList:
|
|
329
|
-
visibleClass:
|
|
354
|
+
bindAttrs: x,
|
|
355
|
+
responsiveClassList: E,
|
|
356
|
+
visibleClass: V
|
|
330
357
|
};
|
|
331
358
|
}
|
|
332
359
|
});
|
|
333
|
-
function
|
|
334
|
-
return
|
|
360
|
+
function Ce(e, m, f, y, t, s) {
|
|
361
|
+
return j(), K("div", {
|
|
335
362
|
ref: "editorWrap",
|
|
336
|
-
class:
|
|
337
|
-
style:
|
|
363
|
+
class: Y(["hison-grid", "hison-wrapper", ...e.responsiveClassList, e.visibleClass]),
|
|
364
|
+
style: W(e.props.style)
|
|
338
365
|
}, [
|
|
339
|
-
|
|
366
|
+
Z("div", J({ "data-vanillagrid": "" }, e.bindAttrs), null, 16)
|
|
340
367
|
], 6);
|
|
341
368
|
}
|
|
342
|
-
const
|
|
369
|
+
const ke = /* @__PURE__ */ ce(de, [["render", Ce]]);
|
|
343
370
|
export {
|
|
344
|
-
|
|
371
|
+
ke as default
|
|
345
372
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("./index-BzCcaeiL.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 o=i.extractResponsiveClasses(i.toClassString(e.class)||"",k.value),r=i.getSpecificClassValueFromClassList(o,"color")??"primary",c=i.getSpecificClassValueFromClassList(o,"size");i.getIndexSpecificClassNameFromClassList(o,"col")===-1&&o.push("hison-col-12"),q.value=o;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),r&&!l.color&&(l.color=r),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=(o,r)=>{switch(r=r??i.hisonCloser.componentStyle.size,r){case i.Size.s:o-=2;break;case i.Size.m:break;case i.Size.l:o+=2;break;case i.Size.xl:o+=3;break}return String(Math.min(Math.max(o,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 o=g.value;if(!o)return;const r=o.querySelector("[data-vanillagrid]");if(!r)return;Array.from(r.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))}}r.appendChild(a)}),d.mountGrid(o),r.style.border="none",r.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,o.__hgridDestroyed=!1,b("mounted",t.value)},A=()=>{i.unregisterReloadable(C);const o=g.value;if(!(!o||y.value)){if(!o.isConnected){y.value=!0;return}try{d.unmountGrid(o)}catch(r){console.warn("[HGrid] unmountGrid skipped:",r)}y.value=!0,o.__hgridDestroyed=!0,t.value=null}};return n.onMounted(w),n.onBeforeUnmount(()=>{S.value=!1,A()}),n.watch(k,o=>{if(y.value)return;const r=t.value;if(!r||typeof r.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);r.setGridSizeLevel(Number(s));let u="";l&&!e.color&&(u=l),u&&(u=i.getHexCodeFromColorText(u)??u,typeof r.setGridColor=="function"&&r.setGridColor(u),(e.invertColor||i.hisonCloser.componentStyle.invertColor)&&typeof r.invertColor=="function"&&r.invertColor(!0)),b("responsive-change",o)}),n.watch(()=>e.visible,o=>{const r=!!o;r!==v.value&&(v.value=r)}),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,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-BzCcaeiL.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,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-BU8h1J_W.mjs";
|
|
3
3
|
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const We = {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("./index-CwePYZaW.js"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.js"),De={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},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)}},H=new WeakSet,O=new WeakSet,oe=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)},te=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)},ie=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)}},ue=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)}},le=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)}},re=e=>{const n=e.currentTarget;n.readOnly||n.classList.remove("hison-input-on-mouseover")},qe=e=>{H.has(e)||(H.add(e),e.addEventListener("mouseenter",ie),e.addEventListener("mouseleave",ue),e.addEventListener("touchstart",se,{passive:!1,capture:!0}),e.addEventListener("touchend",le,{passive:!1,capture:!0}),e.addEventListener("touchcancel",re,{passive:!1,capture:!0}))},Re=e=>{H.has(e)&&(H.delete(e),e.removeEventListener("mouseenter",ie),e.removeEventListener("mouseleave",ue),e.removeEventListener("touchstart",se,{capture:!0}),e.removeEventListener("touchend",le,{capture:!0}),e.removeEventListener("touchcancel",re,{capture:!0}),e.classList.remove("hison-input-on-mouseover"))},ze=e=>{O.has(e)||(O.add(e),e.addEventListener("focus",oe),e.addEventListener("blur",te))},Ke=e=>{O.has(e)&&(O.delete(e),e.removeEventListener("focus",oe),e.removeEventListener("blur",te),e.classList.remove("hison-input-on-active"),e.classList.remove("hison-input-on-mouseover"))},Ue=i.defineComponent({name:"HInput",props:De,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),de=i.computed(()=>o.value),j=`hinput:${p}`,x=u.useDevice(),I=i.ref([]),W=()=>{I.value=u.extractResponsiveClasses(u.toClassString(e.class)||"",x.value),u.getIndexSpecificClassNameFromClassList(I.value,"col")===-1&&I.value.push("hison-col-12"),u.addComponentNameToClass(I.value,"size",u.hisonCloser.componentStyle.size),u.addComponentNameToClass(I.value,"color","primary")},r=i.ref(e.inputType??u.InputType.text),Y=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"}}),ae=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),w=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),X=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??X(r.value)),pe=i.computed(()=>({textAlign:k.value})),E=i.ref(e.border??!0),me=t=>(t=String(t),C.value&&(t=t.substring(0,C.value)),h.value&&(t=u.hison.utils.getCutByteLength(t,h.value)),t),ve=t=>(t=Number(t),T.value&&t>T.value&&(t=T.value),$.value&&t<$.value&&(t=$.value),w.value&&(t=u.hison.utils.getRound(t,w.value)),t),J=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=me(t);break;case u.InputType.number:r.value===u.InputType.number&&(t=ve(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(s){console.warn("[HInput] Failed to format value",t,s)}return t},l=i.ref(J(e.modelValue)),fe=i.computed(()=>l.value),v=i.ref(null),F=i.ref(e.visible),P=i.ref(e.title??""),A=i.ref(e.nullText??""),y=i.ref(e.editMode),ye=i.computed(()=>y.value===u.EditMode.disable),Q=i.computed(()=>y.value===u.EditMode.readonly),Me=i.computed(()=>E.value&&!Q.value?"hison-border":""),ge=i.computed(()=>y.value!==u.EditMode.editable?[`hison-input-${y.value}`,`hison-input-${Y.value}-${y.value}`]:[]),S=i.ref(e.required),be=i.computed(()=>S.value?["hison-input-required",`hison-input-${Y.value}-required`]:[]),V=i.ref(e.placeholder??""),D=i.ref(e.fontBold),Te=i.computed(()=>{if(D.value)return"hison-font-bold"}),q=i.ref(e.fontItalic),$e=i.computed(()=>{if(q.value)return"hison-font-italic"}),R=i.ref(e.fontThruline),Ce=i.computed(()=>{if(R.value)return"hison-font-thruline"}),z=i.ref(e.fontUnderline),he=i.computed(()=>{if(z.value)return"hison-font-underline"}),ke=i.computed(()=>F.value?"":"hison-display-none"),Z=i.ref(!1),g=i.ref(!1),K=i.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),c=i.inject("registerToInputGroup",null),d=i.inject("notifyInputGroupStatus",null),B=i.inject("radioMembershipChanged",null),G=t=>{if(r.value===u.InputType.checkbox||r.value===u.InputType.radio)return t?e.checkedText:e.uncheckedText;if(u.isNullOrUndefined(t)||t==="")return A.value??"";if(e.inputTextdHandler)return e.inputTextdHandler(t);let s=String(t);try{switch(r.value){case u.InputType.password:s="•".repeat(t.length);break;case u.InputType.number:s=u.hison.utils.getNumberFormat(t,M.value??u.hison.getNumberFormat());break;case u.InputType.date:s=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getDateFormat());break;case u.InputType.month:s=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getYearMonthFormat());break;case u.InputType.time:s=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getTimeFormat());break;case u.InputType.select:const N=m.value,ne=N.selectedIndex;s=ne>=0?N.options[ne].text:"";break}}catch(N){console.warn("[HInput] Failed to format value",t,N),s=""}return s},U=i.ref(""),Ie=t=>{y.value===u.EditMode.editable&&(Z.value=!0),i.nextTick(()=>{var s;(s=m.value)==null||s.focus()})},we=t=>{let s=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))&&(s=J(s),m.value.value=s),l.value=s,g.value=!0,d==null||d(p,l.value),n("input",t,f.value,l.value),n("update:modelValue",l.value)},Be=t=>{v.value=l.value,n("focus",t,f.value)},Ne=t=>{v.value!==l.value&&(a(l.value,!0,!0),g.value=!0,d==null||d(p,l.value)),Z.value=!1,n("blur",t,f.value)},a=(t,s=!0,N=!1)=>{l.value=s?J(t):t,U.value=G(l.value),r.value===u.InputType.checkbox||r.value===u.InputType.radio?m.value.checked=!!l.value:m.value.value=l.value,N&&n("change",v.value,l.value,f.value)},Le=t=>{const s=t.target;a(s.value,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Ee=t=>{const s=t.target;a(s.value,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Fe=t=>{const s=t.target;a(s.checked,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Pe=t=>{const s=t.target;a(s.checked,!1,!0),g.value=!0,d&&o.value?d(o.value,s.checked?p:null):d==null||d(p,l.value),n("update:modelValue",l.value)},Ae=t=>{const s=t.target;a(s.value,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Se=t=>{if(Q.value&&(t.code==="Space"||t.code==="Enter")){t.preventDefault(),t.stopPropagation();return}n("keydown",t,f.value)},_=()=>{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(j,()=>{ee(),i.nextTick(_)}),m.value&&(W(),b.value&&qe(b.value),r.value!==u.InputType.checkbox&&r.value!==u.InputType.radio&&r.value!==u.InputType.range&&r.value!==u.InputType.color&&ze(m.value),a(l.value,!1),f.value={isHisonvueComponent:!0,getId:()=>p,getType:()=>"input",getName:()=>o.value,setName:t=>{if(t===o.value)return;const s=o.value;o.value=t,r.value===u.InputType.radio&&(B==null||B(p,s,t,!!l.value))},getText:()=>U.value,getValue:()=>l.value,setValue:t=>{v.value=l.value,l.value=t,a(l.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=l.value,a(l.value),e.textAlign==null&&(k.value=X(r.value))},getFormat:()=>M.value??"",setFormat:t=>{M.value=t,v.value=l.value,a(l.value)},getNullText:()=>A.value,setNullText:t=>{A.value=t,(u.isNullOrUndefined(l.value)||l.value==="")&&(U.value=G(l.value))},getEditMode:()=>y.value,setEditMode:t=>{y.value=t},getMaxNumber:()=>T.value,setMaxNumber:t=>{u.hison.utils.isNumeric(t)&&(T.value=t,v.value=l.value,r.value===u.InputType.number&&a(l.value))},getMinNumber:()=>$.value,setMinNumber:t=>{u.hison.utils.isNumeric(t)&&($.value=t,v.value=l.value,r.value===u.InputType.number&&a(l.value))},getRoundNumber:()=>w.value,setRoundNumber:t=>{!u.hison.utils.isPositiveInteger(t)&&!u.hison.utils.isNegativeInteger(t)&&t!==0||(w.value=t,v.value=l.value,r.value===u.InputType.number&&a(l.value))},getMaxLength:()=>C.value,setMaxLength:t=>{u.hison.utils.isPositiveInteger(t)&&(C.value=t),v.value=l.value,a(l.value)},getMaxByte:()=>h.value,setMaxByte:t=>{u.hison.utils.isPositiveInteger(t)&&(h.value=t),v.value=l.value,a(l.value)},getRequired:()=>S.value,setRequired:t=>{S.value=t},getPlaceholder:()=>V.value,setPlaceholder:t=>{V.value=t},isFontBold:()=>D.value,setFontBold:t=>{D.value=t},isFontItalic:()=>q.value,setFontItalic:t=>{q.value=t},isFontThruline:()=>R.value,setFontThruline:t=>{R.value=t},isFontUnderline:()=>z.value,setFontUnderline:t=>{z.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:()=>K.value,setTabIndex:t=>{K.value=t!=null?Number(t):null},focus:()=>{var t;b.value?b.value.focus():(t=m.value)==null||t.focus()},reload:()=>u.reloadHisonComponent(j)},u.hisonCloser.component.inputList[p]=f.value,c&&c(p),n("mounted",f.value))},ee=()=>{u.unregisterReloadable(j),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&&Ke(m.value),b.value&&Re(b.value)};return i.onMounted(_),i.onBeforeUnmount(ee),i.watch(x,t=>{W(),n("responsive-change",t)}),i.watch(()=>e.modelValue,t=>{a(t,!1)}),i.watch(()=>e.name,t=>{if(t&&t!==o.value){const s=o.value;o.value=t,r.value===u.InputType.radio&&(B==null||B(p,s,t,!!l.value))}}),i.watch(()=>e.visible,t=>{const s=!!t;s!==F.value&&(F.value=s)}),i.watch(()=>e.title,t=>{const s=t??"";s!==P.value&&(P.value=s)}),i.watch(()=>e.nullText,t=>{const s=t??"";s!==A.value&&(A.value=s,(u.isNullOrUndefined(l.value)||l.value==="")&&(U.value=G(l.value)))}),i.watch(()=>e.inputType,t=>{t&&t!==r.value&&(r.value=t,e.textAlign==null&&(k.value=X(r.value)),a(l.value))}),i.watch(()=>e.format,t=>{const s=t??null;s!==M.value&&(M.value=s,a(l.value))}),i.watch(()=>e.maxNumber,t=>{const s=u.hison.utils.isNumeric(t)?Number(t):null;s!==T.value&&(T.value=s,r.value===u.InputType.number&&a(l.value))}),i.watch(()=>e.minNumber,t=>{const s=u.hison.utils.isNumeric(t)?Number(t):null;s!==$.value&&($.value=s,r.value===u.InputType.number&&a(l.value))}),i.watch(()=>e.roundNumber,t=>{const s=u.hison.utils.isInteger(t)||u.hison.utils.isNegativeInteger(t)||t==="0"?Number(t):null;s!==w.value&&(w.value=s,r.value===u.InputType.number&&a(l.value))}),i.watch(()=>e.maxLength,t=>{const s=u.hison.utils.isPositiveInteger(t)?Number(t):null;s!==C.value&&(C.value=s,a(l.value))}),i.watch(()=>e.maxByte,t=>{const s=u.hison.utils.isPositiveInteger(t)?Number(t):null;s!==h.value&&(h.value=s,a(l.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 s=!!t;s!==E.value&&(E.value=s)}),i.watch(()=>e.placeholder,t=>{const s=t??"";s!==V.value&&(V.value=s)}),i.watch(()=>e.required,t=>{const s=!!t;s!==S.value&&(S.value=s)}),i.watch(()=>e.fontBold,t=>{const s=!!t;s!==D.value&&(D.value=s)}),i.watch(()=>e.fontItalic,t=>{const s=!!t;s!==q.value&&(q.value=s)}),i.watch(()=>e.fontThruline,t=>{const s=!!t;s!==R.value&&(R.value=s)}),i.watch(()=>e.fontUnderline,t=>{const s=!!t;s!==z.value&&(z.value=s)}),i.watch(()=>e.editMode,t=>{t&&t!==y.value&&(y.value=t)}),i.watch(()=>e.tabIndex,t=>{const s=t===null||t===""?null:Number(t);s!==K.value&&(K.value=s)}),i.watch(()=>e.class,()=>{W()}),i.watch(()=>e.toggleStyle,t=>{const s=t??"default";s!==L.value&&(s==="default"||s==="switch")&&(L.value=s)}),{inputRef:m,inputTextRef:b,inputMethods:i.computed(()=>i.unref(f)),inputValue:fe,editing:Z,props:e,id:p,nameAttr:de,responsiveClassList:I,visibleClass:ke,editModeClassList:ge,requiredClassList:be,fontBoldClass:Te,fontItalicClass:$e,fontThrulineClass:Ce,fontUnderlineClass:he,textAlignStyle:pe,borderClass:Me,disable:ye,readonly:Q,inputType:r,inputExpressionType:Y,inputAttrType:ae,title:P,placeholder:V,maxNumber:T,minNumber:$,spanText:U,toggleStyle:L,tabIndex:K,onInput:we,onTextInputFocus:Ie,onFocus:Be,onBlur:Ne,onRangeChange:Le,onColorChange:Ee,onCheckboxChange:Fe,onRadioChange:Pe,onSelectChange:Ae,onKeydown:Se}}}),He=["id","name","value","disabled","readonly","title","tabindex"],Oe=["id","name","value","disabled","readonly","checked","title","tabindex"],je=["id","name","disabled","readonly","checked","title","tabindex"],We=["id","name","disabled","readonly","checked","title","tabindex"],Ye=["id","name","disabled","readonly","checked","title","tabindex"],Xe=["id","name","disabled","readonly","checked","title","tabindex"],Je=["id","name","value","disabled","readonly","title","tabindex"],Qe=["value"],Ze=["id","name","value","disabled","readonly","placeholder","title","maxlength","tabindex"],Ge=["id","name","value","disabled","readonly","title","placeholder","tabindex"],xe=["id","name","value","disabled","readonly","type","title","placeholder","max","min","tabindex"];function ce(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,He)],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,Oe)],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,je)):(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,We),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,Ye)):(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,Xe),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.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,Qe))),128))],46,Je)):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.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,Ze)):(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.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,Ge),[[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.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,xe),[[i.vShow,e.editing]])],64))],2)}const _e=Ve._export_sfc(Ue,[["render",ce]]);exports.default=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("./index-BzCcaeiL.js"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.js"),De={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},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)}},H=new WeakSet,O=new WeakSet,oe=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)},te=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)},ie=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)}},ue=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)}},le=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)}},re=e=>{const n=e.currentTarget;n.readOnly||n.classList.remove("hison-input-on-mouseover")},qe=e=>{H.has(e)||(H.add(e),e.addEventListener("mouseenter",ie),e.addEventListener("mouseleave",ue),e.addEventListener("touchstart",se,{passive:!1,capture:!0}),e.addEventListener("touchend",le,{passive:!1,capture:!0}),e.addEventListener("touchcancel",re,{passive:!1,capture:!0}))},Re=e=>{H.has(e)&&(H.delete(e),e.removeEventListener("mouseenter",ie),e.removeEventListener("mouseleave",ue),e.removeEventListener("touchstart",se,{capture:!0}),e.removeEventListener("touchend",le,{capture:!0}),e.removeEventListener("touchcancel",re,{capture:!0}),e.classList.remove("hison-input-on-mouseover"))},ze=e=>{O.has(e)||(O.add(e),e.addEventListener("focus",oe),e.addEventListener("blur",te))},Ke=e=>{O.has(e)&&(O.delete(e),e.removeEventListener("focus",oe),e.removeEventListener("blur",te),e.classList.remove("hison-input-on-active"),e.classList.remove("hison-input-on-mouseover"))},Ue=i.defineComponent({name:"HInput",props:De,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),de=i.computed(()=>o.value),j=`hinput:${p}`,x=u.useDevice(),I=i.ref([]),W=()=>{I.value=u.extractResponsiveClasses(u.toClassString(e.class)||"",x.value),u.getIndexSpecificClassNameFromClassList(I.value,"col")===-1&&I.value.push("hison-col-12"),u.addComponentNameToClass(I.value,"size",u.hisonCloser.componentStyle.size),u.addComponentNameToClass(I.value,"color","primary")},r=i.ref(e.inputType??u.InputType.text),Y=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"}}),ae=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),w=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),X=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??X(r.value)),pe=i.computed(()=>({textAlign:k.value})),E=i.ref(e.border??!0),me=t=>(t=String(t),C.value&&(t=t.substring(0,C.value)),h.value&&(t=u.hison.utils.getCutByteLength(t,h.value)),t),ve=t=>(t=Number(t),T.value&&t>T.value&&(t=T.value),$.value&&t<$.value&&(t=$.value),w.value&&(t=u.hison.utils.getRound(t,w.value)),t),J=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=me(t);break;case u.InputType.number:r.value===u.InputType.number&&(t=ve(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(s){console.warn("[HInput] Failed to format value",t,s)}return t},l=i.ref(J(e.modelValue)),fe=i.computed(()=>l.value),v=i.ref(null),F=i.ref(e.visible),P=i.ref(e.title??""),A=i.ref(e.nullText??""),y=i.ref(e.editMode),ye=i.computed(()=>y.value===u.EditMode.disable),Q=i.computed(()=>y.value===u.EditMode.readonly),Me=i.computed(()=>E.value&&!Q.value?"hison-border":""),ge=i.computed(()=>y.value!==u.EditMode.editable?[`hison-input-${y.value}`,`hison-input-${Y.value}-${y.value}`]:[]),S=i.ref(e.required),be=i.computed(()=>S.value?["hison-input-required",`hison-input-${Y.value}-required`]:[]),V=i.ref(e.placeholder??""),D=i.ref(e.fontBold),Te=i.computed(()=>{if(D.value)return"hison-font-bold"}),q=i.ref(e.fontItalic),$e=i.computed(()=>{if(q.value)return"hison-font-italic"}),R=i.ref(e.fontThruline),Ce=i.computed(()=>{if(R.value)return"hison-font-thruline"}),z=i.ref(e.fontUnderline),he=i.computed(()=>{if(z.value)return"hison-font-underline"}),ke=i.computed(()=>F.value?"":"hison-display-none"),Z=i.ref(!1),g=i.ref(!1),K=i.ref(e.tabIndex!==null&&e.tabIndex!==""?Number(e.tabIndex):null),c=i.inject("registerToInputGroup",null),d=i.inject("notifyInputGroupStatus",null),B=i.inject("radioMembershipChanged",null),G=t=>{if(r.value===u.InputType.checkbox||r.value===u.InputType.radio)return t?e.checkedText:e.uncheckedText;if(u.isNullOrUndefined(t)||t==="")return A.value??"";if(e.inputTextdHandler)return e.inputTextdHandler(t);let s=String(t);try{switch(r.value){case u.InputType.password:s="•".repeat(t.length);break;case u.InputType.number:s=u.hison.utils.getNumberFormat(t,M.value??u.hison.getNumberFormat());break;case u.InputType.date:s=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getDateFormat());break;case u.InputType.month:s=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getYearMonthFormat());break;case u.InputType.time:s=u.hison.utils.getDateWithFormat(t,M.value??u.hison.getTimeFormat());break;case u.InputType.select:const N=m.value,ne=N.selectedIndex;s=ne>=0?N.options[ne].text:"";break}}catch(N){console.warn("[HInput] Failed to format value",t,N),s=""}return s},U=i.ref(""),Ie=t=>{y.value===u.EditMode.editable&&(Z.value=!0),i.nextTick(()=>{var s;(s=m.value)==null||s.focus()})},we=t=>{let s=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))&&(s=J(s),m.value.value=s),l.value=s,g.value=!0,d==null||d(p,l.value),n("input",t,f.value,l.value),n("update:modelValue",l.value)},Be=t=>{v.value=l.value,n("focus",t,f.value)},Ne=t=>{v.value!==l.value&&(a(l.value,!0,!0),g.value=!0,d==null||d(p,l.value)),Z.value=!1,n("blur",t,f.value)},a=(t,s=!0,N=!1)=>{l.value=s?J(t):t,U.value=G(l.value),r.value===u.InputType.checkbox||r.value===u.InputType.radio?m.value.checked=!!l.value:m.value.value=l.value,N&&n("change",v.value,l.value,f.value)},Le=t=>{const s=t.target;a(s.value,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Ee=t=>{const s=t.target;a(s.value,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Fe=t=>{const s=t.target;a(s.checked,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Pe=t=>{const s=t.target;a(s.checked,!1,!0),g.value=!0,d&&o.value?d(o.value,s.checked?p:null):d==null||d(p,l.value),n("update:modelValue",l.value)},Ae=t=>{const s=t.target;a(s.value,!1,!0),g.value=!0,d==null||d(p,l.value),n("update:modelValue",l.value)},Se=t=>{if(Q.value&&(t.code==="Space"||t.code==="Enter")){t.preventDefault(),t.stopPropagation();return}n("keydown",t,f.value)},_=()=>{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(j,()=>{ee(),i.nextTick(_)}),m.value&&(W(),b.value&&qe(b.value),r.value!==u.InputType.checkbox&&r.value!==u.InputType.radio&&r.value!==u.InputType.range&&r.value!==u.InputType.color&&ze(m.value),a(l.value,!1),f.value={isHisonvueComponent:!0,getId:()=>p,getType:()=>"input",getName:()=>o.value,setName:t=>{if(t===o.value)return;const s=o.value;o.value=t,r.value===u.InputType.radio&&(B==null||B(p,s,t,!!l.value))},getText:()=>U.value,getValue:()=>l.value,setValue:t=>{v.value=l.value,l.value=t,a(l.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=l.value,a(l.value),e.textAlign==null&&(k.value=X(r.value))},getFormat:()=>M.value??"",setFormat:t=>{M.value=t,v.value=l.value,a(l.value)},getNullText:()=>A.value,setNullText:t=>{A.value=t,(u.isNullOrUndefined(l.value)||l.value==="")&&(U.value=G(l.value))},getEditMode:()=>y.value,setEditMode:t=>{y.value=t},getMaxNumber:()=>T.value,setMaxNumber:t=>{u.hison.utils.isNumeric(t)&&(T.value=t,v.value=l.value,r.value===u.InputType.number&&a(l.value))},getMinNumber:()=>$.value,setMinNumber:t=>{u.hison.utils.isNumeric(t)&&($.value=t,v.value=l.value,r.value===u.InputType.number&&a(l.value))},getRoundNumber:()=>w.value,setRoundNumber:t=>{!u.hison.utils.isPositiveInteger(t)&&!u.hison.utils.isNegativeInteger(t)&&t!==0||(w.value=t,v.value=l.value,r.value===u.InputType.number&&a(l.value))},getMaxLength:()=>C.value,setMaxLength:t=>{u.hison.utils.isPositiveInteger(t)&&(C.value=t),v.value=l.value,a(l.value)},getMaxByte:()=>h.value,setMaxByte:t=>{u.hison.utils.isPositiveInteger(t)&&(h.value=t),v.value=l.value,a(l.value)},getRequired:()=>S.value,setRequired:t=>{S.value=t},getPlaceholder:()=>V.value,setPlaceholder:t=>{V.value=t},isFontBold:()=>D.value,setFontBold:t=>{D.value=t},isFontItalic:()=>q.value,setFontItalic:t=>{q.value=t},isFontThruline:()=>R.value,setFontThruline:t=>{R.value=t},isFontUnderline:()=>z.value,setFontUnderline:t=>{z.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:()=>K.value,setTabIndex:t=>{K.value=t!=null?Number(t):null},focus:()=>{var t;b.value?b.value.focus():(t=m.value)==null||t.focus()},reload:()=>u.reloadHisonComponent(j)},u.hisonCloser.component.inputList[p]=f.value,c&&c(p),n("mounted",f.value))},ee=()=>{u.unregisterReloadable(j),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&&Ke(m.value),b.value&&Re(b.value)};return i.onMounted(_),i.onBeforeUnmount(ee),i.watch(x,t=>{W(),n("responsive-change",t)}),i.watch(()=>e.modelValue,t=>{a(t,!1)}),i.watch(()=>e.name,t=>{if(t&&t!==o.value){const s=o.value;o.value=t,r.value===u.InputType.radio&&(B==null||B(p,s,t,!!l.value))}}),i.watch(()=>e.visible,t=>{const s=!!t;s!==F.value&&(F.value=s)}),i.watch(()=>e.title,t=>{const s=t??"";s!==P.value&&(P.value=s)}),i.watch(()=>e.nullText,t=>{const s=t??"";s!==A.value&&(A.value=s,(u.isNullOrUndefined(l.value)||l.value==="")&&(U.value=G(l.value)))}),i.watch(()=>e.inputType,t=>{t&&t!==r.value&&(r.value=t,e.textAlign==null&&(k.value=X(r.value)),a(l.value))}),i.watch(()=>e.format,t=>{const s=t??null;s!==M.value&&(M.value=s,a(l.value))}),i.watch(()=>e.maxNumber,t=>{const s=u.hison.utils.isNumeric(t)?Number(t):null;s!==T.value&&(T.value=s,r.value===u.InputType.number&&a(l.value))}),i.watch(()=>e.minNumber,t=>{const s=u.hison.utils.isNumeric(t)?Number(t):null;s!==$.value&&($.value=s,r.value===u.InputType.number&&a(l.value))}),i.watch(()=>e.roundNumber,t=>{const s=u.hison.utils.isInteger(t)||u.hison.utils.isNegativeInteger(t)||t==="0"?Number(t):null;s!==w.value&&(w.value=s,r.value===u.InputType.number&&a(l.value))}),i.watch(()=>e.maxLength,t=>{const s=u.hison.utils.isPositiveInteger(t)?Number(t):null;s!==C.value&&(C.value=s,a(l.value))}),i.watch(()=>e.maxByte,t=>{const s=u.hison.utils.isPositiveInteger(t)?Number(t):null;s!==h.value&&(h.value=s,a(l.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 s=!!t;s!==E.value&&(E.value=s)}),i.watch(()=>e.placeholder,t=>{const s=t??"";s!==V.value&&(V.value=s)}),i.watch(()=>e.required,t=>{const s=!!t;s!==S.value&&(S.value=s)}),i.watch(()=>e.fontBold,t=>{const s=!!t;s!==D.value&&(D.value=s)}),i.watch(()=>e.fontItalic,t=>{const s=!!t;s!==q.value&&(q.value=s)}),i.watch(()=>e.fontThruline,t=>{const s=!!t;s!==R.value&&(R.value=s)}),i.watch(()=>e.fontUnderline,t=>{const s=!!t;s!==z.value&&(z.value=s)}),i.watch(()=>e.editMode,t=>{t&&t!==y.value&&(y.value=t)}),i.watch(()=>e.tabIndex,t=>{const s=t===null||t===""?null:Number(t);s!==K.value&&(K.value=s)}),i.watch(()=>e.class,()=>{W()}),i.watch(()=>e.toggleStyle,t=>{const s=t??"default";s!==L.value&&(s==="default"||s==="switch")&&(L.value=s)}),{inputRef:m,inputTextRef:b,inputMethods:i.computed(()=>i.unref(f)),inputValue:fe,editing:Z,props:e,id:p,nameAttr:de,responsiveClassList:I,visibleClass:ke,editModeClassList:ge,requiredClassList:be,fontBoldClass:Te,fontItalicClass:$e,fontThrulineClass:Ce,fontUnderlineClass:he,textAlignStyle:pe,borderClass:Me,disable:ye,readonly:Q,inputType:r,inputExpressionType:Y,inputAttrType:ae,title:P,placeholder:V,maxNumber:T,minNumber:$,spanText:U,toggleStyle:L,tabIndex:K,onInput:we,onTextInputFocus:Ie,onFocus:Be,onBlur:Ne,onRangeChange:Le,onColorChange:Ee,onCheckboxChange:Fe,onRadioChange:Pe,onSelectChange:Ae,onKeydown:Se}}}),He=["id","name","value","disabled","readonly","title","tabindex"],Oe=["id","name","value","disabled","readonly","checked","title","tabindex"],je=["id","name","disabled","readonly","checked","title","tabindex"],We=["id","name","disabled","readonly","checked","title","tabindex"],Ye=["id","name","disabled","readonly","checked","title","tabindex"],Xe=["id","name","disabled","readonly","checked","title","tabindex"],Je=["id","name","value","disabled","readonly","title","tabindex"],Qe=["value"],Ze=["id","name","value","disabled","readonly","placeholder","title","maxlength","tabindex"],Ge=["id","name","value","disabled","readonly","title","placeholder","tabindex"],xe=["id","name","value","disabled","readonly","type","title","placeholder","max","min","tabindex"];function ce(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,He)],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,Oe)],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,je)):(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,We),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,Ye)):(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,Xe),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.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,Qe))),128))],46,Je)):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.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,Ze)):(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.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,Ge),[[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.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,xe),[[i.vShow,e.editing]])],64))],2)}const _e=Ve._export_sfc(Ue,[["render",ce]]);exports.default=_e;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as en, ref as r, computed as g, inject as de, onMounted as nn, onBeforeUnmount as on, watch as a, unref as tn, nextTick as ge, createElementBlock as b, openBlock as y, normalizeClass as f, normalizeStyle as I, createElementVNode as P, Fragment as be, renderList as un, toDisplayString as ye, withDirectives as $e, vShow as Te } from "vue";
|
|
2
|
-
import { T as sn, y as x, N as ln, h as M, g as rn, u as dn, O as u, l as d, P as c, w as h, e as an, t as mn, a as vn, b as Ce, Q as ae, R as pn, U as fn, r as Mn, c as gn, d as bn } from "./index-
|
|
2
|
+
import { T as sn, y as x, N as ln, h as M, g as rn, u as dn, O as u, l as d, P as c, w as h, e as an, t as mn, a as vn, b as Ce, Q as ae, R as pn, U as fn, r as Mn, c as gn, d as bn } from "./index-BU8h1J_W.mjs";
|
|
3
3
|
import { _ as yn } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const $n = {
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as U, ref as h, provide as G, onMounted as T, onBeforeUnmount as $, watch as I, 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 _, 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 _, r as B, c as w, d as x } from "./index-BU8h1J_W.mjs";
|
|
3
3
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
4
|
const z = {
|
|
5
5
|
/**
|