@farris/ui-vue 1.5.7 → 1.5.9

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 (128) hide show
  1. package/components/avatar/index.esm.js +5 -5
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/component/index.esm.js +5 -5
  4. package/components/component/index.umd.cjs +1 -1
  5. package/components/condition/index.esm.js +5 -5
  6. package/components/condition/index.umd.cjs +1 -1
  7. package/components/content-container/index.esm.js +5 -5
  8. package/components/content-container/index.umd.cjs +1 -1
  9. package/components/date-picker/index.esm.js +1082 -1421
  10. package/components/date-picker/index.umd.cjs +1 -1
  11. package/components/designer-canvas/index.esm.js +908 -897
  12. package/components/designer-canvas/index.umd.cjs +1 -1
  13. package/components/dynamic-form/index.esm.js +5 -5
  14. package/components/dynamic-form/index.umd.cjs +1 -1
  15. package/components/dynamic-view/index.esm.js +5 -5
  16. package/components/dynamic-view/index.umd.cjs +1 -1
  17. package/components/events-editor/index.esm.js +5 -5
  18. package/components/events-editor/index.umd.cjs +1 -1
  19. package/components/filter-bar/index.esm.js +13 -12
  20. package/components/filter-bar/index.umd.cjs +1 -1
  21. package/components/flow-canvas/index.esm.js +5 -5
  22. package/components/flow-canvas/index.umd.cjs +1 -1
  23. package/components/number-range/index.esm.js +5 -5
  24. package/components/number-range/index.umd.cjs +1 -1
  25. package/components/number-spinner/index.esm.js +5 -5
  26. package/components/number-spinner/index.umd.cjs +1 -1
  27. package/components/page-header/index.esm.js +862 -3625
  28. package/components/page-header/index.umd.cjs +1 -1
  29. package/components/property-panel/index.esm.js +5 -5
  30. package/components/property-panel/index.umd.cjs +1 -1
  31. package/components/query-solution/index.esm.js +77 -76
  32. package/components/query-solution/index.umd.cjs +6 -6
  33. package/components/response-layout/index.esm.js +5 -5
  34. package/components/response-layout/index.umd.cjs +1 -1
  35. package/components/response-toolbar/index.esm.js +500 -3662
  36. package/components/response-toolbar/index.umd.cjs +1 -1
  37. package/components/schema-selector/index.esm.js +3008 -7347
  38. package/components/schema-selector/index.umd.cjs +6 -6
  39. package/components/section/index.esm.js +117 -7544
  40. package/components/section/index.umd.cjs +1 -1
  41. package/components/tabs/index.esm.js +545 -4943
  42. package/components/tabs/index.umd.cjs +1 -1
  43. package/components/textarea/index.esm.js +100 -5841
  44. package/components/textarea/index.umd.cjs +2 -2
  45. package/components/time-picker/index.esm.js +5 -5
  46. package/components/time-picker/index.umd.cjs +1 -1
  47. package/components/video/index.esm.js +5 -5
  48. package/components/video/index.umd.cjs +1 -1
  49. package/designer/button-edit/index.css +1 -0
  50. package/designer/button-edit/index.esm.js +1556 -0
  51. package/designer/button-edit/index.umd.cjs +1 -0
  52. package/designer/checkbox/index.esm.js +207 -0
  53. package/designer/checkbox/index.umd.cjs +1 -0
  54. package/designer/checkbox-group/index.esm.js +377 -0
  55. package/designer/checkbox-group/index.umd.cjs +1 -0
  56. package/designer/data-grid/index.css +1 -0
  57. package/designer/data-grid/index.esm.js +14332 -0
  58. package/designer/data-grid/index.umd.cjs +20 -0
  59. package/designer/data-view/index.esm.js +271 -0
  60. package/designer/data-view/index.umd.cjs +1 -0
  61. package/designer/date-picker/index.esm.js +1879 -0
  62. package/designer/date-picker/index.umd.cjs +1 -0
  63. package/designer/drawer/index.css +1 -0
  64. package/designer/drawer/index.esm.js +463 -0
  65. package/designer/drawer/index.umd.cjs +1 -0
  66. package/designer/farris-designer.all.esm.js +16827 -0
  67. package/designer/farris-designer.all.umd.cjs +32 -0
  68. package/designer/index.css +1 -0
  69. package/designer/input-group/index.esm.js +647 -0
  70. package/designer/input-group/index.umd.cjs +1 -0
  71. package/designer/radio-group/index.esm.js +6959 -0
  72. package/designer/radio-group/index.umd.cjs +1 -0
  73. package/designer/response-toolbar/index.esm.js +3015 -0
  74. package/designer/response-toolbar/index.umd.cjs +1 -0
  75. package/designer/section/index.esm.js +744 -0
  76. package/designer/section/index.umd.cjs +1 -0
  77. package/designer/tabs/index.esm.js +2200 -0
  78. package/designer/tabs/index.umd.cjs +1 -0
  79. package/designer/textarea/index.esm.js +249 -0
  80. package/designer/textarea/index.umd.cjs +1 -0
  81. package/designer/tree-grid/index.css +1 -0
  82. package/designer/tree-grid/index.esm.js +1673 -0
  83. package/designer/tree-grid/index.umd.cjs +1 -0
  84. package/farris.all.esm.js +30447 -30444
  85. package/farris.all.umd.cjs +16 -16
  86. package/package.json +1 -1
  87. package/types/date-picker/designer.d.ts +29 -0
  88. package/types/date-picker/index.d.ts +2 -1
  89. package/types/date-picker/src/date-picker.props.d.ts +0 -5
  90. package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
  91. package/types/designer-canvas/index.d.ts +2 -2
  92. package/types/response-toolbar/designer.d.ts +37 -0
  93. package/types/response-toolbar/index.d.ts +6 -5
  94. package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
  95. package/types/response-toolbar/src/composition/types.d.ts +1 -1
  96. package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
  97. package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
  98. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
  99. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
  100. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
  101. package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
  102. package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
  103. package/types/section/designer.d.ts +26 -0
  104. package/types/section/index.d.ts +1 -0
  105. package/types/section/src/designer/section-header.design.component.d.ts +2 -2
  106. package/types/section/src/designer/section-toolbar-item.design.props.d.ts +16 -0
  107. package/types/section/src/designer/section-toolbar-item.props.d.ts +0 -1
  108. package/types/section/src/designer/section-toolbar.design.component.d.ts +2 -2
  109. package/types/section/src/designer/section.design.props.d.ts +11 -0
  110. package/types/section/src/designer/use-designer-rules.d.ts +1 -2
  111. package/types/section/src/property-config/section.property-config.d.ts +1 -1
  112. package/types/section/src/schema/schema-resolver.d.ts +1 -1
  113. package/types/section/src/section.props.d.ts +0 -10
  114. package/types/tabs/designer.d.ts +28 -0
  115. package/types/tabs/index.d.ts +1 -0
  116. package/types/tabs/src/components/tab-page.props.d.ts +0 -1
  117. package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
  118. package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
  119. package/types/tabs/src/tabs.props.d.ts +0 -11
  120. package/types/textarea/designer.d.ts +28 -0
  121. package/types/textarea/index.d.ts +0 -15
  122. package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
  123. package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
  124. package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
  125. package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
  126. package/types/textarea/src/textarea.props.d.ts +0 -5
  127. package/components/textarea/index.css +0 -1
  128. /package/{components/section → designer/radio-group}/index.css +0 -0
@@ -0,0 +1,1673 @@
1
+ import { withInstall as Mt } from "../../components/common/index.esm.js";
2
+ import { createVNode as P, defineComponent as Oe, ref as g, computed as j, onMounted as Fe, nextTick as Ge, onUnmounted as Tt, watch as me, inject as De } from "vue";
3
+ import { useResizeObserver as je } from "@vueuse/core";
4
+ import { isUndefined as W } from "lodash-es";
5
+ import { resolveAppearance as Vt, createPropsResolver as Pe, createTreeGridSelectionItemResolver as Wt, createTreeGridBindingResolver as zt, createDataViewUpdateColumnsResolver as At } from "../../components/dynamic-resolver/index.esm.js";
6
+ import { getHierarchyRow as Et, useIdentify as He, useGroupData as Nt, useFilter as ke, useHierarchy as xe, useLoading as _t, useDataView as Me, useSelection as Te, useSelectHierarchyItem as Lt, useDataViewContainerStyle as Ve, useCommandColumn as We, useColumn as $t, useSort as ze, useGroupColumn as Ae, useRow as Ee, useEdit as Ne, useVisualDataBound as _e, useVisualDataCell as Le, useVisualDataRow as $e, useVisualData as Ut, useCellPosition as qt, useSidebar as Ue, useVirtualScroll as qe, useFitColumn as Yt, useFilterHistory as Jt, useColumnFilter as Kt, useDragColumn as Qt, getColumnHeader as Xt, getSidebar as Zt, getDisableMask as eo, getHorizontalScrollbar as Ye, getVerticalScrollbar as to, getEmpty as oo } from "../../components/data-view/index.esm.js";
7
+ import { getColumnHeader as no } from "../data-grid/index.esm.js";
8
+ import { useDesignerComponent as io } from "../../components/designer-canvas/index.esm.js";
9
+ import { BaseControlProperty as ao } from "../../components/property-panel/index.esm.js";
10
+ import { useDesignerColumn as lo, useDesignerVisualData as ro, useDesignerFitColumn as so } from "../data-view/index.esm.js";
11
+ const Je = /* @__PURE__ */ new Map([
12
+ ["appearance", Vt],
13
+ ["column", "columnOption"]
14
+ ]);
15
+ function co(e, t, d) {
16
+ var C;
17
+ const i = d.parentComponentInstance, r = i.schema.type, c = String(((C = i.schema.appearance) == null ? void 0 : C.class) || "").split(" "), s = r === "section" || r === "tab-page", u = c.includes("f-page-content-nav"), a = c.includes("f-page-main"), n = e.getSchemaByType("component");
18
+ n.id = `${t.id}-component`, n.componentType = "data-grid";
19
+ let m = "";
20
+ return m += s ? "f-struct-data-grid-in-card f-struct-is-subgrid" : "", m += u ? "f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column" : "", m += a ? "f-struct-data-grid f-struct-wrapper" : "", n.appearance = {
21
+ class: m
22
+ }, n.contents = [t], n;
23
+ }
24
+ function uo(e, t, d) {
25
+ const i = d.parentComponentInstance, r = String(i.schema.appearance.class || "").split(" "), c = r.includes("f-page-content-nav"), s = r.includes("f-page-main"), u = e.getSchemaByType("section");
26
+ u.id = `${t.id}-section`;
27
+ let a = "";
28
+ return a += c ? "f-section-in-nav " : "", a += s ? "f-section-in-managelist " : "", a += "f-section-grid", u.appearance = { class: a }, u.contents = [t], u;
29
+ }
30
+ function po(e, t, d) {
31
+ const i = e.getSchemaByType("content-container");
32
+ return i.id = `${t.id}-layout`, i.appearance = { class: "f-grid-is-sub f-utils-flex-column" }, i.contents = [t], i;
33
+ }
34
+ function Ke(e, t, d) {
35
+ const r = d.parentComponentInstance.schema.type, c = r === "section" || r === "tab-page";
36
+ t.appearance = { class: "f-component-grid" };
37
+ const u = (c ? po : uo)(e, t, d);
38
+ return co(e, u, d);
39
+ }
40
+ const fo = "https://json-schema.org/draft/2020-12/schema", mo = "https://farris-design.gitee.io/tree-grid.schema.json", yo = "tree-grid", go = "A Farris Data Grid Component", bo = "object", vo = {
41
+ id: {
42
+ description: "The unique identifier for a Input Group",
43
+ type: "string"
44
+ },
45
+ type: {
46
+ description: "The type string of Input Group component",
47
+ type: "string",
48
+ default: "tree-grid"
49
+ },
50
+ appearance: {
51
+ description: "",
52
+ type: "object",
53
+ properties: {
54
+ class: {
55
+ type: "string"
56
+ },
57
+ style: {
58
+ type: "string"
59
+ }
60
+ },
61
+ default: {}
62
+ },
63
+ fit: {
64
+ type: "boolean",
65
+ default: !1
66
+ },
67
+ showStripe: {
68
+ type: "boolean",
69
+ default: !0
70
+ },
71
+ showBorder: {
72
+ type: "boolean",
73
+ default: !1
74
+ },
75
+ showTreeNodeIcons: {
76
+ type: "boolean",
77
+ default: !1
78
+ },
79
+ showSetting: {
80
+ type: "boolean",
81
+ default: !1
82
+ },
83
+ size: {
84
+ description: "",
85
+ type: "object",
86
+ properties: {
87
+ width: {
88
+ type: "number"
89
+ },
90
+ height: {
91
+ type: "number"
92
+ }
93
+ },
94
+ default: null
95
+ },
96
+ dataSource: {
97
+ description: "",
98
+ type: "string",
99
+ default: ""
100
+ },
101
+ columns: {
102
+ description: "",
103
+ type: "array",
104
+ default: []
105
+ },
106
+ identifyField: {
107
+ description: "",
108
+ type: "string"
109
+ },
110
+ editable: {
111
+ description: "",
112
+ type: "boolean",
113
+ default: !1
114
+ },
115
+ disabled: {
116
+ description: "",
117
+ type: "boolean",
118
+ default: !1
119
+ },
120
+ visible: {
121
+ description: "",
122
+ type: "boolean",
123
+ default: !0
124
+ },
125
+ cell: {
126
+ type: "object",
127
+ properties: {
128
+ highlightFocusingCell: {
129
+ description: "",
130
+ type: "boolean",
131
+ default: !1
132
+ },
133
+ mergeCell: {
134
+ description: "",
135
+ type: "boolean",
136
+ default: !1
137
+ },
138
+ showEditableIcon: {
139
+ description: "",
140
+ type: "boolean",
141
+ default: !1
142
+ }
143
+ }
144
+ },
145
+ column: {
146
+ type: "object",
147
+ properties: {
148
+ fitColumns: {
149
+ description: "",
150
+ type: "boolean",
151
+ default: !1
152
+ },
153
+ fitMode: {
154
+ description: "",
155
+ type: "string",
156
+ default: "average"
157
+ },
158
+ groups: {
159
+ description: "",
160
+ type: "array",
161
+ default: []
162
+ },
163
+ reorderColumn: {
164
+ description: "Enable to drag column to reorder",
165
+ type: "boolean",
166
+ default: !1
167
+ },
168
+ resizeColumn: {
169
+ type: "boolean",
170
+ default: !0
171
+ },
172
+ resizeColumnOnDoubleClick: {
173
+ description: "",
174
+ type: "boolean",
175
+ default: !0
176
+ }
177
+ }
178
+ },
179
+ command: {
180
+ type: "object",
181
+ properties: {
182
+ enable: {
183
+ description: "",
184
+ type: "boolean",
185
+ default: !1
186
+ },
187
+ commands: {
188
+ type: "array",
189
+ default: []
190
+ },
191
+ commandColumnWidth: {
192
+ description: "",
193
+ type: "number",
194
+ default: 120
195
+ },
196
+ onClickDeleteCommand: {
197
+ description: "",
198
+ type: "string",
199
+ default: ""
200
+ },
201
+ onClickEditCommand: {
202
+ description: "",
203
+ type: "string",
204
+ default: ""
205
+ }
206
+ }
207
+ },
208
+ contextMenu: {
209
+ description: "",
210
+ type: "object",
211
+ properties: {
212
+ enable: {
213
+ description: "",
214
+ type: "boolean",
215
+ default: !1
216
+ }
217
+ }
218
+ },
219
+ customizaiton: {
220
+ type: "object",
221
+ properties: {
222
+ enableScheme: {
223
+ description: "",
224
+ type: "boolean",
225
+ default: !1
226
+ },
227
+ enableSetting: {
228
+ description: "",
229
+ type: "boolean",
230
+ default: !1
231
+ }
232
+ }
233
+ },
234
+ edit: {
235
+ type: "obejct",
236
+ properties: {
237
+ mode: {
238
+ description: "",
239
+ type: "string",
240
+ default: "cell",
241
+ enum: [
242
+ "cell",
243
+ "row",
244
+ "card"
245
+ ]
246
+ },
247
+ selectOnEditing: {
248
+ description: "",
249
+ type: "boolean",
250
+ default: !1
251
+ },
252
+ onAppendRow: {
253
+ description: "",
254
+ type: "string",
255
+ default: ""
256
+ },
257
+ onBeforeEdit: {
258
+ description: "",
259
+ type: "string",
260
+ default: ""
261
+ }
262
+ }
263
+ },
264
+ filter: {
265
+ type: "object",
266
+ properties: {
267
+ enable: {
268
+ description: "",
269
+ type: "boolean",
270
+ default: !1
271
+ },
272
+ filterStyle: {
273
+ description: "",
274
+ type: "string",
275
+ default: "filter-column",
276
+ enum: [
277
+ "filter-column",
278
+ "filter-row"
279
+ ]
280
+ },
281
+ mode: {
282
+ description: "",
283
+ type: "string",
284
+ default: "server",
285
+ enum: [
286
+ "client",
287
+ "server"
288
+ ]
289
+ },
290
+ showSummary: {
291
+ description: "",
292
+ type: "boolean",
293
+ default: !0
294
+ },
295
+ onFilterChange: {
296
+ description: "",
297
+ type: "string",
298
+ default: ""
299
+ }
300
+ }
301
+ },
302
+ footer: {
303
+ type: "object",
304
+ properties: {
305
+ enable: {
306
+ description: "",
307
+ type: "boolean",
308
+ default: !1
309
+ },
310
+ customFooterStyle: {
311
+ description: "",
312
+ type: "object"
313
+ },
314
+ footerDataCommand: {
315
+ description: "",
316
+ type: "string",
317
+ default: ""
318
+ },
319
+ footerDataFrom: {
320
+ description: "",
321
+ type: "string",
322
+ default: "client"
323
+ },
324
+ footerHeight: {
325
+ description: "",
326
+ type: "number",
327
+ default: 29
328
+ },
329
+ footerPosition: {
330
+ description: "",
331
+ type: "string",
332
+ default: "bottom"
333
+ },
334
+ footerTemplate: {
335
+ description: "",
336
+ type: "string",
337
+ default: ""
338
+ }
339
+ }
340
+ },
341
+ group: {
342
+ description: "",
343
+ type: "object",
344
+ properties: {
345
+ enable: {
346
+ description: "",
347
+ type: "boolean",
348
+ default: !1
349
+ },
350
+ customGroupRow: {
351
+ description: "",
352
+ type: "object"
353
+ },
354
+ customGroupRowStyle: {
355
+ description: "",
356
+ type: "obejct"
357
+ },
358
+ customSummaryStyle: {
359
+ description: "",
360
+ type: "obejct"
361
+ },
362
+ groupColSpan: {
363
+ description: "",
364
+ type: "number",
365
+ default: 1
366
+ },
367
+ groupFields: {
368
+ description: "",
369
+ type: "array",
370
+ default: []
371
+ },
372
+ showGroupedColumn: {
373
+ description: "",
374
+ type: "boolean",
375
+ default: !0
376
+ },
377
+ showGroupPanel: {
378
+ description: "",
379
+ type: "boolean",
380
+ default: !1
381
+ },
382
+ showSummary: {
383
+ description: "",
384
+ type: "boolean",
385
+ default: !1
386
+ },
387
+ summaryPosition: {
388
+ description: "",
389
+ type: "string",
390
+ default: "separate",
391
+ enum: [
392
+ "separate",
393
+ "merge-to-group"
394
+ ]
395
+ },
396
+ disableGroupOnEditing: {
397
+ description: "",
398
+ type: "boolean",
399
+ default: !0
400
+ },
401
+ expandGroupRows: {
402
+ description: "",
403
+ type: "boolean",
404
+ default: !0
405
+ }
406
+ }
407
+ },
408
+ header: {
409
+ type: "object",
410
+ properties: {
411
+ wrapHeadings: {
412
+ description: "",
413
+ type: "boolean",
414
+ default: !1
415
+ }
416
+ }
417
+ },
418
+ pagination: {
419
+ type: "object",
420
+ properties: {
421
+ enable: {
422
+ description: "",
423
+ type: "boolean",
424
+ default: !1
425
+ },
426
+ disablePagination: {
427
+ description: "",
428
+ type: "string",
429
+ default: ""
430
+ },
431
+ contentTemplate: {
432
+ description: "",
433
+ type: "string",
434
+ default: ""
435
+ },
436
+ index: {
437
+ description: "",
438
+ type: "number",
439
+ default: 1
440
+ },
441
+ mode: {
442
+ description: "",
443
+ type: "string",
444
+ default: "server",
445
+ enum: [
446
+ "server",
447
+ "client"
448
+ ]
449
+ },
450
+ showGoto: {
451
+ description: "",
452
+ type: "boolean",
453
+ default: !1
454
+ },
455
+ showIndex: {
456
+ description: "",
457
+ type: "boolean",
458
+ default: !0
459
+ },
460
+ showLimits: {
461
+ description: "",
462
+ type: "boolean",
463
+ default: !1
464
+ },
465
+ showPageInfo: {
466
+ description: "",
467
+ type: "boolean",
468
+ default: !0
469
+ },
470
+ size: {
471
+ description: "",
472
+ type: "number",
473
+ default: 20
474
+ },
475
+ sizeLimits: {
476
+ description: "",
477
+ type: "array",
478
+ default: [
479
+ 10,
480
+ 20,
481
+ 30,
482
+ 50,
483
+ 100
484
+ ]
485
+ },
486
+ onPageChange: {
487
+ description: "",
488
+ type: "string",
489
+ default: ""
490
+ },
491
+ onPageSizeChange: {
492
+ description: "",
493
+ type: "string",
494
+ default: ""
495
+ }
496
+ }
497
+ },
498
+ row: {
499
+ type: "object",
500
+ properties: {
501
+ customRowStyle: {
502
+ description: "",
503
+ type: "object"
504
+ },
505
+ disable: {
506
+ description: "",
507
+ type: "obejct"
508
+ },
509
+ height: {
510
+ description: "",
511
+ type: "number",
512
+ default: 30
513
+ },
514
+ showHovering: {
515
+ type: "boolean",
516
+ default: !0
517
+ },
518
+ wrapContent: {
519
+ type: "boolean",
520
+ default: !1
521
+ }
522
+ }
523
+ },
524
+ rowNumber: {
525
+ description: "",
526
+ type: "object",
527
+ properties: {
528
+ enable: {
529
+ description: "",
530
+ type: "boolean",
531
+ default: !1
532
+ },
533
+ heading: {
534
+ description: "",
535
+ type: "string",
536
+ default: "序号"
537
+ },
538
+ width: {
539
+ description: "",
540
+ type: "number",
541
+ default: 36
542
+ },
543
+ onClickRow: {
544
+ description: "",
545
+ type: "string",
546
+ default: ""
547
+ },
548
+ onDoubleClickRow: {
549
+ description: "",
550
+ type: "string",
551
+ default: ""
552
+ }
553
+ }
554
+ },
555
+ selection: {
556
+ type: "object",
557
+ properties: {
558
+ enableSelectRow: {
559
+ description: "允许选中行",
560
+ type: "boolean",
561
+ default: !0
562
+ },
563
+ enable: {
564
+ description: "",
565
+ type: "boolean",
566
+ default: !0
567
+ },
568
+ checkOnSelect: {
569
+ description: "",
570
+ type: "boolean",
571
+ default: !1
572
+ },
573
+ clearSelectionOnEmpty: {
574
+ description: "",
575
+ type: "boolean",
576
+ default: !0
577
+ },
578
+ customSelectionItem: {
579
+ description: "",
580
+ type: "object"
581
+ },
582
+ focusSelection: {
583
+ description: "",
584
+ type: "string",
585
+ default: "current",
586
+ enum: [
587
+ "current",
588
+ "all"
589
+ ]
590
+ },
591
+ keepSelectingOnClick: {
592
+ description: "",
593
+ type: "boolean",
594
+ default: !0
595
+ },
596
+ keepSelectingOnPaging: {
597
+ description: "",
598
+ type: "boolean",
599
+ default: !0
600
+ },
601
+ multiSelect: {
602
+ description: "",
603
+ type: "boolean",
604
+ default: !1
605
+ },
606
+ selectionMode: {
607
+ description: "",
608
+ type: "string",
609
+ default: "default"
610
+ },
611
+ selectOnCheck: {
612
+ description: "",
613
+ type: "boolean",
614
+ default: !1
615
+ },
616
+ selectOnEditing: {
617
+ description: "",
618
+ type: "boolean",
619
+ default: !1
620
+ },
621
+ showCheckbox: {
622
+ description: "",
623
+ type: "boolean",
624
+ default: !1
625
+ },
626
+ showCheckAll: {
627
+ description: "",
628
+ type: "boolean",
629
+ default: !1
630
+ },
631
+ showSelection: {
632
+ description: "",
633
+ type: "boolean",
634
+ default: !1
635
+ },
636
+ onBeforeSelect: {
637
+ description: "",
638
+ type: "string",
639
+ default: ""
640
+ },
641
+ onBeforeUnCheck: {
642
+ description: "",
643
+ type: "",
644
+ default: ""
645
+ },
646
+ onBeforeUnSelect: {
647
+ description: "",
648
+ type: "string",
649
+ default: ""
650
+ },
651
+ onCheckAll: {
652
+ description: "",
653
+ type: "string",
654
+ default: ""
655
+ },
656
+ onChecked: {
657
+ description: "",
658
+ type: "string",
659
+ default: ""
660
+ },
661
+ onSelectionChange: {
662
+ description: "",
663
+ type: "string",
664
+ default: ""
665
+ },
666
+ onUnCheckAll: {
667
+ description: "",
668
+ type: "string",
669
+ default: ""
670
+ },
671
+ onUnChecked: {
672
+ description: "",
673
+ type: "string",
674
+ default: ""
675
+ },
676
+ onCheckedChange: {
677
+ description: "",
678
+ type: "string"
679
+ }
680
+ }
681
+ },
682
+ sort: {
683
+ type: "object",
684
+ properties: {
685
+ enable: {
686
+ description: "",
687
+ type: "boolean",
688
+ default: !1
689
+ },
690
+ fields: {
691
+ description: "",
692
+ type: "array",
693
+ default: []
694
+ },
695
+ mode: {
696
+ description: "",
697
+ type: "string",
698
+ default: "client",
699
+ enum: [
700
+ "client",
701
+ "server"
702
+ ]
703
+ },
704
+ multiSort: {
705
+ description: "",
706
+ type: "boolean",
707
+ default: !1
708
+ }
709
+ }
710
+ },
711
+ summary: {
712
+ description: "",
713
+ type: "object",
714
+ properties: {
715
+ enable: {
716
+ description: "",
717
+ type: "boolean",
718
+ default: !1
719
+ },
720
+ customSummaryStyle: {
721
+ description: "",
722
+ type: "object"
723
+ },
724
+ groupFields: {
725
+ description: "",
726
+ type: "array",
727
+ default: []
728
+ },
729
+ mode: {
730
+ description: "",
731
+ type: "string",
732
+ default: "client",
733
+ enum: [
734
+ "client",
735
+ "server"
736
+ ]
737
+ },
738
+ position: {
739
+ description: "",
740
+ type: "boolean",
741
+ default: "bottom",
742
+ enum: [
743
+ "bottom",
744
+ "top",
745
+ "both"
746
+ ]
747
+ }
748
+ }
749
+ },
750
+ toolbar: {
751
+ description: "",
752
+ type: "object",
753
+ properties: {
754
+ enable: {
755
+ description: "",
756
+ type: "boolean",
757
+ default: !1
758
+ }
759
+ }
760
+ },
761
+ visualization: {
762
+ autoHeight: {
763
+ description: "",
764
+ type: "boolean",
765
+ default: !1
766
+ },
767
+ emptyDataHeight: {
768
+ description: "",
769
+ type: "number",
770
+ default: 36
771
+ },
772
+ emptyTemplate: {
773
+ description: "",
774
+ type: "string",
775
+ default: ""
776
+ },
777
+ maxHeight: {
778
+ description: "",
779
+ type: "number",
780
+ default: 300
781
+ },
782
+ scrollBarShowMode: {
783
+ description: "",
784
+ type: "string",
785
+ default: "auto"
786
+ },
787
+ showBorder: {
788
+ description: "",
789
+ type: "boolean",
790
+ default: !1
791
+ },
792
+ showScrollArrow: {
793
+ description: "",
794
+ type: "boolean",
795
+ default: !1
796
+ },
797
+ striped: {
798
+ description: "",
799
+ type: "boolean",
800
+ default: !0
801
+ },
802
+ useBlankWhenDataIsEmpty: {
803
+ description: "",
804
+ type: "boolean",
805
+ default: !1
806
+ }
807
+ },
808
+ onSelectionChange: {
809
+ description: "行切换事件",
810
+ type: "string",
811
+ default: ""
812
+ }
813
+ }, ho = [
814
+ "id",
815
+ "type",
816
+ "columns"
817
+ ], Co = {
818
+ onSelectionChange: "行切换事件",
819
+ onClickRow: "行点击事件"
820
+ }, Qe = {
821
+ $schema: fo,
822
+ $id: mo,
823
+ title: yo,
824
+ description: go,
825
+ type: bo,
826
+ properties: vo,
827
+ required: ho,
828
+ events: Co
829
+ }, Ao = {
830
+ /** 启用分页 */
831
+ enable: { type: Boolean, default: !1 },
832
+ /** 当前页码 */
833
+ index: { type: Number, default: 1 },
834
+ /** 分页交互模式 */
835
+ mode: { type: String, default: "server" },
836
+ /** 显示页码输入框 */
837
+ showGoto: { type: Boolean, default: !1 },
838
+ /** 显示页码 */
839
+ showIndex: { type: Boolean, default: !0 },
840
+ /** 显示每页记录数 */
841
+ showLimits: { type: Boolean, default: !1 },
842
+ /** 显示分页汇总信息 */
843
+ showPageInfo: { type: Boolean, default: !0 },
844
+ /** 默认每页记录数 */
845
+ size: { type: Number, default: 20 },
846
+ /** 可选择的没有记录数据 */
847
+ sizeLimits: { type: Array, default: [10, 20, 30, 50, 100] },
848
+ /** 总记录数 */
849
+ total: { type: Number, default: 0 }
850
+ }, Eo = {
851
+ /** 启用排序 */
852
+ enable: { type: Boolean, default: !1 },
853
+ /** 排序字段集合 */
854
+ fields: { type: Array, default: [] },
855
+ /** 排序交互模式 */
856
+ mode: { type: String, default: "client" },
857
+ /** 多列排序 */
858
+ multiSort: { type: Boolean, default: !1 }
859
+ }, No = {
860
+ /** 自定义分组合计内容 */
861
+ customGroupRow: { type: Function, default: () => {
862
+ } },
863
+ /** 自定义分组行样式 */
864
+ customGroupRowStyle: { type: Function, default: () => {
865
+ } },
866
+ /** 自行分组合计行样式 */
867
+ customSummaryStyle: { type: Function, default: () => {
868
+ } },
869
+ /** 启用行数据分组 */
870
+ enable: { type: Boolean, default: !1 },
871
+ /** 分组行合并列数 */
872
+ groupColSpan: { type: Number, default: 1 },
873
+ /** 行数据分组字段;多字段分组以英文逗号分隔 */
874
+ groupFields: { type: Array, default: [] },
875
+ /** 在DataGrid中显示被分组的列 */
876
+ showGroupedColumn: { type: Boolean, default: !0 },
877
+ /** 显示分组面板 */
878
+ showGroupPanel: { type: Boolean, default: !1 },
879
+ /** 启用合计行 */
880
+ showSummary: { type: Boolean, default: !1 },
881
+ /** 显示合计行位置; */
882
+ summaryPosition: { type: String, default: "separate" }
883
+ }, _o = {
884
+ /** 启用筛选 */
885
+ enable: { type: Boolean, default: !1 },
886
+ /** DataGrid筛选风格 */
887
+ filterStyle: { type: String, default: "filter-column" },
888
+ /** 筛选交互模式 */
889
+ mode: { type: String, default: "server" },
890
+ /** 显示过滤条件工具条 */
891
+ showSummary: { type: Boolean, default: !0 }
892
+ }, Lo = {
893
+ /** 允许折行显示列标题 */
894
+ wrapHeadings: { type: Boolean, default: !1 }
895
+ }, $o = {
896
+ /** 自定义行样式 */
897
+ customRowStyle: { type: Function, default: () => {
898
+ } },
899
+ /** 禁止行选中表达式 */
900
+ disable: { type: Function, default: () => {
901
+ } },
902
+ /** 默认行高度为 29px */
903
+ height: { type: Number, default: 28 },
904
+ /** 鼠标滑过行效果 */
905
+ showHovering: { type: Boolean, default: !0 },
906
+ /** 禁止数据折行 */
907
+ wrapContent: { type: Boolean, default: !1 }
908
+ }, Uo = {
909
+ /** 显示合计信息 */
910
+ enable: { type: Boolean, default: !1 },
911
+ /** 合计行自定义样式,对启用合计行模板无效 */
912
+ customSummaryStyle: { type: Function, default: () => {
913
+ } },
914
+ /** 分组合计字段 */
915
+ groupFields: { type: Array, default: [] },
916
+ /** 合计交互模式 */
917
+ mode: { type: String, default: "client" },
918
+ /** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */
919
+ position: { type: String, default: "bottom" }
920
+ }, qo = {
921
+ /** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */
922
+ fitColumns: { type: Boolean, default: !1 },
923
+ /** 自动适配列宽度模式 */
924
+ fitMode: { type: String, default: "average" },
925
+ groups: { type: Array, defaut: [] },
926
+ /** 允许拖动表头改变列显示顺序 */
927
+ reorderColumn: { type: Boolean, default: !1 },
928
+ /** 允许拖动改变列宽度 */
929
+ resizeColumn: { type: Boolean, default: !0 },
930
+ /** 双击表头列自适应内容宽度 */
931
+ resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
932
+ }, Yo = {
933
+ /** 编辑时选中文本 */
934
+ selectOnEditing: { type: Boolean, default: !1 },
935
+ /** 编辑模式; row:整行编辑,cell: 单元格编辑 */
936
+ editMode: { type: String, default: "cell" }
937
+ }, Jo = {
938
+ /** show loading */
939
+ show: { type: Boolean, default: !1 },
940
+ /** message on display when loading */
941
+ message: { type: String, default: "加载中..." }
942
+ }, we = {
943
+ /** 自动勾选子节点 */
944
+ autoCheckChildren: { type: Boolean, default: !1 },
945
+ /** 列集合 */
946
+ columns: { type: Array, default: [] },
947
+ /** 列配置 */
948
+ columnOption: { type: Object },
949
+ /** 命令列配置选项 */
950
+ commandOption: {
951
+ type: Object,
952
+ default: {
953
+ enable: !1,
954
+ commands: []
955
+ }
956
+ },
957
+ /** 被绑定数据 */
958
+ data: { type: Array, default: [] },
959
+ /** 禁用组件 */
960
+ disabled: { type: Boolean, default: !1 },
961
+ /** 用于控制节点禁用状态的字段 */
962
+ disabledField: { type: String, default: "disabled" },
963
+ /** 用于显示信息的字段 */
964
+ displayField: { type: String, default: "name" },
965
+ /** 允许编辑 */
966
+ editable: { type: Boolean, default: !1 },
967
+ /** 编辑配置 */
968
+ editOption: { type: Object, default: { selectOnEditing: !1, editMode: "cell" } },
969
+ /** 适配父组件尺寸 */
970
+ fit: { type: Boolean, default: !1 },
971
+ /** 列标题配置 */
972
+ header: { type: Object },
973
+ /** 高度 */
974
+ height: { type: Number, default: -1 },
975
+ /** 层级关系配置对象 */
976
+ hierarchy: {
977
+ type: Object,
978
+ default: {
979
+ cascadeOption: {
980
+ autoCancelParent: !0,
981
+ autoCheckChildren: !1,
982
+ autoCheckParent: !1,
983
+ selectionRange: "All"
984
+ },
985
+ parentIdField: "parent"
986
+ }
987
+ },
988
+ /** DataGrid组件唯一标识 */
989
+ id: { type: String, default: "" },
990
+ /** 被绑定数据的标识字段 */
991
+ idField: { type: String, default: "id", require: !0 },
992
+ // 是否展示 loading
993
+ loading: {
994
+ type: Boolean,
995
+ default: !1
996
+ },
997
+ /** 最小高度 */
998
+ minHeight: { type: Number, default: 300 },
999
+ /** 最小宽度 */
1000
+ minWidth: { type: Number, default: 400 },
1001
+ /** 新建数据 */
1002
+ newDataItem: {
1003
+ type: Function,
1004
+ default: () => {
1005
+ }
1006
+ },
1007
+ /** 分页配置 */
1008
+ pagination: {
1009
+ type: Object,
1010
+ default: {
1011
+ enable: !1,
1012
+ size: -1
1013
+ }
1014
+ },
1015
+ /** 行号配置 */
1016
+ rowNumber: {
1017
+ type: Object,
1018
+ default: {
1019
+ enable: !0,
1020
+ width: 32,
1021
+ heading: "序号"
1022
+ }
1023
+ },
1024
+ /** 行配置 */
1025
+ rowOption: {
1026
+ type: Object,
1027
+ default: {
1028
+ wrapContent: !1
1029
+ }
1030
+ },
1031
+ /** 选择配置 */
1032
+ selection: {
1033
+ type: Object,
1034
+ default: {
1035
+ enableSelectRow: !0,
1036
+ multiSelect: !1,
1037
+ multiSelectMode: "DependOnCheck",
1038
+ showCheckbox: !1,
1039
+ showSelectAll: !1,
1040
+ showSelection: !0
1041
+ }
1042
+ },
1043
+ /** 已选数据标识 */
1044
+ selectionValues: { type: Array, default: [] },
1045
+ /** 显示边框 */
1046
+ showBorder: { type: Boolean, default: !1 },
1047
+ /** 显示列头 */
1048
+ showHeader: { type: Boolean, default: !0 },
1049
+ /** 显示横向行分割线 */
1050
+ showHorizontalLines: { type: Boolean, default: !0 },
1051
+ /** 显示节点连接线 */
1052
+ showLines: { type: Boolean, default: !1 },
1053
+ /** 显示配置按钮 */
1054
+ showOptions: { type: Boolean, default: !1 },
1055
+ /** 显示滚动条 */
1056
+ showScrollBar: { type: String, default: "auto" },
1057
+ /** 显示设置按钮 */
1058
+ showSetting: { type: Boolean, default: !1 },
1059
+ /** 显示条纹 */
1060
+ showStripe: { type: Boolean, default: !0 },
1061
+ /** 显示树节点图标 */
1062
+ showTreeNodeIcons: { type: Boolean, default: !1 },
1063
+ /** 显示纵向列分割线 */
1064
+ showVerticallLines: { type: Boolean, default: !1 },
1065
+ /** 树节点图标数据 */
1066
+ treeNodeIconsData: { type: [Object, String], default: {} },
1067
+ /** 宽度 */
1068
+ width: { type: Number, default: -1 },
1069
+ /** 启用虚拟渲染 */
1070
+ virtualized: { type: Boolean, default: !1 }
1071
+ }, wo = Pe(we, Qe, Je, Ke), So = Wt(), Io = zt(), Xe = Object.assign({}, we, { componentId: { type: String, default: "" } }), Ro = Pe(Xe, Qe, Je, Ke), Bo = At();
1072
+ function Do(e, t, d, i, r, c, s, u, a, n, m, C, H, f, G, Z, k) {
1073
+ const {
1074
+ calculateCellPositionInRow: q
1075
+ } = c, {
1076
+ columnContext: w,
1077
+ hasLeftFixedColumn: B,
1078
+ hasRightFixedColumn: Y
1079
+ } = s, {
1080
+ gridDataStyle: x,
1081
+ leftFixedGridDataStyle: p,
1082
+ rightFixedGridDataStyle: ee
1083
+ } = f, {
1084
+ renderDataRow: y
1085
+ } = Et(e, t, w, k, u, a, n, m, C, H, f, G, Z), z = [y];
1086
+ function A(b, M) {
1087
+ const E = q(b);
1088
+ return k.value.filter((D) => D.visible !== !1).map((D, ne) => z[D.type](D, E, M, ne));
1089
+ }
1090
+ function S() {
1091
+ return P("div", {
1092
+ ref: i,
1093
+ class: "fv-grid-content-left-fixed"
1094
+ }, [P("div", {
1095
+ class: "fv-grid-data",
1096
+ style: p.value
1097
+ }, [A(w.value.leftColumns.filter((b) => b.visible), "left")])]);
1098
+ }
1099
+ function te() {
1100
+ return P("div", {
1101
+ ref: d,
1102
+ class: "fv-grid-content-primary"
1103
+ }, [P("div", {
1104
+ class: "fv-grid-data",
1105
+ style: x.value
1106
+ }, [A(w.value.primaryColumns.filter((b) => b.visible), "primary")])]);
1107
+ }
1108
+ function oe() {
1109
+ return P("div", {
1110
+ ref: r,
1111
+ class: "fv-grid-content-right-fixed"
1112
+ }, [P("div", {
1113
+ class: "fv-grid-data",
1114
+ style: ee.value
1115
+ }, [A(w.value.rightColumns.filter((b) => b.visible), "right")])]);
1116
+ }
1117
+ function J() {
1118
+ const b = [];
1119
+ return B.value && b.push(S()), b.push(te()), Y.value && b.push(oe()), b;
1120
+ }
1121
+ return {
1122
+ renderDataArea: J
1123
+ };
1124
+ }
1125
+ const Oo = /* @__PURE__ */ Oe({
1126
+ name: "FTreeGrid",
1127
+ props: we,
1128
+ emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode"],
1129
+ setup(e, t) {
1130
+ var Ie, Re;
1131
+ const i = ((Ie = e.rowOption) == null ? void 0 : Ie.height) || 28, r = g(20), c = g(e.columns), s = He(e), {
1132
+ idField: u
1133
+ } = s, a = g(), n = g(), m = g(), C = g(), H = g(), f = g([]), G = g(!1), Z = g(((Re = e.rowOption) == null ? void 0 : Re.wrapContent) || !1), k = Nt(e, s), q = ke(), w = xe(e), {
1134
+ collapseField: B
1135
+ } = w, {
1136
+ showLoading: Y,
1137
+ renderLoading: x
1138
+ } = _t(e, a), p = Me(e, /* @__PURE__ */ new Map(), q, w, s), {
1139
+ dataView: ee
1140
+ } = p, y = Te(e, p, s, f, t), z = Lt(e, f, p, s, y, t), A = j(() => e.disabled), S = j(() => e.virtualized ? Math.min(p.dataView.value.length, r.value) : p.dataView.value.length), {
1141
+ containerStyleObject: te
1142
+ } = Ve(e), oe = We(e), {
1143
+ applyCommands: J
1144
+ } = oe;
1145
+ J(c);
1146
+ const b = $t(e), M = ze(e), {
1147
+ applyColumnSorter: E,
1148
+ columnContext: D,
1149
+ updateColumnRenderContext: ne
1150
+ } = b;
1151
+ E(p, M);
1152
+ const K = Ae(e, D), T = Ee(e, t, y, s), V = Ne(e, t, s, T, f), ie = _e(e), ae = Le(e, V, ie), ge = $e(e, p, V, w, s, ie, ae), Q = Ut(e, c, p, S, 0, ge), {
1153
+ getVisualData: N
1154
+ } = Q, le = qt(e, D), re = Ue(e, y), {
1155
+ sidebarWidth: be
1156
+ } = re, v = qe(e, p, f, D, Q, S, 0, be), {
1157
+ onWheel: ve,
1158
+ dataGridWidth: ce,
1159
+ viewPortHeight: ue,
1160
+ viewPortWidth: X,
1161
+ resetScroll: se,
1162
+ updateVisibleRowsOnLatestVisibleScope: he
1163
+ } = v, de = Yt(e, D, n, X, K), {
1164
+ calculateColumnsSize: _
1165
+ } = de, I = Jt(), pe = Kt(n, H, p, I, v), fe = Qt(e, t, b, p, K, k, v), Ze = j(() => ({
1166
+ "fv-grid": !0,
1167
+ "fv-grid-bordered": e.showBorder,
1168
+ "fv-grid-horizontal-bordered": e.showHorizontalLines,
1169
+ "fv-datagrid-strip": e.showStripe
1170
+ })), et = j(() => ({
1171
+ "fv-grid-content": !0,
1172
+ "fv-grid-content-hover": G.value,
1173
+ "fv-grid-wrap-content": Z.value
1174
+ })), {
1175
+ renderDataArea: tt
1176
+ } = Do(e, t, m, C, H, le, b, p, V, w, T, y, z, v, Q, ie, f), {
1177
+ renderGridHeader: ot,
1178
+ renderGridColumnResizeOverlay: nt,
1179
+ shouldShowHeader: it
1180
+ } = Xt(e, t, n, C, H, b, p, fe, pe, q, I, de, K, y, re, M, v, X, f), {
1181
+ renderDataGridSidebar: at
1182
+ } = Zt(e, T, y, re, v), {
1183
+ renderDisableMask: lt
1184
+ } = eo(), {
1185
+ renderHorizontalScrollbar: rt
1186
+ } = Ye(e, n, v), {
1187
+ renderVerticalScrollbar: st
1188
+ } = to(e, n, v);
1189
+ function dt() {
1190
+ var o, l, O;
1191
+ if (n.value && n.value.clientHeight > 0 && ((o = n.value) == null ? void 0 : o.clientWidth) > 0) {
1192
+ const R = Math.ceil(n.value.clientHeight / i);
1193
+ R > r.value && (r.value = R, he()), ue.value = ((l = m.value) == null ? void 0 : l.clientHeight) || 0, ce.value = ((O = n.value) == null ? void 0 : O.clientWidth) || 0, _();
1194
+ }
1195
+ }
1196
+ Fe(() => {
1197
+ n.value && (r.value = Math.max(Math.ceil(n.value.clientHeight / i), r.value), f.value = N(0, S.value + 0 - 1), je(n.value, dt), _(), Ge(() => {
1198
+ n.value && (ce.value = n.value.clientWidth), m.value && (X.value = m.value.clientWidth, ue.value = m.value.clientHeight);
1199
+ })), Y.value && x();
1200
+ }), Tt(() => {
1201
+ }), me(X, () => {
1202
+ n.value && _();
1203
+ });
1204
+ function ct(o) {
1205
+ p.collapseTo(o), p.reOrderVisibleIndex(), se();
1206
+ }
1207
+ function ut(o) {
1208
+ p.expandTo(o), p.reOrderVisibleIndex(), se();
1209
+ }
1210
+ function Ce() {
1211
+ const o = y.getSelectionRow();
1212
+ return o ? o.dataIndex - 1 : -1;
1213
+ }
1214
+ function pt() {
1215
+ const o = Ce();
1216
+ p.insertNewDataItem(o), f.value = N(0, S.value + 0 - 1);
1217
+ }
1218
+ function ft() {
1219
+ const o = Ce();
1220
+ p.insertNewChildDataItem(o), f.value = N(0, S.value + 0 - 1);
1221
+ }
1222
+ function mt() {
1223
+ const o = Ce(), l = z.getNextSelectableHierarchyItemId(o);
1224
+ p.removeHierarchyDataItem(o), f.value = N(0, S.value + 0 - 1), l && y.selectItemById(l);
1225
+ }
1226
+ function yt(o) {
1227
+ V.onEditingRow(o);
1228
+ }
1229
+ function gt(o) {
1230
+ V.acceptEditingRow(o);
1231
+ }
1232
+ function bt(o) {
1233
+ V.cancelEditingRow(o);
1234
+ }
1235
+ function Se(o) {
1236
+ o && (c.value = o, J(c), ne(c.value), E(p, M), _());
1237
+ }
1238
+ me(() => e.columns, (o) => {
1239
+ Se(o);
1240
+ });
1241
+ function vt(o, l) {
1242
+ o && (p.load(o), p.reOrderVisibleIndex(), l != null && l.keepScrollPosition ? v.scrollTo(v.offsetY.value) : se());
1243
+ }
1244
+ function ht(o) {
1245
+ y.selectItemById(o);
1246
+ }
1247
+ function Ct(o) {
1248
+ const l = f.value.find((O) => O.raw[s.idField.value] === o);
1249
+ l && T.clickRowItem(l);
1250
+ }
1251
+ function wt(o) {
1252
+ T.activeRowById(o);
1253
+ }
1254
+ function St(o) {
1255
+ y.selectItemByIds(o);
1256
+ }
1257
+ function It() {
1258
+ return y.getSelectedItems();
1259
+ }
1260
+ function Rt() {
1261
+ y.clearSelection();
1262
+ }
1263
+ const Bt = j(() => !f.value || !f.value.length), {
1264
+ renderEmpty: Dt
1265
+ } = oo(t);
1266
+ function Ot() {
1267
+ return y.getSelectionRow();
1268
+ }
1269
+ function Ft(o) {
1270
+ y.unSelectItemByIds(o);
1271
+ }
1272
+ function Gt() {
1273
+ return y.currentSelectedDataId.value;
1274
+ }
1275
+ function jt(o, l, O) {
1276
+ const R = ee.value.find((F) => F[u.value] === o);
1277
+ if (R) {
1278
+ if (Object.keys(R).forEach((h) => {
1279
+ Object.prototype.hasOwnProperty.call(l, h) && (R[h] = l[h]);
1280
+ }), O) {
1281
+ const {
1282
+ collapseField: h,
1283
+ disabledField: L,
1284
+ checkedField: $,
1285
+ visibleField: U
1286
+ } = O;
1287
+ h && !W(l[h]) && (R.__fv_collapse__ = l[h]), $ && !W(l[$]) && (R.__fv_checked__ = l[$]), L && !W(l[L]) && (R.__fv_disabled__ = l[L]), U && !W(l[U]) && (R.__fv_visible__ = l[U]);
1288
+ }
1289
+ const F = f.value.find((h) => h.raw[u.value] === o), Be = f.value.findIndex((h) => h.raw[u.value] === o);
1290
+ if (F) {
1291
+ if (F.raw = R, Object.keys(F.data).forEach((h) => {
1292
+ F.data[h].updateData(R);
1293
+ }), O) {
1294
+ const {
1295
+ collapseField: h,
1296
+ disabledField: L,
1297
+ checkedField: $,
1298
+ visibleField: U
1299
+ } = O;
1300
+ h && !W(l[h]) && (F.collapse = l[h]), $ && !W(l[$]) && (F.checked = l[$]), L && !W(l[L]) && (F.disabled = l[L]), U && !W(l[U]) && (F.visible = l[U]);
1301
+ }
1302
+ f.value = [...f.value.slice(0, Be), F, ...f.value.slice(Be + 1)];
1303
+ }
1304
+ }
1305
+ }
1306
+ function Pt(o) {
1307
+ const l = p.dataView.value.find((O) => O[u.value] === o);
1308
+ return l ? l[B.value] : "";
1309
+ }
1310
+ function Ht() {
1311
+ return B.value;
1312
+ }
1313
+ t.expose({
1314
+ activeRowById: wt,
1315
+ addNewDataItem: pt,
1316
+ addNewChildDataItem: ft,
1317
+ collapseTo: ct,
1318
+ expandTo: ut,
1319
+ removeDataItem: mt,
1320
+ editDataItem: yt,
1321
+ acceptDataItem: gt,
1322
+ cancelDataItem: bt,
1323
+ updateColumns: Se,
1324
+ updateDataSource: vt,
1325
+ selectItemById: ht,
1326
+ selectItemByIds: St,
1327
+ getSelectedItems: It,
1328
+ clearSelection: Rt,
1329
+ getSelectionRow: Ot,
1330
+ clickRowItemById: Ct,
1331
+ unSelectItemByIds: Ft,
1332
+ getCurrentRowId: Gt,
1333
+ reassignRowData: jt,
1334
+ getCollapseField: Ht,
1335
+ getCollapseStatusById: Pt
1336
+ });
1337
+ const kt = j(() => {
1338
+ const o = {};
1339
+ return v.shouldShowHorizontalScrollbar.value && (o.paddingBottom = "10px"), v.shouldShowVirticalScrollbar.value && (o.paddingRight = "10px"), o;
1340
+ }), xt = j(() => ({
1341
+ ...te.value,
1342
+ borderRadius: "5px"
1343
+ }));
1344
+ return () => P("div", {
1345
+ ref: a,
1346
+ class: Ze.value,
1347
+ style: xt.value,
1348
+ onWheel: ve
1349
+ }, [n.value && it.value && ot(), P("div", {
1350
+ ref: n,
1351
+ class: et.value,
1352
+ onMouseover: () => G.value = !0,
1353
+ onMouseleave: () => G.value = !1,
1354
+ style: kt.value
1355
+ }, [n.value && at(f), n.value && tt(), n.value && Bt.value && Dt(), n.value && rt(), n.value && st()]), nt(), A.value && lt()]);
1356
+ }
1357
+ });
1358
+ class Fo extends ao {
1359
+ constructor(t, d) {
1360
+ super(t, d);
1361
+ }
1362
+ getPropertyConfig(t) {
1363
+ return this.getBasicPropConfig(t), this.getAppearanceProperties(t), this.getEventPropConfig(t), this.propertyConfig;
1364
+ }
1365
+ getBasicPropConfig(t) {
1366
+ var s, u, a;
1367
+ const d = (a = (u = (s = this.formSchemaUtils.getFormSchema()) == null ? void 0 : s.module) == null ? void 0 : u.entity[0]) == null ? void 0 : a.entities[0], i = this.assembleSchemaEntityToTree(d, 0), r = this, c = super.getBasicPropConfig(t);
1368
+ this.propertyConfig.categories.basic = {
1369
+ description: "Basic Information",
1370
+ title: "基本信息",
1371
+ properties: {
1372
+ ...c.properties,
1373
+ dataSource: {
1374
+ description: "绑定数据源",
1375
+ title: "绑定数据源",
1376
+ editor: {
1377
+ type: "combo-tree",
1378
+ textField: "name",
1379
+ valueField: "label",
1380
+ data: i,
1381
+ editable: !1
1382
+ },
1383
+ readonly: !0
1384
+ }
1385
+ },
1386
+ setPropertyRelates(n, m) {
1387
+ switch (n && n.propertyID) {
1388
+ case "dataSource": {
1389
+ const C = r.formSchemaUtils.getViewModelById(r.viewModelId);
1390
+ if (C) {
1391
+ const H = i.find((f) => f.label === n.propertyValue);
1392
+ C.bindTo = H.bindTo;
1393
+ }
1394
+ r.designViewModelUtils.assembleDesignViewModel();
1395
+ break;
1396
+ }
1397
+ }
1398
+ }
1399
+ };
1400
+ }
1401
+ getAppearanceProperties(t) {
1402
+ var d, i;
1403
+ this.propertyConfig.categories.appearance = {
1404
+ title: "外观",
1405
+ properties: {
1406
+ columns: {
1407
+ title: "列设置",
1408
+ description: "列设置",
1409
+ $converter: "/converter/items-count.converter",
1410
+ editor: {
1411
+ type: "grid-field-editor",
1412
+ viewModelId: this.viewModelId,
1413
+ gridData: t,
1414
+ gridType: "tree-grid-column"
1415
+ },
1416
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1417
+ refreshPanelAfterChanged: !0
1418
+ },
1419
+ fit: {
1420
+ title: "适配父组件尺寸",
1421
+ type: "boolean",
1422
+ description: "是否适配父组件尺寸",
1423
+ visible: !1
1424
+ },
1425
+ showStripe: {
1426
+ title: "显示条纹",
1427
+ type: "boolean",
1428
+ description: "是否显示条纹"
1429
+ },
1430
+ showBorder: {
1431
+ title: "显示边框",
1432
+ type: "boolean",
1433
+ description: "是否显示边框"
1434
+ }
1435
+ // showTreeNodeIcons: {
1436
+ // title: '显示图标',
1437
+ // type: "boolean",
1438
+ // description: '是否显示图标'
1439
+ // },
1440
+ // showSetting: {
1441
+ // title: '显示设置按钮',
1442
+ // type: "boolean",
1443
+ // description: '是否显示设置按钮',
1444
+ // visible:false
1445
+ // }
1446
+ },
1447
+ setPropertyRelates(r, c) {
1448
+ switch (r && r.propertyID) {
1449
+ case "useBlankWhenDataIsEmpty":
1450
+ t.emptyDataHeight = t.useBlankWhenDataIsEmpty ? 36 : 240;
1451
+ break;
1452
+ case "fields":
1453
+ t.fields = r.propertyValue || [];
1454
+ break;
1455
+ }
1456
+ }
1457
+ }, this.propertyConfig.categories.pagination = {
1458
+ title: "分页",
1459
+ $converter: "/converter/pagination.converter",
1460
+ properties: {
1461
+ enable: {
1462
+ title: "启用分页",
1463
+ type: "boolean",
1464
+ refreshPanelAfterChanged: !0,
1465
+ editor: {
1466
+ readonly: !0
1467
+ }
1468
+ },
1469
+ // mode: {
1470
+ // visible: propertyData.pagination?.enable || false,
1471
+ // title: '分页交互模式',
1472
+ // type: "enum",
1473
+ // editor: {
1474
+ // type: "combo-list",
1475
+ // textField: "name",
1476
+ // valueField: "value",
1477
+ // data: [{ "value": "client", "name": "客户端" }, { "value": "server", "name": "服务器端" }]
1478
+ // }
1479
+ // },
1480
+ showIndex: {
1481
+ visible: ((d = t.pagination) == null ? void 0 : d.enable) || !1,
1482
+ title: "显示页码",
1483
+ type: "boolean"
1484
+ },
1485
+ showLimits: {
1486
+ visible: ((i = t.pagination) == null ? void 0 : i.enable) || !1,
1487
+ title: "显示每页记录数",
1488
+ type: "boolean"
1489
+ }
1490
+ }
1491
+ };
1492
+ }
1493
+ getEventPropConfig(t) {
1494
+ const d = [
1495
+ {
1496
+ label: "onSelectionChange",
1497
+ name: "行切换事件"
1498
+ },
1499
+ {
1500
+ label: "onClickRow",
1501
+ name: "行点击事件"
1502
+ }
1503
+ ], i = this, r = i.eventsEditorUtils.formProperties(t, i.viewModelId, d), c = {};
1504
+ c[i.viewModelId] = {
1505
+ type: "events-editor",
1506
+ editor: {
1507
+ initialData: r
1508
+ }
1509
+ }, this.propertyConfig.categories.eventsEditor = {
1510
+ title: "事件",
1511
+ hideTitle: !0,
1512
+ properties: c,
1513
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1514
+ refreshPanelAfterChanged: !0,
1515
+ tabId: "commands",
1516
+ tabName: "交互",
1517
+ setPropertyRelates(s, u) {
1518
+ const a = s.propertyValue;
1519
+ delete t[i.viewModelId], a && (a.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(t, i.viewModelId, a.events, a)), t.remoteSort = !!t.columnSorted;
1520
+ }
1521
+ };
1522
+ }
1523
+ /**
1524
+ * 将schema实体表组装成树
1525
+ */
1526
+ assembleSchemaEntityToTree(t, d, i, r = "", c = []) {
1527
+ const s = r ? `${r}/${t.label}` : "/";
1528
+ return c.push({
1529
+ id: t.id,
1530
+ name: t.name,
1531
+ label: t.label,
1532
+ layer: d,
1533
+ parent: i && i.id,
1534
+ bindTo: s.replace("//", "/")
1535
+ }), t.type.entities && t.type.entities.length && t.type.entities.map((u) => this.assembleSchemaEntityToTree(u, d + 1, t, s, c)), c;
1536
+ }
1537
+ }
1538
+ function Go(e, t) {
1539
+ const d = e.schema, i = g(!0), r = g(!0);
1540
+ function c(m) {
1541
+ return m && m.sourceType === "control" ? m.componentCategory === "input" : !1;
1542
+ }
1543
+ function s() {
1544
+ return !1;
1545
+ }
1546
+ function u() {
1547
+ return !1;
1548
+ }
1549
+ function a() {
1550
+ return !0;
1551
+ }
1552
+ function n(m) {
1553
+ return new Fo(m, t).getPropertyConfig(d);
1554
+ }
1555
+ return {
1556
+ canAccepts: c,
1557
+ checkCanDeleteComponent: s,
1558
+ checkCanMoveComponent: u,
1559
+ hideNestedPaddingInDesginerView: a,
1560
+ triggerBelongedComponentToMoveWhenMoved: i,
1561
+ triggerBelongedComponentToDeleteWhenDeleted: r,
1562
+ getPropsConfig: n
1563
+ };
1564
+ }
1565
+ const ye = /* @__PURE__ */ Oe({
1566
+ name: "FTreeGridDesign",
1567
+ props: Xe,
1568
+ emits: [],
1569
+ setup(e, t) {
1570
+ var de, _;
1571
+ const d = g(), i = 0, r = ((de = e.rowOption) == null ? void 0 : de.height) || 28, c = g(20), s = g(e.columns), u = He(e), a = g(), n = g(), m = g([]), C = g(!1), H = g(((_ = e.rowOption) == null ? void 0 : _.wrapContent) || !1), f = De("designer-host-service"), G = De("design-item-context"), Z = Go(G, f), k = io(d, G, Z);
1572
+ k.value.designerClass = "f-utils-fill-flex-column";
1573
+ const q = ke(), w = xe(e), B = Me(e, /* @__PURE__ */ new Map(), q, w, u), Y = Te(e, B, u, m, t), x = j(() => B.dataView.value.length), {
1574
+ containerStyleObject: p
1575
+ } = Ve(e), ee = We(e), {
1576
+ applyCommands: y
1577
+ } = ee;
1578
+ y(s);
1579
+ const z = lo(e), {
1580
+ applyColumnSorter: A,
1581
+ columnContext: S,
1582
+ updateColumnRenderContext: te
1583
+ } = z, oe = ze(e), J = Ae(e, S), b = Ee(e, t, Y, u), M = Ne(e, t, u, b, m), E = _e(e), D = Le(e, M, E), ne = $e(e, B, M, w, u, E, D), K = ro(e, s, B, x, i, ne), {
1584
+ getVisualData: T
1585
+ } = K, V = Ue(e, Y), {
1586
+ sidebarWidth: ie
1587
+ } = V;
1588
+ m.value = T(0, x.value + i - 1);
1589
+ const ae = qe(e, B, m, S, K, x, i, ie), {
1590
+ onWheel: ge,
1591
+ dataGridWidth: Q,
1592
+ viewPortHeight: N,
1593
+ viewPortWidth: le,
1594
+ updateVisibleRowsOnLatestVisibleScope: re
1595
+ } = ae, be = so(e, S, a, le, J), {
1596
+ calculateColumnsSize: v
1597
+ } = be, ve = j(() => ({
1598
+ "drag-container": !0,
1599
+ "fv-grid": !0,
1600
+ "fv-grid-bordered": e.showBorder,
1601
+ "fv-datagrid-strip": e.showStripe
1602
+ })), ce = j(() => ({
1603
+ "fv-grid-content": !0,
1604
+ "fv-grid-content-hover": C.value,
1605
+ "fv-grid-wrap-content": H.value
1606
+ })), {
1607
+ renderGridHeader: ue
1608
+ } = no(G, e, z, ae, "tree-grid-column"), {
1609
+ renderHorizontalScrollbar: X
1610
+ } = Ye(e, a, ae);
1611
+ function se() {
1612
+ var pe, fe;
1613
+ const I = Math.ceil(a.value.clientHeight / r);
1614
+ I > c.value && (c.value = I, re()), N.value = ((pe = n.value) == null ? void 0 : pe.clientHeight) || 0, Q.value = ((fe = a.value) == null ? void 0 : fe.clientWidth) || 0, v();
1615
+ }
1616
+ Fe(() => {
1617
+ d.value.componentInstance = k, a.value && (c.value = Math.max(Math.ceil(a.value.clientHeight / r), c.value), m.value = T(0, x.value + i - 1), je(a.value, se), v(), Ge(() => {
1618
+ a.value && (Q.value = a.value.clientWidth), n.value && (le.value = n.value.clientWidth, N.value = n.value.clientHeight);
1619
+ }));
1620
+ });
1621
+ function he(I) {
1622
+ I && (s.value = I, y(s), te(s.value), A(B, oe), v());
1623
+ }
1624
+ return me(() => e.columns, (I) => {
1625
+ he(I);
1626
+ }), me(le, () => {
1627
+ a.value && v();
1628
+ }), t.expose(k.value), () => P("div", {
1629
+ ref: d,
1630
+ class: ve.value,
1631
+ style: p.value,
1632
+ onWheel: ge,
1633
+ dragref: `${G.schema.id}-container`
1634
+ }, [a.value && ue(), P("div", {
1635
+ ref: a,
1636
+ class: ce.value,
1637
+ onMouseover: () => {
1638
+ C.value = !0;
1639
+ },
1640
+ onMouseleave: () => {
1641
+ C.value = !1;
1642
+ }
1643
+ }, [X()])]);
1644
+ }
1645
+ });
1646
+ ye.register = (e, t, d, i) => {
1647
+ e["tree-grid"] = Oo, t["tree-grid"] = wo, i["tree-grid"] = { bindingResolver: Io, selectionItemResolver: So, updateColumnsResolver: Bo };
1648
+ };
1649
+ ye.registerDesigner = (e, t, d) => {
1650
+ e["tree-grid"] = ye, t["tree-grid"] = Ro;
1651
+ };
1652
+ const Ko = Mt(ye);
1653
+ export {
1654
+ ye as FTreeGridDesign,
1655
+ Io as bindingResolver,
1656
+ qo as columnOptions,
1657
+ Ko as default,
1658
+ Ro as designPropsResolver,
1659
+ Yo as editOptions,
1660
+ _o as filterOptions,
1661
+ No as groupOptions,
1662
+ Lo as headerOptions,
1663
+ Jo as loadingOptions,
1664
+ Ao as paginationOptions,
1665
+ wo as propsResolver,
1666
+ $o as rowOptions,
1667
+ So as selectionItemResolver,
1668
+ Eo as sortOptions,
1669
+ Uo as summaryOptions,
1670
+ Xe as treeGridDesignProps,
1671
+ we as treeGridProps,
1672
+ Bo as updateColumnsResolver
1673
+ };