hisonvue 1.1.22 → 1.1.24

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 (69) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +260 -260
  3. package/dist/{HAccordion-CKbaRrfY.js → HAccordion-D-kfQCAv.js} +1 -1
  4. package/dist/{HAccordion-CNWAodMp.mjs → HAccordion-DCoVDIkA.mjs} +2 -2
  5. package/dist/{HBaggie-C-OS7n2D.mjs → HBaggie-B67IwC1d.mjs} +2 -2
  6. package/dist/{HBaggie-BQYZO1MF.js → HBaggie-qY6U6B0_.js} +1 -1
  7. package/dist/{HBanner-8AQVAGPP.js → HBanner-CSLLXB8T.js} +1 -1
  8. package/dist/{HBanner-D0ImN6h1.mjs → HBanner-D6bm0a9r.mjs} +2 -2
  9. package/dist/{HButton-C1AtcoQd.js → HButton-D3oUibAS.js} +1 -1
  10. package/dist/{HButton-CuoH95_k.mjs → HButton-x_S-jszQ.mjs} +2 -2
  11. package/dist/{HCalendar-CnuUn3Xk.mjs → HCalendar-BUNmBTAb.mjs} +2 -2
  12. package/dist/{HCalendar-DFXWXkci.js → HCalendar-BmxQBFsY.js} +2 -2
  13. package/dist/{HCaption-Di8ePmqg.mjs → HCaption-CI-BKkqg.mjs} +1 -1
  14. package/dist/{HCaption-BaelSNHR.js → HCaption-szh3jdKO.js} +1 -1
  15. package/dist/{HChart-DKfoM5dM.js → HChart-9i4BZlWy.js} +1 -1
  16. package/dist/{HChart-xM2KDiJi.mjs → HChart-Doi51nnJ.mjs} +1 -1
  17. package/dist/{HDrawer-A3BpOuup.js → HDrawer-3OcH1vGf.js} +1 -1
  18. package/dist/{HDrawer-Vt4JA6pk.mjs → HDrawer-DyphCN6Y.mjs} +1 -1
  19. package/dist/{HDropdown-BBEH646p.mjs → HDropdown-BqyYaNXJ.mjs} +2 -2
  20. package/dist/{HDropdown-Dj7h-JPP.js → HDropdown-Cqs5VnRI.js} +1 -1
  21. package/dist/{HFileset-oi7P1lcc.mjs → HFileset-C9FiHu7o.mjs} +1 -1
  22. package/dist/{HFileset-B9EmgNi1.js → HFileset-CAURkWDg.js} +1 -1
  23. package/dist/{HGap-Bp1hRvbT.mjs → HGap-B3n0CbCH.mjs} +1 -1
  24. package/dist/{HGap-Dy_H_-in.js → HGap-L_MePj7N.js} +1 -1
  25. package/dist/{HGrid-DDbU5kIr.js → HGrid-BRSMs0I-.js} +1 -1
  26. package/dist/{HGrid-Bc13aqjL.mjs → HGrid-DTmKLAql.mjs} +1 -1
  27. package/dist/{HImagebox-BVeQuB4p.js → HImagebox-D5rm0RGU.js} +1 -1
  28. package/dist/{HImagebox-8Uwvm5U0.mjs → HImagebox-DuzjHbDZ.mjs} +1 -1
  29. package/dist/HInput-Cc-4I8dr.js +1 -0
  30. package/dist/{HInput-DoSKCROI.mjs → HInput-Ci-U8Ydv.mjs} +398 -479
  31. package/dist/HInputGroup-B82A4Fhj.mjs +320 -0
  32. package/dist/HInputGroup-DDK9-Fq1.js +1 -0
  33. package/dist/HLabel-C5k05e5e.js +1 -0
  34. package/dist/{HLabel-DQVACpDP.mjs → HLabel-DFIoCKi2.mjs} +88 -83
  35. package/dist/{HLayout-BoHgIQcJ.mjs → HLayout-3_T7iEaY.mjs} +1 -1
  36. package/dist/{HLayout-CgaYkiuH.js → HLayout-dSBu97_b.js} +1 -1
  37. package/dist/{HList-BROYxKwn.js → HList-BW9oD7u1.js} +1 -1
  38. package/dist/{HList-BQEDGW7_.mjs → HList-CXJD9gN4.mjs} +2 -2
  39. package/dist/{HModal-GpwcBz5c.mjs → HModal-5GqISQqt.mjs} +1 -1
  40. package/dist/{HModal-DTqm3PfL.js → HModal-ND1cN5oB.js} +1 -1
  41. package/dist/{HNote-Dv8mltb0.mjs → HNote-DHNOZxfT.mjs} +1 -1
  42. package/dist/{HNote-BotCfjhk.js → HNote-r7ksmv0H.js} +1 -1
  43. package/dist/{HPagination-DG0I3Orn.mjs → HPagination-527mhA6E.mjs} +2 -2
  44. package/dist/{HPagination-DyqohdbC.js → HPagination-RATOiimL.js} +1 -1
  45. package/dist/{HParagraph-dWlO5RLM.mjs → HParagraph-BeEE50R_.mjs} +1 -1
  46. package/dist/{HParagraph-BheX7M-W.js → HParagraph-FfVJ2Iet.js} +1 -1
  47. package/dist/{HPopup-BrkB_lUB.mjs → HPopup-BO9dp3GE.mjs} +1 -1
  48. package/dist/{HPopup-BcGomDSy.js → HPopup-CeZDzKt0.js} +1 -1
  49. package/dist/{HSpinner-D6VNpQLM.mjs → HSpinner-9LkNJDu5.mjs} +92 -81
  50. package/dist/HSpinner-CW5dvlti.js +1 -0
  51. package/dist/{HTable-D2HYTuO9.mjs → HTable-5bmTb0dZ.mjs} +1 -1
  52. package/dist/{HTable-BdNtBsjD.js → HTable-CtIG1Pex.js} +1 -1
  53. package/dist/hisonvue.cjs.js +1 -1
  54. package/dist/hisonvue.css +1 -1
  55. package/dist/hisonvue.d.ts +115 -66
  56. package/dist/hisonvue.es.js +2 -2
  57. package/dist/{index-DcB16odB.js → index-BDqki68Z.js} +3 -3
  58. package/dist/{index-CGr5-mvg.mjs → index-jeMy6Ys3.mjs} +5 -7
  59. package/dist/{setButtonCssEvent-T2QV1cDz.mjs → setButtonCssEvent-BDRTvujH.mjs} +1 -1
  60. package/dist/{setButtonCssEvent-CTLQPvWj.js → setButtonCssEvent-Rr6NF1b5.js} +1 -1
  61. package/nuxt/module.mjs +40 -40
  62. package/nuxt/plugin.mjs +21 -21
  63. package/nuxt/warn-filter.mjs +41 -41
  64. package/package.json +56 -56
  65. package/dist/HInput-DHK28wmp.js +0 -1
  66. package/dist/HInputGroup-DSUZqea5.mjs +0 -281
  67. package/dist/HInputGroup-gD-E8vgq.js +0 -1
  68. package/dist/HLabel-BAbaNhJP.js +0 -1
  69. package/dist/HSpinner-CjjGcQJD.js +0 -1
@@ -1,281 +0,0 @@
1
- import { defineComponent as U, ref as h, provide as I, onMounted as T, onBeforeUnmount as $, watch as _, createElementBlock as H, openBlock as L, renderSlot as q } from "vue";
2
- import { V as A, W as g, E as P, g as k, y as C, l as c, h as D, r as B, c as w, d as x } from "./index-CGr5-mvg.mjs";
3
- import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const z = {
5
- /**
6
- * Unique identifier for the input.
7
- * - You can later retrieve its methods via `hison.component.getButton(id)`
8
- * - ⚠️ Duplicate `id` values will throw an error at mount time
9
- */
10
- id: { type: String, required: !1 },
11
- /**
12
- * Edit mode of the input.
13
- * - Values: `'editable'`, `'readonly'`, `'disable'`
14
- * - `'readonly'` and `'disable'` both prevent editing but differ in styling
15
- */
16
- editMode: {
17
- type: String,
18
- required: !1,
19
- validator: (n) => n == null || P.includes(n)
20
- },
21
- /**
22
- * Initial status of the input group.
23
- *
24
- * This prop sets the internal data status of the group, which is managed using `DataStatus` enum.
25
- * Typical values are:
26
- * - `'C'`: Created (new)
27
- * - `'R'`: Read (default)
28
- * - `'U'`: Updated (modified)
29
- * - `'D'`: Deleted
30
- *
31
- * The status value is used to track the data lifecycle and is accessible or modifiable
32
- * through runtime methods:
33
- *
34
- * ```ts
35
- * const group = hison.component.getInputGroup('group1');
36
- * group.getStatus(); // 'R'
37
- * group.setStatus('U'); // Change to 'updated'
38
- * ```
39
- *
40
- * @default 'R'
41
- */
42
- status: {
43
- type: String,
44
- required: !1,
45
- default: g.R,
46
- validator: (n) => A.includes(n)
47
- },
48
- /**
49
- * Two-way binding value for the input group.
50
- *
51
- * Enables `v-model` support for grouped form data represented as a plain object (`Record<string, any>`),
52
- * where each property key corresponds to an `<HInput>` component’s `id`.
53
- *
54
- * When used, `HInputGroup` will automatically:
55
- * - Initialize child inputs' values based on this object during registration (`registerToInputGroup`)
56
- * - Emit `update:modelValue` whenever any input’s value is modified, including the updated object
57
- * - Maintain modification state and status tracking (`C`, `R`, `U`, `D`) as values change
58
- *
59
- * ---
60
- *
61
- * ### Example
62
- * ```vue
63
- * <HInputGroup v-model="form" id="group1">
64
- * <HInput id="name" inputType="text" />
65
- * <HInput id="age" inputType="number" />
66
- * </HInputGroup>
67
- *
68
- * <script setup lang="ts">
69
- * const form = ref({ name: 'John', age: 26 })
70
- * <\/script>
71
- * ```
72
- *
73
- * ---
74
- *
75
- * ### Notes
76
- * - Any input must define an `id` that matches a key in this object to be bound correctly
77
- * - The object is shallow-merged on each child change to preserve reactivity
78
- * - This binding is fully compatible with manual `.load()` and `.getDataObject()` usage
79
- *
80
- * @prop {Record<string, any>} modelValue - Bound value object for all child inputs. Supports `v-model` binding.
81
- * @default {}
82
- */
83
- modelValue: {
84
- type: Object,
85
- default: () => ({})
86
- }
87
- }, F = U({
88
- name: "HInputGroup",
89
- props: z,
90
- emits: [
91
- "update:modelValue",
92
- "mounted"
93
- ],
94
- setup(n, { emit: V }) {
95
- const G = h(null), b = h(null), m = n.id ?? k(), y = `hinputGroup:${m}`, E = h(n.editMode ?? C.editable), v = h(n.status ?? g.R), i = h([]), a = h({}), d = h({});
96
- I("registerToInputGroup", (e) => {
97
- var t, o, u, s, f;
98
- if (!i.value.includes(e)) {
99
- i.value.push(e), i.value.sort((p, R) => p.localeCompare(R));
100
- const r = n.modelValue ?? {};
101
- r && Object.prototype.hasOwnProperty.call(r, e) && ((o = (t = c.component.getInput(e)) == null ? void 0 : t.setValue) == null || o.call(t, r[e]));
102
- const l = c.component.getInput(e);
103
- if (((u = l == null ? void 0 : l.getInputType) == null ? void 0 : u.call(l)) === "radio") {
104
- const p = ((s = l.getName) == null ? void 0 : s.call(l)) || e;
105
- a.value[p] || (a.value[p] = []), a.value[p].includes(e) || a.value[p].push(e), (f = l.getValue) != null && f.call(l) ? d.value[p] = e : Object.prototype.hasOwnProperty.call(d.value, p) || (d.value[p] = null);
106
- }
107
- }
108
- }), I("radioMembershipChanged", (e, t, o, u) => {
109
- var s, f;
110
- if (t !== o) {
111
- if (t && a.value[t]) {
112
- if (a.value[t] = a.value[t].filter((r) => r !== e), d.value[t] === e) {
113
- d.value[t] = null;
114
- const r = { ...n.modelValue || {} };
115
- r[t] = null, V("update:modelValue", r, e);
116
- }
117
- a.value[t].length === 0 && (delete a.value[t], delete d.value[t]);
118
- }
119
- if (a.value[o] || (a.value[o] = []), a.value[o].includes(e) || a.value[o].push(e), u) {
120
- d.value[o] = e;
121
- for (const l of a.value[o])
122
- (f = (s = c.component.getInput(l)) == null ? void 0 : s.setValue) == null || f.call(s, l === e);
123
- const r = { ...n.modelValue || {} };
124
- r[o] = e, V("update:modelValue", r, e), v.value !== g.U && (v.value = g.U);
125
- } else
126
- Object.prototype.hasOwnProperty.call(d.value, o) || (d.value[o] = null);
127
- }
128
- }), I("notifyInputGroupStatus", (e, t) => {
129
- var u, s;
130
- if (a.value[e]) {
131
- const f = e, r = t;
132
- d.value[f] = r;
133
- for (const p of a.value[f])
134
- (s = (u = c.component.getInput(p)) == null ? void 0 : u.setValue) == null || s.call(u, p === r);
135
- const l = { ...n.modelValue || {} };
136
- l[f] = r, V("update:modelValue", l, r ?? void 0), v.value !== g.U && (v.value = g.U);
137
- return;
138
- }
139
- v.value !== g.U && (v.value = g.U);
140
- const o = {
141
- ...n.modelValue,
142
- [e]: t
143
- };
144
- V("update:modelValue", o, e);
145
- });
146
- const O = () => {
147
- const e = {};
148
- if (!i.value) return e;
149
- i.value.forEach((t) => {
150
- var u, s;
151
- const o = c.component.getInput(t);
152
- o && ((u = o.getInputType) == null ? void 0 : u.call(o)) !== "radio" && (e[t] = (s = o.getValue) == null ? void 0 : s.call(o));
153
- });
154
- for (const [t, o] of Object.entries(a.value)) {
155
- let u = d.value[t] ?? null;
156
- u && !o.includes(u) && (u = null), e[t] = u;
157
- }
158
- return e;
159
- }, M = (e) => {
160
- if (!(!e || typeof e != "object")) {
161
- Object.keys(e).forEach((t) => {
162
- var o, u;
163
- if (i.value.includes(t)) {
164
- const s = e[t];
165
- (u = (o = c.component.getInput(t)) == null ? void 0 : o.setValue) == null || u.call(o, s);
166
- }
167
- });
168
- for (const [t, o] of Object.entries(a.value)) {
169
- if (!Object.prototype.hasOwnProperty.call(e, t)) continue;
170
- const u = e[t];
171
- o.forEach((s) => {
172
- var l;
173
- const f = c.component.getInput(s);
174
- if (!f) return;
175
- const r = u === s;
176
- (l = f.setValue) == null || l.call(f, r);
177
- }), d.value[t] = u ?? null;
178
- }
179
- }
180
- }, S = () => {
181
- D.component.inputGroupList[m] && D.component.inputGroupList[m].isHisonvueComponent && console.warn(`[Hisonvue] The input group ID is at risk of being duplicated. ${m}`), B(y, () => {
182
- j(), setTimeout(S);
183
- }), G.value && (b.value = {
184
- isHisonvueComponent: !0,
185
- getId: () => m,
186
- getType: () => "inputGroup",
187
- clear: (e = !0) => {
188
- i.value.forEach((t) => {
189
- const o = c.component.getInput(t);
190
- o && o.setValue(null);
191
- }), e && (v.value = g.C);
192
- },
193
- getDataModel: () => new c.data.DataModel(O()),
194
- setDataModel: (e) => {
195
- if (e.getRowCount() > 0) return M(e.getRow(0));
196
- },
197
- getDataObject: () => O(),
198
- setDataObject: (e) => M(e),
199
- load: (e) => {
200
- if (e && e.getIsDataModel && e.getIsDataModel()) {
201
- const t = e;
202
- if (t.getColumnCount() === 0 || t.getRowCount() === 0) return;
203
- M(t.getRow(0));
204
- } else e && typeof e == "object" && M(e);
205
- },
206
- getStatus: () => v.value,
207
- setStatus: (e) => {
208
- v.value = g[e];
209
- },
210
- isModified: () => {
211
- for (const e of i.value) {
212
- const t = c.component.getInput(e);
213
- if (t && t.isModified()) return !0;
214
- }
215
- return !1;
216
- },
217
- initModified: () => {
218
- i.value.forEach((e) => {
219
- const t = c.component.getInput(e);
220
- t && t.setModified(!1);
221
- });
222
- },
223
- checkRequired: () => {
224
- var e, t;
225
- for (const o of i.value) {
226
- const u = c.component.getInput(o);
227
- if ((e = u == null ? void 0 : u.getRequired) != null && e.call(u) && !((t = u.getValue) != null && t.call(u)))
228
- return u;
229
- }
230
- return null;
231
- },
232
- getEditMode: () => E.value,
233
- setEditMode: (e) => {
234
- E.value = e, i.value.forEach((t) => {
235
- const o = c.component.getInput(t);
236
- o && o.setEditMode(e);
237
- });
238
- },
239
- focus: (e) => {
240
- var t;
241
- if (e) return (t = c.component.getInput(e)) == null ? void 0 : t.focus();
242
- for (const o of i.value) {
243
- const u = c.component.getInput(o);
244
- if (u && u.getEditMode() === C.editable)
245
- return u.focus();
246
- }
247
- },
248
- reload: () => w(y)
249
- }, D.component.inputGroupList[m] = b.value, V("mounted", b.value));
250
- }, j = () => {
251
- x(y), delete D.component.inputGroupList[m], i.value = [];
252
- };
253
- return T(S), $(j), _(() => n.modelValue, (e) => {
254
- M(e);
255
- }, { deep: !0 }), _(() => n.modelValue, (e) => {
256
- M(e);
257
- }, { deep: !0 }), _(() => n.editMode, (e) => {
258
- e && e !== E.value && (E.value = e, i.value.forEach((t) => {
259
- var o, u;
260
- return (u = (o = c.component.getInput(t)) == null ? void 0 : o.setEditMode) == null ? void 0 : u.call(o, E.value);
261
- }));
262
- }), _(() => n.status, (e) => {
263
- e && e !== v.value && (v.value = e);
264
- }), {
265
- inputGroupRef: G,
266
- props: n
267
- };
268
- }
269
- }), J = {
270
- ref: "inputGroupRef",
271
- class: "hison-data-group"
272
- };
273
- function K(n, V, G, b, m, y) {
274
- return L(), H("div", J, [
275
- q(n.$slots, "default")
276
- ], 512);
277
- }
278
- const Z = /* @__PURE__ */ W(F, [["render", K]]);
279
- export {
280
- Z as default
281
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),n=require("./index-DcB16odB.js"),G=require("./_plugin-vue_export-helper-BHFhmbuH.js"),I={id:{type:String,required:!1},editMode:{type:String,required:!1,validator:l=>l==null||n.EDIT_MODE_VALUES.includes(l)},status:{type:String,required:!1,default:n.DataStatus.R,validator:l=>n.DATA_STATUS_VALUES.includes(l)},modelValue:{type:Object,default:()=>({})}},O=s.defineComponent({name:"HInputGroup",props:I,emits:["update:modelValue","mounted"],setup(l,{emit:m}){const b=s.ref(null),S=s.ref(null),h=l.id??n.getUUID(),V=`hinputGroup:${h}`,D=s.ref(l.editMode??n.EditMode.editable),g=s.ref(l.status??n.DataStatus.R),f=s.ref([]),r=s.ref({}),p=s.ref({});s.provide("registerToInputGroup",e=>{var t,o,u,i,d;if(!f.value.includes(e)){f.value.push(e),f.value.sort((v,C)=>v.localeCompare(C));const c=l.modelValue??{};c&&Object.prototype.hasOwnProperty.call(c,e)&&((o=(t=n.hison.component.getInput(e))==null?void 0:t.setValue)==null||o.call(t,c[e]));const a=n.hison.component.getInput(e);if(((u=a==null?void 0:a.getInputType)==null?void 0:u.call(a))==="radio"){const v=((i=a.getName)==null?void 0:i.call(a))||e;r.value[v]||(r.value[v]=[]),r.value[v].includes(e)||r.value[v].push(e),(d=a.getValue)!=null&&d.call(a)?p.value[v]=e:Object.prototype.hasOwnProperty.call(p.value,v)||(p.value[v]=null)}}}),s.provide("radioMembershipChanged",(e,t,o,u)=>{var i,d;if(t!==o){if(t&&r.value[t]){if(r.value[t]=r.value[t].filter(c=>c!==e),p.value[t]===e){p.value[t]=null;const c={...l.modelValue||{}};c[t]=null,m("update:modelValue",c,e)}r.value[t].length===0&&(delete r.value[t],delete p.value[t])}if(r.value[o]||(r.value[o]=[]),r.value[o].includes(e)||r.value[o].push(e),u){p.value[o]=e;for(const a of r.value[o])(d=(i=n.hison.component.getInput(a))==null?void 0:i.setValue)==null||d.call(i,a===e);const c={...l.modelValue||{}};c[o]=e,m("update:modelValue",c,e),g.value!==n.DataStatus.U&&(g.value=n.DataStatus.U)}else Object.prototype.hasOwnProperty.call(p.value,o)||(p.value[o]=null)}}),s.provide("notifyInputGroupStatus",(e,t)=>{var u,i;if(r.value[e]){const d=e,c=t;p.value[d]=c;for(const v of r.value[d])(i=(u=n.hison.component.getInput(v))==null?void 0:u.setValue)==null||i.call(u,v===c);const a={...l.modelValue||{}};a[d]=c,m("update:modelValue",a,c??void 0),g.value!==n.DataStatus.U&&(g.value=n.DataStatus.U);return}g.value!==n.DataStatus.U&&(g.value=n.DataStatus.U);const o={...l.modelValue,[e]:t};m("update:modelValue",o,e)});const y=()=>{const e={};if(!f.value)return e;f.value.forEach(t=>{var u,i;const o=n.hison.component.getInput(t);o&&((u=o.getInputType)==null?void 0:u.call(o))!=="radio"&&(e[t]=(i=o.getValue)==null?void 0:i.call(o))});for(const[t,o]of Object.entries(r.value)){let u=p.value[t]??null;u&&!o.includes(u)&&(u=null),e[t]=u}return e},M=e=>{if(!(!e||typeof e!="object")){Object.keys(e).forEach(t=>{var o,u;if(f.value.includes(t)){const i=e[t];(u=(o=n.hison.component.getInput(t))==null?void 0:o.setValue)==null||u.call(o,i)}});for(const[t,o]of Object.entries(r.value)){if(!Object.prototype.hasOwnProperty.call(e,t))continue;const u=e[t];o.forEach(i=>{var a;const d=n.hison.component.getInput(i);if(!d)return;const c=u===i;(a=d.setValue)==null||a.call(d,c)}),p.value[t]=u??null}}},E=()=>{n.hisonCloser.component.inputGroupList[h]&&n.hisonCloser.component.inputGroupList[h].isHisonvueComponent&&console.warn(`[Hisonvue] The input group ID is at risk of being duplicated. ${h}`),n.registerReloadable(V,()=>{_(),setTimeout(E)}),b.value&&(S.value={isHisonvueComponent:!0,getId:()=>h,getType:()=>"inputGroup",clear:(e=!0)=>{f.value.forEach(t=>{const o=n.hison.component.getInput(t);o&&o.setValue(null)}),e&&(g.value=n.DataStatus.C)},getDataModel:()=>new n.hison.data.DataModel(y()),setDataModel:e=>{if(e.getRowCount()>0)return M(e.getRow(0))},getDataObject:()=>y(),setDataObject:e=>M(e),load:e=>{if(e&&e.getIsDataModel&&e.getIsDataModel()){const t=e;if(t.getColumnCount()===0||t.getRowCount()===0)return;M(t.getRow(0))}else e&&typeof e=="object"&&M(e)},getStatus:()=>g.value,setStatus:e=>{g.value=n.DataStatus[e]},isModified:()=>{for(const e of f.value){const t=n.hison.component.getInput(e);if(t&&t.isModified())return!0}return!1},initModified:()=>{f.value.forEach(e=>{const t=n.hison.component.getInput(e);t&&t.setModified(!1)})},checkRequired:()=>{var e,t;for(const o of f.value){const u=n.hison.component.getInput(o);if((e=u==null?void 0:u.getRequired)!=null&&e.call(u)&&!((t=u.getValue)!=null&&t.call(u)))return u}return null},getEditMode:()=>D.value,setEditMode:e=>{D.value=e,f.value.forEach(t=>{const o=n.hison.component.getInput(t);o&&o.setEditMode(e)})},focus:e=>{var t;if(e)return(t=n.hison.component.getInput(e))==null?void 0:t.focus();for(const o of f.value){const u=n.hison.component.getInput(o);if(u&&u.getEditMode()===n.EditMode.editable)return u.focus()}},reload:()=>n.reloadHisonComponent(V)},n.hisonCloser.component.inputGroupList[h]=S.value,m("mounted",S.value))},_=()=>{n.unregisterReloadable(V),delete n.hisonCloser.component.inputGroupList[h],f.value=[]};return s.onMounted(E),s.onBeforeUnmount(_),s.watch(()=>l.modelValue,e=>{M(e)},{deep:!0}),s.watch(()=>l.modelValue,e=>{M(e)},{deep:!0}),s.watch(()=>l.editMode,e=>{e&&e!==D.value&&(D.value=e,f.value.forEach(t=>{var o,u;return(u=(o=n.hison.component.getInput(t))==null?void 0:o.setEditMode)==null?void 0:u.call(o,D.value)}))}),s.watch(()=>l.status,e=>{e&&e!==g.value&&(g.value=e)}),{inputGroupRef:b,props:l}}}),j={ref:"inputGroupRef",class:"hison-data-group"};function R(l,m,b,S,h,V){return s.openBlock(),s.createElementBlock("div",j,[s.renderSlot(l.$slots,"default")],512)}const U=G._export_sfc(O,[["render",R]]);exports.default=U;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./index-DcB16odB.js"),M=require("./setButtonCssEvent-CTLQPvWj.js"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.js"),ce={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},text:{type:String,required:!1},href:{type:String,default:null},anchorAttrs:{type:Object,default:()=>({})},fontBold:{type:Boolean,default:!1},fontItalic:{type:Boolean,default:!1},fontThruline:{type:Boolean,default:!1},fontUnderline:{type:Boolean,default:!1},textAlign:{type:String,default:null,validator:l=>l==null||a.TEXT_ALIGN_VALUES.includes(l)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:a.BackgroundType.empty,validator:l=>a.BACKGROUND_TYPE_VALUES.includes(l)},toggleTarget:{type:String,default:null},translate:{type:Boolean,default:!0},tabIndex:{type:[Number,String],default:null,validator:l=>l===null||l===""||!isNaN(+l)&&isFinite(+l)}},de=t.defineComponent({name:"HLabel",props:ce,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(l,{emit:o,slots:G}){const v=t.ref(null),g=t.ref(null),r=l.id?l.id:a.getUUID(),s=`hlabel:${r}`,F=a.useDevice(),U=t.useSlots(),T=t.ref(l.visible),c=t.ref(l.title||""),y=t.ref(l.textAlign??a.TextAlign.left),J=t.computed(()=>({textAlign:y.value})),d=t.ref(l.href??null),u=t.ref({...l.anchorAttrs||{}}),h=t.computed(()=>!!(d.value&&String(d.value).trim())),X=t.computed(()=>{const e={...u.value};return c.value&&e.title==null&&(e.title=c.value),e.href=d.value||void 0,e.download===!0&&(e.download=""),String(e.target||"")==="_blank"&&(e.rel==null||String(e.rel).trim()==="")&&(e.rel="noopener noreferrer"),e}),N=t.computed(()=>U.default?U.default():[]),H=t.computed(()=>N.value.length>0&&N.value.every(e=>e.type===t.Text)),A=t.computed(()=>!!U.default&&!H.value),Y=t.computed(()=>A.value?"div":h.value?"a":"span"),C=t.ref(l.fontBold),Q=t.computed(()=>{if(C.value)return"hison-font-bold"}),p=t.ref(l.fontItalic),W=t.computed(()=>{if(p.value)return"hison-font-italic"}),k=t.ref(l.fontThruline),Z=t.computed(()=>{if(k.value)return"hison-font-thruline-important"}),B=t.ref(l.fontUnderline),_=t.computed(()=>{if(B.value)return"hison-font-underline-important"}),w=t.ref(l.border??!1),S=t.ref(l.backgroundType||a.BackgroundType.empty),ee=t.computed(()=>T.value?"":"hison-display-none"),te=t.computed(()=>w.value?"hison-border":""),le=t.computed(()=>{switch(S.value){case a.BackgroundType.empty:return"hison-bg-empty";case a.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),i=t.ref(l.text||"");t.onMounted(()=>{if(H.value){const e=N.value.map(n=>String(n.children??"")).join("");i.value=e}});const f=t.ref(l.toggleTarget??null),m=t.computed(()=>!!(f.value&&String(f.value).trim())),b=t.ref(l.translate),ne=t.computed(()=>b.value===!1?"notranslate":""),ae=t.computed(()=>b.value===!1?"no":void 0),I=t.ref(l.tabIndex!==null&&l.tabIndex!==""?Number(l.tabIndex):null),E=t.ref([]),L=()=>{E.value=a.extractResponsiveClasses(a.toClassString(l.class)||"",F.value),a.addComponentNameToClass(E.value,"size",a.hisonCloser.componentStyle.size),a.addComponentNameToClass(E.value,"color","primary")},q=()=>{var O,D,R,j,P,z;if(!m.value)return;const e=String(f.value),n=(O=a.hisonCloser.component.inputList)==null?void 0:O[e];if(!n||!n.isHisonvueComponent)return;const x=(D=n.getInputType)==null?void 0:D.call(n),ue=(R=n.getEditMode)==null?void 0:R.call(n);if(x!=="checkbox"&&x!=="radio"||ue!=="editable")return;const re=!!((j=n.getValue)!=null&&j.call(n));x==="checkbox"?(P=n.setValue)==null||P.call(n,!re):(z=n.setValue)==null||z.call(n,!0)},oe=e=>{m.value&&q(),o("click",e,g.value)},se=e=>{if(m.value&&q(),!h.value)return;const n=v.value;n&&n.tagName==="A"&&n.click()},$=(e=!0)=>{const n=v.value;if(n){if(M.removeButtonCssEvent(n),m.value){M.addButtonCssEvent(n);return}e&&h.value&&n.tagName==="A"&&M.addButtonCssEvent(n)}},V=()=>{a.hisonCloser.component.labelList[r]&&a.hisonCloser.component.labelList[r].isHisonvueComponent&&console.warn(`[Hisonvue] The label ID is at risk of being duplicated. ${r}`),a.registerReloadable(s,()=>{K(),t.nextTick(V)}),L(),t.nextTick(()=>$(!0)),g.value={isHisonvueComponent:!0,getId:()=>r,getType:()=>"label",isVisible:()=>T.value,setVisible:e=>{T.value=e},getTitle:()=>c.value,setTitle:e=>{c.value=e},getText:()=>A.value?"":i.value,setText:e=>{A.value||(i.value=e)},getHref:()=>d.value??"",setHref:e=>{d.value=e??null},getAnchorAttrs:()=>({...u.value}),replaceAnchorAttrs:e=>{u.value={...e}},mergeAnchorAttrs:e=>{u.value={...u.value,...e}},setAnchorAttr:(e,n)=>{u.value={...u.value,[e]:n}},removeAnchorAttr:e=>{const n={...u.value};delete n[e],u.value=n},isFontBold:()=>C.value,setFontBold:e=>{C.value=e},isFontItalic:()=>p.value,setFontItalic:e=>{p.value=e},isFontThruline:()=>k.value,setFontThruline:e=>{k.value=e},isFontUnderline:()=>B.value,setFontUnderline:e=>{B.value=e},getTextAlign:()=>y.value,setTextAlign:e=>{(e===a.TextAlign.left||e===a.TextAlign.center||e===a.TextAlign.right)&&(y.value=e)},isBorder:()=>w.value,setBorder:e=>{w.value=e},getBackgroundType:()=>S.value,setBackgroundType:e=>{S.value=e},getToggleTarget:()=>f.value,setToggleTarget:e=>{f.value=e},isTranslate:()=>b.value,setTranslate:e=>{b.value=e},reload:()=>a.reloadHisonComponent(s),getTabIndex:()=>I.value,setTabIndex:e=>{I.value=e!=null?Number(e):null},focus:()=>{const e=v.value;e&&h.value&&e.tagName==="A"&&e.focus()}},a.hisonCloser.component.labelList[r]=g.value,o("mounted",g.value)},K=()=>{a.unregisterReloadable(s);const e=v.value;e&&M.removeButtonCssEvent(e),delete a.hisonCloser.component.labelList[r]};return t.onMounted(V),t.onBeforeUnmount(K),t.watch(F,e=>{L(),o("responsive-change",e)}),t.watch(h,e=>{t.nextTick(()=>$(e))},{flush:"post"}),t.watch(m,e=>{t.nextTick(()=>$(e))},{flush:"post"}),t.watch(()=>l.visible,e=>{const n=!!e;n!==T.value&&(T.value=n)}),t.watch(()=>l.title,e=>{const n=e??"";n!==c.value&&(c.value=n)}),t.watch(()=>l.text,e=>{if(!A.value){const n=e??"";n!==i.value&&(i.value=n)}}),t.watch(N,e=>{if(H.value){const n=e.map(x=>String(x.children??"")).join("");n!==i.value&&(i.value=n)}}),t.watch(()=>l.href,e=>{const n=e??null;n!==d.value&&(d.value=n)}),t.watch(()=>l.anchorAttrs,e=>{const n={...e||{}};JSON.stringify(n)!==JSON.stringify(u.value)&&(u.value=n)}),t.watch(()=>l.fontBold,e=>{const n=!!e;n!==C.value&&(C.value=n)}),t.watch(()=>l.fontItalic,e=>{const n=!!e;n!==p.value&&(p.value=n)}),t.watch(()=>l.fontThruline,e=>{const n=!!e;n!==k.value&&(k.value=n)}),t.watch(()=>l.fontUnderline,e=>{const n=!!e;n!==B.value&&(B.value=n)}),t.watch(()=>l.textAlign,e=>{e&&e!==y.value&&(e===a.TextAlign.left||e===a.TextAlign.center||e===a.TextAlign.right)&&(y.value=e)}),t.watch(()=>l.border,e=>{const n=!!e;n!==w.value&&(w.value=n)}),t.watch(()=>l.backgroundType,e=>{e&&e!==S.value&&(S.value=e)}),t.watch(()=>l.toggleTarget,e=>{const n=e??null;n!==f.value&&(f.value=n)}),t.watch(()=>l.translate,e=>{const n=!!e;n!==b.value&&(b.value=n)}),t.watch(()=>l.tabIndex,e=>{const n=e===null||e===""?null:Number(e);n!==I.value&&(I.value=n)}),t.watch(()=>l.class,()=>{L()}),{labelRef:v,labelMethods:t.computed(()=>t.unref(g)),props:l,title:c,hasHref:h,hasToggleTarget:m,hasElementSlot:A,renderTag:Y,internalText:i,computedAnchorAttrs:X,visibleClass:ee,fontBoldClass:Q,fontItalicClass:W,fontThrulineClass:Z,fontUnderlineClass:_,textAlignStyle:J,translateAttr:ae,translateClass:ne,borderClass:te,backgroundTypeClass:le,responsiveClassList:E,tabIndex:I,onClick:oe,onKeyActivate:se}}}),fe={key:2,class:"hison-label-text"};function ve(l,o,G,v,g,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...l.responsiveClassList,l.visibleClass])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.renderTag),t.mergeProps({ref:"labelRef",class:["hison-label",l.hasHref?"hison-label-link":null,l.hasToggleTarget?"hison-label-has-toggle-target":null,l.fontBoldClass,l.fontItalicClass,l.fontThrulineClass,l.fontUnderlineClass,l.borderClass,l.backgroundTypeClass,l.translateClass],style:[l.textAlignStyle,l.props.style],title:l.title||void 0,tabindex:l.tabIndex??void 0,translate:l.translateAttr},l.renderTag==="a"?l.computedAnchorAttrs:void 0,{onClick:l.onClick,onMousedown:o[0]||(o[0]=s=>l.$emit("mousedown",s,l.labelMethods)),onMouseup:o[1]||(o[1]=s=>l.$emit("mouseup",s,l.labelMethods)),onMouseover:o[2]||(o[2]=s=>l.$emit("mouseover",s,l.labelMethods)),onMouseout:o[3]||(o[3]=s=>l.$emit("mouseout",s,l.labelMethods)),onKeydown:[t.withKeys(t.withModifiers(l.onKeyActivate,["prevent"]),["enter"]),t.withKeys(t.withModifiers(l.onKeyActivate,["prevent"]),["space"])]}),{default:t.withCtx(()=>[l.hasElementSlot?t.renderSlot(l.$slots,"default",{key:0}):l.hasHref?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(l.internalText),1)],64)):(t.openBlock(),t.createElementBlock("span",fe,t.toDisplayString(l.internalText),1))]),_:3},16,["class","style","title","tabindex","translate","onClick","onKeydown"]))],2)}const ge=ie._export_sfc(de,[["render",ve]]);exports.default=ge;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("./index-DcB16odB.js"),V=require("./scrollManager-CEEWQwoK.js"),A=require("./_plugin-vue_export-helper-BHFhmbuH.js"),H={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:1500},position:{type:String,default:t.ScreenPosition.middleCenter,validator:s=>t.SCREEN_POSITION_VALUES.includes(s)},overlayStyle:{type:[String,Object,Array],required:!1},timeoutMs:{type:Number,default:0},spinnerType:{type:String,default:"ring",validator:s=>["ring","dots","bars","pulse"].includes(s)}},O=e.defineComponent({name:"HSpinner",props:H,inheritAttrs:!1,emits:["mounted","responsive-change","open","close","toggle"],setup(s,{emit:o}){const l=s.id||t.getUUID(),y=`hspinner:${l}`,k=t.useDevice(),N=e.ref(null),I=e.ref(null),i=e.ref(s.visible),c=e.ref(s.zIndex??1400),m=e.ref(s.position),f=e.ref(s.overlayStyle),p=e.ref(s.timeoutMs??0),u=e.ref(s.spinnerType),B=e.computed(()=>i.value?"":"hison-display-none"),L=e.computed(()=>`hison-spinner-type-${u.value}`),h=e.ref([]),C=()=>{h.value=t.extractResponsiveClasses(t.toClassString(s.class)||"",k.value),t.addComponentNameToClass(h.value,"size",t.hisonCloser.componentStyle.size),t.addComponentNameToClass(h.value,"color","primary")},R=e.computed(()=>{const n={zIndex:c.value};switch(n.left="",n.right="",n.top="",n.bottom="",n.transform="none",m.value){case t.ScreenPosition.topLeft:n.left="5%",n.top="5%";break;case t.ScreenPosition.topCenter:n.left="50%",n.top="5%",n.transform="translateX(-50%)";break;case t.ScreenPosition.topRight:n.right="5%",n.top="5%";break;case t.ScreenPosition.middleLeft:n.left="5%",n.top="50%",n.transform="translateY(-50%)";break;case t.ScreenPosition.middleCenter:n.left="50%",n.top="50%",n.transform="translate(-50%, -50%)";break;case t.ScreenPosition.middleRight:n.right="5%",n.top="50%",n.transform="translateY(-50%)";break;case t.ScreenPosition.bottomLeft:n.left="5%",n.bottom="5%";break;case t.ScreenPosition.bottomCenter:n.left="50%",n.bottom="5%",n.transform="translateX(-50%)";break;case t.ScreenPosition.bottomRight:n.right="5%",n.bottom="5%";break}return n}),M=e.computed(()=>{const r={zIndex:(c.value??1400)-1},d=f.value;return d?Array.isArray(d)?[{...r},...d]:typeof d=="string"?[r,d]:{...r,...d}:r});let g=null;const T=()=>{g!=null&&(clearTimeout(g),g=null)},b=()=>{T(),p.value>0&&(g=window.setTimeout(()=>{v()},p.value))},w=()=>V.acquireScrollLock(l),E=()=>V.releaseScrollLock(l),S=async()=>{i.value||(i.value=!0,w(),await e.nextTick(),b(),o("open",e.unref(a)))},v=async()=>{if(i.value)try{T()}finally{i.value=!1,E(),o("close",e.unref(a))}},q=async()=>{i.value?await v():await S(),o("toggle",e.unref(a))},a=e.ref(null),z=()=>{t.hisonCloser.component.spinnerList[l]&&t.hisonCloser.component.spinnerList[l].isHisonvueComponent&&console.warn(`[Hisonvue] The spinner ID is at risk of being duplicated. ${l}`),t.registerReloadable(y,()=>{P(),e.nextTick(z)}),C(),i.value&&(w(),b()),a.value={isHisonvueComponent:!0,getId:()=>l,getType:()=>"spinner",isVisible:()=>i.value,open:S,close:v,toggle:q,setVisible:n=>n?S():v(),getZIndex:()=>c.value,setZIndex:n=>{c.value=n},getPosition:()=>m.value,setPosition:n=>{m.value=n},getTimeout:()=>p.value,setTimeout:n=>{p.value=Math.max(0,Number(n)||0),i.value&&b()},getSpinnerType:()=>u.value,setSpinnerType:n=>{u.value=n},getOverlayStyle:()=>f.value,setOverlayStyle:n=>{f.value=n},reload:()=>t.reloadHisonComponent(y)},t.hisonCloser.component.spinnerList[l]=a.value,o("mounted",a.value)},P=()=>{t.unregisterReloadable(y),delete t.hisonCloser.component.spinnerList[l],T(),i.value&&E()};return e.onMounted(z),e.onBeforeUnmount(P),e.watch(k,n=>{C(),o("responsive-change",n)}),e.watch(()=>s.visible,n=>{const r=!!n;r!==i.value&&(r?S():v())}),e.watch(()=>s.zIndex,n=>{const r=Number(n??1400);r!==c.value&&(c.value=r)}),e.watch(()=>s.position,n=>{n&&n!==m.value&&(m.value=n)}),e.watch(()=>s.overlayStyle,n=>{n!==f.value&&(f.value=n)}),e.watch(()=>s.timeoutMs,n=>{const r=Math.max(0,Number(n)||0);r!==p.value&&(p.value=r,i.value&&b())}),e.watch(()=>s.spinnerType,n=>{n&&n!==u.value&&(u.value=n)}),e.watch(()=>s.class,()=>{C()}),{id:l,props:s,wrapperRef:N,spinnerRef:I,visible:i,visibleClass:B,responsiveClassList:h,overlayStyleWithZ:M,wrapperStyle:R,spinnerType:u,spinnerTypeClass:L,spinnerMethods:e.computed(()=>e.unref(a))}}}),$={key:0,class:"hison-spinner-ring"},j={key:1,class:"hison-spinner-dots"},U={key:2,class:"hison-spinner-bars"},Z={key:3,class:"hison-spinner-pulse"};function x(s,o,l,y,k,N){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-layer-host",s.visibleClass])},[s.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hison-spinner-overlay",style:e.normalizeStyle(s.overlayStyleWithZ)},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"wrapperRef",class:e.normalizeClass(["hison-spinner-wrapper",...s.responsiveClassList]),style:e.normalizeStyle(s.wrapperStyle)},[e.createElementVNode("div",{ref:"spinnerRef",class:e.normalizeClass(["hison-spinner",s.spinnerTypeClass]),style:e.normalizeStyle(s.props.style),role:"status","aria-live":"polite","aria-busy":"true"},[e.renderSlot(s.$slots,"spinner",{spinnerEl:s.spinnerRef,spinner:s.spinnerMethods,type:s.spinnerType},()=>[s.spinnerType==="ring"?(e.openBlock(),e.createElementBlock("div",$,o[0]||(o[0]=[e.createStaticVNode('<span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span><span class="hison-spinner-ring-seg"></span>',7)]))):s.spinnerType==="dots"?(e.openBlock(),e.createElementBlock("div",j,o[1]||(o[1]=[e.createElementVNode("span",{class:"hison-spinner-dot"},null,-1),e.createElementVNode("span",{class:"hison-spinner-dot"},null,-1),e.createElementVNode("span",{class:"hison-spinner-dot"},null,-1)]))):s.spinnerType==="bars"?(e.openBlock(),e.createElementBlock("div",U,o[2]||(o[2]=[e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1),e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1),e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1),e.createElementVNode("span",{class:"hison-spinner-bar"},null,-1)]))):(e.openBlock(),e.createElementBlock("div",Z,o[3]||(o[3]=[e.createElementVNode("span",{class:"hison-spinner-pulse-span"},null,-1)])))])],6)],6)],2)}const D=A._export_sfc(O,[["render",x]]);exports.default=D;