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.
Files changed (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +248 -0
  3. package/dist/HAccordion-CPtgQUK0.js +1 -0
  4. package/dist/HAccordion-ll-4cIAw.mjs +262 -0
  5. package/dist/HBaggie-D6omQoFh.js +1 -0
  6. package/dist/HBaggie-D_7mEiuV.mjs +283 -0
  7. package/dist/HBanner-DmcMOFqS.mjs +420 -0
  8. package/dist/HBanner-Io4SdGGs.js +1 -0
  9. package/dist/HButton-DAVuDmOQ.js +1 -0
  10. package/dist/HButton-DAriO81x.mjs +256 -0
  11. package/dist/HCalendar-DKwGatUk.js +2 -0
  12. package/dist/HCalendar-w18iIB90.mjs +3387 -0
  13. package/dist/HCaption-6CbSqRA7.js +1 -0
  14. package/dist/HCaption-DwsXHDNK.mjs +275 -0
  15. package/dist/HChart-C86JXUyW.js +1 -0
  16. package/dist/HChart-CcArHFr0.mjs +179 -0
  17. package/dist/HDrawer-DG1O42iF.mjs +439 -0
  18. package/dist/HDrawer-U5VC_okK.js +1 -0
  19. package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
  20. package/dist/HDropdown-D4RAGmjE.js +1 -0
  21. package/dist/HFileset-BGuP9O4l.mjs +578 -0
  22. package/dist/HFileset-CuPR6Hwf.js +2 -0
  23. package/dist/HGap-BPAdnOQz.js +1 -0
  24. package/dist/HGap-DzGrfWVt.mjs +233 -0
  25. package/dist/HGrid-BiIhVCv_.mjs +345 -0
  26. package/dist/HGrid-C3EV_pgM.js +1 -0
  27. package/dist/HImagebox-D_DKeCrO.mjs +654 -0
  28. package/dist/HImagebox-t_UdFjQO.js +2 -0
  29. package/dist/HInput-BEyJqYkD.mjs +1103 -0
  30. package/dist/HInput-DMGLY473.js +1 -0
  31. package/dist/HInputGroup-D37WTYoI.mjs +281 -0
  32. package/dist/HInputGroup-Dcfr23sZ.js +1 -0
  33. package/dist/HLabel-B2FOqSiS.mjs +369 -0
  34. package/dist/HLabel-Dm48mSwn.js +1 -0
  35. package/dist/HLayout-BbCEm_aO.mjs +196 -0
  36. package/dist/HLayout-C1e4BZ_K.js +1 -0
  37. package/dist/HList-CAeYb-hz.mjs +419 -0
  38. package/dist/HList-eNXmMf27.js +1 -0
  39. package/dist/HModal-BDBEEpKm.mjs +778 -0
  40. package/dist/HModal-GODLq3wH.js +1 -0
  41. package/dist/HNote-CWnUjt3_.mjs +934 -0
  42. package/dist/HNote-D_Xwu9oL.js +1 -0
  43. package/dist/HPagination-Db_L9wv-.js +1 -0
  44. package/dist/HPagination-e5e2a5GS.mjs +496 -0
  45. package/dist/HParagraph-BRuSeOMU.js +1 -0
  46. package/dist/HParagraph-DYuB-qjY.mjs +463 -0
  47. package/dist/HPopup-Brp1FVpm.mjs +431 -0
  48. package/dist/HPopup-ChkoI3xm.js +1 -0
  49. package/dist/HSpinner-DDtU9PL_.js +1 -0
  50. package/dist/HSpinner-DOq2k5kT.mjs +281 -0
  51. package/dist/HTable-DGFnzD4u.js +1 -0
  52. package/dist/HTable-GCDP5O_J.mjs +620 -0
  53. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  54. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  55. package/dist/ar.es-CKau4tBl.js +5 -0
  56. package/dist/ar.es-XxSuE68c.mjs +57 -0
  57. package/dist/bg.es-BJ7fu6yy.mjs +57 -0
  58. package/dist/bg.es-Melqx1M5.js +5 -0
  59. package/dist/bn.es-CYlBkxc5.mjs +57 -0
  60. package/dist/bn.es-ClbAZ4WP.js +5 -0
  61. package/dist/bs.es-KjOcbE96.js +5 -0
  62. package/dist/bs.es-yMnaKmdi.mjs +57 -0
  63. package/dist/ca.es-BaGTENcW.js +5 -0
  64. package/dist/ca.es-DIhlxmQc.mjs +67 -0
  65. package/dist/cs.es-BN8oxRXQ.mjs +57 -0
  66. package/dist/cs.es-ChOlHqBr.js +5 -0
  67. package/dist/da.es-DJB5lAli.mjs +57 -0
  68. package/dist/da.es-DOFXbf8-.js +5 -0
  69. package/dist/de.es-DwE82Kaw.js +5 -0
  70. package/dist/de.es-glb8GeJh.mjs +57 -0
  71. package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
  72. package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
  73. package/dist/el.es-CNrCgzYI.js +5 -0
  74. package/dist/el.es-_bBZf22h.mjs +76 -0
  75. package/dist/en.es-CV9nmQGr.mjs +57 -0
  76. package/dist/en.es-CgL601qd.js +5 -0
  77. package/dist/es.es-CZjcWK54.mjs +57 -0
  78. package/dist/es.es-IdFGKY7Q.js +5 -0
  79. package/dist/et.es-BygWmV3P.js +5 -0
  80. package/dist/et.es-CjvQAzNF.mjs +57 -0
  81. package/dist/fa.es-DW_0SmsT.js +5 -0
  82. package/dist/fa.es-DykeFwDA.mjs +57 -0
  83. package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
  84. package/dist/fi.es-pgfJlZ8i.js +5 -0
  85. package/dist/fr.es-CNKVhFfO.mjs +57 -0
  86. package/dist/fr.es-OENguFuM.js +5 -0
  87. package/dist/he.es-bixEnAeH.js +5 -0
  88. package/dist/he.es-nF4GFhjH.mjs +57 -0
  89. package/dist/hisonvue.cjs.js +1 -0
  90. package/dist/hisonvue.css +1 -0
  91. package/dist/hisonvue.d.ts +19934 -0
  92. package/dist/hisonvue.es.js +114 -0
  93. package/dist/hr.es-CkRAP94O.js +5 -0
  94. package/dist/hr.es-QFfz660j.mjs +57 -0
  95. package/dist/hu.es-Ck2rE01V.mjs +57 -0
  96. package/dist/hu.es-DG6HeiQJ.js +5 -0
  97. package/dist/id.es-D4tPi6wP.js +5 -0
  98. package/dist/id.es-Je7FEUJ5.mjs +57 -0
  99. package/dist/index-BmKMHsSZ.js +153 -0
  100. package/dist/index-DUh7pai4.mjs +19976 -0
  101. package/dist/is.es-CDFqLYCV.js +5 -0
  102. package/dist/is.es-bzprHvXI.mjs +57 -0
  103. package/dist/it.es-BHgrw_C6.js +5 -0
  104. package/dist/it.es-CJtfqmNS.mjs +57 -0
  105. package/dist/ja.es-BaiGjqZ6.mjs +57 -0
  106. package/dist/ja.es-D-lxWwyb.js +5 -0
  107. package/dist/ka.es-CnnB6q4A.js +5 -0
  108. package/dist/ka.es-x9QJo_dl.mjs +57 -0
  109. package/dist/ko.es-6c447eTS.mjs +57 -0
  110. package/dist/ko.es-b18aaB3V.js +5 -0
  111. package/dist/lt.es-2twYdvmJ.mjs +57 -0
  112. package/dist/lt.es-BY9UQ6wZ.js +5 -0
  113. package/dist/mn.es-BLQRG1uu.mjs +57 -0
  114. package/dist/mn.es-YFS7gSdf.js +5 -0
  115. package/dist/nl.es-BEx-4hnj.js +5 -0
  116. package/dist/nl.es-bB1qWR_S.mjs +57 -0
  117. package/dist/no.es-BQnRWlWR.js +5 -0
  118. package/dist/no.es-CWDVXpTf.mjs +57 -0
  119. package/dist/pl.es-CKCsZ_02.js +5 -0
  120. package/dist/pl.es-Dzct23w9.mjs +57 -0
  121. package/dist/pt-br.es-BeBuiitI.mjs +57 -0
  122. package/dist/pt-br.es-oH7qh6Fd.js +5 -0
  123. package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
  124. package/dist/pt-pt.es-DLk5I0ej.js +5 -0
  125. package/dist/ro.es-DfMVJ30M.mjs +57 -0
  126. package/dist/ro.es-DgTen1Dh.js +5 -0
  127. package/dist/ru.es-Bv9UvrBe.mjs +67 -0
  128. package/dist/ru.es-jGIQfREl.js +5 -0
  129. package/dist/scrollManager-BGnq4wyt.mjs +14 -0
  130. package/dist/scrollManager-CEEWQwoK.js +1 -0
  131. package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
  132. package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
  133. package/dist/sk.es-CUOTpLuL.mjs +57 -0
  134. package/dist/sk.es-D2bhVb26.js +5 -0
  135. package/dist/sl.es-DeIGgZbR.mjs +57 -0
  136. package/dist/sl.es-TV8Uraa1.js +5 -0
  137. package/dist/sq.es-CQJJrZHv.mjs +67 -0
  138. package/dist/sq.es-Cc65zxbr.js +5 -0
  139. package/dist/sr.es-CKS0AkiW.mjs +57 -0
  140. package/dist/sr.es-D5VNA_GW.js +5 -0
  141. package/dist/sv.es-ChHQRrAe.mjs +57 -0
  142. package/dist/sv.es-dBeK_DZs.js +5 -0
  143. package/dist/tr.es-B3v90gVv.mjs +57 -0
  144. package/dist/tr.es-BUz4S13G.js +5 -0
  145. package/dist/uk.es-B8uaeLcK.js +5 -0
  146. package/dist/uk.es-CiR4NnbN.mjs +67 -0
  147. package/dist/vi.es-2OFMtbQI.js +5 -0
  148. package/dist/vi.es-DFDi5l7p.mjs +67 -0
  149. package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
  150. package/dist/zh-cn.es-fDHCbCIg.js +5 -0
  151. package/dist/zh-hk.es-COzeh5F8.js +5 -0
  152. package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
  153. package/nuxt/module.mjs +39 -0
  154. package/nuxt/plugin.mjs +21 -0
  155. package/package.json +53 -0
@@ -0,0 +1,233 @@
1
+ import { defineComponent as D, ref as n, computed as i, onMounted as P, onBeforeUnmount as q, watch as s, nextTick as O, createElementBlock as S, openBlock as L, normalizeClass as U, createElementVNode as j, normalizeStyle as T, createCommentVNode as M } from "vue";
2
+ import { z as Y, A as K, B as J, f as b, g as Q, u as X, F as V, o as Z, h as c, e as ee, t as te, b as W, a as le, r as ne, c as se, d as ae } from "./index-DUh7pai4.mjs";
3
+ import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ const ie = {
5
+ /**
6
+ * Unique identifier for the gap.
7
+ * - Access methods via `hison.component.getGap(id)`
8
+ * - Duplicate `id` will throw at mount time
9
+ */
10
+ id: { type: String, required: !1 },
11
+ /**
12
+ * Custom class applied to the gap wrapper (string / array / object).
13
+ * - Works with responsive classes like `hison-col-*`, `hison-size-*`, `hison-color-*`, `hison-pos-*`
14
+ * - If no `hison-col-*` is provided, `hison-col-12` is added by default.
15
+ */
16
+ class: {
17
+ type: [String, Array, Object],
18
+ required: !1
19
+ },
20
+ /**
21
+ * Inline style for the gap element (string, object, or an array of objects).
22
+ */
23
+ style: {
24
+ type: [String, Object, Array],
25
+ required: !1
26
+ },
27
+ /**
28
+ * Controls visibility of the gap.
29
+ * - Boolean only. Use `:visible="false"`
30
+ */
31
+ visible: { type: Boolean, default: !0 },
32
+ /**
33
+ * Whether to show border (rendered as subtle box-shadow).
34
+ * - Default: false (no border)
35
+ */
36
+ border: { type: Boolean, default: !1 },
37
+ /**
38
+ * Background type.
39
+ * - 'filled' | 'empty' | 'transparent'
40
+ * - Default: 'empty'
41
+ */
42
+ backgroundType: {
43
+ type: String,
44
+ default: b.empty,
45
+ validator: (t) => J.includes(t)
46
+ },
47
+ /**
48
+ * Drawing rule of the gap:
49
+ * - 'none' (default): renders empty space only
50
+ * - 'horizontal': renders a horizontal line (like hr)
51
+ * - 'vertical' : renders a vertical line
52
+ */
53
+ line: {
54
+ type: String,
55
+ default: "none",
56
+ validator: (t) => K.includes(t)
57
+ },
58
+ /**
59
+ * Style of the divider line.
60
+ * - 'solid' (default)
61
+ * - 'dashed'
62
+ * - 'dotted'
63
+ * - 'double'
64
+ * - 'groove'
65
+ * - 'ridge'
66
+ * - 'inset'
67
+ * - 'outset'
68
+ */
69
+ lineStyle: {
70
+ type: String,
71
+ default: "solid",
72
+ validator: (t) => Y.includes(t)
73
+ },
74
+ /**
75
+ * Thickness of the divider line.
76
+ * - Number → pixels (e.g. `2` → `2px`)
77
+ * - String → any valid CSS unit (e.g. `'0.5rem'`)
78
+ * - Default: 1
79
+ */
80
+ lineWidth: {
81
+ type: [Number, String],
82
+ default: 1
83
+ // number -> px
84
+ },
85
+ /**
86
+ * Color of the divider line.
87
+ * - Any valid CSS color string (hex, rgb, etc.)
88
+ * - Empty string (`''`) uses theme auto color
89
+ */
90
+ lineColor: {
91
+ type: String,
92
+ default: ""
93
+ // '' -> theme auto
94
+ }
95
+ }, re = D({
96
+ name: "HGap",
97
+ props: ie,
98
+ inheritAttrs: !1,
99
+ emits: ["mounted", "responsive-change"],
100
+ setup(t, { emit: h }) {
101
+ const k = n(null), y = n(null), a = t.id ? t.id : Q(), m = `hgap:${a}`, $ = X(), d = n(t.visible), v = n(t.border ?? !1), g = n(t.backgroundType ?? b.empty), p = n(t.line), r = n(t.lineStyle || "solid"), u = n(t.lineWidth ?? 1), f = n(t.lineColor || ""), B = i(() => {
102
+ var R, _;
103
+ const e = String(f.value || "").trim(), l = V(e);
104
+ if (l) return l;
105
+ if (e) return e;
106
+ const H = Z(o.value, "color"), N = H ? V(H) : null;
107
+ return N || ((_ = (R = c) == null ? void 0 : R.componentStyle) == null ? void 0 : _.mutedColor) || "#999999";
108
+ }), z = i(() => {
109
+ const e = u.value;
110
+ return typeof e == "number" ? `${e}px` : String(e || "1px");
111
+ }), I = i(() => ({
112
+ borderTop: `${z.value} ${r.value} ${B.value}`
113
+ })), w = i(() => ({
114
+ borderLeft: `${z.value} ${r.value} ${B.value}`
115
+ })), F = i(() => d.value ? "" : "hison-display-none"), G = i(() => v.value ? "hison-border" : ""), x = i(() => {
116
+ switch (g.value) {
117
+ case b.empty:
118
+ return "hison-bg-empty";
119
+ case b.transparent:
120
+ return "hison-bg-transparent";
121
+ default:
122
+ return "hison-bg-filled";
123
+ }
124
+ }), o = n([]), C = () => {
125
+ o.value = ee(te(t.class) || "", $.value), W(o.value, "size", c.componentStyle.size), W(o.value, "color", "primary"), le(o.value, "col") === -1 && o.value.push("hison-col-12");
126
+ }, A = () => {
127
+ c.component.gapList[a] && c.component.gapList[a].isHisonvueComponent && console.warn(`[Hisonvue] The gap ID is at risk of being duplicated. ${a}`), ne(m, () => {
128
+ E(), O(A);
129
+ }), C(), y.value = {
130
+ isHisonvueComponent: !0,
131
+ getId: () => a,
132
+ getType: () => "gap",
133
+ isVisible: () => d.value,
134
+ setVisible: (e) => {
135
+ d.value = e;
136
+ },
137
+ isBorder: () => v.value,
138
+ setBorder: (e) => {
139
+ v.value = e;
140
+ },
141
+ getBackgroundType: () => g.value,
142
+ setBackgroundType: (e) => {
143
+ g.value = e;
144
+ },
145
+ getLine: () => p.value,
146
+ setLine: (e) => {
147
+ p.value = e;
148
+ },
149
+ getLineStyle: () => r.value,
150
+ setLineStyle: (e) => {
151
+ r.value = e;
152
+ },
153
+ getLineWidth: () => u.value,
154
+ setLineWidth: (e) => {
155
+ u.value = e;
156
+ },
157
+ getLineColor: () => f.value,
158
+ setLineColor: (e) => {
159
+ f.value = e ?? "";
160
+ },
161
+ reload: () => se(m)
162
+ }, c.component.gapList[a] = y.value, h("mounted", y.value);
163
+ }, E = () => {
164
+ ae(m), delete c.component.gapList[a];
165
+ };
166
+ return P(A), q(E), s($, (e) => {
167
+ C(), h("responsive-change", e);
168
+ }), s(() => t.visible, (e) => {
169
+ const l = !!e;
170
+ l !== d.value && (d.value = l);
171
+ }), s(() => t.border, (e) => {
172
+ const l = !!e;
173
+ l !== v.value && (v.value = l);
174
+ }), s(() => t.backgroundType, (e) => {
175
+ e && e !== g.value && (g.value = e);
176
+ }), s(() => t.line, (e) => {
177
+ (e === "none" || e === "horizontal" || e === "vertical") && e !== p.value && (p.value = e);
178
+ }), s(() => t.lineStyle, (e) => {
179
+ ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset"].includes(e) && e !== r.value && (r.value = e);
180
+ }), s(() => t.lineWidth, (e) => {
181
+ const l = typeof e == "number" && Number.isFinite(e) && e >= 0 || typeof e == "string" ? e : u.value;
182
+ l !== u.value && (u.value = l);
183
+ }), s(() => t.lineColor, (e) => {
184
+ const l = (e ?? "").toString();
185
+ l !== f.value && (f.value = l);
186
+ }), s(() => t.class, () => {
187
+ C();
188
+ }), {
189
+ gapRef: k,
190
+ props: t,
191
+ line: p,
192
+ visibleClass: F,
193
+ borderClass: G,
194
+ backgroundTypeClass: x,
195
+ responsiveClassList: o,
196
+ horizontalStyle: I,
197
+ verticalStyle: w
198
+ };
199
+ }
200
+ });
201
+ function ue(t, h, k, y, a, m) {
202
+ return L(), S("div", {
203
+ class: U([
204
+ "hison-wrapper",
205
+ ...t.responsiveClassList,
206
+ t.visibleClass
207
+ ])
208
+ }, [
209
+ j("div", {
210
+ ref: "gapRef",
211
+ class: U([
212
+ "hison-gap",
213
+ t.borderClass,
214
+ t.backgroundTypeClass
215
+ ]),
216
+ style: T(t.props.style)
217
+ }, [
218
+ t.line === "horizontal" ? (L(), S("div", {
219
+ key: 0,
220
+ class: "hison-gap-line-horizontal",
221
+ style: T(t.horizontalStyle)
222
+ }, null, 4)) : t.line === "vertical" ? (L(), S("div", {
223
+ key: 1,
224
+ class: "hison-gap-line-vertical",
225
+ style: T(t.verticalStyle)
226
+ }, null, 4)) : M("", !0)
227
+ ], 6)
228
+ ], 2);
229
+ }
230
+ const ge = /* @__PURE__ */ oe(re, [["render", ue]]);
231
+ export {
232
+ ge as default
233
+ };
@@ -0,0 +1,345 @@
1
+ import { defineComponent as V, ref as f, computed as L, onMounted as _, onBeforeUnmount as x, watch as F, triggerRef as I, nextTick as M, createElementBlock as N, openBlock as T, normalizeStyle as U, normalizeClass as $, createElementVNode as P, mergeProps as K } from "vue";
2
+ import { G as j, I as W, J as Y, K as Z, L as J, M as X, h as v, g as Q, u as ee, e as R, t as H, o as y, a as te, l as q, F as z, v as g, r as ie, c as le, d as re } from "./index-DUh7pai4.mjs";
3
+ import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
4
+ const ne = {
5
+ modelValue: Array,
6
+ id: { type: String, required: !0 },
7
+ columns: {
8
+ type: Array,
9
+ required: !0
10
+ },
11
+ class: {
12
+ type: [String, Array, Object],
13
+ required: !1
14
+ },
15
+ style: {
16
+ type: [String, Object],
17
+ required: !1
18
+ },
19
+ /* The name of the grid. If null, the grid Id is inserted. */
20
+ name: { type: String, required: !1 },
21
+ /* Indicates whether the cell is editable. If true, the cell cannot be edited. */
22
+ locked: { type: Boolean, default: !1 },
23
+ /* Indicates whether to display the background color representing the locked state of a locked cell. */
24
+ lockedColor: { type: Boolean, default: !0 },
25
+ /* Indicates whether the column width can be adjusted by the user with the mouse. */
26
+ resizable: { type: Boolean, default: !0 },
27
+ /* Indicates whether the user can use undo and redo shortcuts while editing the grid. */
28
+ redoable: { type: Boolean, default: !0 },
29
+ /* The number of times the grid edit state is recorded for undo and redo. */
30
+ redoCount: { type: Number, required: !1 },
31
+ /* Indicates whether the grid is visible. If false, it will be display none. */
32
+ visible: { type: Boolean, default: !0 },
33
+ /* Indicates whether the grid header is visible. If false, it will be display none. */
34
+ headerVisible: { type: Boolean, default: !0 },
35
+ /* Indicates whether to display the row number column (v-g-rownum) on the screen. */
36
+ rownumVisible: { type: Boolean, default: !0 },
37
+ /* The width size of the row number column (v-g-rownum). */
38
+ rownumSize: { type: String, required: !1 },
39
+ /* Indicates whether to display the locked color of the row number column (v-g-rownum). */
40
+ rownumLockedColor: { type: Boolean, default: !1 },
41
+ /* Indicates whether to display the status column (v-g-status) on the screen. */
42
+ statusVisible: { type: Boolean, default: !0 },
43
+ /* Indicates whether to display the locked color of the status column (v-g-status). */
44
+ statusLockedColor: { type: Boolean, default: !1 },
45
+ /* The user selection range policy of the grid. 'range': range selection, 'single': single cell selection, 'none': no selection) */
46
+ selectionPolicy: {
47
+ type: String,
48
+ required: !1,
49
+ validator: (e) => X.includes(e)
50
+ },
51
+ /* Value representing null in the grid. */
52
+ nullValue: { type: String, required: !1 },
53
+ /**
54
+ * The format of the date in the grid.
55
+ * 'yyyy-mm-dd', 'yyyy/mm/dd', 'yyyy. mm. dd', 'yyyymmdd'
56
+ * 'mm-dd-yyyy', 'mm/dd/yyyy', 'mm. dd. yyyy', 'mmddyyyy'
57
+ * 'dd-mm-yyyy', 'dd/mm/yyyy', 'dd. mm. yyyy', 'ddmmyyyy' are possible.
58
+ */
59
+ dateFormat: {
60
+ type: String,
61
+ required: !1,
62
+ validator: (e) => J.includes(e)
63
+ },
64
+ /**
65
+ * The format of the month in the grid.
66
+ * 'yyyymm', 'yyyy-mm', 'yyyy/mm', 'yyyy. mm'
67
+ * 'mmyyyy', 'mm-yyyy', 'mm/yyyy', 'mm. yyyy' are possible.
68
+ */
69
+ monthFormat: {
70
+ type: String,
71
+ required: !1,
72
+ validator: (e) => Z.includes(e)
73
+ },
74
+ /* Sets the alter-row of the grid (the function that alternates the colors of each row). */
75
+ alterRow: { type: Boolean, default: !0 },
76
+ /**
77
+ * Sets the frozen columns of the grid. The number should be set by calculating the invisible columns as well.
78
+ * (Column 1 is v-g-rownum, and column 2 is v-g-status. The user column starts from at least 3 columns.)
79
+ */
80
+ frozenColCount: { type: Number, required: !1 },
81
+ /* Sets the frozen rows of the grid. */
82
+ frozenRowCount: { type: Number, required: !1 },
83
+ /* Indicates whether to use the sorting feature of the grid. */
84
+ sortable: { type: Boolean, default: !0 },
85
+ /* Indicates whether to use the filtering feature of the grid. */
86
+ filterable: { type: Boolean, default: !0 },
87
+ /* Indicates whether to use the feature that checks or unchecks the column checkboxes when double-clicking the header of a checkbox. */
88
+ allCheckable: { type: Boolean, default: !0 },
89
+ /* The value a checkbox type cell has when checked. */
90
+ checkedValue: { type: String, required: !1 },
91
+ /* The value a checkbox type cell has when unchecked. */
92
+ uncheckedValue: { type: String, required: !1 },
93
+ /* The width of the grid. Insert cssText. */
94
+ width: { type: String, required: !1 },
95
+ /* The height of the grid. Insert cssText. */
96
+ height: { type: String, required: !1 },
97
+ /* The margin of the grid. Insert cssText. */
98
+ margin: { type: String, required: !1 },
99
+ /* The padding of the grid. Insert cssText. */
100
+ padding: { type: String, required: !1 },
101
+ /* Specifies the size level of the grid. Enter a positive integer. 5 is the standard ratio. */
102
+ sizeLevel: { type: Number, required: !1 },
103
+ /* Sets the default vertical-align of the grid cell. Choose from 'top', 'center', 'bottom'. */
104
+ verticalAlign: {
105
+ type: String,
106
+ required: !1,
107
+ validator: (e) => Y.includes(e)
108
+ },
109
+ /* Specifies the default font-size of the grid cell. Enter a css text. The unit is px. */
110
+ cellFontSize: { type: String, required: !1 },
111
+ /* Specifies the default min-height of the grid cell. Enter a css text. The unit is px. */
112
+ cellMinHeight: { type: String, required: !1 },
113
+ /* Sets the horizontal border size of the grid cell. The unit is px. Enter 0 or a positive integer. */
114
+ horizenBorderSize: { type: Number, required: !1 },
115
+ /* Sets the vertical border size of the grid cell. The unit is px. Enter 0 or a positive integer. */
116
+ verticalBorderSize: { type: Number, required: !1 },
117
+ /* Sets the font-family of the grid cell. Enter the font-family in cssText. */
118
+ gridFontFamily: { type: String, required: !1 },
119
+ /* Sets the font-family of the grid editor. Enter the font-family in cssText. */
120
+ editorFontFamily: { type: String, required: !1 },
121
+ /* Sets the overflow-wrap of the grid cell. Enter the overflow-wrap in cssText. */
122
+ overflowWrap: { type: String, required: !1 },
123
+ /* Sets the word-break of the grid cell. Enter the word-break in cssText. */
124
+ wordBreak: { type: String, required: !1 },
125
+ /* Sets the white-space of the grid cell. Enter the white-space in cssText. */
126
+ whiteSpace: { type: String, required: !1 },
127
+ /* Indicates whether to display the underline for link type cells. */
128
+ linkHasUnderLine: { type: Boolean, required: !1 },
129
+ /* Inverts the colors of the grid. */
130
+ invertColor: { type: Boolean, default: !1 },
131
+ /* Sets the main color of the grid. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
132
+ color: {
133
+ type: String,
134
+ required: !1,
135
+ validator: (e) => j.includes(e) || W(e)
136
+ },
137
+ /* Sets the border color of the grid. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
138
+ gridBorderColor: { type: String, required: !1 },
139
+ /* Sets the background color of the header cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
140
+ headerCellBackColor: { type: String, required: !1 },
141
+ /* Sets the border color of the header cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
142
+ headerCellBorderColor: { type: String, required: !1 },
143
+ /* Sets the font color of the header cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
144
+ headerCellFontColor: { type: String, required: !1 },
145
+ /* Sets the background color of the footer cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
146
+ footerCellBackColor: { type: String, required: !1 },
147
+ /* Sets the border color of the footer cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
148
+ footerCellBorderColor: { type: String, required: !1 },
149
+ /* Sets the font color of the footer cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
150
+ footerCellFontColor: { type: String, required: !1 },
151
+ /* Sets the background color of the grid body. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
152
+ bodyBackColor: { type: String, required: !1 },
153
+ /* Sets the background color of the grid body cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
154
+ bodyCellBackColor: { type: String, required: !1 },
155
+ /* Sets the border color of the grid body cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
156
+ bodyCellBorderColor: { type: String, required: !1 },
157
+ /* Sets the font color of the grid body cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
158
+ bodyCellFontColor: { type: String, required: !1 },
159
+ /* Sets the background color of the editor. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
160
+ editorBackColor: { type: String, required: !1 },
161
+ /* Sets the font color of the editor. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
162
+ editorFontColor: { type: String, required: !1 },
163
+ /* Sets the background color of the selected cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
164
+ selectCellBackColor: { type: String, required: !1 },
165
+ /* Sets the font color of the selected cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
166
+ selectCellFontColor: { type: String, required: !1 },
167
+ /* Sets the background color of the selected column header. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
168
+ selectColBackColor: { type: String, required: !1 },
169
+ /* Sets the font color of the selected column header. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
170
+ selectColFontColor: { type: String, required: !1 },
171
+ /* Sets the background color of the selected row. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
172
+ selectRowBackColor: { type: String, required: !1 },
173
+ /* Sets the font color of the selected row. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
174
+ selectRowFontColor: { type: String, required: !1 },
175
+ /* Sets the background color of the mouseover cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
176
+ mouseoverCellBackColor: { type: String, required: !1 },
177
+ /* Sets the font color of the mouseover cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
178
+ mouseoverCellFontColor: { type: String, required: !1 },
179
+ /* Sets the background color of the locked cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
180
+ lockCellBackColor: { type: String, required: !1 },
181
+ /* Sets the font color of the locked cell editor. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
182
+ lockCellFontColor: { type: String, required: !1 },
183
+ /* Sets the background color of the alternate rows. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
184
+ alterRowBackColor: { type: String, required: !1 },
185
+ /* Sets the font color of the alternate rows. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
186
+ alterRowFontColor: { type: String, required: !1 },
187
+ /* Sets the font color of the button type cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
188
+ buttonFontColor: { type: String, required: !1 },
189
+ /* Sets the border color of the button type cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
190
+ buttonBorderColor: { type: String, required: !1 },
191
+ /* Sets the background color of the button type cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
192
+ buttonBackColor: { type: String, required: !1 },
193
+ /* Sets the font color of the button type cell on hover. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
194
+ buttonHoverFontColor: { type: String, required: !1 },
195
+ /* Sets the background color of the button type cell on hover. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
196
+ buttonHoverBackColor: { type: String, required: !1 },
197
+ /* Sets the font color of the button type cell on active. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
198
+ buttonActiveFontColor: { type: String, required: !1 },
199
+ /* Sets the background color of the button type cell on active. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
200
+ buttonActiveBackColor: { type: String, required: !1 },
201
+ /* Sets the font color of the link type cell. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
202
+ linkFontColor: { type: String, required: !1 },
203
+ /* Sets the font color of the link type cell on hover. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
204
+ linkHoverFontColor: { type: String, required: !1 },
205
+ /* Sets the font color of the link type cell on active. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
206
+ linkActiveFontColor: { type: String, required: !1 },
207
+ /* Sets the font color of the link type cell on visited. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
208
+ linkVisitedFontColor: { type: String, required: !1 },
209
+ /* Sets the font color of the link type cell on focus. Enter the 16-digit color code in cssText. Ex) '#ffffff' */
210
+ linkFocusFontColor: { type: String, required: !1 }
211
+ }, ae = {
212
+ activeCell: Function,
213
+ activeCells: Function,
214
+ activeRow: Function,
215
+ activeRows: Function,
216
+ activeCol: Function,
217
+ activeCols: Function,
218
+ beforeChange: Function,
219
+ afterChange: Function,
220
+ beforeClickCell: Function,
221
+ afterClickCell: Function,
222
+ clickSelect: Function,
223
+ clickCheckbox: Function,
224
+ clickButton: Function,
225
+ clickLink: Function,
226
+ beforeDblClickCell: Function,
227
+ afterDblClickCell: Function,
228
+ beforeClickHeader: Function,
229
+ afterClickHeader: Function,
230
+ beforeDblClickHeader: Function,
231
+ afterDblClickHeader: Function,
232
+ beforeEditEnter: Function,
233
+ afterEditEnter: Function,
234
+ editEnding: Function,
235
+ clickFilter: Function,
236
+ chooseFilter: Function,
237
+ paste: Function,
238
+ copy: Function,
239
+ resize: Function,
240
+ keydownEditor: Function,
241
+ inputEditor: Function,
242
+ keydownGrid: Function
243
+ }, ue = V({
244
+ name: "HGrid",
245
+ props: {
246
+ ...ne,
247
+ ...ae
248
+ },
249
+ emits: ["mounted", "responsive-change"],
250
+ setup(e, { emit: k }) {
251
+ const d = v.grid, u = f(null), t = f(null), s = e.id ? e.id : Q(), b = `hgrid:${s}`, S = ee(), C = f(e.visible), D = L(() => C.value ? "" : "hison-display-none"), m = f([]), p = ["columns", "id", "class", "style", "visible"], h = f(0), B = () => {
252
+ I(h);
253
+ }, E = f(""), G = L(() => {
254
+ h.value;
255
+ const l = R(H(e.class) || "", S.value), r = y(l, "color"), o = y(l, "size");
256
+ te(l, "col") === -1 && l.push("hison-col-12"), m.value = l;
257
+ const i = {};
258
+ i["data-id"] = s;
259
+ for (const [c, a] of Object.entries(e))
260
+ p.includes(c) || a != null && (i[c.replace(/[A-Z]/g, (n) => "-" + n.toLowerCase())] = String(a));
261
+ return i["size-level"] = i["size-level"] && q.utils.isNumber(i["size-level"]) ? String(Math.min(Math.max(Number(i["size-level"]), 1), 9)) : w(5, o), r && !i.color && (i.color = r), i.color && (i.color = z(i.color) ?? i.color), (e.invertColor || v.componentStyle.invertColor) && (i["invert-color"] = "true"), E.value = i.color, i;
262
+ }), w = (l, r) => {
263
+ switch (r = r ?? v.componentStyle.size, r) {
264
+ case g.s:
265
+ l -= 2;
266
+ break;
267
+ case g.m:
268
+ break;
269
+ case g.l:
270
+ l += 2;
271
+ break;
272
+ case g.xl:
273
+ l += 3;
274
+ break;
275
+ }
276
+ return String(Math.min(Math.max(l, 1), 9));
277
+ }, A = () => {
278
+ if (ie(b, () => {
279
+ O(), B(), M(A);
280
+ }), d.init(), !u.value) return;
281
+ const l = u.value.querySelector("[data-vanillagrid]");
282
+ if (!l) return;
283
+ e.columns.forEach((o) => {
284
+ const i = document.createElement("div");
285
+ i.setAttribute("data-col", "");
286
+ for (const c in o) {
287
+ const a = o[c];
288
+ if (a != null) {
289
+ const n = c.replace(/([A-Z])/g, "-$1").toLowerCase();
290
+ i.setAttribute(n, String(a));
291
+ }
292
+ }
293
+ l.appendChild(i);
294
+ }), d.mountGrid(u.value), l.style.border = "none", l.style.boxShadow = `0 0.5px 1px 0.5px ${E.value}`;
295
+ const r = d.getGrid(s);
296
+ if (r && (r.getId = () => s), t.value = r, t.value) {
297
+ t.value.isHisonvueComponent = !0, t.value.getId = () => s, t.value.getType = () => "grid", "isGridVisible" in t.value && delete t.value.isGridVisible, "setGridVisible" in t.value && delete t.value.setGridVisible, t.value.isVisible = () => C.value, t.value.setVisible = (i) => {
298
+ C.value = i;
299
+ }, t.value.getDataModel = () => new q.data.DataModel(t.value.getValues()), t.value.setDataModel = (i) => {
300
+ if (!(!i || i.getRowCount() == 0))
301
+ return t.value.load(i);
302
+ }, t.value.reload = () => le(b);
303
+ const o = t.value.load.bind(t.value);
304
+ t.value.load = (i) => i && i.getIsDataModel && i.getIsDataModel() ? o(i.getRows()) : o(i);
305
+ }
306
+ t.value && (typeof e.activeCell == "function" && t.value.setOnActiveCell(e.activeCell), typeof e.activeCells == "function" && t.value.setOnActiveCells(e.activeCells), typeof e.activeRow == "function" && t.value.setOnActiveRow(e.activeRow), typeof e.activeRows == "function" && t.value.setOnActiveRows(e.activeRows), typeof e.activeCol == "function" && t.value.setOnActiveCol(e.activeCol), typeof e.activeCols == "function" && t.value.setOnActiveCols(e.activeCols), typeof e.beforeChange == "function" && t.value.setOnBeforeChange(e.beforeChange), typeof e.afterChange == "function" && t.value.setOnAfterChange(e.afterChange), typeof e.beforeClickCell == "function" && t.value.setOnBeforeClickCell(e.beforeClickCell), typeof e.afterClickCell == "function" && t.value.setOnAfterClickCell(e.afterClickCell), typeof e.clickSelect == "function" && t.value.setOnClickSelect(e.clickSelect), typeof e.clickCheckbox == "function" && t.value.setOnClickCheckbox(e.clickCheckbox), typeof e.clickButton == "function" && t.value.setOnClickButton(e.clickButton), typeof e.clickLink == "function" && t.value.setOnClickLink(e.clickLink), typeof e.beforeDblClickCell == "function" && t.value.setOnBeforeDblClickCell(e.beforeDblClickCell), typeof e.afterDblClickCell == "function" && t.value.setOnAfterDblClickCell(e.afterDblClickCell), typeof e.beforeClickHeader == "function" && t.value.setOnBeforeClickHeader(e.beforeClickHeader), typeof e.afterClickHeader == "function" && t.value.setOnAfterClickHeader(e.afterClickHeader), typeof e.beforeDblClickHeader == "function" && t.value.setOnBeforeDblClickHeader(e.beforeDblClickHeader), typeof e.afterDblClickHeader == "function" && t.value.setOnAfterDblClickHeader(e.afterDblClickHeader), typeof e.beforeEditEnter == "function" && t.value.setOnBeforeEditEnter(e.beforeEditEnter), typeof e.afterEditEnter == "function" && t.value.setOnAfterEditEnter(e.afterEditEnter), typeof e.editEnding == "function" && t.value.setOnEditEnding(e.editEnding), typeof e.clickFilter == "function" && t.value.setOnClickFilter(e.clickFilter), typeof e.chooseFilter == "function" && t.value.setOnChooseFilter(e.chooseFilter), typeof e.paste == "function" && t.value.setOnPaste(e.paste), typeof e.copy == "function" && t.value.setOnCopy(e.copy), typeof e.resize == "function" && t.value.setOnResize(e.resize), typeof e.keydownEditor == "function" && t.value.setOnKeydownEditor(e.keydownEditor), typeof e.inputEditor == "function" && t.value.setOnInputEditor(e.inputEditor), typeof e.keydownGrid == "function" && t.value.setOnKeydownGrid(e.keydownGrid)), k("mounted", t.value);
307
+ }, O = () => {
308
+ re(b), u.value && d.unmountGrid(u.value);
309
+ };
310
+ return _(A), x(O), F(S, (l) => {
311
+ const r = t.value;
312
+ if (r) {
313
+ const o = R(H(e.class) || "", S.value), i = y(o, "color"), c = y(o, "size"), a = e.sizeLevel && q.utils.isNumber(String(e.sizeLevel)) ? String(Math.min(Math.max(Number(e.sizeLevel), 1), 9)) : w(5, c);
314
+ r.setGridSizeLevel(Number(a));
315
+ let n = "";
316
+ i && !e.color && (n = i), n && (n = z(n) ?? n, r.setGridColor(n), (e.invertColor || v.componentStyle.invertColor) && r.invertColor(!0));
317
+ }
318
+ k("responsive-change", l);
319
+ }), F(() => e.visible, (l) => {
320
+ const r = !!l;
321
+ r !== C.value && (C.value = r);
322
+ }), F(() => e.class, () => {
323
+ B();
324
+ }), {
325
+ editorWrap: u,
326
+ props: e,
327
+ bindAttrs: G,
328
+ responsiveClassList: m,
329
+ visibleClass: D
330
+ };
331
+ }
332
+ });
333
+ function ce(e, k, d, u, t, s) {
334
+ return T(), N("div", {
335
+ ref: "editorWrap",
336
+ class: $(["hison-grid", "hison-wrapper", ...e.responsiveClassList, e.visibleClass]),
337
+ style: U(e.props.style)
338
+ }, [
339
+ P("div", K({ "data-vanillagrid": "" }, e.bindAttrs), null, 16)
340
+ ], 6);
341
+ }
342
+ const Ce = /* @__PURE__ */ oe(ue, [["render", ce]]);
343
+ export {
344
+ Ce as default
345
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),l=require("./index-BmKMHsSZ.js"),A=require("./_plugin-vue_export-helper-BHFhmbuH.js"),L={modelValue:Array,id:{type:String,required:!0},columns:{type:Array,required:!0},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object],required:!1},name:{type:String,required:!1},locked:{type:Boolean,default:!1},lockedColor:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},redoable:{type:Boolean,default:!0},redoCount:{type:Number,required:!1},visible:{type:Boolean,default:!0},headerVisible:{type:Boolean,default:!0},rownumVisible:{type:Boolean,default:!0},rownumSize:{type:String,required:!1},rownumLockedColor:{type:Boolean,default:!1},statusVisible:{type:Boolean,default:!0},statusLockedColor:{type:Boolean,default:!1},selectionPolicy:{type:String,required:!1,validator:e=>l.SELECTION_POLICY_VALUES.includes(e)},nullValue:{type:String,required:!1},dateFormat:{type:String,required:!1,validator:e=>l.GRID_DATE_FORMAT_VALUES.includes(e)},monthFormat:{type:String,required:!1,validator:e=>l.GRID_MONTH_FORMAT_VALUES.includes(e)},alterRow:{type:Boolean,default:!0},frozenColCount:{type:Number,required:!1},frozenRowCount:{type:Number,required:!1},sortable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},allCheckable:{type:Boolean,default:!0},checkedValue:{type:String,required:!1},uncheckedValue:{type:String,required:!1},width:{type:String,required:!1},height:{type:String,required:!1},margin:{type:String,required:!1},padding:{type:String,required:!1},sizeLevel:{type:Number,required:!1},verticalAlign:{type:String,required:!1,validator:e=>l.GRID_VERTICAL_ALIGN_VALUES.includes(e)},cellFontSize:{type:String,required:!1},cellMinHeight:{type:String,required:!1},horizenBorderSize:{type:Number,required:!1},verticalBorderSize:{type:Number,required:!1},gridFontFamily:{type:String,required:!1},editorFontFamily:{type:String,required:!1},overflowWrap:{type:String,required:!1},wordBreak:{type:String,required:!1},whiteSpace:{type:String,required:!1},linkHasUnderLine:{type:Boolean,required:!1},invertColor:{type:Boolean,default:!1},color:{type:String,required:!1,validator:e=>l.COLOR_SET_VALUES.includes(e)||l.isCssColorLike(e)},gridBorderColor:{type:String,required:!1},headerCellBackColor:{type:String,required:!1},headerCellBorderColor:{type:String,required:!1},headerCellFontColor:{type:String,required:!1},footerCellBackColor:{type:String,required:!1},footerCellBorderColor:{type:String,required:!1},footerCellFontColor:{type:String,required:!1},bodyBackColor:{type:String,required:!1},bodyCellBackColor:{type:String,required:!1},bodyCellBorderColor:{type:String,required:!1},bodyCellFontColor:{type:String,required:!1},editorBackColor:{type:String,required:!1},editorFontColor:{type:String,required:!1},selectCellBackColor:{type:String,required:!1},selectCellFontColor:{type:String,required:!1},selectColBackColor:{type:String,required:!1},selectColFontColor:{type:String,required:!1},selectRowBackColor:{type:String,required:!1},selectRowFontColor:{type:String,required:!1},mouseoverCellBackColor:{type:String,required:!1},mouseoverCellFontColor:{type:String,required:!1},lockCellBackColor:{type:String,required:!1},lockCellFontColor:{type:String,required:!1},alterRowBackColor:{type:String,required:!1},alterRowFontColor:{type:String,required:!1},buttonFontColor:{type:String,required:!1},buttonBorderColor:{type:String,required:!1},buttonBackColor:{type:String,required:!1},buttonHoverFontColor:{type:String,required:!1},buttonHoverBackColor:{type:String,required:!1},buttonActiveFontColor:{type:String,required:!1},buttonActiveBackColor:{type:String,required:!1},linkFontColor:{type:String,required:!1},linkHoverFontColor:{type:String,required:!1},linkActiveFontColor:{type:String,required:!1},linkVisitedFontColor:{type:String,required:!1},linkFocusFontColor:{type:String,required:!1}},R={activeCell:Function,activeCells:Function,activeRow:Function,activeRows:Function,activeCol:Function,activeCols:Function,beforeChange:Function,afterChange:Function,beforeClickCell:Function,afterClickCell:Function,clickSelect:Function,clickCheckbox:Function,clickButton:Function,clickLink:Function,beforeDblClickCell:Function,afterDblClickCell:Function,beforeClickHeader:Function,afterClickHeader:Function,beforeDblClickHeader:Function,afterDblClickHeader:Function,beforeEditEnter:Function,afterEditEnter:Function,editEnding:Function,clickFilter:Function,chooseFilter:Function,paste:Function,copy:Function,resize:Function,keydownEditor:Function,inputEditor:Function,keydownGrid:Function},z=r.defineComponent({name:"HGrid",props:{...L,...R},emits:["mounted","responsive-change"],setup(e,{emit:y}){const C=l.hisonCloser.grid,s=r.ref(null),t=r.ref(null),d=e.id?e.id:l.getUUID(),g=`hgrid:${d}`,S=l.useDevice(),v=r.ref(e.visible),E=r.computed(()=>v.value?"":"hison-display-none"),k=r.ref([]),w=["columns","id","class","style","visible"],b=r.ref(0),F=()=>{r.triggerRef(b)},q=r.ref(""),O=r.computed(()=>{b.value;const o=l.extractResponsiveClasses(l.toClassString(e.class)||"",S.value),n=l.getSpecificClassValueFromClassList(o,"color"),a=l.getSpecificClassValueFromClassList(o,"size");l.getIndexSpecificClassNameFromClassList(o,"col")===-1&&o.push("hison-col-12"),k.value=o;const i={};i["data-id"]=d;for(const[f,c]of Object.entries(e))w.includes(f)||c!=null&&(i[f.replace(/[A-Z]/g,u=>"-"+u.toLowerCase())]=String(c));return i["size-level"]=i["size-level"]&&l.hison.utils.isNumber(i["size-level"])?String(Math.min(Math.max(Number(i["size-level"]),1),9)):m(5,a),n&&!i.color&&(i.color=n),i.color&&(i.color=l.getHexCodeFromColorText(i.color)??i.color),(e.invertColor||l.hisonCloser.componentStyle.invertColor)&&(i["invert-color"]="true"),q.value=i.color,i}),m=(o,n)=>{switch(n=n??l.hisonCloser.componentStyle.size,n){case l.Size.s:o-=2;break;case l.Size.m:break;case l.Size.l:o+=2;break;case l.Size.xl:o+=3;break}return String(Math.min(Math.max(o,1),9))},h=()=>{if(l.registerReloadable(g,()=>{B(),F(),r.nextTick(h)}),C.init(),!s.value)return;const o=s.value.querySelector("[data-vanillagrid]");if(!o)return;e.columns.forEach(a=>{const i=document.createElement("div");i.setAttribute("data-col","");for(const f in a){const c=a[f];if(c!=null){const u=f.replace(/([A-Z])/g,"-$1").toLowerCase();i.setAttribute(u,String(c))}}o.appendChild(i)}),C.mountGrid(s.value),o.style.border="none",o.style.boxShadow=`0 0.5px 1px 0.5px ${q.value}`;const n=C.getGrid(d);if(n&&(n.getId=()=>d),t.value=n,t.value){t.value.isHisonvueComponent=!0,t.value.getId=()=>d,t.value.getType=()=>"grid","isGridVisible"in t.value&&delete t.value.isGridVisible,"setGridVisible"in t.value&&delete t.value.setGridVisible,t.value.isVisible=()=>v.value,t.value.setVisible=i=>{v.value=i},t.value.getDataModel=()=>new l.hison.data.DataModel(t.value.getValues()),t.value.setDataModel=i=>{if(!(!i||i.getRowCount()==0))return t.value.load(i)},t.value.reload=()=>l.reloadHisonComponent(g);const a=t.value.load.bind(t.value);t.value.load=i=>i&&i.getIsDataModel&&i.getIsDataModel()?a(i.getRows()):a(i)}t.value&&(typeof e.activeCell=="function"&&t.value.setOnActiveCell(e.activeCell),typeof e.activeCells=="function"&&t.value.setOnActiveCells(e.activeCells),typeof e.activeRow=="function"&&t.value.setOnActiveRow(e.activeRow),typeof e.activeRows=="function"&&t.value.setOnActiveRows(e.activeRows),typeof e.activeCol=="function"&&t.value.setOnActiveCol(e.activeCol),typeof e.activeCols=="function"&&t.value.setOnActiveCols(e.activeCols),typeof e.beforeChange=="function"&&t.value.setOnBeforeChange(e.beforeChange),typeof e.afterChange=="function"&&t.value.setOnAfterChange(e.afterChange),typeof e.beforeClickCell=="function"&&t.value.setOnBeforeClickCell(e.beforeClickCell),typeof e.afterClickCell=="function"&&t.value.setOnAfterClickCell(e.afterClickCell),typeof e.clickSelect=="function"&&t.value.setOnClickSelect(e.clickSelect),typeof e.clickCheckbox=="function"&&t.value.setOnClickCheckbox(e.clickCheckbox),typeof e.clickButton=="function"&&t.value.setOnClickButton(e.clickButton),typeof e.clickLink=="function"&&t.value.setOnClickLink(e.clickLink),typeof e.beforeDblClickCell=="function"&&t.value.setOnBeforeDblClickCell(e.beforeDblClickCell),typeof e.afterDblClickCell=="function"&&t.value.setOnAfterDblClickCell(e.afterDblClickCell),typeof e.beforeClickHeader=="function"&&t.value.setOnBeforeClickHeader(e.beforeClickHeader),typeof e.afterClickHeader=="function"&&t.value.setOnAfterClickHeader(e.afterClickHeader),typeof e.beforeDblClickHeader=="function"&&t.value.setOnBeforeDblClickHeader(e.beforeDblClickHeader),typeof e.afterDblClickHeader=="function"&&t.value.setOnAfterDblClickHeader(e.afterDblClickHeader),typeof e.beforeEditEnter=="function"&&t.value.setOnBeforeEditEnter(e.beforeEditEnter),typeof e.afterEditEnter=="function"&&t.value.setOnAfterEditEnter(e.afterEditEnter),typeof e.editEnding=="function"&&t.value.setOnEditEnding(e.editEnding),typeof e.clickFilter=="function"&&t.value.setOnClickFilter(e.clickFilter),typeof e.chooseFilter=="function"&&t.value.setOnChooseFilter(e.chooseFilter),typeof e.paste=="function"&&t.value.setOnPaste(e.paste),typeof e.copy=="function"&&t.value.setOnCopy(e.copy),typeof e.resize=="function"&&t.value.setOnResize(e.resize),typeof e.keydownEditor=="function"&&t.value.setOnKeydownEditor(e.keydownEditor),typeof e.inputEditor=="function"&&t.value.setOnInputEditor(e.inputEditor),typeof e.keydownGrid=="function"&&t.value.setOnKeydownGrid(e.keydownGrid)),y("mounted",t.value)},B=()=>{l.unregisterReloadable(g),s.value&&C.unmountGrid(s.value)};return r.onMounted(h),r.onBeforeUnmount(B),r.watch(S,o=>{const n=t.value;if(n){const a=l.extractResponsiveClasses(l.toClassString(e.class)||"",S.value),i=l.getSpecificClassValueFromClassList(a,"color"),f=l.getSpecificClassValueFromClassList(a,"size"),c=e.sizeLevel&&l.hison.utils.isNumber(String(e.sizeLevel))?String(Math.min(Math.max(Number(e.sizeLevel),1),9)):m(5,f);n.setGridSizeLevel(Number(c));let u="";i&&!e.color&&(u=i),u&&(u=l.getHexCodeFromColorText(u)??u,n.setGridColor(u),(e.invertColor||l.hisonCloser.componentStyle.invertColor)&&n.invertColor(!0))}y("responsive-change",o)}),r.watch(()=>e.visible,o=>{const n=!!o;n!==v.value&&(v.value=n)}),r.watch(()=>e.class,()=>{F()}),{editorWrap:s,props:e,bindAttrs:O,responsiveClassList:k,visibleClass:E}}});function H(e,y,C,s,t,d){return r.openBlock(),r.createElementBlock("div",{ref:"editorWrap",class:r.normalizeClass(["hison-grid","hison-wrapper",...e.responsiveClassList,e.visibleClass]),style:r.normalizeStyle(e.props.style)},[r.createElementVNode("div",r.mergeProps({"data-vanillagrid":""},e.bindAttrs),null,16)],6)}const p=A._export_sfc(z,[["render",H]]);exports.default=p;