hisonvue 1.1.18 → 1.1.20
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-kLooMayD.js → HAccordion-BCpczHV8.js} +1 -1
- package/dist/{HAccordion-DcBSqGEg.mjs → HAccordion-BMoSFHwf.mjs} +2 -2
- package/dist/{HBaggie-C6f9nC4M.mjs → HBaggie-CJvlgbDQ.mjs} +2 -2
- package/dist/{HBaggie-uyGznd4G.js → HBaggie-oMZLaa_F.js} +1 -1
- package/dist/{HBanner-BlFnKTdl.js → HBanner-C2_LbE2h.js} +1 -1
- package/dist/{HBanner-BJxs-91M.mjs → HBanner-DsRKDH1u.mjs} +2 -2
- package/dist/{HButton-C_VAbACh.mjs → HButton-rFSlupkR.mjs} +2 -2
- package/dist/{HButton-C0B-GYLI.js → HButton-yAD_RoyS.js} +1 -1
- package/dist/{HCalendar-FpKn-Qqp.js → HCalendar-CTlQGPMZ.js} +1 -1
- package/dist/{HCalendar-Db6pocNb.mjs → HCalendar-iWmcJSvC.mjs} +1 -1
- package/dist/{HCaption-DrFvAUQk.mjs → HCaption-DVmiGA4e.mjs} +1 -1
- package/dist/{HCaption-Ro_KdpAz.js → HCaption-c9m0kiX8.js} +1 -1
- package/dist/{HChart-Cc8h6tul.js → HChart-BiAYvoFC.js} +1 -1
- package/dist/{HChart-pHv4-Pox.mjs → HChart-RTqgX9Vw.mjs} +1 -1
- package/dist/{HDrawer-CSD8eE9O.js → HDrawer-CC6pLF5V.js} +1 -1
- package/dist/{HDrawer-BeWd8Wqh.mjs → HDrawer-_eAs8SUX.mjs} +1 -1
- package/dist/{HDropdown-B6GgKbRK.js → HDropdown-BQ86MUJn.js} +1 -1
- package/dist/{HDropdown-DL50k2zB.mjs → HDropdown-Jr1jdIcK.mjs} +2 -2
- package/dist/{HFileset-CZUHl9uC.mjs → HFileset-CuLQPIg0.mjs} +1 -1
- package/dist/{HFileset-Bv4JMkL8.js → HFileset-DzDl7B3M.js} +1 -1
- package/dist/{HGap-L0rf1Utr.mjs → HGap-2iQmQgTz.mjs} +1 -1
- package/dist/{HGap-DpEsjxzv.js → HGap-CEVavkgg.js} +1 -1
- package/dist/{HGrid-DARQl-Gk.js → HGrid-6zIauOhZ.js} +1 -1
- package/dist/{HGrid-WldfaDhY.mjs → HGrid-ifjYNehH.mjs} +1 -1
- package/dist/{HImagebox-BWYB9zcy.js → HImagebox-CIIOb3Vd.js} +1 -1
- package/dist/{HImagebox-BHo9AsJn.mjs → HImagebox-DwaNSiUE.mjs} +1 -1
- package/dist/{HInput-DpyeWPGZ.mjs → HInput-B7jIOO-G.mjs} +250 -212
- package/dist/HInput-CoawK6h1.js +1 -0
- package/dist/{HInputGroup-DVVfCSIz.js → HInputGroup-4FByzgDv.js} +1 -1
- package/dist/{HInputGroup-BT8F4jcD.mjs → HInputGroup-c6sx8xkm.mjs} +1 -1
- package/dist/{HLabel-B34Wc_Et.js → HLabel-BdJsUUwI.js} +1 -1
- package/dist/{HLabel-BsnPOH8t.mjs → HLabel-ClzEe4t5.mjs} +2 -2
- package/dist/{HLayout-DPJSRuCg.js → HLayout-cCfkCCnY.js} +1 -1
- package/dist/{HLayout-CHXrR60F.mjs → HLayout-odNbQHZs.mjs} +1 -1
- package/dist/{HList-CmfFvcuV.mjs → HList-C4Te9S2p.mjs} +2 -2
- package/dist/{HList-DDnoVe5Q.js → HList-DlESPK5m.js} +1 -1
- package/dist/{HModal-Dg2g4Cbj.js → HModal-CD42g96i.js} +1 -1
- package/dist/{HModal-Dsx3vGwQ.mjs → HModal-IPNLslSW.mjs} +1 -1
- package/dist/{HNote-D5rrvhzJ.js → HNote-D-0CwHiB.js} +1 -1
- package/dist/{HNote-CRQqzs_u.mjs → HNote-DOXVPQTE.mjs} +1 -1
- package/dist/{HPagination-qWDN1YCK.mjs → HPagination-71-p-_fA.mjs} +2 -2
- package/dist/{HPagination-CVrBuswv.js → HPagination-DAipfja0.js} +1 -1
- package/dist/{HParagraph-qW919L3G.js → HParagraph-D727CLzE.js} +1 -1
- package/dist/{HParagraph-B1LMahEG.mjs → HParagraph-DFr9VHuc.mjs} +1 -1
- package/dist/{HPopup-Dr9lLgvw.js → HPopup-BzNv0ETv.js} +1 -1
- package/dist/{HPopup-5Eo5ywZ0.mjs → HPopup-CKF03bB8.mjs} +1 -1
- package/dist/{HSpinner-Br78DP-B.mjs → HSpinner-DskT_CbT.mjs} +1 -1
- package/dist/{HSpinner-DiYsVDQ1.js → HSpinner-OrX8Lncm.js} +1 -1
- package/dist/{HTable-BLzHQoXE.js → HTable-CgFXqisG.js} +1 -1
- package/dist/{HTable-B7BQBLCX.mjs → HTable-D_wg634Z.mjs} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +27 -0
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-CwT_wDHc.mjs → index-C4_ZZ_fO.mjs} +1 -1
- package/dist/{index-BMv0zuHq.js → index-Dndw65fe.js} +1 -1
- package/dist/{setButtonCssEvent-B3VPjEgJ.mjs → setButtonCssEvent-BEJDaHrp.mjs} +1 -1
- package/dist/{setButtonCssEvent-CH5pxVea.js → setButtonCssEvent-C0T9J9fO.js} +1 -1
- package/package.json +1 -1
- package/dist/HInput-ChxKbM9j.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { T as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as tn, ref as r, computed as f, inject as ae, onMounted as un, onBeforeUnmount as sn, watch as a, unref as ln, nextTick as be, createElementBlock as b, openBlock as y, normalizeClass as M, normalizeStyle as P, createElementVNode as I, Fragment as ye, renderList as rn, toDisplayString as $e, withDirectives as Ce, vShow as Te } from "vue";
|
|
2
|
+
import { T as dn, y as c, N as an, h as g, g as mn, u as vn, O as u, l as d, P as _, w as N, e as pn, t as fn, a as Mn, b as ke, Q as me, R as gn, U as bn, r as yn, c as $n, d as Cn } from "./index-C4_ZZ_fO.mjs";
|
|
3
|
+
import { _ as Tn } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const kn = {
|
|
5
5
|
/**
|
|
6
6
|
* Unique identifier for the input.
|
|
7
7
|
* - You can later retrieve its methods via `hison.component.getInput(id)`
|
|
@@ -76,7 +76,7 @@ const $n = {
|
|
|
76
76
|
inputType: {
|
|
77
77
|
type: String,
|
|
78
78
|
required: !1,
|
|
79
|
-
validator: (e) =>
|
|
79
|
+
validator: (e) => an.includes(e)
|
|
80
80
|
},
|
|
81
81
|
/**
|
|
82
82
|
* Format string used for displaying or formatting the value.
|
|
@@ -126,6 +126,16 @@ const $n = {
|
|
|
126
126
|
* - Maps to the `placeholder` attribute
|
|
127
127
|
*/
|
|
128
128
|
placeholder: { type: String, required: !1 },
|
|
129
|
+
/**
|
|
130
|
+
* Placeholder text color.
|
|
131
|
+
* - Semantic tokens: 'primary' | 'muted' | 'info' | 'success' | 'danger' | 'warning'
|
|
132
|
+
* - Or any valid CSS color string (e.g. '#fff', '#ffffff', 'rgb(...)', 'rgba(...)').
|
|
133
|
+
* - Default: 'primary'
|
|
134
|
+
*/
|
|
135
|
+
placeholderColor: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: "primary"
|
|
138
|
+
},
|
|
129
139
|
/**
|
|
130
140
|
* Edit mode of the input.
|
|
131
141
|
* - Values: `'editable'`, `'readonly'`, `'disable'`
|
|
@@ -134,7 +144,7 @@ const $n = {
|
|
|
134
144
|
*/
|
|
135
145
|
editMode: {
|
|
136
146
|
type: String,
|
|
137
|
-
default:
|
|
147
|
+
default: c.editable,
|
|
138
148
|
validator: (e) => ["editable", "disable", "readonly"].includes(e)
|
|
139
149
|
},
|
|
140
150
|
/**
|
|
@@ -175,7 +185,7 @@ const $n = {
|
|
|
175
185
|
textAlign: {
|
|
176
186
|
type: String,
|
|
177
187
|
default: null,
|
|
178
|
-
validator: (e) => e == null ||
|
|
188
|
+
validator: (e) => e == null || dn.includes(e)
|
|
179
189
|
},
|
|
180
190
|
/**
|
|
181
191
|
* Whether to show border (rendered as subtle box-shadow).
|
|
@@ -275,70 +285,70 @@ const $n = {
|
|
|
275
285
|
default: "default",
|
|
276
286
|
validator: (e) => ["default", "switch"].includes(e)
|
|
277
287
|
}
|
|
278
|
-
},
|
|
288
|
+
}, ee = /* @__PURE__ */ new WeakSet(), ne = /* @__PURE__ */ new WeakSet(), we = (e) => {
|
|
279
289
|
const n = e.currentTarget;
|
|
280
|
-
if (
|
|
290
|
+
if (g.event.cssEvent.input_onBeforeFocus(e) === !1) {
|
|
281
291
|
e.stopPropagation(), e.preventDefault();
|
|
282
292
|
return;
|
|
283
293
|
}
|
|
284
|
-
n.classList.add("hison-input-on-active"),
|
|
285
|
-
},
|
|
294
|
+
n.classList.add("hison-input-on-active"), g.event.cssEvent.input_onAfterFocus(e);
|
|
295
|
+
}, he = (e) => {
|
|
286
296
|
const n = e.currentTarget;
|
|
287
|
-
if (
|
|
297
|
+
if (g.event.cssEvent.input_onBeforeBlur(e) === !1) {
|
|
288
298
|
e.stopPropagation(), e.preventDefault();
|
|
289
299
|
return;
|
|
290
300
|
}
|
|
291
|
-
n.classList.remove("hison-input-on-active"), n.classList.remove("hison-input-on-mouseover"),
|
|
301
|
+
n.classList.remove("hison-input-on-active"), n.classList.remove("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterBlur(e);
|
|
292
302
|
}, Ne = (e) => {
|
|
293
303
|
const n = e.currentTarget;
|
|
294
304
|
if (!n.readOnly) {
|
|
295
|
-
if (
|
|
305
|
+
if (g.event.cssEvent.input_onBeforeMouseover(e) === !1) {
|
|
296
306
|
e.stopPropagation(), e.preventDefault();
|
|
297
307
|
return;
|
|
298
308
|
}
|
|
299
|
-
n.classList.add("hison-input-on-mouseover"),
|
|
309
|
+
n.classList.add("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterMouseover(e);
|
|
300
310
|
}
|
|
301
|
-
},
|
|
311
|
+
}, Le = (e) => {
|
|
302
312
|
const n = e.currentTarget;
|
|
303
313
|
if (!n.readOnly) {
|
|
304
|
-
if (
|
|
314
|
+
if (g.event.cssEvent.input_onBeforeMouseout(e) === !1) {
|
|
305
315
|
e.stopPropagation(), e.preventDefault();
|
|
306
316
|
return;
|
|
307
317
|
}
|
|
308
|
-
n.classList.remove("hison-input-on-mouseover"),
|
|
318
|
+
n.classList.remove("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterMouseout(e);
|
|
309
319
|
}
|
|
310
|
-
},
|
|
320
|
+
}, Be = (e) => {
|
|
311
321
|
const n = e.currentTarget;
|
|
312
322
|
if (!n.readOnly) {
|
|
313
|
-
if (
|
|
323
|
+
if (g.event.cssEvent.input_onBeforeTouchstart(e) === !1) {
|
|
314
324
|
e.stopPropagation(), e.preventDefault();
|
|
315
325
|
return;
|
|
316
326
|
}
|
|
317
|
-
n.classList.add("hison-input-on-mouseover"),
|
|
327
|
+
n.classList.add("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterTouchstart(e);
|
|
318
328
|
}
|
|
319
|
-
},
|
|
329
|
+
}, Fe = (e) => {
|
|
320
330
|
const n = e.currentTarget;
|
|
321
331
|
if (!n.readOnly) {
|
|
322
|
-
if (
|
|
332
|
+
if (g.event.cssEvent.input_onBeforeTouchend(e) === !1) {
|
|
323
333
|
e.stopPropagation(), e.preventDefault();
|
|
324
334
|
return;
|
|
325
335
|
}
|
|
326
|
-
n.classList.remove("hison-input-on-mouseover"),
|
|
336
|
+
n.classList.remove("hison-input-on-mouseover"), g.event.cssEvent.input_onAfterTouchend(e);
|
|
327
337
|
}
|
|
328
|
-
},
|
|
338
|
+
}, Pe = (e) => {
|
|
329
339
|
const n = e.currentTarget;
|
|
330
340
|
n.readOnly || n.classList.remove("hison-input-on-mouseover");
|
|
331
|
-
}, Tn = (e) => {
|
|
332
|
-
_.has(e) || (_.add(e), e.addEventListener("mouseenter", Ne), e.addEventListener("mouseleave", he), e.addEventListener("touchstart", Le, { passive: !1, capture: !0 }), e.addEventListener("touchend", Be, { passive: !1, capture: !0 }), e.addEventListener("touchcancel", Fe, { passive: !1, capture: !0 }));
|
|
333
|
-
}, Cn = (e) => {
|
|
334
|
-
_.has(e) && (_.delete(e), e.removeEventListener("mouseenter", Ne), e.removeEventListener("mouseleave", he), e.removeEventListener("touchstart", Le, { capture: !0 }), e.removeEventListener("touchend", Be, { capture: !0 }), e.removeEventListener("touchcancel", Fe, { capture: !0 }), e.classList.remove("hison-input-on-mouseover"));
|
|
335
|
-
}, kn = (e) => {
|
|
336
|
-
ee.has(e) || (ee.add(e), e.addEventListener("focus", ke), e.addEventListener("blur", we));
|
|
337
341
|
}, wn = (e) => {
|
|
338
|
-
ee.has(e)
|
|
339
|
-
},
|
|
342
|
+
ee.has(e) || (ee.add(e), e.addEventListener("mouseenter", Ne), e.addEventListener("mouseleave", Le), e.addEventListener("touchstart", Be, { passive: !1, capture: !0 }), e.addEventListener("touchend", Fe, { passive: !1, capture: !0 }), e.addEventListener("touchcancel", Pe, { passive: !1, capture: !0 }));
|
|
343
|
+
}, hn = (e) => {
|
|
344
|
+
ee.has(e) && (ee.delete(e), e.removeEventListener("mouseenter", Ne), e.removeEventListener("mouseleave", Le), e.removeEventListener("touchstart", Be, { capture: !0 }), e.removeEventListener("touchend", Fe, { capture: !0 }), e.removeEventListener("touchcancel", Pe, { capture: !0 }), e.classList.remove("hison-input-on-mouseover"));
|
|
345
|
+
}, Nn = (e) => {
|
|
346
|
+
ne.has(e) || (ne.add(e), e.addEventListener("focus", we), e.addEventListener("blur", he));
|
|
347
|
+
}, Ln = (e) => {
|
|
348
|
+
ne.has(e) && (ne.delete(e), e.removeEventListener("focus", we), e.removeEventListener("blur", he), e.classList.remove("hison-input-on-active"), e.classList.remove("hison-input-on-mouseover"));
|
|
349
|
+
}, Bn = tn({
|
|
340
350
|
name: "HInput",
|
|
341
|
-
props:
|
|
351
|
+
props: kn,
|
|
342
352
|
inheritAttrs: !1,
|
|
343
353
|
emits: [
|
|
344
354
|
"update:modelValue",
|
|
@@ -382,9 +392,9 @@ const $n = {
|
|
|
382
392
|
"contextmenu"
|
|
383
393
|
],
|
|
384
394
|
setup(e, { emit: n }) {
|
|
385
|
-
const $ = r(null), L = r(null),
|
|
386
|
-
|
|
387
|
-
}, l = r(e.inputType ?? u.text),
|
|
395
|
+
const $ = r(null), L = r(null), T = r(null), p = e.id ? e.id : mn(), o = r(e.name ?? p), Ie = f(() => o.value), oe = `hinput:${p}`, ve = vn(), V = r([]), te = () => {
|
|
396
|
+
V.value = pn(fn(e.class) || "", ve.value), Mn(V.value, "col") === -1 && V.value.push("hison-col-12"), ke(V.value, "size", g.componentStyle.size), ke(V.value, "color", "primary");
|
|
397
|
+
}, l = r(e.inputType ?? u.text), ie = f(() => {
|
|
388
398
|
switch (l.value) {
|
|
389
399
|
case u.checkbox:
|
|
390
400
|
return "checkbox";
|
|
@@ -399,7 +409,7 @@ const $n = {
|
|
|
399
409
|
default:
|
|
400
410
|
return "text";
|
|
401
411
|
}
|
|
402
|
-
}),
|
|
412
|
+
}), Se = f(() => {
|
|
403
413
|
switch (l.value) {
|
|
404
414
|
case u.mask:
|
|
405
415
|
case u.digit:
|
|
@@ -407,20 +417,20 @@ const $n = {
|
|
|
407
417
|
default:
|
|
408
418
|
return l.value;
|
|
409
419
|
}
|
|
410
|
-
}), K = r(e.toggleStyle ?? "default"), w = r(e.format ?? null), B = r(d.utils.isNumeric(e.maxNumber) ? Number(e.maxNumber) : null), F = r(d.utils.isNumeric(e.minNumber) ? Number(e.minNumber) : null),
|
|
420
|
+
}), K = r(e.toggleStyle ?? "default"), w = r(e.format ?? null), B = r(d.utils.isNumeric(e.maxNumber) ? Number(e.maxNumber) : null), F = r(d.utils.isNumeric(e.minNumber) ? Number(e.minNumber) : null), q = r(d.utils.isInteger(e.roundNumber) || d.utils.isNegativeInteger(e.roundNumber) || e.roundNumber === "0" ? Number(e.roundNumber) : null), S = r(d.utils.isPositiveInteger(e.maxLength) ? Number(e.maxLength) : null), A = r(d.utils.isPositiveInteger(e.maxByte) ? Number(e.maxByte) : null), ue = (t) => {
|
|
411
421
|
switch (t) {
|
|
412
422
|
case u.number:
|
|
413
423
|
case u.digit:
|
|
414
|
-
return
|
|
424
|
+
return N.right;
|
|
415
425
|
case u.date:
|
|
416
426
|
case u.month:
|
|
417
427
|
case u.time:
|
|
418
|
-
return
|
|
428
|
+
return N.center;
|
|
419
429
|
default:
|
|
420
|
-
return
|
|
430
|
+
return N.left;
|
|
421
431
|
}
|
|
422
|
-
}, E = r(e.textAlign ??
|
|
423
|
-
if (
|
|
432
|
+
}, E = r(e.textAlign ?? ue(l.value)), Ae = f(() => ({ textAlign: E.value })), U = r(e.border ?? !0), Ee = (t) => (t = String(t), S.value && (t = t.substring(0, S.value)), A.value && (t = d.utils.getCutByteLength(t, A.value)), t), De = (t) => (t = Number(t), B.value && t > B.value && (t = B.value), F.value && t < F.value && (t = F.value), q.value && (t = d.utils.getRound(t, q.value)), t), se = (t) => {
|
|
433
|
+
if (_(t))
|
|
424
434
|
return l.value === u.checkbox || l.value === u.radio ? !1 : t;
|
|
425
435
|
try {
|
|
426
436
|
switch (l.value) {
|
|
@@ -430,19 +440,19 @@ const $n = {
|
|
|
430
440
|
case u.mask:
|
|
431
441
|
case u.digit:
|
|
432
442
|
case u.textarea:
|
|
433
|
-
l.value === u.mask && (t =
|
|
443
|
+
l.value === u.mask && (t = gn(t, w.value ?? "")), l.value === u.digit && (t = bn(t)), t = Ee(t);
|
|
434
444
|
break;
|
|
435
445
|
case u.number:
|
|
436
|
-
l.value === u.number && (t =
|
|
446
|
+
l.value === u.number && (t = De(t));
|
|
437
447
|
break;
|
|
438
448
|
case u.date:
|
|
439
|
-
t && (t = d.utils.getDateWithFormat(t,
|
|
449
|
+
t && (t = d.utils.getDateWithFormat(t, me.DateFormat["yyyy-MM-dd"]));
|
|
440
450
|
break;
|
|
441
451
|
case u.month:
|
|
442
|
-
t && (t = d.utils.getDateWithFormat(t,
|
|
452
|
+
t && (t = d.utils.getDateWithFormat(t, me.YearMonthFormat["yyyy-MM"]));
|
|
443
453
|
break;
|
|
444
454
|
case u.time:
|
|
445
|
-
t && (t = d.utils.getDateWithFormat(t,
|
|
455
|
+
t && (t = d.utils.getDateWithFormat(t, me.TimeFormat["HH:mm:ss"]));
|
|
446
456
|
break;
|
|
447
457
|
case u.checkbox:
|
|
448
458
|
case u.radio:
|
|
@@ -454,20 +464,39 @@ const $n = {
|
|
|
454
464
|
console.warn("[HInput] Failed to format value", t, i);
|
|
455
465
|
}
|
|
456
466
|
return t;
|
|
457
|
-
}, s = r(
|
|
458
|
-
if (
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
467
|
+
}, s = r(se(e.modelValue)), Ve = f(() => s.value), C = r(null), H = r(e.visible), O = r(e.title ?? ""), W = r(e.nullText ?? ""), k = r(e.editMode), qe = f(() => k.value === c.disable), le = f(() => k.value === c.readonly), Re = f(() => U.value && !le.value ? "hison-border" : ""), Ke = f(() => k.value !== c.editable ? [`hison-input-${k.value}`, `hison-input-${ie.value}-${k.value}`] : []), j = r(e.required), Ue = f(() => j.value ? ["hison-input-required", `hison-input-${ie.value}-required`] : []), z = r(e.placeholder ?? ""), Y = r(e.placeholderColor ?? "primary"), He = (t) => {
|
|
468
|
+
if (!t) return null;
|
|
469
|
+
const i = t.trim();
|
|
470
|
+
return [
|
|
471
|
+
"primary",
|
|
472
|
+
"muted",
|
|
473
|
+
"info",
|
|
474
|
+
"success",
|
|
475
|
+
"danger",
|
|
476
|
+
"warning",
|
|
477
|
+
"custom1",
|
|
478
|
+
"custom2",
|
|
479
|
+
"custom3",
|
|
480
|
+
"custom4",
|
|
481
|
+
"custom5"
|
|
482
|
+
].includes(i) ? `var(--hison-${i}-emptyTextColor)` : i;
|
|
483
|
+
}, Oe = f(() => {
|
|
484
|
+
const t = He(Y.value);
|
|
485
|
+
return t ? { "--hison-input-placeholder-color": t } : {};
|
|
486
|
+
}), Q = r(e.fontBold), We = f(() => {
|
|
487
|
+
if (Q.value) return "hison-font-bold";
|
|
488
|
+
}), X = r(e.fontItalic), je = f(() => {
|
|
489
|
+
if (X.value) return "hison-font-italic";
|
|
490
|
+
}), J = r(e.fontThruline), ze = f(() => {
|
|
491
|
+
if (J.value) return "hison-font-thruline";
|
|
492
|
+
}), Z = r(e.fontUnderline), Ye = f(() => {
|
|
493
|
+
if (Z.value) return "hison-font-underline";
|
|
494
|
+
}), Qe = f(() => H.value ? "" : "hison-display-none"), re = r(!1), h = r(!1), G = r(
|
|
466
495
|
e.tabIndex !== null && e.tabIndex !== "" ? Number(e.tabIndex) : null
|
|
467
|
-
),
|
|
496
|
+
), pe = ae("registerToInputGroup", null), m = ae("notifyInputGroupStatus", null), R = ae("radioMembershipChanged", null), de = (t) => {
|
|
468
497
|
if (l.value === u.checkbox || l.value === u.radio)
|
|
469
498
|
return t ? e.checkedText : e.uncheckedText;
|
|
470
|
-
if (
|
|
499
|
+
if (_(t) || t === "") return W.value ?? "";
|
|
471
500
|
if (e.inputTextdHandler)
|
|
472
501
|
return e.inputTextdHandler(t);
|
|
473
502
|
let i = String(t);
|
|
@@ -489,53 +518,53 @@ const $n = {
|
|
|
489
518
|
i = d.utils.getDateWithFormat(t, w.value ?? d.getTimeFormat());
|
|
490
519
|
break;
|
|
491
520
|
case u.select:
|
|
492
|
-
const
|
|
493
|
-
i =
|
|
521
|
+
const D = $.value, ge = D.selectedIndex;
|
|
522
|
+
i = ge >= 0 ? D.options[ge].text : "";
|
|
494
523
|
break;
|
|
495
524
|
}
|
|
496
|
-
} catch (
|
|
497
|
-
console.warn("[HInput] Failed to format value", t,
|
|
525
|
+
} catch (D) {
|
|
526
|
+
console.warn("[HInput] Failed to format value", t, D), i = "";
|
|
498
527
|
}
|
|
499
528
|
return i;
|
|
500
|
-
},
|
|
501
|
-
k.value ===
|
|
529
|
+
}, x = r(""), Xe = (t) => {
|
|
530
|
+
k.value === c.editable && (re.value = !0), be(() => {
|
|
502
531
|
var i;
|
|
503
532
|
(i = $.value) == null || i.focus();
|
|
504
533
|
});
|
|
505
|
-
}, Ye = (t) => {
|
|
506
|
-
let i = $.value.value;
|
|
507
|
-
(l.value === u.mask || l.value === u.digit || (A.value || S.value) && (l.value === u.text || l.value === u.email || l.value === u.password || l.value === u.textarea)) && (i = ue(i), $.value.value = i), s.value = i, N.value = !0, m == null || m(p, s.value), n("input", t, C.value, s.value), n("update:modelValue", s.value);
|
|
508
|
-
}, Qe = (t) => {
|
|
509
|
-
T.value = s.value, n("focus", t, C.value);
|
|
510
|
-
}, Xe = (t) => {
|
|
511
|
-
T.value !== s.value && (v(s.value, !0, !0), N.value = !0, m == null || m(p, s.value)), le.value = !1, n("blur", t, C.value);
|
|
512
|
-
}, v = (t, i = !0, R = !1) => {
|
|
513
|
-
s.value = i ? ue(t) : t, G.value = re(s.value), l.value === u.checkbox || l.value === u.radio ? $.value.checked = !!s.value : $.value.value = s.value, R && n("change", T.value, s.value, C.value);
|
|
514
534
|
}, Je = (t) => {
|
|
515
|
-
|
|
516
|
-
|
|
535
|
+
let i = $.value.value;
|
|
536
|
+
(l.value === u.mask || l.value === u.digit || (S.value || A.value) && (l.value === u.text || l.value === u.email || l.value === u.password || l.value === u.textarea)) && (i = se(i), $.value.value = i), s.value = i, h.value = !0, m == null || m(p, s.value), n("input", t, T.value, s.value), n("update:modelValue", s.value);
|
|
517
537
|
}, Ze = (t) => {
|
|
518
|
-
|
|
519
|
-
v(i.value, !1, !0), N.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
|
|
538
|
+
C.value = s.value, n("focus", t, T.value);
|
|
520
539
|
}, Ge = (t) => {
|
|
521
|
-
|
|
522
|
-
|
|
540
|
+
C.value !== s.value && (v(s.value, !0, !0), h.value = !0, m == null || m(p, s.value)), re.value = !1, n("blur", t, T.value);
|
|
541
|
+
}, v = (t, i = !0, D = !1) => {
|
|
542
|
+
s.value = i ? se(t) : t, x.value = de(s.value), l.value === u.checkbox || l.value === u.radio ? $.value.checked = !!s.value : $.value.value = s.value, D && n("change", C.value, s.value, T.value);
|
|
523
543
|
}, xe = (t) => {
|
|
524
544
|
const i = t.target;
|
|
525
|
-
v(i.
|
|
545
|
+
v(i.value, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
|
|
526
546
|
}, ce = (t) => {
|
|
527
547
|
const i = t.target;
|
|
528
|
-
v(i.value, !1, !0),
|
|
548
|
+
v(i.value, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
|
|
529
549
|
}, _e = (t) => {
|
|
530
|
-
|
|
550
|
+
const i = t.target;
|
|
551
|
+
v(i.checked, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
|
|
552
|
+
}, en = (t) => {
|
|
553
|
+
const i = t.target;
|
|
554
|
+
v(i.checked, !1, !0), h.value = !0, m && o.value ? m(o.value, i.checked ? p : null) : m == null || m(p, s.value), n("update:modelValue", s.value);
|
|
555
|
+
}, nn = (t) => {
|
|
556
|
+
const i = t.target;
|
|
557
|
+
v(i.value, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
|
|
558
|
+
}, on = (t) => {
|
|
559
|
+
if (le.value && (t.code === "Space" || t.code === "Enter")) {
|
|
531
560
|
t.preventDefault(), t.stopPropagation();
|
|
532
561
|
return;
|
|
533
562
|
}
|
|
534
|
-
n("keydown", t,
|
|
535
|
-
},
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}), $.value && (
|
|
563
|
+
n("keydown", t, T.value);
|
|
564
|
+
}, fe = () => {
|
|
565
|
+
g.component.inputList[p] && g.component.inputList[p].isHisonvueComponent && console.warn(`[Hisonvue] The input ID is at risk of being duplicated. ${p}`), yn(oe, () => {
|
|
566
|
+
Me(), be(fe);
|
|
567
|
+
}), $.value && (te(), L.value && wn(L.value), l.value !== u.checkbox && l.value !== u.radio && l.value !== u.range && l.value !== u.color && Nn($.value), v(s.value, !1), T.value = {
|
|
539
568
|
isHisonvueComponent: !0,
|
|
540
569
|
getId: () => p,
|
|
541
570
|
getType: () => "input",
|
|
@@ -543,12 +572,12 @@ const $n = {
|
|
|
543
572
|
setName: (t) => {
|
|
544
573
|
if (t === o.value) return;
|
|
545
574
|
const i = o.value;
|
|
546
|
-
o.value = t, l.value === u.radio && (
|
|
575
|
+
o.value = t, l.value === u.radio && (R == null || R(p, i, t, !!s.value));
|
|
547
576
|
},
|
|
548
|
-
getText: () =>
|
|
577
|
+
getText: () => x.value,
|
|
549
578
|
getValue: () => s.value,
|
|
550
579
|
setValue: (t) => {
|
|
551
|
-
|
|
580
|
+
C.value = s.value, s.value = t, v(s.value);
|
|
552
581
|
},
|
|
553
582
|
getTitle: () => O.value,
|
|
554
583
|
setTitle: (t) => {
|
|
@@ -560,15 +589,15 @@ const $n = {
|
|
|
560
589
|
},
|
|
561
590
|
getInputType: () => l.value,
|
|
562
591
|
setInputType: (t) => {
|
|
563
|
-
l.value = u[t],
|
|
592
|
+
l.value = u[t], C.value = s.value, v(s.value), e.textAlign == null && (E.value = ue(l.value));
|
|
564
593
|
},
|
|
565
594
|
getFormat: () => w.value ?? "",
|
|
566
595
|
setFormat: (t) => {
|
|
567
|
-
w.value = t,
|
|
596
|
+
w.value = t, C.value = s.value, v(s.value);
|
|
568
597
|
},
|
|
569
598
|
getNullText: () => W.value,
|
|
570
599
|
setNullText: (t) => {
|
|
571
|
-
W.value = t, (
|
|
600
|
+
W.value = t, (_(s.value) || s.value === "") && (x.value = de(s.value));
|
|
572
601
|
},
|
|
573
602
|
getEditMode: () => k.value,
|
|
574
603
|
setEditMode: (t) => {
|
|
@@ -576,23 +605,23 @@ const $n = {
|
|
|
576
605
|
},
|
|
577
606
|
getMaxNumber: () => B.value,
|
|
578
607
|
setMaxNumber: (t) => {
|
|
579
|
-
d.utils.isNumeric(t) && (B.value = t,
|
|
608
|
+
d.utils.isNumeric(t) && (B.value = t, C.value = s.value, l.value === u.number && v(s.value));
|
|
580
609
|
},
|
|
581
610
|
getMinNumber: () => F.value,
|
|
582
611
|
setMinNumber: (t) => {
|
|
583
|
-
d.utils.isNumeric(t) && (F.value = t,
|
|
612
|
+
d.utils.isNumeric(t) && (F.value = t, C.value = s.value, l.value === u.number && v(s.value));
|
|
584
613
|
},
|
|
585
|
-
getRoundNumber: () =>
|
|
614
|
+
getRoundNumber: () => q.value,
|
|
586
615
|
setRoundNumber: (t) => {
|
|
587
|
-
!d.utils.isPositiveInteger(t) && !d.utils.isNegativeInteger(t) && t !== 0 || (
|
|
616
|
+
!d.utils.isPositiveInteger(t) && !d.utils.isNegativeInteger(t) && t !== 0 || (q.value = t, C.value = s.value, l.value === u.number && v(s.value));
|
|
588
617
|
},
|
|
589
|
-
getMaxLength: () =>
|
|
618
|
+
getMaxLength: () => S.value,
|
|
590
619
|
setMaxLength: (t) => {
|
|
591
|
-
d.utils.isPositiveInteger(t) && (
|
|
620
|
+
d.utils.isPositiveInteger(t) && (S.value = t), C.value = s.value, v(s.value);
|
|
592
621
|
},
|
|
593
|
-
getMaxByte: () =>
|
|
622
|
+
getMaxByte: () => A.value,
|
|
594
623
|
setMaxByte: (t) => {
|
|
595
|
-
d.utils.isPositiveInteger(t) && (
|
|
624
|
+
d.utils.isPositiveInteger(t) && (A.value = t), C.value = s.value, v(s.value);
|
|
596
625
|
},
|
|
597
626
|
getRequired: () => j.value,
|
|
598
627
|
setRequired: (t) => {
|
|
@@ -602,59 +631,64 @@ const $n = {
|
|
|
602
631
|
setPlaceholder: (t) => {
|
|
603
632
|
z.value = t;
|
|
604
633
|
},
|
|
605
|
-
|
|
634
|
+
getPlaceholderColor: () => Y.value,
|
|
635
|
+
setPlaceholderColor: (t) => {
|
|
636
|
+
const i = (t ?? "").trim();
|
|
637
|
+
Y.value = i.length > 0 ? i : "primary";
|
|
638
|
+
},
|
|
639
|
+
isFontBold: () => Q.value,
|
|
606
640
|
setFontBold: (t) => {
|
|
607
|
-
|
|
641
|
+
Q.value = t;
|
|
608
642
|
},
|
|
609
|
-
isFontItalic: () =>
|
|
643
|
+
isFontItalic: () => X.value,
|
|
610
644
|
setFontItalic: (t) => {
|
|
611
|
-
|
|
645
|
+
X.value = t;
|
|
612
646
|
},
|
|
613
|
-
isFontThruline: () =>
|
|
647
|
+
isFontThruline: () => J.value,
|
|
614
648
|
setFontThruline: (t) => {
|
|
615
|
-
|
|
649
|
+
J.value = t;
|
|
616
650
|
},
|
|
617
|
-
isFontUnderline: () =>
|
|
651
|
+
isFontUnderline: () => Z.value,
|
|
618
652
|
setFontUnderline: (t) => {
|
|
619
|
-
|
|
653
|
+
Z.value = t;
|
|
620
654
|
},
|
|
621
655
|
getTextAlign: () => E.value,
|
|
622
656
|
setTextAlign: (t) => {
|
|
623
|
-
(t ===
|
|
657
|
+
(t === N.left || t === N.center || t === N.right) && (E.value = t);
|
|
624
658
|
},
|
|
625
659
|
isBorder: () => U.value,
|
|
626
660
|
setBorder: (t) => {
|
|
627
661
|
U.value = t;
|
|
628
662
|
},
|
|
629
|
-
isModified: () =>
|
|
663
|
+
isModified: () => h.value,
|
|
630
664
|
setModified: (t) => {
|
|
631
|
-
|
|
665
|
+
h.value = t;
|
|
632
666
|
},
|
|
633
667
|
getToggleStyle: () => K.value,
|
|
634
668
|
setToggleStyle: (t) => {
|
|
635
669
|
(t === "default" || t === "switch") && (K.value = t);
|
|
636
670
|
},
|
|
637
|
-
getTabIndex: () =>
|
|
671
|
+
getTabIndex: () => G.value,
|
|
638
672
|
setTabIndex: (t) => {
|
|
639
|
-
|
|
673
|
+
G.value = t != null ? Number(t) : null;
|
|
640
674
|
},
|
|
641
675
|
focus: () => {
|
|
642
676
|
var t;
|
|
643
677
|
L.value ? L.value.focus() : (t = $.value) == null || t.focus();
|
|
644
678
|
},
|
|
645
|
-
reload: () =>
|
|
646
|
-
},
|
|
647
|
-
},
|
|
648
|
-
|
|
679
|
+
reload: () => $n(oe)
|
|
680
|
+
}, g.component.inputList[p] = T.value, pe && pe(p), n("mounted", T.value));
|
|
681
|
+
}, Me = () => {
|
|
682
|
+
Cn(oe), delete g.component.inputList[p], l.value !== u.checkbox && l.value !== u.radio && l.value !== u.range && l.value !== u.color && Ln($.value), L.value && hn(L.value);
|
|
649
683
|
};
|
|
650
|
-
return
|
|
651
|
-
|
|
684
|
+
return un(fe), sn(Me), a(ve, (t) => {
|
|
685
|
+
te(), n("responsive-change", t);
|
|
652
686
|
}), a(() => e.modelValue, (t) => {
|
|
653
687
|
v(t, !1);
|
|
654
688
|
}), a(() => e.name, (t) => {
|
|
655
689
|
if (t && t !== o.value) {
|
|
656
690
|
const i = o.value;
|
|
657
|
-
o.value = t, l.value === u.radio && (
|
|
691
|
+
o.value = t, l.value === u.radio && (R == null || R(p, i, t, !!s.value));
|
|
658
692
|
}
|
|
659
693
|
}), a(() => e.visible, (t) => {
|
|
660
694
|
const i = !!t;
|
|
@@ -664,9 +698,9 @@ const $n = {
|
|
|
664
698
|
i !== O.value && (O.value = i);
|
|
665
699
|
}), a(() => e.nullText, (t) => {
|
|
666
700
|
const i = t ?? "";
|
|
667
|
-
i !== W.value && (W.value = i, (
|
|
701
|
+
i !== W.value && (W.value = i, (_(s.value) || s.value === "") && (x.value = de(s.value)));
|
|
668
702
|
}), a(() => e.inputType, (t) => {
|
|
669
|
-
t && t !== l.value && (l.value = t, e.textAlign == null && (E.value =
|
|
703
|
+
t && t !== l.value && (l.value = t, e.textAlign == null && (E.value = ue(l.value)), v(s.value));
|
|
670
704
|
}), a(() => e.format, (t) => {
|
|
671
705
|
const i = t ?? null;
|
|
672
706
|
i !== w.value && (w.value = i, v(s.value));
|
|
@@ -678,93 +712,97 @@ const $n = {
|
|
|
678
712
|
i !== F.value && (F.value = i, l.value === u.number && v(s.value));
|
|
679
713
|
}), a(() => e.roundNumber, (t) => {
|
|
680
714
|
const i = d.utils.isInteger(t) || d.utils.isNegativeInteger(t) || t === "0" ? Number(t) : null;
|
|
681
|
-
i !==
|
|
715
|
+
i !== q.value && (q.value = i, l.value === u.number && v(s.value));
|
|
682
716
|
}), a(() => e.maxLength, (t) => {
|
|
683
717
|
const i = d.utils.isPositiveInteger(t) ? Number(t) : null;
|
|
684
|
-
i !==
|
|
718
|
+
i !== S.value && (S.value = i, v(s.value));
|
|
685
719
|
}), a(() => e.maxByte, (t) => {
|
|
686
720
|
const i = d.utils.isPositiveInteger(t) ? Number(t) : null;
|
|
687
|
-
i !==
|
|
721
|
+
i !== A.value && (A.value = i, v(s.value));
|
|
688
722
|
}), a(() => e.textAlign, (t) => {
|
|
689
|
-
t && t !== E.value && (t ===
|
|
723
|
+
t && t !== E.value && (t === N.left || t === N.center || t === N.right) && (E.value = t);
|
|
690
724
|
}), a(() => e.border, (t) => {
|
|
691
725
|
const i = !!t;
|
|
692
726
|
i !== U.value && (U.value = i);
|
|
693
727
|
}), a(() => e.placeholder, (t) => {
|
|
694
728
|
const i = t ?? "";
|
|
695
729
|
i !== z.value && (z.value = i);
|
|
730
|
+
}), a(() => e.placeholderColor, (t) => {
|
|
731
|
+
const i = t ?? "primary";
|
|
732
|
+
i !== Y.value && (Y.value = i);
|
|
696
733
|
}), a(() => e.required, (t) => {
|
|
697
734
|
const i = !!t;
|
|
698
735
|
i !== j.value && (j.value = i);
|
|
699
736
|
}), a(() => e.fontBold, (t) => {
|
|
700
737
|
const i = !!t;
|
|
701
|
-
i !==
|
|
738
|
+
i !== Q.value && (Q.value = i);
|
|
702
739
|
}), a(() => e.fontItalic, (t) => {
|
|
703
740
|
const i = !!t;
|
|
704
|
-
i !==
|
|
741
|
+
i !== X.value && (X.value = i);
|
|
705
742
|
}), a(() => e.fontThruline, (t) => {
|
|
706
743
|
const i = !!t;
|
|
707
|
-
i !==
|
|
744
|
+
i !== J.value && (J.value = i);
|
|
708
745
|
}), a(() => e.fontUnderline, (t) => {
|
|
709
746
|
const i = !!t;
|
|
710
|
-
i !==
|
|
747
|
+
i !== Z.value && (Z.value = i);
|
|
711
748
|
}), a(() => e.editMode, (t) => {
|
|
712
749
|
t && t !== k.value && (k.value = t);
|
|
713
750
|
}), a(() => e.tabIndex, (t) => {
|
|
714
751
|
const i = t === null || t === "" ? null : Number(t);
|
|
715
|
-
i !==
|
|
752
|
+
i !== G.value && (G.value = i);
|
|
716
753
|
}), a(() => e.class, () => {
|
|
717
|
-
|
|
754
|
+
te();
|
|
718
755
|
}), a(() => e.toggleStyle, (t) => {
|
|
719
756
|
const i = t ?? "default";
|
|
720
757
|
i !== K.value && (i === "default" || i === "switch") && (K.value = i);
|
|
721
758
|
}), {
|
|
722
759
|
inputRef: $,
|
|
723
760
|
inputTextRef: L,
|
|
724
|
-
inputMethods:
|
|
725
|
-
inputValue:
|
|
726
|
-
editing:
|
|
761
|
+
inputMethods: f(() => ln(T)),
|
|
762
|
+
inputValue: Ve,
|
|
763
|
+
editing: re,
|
|
727
764
|
props: e,
|
|
728
765
|
id: p,
|
|
729
766
|
nameAttr: Ie,
|
|
730
|
-
responsiveClassList:
|
|
731
|
-
visibleClass:
|
|
732
|
-
editModeClassList:
|
|
733
|
-
requiredClassList:
|
|
734
|
-
fontBoldClass:
|
|
735
|
-
fontItalicClass:
|
|
736
|
-
fontThrulineClass:
|
|
737
|
-
fontUnderlineClass:
|
|
767
|
+
responsiveClassList: V,
|
|
768
|
+
visibleClass: Qe,
|
|
769
|
+
editModeClassList: Ke,
|
|
770
|
+
requiredClassList: Ue,
|
|
771
|
+
fontBoldClass: We,
|
|
772
|
+
fontItalicClass: je,
|
|
773
|
+
fontThrulineClass: ze,
|
|
774
|
+
fontUnderlineClass: Ye,
|
|
738
775
|
textAlignStyle: Ae,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
776
|
+
placeholderColorStyle: Oe,
|
|
777
|
+
borderClass: Re,
|
|
778
|
+
disable: qe,
|
|
779
|
+
readonly: le,
|
|
742
780
|
inputType: l,
|
|
743
|
-
inputExpressionType:
|
|
744
|
-
inputAttrType:
|
|
781
|
+
inputExpressionType: ie,
|
|
782
|
+
inputAttrType: Se,
|
|
745
783
|
title: O,
|
|
746
784
|
placeholder: z,
|
|
747
785
|
maxNumber: B,
|
|
748
786
|
minNumber: F,
|
|
749
|
-
spanText:
|
|
787
|
+
spanText: x,
|
|
750
788
|
toggleStyle: K,
|
|
751
|
-
tabIndex:
|
|
752
|
-
onInput:
|
|
753
|
-
onTextInputFocus:
|
|
754
|
-
onFocus:
|
|
755
|
-
onBlur:
|
|
756
|
-
onRangeChange:
|
|
757
|
-
onColorChange:
|
|
758
|
-
onCheckboxChange:
|
|
759
|
-
onRadioChange:
|
|
760
|
-
onSelectChange:
|
|
761
|
-
onKeydown:
|
|
789
|
+
tabIndex: G,
|
|
790
|
+
onInput: Je,
|
|
791
|
+
onTextInputFocus: Xe,
|
|
792
|
+
onFocus: Ze,
|
|
793
|
+
onBlur: Ge,
|
|
794
|
+
onRangeChange: xe,
|
|
795
|
+
onColorChange: ce,
|
|
796
|
+
onCheckboxChange: _e,
|
|
797
|
+
onRadioChange: en,
|
|
798
|
+
onSelectChange: nn,
|
|
799
|
+
onKeydown: on
|
|
762
800
|
};
|
|
763
801
|
}
|
|
764
|
-
}),
|
|
765
|
-
function
|
|
802
|
+
}), Fn = ["id", "name", "value", "disabled", "readonly", "title", "tabindex"], Pn = ["id", "name", "value", "disabled", "readonly", "checked", "title", "tabindex"], In = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], Sn = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], An = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], En = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], Dn = ["id", "name", "value", "disabled", "readonly", "title", "tabindex"], Vn = ["value"], qn = ["id", "name", "value", "disabled", "readonly", "placeholder", "title", "maxlength", "tabindex"], Rn = ["id", "name", "value", "disabled", "readonly", "title", "placeholder", "tabindex"], Kn = ["id", "name", "value", "disabled", "readonly", "type", "title", "placeholder", "max", "min", "tabindex"];
|
|
803
|
+
function Un(e, n, $, L, T, p) {
|
|
766
804
|
return y(), b("div", {
|
|
767
|
-
class:
|
|
805
|
+
class: M([
|
|
768
806
|
"hison-wrapper",
|
|
769
807
|
"hison-s-input-margin-adjustment",
|
|
770
808
|
...e.responsiveClassList,
|
|
@@ -773,18 +811,18 @@ function qn(e, n, $, L, C, p) {
|
|
|
773
811
|
}, [
|
|
774
812
|
e.inputType === "range" ? (y(), b("div", {
|
|
775
813
|
key: 0,
|
|
776
|
-
class:
|
|
814
|
+
class: M([
|
|
777
815
|
"hison-input",
|
|
778
816
|
"hison-input-range-div"
|
|
779
817
|
]),
|
|
780
|
-
style:
|
|
818
|
+
style: P([e.textAlignStyle, e.props.style])
|
|
781
819
|
}, [
|
|
782
|
-
|
|
820
|
+
I("input", {
|
|
783
821
|
ref: "inputRef",
|
|
784
822
|
id: `${e.id}`,
|
|
785
823
|
name: `${e.nameAttr}`,
|
|
786
824
|
type: "range",
|
|
787
|
-
class:
|
|
825
|
+
class: M([
|
|
788
826
|
`hison-input-${e.inputType}`,
|
|
789
827
|
...e.editModeClassList,
|
|
790
828
|
...e.requiredClassList
|
|
@@ -816,21 +854,21 @@ function qn(e, n, $, L, C, p) {
|
|
|
816
854
|
onTouchmove: n[19] || (n[19] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
817
855
|
onTouchcancel: n[20] || (n[20] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
818
856
|
onContextmenu: n[21] || (n[21] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
819
|
-
}, null, 42,
|
|
857
|
+
}, null, 42, Fn)
|
|
820
858
|
], 4)) : e.inputType === "color" ? (y(), b("div", {
|
|
821
859
|
key: 1,
|
|
822
|
-
class:
|
|
860
|
+
class: M([
|
|
823
861
|
"hison-input",
|
|
824
862
|
"hison-input-color-div"
|
|
825
863
|
]),
|
|
826
|
-
style:
|
|
864
|
+
style: P([e.textAlignStyle, e.props.style])
|
|
827
865
|
}, [
|
|
828
|
-
|
|
866
|
+
I("input", {
|
|
829
867
|
ref: "inputRef",
|
|
830
868
|
id: `${e.id}`,
|
|
831
869
|
name: `${e.nameAttr}`,
|
|
832
870
|
type: "color",
|
|
833
|
-
class:
|
|
871
|
+
class: M([
|
|
834
872
|
`hison-input-${e.inputType}`,
|
|
835
873
|
...e.editModeClassList,
|
|
836
874
|
...e.requiredClassList
|
|
@@ -863,14 +901,14 @@ function qn(e, n, $, L, C, p) {
|
|
|
863
901
|
onTouchmove: n[41] || (n[41] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
864
902
|
onTouchcancel: n[42] || (n[42] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
865
903
|
onContextmenu: n[43] || (n[43] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
866
|
-
}, null, 42,
|
|
904
|
+
}, null, 42, Pn)
|
|
867
905
|
], 4)) : e.inputType === "checkbox" ? (y(), b("div", {
|
|
868
906
|
key: 2,
|
|
869
|
-
class:
|
|
907
|
+
class: M([
|
|
870
908
|
"hison-input",
|
|
871
909
|
"hison-input-checkbox-div"
|
|
872
910
|
]),
|
|
873
|
-
style:
|
|
911
|
+
style: P([e.textAlignStyle, e.props.style])
|
|
874
912
|
}, [
|
|
875
913
|
e.toggleStyle !== "switch" ? (y(), b("input", {
|
|
876
914
|
key: 0,
|
|
@@ -878,7 +916,7 @@ function qn(e, n, $, L, C, p) {
|
|
|
878
916
|
id: `${e.id}`,
|
|
879
917
|
name: `${e.nameAttr}`,
|
|
880
918
|
type: "checkbox",
|
|
881
|
-
class:
|
|
919
|
+
class: M([
|
|
882
920
|
`hison-input-${e.inputType}`,
|
|
883
921
|
...e.editModeClassList,
|
|
884
922
|
...e.requiredClassList
|
|
@@ -910,11 +948,11 @@ function qn(e, n, $, L, C, p) {
|
|
|
910
948
|
onTouchmove: n[63] || (n[63] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
911
949
|
onTouchcancel: n[64] || (n[64] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
912
950
|
onContextmenu: n[65] || (n[65] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
913
|
-
}, null, 42,
|
|
951
|
+
}, null, 42, In)) : (y(), b("label", {
|
|
914
952
|
key: 1,
|
|
915
|
-
class:
|
|
953
|
+
class: M(["hison-input-checkbox-switch", ...e.editModeClassList])
|
|
916
954
|
}, [
|
|
917
|
-
|
|
955
|
+
I("input", {
|
|
918
956
|
ref: "inputRef",
|
|
919
957
|
id: `${e.id}`,
|
|
920
958
|
name: `${e.nameAttr}`,
|
|
@@ -947,9 +985,9 @@ function qn(e, n, $, L, C, p) {
|
|
|
947
985
|
onTouchmove: n[85] || (n[85] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
948
986
|
onTouchcancel: n[86] || (n[86] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
949
987
|
onContextmenu: n[87] || (n[87] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
950
|
-
}, null, 40,
|
|
951
|
-
|
|
952
|
-
class:
|
|
988
|
+
}, null, 40, Sn),
|
|
989
|
+
I("span", {
|
|
990
|
+
class: M(["hison-switch-visual", [
|
|
953
991
|
...e.editModeClassList,
|
|
954
992
|
...e.requiredClassList
|
|
955
993
|
]]),
|
|
@@ -958,8 +996,8 @@ function qn(e, n, $, L, C, p) {
|
|
|
958
996
|
], 2))
|
|
959
997
|
], 4)) : e.inputType === "radio" ? (y(), b("div", {
|
|
960
998
|
key: 3,
|
|
961
|
-
class:
|
|
962
|
-
style:
|
|
999
|
+
class: M(["hison-input", "hison-input-radio-div"]),
|
|
1000
|
+
style: P([e.textAlignStyle, e.props.style])
|
|
963
1001
|
}, [
|
|
964
1002
|
e.toggleStyle !== "switch" ? (y(), b("input", {
|
|
965
1003
|
key: 0,
|
|
@@ -967,7 +1005,7 @@ function qn(e, n, $, L, C, p) {
|
|
|
967
1005
|
id: `${e.id}`,
|
|
968
1006
|
name: `${e.nameAttr}`,
|
|
969
1007
|
type: "radio",
|
|
970
|
-
class:
|
|
1008
|
+
class: M([
|
|
971
1009
|
`hison-input-${e.inputType}`,
|
|
972
1010
|
"hison-input-radio--default",
|
|
973
1011
|
...e.editModeClassList,
|
|
@@ -1000,11 +1038,11 @@ function qn(e, n, $, L, C, p) {
|
|
|
1000
1038
|
onTouchmove: n[107] || (n[107] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1001
1039
|
onTouchcancel: n[108] || (n[108] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1002
1040
|
onContextmenu: n[109] || (n[109] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1003
|
-
}, null, 42,
|
|
1041
|
+
}, null, 42, An)) : (y(), b("label", {
|
|
1004
1042
|
key: 1,
|
|
1005
|
-
class:
|
|
1043
|
+
class: M(["hison-input-radio-switch", ...e.editModeClassList])
|
|
1006
1044
|
}, [
|
|
1007
|
-
|
|
1045
|
+
I("input", {
|
|
1008
1046
|
ref: "inputRef",
|
|
1009
1047
|
id: `${e.id}`,
|
|
1010
1048
|
name: `${e.nameAttr}`,
|
|
@@ -1037,9 +1075,9 @@ function qn(e, n, $, L, C, p) {
|
|
|
1037
1075
|
onTouchmove: n[129] || (n[129] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1038
1076
|
onTouchcancel: n[130] || (n[130] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1039
1077
|
onContextmenu: n[131] || (n[131] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1040
|
-
}, null, 40,
|
|
1041
|
-
|
|
1042
|
-
class:
|
|
1078
|
+
}, null, 40, En),
|
|
1079
|
+
I("span", {
|
|
1080
|
+
class: M(["hison-switch-visual", [
|
|
1043
1081
|
...e.editModeClassList,
|
|
1044
1082
|
...e.requiredClassList
|
|
1045
1083
|
]]),
|
|
@@ -1051,8 +1089,8 @@ function qn(e, n, $, L, C, p) {
|
|
|
1051
1089
|
ref: "inputRef",
|
|
1052
1090
|
id: `${e.id}`,
|
|
1053
1091
|
name: `${e.nameAttr}`,
|
|
1054
|
-
style:
|
|
1055
|
-
class:
|
|
1092
|
+
style: P([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1093
|
+
class: M([
|
|
1056
1094
|
"hison-input",
|
|
1057
1095
|
`hison-input-${e.inputType}`,
|
|
1058
1096
|
...e.editModeClassList,
|
|
@@ -1091,16 +1129,16 @@ function qn(e, n, $, L, C, p) {
|
|
|
1091
1129
|
onTouchcancel: n[152] || (n[152] = (o) => e.$emit("touchcancel", o, e.inputMethods)),
|
|
1092
1130
|
onContextmenu: n[153] || (n[153] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1093
1131
|
}, [
|
|
1094
|
-
(y(!0), b(
|
|
1132
|
+
(y(!0), b(ye, null, rn(e.props.options, (o) => (y(), b("option", {
|
|
1095
1133
|
key: o.value,
|
|
1096
1134
|
value: o.value
|
|
1097
|
-
},
|
|
1098
|
-
], 46,
|
|
1135
|
+
}, $e(o.text), 9, Vn))), 128))
|
|
1136
|
+
], 46, Dn)) : e.inputType === "textarea" ? (y(), b("textarea", {
|
|
1099
1137
|
key: 5,
|
|
1100
1138
|
ref: "inputRef",
|
|
1101
1139
|
id: `${e.id}`,
|
|
1102
1140
|
name: `${e.nameAttr}`,
|
|
1103
|
-
class:
|
|
1141
|
+
class: M([
|
|
1104
1142
|
"hison-input",
|
|
1105
1143
|
`hison-input-${e.inputType}`,
|
|
1106
1144
|
...e.editModeClassList,
|
|
@@ -1112,7 +1150,7 @@ function qn(e, n, $, L, C, p) {
|
|
|
1112
1150
|
e.borderClass
|
|
1113
1151
|
]),
|
|
1114
1152
|
value: e.inputValue,
|
|
1115
|
-
style:
|
|
1153
|
+
style: P([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1116
1154
|
disabled: e.disable,
|
|
1117
1155
|
readonly: e.readonly,
|
|
1118
1156
|
placeholder: e.placeholder || void 0,
|
|
@@ -1122,12 +1160,12 @@ function qn(e, n, $, L, C, p) {
|
|
|
1122
1160
|
onInput: n[154] || (n[154] = (...o) => e.onInput && e.onInput(...o)),
|
|
1123
1161
|
onFocus: n[155] || (n[155] = (...o) => e.onFocus && e.onFocus(...o)),
|
|
1124
1162
|
onBlur: n[156] || (n[156] = (...o) => e.onBlur && e.onBlur(...o))
|
|
1125
|
-
},
|
|
1126
|
-
|
|
1163
|
+
}, $e(e.inputValue), 47, qn)) : (y(), b(ye, { key: 6 }, [
|
|
1164
|
+
Ce(I("input", {
|
|
1127
1165
|
ref: "inputTextRef",
|
|
1128
1166
|
id: `input_text_${e.id}`,
|
|
1129
1167
|
name: `input_text_${e.nameAttr}`,
|
|
1130
|
-
class:
|
|
1168
|
+
class: M([
|
|
1131
1169
|
"hison-input",
|
|
1132
1170
|
`hison-input-text-${e.inputType}`,
|
|
1133
1171
|
...e.editModeClassList,
|
|
@@ -1140,7 +1178,7 @@ function qn(e, n, $, L, C, p) {
|
|
|
1140
1178
|
]),
|
|
1141
1179
|
type: "text",
|
|
1142
1180
|
value: e.spanText,
|
|
1143
|
-
style:
|
|
1181
|
+
style: P([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1144
1182
|
disabled: e.disable,
|
|
1145
1183
|
readonly: e.readonly,
|
|
1146
1184
|
title: e.title || void 0,
|
|
@@ -1165,21 +1203,21 @@ function qn(e, n, $, L, C, p) {
|
|
|
1165
1203
|
onTouchend: n[173] || (n[173] = (o) => e.$emit("touchend", o, e.inputMethods)),
|
|
1166
1204
|
onTouchmove: n[174] || (n[174] = (o) => e.$emit("touchmove", o, e.inputMethods)),
|
|
1167
1205
|
onTouchcancel: n[175] || (n[175] = (o) => e.$emit("touchcancel", o, e.inputMethods))
|
|
1168
|
-
}, null, 46,
|
|
1206
|
+
}, null, 46, Rn), [
|
|
1169
1207
|
[Te, !e.editing]
|
|
1170
1208
|
]),
|
|
1171
|
-
|
|
1209
|
+
Ce(I("input", {
|
|
1172
1210
|
ref: "inputRef",
|
|
1173
1211
|
id: `${e.id}`,
|
|
1174
1212
|
name: `${e.nameAttr}`,
|
|
1175
|
-
class:
|
|
1213
|
+
class: M([
|
|
1176
1214
|
"hison-input",
|
|
1177
1215
|
`hison-input-${e.inputType}`,
|
|
1178
1216
|
...e.editModeClassList,
|
|
1179
1217
|
e.borderClass
|
|
1180
1218
|
]),
|
|
1181
1219
|
value: e.inputValue,
|
|
1182
|
-
style:
|
|
1220
|
+
style: P([e.textAlignStyle, e.placeholderColorStyle, e.props.style]),
|
|
1183
1221
|
disabled: e.disable,
|
|
1184
1222
|
readonly: e.readonly,
|
|
1185
1223
|
type: e.inputType,
|
|
@@ -1205,13 +1243,13 @@ function qn(e, n, $, L, C, p) {
|
|
|
1205
1243
|
onPaste: n[190] || (n[190] = (o) => e.$emit("paste", o, e.inputMethods)),
|
|
1206
1244
|
onWheel: n[191] || (n[191] = (o) => e.$emit("wheel", o, e.inputMethods)),
|
|
1207
1245
|
onContextmenu: n[192] || (n[192] = (o) => e.$emit("contextmenu", o, e.inputMethods))
|
|
1208
|
-
}, null, 46,
|
|
1246
|
+
}, null, 46, Kn), [
|
|
1209
1247
|
[Te, e.editing]
|
|
1210
1248
|
])
|
|
1211
1249
|
], 64))
|
|
1212
1250
|
], 2);
|
|
1213
1251
|
}
|
|
1214
|
-
const
|
|
1252
|
+
const jn = /* @__PURE__ */ Tn(Bn, [["render", Un], ["__scopeId", "data-v-f3c99304"]]);
|
|
1215
1253
|
export {
|
|
1216
|
-
|
|
1254
|
+
jn as default
|
|
1217
1255
|
};
|