hisonvue 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/{HAccordion-yaZ0sBWj.js → HAccordion-Bc8LHllz.js} +1 -1
  2. package/dist/{HAccordion-ClPgc3MA.mjs → HAccordion-CYdLZCoO.mjs} +2 -2
  3. package/dist/{HBaggie-DhMiL1-B.js → HBaggie-XgHTnkp2.js} +1 -1
  4. package/dist/{HBaggie-BOcwzfs2.mjs → HBaggie-Ywgz5nvV.mjs} +2 -2
  5. package/dist/{HBanner-CkIr-lzQ.js → HBanner-BcDU3AwV.js} +1 -1
  6. package/dist/{HBanner-dQdDEjcq.mjs → HBanner-CidWbYwG.mjs} +2 -2
  7. package/dist/{HButton-CT0Az7ea.js → HButton-B6af0nzb.js} +1 -1
  8. package/dist/{HButton-CQA9AHfR.mjs → HButton-Bf1WiQNr.mjs} +2 -2
  9. package/dist/{HCalendar-C7RbTZT9.js → HCalendar-BiiLjDq7.js} +1 -1
  10. package/dist/{HCalendar-LYKfuBRk.mjs → HCalendar-CQs3-lsy.mjs} +1 -1
  11. package/dist/{HCaption-hIaWtt1A.mjs → HCaption-CJD8YqTy.mjs} +1 -1
  12. package/dist/{HCaption-DslrgN-4.js → HCaption-DxXZw4pH.js} +1 -1
  13. package/dist/{HChart-C_Np6dyj.mjs → HChart-Br_mONmh.mjs} +1 -1
  14. package/dist/{HChart-Dw1BMCJS.js → HChart-CLxSeQfB.js} +1 -1
  15. package/dist/{HDrawer-Z7npMmnm.mjs → HDrawer-C_zCEAoj.mjs} +1 -1
  16. package/dist/{HDrawer-C8dvmJDK.js → HDrawer-QSVck31B.js} +1 -1
  17. package/dist/{HDropdown-50SbH5xE.mjs → HDropdown-CzKF2cyh.mjs} +128 -119
  18. package/dist/HDropdown-l_g96ufU.js +1 -0
  19. package/dist/{HFileset-C8m3Fs_v.mjs → HFileset-B6ezY9_O.mjs} +1 -1
  20. package/dist/{HFileset-Bu2-UdKj.js → HFileset-CnM1z10l.js} +1 -1
  21. package/dist/{HGap-D8Iaf-5T.mjs → HGap--qHusiKo.mjs} +1 -1
  22. package/dist/{HGap-DsJy_QnE.js → HGap-D9TgBL0P.js} +1 -1
  23. package/dist/{HGrid-GnXheGEH.mjs → HGrid-DWFs2PVH.mjs} +1 -1
  24. package/dist/{HGrid-1YUZ2y6u.js → HGrid-DZT6UYsc.js} +1 -1
  25. package/dist/{HImagebox-BxTUweOq.mjs → HImagebox-B6DkNa0s.mjs} +1 -1
  26. package/dist/{HImagebox-r9i5w5WN.js → HImagebox-C-kUyV2a.js} +1 -1
  27. package/dist/HInput-DF_oPvVG.js +1 -0
  28. package/dist/HInput-Dih14jAK.mjs +1217 -0
  29. package/dist/{HInputGroup-lVdHU36z.js → HInputGroup-CxiRFkpV.js} +1 -1
  30. package/dist/{HInputGroup-D47YfrUp.mjs → HInputGroup-Czqo_DBM.mjs} +1 -1
  31. package/dist/HLabel-BFuX1v46.js +1 -0
  32. package/dist/HLabel-x3QyAn-P.mjs +400 -0
  33. package/dist/{HLayout-VCGeEX_T.js → HLayout-DHwcSj6Y.js} +1 -1
  34. package/dist/{HLayout-62BFnvbF.mjs → HLayout-DbIW32b3.mjs} +1 -1
  35. package/dist/{HList-C7mRWu55.mjs → HList-B0_bqe2X.mjs} +2 -2
  36. package/dist/{HList-T55xOKTU.js → HList-CGt8QYPb.js} +1 -1
  37. package/dist/{HModal-C4C4J9GA.js → HModal-Bbq2SffE.js} +1 -1
  38. package/dist/{HModal-28_wsn_-.mjs → HModal-DaQTId_h.mjs} +1 -1
  39. package/dist/{HNote-BqW_J3tq.mjs → HNote-BxjGgGT6.mjs} +1 -1
  40. package/dist/{HNote-RUUsRTzx.js → HNote-CHa35R5J.js} +1 -1
  41. package/dist/{HPagination-2Qlqr_ZS.mjs → HPagination-BZpSWEEW.mjs} +2 -2
  42. package/dist/{HPagination-BxRAk9Pi.js → HPagination-OwLtKBDy.js} +1 -1
  43. package/dist/{HParagraph-DG0-Th1k.mjs → HParagraph-BiOV9AaX.mjs} +112 -104
  44. package/dist/HParagraph-DA30mUOK.js +1 -0
  45. package/dist/{HPopup-CMHfS31s.mjs → HPopup-CSWCs1bC.mjs} +1 -1
  46. package/dist/{HPopup-Cnt1__JS.js → HPopup-CXsLCjT7.js} +1 -1
  47. package/dist/{HSpinner-CMZ2W-GY.js → HSpinner-B6mWhGkj.js} +1 -1
  48. package/dist/{HSpinner-C4FmAya2.mjs → HSpinner-DEHdIFhp.mjs} +1 -1
  49. package/dist/{HTable-Dx5l45_-.js → HTable-BoUCH2Zf.js} +1 -1
  50. package/dist/{HTable-Bd3ErPRn.mjs → HTable-By0pF5zV.mjs} +1 -1
  51. package/dist/hisonvue.cjs.js +1 -1
  52. package/dist/hisonvue.css +1 -1
  53. package/dist/hisonvue.d.ts +363 -107
  54. package/dist/hisonvue.es.js +2 -2
  55. package/dist/{index-CrciHSGg.mjs → index-BC8m9ivd.mjs} +9 -9
  56. package/dist/{index-CPFyQIpi.js → index-CyZluKOE.js} +3 -3
  57. package/dist/{setButtonCssEvent-BOWM7Rfs.mjs → setButtonCssEvent-DzPansSE.mjs} +1 -1
  58. package/dist/{setButtonCssEvent-Dv_zDL0C.js → setButtonCssEvent-fXHkzhY1.js} +1 -1
  59. package/package.json +1 -1
  60. package/dist/HDropdown-mSEm-0ZC.js +0 -1
  61. package/dist/HInput-CcWTYayE.js +0 -1
  62. package/dist/HInput-DT2SixiY.mjs +0 -1103
  63. package/dist/HLabel-BlczHNCh.mjs +0 -369
  64. package/dist/HLabel-vkRYvApC.js +0 -1
  65. package/dist/HParagraph-B3VkXyh7.js +0 -1
@@ -1,1103 +0,0 @@
1
- import { defineComponent as _e, ref as a, computed as g, inject as re, onMounted as en, onBeforeUnmount as nn, watch as d, unref as tn, nextTick as ge, createElementBlock as C, openBlock as k, normalizeClass as M, normalizeStyle as F, createElementVNode as R, Fragment as Me, renderList as on, toDisplayString as be, withDirectives as ye, vShow as $e } from "vue";
2
- import { T as un, y as G, N as sn, h as f, g as ln, u as rn, O as i, l as r, P as x, w, e as an, t as dn, a as mn, b as Te, Q as ae, R as vn, U as pn, r as fn, c as gn, d as Mn } from "./index-CrciHSGg.mjs";
3
- import { _ as bn } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const yn = {
5
- /**
6
- * Unique identifier for the input.
7
- * - You can later retrieve its methods via `hison.component.getInput(id)`
8
- * - ⚠️ Duplicate `id` values will throw an error at mount time
9
- */
10
- id: { type: String, required: !1 },
11
- /**
12
- * HTML `name` attribute.
13
- * - Default: same as `id` when omitted.
14
- * - Radio usage (`inputType: 'radio'`):
15
- * - All `HInput` with the same `name` form one radio group.
16
- * - Each radio’s own `id` is treated as the group’s candidate value.
17
- * - The radio’s local `modelValue` is boolean (`true`/`false`) and drives its `checked` state.
18
- * - When wrapped by `HInputGroup`, radios are aggregated per `name` and exposed as
19
- * `{ [name]: selectedRadioId | null }` via `getDataObject()` / `v-model`.
20
- * - To set a selection programmatically (load/set), pass `{ [name]: <radioId> }` to `HInputGroup`.
21
- * - Changing `name` at runtime via `setName()` re-registers group membership with `HInputGroup`.
22
- * - Non-radio inputs: `name` only sets the underlying HTML attribute (no grouping behavior).
23
- */
24
- name: { type: String, required: !1 },
25
- /**
26
- * Bound value for the input field.
27
- * - Controlled via `v-model`
28
- * - Supports multiple types depending on `inputType`:
29
- * - `text`, `email`, `mask`, `digit`, `textarea` → `string`
30
- * - `number` → `number`
31
- * - `checkbox` → `boolean`
32
- * - `select` → `string | number | boolean`
33
- * - `date`, `month`, `time` → `string` or `Date`
34
- * - Internally processed and formatted based on `inputType` and `format`
35
- */
36
- modelValue: {
37
- type: [String, Number, Boolean, Object, Array, Date],
38
- default: null
39
- },
40
- /**
41
- * Custom class string applied to the input container.
42
- * - Supports responsive classes like `hison-col-*`, `hison-pos-*`, `hison-size-*`
43
- * - Accepts string / array / object (Vue standard) form
44
- */
45
- class: {
46
- type: [String, Array, Object],
47
- required: !1
48
- },
49
- /**
50
- * Inline style for the input element.
51
- * - Accepts string, CSSProperties object, or an array of objects
52
- * - Merged with internal dynamic styles
53
- */
54
- style: {
55
- type: [String, Object, Array],
56
- required: !1
57
- },
58
- /**
59
- * Controls visibility of the input field.
60
- * - Boolean only. Use `:visible="false"`
61
- * - Default: `true`
62
- */
63
- visible: { type: Boolean, default: !0 },
64
- /**
65
- * Tooltip text shown on hover.
66
- * - Maps to the `title` attribute
67
- * - Modifiable at runtime via `HInputMethods.setTitle()`
68
- */
69
- title: { type: String, required: !1 },
70
- /**
71
- * Input type.
72
- * - Available values: `'text'`, `'mask'`, `'number'`, `'digit'`, `'date'`, `'month'`, `'time'`, `'email'`, `'password'`, `'checkbox'`, `'range'`, `'color'`, `'textarea'`, `'select'`
73
- * - Accepts enum `InputType` or its literal strings
74
- * - Affects input formatting and behavior
75
- */
76
- inputType: {
77
- type: String,
78
- required: !1,
79
- validator: (e) => sn.includes(e)
80
- },
81
- /**
82
- * Format string used for displaying or formatting the value.
83
- * - Used when `type` is `'number'`, `'mask'`, `'date'`, or `'month'`
84
- */
85
- format: { type: String, required: !1 },
86
- /**
87
- * Placeholder text to show when value is null or empty.
88
- * - Used as a display fallback in span mode
89
- */
90
- nullText: { type: String, default: "" },
91
- /**
92
- * Maximum numeric value.
93
- * - Only applicable when `type` is `'number'`
94
- * - Enforced during input and formatting
95
- * - Accepts string or number
96
- */
97
- maxNumber: { type: [String, Number], required: !1 },
98
- /**
99
- * Minimum numeric value.
100
- * - Only applicable when `type` is `'number'`
101
- * - Accepts string or number
102
- */
103
- minNumber: { type: [String, Number], required: !1 },
104
- /**
105
- * Rounding precision for numeric inputs.
106
- * - Only applies when `type` is `'number'`
107
- * - Accepts positive or negative integers (string or number)
108
- */
109
- roundNumber: { type: [String, Number], required: !1 },
110
- /**
111
- * Maximum number of characters allowed.
112
- * - Truncates string if exceeded
113
- * - Does not consider byte size
114
- * - Accepts string or number
115
- */
116
- maxLength: { type: [String, Number], required: !1 },
117
- /**
118
- * Maximum number of bytes allowed.
119
- * - Truncates string based on UTF-8 byte size
120
- * - Uses `hison.utils.getCutByteLength()` internally
121
- * - Accepts string or number
122
- */
123
- maxByte: { type: [String, Number], required: !1 },
124
- /**
125
- * Placeholder string shown inside the input when empty.
126
- * - Maps to the `placeholder` attribute
127
- */
128
- placeholder: { type: String, required: !1 },
129
- /**
130
- * Edit mode of the input.
131
- * - Values: `'editable'`, `'readonly'`, `'disable'`
132
- * - Accepts enum `EditMode` or its literal strings
133
- * - `'readonly'` and `'disable'` both prevent editing but differ in styling
134
- */
135
- editMode: {
136
- type: String,
137
- default: G.editable,
138
- validator: (e) => ["editable", "disable", "readonly"].includes(e)
139
- },
140
- /**
141
- * Whether the input is required.
142
- * - Boolean only
143
- * - Adds `hison-input-required` class when `true`
144
- */
145
- required: { type: Boolean, default: !1 },
146
- /**
147
- * Bold font style toggle.
148
- * - Boolean only
149
- * - Adds `hison-font-bold` class when enabled
150
- */
151
- fontBold: { type: Boolean, default: !1 },
152
- /**
153
- * Italic font style toggle.
154
- * - Boolean only
155
- * - Adds `hison-font-italic` class when enabled
156
- */
157
- fontItalic: { type: Boolean, default: !1 },
158
- /**
159
- * Strikethrough font style toggle.
160
- * - Boolean only
161
- * - Adds `hison-font-thruline` class when enabled
162
- */
163
- fontThruline: { type: Boolean, default: !1 },
164
- /**
165
- * Underline font style toggle.
166
- * - Boolean only
167
- * - Adds `hison-font-underline` class when enabled
168
- */
169
- fontUnderline: { type: Boolean, default: !1 },
170
- /**
171
- * Text alignment for the input’s display text.
172
- * - 'left' | 'center' | 'right'
173
- * - Accepts enum `TextAlign` or its literal strings
174
- */
175
- textAlign: {
176
- type: String,
177
- default: null,
178
- validator: (e) => e == null || un.includes(e)
179
- },
180
- /**
181
- * Whether to show border (rendered as subtle box-shadow).
182
- * - Default: false (no border)
183
- */
184
- border: { type: Boolean, default: !0 },
185
- /**
186
- * List of selectable options for `inputType: 'select'`.
187
- * - Each option should be an object with `text` (label shown to the user) and `value` (actual value to bind).
188
- * - Used only when `inputType === 'select'`.
189
- * example
190
- * options: [
191
- * { text: 'Active', value: 'A' },
192
- * { text: 'Inactive', value: 'I' }
193
- * ]
194
- */
195
- options: {
196
- type: Array,
197
- required: !1,
198
- default: () => []
199
- },
200
- /**
201
- * Output value when checkbox is checked (used in display mode).
202
- * - Used only when `inputType === 'checkbox'`.
203
- * - Affects the display text returned by `getText()` and the span view when not editing.
204
- */
205
- checkedText: { type: String, default: "Y" },
206
- /**
207
- * Output value when checkbox is unchecked (used in display mode).
208
- * - Used only when `inputType === 'checkbox'`.
209
- * - Affects the display text returned by `getText()` and the span view when not editing.
210
- */
211
- uncheckedText: { type: String, default: "N" },
212
- /**
213
- * Controls keyboard focus order of the element.
214
- * - `0` enables natural tab navigation, positive numbers set custom order.
215
- * - `null` or `''` removes tabindex (not focusable).
216
- */
217
- tabIndex: {
218
- type: [Number, String],
219
- default: null,
220
- validator: (e) => e === null || e === "" || !isNaN(+e) && isFinite(+e)
221
- },
222
- /**
223
- * Custom formatter function for display text (span text) of the input component.
224
- *
225
- * It overrides the default formatting logic based on `inputType`, allowing full control
226
- * over the rendered text content of the input.
227
- *
228
- * If this prop is provided, it takes priority over any built-in format logic
229
- * such as number/date formatting, checkbox label mapping, or select label resolution.
230
- *
231
- * @example
232
- * // 1. Formatting numbers as currency
233
- * <HInput
234
- * v-model="form.price"
235
- * inputTextdHandler={(val) => `$${Number(val).toLocaleString()}`}
236
- * />
237
- * // modelValue = 1200 => "$1,200"
238
- *
239
- * @example
240
- * // 2. Showing 'Yes' or 'No' instead of true/false
241
- * <HInput
242
- * v-model="form.enabled"
243
- * inputType="checkbox"
244
- * inputTextdHandler={(val) => val ? 'Yes' : 'No'}
245
- * />
246
- * // modelValue = true => "Yes"
247
- *
248
- * @example
249
- * // 3. Applying custom date formatting
250
- * <HInput
251
- * v-model="form.hireDate"
252
- * inputType="date"
253
- * inputTextdHandler={(val) => dayjs(val).format('MMMM D, YYYY')}
254
- * />
255
- * // modelValue = '2025-07-03' => "July 3, 2025"
256
- *
257
- * @remarks
258
- * This only affects the `spanText` used in display mode. It does **not** modify the actual value
259
- * bound via `v-model`, nor the value shown in the actual input box when in editing mode.
260
- */
261
- inputTextdHandler: {
262
- type: Function,
263
- default: void 0
264
- }
265
- }, c = /* @__PURE__ */ new WeakSet(), _ = /* @__PURE__ */ new WeakSet(), Ce = (e) => {
266
- const n = e.currentTarget;
267
- if (f.event.cssEvent.input_onBeforeFocus(e) === !1) {
268
- e.stopPropagation(), e.preventDefault();
269
- return;
270
- }
271
- n.classList.add("hison-input-on-active"), f.event.cssEvent.input_onAfterFocus(e);
272
- }, ke = (e) => {
273
- const n = e.currentTarget;
274
- if (f.event.cssEvent.input_onBeforeBlur(e) === !1) {
275
- e.stopPropagation(), e.preventDefault();
276
- return;
277
- }
278
- n.classList.remove("hison-input-on-active"), n.classList.remove("hison-input-on-mouseover"), f.event.cssEvent.input_onAfterBlur(e);
279
- }, Ne = (e) => {
280
- const n = e.currentTarget;
281
- if (!n.readOnly) {
282
- if (f.event.cssEvent.input_onBeforeMouseover(e) === !1) {
283
- e.stopPropagation(), e.preventDefault();
284
- return;
285
- }
286
- n.classList.add("hison-input-on-mouseover"), f.event.cssEvent.input_onAfterMouseover(e);
287
- }
288
- }, he = (e) => {
289
- const n = e.currentTarget;
290
- if (!n.readOnly) {
291
- if (f.event.cssEvent.input_onBeforeMouseout(e) === !1) {
292
- e.stopPropagation(), e.preventDefault();
293
- return;
294
- }
295
- n.classList.remove("hison-input-on-mouseover"), f.event.cssEvent.input_onAfterMouseout(e);
296
- }
297
- }, we = (e) => {
298
- const n = e.currentTarget;
299
- if (!n.readOnly) {
300
- if (f.event.cssEvent.input_onBeforeTouchstart(e) === !1) {
301
- e.stopPropagation(), e.preventDefault();
302
- return;
303
- }
304
- n.classList.add("hison-input-on-mouseover"), f.event.cssEvent.input_onAfterTouchstart(e);
305
- }
306
- }, Le = (e) => {
307
- const n = e.currentTarget;
308
- if (!n.readOnly) {
309
- if (f.event.cssEvent.input_onBeforeTouchend(e) === !1) {
310
- e.stopPropagation(), e.preventDefault();
311
- return;
312
- }
313
- n.classList.remove("hison-input-on-mouseover"), f.event.cssEvent.input_onAfterTouchend(e);
314
- }
315
- }, Be = (e) => {
316
- const n = e.currentTarget;
317
- n.readOnly || n.classList.remove("hison-input-on-mouseover");
318
- }, $n = (e) => {
319
- c.has(e) || (c.add(e), e.addEventListener("mouseenter", Ne), e.addEventListener("mouseleave", he), e.addEventListener("touchstart", we, { passive: !1, capture: !0 }), e.addEventListener("touchend", Le, { passive: !1, capture: !0 }), e.addEventListener("touchcancel", Be, { passive: !1, capture: !0 }));
320
- }, Tn = (e) => {
321
- c.has(e) && (c.delete(e), e.removeEventListener("mouseenter", Ne), e.removeEventListener("mouseleave", he), e.removeEventListener("touchstart", we, { capture: !0 }), e.removeEventListener("touchend", Le, { capture: !0 }), e.removeEventListener("touchcancel", Be, { capture: !0 }), e.classList.remove("hison-input-on-mouseover"));
322
- }, Cn = (e) => {
323
- _.has(e) || (_.add(e), e.addEventListener("focus", Ce), e.addEventListener("blur", ke));
324
- }, kn = (e) => {
325
- _.has(e) && (_.delete(e), e.removeEventListener("focus", Ce), e.removeEventListener("blur", ke), e.classList.remove("hison-input-on-active"), e.classList.remove("hison-input-on-mouseover"));
326
- }, Nn = _e({
327
- name: "HInput",
328
- props: yn,
329
- inheritAttrs: !1,
330
- emits: [
331
- "update:modelValue",
332
- "mounted",
333
- "responsive-change",
334
- "click",
335
- "dblclick",
336
- "mousedown",
337
- "mouseup",
338
- "mouseenter",
339
- "mouseleave",
340
- "mouseover",
341
- "mouseout",
342
- "mousemove",
343
- "pointerdown",
344
- "pointerup",
345
- "pointermove",
346
- "pointerenter",
347
- "pointerleave",
348
- "touchstart",
349
- "touchend",
350
- "touchmove",
351
- "touchcancel",
352
- "focus",
353
- "blur",
354
- "input",
355
- "change",
356
- "compositionstart",
357
- "compositionupdate",
358
- "compositionend",
359
- "keydown",
360
- "keyup",
361
- "dragstart",
362
- "dragend",
363
- "drag",
364
- "drop",
365
- "copy",
366
- "cut",
367
- "paste",
368
- "wheel",
369
- "contextmenu"
370
- ],
371
- setup(e, { emit: n }) {
372
- const b = a(null), L = a(null), $ = a(null), p = e.id ? e.id : ln(), t = a(e.name ?? p), Ie = g(() => t.value), ee = `hinput:${p}`, de = rn(), S = a([]), ne = () => {
373
- S.value = an(dn(e.class) || "", de.value), mn(S.value, "col") === -1 && S.value.push("hison-col-12"), Te(S.value, "size", f.componentStyle.size), Te(S.value, "color", "primary");
374
- }, l = a(e.inputType ?? i.text), te = g(() => {
375
- switch (l.value) {
376
- case i.checkbox:
377
- return "checkbox";
378
- case i.radio:
379
- return "radio";
380
- case i.select:
381
- return "select";
382
- case i.range:
383
- return "range";
384
- case i.color:
385
- return "color";
386
- default:
387
- return "text";
388
- }
389
- }), Fe = g(() => {
390
- switch (l.value) {
391
- case i.mask:
392
- case i.digit:
393
- return "text";
394
- default:
395
- return l.value;
396
- }
397
- }), N = a(e.format ?? null), B = a(r.utils.isNumeric(e.maxNumber) ? Number(e.maxNumber) : null), I = a(r.utils.isNumeric(e.minNumber) ? Number(e.minNumber) : null), D = a(r.utils.isInteger(e.roundNumber) || r.utils.isNegativeInteger(e.roundNumber) || e.roundNumber === "0" ? Number(e.roundNumber) : null), P = a(r.utils.isPositiveInteger(e.maxLength) ? Number(e.maxLength) : null), A = a(r.utils.isPositiveInteger(e.maxByte) ? Number(e.maxByte) : null), oe = (o) => {
398
- switch (o) {
399
- case i.number:
400
- case i.digit:
401
- return w.right;
402
- case i.date:
403
- case i.month:
404
- case i.time:
405
- return w.center;
406
- default:
407
- return w.left;
408
- }
409
- }, E = a(e.textAlign ?? oe(l.value)), Pe = g(() => ({ textAlign: E.value })), K = a(e.border ?? !0), Ae = (o) => (o = String(o), P.value && (o = o.substring(0, P.value)), A.value && (o = r.utils.getCutByteLength(o, A.value)), o), Ee = (o) => (o = Number(o), B.value && o > B.value && (o = B.value), I.value && o < I.value && (o = I.value), D.value && (o = r.utils.getRound(o, D.value)), o), ue = (o) => {
410
- if (x(o))
411
- return l.value === i.checkbox || l.value === i.radio ? !1 : o;
412
- try {
413
- switch (l.value) {
414
- case i.text:
415
- case i.password:
416
- case i.email:
417
- case i.mask:
418
- case i.digit:
419
- case i.textarea:
420
- l.value === i.mask && (o = vn(o, N.value ?? "")), l.value === i.digit && (o = pn(o)), o = Ae(o);
421
- break;
422
- case i.number:
423
- l.value === i.number && (o = Ee(o));
424
- break;
425
- case i.date:
426
- o && (o = r.utils.getDateWithFormat(o, ae.DateFormat["yyyy-MM-dd"]));
427
- break;
428
- case i.month:
429
- o && (o = r.utils.getDateWithFormat(o, ae.YearMonthFormat["yyyy-MM"]));
430
- break;
431
- case i.time:
432
- o && (o = r.utils.getDateWithFormat(o, ae.TimeFormat["HH:mm:ss"]));
433
- break;
434
- case i.checkbox:
435
- case i.radio:
436
- o = !!o;
437
- default:
438
- break;
439
- }
440
- } catch (u) {
441
- console.warn("[HInput] Failed to format value", o, u);
442
- }
443
- return o;
444
- }, s = a(ue(e.modelValue)), Se = g(() => s.value), y = a(null), U = a(e.visible), H = a(e.title ?? ""), O = a(e.nullText ?? ""), T = a(e.editMode), De = g(() => T.value === G.disable), ie = g(() => T.value === G.readonly), Ve = g(() => K.value && !ie.value ? "hison-border" : ""), qe = g(() => T.value !== G.editable ? [`hison-input-${T.value}`, `hison-input-${te.value}-${T.value}`] : []), W = a(e.required), Re = g(() => W.value ? ["hison-input-required", `hison-input-${te.value}-required`] : []), j = a(e.placeholder ?? ""), z = a(e.fontBold), Ke = g(() => {
445
- if (z.value) return "hison-font-bold";
446
- }), Y = a(e.fontItalic), Ue = g(() => {
447
- if (Y.value) return "hison-font-italic";
448
- }), Q = a(e.fontThruline), He = g(() => {
449
- if (Q.value) return "hison-font-thruline";
450
- }), X = a(e.fontUnderline), Oe = g(() => {
451
- if (X.value) return "hison-font-underline";
452
- }), We = g(() => U.value ? "" : "hison-display-none"), se = a(!1), h = a(!1), J = a(
453
- e.tabIndex !== null && e.tabIndex !== "" ? Number(e.tabIndex) : null
454
- ), me = re("registerToInputGroup", null), m = re("notifyInputGroupStatus", null), V = re("radioMembershipChanged", null), le = (o) => {
455
- if (l.value === i.checkbox || l.value === i.radio)
456
- return o ? e.checkedText : e.uncheckedText;
457
- if (x(o) || o === "") return O.value ?? "";
458
- if (e.inputTextdHandler)
459
- return e.inputTextdHandler(o);
460
- let u = String(o);
461
- try {
462
- switch (l.value) {
463
- case i.password:
464
- u = "•".repeat(o.length);
465
- break;
466
- case i.number:
467
- u = r.utils.getNumberFormat(o, N.value ?? r.getNumberFormat());
468
- break;
469
- case i.date:
470
- u = r.utils.getDateWithFormat(o, N.value ?? r.getDateFormat());
471
- break;
472
- case i.month:
473
- u = r.utils.getDateWithFormat(o, N.value ?? r.getYearMonthFormat());
474
- break;
475
- case i.time:
476
- u = r.utils.getDateWithFormat(o, N.value ?? r.getTimeFormat());
477
- break;
478
- case i.select:
479
- const q = b.value, fe = q.selectedIndex;
480
- u = fe >= 0 ? q.options[fe].text : "";
481
- break;
482
- }
483
- } catch (q) {
484
- console.warn("[HInput] Failed to format value", o, q), u = "";
485
- }
486
- return u;
487
- }, Z = a(""), je = (o) => {
488
- T.value === G.editable && (se.value = !0), ge(() => {
489
- var u;
490
- (u = b.value) == null || u.focus();
491
- });
492
- }, ze = (o) => {
493
- let u = b.value.value;
494
- (l.value === i.mask || l.value === i.digit || (P.value || A.value) && (l.value === i.text || l.value === i.email || l.value === i.password || l.value === i.textarea)) && (u = ue(u), b.value.value = u), s.value = u, h.value = !0, m == null || m(p, s.value), n("input", o, $.value, s.value), n("update:modelValue", s.value);
495
- }, Ye = (o) => {
496
- y.value = s.value, n("focus", o, $.value);
497
- }, Qe = (o) => {
498
- y.value !== s.value && (v(s.value, !0, !0), h.value = !0, m == null || m(p, s.value)), se.value = !1, n("blur", o, $.value);
499
- }, v = (o, u = !0, q = !1) => {
500
- s.value = u ? ue(o) : o, Z.value = le(s.value), l.value === i.checkbox || l.value === i.radio ? b.value.checked = !!s.value : b.value.value = s.value, q && n("change", y.value, s.value, $.value);
501
- }, Xe = (o) => {
502
- const u = o.target;
503
- v(u.value, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
504
- }, Je = (o) => {
505
- const u = o.target;
506
- v(u.value, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
507
- }, Ze = (o) => {
508
- const u = o.target;
509
- v(u.checked, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
510
- }, Ge = (o) => {
511
- const u = o.target;
512
- v(u.checked, !1, !0), h.value = !0, m && t.value ? m(t.value, u.checked ? p : null) : m == null || m(p, s.value), n("update:modelValue", s.value);
513
- }, xe = (o) => {
514
- const u = o.target;
515
- v(u.value, !1, !0), h.value = !0, m == null || m(p, s.value), n("update:modelValue", s.value);
516
- }, ce = (o) => {
517
- if (ie.value && (o.code === "Space" || o.code === "Enter")) {
518
- o.preventDefault(), o.stopPropagation();
519
- return;
520
- }
521
- n("keydown", o, $.value);
522
- }, ve = () => {
523
- f.component.inputList[p] && f.component.inputList[p].isHisonvueComponent && console.warn(`[Hisonvue] The input ID is at risk of being duplicated. ${p}`), fn(ee, () => {
524
- pe(), ge(ve);
525
- }), b.value && (ne(), L.value && $n(L.value), l.value !== i.checkbox && l.value !== i.radio && l.value !== i.range && l.value !== i.color && Cn(b.value), v(s.value, !1), $.value = {
526
- isHisonvueComponent: !0,
527
- getId: () => p,
528
- getType: () => "input",
529
- getName: () => t.value,
530
- setName: (o) => {
531
- if (o === t.value) return;
532
- const u = t.value;
533
- t.value = o, l.value === i.radio && (V == null || V(p, u, o, !!s.value));
534
- },
535
- getText: () => Z.value,
536
- getValue: () => s.value,
537
- setValue: (o) => {
538
- y.value = s.value, s.value = o, v(s.value);
539
- },
540
- getTitle: () => H.value,
541
- setTitle: (o) => {
542
- H.value = o;
543
- },
544
- isVisible: () => U.value,
545
- setVisible: (o) => {
546
- U.value = o;
547
- },
548
- getInputType: () => l.value,
549
- setInputType: (o) => {
550
- l.value = i[o], y.value = s.value, v(s.value), e.textAlign == null && (E.value = oe(l.value));
551
- },
552
- getFormat: () => N.value ?? "",
553
- setFormat: (o) => {
554
- N.value = o, y.value = s.value, v(s.value);
555
- },
556
- getNullText: () => O.value,
557
- setNullText: (o) => {
558
- O.value = o, (x(s.value) || s.value === "") && (Z.value = le(s.value));
559
- },
560
- getEditMode: () => T.value,
561
- setEditMode: (o) => {
562
- T.value = o;
563
- },
564
- getMaxNumber: () => B.value,
565
- setMaxNumber: (o) => {
566
- r.utils.isNumeric(o) && (B.value = o, y.value = s.value, l.value === i.number && v(s.value));
567
- },
568
- getMinNumber: () => I.value,
569
- setMinNumber: (o) => {
570
- r.utils.isNumeric(o) && (I.value = o, y.value = s.value, l.value === i.number && v(s.value));
571
- },
572
- getRoundNumber: () => D.value,
573
- setRoundNumber: (o) => {
574
- !r.utils.isPositiveInteger(o) && !r.utils.isNegativeInteger(o) && o !== 0 || (D.value = o, y.value = s.value, l.value === i.number && v(s.value));
575
- },
576
- getMaxLength: () => P.value,
577
- setMaxLength: (o) => {
578
- r.utils.isPositiveInteger(o) && (P.value = o), y.value = s.value, v(s.value);
579
- },
580
- getMaxByte: () => A.value,
581
- setMaxByte: (o) => {
582
- r.utils.isPositiveInteger(o) && (A.value = o), y.value = s.value, v(s.value);
583
- },
584
- getRequired: () => W.value,
585
- setRequired: (o) => {
586
- W.value = o;
587
- },
588
- getPlaceholder: () => j.value,
589
- setPlaceholder: (o) => {
590
- j.value = o;
591
- },
592
- isFontBold: () => z.value,
593
- setFontBold: (o) => {
594
- z.value = o;
595
- },
596
- isFontItalic: () => Y.value,
597
- setFontItalic: (o) => {
598
- Y.value = o;
599
- },
600
- isFontThruline: () => Q.value,
601
- setFontThruline: (o) => {
602
- Q.value = o;
603
- },
604
- isFontUnderline: () => X.value,
605
- setFontUnderline: (o) => {
606
- X.value = o;
607
- },
608
- getTextAlign: () => E.value,
609
- setTextAlign: (o) => {
610
- (o === w.left || o === w.center || o === w.right) && (E.value = o);
611
- },
612
- isBorder: () => K.value,
613
- setBorder: (o) => {
614
- K.value = o;
615
- },
616
- isModified: () => h.value,
617
- setModified: (o) => {
618
- h.value = o;
619
- },
620
- getTabIndex: () => J.value,
621
- setTabIndex: (o) => {
622
- J.value = o != null ? Number(o) : null;
623
- },
624
- focus: () => {
625
- var o;
626
- L.value ? L.value.focus() : (o = b.value) == null || o.focus();
627
- },
628
- reload: () => gn(ee)
629
- }, f.component.inputList[p] = $.value, me && me(p), n("mounted", $.value));
630
- }, pe = () => {
631
- Mn(ee), delete f.component.inputList[p], l.value !== i.checkbox && l.value !== i.radio && l.value !== i.range && l.value !== i.color && kn(b.value), L.value && Tn(L.value);
632
- };
633
- return en(ve), nn(pe), d(de, (o) => {
634
- ne(), n("responsive-change", o);
635
- }), d(() => e.modelValue, (o) => {
636
- v(o, !1);
637
- }), d(() => e.name, (o) => {
638
- if (o && o !== t.value) {
639
- const u = t.value;
640
- t.value = o, l.value === i.radio && (V == null || V(p, u, o, !!s.value));
641
- }
642
- }), d(() => e.visible, (o) => {
643
- const u = !!o;
644
- u !== U.value && (U.value = u);
645
- }), d(() => e.title, (o) => {
646
- const u = o ?? "";
647
- u !== H.value && (H.value = u);
648
- }), d(() => e.nullText, (o) => {
649
- const u = o ?? "";
650
- u !== O.value && (O.value = u, (x(s.value) || s.value === "") && (Z.value = le(s.value)));
651
- }), d(() => e.inputType, (o) => {
652
- o && o !== l.value && (l.value = o, e.textAlign == null && (E.value = oe(l.value)), v(s.value));
653
- }), d(() => e.format, (o) => {
654
- const u = o ?? null;
655
- u !== N.value && (N.value = u, v(s.value));
656
- }), d(() => e.maxNumber, (o) => {
657
- const u = r.utils.isNumeric(o) ? Number(o) : null;
658
- u !== B.value && (B.value = u, l.value === i.number && v(s.value));
659
- }), d(() => e.minNumber, (o) => {
660
- const u = r.utils.isNumeric(o) ? Number(o) : null;
661
- u !== I.value && (I.value = u, l.value === i.number && v(s.value));
662
- }), d(() => e.roundNumber, (o) => {
663
- const u = r.utils.isInteger(o) || r.utils.isNegativeInteger(o) || o === "0" ? Number(o) : null;
664
- u !== D.value && (D.value = u, l.value === i.number && v(s.value));
665
- }), d(() => e.maxLength, (o) => {
666
- const u = r.utils.isPositiveInteger(o) ? Number(o) : null;
667
- u !== P.value && (P.value = u, v(s.value));
668
- }), d(() => e.maxByte, (o) => {
669
- const u = r.utils.isPositiveInteger(o) ? Number(o) : null;
670
- u !== A.value && (A.value = u, v(s.value));
671
- }), d(() => e.textAlign, (o) => {
672
- o && o !== E.value && (o === w.left || o === w.center || o === w.right) && (E.value = o);
673
- }), d(() => e.border, (o) => {
674
- const u = !!o;
675
- u !== K.value && (K.value = u);
676
- }), d(() => e.placeholder, (o) => {
677
- const u = o ?? "";
678
- u !== j.value && (j.value = u);
679
- }), d(() => e.required, (o) => {
680
- const u = !!o;
681
- u !== W.value && (W.value = u);
682
- }), d(() => e.fontBold, (o) => {
683
- const u = !!o;
684
- u !== z.value && (z.value = u);
685
- }), d(() => e.fontItalic, (o) => {
686
- const u = !!o;
687
- u !== Y.value && (Y.value = u);
688
- }), d(() => e.fontThruline, (o) => {
689
- const u = !!o;
690
- u !== Q.value && (Q.value = u);
691
- }), d(() => e.fontUnderline, (o) => {
692
- const u = !!o;
693
- u !== X.value && (X.value = u);
694
- }), d(() => e.editMode, (o) => {
695
- o && o !== T.value && (T.value = o);
696
- }), d(() => e.tabIndex, (o) => {
697
- const u = o === null || o === "" ? null : Number(o);
698
- u !== J.value && (J.value = u);
699
- }), d(() => e.class, () => {
700
- ne();
701
- }), {
702
- inputRef: b,
703
- inputTextRef: L,
704
- inputMethods: g(() => tn($)),
705
- inputValue: Se,
706
- editing: se,
707
- props: e,
708
- id: p,
709
- nameAttr: Ie,
710
- responsiveClassList: S,
711
- visibleClass: We,
712
- editModeClassList: qe,
713
- requiredClassList: Re,
714
- fontBoldClass: Ke,
715
- fontItalicClass: Ue,
716
- fontThrulineClass: He,
717
- fontUnderlineClass: Oe,
718
- textAlignStyle: Pe,
719
- borderClass: Ve,
720
- disable: De,
721
- readonly: ie,
722
- inputType: l,
723
- inputExpressionType: te,
724
- inputAttrType: Fe,
725
- title: H,
726
- placeholder: j,
727
- maxNumber: B,
728
- minNumber: I,
729
- spanText: Z,
730
- tabIndex: J,
731
- onInput: ze,
732
- onTextInputFocus: je,
733
- onFocus: Ye,
734
- onBlur: Qe,
735
- onRangeChange: Xe,
736
- onColorChange: Je,
737
- onCheckboxChange: Ze,
738
- onRadioChange: Ge,
739
- onSelectChange: xe,
740
- onKeydown: ce
741
- };
742
- }
743
- }), hn = ["id", "name", "value", "disabled", "readonly", "title", "tabindex"], wn = ["id", "name", "value", "disabled", "readonly", "checked", "title", "tabindex"], Ln = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], Bn = ["id", "name", "disabled", "readonly", "checked", "title", "tabindex"], In = ["id", "name", "value", "disabled", "readonly", "title", "tabindex"], Fn = ["value"], Pn = ["id", "name", "value", "disabled", "readonly", "placeholder", "title", "maxlength", "tabindex"], An = ["id", "name", "value", "disabled", "readonly", "title", "placeholder", "tabindex"], En = ["id", "name", "value", "disabled", "readonly", "type", "title", "placeholder", "max", "min", "tabindex"];
744
- function Sn(e, n, b, L, $, p) {
745
- return k(), C("div", {
746
- class: M([
747
- "hison-wrapper",
748
- "hison-s-input-margin-adjustment",
749
- ...e.responsiveClassList,
750
- e.visibleClass
751
- ])
752
- }, [
753
- e.inputType === "range" ? (k(), C("div", {
754
- key: 0,
755
- class: M([
756
- "hison-input",
757
- "hison-input-range-div"
758
- ]),
759
- style: F([e.textAlignStyle, e.props.style])
760
- }, [
761
- R("input", {
762
- ref: "inputRef",
763
- id: `${e.id}`,
764
- name: `${e.nameAttr}`,
765
- type: "range",
766
- class: M([
767
- `hison-input-${e.inputType}`,
768
- ...e.editModeClassList,
769
- ...e.requiredClassList
770
- ]),
771
- value: e.inputValue,
772
- disabled: e.disable,
773
- readonly: e.readonly,
774
- title: e.title || void 0,
775
- tabindex: e.tabIndex ?? void 0,
776
- onChange: n[0] || (n[0] = (...t) => e.onRangeChange && e.onRangeChange(...t)),
777
- onFocus: n[1] || (n[1] = (...t) => e.onFocus && e.onFocus(...t)),
778
- onBlur: n[2] || (n[2] = (...t) => e.onBlur && e.onBlur(...t)),
779
- onKeydown: n[3] || (n[3] = (...t) => e.onKeydown && e.onKeydown(...t)),
780
- onClick: n[4] || (n[4] = (t) => e.$emit("click", t, e.inputMethods)),
781
- onDblclick: n[5] || (n[5] = (t) => e.$emit("dblclick", t, e.inputMethods)),
782
- onMousedown: n[6] || (n[6] = (t) => e.$emit("mousedown", t, e.inputMethods)),
783
- onMouseup: n[7] || (n[7] = (t) => e.$emit("mouseup", t, e.inputMethods)),
784
- onMouseenter: n[8] || (n[8] = (t) => e.$emit("mouseenter", t, e.inputMethods)),
785
- onMouseleave: n[9] || (n[9] = (t) => e.$emit("mouseleave", t, e.inputMethods)),
786
- onMouseover: n[10] || (n[10] = (t) => e.$emit("mouseover", t, e.inputMethods)),
787
- onMouseout: n[11] || (n[11] = (t) => e.$emit("mouseout", t, e.inputMethods)),
788
- onPointerdown: n[12] || (n[12] = (t) => e.$emit("pointerdown", t, e.inputMethods)),
789
- onPointerup: n[13] || (n[13] = (t) => e.$emit("pointerup", t, e.inputMethods)),
790
- onPointermove: n[14] || (n[14] = (t) => e.$emit("pointermove", t, e.inputMethods)),
791
- onPointerenter: n[15] || (n[15] = (t) => e.$emit("pointerenter", t, e.inputMethods)),
792
- onPointerleave: n[16] || (n[16] = (t) => e.$emit("pointerleave", t, e.inputMethods)),
793
- onTouchstart: n[17] || (n[17] = (t) => e.$emit("touchstart", t, e.inputMethods)),
794
- onTouchend: n[18] || (n[18] = (t) => e.$emit("touchend", t, e.inputMethods)),
795
- onTouchmove: n[19] || (n[19] = (t) => e.$emit("touchmove", t, e.inputMethods)),
796
- onTouchcancel: n[20] || (n[20] = (t) => e.$emit("touchcancel", t, e.inputMethods)),
797
- onContextmenu: n[21] || (n[21] = (t) => e.$emit("contextmenu", t, e.inputMethods))
798
- }, null, 42, hn)
799
- ], 4)) : e.inputType === "color" ? (k(), C("div", {
800
- key: 1,
801
- class: M([
802
- "hison-input",
803
- "hison-input-color-div"
804
- ]),
805
- style: F([e.textAlignStyle, e.props.style])
806
- }, [
807
- R("input", {
808
- ref: "inputRef",
809
- id: `${e.id}`,
810
- name: `${e.nameAttr}`,
811
- type: "color",
812
- class: M([
813
- `hison-input-${e.inputType}`,
814
- ...e.editModeClassList,
815
- ...e.requiredClassList
816
- ]),
817
- value: e.inputValue,
818
- disabled: e.disable,
819
- readonly: e.readonly,
820
- checked: e.inputValue === !0,
821
- title: e.title || void 0,
822
- tabindex: e.tabIndex ?? void 0,
823
- onChange: n[22] || (n[22] = (...t) => e.onColorChange && e.onColorChange(...t)),
824
- onFocus: n[23] || (n[23] = (...t) => e.onFocus && e.onFocus(...t)),
825
- onBlur: n[24] || (n[24] = (...t) => e.onBlur && e.onBlur(...t)),
826
- onKeydown: n[25] || (n[25] = (...t) => e.onKeydown && e.onKeydown(...t)),
827
- onClick: n[26] || (n[26] = (t) => e.$emit("click", t, e.inputMethods)),
828
- onDblclick: n[27] || (n[27] = (t) => e.$emit("dblclick", t, e.inputMethods)),
829
- onMousedown: n[28] || (n[28] = (t) => e.$emit("mousedown", t, e.inputMethods)),
830
- onMouseup: n[29] || (n[29] = (t) => e.$emit("mouseup", t, e.inputMethods)),
831
- onMouseenter: n[30] || (n[30] = (t) => e.$emit("mouseenter", t, e.inputMethods)),
832
- onMouseleave: n[31] || (n[31] = (t) => e.$emit("mouseleave", t, e.inputMethods)),
833
- onMouseover: n[32] || (n[32] = (t) => e.$emit("mouseover", t, e.inputMethods)),
834
- onMouseout: n[33] || (n[33] = (t) => e.$emit("mouseout", t, e.inputMethods)),
835
- onPointerdown: n[34] || (n[34] = (t) => e.$emit("pointerdown", t, e.inputMethods)),
836
- onPointerup: n[35] || (n[35] = (t) => e.$emit("pointerup", t, e.inputMethods)),
837
- onPointermove: n[36] || (n[36] = (t) => e.$emit("pointermove", t, e.inputMethods)),
838
- onPointerenter: n[37] || (n[37] = (t) => e.$emit("pointerenter", t, e.inputMethods)),
839
- onPointerleave: n[38] || (n[38] = (t) => e.$emit("pointerleave", t, e.inputMethods)),
840
- onTouchstart: n[39] || (n[39] = (t) => e.$emit("touchstart", t, e.inputMethods)),
841
- onTouchend: n[40] || (n[40] = (t) => e.$emit("touchend", t, e.inputMethods)),
842
- onTouchmove: n[41] || (n[41] = (t) => e.$emit("touchmove", t, e.inputMethods)),
843
- onTouchcancel: n[42] || (n[42] = (t) => e.$emit("touchcancel", t, e.inputMethods)),
844
- onContextmenu: n[43] || (n[43] = (t) => e.$emit("contextmenu", t, e.inputMethods))
845
- }, null, 42, wn)
846
- ], 4)) : e.inputType === "checkbox" ? (k(), C("div", {
847
- key: 2,
848
- class: M([
849
- "hison-input",
850
- "hison-input-checkbox-div"
851
- ]),
852
- style: F([e.textAlignStyle, e.props.style])
853
- }, [
854
- R("input", {
855
- ref: "inputRef",
856
- id: `${e.id}`,
857
- name: `${e.nameAttr}`,
858
- type: "checkbox",
859
- class: M([
860
- `hison-input-${e.inputType}`,
861
- ...e.editModeClassList,
862
- ...e.requiredClassList
863
- ]),
864
- disabled: e.disable,
865
- readonly: e.readonly,
866
- checked: e.inputValue === !0,
867
- title: e.title || void 0,
868
- tabindex: e.tabIndex ?? void 0,
869
- onChange: n[44] || (n[44] = (...t) => e.onCheckboxChange && e.onCheckboxChange(...t)),
870
- onFocus: n[45] || (n[45] = (...t) => e.onFocus && e.onFocus(...t)),
871
- onBlur: n[46] || (n[46] = (...t) => e.onBlur && e.onBlur(...t)),
872
- onKeydown: n[47] || (n[47] = (...t) => e.onKeydown && e.onKeydown(...t)),
873
- onClick: n[48] || (n[48] = (t) => e.$emit("click", t, e.inputMethods)),
874
- onDblclick: n[49] || (n[49] = (t) => e.$emit("dblclick", t, e.inputMethods)),
875
- onMousedown: n[50] || (n[50] = (t) => e.$emit("mousedown", t, e.inputMethods)),
876
- onMouseup: n[51] || (n[51] = (t) => e.$emit("mouseup", t, e.inputMethods)),
877
- onMouseenter: n[52] || (n[52] = (t) => e.$emit("mouseenter", t, e.inputMethods)),
878
- onMouseleave: n[53] || (n[53] = (t) => e.$emit("mouseleave", t, e.inputMethods)),
879
- onMouseover: n[54] || (n[54] = (t) => e.$emit("mouseover", t, e.inputMethods)),
880
- onMouseout: n[55] || (n[55] = (t) => e.$emit("mouseout", t, e.inputMethods)),
881
- onPointerdown: n[56] || (n[56] = (t) => e.$emit("pointerdown", t, e.inputMethods)),
882
- onPointerup: n[57] || (n[57] = (t) => e.$emit("pointerup", t, e.inputMethods)),
883
- onPointermove: n[58] || (n[58] = (t) => e.$emit("pointermove", t, e.inputMethods)),
884
- onPointerenter: n[59] || (n[59] = (t) => e.$emit("pointerenter", t, e.inputMethods)),
885
- onPointerleave: n[60] || (n[60] = (t) => e.$emit("pointerleave", t, e.inputMethods)),
886
- onTouchstart: n[61] || (n[61] = (t) => e.$emit("touchstart", t, e.inputMethods)),
887
- onTouchend: n[62] || (n[62] = (t) => e.$emit("touchend", t, e.inputMethods)),
888
- onTouchmove: n[63] || (n[63] = (t) => e.$emit("touchmove", t, e.inputMethods)),
889
- onTouchcancel: n[64] || (n[64] = (t) => e.$emit("touchcancel", t, e.inputMethods)),
890
- onContextmenu: n[65] || (n[65] = (t) => e.$emit("contextmenu", t, e.inputMethods))
891
- }, null, 42, Ln)
892
- ], 4)) : e.inputType === "radio" ? (k(), C("div", {
893
- key: 3,
894
- class: M(["hison-input", "hison-input-radio-div"]),
895
- style: F([e.textAlignStyle, e.props.style])
896
- }, [
897
- R("input", {
898
- ref: "inputRef",
899
- id: `${e.id}`,
900
- name: `${e.nameAttr}`,
901
- type: "radio",
902
- class: M([
903
- `hison-input-${e.inputType}`,
904
- ...e.editModeClassList,
905
- ...e.requiredClassList
906
- ]),
907
- disabled: e.disable,
908
- readonly: e.readonly,
909
- checked: e.inputValue === !0,
910
- title: e.title || void 0,
911
- tabindex: e.tabIndex ?? void 0,
912
- onChange: n[66] || (n[66] = (...t) => e.onRadioChange && e.onRadioChange(...t)),
913
- onFocus: n[67] || (n[67] = (...t) => e.onFocus && e.onFocus(...t)),
914
- onBlur: n[68] || (n[68] = (...t) => e.onBlur && e.onBlur(...t)),
915
- onKeydown: n[69] || (n[69] = (...t) => e.onKeydown && e.onKeydown(...t)),
916
- onClick: n[70] || (n[70] = (t) => e.$emit("click", t, e.inputMethods)),
917
- onDblclick: n[71] || (n[71] = (t) => e.$emit("dblclick", t, e.inputMethods)),
918
- onMousedown: n[72] || (n[72] = (t) => e.$emit("mousedown", t, e.inputMethods)),
919
- onMouseup: n[73] || (n[73] = (t) => e.$emit("mouseup", t, e.inputMethods)),
920
- onMouseenter: n[74] || (n[74] = (t) => e.$emit("mouseenter", t, e.inputMethods)),
921
- onMouseleave: n[75] || (n[75] = (t) => e.$emit("mouseleave", t, e.inputMethods)),
922
- onMouseover: n[76] || (n[76] = (t) => e.$emit("mouseover", t, e.inputMethods)),
923
- onMouseout: n[77] || (n[77] = (t) => e.$emit("mouseout", t, e.inputMethods)),
924
- onPointerdown: n[78] || (n[78] = (t) => e.$emit("pointerdown", t, e.inputMethods)),
925
- onPointerup: n[79] || (n[79] = (t) => e.$emit("pointerup", t, e.inputMethods)),
926
- onPointermove: n[80] || (n[80] = (t) => e.$emit("pointermove", t, e.inputMethods)),
927
- onPointerenter: n[81] || (n[81] = (t) => e.$emit("pointerenter", t, e.inputMethods)),
928
- onPointerleave: n[82] || (n[82] = (t) => e.$emit("pointerleave", t, e.inputMethods)),
929
- onTouchstart: n[83] || (n[83] = (t) => e.$emit("touchstart", t, e.inputMethods)),
930
- onTouchend: n[84] || (n[84] = (t) => e.$emit("touchend", t, e.inputMethods)),
931
- onTouchmove: n[85] || (n[85] = (t) => e.$emit("touchmove", t, e.inputMethods)),
932
- onTouchcancel: n[86] || (n[86] = (t) => e.$emit("touchcancel", t, e.inputMethods)),
933
- onContextmenu: n[87] || (n[87] = (t) => e.$emit("contextmenu", t, e.inputMethods))
934
- }, null, 42, Bn)
935
- ], 4)) : e.inputType === "select" ? (k(), C("select", {
936
- key: 4,
937
- ref: "inputRef",
938
- id: `${e.id}`,
939
- name: `${e.nameAttr}`,
940
- style: F([e.textAlignStyle, e.props.style]),
941
- class: M([
942
- "hison-input",
943
- `hison-input-${e.inputType}`,
944
- ...e.editModeClassList,
945
- ...e.requiredClassList,
946
- e.fontBoldClass,
947
- e.fontItalicClass,
948
- e.fontThrulineClass,
949
- e.fontUnderlineClass,
950
- e.borderClass
951
- ]),
952
- value: e.inputValue,
953
- disabled: e.disable,
954
- readonly: e.readonly,
955
- title: e.title || void 0,
956
- tabindex: e.tabIndex ?? void 0,
957
- onChange: n[88] || (n[88] = (...t) => e.onSelectChange && e.onSelectChange(...t)),
958
- onFocus: n[89] || (n[89] = (...t) => e.onFocus && e.onFocus(...t)),
959
- onBlur: n[90] || (n[90] = (...t) => e.onBlur && e.onBlur(...t)),
960
- onKeydown: n[91] || (n[91] = (...t) => e.onKeydown && e.onKeydown(...t)),
961
- onClick: n[92] || (n[92] = (t) => e.$emit("click", t, e.inputMethods)),
962
- onDblclick: n[93] || (n[93] = (t) => e.$emit("dblclick", t, e.inputMethods)),
963
- onMousedown: n[94] || (n[94] = (t) => e.$emit("mousedown", t, e.inputMethods)),
964
- onMouseup: n[95] || (n[95] = (t) => e.$emit("mouseup", t, e.inputMethods)),
965
- onMouseenter: n[96] || (n[96] = (t) => e.$emit("mouseenter", t, e.inputMethods)),
966
- onMouseleave: n[97] || (n[97] = (t) => e.$emit("mouseleave", t, e.inputMethods)),
967
- onMouseover: n[98] || (n[98] = (t) => e.$emit("mouseover", t, e.inputMethods)),
968
- onMouseout: n[99] || (n[99] = (t) => e.$emit("mouseout", t, e.inputMethods)),
969
- onPointerdown: n[100] || (n[100] = (t) => e.$emit("pointerdown", t, e.inputMethods)),
970
- onPointerup: n[101] || (n[101] = (t) => e.$emit("pointerup", t, e.inputMethods)),
971
- onPointermove: n[102] || (n[102] = (t) => e.$emit("pointermove", t, e.inputMethods)),
972
- onPointerenter: n[103] || (n[103] = (t) => e.$emit("pointerenter", t, e.inputMethods)),
973
- onPointerleave: n[104] || (n[104] = (t) => e.$emit("pointerleave", t, e.inputMethods)),
974
- onTouchstart: n[105] || (n[105] = (t) => e.$emit("touchstart", t, e.inputMethods)),
975
- onTouchend: n[106] || (n[106] = (t) => e.$emit("touchend", t, e.inputMethods)),
976
- onTouchmove: n[107] || (n[107] = (t) => e.$emit("touchmove", t, e.inputMethods)),
977
- onTouchcancel: n[108] || (n[108] = (t) => e.$emit("touchcancel", t, e.inputMethods)),
978
- onContextmenu: n[109] || (n[109] = (t) => e.$emit("contextmenu", t, e.inputMethods))
979
- }, [
980
- (k(!0), C(Me, null, on(e.props.options, (t) => (k(), C("option", {
981
- key: t.value,
982
- value: t.value
983
- }, be(t.text), 9, Fn))), 128))
984
- ], 46, In)) : e.inputType === "textarea" ? (k(), C("textarea", {
985
- key: 5,
986
- ref: "inputRef",
987
- id: `${e.id}`,
988
- name: `${e.nameAttr}`,
989
- class: M([
990
- "hison-input",
991
- `hison-input-${e.inputType}`,
992
- ...e.editModeClassList,
993
- ...e.requiredClassList,
994
- e.fontBoldClass,
995
- e.fontItalicClass,
996
- e.fontThrulineClass,
997
- e.fontUnderlineClass,
998
- e.borderClass
999
- ]),
1000
- value: e.inputValue,
1001
- style: F([e.textAlignStyle, e.props.style]),
1002
- disabled: e.disable,
1003
- readonly: e.readonly,
1004
- placeholder: e.placeholder || void 0,
1005
- title: e.title || void 0,
1006
- maxlength: e.maxLength || void 0,
1007
- tabindex: e.tabIndex ?? void 0,
1008
- onInput: n[110] || (n[110] = (...t) => e.onInput && e.onInput(...t)),
1009
- onFocus: n[111] || (n[111] = (...t) => e.onFocus && e.onFocus(...t)),
1010
- onBlur: n[112] || (n[112] = (...t) => e.onBlur && e.onBlur(...t))
1011
- }, be(e.inputValue), 47, Pn)) : (k(), C(Me, { key: 6 }, [
1012
- ye(R("input", {
1013
- ref: "inputTextRef",
1014
- id: `input_text_${e.id}`,
1015
- name: `input_text_${e.nameAttr}`,
1016
- class: M([
1017
- "hison-input",
1018
- `hison-input-text-${e.inputType}`,
1019
- ...e.editModeClassList,
1020
- ...e.requiredClassList,
1021
- e.fontBoldClass,
1022
- e.fontItalicClass,
1023
- e.fontThrulineClass,
1024
- e.fontUnderlineClass,
1025
- e.borderClass
1026
- ]),
1027
- type: "text",
1028
- value: e.spanText,
1029
- style: F([e.textAlignStyle, e.props.style]),
1030
- disabled: e.disable,
1031
- readonly: e.readonly,
1032
- title: e.title || void 0,
1033
- placeholder: e.placeholder || void 0,
1034
- tabindex: e.tabIndex ?? void 0,
1035
- onFocus: n[113] || (n[113] = (...t) => e.onTextInputFocus && e.onTextInputFocus(...t)),
1036
- onClick: n[114] || (n[114] = (t) => e.$emit("click", t, e.inputMethods)),
1037
- onDblclick: n[115] || (n[115] = (t) => e.$emit("dblclick", t, e.inputMethods)),
1038
- onMousedown: n[116] || (n[116] = (t) => e.$emit("mousedown", t, e.inputMethods)),
1039
- onMouseup: n[117] || (n[117] = (t) => e.$emit("mouseup", t, e.inputMethods)),
1040
- onMouseenter: n[118] || (n[118] = (t) => e.$emit("mouseenter", t, e.inputMethods)),
1041
- onMouseleave: n[119] || (n[119] = (t) => e.$emit("mouseleave", t, e.inputMethods)),
1042
- onMouseover: n[120] || (n[120] = (t) => e.$emit("mouseover", t, e.inputMethods)),
1043
- onMouseout: n[121] || (n[121] = (t) => e.$emit("mouseout", t, e.inputMethods)),
1044
- onMousemove: n[122] || (n[122] = (t) => e.$emit("mousemove", t, e.inputMethods)),
1045
- onPointerdown: n[123] || (n[123] = (t) => e.$emit("pointerdown", t, e.inputMethods)),
1046
- onPointerup: n[124] || (n[124] = (t) => e.$emit("pointerup", t, e.inputMethods)),
1047
- onPointermove: n[125] || (n[125] = (t) => e.$emit("pointermove", t, e.inputMethods)),
1048
- onPointerenter: n[126] || (n[126] = (t) => e.$emit("pointerenter", t, e.inputMethods)),
1049
- onPointerleave: n[127] || (n[127] = (t) => e.$emit("pointerleave", t, e.inputMethods)),
1050
- onTouchstart: n[128] || (n[128] = (t) => e.$emit("touchstart", t, e.inputMethods)),
1051
- onTouchend: n[129] || (n[129] = (t) => e.$emit("touchend", t, e.inputMethods)),
1052
- onTouchmove: n[130] || (n[130] = (t) => e.$emit("touchmove", t, e.inputMethods)),
1053
- onTouchcancel: n[131] || (n[131] = (t) => e.$emit("touchcancel", t, e.inputMethods))
1054
- }, null, 46, An), [
1055
- [$e, !e.editing]
1056
- ]),
1057
- ye(R("input", {
1058
- ref: "inputRef",
1059
- id: `${e.id}`,
1060
- name: `${e.nameAttr}`,
1061
- class: M([
1062
- "hison-input",
1063
- `hison-input-${e.inputType}`,
1064
- ...e.editModeClassList,
1065
- e.borderClass
1066
- ]),
1067
- value: e.inputValue,
1068
- style: F([e.textAlignStyle, e.props.style]),
1069
- disabled: e.disable,
1070
- readonly: e.readonly,
1071
- type: e.inputType,
1072
- title: e.title || void 0,
1073
- placeholder: e.placeholder || void 0,
1074
- max: e.maxNumber || void 0,
1075
- min: e.minNumber || void 0,
1076
- tabindex: e.tabIndex ?? void 0,
1077
- onFocus: n[132] || (n[132] = (...t) => e.onFocus && e.onFocus(...t)),
1078
- onBlur: n[133] || (n[133] = (...t) => e.onBlur && e.onBlur(...t)),
1079
- onInput: n[134] || (n[134] = (...t) => e.onInput && e.onInput(...t)),
1080
- onCompositionstart: n[135] || (n[135] = (t) => e.$emit("compositionstart", t, e.inputMethods)),
1081
- onCompositionupdate: n[136] || (n[136] = (t) => e.$emit("compositionupdate", t, e.inputMethods)),
1082
- onCompositionend: n[137] || (n[137] = (t) => e.$emit("compositionend", t, e.inputMethods)),
1083
- onKeydown: n[138] || (n[138] = (t) => e.$emit("keydown", t, e.inputMethods)),
1084
- onKeyup: n[139] || (n[139] = (t) => e.$emit("keyup", t, e.inputMethods)),
1085
- onDragstart: n[140] || (n[140] = (t) => e.$emit("dragstart", t, e.inputMethods)),
1086
- onDragend: n[141] || (n[141] = (t) => e.$emit("dragend", t, e.inputMethods)),
1087
- onDrag: n[142] || (n[142] = (t) => e.$emit("drag", t, e.inputMethods)),
1088
- onDrop: n[143] || (n[143] = (t) => e.$emit("drop", t, e.inputMethods)),
1089
- onCopy: n[144] || (n[144] = (t) => e.$emit("copy", t, e.inputMethods)),
1090
- onCut: n[145] || (n[145] = (t) => e.$emit("cut", t, e.inputMethods)),
1091
- onPaste: n[146] || (n[146] = (t) => e.$emit("paste", t, e.inputMethods)),
1092
- onWheel: n[147] || (n[147] = (t) => e.$emit("wheel", t, e.inputMethods)),
1093
- onContextmenu: n[148] || (n[148] = (t) => e.$emit("contextmenu", t, e.inputMethods))
1094
- }, null, 46, En), [
1095
- [$e, e.editing]
1096
- ])
1097
- ], 64))
1098
- ], 2);
1099
- }
1100
- const Rn = /* @__PURE__ */ bn(Nn, [["render", Sn]]);
1101
- export {
1102
- Rn as default
1103
- };