@progress/kendo-vue-data-tools 3.5.0 → 3.5.1-dev.202208150613
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/dist/cdn/js/kendo-vue-data-tools.js +1 -1
- package/dist/es/filter/FieldSettings.js +1 -0
- package/dist/es/filter/GroupToolbar.js +8 -12
- package/dist/es/filter/operators.js +12 -10
- package/dist/es/filteringCells/FilterCellProps.js +1 -0
- package/dist/es/filteringCells/FilterComponentProps.js +1 -0
- package/dist/es/filteringCells/FilterOperator.js +1 -0
- package/dist/es/navigation/TableKeyboardNavigation.js +7 -11
- package/dist/es/navigation/TableKeyboardNavigationContextType.js +1 -0
- package/dist/es/navigation/TableKeyboardNavigationStateType.js +1 -0
- package/dist/es/navigation/constants.js +8 -12
- package/dist/es/navigation/utils.d.ts +32 -4
- package/dist/es/navigation/utils.js +10 -10
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/pager/Page.js +1 -0
- package/dist/es/pager/PagerInput.js +1 -1
- package/dist/es/virtualization/columns.js +9 -7
- package/dist/esm/additionalTypes.ts +21 -0
- package/dist/esm/filter/Expression.d.ts +73 -0
- package/dist/esm/filter/Expression.js +495 -0
- package/dist/esm/filter/FieldSettings.d.ts +22 -0
- package/dist/esm/filter/FieldSettings.js +1 -0
- package/dist/esm/filter/Filter.d.ts +83 -0
- package/dist/esm/filter/Filter.js +169 -0
- package/dist/esm/filter/GroupFilters.d.ts +72 -0
- package/dist/esm/filter/GroupFilters.js +166 -0
- package/dist/esm/filter/GroupToolbar.d.ts +74 -0
- package/dist/esm/filter/GroupToolbar.js +586 -0
- package/dist/esm/filter/filters/BooleanFilter.d.ts +61 -0
- package/dist/esm/filter/filters/BooleanFilter.js +75 -0
- package/dist/esm/filter/filters/DateFilter.d.ts +49 -0
- package/dist/esm/filter/filters/DateFilter.js +73 -0
- package/dist/esm/filter/filters/EnumFilter.d.ts +59 -0
- package/dist/esm/filter/filters/EnumFilter.js +102 -0
- package/dist/esm/filter/filters/NumericFilter.d.ts +48 -0
- package/dist/esm/filter/filters/NumericFilter.js +73 -0
- package/dist/esm/filter/filters/TextFilter.d.ts +60 -0
- package/dist/esm/filter/filters/TextFilter.js +72 -0
- package/dist/esm/filter/filters/index.d.ts +5 -0
- package/dist/esm/filter/filters/index.js +5 -0
- package/dist/esm/filter/index.d.ts +6 -0
- package/dist/esm/filter/index.js +6 -0
- package/dist/esm/filter/operators.d.ts +73 -0
- package/dist/esm/filter/operators.js +150 -0
- package/dist/esm/filteringCells/FilterCellProps.d.ts +35 -0
- package/dist/esm/filteringCells/FilterCellProps.js +1 -0
- package/dist/esm/filteringCells/FilterComponentProps.d.ts +11 -0
- package/dist/esm/filteringCells/FilterComponentProps.js +1 -0
- package/dist/esm/filteringCells/FilterOperator.d.ts +13 -0
- package/dist/esm/filteringCells/FilterOperator.js +1 -0
- package/dist/esm/filteringCells/index.d.ts +3 -0
- package/dist/esm/filteringCells/index.js +8 -0
- package/dist/esm/header/HeaderThElement.d.ts +42 -0
- package/dist/esm/header/HeaderThElement.js +110 -0
- package/dist/esm/main.d.ts +18 -0
- package/dist/esm/main.js +17 -0
- package/dist/esm/messages/index.d.ts +315 -0
- package/dist/esm/messages/index.js +316 -0
- package/dist/esm/navigation/TableKeyboardNavigation.d.ts +41 -0
- package/dist/esm/navigation/TableKeyboardNavigation.js +371 -0
- package/dist/esm/navigation/TableKeyboardNavigationContextType.d.ts +7 -0
- package/dist/esm/navigation/TableKeyboardNavigationContextType.js +1 -0
- package/dist/esm/navigation/TableKeyboardNavigationStateType.d.ts +10 -0
- package/dist/esm/navigation/TableKeyboardNavigationStateType.js +1 -0
- package/dist/esm/navigation/constants.d.ts +54 -0
- package/dist/esm/navigation/constants.js +75 -0
- package/dist/esm/navigation/utils.d.ts +161 -0
- package/dist/esm/navigation/utils.js +212 -0
- package/dist/esm/package-metadata.d.ts +5 -0
- package/dist/esm/package-metadata.js +11 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pager/GridPagerSettings.d.ts +62 -0
- package/dist/esm/pager/GridPagerSettings.js +22 -0
- package/dist/esm/pager/Page.d.ts +13 -0
- package/dist/esm/pager/Page.js +1 -0
- package/dist/esm/pager/Pager.d.ts +98 -0
- package/dist/esm/pager/Pager.js +398 -0
- package/dist/esm/pager/PagerInfo.d.ts +51 -0
- package/dist/esm/pager/PagerInfo.js +59 -0
- package/dist/esm/pager/PagerInput.d.ts +50 -0
- package/dist/esm/pager/PagerInput.js +101 -0
- package/dist/esm/pager/PagerNavigationButton.d.ts +50 -0
- package/dist/esm/pager/PagerNavigationButton.js +67 -0
- package/dist/esm/pager/PagerNumericButtons.d.ts +50 -0
- package/dist/esm/pager/PagerNumericButtons.js +147 -0
- package/dist/esm/pager/PagerPageSizes.d.ts +51 -0
- package/dist/esm/pager/PagerPageSizes.js +85 -0
- package/dist/esm/virtualization/columns.d.ts +15 -0
- package/dist/esm/virtualization/columns.js +75 -0
- package/dist/esm/virtualization/index.d.ts +1 -0
- package/dist/esm/virtualization/index.js +1 -0
- package/dist/npm/filter/Expression.js +5 -5
- package/dist/npm/filter/Filter.js +1 -1
- package/dist/npm/filter/GroupFilters.js +1 -1
- package/dist/npm/filter/GroupToolbar.js +10 -14
- package/dist/npm/filter/filters/EnumFilter.js +1 -1
- package/dist/npm/filter/filters/index.js +6 -2
- package/dist/npm/filter/index.js +6 -2
- package/dist/npm/filter/operators.js +16 -12
- package/dist/npm/filteringCells/index.js +6 -2
- package/dist/npm/header/HeaderThElement.js +1 -1
- package/dist/npm/main.js +7 -3
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/navigation/TableKeyboardNavigation.js +15 -19
- package/dist/npm/navigation/constants.js +8 -12
- package/dist/npm/navigation/utils.d.ts +32 -4
- package/dist/npm/navigation/utils.js +53 -33
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/pager/GridPagerSettings.js +2 -1
- package/dist/npm/pager/Pager.js +1 -1
- package/dist/npm/pager/PagerInfo.js +2 -2
- package/dist/npm/pager/PagerInput.js +3 -3
- package/dist/npm/pager/PagerPageSizes.js +1 -1
- package/dist/npm/virtualization/columns.js +9 -7
- package/dist/npm/virtualization/index.js +6 -2
- package/package.json +16 -10
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
18
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
+
if (ar || !(i in from)) {
|
|
20
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
+
ar[i] = from[i];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
+
}; // @ts-ignore
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
import * as Vue from 'vue';
|
|
29
|
+
var allVue = Vue;
|
|
30
|
+
var gh = allVue.h;
|
|
31
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
32
|
+
import { Button, Toolbar, ToolbarItem, ButtonGroup } from '@progress/kendo-vue-buttons';
|
|
33
|
+
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
34
|
+
import { stringOperator } from './operators.js';
|
|
35
|
+
import { messages, filterAndLogic, filterOrLogic, filterAddExpression, filterAddGroup, filterClose } from '../messages.js';
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
var GroupToolbarVue2 = {
|
|
41
|
+
name: 'KendoFilterGroup',
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
emits: {
|
|
44
|
+
change: null,
|
|
45
|
+
remove: null
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
filter: {
|
|
49
|
+
type: Object,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
fields: {
|
|
53
|
+
type: Array,
|
|
54
|
+
required: true
|
|
55
|
+
},
|
|
56
|
+
defaultGroupFilter: {
|
|
57
|
+
type: Object,
|
|
58
|
+
required: true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
inject: {
|
|
62
|
+
kendoLocalizationService: {
|
|
63
|
+
default: null
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
setup: !isV3 ? undefined : function () {
|
|
68
|
+
var v3 = !!isV3;
|
|
69
|
+
return {
|
|
70
|
+
v3: v3
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
render: function render(createElement) {
|
|
74
|
+
var _this = this;
|
|
75
|
+
|
|
76
|
+
var h = gh || createElement;
|
|
77
|
+
var _a = this.$props,
|
|
78
|
+
fields = _a.fields,
|
|
79
|
+
filter = _a.filter;
|
|
80
|
+
var locService = provideLocalizationService(this);
|
|
81
|
+
return h("div", {
|
|
82
|
+
"class": "k-filter-toolbar"
|
|
83
|
+
}, [// @ts-ignore function children
|
|
84
|
+
h(Toolbar, {
|
|
85
|
+
keyboardNavigation: false,
|
|
86
|
+
attrs: this.v3 ? undefined : {
|
|
87
|
+
keyboardNavigation: false
|
|
88
|
+
}
|
|
89
|
+
}, this.v3 ? function () {
|
|
90
|
+
return [// @ts-ignore function children
|
|
91
|
+
h(ToolbarItem, _this.v3 ? function () {
|
|
92
|
+
return [// @ts-ignore function children
|
|
93
|
+
h(ButtonGroup, _this.v3 ? function () {
|
|
94
|
+
return [// @ts-ignore function children
|
|
95
|
+
h(Button, {
|
|
96
|
+
togglable: true,
|
|
97
|
+
attrs: _this.v3 ? undefined : {
|
|
98
|
+
togglable: true,
|
|
99
|
+
selected: filter.logic === 'and',
|
|
100
|
+
type: "button"
|
|
101
|
+
},
|
|
102
|
+
onClick: _this.onLogicAnd,
|
|
103
|
+
on: _this.v3 ? undefined : {
|
|
104
|
+
"click": _this.onLogicAnd
|
|
105
|
+
},
|
|
106
|
+
selected: filter.logic === 'and',
|
|
107
|
+
type: "button"
|
|
108
|
+
}, _this.v3 ? function () {
|
|
109
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
110
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), // @ts-ignore function children
|
|
111
|
+
h(Button, {
|
|
112
|
+
togglable: true,
|
|
113
|
+
attrs: _this.v3 ? undefined : {
|
|
114
|
+
togglable: true,
|
|
115
|
+
selected: filter.logic === 'or',
|
|
116
|
+
type: "button"
|
|
117
|
+
},
|
|
118
|
+
onClick: _this.onLogicOr,
|
|
119
|
+
on: _this.v3 ? undefined : {
|
|
120
|
+
"click": _this.onLogicOr
|
|
121
|
+
},
|
|
122
|
+
selected: filter.logic === 'or',
|
|
123
|
+
type: "button"
|
|
124
|
+
}, _this.v3 ? function () {
|
|
125
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
126
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])];
|
|
127
|
+
} : [h(Button, {
|
|
128
|
+
togglable: true,
|
|
129
|
+
attrs: _this.v3 ? undefined : {
|
|
130
|
+
togglable: true,
|
|
131
|
+
selected: filter.logic === 'and',
|
|
132
|
+
type: "button"
|
|
133
|
+
},
|
|
134
|
+
onClick: _this.onLogicAnd,
|
|
135
|
+
on: _this.v3 ? undefined : {
|
|
136
|
+
"click": _this.onLogicAnd
|
|
137
|
+
},
|
|
138
|
+
selected: filter.logic === 'and',
|
|
139
|
+
type: "button"
|
|
140
|
+
}, _this.v3 ? function () {
|
|
141
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
142
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
143
|
+
togglable: true,
|
|
144
|
+
attrs: _this.v3 ? undefined : {
|
|
145
|
+
togglable: true,
|
|
146
|
+
selected: filter.logic === 'or',
|
|
147
|
+
type: "button"
|
|
148
|
+
},
|
|
149
|
+
onClick: _this.onLogicOr,
|
|
150
|
+
on: _this.v3 ? undefined : {
|
|
151
|
+
"click": _this.onLogicOr
|
|
152
|
+
},
|
|
153
|
+
selected: filter.logic === 'or',
|
|
154
|
+
type: "button"
|
|
155
|
+
}, _this.v3 ? function () {
|
|
156
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
157
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])];
|
|
158
|
+
} : [h(ButtonGroup, _this.v3 ? function () {
|
|
159
|
+
return [h(Button, {
|
|
160
|
+
togglable: true,
|
|
161
|
+
attrs: _this.v3 ? undefined : {
|
|
162
|
+
togglable: true,
|
|
163
|
+
selected: filter.logic === 'and',
|
|
164
|
+
type: "button"
|
|
165
|
+
},
|
|
166
|
+
onClick: _this.onLogicAnd,
|
|
167
|
+
on: _this.v3 ? undefined : {
|
|
168
|
+
"click": _this.onLogicAnd
|
|
169
|
+
},
|
|
170
|
+
selected: filter.logic === 'and',
|
|
171
|
+
type: "button"
|
|
172
|
+
}, _this.v3 ? function () {
|
|
173
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
174
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
175
|
+
togglable: true,
|
|
176
|
+
attrs: _this.v3 ? undefined : {
|
|
177
|
+
togglable: true,
|
|
178
|
+
selected: filter.logic === 'or',
|
|
179
|
+
type: "button"
|
|
180
|
+
},
|
|
181
|
+
onClick: _this.onLogicOr,
|
|
182
|
+
on: _this.v3 ? undefined : {
|
|
183
|
+
"click": _this.onLogicOr
|
|
184
|
+
},
|
|
185
|
+
selected: filter.logic === 'or',
|
|
186
|
+
type: "button"
|
|
187
|
+
}, _this.v3 ? function () {
|
|
188
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
189
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])];
|
|
190
|
+
} : [h(Button, {
|
|
191
|
+
togglable: true,
|
|
192
|
+
attrs: _this.v3 ? undefined : {
|
|
193
|
+
togglable: true,
|
|
194
|
+
selected: filter.logic === 'and',
|
|
195
|
+
type: "button"
|
|
196
|
+
},
|
|
197
|
+
onClick: _this.onLogicAnd,
|
|
198
|
+
on: _this.v3 ? undefined : {
|
|
199
|
+
"click": _this.onLogicAnd
|
|
200
|
+
},
|
|
201
|
+
selected: filter.logic === 'and',
|
|
202
|
+
type: "button"
|
|
203
|
+
}, _this.v3 ? function () {
|
|
204
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
205
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
206
|
+
togglable: true,
|
|
207
|
+
attrs: _this.v3 ? undefined : {
|
|
208
|
+
togglable: true,
|
|
209
|
+
selected: filter.logic === 'or',
|
|
210
|
+
type: "button"
|
|
211
|
+
},
|
|
212
|
+
onClick: _this.onLogicOr,
|
|
213
|
+
on: _this.v3 ? undefined : {
|
|
214
|
+
"click": _this.onLogicOr
|
|
215
|
+
},
|
|
216
|
+
selected: filter.logic === 'or',
|
|
217
|
+
type: "button"
|
|
218
|
+
}, _this.v3 ? function () {
|
|
219
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
220
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])]), // @ts-ignore function children
|
|
221
|
+
h(ToolbarItem, _this.v3 ? function () {
|
|
222
|
+
return [// @ts-ignore function children
|
|
223
|
+
h(Button, {
|
|
224
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
225
|
+
attrs: _this.v3 ? undefined : {
|
|
226
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
227
|
+
icon: "filter-add-expression",
|
|
228
|
+
type: "button"
|
|
229
|
+
},
|
|
230
|
+
icon: "filter-add-expression",
|
|
231
|
+
type: "button",
|
|
232
|
+
onClick: _this.onAddExpression,
|
|
233
|
+
on: _this.v3 ? undefined : {
|
|
234
|
+
"click": _this.onAddExpression
|
|
235
|
+
}
|
|
236
|
+
})];
|
|
237
|
+
} : [h(Button, {
|
|
238
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
239
|
+
attrs: _this.v3 ? undefined : {
|
|
240
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
241
|
+
icon: "filter-add-expression",
|
|
242
|
+
type: "button"
|
|
243
|
+
},
|
|
244
|
+
icon: "filter-add-expression",
|
|
245
|
+
type: "button",
|
|
246
|
+
onClick: _this.onAddExpression,
|
|
247
|
+
on: _this.v3 ? undefined : {
|
|
248
|
+
"click": _this.onAddExpression
|
|
249
|
+
}
|
|
250
|
+
})]), // @ts-ignore function children
|
|
251
|
+
h(ToolbarItem, _this.v3 ? function () {
|
|
252
|
+
return [// @ts-ignore function children
|
|
253
|
+
h(Button, {
|
|
254
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
255
|
+
attrs: _this.v3 ? undefined : {
|
|
256
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
257
|
+
icon: "filter-add-group",
|
|
258
|
+
type: "button"
|
|
259
|
+
},
|
|
260
|
+
icon: "filter-add-group",
|
|
261
|
+
type: "button",
|
|
262
|
+
onClick: _this.onAddGroup,
|
|
263
|
+
on: _this.v3 ? undefined : {
|
|
264
|
+
"click": _this.onAddGroup
|
|
265
|
+
}
|
|
266
|
+
})];
|
|
267
|
+
} : [h(Button, {
|
|
268
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
269
|
+
attrs: _this.v3 ? undefined : {
|
|
270
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
271
|
+
icon: "filter-add-group",
|
|
272
|
+
type: "button"
|
|
273
|
+
},
|
|
274
|
+
icon: "filter-add-group",
|
|
275
|
+
type: "button",
|
|
276
|
+
onClick: _this.onAddGroup,
|
|
277
|
+
on: _this.v3 ? undefined : {
|
|
278
|
+
"click": _this.onAddGroup
|
|
279
|
+
}
|
|
280
|
+
})]), // @ts-ignore function children
|
|
281
|
+
h(ToolbarItem, _this.v3 ? function () {
|
|
282
|
+
return [// @ts-ignore function children
|
|
283
|
+
h(Button, {
|
|
284
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
285
|
+
attrs: _this.v3 ? undefined : {
|
|
286
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
287
|
+
icon: "close",
|
|
288
|
+
look: "flat",
|
|
289
|
+
type: "button"
|
|
290
|
+
},
|
|
291
|
+
icon: "close",
|
|
292
|
+
look: "flat",
|
|
293
|
+
type: "button",
|
|
294
|
+
onClick: _this.onGroupRemove,
|
|
295
|
+
on: _this.v3 ? undefined : {
|
|
296
|
+
"click": _this.onGroupRemove
|
|
297
|
+
}
|
|
298
|
+
})];
|
|
299
|
+
} : [h(Button, {
|
|
300
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
301
|
+
attrs: _this.v3 ? undefined : {
|
|
302
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
303
|
+
icon: "close",
|
|
304
|
+
look: "flat",
|
|
305
|
+
type: "button"
|
|
306
|
+
},
|
|
307
|
+
icon: "close",
|
|
308
|
+
look: "flat",
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: _this.onGroupRemove,
|
|
311
|
+
on: _this.v3 ? undefined : {
|
|
312
|
+
"click": _this.onGroupRemove
|
|
313
|
+
}
|
|
314
|
+
})])];
|
|
315
|
+
} : [h(ToolbarItem, _this.v3 ? function () {
|
|
316
|
+
return [h(ButtonGroup, _this.v3 ? function () {
|
|
317
|
+
return [h(Button, {
|
|
318
|
+
togglable: true,
|
|
319
|
+
attrs: _this.v3 ? undefined : {
|
|
320
|
+
togglable: true,
|
|
321
|
+
selected: filter.logic === 'and',
|
|
322
|
+
type: "button"
|
|
323
|
+
},
|
|
324
|
+
onClick: _this.onLogicAnd,
|
|
325
|
+
on: _this.v3 ? undefined : {
|
|
326
|
+
"click": _this.onLogicAnd
|
|
327
|
+
},
|
|
328
|
+
selected: filter.logic === 'and',
|
|
329
|
+
type: "button"
|
|
330
|
+
}, _this.v3 ? function () {
|
|
331
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
332
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
333
|
+
togglable: true,
|
|
334
|
+
attrs: _this.v3 ? undefined : {
|
|
335
|
+
togglable: true,
|
|
336
|
+
selected: filter.logic === 'or',
|
|
337
|
+
type: "button"
|
|
338
|
+
},
|
|
339
|
+
onClick: _this.onLogicOr,
|
|
340
|
+
on: _this.v3 ? undefined : {
|
|
341
|
+
"click": _this.onLogicOr
|
|
342
|
+
},
|
|
343
|
+
selected: filter.logic === 'or',
|
|
344
|
+
type: "button"
|
|
345
|
+
}, _this.v3 ? function () {
|
|
346
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
347
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])];
|
|
348
|
+
} : [h(Button, {
|
|
349
|
+
togglable: true,
|
|
350
|
+
attrs: _this.v3 ? undefined : {
|
|
351
|
+
togglable: true,
|
|
352
|
+
selected: filter.logic === 'and',
|
|
353
|
+
type: "button"
|
|
354
|
+
},
|
|
355
|
+
onClick: _this.onLogicAnd,
|
|
356
|
+
on: _this.v3 ? undefined : {
|
|
357
|
+
"click": _this.onLogicAnd
|
|
358
|
+
},
|
|
359
|
+
selected: filter.logic === 'and',
|
|
360
|
+
type: "button"
|
|
361
|
+
}, _this.v3 ? function () {
|
|
362
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
363
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
364
|
+
togglable: true,
|
|
365
|
+
attrs: _this.v3 ? undefined : {
|
|
366
|
+
togglable: true,
|
|
367
|
+
selected: filter.logic === 'or',
|
|
368
|
+
type: "button"
|
|
369
|
+
},
|
|
370
|
+
onClick: _this.onLogicOr,
|
|
371
|
+
on: _this.v3 ? undefined : {
|
|
372
|
+
"click": _this.onLogicOr
|
|
373
|
+
},
|
|
374
|
+
selected: filter.logic === 'or',
|
|
375
|
+
type: "button"
|
|
376
|
+
}, _this.v3 ? function () {
|
|
377
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
378
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])];
|
|
379
|
+
} : [h(ButtonGroup, _this.v3 ? function () {
|
|
380
|
+
return [h(Button, {
|
|
381
|
+
togglable: true,
|
|
382
|
+
attrs: _this.v3 ? undefined : {
|
|
383
|
+
togglable: true,
|
|
384
|
+
selected: filter.logic === 'and',
|
|
385
|
+
type: "button"
|
|
386
|
+
},
|
|
387
|
+
onClick: _this.onLogicAnd,
|
|
388
|
+
on: _this.v3 ? undefined : {
|
|
389
|
+
"click": _this.onLogicAnd
|
|
390
|
+
},
|
|
391
|
+
selected: filter.logic === 'and',
|
|
392
|
+
type: "button"
|
|
393
|
+
}, _this.v3 ? function () {
|
|
394
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
395
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
396
|
+
togglable: true,
|
|
397
|
+
attrs: _this.v3 ? undefined : {
|
|
398
|
+
togglable: true,
|
|
399
|
+
selected: filter.logic === 'or',
|
|
400
|
+
type: "button"
|
|
401
|
+
},
|
|
402
|
+
onClick: _this.onLogicOr,
|
|
403
|
+
on: _this.v3 ? undefined : {
|
|
404
|
+
"click": _this.onLogicOr
|
|
405
|
+
},
|
|
406
|
+
selected: filter.logic === 'or',
|
|
407
|
+
type: "button"
|
|
408
|
+
}, _this.v3 ? function () {
|
|
409
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
410
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])];
|
|
411
|
+
} : [h(Button, {
|
|
412
|
+
togglable: true,
|
|
413
|
+
attrs: _this.v3 ? undefined : {
|
|
414
|
+
togglable: true,
|
|
415
|
+
selected: filter.logic === 'and',
|
|
416
|
+
type: "button"
|
|
417
|
+
},
|
|
418
|
+
onClick: _this.onLogicAnd,
|
|
419
|
+
on: _this.v3 ? undefined : {
|
|
420
|
+
"click": _this.onLogicAnd
|
|
421
|
+
},
|
|
422
|
+
selected: filter.logic === 'and',
|
|
423
|
+
type: "button"
|
|
424
|
+
}, _this.v3 ? function () {
|
|
425
|
+
return [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])];
|
|
426
|
+
} : [locService.toLanguageString(filterAndLogic, messages[filterAndLogic])]), h(Button, {
|
|
427
|
+
togglable: true,
|
|
428
|
+
attrs: _this.v3 ? undefined : {
|
|
429
|
+
togglable: true,
|
|
430
|
+
selected: filter.logic === 'or',
|
|
431
|
+
type: "button"
|
|
432
|
+
},
|
|
433
|
+
onClick: _this.onLogicOr,
|
|
434
|
+
on: _this.v3 ? undefined : {
|
|
435
|
+
"click": _this.onLogicOr
|
|
436
|
+
},
|
|
437
|
+
selected: filter.logic === 'or',
|
|
438
|
+
type: "button"
|
|
439
|
+
}, _this.v3 ? function () {
|
|
440
|
+
return [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])];
|
|
441
|
+
} : [locService.toLanguageString(filterOrLogic, messages[filterOrLogic])])])]), h(ToolbarItem, _this.v3 ? function () {
|
|
442
|
+
return [h(Button, {
|
|
443
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
444
|
+
attrs: _this.v3 ? undefined : {
|
|
445
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
446
|
+
icon: "filter-add-expression",
|
|
447
|
+
type: "button"
|
|
448
|
+
},
|
|
449
|
+
icon: "filter-add-expression",
|
|
450
|
+
type: "button",
|
|
451
|
+
onClick: _this.onAddExpression,
|
|
452
|
+
on: _this.v3 ? undefined : {
|
|
453
|
+
"click": _this.onAddExpression
|
|
454
|
+
}
|
|
455
|
+
})];
|
|
456
|
+
} : [h(Button, {
|
|
457
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
458
|
+
attrs: _this.v3 ? undefined : {
|
|
459
|
+
title: locService.toLanguageString(filterAddExpression, messages[filterAddExpression]),
|
|
460
|
+
icon: "filter-add-expression",
|
|
461
|
+
type: "button"
|
|
462
|
+
},
|
|
463
|
+
icon: "filter-add-expression",
|
|
464
|
+
type: "button",
|
|
465
|
+
onClick: _this.onAddExpression,
|
|
466
|
+
on: _this.v3 ? undefined : {
|
|
467
|
+
"click": _this.onAddExpression
|
|
468
|
+
}
|
|
469
|
+
})]), h(ToolbarItem, _this.v3 ? function () {
|
|
470
|
+
return [h(Button, {
|
|
471
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
472
|
+
attrs: _this.v3 ? undefined : {
|
|
473
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
474
|
+
icon: "filter-add-group",
|
|
475
|
+
type: "button"
|
|
476
|
+
},
|
|
477
|
+
icon: "filter-add-group",
|
|
478
|
+
type: "button",
|
|
479
|
+
onClick: _this.onAddGroup,
|
|
480
|
+
on: _this.v3 ? undefined : {
|
|
481
|
+
"click": _this.onAddGroup
|
|
482
|
+
}
|
|
483
|
+
})];
|
|
484
|
+
} : [h(Button, {
|
|
485
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
486
|
+
attrs: _this.v3 ? undefined : {
|
|
487
|
+
title: locService.toLanguageString(filterAddGroup, messages[filterAddGroup]),
|
|
488
|
+
icon: "filter-add-group",
|
|
489
|
+
type: "button"
|
|
490
|
+
},
|
|
491
|
+
icon: "filter-add-group",
|
|
492
|
+
type: "button",
|
|
493
|
+
onClick: _this.onAddGroup,
|
|
494
|
+
on: _this.v3 ? undefined : {
|
|
495
|
+
"click": _this.onAddGroup
|
|
496
|
+
}
|
|
497
|
+
})]), h(ToolbarItem, _this.v3 ? function () {
|
|
498
|
+
return [h(Button, {
|
|
499
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
500
|
+
attrs: _this.v3 ? undefined : {
|
|
501
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
502
|
+
icon: "close",
|
|
503
|
+
look: "flat",
|
|
504
|
+
type: "button"
|
|
505
|
+
},
|
|
506
|
+
icon: "close",
|
|
507
|
+
look: "flat",
|
|
508
|
+
type: "button",
|
|
509
|
+
onClick: _this.onGroupRemove,
|
|
510
|
+
on: _this.v3 ? undefined : {
|
|
511
|
+
"click": _this.onGroupRemove
|
|
512
|
+
}
|
|
513
|
+
})];
|
|
514
|
+
} : [h(Button, {
|
|
515
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
516
|
+
attrs: _this.v3 ? undefined : {
|
|
517
|
+
title: locService.toLanguageString(filterClose, messages[filterClose]),
|
|
518
|
+
icon: "close",
|
|
519
|
+
look: "flat",
|
|
520
|
+
type: "button"
|
|
521
|
+
},
|
|
522
|
+
icon: "close",
|
|
523
|
+
look: "flat",
|
|
524
|
+
type: "button",
|
|
525
|
+
onClick: _this.onGroupRemove,
|
|
526
|
+
on: _this.v3 ? undefined : {
|
|
527
|
+
"click": _this.onGroupRemove
|
|
528
|
+
}
|
|
529
|
+
})])])]);
|
|
530
|
+
},
|
|
531
|
+
methods: {
|
|
532
|
+
onGroupRemove: function onGroupRemove() {
|
|
533
|
+
this.$emit('remove', {
|
|
534
|
+
filter: this.$props.filter
|
|
535
|
+
});
|
|
536
|
+
},
|
|
537
|
+
onAddExpression: function onAddExpression() {
|
|
538
|
+
var prevFilter = this.$props.filter;
|
|
539
|
+
var firstField = this.$props.fields[0];
|
|
540
|
+
var newExpression = {
|
|
541
|
+
field: firstField.name,
|
|
542
|
+
operator: firstField.operators[0].operator
|
|
543
|
+
};
|
|
544
|
+
newExpression.value = stringOperator(newExpression.operator) ? '' : null;
|
|
545
|
+
this.$emit('change', {
|
|
546
|
+
nextFilter: __assign(__assign({}, prevFilter), {
|
|
547
|
+
filters: __spreadArray(__spreadArray([], prevFilter.filters, true), [newExpression], false)
|
|
548
|
+
}),
|
|
549
|
+
prevFilter: prevFilter
|
|
550
|
+
});
|
|
551
|
+
},
|
|
552
|
+
onAddGroup: function onAddGroup() {
|
|
553
|
+
var prevFilter = this.$props.filter;
|
|
554
|
+
this.$emit('change', {
|
|
555
|
+
nextFilter: __assign(__assign({}, prevFilter), {
|
|
556
|
+
filters: __spreadArray(__spreadArray([], prevFilter.filters, true), [__assign({}, this.$props.defaultGroupFilter)], false)
|
|
557
|
+
}),
|
|
558
|
+
prevFilter: prevFilter
|
|
559
|
+
});
|
|
560
|
+
},
|
|
561
|
+
onLogicAnd: function onLogicAnd() {
|
|
562
|
+
this.changeLogic('and');
|
|
563
|
+
},
|
|
564
|
+
onLogicOr: function onLogicOr() {
|
|
565
|
+
this.changeLogic('or');
|
|
566
|
+
},
|
|
567
|
+
changeLogic: function changeLogic(logic) {
|
|
568
|
+
var prevFilter = this.$props.filter;
|
|
569
|
+
|
|
570
|
+
if (prevFilter.logic !== logic) {
|
|
571
|
+
this.$emit('change', {
|
|
572
|
+
nextFilter: __assign(__assign({}, prevFilter), {
|
|
573
|
+
logic: logic
|
|
574
|
+
}),
|
|
575
|
+
prevFilter: prevFilter
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* @hidden
|
|
583
|
+
*/
|
|
584
|
+
|
|
585
|
+
var GroupToolbar = GroupToolbarVue2;
|
|
586
|
+
export { GroupToolbar, GroupToolbarVue2 };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
import { TextFilterProps } from './TextFilter';
|
|
7
|
+
/**
|
|
8
|
+
* The props of the BooleanFilter component.
|
|
9
|
+
*/
|
|
10
|
+
export interface BooleanFilterProps extends TextFilterProps {
|
|
11
|
+
/**
|
|
12
|
+
* A collection of text-value pairs passed to the BooleanFilter DropDownList.
|
|
13
|
+
* Defaults to [ { text: 'True', value: true }, { text: 'False', value: false } ]
|
|
14
|
+
*/
|
|
15
|
+
dataItems?: Array<{
|
|
16
|
+
text: string;
|
|
17
|
+
value: any;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* The defaultItem passed to the BooleanFilter DropDownList.
|
|
21
|
+
*/
|
|
22
|
+
defaultItem?: any;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export interface BooleanFilterState {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export interface BooleanFilterComputed {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @hidden
|
|
37
|
+
*/
|
|
38
|
+
export interface BooleanFilterMethods {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
handleFilterChange: (event: any) => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
export interface BooleanFilterData {
|
|
46
|
+
currentData: object[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @hidden
|
|
50
|
+
*/
|
|
51
|
+
export interface BooleanFilterAll extends Vue2type, BooleanFilterMethods, BooleanFilterData, BooleanFilterComputed, BooleanFilterState {
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
declare let BooleanFilterVue2: ComponentOptions<BooleanFilterAll, DefaultData<BooleanFilterData>, DefaultMethods<BooleanFilterAll>, BooleanFilterComputed, RecordPropsDefinition<BooleanFilterProps>>;
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
declare const BooleanFilter: DefineComponent<BooleanFilterProps, any, BooleanFilterData, BooleanFilterComputed, BooleanFilterMethods, {}, {}, {}, string, BooleanFilterProps, BooleanFilterProps, {}>;
|
|
61
|
+
export { BooleanFilter, BooleanFilterVue2 };
|