hisonvue 1.0.0
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/LICENSE +21 -0
- package/README.md +248 -0
- package/dist/HAccordion-CPtgQUK0.js +1 -0
- package/dist/HAccordion-ll-4cIAw.mjs +262 -0
- package/dist/HBaggie-D6omQoFh.js +1 -0
- package/dist/HBaggie-D_7mEiuV.mjs +283 -0
- package/dist/HBanner-DmcMOFqS.mjs +420 -0
- package/dist/HBanner-Io4SdGGs.js +1 -0
- package/dist/HButton-DAVuDmOQ.js +1 -0
- package/dist/HButton-DAriO81x.mjs +256 -0
- package/dist/HCalendar-DKwGatUk.js +2 -0
- package/dist/HCalendar-w18iIB90.mjs +3387 -0
- package/dist/HCaption-6CbSqRA7.js +1 -0
- package/dist/HCaption-DwsXHDNK.mjs +275 -0
- package/dist/HChart-C86JXUyW.js +1 -0
- package/dist/HChart-CcArHFr0.mjs +179 -0
- package/dist/HDrawer-DG1O42iF.mjs +439 -0
- package/dist/HDrawer-U5VC_okK.js +1 -0
- package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
- package/dist/HDropdown-D4RAGmjE.js +1 -0
- package/dist/HFileset-BGuP9O4l.mjs +578 -0
- package/dist/HFileset-CuPR6Hwf.js +2 -0
- package/dist/HGap-BPAdnOQz.js +1 -0
- package/dist/HGap-DzGrfWVt.mjs +233 -0
- package/dist/HGrid-BiIhVCv_.mjs +345 -0
- package/dist/HGrid-C3EV_pgM.js +1 -0
- package/dist/HImagebox-D_DKeCrO.mjs +654 -0
- package/dist/HImagebox-t_UdFjQO.js +2 -0
- package/dist/HInput-BEyJqYkD.mjs +1103 -0
- package/dist/HInput-DMGLY473.js +1 -0
- package/dist/HInputGroup-D37WTYoI.mjs +281 -0
- package/dist/HInputGroup-Dcfr23sZ.js +1 -0
- package/dist/HLabel-B2FOqSiS.mjs +369 -0
- package/dist/HLabel-Dm48mSwn.js +1 -0
- package/dist/HLayout-BbCEm_aO.mjs +196 -0
- package/dist/HLayout-C1e4BZ_K.js +1 -0
- package/dist/HList-CAeYb-hz.mjs +419 -0
- package/dist/HList-eNXmMf27.js +1 -0
- package/dist/HModal-BDBEEpKm.mjs +778 -0
- package/dist/HModal-GODLq3wH.js +1 -0
- package/dist/HNote-CWnUjt3_.mjs +934 -0
- package/dist/HNote-D_Xwu9oL.js +1 -0
- package/dist/HPagination-Db_L9wv-.js +1 -0
- package/dist/HPagination-e5e2a5GS.mjs +496 -0
- package/dist/HParagraph-BRuSeOMU.js +1 -0
- package/dist/HParagraph-DYuB-qjY.mjs +463 -0
- package/dist/HPopup-Brp1FVpm.mjs +431 -0
- package/dist/HPopup-ChkoI3xm.js +1 -0
- package/dist/HSpinner-DDtU9PL_.js +1 -0
- package/dist/HSpinner-DOq2k5kT.mjs +281 -0
- package/dist/HTable-DGFnzD4u.js +1 -0
- package/dist/HTable-GCDP5O_J.mjs +620 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/ar.es-CKau4tBl.js +5 -0
- package/dist/ar.es-XxSuE68c.mjs +57 -0
- package/dist/bg.es-BJ7fu6yy.mjs +57 -0
- package/dist/bg.es-Melqx1M5.js +5 -0
- package/dist/bn.es-CYlBkxc5.mjs +57 -0
- package/dist/bn.es-ClbAZ4WP.js +5 -0
- package/dist/bs.es-KjOcbE96.js +5 -0
- package/dist/bs.es-yMnaKmdi.mjs +57 -0
- package/dist/ca.es-BaGTENcW.js +5 -0
- package/dist/ca.es-DIhlxmQc.mjs +67 -0
- package/dist/cs.es-BN8oxRXQ.mjs +57 -0
- package/dist/cs.es-ChOlHqBr.js +5 -0
- package/dist/da.es-DJB5lAli.mjs +57 -0
- package/dist/da.es-DOFXbf8-.js +5 -0
- package/dist/de.es-DwE82Kaw.js +5 -0
- package/dist/de.es-glb8GeJh.mjs +57 -0
- package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
- package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
- package/dist/el.es-CNrCgzYI.js +5 -0
- package/dist/el.es-_bBZf22h.mjs +76 -0
- package/dist/en.es-CV9nmQGr.mjs +57 -0
- package/dist/en.es-CgL601qd.js +5 -0
- package/dist/es.es-CZjcWK54.mjs +57 -0
- package/dist/es.es-IdFGKY7Q.js +5 -0
- package/dist/et.es-BygWmV3P.js +5 -0
- package/dist/et.es-CjvQAzNF.mjs +57 -0
- package/dist/fa.es-DW_0SmsT.js +5 -0
- package/dist/fa.es-DykeFwDA.mjs +57 -0
- package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
- package/dist/fi.es-pgfJlZ8i.js +5 -0
- package/dist/fr.es-CNKVhFfO.mjs +57 -0
- package/dist/fr.es-OENguFuM.js +5 -0
- package/dist/he.es-bixEnAeH.js +5 -0
- package/dist/he.es-nF4GFhjH.mjs +57 -0
- package/dist/hisonvue.cjs.js +1 -0
- package/dist/hisonvue.css +1 -0
- package/dist/hisonvue.d.ts +19934 -0
- package/dist/hisonvue.es.js +114 -0
- package/dist/hr.es-CkRAP94O.js +5 -0
- package/dist/hr.es-QFfz660j.mjs +57 -0
- package/dist/hu.es-Ck2rE01V.mjs +57 -0
- package/dist/hu.es-DG6HeiQJ.js +5 -0
- package/dist/id.es-D4tPi6wP.js +5 -0
- package/dist/id.es-Je7FEUJ5.mjs +57 -0
- package/dist/index-BmKMHsSZ.js +153 -0
- package/dist/index-DUh7pai4.mjs +19976 -0
- package/dist/is.es-CDFqLYCV.js +5 -0
- package/dist/is.es-bzprHvXI.mjs +57 -0
- package/dist/it.es-BHgrw_C6.js +5 -0
- package/dist/it.es-CJtfqmNS.mjs +57 -0
- package/dist/ja.es-BaiGjqZ6.mjs +57 -0
- package/dist/ja.es-D-lxWwyb.js +5 -0
- package/dist/ka.es-CnnB6q4A.js +5 -0
- package/dist/ka.es-x9QJo_dl.mjs +57 -0
- package/dist/ko.es-6c447eTS.mjs +57 -0
- package/dist/ko.es-b18aaB3V.js +5 -0
- package/dist/lt.es-2twYdvmJ.mjs +57 -0
- package/dist/lt.es-BY9UQ6wZ.js +5 -0
- package/dist/mn.es-BLQRG1uu.mjs +57 -0
- package/dist/mn.es-YFS7gSdf.js +5 -0
- package/dist/nl.es-BEx-4hnj.js +5 -0
- package/dist/nl.es-bB1qWR_S.mjs +57 -0
- package/dist/no.es-BQnRWlWR.js +5 -0
- package/dist/no.es-CWDVXpTf.mjs +57 -0
- package/dist/pl.es-CKCsZ_02.js +5 -0
- package/dist/pl.es-Dzct23w9.mjs +57 -0
- package/dist/pt-br.es-BeBuiitI.mjs +57 -0
- package/dist/pt-br.es-oH7qh6Fd.js +5 -0
- package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
- package/dist/pt-pt.es-DLk5I0ej.js +5 -0
- package/dist/ro.es-DfMVJ30M.mjs +57 -0
- package/dist/ro.es-DgTen1Dh.js +5 -0
- package/dist/ru.es-Bv9UvrBe.mjs +67 -0
- package/dist/ru.es-jGIQfREl.js +5 -0
- package/dist/scrollManager-BGnq4wyt.mjs +14 -0
- package/dist/scrollManager-CEEWQwoK.js +1 -0
- package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
- package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
- package/dist/sk.es-CUOTpLuL.mjs +57 -0
- package/dist/sk.es-D2bhVb26.js +5 -0
- package/dist/sl.es-DeIGgZbR.mjs +57 -0
- package/dist/sl.es-TV8Uraa1.js +5 -0
- package/dist/sq.es-CQJJrZHv.mjs +67 -0
- package/dist/sq.es-Cc65zxbr.js +5 -0
- package/dist/sr.es-CKS0AkiW.mjs +57 -0
- package/dist/sr.es-D5VNA_GW.js +5 -0
- package/dist/sv.es-ChHQRrAe.mjs +57 -0
- package/dist/sv.es-dBeK_DZs.js +5 -0
- package/dist/tr.es-B3v90gVv.mjs +57 -0
- package/dist/tr.es-BUz4S13G.js +5 -0
- package/dist/uk.es-B8uaeLcK.js +5 -0
- package/dist/uk.es-CiR4NnbN.mjs +67 -0
- package/dist/vi.es-2OFMtbQI.js +5 -0
- package/dist/vi.es-DFDi5l7p.mjs +67 -0
- package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
- package/dist/zh-cn.es-fDHCbCIg.js +5 -0
- package/dist/zh-hk.es-COzeh5F8.js +5 -0
- package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
- package/nuxt/module.mjs +39 -0
- package/nuxt/plugin.mjs +21 -0
- package/package.json +53 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { defineComponent as Y, ref as o, computed as S, onMounted as x, onBeforeUnmount as F, watch as p, unref as R, nextTick as q, createElementBlock as y, openBlock as m, normalizeClass as A, createCommentVNode as G, createElementVNode as r, normalizeStyle as $, renderSlot as J, createStaticVNode as K } from "vue";
|
|
2
|
+
import { S as Q, i as l, g as _, u as ee, e as se, t as ne, b as B, h as C, r as te, c as ie, d as ae } from "./index-DUh7pai4.mjs";
|
|
3
|
+
import { a as oe, r as re } from "./scrollManager-BGnq4wyt.mjs";
|
|
4
|
+
import { _ as le } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const pe = {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the spinner instance.
|
|
8
|
+
* - You can later retrieve its methods via `hison.component.getSpinner(id)`
|
|
9
|
+
* - Duplicate `id` values will throw an error at mount time
|
|
10
|
+
*/
|
|
11
|
+
id: { type: String, required: !1 },
|
|
12
|
+
/**
|
|
13
|
+
* Custom class applied to the spinner wrapper scope.
|
|
14
|
+
* - Accepts string/array/object (Vue class binding formats)
|
|
15
|
+
* - You can use responsive tokens such as `hison-col-*`, `hison-size-*`, `hison-color-*`
|
|
16
|
+
* - Processed internally to apply device-specific classes
|
|
17
|
+
*/
|
|
18
|
+
class: {
|
|
19
|
+
type: [String, Array, Object],
|
|
20
|
+
required: !1
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* Inline style(s) for the spinner **box element** (not the overlay nor the fixed wrapper).
|
|
24
|
+
* - Accepts string, object, or array of objects (Vue style binding formats)
|
|
25
|
+
* - Use this for width/height/padding of the spinner container
|
|
26
|
+
*/
|
|
27
|
+
style: {
|
|
28
|
+
type: [String, Object, Array],
|
|
29
|
+
required: !1
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Initial visibility of the spinner.
|
|
33
|
+
* - Runtime visibility is controlled **only** via methods (`open/close/toggle/setVisible`)
|
|
34
|
+
* - Default: `false`
|
|
35
|
+
*/
|
|
36
|
+
visible: { type: Boolean, default: !1 },
|
|
37
|
+
/**
|
|
38
|
+
* Stacking order for this spinner **wrapper** (fixed container).
|
|
39
|
+
* - Applied to `.hison-spinner-wrapper`; the overlay uses `zIndex - 1`
|
|
40
|
+
* - Default: `1500`
|
|
41
|
+
*/
|
|
42
|
+
zIndex: { type: Number, default: 1500 },
|
|
43
|
+
/**
|
|
44
|
+
* On-screen position of the **fixed wrapper** (where the spinner is anchored).
|
|
45
|
+
* - Tokens: 'top-left' | 'top-center' | 'top-right' |
|
|
46
|
+
* 'middle-left' | 'middle-center' | 'middle-right' |
|
|
47
|
+
* 'bottom-left' | 'bottom-center' | 'bottom-right'
|
|
48
|
+
* - Default: `middle-center`
|
|
49
|
+
*/
|
|
50
|
+
position: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: l.middleCenter,
|
|
53
|
+
validator: (s) => Q.includes(s)
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Styles applied to the overlay element.
|
|
57
|
+
* - Overlay is **always rendered** and blocks pointer events behind the spinner
|
|
58
|
+
* - Accepts string/object/array; merged with an internal `{ zIndex: (zIndex - 1) }`
|
|
59
|
+
* - Example: `overlay-style="{ backgroundColor: 'rgba(0,0,0,.25)' }"`
|
|
60
|
+
*/
|
|
61
|
+
overlayStyle: {
|
|
62
|
+
type: [String, Object, Array],
|
|
63
|
+
required: !1
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* Auto-hide timeout in milliseconds.
|
|
67
|
+
* - `0` disables the timeout (spinner stays until closed programmatically)
|
|
68
|
+
* - When > 0, spinner will close automatically after the specified duration
|
|
69
|
+
* - Default: `0`
|
|
70
|
+
*/
|
|
71
|
+
timeoutMs: { type: Number, default: 0 },
|
|
72
|
+
/**
|
|
73
|
+
* Built-in spinner renderer type.
|
|
74
|
+
* - One of: `'ring' | 'dots' | 'bars' | 'pulse'`
|
|
75
|
+
* - Default: `'ring'`
|
|
76
|
+
* - Ignored when a custom `#spinner` slot is provided
|
|
77
|
+
*/
|
|
78
|
+
spinnerType: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: "ring",
|
|
81
|
+
validator: (s) => ["ring", "dots", "bars", "pulse"].includes(s)
|
|
82
|
+
}
|
|
83
|
+
}, ue = Y({
|
|
84
|
+
name: "HSpinner",
|
|
85
|
+
props: pe,
|
|
86
|
+
inheritAttrs: !1,
|
|
87
|
+
emits: ["mounted", "responsive-change", "open", "close", "toggle"],
|
|
88
|
+
setup(s, { emit: n }) {
|
|
89
|
+
const a = s.id || _(), T = `hspinner:${a}`, z = ee(), H = o(null), U = o(null), t = o(s.visible), c = o(s.zIndex ?? 1400), g = o(s.position), b = o(s.overlayStyle), d = o(s.timeoutMs ?? 0), v = o(s.spinnerType), Z = S(() => t.value ? "" : "hison-display-none"), j = S(() => `hison-spinner-type-${v.value}`), k = o([]), N = () => {
|
|
90
|
+
k.value = se(ne(s.class) || "", z.value), B(k.value, "size", C.componentStyle.size), B(k.value, "color", "primary");
|
|
91
|
+
}, D = S(() => {
|
|
92
|
+
const e = { zIndex: c.value };
|
|
93
|
+
switch (e.left = "", e.right = "", e.top = "", e.bottom = "", e.transform = "none", g.value) {
|
|
94
|
+
case l.topLeft:
|
|
95
|
+
e.left = "5%", e.top = "5%";
|
|
96
|
+
break;
|
|
97
|
+
case l.topCenter:
|
|
98
|
+
e.left = "50%", e.top = "5%", e.transform = "translateX(-50%)";
|
|
99
|
+
break;
|
|
100
|
+
case l.topRight:
|
|
101
|
+
e.right = "5%", e.top = "5%";
|
|
102
|
+
break;
|
|
103
|
+
case l.middleLeft:
|
|
104
|
+
e.left = "5%", e.top = "50%", e.transform = "translateY(-50%)";
|
|
105
|
+
break;
|
|
106
|
+
case l.middleCenter:
|
|
107
|
+
e.left = "50%", e.top = "50%", e.transform = "translate(-50%, -50%)";
|
|
108
|
+
break;
|
|
109
|
+
case l.middleRight:
|
|
110
|
+
e.right = "5%", e.top = "50%", e.transform = "translateY(-50%)";
|
|
111
|
+
break;
|
|
112
|
+
case l.bottomLeft:
|
|
113
|
+
e.left = "5%", e.bottom = "5%";
|
|
114
|
+
break;
|
|
115
|
+
case l.bottomCenter:
|
|
116
|
+
e.left = "50%", e.bottom = "5%", e.transform = "translateX(-50%)";
|
|
117
|
+
break;
|
|
118
|
+
case l.bottomRight:
|
|
119
|
+
e.right = "5%", e.bottom = "5%";
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
return e;
|
|
123
|
+
}), W = S(() => {
|
|
124
|
+
const i = { zIndex: (c.value ?? 1400) - 1 }, f = b.value;
|
|
125
|
+
return f ? Array.isArray(f) ? [{ ...i }, ...f] : typeof f == "string" ? [i, f] : { ...i, ...f } : i;
|
|
126
|
+
});
|
|
127
|
+
let I = null;
|
|
128
|
+
const M = () => {
|
|
129
|
+
I != null && (clearTimeout(I), I = null);
|
|
130
|
+
}, w = () => {
|
|
131
|
+
M(), d.value > 0 && (I = window.setTimeout(() => {
|
|
132
|
+
h();
|
|
133
|
+
}, d.value));
|
|
134
|
+
}, O = () => oe(a), E = () => re(a), L = async () => {
|
|
135
|
+
t.value || (t.value = !0, O(), await q(), w(), n("open", R(u)));
|
|
136
|
+
}, h = async () => {
|
|
137
|
+
if (t.value)
|
|
138
|
+
try {
|
|
139
|
+
M();
|
|
140
|
+
} finally {
|
|
141
|
+
t.value = !1, E(), n("close", R(u));
|
|
142
|
+
}
|
|
143
|
+
}, X = async () => {
|
|
144
|
+
t.value ? await h() : await L(), n("toggle", R(u));
|
|
145
|
+
}, u = o(null), P = () => {
|
|
146
|
+
C.component.spinnerList[a] && C.component.spinnerList[a].isHisonvueComponent && console.warn(`[Hisonvue] The spinner ID is at risk of being duplicated. ${a}`), te(T, () => {
|
|
147
|
+
V(), q(P);
|
|
148
|
+
}), N(), t.value && (O(), w()), u.value = {
|
|
149
|
+
isHisonvueComponent: !0,
|
|
150
|
+
getId: () => a,
|
|
151
|
+
getType: () => "spinner",
|
|
152
|
+
isVisible: () => t.value,
|
|
153
|
+
open: L,
|
|
154
|
+
close: h,
|
|
155
|
+
toggle: X,
|
|
156
|
+
setVisible: (e) => e ? L() : h(),
|
|
157
|
+
getZIndex: () => c.value,
|
|
158
|
+
setZIndex: (e) => {
|
|
159
|
+
c.value = e;
|
|
160
|
+
},
|
|
161
|
+
getPosition: () => g.value,
|
|
162
|
+
setPosition: (e) => {
|
|
163
|
+
g.value = e;
|
|
164
|
+
},
|
|
165
|
+
getTimeout: () => d.value,
|
|
166
|
+
setTimeout: (e) => {
|
|
167
|
+
d.value = Math.max(0, Number(e) || 0), t.value && w();
|
|
168
|
+
},
|
|
169
|
+
getSpinnerType: () => v.value,
|
|
170
|
+
setSpinnerType: (e) => {
|
|
171
|
+
v.value = e;
|
|
172
|
+
},
|
|
173
|
+
getOverlayStyle: () => b.value,
|
|
174
|
+
setOverlayStyle: (e) => {
|
|
175
|
+
b.value = e;
|
|
176
|
+
},
|
|
177
|
+
reload: () => ie(T)
|
|
178
|
+
}, C.component.spinnerList[a] = u.value, n("mounted", u.value);
|
|
179
|
+
}, V = () => {
|
|
180
|
+
ae(T), delete C.component.spinnerList[a], M(), t.value && E();
|
|
181
|
+
};
|
|
182
|
+
return x(P), F(V), p(z, (e) => {
|
|
183
|
+
N(), n("responsive-change", e);
|
|
184
|
+
}), p(() => s.visible, (e) => {
|
|
185
|
+
const i = !!e;
|
|
186
|
+
i !== t.value && (i ? L() : h());
|
|
187
|
+
}), p(() => s.zIndex, (e) => {
|
|
188
|
+
const i = Number(e ?? 1400);
|
|
189
|
+
i !== c.value && (c.value = i);
|
|
190
|
+
}), p(() => s.position, (e) => {
|
|
191
|
+
e && e !== g.value && (g.value = e);
|
|
192
|
+
}), p(() => s.overlayStyle, (e) => {
|
|
193
|
+
e !== b.value && (b.value = e);
|
|
194
|
+
}), p(() => s.timeoutMs, (e) => {
|
|
195
|
+
const i = Math.max(0, Number(e) || 0);
|
|
196
|
+
i !== d.value && (d.value = i, t.value && w());
|
|
197
|
+
}), p(() => s.spinnerType, (e) => {
|
|
198
|
+
e && e !== v.value && (v.value = e);
|
|
199
|
+
}), p(() => s.class, () => {
|
|
200
|
+
N();
|
|
201
|
+
}), {
|
|
202
|
+
id: a,
|
|
203
|
+
props: s,
|
|
204
|
+
wrapperRef: H,
|
|
205
|
+
spinnerRef: U,
|
|
206
|
+
visible: t,
|
|
207
|
+
visibleClass: Z,
|
|
208
|
+
responsiveClassList: k,
|
|
209
|
+
overlayStyleWithZ: W,
|
|
210
|
+
wrapperStyle: D,
|
|
211
|
+
spinnerType: v,
|
|
212
|
+
spinnerTypeClass: j,
|
|
213
|
+
spinnerMethods: S(() => R(u))
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}), ce = {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "hison-spinner-ring"
|
|
219
|
+
}, de = {
|
|
220
|
+
key: 1,
|
|
221
|
+
class: "hison-spinner-dots"
|
|
222
|
+
}, ve = {
|
|
223
|
+
key: 2,
|
|
224
|
+
class: "hison-spinner-bars"
|
|
225
|
+
}, fe = {
|
|
226
|
+
key: 3,
|
|
227
|
+
class: "hison-spinner-pulse"
|
|
228
|
+
};
|
|
229
|
+
function ye(s, n, a, T, z, H) {
|
|
230
|
+
return m(), y("div", {
|
|
231
|
+
class: A(["hison-layer-host", s.visibleClass])
|
|
232
|
+
}, [
|
|
233
|
+
s.visible ? (m(), y("div", {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: "hison-spinner-overlay",
|
|
236
|
+
style: $(s.overlayStyleWithZ)
|
|
237
|
+
}, null, 4)) : G("", !0),
|
|
238
|
+
r("div", {
|
|
239
|
+
ref: "wrapperRef",
|
|
240
|
+
class: A(["hison-spinner-wrapper", ...s.responsiveClassList]),
|
|
241
|
+
style: $(s.wrapperStyle)
|
|
242
|
+
}, [
|
|
243
|
+
r("div", {
|
|
244
|
+
ref: "spinnerRef",
|
|
245
|
+
class: A([
|
|
246
|
+
"hison-spinner",
|
|
247
|
+
s.spinnerTypeClass
|
|
248
|
+
]),
|
|
249
|
+
style: $(s.props.style),
|
|
250
|
+
role: "status",
|
|
251
|
+
"aria-live": "polite",
|
|
252
|
+
"aria-busy": "true"
|
|
253
|
+
}, [
|
|
254
|
+
J(s.$slots, "spinner", {
|
|
255
|
+
spinnerEl: s.spinnerRef,
|
|
256
|
+
spinner: s.spinnerMethods,
|
|
257
|
+
type: s.spinnerType
|
|
258
|
+
}, () => [
|
|
259
|
+
s.spinnerType === "ring" ? (m(), y("div", ce, n[0] || (n[0] = [
|
|
260
|
+
K('<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)
|
|
261
|
+
]))) : s.spinnerType === "dots" ? (m(), y("div", de, n[1] || (n[1] = [
|
|
262
|
+
r("span", { class: "hison-spinner-dot" }, null, -1),
|
|
263
|
+
r("span", { class: "hison-spinner-dot" }, null, -1),
|
|
264
|
+
r("span", { class: "hison-spinner-dot" }, null, -1)
|
|
265
|
+
]))) : s.spinnerType === "bars" ? (m(), y("div", ve, n[2] || (n[2] = [
|
|
266
|
+
r("span", { class: "hison-spinner-bar" }, null, -1),
|
|
267
|
+
r("span", { class: "hison-spinner-bar" }, null, -1),
|
|
268
|
+
r("span", { class: "hison-spinner-bar" }, null, -1),
|
|
269
|
+
r("span", { class: "hison-spinner-bar" }, null, -1)
|
|
270
|
+
]))) : (m(), y("div", fe, n[3] || (n[3] = [
|
|
271
|
+
r("span", { class: "hison-spinner-pulse-span" }, null, -1)
|
|
272
|
+
])))
|
|
273
|
+
])
|
|
274
|
+
], 6)
|
|
275
|
+
], 6)
|
|
276
|
+
], 2);
|
|
277
|
+
}
|
|
278
|
+
const Se = /* @__PURE__ */ le(ue, [["render", ye]]);
|
|
279
|
+
export {
|
|
280
|
+
Se as default
|
|
281
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),l=require("./index-BmKMHsSZ.js"),He=require("./_plugin-vue_export-helper-BHFhmbuH.js"),qe={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},headerCellClass:{type:[String,Array,Object],required:!1},bodyCellClass:{type:[String,Array,Object],required:!1},footerCellClass:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},headerCellStyle:{type:[String,Object,Array],required:!1},bodyCellStyle:{type:[String,Object,Array],required:!1},footerCellStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},caption:{type:String,default:""},striped:{type:String,default:"row"},hoverable:{type:String,default:"row"},border:{type:Boolean,default:!1},headerBorderTop:{type:Boolean,default:!1},headerBorderBottom:{type:Boolean,default:!1},headerBorderLeft:{type:Boolean,default:!1},headerBorderRight:{type:Boolean,default:!1},bodyBorderTop:{type:Boolean,default:!1},bodyBorderBottom:{type:Boolean,default:!1},bodyBorderLeft:{type:Boolean,default:!1},bodyBorderRight:{type:Boolean,default:!1},footerBorderTop:{type:Boolean,default:!1},footerBorderBottom:{type:Boolean,default:!1},footerBorderLeft:{type:Boolean,default:!1},footerBorderRight:{type:Boolean,default:!1},headerTextAlign:{type:String,default:l.TextAlign.center,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},bodyTextAlign:{type:String,default:l.TextAlign.left,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},footerTextAlign:{type:String,default:l.TextAlign.right,validator:o=>o==null||l.TEXT_ALIGN_VALUES.includes(o)},headerVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},bodyVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},footerVerticalAlign:{type:String,default:l.VerticalAlign.middle,validator:o=>l.VERTICAL_ALIGN_VALUES.includes(o)},backgroundType:{type:String,default:l.BackgroundType.empty,validator:o=>l.BACKGROUND_TYPE_VALUES.includes(o)}},$e=t.defineComponent({name:"HTable",props:qe,inheritAttrs:!1,emits:["mounted","responsive-change"],setup(o,{emit:j}){const J=t.ref(null),$=t.ref(null),s=t.ref(null),N=t.ref(null),i=o.id?o.id:l.getUUID(),U=`htable:${i}`,Q=l.useDevice(),z=t.ref(null),f=t.ref(o.visible),ae=t.computed(()=>f.value?"":"hison-display-none"),v=t.ref(o.caption||""),u=t.ref(!!o.border),c=t.ref(o.striped??"row"),d=t.ref(o.hoverable??"row"),h=t.ref(o.backgroundType||l.BackgroundType.empty),y=t.ref(!!o.headerBorderTop),B=t.ref(!!o.headerBorderBottom),g=t.ref(!!o.headerBorderLeft),b=t.ref(!!o.headerBorderRight),m=t.ref(!!o.bodyBorderTop),C=t.ref(!!o.bodyBorderBottom),A=t.ref(!!o.bodyBorderLeft),T=t.ref(!!o.bodyBorderRight),p=t.ref(!!o.footerBorderTop),S=t.ref(!!o.footerBorderBottom),L=t.ref(!!o.footerBorderLeft),w=t.ref(!!o.footerBorderRight),V=t.ref(o.headerTextAlign),R=t.ref(o.bodyTextAlign),k=t.ref(o.footerTextAlign),E=t.ref(o.headerVerticalAlign),H=t.ref(o.bodyVerticalAlign),q=t.ref(o.footerVerticalAlign),se=t.computed(()=>u.value?"hison-border":""),ne=t.computed(()=>{switch(h.value){case l.BackgroundType.empty:return"hison-bg-empty";case l.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),de=t.computed(()=>c.value==="row"?"is-striped-row":c.value==="col"?"is-striped-col":null),ie=t.computed(()=>d.value==="row"?"is-hover-row":d.value==="col"?"is-hover-col":null),ue=t.computed(()=>y.value?"hison-header-border-top":""),ce=t.computed(()=>B.value?"hison-header-border-bottom":""),fe=t.computed(()=>g.value?"hison-header-border-left":""),ve=t.computed(()=>b.value?"hison-header-border-right":""),he=t.computed(()=>m.value?"hison-body-border-top":""),ye=t.computed(()=>C.value?"hison-body-border-bottom":""),Be=t.computed(()=>A.value?"hison-body-border-left":""),ge=t.computed(()=>T.value?"hison-body-border-right":""),be=t.computed(()=>p.value?"hison-footer-border-top":""),me=t.computed(()=>S.value?"hison-footer-border-bottom":""),Ce=t.computed(()=>L.value?"hison-footer-border-left":""),Ae=t.computed(()=>w.value?"hison-footer-border-right":""),I=(e,r)=>{const a=e==="thead"?"hison-thead":e==="tbody"?"hison-tbody":"hison-tfoot";switch(r){case"center":return`${a}-ta-center`;case"right":return`${a}-ta-right`;default:return`${a}-ta-left`}},M=(e,r)=>{const a=e==="thead"?"hison-thead":e==="tbody"?"hison-tbody":"hison-tfoot";switch(r){case"top":return`${a}-valign-top`;case"bottom":return`${a}-valign-bottom`;default:return`${a}-valign-middle`}},Te=t.computed(()=>I("thead",V.value)),pe=t.computed(()=>I("tbody",R.value)),Se=t.computed(()=>I("tfoot",k.value)),Le=t.computed(()=>M("thead",E.value)),we=t.computed(()=>M("tbody",H.value)),Ve=t.computed(()=>M("tfoot",q.value)),F=t.ref([]),G=()=>{F.value=l.extractResponsiveClasses(l.toClassString(o.class)||"",Q.value),l.addComponentNameToClass(F.value,"size",l.hisonCloser.componentStyle.size),l.addComponentNameToClass(F.value,"color","primary")};let D=-1;const W=()=>{const e=s.value;e&&(e.querySelectorAll("td.is-col-hover-cell").forEach(r=>r.classList.remove("is-col-hover-cell")),D=-1)},Re=e=>{const r=s.value;r&&(W(),r.querySelectorAll("tr").forEach(a=>{const n=a.querySelectorAll("td")[e];n&&n.classList.add("is-col-hover-cell")}),D=e)},_=e=>{if(d.value!=="col")return;const r=e.target;if(!r||r.tagName!=="TD")return;const n=r.cellIndex;n!==D&&Re(n)},ee=()=>{d.value==="col"&&W()},ke=e=>e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase()).replace(/^ms-/,"-ms-"),te=e=>e?typeof e=="string"?e.trim().split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(te):Object.entries(e).filter(([,r])=>!!r).map(([r])=>r):[],Ee=e=>{if(!e)return[];if(typeof e=="string"){const r={};return e.split(";").forEach(a=>{const[n,O]=a.split(":");!n||!O||(r[n.trim()]=O.trim())}),[r]}return Array.isArray(e)?e.filter(Boolean):typeof e=="object"?[e]:[]},P=(e,r)=>{const a=Ee(r);if(a.length)for(const n of a)for(const[O,Z]of Object.entries(n)){if(Z==null||Z==="")continue;const le=ke(O);e.style.getPropertyValue(le)||e.style.setProperty(le,String(Z))}},x=(e,r)=>{const a=te(r);a.length&&e.classList.add(...a)},X=()=>{const e=$.value;if(!e)return;Array.from(e.querySelectorAll("th")).forEach(a=>{x(a,o.headerCellClass),P(a,o.headerCellStyle)})},K=()=>{const e=s.value;if(!e)return;Array.from(e.querySelectorAll("td")).forEach(a=>{x(a,o.bodyCellClass),P(a,o.bodyCellStyle)})},Y=()=>{const e=N.value;if(!e)return;Array.from(e.querySelectorAll("td")).forEach(a=>{x(a,o.footerCellClass),P(a,o.footerCellStyle)})},oe=async()=>{l.hisonCloser.component.tableList[i]&&l.hisonCloser.component.tableList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The table ID is at risk of being duplicated. ${i}`),l.registerReloadable(U,()=>{re(),setTimeout(oe)}),G(),s.value&&(s.value.addEventListener("mouseover",_),s.value.addEventListener("mouseleave",ee)),await t.nextTick(),X(),K(),Y(),z.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"table",isVisible:()=>f.value,setVisible:e=>{f.value=e},isBorder:()=>u.value,setBorder:e=>{u.value=e},isHeaderBorderTop:()=>y.value,setHeaderBorderTop:e=>{y.value=e},isHeaderBorderBottom:()=>B.value,setHeaderBorderBottom:e=>{B.value=e},isHeaderBorderLeft:()=>g.value,setHeaderBorderLeft:e=>{g.value=e},isHeaderBorderRight:()=>b.value,setHeaderBorderRight:e=>{b.value=e},isBodyBorderTop:()=>m.value,setBodyBorderTop:e=>{m.value=e},isBodyBorderBottom:()=>C.value,setBodyBorderBottom:e=>{C.value=e},isBodyBorderLeft:()=>A.value,setBodyBorderLeft:e=>{A.value=e},isBodyBorderRight:()=>T.value,setBodyBorderRight:e=>{T.value=e},isFooterBorderTop:()=>p.value,setFooterBorderTop:e=>{p.value=e},isFooterBorderBottom:()=>S.value,setFooterBorderBottom:e=>{S.value=e},isFooterBorderLeft:()=>L.value,setFooterBorderLeft:e=>{L.value=e},isFooterBorderRight:()=>w.value,setFooterBorderRight:e=>{w.value=e},getStriped:()=>c.value,setStriped:e=>{c.value=e},getHoverable:()=>d.value,setHoverable:e=>{d.value=e},getCaption:()=>v.value,setCaption:e=>{v.value=e},getBackgroundType:()=>h.value,setBackgroundType:e=>{h.value=e},getHeaderTextAlign:()=>V.value,setHeaderTextAlign:e=>{V.value=e},getBodyTextAlign:()=>R.value,setBodyTextAlign:e=>{R.value=e},getFooterTextAlign:()=>k.value,setFooterTextAlign:e=>{k.value=e},getHeaderVerticalAlign:()=>E.value,setHeaderVerticalAlign:e=>{E.value=e},getBodyVerticalAlign:()=>H.value,setBodyVerticalAlign:e=>{H.value=e},getFooterVerticalAlign:()=>q.value,setFooterVerticalAlign:e=>{q.value=e},getRowCount:()=>{const e=s.value;return e?e.querySelectorAll(":scope > tr").length:0},getRowElement:e=>{const r=s.value;if(!r||!Number.isInteger(e)||e<0)return null;const a=r.querySelectorAll(":scope > tr");return e>=a.length?null:a[e]},getHeadElement:()=>$.value,getBodyElement:()=>s.value,getFootElement:()=>N.value,reload:()=>l.reloadHisonComponent(U)},l.hisonCloser.component.tableList[i]=z.value,j("mounted",z.value)},re=()=>{s.value&&(s.value.removeEventListener("mouseover",_),s.value.removeEventListener("mouseleave",ee)),l.unregisterReloadable(U),delete l.hisonCloser.component.tableList[i]};return t.onMounted(oe),t.onBeforeUnmount(re),t.watch(Q,e=>{G(),j("responsive-change",e)}),t.watch(()=>o.visible,e=>{const r=!!e;r!==f.value&&(f.value=r)}),t.watch(()=>o.caption,e=>{const r=e??"";r!==v.value&&(v.value=r)}),t.watch(()=>o.border,e=>{const r=!!e;r!==u.value&&(u.value=r)}),t.watch(()=>o.backgroundType,e=>{e&&e!==h.value&&(h.value=e)}),t.watch(()=>o.striped,e=>{const r=e??"row";r!==c.value&&(c.value=r)}),t.watch(()=>o.hoverable,e=>{const r=e??"row";r!==d.value&&(d.value=r)}),t.watch(()=>o.headerBorderTop,e=>{const r=!!e;r!==y.value&&(y.value=r)}),t.watch(()=>o.headerBorderBottom,e=>{const r=!!e;r!==B.value&&(B.value=r)}),t.watch(()=>o.headerBorderLeft,e=>{const r=!!e;r!==g.value&&(g.value=r)}),t.watch(()=>o.headerBorderRight,e=>{const r=!!e;r!==b.value&&(b.value=r)}),t.watch(()=>o.bodyBorderTop,e=>{const r=!!e;r!==m.value&&(m.value=r)}),t.watch(()=>o.bodyBorderBottom,e=>{const r=!!e;r!==C.value&&(C.value=r)}),t.watch(()=>o.bodyBorderLeft,e=>{const r=!!e;r!==A.value&&(A.value=r)}),t.watch(()=>o.bodyBorderRight,e=>{const r=!!e;r!==T.value&&(T.value=r)}),t.watch(()=>o.footerBorderTop,e=>{const r=!!e;r!==p.value&&(p.value=r)}),t.watch(()=>o.footerBorderBottom,e=>{const r=!!e;r!==S.value&&(S.value=r)}),t.watch(()=>o.footerBorderLeft,e=>{const r=!!e;r!==L.value&&(L.value=r)}),t.watch(()=>o.footerBorderRight,e=>{const r=!!e;r!==w.value&&(w.value=r)}),t.watch(()=>o.headerTextAlign,e=>{e&&e!==V.value&&(V.value=e)}),t.watch(()=>o.bodyTextAlign,e=>{e&&e!==R.value&&(R.value=e)}),t.watch(()=>o.footerTextAlign,e=>{e&&e!==k.value&&(k.value=e)}),t.watch(()=>o.headerVerticalAlign,e=>{e&&e!==E.value&&(E.value=e)}),t.watch(()=>o.bodyVerticalAlign,e=>{e&&e!==H.value&&(H.value=e)}),t.watch(()=>o.footerVerticalAlign,e=>{e&&e!==q.value&&(q.value=e)}),t.watch(()=>o.headerCellClass,()=>t.nextTick(X)),t.watch(()=>o.headerCellStyle,()=>t.nextTick(X)),t.watch(()=>o.bodyCellClass,()=>t.nextTick(K)),t.watch(()=>o.bodyCellStyle,()=>t.nextTick(K)),t.watch(()=>o.footerCellClass,()=>t.nextTick(Y)),t.watch(()=>o.footerCellStyle,()=>t.nextTick(Y)),t.watch(()=>o.class,()=>{G()}),{props:o,tableRef:J,theadRef:$,tbodyRef:s,tfootRef:N,visibleClass:ae,stripedClass:de,hoverableClass:ie,caption:v,border:u,borderClass:se,tableBackgroundTypeClass:ne,responsiveClassList:F,headerBorderTopClass:ue,bodyBorderTopClass:he,footerBorderTopClass:be,headerBorderBottomClass:ce,bodyBorderBottomClass:ye,footerBorderBottomClass:me,headerBorderLeftClass:fe,bodyBorderLeftClass:Be,footerBorderLeftClass:Ce,headerBorderRightClass:ve,bodyBorderRightClass:ge,footerBorderRightClass:Ae,headerTextAlignClass:Te,bodyTextAlignClass:pe,footerTextAlignClass:Se,headerVAlignClass:Le,bodyVAlignClass:we,footerVAlignClass:Ve}}}),Ne={key:0,class:"hison-table-caption"};function Fe(o,j,J,$,s,N){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...o.responsiveClassList,o.visibleClass])},[t.createElementVNode("table",{ref:"tableRef",class:t.normalizeClass(["hison-table",o.borderClass,o.tableBackgroundTypeClass,o.stripedClass,o.hoverableClass]),style:t.normalizeStyle(o.props.style)},[o.$slots.caption||o.caption?(t.openBlock(),t.createElementBlock("caption",Ne,[t.renderSlot(o.$slots,"caption",{},()=>[t.createTextVNode(t.toDisplayString(o.caption),1)])])):t.createCommentVNode("",!0),t.renderSlot(o.$slots,"colgroup"),o.$slots.thead?(t.openBlock(),t.createElementBlock("thead",{key:1,ref:"theadRef",class:t.normalizeClass([o.headerBorderTopClass,o.headerBorderBottomClass,o.headerBorderLeftClass,o.headerBorderRightClass,o.headerTextAlignClass,o.headerVAlignClass])},[t.renderSlot(o.$slots,"thead")],2)):t.createCommentVNode("",!0),t.createElementVNode("tbody",{ref:"tbodyRef",class:t.normalizeClass([o.bodyBorderTopClass,o.bodyBorderBottomClass,o.bodyBorderLeftClass,o.bodyBorderRightClass,o.bodyTextAlignClass,o.bodyVAlignClass])},[t.renderSlot(o.$slots,"default")],2),o.$slots.tfoot?(t.openBlock(),t.createElementBlock("tfoot",{key:2,ref:"tfootRef",class:t.normalizeClass([o.footerBorderTopClass,o.footerBorderBottomClass,o.footerBorderLeftClass,o.footerBorderRightClass,o.footerTextAlignClass,o.footerVAlignClass])},[t.renderSlot(o.$slots,"tfoot")],2)):t.createCommentVNode("",!0)],6)],2)}const Oe=He._export_sfc($e,[["render",Fe]]);exports.default=Oe;
|