@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.
@@ -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 k, createVNode as s, mergeProps as G, inject as P, computed as a, ref as j } from "vue";
9
- import { setRef as c, classNames as f, uGrid as u, getter as x, getRef as l } from "@progress/kendo-vue-common";
10
- import { TableSelection as K, tableKeyboardNavigationTopPinnedAttributes as z, tableKeyboardNavigationBottomPinnedAttributes as B } from "@progress/kendo-vue-data-tools";
11
- import { provideLocalizationService as R } from "@progress/kendo-vue-intl";
12
- import { GridRow as E } from "../rows/GridRow.mjs";
13
- import { getRowContents as H } from "../getRowContents.mjs";
14
- import { pinnedTopRowsAriaLabel as p, messages as h, pinnedBottomRowsAriaLabel as w } from "../messages/main.mjs";
15
- const J = /* @__PURE__ */ k({
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 = P("kendo", {}), d = a(() => e.position === "top"), g = a(() => d.value ? n.pinnedTopRef : n.pinnedBottomRef), S = j(!1), y = (o) => {
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 || S.value)
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 ? x(r)(o) : void 0) || "ai" + t), m = H(e.dataRowContext, i, b, t);
72
- return s(E, {
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
- })), T = a(() => f("k-grid-pinned-container", {
81
+ })), L = a(() => f("k-grid-pinned-container", {
87
82
  "k-pos-bottom": !d.value
88
- })), v = a(() => f(u.table({
83
+ })), v = a(() => f(p.table({
89
84
  size: e.size
90
- }))), C = (o) => {
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
- }, A = a(() => e.selectable ? {
89
+ }, C = a(() => e.selectable ? {
95
90
  ...typeof e.selectable == "object" ? e.selectable : {},
96
91
  enabled: !0,
97
92
  drag: !1
98
- } : e.selectable), N = a(() => d.value ? z : B);
93
+ } : e.selectable), A = a(() => d.value ? K : z);
99
94
  return {
100
95
  isTop: d,
101
96
  pinnedRef: g,
102
- handlePinnedScroll: y,
103
- rowTemplateSettings: I,
104
- pinnedRows: L,
105
- containerClassName: T,
97
+ handlePinnedScroll: S,
98
+ pinnedRows: I,
99
+ containerClassName: L,
106
100
  tableClassName: v,
107
- handleSelectionRelease: C,
108
- pinnedSelectable: A,
109
- pinnedBodyAttributes: N
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(K, {
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 ? R(this).toLanguageString(p, h[p]) : R(this).toLanguageString(w, h[w])
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", G({
134
- class: f(u.tbody({}))
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
- J as PinnedRowsTable
134
+ D as PinnedRowsTable
141
135
  };