@farris/ui-vue 1.6.5-beta.8 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +334 -334
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +4 -4
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +136 -133
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/component/index.esm.js +300 -300
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +4 -4
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +295 -295
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3416 -3350
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +4 -4
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +170 -170
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +637 -637
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +699 -696
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +446 -446
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +377 -374
- package/components/filter-condition-editor/index.umd.cjs +2 -2
- package/components/flow-canvas/index.esm.js +204 -204
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +42 -40
- package/components/list-view/index.umd.cjs +2 -2
- package/components/mapping-editor/index.esm.js +427 -427
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +212 -212
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +276 -276
- package/components/modal/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +160 -160
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +314 -314
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +468 -463
- package/components/order/index.umd.cjs +2 -2
- package/components/popover/index.esm.js +58 -56
- package/components/popover/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +215 -215
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4 -4
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +282 -282
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +944 -941
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +498 -492
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/search-box/index.esm.js +76 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +211 -211
- package/components/section/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +377 -374
- package/components/sort-condition-editor/index.umd.cjs +2 -2
- package/components/switch/index.esm.js +78 -77
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +579 -579
- package/components/tabs/index.umd.cjs +2 -2
- package/components/textarea/index.esm.js +362 -362
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +9799 -0
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/time-picker/package.json +8 -0
- package/components/time-picker/style.js +6 -0
- package/components/transfer/index.esm.js +81 -79
- package/components/transfer/index.umd.cjs +2 -2
- package/components/tree-grid/index.esm.js +100 -100
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2361 -2279
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/video/index.esm.js +219 -219
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +4856 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +254 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +382 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +15439 -0
- package/designer/data-grid/index.umd.cjs +23 -0
- package/designer/data-view/index.esm.js +854 -0
- package/designer/data-view/index.umd.cjs +38 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +525 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +22330 -0
- package/designer/farris-designer.all.umd.cjs +34 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +1098 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/list-view/index.css +1 -0
- package/designer/list-view/index.esm.js +4689 -0
- package/designer/list-view/index.umd.cjs +40 -0
- package/designer/radio-group/index.css +1 -0
- package/designer/radio-group/index.esm.js +6985 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +1099 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +9619 -9535
- package/farris.all.umd.cjs +24 -24
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
|
@@ -0,0 +1,1099 @@
|
|
|
1
|
+
import Ce, { treeGridProps as K } from "../../components/tree-grid/index.esm.js";
|
|
2
|
+
import { excludeProperties as he, withInstall as ve } from "../../components/common/index.esm.js";
|
|
3
|
+
import { ref as m, defineComponent as we, inject as q, computed as V, onMounted as Se, nextTick as Pe, watch as L, createVNode as J } from "vue";
|
|
4
|
+
import { useResizeObserver as Re } from "@vueuse/core";
|
|
5
|
+
import { resolveAppearance as Te, createPropsResolver as Q, createTreeGridSelectionItemResolver as Ie, createTreeGridBindingResolver as Ge, createDataViewUpdateColumnsResolver as je } from "../../components/dynamic-resolver/index.esm.js";
|
|
6
|
+
import { useIdentify as Me, useFilter as ke, useHierarchy as De, useDataView as Ve, useSelection as Be, useDataViewContainerStyle as Oe, useCommandColumn as Fe, useSort as Ee, useGroupColumn as We, useRow as ze, useEdit as Ne, useVisualDataBound as $e, useVisualDataCell as Ae, useVisualDataRow as He, useSidebar as Ue, useVirtualScroll as xe, getHorizontalScrollbar as qe } from "../../components/data-view/index.esm.js";
|
|
7
|
+
import { getColumnHeader as Le } from "../data-grid/index.esm.js";
|
|
8
|
+
import { DgControl as B, useDesignerComponent as Je } from "../../components/designer-canvas/index.esm.js";
|
|
9
|
+
import { BaseControlProperty as Ke } from "../../components/property-panel/index.esm.js";
|
|
10
|
+
import { useCommandOption as Qe, useColumnOption as Xe, useRowOption as Ye, useSummary as Ze, useAppearance as _e, useRowNumber as et, usePagination as tt, useDataGridEvent as ot, useDesignerColumn as nt, useDesignerVisualData as it, useDesignerFitColumn as rt } from "../data-view/index.esm.js";
|
|
11
|
+
const st = "https://json-schema.org/draft/2020-12/schema", at = "https://farris-design.gitee.io/tree-grid.schema.json", lt = "tree-grid", pt = "A Farris Data Grid Component", ct = "object", dt = {
|
|
12
|
+
id: {
|
|
13
|
+
description: "The unique identifier for a Input Group",
|
|
14
|
+
type: "string"
|
|
15
|
+
},
|
|
16
|
+
type: {
|
|
17
|
+
description: "The type string of Input Group component",
|
|
18
|
+
type: "string",
|
|
19
|
+
default: "tree-grid"
|
|
20
|
+
},
|
|
21
|
+
appearance: {
|
|
22
|
+
description: "",
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
class: {
|
|
26
|
+
type: "string"
|
|
27
|
+
},
|
|
28
|
+
style: {
|
|
29
|
+
type: "string"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
default: {}
|
|
33
|
+
},
|
|
34
|
+
fit: {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
showStripe: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
default: !0
|
|
41
|
+
},
|
|
42
|
+
showBorder: {
|
|
43
|
+
type: "boolean",
|
|
44
|
+
default: !1
|
|
45
|
+
},
|
|
46
|
+
showTreeNodeIcons: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
default: !1
|
|
49
|
+
},
|
|
50
|
+
showSetting: {
|
|
51
|
+
type: "boolean",
|
|
52
|
+
default: !1
|
|
53
|
+
},
|
|
54
|
+
size: {
|
|
55
|
+
description: "",
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
width: {
|
|
59
|
+
type: "number"
|
|
60
|
+
},
|
|
61
|
+
height: {
|
|
62
|
+
type: "number"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
67
|
+
dataSource: {
|
|
68
|
+
description: "",
|
|
69
|
+
type: "string",
|
|
70
|
+
default: ""
|
|
71
|
+
},
|
|
72
|
+
columns: {
|
|
73
|
+
description: "",
|
|
74
|
+
type: "array",
|
|
75
|
+
default: []
|
|
76
|
+
},
|
|
77
|
+
identifyField: {
|
|
78
|
+
description: "",
|
|
79
|
+
type: "string"
|
|
80
|
+
},
|
|
81
|
+
editable: {
|
|
82
|
+
description: "",
|
|
83
|
+
type: "boolean",
|
|
84
|
+
default: !1
|
|
85
|
+
},
|
|
86
|
+
disabled: {
|
|
87
|
+
description: "",
|
|
88
|
+
type: "boolean",
|
|
89
|
+
default: !1
|
|
90
|
+
},
|
|
91
|
+
visible: {
|
|
92
|
+
description: "",
|
|
93
|
+
type: "boolean",
|
|
94
|
+
default: !0
|
|
95
|
+
},
|
|
96
|
+
cell: {
|
|
97
|
+
type: "object",
|
|
98
|
+
properties: {
|
|
99
|
+
highlightFocusingCell: {
|
|
100
|
+
description: "",
|
|
101
|
+
type: "boolean",
|
|
102
|
+
default: !1
|
|
103
|
+
},
|
|
104
|
+
mergeCell: {
|
|
105
|
+
description: "",
|
|
106
|
+
type: "boolean",
|
|
107
|
+
default: !1
|
|
108
|
+
},
|
|
109
|
+
showEditableIcon: {
|
|
110
|
+
description: "",
|
|
111
|
+
type: "boolean",
|
|
112
|
+
default: !1
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
column: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
fitColumns: {
|
|
120
|
+
description: "",
|
|
121
|
+
type: "boolean",
|
|
122
|
+
default: !1
|
|
123
|
+
},
|
|
124
|
+
fitMode: {
|
|
125
|
+
description: "",
|
|
126
|
+
type: "string",
|
|
127
|
+
default: "average"
|
|
128
|
+
},
|
|
129
|
+
groups: {
|
|
130
|
+
description: "",
|
|
131
|
+
type: "array",
|
|
132
|
+
default: []
|
|
133
|
+
},
|
|
134
|
+
reorderColumn: {
|
|
135
|
+
description: "Enable to drag column to reorder",
|
|
136
|
+
type: "boolean",
|
|
137
|
+
default: !1
|
|
138
|
+
},
|
|
139
|
+
resizeColumn: {
|
|
140
|
+
type: "boolean",
|
|
141
|
+
default: !0
|
|
142
|
+
},
|
|
143
|
+
resizeColumnOnDoubleClick: {
|
|
144
|
+
description: "",
|
|
145
|
+
type: "boolean",
|
|
146
|
+
default: !0
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
command: {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
enable: {
|
|
154
|
+
description: "",
|
|
155
|
+
type: "boolean",
|
|
156
|
+
default: !1
|
|
157
|
+
},
|
|
158
|
+
commands: {
|
|
159
|
+
type: "array",
|
|
160
|
+
default: []
|
|
161
|
+
},
|
|
162
|
+
commandColumnWidth: {
|
|
163
|
+
description: "",
|
|
164
|
+
type: "number",
|
|
165
|
+
default: 120
|
|
166
|
+
},
|
|
167
|
+
onClickDeleteCommand: {
|
|
168
|
+
description: "",
|
|
169
|
+
type: "string",
|
|
170
|
+
default: ""
|
|
171
|
+
},
|
|
172
|
+
onClickEditCommand: {
|
|
173
|
+
description: "",
|
|
174
|
+
type: "string",
|
|
175
|
+
default: ""
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
contextMenu: {
|
|
180
|
+
description: "",
|
|
181
|
+
type: "object",
|
|
182
|
+
properties: {
|
|
183
|
+
enable: {
|
|
184
|
+
description: "",
|
|
185
|
+
type: "boolean",
|
|
186
|
+
default: !1
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
customizaiton: {
|
|
191
|
+
type: "object",
|
|
192
|
+
properties: {
|
|
193
|
+
enableScheme: {
|
|
194
|
+
description: "",
|
|
195
|
+
type: "boolean",
|
|
196
|
+
default: !1
|
|
197
|
+
},
|
|
198
|
+
enableSetting: {
|
|
199
|
+
description: "",
|
|
200
|
+
type: "boolean",
|
|
201
|
+
default: !1
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
edit: {
|
|
206
|
+
type: "obejct",
|
|
207
|
+
properties: {
|
|
208
|
+
mode: {
|
|
209
|
+
description: "",
|
|
210
|
+
type: "string",
|
|
211
|
+
default: "cell",
|
|
212
|
+
enum: [
|
|
213
|
+
"cell",
|
|
214
|
+
"row",
|
|
215
|
+
"card"
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
selectOnEditing: {
|
|
219
|
+
description: "",
|
|
220
|
+
type: "boolean",
|
|
221
|
+
default: !1
|
|
222
|
+
},
|
|
223
|
+
onAppendRow: {
|
|
224
|
+
description: "",
|
|
225
|
+
type: "string",
|
|
226
|
+
default: ""
|
|
227
|
+
},
|
|
228
|
+
onBeforeEdit: {
|
|
229
|
+
description: "",
|
|
230
|
+
type: "string",
|
|
231
|
+
default: ""
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
filter: {
|
|
236
|
+
type: "object",
|
|
237
|
+
properties: {
|
|
238
|
+
enable: {
|
|
239
|
+
description: "",
|
|
240
|
+
type: "boolean",
|
|
241
|
+
default: !1
|
|
242
|
+
},
|
|
243
|
+
filterStyle: {
|
|
244
|
+
description: "",
|
|
245
|
+
type: "string",
|
|
246
|
+
default: "filter-column",
|
|
247
|
+
enum: [
|
|
248
|
+
"filter-column",
|
|
249
|
+
"filter-row"
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
mode: {
|
|
253
|
+
description: "",
|
|
254
|
+
type: "string",
|
|
255
|
+
default: "server",
|
|
256
|
+
enum: [
|
|
257
|
+
"server"
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
showSummary: {
|
|
261
|
+
description: "",
|
|
262
|
+
type: "boolean",
|
|
263
|
+
default: !0
|
|
264
|
+
},
|
|
265
|
+
onFilterChange: {
|
|
266
|
+
description: "",
|
|
267
|
+
type: "string",
|
|
268
|
+
default: ""
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
footer: {
|
|
273
|
+
type: "object",
|
|
274
|
+
properties: {
|
|
275
|
+
enable: {
|
|
276
|
+
description: "",
|
|
277
|
+
type: "boolean",
|
|
278
|
+
default: !1
|
|
279
|
+
},
|
|
280
|
+
customFooterStyle: {
|
|
281
|
+
description: "",
|
|
282
|
+
type: "object"
|
|
283
|
+
},
|
|
284
|
+
footerDataCommand: {
|
|
285
|
+
description: "",
|
|
286
|
+
type: "string",
|
|
287
|
+
default: ""
|
|
288
|
+
},
|
|
289
|
+
footerDataFrom: {
|
|
290
|
+
description: "",
|
|
291
|
+
type: "string",
|
|
292
|
+
default: "client"
|
|
293
|
+
},
|
|
294
|
+
footerHeight: {
|
|
295
|
+
description: "",
|
|
296
|
+
type: "number",
|
|
297
|
+
default: 29
|
|
298
|
+
},
|
|
299
|
+
footerPosition: {
|
|
300
|
+
description: "",
|
|
301
|
+
type: "string",
|
|
302
|
+
default: "bottom"
|
|
303
|
+
},
|
|
304
|
+
footerTemplate: {
|
|
305
|
+
description: "",
|
|
306
|
+
type: "string",
|
|
307
|
+
default: ""
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
group: {
|
|
312
|
+
description: "",
|
|
313
|
+
type: "object",
|
|
314
|
+
properties: {
|
|
315
|
+
enable: {
|
|
316
|
+
description: "",
|
|
317
|
+
type: "boolean",
|
|
318
|
+
default: !1
|
|
319
|
+
},
|
|
320
|
+
customGroupRow: {
|
|
321
|
+
description: "",
|
|
322
|
+
type: "object"
|
|
323
|
+
},
|
|
324
|
+
customGroupRowStyle: {
|
|
325
|
+
description: "",
|
|
326
|
+
type: "obejct"
|
|
327
|
+
},
|
|
328
|
+
customSummaryStyle: {
|
|
329
|
+
description: "",
|
|
330
|
+
type: "obejct"
|
|
331
|
+
},
|
|
332
|
+
groupColSpan: {
|
|
333
|
+
description: "",
|
|
334
|
+
type: "number",
|
|
335
|
+
default: 1
|
|
336
|
+
},
|
|
337
|
+
groupFields: {
|
|
338
|
+
description: "",
|
|
339
|
+
type: "array",
|
|
340
|
+
default: []
|
|
341
|
+
},
|
|
342
|
+
showGroupedColumn: {
|
|
343
|
+
description: "",
|
|
344
|
+
type: "boolean",
|
|
345
|
+
default: !0
|
|
346
|
+
},
|
|
347
|
+
showGroupPanel: {
|
|
348
|
+
description: "",
|
|
349
|
+
type: "boolean",
|
|
350
|
+
default: !1
|
|
351
|
+
},
|
|
352
|
+
showSummary: {
|
|
353
|
+
description: "",
|
|
354
|
+
type: "boolean",
|
|
355
|
+
default: !1
|
|
356
|
+
},
|
|
357
|
+
summaryPosition: {
|
|
358
|
+
description: "",
|
|
359
|
+
type: "string",
|
|
360
|
+
default: "separate",
|
|
361
|
+
enum: [
|
|
362
|
+
"separate",
|
|
363
|
+
"merge-to-group"
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
disableGroupOnEditing: {
|
|
367
|
+
description: "",
|
|
368
|
+
type: "boolean",
|
|
369
|
+
default: !0
|
|
370
|
+
},
|
|
371
|
+
expandGroupRows: {
|
|
372
|
+
description: "",
|
|
373
|
+
type: "boolean",
|
|
374
|
+
default: !0
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
header: {
|
|
379
|
+
type: "object",
|
|
380
|
+
properties: {
|
|
381
|
+
wrapHeadings: {
|
|
382
|
+
description: "",
|
|
383
|
+
type: "boolean",
|
|
384
|
+
default: !1
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
pagination: {
|
|
389
|
+
type: "object",
|
|
390
|
+
properties: {
|
|
391
|
+
enable: {
|
|
392
|
+
description: "",
|
|
393
|
+
type: "boolean",
|
|
394
|
+
default: !1
|
|
395
|
+
},
|
|
396
|
+
disablePagination: {
|
|
397
|
+
description: "",
|
|
398
|
+
type: "string",
|
|
399
|
+
default: ""
|
|
400
|
+
},
|
|
401
|
+
contentTemplate: {
|
|
402
|
+
description: "",
|
|
403
|
+
type: "string",
|
|
404
|
+
default: ""
|
|
405
|
+
},
|
|
406
|
+
index: {
|
|
407
|
+
description: "",
|
|
408
|
+
type: "number",
|
|
409
|
+
default: 1
|
|
410
|
+
},
|
|
411
|
+
mode: {
|
|
412
|
+
description: "",
|
|
413
|
+
type: "string",
|
|
414
|
+
default: "server",
|
|
415
|
+
enum: [
|
|
416
|
+
"server",
|
|
417
|
+
"client"
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
showGoto: {
|
|
421
|
+
description: "",
|
|
422
|
+
type: "boolean",
|
|
423
|
+
default: !1
|
|
424
|
+
},
|
|
425
|
+
showIndex: {
|
|
426
|
+
description: "",
|
|
427
|
+
type: "boolean",
|
|
428
|
+
default: !0
|
|
429
|
+
},
|
|
430
|
+
showLimits: {
|
|
431
|
+
description: "",
|
|
432
|
+
type: "boolean",
|
|
433
|
+
default: !1
|
|
434
|
+
},
|
|
435
|
+
showPageInfo: {
|
|
436
|
+
description: "",
|
|
437
|
+
type: "boolean",
|
|
438
|
+
default: !0
|
|
439
|
+
},
|
|
440
|
+
size: {
|
|
441
|
+
description: "",
|
|
442
|
+
type: "number",
|
|
443
|
+
default: 20
|
|
444
|
+
},
|
|
445
|
+
sizeLimits: {
|
|
446
|
+
description: "",
|
|
447
|
+
type: "array",
|
|
448
|
+
default: [
|
|
449
|
+
10,
|
|
450
|
+
20,
|
|
451
|
+
30,
|
|
452
|
+
50,
|
|
453
|
+
100
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
onPageChange: {
|
|
457
|
+
description: "",
|
|
458
|
+
type: "string",
|
|
459
|
+
default: ""
|
|
460
|
+
},
|
|
461
|
+
onPageSizeChange: {
|
|
462
|
+
description: "",
|
|
463
|
+
type: "string",
|
|
464
|
+
default: ""
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
rowOption: {
|
|
469
|
+
type: "object",
|
|
470
|
+
properties: {
|
|
471
|
+
customRowStyle: {
|
|
472
|
+
description: "自定义行样式",
|
|
473
|
+
type: "string"
|
|
474
|
+
},
|
|
475
|
+
customCellStyle: {
|
|
476
|
+
description: "自定义单元格样式",
|
|
477
|
+
type: "string",
|
|
478
|
+
default: ""
|
|
479
|
+
},
|
|
480
|
+
disable: {
|
|
481
|
+
description: "",
|
|
482
|
+
type: "obejct"
|
|
483
|
+
},
|
|
484
|
+
height: {
|
|
485
|
+
description: "",
|
|
486
|
+
type: "number",
|
|
487
|
+
default: 30
|
|
488
|
+
},
|
|
489
|
+
showHovering: {
|
|
490
|
+
type: "boolean",
|
|
491
|
+
default: !0
|
|
492
|
+
},
|
|
493
|
+
wrapContent: {
|
|
494
|
+
type: "boolean",
|
|
495
|
+
default: !1
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
rowNumber: {
|
|
500
|
+
description: "",
|
|
501
|
+
type: "object",
|
|
502
|
+
properties: {
|
|
503
|
+
enable: {
|
|
504
|
+
description: "",
|
|
505
|
+
type: "boolean",
|
|
506
|
+
default: !1
|
|
507
|
+
},
|
|
508
|
+
heading: {
|
|
509
|
+
description: "",
|
|
510
|
+
type: "string",
|
|
511
|
+
default: "序号"
|
|
512
|
+
},
|
|
513
|
+
width: {
|
|
514
|
+
description: "",
|
|
515
|
+
type: "number",
|
|
516
|
+
default: 36
|
|
517
|
+
},
|
|
518
|
+
onClickRow: {
|
|
519
|
+
description: "",
|
|
520
|
+
type: "string",
|
|
521
|
+
default: ""
|
|
522
|
+
},
|
|
523
|
+
onDoubleClickRow: {
|
|
524
|
+
description: "",
|
|
525
|
+
type: "string",
|
|
526
|
+
default: ""
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
onClickRow: {
|
|
531
|
+
description: "行点击事件",
|
|
532
|
+
type: "string",
|
|
533
|
+
default: ""
|
|
534
|
+
},
|
|
535
|
+
onSelectionChange: {
|
|
536
|
+
description: "行切换事件",
|
|
537
|
+
type: "string",
|
|
538
|
+
default: ""
|
|
539
|
+
},
|
|
540
|
+
onPageIndexChanged: {
|
|
541
|
+
description: "切换页码事件",
|
|
542
|
+
type: "string",
|
|
543
|
+
default: ""
|
|
544
|
+
},
|
|
545
|
+
onPageSizeChanged: {
|
|
546
|
+
description: "分页条数变化事件",
|
|
547
|
+
type: "string",
|
|
548
|
+
default: ""
|
|
549
|
+
},
|
|
550
|
+
selection: {
|
|
551
|
+
type: "object",
|
|
552
|
+
properties: {
|
|
553
|
+
enableSelectRow: {
|
|
554
|
+
description: "允许选中行",
|
|
555
|
+
type: "boolean",
|
|
556
|
+
default: !0
|
|
557
|
+
},
|
|
558
|
+
enable: {
|
|
559
|
+
description: "",
|
|
560
|
+
type: "boolean",
|
|
561
|
+
default: !0
|
|
562
|
+
},
|
|
563
|
+
checkOnSelect: {
|
|
564
|
+
description: "",
|
|
565
|
+
type: "boolean",
|
|
566
|
+
default: !1
|
|
567
|
+
},
|
|
568
|
+
showSelectAll: {
|
|
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: "server",
|
|
699
|
+
enum: [
|
|
700
|
+
"server"
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
multiSort: {
|
|
704
|
+
description: "",
|
|
705
|
+
type: "boolean",
|
|
706
|
+
default: !1
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
summary: {
|
|
711
|
+
description: "",
|
|
712
|
+
type: "object",
|
|
713
|
+
properties: {
|
|
714
|
+
enable: {
|
|
715
|
+
description: "",
|
|
716
|
+
type: "boolean",
|
|
717
|
+
default: !1
|
|
718
|
+
},
|
|
719
|
+
customSummaryStyle: {
|
|
720
|
+
description: "",
|
|
721
|
+
type: "object"
|
|
722
|
+
},
|
|
723
|
+
groupFields: {
|
|
724
|
+
description: "",
|
|
725
|
+
type: "array",
|
|
726
|
+
default: []
|
|
727
|
+
},
|
|
728
|
+
mode: {
|
|
729
|
+
description: "",
|
|
730
|
+
type: "string",
|
|
731
|
+
default: "client",
|
|
732
|
+
enum: [
|
|
733
|
+
"client",
|
|
734
|
+
"server"
|
|
735
|
+
]
|
|
736
|
+
},
|
|
737
|
+
position: {
|
|
738
|
+
description: "",
|
|
739
|
+
type: "boolean",
|
|
740
|
+
default: "bottom",
|
|
741
|
+
enum: [
|
|
742
|
+
"bottom",
|
|
743
|
+
"top",
|
|
744
|
+
"both"
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
toolbar: {
|
|
750
|
+
description: "",
|
|
751
|
+
type: "object",
|
|
752
|
+
properties: {
|
|
753
|
+
enable: {
|
|
754
|
+
description: "",
|
|
755
|
+
type: "boolean",
|
|
756
|
+
default: !1
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
visualization: {
|
|
761
|
+
autoHeight: {
|
|
762
|
+
description: "",
|
|
763
|
+
type: "boolean",
|
|
764
|
+
default: !1
|
|
765
|
+
},
|
|
766
|
+
emptyDataHeight: {
|
|
767
|
+
description: "",
|
|
768
|
+
type: "number",
|
|
769
|
+
default: 36
|
|
770
|
+
},
|
|
771
|
+
emptyTemplate: {
|
|
772
|
+
description: "",
|
|
773
|
+
type: "string",
|
|
774
|
+
default: ""
|
|
775
|
+
},
|
|
776
|
+
maxHeight: {
|
|
777
|
+
description: "",
|
|
778
|
+
type: "number",
|
|
779
|
+
default: 300
|
|
780
|
+
},
|
|
781
|
+
scrollBarShowMode: {
|
|
782
|
+
description: "",
|
|
783
|
+
type: "string",
|
|
784
|
+
default: "auto"
|
|
785
|
+
},
|
|
786
|
+
showBorder: {
|
|
787
|
+
description: "",
|
|
788
|
+
type: "boolean",
|
|
789
|
+
default: !1
|
|
790
|
+
},
|
|
791
|
+
showScrollArrow: {
|
|
792
|
+
description: "",
|
|
793
|
+
type: "boolean",
|
|
794
|
+
default: !1
|
|
795
|
+
},
|
|
796
|
+
striped: {
|
|
797
|
+
description: "",
|
|
798
|
+
type: "boolean",
|
|
799
|
+
default: !0
|
|
800
|
+
},
|
|
801
|
+
useBlankWhenDataIsEmpty: {
|
|
802
|
+
description: "",
|
|
803
|
+
type: "boolean",
|
|
804
|
+
default: !1
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
emptyTemplate: {
|
|
808
|
+
description: "",
|
|
809
|
+
type: "string",
|
|
810
|
+
default: ""
|
|
811
|
+
}
|
|
812
|
+
}, ut = [
|
|
813
|
+
"id",
|
|
814
|
+
"type",
|
|
815
|
+
"columns"
|
|
816
|
+
], ft = {
|
|
817
|
+
onSelectionChange: "行切换事件",
|
|
818
|
+
onClickRow: "行点击事件",
|
|
819
|
+
onDoubleClickRow: "行双击事件",
|
|
820
|
+
onFilterChanged: "过滤事件",
|
|
821
|
+
onClickEditCommand: "操作列编辑事件",
|
|
822
|
+
onClickDeleteCommand: "操作列删除事件"
|
|
823
|
+
}, X = {
|
|
824
|
+
$schema: st,
|
|
825
|
+
$id: at,
|
|
826
|
+
title: lt,
|
|
827
|
+
description: pt,
|
|
828
|
+
type: ct,
|
|
829
|
+
properties: dt,
|
|
830
|
+
required: ut,
|
|
831
|
+
events: ft
|
|
832
|
+
}, Y = /* @__PURE__ */ new Map([
|
|
833
|
+
["appearance", Te],
|
|
834
|
+
["column", "columnOption"],
|
|
835
|
+
["command", "commandOption"]
|
|
836
|
+
]);
|
|
837
|
+
function mt(t, e, i) {
|
|
838
|
+
var p;
|
|
839
|
+
const o = i.parentComponentInstance, r = o.schema.type, a = String(((p = o.schema.appearance) == null ? void 0 : p.class) || "").split(" "), l = r === "section" || r === "tab-page", s = a.includes("f-page-content-nav"), n = a.includes("f-page-main"), d = t.getSchemaByType("component");
|
|
840
|
+
d.id = `${e.id}-component`, d.componentType = "data-grid";
|
|
841
|
+
let u = "";
|
|
842
|
+
return u += l ? "f-struct-data-grid-in-card f-struct-is-subgrid" : "", u += s ? "f-struct-data-grid-in-nav f-struct-wrapper f-utils-fill-flex-column" : "", u += n ? "f-struct-data-grid f-struct-wrapper" : "", d.appearance = {
|
|
843
|
+
class: u
|
|
844
|
+
}, d.contents = [e], d;
|
|
845
|
+
}
|
|
846
|
+
function yt(t, e, i) {
|
|
847
|
+
const o = i.parentComponentInstance, r = String(o.schema.appearance.class || "").split(" "), a = r.includes("f-page-content-nav"), l = r.includes("f-page-main"), s = t.getSchemaByType("section");
|
|
848
|
+
s.id = `${e.id}-section`;
|
|
849
|
+
let n = "";
|
|
850
|
+
return n += a ? "f-section-in-nav " : "", n += l ? "f-section-in-managelist " : "", n += "f-section-grid", s.appearance = { class: n }, s.contents = [e], s;
|
|
851
|
+
}
|
|
852
|
+
function gt(t, e, i) {
|
|
853
|
+
const o = t.getSchemaByType("content-container");
|
|
854
|
+
return o.id = `${e.id}-layout`, o.appearance = { class: "f-grid-is-sub f-utils-flex-column" }, o.contents = [e], o;
|
|
855
|
+
}
|
|
856
|
+
function Z(t, e, i) {
|
|
857
|
+
const r = i.parentComponentInstance.schema.type, a = r === "section" || r === "tab-page";
|
|
858
|
+
e.appearance = { class: "f-component-grid" };
|
|
859
|
+
const s = (a ? gt : yt)(t, e, i);
|
|
860
|
+
return mt(t, s, i);
|
|
861
|
+
}
|
|
862
|
+
const bt = Q(K, X, Y, Z), Ct = Ie(), ht = Ge(), _ = he(Object.assign({}, K, { componentId: { type: String, default: "" } }), "columnOption", "commandOption"), vt = Q(_, X, Y, Z), wt = je();
|
|
863
|
+
class St extends Ke {
|
|
864
|
+
constructor(e, i) {
|
|
865
|
+
super(e, i);
|
|
866
|
+
}
|
|
867
|
+
getPropertyConfig(e) {
|
|
868
|
+
return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.propertyConfig.categories.command = Qe().getCommandColumnProperties(e), this.propertyConfig.categories.column = Xe().getColumnOptionProperties(e), this.propertyConfig.categories.rowOption = Ye().getRowOptionProperties(e), this.propertyConfig.categories.summary = Ze().getSummaryProperties(e), this.propertyConfig.categories.filter = {
|
|
869
|
+
title: "过滤",
|
|
870
|
+
description: "",
|
|
871
|
+
properties: {
|
|
872
|
+
mode: {
|
|
873
|
+
title: "类型",
|
|
874
|
+
type: "enum",
|
|
875
|
+
description: "过滤类型",
|
|
876
|
+
$converter: "/converter/grid-filter.converter",
|
|
877
|
+
editor: {
|
|
878
|
+
data: [
|
|
879
|
+
{ id: "server", name: "服务端" }
|
|
880
|
+
]
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}, this.getEventPropConfig(e), this.propertyConfig;
|
|
885
|
+
}
|
|
886
|
+
getBasicPropConfig(e) {
|
|
887
|
+
var l, s, n;
|
|
888
|
+
const i = (n = (s = (l = this.formSchemaUtils.getFormSchema()) == null ? void 0 : l.module) == null ? void 0 : s.entity[0]) == null ? void 0 : n.entities[0], o = this.assembleSchemaEntityToTree(i, 0), r = this, a = super.getBasicPropConfig(e);
|
|
889
|
+
this.propertyConfig.categories.basic = {
|
|
890
|
+
description: "Basic Information",
|
|
891
|
+
title: "基本信息",
|
|
892
|
+
properties: {
|
|
893
|
+
...a.properties,
|
|
894
|
+
dataSource: {
|
|
895
|
+
description: "绑定数据源",
|
|
896
|
+
title: "绑定数据源",
|
|
897
|
+
editor: {
|
|
898
|
+
type: "combo-tree",
|
|
899
|
+
textField: "name",
|
|
900
|
+
valueField: "label",
|
|
901
|
+
data: o,
|
|
902
|
+
editable: !1
|
|
903
|
+
},
|
|
904
|
+
readonly: !0
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
setPropertyRelates(d, u) {
|
|
908
|
+
switch (d && d.propertyID) {
|
|
909
|
+
case "dataSource": {
|
|
910
|
+
const p = r.formSchemaUtils.getViewModelById(r.viewModelId);
|
|
911
|
+
if (p) {
|
|
912
|
+
const b = o.find((h) => h.label === d.propertyValue);
|
|
913
|
+
p.bindTo = b.bindTo;
|
|
914
|
+
}
|
|
915
|
+
r.designViewModelUtils.assembleDesignViewModel();
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
getAppearanceProperties(e) {
|
|
923
|
+
this.propertyConfig.categories.appearance = _e().getDataGrid(e, this.viewModelId), this.propertyConfig.categories.rowNumber = et().getRowNumber(e), this.propertyConfig.categories.pagination = tt().getPagination(e, !0);
|
|
924
|
+
}
|
|
925
|
+
getEventPropConfig(e) {
|
|
926
|
+
const i = ot().initEvent(e), o = this, r = o.eventsEditorUtils.formProperties(e, o.viewModelId, i), a = o.createBaseEventProperty(r);
|
|
927
|
+
this.propertyConfig.categories.eventsEditor = {
|
|
928
|
+
title: "事件",
|
|
929
|
+
hideTitle: !0,
|
|
930
|
+
properties: a,
|
|
931
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
932
|
+
refreshPanelAfterChanged: !0,
|
|
933
|
+
tabId: "commands",
|
|
934
|
+
tabName: "交互",
|
|
935
|
+
setPropertyRelates(l, s) {
|
|
936
|
+
const n = l.propertyValue;
|
|
937
|
+
delete e[o.viewModelId], n && (n.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(e, o.viewModelId, n.events, n)), e.remoteSort = !!e.columnSorted, e.command && (e.command.onClickEditCommand = e.onClickEditCommand, e.command.onClickDeleteCommand = e.onClickDeleteCommand);
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* 将schema实体表组装成树
|
|
943
|
+
*/
|
|
944
|
+
assembleSchemaEntityToTree(e, i, o, r = "", a = []) {
|
|
945
|
+
const l = r ? `${r}/${e.label}` : "/";
|
|
946
|
+
return a.push({
|
|
947
|
+
id: e.id,
|
|
948
|
+
name: e.name,
|
|
949
|
+
label: e.label,
|
|
950
|
+
layer: i,
|
|
951
|
+
parent: o && o.id,
|
|
952
|
+
bindTo: l.replace("//", "/")
|
|
953
|
+
}), e.type.entities && e.type.entities.length && e.type.entities.map((s) => this.assembleSchemaEntityToTree(s, i + 1, e, l, a)), a;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
function Pt(t, e) {
|
|
957
|
+
const i = t.schema, o = m(!0), r = m(!0);
|
|
958
|
+
function a(p) {
|
|
959
|
+
return p && p.sourceType === "control" ? p.componentCategory === "input" : !1;
|
|
960
|
+
}
|
|
961
|
+
function l() {
|
|
962
|
+
return !1;
|
|
963
|
+
}
|
|
964
|
+
function s() {
|
|
965
|
+
return !1;
|
|
966
|
+
}
|
|
967
|
+
function n() {
|
|
968
|
+
return !0;
|
|
969
|
+
}
|
|
970
|
+
function d(p) {
|
|
971
|
+
return new St(p, e).getPropertyConfig(i);
|
|
972
|
+
}
|
|
973
|
+
function u() {
|
|
974
|
+
var p, b, h, C;
|
|
975
|
+
if (t && e) {
|
|
976
|
+
const S = (p = t == null ? void 0 : t.componentInstance) == null ? void 0 : p.value.belongedComponentId;
|
|
977
|
+
let f = "", P = "";
|
|
978
|
+
const { formSchemaUtils: v } = e;
|
|
979
|
+
if (S) {
|
|
980
|
+
const R = v.getRootViewModelId(), w = v.getComponentByViewModelId(R), c = v.selectNode(w, (T) => T.contents && T.contents.find((I) => I.component === S));
|
|
981
|
+
(c == null ? void 0 : c.type) === ((b = B["tab-page"]) == null ? void 0 : b.type) && ((h = c == null ? void 0 : c.contents) != null && h.length) && (f = c.title || ""), (c == null ? void 0 : c.type) === ((C = B.section) == null ? void 0 : C.type) && (c == null ? void 0 : c.showHeader) !== !1 && (f = c.mainTitle || ""), f = f ? `${f} > ` : "", P = f ? c.id : "";
|
|
982
|
+
}
|
|
983
|
+
const y = B["tree-grid"].name;
|
|
984
|
+
e == null || e.formSchemaUtils.getControlBasicInfoMap().set(t.schema.id, {
|
|
985
|
+
componentTitle: y,
|
|
986
|
+
parentPathName: `${f}${y}`,
|
|
987
|
+
reliedComponentId: P
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
return {
|
|
992
|
+
canAccepts: a,
|
|
993
|
+
checkCanDeleteComponent: l,
|
|
994
|
+
checkCanMoveComponent: s,
|
|
995
|
+
hideNestedPaddingInDesginerView: n,
|
|
996
|
+
triggerBelongedComponentToMoveWhenMoved: o,
|
|
997
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
998
|
+
getPropsConfig: d,
|
|
999
|
+
setComponentBasicInfoMap: u
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
const j = /* @__PURE__ */ we({
|
|
1003
|
+
name: "FTreeGridDesign",
|
|
1004
|
+
props: _,
|
|
1005
|
+
emits: [],
|
|
1006
|
+
setup(t, e) {
|
|
1007
|
+
var A, H;
|
|
1008
|
+
const i = m(), o = 0, r = ((A = t.rowOption) == null ? void 0 : A.height) || 28, a = m(20), l = m(t.columns), s = Me(t), n = m(), d = m(), u = m([]), p = m(!1), b = m(((H = t.rowOption) == null ? void 0 : H.wrapContent) || !1), h = q("designer-host-service"), C = q("design-item-context"), S = Pt(C, h), f = Je(i, C, S);
|
|
1009
|
+
f.value.designerClass = "f-utils-fill-flex-column";
|
|
1010
|
+
const P = ke(t, e), v = De(t), y = Ve(t, /* @__PURE__ */ new Map(), P, v, s), R = Be(t, y, s, u, e), w = V(() => y.dataView.value.length), {
|
|
1011
|
+
containerStyleObject: c
|
|
1012
|
+
} = Oe(t), T = Fe(t), {
|
|
1013
|
+
applyCommands: I
|
|
1014
|
+
} = T;
|
|
1015
|
+
I(l);
|
|
1016
|
+
const O = nt(t), {
|
|
1017
|
+
applyColumnSorter: ee,
|
|
1018
|
+
columnContext: M,
|
|
1019
|
+
updateColumnRenderContext: te
|
|
1020
|
+
} = O, oe = Ee(t), ne = We(t, M), ie = ze(t, e, R, s), F = Ne(t, e, s, ie, u), E = $e(t), re = Ae(t, F, E), se = He(t, y, F, v, s, E, re), W = it(t, l, y, w, o, se), {
|
|
1021
|
+
getVisualData: z
|
|
1022
|
+
} = W, ae = Ue(t, R), {
|
|
1023
|
+
sidebarWidth: le
|
|
1024
|
+
} = ae;
|
|
1025
|
+
u.value = z(0, w.value + o - 1);
|
|
1026
|
+
const k = xe(t, y, u, M, W, w, o, le), {
|
|
1027
|
+
onWheel: pe,
|
|
1028
|
+
dataGridWidth: N,
|
|
1029
|
+
viewPortHeight: $,
|
|
1030
|
+
viewPortWidth: D,
|
|
1031
|
+
updateVisibleRowsOnLatestVisibleScope: ce
|
|
1032
|
+
} = k, de = rt(t, M, n, D, ne), {
|
|
1033
|
+
calculateColumnsSize: G
|
|
1034
|
+
} = de, ue = V(() => ({
|
|
1035
|
+
"drag-container": !0,
|
|
1036
|
+
"fv-grid": !0,
|
|
1037
|
+
"fv-grid-bordered": t.showBorder,
|
|
1038
|
+
"fv-datagrid-strip": t.showStripe
|
|
1039
|
+
})), fe = V(() => ({
|
|
1040
|
+
"fv-grid-content": !0,
|
|
1041
|
+
"fv-grid-content-hover": p.value,
|
|
1042
|
+
"fv-grid-wrap-content": b.value
|
|
1043
|
+
})), {
|
|
1044
|
+
renderGridHeader: me
|
|
1045
|
+
} = Le(C, t, O, k, "tree-grid-column"), {
|
|
1046
|
+
renderHorizontalScrollbar: ye
|
|
1047
|
+
} = qe(t, n, k);
|
|
1048
|
+
function ge() {
|
|
1049
|
+
var U, x;
|
|
1050
|
+
const g = Math.ceil(n.value.clientHeight / r);
|
|
1051
|
+
g > a.value && (a.value = g, ce()), $.value = ((U = d.value) == null ? void 0 : U.clientHeight) || 0, N.value = ((x = n.value) == null ? void 0 : x.clientWidth) || 0, G();
|
|
1052
|
+
}
|
|
1053
|
+
Se(() => {
|
|
1054
|
+
i.value.componentInstance = f, n.value && (a.value = Math.max(Math.ceil(n.value.clientHeight / r), a.value), u.value = z(0, w.value + o - 1), Re(n.value, ge), G(), Pe(() => {
|
|
1055
|
+
n.value && (N.value = n.value.clientWidth), d.value && (D.value = d.value.clientWidth, $.value = d.value.clientHeight);
|
|
1056
|
+
}));
|
|
1057
|
+
});
|
|
1058
|
+
function be(g) {
|
|
1059
|
+
g && (l.value = g, I(l), te(l.value), ee(y, oe), G());
|
|
1060
|
+
}
|
|
1061
|
+
return L(() => t.columns, (g) => {
|
|
1062
|
+
be(g);
|
|
1063
|
+
}), L(D, () => {
|
|
1064
|
+
n.value && G();
|
|
1065
|
+
}), e.expose(f.value), () => J("div", {
|
|
1066
|
+
ref: i,
|
|
1067
|
+
class: ue.value,
|
|
1068
|
+
style: c.value,
|
|
1069
|
+
onWheel: pe,
|
|
1070
|
+
dragref: `${C.schema.id}-container`
|
|
1071
|
+
}, [n.value && me(), J("div", {
|
|
1072
|
+
ref: n,
|
|
1073
|
+
class: fe.value,
|
|
1074
|
+
onMouseover: () => {
|
|
1075
|
+
p.value = !0;
|
|
1076
|
+
},
|
|
1077
|
+
onMouseleave: () => {
|
|
1078
|
+
p.value = !1;
|
|
1079
|
+
}
|
|
1080
|
+
}, [ye()])]);
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
j.register = (t, e, i, o) => {
|
|
1084
|
+
t["tree-grid"] = Ce, e["tree-grid"] = bt, o["tree-grid"] = { bindingResolver: ht, selectionItemResolver: Ct, updateColumnsResolver: wt };
|
|
1085
|
+
};
|
|
1086
|
+
j.registerDesigner = (t, e, i) => {
|
|
1087
|
+
t["tree-grid"] = j, e["tree-grid"] = vt;
|
|
1088
|
+
};
|
|
1089
|
+
const Ot = ve(j);
|
|
1090
|
+
export {
|
|
1091
|
+
j as FTreeGridDesign,
|
|
1092
|
+
ht as bindingResolver,
|
|
1093
|
+
Ot as default,
|
|
1094
|
+
vt as designPropsResolver,
|
|
1095
|
+
bt as propsResolver,
|
|
1096
|
+
Ct as selectionItemResolver,
|
|
1097
|
+
_ as treeGridDesignProps,
|
|
1098
|
+
wt as updateColumnsResolver
|
|
1099
|
+
};
|