@progress/kendo-vue-grid 8.1.0-develop.5 → 8.1.0-develop.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.
Files changed (77) hide show
  1. package/Grid.d.ts +30 -17
  2. package/Grid.js +1 -1
  3. package/Grid.mjs +567 -449
  4. package/GridState.d.ts +15 -1
  5. package/GridState.js +1 -1
  6. package/GridState.mjs +84 -71
  7. package/RootGrid.d.ts +10 -0
  8. package/cells/GridCell.d.ts +2 -0
  9. package/cells/GridCell.js +1 -1
  10. package/cells/GridCell.mjs +35 -30
  11. package/cells/GridDetailCell.js +1 -1
  12. package/cells/GridDetailCell.mjs +20 -20
  13. package/cells/GridFilterCell.js +1 -1
  14. package/cells/GridFilterCell.mjs +42 -37
  15. package/cells/GridGroupCell.d.ts +2 -0
  16. package/cells/GridGroupCell.js +1 -1
  17. package/cells/GridGroupCell.mjs +69 -55
  18. package/cells/GridHierarchyCell.d.ts +2 -0
  19. package/cells/GridHierarchyCell.js +1 -1
  20. package/cells/GridHierarchyCell.mjs +51 -41
  21. package/cells/GridSelectionCell.d.ts +2 -0
  22. package/cells/GridSelectionCell.js +1 -1
  23. package/cells/GridSelectionCell.mjs +35 -24
  24. package/cells/pincell/GridPinCell.d.ts +72 -0
  25. package/cells/pincell/GridPinCell.js +8 -0
  26. package/cells/pincell/GridPinCell.mjs +111 -0
  27. package/cells/pincell/GridPinDropdownButton.d.ts +27 -0
  28. package/cells/pincell/GridPinDropdownButton.js +8 -0
  29. package/cells/pincell/GridPinDropdownButton.mjs +111 -0
  30. package/common.d.ts +5 -0
  31. package/common.js +1 -1
  32. package/common.mjs +7 -2
  33. package/components/PinnedRowsTable.d.ts +63 -0
  34. package/components/PinnedRowsTable.js +8 -0
  35. package/components/PinnedRowsTable.mjs +141 -0
  36. package/components/StickyGroupTable.d.ts +0 -1
  37. package/components/StickyGroupTable.js +1 -1
  38. package/components/StickyGroupTable.mjs +24 -30
  39. package/constants/main.d.ts +15 -0
  40. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  41. package/drag/ColumnResize.d.ts +2 -0
  42. package/drag/ColumnResize.js +1 -1
  43. package/drag/ColumnResize.mjs +139 -123
  44. package/footer/FooterCell.js +1 -1
  45. package/footer/FooterCell.mjs +22 -20
  46. package/getRowContents.js +1 -1
  47. package/getRowContents.mjs +50 -48
  48. package/header/FilterRow.d.ts +4 -0
  49. package/header/FilterRow.js +1 -1
  50. package/header/FilterRow.mjs +52 -50
  51. package/header/HeaderRow.d.ts +4 -0
  52. package/header/HeaderRow.js +1 -1
  53. package/header/HeaderRow.mjs +114 -105
  54. package/index.js +1 -1
  55. package/index.mjs +15 -14
  56. package/interfaces/ColumnType.d.ts +1 -1
  57. package/interfaces/GridCellProps.d.ts +5 -0
  58. package/interfaces/GridCellsSettings.d.ts +23 -0
  59. package/interfaces/GridColumnProps.d.ts +2 -2
  60. package/interfaces/GridProps.d.ts +88 -31
  61. package/interfaces/GridRowProps.d.ts +13 -4
  62. package/interfaces/GridRowsSettings.d.ts +48 -0
  63. package/interfaces/events.d.ts +19 -2
  64. package/messages/main.d.ts +30 -0
  65. package/messages/main.js +2 -2
  66. package/messages/main.mjs +108 -96
  67. package/package-metadata.js +1 -1
  68. package/package-metadata.mjs +2 -2
  69. package/package.json +13 -12
  70. package/rows/GridRow.d.ts +4 -10
  71. package/rows/GridRow.js +1 -1
  72. package/rows/GridRow.mjs +24 -23
  73. package/utils/main.d.ts +5 -0
  74. package/utils/main.js +1 -1
  75. package/utils/main.mjs +199 -167
  76. package/utils/virtualColumns.js +1 -1
  77. package/utils/virtualColumns.mjs +121 -105
@@ -5,17 +5,17 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as v, createVNode as i, createTextVNode as b, h as $, inject as s } from "vue";
9
- import { Button as S } from "@progress/kendo-vue-buttons";
10
- import { filterClearButton as p, messages as c, filterChooseOperator as h } from "../messages/main.mjs";
11
- import { DropDownList as g } from "@progress/kendo-vue-dropdowns";
8
+ import { defineComponent as v, createVNode as i, createTextVNode as b, h as S, inject as c } from "vue";
9
+ import { Button as $ } from "@progress/kendo-vue-buttons";
10
+ import { filterClearButton as h, messages as u, filterChooseOperator as g } from "../messages/main.mjs";
11
+ import { DropDownList as d } from "@progress/kendo-vue-dropdowns";
12
12
  import { TextBox as L, NumericTextBox as k } from "@progress/kendo-vue-inputs";
13
13
  import { DatePicker as z } from "@progress/kendo-vue-dateinputs";
14
- import { filterClearIcon as x, filterIcon as I } from "@progress/kendo-svg-icons";
15
- import { provideLocalizationService as w } from "@progress/kendo-vue-intl";
16
- import { cellBoolDropdownChange as y, cellOperatorChange as D, cellInputChange as F } from "../filterCommon.mjs";
17
- import { getListeners as T, templateRendering as B, getTemplate as N } from "@progress/kendo-vue-common";
18
- const H = /* @__PURE__ */ v({
14
+ import { filterClearIcon as x, filterIcon as w } from "@progress/kendo-svg-icons";
15
+ import { provideLocalizationService as D } from "@progress/kendo-vue-intl";
16
+ import { cellBoolDropdownChange as I, cellOperatorChange as y, cellInputChange as F } from "../filterCommon.mjs";
17
+ import { getTemplate as T } from "@progress/kendo-vue-common";
18
+ const K = /* @__PURE__ */ v({
19
19
  name: "KendoGridFilterCell",
20
20
  inheritAttrs: !1,
21
21
  props: {
@@ -48,11 +48,11 @@ const H = /* @__PURE__ */ v({
48
48
  this.triggerChange(o);
49
49
  },
50
50
  operatorChange(e, t) {
51
- const o = D(e.value.operator, t, this.$props.value);
51
+ const o = y(e.value.operator, t, this.$props.value);
52
52
  this.triggerChange(o);
53
53
  },
54
54
  boolDropdownChange(e, t) {
55
- const o = y(e.value.operator, t);
55
+ const o = I(e.value.operator, t);
56
56
  this.triggerChange(o);
57
57
  },
58
58
  clear(e) {
@@ -67,41 +67,41 @@ const H = /* @__PURE__ */ v({
67
67
  }
68
68
  },
69
69
  setup() {
70
- const e = s("kendoIntlService", {}), t = s("kendoLocalizationService", {});
70
+ const e = c("kendoIntlService", {}), t = c("kendoLocalizationService", {});
71
71
  return {
72
72
  kendoIntlService: e,
73
73
  kendoLocalizationService: t
74
74
  };
75
75
  },
76
76
  render() {
77
- const e = w(this), {
77
+ const e = D(this), {
78
78
  size: t
79
- } = this.$props, o = this.$props.operators.find((a) => a.operator === this.$props.operator) || null, u = function() {
79
+ } = this.$props, o = this.$props.operators.find((n) => n.operator === this.$props.operator) || null, f = function() {
80
80
  if (this.$props.filterType !== "boolean")
81
- return i(g, {
81
+ return i(d, {
82
82
  onChange: this.operatorChange,
83
83
  value: o,
84
84
  size: t,
85
85
  class: "k-dropdown-operator",
86
86
  icon: "filter",
87
- svgIcon: I,
87
+ svgIcon: w,
88
88
  iconClassName: "filter k-button-icon",
89
89
  "data-items": this.$props.operators,
90
90
  textField: "text",
91
- title: e.toLanguageString(h, c[h]),
91
+ title: e.toLanguageString(g, u[g]),
92
92
  popupSettings: {
93
93
  width: "",
94
94
  anchor: ""
95
95
  },
96
96
  ariaLabel: this.ariaLabel
97
97
  }, null);
98
- }, d = function(a, n) {
98
+ }, m = function(n, a) {
99
99
  let l;
100
- switch (a) {
100
+ switch (n) {
101
101
  case "numeric":
102
102
  return i(k, {
103
103
  size: t,
104
- value: n,
104
+ value: a,
105
105
  onChange: (r) => {
106
106
  this.inputChange(r.value, r.event);
107
107
  },
@@ -111,7 +111,7 @@ const H = /* @__PURE__ */ v({
111
111
  case "date":
112
112
  return i(z, {
113
113
  size: t,
114
- value: n,
114
+ value: a,
115
115
  onChange: (r) => {
116
116
  this.inputChange(r.value, r);
117
117
  },
@@ -119,10 +119,10 @@ const H = /* @__PURE__ */ v({
119
119
  ariaLabel: this.ariaLabel
120
120
  }, null);
121
121
  case "boolean":
122
- return l = this.$props.booleanValues, i(g, {
122
+ return l = this.$props.booleanValues, i(d, {
123
123
  onChange: this.boolDropdownChange,
124
124
  size: t,
125
- value: l.find((r) => r.operator === (n !== null ? n : "")),
125
+ value: l.find((r) => r.operator === (a !== null ? a : "")),
126
126
  "data-items": l,
127
127
  textField: "text",
128
128
  title: this.$props.title,
@@ -130,7 +130,7 @@ const H = /* @__PURE__ */ v({
130
130
  }, null);
131
131
  default:
132
132
  return i(L, {
133
- value: n || "",
133
+ value: a || "",
134
134
  size: t,
135
135
  onInput: (r) => {
136
136
  this.inputChange(r.target.value, r);
@@ -139,14 +139,14 @@ const H = /* @__PURE__ */ v({
139
139
  "aria-label": this.ariaLabel
140
140
  }, null);
141
141
  }
142
- }, f = i("div", {
142
+ }, s = {
143
143
  class: "k-filtercell",
144
144
  style: this.$attrs.style
145
- }, [i("div", {
145
+ }, p = i("div", {
146
146
  class: "k-filtercell-wrapper"
147
- }, [d.call(this, this.$props.filterType, this.$props.value), i("div", {
147
+ }, [m.call(this, this.$props.filterType, this.$props.value), i("div", {
148
148
  class: "k-filtercell-operator"
149
- }, [u.call(this), b(" "), i(S, {
149
+ }, [f.call(this), b(" "), i($, {
150
150
  type: "button",
151
151
  size: t,
152
152
  icon: "filter-clear",
@@ -155,20 +155,25 @@ const H = /* @__PURE__ */ v({
155
155
  /* button is always visible if there is either value or operator */
156
156
  "k-disabled": !(!(this.$props.value === null || this.$props.value === "") || this.$props.operator)
157
157
  },
158
- title: e.toLanguageString(p, c[p]),
158
+ title: e.toLanguageString(h, u[h]),
159
159
  onClick: this.clear
160
- }, null)])])]), m = this.$props.grid ? T.call(this.$props.grid) : null, C = B.call(this.$props.grid, this.$props.render, m);
161
- return N.call(this, {
162
- h: $,
163
- template: C,
164
- defaultRendering: f,
165
- additionalProps: this.$props,
160
+ }, null)])]), C = i("div", s, [p]);
161
+ return T.call(this, {
162
+ h: S,
163
+ template: this.$props.render,
164
+ defaultRendering: C,
165
+ additionalProps: {
166
+ ...this.$props,
167
+ tdProps: s
168
+ },
166
169
  additionalListeners: {
167
170
  change: this.triggerChange
168
- }
171
+ },
172
+ defaultSlots: p,
173
+ swapDefaultSlots: !0
169
174
  });
170
175
  }
171
176
  });
172
177
  export {
173
- H as GridFilterCell
178
+ K as GridFilterCell
174
179
  };
@@ -30,6 +30,7 @@ declare const GridGroupCell: import('vue').DefineComponent<import('vue').Extract
30
30
  ariaColumnIndex: PropType<number>;
31
31
  group: PropType<import('@progress/kendo-vue-data-tools').GroupState>;
32
32
  render: PropType<any>;
33
+ cells: PropType<import('..').GridCellsSettings>;
33
34
  }>, {}, {}, {
34
35
  tdClass(): {
35
36
  [x: number]: any;
@@ -71,6 +72,7 @@ declare const GridGroupCell: import('vue').DefineComponent<import('vue').Extract
71
72
  ariaColumnIndex: PropType<number>;
72
73
  group: PropType<import('@progress/kendo-vue-data-tools').GroupState>;
73
74
  render: PropType<any>;
75
+ cells: PropType<import('..').GridCellsSettings>;
74
76
  }>> & Readonly<{
75
77
  onChange?: (...args: any[] | unknown[]) => any;
76
78
  onCellkeydown?: (...args: any[] | unknown[]) => any;
@@ -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 a=require("vue"),i=require("@progress/kendo-vue-common"),g=require("@progress/kendo-vue-data-tools"),n=require("../messages/main.js"),y=require("@progress/kendo-vue-intl"),h=require("@progress/kendo-svg-icons"),v=a.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]},emits:{change:null,cellkeydown:null},inject:{kendo:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:i.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.kendo;(t=e==null?void 0:e.dispatchGroupExpand)==null||t.call(e,{type:g.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===i.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,l){e.preventDefault(),this.$emit("change",{dataItem:t,dataIndex:this.$props.dataIndex,event:e,level:this.$props.level,field:void 0,value:!l}),this.triggerStateChange()}},render(){let e=null;const{columnIndex:t,level:l,columnsCount:d,rowType:I,dataItem:o,field:s,expanded:r,render:S,locked:c}=this.$props,p=this.getKeyboardNavigationAttributes(this.$props.id),m=y.provideLocalizationService(this).toLanguageString(n.groupCaretAriaLabelCollapse,n.messages[n.groupCaretAriaLabelCollapse]),k=y.provideLocalizationService(this).toLanguageString(n.groupCaretAriaLabelExpand,n.messages[n.groupCaretAriaLabelExpand]);if(t===void 0||l===void 0||t<l||d===void 0||I!=="groupHeader"||o[s]===void 0)e=a.createVNode("td",{style:this.$attrs.style,key:"g"+t,class:this.groupTdClass},null);else if(t<=l){const f=a.createVNode("td",{style:this.tdStyle,onKeydown:u=>{this.triggerKeydown(u,r)},key:"g-colspan",class:c?"k-table-td":this.tdClass,colspan:c?0:d-t,role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,"aria-selected":this.$props.isSelected,"aria-expanded":r,"data-grid-col-index":this.$props.columnIndex,tabindex:p.tabIndex,"data-keyboardnavlevel":p[g.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":p[g.KEYBOARD_NAV_DATA_ID]},[a.createVNode("p",{class:"k-reset"},[a.createVNode("a",{onClick:u=>{this.clickHandler(u,o,r)},href:"#",tabindex:-1,title:r?m:k,"aria-label":r?m:k},[a.createVNode(i.Icon,{name:r?"caret-alt-down":this.isRtl?"caret-alt-left":"caret-alt-right",icon:r?h.caretAltDownIcon:this.isRtl?h.caretAltLeftIcon:h.caretAltRightIcon},null)]),o[s]?o[s].toString():""])]),C={className:"k-table-td",role:"gridcell",colSpan:d-t,style:{borderLeftWidth:0,borderRightWidth:0}},b=c?a.createVNode("td",C,null):null;e=b?[f,b]:f}return i.getTemplate.call(this,{h:a.h,template:S,defaultRendering:e,additionalProps:this.$props,additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler}})}});exports.GridGroupCell=v;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),i=require("@progress/kendo-vue-common"),f=require("@progress/kendo-vue-data-tools"),o=require("../messages/main.js"),S=require("@progress/kendo-vue-intl"),k=require("@progress/kendo-svg-icons"),x=e=>{var t,l;return(l=(t=e.cells)==null?void 0:t.groupHeader)==null?void 0:l[e.rowType||"data"]},A=a.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:{kendo:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:i.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.kendo;(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===i.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,l){e.preventDefault(),this.$emit("change",{dataItem:t,dataIndex:this.$props.dataIndex,event:e,level:this.$props.level,field:void 0,value:!l}),this.triggerStateChange()}},render(){let e=null,t,l,s=null;const{columnIndex:n,level:c,columnsCount:p,rowType:v,dataItem:d,field:u,expanded:r,render:$,locked:g}=this.$props,h=this.getKeyboardNavigationAttributes(this.$props.id),b=S.provideLocalizationService(this).toLanguageString(o.groupCaretAriaLabelCollapse,o.messages[o.groupCaretAriaLabelCollapse]),y=S.provideLocalizationService(this).toLanguageString(o.groupCaretAriaLabelExpand,o.messages[o.groupCaretAriaLabelExpand]);if(n===void 0||c===void 0||n<c||p===void 0||v!=="groupHeader"||d[u]===void 0)t={style:this.$attrs.style,key:"g"+n,class:this.groupTdClass},e=a.createVNode("td",t,null);else if(n<=c){t={style:this.tdStyle,key:"g-colspan",class:g?"k-table-td":this.tdClass,colspan:g?0:p-n,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]},s=a.createVNode("p",{class:"k-reset"},[a.createVNode("a",{onClick:m=>{this.clickHandler(m,d,r)},href:"#",tabindex:-1,title:r?b:y,"aria-label":r?b:y},[a.createVNode(i.Icon,{name:r?"caret-alt-down":this.isRtl?"caret-alt-left":"caret-alt-right",icon:r?k.caretAltDownIcon:this.isRtl?k.caretAltLeftIcon:k.caretAltRightIcon},null)]),d[u]?d[u].toString():""]);const C=a.createVNode("td",a.mergeProps(t,{onKeydown:m=>{this.triggerKeydown(m,r)}}),[s]);l={className:"k-table-td",role:"gridcell",colSpan:p-n,style:{borderLeftWidth:0,borderRightWidth:0}};const I=g?a.createVNode("td",l,null):null;e=I?[C,I]:C}return i.getTemplate.call(this,{h:a.h,template:$||x(this.$props),defaultRendering:e,additionalProps:{...this.$props,tdProps:t,td2Props:l},additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler},defaultSlots:s,swapDefaultSlots:!0})}});exports.GridGroupCell=A;
@@ -5,13 +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 S, createVNode as l, h as $ } from "vue";
9
- import { noop as C, Icon as A, getTemplate as v, Keys as N } from "@progress/kendo-vue-common";
10
- import { KEYBOARD_NAV_DATA_ID as L, KEYBOARD_NAV_DATA_LEVEL as w, GROUP_EXPAND_ACTION as K } from "@progress/kendo-vue-data-tools";
11
- import { groupCaretAriaLabelCollapse as m, messages as f, groupCaretAriaLabelExpand as k } from "../messages/main.mjs";
12
- import { provideLocalizationService as y } from "@progress/kendo-vue-intl";
13
- import { caretAltDownIcon as R, caretAltRightIcon as D, caretAltLeftIcon as E } from "@progress/kendo-svg-icons";
14
- const P = /* @__PURE__ */ S({
8
+ import { defineComponent as x, createVNode as n, mergeProps as A, h as v } from "vue";
9
+ import { noop as N, Icon as L, getTemplate as w, Keys as D } from "@progress/kendo-vue-common";
10
+ import { KEYBOARD_NAV_DATA_ID as K, KEYBOARD_NAV_DATA_LEVEL as R, GROUP_EXPAND_ACTION as T } from "@progress/kendo-vue-data-tools";
11
+ import { groupCaretAriaLabelCollapse as y, messages as b, groupCaretAriaLabelExpand as I } from "../messages/main.mjs";
12
+ import { provideLocalizationService as S } from "@progress/kendo-vue-intl";
13
+ import { caretAltDownIcon as E, caretAltRightIcon as O, caretAltLeftIcon as G } from "@progress/kendo-svg-icons";
14
+ const _ = (e) => {
15
+ var t, l;
16
+ return (l = (t = e.cells) == null ? void 0 : t.groupHeader) == null ? void 0 : l[e.rowType || "data"];
17
+ }, W = /* @__PURE__ */ x({
15
18
  name: "KendoGridGroupCell",
16
19
  inheritAttrs: !1,
17
20
  props: {
@@ -34,7 +37,8 @@ const P = /* @__PURE__ */ S({
34
37
  isRtl: Boolean,
35
38
  ariaColumnIndex: Number,
36
39
  group: Object,
37
- render: [String, Function, Object]
40
+ render: [String, Function, Object],
41
+ cells: Object
38
42
  },
39
43
  emits: {
40
44
  change: null,
@@ -51,7 +55,7 @@ const P = /* @__PURE__ */ S({
51
55
  default: null
52
56
  },
53
57
  getKeyboardNavigationAttributes: {
54
- default: C
58
+ default: N
55
59
  }
56
60
  },
57
61
  computed: {
@@ -96,7 +100,7 @@ const P = /* @__PURE__ */ S({
96
100
  var t;
97
101
  const e = this.kendo;
98
102
  (t = e == null ? void 0 : e.dispatchGroupExpand) == null || t.call(e, {
99
- type: K.TOGGLE,
103
+ type: T.TOGGLE,
100
104
  group: this.$props.group
101
105
  });
102
106
  },
@@ -107,7 +111,7 @@ const P = /* @__PURE__ */ S({
107
111
  dataIndex: this.$props.dataIndex,
108
112
  field: this.$props.field,
109
113
  expanded: this.$props.expanded
110
- }), !e.defaultPrevented && e.keyCode === N.enter && (e.preventDefault(), this.$emit("change", {
114
+ }), !e.defaultPrevented && e.keyCode === D.enter && (e.preventDefault(), this.$emit("change", {
111
115
  dataItem: this.$props.dataItem,
112
116
  dataIndex: this.$props.dataIndex,
113
117
  event: e,
@@ -116,89 +120,99 @@ const P = /* @__PURE__ */ S({
116
120
  value: !t
117
121
  }), this.triggerStateChange());
118
122
  },
119
- clickHandler(e, t, r) {
123
+ clickHandler(e, t, l) {
120
124
  e.preventDefault(), this.$emit("change", {
121
125
  dataItem: t,
122
126
  dataIndex: this.$props.dataIndex,
123
127
  event: e,
124
128
  level: this.$props.level,
125
129
  field: void 0,
126
- value: !r
130
+ value: !l
127
131
  }), this.triggerStateChange();
128
132
  }
129
133
  },
130
134
  render() {
131
- let e = null;
135
+ let e = null, t, l, o = null;
132
136
  const {
133
- columnIndex: t,
134
- level: r,
135
- columnsCount: i,
136
- rowType: b,
137
- dataItem: n,
138
- field: o,
137
+ columnIndex: r,
138
+ level: d,
139
+ columnsCount: s,
140
+ rowType: C,
141
+ dataItem: i,
142
+ field: p,
139
143
  expanded: a,
140
- render: I,
141
- locked: d
142
- } = this.$props, s = this.getKeyboardNavigationAttributes(this.$props.id), c = y(this).toLanguageString(m, f[m]), u = y(this).toLanguageString(k, f[k]);
143
- if (t === void 0 || r === void 0 || t < r || i === void 0 || b !== "groupHeader" || n[o] === void 0)
144
- e = l("td", {
144
+ render: $,
145
+ locked: c
146
+ } = this.$props, u = this.getKeyboardNavigationAttributes(this.$props.id), h = S(this).toLanguageString(y, b[y]), m = S(this).toLanguageString(I, b[I]);
147
+ if (r === void 0 || d === void 0 || r < d || s === void 0 || C !== "groupHeader" || i[p] === void 0)
148
+ t = {
145
149
  style: this.$attrs.style,
146
- key: "g" + t,
150
+ key: "g" + r,
147
151
  class: this.groupTdClass
148
- }, null);
149
- else if (t <= r) {
150
- const g = l("td", {
152
+ }, e = n("td", t, null);
153
+ else if (r <= d) {
154
+ t = {
151
155
  style: this.tdStyle,
152
- onKeydown: (p) => {
153
- this.triggerKeydown(p, a);
154
- },
155
156
  key: "g-colspan",
156
- class: d ? "k-table-td" : this.tdClass,
157
- colspan: d ? 0 : i - t,
157
+ class: c ? "k-table-td" : this.tdClass,
158
+ colspan: c ? 0 : s - r,
158
159
  role: "gridcell",
159
160
  "aria-colindex": this.$props.ariaColumnIndex,
160
161
  "aria-selected": this.$props.isSelected,
161
162
  "aria-expanded": a,
162
163
  "data-grid-col-index": this.$props.columnIndex,
163
- tabindex: s.tabIndex,
164
- "data-keyboardnavlevel": s[w],
165
- "data-keyboardnavid": s[L]
166
- }, [l("p", {
164
+ tabindex: u.tabIndex,
165
+ "data-keyboardnavlevel": u[R],
166
+ "data-keyboardnavid": u[K]
167
+ }, o = n("p", {
167
168
  class: "k-reset"
168
- }, [l("a", {
169
- onClick: (p) => {
170
- this.clickHandler(p, n, a);
169
+ }, [n("a", {
170
+ onClick: (g) => {
171
+ this.clickHandler(g, i, a);
171
172
  },
172
173
  href: "#",
173
174
  tabindex: -1,
174
- title: a ? c : u,
175
- "aria-label": a ? c : u
176
- }, [l(A, {
175
+ title: a ? h : m,
176
+ "aria-label": a ? h : m
177
+ }, [n(L, {
177
178
  name: a ? "caret-alt-down" : this.isRtl ? "caret-alt-left" : "caret-alt-right",
178
- icon: a ? R : this.isRtl ? E : D
179
- }, null)]), n[o] ? n[o].toString() : ""])]), x = {
179
+ icon: a ? E : this.isRtl ? G : O
180
+ }, null)]), i[p] ? i[p].toString() : ""]);
181
+ const f = n("td", A(t, {
182
+ onKeydown: (g) => {
183
+ this.triggerKeydown(g, a);
184
+ }
185
+ }), [o]);
186
+ l = {
180
187
  className: "k-table-td",
181
188
  role: "gridcell",
182
- colSpan: i - t,
189
+ colSpan: s - r,
183
190
  style: {
184
191
  borderLeftWidth: 0,
185
192
  borderRightWidth: 0
186
193
  }
187
- }, h = d ? l("td", x, null) : null;
188
- e = h ? [g, h] : g;
194
+ };
195
+ const k = c ? n("td", l, null) : null;
196
+ e = k ? [f, k] : f;
189
197
  }
190
- return v.call(this, {
191
- h: $,
192
- template: I,
198
+ return w.call(this, {
199
+ h: v,
200
+ template: $ || _(this.$props),
193
201
  defaultRendering: e,
194
- additionalProps: this.$props,
202
+ additionalProps: {
203
+ ...this.$props,
204
+ tdProps: t,
205
+ td2Props: l
206
+ },
195
207
  additionalListeners: {
196
208
  keydown: this.triggerKeydown,
197
209
  click: this.clickHandler
198
- }
210
+ },
211
+ defaultSlots: o,
212
+ swapDefaultSlots: !0
199
213
  });
200
214
  }
201
215
  });
202
216
  export {
203
- P as GridGroupCell
217
+ W as GridGroupCell
204
218
  };
@@ -28,6 +28,7 @@ declare const GridHierarchyCell: import('vue').DefineComponent<import('vue').Ext
28
28
  ariaColumnIndex: PropType<number>;
29
29
  render: PropType<any>;
30
30
  isRtl: PropType<boolean>;
31
+ cells: PropType<import('..').GridCellsSettings>;
31
32
  }>, {}, {}, {
32
33
  wrapperClass(): {
33
34
  [x: number]: any;
@@ -60,6 +61,7 @@ declare const GridHierarchyCell: import('vue').DefineComponent<import('vue').Ext
60
61
  ariaColumnIndex: PropType<number>;
61
62
  render: PropType<any>;
62
63
  isRtl: PropType<boolean>;
64
+ cells: PropType<import('..').GridCellsSettings>;
63
65
  }>> & Readonly<{
64
66
  onChange?: (...args: any[] | unknown[]) => any;
65
67
  onCellkeydown?: (...args: any[] | unknown[]) => any;
@@ -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 i=require("vue"),l=require("@progress/kendo-vue-common"),o=require("@progress/kendo-vue-data-tools"),u=require("@progress/kendo-vue-intl"),r=require("../messages/main.js"),p=require("@progress/kendo-svg-icons"),h=i.defineComponent({name:"KendoGridHierarchyCell",inheritAttrs:!1,props:{id:String,field:String,dataItem:Object,format:String,type:String,className:String,colSpan:Number,columnIndex:Number,columnsCount:Number,rowType:String,level:Number,expanded:Boolean,editor:String,isSelected:Boolean,dataIndex:Number,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean},emits:{change:null,cellkeydown:null},inject:{kendo:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:l.noop}},methods:{triggerStateChange(){const e=this.kendo;e.dataItemKey&&this.$props.dataItem[e.dataItemKey]!==void 0&&(e==null||e.dispatchDetailExpand({type:o.DETAIL_EXPAND_ACTION.TOGGLE,id:this.$props.dataItem[e.dataItemKey]}))},triggerKeydown(e,t){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field,expanded:t}),!e.defaultPrevented&&e.keyCode===l.Keys.enter&&(e.preventDefault(),this.$emit("change",{dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,event:e,field:this.$props.field,value:!t}),this.triggerStateChange())},clickHandler(e,t,n){e.preventDefault(),this.$emit("change",{dataItem:t,event:e,field:void 0,value:!n}),this.triggerStateChange()}},computed:{wrapperClass(){return{"k-table-td":!0,"k-hierarchy-cell":!0,[this.className||""]:this.className}}},render(){let e=null;const t=this.getKeyboardNavigationAttributes(this.$props.id),n=u.provideLocalizationService(this),d=n.toLanguageString(r.collapseDetailAriaLabel,r.messages[r.collapseDetailAriaLabel]),c=n.toLanguageString(r.expandDetailAriaLabel,r.messages[r.expandDetailAriaLabel]);if(this.$props.rowType==="groupFooter")e=i.createVNode("td",{class:this.wrapperClass},null);else if(this.$props.rowType!=="groupHeader"){const a=this.$props.expanded;e=i.createVNode("td",{style:this.$attrs.style,onKeydown:s=>{this.triggerKeydown(s,a)},class:this.wrapperClass,"aria-expanded":a?"true":"false",role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,tabindex:t.tabIndex,"data-keyboardnavlevel":t[o.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":t[o.KEYBOARD_NAV_DATA_ID]},[i.createVNode("a",{onClick:s=>{this.clickHandler(s,this.$props.dataItem,a)},href:"#",tabindex:-1,title:a?d:c,"aria-label":a?d:c},[i.createVNode(l.Icon,{name:a?"minus":"plus",icon:a?p.minusIcon:p.plusIcon},null)])])}return l.getTemplate.call(this,{h:i.h,template:this.$props.render,defaultRendering:e,additionalProps:this.$props,additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler}})}});exports.GridHierarchyCell=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),l=require("@progress/kendo-vue-common"),d=require("@progress/kendo-vue-data-tools"),g=require("@progress/kendo-vue-intl"),n=require("../messages/main.js"),h=require("@progress/kendo-svg-icons"),m=e=>{var t,a;return(a=(t=e.cells)==null?void 0:t.hierarchy)==null?void 0:a[e.rowType||"data"]},f=i.defineComponent({name:"KendoGridHierarchyCell",inheritAttrs:!1,props:{id:String,field:String,dataItem:Object,format:String,type:String,className:String,colSpan:Number,columnIndex:Number,columnsCount:Number,rowType:String,level:Number,expanded:Boolean,editor:String,isSelected:Boolean,dataIndex:Number,ariaColumnIndex:Number,render:[String,Function,Object],isRtl:Boolean,cells:Object},emits:{change:null,cellkeydown:null},inject:{kendo:{default:null},kendoIntlService:{default:null},kendoLocalizationService:{default:null},getKeyboardNavigationAttributes:{default:l.noop}},methods:{triggerStateChange(){const e=this.kendo;e.dataItemKey&&this.$props.dataItem[e.dataItemKey]!==void 0&&(e==null||e.dispatchDetailExpand({type:d.DETAIL_EXPAND_ACTION.TOGGLE,id:this.$props.dataItem[e.dataItemKey]}))},triggerKeydown(e,t){this.$emit("cellkeydown",{event:e,dataItem:this.$props.dataItem,field:this.$props.field,expanded:t}),!e.defaultPrevented&&e.keyCode===l.Keys.enter&&(e.preventDefault(),this.$emit("change",{dataItem:this.$props.dataItem,dataIndex:this.$props.dataIndex,event:e,field:this.$props.field,value:!t}),this.triggerStateChange())},clickHandler(e,t,a){e.preventDefault(),this.$emit("change",{dataItem:t,event:e,field:void 0,value:!a}),this.triggerStateChange()}},computed:{wrapperClass(){return{"k-table-td":!0,"k-hierarchy-cell":!0,[this.className||""]:this.className}}},render(){let e=null,t,a=null;const s=this.getKeyboardNavigationAttributes(this.$props.id),c=g.provideLocalizationService(this),p=c.toLanguageString(n.collapseDetailAriaLabel,n.messages[n.collapseDetailAriaLabel]),u=c.toLanguageString(n.expandDetailAriaLabel,n.messages[n.expandDetailAriaLabel]);if(this.$props.rowType==="groupFooter")t={class:this.wrapperClass},e=i.createVNode("td",t,null);else if(this.$props.rowType!=="groupHeader"){const r=this.$props.expanded;t={style:this.$attrs.style,class:this.wrapperClass,"aria-expanded":r?"true":"false",role:"gridcell","aria-colindex":this.$props.ariaColumnIndex,tabindex:s.tabIndex,"data-keyboardnavlevel":s[d.KEYBOARD_NAV_DATA_LEVEL],"data-keyboardnavid":s[d.KEYBOARD_NAV_DATA_ID]},a=i.createVNode("a",{onClick:o=>{this.clickHandler(o,this.$props.dataItem,r)},href:"#",tabindex:-1,title:r?p:u,"aria-label":r?p:u},[i.createVNode(l.Icon,{name:r?"minus":"plus",icon:r?h.minusIcon:h.plusIcon},null)]),e=i.createVNode("td",i.mergeProps(t,{onKeydown:o=>{this.triggerKeydown(o,r)}}),[a])}return l.getTemplate.call(this,{h:i.h,template:this.$props.render||m(this.$props),defaultRendering:e,additionalProps:{...this.$props,tdProps:t},additionalListeners:{keydown:this.triggerKeydown,click:this.clickHandler},defaultSlots:a,swapDefaultSlots:!0})}});exports.GridHierarchyCell=f;
@@ -5,13 +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 c, createVNode as r, h as m } from "vue";
9
- import { noop as u, Icon as h, getTemplate as g, Keys as f } from "@progress/kendo-vue-common";
10
- import { KEYBOARD_NAV_DATA_ID as y, KEYBOARD_NAV_DATA_LEVEL as I, DETAIL_EXPAND_ACTION as b } from "@progress/kendo-vue-data-tools";
11
- import { provideLocalizationService as S } from "@progress/kendo-vue-intl";
12
- import { collapseDetailAriaLabel as s, messages as d, expandDetailAriaLabel as p } from "../messages/main.mjs";
13
- import { minusIcon as $, plusIcon as k } from "@progress/kendo-svg-icons";
14
- const K = /* @__PURE__ */ c({
8
+ import { defineComponent as m, createVNode as i, mergeProps as h, h as g } from "vue";
9
+ import { noop as f, Icon as y, getTemplate as I, Keys as b } from "@progress/kendo-vue-common";
10
+ import { KEYBOARD_NAV_DATA_ID as S, KEYBOARD_NAV_DATA_LEVEL as $, DETAIL_EXPAND_ACTION as k } from "@progress/kendo-vue-data-tools";
11
+ import { provideLocalizationService as x } from "@progress/kendo-vue-intl";
12
+ import { collapseDetailAriaLabel as p, messages as c, expandDetailAriaLabel as u } from "../messages/main.mjs";
13
+ import { minusIcon as A, plusIcon as C } from "@progress/kendo-svg-icons";
14
+ const v = (e) => {
15
+ var t, a;
16
+ return (a = (t = e.cells) == null ? void 0 : t.hierarchy) == null ? void 0 : a[e.rowType || "data"];
17
+ }, E = /* @__PURE__ */ m({
15
18
  name: "KendoGridHierarchyCell",
16
19
  inheritAttrs: !1,
17
20
  props: {
@@ -32,7 +35,8 @@ const K = /* @__PURE__ */ c({
32
35
  dataIndex: Number,
33
36
  ariaColumnIndex: Number,
34
37
  render: [String, Function, Object],
35
- isRtl: Boolean
38
+ isRtl: Boolean,
39
+ cells: Object
36
40
  },
37
41
  emits: {
38
42
  change: null,
@@ -49,14 +53,14 @@ const K = /* @__PURE__ */ c({
49
53
  default: null
50
54
  },
51
55
  getKeyboardNavigationAttributes: {
52
- default: u
56
+ default: f
53
57
  }
54
58
  },
55
59
  methods: {
56
60
  triggerStateChange() {
57
61
  const e = this.kendo;
58
62
  e.dataItemKey && this.$props.dataItem[e.dataItemKey] !== void 0 && (e == null || e.dispatchDetailExpand({
59
- type: b.TOGGLE,
63
+ type: k.TOGGLE,
60
64
  id: this.$props.dataItem[e.dataItemKey]
61
65
  }));
62
66
  },
@@ -66,7 +70,7 @@ const K = /* @__PURE__ */ c({
66
70
  dataItem: this.$props.dataItem,
67
71
  field: this.$props.field,
68
72
  expanded: t
69
- }), !e.defaultPrevented && e.keyCode === f.enter && (e.preventDefault(), this.$emit("change", {
73
+ }), !e.defaultPrevented && e.keyCode === b.enter && (e.preventDefault(), this.$emit("change", {
70
74
  dataItem: this.$props.dataItem,
71
75
  dataIndex: this.$props.dataIndex,
72
76
  event: e,
@@ -74,12 +78,12 @@ const K = /* @__PURE__ */ c({
74
78
  value: !t
75
79
  }), this.triggerStateChange());
76
80
  },
77
- clickHandler(e, t, i) {
81
+ clickHandler(e, t, a) {
78
82
  e.preventDefault(), this.$emit("change", {
79
83
  dataItem: t,
80
84
  event: e,
81
85
  field: void 0,
82
- value: !i
86
+ value: !a
83
87
  }), this.triggerStateChange();
84
88
  }
85
89
  },
@@ -93,51 +97,57 @@ const K = /* @__PURE__ */ c({
93
97
  }
94
98
  },
95
99
  render() {
96
- let e = null;
97
- const t = this.getKeyboardNavigationAttributes(this.$props.id), i = S(this), l = i.toLanguageString(s, d[s]), o = i.toLanguageString(p, d[p]);
100
+ let e = null, t, a = null;
101
+ const n = this.getKeyboardNavigationAttributes(this.$props.id), s = x(this), o = s.toLanguageString(p, c[p]), d = s.toLanguageString(u, c[u]);
98
102
  if (this.$props.rowType === "groupFooter")
99
- e = r("td", {
103
+ t = {
100
104
  class: this.wrapperClass
101
- }, null);
105
+ }, e = i("td", t, null);
102
106
  else if (this.$props.rowType !== "groupHeader") {
103
- const a = this.$props.expanded;
104
- e = r("td", {
107
+ const r = this.$props.expanded;
108
+ t = {
105
109
  style: this.$attrs.style,
106
- onKeydown: (n) => {
107
- this.triggerKeydown(n, a);
108
- },
109
110
  class: this.wrapperClass,
110
- "aria-expanded": a ? "true" : "false",
111
+ "aria-expanded": r ? "true" : "false",
111
112
  role: "gridcell",
112
113
  "aria-colindex": this.$props.ariaColumnIndex,
113
- tabindex: t.tabIndex,
114
- "data-keyboardnavlevel": t[I],
115
- "data-keyboardnavid": t[y]
116
- }, [r("a", {
117
- onClick: (n) => {
118
- this.clickHandler(n, this.$props.dataItem, a);
114
+ tabindex: n.tabIndex,
115
+ "data-keyboardnavlevel": n[$],
116
+ "data-keyboardnavid": n[S]
117
+ }, a = i("a", {
118
+ onClick: (l) => {
119
+ this.clickHandler(l, this.$props.dataItem, r);
119
120
  },
120
121
  href: "#",
121
122
  tabindex: -1,
122
- title: a ? l : o,
123
- "aria-label": a ? l : o
124
- }, [r(h, {
125
- name: a ? "minus" : "plus",
126
- icon: a ? $ : k
127
- }, null)])]);
123
+ title: r ? o : d,
124
+ "aria-label": r ? o : d
125
+ }, [i(y, {
126
+ name: r ? "minus" : "plus",
127
+ icon: r ? A : C
128
+ }, null)]), e = i("td", h(t, {
129
+ onKeydown: (l) => {
130
+ this.triggerKeydown(l, r);
131
+ }
132
+ }), [a]);
128
133
  }
129
- return g.call(this, {
130
- h: m,
131
- template: this.$props.render,
134
+ return I.call(this, {
135
+ h: g,
136
+ template: this.$props.render || v(this.$props),
132
137
  defaultRendering: e,
133
- additionalProps: this.$props,
138
+ additionalProps: {
139
+ ...this.$props,
140
+ tdProps: t
141
+ },
134
142
  additionalListeners: {
135
143
  keydown: this.triggerKeydown,
136
144
  click: this.clickHandler
137
- }
145
+ },
146
+ defaultSlots: a,
147
+ swapDefaultSlots: !0
138
148
  });
139
149
  }
140
150
  });
141
151
  export {
142
- K as GridHierarchyCell
152
+ E as GridHierarchyCell
143
153
  };
@@ -27,6 +27,7 @@ declare const GridSelectionCell: import('vue').DefineComponent<import('vue').Ext
27
27
  ariaColumnIndex: PropType<number>;
28
28
  editor: PropType<string>;
29
29
  isRtl: PropType<boolean>;
30
+ cells: PropType<import('..').GridCellsSettings>;
30
31
  }>, {}, {
31
32
  inputId: any;
32
33
  }, {
@@ -58,6 +59,7 @@ declare const GridSelectionCell: import('vue').DefineComponent<import('vue').Ext
58
59
  ariaColumnIndex: PropType<number>;
59
60
  editor: PropType<string>;
60
61
  isRtl: PropType<boolean>;
62
+ cells: PropType<import('..').GridCellsSettings>;
61
63
  }>> & Readonly<{
62
64
  onSelectionchange?: (...args: any[] | unknown[]) => any;
63
65
  onCellkeydown?: (...args: any[] | unknown[]) => any;