@progress/kendo-vue-grid 8.1.0-develop.6 → 8.1.0-develop.7
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/Grid.d.ts +2 -0
- package/Grid.js +1 -1
- package/Grid.mjs +2 -1
- package/GridState.d.ts +2 -0
- package/RootGrid.d.ts +19 -0
- package/RootGrid.js +1 -1
- package/RootGrid.mjs +23 -8
- package/common.d.ts +1 -0
- package/common.js +1 -1
- package/common.mjs +1 -0
- package/components/PinnedRowsTable.d.ts +0 -1
- package/components/PinnedRowsTable.js +1 -1
- package/components/PinnedRowsTable.mjs +31 -37
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/interfaces/GridProps.d.ts +14 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/rows/GridRow.d.ts +2 -0
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +16 -12
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { setRef as c, classNames as f, uGrid as
|
|
10
|
-
import { TableSelection as
|
|
11
|
-
import { provideLocalizationService as
|
|
12
|
-
import { GridRow as
|
|
13
|
-
import { getRowContents as
|
|
14
|
-
import { pinnedTopRowsAriaLabel as
|
|
15
|
-
const
|
|
8
|
+
import { defineComponent as N, createVNode as s, mergeProps as k, inject as G, computed as a, ref as P } from "vue";
|
|
9
|
+
import { setRef as c, classNames as f, uGrid as p, getter as j, getRef as l } from "@progress/kendo-vue-common";
|
|
10
|
+
import { TableSelection as x, tableKeyboardNavigationTopPinnedAttributes as K, tableKeyboardNavigationBottomPinnedAttributes as z } from "@progress/kendo-vue-data-tools";
|
|
11
|
+
import { provideLocalizationService as u } from "@progress/kendo-vue-intl";
|
|
12
|
+
import { GridRow as B } from "../rows/GridRow.mjs";
|
|
13
|
+
import { getRowContents as E } from "../getRowContents.mjs";
|
|
14
|
+
import { pinnedTopRowsAriaLabel as R, messages as h, pinnedBottomRowsAriaLabel as w } from "../messages/main.mjs";
|
|
15
|
+
const D = /* @__PURE__ */ N({
|
|
16
16
|
name: "PinnedRowsTable",
|
|
17
17
|
props: {
|
|
18
18
|
size: String,
|
|
@@ -49,27 +49,21 @@ const J = /* @__PURE__ */ k({
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
setup(e) {
|
|
52
|
-
const n =
|
|
52
|
+
const n = G("kendo", {}), d = a(() => e.position === "top"), g = a(() => d.value ? n.pinnedTopRef : n.pinnedBottomRef), y = P(!1), S = (o) => {
|
|
53
53
|
const t = n.containerElementRef;
|
|
54
|
-
if (!t ||
|
|
54
|
+
if (!t || y.value)
|
|
55
55
|
return;
|
|
56
56
|
const i = o.currentTarget.scrollLeft;
|
|
57
57
|
t.scrollLeft !== i && (t.scrollLeft = i);
|
|
58
|
-
}, I = a(() => {
|
|
59
|
-
var o;
|
|
60
|
-
return (o = e.rows) != null && o.pinnedData ? {
|
|
61
|
-
...e.rows,
|
|
62
|
-
data: e.rows.pinnedData
|
|
63
|
-
} : e.rows;
|
|
64
|
-
}), L = a(() => !e.pinnedItems || !e.dataRowContext ? [] : e.pinnedItems.map((o, t) => {
|
|
58
|
+
}, I = a(() => !e.pinnedItems || !e.dataRowContext ? [] : e.pinnedItems.map((o, t) => {
|
|
65
59
|
const i = {
|
|
66
60
|
dataItem: o,
|
|
67
61
|
rowType: "data",
|
|
68
62
|
level: 0,
|
|
69
63
|
expanded: !1,
|
|
70
64
|
dataIndex: t
|
|
71
|
-
}, r = e.dataRowContext.dataItemKey, b = "pinned_" + ((r ?
|
|
72
|
-
return s(
|
|
65
|
+
}, r = e.dataRowContext.dataItemKey, b = "pinned_" + ((r ? j(r)(o) : void 0) || "ai" + t), m = E(e.dataRowContext, i, b, t);
|
|
66
|
+
return s(B, {
|
|
73
67
|
key: b,
|
|
74
68
|
rowType: "data",
|
|
75
69
|
item: i,
|
|
@@ -79,34 +73,34 @@ const J = /* @__PURE__ */ k({
|
|
|
79
73
|
isAltRow: t % 2 !== 0,
|
|
80
74
|
isHidden: !1,
|
|
81
75
|
rowHeight: e.rowHeight,
|
|
82
|
-
isSelected: m.isSelected
|
|
76
|
+
isSelected: m.isSelected,
|
|
77
|
+
rows: e.rows
|
|
83
78
|
}, {
|
|
84
79
|
default: () => [m.row]
|
|
85
80
|
});
|
|
86
|
-
})),
|
|
81
|
+
})), L = a(() => f("k-grid-pinned-container", {
|
|
87
82
|
"k-pos-bottom": !d.value
|
|
88
|
-
})), v = a(() => f(
|
|
83
|
+
})), v = a(() => f(p.table({
|
|
89
84
|
size: e.size
|
|
90
|
-
}))),
|
|
85
|
+
}))), T = (o) => {
|
|
91
86
|
var i, r;
|
|
92
87
|
const t = (i = e.pinnedItems) == null ? void 0 : i[o.startRowIndex];
|
|
93
88
|
t && ((r = n.pinnedSelectionRelease) == null || r.call(n, o, t));
|
|
94
|
-
},
|
|
89
|
+
}, C = a(() => e.selectable ? {
|
|
95
90
|
...typeof e.selectable == "object" ? e.selectable : {},
|
|
96
91
|
enabled: !0,
|
|
97
92
|
drag: !1
|
|
98
|
-
} : e.selectable),
|
|
93
|
+
} : e.selectable), A = a(() => d.value ? K : z);
|
|
99
94
|
return {
|
|
100
95
|
isTop: d,
|
|
101
96
|
pinnedRef: g,
|
|
102
|
-
handlePinnedScroll:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
containerClassName: T,
|
|
97
|
+
handlePinnedScroll: S,
|
|
98
|
+
pinnedRows: I,
|
|
99
|
+
containerClassName: L,
|
|
106
100
|
tableClassName: v,
|
|
107
|
-
handleSelectionRelease:
|
|
108
|
-
pinnedSelectable:
|
|
109
|
-
pinnedBodyAttributes:
|
|
101
|
+
handleSelectionRelease: T,
|
|
102
|
+
pinnedSelectable: C,
|
|
103
|
+
pinnedBodyAttributes: A
|
|
110
104
|
};
|
|
111
105
|
},
|
|
112
106
|
render() {
|
|
@@ -120,22 +114,22 @@ const J = /* @__PURE__ */ k({
|
|
|
120
114
|
class: "k-grid-pinned-wrap",
|
|
121
115
|
ref: c(this, "pinnedRef"),
|
|
122
116
|
onScroll: this.handlePinnedScroll
|
|
123
|
-
}, [s(
|
|
117
|
+
}, [s(x, {
|
|
124
118
|
selectable: this.pinnedSelectable,
|
|
125
119
|
onRelease: this.handleSelectionRelease
|
|
126
120
|
}, {
|
|
127
121
|
default: () => [s("table", {
|
|
128
122
|
ref: c(this, "table"),
|
|
129
123
|
class: this.tableClassName,
|
|
130
|
-
"aria-label": this.isTop ?
|
|
124
|
+
"aria-label": this.isTop ? u(this).toLanguageString(R, h[R]) : u(this).toLanguageString(w, h[w])
|
|
131
125
|
}, [s("colgroup", {
|
|
132
126
|
ref: c(this, "colGroup")
|
|
133
|
-
}, [this.$props.cols]), s("tbody",
|
|
134
|
-
class: f(
|
|
127
|
+
}, [this.$props.cols]), s("tbody", k({
|
|
128
|
+
class: f(p.tbody({}))
|
|
135
129
|
}, this.pinnedBodyAttributes), [this.pinnedRows])])]
|
|
136
130
|
})])]);
|
|
137
131
|
}
|
|
138
132
|
});
|
|
139
133
|
export {
|
|
140
|
-
|
|
134
|
+
D as PinnedRowsTable
|
|
141
135
|
};
|