@progress/kendo-vue-grid 10.2.0-develop.13 → 10.2.0-develop.14
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 +3 -1
- package/Grid.js +1 -1
- package/Grid.mjs +108 -102
- package/RootGrid.d.ts +1789 -6
- package/RootGrid.js +1 -1
- package/RootGrid.mjs +19 -20
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
package/RootGrid.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),R=require("./Grid.js"),G=require("./GridState.js"),O=require("./common.js"),n=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),R=require("./Grid.js"),G=require("./GridState.js"),O=require("./common.js"),n=require("@progress/kendo-vue-common"),L=u.defineComponent({name:"KendoVueGrid",props:O.gridProps,setup(e,{expose:t}){const o=u.ref(null);return t({get element(){var a;return((a=o.value)==null?void 0:a.getElement())||null},get props(){return e},get columns(){var a;return((a=o.value)==null?void 0:a.getColumns())||[]},scrollIntoView:a=>{var s;(s=o.value)==null||s.scrollIntoView(a)},fitColumns:a=>{var s;(s=o.value)==null||s.fitColumns(a)}}),{gridRef:o}},methods:{transformTemplate(e,t){return e?n.templateRendering.call(this,e,t):void 0},transformGroupTemplates(e,t){if(e)return{groupHeader:this.transformTemplate(e.groupHeader,t),data:this.transformTemplate(e.data,t),groupFooter:this.transformTemplate(e.groupFooter,t)}},transformCellTemplates(e,t){if(e)return{headerCell:this.transformTemplate(e.headerCell,t),filterCell:this.transformTemplate(e.filterCell,t),footerCell:this.transformTemplate(e.footerCell,t),groupHeader:this.transformTemplate(e.groupHeader,t),data:this.transformTemplate(e.data,t),groupFooter:this.transformTemplate(e.groupFooter,t),select:this.transformGroupTemplates(e.select,t),hierarchy:this.transformGroupTemplates(e.hierarchy,t),group:this.transformGroupTemplates(e.group,t),edit:e.edit?{text:this.transformTemplate(e.edit.text,t),numeric:this.transformTemplate(e.edit.numeric,t),boolean:this.transformTemplate(e.edit.boolean,t),date:this.transformTemplate(e.edit.date,t)}:void 0}},transformRowTemplates(e,t){if(e)return{groupHeader:this.transformTemplate(e.groupHeader,t),data:this.transformTemplate(e.data,t),groupFooter:this.transformTemplate(e.groupFooter,t),pinnedData:this.transformTemplate(e.pinnedData,t)}}},computed:{columnsWithTemplates(){const e=n.getListeners.call(this);return n.mapTree(this.$props.columns||[],"children",t=>{const o={...t};return{...o,cell:this.transformTemplate(o.cell,e),headerCell:this.transformTemplate(o.headerCell,e),filterCell:this.transformTemplate(o.filterCell,e),footerCell:this.transformTemplate(o.footerCell,e),columnMenu:o.columnMenu===!1?!1:this.transformTemplate(o.columnMenu,e),cells:this.transformCellTemplates(o.cells,e)}})},cellsWithTemplates(){const e=n.getListeners.call(this);return this.transformCellTemplates(this.$props.cells,e)},rowsWithTemplates(){const e=n.getListeners.call(this);return this.transformRowTemplates(this.$props.rows,e)}},render(){const e=n.getDefaultSlots(this)||[],t=n.getListeners.call(this),o=e.filter(r=>{var m,l,p;return(r==null?void 0:r.tag)&&r.tag.toLowerCase().indexOf("toolbar")!==-1||(r==null?void 0:r.componentOptions)&&((m=r.componentOptions.tag)==null?void 0:m.toLowerCase().indexOf("toolbar"))!==-1||((p=(l=r==null?void 0:r.type)==null?void 0:l.name)==null?void 0:p.toLowerCase().indexOf("toolbar"))!==-1}),a=e.filter(r=>{var m,l,p;return(r==null?void 0:r.tag)&&r.tag.toLowerCase().indexOf("records")!==-1||(r==null?void 0:r.componentOptions)&&((m=r.componentOptions.tag)==null?void 0:m.toLowerCase().indexOf("records"))!==-1||((p=(l=r==null?void 0:r.type)==null?void 0:l.name)==null?void 0:p.toLowerCase().indexOf("records"))!==-1}),{cellRender:s,columnMenu:f,detail:T,columns:b,rowRender:d,pager:h,loader:g,rows:W,...i}=this.$props,c=this.columnsWithTemplates,C=this.cellsWithTemplates,w=this.rowsWithTemplates;return u.createVNode(G.GridStateProvider,i,{default:()=>[u.createVNode(R.Grid,u.mergeProps(i,t,{ref:"gridRef",class:this.$attrs.class,style:this.$attrs.style,columns:c,cells:C,rows:w,cellRender:this.transformTemplate(s,t),columnMenu:this.transformTemplate(f,t),rowRender:this.transformTemplate(d,t),pager:this.transformTemplate(h,t),loader:this.transformTemplate(g,t),detail:this.transformTemplate(T,t),toolbar:o,noRecords:a}),null)]})}});exports.RootGrid=L;
|
package/RootGrid.mjs
CHANGED
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
8
|
+
import { defineComponent as R, createVNode as i, mergeProps as O, ref as x } from "vue";
|
|
9
9
|
import { Grid as W } from "./Grid.mjs";
|
|
10
10
|
import { GridStateProvider as G } from "./GridState.mjs";
|
|
11
11
|
import { gridProps as b } from "./common.mjs";
|
|
12
|
-
import { getDefaultSlots as L, getListeners as l, mapTree as
|
|
13
|
-
const S = /* @__PURE__ */
|
|
12
|
+
import { getDefaultSlots as L, getListeners as l, mapTree as y, templateRendering as F } from "@progress/kendo-vue-common";
|
|
13
|
+
const S = /* @__PURE__ */ R({
|
|
14
14
|
name: "KendoVueGrid",
|
|
15
15
|
props: b,
|
|
16
16
|
setup(e, {
|
|
17
17
|
expose: t
|
|
18
18
|
}) {
|
|
19
|
-
const o =
|
|
20
|
-
t({
|
|
19
|
+
const o = x(null);
|
|
20
|
+
return t({
|
|
21
21
|
get element() {
|
|
22
22
|
var a;
|
|
23
|
-
return ((a = o.value) == null ? void 0 : a.
|
|
23
|
+
return ((a = o.value) == null ? void 0 : a.getElement()) || null;
|
|
24
24
|
},
|
|
25
25
|
get props() {
|
|
26
26
|
return e;
|
|
27
27
|
},
|
|
28
28
|
get columns() {
|
|
29
29
|
var a;
|
|
30
|
-
return ((a = o.value) == null ? void 0 : a.
|
|
30
|
+
return ((a = o.value) == null ? void 0 : a.getColumns()) || [];
|
|
31
31
|
},
|
|
32
32
|
scrollIntoView: (a) => {
|
|
33
33
|
var s;
|
|
@@ -36,16 +36,14 @@ const S = /* @__PURE__ */ x({
|
|
|
36
36
|
fitColumns: (a) => {
|
|
37
37
|
var s;
|
|
38
38
|
(s = o.value) == null || s.fitColumns(a);
|
|
39
|
-
},
|
|
40
|
-
exportAsPdf: () => {
|
|
41
|
-
var a;
|
|
42
|
-
(a = o.value) == null || a.exportAsPdf();
|
|
43
39
|
}
|
|
44
|
-
})
|
|
40
|
+
}), {
|
|
41
|
+
gridRef: o
|
|
42
|
+
};
|
|
45
43
|
},
|
|
46
44
|
methods: {
|
|
47
45
|
transformTemplate(e, t) {
|
|
48
|
-
return e ?
|
|
46
|
+
return e ? F.call(this, e, t) : void 0;
|
|
49
47
|
},
|
|
50
48
|
transformGroupTemplates(e, t) {
|
|
51
49
|
if (e)
|
|
@@ -88,7 +86,7 @@ const S = /* @__PURE__ */ x({
|
|
|
88
86
|
computed: {
|
|
89
87
|
columnsWithTemplates() {
|
|
90
88
|
const e = l.call(this);
|
|
91
|
-
return
|
|
89
|
+
return y(this.$props.columns || [], "children", (t) => {
|
|
92
90
|
const o = {
|
|
93
91
|
...t
|
|
94
92
|
};
|
|
@@ -121,24 +119,25 @@ const S = /* @__PURE__ */ x({
|
|
|
121
119
|
return (r == null ? void 0 : r.tag) && r.tag.toLowerCase().indexOf("records") !== -1 || (r == null ? void 0 : r.componentOptions) && ((n = r.componentOptions.tag) == null ? void 0 : n.toLowerCase().indexOf("records")) !== -1 || ((p = (m = r == null ? void 0 : r.type) == null ? void 0 : m.name) == null ? void 0 : p.toLowerCase().indexOf("records")) !== -1;
|
|
122
120
|
}), {
|
|
123
121
|
cellRender: s,
|
|
124
|
-
columnMenu:
|
|
122
|
+
columnMenu: u,
|
|
125
123
|
detail: T,
|
|
126
|
-
columns:
|
|
124
|
+
columns: H,
|
|
127
125
|
rowRender: d,
|
|
128
126
|
pager: h,
|
|
129
127
|
loader: g,
|
|
130
|
-
rows:
|
|
128
|
+
rows: $,
|
|
131
129
|
...f
|
|
132
130
|
} = this.$props, C = this.columnsWithTemplates, c = this.cellsWithTemplates, w = this.rowsWithTemplates;
|
|
133
|
-
return
|
|
134
|
-
default: () => [
|
|
131
|
+
return i(G, f, {
|
|
132
|
+
default: () => [i(W, O(f, t, {
|
|
133
|
+
ref: "gridRef",
|
|
135
134
|
class: this.$attrs.class,
|
|
136
135
|
style: this.$attrs.style,
|
|
137
136
|
columns: C,
|
|
138
137
|
cells: c,
|
|
139
138
|
rows: w,
|
|
140
139
|
cellRender: this.transformTemplate(s, t),
|
|
141
|
-
columnMenu: this.transformTemplate(
|
|
140
|
+
columnMenu: this.transformTemplate(u, t),
|
|
142
141
|
rowRender: this.transformTemplate(d, t),
|
|
143
142
|
pager: this.transformTemplate(h, t),
|
|
144
143
|
loader: this.transformTemplate(g, t),
|