@farris/ui-vue 1.0.0-beta.5 → 1.0.0-beta.6
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/accordion/index.esm.js +2 -2
- package/accordion/package.json +1 -1
- package/avatar/index.esm.js +28 -1
- package/avatar/package.json +1 -1
- package/button/index.esm.js +111 -52
- package/button/index.umd.js +1 -1
- package/button/package.json +1 -1
- package/button-edit/index.esm.js +58 -4
- package/button-edit/index.umd.js +1 -1
- package/button-edit/package.json +1 -1
- package/checkbox/index.esm.js +38 -1
- package/checkbox/package.json +1 -1
- package/combo-list/index.esm.js +125 -5
- package/combo-list/package.json +1 -1
- package/data-grid/index.esm.js +235 -143
- package/data-grid/index.umd.js +1 -1
- package/data-grid/package.json +1 -1
- package/date-picker/index.esm.js +70 -13
- package/date-picker/index.umd.js +1 -1
- package/date-picker/package.json +1 -1
- package/farris.all.esm.js +1052 -533
- package/farris.all.umd.js +1 -1
- package/list-view/index.esm.js +3 -3
- package/list-view/index.umd.js +1 -1
- package/list-view/package.json +1 -1
- package/message-box/index.esm.js +35 -35
- package/message-box/index.umd.js +1 -1
- package/message-box/package.json +1 -1
- package/modal/index.esm.js +3 -3
- package/modal/index.umd.js +1 -1
- package/modal/package.json +1 -1
- package/notify/index.esm.js +2 -2
- package/notify/package.json +1 -1
- package/package.json +3 -2
- package/pagination/index.esm.js +4 -4
- package/pagination/index.umd.js +1 -1
- package/pagination/package.json +1 -1
- package/popover/index.esm.js +1 -1
- package/popover/package.json +1 -1
- package/radio-group/index.esm.js +28 -1
- package/radio-group/package.json +1 -1
- package/section/index.esm.js +1 -1
- package/section/package.json +1 -1
- package/switch/index.esm.js +4 -1
- package/switch/package.json +1 -1
- package/tabs/index.esm.js +6 -5
- package/tabs/index.umd.js +1 -1
- package/tabs/package.json +1 -1
- package/text/index.esm.js +4 -1
- package/text/package.json +1 -1
- package/tooltip/index.esm.js +1 -1
- package/tooltip/package.json +1 -1
- package/types/accordion/src/accordion.component.d.ts +4 -2
- package/types/accordion/src/components/accordion-item.component.d.ts +4 -2
- package/types/avatar/src/avatar.component.d.ts +4 -2
- package/types/button/index.d.ts +2 -1
- package/types/button/src/button-group.component.d.ts +4 -2
- package/types/button/src/button.component.d.ts +4 -2
- package/types/button-edit/src/button-edit.component.d.ts +141 -0
- package/types/checkbox/src/checkbox-group.component.d.ts +4 -2
- package/types/combo-list/src/combo-list.component.d.ts +232 -0
- package/types/combo-list/src/components/option.component.d.ts +4 -2
- package/types/combo-list/src/components/options.component.d.ts +4 -2
- package/types/combo-list/src/components/panel.component.d.ts +25 -0
- package/types/data-grid/src/components/editors/date-picker.component.d.ts +15 -0
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +4 -2
- package/types/date-picker/src/components/calendar-navbar/calendar-navbar.component.d.ts +4 -2
- package/types/date-picker/src/components/date-picker-container/date-picker-container.component.d.ts +4 -2
- package/types/date-picker/src/components/month/month.component.d.ts +4 -2
- package/types/date-picker/src/components/year/year.component.d.ts +4 -2
- package/types/date-picker/src/date-picker.component.d.ts +336 -0
- package/types/list-view/src/components/list-view-checkbox.component.d.ts +4 -2
- package/types/list-view/src/list-view.component.d.ts +60 -0
- package/types/message-box/src/message-box.component.d.ts +4 -2
- package/types/message-box/src/message-box.service.d.ts +20 -0
- package/types/modal/src/modal.component.d.ts +4 -2
- package/types/notify/src/components/toast.component.d.ts +4 -2
- package/types/notify/src/notify.component.d.ts +130 -0
- package/types/notify/src/notify.service.d.ts +4 -0
- package/types/number-range/src/number-range.component.d.ts +4 -2
- package/types/number-spinner/src/number-spinner.component.d.ts +4 -2
- package/types/overlay/src/overlay.component.d.ts +4 -2
- package/types/pagination/src/pagination.components.d.ts +4 -2
- package/types/popover/src/popover.component.d.ts +4 -2
- package/types/radio-group/src/radio-group.component.d.ts +4 -2
- package/types/section/src/section.component.d.ts +4 -2
- package/types/switch/src/switch.component.d.ts +4 -2
- package/types/tabs/src/components/tab-page.component.d.ts +4 -2
- package/types/tabs/src/tabs.component.d.ts +4 -2
- package/types/text/src/text.component.d.ts +4 -2
- package/types/tooltip/src/composition/use-adjust-position.d.ts +15 -0
- package/types/tooltip/src/tooltip.component.d.ts +4 -2
- package/types/tooltip/src/tooltip.directive.d.ts +5 -0
package/data-grid/index.esm.js
CHANGED
|
@@ -1,128 +1,217 @@
|
|
|
1
1
|
import { ref as D, watch as ce, computed as R, createVNode as S, resolveComponent as ye, Fragment as we, createTextVNode as be, defineComponent as Ce, onMounted as Se, nextTick as xe, onUnmounted as We } from "vue";
|
|
2
2
|
const qe = {
|
|
3
|
+
/** 启用分页 */
|
|
3
4
|
enable: { type: Boolean, default: !0 },
|
|
5
|
+
/** 当前页码 */
|
|
4
6
|
index: { type: Number, default: 1 },
|
|
7
|
+
/** 分页交互模式 */
|
|
5
8
|
mode: { type: String, default: "server" },
|
|
9
|
+
/** 显示页码输入框 */
|
|
6
10
|
showGoto: { type: Boolean, default: !1 },
|
|
11
|
+
/** 显示页码 */
|
|
7
12
|
showIndex: { type: Boolean, default: !0 },
|
|
13
|
+
/** 显示每页记录数 */
|
|
8
14
|
showLimits: { type: Boolean, default: !1 },
|
|
15
|
+
/** 显示分页汇总信息 */
|
|
9
16
|
showPageInfo: { type: Boolean, default: !0 },
|
|
17
|
+
/** 默认每页记录数 */
|
|
10
18
|
size: { type: Number, default: 20 },
|
|
19
|
+
/** 可选择的没有记录数据 */
|
|
11
20
|
sizeLimits: { type: Array, default: [10, 20, 30, 50, 100] },
|
|
21
|
+
/** 总记录数 */
|
|
12
22
|
total: { type: Number, default: 0 }
|
|
13
23
|
}, Ue = {
|
|
24
|
+
/** 启用排序 */
|
|
14
25
|
enable: { type: Boolean, default: !1 },
|
|
26
|
+
/** 排序字段集合 */
|
|
15
27
|
fields: { type: Array, default: [] },
|
|
28
|
+
/** 排序交互模式 */
|
|
16
29
|
mode: { type: String, default: "client" },
|
|
30
|
+
/** 多列排序 */
|
|
17
31
|
multiSort: { type: Boolean, default: !1 }
|
|
18
32
|
}, Je = {
|
|
33
|
+
/** 自定义分组合计内容 */
|
|
19
34
|
customGroupRow: { type: Function, default: () => {
|
|
20
35
|
} },
|
|
36
|
+
/** 自定义分组行样式 */
|
|
21
37
|
customGroupRowStyle: { type: Function, default: () => {
|
|
22
38
|
} },
|
|
39
|
+
/** 自行分组合计行样式 */
|
|
23
40
|
customSummaryStyle: { type: Function, default: () => {
|
|
24
41
|
} },
|
|
42
|
+
/** 启用行数据分组 */
|
|
25
43
|
enable: { type: Boolean, default: !1 },
|
|
44
|
+
/** 分组行合并列数 */
|
|
26
45
|
groupColSpan: { type: Number, default: 1 },
|
|
46
|
+
/** 行数据分组字段;多字段分组以英文逗号分隔 */
|
|
27
47
|
groupFields: { type: Array, default: [] },
|
|
48
|
+
/** 在DataGrid中显示被分组的列 */
|
|
28
49
|
showGroupedColumn: { type: Boolean, default: !0 },
|
|
50
|
+
/** 显示分组面板 */
|
|
29
51
|
showGroupPanel: { type: Boolean, default: !1 },
|
|
52
|
+
/** 启用合计行 */
|
|
30
53
|
showSummary: { type: Boolean, default: !1 },
|
|
54
|
+
/** 显示合计行位置; */
|
|
31
55
|
summaryPosition: { type: String, default: "separate" }
|
|
32
56
|
}, Qe = {
|
|
57
|
+
/** 启用筛选 */
|
|
33
58
|
enable: { type: Boolean, default: !1 },
|
|
59
|
+
/** DataGrid筛选风格 */
|
|
34
60
|
filterStyle: { type: String, default: "filter-column" },
|
|
61
|
+
/** 筛选交互模式 */
|
|
35
62
|
mode: { type: String, default: "server" },
|
|
63
|
+
/** 显示过滤条件工具条 */
|
|
36
64
|
showSummary: { type: Boolean, default: !0 }
|
|
37
65
|
}, Ze = {
|
|
66
|
+
/** 允许折行显示列标题 */
|
|
38
67
|
wrapHeadings: { type: Boolean, default: !1 }
|
|
39
68
|
}, Ie = {
|
|
69
|
+
/** 显示行号 */
|
|
40
70
|
enable: { type: Boolean, default: !1 },
|
|
41
|
-
|
|
71
|
+
/** 行号列表头标题 */
|
|
72
|
+
heading: { type: String, default: "序号" },
|
|
73
|
+
/** 行号宽度,默认为 36px */
|
|
42
74
|
width: { type: Number, default: 36 }
|
|
43
75
|
}, et = {
|
|
76
|
+
/** 自定义行样式 */
|
|
44
77
|
customRowStyle: { type: Function, default: () => {
|
|
45
78
|
} },
|
|
79
|
+
/** 禁止行选中表达式 */
|
|
46
80
|
disable: { type: Function, default: () => {
|
|
47
81
|
} },
|
|
82
|
+
/** 默认行高度为 29px */
|
|
48
83
|
height: { type: Number, default: 28 },
|
|
84
|
+
/** 鼠标滑过行效果 */
|
|
49
85
|
showHovering: { type: Boolean, default: !0 },
|
|
86
|
+
/** 禁止数据折行 */
|
|
50
87
|
wrapContent: { type: Boolean, default: !1 }
|
|
51
88
|
}, tt = {
|
|
89
|
+
/** 显示合计信息 */
|
|
52
90
|
enable: { type: Boolean, default: !1 },
|
|
91
|
+
/** 合计行自定义样式,对启用合计行模板无效 */
|
|
53
92
|
customSummaryStyle: { type: Function, default: () => {
|
|
54
93
|
} },
|
|
94
|
+
/** 分组合计字段 */
|
|
55
95
|
groupFields: { type: Array, default: [] },
|
|
96
|
+
/** 合计交互模式 */
|
|
56
97
|
mode: { type: String, default: "client" },
|
|
98
|
+
/** 合计行显示位置, top: 顶部 bottom: 底部, both: 顶部与底部同时显示 */
|
|
57
99
|
position: { type: String, default: "bottom" }
|
|
58
100
|
}, at = {
|
|
101
|
+
/** 自动列宽。设为true后,所有列将填满表格并不会出现横向滚动条。 */
|
|
59
102
|
fitColumns: { type: Boolean, default: !1 },
|
|
103
|
+
/** 自动适配列宽度模式 */
|
|
60
104
|
fitMode: { type: String, default: "average" },
|
|
61
105
|
groups: { type: Array, defaut: [] },
|
|
106
|
+
/** 允许拖动表头改变列显示顺序 */
|
|
62
107
|
reorderColumn: { type: Boolean, default: !1 },
|
|
108
|
+
/** 允许拖动改变列宽度 */
|
|
63
109
|
resizeColumn: { type: Boolean, default: !0 },
|
|
110
|
+
/** 双击表头列自适应内容宽度 */
|
|
64
111
|
resizeColumnOnDoubleClick: { type: Boolean, default: !0 }
|
|
65
112
|
}, lt = {
|
|
113
|
+
/** 启用多选且显示checkbox, 选中行后勾选前面的checkbox */
|
|
66
114
|
checkOnSelect: { type: Boolean, default: !1 },
|
|
115
|
+
/** 当数据源为空时,清空已选记录 */
|
|
67
116
|
clearSelectionOnEmpty: { type: Boolean, default: !0 },
|
|
117
|
+
/** 自定义已选记录列表中的显示内容 */
|
|
68
118
|
customSelectionItem: { type: Function, default: () => {
|
|
69
119
|
} },
|
|
120
|
+
/** 允许选中行 */
|
|
70
121
|
enabelSelectRow: { type: Boolean, default: !0 },
|
|
122
|
+
/** 允许重复点击行是保留选中状态 */
|
|
71
123
|
keepSelectingOnClick: { type: Boolean, default: !0 },
|
|
124
|
+
/** 允许跨页多选 */
|
|
72
125
|
keepSelectingOnPaging: { type: Boolean, default: !0 },
|
|
126
|
+
/** 启用多选 */
|
|
73
127
|
multiSelect: { type: Boolean, default: !1 },
|
|
128
|
+
/** 启用多选时,点击行选中,只允许且只有一行被选中 */
|
|
74
129
|
focusSelection: { type: String, default: "current" },
|
|
130
|
+
/** 启用多选且显示checkbox, 勾选后并且选中行 */
|
|
75
131
|
selectOnCheck: { type: Boolean, default: !1 },
|
|
132
|
+
/** 每行前边显示 checkbox */
|
|
76
133
|
showCheckbox: { type: Boolean, default: !1 },
|
|
134
|
+
/** 显示全选checkbox */
|
|
77
135
|
showSelectAll: { type: Boolean, default: !1 },
|
|
136
|
+
/** 显示已选数据 */
|
|
78
137
|
showSelection: { type: Boolean, default: !1 }
|
|
79
138
|
}, nt = {
|
|
139
|
+
/** 编辑时选中文本 */
|
|
80
140
|
selectOnEditing: { type: Boolean, default: !1 },
|
|
141
|
+
/** 编辑模式; row:整行编辑,cell: 单元格编辑 */
|
|
81
142
|
editMode: { type: String, default: "cell" }
|
|
82
143
|
}, Oe = {
|
|
144
|
+
/** 列集合 */
|
|
83
145
|
columns: { type: Array, default: [] },
|
|
146
|
+
/** 列配置 */
|
|
84
147
|
columnOption: { type: Object },
|
|
148
|
+
/** 被绑定数据 */
|
|
85
149
|
data: { type: Array, default: [] },
|
|
150
|
+
/** 禁用组件 */
|
|
86
151
|
disable: { type: Boolean, default: !1 },
|
|
152
|
+
/** 允许编辑 */
|
|
87
153
|
editable: { type: Boolean, default: !1 },
|
|
154
|
+
/** 编辑配置 */
|
|
88
155
|
editOption: { type: Object },
|
|
156
|
+
/** 筛选配置 */
|
|
89
157
|
filter: { type: Object },
|
|
158
|
+
/** 适配父组件尺寸 */
|
|
90
159
|
fit: { type: Boolean, default: !1 },
|
|
160
|
+
/** 分组配置 */
|
|
91
161
|
group: { type: Object },
|
|
162
|
+
/** 列标题配置 */
|
|
92
163
|
header: { type: Object },
|
|
164
|
+
/** 高度 */
|
|
93
165
|
height: { type: Number, default: 300 },
|
|
166
|
+
/** DataGrid组件唯一标识 */
|
|
94
167
|
id: { type: String, default: "" },
|
|
168
|
+
/** 被绑定数据的标识字段 */
|
|
95
169
|
idField: { type: String, default: "id", require: !0 },
|
|
170
|
+
/** 纵向合并具有相同值的单元格 */
|
|
96
171
|
mergeCell: { type: Boolean, default: !1 },
|
|
172
|
+
/** 分页配置 */
|
|
97
173
|
pagination: { type: Object },
|
|
174
|
+
/** 行号配置 */
|
|
98
175
|
rowNumber: { type: Object },
|
|
176
|
+
/** 行配置 */
|
|
99
177
|
rowOption: { type: Object },
|
|
178
|
+
/** 选择配置 */
|
|
100
179
|
selection: { type: Object },
|
|
180
|
+
/** 显示边框 */
|
|
101
181
|
showBorder: { type: Boolean, default: !1 },
|
|
182
|
+
/** 显示底部面板 */
|
|
102
183
|
showFooter: { type: Boolean, default: !1 },
|
|
184
|
+
/** 显示顶部面板 */
|
|
103
185
|
showHeader: { type: Boolean, default: !0 },
|
|
186
|
+
/** 显示配置按钮 */
|
|
104
187
|
showOptions: { type: Boolean, default: !1 },
|
|
188
|
+
/** 显示滚动条 */
|
|
105
189
|
showScrollBar: { type: String, default: "auto" },
|
|
190
|
+
/** 显示条纹 */
|
|
106
191
|
showStripe: { type: Boolean, default: !0 },
|
|
192
|
+
/** 排序配置 */
|
|
107
193
|
sort: { type: Object },
|
|
194
|
+
/** 合计配置 */
|
|
108
195
|
summary: { type: Object },
|
|
196
|
+
/** 启用虚拟渲染 */
|
|
109
197
|
virtualized: { type: Boolean, default: !1 },
|
|
198
|
+
/** 宽度 */
|
|
110
199
|
width: { type: Number, default: 800 }
|
|
111
200
|
};
|
|
112
201
|
var q = /* @__PURE__ */ ((t) => (t[t.readonly = 0] = "readonly", t[t.editable = 1] = "editable", t[t.editing = 2] = "editing", t))(q || {}), ee = /* @__PURE__ */ ((t) => (t[t.data = 0] = "data", t[t.group = 1] = "group", t[t.summary = 2] = "summary", t))(ee || {});
|
|
113
|
-
function He(t, g, d, m, O, w,
|
|
202
|
+
function He(t, g, d, m, O, w, F) {
|
|
114
203
|
var G, f;
|
|
115
204
|
const j = D(t.mergeCell), h = D(t.rowOption), M = ((G = h.value) == null ? void 0 : G.height) || 28, c = ((f = h.value) == null ? void 0 : f.wrapContent) || !1, r = D(O - 1 + w), b = D(0);
|
|
116
205
|
function n(_, H, x) {
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
const p =
|
|
206
|
+
const B = H && H.data[x];
|
|
207
|
+
if (B && B.data === _.data) {
|
|
208
|
+
const p = B && B.spannedBy || B;
|
|
120
209
|
p.rowSpan++, p.spanned = p.spanned || [], p.spanned.push(_), _.colSpan = 0, _.rowSpan = 0, _.spannedBy = p;
|
|
121
210
|
}
|
|
122
211
|
}
|
|
123
|
-
function u(_, H, x,
|
|
212
|
+
function u(_, H, x, B, W, p) {
|
|
124
213
|
const e = _.__fv_data_index__, l = {
|
|
125
|
-
index:
|
|
214
|
+
index: B,
|
|
126
215
|
dataIndex: e,
|
|
127
216
|
top: W,
|
|
128
217
|
layer: -1,
|
|
@@ -151,7 +240,7 @@ function He(t, g, d, m, O, w, B) {
|
|
|
151
240
|
data: _[i.field],
|
|
152
241
|
parent: l,
|
|
153
242
|
getEditor($) {
|
|
154
|
-
return
|
|
243
|
+
return F.getEditor($, i);
|
|
155
244
|
},
|
|
156
245
|
setRef: ($) => {
|
|
157
246
|
if (c && $) {
|
|
@@ -171,8 +260,8 @@ function He(t, g, d, m, O, w, B) {
|
|
|
171
260
|
j.value && n(s, x, i.field), l.data[i.field] = s;
|
|
172
261
|
}), l;
|
|
173
262
|
}
|
|
174
|
-
function o(_, H, x,
|
|
175
|
-
const { dataView: W } = m, p = [], e =
|
|
263
|
+
function o(_, H, x, B) {
|
|
264
|
+
const { dataView: W } = m, p = [], e = B ? Date.now().toString() : "";
|
|
176
265
|
for (let l = _, i = 0; l < H; l++, i++) {
|
|
177
266
|
const v = W.value[l], s = W.value[l - 1] || x, $ = p[i - 1], P = s ? (s.__fv_data_position__ || 0) + (s.__fv_data_height__ || 0) : 0, C = v.__fv_data_grid_group_row__ ? d.renderGroupRow(v, s, l, P, g.value) : v.__fv_data_grid_group_summary__ ? d.renderSummaryRow(v, s, l, P, g.value) : u(v, s, $, l, P, g.value);
|
|
178
267
|
C.refreshKey = e, p.push(C);
|
|
@@ -180,8 +269,8 @@ function He(t, g, d, m, O, w, B) {
|
|
|
180
269
|
return b.value = p[0].index, r.value = p[p.length - 1].index, p;
|
|
181
270
|
}
|
|
182
271
|
function a(_, H, x) {
|
|
183
|
-
const
|
|
184
|
-
m[_](
|
|
272
|
+
const B = H.groupField || "", { groupValue: W } = H;
|
|
273
|
+
m[_](B, W);
|
|
185
274
|
const { dataView: p } = m, e = x[0].index, l = Math.min(e + O + w + 1, p.value.length);
|
|
186
275
|
return o(e, l);
|
|
187
276
|
}
|
|
@@ -211,7 +300,7 @@ function $e(t, g) {
|
|
|
211
300
|
height: `${_}`
|
|
212
301
|
};
|
|
213
302
|
}
|
|
214
|
-
function
|
|
303
|
+
function F(n, u, o) {
|
|
215
304
|
return {
|
|
216
305
|
right: "0px",
|
|
217
306
|
height: `${n.parent.height ? `${n.parent.height}px` : ""}`
|
|
@@ -233,6 +322,8 @@ function $e(t, g) {
|
|
|
233
322
|
width: `${o[u.field].width}px`,
|
|
234
323
|
height: `${G}px`,
|
|
235
324
|
padding: `calc(${G / 2}px - 1rem) 0`
|
|
325
|
+
// height: `calc(${rowHeight}px * ${cell.rowSpan})`,
|
|
326
|
+
// padding: `calc(${rowHeight * cell.rowSpan / 2}px - 1rem) 0`
|
|
236
327
|
};
|
|
237
328
|
}
|
|
238
329
|
function M(n, u) {
|
|
@@ -259,44 +350,44 @@ function $e(t, g) {
|
|
|
259
350
|
rowKey: c,
|
|
260
351
|
rowPosition: r,
|
|
261
352
|
rowSpanCellPosition: h,
|
|
262
|
-
summaryCellPosition:
|
|
353
|
+
summaryCellPosition: F
|
|
263
354
|
};
|
|
264
355
|
}
|
|
265
|
-
function De(t, g, d, m, O, w,
|
|
356
|
+
function De(t, g, d, m, O, w, F, j) {
|
|
266
357
|
var K;
|
|
267
358
|
const { dataView: h } = g, { getVisualData: M, maxVisibleRowIndex: c, minVisibleRowIndex: r } = O, b = D(m.value.primaryColumnsWidth), n = D(m.value.leftColumnsWidth), u = D(m.value.rightColumnsWidth), o = ((K = t.rowOption) == null ? void 0 : K.height) || 28, a = D(0), G = D(0);
|
|
268
359
|
let f = 0, _ = w - 1;
|
|
269
|
-
const H = D(0), x = D(0),
|
|
360
|
+
const H = D(0), x = D(0), B = D(0), W = o * w, p = R(() => h.value.length * o), e = R(() => h.value.length > w + F ? Math.floor((w + F) / h.value.length * x.value) : x.value), l = R(() => Math.floor(B.value / b.value * H.value)), i = 0, v = 0, s = R(() => H.value - (n.value + b.value + u.value + j.value));
|
|
270
361
|
function $() {
|
|
271
|
-
const
|
|
272
|
-
return (
|
|
362
|
+
const k = c.value < h.value.length ? h.value[c.value] : h.value[h.value.length - 1];
|
|
363
|
+
return (k.__fv_data_position__ || 0) + (k.__fv_data_height__ || 0) + Math.max(h.value.length - 1 - c.value, 0) * o;
|
|
273
364
|
}
|
|
274
|
-
function P(
|
|
275
|
-
const V = h.value.find((X) => X.__fv_data_position__ >
|
|
365
|
+
function P(k) {
|
|
366
|
+
const V = h.value.find((X) => X.__fv_data_position__ > k);
|
|
276
367
|
return V ? V.__fv_index__ - 1 : 0;
|
|
277
368
|
}
|
|
278
|
-
function C(
|
|
279
|
-
const V = Math.max(f -
|
|
369
|
+
function C(k) {
|
|
370
|
+
const V = Math.max(f - F, 0), X = Math.min(_ + F + 1, h.value.length), U = h.value[V - 1], de = M(V, X, U, k);
|
|
280
371
|
de.length && (d.value = [...de]);
|
|
281
372
|
}
|
|
282
|
-
function z(
|
|
283
|
-
let V = a.value +
|
|
373
|
+
function z(k) {
|
|
374
|
+
let V = a.value + k;
|
|
284
375
|
V > i && (V = i);
|
|
285
376
|
const X = V > i, U = $(), de = U > x.value;
|
|
286
|
-
de && V < x.value - U && (V = x.value - U), (!de || X) && (V = i), a.value !== V && (a.value = V, f = P(Math.abs(a.value)), _ = f + w, (f < r.value || _ > c.value -
|
|
377
|
+
de && V < x.value - U && (V = x.value - U), (!de || X) && (V = i), a.value !== V && (a.value = V, f = P(Math.abs(a.value)), _ = f + w, (f < r.value || _ > c.value - F / 2) && C());
|
|
287
378
|
}
|
|
288
|
-
function N(
|
|
289
|
-
let V = G.value +
|
|
379
|
+
function N(k) {
|
|
380
|
+
let V = G.value + k;
|
|
290
381
|
V > v && (V = v), V < s.value && (V = s.value), G.value !== V && (G.value = V);
|
|
291
382
|
}
|
|
292
|
-
ce(
|
|
383
|
+
ce(B, () => {
|
|
293
384
|
N(0);
|
|
294
385
|
}), ce(m, () => {
|
|
295
386
|
b.value = m.value.primaryColumnsWidth, n.value = m.value.leftColumnsWidth, u.value = m.value.rightColumnsWidth;
|
|
296
387
|
});
|
|
297
|
-
function L(
|
|
298
|
-
|
|
299
|
-
const V = (
|
|
388
|
+
function L(k) {
|
|
389
|
+
k.preventDefault(), k.stopPropagation();
|
|
390
|
+
const V = (k.wheelDeltaY || k.deltaY) / 10, X = (k.wheelDeltaX || k.deltaX) / 10;
|
|
300
391
|
z(V), N(X);
|
|
301
392
|
}
|
|
302
393
|
const Y = R(() => ({
|
|
@@ -324,12 +415,13 @@ function De(t, g, d, m, O, w, B, j) {
|
|
|
324
415
|
})), ne = R(() => ({
|
|
325
416
|
width: `${n.value}px`
|
|
326
417
|
})), fe = R(() => ({
|
|
418
|
+
// width: `${visibleGridViewWidth}px`,
|
|
327
419
|
transform: `translateX(${G.value}px)`
|
|
328
420
|
})), he = R(() => ({
|
|
329
421
|
width: `${u.value}px`
|
|
330
422
|
})), ve = R(() => {
|
|
331
|
-
const
|
|
332
|
-
return a.value / (x.value -
|
|
423
|
+
const k = $();
|
|
424
|
+
return a.value / (x.value - k) * (x.value - e.value);
|
|
333
425
|
}), pe = R(() => ({
|
|
334
426
|
height: `${e.value}px`,
|
|
335
427
|
top: `${ve.value}px`
|
|
@@ -338,31 +430,31 @@ function De(t, g, d, m, O, w, B, j) {
|
|
|
338
430
|
left: `${se.value}px`
|
|
339
431
|
})), ie = D(!1), Z = D(-1), I = D(-1);
|
|
340
432
|
let re;
|
|
341
|
-
function y(
|
|
433
|
+
function y(k) {
|
|
342
434
|
if (ie.value && I.value !== -1) {
|
|
343
|
-
const V = I.value -
|
|
435
|
+
const V = I.value - k.pageX, X = H.value - l.value;
|
|
344
436
|
if (Math.abs(V) <= X) {
|
|
345
|
-
const U = V / (
|
|
346
|
-
N(U), I.value =
|
|
437
|
+
const U = V / (B.value - l.value) * (b.value - B.value);
|
|
438
|
+
N(U), I.value = k.pageX;
|
|
347
439
|
}
|
|
348
440
|
}
|
|
349
441
|
}
|
|
350
|
-
function A(
|
|
442
|
+
function A(k) {
|
|
351
443
|
if (ie.value && Z.value !== -1) {
|
|
352
|
-
const V = Z.value -
|
|
444
|
+
const V = Z.value - k.pageY, X = W - e.value;
|
|
353
445
|
if (Math.abs(V) <= X) {
|
|
354
446
|
const U = V / (W - e.value) * (p.value - W);
|
|
355
|
-
z(U), Z.value =
|
|
447
|
+
z(U), Z.value = k.pageY;
|
|
356
448
|
}
|
|
357
449
|
}
|
|
358
450
|
}
|
|
359
|
-
function k
|
|
360
|
-
ie.value = !1, Z.value = -1, I.value = -1, document.removeEventListener("mouseup",
|
|
451
|
+
function E(k) {
|
|
452
|
+
ie.value = !1, Z.value = -1, I.value = -1, document.removeEventListener("mouseup", E), re && (re.removeEventListener("mousemove", y), re.removeEventListener("mousemove", A)), document.body.style.userSelect = "";
|
|
361
453
|
}
|
|
362
|
-
function T(
|
|
454
|
+
function T(k, V, X) {
|
|
363
455
|
ie.value = !0;
|
|
364
456
|
const U = X === "horizontal" ? y : A;
|
|
365
|
-
X === "vertical" && (Z.value =
|
|
457
|
+
X === "vertical" && (Z.value = k.pageY), X === "horizontal" && (I.value = k.pageX), V.value && (V.value.addEventListener("mousemove", U), re = V.value, document.addEventListener("mouseup", E), document.body.style.userSelect = "none");
|
|
366
458
|
}
|
|
367
459
|
return {
|
|
368
460
|
onMouseDownScrollThumb: T,
|
|
@@ -372,7 +464,7 @@ function De(t, g, d, m, O, w, B, j) {
|
|
|
372
464
|
gridHeaderColumnsStyle: fe,
|
|
373
465
|
gridMergedDataStyle: te,
|
|
374
466
|
gridSideStyle: le,
|
|
375
|
-
viewPortWidth:
|
|
467
|
+
viewPortWidth: B,
|
|
376
468
|
viewPortHeight: x,
|
|
377
469
|
horizontalScrollThumbStyle: ue,
|
|
378
470
|
leftFixedGridDataStyle: Y,
|
|
@@ -401,7 +493,7 @@ function Ge(t) {
|
|
|
401
493
|
function w(h, M) {
|
|
402
494
|
m.value = M.data[g.value].data;
|
|
403
495
|
}
|
|
404
|
-
function
|
|
496
|
+
function F(h, M) {
|
|
405
497
|
d.value = M.index;
|
|
406
498
|
}
|
|
407
499
|
function j(h) {
|
|
@@ -413,7 +505,7 @@ function Ge(t) {
|
|
|
413
505
|
"fv-grid-sidebar-row-even": h.dataIndex % 2 === 0
|
|
414
506
|
};
|
|
415
507
|
}
|
|
416
|
-
return { gridRowClass: O, onClickRow: w, onMouseoverRow:
|
|
508
|
+
return { gridRowClass: O, onClickRow: w, onMouseoverRow: F, sidebarRowClass: j };
|
|
417
509
|
}
|
|
418
510
|
function je(t) {
|
|
419
511
|
const d = D({
|
|
@@ -438,10 +530,10 @@ function je(t) {
|
|
|
438
530
|
return O.value && O.value.reduce((c, r) => (c.set(r, !0), c), M), h.reduce((c, r) => (r.fixed === "left" ? (d.value.leftColumns.push(r), d.value.leftColumnsWidth += r.actualWidth || 120) : r.fixed === "right" ? (d.value.rightColumns.push(r), d.value.rightColumnsWidth += r.actualWidth || 120) : (d.value.primaryColumns.push(r), d.value.primaryColumnsWidth += r.actualWidth || 120), M.has(r.field) && d.value.summaryColumns.push(r), c), d), d;
|
|
439
531
|
}
|
|
440
532
|
w(t.columns);
|
|
441
|
-
const
|
|
442
|
-
return { columnContext: d, hasLeftFixedColumn:
|
|
533
|
+
const F = R(() => d.value.leftColumns.length > 0), j = R(() => d.value.rightColumns.length > 0);
|
|
534
|
+
return { columnContext: d, hasLeftFixedColumn: F, hasRightFixedColumn: j };
|
|
443
535
|
}
|
|
444
|
-
function
|
|
536
|
+
function Be(t, g) {
|
|
445
537
|
var M;
|
|
446
538
|
const d = D((M = t.columnOption) == null ? void 0 : M.groups);
|
|
447
539
|
function m(c, r, b, n, u) {
|
|
@@ -487,12 +579,12 @@ function Fe(t, g) {
|
|
|
487
579
|
const r = c[0];
|
|
488
580
|
return r.children && r.children.length > 0 && (r.left = w(r.children)), r.left;
|
|
489
581
|
}
|
|
490
|
-
function
|
|
582
|
+
function F(c, r) {
|
|
491
583
|
const b = g.value.headerDepth;
|
|
492
584
|
c.forEach((n) => {
|
|
493
585
|
n.layer = r ? r.layer + 1 : 1;
|
|
494
586
|
const u = n.children && n.children.length === 0;
|
|
495
|
-
n.depth = u ? b - (n.layer - 1) : 1, n.left = u ? n.left : w(n.children), n.children &&
|
|
587
|
+
n.depth = u ? b - (n.layer - 1) : 1, n.left = u ? n.left : w(n.children), n.children && F(n.children, n);
|
|
496
588
|
});
|
|
497
589
|
}
|
|
498
590
|
function j(c, r) {
|
|
@@ -500,7 +592,7 @@ function Fe(t, g) {
|
|
|
500
592
|
return c.forEach((n) => {
|
|
501
593
|
const u = r.fieldToRootMap.get(n.field), o = u != null;
|
|
502
594
|
o && !b.has(u.field) && b.set(u.field, u), o || b.set(n.field, n);
|
|
503
|
-
}),
|
|
595
|
+
}), F(Array.from(b.values())), b;
|
|
504
596
|
}
|
|
505
597
|
function h(c) {
|
|
506
598
|
let r = /* @__PURE__ */ new Map(), b = 0;
|
|
@@ -522,10 +614,10 @@ function Fe(t, g) {
|
|
|
522
614
|
}
|
|
523
615
|
return { getGridHeaderCells: h };
|
|
524
616
|
}
|
|
525
|
-
function
|
|
526
|
-
var H, x,
|
|
527
|
-
const { getGridHeaderCells: d } =
|
|
528
|
-
0 + (w.value && ((
|
|
617
|
+
function Fe(t, g) {
|
|
618
|
+
var H, x, B, W, p;
|
|
619
|
+
const { getGridHeaderCells: d } = Be(t, g), m = 120, O = 32, w = D(((H = t.rowNumber) == null ? void 0 : H.enable) || !1), F = D(((x = t.selection) == null ? void 0 : x.multiSelect) || !1), j = D(
|
|
620
|
+
0 + (w.value && ((B = t.rowNumber) == null ? void 0 : B.width) || 0) + (F.value ? O : 0)
|
|
529
621
|
), h = D(((W = t.columnOption) == null ? void 0 : W.fitColumns) || !1), M = D(h.value && ((p = t.columnOption) == null ? void 0 : p.fitMode) || "none");
|
|
530
622
|
function c(e, l, i) {
|
|
531
623
|
const v = parseInt(e.width, 10) / 100;
|
|
@@ -616,18 +708,18 @@ function Be(t, g) {
|
|
|
616
708
|
}
|
|
617
709
|
function Me(t) {
|
|
618
710
|
var M, c, r;
|
|
619
|
-
const d = D(((M = t.rowNumber) == null ? void 0 : M.enable) || !1), m = D(((c = t.selection) == null ? void 0 : c.showCheckbox) || !1), O = D(d.value && ((r = t.rowNumber) == null ? void 0 : r.width) || 0), w = D(m.value ? 50 : 0),
|
|
711
|
+
const d = D(((M = t.rowNumber) == null ? void 0 : M.enable) || !1), m = D(((c = t.selection) == null ? void 0 : c.showCheckbox) || !1), O = D(d.value && ((r = t.rowNumber) == null ? void 0 : r.width) || 0), w = D(m.value ? 50 : 0), F = R(() => w.value + O.value);
|
|
620
712
|
function j(b) {
|
|
621
713
|
return {
|
|
622
714
|
top: `${b.top}px`,
|
|
623
|
-
width: `${
|
|
715
|
+
width: `${F.value}px`,
|
|
624
716
|
height: `${b.height || ""}px`
|
|
625
717
|
};
|
|
626
718
|
}
|
|
627
719
|
const h = R(() => ({
|
|
628
|
-
width: `${
|
|
720
|
+
width: `${F.value}px`
|
|
629
721
|
}));
|
|
630
|
-
return { showRowCheckbox: m, showRowNumer: d, sidebarCellPosition: j, sidebarCornerCellStyle: h, sidebarWidth:
|
|
722
|
+
return { showRowCheckbox: m, showRowNumer: d, sidebarCellPosition: j, sidebarCornerCellStyle: h, sidebarWidth: F };
|
|
631
723
|
}
|
|
632
724
|
function me(t) {
|
|
633
725
|
const g = D(t.idField), d = D(t.summary), m = D(t.group), O = R(() => {
|
|
@@ -636,15 +728,15 @@ function me(t) {
|
|
|
636
728
|
}), w = R(() => {
|
|
637
729
|
const a = d.value;
|
|
638
730
|
return a && a.enable && a.groupFields && a.groupFields.length > 0;
|
|
639
|
-
}),
|
|
731
|
+
}), F = R(() => {
|
|
640
732
|
const a = m.value;
|
|
641
733
|
return a && a.showSummary;
|
|
642
734
|
}), j = /* @__PURE__ */ new Map();
|
|
643
735
|
let h = [], M = "";
|
|
644
736
|
function c(a, G, f, _) {
|
|
645
737
|
const H = _[f];
|
|
646
|
-
H && (G.reduce((x,
|
|
647
|
-
const p =
|
|
738
|
+
H && (G.reduce((x, B, W) => {
|
|
739
|
+
const p = B[H];
|
|
648
740
|
let e = x.get(p);
|
|
649
741
|
if (!e) {
|
|
650
742
|
const l = O.value.reduce((i, v) => (i.set(v, 0), i), /* @__PURE__ */ new Map());
|
|
@@ -653,10 +745,10 @@ function me(t) {
|
|
|
653
745
|
return O.value && O.value.forEach((l) => {
|
|
654
746
|
if (e) {
|
|
655
747
|
const i = e.groupSummaries.get(l) || 0;
|
|
656
|
-
e.groupSummaries.set(l, i +
|
|
748
|
+
e.groupSummaries.set(l, i + B[l]);
|
|
657
749
|
}
|
|
658
|
-
}), e.details.push(
|
|
659
|
-
}, a), f < _.length - 1 && a.forEach((x,
|
|
750
|
+
}), e.details.push(B), x;
|
|
751
|
+
}, a), f < _.length - 1 && a.forEach((x, B) => {
|
|
660
752
|
x.nestGroup = /* @__PURE__ */ new Map(), c(x.nestGroup, x.details, f + 1, _), x.details = [];
|
|
661
753
|
}));
|
|
662
754
|
}
|
|
@@ -675,19 +767,19 @@ function me(t) {
|
|
|
675
767
|
const x = r(f.nestGroup);
|
|
676
768
|
G.push(...x), H += x.length;
|
|
677
769
|
}
|
|
678
|
-
if (f.details && f.details.length && (G.push(...f.details), H += f.details.length),
|
|
770
|
+
if (f.details && f.details.length && (G.push(...f.details), H += f.details.length), F.value) {
|
|
679
771
|
const x = {
|
|
680
772
|
__fv_data_grid_group_field__: f.field,
|
|
681
773
|
__fv_data_grid_group_layer__: f.layer,
|
|
682
774
|
__fv_data_grid_group_summary__: !0
|
|
683
775
|
};
|
|
684
776
|
x[g.value] = `summary_of_${f.field}_${f.value}`, x[f.field] = Array.from(f.groupSummaries.entries()).reduce(
|
|
685
|
-
(
|
|
777
|
+
(B, [W, p]) => `${B} ${W} total:${p} `,
|
|
686
778
|
""
|
|
687
779
|
), G.push(x);
|
|
688
780
|
}
|
|
689
|
-
f.groupSummaries && f.groupSummaries.size && f.groupSummaries.forEach((x,
|
|
690
|
-
_[
|
|
781
|
+
f.groupSummaries && f.groupSummaries.size && f.groupSummaries.forEach((x, B) => {
|
|
782
|
+
_[B] = x;
|
|
691
783
|
}), _[g.value] = `group_of_${f.field}_${f.value}`, _[f.field] = `${f.field}:${f.value} (${H})`;
|
|
692
784
|
}), G.forEach((f, _) => {
|
|
693
785
|
f.__fv_data_index__ = _;
|
|
@@ -700,11 +792,11 @@ function me(t) {
|
|
|
700
792
|
return f !== M && (j.clear(), h = [], M = f, c(j, G, 0, a), h = r(j)), h;
|
|
701
793
|
}
|
|
702
794
|
function n(a, G, f, _, H) {
|
|
703
|
-
const x = a.__fv_data_grid_group_collapse__,
|
|
795
|
+
const x = a.__fv_data_grid_group_collapse__, B = a.__fv_data_grid_group_field__, W = a.__fv_data_grid_group_value__, p = a.__fv_data_index__, e = a.__fv_data_grid_group_layer__, l = {
|
|
704
796
|
collapse: x,
|
|
705
797
|
data: {},
|
|
706
798
|
dataIndex: p,
|
|
707
|
-
groupField:
|
|
799
|
+
groupField: B,
|
|
708
800
|
groupValue: W,
|
|
709
801
|
layer: e,
|
|
710
802
|
index: f,
|
|
@@ -742,8 +834,8 @@ function me(t) {
|
|
|
742
834
|
colSpan: H.length,
|
|
743
835
|
rowSpan: 1,
|
|
744
836
|
index: 1,
|
|
745
|
-
field:
|
|
746
|
-
data: a[
|
|
837
|
+
field: B,
|
|
838
|
+
data: a[B],
|
|
747
839
|
parent: l,
|
|
748
840
|
mode: q.readonly,
|
|
749
841
|
getEditor: (s) => s.data,
|
|
@@ -761,7 +853,7 @@ function me(t) {
|
|
|
761
853
|
update: () => {
|
|
762
854
|
}
|
|
763
855
|
};
|
|
764
|
-
if (l.data[
|
|
856
|
+
if (l.data[B] = v, w.value) {
|
|
765
857
|
let s = v.colSpan;
|
|
766
858
|
const $ = O.value.reduce((P, C) => (P.set(C, !0), P), /* @__PURE__ */ new Map());
|
|
767
859
|
H.reduce((P, C, z) => {
|
|
@@ -797,9 +889,9 @@ function me(t) {
|
|
|
797
889
|
return l;
|
|
798
890
|
}
|
|
799
891
|
function u(a, G, f, _, H) {
|
|
800
|
-
const x = a.__fv_data_grid_group_field__,
|
|
892
|
+
const x = a.__fv_data_grid_group_field__, B = a.__fv_data_index__, W = a.__fv_data_grid_group_layer__, p = {
|
|
801
893
|
data: {},
|
|
802
|
-
dataIndex:
|
|
894
|
+
dataIndex: B,
|
|
803
895
|
groupField: x,
|
|
804
896
|
groupValue: null,
|
|
805
897
|
layer: W,
|
|
@@ -869,8 +961,8 @@ function me(t) {
|
|
|
869
961
|
return { collpaseGroupIconClass: o, renderGroupedData: b, renderGroupRow: n, renderSummaryRow: u };
|
|
870
962
|
}
|
|
871
963
|
function Pe(t) {
|
|
872
|
-
var x,
|
|
873
|
-
const g = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), m = D(((x = t.group) == null ? void 0 : x.groupFields) || []), O = D(((
|
|
964
|
+
var x, B;
|
|
965
|
+
const g = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), m = D(((x = t.group) == null ? void 0 : x.groupFields) || []), O = D(((B = t.group) == null ? void 0 : B.enable) || !1), w = D(t.data), F = me(t), j = D(t.summary), h = R(() => {
|
|
874
966
|
const W = j.value;
|
|
875
967
|
return (W == null ? void 0 : W.groupFields) || [];
|
|
876
968
|
}), M = h.value.reduce((W, p) => (W.set(p, 0), W), /* @__PURE__ */ new Map()), c = R(() => w.value.length), r = D(t.pagination), b = R(() => {
|
|
@@ -879,7 +971,7 @@ function Pe(t) {
|
|
|
879
971
|
}), n = D(1);
|
|
880
972
|
function u() {
|
|
881
973
|
let W = w.value;
|
|
882
|
-
O.value && (W =
|
|
974
|
+
O.value && (W = F.renderGroupedData(m.value, w.value));
|
|
883
975
|
const p = (n.value - 1) * b.value, e = Math.min(p + b.value, c.value);
|
|
884
976
|
let l = 0;
|
|
885
977
|
const i = [];
|
|
@@ -925,13 +1017,13 @@ function Pe(t) {
|
|
|
925
1017
|
}
|
|
926
1018
|
return { collapse: G, dataView: o, expand: f, getRange: _, navigatePageTo: H, summaries: M, totalItems: c };
|
|
927
1019
|
}
|
|
928
|
-
function
|
|
1020
|
+
function ke(t) {
|
|
929
1021
|
return S(ye("f-date-picker"), {
|
|
930
1022
|
modelValue: t.data,
|
|
931
1023
|
onDatePicked: (g) => t.update(g)
|
|
932
1024
|
}, null);
|
|
933
1025
|
}
|
|
934
|
-
function
|
|
1026
|
+
function Ee(t) {
|
|
935
1027
|
const g = R(() => ({
|
|
936
1028
|
height: "100%",
|
|
937
1029
|
resize: "none"
|
|
@@ -978,19 +1070,19 @@ function Re(t) {
|
|
|
978
1070
|
["text", "text-area"]
|
|
979
1071
|
]), O = /* @__PURE__ */ new Map([
|
|
980
1072
|
["checkbox", ge],
|
|
981
|
-
["date-picker",
|
|
1073
|
+
["date-picker", ke],
|
|
982
1074
|
["text-editor", ge],
|
|
983
|
-
["text-area",
|
|
1075
|
+
["text-area", Ee]
|
|
984
1076
|
]);
|
|
985
1077
|
let w;
|
|
986
|
-
function
|
|
1078
|
+
function F(r) {
|
|
987
1079
|
r.mode = q.editing, w = r;
|
|
988
1080
|
}
|
|
989
1081
|
function j(r) {
|
|
990
1082
|
r.mode = q.editable;
|
|
991
1083
|
}
|
|
992
1084
|
function h(r, b) {
|
|
993
|
-
g.value && b.mode === q.editable && w !== b && (w && j(w),
|
|
1085
|
+
g.value && b.mode === q.editable && w !== b && (w && j(w), F(b));
|
|
994
1086
|
}
|
|
995
1087
|
function M(r, b) {
|
|
996
1088
|
const n = b.dataType;
|
|
@@ -1001,7 +1093,7 @@ function Re(t) {
|
|
|
1001
1093
|
}
|
|
1002
1094
|
return { getEditor: M, onClickCell: h };
|
|
1003
1095
|
}
|
|
1004
|
-
function ze(t, g, d, m, O, w,
|
|
1096
|
+
function ze(t, g, d, m, O, w, F, j, h, M) {
|
|
1005
1097
|
const {
|
|
1006
1098
|
calculateCellPositionInRow: c,
|
|
1007
1099
|
cellKey: r,
|
|
@@ -1017,8 +1109,8 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1017
1109
|
gridRowClass: _,
|
|
1018
1110
|
onClickRow: H,
|
|
1019
1111
|
onMouseoverRow: x
|
|
1020
|
-
} =
|
|
1021
|
-
onClickCell:
|
|
1112
|
+
} = F, {
|
|
1113
|
+
onClickCell: B
|
|
1022
1114
|
} = O, {
|
|
1023
1115
|
toggleGroupRow: W
|
|
1024
1116
|
} = j, {
|
|
@@ -1045,23 +1137,23 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1045
1137
|
A.collapse = !A.collapse, M.value = W(A.collapse ? "collapse" : "expand", A, M.value);
|
|
1046
1138
|
}
|
|
1047
1139
|
function le(y, A) {
|
|
1048
|
-
const
|
|
1140
|
+
const E = [];
|
|
1049
1141
|
if (y.groupField && A[y.groupField]) {
|
|
1050
1142
|
for (let K = 0; K <= y.layer; K++)
|
|
1051
|
-
|
|
1143
|
+
E.push(S("div", {
|
|
1052
1144
|
class: "fv-grid-group-row-icon",
|
|
1053
|
-
onClick: (
|
|
1145
|
+
onClick: (k) => ae(k, y)
|
|
1054
1146
|
}, [S("span", {
|
|
1055
1147
|
class: f(y)
|
|
1056
1148
|
}, null)]));
|
|
1057
1149
|
const T = y.data[y.groupField];
|
|
1058
|
-
|
|
1150
|
+
E.push(S("div", {
|
|
1059
1151
|
ref: T.setRef,
|
|
1060
1152
|
key: r(y, y.layer + 1),
|
|
1061
1153
|
class: "fv-grid-cell",
|
|
1062
1154
|
style: a(T, A, y.layer)
|
|
1063
1155
|
}, [T.data])), Object.values(y.data).filter((K) => K.field !== y.groupField && K.colSpan !== 0).forEach((K) => {
|
|
1064
|
-
|
|
1156
|
+
E.push(S("div", {
|
|
1065
1157
|
ref: K.setRef,
|
|
1066
1158
|
key: r(y, K.index),
|
|
1067
1159
|
class: "fv-grid-cell",
|
|
@@ -1069,7 +1161,7 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1069
1161
|
}, [K.data]));
|
|
1070
1162
|
});
|
|
1071
1163
|
}
|
|
1072
|
-
return
|
|
1164
|
+
return E;
|
|
1073
1165
|
}
|
|
1074
1166
|
function ne(y, A) {
|
|
1075
1167
|
return y.layer > -1 && S("div", {
|
|
@@ -1077,22 +1169,22 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1077
1169
|
key: n(y),
|
|
1078
1170
|
class: _(y),
|
|
1079
1171
|
style: u(y),
|
|
1080
|
-
onClick: (
|
|
1081
|
-
onMouseover: (
|
|
1172
|
+
onClick: (E) => H(E, y),
|
|
1173
|
+
onMouseover: (E) => x(E, y)
|
|
1082
1174
|
}, [le(y, A)]);
|
|
1083
1175
|
}
|
|
1084
1176
|
function fe(y, A) {
|
|
1085
|
-
const
|
|
1177
|
+
const E = [];
|
|
1086
1178
|
if (y.groupField && A[y.groupField]) {
|
|
1087
1179
|
const T = y.data[y.groupField];
|
|
1088
|
-
|
|
1180
|
+
E.push(S("div", {
|
|
1089
1181
|
ref: T.setRef,
|
|
1090
1182
|
key: r(y, y.layer + 1),
|
|
1091
1183
|
class: "fv-grid-cell",
|
|
1092
1184
|
style: G(T, A, y.layer)
|
|
1093
1185
|
}, [T.data]));
|
|
1094
1186
|
}
|
|
1095
|
-
return
|
|
1187
|
+
return E;
|
|
1096
1188
|
}
|
|
1097
1189
|
function he(y, A) {
|
|
1098
1190
|
return y.layer > -1 && S("div", {
|
|
@@ -1100,8 +1192,8 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1100
1192
|
key: n(y),
|
|
1101
1193
|
class: _(y),
|
|
1102
1194
|
style: u(y),
|
|
1103
|
-
onClick: (
|
|
1104
|
-
onMouseover: (
|
|
1195
|
+
onClick: (E) => H(E, y),
|
|
1196
|
+
onMouseover: (E) => x(E, y)
|
|
1105
1197
|
}, [fe(y, A)]);
|
|
1106
1198
|
}
|
|
1107
1199
|
function ve(y, A) {
|
|
@@ -1110,27 +1202,27 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1110
1202
|
key: n(y),
|
|
1111
1203
|
class: _(y),
|
|
1112
1204
|
style: u(y),
|
|
1113
|
-
onClick: (
|
|
1114
|
-
onMouseover: (
|
|
1115
|
-
}, [Object.values(y.data).filter((
|
|
1116
|
-
ref:
|
|
1117
|
-
key: r(y,
|
|
1205
|
+
onClick: (E) => H(E, y),
|
|
1206
|
+
onMouseover: (E) => x(E, y)
|
|
1207
|
+
}, [Object.values(y.data).filter((E) => A[E.field] && E.rowSpan === 1).map((E) => S("div", {
|
|
1208
|
+
ref: E.setRef,
|
|
1209
|
+
key: r(y, E.index),
|
|
1118
1210
|
class: "fv-grid-cell",
|
|
1119
|
-
style: b(
|
|
1120
|
-
onClick: (T) =>
|
|
1121
|
-
}, [
|
|
1211
|
+
style: b(E, A),
|
|
1212
|
+
onClick: (T) => B(T, E)
|
|
1213
|
+
}, [E.mode === q.editing ? E.getEditor(E) : E.data]))]);
|
|
1122
1214
|
}
|
|
1123
1215
|
const pe = [ve, ne, he];
|
|
1124
1216
|
function se(y, A) {
|
|
1125
|
-
const
|
|
1126
|
-
return M.value.map((T) => pe[T.type](T,
|
|
1217
|
+
const E = c(y);
|
|
1218
|
+
return M.value.map((T) => pe[T.type](T, E));
|
|
1127
1219
|
}
|
|
1128
1220
|
function ue(y) {
|
|
1129
1221
|
const A = c(y);
|
|
1130
|
-
return M.value.map((
|
|
1131
|
-
key: r(
|
|
1222
|
+
return M.value.map((E) => Object.values(E.data).filter((T) => A[T.field] && T.rowSpan > 1).map((T) => S("div", {
|
|
1223
|
+
key: r(E, T.index),
|
|
1132
1224
|
class: "fv-grid-cell fv-grid-merged-cell",
|
|
1133
|
-
style: o(
|
|
1225
|
+
style: o(E, T, A)
|
|
1134
1226
|
}, [T.data])));
|
|
1135
1227
|
}
|
|
1136
1228
|
function ie() {
|
|
@@ -1176,13 +1268,13 @@ function ze(t, g, d, m, O, w, B, j, h, M) {
|
|
|
1176
1268
|
};
|
|
1177
1269
|
}
|
|
1178
1270
|
function Ve(t, g, d, m) {
|
|
1179
|
-
const O = D(-1), w = D(0),
|
|
1271
|
+
const O = D(-1), w = D(0), F = D(!1);
|
|
1180
1272
|
let j = "";
|
|
1181
1273
|
const h = R(() => ({
|
|
1182
|
-
display:
|
|
1274
|
+
display: F.value ? "block" : "none",
|
|
1183
1275
|
left: `${w.value}px`
|
|
1184
1276
|
})), M = R(() => ({
|
|
1185
|
-
display:
|
|
1277
|
+
display: F.value ? "block" : "none"
|
|
1186
1278
|
}));
|
|
1187
1279
|
function c(n) {
|
|
1188
1280
|
w.value = n.clientX - n.target.parentElement.offsetLeft;
|
|
@@ -1193,16 +1285,16 @@ function Ve(t, g, d, m) {
|
|
|
1193
1285
|
const o = n.clientX - n.target.parentElement.offsetLeft;
|
|
1194
1286
|
u.actualWidth = (u.actualWidth || 0) + (o - O.value), d.calculateColumnHeaders(g), d.calculateColumnsWidth(g);
|
|
1195
1287
|
}
|
|
1196
|
-
w.value = 0,
|
|
1288
|
+
w.value = 0, F.value = !1, m.reCalculateVisualDataRows(), document.removeEventListener("mousemove", c), document.body.style.userSelect = "", j = "";
|
|
1197
1289
|
}
|
|
1198
1290
|
function b(n, u) {
|
|
1199
|
-
j = u,
|
|
1291
|
+
j = u, F.value = !0;
|
|
1200
1292
|
const o = n.path.find((a) => a.className.split(" ")[0] === "fv-grid");
|
|
1201
1293
|
w.value = n.clientX - o.offsetLeft, O.value = n.clientX - o.offsetLeft, document.addEventListener("mousemove", c), document.addEventListener("mouseup", r), document.body.style.userSelect = "none";
|
|
1202
1294
|
}
|
|
1203
1295
|
return { onClickColumnResizeBar: b, resizeHandleStyle: h, resizeOverlayStyle: M };
|
|
1204
1296
|
}
|
|
1205
|
-
function Ne(t, g, d, m, O, w,
|
|
1297
|
+
function Ne(t, g, d, m, O, w, F) {
|
|
1206
1298
|
const {
|
|
1207
1299
|
showRowCheckbox: j,
|
|
1208
1300
|
showRowNumer: h,
|
|
@@ -1220,7 +1312,7 @@ function Ne(t, g, d, m, O, w, B) {
|
|
|
1220
1312
|
leftFixedGridHeaderColumnsStyle: G,
|
|
1221
1313
|
rightFixedGridHeaderColumnsStyle: f
|
|
1222
1314
|
} = w, _ = c.value.defaultColumnWidth, H = 32, x = /* @__PURE__ */ new Map([[0, 0]]);
|
|
1223
|
-
function
|
|
1315
|
+
function B(C, z) {
|
|
1224
1316
|
const N = x.get(z) || 0, L = {
|
|
1225
1317
|
height: `${C.depth * H}px`,
|
|
1226
1318
|
left: `${C.left}px`,
|
|
@@ -1238,7 +1330,7 @@ function Ne(t, g, d, m, O, w, B) {
|
|
|
1238
1330
|
function e(C, z) {
|
|
1239
1331
|
return S("div", {
|
|
1240
1332
|
class: "fv-grid-header-cell",
|
|
1241
|
-
style:
|
|
1333
|
+
style: B(C, z)
|
|
1242
1334
|
}, [C.title, C.resizable && S("span", {
|
|
1243
1335
|
class: "fv-column-resize-bar",
|
|
1244
1336
|
onMousedown: (N) => n(N, C.field)
|
|
@@ -1335,7 +1427,7 @@ function Te(t, g, d, m) {
|
|
|
1335
1427
|
onMouseoverRow: O,
|
|
1336
1428
|
sidebarRowClass: w
|
|
1337
1429
|
} = g, {
|
|
1338
|
-
showRowCheckbox:
|
|
1430
|
+
showRowCheckbox: F,
|
|
1339
1431
|
showRowNumer: j,
|
|
1340
1432
|
sidebarCellPosition: h,
|
|
1341
1433
|
sidebarWidth: M
|
|
@@ -1362,10 +1454,10 @@ function Te(t, g, d, m) {
|
|
|
1362
1454
|
}, [o.dataIndex]);
|
|
1363
1455
|
}
|
|
1364
1456
|
function n(o) {
|
|
1365
|
-
return (
|
|
1457
|
+
return (F.value || j.value) && o.value.map((a) => S("div", {
|
|
1366
1458
|
class: w(a),
|
|
1367
1459
|
style: h(a)
|
|
1368
|
-
}, [
|
|
1460
|
+
}, [F.value && r(a), j.value && b(a)]));
|
|
1369
1461
|
}
|
|
1370
1462
|
function u(o) {
|
|
1371
1463
|
return S("div", {
|
|
@@ -1386,14 +1478,14 @@ function Le(t, g, d) {
|
|
|
1386
1478
|
const j = O.value;
|
|
1387
1479
|
return j && j.enable && j.groupFields && j.groupFields.length > 0;
|
|
1388
1480
|
});
|
|
1389
|
-
function
|
|
1481
|
+
function F() {
|
|
1390
1482
|
return w.value && S("div", {
|
|
1391
1483
|
class: "fv-datagrid-summary"
|
|
1392
1484
|
}, [S("div", {
|
|
1393
1485
|
class: "fv-datagird-summary-panel"
|
|
1394
1486
|
}, [S("span", {
|
|
1395
1487
|
class: "fv-datagrid-summary-title"
|
|
1396
|
-
}, [be("
|
|
1488
|
+
}, [be("当页合计")]), S("div", {
|
|
1397
1489
|
class: "fv-datagrid-summary-content"
|
|
1398
1490
|
}, [m.value.summaryColumns.map((j) => S("div", {
|
|
1399
1491
|
class: "fv-datagrid-summary-field"
|
|
@@ -1404,7 +1496,7 @@ function Le(t, g, d) {
|
|
|
1404
1496
|
}, [g.summaries.get(j.field)])]))])])]);
|
|
1405
1497
|
}
|
|
1406
1498
|
return {
|
|
1407
|
-
renderDataGridSummery:
|
|
1499
|
+
renderDataGridSummery: F
|
|
1408
1500
|
};
|
|
1409
1501
|
}
|
|
1410
1502
|
function Xe(t, g, d) {
|
|
@@ -1418,7 +1510,7 @@ function Xe(t, g, d) {
|
|
|
1418
1510
|
}, [S("div", {
|
|
1419
1511
|
class: "fv-grid-horizontal-scroll-thumb",
|
|
1420
1512
|
style: m.value,
|
|
1421
|
-
onMousedown: (
|
|
1513
|
+
onMousedown: (F) => O(F, g, "horizontal")
|
|
1422
1514
|
}, null)]);
|
|
1423
1515
|
}
|
|
1424
1516
|
return {
|
|
@@ -1436,55 +1528,55 @@ function Ye(t, g, d) {
|
|
|
1436
1528
|
}, [S("div", {
|
|
1437
1529
|
class: "fv-grid-vertical-scroll-thumb",
|
|
1438
1530
|
style: m.value,
|
|
1439
|
-
onMousedown: (
|
|
1531
|
+
onMousedown: (F) => O(F, g, "vertical")
|
|
1440
1532
|
}, null)]);
|
|
1441
1533
|
}
|
|
1442
1534
|
return {
|
|
1443
1535
|
renderVerticalScrollbar: w
|
|
1444
1536
|
};
|
|
1445
1537
|
}
|
|
1446
|
-
const _e = Ce({
|
|
1538
|
+
const _e = /* @__PURE__ */ Ce({
|
|
1447
1539
|
name: "FDataGrid",
|
|
1448
1540
|
props: Oe,
|
|
1449
1541
|
emits: [],
|
|
1450
1542
|
setup(t) {
|
|
1451
1543
|
var te;
|
|
1452
|
-
const g = D(t.columns), d = 20, m = 0, O = D(), w = D(),
|
|
1544
|
+
const g = D(t.columns), d = 20, m = 0, O = D(), w = D(), F = D(t.showStripe), j = D(!1), h = D(((te = t.rowOption) == null ? void 0 : te.wrapContent) || !1), M = Pe(t), c = je(t), {
|
|
1453
1545
|
columnContext: r
|
|
1454
|
-
} = c, b =
|
|
1546
|
+
} = c, b = Fe(t, r), {
|
|
1455
1547
|
calculateColumnsSize: n
|
|
1456
1548
|
} = b, u = me(t), o = Re(t), a = He(t, g, u, M, d, m, o), {
|
|
1457
1549
|
getVisualData: G
|
|
1458
1550
|
} = a, f = $e(t, r), _ = Me(t), {
|
|
1459
1551
|
sidebarWidth: H
|
|
1460
|
-
} = _, x = D(G(0, d + m)),
|
|
1552
|
+
} = _, x = D(G(0, d + m)), B = De(t, M, x, r, a, d, m, H), {
|
|
1461
1553
|
onWheel: W,
|
|
1462
1554
|
dataGridWidth: p,
|
|
1463
1555
|
viewPortHeight: e,
|
|
1464
1556
|
viewPortWidth: l
|
|
1465
|
-
} =
|
|
1557
|
+
} = B, i = Ge(t), v = R(() => ({
|
|
1466
1558
|
"fv-grid": !0,
|
|
1467
|
-
"fv-datagrid-strip":
|
|
1559
|
+
"fv-datagrid-strip": F.value
|
|
1468
1560
|
})), s = R(() => ({
|
|
1469
1561
|
"fv-grid-content": !0,
|
|
1470
1562
|
"fv-grid-content-hover": j.value,
|
|
1471
1563
|
"fv-grid-wrap-content": h.value
|
|
1472
1564
|
})), {
|
|
1473
1565
|
renderDataArea: $
|
|
1474
|
-
} = ze(t, w, f, c, o, u, i, a,
|
|
1566
|
+
} = ze(t, w, f, c, o, u, i, a, B, x), {
|
|
1475
1567
|
renderGridHeader: P,
|
|
1476
1568
|
renderGridColumnResizeOverlay: C
|
|
1477
|
-
} = Ne(t, O, c, b, _,
|
|
1569
|
+
} = Ne(t, O, c, b, _, B), {
|
|
1478
1570
|
renderDataGridPagination: z
|
|
1479
1571
|
} = Ae(t, M), {
|
|
1480
1572
|
renderDataGridSidebar: N
|
|
1481
|
-
} = Te(t, i, _,
|
|
1573
|
+
} = Te(t, i, _, B), {
|
|
1482
1574
|
renderDataGridSummery: L
|
|
1483
1575
|
} = Le(t, M, c), {
|
|
1484
1576
|
renderHorizontalScrollbar: Y
|
|
1485
|
-
} = Xe(t, O,
|
|
1577
|
+
} = Xe(t, O, B), {
|
|
1486
1578
|
renderVerticalScrollbar: J
|
|
1487
|
-
} = Ye(t, O,
|
|
1579
|
+
} = Ye(t, O, B);
|
|
1488
1580
|
function Q(oe) {
|
|
1489
1581
|
var ae, le, ne;
|
|
1490
1582
|
e.value = ((ae = w.value) == null ? void 0 : ae.clientHeight) || 0, l.value = ((le = w.value) == null ? void 0 : le.clientWidth) || 0, p.value = ((ne = O.value) == null ? void 0 : ne.clientWidth) || 0;
|