@progress/kendo-vue-grid 6.4.1-develop.2 → 6.4.2-develop.3
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.mjs +19 -19
- package/GridNoRecords.mjs +3 -3
- package/GridToolbar.mjs +3 -3
- package/cells/GridCell.mjs +6 -6
- package/cells/GridDetailCell.mjs +6 -6
- package/cells/GridDetailHierarchyCell.mjs +6 -6
- package/cells/GridEditCell.mjs +15 -15
- package/cells/GridFilterCell.mjs +4 -4
- package/cells/GridGroupCell.mjs +7 -7
- package/cells/GridHierarchyCell.mjs +7 -7
- package/cells/GridSelectionCell.mjs +6 -6
- package/columnMenu/ColumnMenu.mjs +4 -4
- package/columnMenu/ColumnMenuContent.mjs +3 -3
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +2 -2
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +19 -21
- package/columnMenu/GridColumnMenuFilterCell.mjs +3 -3
- package/columnMenu/GridColumnMenuItem.mjs +1 -1
- package/columnMenu/GridColumnMenuSort.mjs +1 -1
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/drag/GroupingIndicator.mjs +5 -5
- package/footer/Footer.mjs +5 -5
- package/header/FilterRow.mjs +1 -1
- package/header/GridHeaderSelectionCell.mjs +3 -3
- package/header/GroupPanel.mjs +1 -1
- package/header/Header.mjs +6 -6
- package/header/HeaderRow.mjs +3 -3
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
|
@@ -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"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),h=require("@progress/kendo-vue-common"),S=require("@progress/kendo-data-query"),R=require("./GridColumnMenuItem.js"),w=require("./GridColumnMenuItemGroup.js"),U=require("./GridColumnMenuItemContent.js"),M=require("@progress/kendo-vue-buttons"),_=require("@progress/kendo-vue-intl"),f=require("../filterCommon.js"),u=require("../messages/main.js"),k=require("./GridColumnMenuFilterCell.js"),L=require("./GridColumnMenuFilterOperators.js"),K=require("@progress/kendo-vue-dropdowns"),Q=require("@progress/kendo-svg-icons");function N(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!o.isVNode(e)}const F=e=>e||{filters:[],logic:"and"},C=(e,r)=>F(r).filters.filter(l=>S.isCompositeFilterDescriptor(l)?l.filters&&l.filters.length&&l.filters.length<=2&&!l.filters.find(n=>S.isCompositeFilterDescriptor(n)||n.field!==e):!1)[0]||null,A=o.defineComponent({name:"KendoGridColumnMenuFilter",props:{column:Object,filter:Object,expanded:{type:Boolean,default:void 0},filterable:Boolean,filterOperators:{type:Object,default:function(){return f.operators}},hideSecondFilter:{type:[Boolean,Object],default:function(){}},filterUI:[String,Function,Object],onFilterfocus:Function,onFilterchange:Function,onExpandchange:Function,onClosemenu:Function},inject:{kendoLocalizationService:{default:null}},data(){return{currentExpanded:!1,filterGroup:null}},created(){let e;if(this.$props.column&&this.$props.column.field){const r=f.getFilterType(this.$props.column.filter),t=f.getDefaultOperator(this.$props.filterOperators,r);e=C(this.$props.column.field,this.$props.filter),e=e?{...e,filters:e.filters.map(i=>({...i}))}:{logic:"and",filters:[{field:this.$props.column.field,operator:t},{field:this.$props.column.field,operator:t}]},e.filters.filter(i=>i.field===this.$props.column.field).length===1&&e.filters.splice(1,0,{field:this.$props.column.field,operator:t})}this.currentExpanded=this.$props.expanded||!1,this.filterGroup=e},methods:{removeGroup(e,r){const t=[...r.filters],i=t.findIndex(l=>l===e);return i>-1&&t.splice(i,1),{...r,filters:t}},insertGroup(e,r){return{...r,filters:[e,...r.filters]}},isControlled(){return this.$props.expanded!==void 0},onFilterExpand(){const e=this.isControlled(),r=!(e?this.$props.expanded:this.currentExpanded);this.$emit("expandchange",r),e||(this.currentExpanded=r)},filterChangeHandler(e,r){this.filterChange(r||0,e)},firstFilterChange(e){this.filterChange(0,e)},secondFilterChange(e){this.filterChange(1,e)},filterChange(e,r){const t=this.filterGroup.filters.map((i,l)=>l===e?{...i,value:r.value,operator:r.operator}:i);this.filterGroup={...this.filterGroup,filters:t}},logicChange(e){this.filterGroup={...this.filterGroup,logic:e.target.value.operator}},clear(e){if(e.preventDefault(),!h.hasListener.call(this,"filterchange"))return;const r=this.$props.column.field,t=F(this.$props.filter),i=C(r,this.$props.filter),l=t.filters.filter(n=>n!==i);l.length?this.$emit("filterchange",{...t,filters:l},{event:e,field:this.$props.column.field}):this.$emit("filterchange",null,{event:e,field:this.$props.column.field}),this.$emit("closemenu")},currentFilterGroup(){return{...this.filterGroup,filters:this.filterGroup.filters.filter(e=>e.value!==void 0&&e.value!==null&&e.value!==""||e.value===null&&e.operator)}},submit(e){if(e.preventDefault(),!h.hasListener.call(this,"filterchange"))return;const r=this.$props.column.field,t=F(this.$props.filter),i=C(r,this.$props.filter),l=this.currentFilterGroup();let n=null;if(i&&l.filters.length>0){const c=t.filters.map(s=>s===i?l:s);n={...t,filters:c}}else if(l.filters.length===0){const c=t.filters.filter(s=>s!==i);c.length&&(n={...t,filters:c})}else n={...t,filters:[...t.filters,l]};this.$emit("filterchange",n,{event:e,field:this.$props.column.field}),this.$emit("closemenu")},handleFocus(e){this.$emit("filterfocus",e)}},setup(){return{kendoLocalizationService:o.inject("kendoLocalizationService",{})}},render(){let e,r;const{column:t,filterUI:i,hideSecondFilter:l,filterOperators:n}=this.$props;if(!t||!t.field)return o.createVNode("div",null,null);const c=t.filter||"text",s=_.provideLocalizationService(this),m=this.filterGroup.filters,g=f.operatorMap(n[c],s),v=f.operatorMap(f.booleanFilterValues,s),d={field:t.field,value:m[0].value,operator:m[0].operator,booleanValues:v,filterType:c},p={field:t.field,value:m[1].value,operator:m[1].operator,booleanValues:v,filterType:c},G=this.filterGroup.logic,V=f.operatorMap(f.filterLogicList,s),$={value:V.find(a=>a.operator===(G===null?"":G)),data:V},I=this.currentFilterGroup().filters.length!==0,T=this.isControlled()?this.$props.expanded:this.currentExpanded,q=d.field,B=d.value,b=d.operator,D=d.booleanValues,y=d.filterType,j=p.field,E=p.value,x=p.operator,z=p.booleanValues,O=p.filterType,H=i&&h.templateRendering.call(this,i,h.getListeners.call(this)),P=h.getTemplate.call(this,{h:o.h,template:H,defaultRendering:void 0,additionalProps:this.$props,additionalListeners:{change:this.filterChangeHandler,logicchange:this.logicChange}});return o.createVNode(w.GridColumnMenuItemGroup,null,{default:()=>[o.createVNode(R.GridColumnMenuItem,{title:s.toLanguageString(u.filterTitle,u.messages[u.filterTitle]),icon:"filter",svgIcon:Q.filterIcon,onMenuitemclick:this.onFilterExpand},null),o.createVNode(U.GridColumnMenuItemContent,{show:!!T},{default:()=>[o.createVNode("div",{class:"kendo-grid-filter-menu-container"},[o.createVNode("form",{class:"k-filter-menu k-border-up",onSubmit:this.submit,onReset:this.clear},[o.createVNode("div",{class:"k-filter-menu-container"},[!i&&[o.createVNode(L.ColumnMenuFilterOperators,{operator:b,filterType:y,onChange:a=>{this.filterChangeHandler(a,0)},operators:g},null),o.createVNode(k.GridColumnMenuFilterCell,{field:q,value:B,operator:b,booleanValues:D,filterType:y,onFiltercellfocus:this.handleFocus,onChange:a=>{this.filterChangeHandler(a,0)},operators:g},null)],!l&&!i&&[o.createVNode(K.DropDownList,{onChange:this.logicChange,class:"k-filter-and","data-items":$.data,value:$.value,textField:"text"},null),o.createVNode(L.ColumnMenuFilterOperators,{operator:x,filterType:O,onChange:a=>{this.filterChangeHandler(a,1)},operators:g},null),o.createVNode(k.GridColumnMenuFilterCell,{field:j,value:E,operator:x,booleanValues:z,filterType:O,onFiltercellfocus:this.handleFocus,onChange:a=>{this.filterChangeHandler(a,1)},operators:g},null)],i&&P,o.createVNode("div",{class:"k-columnmenu-actions"},[o.createVNode(M.Button,{themeColor:"primary",disabled:!I},N(e=s.toLanguageString(u.filterSubmitButton,u.messages[u.filterSubmitButton]))?e:{default:()=>[e]}),o.createVNode(M.Button,{type:"reset"},N(r=s.toLanguageString(u.filterClearButton,u.messages[u.filterClearButton]))?r:{default:()=>[r]})])])])])]})]})}});exports.GridColumnMenuFilter=A;exports.filterGroupByField=C;exports.rootFilterOrDefault=F;
|
|
@@ -5,15 +5,15 @@
|
|
|
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,
|
|
9
|
-
import {
|
|
8
|
+
import { defineComponent as K, createVNode as o, h as q, inject as A, isVNode as J } from "vue";
|
|
9
|
+
import { templateRendering as Q, getListeners as W, getTemplate as X, hasListener as S } from "@progress/kendo-vue-common";
|
|
10
10
|
import { isCompositeFilterDescriptor as L } from "@progress/kendo-data-query";
|
|
11
11
|
import { GridColumnMenuItem as Y } from "./GridColumnMenuItem.mjs";
|
|
12
12
|
import { GridColumnMenuItemGroup as Z } from "./GridColumnMenuItemGroup.mjs";
|
|
13
13
|
import { GridColumnMenuItemContent as ee } from "./GridColumnMenuItemContent.mjs";
|
|
14
14
|
import { Button as V } from "@progress/kendo-vue-buttons";
|
|
15
15
|
import { provideLocalizationService as te } from "@progress/kendo-vue-intl";
|
|
16
|
-
import {
|
|
16
|
+
import { operatorMap as h, booleanFilterValues as re, filterLogicList as ie, getFilterType as le, getDefaultOperator as oe, operators as ne } from "../filterCommon.mjs";
|
|
17
17
|
import { filterTitle as T, messages as m, filterSubmitButton as k, filterClearButton as j } from "../messages/main.mjs";
|
|
18
18
|
import { GridColumnMenuFilterCell as I } from "./GridColumnMenuFilterCell.mjs";
|
|
19
19
|
import { ColumnMenuFilterOperators as B } from "./GridColumnMenuFilterOperators.mjs";
|
|
@@ -38,7 +38,7 @@ const F = (e) => e || {
|
|
|
38
38
|
filterOperators: {
|
|
39
39
|
type: Object,
|
|
40
40
|
default: function() {
|
|
41
|
-
return
|
|
41
|
+
return ne;
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
hideSecondFilter: {
|
|
@@ -66,7 +66,7 @@ const F = (e) => e || {
|
|
|
66
66
|
created() {
|
|
67
67
|
let e;
|
|
68
68
|
if (this.$props.column && this.$props.column.field) {
|
|
69
|
-
const r =
|
|
69
|
+
const r = le(this.$props.column.filter), t = oe(this.$props.filterOperators, r);
|
|
70
70
|
e = g(this.$props.column.field, this.$props.filter), e = e ? {
|
|
71
71
|
...e,
|
|
72
72
|
filters: e.filters.map((i) => ({
|
|
@@ -189,7 +189,7 @@ const F = (e) => e || {
|
|
|
189
189
|
},
|
|
190
190
|
setup() {
|
|
191
191
|
return {
|
|
192
|
-
kendoLocalizationService:
|
|
192
|
+
kendoLocalizationService: A("kendoLocalizationService", {})
|
|
193
193
|
};
|
|
194
194
|
},
|
|
195
195
|
render() {
|
|
@@ -202,25 +202,23 @@ const F = (e) => e || {
|
|
|
202
202
|
} = this.$props;
|
|
203
203
|
if (!t || !t.field)
|
|
204
204
|
return o("div", null, null);
|
|
205
|
-
const f = t.filter || "text", s = te(this),
|
|
205
|
+
const f = t.filter || "text", s = te(this), c = this.filterGroup.filters, d = h(n[f], s), C = h(re, s), u = {
|
|
206
206
|
field: t.field,
|
|
207
|
-
value:
|
|
208
|
-
operator:
|
|
209
|
-
operators: u,
|
|
207
|
+
value: c[0].value,
|
|
208
|
+
operator: c[0].operator,
|
|
210
209
|
booleanValues: C,
|
|
211
210
|
filterType: f
|
|
212
|
-
},
|
|
211
|
+
}, p = {
|
|
213
212
|
field: t.field,
|
|
214
|
-
value:
|
|
215
|
-
operator:
|
|
216
|
-
operators: u,
|
|
213
|
+
value: c[1].value,
|
|
214
|
+
operator: c[1].operator,
|
|
217
215
|
booleanValues: C,
|
|
218
216
|
filterType: f
|
|
219
|
-
}, v = this.filterGroup.logic, $ = h(
|
|
217
|
+
}, v = this.filterGroup.logic, $ = h(ie, s), G = {
|
|
220
218
|
value: $.find((a) => a.operator === (v === null ? "" : v)),
|
|
221
219
|
data: $
|
|
222
|
-
}, D = this.currentFilterGroup().filters.length !== 0, E = this.isControlled() ? this.$props.expanded : this.currentExpanded, z =
|
|
223
|
-
h:
|
|
220
|
+
}, D = this.currentFilterGroup().filters.length !== 0, E = this.isControlled() ? this.$props.expanded : this.currentExpanded, z = u.field, H = u.value, x = u.operator, P = u.booleanValues, b = u.filterType, R = p.field, U = p.value, y = p.operator, _ = p.booleanValues, O = p.filterType, w = i && Q.call(this, i, W.call(this)), N = X.call(this, {
|
|
221
|
+
h: q,
|
|
224
222
|
template: w,
|
|
225
223
|
defaultRendering: void 0,
|
|
226
224
|
additionalProps: this.$props,
|
|
@@ -252,7 +250,7 @@ const F = (e) => e || {
|
|
|
252
250
|
onChange: (a) => {
|
|
253
251
|
this.filterChangeHandler(a, 0);
|
|
254
252
|
},
|
|
255
|
-
operators:
|
|
253
|
+
operators: d
|
|
256
254
|
}, null), o(I, {
|
|
257
255
|
field: z,
|
|
258
256
|
value: H,
|
|
@@ -263,7 +261,7 @@ const F = (e) => e || {
|
|
|
263
261
|
onChange: (a) => {
|
|
264
262
|
this.filterChangeHandler(a, 0);
|
|
265
263
|
},
|
|
266
|
-
operators:
|
|
264
|
+
operators: d
|
|
267
265
|
}, null)], !l && !i && [o(se, {
|
|
268
266
|
onChange: this.logicChange,
|
|
269
267
|
class: "k-filter-and",
|
|
@@ -276,7 +274,7 @@ const F = (e) => e || {
|
|
|
276
274
|
onChange: (a) => {
|
|
277
275
|
this.filterChangeHandler(a, 1);
|
|
278
276
|
},
|
|
279
|
-
operators:
|
|
277
|
+
operators: d
|
|
280
278
|
}, null), o(I, {
|
|
281
279
|
field: R,
|
|
282
280
|
value: U,
|
|
@@ -287,7 +285,7 @@ const F = (e) => e || {
|
|
|
287
285
|
onChange: (a) => {
|
|
288
286
|
this.filterChangeHandler(a, 1);
|
|
289
287
|
},
|
|
290
|
-
operators:
|
|
288
|
+
operators: d
|
|
291
289
|
}, null)], i && N, o("div", {
|
|
292
290
|
class: "k-columnmenu-actions"
|
|
293
291
|
}, [o(V, {
|
|
@@ -9,7 +9,7 @@ import { defineComponent as i, createVNode as r } from "vue";
|
|
|
9
9
|
import { DropDownList as a } from "@progress/kendo-vue-dropdowns";
|
|
10
10
|
import { NumericTextBox as u } from "@progress/kendo-vue-inputs";
|
|
11
11
|
import { DatePicker as s } from "@progress/kendo-vue-dateinputs";
|
|
12
|
-
import {
|
|
12
|
+
import { cellBoolDropdownChange as p, cellInputChange as h } from "../filterCommon.mjs";
|
|
13
13
|
const C = /* @__PURE__ */ i({
|
|
14
14
|
props: {
|
|
15
15
|
field: String,
|
|
@@ -31,11 +31,11 @@ const C = /* @__PURE__ */ i({
|
|
|
31
31
|
this.$emit("change", t);
|
|
32
32
|
},
|
|
33
33
|
inputChange(t, n) {
|
|
34
|
-
const o =
|
|
34
|
+
const o = h(t, n, this.$props);
|
|
35
35
|
this.triggerChange(o);
|
|
36
36
|
},
|
|
37
37
|
boolDropdownChange(t, n) {
|
|
38
|
-
const o =
|
|
38
|
+
const o = p(t.value.operator, n);
|
|
39
39
|
this.triggerChange(o);
|
|
40
40
|
}
|
|
41
41
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as l, createVNode as n } from "vue";
|
|
9
|
-
import {
|
|
9
|
+
import { Icon as c, Keys as m } from "@progress/kendo-vue-common";
|
|
10
10
|
const u = /* @__PURE__ */ l({
|
|
11
11
|
props: {
|
|
12
12
|
title: String,
|
|
@@ -5,7 +5,7 @@
|
|
|
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,
|
|
8
|
+
import { defineComponent as k, createVNode as n, inject as I } from "vue";
|
|
9
9
|
import { GridColumnMenuItem as a } from "./GridColumnMenuItem.mjs";
|
|
10
10
|
import { GridColumnMenuItemGroup as L } from "./GridColumnMenuItemGroup.mjs";
|
|
11
11
|
import { normalize as z } from "../interfaces/GridSortSettings.mjs";
|