@progress/kendo-vue-grid 8.4.0-develop.3 → 8.4.0-develop.4
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 +24 -0
- package/GridCsvExportButton.d.ts +6 -6
- package/RootGrid.d.ts +24 -0
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +51 -49
- package/cells/pincell/GridPinDropdownButton.js +1 -1
- package/cells/pincell/GridPinDropdownButton.mjs +20 -20
- package/columnMenu/ColumnMenu.d.ts +24 -0
- package/common.d.ts +12 -0
- package/contextMenu/GridContextMenu.js +1 -1
- package/contextMenu/GridContextMenu.mjs +45 -45
- 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 +19 -14
package/Grid.d.ts
CHANGED
|
@@ -144,6 +144,12 @@ declare const Grid: import('vue').DefineComponent<import('vue').ExtractPropTypes
|
|
|
144
144
|
flip: {
|
|
145
145
|
type: StringConstructor;
|
|
146
146
|
};
|
|
147
|
+
fillMode: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
};
|
|
150
|
+
variant: {
|
|
151
|
+
type: StringConstructor;
|
|
152
|
+
};
|
|
147
153
|
id: StringConstructor;
|
|
148
154
|
ariaLabel: StringConstructor;
|
|
149
155
|
title: StringConstructor;
|
|
@@ -179,6 +185,12 @@ declare const Grid: import('vue').DefineComponent<import('vue').ExtractPropTypes
|
|
|
179
185
|
flip: {
|
|
180
186
|
type: StringConstructor;
|
|
181
187
|
};
|
|
188
|
+
fillMode: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
};
|
|
191
|
+
variant: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
};
|
|
182
194
|
id: StringConstructor;
|
|
183
195
|
ariaLabel: StringConstructor;
|
|
184
196
|
title: StringConstructor;
|
|
@@ -568,6 +580,12 @@ declare const Grid: import('vue').DefineComponent<import('vue').ExtractPropTypes
|
|
|
568
580
|
flip: {
|
|
569
581
|
type: StringConstructor;
|
|
570
582
|
};
|
|
583
|
+
fillMode: {
|
|
584
|
+
type: StringConstructor;
|
|
585
|
+
};
|
|
586
|
+
variant: {
|
|
587
|
+
type: StringConstructor;
|
|
588
|
+
};
|
|
571
589
|
id: StringConstructor;
|
|
572
590
|
ariaLabel: StringConstructor;
|
|
573
591
|
title: StringConstructor;
|
|
@@ -603,6 +621,12 @@ declare const Grid: import('vue').DefineComponent<import('vue').ExtractPropTypes
|
|
|
603
621
|
flip: {
|
|
604
622
|
type: StringConstructor;
|
|
605
623
|
};
|
|
624
|
+
fillMode: {
|
|
625
|
+
type: StringConstructor;
|
|
626
|
+
};
|
|
627
|
+
variant: {
|
|
628
|
+
type: StringConstructor;
|
|
629
|
+
};
|
|
606
630
|
id: StringConstructor;
|
|
607
631
|
ariaLabel: StringConstructor;
|
|
608
632
|
title: StringConstructor;
|
package/GridCsvExportButton.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export interface GridCsvExportButtonProps extends ButtonProps {
|
|
|
20
20
|
* Shared props definition object matching ButtonProps for reuse in toolbar button components.
|
|
21
21
|
*/
|
|
22
22
|
export declare const buttonPropsDefinition: {
|
|
23
|
-
themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "
|
|
24
|
-
size: PropType<"small" | "medium" | "
|
|
23
|
+
themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
|
|
24
|
+
size: PropType<"small" | "medium" | "xs" | "large">;
|
|
25
25
|
rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
|
|
26
26
|
fillMode: PropType<"flat" | "link" | "solid" | "outline">;
|
|
27
27
|
disabled: {
|
|
@@ -47,8 +47,8 @@ export declare const buttonPropsDefinition: {
|
|
|
47
47
|
* Renders a button that triggers CSV export of the Grid data.
|
|
48
48
|
*/
|
|
49
49
|
declare const GridCsvExportButton: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
50
|
-
themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "
|
|
51
|
-
size: PropType<"small" | "medium" | "
|
|
50
|
+
themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
|
|
51
|
+
size: PropType<"small" | "medium" | "xs" | "large">;
|
|
52
52
|
rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
|
|
53
53
|
fillMode: PropType<"flat" | "link" | "solid" | "outline">;
|
|
54
54
|
disabled: {
|
|
@@ -69,8 +69,8 @@ declare const GridCsvExportButton: import('vue').DefineComponent<import('vue').E
|
|
|
69
69
|
tabIndex: PropType<number>;
|
|
70
70
|
type: PropType<string>;
|
|
71
71
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
72
|
-
themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "
|
|
73
|
-
size: PropType<"small" | "medium" | "
|
|
72
|
+
themeColor: PropType<"base" | "primary" | "secondary" | "tertiary" | "info" | "success" | "warning" | "error" | "inverse">;
|
|
73
|
+
size: PropType<"small" | "medium" | "xs" | "large">;
|
|
74
74
|
rounded: PropType<"small" | "medium" | "large" | "full" | "none">;
|
|
75
75
|
fillMode: PropType<"flat" | "link" | "solid" | "outline">;
|
|
76
76
|
disabled: {
|
package/RootGrid.d.ts
CHANGED
|
@@ -171,6 +171,12 @@ export declare const RootGrid: import('vue').DefineComponent<import('vue').Extra
|
|
|
171
171
|
flip: {
|
|
172
172
|
type: StringConstructor;
|
|
173
173
|
};
|
|
174
|
+
fillMode: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
};
|
|
177
|
+
variant: {
|
|
178
|
+
type: StringConstructor;
|
|
179
|
+
};
|
|
174
180
|
id: StringConstructor;
|
|
175
181
|
ariaLabel: StringConstructor;
|
|
176
182
|
title: StringConstructor;
|
|
@@ -206,6 +212,12 @@ export declare const RootGrid: import('vue').DefineComponent<import('vue').Extra
|
|
|
206
212
|
flip: {
|
|
207
213
|
type: StringConstructor;
|
|
208
214
|
};
|
|
215
|
+
fillMode: {
|
|
216
|
+
type: StringConstructor;
|
|
217
|
+
};
|
|
218
|
+
variant: {
|
|
219
|
+
type: StringConstructor;
|
|
220
|
+
};
|
|
209
221
|
id: StringConstructor;
|
|
210
222
|
ariaLabel: StringConstructor;
|
|
211
223
|
title: StringConstructor;
|
|
@@ -394,6 +406,12 @@ export declare const RootGrid: import('vue').DefineComponent<import('vue').Extra
|
|
|
394
406
|
flip: {
|
|
395
407
|
type: StringConstructor;
|
|
396
408
|
};
|
|
409
|
+
fillMode: {
|
|
410
|
+
type: StringConstructor;
|
|
411
|
+
};
|
|
412
|
+
variant: {
|
|
413
|
+
type: StringConstructor;
|
|
414
|
+
};
|
|
397
415
|
id: StringConstructor;
|
|
398
416
|
ariaLabel: StringConstructor;
|
|
399
417
|
title: StringConstructor;
|
|
@@ -429,6 +447,12 @@ export declare const RootGrid: import('vue').DefineComponent<import('vue').Extra
|
|
|
429
447
|
flip: {
|
|
430
448
|
type: StringConstructor;
|
|
431
449
|
};
|
|
450
|
+
fillMode: {
|
|
451
|
+
type: StringConstructor;
|
|
452
|
+
};
|
|
453
|
+
variant: {
|
|
454
|
+
type: StringConstructor;
|
|
455
|
+
};
|
|
432
456
|
id: StringConstructor;
|
|
433
457
|
ariaLabel: StringConstructor;
|
|
434
458
|
title: StringConstructor;
|
package/cells/GridGroupCell.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("@progress/kendo-vue-common"),f=require("@progress/kendo-vue-data-tools"),l=require("../messages/main.js"),v=require("@progress/kendo-vue-intl"),k=require("@progress/kendo-svg-icons"),V=e=>{var t,n;return(n=(t=e.cells)==null?void 0:t.group)==null?void 0:n[e.rowType||"data"]},w=o.defineComponent({name:"KendoGridGroupCell",inheritAttrs:!1,props:{id:String,field:String,dataItem:Object,format:String,type:String,colSpan:Number,className:String,columnIndex:Number,columnsCount:Number,rowType:String,level:Number,locked:Boolean,expanded:Boolean,editor:String,dataIndex:Number,isSelected:Boolean,isRtl:Boolean,ariaColumnIndex:Number,group:Object,render:[String,Function,Object],cells:Object},emits:{change:null,cellkeydown:null},inject:{gridContext:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:s.noop}},computed:{tdClass(){const{className:e,locked:t}=this.$props;return{"k-table-td":!0,"k-grid-content-sticky":t,[e]:e}},tdStyle(){const{locked:e}=this.$props,t=e?{position:"sticky",zIndex:2}:{};return{...this.$attrs.style,...t}},groupTdClass(){const{className:e,locked:t}=this.$props;return{"k-table-td":!0,"k-group-cell":!0,"k-grid-content-sticky":t,[e]:e}}},methods:{triggerStateChange(){var t;const e=this.gridContext;(t=e==null?void 0:e.dispatchGroupExpand)==null||t.call(e,{type:f.GROUP_EXPAND_ACTION.TOGGLE,group:this.$props.group})},triggerKeydown(e,t){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,field:this.$props.field,expanded:this.$props.expanded}),!e.defaultPrevented&&e.keyCode===s.Keys.enter&&(e.preventDefault(),this.$emit("change",{dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,event:e,level:this.$props.level,field:void 0,value:!t}),this.triggerStateChange())},clickHandler(e,t,n){e.preventDefault(),this.$emit("change",{dataItem:t,dataIndex:this.$props.dataIndex,event:e,level:this.$props.level,field:void 0,value:!n}),this.triggerStateChange()},triggerContextMenu(e){var t,n;(n=(t=this.gridContext)==null?void 0:t.onContextMenu)==null||n.call(t,e,this.$props.dataItem,this.$props.field)}},render(){let e=null,t,n,c=null;const{columnIndex:a,level:p,columnsCount:u,rowType:x,dataItem:i,field:g,expanded:r,render:S,locked:d}=this.$props,h=this.getKeyboardNavigationAttributes(this.$props.id),C=v.provideLocalizationService(this).toLanguageString(l.groupCaretAriaLabelCollapse,l.messages[l.groupCaretAriaLabelCollapse]),b=v.provideLocalizationService(this).toLanguageString(l.groupCaretAriaLabelExpand,l.messages[l.groupCaretAriaLabelExpand]);if(a===void 0||p===void 0||a<p||u===void 0||x!=="groupHeader"||i[g]===void 0)t={style:this.$attrs.style,key:"g"+a,class:this.groupTdClass},e=o.createVNode("td",t,null);else if(a<=p){t={style:this.tdStyle,key:"g-colspan",class:d?"k-table-td":this.tdClass,colspan:d?0:u-a,role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,"aria-selected":this.$props.isSelected,"aria-expanded":r,"data-grid-col-index":this.$props.columnIndex,tabindex:h.tabIndex,"data-keyboardnavlevel":h[f.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":h[f.KEYBOARD_NAV_DATA_ID]};const $=this.isRtl?"chevron-left":"chevron-right",N=this.isRtl?k.chevronLeftIcon:k.chevronRightIcon,A=r?"chevron-down":$,L=r?k.chevronDownIcon:N;c=o.createVNode("p",{class:"k-reset"},[o.createVNode("a",{onClick:m=>{this.clickHandler(m,i,r)},href:"#",tabindex:-1,title:r?C:b,"aria-label":r?C:b},[o.createVNode(s.Icon,{name:A,icon:L},null)]),i[g]?i[g].toString():""]);const y=o.createVNode("td",o.mergeProps(t,{onKeydown:m=>{this.triggerKeydown(m,r)}}),[c]);d&&(n={className:"k-table-td",role:"gridcell",colSpan:u-a,style:{borderLeftWidth:0,borderRightWidth:0}});const I=d?o.createVNode("td",n,null):null;e=I?[y,I]:y}return s.getTemplate.call(this,{h:o.h,template:S||V(this.$props),defaultRendering:e,additionalProps:{...this.$props,tdProps:t,td2Props:n},additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler,contextmenu:this.triggerContextMenu},defaultSlots:c})}});exports.GridGroupCell=w;
|
package/cells/GridGroupCell.mjs
CHANGED
|
@@ -5,16 +5,16 @@
|
|
|
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 { noop as
|
|
10
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
8
|
+
import { defineComponent as N, createVNode as l, mergeProps as A, h as L } from "vue";
|
|
9
|
+
import { noop as w, Icon as K, getTemplate as R, Keys as T } from "@progress/kendo-vue-common";
|
|
10
|
+
import { KEYBOARD_NAV_DATA_ID as D, KEYBOARD_NAV_DATA_LEVEL as E, GROUP_EXPAND_ACTION as O } from "@progress/kendo-vue-data-tools";
|
|
11
11
|
import { groupCaretAriaLabelCollapse as x, messages as y, groupCaretAriaLabelExpand as C } from "../messages/main.mjs";
|
|
12
|
-
import { provideLocalizationService as
|
|
13
|
-
import {
|
|
14
|
-
const
|
|
15
|
-
var t,
|
|
16
|
-
return (
|
|
17
|
-
},
|
|
12
|
+
import { provideLocalizationService as I } from "@progress/kendo-vue-intl";
|
|
13
|
+
import { chevronLeftIcon as G, chevronRightIcon as _, chevronDownIcon as P } from "@progress/kendo-svg-icons";
|
|
14
|
+
const B = (e) => {
|
|
15
|
+
var t, n;
|
|
16
|
+
return (n = (t = e.cells) == null ? void 0 : t.group) == null ? void 0 : n[e.rowType || "data"];
|
|
17
|
+
}, U = /* @__PURE__ */ N({
|
|
18
18
|
name: "KendoGridGroupCell",
|
|
19
19
|
inheritAttrs: !1,
|
|
20
20
|
props: {
|
|
@@ -55,7 +55,7 @@ const _ = (e) => {
|
|
|
55
55
|
default: null
|
|
56
56
|
},
|
|
57
57
|
getKeyboardNavigationAttributes: {
|
|
58
|
-
default:
|
|
58
|
+
default: w
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
computed: {
|
|
@@ -100,7 +100,7 @@ const _ = (e) => {
|
|
|
100
100
|
var t;
|
|
101
101
|
const e = this.gridContext;
|
|
102
102
|
(t = e == null ? void 0 : e.dispatchGroupExpand) == null || t.call(e, {
|
|
103
|
-
type:
|
|
103
|
+
type: O.TOGGLE,
|
|
104
104
|
group: this.$props.group
|
|
105
105
|
});
|
|
106
106
|
},
|
|
@@ -111,7 +111,7 @@ const _ = (e) => {
|
|
|
111
111
|
dataIndex: this.$props.dataIndex,
|
|
112
112
|
field: this.$props.field,
|
|
113
113
|
expanded: this.$props.expanded
|
|
114
|
-
}), !e.defaultPrevented && e.keyCode ===
|
|
114
|
+
}), !e.defaultPrevented && e.keyCode === T.enter && (e.preventDefault(), this.$emit("change", {
|
|
115
115
|
dataItem: this.$props.dataItem,
|
|
116
116
|
dataIndex: this.$props.dataIndex,
|
|
117
117
|
event: e,
|
|
@@ -120,93 +120,95 @@ const _ = (e) => {
|
|
|
120
120
|
value: !t
|
|
121
121
|
}), this.triggerStateChange());
|
|
122
122
|
},
|
|
123
|
-
clickHandler(e, t,
|
|
123
|
+
clickHandler(e, t, n) {
|
|
124
124
|
e.preventDefault(), this.$emit("change", {
|
|
125
125
|
dataItem: t,
|
|
126
126
|
dataIndex: this.$props.dataIndex,
|
|
127
127
|
event: e,
|
|
128
128
|
level: this.$props.level,
|
|
129
129
|
field: void 0,
|
|
130
|
-
value: !
|
|
130
|
+
value: !n
|
|
131
131
|
}), this.triggerStateChange();
|
|
132
132
|
},
|
|
133
133
|
triggerContextMenu(e) {
|
|
134
|
-
var t,
|
|
135
|
-
(
|
|
134
|
+
var t, n;
|
|
135
|
+
(n = (t = this.gridContext) == null ? void 0 : t.onContextMenu) == null || n.call(t, e, this.$props.dataItem, this.$props.field);
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
render() {
|
|
139
|
-
let e = null, t,
|
|
139
|
+
let e = null, t, n, d = null;
|
|
140
140
|
const {
|
|
141
141
|
columnIndex: r,
|
|
142
142
|
level: s,
|
|
143
|
-
columnsCount:
|
|
144
|
-
rowType:
|
|
143
|
+
columnsCount: c,
|
|
144
|
+
rowType: b,
|
|
145
145
|
dataItem: i,
|
|
146
|
-
field:
|
|
147
|
-
expanded:
|
|
146
|
+
field: p,
|
|
147
|
+
expanded: o,
|
|
148
148
|
render: $,
|
|
149
|
-
locked:
|
|
150
|
-
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h =
|
|
151
|
-
if (r === void 0 || s === void 0 || r < s ||
|
|
149
|
+
locked: a
|
|
150
|
+
} = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h = I(this).toLanguageString(x, y[x]), m = I(this).toLanguageString(C, y[C]);
|
|
151
|
+
if (r === void 0 || s === void 0 || r < s || c === void 0 || b !== "groupHeader" || i[p] === void 0)
|
|
152
152
|
t = {
|
|
153
153
|
style: this.$attrs.style,
|
|
154
154
|
key: "g" + r,
|
|
155
155
|
class: this.groupTdClass
|
|
156
|
-
}, e =
|
|
156
|
+
}, e = l("td", t, null);
|
|
157
157
|
else if (r <= s) {
|
|
158
158
|
t = {
|
|
159
159
|
style: this.tdStyle,
|
|
160
160
|
key: "g-colspan",
|
|
161
|
-
class:
|
|
162
|
-
colspan:
|
|
161
|
+
class: a ? "k-table-td" : this.tdClass,
|
|
162
|
+
colspan: a ? 0 : c - r,
|
|
163
163
|
role: "gridcell",
|
|
164
164
|
"aria-colindex": this.$props.ariaColumnIndex,
|
|
165
165
|
"aria-selected": this.$props.isSelected,
|
|
166
|
-
"aria-expanded":
|
|
166
|
+
"aria-expanded": o,
|
|
167
167
|
"data-grid-col-index": this.$props.columnIndex,
|
|
168
168
|
tabindex: u.tabIndex,
|
|
169
|
-
"data-keyboardnavlevel": u[
|
|
170
|
-
"data-keyboardnavid": u[
|
|
171
|
-
}
|
|
169
|
+
"data-keyboardnavlevel": u[E],
|
|
170
|
+
"data-keyboardnavid": u[D]
|
|
171
|
+
};
|
|
172
|
+
const v = this.isRtl ? "chevron-left" : "chevron-right", S = this.isRtl ? G : _;
|
|
173
|
+
d = l("p", {
|
|
172
174
|
class: "k-reset"
|
|
173
|
-
}, [
|
|
175
|
+
}, [l("a", {
|
|
174
176
|
onClick: (g) => {
|
|
175
|
-
this.clickHandler(g, i,
|
|
177
|
+
this.clickHandler(g, i, o);
|
|
176
178
|
},
|
|
177
179
|
href: "#",
|
|
178
180
|
tabindex: -1,
|
|
179
|
-
title:
|
|
180
|
-
"aria-label":
|
|
181
|
-
}, [
|
|
182
|
-
name:
|
|
183
|
-
icon:
|
|
184
|
-
}, null)]), i[
|
|
185
|
-
const f =
|
|
181
|
+
title: o ? h : m,
|
|
182
|
+
"aria-label": o ? h : m
|
|
183
|
+
}, [l(K, {
|
|
184
|
+
name: o ? "chevron-down" : v,
|
|
185
|
+
icon: o ? P : S
|
|
186
|
+
}, null)]), i[p] ? i[p].toString() : ""]);
|
|
187
|
+
const f = l("td", A(t, {
|
|
186
188
|
onKeydown: (g) => {
|
|
187
|
-
this.triggerKeydown(g,
|
|
189
|
+
this.triggerKeydown(g, o);
|
|
188
190
|
}
|
|
189
191
|
}), [d]);
|
|
190
|
-
|
|
192
|
+
a && (n = {
|
|
191
193
|
className: "k-table-td",
|
|
192
194
|
role: "gridcell",
|
|
193
|
-
colSpan:
|
|
195
|
+
colSpan: c - r,
|
|
194
196
|
style: {
|
|
195
197
|
borderLeftWidth: 0,
|
|
196
198
|
borderRightWidth: 0
|
|
197
199
|
}
|
|
198
200
|
});
|
|
199
|
-
const k =
|
|
201
|
+
const k = a ? l("td", n, null) : null;
|
|
200
202
|
e = k ? [f, k] : f;
|
|
201
203
|
}
|
|
202
|
-
return
|
|
203
|
-
h:
|
|
204
|
-
template: $ ||
|
|
204
|
+
return R.call(this, {
|
|
205
|
+
h: L,
|
|
206
|
+
template: $ || B(this.$props),
|
|
205
207
|
defaultRendering: e,
|
|
206
208
|
additionalProps: {
|
|
207
209
|
...this.$props,
|
|
208
210
|
tdProps: t,
|
|
209
|
-
td2Props:
|
|
211
|
+
td2Props: n
|
|
210
212
|
},
|
|
211
213
|
additionalListeners: {
|
|
212
214
|
keydown: this.triggerKeydown,
|
|
@@ -218,5 +220,5 @@ const _ = (e) => {
|
|
|
218
220
|
}
|
|
219
221
|
});
|
|
220
222
|
export {
|
|
221
|
-
|
|
223
|
+
U as GridGroupCell
|
|
222
224
|
};
|
|
@@ -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 o=require("vue"),m=require("@progress/kendo-vue-common"),w=require("@progress/kendo-vue-popup"),u=require("@progress/kendo-svg-icons"),t=require("../../messages/main.js"),B=require("@progress/kendo-vue-layout"),V=o.defineComponent({name:"GridPinDropdownButton",props:{dataItem:Object},inject:{kendoLocalizationService:{default:null},gridContext:{default:null}},setup(
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),m=require("@progress/kendo-vue-common"),w=require("@progress/kendo-vue-popup"),u=require("@progress/kendo-svg-icons"),t=require("../../messages/main.js"),B=require("@progress/kendo-vue-layout"),V=o.defineComponent({name:"GridPinDropdownButton",props:{dataItem:Object},inject:{kendoLocalizationService:{default:null},gridContext:{default:null}},setup(p){const e=o.inject("kendoLocalizationService",{}),s=o.inject("gridContext",{}),i=o.ref(!1),T="#",P=m.guid(),a=o.computed(()=>s!=null&&s.getRowPinPosition?s.getRowPinPosition(p.dataItem):"none"),r=o.computed(()=>a.value!=="none"),c=o.computed(()=>{var n;return((n=e==null?void 0:e.toLanguageString)==null?void 0:n.call(e,t.gridPinToTop,t.messages[t.gridPinToTop]))||t.messages[t.gridPinToTop]}),f=o.computed(()=>{var n;return((n=e==null?void 0:e.toLanguageString)==null?void 0:n.call(e,t.gridPinToBottom,t.messages[t.gridPinToBottom]))||t.messages[t.gridPinToBottom]}),l=o.computed(()=>{var n;return((n=e==null?void 0:e.toLanguageString)==null?void 0:n.call(e,t.gridUnpin,t.messages[t.gridUnpin]))||t.messages[t.gridUnpin]}),I=o.computed(()=>{const n=[];return r.value&&n.push({text:l.value,svgIcon:u.unpinIcon,data:{action:"unpin"}}),a.value!=="top"&&n.push({text:c.value,svgIcon:u.pinTopIcon,data:{action:"pinTop"}}),a.value!=="bottom"&&n.push({text:f.value,svgIcon:u.pinBottomIcon,data:{action:"pinBottom"}}),n});return{anchor:P,showPopup:i,hrefValue:T,isPinned:r,pinToTopText:c,unpinText:l,menuItems:I,handleToggle:n=>{n.preventDefault(),i.value=!i.value},handleClose:n=>{n.isAnchorClicked||(i.value=!1)},handleMenuSelect:n=>{var d,h,g;const v=(h=(d=n.item)==null?void 0:d.data)==null?void 0:h.action;(g=s==null?void 0:s.onRowPin)==null||g.call(s,v,p.dataItem),i.value=!1}}},render(){return[o.createVNode("a",{class:"k-pin-cell",ref:this.anchor,href:this.hrefValue,tabindex:-1,onClick:this.handleToggle,"aria-label":this.isPinned?this.unpinText:this.pinToTopText},[o.createVNode(m.Icon,{name:this.isPinned?"unpin":"pin",icon:this.isPinned?u.unpinIcon:u.pinIcon},null)]),o.createVNode(w.Popup,{anchor:this.anchor,show:this.showPopup,anchorAlign:{vertical:"bottom",horizontal:"right"},popupClass:"k-menu-popup",onMousedownoutside:this.handleClose},{default:()=>[o.createVNode(B.Menu,{vertical:!0,items:this.menuItems,onSelect:this.handleMenuSelect},null)]})]}});exports.GridPinDropdownButton=V;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as M, createVNode as u, inject as P, ref as
|
|
9
|
-
import { Icon as
|
|
10
|
-
import { Popup as
|
|
11
|
-
import {
|
|
12
|
-
import { messages as
|
|
13
|
-
import { Menu as
|
|
8
|
+
import { defineComponent as M, createVNode as u, inject as P, ref as C, computed as e } from "vue";
|
|
9
|
+
import { Icon as j, guid as D } from "@progress/kendo-vue-common";
|
|
10
|
+
import { Popup as R } from "@progress/kendo-vue-popup";
|
|
11
|
+
import { unpinIcon as I, pinIcon as V, pinTopIcon as A, pinBottomIcon as G } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { messages as s, gridPinToTop as p, gridPinToBottom as l, gridUnpin as r } from "../../messages/main.mjs";
|
|
13
|
+
import { Menu as N } from "@progress/kendo-vue-layout";
|
|
14
14
|
const Q = /* @__PURE__ */ M({
|
|
15
15
|
name: "GridPinDropdownButton",
|
|
16
16
|
props: {
|
|
@@ -25,15 +25,15 @@ const Q = /* @__PURE__ */ M({
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
setup(h) {
|
|
28
|
-
const t = P("kendoLocalizationService", {}), o = P("gridContext", {}),
|
|
28
|
+
const t = P("kendoLocalizationService", {}), o = P("gridContext", {}), i = C(!1), w = "#", v = D(), a = e(() => o != null && o.getRowPinPosition ? o.getRowPinPosition(h.dataItem) : "none"), c = e(() => a.value !== "none"), m = e(() => {
|
|
29
29
|
var n;
|
|
30
|
-
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t,
|
|
30
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, p, s[p])) || s[p];
|
|
31
31
|
}), x = e(() => {
|
|
32
32
|
var n;
|
|
33
|
-
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t,
|
|
33
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, l, s[l])) || s[l];
|
|
34
34
|
}), d = e(() => {
|
|
35
35
|
var n;
|
|
36
|
-
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, r,
|
|
36
|
+
return ((n = t == null ? void 0 : t.toLanguageString) == null ? void 0 : n.call(t, r, s[r])) || s[r];
|
|
37
37
|
}), B = e(() => {
|
|
38
38
|
const n = [];
|
|
39
39
|
return c.value && n.push({
|
|
@@ -44,13 +44,13 @@ const Q = /* @__PURE__ */ M({
|
|
|
44
44
|
}
|
|
45
45
|
}), a.value !== "top" && n.push({
|
|
46
46
|
text: m.value,
|
|
47
|
-
svgIcon:
|
|
47
|
+
svgIcon: A,
|
|
48
48
|
data: {
|
|
49
49
|
action: "pinTop"
|
|
50
50
|
}
|
|
51
51
|
}), a.value !== "bottom" && n.push({
|
|
52
52
|
text: x.value,
|
|
53
|
-
svgIcon:
|
|
53
|
+
svgIcon: G,
|
|
54
54
|
data: {
|
|
55
55
|
action: "pinBottom"
|
|
56
56
|
}
|
|
@@ -58,22 +58,22 @@ const Q = /* @__PURE__ */ M({
|
|
|
58
58
|
});
|
|
59
59
|
return {
|
|
60
60
|
anchor: v,
|
|
61
|
-
showPopup:
|
|
61
|
+
showPopup: i,
|
|
62
62
|
hrefValue: w,
|
|
63
63
|
isPinned: c,
|
|
64
64
|
pinToTopText: m,
|
|
65
65
|
unpinText: d,
|
|
66
66
|
menuItems: B,
|
|
67
67
|
handleToggle: (n) => {
|
|
68
|
-
n.preventDefault(),
|
|
68
|
+
n.preventDefault(), i.value = !i.value;
|
|
69
69
|
},
|
|
70
70
|
handleClose: (n) => {
|
|
71
|
-
n.isAnchorClicked || (
|
|
71
|
+
n.isAnchorClicked || (i.value = !1);
|
|
72
72
|
},
|
|
73
73
|
handleMenuSelect: (n) => {
|
|
74
74
|
var g, f, T;
|
|
75
75
|
const b = (f = (g = n.item) == null ? void 0 : g.data) == null ? void 0 : f.action;
|
|
76
|
-
(T = o == null ? void 0 : o.onRowPin) == null || T.call(o, b, h.dataItem),
|
|
76
|
+
(T = o == null ? void 0 : o.onRowPin) == null || T.call(o, b, h.dataItem), i.value = !1;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
},
|
|
@@ -85,10 +85,10 @@ const Q = /* @__PURE__ */ M({
|
|
|
85
85
|
tabindex: -1,
|
|
86
86
|
onClick: this.handleToggle,
|
|
87
87
|
"aria-label": this.isPinned ? this.unpinText : this.pinToTopText
|
|
88
|
-
}, [u(
|
|
88
|
+
}, [u(j, {
|
|
89
89
|
name: this.isPinned ? "unpin" : "pin",
|
|
90
|
-
icon: this.isPinned ? I :
|
|
91
|
-
}, null)]), u(
|
|
90
|
+
icon: this.isPinned ? I : V
|
|
91
|
+
}, null)]), u(R, {
|
|
92
92
|
anchor: this.anchor,
|
|
93
93
|
show: this.showPopup,
|
|
94
94
|
anchorAlign: {
|
|
@@ -98,7 +98,7 @@ const Q = /* @__PURE__ */ M({
|
|
|
98
98
|
popupClass: "k-menu-popup",
|
|
99
99
|
onMousedownoutside: this.handleClose
|
|
100
100
|
}, {
|
|
101
|
-
default: () => [u(
|
|
101
|
+
default: () => [u(N, {
|
|
102
102
|
vertical: !0,
|
|
103
103
|
items: this.menuItems,
|
|
104
104
|
onSelect: this.handleMenuSelect
|
|
@@ -37,6 +37,12 @@ declare const ColumnMenu: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
37
37
|
flip: {
|
|
38
38
|
type: StringConstructor;
|
|
39
39
|
};
|
|
40
|
+
fillMode: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
43
|
+
variant: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
};
|
|
40
46
|
id: StringConstructor;
|
|
41
47
|
ariaLabel: StringConstructor;
|
|
42
48
|
title: StringConstructor;
|
|
@@ -72,6 +78,12 @@ declare const ColumnMenu: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
72
78
|
flip: {
|
|
73
79
|
type: StringConstructor;
|
|
74
80
|
};
|
|
81
|
+
fillMode: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
};
|
|
84
|
+
variant: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
};
|
|
75
87
|
id: StringConstructor;
|
|
76
88
|
ariaLabel: StringConstructor;
|
|
77
89
|
title: StringConstructor;
|
|
@@ -132,6 +144,12 @@ declare const ColumnMenu: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
132
144
|
flip: {
|
|
133
145
|
type: StringConstructor;
|
|
134
146
|
};
|
|
147
|
+
fillMode: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
};
|
|
150
|
+
variant: {
|
|
151
|
+
type: StringConstructor;
|
|
152
|
+
};
|
|
135
153
|
id: StringConstructor;
|
|
136
154
|
ariaLabel: StringConstructor;
|
|
137
155
|
title: StringConstructor;
|
|
@@ -167,6 +185,12 @@ declare const ColumnMenu: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
167
185
|
flip: {
|
|
168
186
|
type: StringConstructor;
|
|
169
187
|
};
|
|
188
|
+
fillMode: {
|
|
189
|
+
type: StringConstructor;
|
|
190
|
+
};
|
|
191
|
+
variant: {
|
|
192
|
+
type: StringConstructor;
|
|
193
|
+
};
|
|
170
194
|
id: StringConstructor;
|
|
171
195
|
ariaLabel: StringConstructor;
|
|
172
196
|
title: StringConstructor;
|
package/common.d.ts
CHANGED
|
@@ -122,6 +122,12 @@ declare const gridProps: {
|
|
|
122
122
|
flip: {
|
|
123
123
|
type: StringConstructor;
|
|
124
124
|
};
|
|
125
|
+
fillMode: {
|
|
126
|
+
type: StringConstructor;
|
|
127
|
+
};
|
|
128
|
+
variant: {
|
|
129
|
+
type: StringConstructor;
|
|
130
|
+
};
|
|
125
131
|
id: StringConstructor;
|
|
126
132
|
ariaLabel: StringConstructor;
|
|
127
133
|
title: StringConstructor;
|
|
@@ -157,6 +163,12 @@ declare const gridProps: {
|
|
|
157
163
|
flip: {
|
|
158
164
|
type: StringConstructor;
|
|
159
165
|
};
|
|
166
|
+
fillMode: {
|
|
167
|
+
type: StringConstructor;
|
|
168
|
+
};
|
|
169
|
+
variant: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
};
|
|
160
172
|
id: StringConstructor;
|
|
161
173
|
ariaLabel: StringConstructor;
|
|
162
174
|
title: StringConstructor;
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),s=require("@progress/kendo-vue-intl"),d=require("@progress/kendo-vue-layout"),o=require("@progress/kendo-svg-icons"),t=require("./enums.js"),r={[t.GridContextMenuItemNames.create]:{name:"create",text:"Add",icon:"plus",svgIcon:o.plusIcon,data:{action:"AddCommand"}},[t.GridContextMenuItemNames.edit]:{name:"edit",text:"Edit",icon:"pencil",svgIcon:o.pencilIcon,data:{action:"EditCommand"}},[t.GridContextMenuItemNames.delete]:{name:"delete",text:"Delete",icon:"trash",svgIcon:o.trashIcon,data:{action:"DeleteCommand"}},[t.GridContextMenuItemNames.select]:{name:"select",text:"Select",icon:"table-body",svgIcon:o.tableBodyIcon,items:[{name:"selectRow",text:"Row",icon:"table-row-groups",svgIcon:o.tableRowGroupsIcon,data:{action:"SelectRowCommand"}},{name:"selectAllRows",text:"All rows",icon:"grid",svgIcon:o.gridIcon,data:{action:"SelectAllRowsCommand"}},{name:"clearSelection",text:"Clear selection",icon:"table-unmerge",svgIcon:o.tableUnmergeIcon,data:{action:"ClearSelectionCommand"}}]},[t.GridContextMenuItemNames.pinRow]:{name:"pinRow",text:"Pin row",icon:"pin",svgIcon:o.pinIcon,items:[{name:"pinTop",text:"Pin to Top",icon:"pin-top",svgIcon:o.pinTopIcon,data:{action:"PinTopCommand"}},{name:"pinBottom",text:"Pin to Bottom",icon:"pin-bottom",svgIcon:o.pinBottomIcon,data:{action:"PinBottomCommand"}},{name:"unpin",text:"Unpin",icon:"unpin",svgIcon:o.unpinIcon,data:{action:"UnpinCommand"}}]},[t.GridContextMenuItemNames.pinTop]:{name:"pinTop",text:"Pin to Top",icon:"pin-top",svgIcon:o.pinTopIcon,data:{action:"PinTopCommand"}},[t.GridContextMenuItemNames.pinBottom]:{name:"pinBottom",text:"Pin to Bottom",icon:"pin-bottom",svgIcon:o.pinBottomIcon,data:{action:"PinBottomCommand"}},[t.GridContextMenuItemNames.unpin]:{name:"unpin",text:"Unpin",icon:"unpin",svgIcon:o.unpinIcon,data:{action:"UnpinCommand"}},[t.GridContextMenuItemNames.copySelection]:{name:"copySelection",text:"Copy selection",icon:"page-header-section",svgIcon:o.pageHeaderSectionIcon,data:{action:"CopySelectionCommand"},options:"withHeaders"},[t.GridContextMenuItemNames.copySelectionNoHeaders]:{name:"copySelectionNoHeaders",text:"Copy selection (No Headers)",icon:"file-txt",svgIcon:o.fileTxtIcon,data:{action:"CopySelectionCommand"}},[t.GridContextMenuItemNames.paste]:{name:"paste",text:"Paste (use CTRL/⌘ + V)",icon:"clipboard",svgIcon:o.clipboardIcon,data:{action:"PasteCommand"}},[t.GridContextMenuItemNames.reorderRow]:{name:"reorderRow",text:"Reorder row",icon:"chevron-down",svgIcon:o.chevronDownIcon,items:[{name:"reorderRowUp",text:"Up",icon:"chevron-up",svgIcon:o.chevronUpIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowDown",text:"Down",icon:"chevron-down",svgIcon:o.chevronDownIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowTop",text:"Top",icon:"chevron-double-up",svgIcon:o.chevronDoubleUpIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowBottom",text:"Bottom",icon:"chevron-double-down",svgIcon:o.chevronDoubleDownIcon,data:{action:"ReorderRowCommand"}}]},[t.GridContextMenuItemNames.exportPDF]:{name:"exportPDF",text:"Export to PDF",icon:"file-pdf",svgIcon:o.filePdfIcon,data:{action:"ExportPDFCommand"}},[t.GridContextMenuItemNames.exportExcel]:{name:"exportExcel",text:"Export to Excel",icon:"file-excel",svgIcon:o.fileExcelIcon,items:[{name:"exportToExcelAll",text:"All",data:{action:"ExportExcelCommand"}},{name:"exportToExcelSelection",text:"Selection",data:{action:"ExportExcelCommand"},options:"selection,withHeaders"},{name:"exportToExcelSelectionNoHeaders",text:"Selection (No Headers)",data:{action:"ExportExcelCommand"},options:"selection"}]},[t.GridContextMenuItemNames.separator]:{name:"separator",separator:!0},[t.GridContextMenuItemNames.sortAsc]:{name:"sortAsc",text:"Sort Ascending",icon:"sort-asc-small",svgIcon:o.sortAscSmallIcon,data:{action:"SortCommand"}},[t.GridContextMenuItemNames.sortDesc]:{name:"sortDesc",text:"Sort Descending",icon:"sort-desc-small",svgIcon:o.sortDescSmallIcon,data:{action:"SortCommand"}}},l=n=>{let e=[];return n.sortable&&(e=e.concat([t.GridContextMenuItemNames.sortAsc,t.GridContextMenuItemNames.sortDesc])),n.pdf&&(e.length&&(e=e.concat([t.GridContextMenuItemNames.separator])),e=e.concat([t.GridContextMenuItemNames.exportPDF])),e},p=n=>{let e=[];return n.clipboard&&(e=e.concat([t.GridContextMenuItemNames.copySelection,t.GridContextMenuItemNames.copySelectionNoHeaders,t.GridContextMenuItemNames.paste])),n.editable&&(e.length&&(e=e.concat([t.GridContextMenuItemNames.separator])),e=e.concat([t.GridContextMenuItemNames.create,t.GridContextMenuItemNames.edit,t.GridContextMenuItemNames.delete])),n.selectable&&(e.length&&(e=e.concat([t.GridContextMenuItemNames.separator])),e=e.concat([t.GridContextMenuItemNames.select])),n.rowReorderable&&(e.length&&(e=e.concat([t.GridContextMenuItemNames.separator])),e=e.concat([t.GridContextMenuItemNames.reorderRow])),n.pdf&&(e.length&&(e=e.concat([t.GridContextMenuItemNames.separator])),e=e.concat([t.GridContextMenuItemNames.exportPDF])),n.pinnable&&(e.length&&(e=e.concat([t.GridContextMenuItemNames.separator])),e=e.concat([t.GridContextMenuItemNames.pinRow])),e},u=i.defineComponent({name:"GridContextMenu",props:{show:{type:Boolean,default:!1},offset:{type:Object,default:()=>({left:0,top:0})},dataItem:{type:Object,default:void 0},field:{type:String,default:void 0},items:{type:Array,default:void 0}},inject:{kendoLocalizationService:{default:null}},emits:["close","select"],methods:{localizeItem(n,e){const a={...n};return a.text&&a.name&&(a.text=e.toLanguageString(`contextMenu.${a.name}`,a.text||"")),a.items&&Array.isArray(a.items)&&(a.items=a.items.map(c=>this.localizeItem(c,e))),a},menuItems(){if(this.$props.items)return this.$props.items.map(n=>typeof n=="string"?{...r[n]}:{...n})},handleSelect(n){this.$emit("select",{event:n,dataItem:this.$props.dataItem,field:this.$props.field})},handleClose(){this.$emit("close")}},render(){const n=s.provideLocalizationService(this),e=this.menuItems(),a=e==null?void 0:e.map(m=>this.localizeItem(m,n)),c=!!(this.$props.show&&(a!=null&&a.length));return i.createVNode(d.ContextMenu,{show:c,offset:this.$props.offset,items:a,onClose:this.handleClose,onSelect:this.handleSelect},null)}});exports.GridContextMenu=u;exports.contextMenuItemsMap=r;exports.getDefaultBodyContextMenuItems=p;exports.getDefaultHeadContextMenuItems=l;
|