@farris/ui-vue 1.0.0-beta.2 → 1.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/accordion/index.esm.js +93 -0
  2. package/accordion/index.umd.js +1 -0
  3. package/accordion/package.json +7 -0
  4. package/accordion/style.css +1 -0
  5. package/avatar/index.esm.js +94 -0
  6. package/avatar/index.umd.js +1 -0
  7. package/avatar/package.json +7 -0
  8. package/avatar/style.css +1 -0
  9. package/button/index.esm.js +206 -0
  10. package/button/index.umd.js +1 -0
  11. package/button/package.json +7 -0
  12. package/button-edit/index.esm.js +300 -0
  13. package/button-edit/index.umd.js +1 -0
  14. package/button-edit/package.json +7 -0
  15. package/checkbox/index.esm.js +97 -0
  16. package/checkbox/index.umd.js +1 -0
  17. package/checkbox/package.json +7 -0
  18. package/combo-list/index.esm.js +457 -0
  19. package/combo-list/index.umd.js +1 -0
  20. package/combo-list/package.json +7 -0
  21. package/data-grid/index.esm.js +1536 -0
  22. package/data-grid/index.umd.js +1 -0
  23. package/data-grid/package.json +7 -0
  24. package/data-grid/style.css +1 -0
  25. package/date-picker/index.esm.js +1479 -0
  26. package/date-picker/index.umd.js +1 -0
  27. package/date-picker/package.json +7 -0
  28. package/date-picker/style.css +1 -0
  29. package/list-view/index.esm.js +144 -0
  30. package/list-view/index.umd.js +1 -0
  31. package/list-view/package.json +7 -0
  32. package/list-view/style.css +1 -0
  33. package/message-box/index.esm.js +499 -0
  34. package/message-box/index.umd.js +1 -0
  35. package/message-box/package.json +7 -0
  36. package/modal/index.esm.js +165 -0
  37. package/modal/index.umd.js +1 -0
  38. package/modal/package.json +7 -0
  39. package/notify/index.esm.js +187 -0
  40. package/notify/index.umd.js +1 -0
  41. package/notify/package.json +7 -0
  42. package/notify/style.css +1 -0
  43. package/package.json +4 -4
  44. package/pagination/index.esm.js +334 -0
  45. package/pagination/index.umd.js +1 -0
  46. package/pagination/package.json +7 -0
  47. package/pagination/style.css +1 -0
  48. package/popover/index.esm.js +83 -0
  49. package/popover/index.umd.js +1 -0
  50. package/popover/package.json +7 -0
  51. package/popover/style.css +1 -0
  52. package/radio-group/index.esm.js +79 -0
  53. package/radio-group/index.umd.js +1 -0
  54. package/radio-group/package.json +7 -0
  55. package/section/index.esm.js +70 -0
  56. package/section/index.umd.js +1 -0
  57. package/section/package.json +7 -0
  58. package/switch/index.esm.js +78 -0
  59. package/switch/index.umd.js +1 -0
  60. package/switch/package.json +7 -0
  61. package/tabs/index.esm.js +385 -0
  62. package/tabs/index.umd.js +1 -0
  63. package/tabs/package.json +7 -0
  64. package/tabs/style.css +1 -0
  65. package/text/index.esm.js +33 -0
  66. package/text/index.umd.js +1 -0
  67. package/text/package.json +7 -0
  68. package/tooltip/index.esm.js +195 -0
  69. package/tooltip/index.umd.js +1 -0
  70. package/tooltip/package.json +7 -0
  71. package/tooltip/style.css +1 -0
  72. /package/{src/index.esm.js → farris.all.esm.js} +0 -0
  73. /package/{src/index.umd.js → farris.all.umd.js} +0 -0
  74. /package/{src/style.css → style.css} +0 -0
@@ -0,0 +1,1536 @@
1
+ import { ref as D, watch as ce, computed as R, createVNode as S, resolveComponent as ye, Fragment as we, createTextVNode as be, defineComponent as Ce, onMounted as Se, nextTick as xe, onUnmounted as We } from "vue";
2
+ const qe = {
3
+ enable: { type: Boolean, default: !0 },
4
+ index: { type: Number, default: 1 },
5
+ mode: { type: String, default: "server" },
6
+ showGoto: { type: Boolean, default: !1 },
7
+ showIndex: { type: Boolean, default: !0 },
8
+ showLimits: { type: Boolean, default: !1 },
9
+ showPageInfo: { type: Boolean, default: !0 },
10
+ size: { type: Number, default: 20 },
11
+ sizeLimits: { type: Array, default: [10, 20, 30, 50, 100] },
12
+ total: { type: Number, default: 0 }
13
+ }, Ue = {
14
+ enable: { type: Boolean, default: !1 },
15
+ fields: { type: Array, default: [] },
16
+ mode: { type: String, default: "client" },
17
+ multiSort: { type: Boolean, default: !1 }
18
+ }, Je = {
19
+ customGroupRow: { type: Function, default: () => {
20
+ } },
21
+ customGroupRowStyle: { type: Function, default: () => {
22
+ } },
23
+ customSummaryStyle: { type: Function, default: () => {
24
+ } },
25
+ enable: { type: Boolean, default: !1 },
26
+ groupColSpan: { type: Number, default: 1 },
27
+ groupFields: { type: Array, default: [] },
28
+ showGroupedColumn: { type: Boolean, default: !0 },
29
+ showGroupPanel: { type: Boolean, default: !1 },
30
+ showSummary: { type: Boolean, default: !1 },
31
+ summaryPosition: { type: String, default: "separate" }
32
+ }, Qe = {
33
+ enable: { type: Boolean, default: !1 },
34
+ filterStyle: { type: String, default: "filter-column" },
35
+ mode: { type: String, default: "server" },
36
+ showSummary: { type: Boolean, default: !0 }
37
+ }, Ze = {
38
+ wrapHeadings: { type: Boolean, default: !1 }
39
+ }, Ie = {
40
+ enable: { type: Boolean, default: !1 },
41
+ heading: { type: String, default: "\u5E8F\u53F7" },
42
+ width: { type: Number, default: 36 }
43
+ }, et = {
44
+ customRowStyle: { type: Function, default: () => {
45
+ } },
46
+ disable: { type: Function, default: () => {
47
+ } },
48
+ height: { type: Number, default: 28 },
49
+ showHovering: { type: Boolean, default: !0 },
50
+ wrapContent: { type: Boolean, default: !1 }
51
+ }, tt = {
52
+ enable: { type: Boolean, default: !1 },
53
+ customSummaryStyle: { type: Function, default: () => {
54
+ } },
55
+ groupFields: { type: Array, default: [] },
56
+ mode: { type: String, default: "client" },
57
+ position: { type: String, default: "bottom" }
58
+ }, at = {
59
+ fitColumns: { type: Boolean, default: !1 },
60
+ fitMode: { type: String, default: "average" },
61
+ groups: { type: Array, defaut: [] },
62
+ reorderColumn: { type: Boolean, default: !1 },
63
+ resizeColumn: { type: Boolean, default: !0 },
64
+ resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
65
+ }, lt = {
66
+ checkOnSelect: { type: Boolean, default: !1 },
67
+ clearSelectionOnEmpty: { type: Boolean, default: !0 },
68
+ customSelectionItem: { type: Function, default: () => {
69
+ } },
70
+ enabelSelectRow: { type: Boolean, default: !0 },
71
+ keepSelectingOnClick: { type: Boolean, default: !0 },
72
+ keepSelectingOnPaging: { type: Boolean, default: !0 },
73
+ multiSelect: { type: Boolean, default: !1 },
74
+ focusSelection: { type: String, default: "current" },
75
+ selectOnCheck: { type: Boolean, default: !1 },
76
+ showCheckbox: { type: Boolean, default: !1 },
77
+ showSelectAll: { type: Boolean, default: !1 },
78
+ showSelection: { type: Boolean, default: !1 }
79
+ }, nt = {
80
+ selectOnEditing: { type: Boolean, default: !1 },
81
+ editMode: { type: String, default: "cell" }
82
+ }, Oe = {
83
+ columns: { type: Array, default: [] },
84
+ columnOption: { type: Object },
85
+ data: { type: Array, default: [] },
86
+ disable: { type: Boolean, default: !1 },
87
+ editable: { type: Boolean, default: !1 },
88
+ editOption: { type: Object },
89
+ filter: { type: Object },
90
+ fit: { type: Boolean, default: !1 },
91
+ group: { type: Object },
92
+ header: { type: Object },
93
+ height: { type: Number, default: 300 },
94
+ id: { type: String, default: "" },
95
+ idField: { type: String, default: "id", require: !0 },
96
+ mergeCell: { type: Boolean, default: !1 },
97
+ pagination: { type: Object },
98
+ rowNumber: { type: Object },
99
+ rowOption: { type: Object },
100
+ selection: { type: Object },
101
+ showBorder: { type: Boolean, default: !1 },
102
+ showFooter: { type: Boolean, default: !1 },
103
+ showHeader: { type: Boolean, default: !0 },
104
+ showOptions: { type: Boolean, default: !1 },
105
+ showScrollBar: { type: String, default: "auto" },
106
+ showStripe: { type: Boolean, default: !0 },
107
+ sort: { type: Object },
108
+ summary: { type: Object },
109
+ virtualized: { type: Boolean, default: !1 },
110
+ width: { type: Number, default: 800 }
111
+ };
112
+ var q = /* @__PURE__ */ ((t) => (t[t.readonly = 0] = "readonly", t[t.editable = 1] = "editable", t[t.editing = 2] = "editing", t))(q || {}), ee = /* @__PURE__ */ ((t) => (t[t.data = 0] = "data", t[t.group = 1] = "group", t[t.summary = 2] = "summary", t))(ee || {});
113
+ function He(t, g, d, m, O, w, B) {
114
+ var G, f;
115
+ const j = D(t.mergeCell), h = D(t.rowOption), M = ((G = h.value) == null ? void 0 : G.height) || 28, c = ((f = h.value) == null ? void 0 : f.wrapContent) || !1, r = D(O - 1 + w), b = D(0);
116
+ function n(_, H, x) {
117
+ const F = H && H.data[x];
118
+ if (F && F.data === _.data) {
119
+ const p = F && F.spannedBy || F;
120
+ p.rowSpan++, p.spanned = p.spanned || [], p.spanned.push(_), _.colSpan = 0, _.rowSpan = 0, _.spannedBy = p;
121
+ }
122
+ }
123
+ function u(_, H, x, F, W, p) {
124
+ const e = _.__fv_data_index__, l = {
125
+ index: F,
126
+ dataIndex: e,
127
+ top: W,
128
+ layer: -1,
129
+ type: ee.data,
130
+ pre: H,
131
+ data: {},
132
+ setRef: (i) => {
133
+ l.ref = i;
134
+ }
135
+ };
136
+ if (!c) {
137
+ l.height = M, _.__fv_data_height__ = l.height;
138
+ const i = l.pre;
139
+ if (i) {
140
+ const v = (i.__fv_data_position__ || 0) + (i.__fv_data_height__ || 0);
141
+ l.top = v, _.__fv_data_position__ = v;
142
+ }
143
+ }
144
+ return p.forEach((i, v) => {
145
+ const s = {
146
+ colSpan: 1,
147
+ rowSpan: 1,
148
+ index: v,
149
+ field: i.field,
150
+ mode: i.readonly ? q.readonly : q.editable,
151
+ data: _[i.field],
152
+ parent: l,
153
+ getEditor($) {
154
+ return B.getEditor($, i);
155
+ },
156
+ setRef: ($) => {
157
+ if (c && $) {
158
+ const P = s.parent;
159
+ s.cellHeight !== $.offsetHeight && (s.cellHeight = $.offsetHeight), s.cellHeight && s.cellHeight > (P.height || 0) && (P.height = s.cellHeight, _.__fv_data_height__ = P.height);
160
+ const C = P.pre;
161
+ if (C) {
162
+ const z = (C.__fv_data_position__ || 0) + (C.__fv_data_height__ || 0);
163
+ P.top = z, _.__fv_data_position__ = z;
164
+ }
165
+ }
166
+ },
167
+ update: ($) => {
168
+ $ !== void 0 && (_[i.field] = $, s.data = _[i.field]);
169
+ }
170
+ };
171
+ j.value && n(s, x, i.field), l.data[i.field] = s;
172
+ }), l;
173
+ }
174
+ function o(_, H, x, F) {
175
+ const { dataView: W } = m, p = [], e = F ? Date.now().toString() : "";
176
+ for (let l = _, i = 0; l < H; l++, i++) {
177
+ const v = W.value[l], s = W.value[l - 1] || x, $ = p[i - 1], P = s ? (s.__fv_data_position__ || 0) + (s.__fv_data_height__ || 0) : 0, C = v.__fv_data_grid_group_row__ ? d.renderGroupRow(v, s, l, P, g.value) : v.__fv_data_grid_group_summary__ ? d.renderSummaryRow(v, s, l, P, g.value) : u(v, s, $, l, P, g.value);
178
+ C.refreshKey = e, p.push(C);
179
+ }
180
+ return b.value = p[0].index, r.value = p[p.length - 1].index, p;
181
+ }
182
+ function a(_, H, x) {
183
+ const F = H.groupField || "", { groupValue: W } = H;
184
+ m[_](F, W);
185
+ const { dataView: p } = m, e = x[0].index, l = Math.min(e + O + w + 1, p.value.length);
186
+ return o(e, l);
187
+ }
188
+ return { getVisualData: o, maxVisibleRowIndex: r, minVisibleRowIndex: b, toggleGroupRow: a };
189
+ }
190
+ function $e(t, g) {
191
+ var b;
192
+ const d = ((b = t.rowOption) == null ? void 0 : b.height) || 28, m = D(g.value.primaryColumnsWidth);
193
+ function O(n) {
194
+ const u = {};
195
+ return n.reduce(
196
+ (o, a, G) => {
197
+ const f = G < n.length - 1 ? n[G + 1] : null;
198
+ return G === 0 && (o[a.field] = { left: 0, width: 0 }), o[a.field].width = a.actualWidth || 0, f && (o[f.field] = {
199
+ left: o[a.field].left + (a.actualWidth || 0),
200
+ width: 0
201
+ }), o;
202
+ },
203
+ u
204
+ ), u;
205
+ }
206
+ function w(n, u, o) {
207
+ const a = d * (o + 1), f = u[n.field].left - a + u[n.field].width, _ = n.parent.height ? `${n.parent.height}px` : "";
208
+ return {
209
+ left: `${a}px`,
210
+ width: `${f}px`,
211
+ height: `${_}`
212
+ };
213
+ }
214
+ function B(n, u, o) {
215
+ const a = n.parent.height ? `${n.parent.height}px` : "";
216
+ return {
217
+ right: "0px",
218
+ height: `${a}`
219
+ };
220
+ }
221
+ function j(n, u) {
222
+ const o = n.parent.height ? `${n.parent.height}px` : "";
223
+ return {
224
+ left: `${u[n.field].left}px`,
225
+ width: `${u[n.field].width}px`,
226
+ height: `${o}`
227
+ };
228
+ }
229
+ function h(n, u, o) {
230
+ const G = (u.spanned || []).reduce((_, H) => _ + (H.parent.height || 0), 0) + (n.height || 0);
231
+ return {
232
+ top: `${n.top}px`,
233
+ left: `${o[u.field].left}px`,
234
+ width: `${o[u.field].width}px`,
235
+ height: `${G}px`,
236
+ padding: `calc(${G / 2}px - 1rem) 0`
237
+ };
238
+ }
239
+ function M(n, u) {
240
+ return `${n.type}_r_${n.index}_c_${u}_${n.refreshKey || ""}`;
241
+ }
242
+ function c(n) {
243
+ return `${n.type}_r_${n.index}_${n.refreshKey || ""}`;
244
+ }
245
+ function r(n) {
246
+ const u = n.height ? `${n.height}px` : "";
247
+ return {
248
+ top: `${n.top}px`,
249
+ width: `${m.value}px`,
250
+ height: `${u}`
251
+ };
252
+ }
253
+ return ce(g, () => {
254
+ m.value = g.value.primaryColumnsWidth;
255
+ }), {
256
+ calculateCellPositionInRow: O,
257
+ cellKey: M,
258
+ cellPosition: j,
259
+ groupCellPosition: w,
260
+ rowKey: c,
261
+ rowPosition: r,
262
+ rowSpanCellPosition: h,
263
+ summaryCellPosition: B
264
+ };
265
+ }
266
+ function De(t, g, d, m, O, w, B, j) {
267
+ var K;
268
+ const { dataView: h } = g, { getVisualData: M, maxVisibleRowIndex: c, minVisibleRowIndex: r } = O, b = D(m.value.primaryColumnsWidth), n = D(m.value.leftColumnsWidth), u = D(m.value.rightColumnsWidth), o = ((K = t.rowOption) == null ? void 0 : K.height) || 28, a = D(0), G = D(0);
269
+ let f = 0, _ = w - 1;
270
+ const H = D(0), x = D(0), F = D(0), W = o * w, p = R(() => h.value.length * o), e = R(() => h.value.length > w + B ? Math.floor((w + B) / h.value.length * x.value) : x.value), l = R(() => Math.floor(F.value / b.value * H.value)), i = 0, v = 0, s = R(() => H.value - (n.value + b.value + u.value + j.value));
271
+ function $() {
272
+ const E = c.value < h.value.length ? h.value[c.value] : h.value[h.value.length - 1];
273
+ return (E.__fv_data_position__ || 0) + (E.__fv_data_height__ || 0) + Math.max(h.value.length - 1 - c.value, 0) * o;
274
+ }
275
+ function P(E) {
276
+ const V = h.value.find((X) => X.__fv_data_position__ > E);
277
+ return V ? V.__fv_index__ - 1 : 0;
278
+ }
279
+ function C(E) {
280
+ const V = Math.max(f - B, 0), X = Math.min(_ + B + 1, h.value.length), U = h.value[V - 1], de = M(V, X, U, E);
281
+ de.length && (d.value = [...de]);
282
+ }
283
+ function z(E) {
284
+ let V = a.value + E;
285
+ V > i && (V = i);
286
+ const X = V > i, U = $(), de = U > x.value;
287
+ de && V < x.value - U && (V = x.value - U), (!de || X) && (V = i), a.value !== V && (a.value = V, f = P(Math.abs(a.value)), _ = f + w, (f < r.value || _ > c.value - B / 2) && C());
288
+ }
289
+ function N(E) {
290
+ let V = G.value + E;
291
+ V > v && (V = v), V < s.value && (V = s.value), G.value !== V && (G.value = V);
292
+ }
293
+ ce(F, () => {
294
+ N(0);
295
+ }), ce(m, () => {
296
+ b.value = m.value.primaryColumnsWidth, n.value = m.value.leftColumnsWidth, u.value = m.value.rightColumnsWidth;
297
+ });
298
+ function L(E) {
299
+ E.preventDefault(), E.stopPropagation();
300
+ const V = (E.wheelDeltaY || E.deltaY) / 10, X = (E.wheelDeltaX || E.deltaX) / 10;
301
+ z(V), N(X);
302
+ }
303
+ const Y = R(() => ({
304
+ height: `${h.value.length * o}px`,
305
+ width: `${n.value}px`,
306
+ transform: `translateY(${a.value}px)`
307
+ })), J = R(() => ({
308
+ transform: `translateY(${a.value}px)`
309
+ })), Q = R(() => ({
310
+ height: `${h.value.length * o}px`,
311
+ width: `${b.value}px`,
312
+ transform: `translate(${G.value}px, ${a.value}px)`
313
+ })), te = R(() => ({
314
+ transform: `translate(${G.value}px, ${a.value}px)`
315
+ })), oe = R(() => ({
316
+ height: `${h.value.length * o}px`,
317
+ width: `${u.value}px`,
318
+ transform: `translateY(${a.value}px)`
319
+ })), ae = R(() => ({
320
+ transform: `translateY(${a.value}px)`
321
+ })), le = R(() => ({
322
+ height: `${h.value.length * o}px`,
323
+ width: `${j.value}px`,
324
+ transform: `translateY(${a.value}px)`
325
+ })), ne = R(() => ({
326
+ width: `${n.value}px`
327
+ })), fe = R(() => ({
328
+ transform: `translateX(${G.value}px)`
329
+ })), he = R(() => ({
330
+ width: `${u.value}px`
331
+ })), ve = R(() => {
332
+ const E = $();
333
+ return a.value / (x.value - E) * (x.value - e.value);
334
+ }), pe = R(() => ({
335
+ height: `${e.value}px`,
336
+ top: `${ve.value}px`
337
+ })), se = R(() => G.value / s.value * (H.value - l.value)), ue = R(() => ({
338
+ width: `${l.value}px`,
339
+ left: `${se.value}px`
340
+ })), ie = D(!1), Z = D(-1), I = D(-1);
341
+ let re;
342
+ function y(E) {
343
+ if (ie.value && I.value !== -1) {
344
+ const V = I.value - E.pageX, X = H.value - l.value;
345
+ if (Math.abs(V) <= X) {
346
+ const U = V / (F.value - l.value) * (b.value - F.value);
347
+ N(U), I.value = E.pageX;
348
+ }
349
+ }
350
+ }
351
+ function A(E) {
352
+ if (ie.value && Z.value !== -1) {
353
+ const V = Z.value - E.pageY, X = W - e.value;
354
+ if (Math.abs(V) <= X) {
355
+ const U = V / (W - e.value) * (p.value - W);
356
+ z(U), Z.value = E.pageY;
357
+ }
358
+ }
359
+ }
360
+ function k(E) {
361
+ ie.value = !1, Z.value = -1, I.value = -1, document.removeEventListener("mouseup", k), re && (re.removeEventListener("mousemove", y), re.removeEventListener("mousemove", A)), document.body.style.userSelect = "";
362
+ }
363
+ function T(E, V, X) {
364
+ ie.value = !0;
365
+ const U = X === "horizontal" ? y : A;
366
+ X === "vertical" && (Z.value = E.pageY), X === "horizontal" && (I.value = E.pageX), V.value && (V.value.addEventListener("mousemove", U), re = V.value, document.addEventListener("mouseup", k), document.body.style.userSelect = "none");
367
+ }
368
+ return {
369
+ onMouseDownScrollThumb: T,
370
+ onWheel: L,
371
+ dataGridWidth: H,
372
+ gridDataStyle: Q,
373
+ gridHeaderColumnsStyle: fe,
374
+ gridMergedDataStyle: te,
375
+ gridSideStyle: le,
376
+ viewPortWidth: F,
377
+ viewPortHeight: x,
378
+ horizontalScrollThumbStyle: ue,
379
+ leftFixedGridDataStyle: Y,
380
+ leftFixedGridHeaderColumnsStyle: ne,
381
+ leftFixedGridMergedDataStyle: J,
382
+ reCalculateVisualDataRows: C,
383
+ rightFixedGridDataStyle: oe,
384
+ rightFixedGridHeaderColumnsStyle: he,
385
+ rightFixedGridMergedDataStyle: ae,
386
+ verticalScrollThumbStyle: pe
387
+ };
388
+ }
389
+ function Ge(t) {
390
+ const g = D(t.idField), d = D(-1), m = D("");
391
+ function O(h) {
392
+ return {
393
+ "fv-grid-row": h.type === ee.data,
394
+ "fv-grid-group-row": h.type === ee.group,
395
+ "fv-grid-summary-row": h.type === ee.summary,
396
+ "fv-grid-row-hover": h.index === d.value,
397
+ "fv-grid-row-selected": h.data[g.value].data === m.value,
398
+ "fv-grid-row-odd": h.dataIndex % 2 > 0,
399
+ "fv-grid-row-even": h.dataIndex % 2 === 0
400
+ };
401
+ }
402
+ function w(h, M) {
403
+ m.value = M.data[g.value].data;
404
+ }
405
+ function B(h, M) {
406
+ d.value = M.index;
407
+ }
408
+ function j(h) {
409
+ return {
410
+ "fv-grid-sidebar-row": !0,
411
+ "fv-grid-sidebar-row-hover": h.index === d.value,
412
+ "fv-grid-sidebar-row-selected": h.data[g.value].data === m.value,
413
+ "fv-grid-sidebar-row-odd": h.dataIndex % 2 > 0,
414
+ "fv-grid-sidebar-row-even": h.dataIndex % 2 === 0
415
+ };
416
+ }
417
+ return { gridRowClass: O, onClickRow: w, onMouseoverRow: B, sidebarRowClass: j };
418
+ }
419
+ function je(t) {
420
+ const d = D({
421
+ defaultColumnWidth: 120,
422
+ headerDepth: 1,
423
+ leftColumns: [],
424
+ leftColumnsWidth: 0,
425
+ leftHeaderColumns: [],
426
+ primaryColumns: [],
427
+ primaryColumnsWidth: 0,
428
+ primaryHeaderColumns: [],
429
+ rightColumns: [],
430
+ rightColumnsWidth: 0,
431
+ rightHeaderColumns: [],
432
+ summaryColumns: []
433
+ }), m = D(t.summary), O = R(() => {
434
+ const h = m.value;
435
+ return (h == null ? void 0 : h.groupFields) || [];
436
+ });
437
+ function w(h) {
438
+ const M = /* @__PURE__ */ new Map();
439
+ return O.value && O.value.reduce((c, r) => (c.set(r, !0), c), M), h.reduce((c, r) => (r.fixed === "left" ? (d.value.leftColumns.push(r), d.value.leftColumnsWidth += r.actualWidth || 120) : r.fixed === "right" ? (d.value.rightColumns.push(r), d.value.rightColumnsWidth += r.actualWidth || 120) : (d.value.primaryColumns.push(r), d.value.primaryColumnsWidth += r.actualWidth || 120), M.has(r.field) && d.value.summaryColumns.push(r), c), d), d;
440
+ }
441
+ w(t.columns);
442
+ const B = R(() => d.value.leftColumns.length > 0), j = R(() => d.value.rightColumns.length > 0);
443
+ return { columnContext: d, hasLeftFixedColumn: B, hasRightFixedColumn: j };
444
+ }
445
+ function Fe(t, g) {
446
+ var M;
447
+ const d = D((M = t.columnOption) == null ? void 0 : M.groups);
448
+ function m(c, r, b, n, u) {
449
+ const o = {
450
+ actualWidth: 0,
451
+ children: [],
452
+ depth: 1,
453
+ field: c.field,
454
+ layer: 1,
455
+ left: 0,
456
+ parent: b,
457
+ resizable: !1,
458
+ title: c.title || ""
459
+ }, a = n || o;
460
+ if (c.group) {
461
+ let G = 1;
462
+ c.group.reduce((f, _) => {
463
+ if (typeof _ == "string") {
464
+ const H = r.get(_);
465
+ H && (u.fieldToRootMap.set(_, a), f.actualWidth += H.actualWidth, f.children.push(H));
466
+ } else {
467
+ const H = m(_, r, f, a, u);
468
+ G = Math.max(G, H.depth), f.actualWidth += H.actualWidth, f.children.push(H);
469
+ }
470
+ return f;
471
+ }, o), o.depth += G;
472
+ }
473
+ return g.value.headerDepth = Math.max(g.value.headerDepth, o.depth), o;
474
+ }
475
+ function O(c) {
476
+ const r = {
477
+ groupedCells: /* @__PURE__ */ new Map(),
478
+ fieldToRootMap: /* @__PURE__ */ new Map()
479
+ };
480
+ return d.value && d.value.reduce((b, n) => {
481
+ const u = m(n, c, null, null, r);
482
+ return b.groupedCells.set(n.field, u), b;
483
+ }, r), r;
484
+ }
485
+ function w(c) {
486
+ if (!c || c.length === 0)
487
+ return 0;
488
+ const r = c[0];
489
+ return r.children && r.children.length > 0 && (r.left = w(r.children)), r.left;
490
+ }
491
+ function B(c, r) {
492
+ const b = g.value.headerDepth;
493
+ c.forEach((n) => {
494
+ n.layer = r ? r.layer + 1 : 1;
495
+ const u = n.children && n.children.length === 0;
496
+ n.depth = u ? b - (n.layer - 1) : 1, n.left = u ? n.left : w(n.children), n.children && B(n.children, n);
497
+ });
498
+ }
499
+ function j(c, r) {
500
+ const b = /* @__PURE__ */ new Map();
501
+ return c.forEach((n) => {
502
+ const u = r.fieldToRootMap.get(n.field), o = u != null;
503
+ o && !b.has(u.field) && b.set(u.field, u), o || b.set(n.field, n);
504
+ }), B(Array.from(b.values())), b;
505
+ }
506
+ function h(c) {
507
+ let r = /* @__PURE__ */ new Map(), b = 0;
508
+ if (c.reduce((n, u) => (n.set(u.field, {
509
+ actualWidth: u.actualWidth || 0,
510
+ children: [],
511
+ depth: 1,
512
+ layer: 1,
513
+ left: b,
514
+ field: u.field,
515
+ parent: null,
516
+ resizable: u.resizable || !1,
517
+ title: u.title
518
+ }), b += u.actualWidth || 0, n), r), d.value) {
519
+ const n = O(r);
520
+ r = j(r, n);
521
+ }
522
+ return r;
523
+ }
524
+ return { getGridHeaderCells: h };
525
+ }
526
+ function Be(t, g) {
527
+ var H, x, F, W, p;
528
+ const { getGridHeaderCells: d } = Fe(t, g), m = 120, O = 32, w = D(((H = t.rowNumber) == null ? void 0 : H.enable) || !1), B = D(((x = t.selection) == null ? void 0 : x.multiSelect) || !1), j = D(
529
+ 0 + (w.value && ((F = t.rowNumber) == null ? void 0 : F.width) || 0) + (B.value ? O : 0)
530
+ ), h = D(((W = t.columnOption) == null ? void 0 : W.fitColumns) || !1), M = D(h.value && ((p = t.columnOption) == null ? void 0 : p.fitMode) || "none");
531
+ function c(e, l, i) {
532
+ const v = parseInt(e.width, 10) / 100;
533
+ return i * v;
534
+ }
535
+ function r(e, l, i) {
536
+ return typeof e.width == "string" ? c(e, l, i) : e.width || m;
537
+ }
538
+ function b(e, l) {
539
+ const i = [], v = [];
540
+ let s = 0;
541
+ e.value.primaryColumns.forEach((C) => {
542
+ typeof C.width == "string" ? v.push(C) : (C.width = C.width || m, s += C.width, i.push(C));
543
+ });
544
+ const $ = l * (i.length / e.value.primaryColumns.length);
545
+ i.forEach((C) => {
546
+ const z = $ * (C.width / s);
547
+ C.actualWidth = z, e.value.primaryColumnsWidth += C.actualWidth;
548
+ });
549
+ const P = l - $;
550
+ v.forEach((C) => {
551
+ const z = c(C, e.value, P);
552
+ C.actualWidth = z, e.value.primaryColumnsWidth += C.actualWidth;
553
+ });
554
+ }
555
+ function n(e, l) {
556
+ const i = l / (e.value.primaryColumns.length || 1);
557
+ e.value.primaryColumns.forEach((v) => {
558
+ v.actualWidth = i, e.value.primaryColumnsWidth += v.actualWidth;
559
+ });
560
+ }
561
+ function u(e, l) {
562
+ const i = [], v = [], s = /* @__PURE__ */ new WeakMap();
563
+ let $ = 0, P = 0;
564
+ if (e.value.primaryColumns.forEach((z) => {
565
+ if (typeof z.width == "string") {
566
+ const N = c(z, e.value, l);
567
+ s.set(z, N), $ += N, v.push(z);
568
+ } else
569
+ z.width = z.width || m, P += z.width, i.push(z);
570
+ }), l - $ > P) {
571
+ const z = l - $;
572
+ v.forEach((N) => {
573
+ N.actualWidth = s.get(N) || m, e.value.primaryColumnsWidth += N.actualWidth;
574
+ }), i.forEach((N) => {
575
+ N.actualWidth = z * (N.width / P), e.value.primaryColumnsWidth += N.actualWidth;
576
+ });
577
+ } else
578
+ b(e, l);
579
+ }
580
+ function o(e, l) {
581
+ e.value.primaryColumns.forEach((i) => {
582
+ i.actualWidth = r(i, e.value, l), e.value.primaryColumnsWidth += i.actualWidth;
583
+ });
584
+ }
585
+ const a = {
586
+ average: n,
587
+ expand: u,
588
+ none: o,
589
+ percentage: b
590
+ };
591
+ function G(e) {
592
+ e.value.leftHeaderColumns = Array.from(d(e.value.leftColumns).values()), e.value.primaryHeaderColumns = Array.from(d(e.value.primaryColumns).values()), e.value.rightHeaderColumns = Array.from(d(e.value.rightColumns).values());
593
+ }
594
+ function f(e) {
595
+ e.value.leftColumnsWidth = 0, e.value.primaryColumnsWidth = 0, e.value.rightColumnsWidth = 0, e.value.leftColumns.forEach((l) => {
596
+ e.value.leftColumnsWidth += l.actualWidth || 0;
597
+ }), e.value.primaryColumns.forEach((l) => {
598
+ e.value.primaryColumnsWidth += l.actualWidth || 0;
599
+ }), e.value.rightColumns.forEach((l) => {
600
+ e.value.rightColumnsWidth += l.actualWidth || 0;
601
+ }), e.value = Object.assign({}, e.value);
602
+ }
603
+ function _(e, l, i) {
604
+ if (l) {
605
+ e.value.leftColumnsWidth = 0, e.value.primaryColumnsWidth = 0, e.value.rightColumnsWidth = 0;
606
+ const v = l.clientWidth - j.value;
607
+ e.value.leftColumns.forEach((P) => {
608
+ P.actualWidth = r(P, e.value, v), e.value.leftColumnsWidth += P.actualWidth;
609
+ }), e.value.rightColumns.forEach((P) => {
610
+ P.actualWidth = r(P, e.value, v), e.value.rightColumnsWidth += P.actualWidth;
611
+ });
612
+ const s = v - e.value.leftColumnsWidth - e.value.rightColumnsWidth, $ = a[M.value];
613
+ $ && $(e, s), i.value = s, G(e), e.value = Object.assign({}, e.value);
614
+ }
615
+ }
616
+ return { calculateColumnHeaders: G, calculateColumnsSize: _, calculateColumnsWidth: f };
617
+ }
618
+ function Me(t) {
619
+ var M, c, r;
620
+ const d = D(((M = t.rowNumber) == null ? void 0 : M.enable) || !1), m = D(((c = t.selection) == null ? void 0 : c.showCheckbox) || !1), O = D(d.value && ((r = t.rowNumber) == null ? void 0 : r.width) || 0), w = D(m.value ? 50 : 0), B = R(() => w.value + O.value);
621
+ function j(b) {
622
+ return {
623
+ top: `${b.top}px`,
624
+ width: `${B.value}px`,
625
+ height: `${b.height || ""}px`
626
+ };
627
+ }
628
+ const h = R(() => ({
629
+ width: `${B.value}px`
630
+ }));
631
+ return { showRowCheckbox: m, showRowNumer: d, sidebarCellPosition: j, sidebarCornerCellStyle: h, sidebarWidth: B };
632
+ }
633
+ function me(t) {
634
+ const g = D(t.idField), d = D(t.summary), m = D(t.group), O = R(() => {
635
+ const a = d.value;
636
+ return (a == null ? void 0 : a.groupFields) || [];
637
+ }), w = R(() => {
638
+ const a = d.value;
639
+ return a && a.enable && a.groupFields && a.groupFields.length > 0;
640
+ }), B = R(() => {
641
+ const a = m.value;
642
+ return a && a.showSummary;
643
+ }), j = /* @__PURE__ */ new Map();
644
+ let h = [], M = "";
645
+ function c(a, G, f, _) {
646
+ const H = _[f];
647
+ H && (G.reduce((x, F, W) => {
648
+ const p = F[H];
649
+ let e = x.get(p);
650
+ if (!e) {
651
+ const l = O.value.reduce((i, v) => (i.set(v, 0), i), /* @__PURE__ */ new Map());
652
+ e = { field: H, value: p, layer: f, details: [], groupSummaries: l }, x.set(p, e);
653
+ }
654
+ return O.value && O.value.forEach((l) => {
655
+ if (e) {
656
+ const i = e.groupSummaries.get(l) || 0;
657
+ e.groupSummaries.set(l, i + F[l]);
658
+ }
659
+ }), e.details.push(F), x;
660
+ }, a), f < _.length - 1 && a.forEach((x, F) => {
661
+ x.nestGroup = /* @__PURE__ */ new Map(), c(x.nestGroup, x.details, f + 1, _), x.details = [];
662
+ }));
663
+ }
664
+ function r(a) {
665
+ const G = [];
666
+ return a.forEach((f) => {
667
+ const _ = {
668
+ __fv_data_grid_group_collapse__: !1,
669
+ __fv_data_grid_group_field__: f.field,
670
+ __fv_data_grid_group_layer__: f.layer,
671
+ __fv_data_grid_group_row__: !0,
672
+ __fv_data_grid_group_value__: f.value
673
+ };
674
+ let H = 0;
675
+ if (G.push(_), f.nestGroup) {
676
+ const x = r(f.nestGroup);
677
+ G.push(...x), H += x.length;
678
+ }
679
+ if (f.details && f.details.length && (G.push(...f.details), H += f.details.length), B.value) {
680
+ const x = {
681
+ __fv_data_grid_group_field__: f.field,
682
+ __fv_data_grid_group_layer__: f.layer,
683
+ __fv_data_grid_group_summary__: !0
684
+ };
685
+ x[g.value] = `summary_of_${f.field}_${f.value}`, x[f.field] = Array.from(f.groupSummaries.entries()).reduce(
686
+ (F, [W, p]) => `${F} ${W} total:${p} `,
687
+ ""
688
+ ), G.push(x);
689
+ }
690
+ f.groupSummaries && f.groupSummaries.size && f.groupSummaries.forEach((x, F) => {
691
+ _[F] = x;
692
+ }), _[g.value] = `group_of_${f.field}_${f.value}`, _[f.field] = `${f.field}:${f.value} (${H})`;
693
+ }), G.forEach((f, _) => {
694
+ f.__fv_data_index__ = _;
695
+ }), G;
696
+ }
697
+ function b(a, G) {
698
+ if (!a || a.length === 0)
699
+ return G;
700
+ const f = a.join(",");
701
+ return f !== M && (j.clear(), h = [], M = f, c(j, G, 0, a), h = r(j)), h;
702
+ }
703
+ function n(a, G, f, _, H) {
704
+ const x = a.__fv_data_grid_group_collapse__, F = a.__fv_data_grid_group_field__, W = a.__fv_data_grid_group_value__, p = a.__fv_data_index__, e = a.__fv_data_grid_group_layer__, l = {
705
+ collapse: x,
706
+ data: {},
707
+ dataIndex: p,
708
+ groupField: F,
709
+ groupValue: W,
710
+ layer: e,
711
+ index: f,
712
+ pre: G,
713
+ top: _,
714
+ type: ee.group,
715
+ setRef: (s) => {
716
+ l.ref = s;
717
+ }
718
+ }, i = {
719
+ colSpan: 0,
720
+ rowSpan: 0,
721
+ index: -1,
722
+ field: g.value,
723
+ data: a[g.value],
724
+ parent: l,
725
+ mode: q.readonly,
726
+ getEditor: (s) => s.data,
727
+ setRef: (s) => {
728
+ if (s) {
729
+ const $ = i.parent;
730
+ i.cellHeight !== s.offsetHeight && (i.cellHeight = s.offsetHeight), i.cellHeight && i.cellHeight > ($.height || 0) && ($.height = i.cellHeight, a.__fv_data_height__ = $.height);
731
+ const P = $.pre;
732
+ if (P) {
733
+ const C = (P.__fv_data_position__ || 0) + (P.__fv_data_height__ || 0);
734
+ $.top = C, a.__fv_data_position__ = C;
735
+ }
736
+ }
737
+ },
738
+ update: () => {
739
+ }
740
+ };
741
+ l.data[g.value] = i;
742
+ const v = {
743
+ colSpan: H.length,
744
+ rowSpan: 1,
745
+ index: 1,
746
+ field: F,
747
+ data: a[F],
748
+ parent: l,
749
+ mode: q.readonly,
750
+ getEditor: (s) => s.data,
751
+ setRef: (s) => {
752
+ if (s) {
753
+ const $ = v.parent;
754
+ v.cellHeight !== s.offsetHeight && (v.cellHeight = s.offsetHeight), v.cellHeight && v.cellHeight > ($.height || 0) && ($.height = v.cellHeight, a.__fv_data_height__ = $.height);
755
+ const P = $.pre;
756
+ if (P) {
757
+ const C = (P.__fv_data_position__ || 0) + (P.__fv_data_height__ || 0);
758
+ $.top = C, a.__fv_data_position__ = C;
759
+ }
760
+ }
761
+ },
762
+ update: () => {
763
+ }
764
+ };
765
+ if (l.data[F] = v, w.value) {
766
+ let s = v.colSpan;
767
+ const $ = O.value.reduce((P, C) => (P.set(C, !0), P), /* @__PURE__ */ new Map());
768
+ H.reduce((P, C, z) => {
769
+ if ($.has(C.field)) {
770
+ const N = {
771
+ colSpan: 1,
772
+ rowSpan: 1,
773
+ index: z,
774
+ field: C.field,
775
+ data: a[C.field],
776
+ parent: l,
777
+ mode: q.readonly,
778
+ getEditor: (L) => L.data,
779
+ setRef: (L) => {
780
+ if (L) {
781
+ const Y = N.parent;
782
+ N.cellHeight !== L.offsetHeight && (N.cellHeight = L.offsetHeight), N.cellHeight && N.cellHeight > (Y.height || 0) && (Y.height = N.cellHeight, a.__fv_data_height__ = Y.height);
783
+ const J = Y.pre;
784
+ if (J) {
785
+ const Q = (J.__fv_data_position__ || 0) + (J.__fv_data_height__ || 0);
786
+ Y.top = Q, a.__fv_data_position__ = Q;
787
+ }
788
+ }
789
+ },
790
+ update: () => {
791
+ }
792
+ };
793
+ l.data[C.field] = N, s - 1 > z && (s = z);
794
+ }
795
+ return P;
796
+ }, l), v.colSpan = s;
797
+ }
798
+ return l;
799
+ }
800
+ function u(a, G, f, _, H) {
801
+ const x = a.__fv_data_grid_group_field__, F = a.__fv_data_index__, W = a.__fv_data_grid_group_layer__, p = {
802
+ data: {},
803
+ dataIndex: F,
804
+ groupField: x,
805
+ groupValue: null,
806
+ layer: W,
807
+ index: f,
808
+ pre: G,
809
+ top: _,
810
+ type: ee.summary,
811
+ setRef: (i) => {
812
+ p.ref = i;
813
+ }
814
+ }, e = {
815
+ colSpan: 0,
816
+ rowSpan: 0,
817
+ index: -1,
818
+ field: g.value,
819
+ data: a[g.value],
820
+ parent: p,
821
+ mode: q.readonly,
822
+ getEditor: (i) => i.data,
823
+ setRef: (i) => {
824
+ if (i) {
825
+ const v = e.parent;
826
+ e.cellHeight !== i.offsetHeight && (e.cellHeight = i.offsetHeight), e.cellHeight && e.cellHeight > (v.height || 0) && (v.height = e.cellHeight, a.__fv_data_height__ = v.height);
827
+ const s = v.pre;
828
+ if (s) {
829
+ const $ = (s.__fv_data_position__ || 0) + (s.__fv_data_height__ || 0);
830
+ v.top = $, a.__fv_data_position__ = $;
831
+ }
832
+ }
833
+ },
834
+ update: () => {
835
+ }
836
+ };
837
+ p.data[g.value] = e;
838
+ const l = {
839
+ colSpan: H.length,
840
+ rowSpan: 1,
841
+ index: 1,
842
+ field: x,
843
+ data: a[x],
844
+ parent: p,
845
+ mode: q.readonly,
846
+ getEditor: (i) => i.data,
847
+ setRef: (i) => {
848
+ if (i) {
849
+ const v = l.parent;
850
+ l.cellHeight !== i.offsetHeight && (l.cellHeight = i.offsetHeight), l.cellHeight && l.cellHeight > (v.height || 0) && (v.height = l.cellHeight, a.__fv_data_height__ = v.height);
851
+ const s = v.pre;
852
+ if (s) {
853
+ const $ = (s.__fv_data_position__ || 0) + (s.__fv_data_height__ || 0);
854
+ v.top = $, a.__fv_data_position__ = $;
855
+ }
856
+ }
857
+ },
858
+ update: () => {
859
+ }
860
+ };
861
+ return p.data[x] = l, p;
862
+ }
863
+ function o(a) {
864
+ return {
865
+ "f-icon": !0,
866
+ "f-icon-arrow-chevron-down": !0,
867
+ "fv-grid-group-row-icon-collapse": a.collapse
868
+ };
869
+ }
870
+ return { collpaseGroupIconClass: o, renderGroupedData: b, renderGroupRow: n, renderSummaryRow: u };
871
+ }
872
+ function Pe(t) {
873
+ var x, F;
874
+ const g = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), m = D(((x = t.group) == null ? void 0 : x.groupFields) || []), O = D(((F = t.group) == null ? void 0 : F.enable) || !1), w = D(t.data), B = me(t), j = D(t.summary), h = R(() => {
875
+ const W = j.value;
876
+ return (W == null ? void 0 : W.groupFields) || [];
877
+ }), M = h.value.reduce((W, p) => (W.set(p, 0), W), /* @__PURE__ */ new Map()), c = R(() => w.value.length), r = D(t.pagination), b = R(() => {
878
+ var W;
879
+ return ((W = r.value) == null ? void 0 : W.size) || w.value.length;
880
+ }), n = D(1);
881
+ function u() {
882
+ let W = w.value;
883
+ O.value && (W = B.renderGroupedData(m.value, w.value));
884
+ const p = (n.value - 1) * b.value, e = Math.min(p + b.value, c.value);
885
+ let l = 0;
886
+ const i = [];
887
+ for (let v = p; v < e; v++) {
888
+ const s = W[v];
889
+ s.__fv_data_grid_group_row__ ? (l = 0, s.__fv_data_index__ = "") : s.__fv_data_grid_group_summary__ ? s.__fv_data_index__ = "" : (l++, s.__fv_data_index__ = l), s.__fv_index__ = v, h.value.forEach(($) => {
890
+ const P = M.get($) || 0;
891
+ M.set($, P + s[$]);
892
+ }), i.push(s);
893
+ }
894
+ return i;
895
+ }
896
+ const o = D(u());
897
+ function a(W, p = !1) {
898
+ const e = p ? u() : o.value;
899
+ return o.value = e.filter((l, i) => W.reduce((v, s) => v && s(l), !0)).map((l, i) => {
900
+ if (l.__fv_data_grid_group_row__) {
901
+ const v = `group_of_${l.__fv_data_grid_group_field__}_${l.__fv_data_grid_group_value__}`;
902
+ l.__fv_data_grid_group_collapse__ = !!g.get(v);
903
+ }
904
+ return l.__fv_index__ = i, l;
905
+ }), o.value;
906
+ }
907
+ function G(W, p) {
908
+ const e = `group_of_${W}_${p}`;
909
+ g.set(e, !0);
910
+ const l = (i) => i[W] !== p;
911
+ return d.set(`collapse_${W}_${p}`, l), a(Array.from(d.values()));
912
+ }
913
+ function f(W, p) {
914
+ const e = `group_of_${W}_${p}`;
915
+ return g.set(e, !1), d.delete(`collapse_${W}_${p}`), a(Array.from(d.values()), !0);
916
+ }
917
+ function _(W, p, e) {
918
+ return (W && W.length ? o.value.filter((i, v) => W.reduce((s, $) => s && $(i), !0)) : o.value).slice(p, e);
919
+ }
920
+ function H(W) {
921
+ if (W * b.value < c.value) {
922
+ n.value = W;
923
+ const e = u();
924
+ o.value = e;
925
+ }
926
+ }
927
+ return { collapse: G, dataView: o, expand: f, getRange: _, navigatePageTo: H, summaries: M, totalItems: c };
928
+ }
929
+ function Ee(t) {
930
+ return S(ye("f-date-picker"), {
931
+ modelValue: t.data,
932
+ onDatePicked: (g) => t.update(g)
933
+ }, null);
934
+ }
935
+ function ke(t) {
936
+ const g = R(() => ({
937
+ height: "100%",
938
+ resize: "none"
939
+ }));
940
+ return S("textarea", {
941
+ class: "form-control",
942
+ name: "text-area-cell-editor",
943
+ onInput: (d) => {
944
+ var m;
945
+ return t.update((m = d.target) == null ? void 0 : m.value);
946
+ },
947
+ style: g.value,
948
+ title: t.data,
949
+ value: t.data
950
+ }, null);
951
+ }
952
+ function ge(t) {
953
+ return S("input", {
954
+ class: "form-control",
955
+ name: "text-cell-editor",
956
+ title: t.data,
957
+ type: "text",
958
+ value: t.data,
959
+ onChange: (g) => {
960
+ var d;
961
+ return t.update((d = g.target) == null ? void 0 : d.value);
962
+ }
963
+ }, null);
964
+ }
965
+ function Re(t) {
966
+ var c;
967
+ const g = D(t.editable), d = D(((c = t.rowOption) == null ? void 0 : c.wrapContent) || !1);
968
+ ce(
969
+ () => t.editable,
970
+ () => {
971
+ g.value = t.editable;
972
+ }
973
+ );
974
+ const m = /* @__PURE__ */ new Map([
975
+ ["boolean", "checkbox"],
976
+ ["datetime", "date-picker"],
977
+ ["number", "text-editor"],
978
+ ["string", "text-editor"],
979
+ ["text", "text-area"]
980
+ ]), O = /* @__PURE__ */ new Map([
981
+ ["checkbox", ge],
982
+ ["date-picker", Ee],
983
+ ["text-editor", ge],
984
+ ["text-area", ke]
985
+ ]);
986
+ let w;
987
+ function B(r) {
988
+ r.mode = q.editing, w = r;
989
+ }
990
+ function j(r) {
991
+ r.mode = q.editable;
992
+ }
993
+ function h(r, b) {
994
+ g.value && b.mode === q.editable && w !== b && (w && j(w), B(b));
995
+ }
996
+ function M(r, b) {
997
+ const n = b.dataType;
998
+ let u = b.editor || m.get(n) || "text-editor";
999
+ !d.value && u === "text-area" && (u = "text-editor");
1000
+ const o = O.get(u);
1001
+ return o ? o(r) : r.data;
1002
+ }
1003
+ return { getEditor: M, onClickCell: h };
1004
+ }
1005
+ function ze(t, g, d, m, O, w, B, j, h, M) {
1006
+ const {
1007
+ calculateCellPositionInRow: c,
1008
+ cellKey: r,
1009
+ cellPosition: b,
1010
+ rowKey: n,
1011
+ rowPosition: u,
1012
+ rowSpanCellPosition: o,
1013
+ groupCellPosition: a,
1014
+ summaryCellPosition: G
1015
+ } = d, {
1016
+ collpaseGroupIconClass: f
1017
+ } = w, {
1018
+ gridRowClass: _,
1019
+ onClickRow: H,
1020
+ onMouseoverRow: x
1021
+ } = B, {
1022
+ onClickCell: F
1023
+ } = O, {
1024
+ toggleGroupRow: W
1025
+ } = j, {
1026
+ columnContext: p,
1027
+ hasLeftFixedColumn: e,
1028
+ hasRightFixedColumn: l
1029
+ } = m, {
1030
+ onMouseDownScrollThumb: i,
1031
+ onWheel: v,
1032
+ dataGridWidth: s,
1033
+ gridDataStyle: $,
1034
+ gridMergedDataStyle: P,
1035
+ gridSideStyle: C,
1036
+ viewPortHeight: z,
1037
+ viewPortWidth: N,
1038
+ horizontalScrollThumbStyle: L,
1039
+ leftFixedGridDataStyle: Y,
1040
+ leftFixedGridMergedDataStyle: J,
1041
+ rightFixedGridDataStyle: Q,
1042
+ rightFixedGridMergedDataStyle: te,
1043
+ verticalScrollThumbStyle: oe
1044
+ } = h;
1045
+ function ae(y, A) {
1046
+ A.collapse = !A.collapse, M.value = W(A.collapse ? "collapse" : "expand", A, M.value);
1047
+ }
1048
+ function le(y, A) {
1049
+ const k = [];
1050
+ if (y.groupField && A[y.groupField]) {
1051
+ for (let K = 0; K <= y.layer; K++)
1052
+ k.push(S("div", {
1053
+ class: "fv-grid-group-row-icon",
1054
+ onClick: (E) => ae(E, y)
1055
+ }, [S("span", {
1056
+ class: f(y)
1057
+ }, null)]));
1058
+ const T = y.data[y.groupField];
1059
+ k.push(S("div", {
1060
+ ref: T.setRef,
1061
+ key: r(y, y.layer + 1),
1062
+ class: "fv-grid-cell",
1063
+ style: a(T, A, y.layer)
1064
+ }, [T.data])), Object.values(y.data).filter((K) => K.field !== y.groupField && K.colSpan !== 0).forEach((K) => {
1065
+ k.push(S("div", {
1066
+ ref: K.setRef,
1067
+ key: r(y, K.index),
1068
+ class: "fv-grid-cell",
1069
+ style: b(K, A)
1070
+ }, [K.data]));
1071
+ });
1072
+ }
1073
+ return k;
1074
+ }
1075
+ function ne(y, A) {
1076
+ return y.layer > -1 && S("div", {
1077
+ ref: y.setRef,
1078
+ key: n(y),
1079
+ class: _(y),
1080
+ style: u(y),
1081
+ onClick: (k) => H(k, y),
1082
+ onMouseover: (k) => x(k, y)
1083
+ }, [le(y, A)]);
1084
+ }
1085
+ function fe(y, A) {
1086
+ const k = [];
1087
+ if (y.groupField && A[y.groupField]) {
1088
+ const T = y.data[y.groupField];
1089
+ k.push(S("div", {
1090
+ ref: T.setRef,
1091
+ key: r(y, y.layer + 1),
1092
+ class: "fv-grid-cell",
1093
+ style: G(T, A, y.layer)
1094
+ }, [T.data]));
1095
+ }
1096
+ return k;
1097
+ }
1098
+ function he(y, A) {
1099
+ return y.layer > -1 && S("div", {
1100
+ ref: y.setRef,
1101
+ key: n(y),
1102
+ class: _(y),
1103
+ style: u(y),
1104
+ onClick: (k) => H(k, y),
1105
+ onMouseover: (k) => x(k, y)
1106
+ }, [fe(y, A)]);
1107
+ }
1108
+ function ve(y, A) {
1109
+ return S("div", {
1110
+ ref: y.setRef,
1111
+ key: n(y),
1112
+ class: _(y),
1113
+ style: u(y),
1114
+ onClick: (k) => H(k, y),
1115
+ onMouseover: (k) => x(k, y)
1116
+ }, [Object.values(y.data).filter((k) => A[k.field] && k.rowSpan === 1).map((k) => S("div", {
1117
+ ref: k.setRef,
1118
+ key: r(y, k.index),
1119
+ class: "fv-grid-cell",
1120
+ style: b(k, A),
1121
+ onClick: (T) => F(T, k)
1122
+ }, [k.mode === q.editing ? k.getEditor(k) : k.data]))]);
1123
+ }
1124
+ const pe = [ve, ne, he];
1125
+ function se(y, A) {
1126
+ const k = c(y);
1127
+ return M.value.map((T) => pe[T.type](T, k));
1128
+ }
1129
+ function ue(y) {
1130
+ const A = c(y);
1131
+ return M.value.map((k) => Object.values(k.data).filter((T) => A[T.field] && T.rowSpan > 1).map((T) => S("div", {
1132
+ key: r(k, T.index),
1133
+ class: "fv-grid-cell fv-grid-merged-cell",
1134
+ style: o(k, T, A)
1135
+ }, [T.data])));
1136
+ }
1137
+ function ie() {
1138
+ return S("div", {
1139
+ class: "fv-grid-content-left-fixed"
1140
+ }, [S("div", {
1141
+ class: "fv-grid-data",
1142
+ style: Y.value
1143
+ }, [se(p.value.leftColumns)]), S("div", {
1144
+ class: "fv-grid-merge-date",
1145
+ style: J.value
1146
+ }, [ue(p.value.leftColumns)])]);
1147
+ }
1148
+ function Z() {
1149
+ return S("div", {
1150
+ ref: g,
1151
+ class: "fv-grid-content-primary"
1152
+ }, [S("div", {
1153
+ class: "fv-grid-data",
1154
+ style: $.value
1155
+ }, [se(p.value.primaryColumns)]), S("div", {
1156
+ class: "fv-grid-merge-date",
1157
+ style: P.value
1158
+ }, [ue(p.value.primaryColumns)])]);
1159
+ }
1160
+ function I() {
1161
+ return S("div", {
1162
+ class: "fv-grid-content-right-fixed"
1163
+ }, [S("div", {
1164
+ class: "fv-grid-data",
1165
+ style: Q.value
1166
+ }, [se(p.value.rightColumns)]), S("div", {
1167
+ class: "fv-grid-merge-date",
1168
+ style: te.value
1169
+ }, [ue(p.value.rightColumns)])]);
1170
+ }
1171
+ function re() {
1172
+ const y = [];
1173
+ return e.value && y.push(ie()), y.push(Z()), l.value && y.push(I()), y;
1174
+ }
1175
+ return {
1176
+ renderDataArea: re
1177
+ };
1178
+ }
1179
+ function Ve(t, g, d, m) {
1180
+ const O = D(-1), w = D(0), B = D(!1);
1181
+ let j = "";
1182
+ const h = R(() => ({
1183
+ display: B.value ? "block" : "none",
1184
+ left: `${w.value}px`
1185
+ })), M = R(() => ({
1186
+ display: B.value ? "block" : "none"
1187
+ }));
1188
+ function c(n) {
1189
+ w.value = n.clientX - n.target.parentElement.offsetLeft;
1190
+ }
1191
+ function r(n) {
1192
+ const u = g.value.primaryColumns.find((o) => o.field === j) || g.value.leftColumns.find((o) => o.field === j) || g.value.rightColumns.find((o) => o.field === j);
1193
+ if (u) {
1194
+ const o = n.clientX - n.target.parentElement.offsetLeft;
1195
+ u.actualWidth = (u.actualWidth || 0) + (o - O.value), d.calculateColumnHeaders(g), d.calculateColumnsWidth(g);
1196
+ }
1197
+ w.value = 0, B.value = !1, m.reCalculateVisualDataRows(), document.removeEventListener("mousemove", c), document.body.style.userSelect = "", j = "";
1198
+ }
1199
+ function b(n, u) {
1200
+ j = u, B.value = !0;
1201
+ const o = n.path.find((a) => a.className.split(" ")[0] === "fv-grid");
1202
+ w.value = n.clientX - o.offsetLeft, O.value = n.clientX - o.offsetLeft, document.addEventListener("mousemove", c), document.addEventListener("mouseup", r), document.body.style.userSelect = "none";
1203
+ }
1204
+ return { onClickColumnResizeBar: b, resizeHandleStyle: h, resizeOverlayStyle: M };
1205
+ }
1206
+ function Ne(t, g, d, m, O, w, B) {
1207
+ const {
1208
+ showRowCheckbox: j,
1209
+ showRowNumer: h,
1210
+ sidebarCornerCellStyle: M
1211
+ } = O, {
1212
+ columnContext: c,
1213
+ hasLeftFixedColumn: r,
1214
+ hasRightFixedColumn: b
1215
+ } = d, {
1216
+ onClickColumnResizeBar: n,
1217
+ resizeHandleStyle: u,
1218
+ resizeOverlayStyle: o
1219
+ } = Ve(t, c, m, w), {
1220
+ gridHeaderColumnsStyle: a,
1221
+ leftFixedGridHeaderColumnsStyle: G,
1222
+ rightFixedGridHeaderColumnsStyle: f
1223
+ } = w, _ = c.value.defaultColumnWidth, H = 32, x = /* @__PURE__ */ new Map([[0, 0]]);
1224
+ function F(C, z) {
1225
+ const N = x.get(z) || 0, L = {
1226
+ height: `${C.depth * H}px`,
1227
+ left: `${C.left}px`,
1228
+ top: `${(C.layer - 1) * H}px`,
1229
+ width: `${C.actualWidth}px`
1230
+ };
1231
+ return c.value.headerDepth > 1 && (L["line-height"] = `${C.depth * H}px`), x.set(z + 1, N + (C.actualWidth || _)), L;
1232
+ }
1233
+ const W = R(() => ({
1234
+ "fv-grid-header": !0,
1235
+ "fv-grid-header-group-columns": c.value.headerDepth > 1
1236
+ })), p = R(() => ({
1237
+ height: `${c.value.headerDepth * H}px`
1238
+ }));
1239
+ function e(C, z) {
1240
+ return S("div", {
1241
+ class: "fv-grid-header-cell",
1242
+ style: F(C, z)
1243
+ }, [C.title, C.resizable && S("span", {
1244
+ class: "fv-column-resize-bar",
1245
+ onMousedown: (N) => n(N, C.field)
1246
+ }, null)]);
1247
+ }
1248
+ function l(C) {
1249
+ return C.map((z, N) => {
1250
+ const L = [];
1251
+ if (L.push(e(z, N)), z.children && z.children.length) {
1252
+ const Y = l(z.children);
1253
+ L.push(...Y);
1254
+ }
1255
+ return L;
1256
+ });
1257
+ }
1258
+ function i() {
1259
+ return S("div", {
1260
+ class: "fv-grid-header-left-fixed"
1261
+ }, [S("div", {
1262
+ class: "fv-grid-header-columns",
1263
+ style: G.value
1264
+ }, [l(c.value.leftHeaderColumns)])]);
1265
+ }
1266
+ function v() {
1267
+ return S("div", {
1268
+ class: "fv-grid-header-right-fixed"
1269
+ }, [S("div", {
1270
+ class: "fv-grid-header-columns",
1271
+ style: f.value
1272
+ }, [l(c.value.rightHeaderColumns)])]);
1273
+ }
1274
+ function s() {
1275
+ var C;
1276
+ return S("div", {
1277
+ class: "fv-grid-header-corner",
1278
+ style: M.value
1279
+ }, [j.value && S("div", {
1280
+ class: "custom-control custom-checkbox f-checkradio-single fv-grid-sidebar-row-checkbox"
1281
+ }, [S("input", {
1282
+ id: "sidebar_checkall",
1283
+ title: "sidebar_checkall",
1284
+ type: "checkbox",
1285
+ class: "custom-control-input"
1286
+ }, null), S("label", {
1287
+ class: "custom-control-label",
1288
+ for: "sidebar_checkall"
1289
+ }, null)]), h.value && ((C = t.rowNumber) == null ? void 0 : C.heading)]);
1290
+ }
1291
+ function $() {
1292
+ return S("div", {
1293
+ class: W.value,
1294
+ style: p.value
1295
+ }, [(j.value || h.value) && s(), r.value && i(), S("div", {
1296
+ class: "fv-grid-header-primary"
1297
+ }, [S("div", {
1298
+ class: "fv-grid-header-columns",
1299
+ style: a.value
1300
+ }, [l(c.value.primaryHeaderColumns)])]), b.value && v()]);
1301
+ }
1302
+ function P() {
1303
+ return S(we, null, [S("div", {
1304
+ class: "fv-datagrid-resize-overlay",
1305
+ style: o.value
1306
+ }, null), S("div", {
1307
+ class: "fv-datagrid-resize-proxy",
1308
+ style: u.value
1309
+ }, null)]);
1310
+ }
1311
+ return {
1312
+ renderGridHeader: $,
1313
+ renderGridColumnResizeOverlay: P
1314
+ };
1315
+ }
1316
+ function Ae(t, g) {
1317
+ const d = R(() => 1e4);
1318
+ function m(w) {
1319
+ g.navigatePageTo(w);
1320
+ }
1321
+ function O() {
1322
+ return S("div", {
1323
+ class: "fv-datagrid-pagination"
1324
+ }, [S(ye("f-pagination"), {
1325
+ mode: "default",
1326
+ totalItems: d.value,
1327
+ onPageIndexChanged: m
1328
+ }, null)]);
1329
+ }
1330
+ return {
1331
+ renderDataGridPagination: O
1332
+ };
1333
+ }
1334
+ function Te(t, g, d, m) {
1335
+ const {
1336
+ onMouseoverRow: O,
1337
+ sidebarRowClass: w
1338
+ } = g, {
1339
+ showRowCheckbox: B,
1340
+ showRowNumer: j,
1341
+ sidebarCellPosition: h,
1342
+ sidebarWidth: M
1343
+ } = d, {
1344
+ gridSideStyle: c
1345
+ } = m;
1346
+ function r(o) {
1347
+ return S("div", {
1348
+ class: "custom-control custom-checkbox f-checkradio-single fv-grid-sidebar-row-checkbox"
1349
+ }, [S("input", {
1350
+ id: `${o.dataIndex}`,
1351
+ title: `${o.dataIndex}`,
1352
+ type: "checkbox",
1353
+ class: "custom-control-input"
1354
+ }, null), S("label", {
1355
+ class: "custom-control-label",
1356
+ for: `${o.dataIndex}`
1357
+ }, null)]);
1358
+ }
1359
+ function b(o) {
1360
+ return S("div", {
1361
+ class: "fv-grid-sidebar-row-number",
1362
+ onMouseover: (a) => O(a, o)
1363
+ }, [o.dataIndex]);
1364
+ }
1365
+ function n(o) {
1366
+ return (B.value || j.value) && o.value.map((a) => S("div", {
1367
+ class: w(a),
1368
+ style: h(a)
1369
+ }, [B.value && r(a), j.value && b(a)]));
1370
+ }
1371
+ function u(o) {
1372
+ return S("div", {
1373
+ class: "fv-grid-content-side"
1374
+ }, [S("div", {
1375
+ class: "fv-grid-side",
1376
+ style: c.value
1377
+ }, [n(o)])]);
1378
+ }
1379
+ return {
1380
+ renderDataGridSidebar: u
1381
+ };
1382
+ }
1383
+ function Le(t, g, d) {
1384
+ const {
1385
+ columnContext: m
1386
+ } = d, O = D(t.summary), w = R(() => {
1387
+ const j = O.value;
1388
+ return j && j.enable && j.groupFields && j.groupFields.length > 0;
1389
+ });
1390
+ function B() {
1391
+ return w.value && S("div", {
1392
+ class: "fv-datagrid-summary"
1393
+ }, [S("div", {
1394
+ class: "fv-datagird-summary-panel"
1395
+ }, [S("span", {
1396
+ class: "fv-datagrid-summary-title"
1397
+ }, [be("\u5F53\u9875\u5408\u8BA1")]), S("div", {
1398
+ class: "fv-datagrid-summary-content"
1399
+ }, [m.value.summaryColumns.map((j) => S("div", {
1400
+ class: "fv-datagrid-summary-field"
1401
+ }, [S("span", {
1402
+ class: "fv-datagrid-summary-field-title"
1403
+ }, [`${j.title}:`]), S("span", {
1404
+ class: "fv-datagrid-summary-field-value"
1405
+ }, [g.summaries.get(j.field)])]))])])]);
1406
+ }
1407
+ return {
1408
+ renderDataGridSummery: B
1409
+ };
1410
+ }
1411
+ function Xe(t, g, d) {
1412
+ const {
1413
+ horizontalScrollThumbStyle: m,
1414
+ onMouseDownScrollThumb: O
1415
+ } = d;
1416
+ function w() {
1417
+ return S("div", {
1418
+ class: "fv-grid-horizontal-scroll"
1419
+ }, [S("div", {
1420
+ class: "fv-grid-horizontal-scroll-thumb",
1421
+ style: m.value,
1422
+ onMousedown: (B) => O(B, g, "horizontal")
1423
+ }, null)]);
1424
+ }
1425
+ return {
1426
+ renderHorizontalScrollbar: w
1427
+ };
1428
+ }
1429
+ function Ye(t, g, d) {
1430
+ const {
1431
+ verticalScrollThumbStyle: m,
1432
+ onMouseDownScrollThumb: O
1433
+ } = d;
1434
+ function w() {
1435
+ return S("div", {
1436
+ class: "fv-grid-vertical-scroll"
1437
+ }, [S("div", {
1438
+ class: "fv-grid-vertical-scroll-thumb",
1439
+ style: m.value,
1440
+ onMousedown: (B) => O(B, g, "vertical")
1441
+ }, null)]);
1442
+ }
1443
+ return {
1444
+ renderVerticalScrollbar: w
1445
+ };
1446
+ }
1447
+ const _e = Ce({
1448
+ name: "FDataGrid",
1449
+ props: Oe,
1450
+ emits: [],
1451
+ setup(t) {
1452
+ var te;
1453
+ const g = D(t.columns), d = 20, m = 0, O = D(), w = D(), B = D(t.showStripe), j = D(!1), h = D(((te = t.rowOption) == null ? void 0 : te.wrapContent) || !1), M = Pe(t), c = je(t), {
1454
+ columnContext: r
1455
+ } = c, b = Be(t, r), {
1456
+ calculateColumnsSize: n
1457
+ } = b, u = me(t), o = Re(t), a = He(t, g, u, M, d, m, o), {
1458
+ getVisualData: G
1459
+ } = a, f = $e(t, r), _ = Me(t), {
1460
+ sidebarWidth: H
1461
+ } = _, x = D(G(0, d + m)), F = De(t, M, x, r, a, d, m, H), {
1462
+ onWheel: W,
1463
+ dataGridWidth: p,
1464
+ viewPortHeight: e,
1465
+ viewPortWidth: l
1466
+ } = F, i = Ge(t), v = R(() => ({
1467
+ "fv-grid": !0,
1468
+ "fv-datagrid-strip": B.value
1469
+ })), s = R(() => ({
1470
+ "fv-grid-content": !0,
1471
+ "fv-grid-content-hover": j.value,
1472
+ "fv-grid-wrap-content": h.value
1473
+ })), {
1474
+ renderDataArea: $
1475
+ } = ze(t, w, f, c, o, u, i, a, F, x), {
1476
+ renderGridHeader: P,
1477
+ renderGridColumnResizeOverlay: C
1478
+ } = Ne(t, O, c, b, _, F), {
1479
+ renderDataGridPagination: z
1480
+ } = Ae(t, M), {
1481
+ renderDataGridSidebar: N
1482
+ } = Te(t, i, _, F), {
1483
+ renderDataGridSummery: L
1484
+ } = Le(t, M, c), {
1485
+ renderHorizontalScrollbar: Y
1486
+ } = Xe(t, O, F), {
1487
+ renderVerticalScrollbar: J
1488
+ } = Ye(t, O, F);
1489
+ function Q(oe) {
1490
+ var ae, le, ne;
1491
+ e.value = ((ae = w.value) == null ? void 0 : ae.clientHeight) || 0, l.value = ((le = w.value) == null ? void 0 : le.clientWidth) || 0, p.value = ((ne = O.value) == null ? void 0 : ne.clientWidth) || 0;
1492
+ }
1493
+ return Se(() => {
1494
+ O.value && (window.addEventListener("resize", Q), n(r, O.value, l), xe(() => {
1495
+ O.value && (p.value = O.value.clientWidth), w.value && (l.value = w.value.clientWidth, e.value = w.value.clientHeight);
1496
+ }));
1497
+ }), We(() => {
1498
+ window.removeEventListener("resize", Q);
1499
+ }), ce(l, () => {
1500
+ O.value && n(r, O.value, l);
1501
+ }), () => S("div", {
1502
+ class: v.value,
1503
+ style: "height:600px",
1504
+ onWheel: W
1505
+ }, [P(), S("div", {
1506
+ ref: O,
1507
+ class: s.value,
1508
+ onMouseover: () => {
1509
+ j.value = !0;
1510
+ },
1511
+ onMouseleave: () => {
1512
+ j.value = !1;
1513
+ }
1514
+ }, [N(x), $(), Y(), J()]), L(), z(), C()]);
1515
+ }
1516
+ }), it = {
1517
+ install(t) {
1518
+ t.component(_e.name, _e);
1519
+ }
1520
+ };
1521
+ export {
1522
+ _e as FDataGrid,
1523
+ at as columnOptions,
1524
+ Oe as dataGridProps,
1525
+ it as default,
1526
+ nt as editOptions,
1527
+ Qe as filterOptions,
1528
+ Je as groupOptions,
1529
+ Ze as headerOptions,
1530
+ qe as paginationOptions,
1531
+ Ie as rowNumberOptions,
1532
+ et as rowOptions,
1533
+ lt as selectionOptions,
1534
+ Ue as sortOptions,
1535
+ tt as summaryOptions
1536
+ };