@progress/kendo-vue-dropdowns 9.3.0-develop.2 → 9.3.0-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.
@@ -5,36 +5,37 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as $e, h as _, createVNode as l, ref as Q, inject as Fe, isVNode as Te } from "vue";
9
- import { templateRendering as b, getListeners as I, Keys as f, canUseDOM as Oe, getRef as X, guid as Z, classNames as R, kendoThemeMaps as Ve, setRef as we, Icon as Re } from "@progress/kendo-vue-common";
10
- import { ListContainer as De } from "../common/ListContainer.mjs";
11
- import { List as Be } from "../common/List.mjs";
12
- import { TagList as Me } from "./TagList.mjs";
13
- import { SearchBar as Ae } from "../common/SearchBar.mjs";
14
- import Le from "../common/DropDownBase.mjs";
15
- import { GroupStickyHeader as ee } from "../common/GroupStickyHeader.mjs";
16
- import { ClearButton as He } from "../common/ClearButton.mjs";
17
- import { ActiveDescendant as L } from "../common/settings.mjs";
18
- import { getItemValue as x, itemIndexStartsWith as Ee, areSame as te, removeDataItems as H, isPresent as Pe, preventDefaultNonInputs as Ne, matchDataCollections as Ke } from "../common/utils.mjs";
19
- import { xIcon as _e, plusIcon as je } from "@progress/kendo-svg-icons";
20
- import { Button as j } from "@progress/kendo-vue-buttons";
21
- import { MOBILE_MEDIUM_DEVICE as ze, MOBILE_SMALL_DEVICE as We } from "../common/constants.mjs";
22
- import { ActionSheet as Ge } from "@progress/kendo-vue-layout";
23
- import { ListFilter as qe } from "../common/ListFilter.mjs";
24
- import { provideLocalizationService as Ue } from "@progress/kendo-vue-intl";
25
- import { adaptiveModeFooterCancel as se, messages as ie, adaptiveModeFooterApply as ne } from "../messages/main.mjs";
8
+ import { defineComponent as Ve, h as q, createVNode as r, ref as ee, inject as we, isVNode as He, mergeProps as De } from "vue";
9
+ import { templateRendering as C, getListeners as F, Keys as h, canUseDOM as Re, getRef as te, guid as se, classNames as B, kendoThemeMaps as Be, setRef as Me } from "@progress/kendo-vue-common";
10
+ import { ListContainer as Le } from "../common/ListContainer.mjs";
11
+ import { List as Pe } from "../common/List.mjs";
12
+ import { TagList as Ee } from "./TagList.mjs";
13
+ import { SearchBar as Ne } from "../common/SearchBar.mjs";
14
+ import Ke from "../common/DropDownBase.mjs";
15
+ import { GroupStickyHeader as ie } from "../common/GroupStickyHeader.mjs";
16
+ import { ClearButton as ze } from "../common/ClearButton.mjs";
17
+ import { ActiveDescendant as K } from "../common/settings.mjs";
18
+ import { getItemValue as O, areSame as V, itemIndexStartsWith as _e, removeDataItems as z, isPresent as je, preventDefaultNonInputs as We, matchDataCollections as qe } from "../common/utils.mjs";
19
+ import { xIcon as Ge } from "@progress/kendo-svg-icons";
20
+ import { Button as G } from "@progress/kendo-vue-buttons";
21
+ import { Checkbox as Ue } from "@progress/kendo-vue-inputs";
22
+ import { MOBILE_MEDIUM_DEVICE as Ye, MOBILE_SMALL_DEVICE as Je } from "../common/constants.mjs";
23
+ import { ActionSheet as Qe } from "@progress/kendo-vue-layout";
24
+ import { ListFilter as Xe } from "../common/ListFilter.mjs";
25
+ import { provideLocalizationService as Ze } from "@progress/kendo-vue-intl";
26
+ import { itemsSelectedText as ne, messages as L, adaptiveModeFooterCancel as ae, adaptiveModeFooterApply as le, summaryTagText as oe, selectAllText as re } from "../messages/main.mjs";
26
27
  const {
27
- sizeMap: z,
28
- roundedMap: Ye
29
- } = Ve;
30
- function E(e) {
31
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
28
+ sizeMap: U,
29
+ roundedMap: et
30
+ } = Be;
31
+ function _(e) {
32
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !He(e);
32
33
  }
33
- const Je = "Please enter a valid value!", Qe = (e) => e.preventDefault(), ae = (e, t, s) => !!e != !!t || e.text !== t.text ? !1 : e === t || Ke(e.data, t.data, s), oe = (e) => e === S.CustomItem;
34
- var S = /* @__PURE__ */ (function(e) {
34
+ const tt = "Please enter a valid value!", de = (e) => e.preventDefault(), ce = (e, t, s) => !!e != !!t || e.text !== t.text ? !1 : e === t || qe(e.data, t.data, s), ue = (e) => e === k.CustomItem;
35
+ var k = /* @__PURE__ */ (function(e) {
35
36
  return e[e.None = 0] = "None", e[e.ListItem = 1] = "ListItem", e[e.CustomItem = 2] = "CustomItem", e;
36
- })(S || {});
37
- const vt = /* @__PURE__ */ $e({
37
+ })(k || {});
38
+ const kt = /* @__PURE__ */ Ve({
38
39
  name: "KendoMultiSelect",
39
40
  emits: {
40
41
  changemodel: (e) => !0,
@@ -42,6 +43,7 @@ const vt = /* @__PURE__ */ $e({
42
43
  filterchange: (e) => !0,
43
44
  change: (e) => !0,
44
45
  pagechange: (e) => !0,
46
+ selectallchange: (e) => !0,
45
47
  focus: (e) => !0,
46
48
  blur: (e) => !0,
47
49
  open: (e) => !0,
@@ -170,10 +172,16 @@ const vt = /* @__PURE__ */ $e({
170
172
  type: String,
171
173
  default: void 0
172
174
  },
173
- inputAttributes: Object
175
+ inputAttributes: Object,
176
+ selectAll: Boolean,
177
+ checkboxes: Boolean,
178
+ summarizeAfter: {
179
+ type: Number,
180
+ default: 10
181
+ }
174
182
  },
175
183
  setup() {
176
- const e = Q(null), t = Q(null), s = Fe("kendoLocalizationService", {});
184
+ const e = ee(null), t = ee(null), s = we("kendoLocalizationService", {});
177
185
  return {
178
186
  inputRef: e,
179
187
  kendoAnchorRef: t,
@@ -182,7 +190,7 @@ const vt = /* @__PURE__ */ $e({
182
190
  },
183
191
  computed: {
184
192
  spanClassNames() {
185
- const e = !this.hasMounted || !this.$props.validityStyles || this.validity().valid, t = this.currentText || x(this.computedValue()[0], this.$props.textField);
193
+ const e = !this.hasMounted || !this.$props.validityStyles || this.validity().valid, t = this.currentText || O(this.computedValue()[0], this.$props.textField);
186
194
  return {
187
195
  "k-floating-label-container": !0,
188
196
  "k-focus": this.currentFocused,
@@ -209,7 +217,7 @@ const vt = /* @__PURE__ */ $e({
209
217
  }
210
218
  },
211
219
  created() {
212
- this.observer = null, this.valuesItemsDuringOnChange = null, this._tags = [], this._skipFocusEvent = !1, this.scrollToFocused = !1, this.base = new Le(this), this.anchor = Z(), this.inputId = Z();
220
+ this.observer = null, this.valuesItemsDuringOnChange = null, this._tags = [], this._skipFocusEvent = !1, this.scrollToFocused = !1, this.base = new Ke(this), this.anchor = se(), this.inputId = se();
213
221
  },
214
222
  inject: {
215
223
  kendoLocalizationService: {
@@ -217,8 +225,8 @@ const vt = /* @__PURE__ */ $e({
217
225
  },
218
226
  adaptiveModeBreakpoints: {
219
227
  default: {
220
- small: We,
221
- medium: ze
228
+ small: Je,
229
+ medium: Ye
222
230
  }
223
231
  }
224
232
  },
@@ -231,18 +239,20 @@ const vt = /* @__PURE__ */ $e({
231
239
  currentOpened: !1,
232
240
  currentFocusedIndex: void 0,
233
241
  currentFocusedTag: void 0,
242
+ currentSelectAllFocused: !1,
234
243
  searchState: {
235
244
  word: "",
236
245
  last: ""
237
246
  },
238
247
  suggested: "",
239
- activedescendant: L.PopupList,
248
+ activedescendant: K.PopupList,
240
249
  group: void 0,
241
250
  isScrolling: !1,
242
251
  itemHeight: 0,
243
252
  windowWidth: 0,
244
253
  popupWidth: void 0,
245
- initialAdaptiveRenderingValues: void 0
254
+ initialAdaptiveRenderingValues: void 0,
255
+ stickyHeadersHeight: 0
246
256
  };
247
257
  },
248
258
  watch: {
@@ -256,7 +266,7 @@ const vt = /* @__PURE__ */ $e({
256
266
  e && t && e.total !== t.total && (this.virtualTotalHasChanged = !0);
257
267
  },
258
268
  isOpen: function(e) {
259
- e ? this.initialAdaptiveRenderingValues = this.base.component.currentValue : this.initialAdaptiveRenderingValues = void 0, setTimeout(() => {
269
+ e ? (this.initialAdaptiveRenderingValues = this.base.component.currentValue, this.isScrolling = !1) : (this.initialAdaptiveRenderingValues = void 0, this.currentSelectAllFocused = !1), setTimeout(() => {
260
270
  const t = document.querySelector(".k-list-item");
261
271
  this.itemHeight = this.base.getListItemHeight(t);
262
272
  }, 100);
@@ -268,24 +278,29 @@ const vt = /* @__PURE__ */ $e({
268
278
  virtual: e,
269
279
  groupField: t = "",
270
280
  dataItems: s = []
271
- } = this.$props, i = e ? e.skip : 0, n = this.isOpen, o = this.prevOpened !== void 0 ? this.prevOpened : this.prevCurrentOpened, r = !o && n, d = o && !n, c = Object.assign({}, {
281
+ } = this.$props, i = e ? e.skip : 0, n = this.isOpen, a = this.prevOpened !== void 0 ? this.prevOpened : this.prevCurrentOpened, o = !a && n, d = a && !n, c = Object.assign({}, {
272
282
  animate: !0,
273
283
  height: "200px"
274
- }, this.$props.popupSettings), a = this.$refs.list, h = this.$refs.scrollElement;
275
- if (a && (this.base.vs.list = a.list, this.base.list = a.list), h && (this.base.vs.scrollElement = h), a && s.length && this.base.vs.scrollerRef(a.$el), !c.animate && d && this.onPopupClosed(), !this.isScrolling)
284
+ }, this.$props.popupSettings), l = this.$refs.list, f = this.$refs.scrollElement;
285
+ if (l && (this.base.vs.list = l.list, this.base.list = l.list), f && (this.base.vs.scrollElement = f), l && s.length && this.base.vs.scrollerRef(l.$el), n && this.stickyHeadersHeight === 0 && this.measureStickyHeadersHeight(), !c.animate && d && this.onPopupClosed(), !this.isScrolling)
276
286
  if (e && this.virtualTotalHasChanged)
277
287
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset(), this.virtualTotalHasChanged = !1;
278
288
  else {
279
289
  let {
280
290
  focusedItem: m,
281
- focusedIndex: $
291
+ focusedIndex: S
282
292
  } = this.getFocusedState();
283
- t !== "" && ($ = (g = this.base.getGroupedDataModernMode(s, t)) == null ? void 0 : g.indexOf(m)), r && e ? (this.base.scrollToVirtualItem(e, $ - i), this.prevCurrentOpened = !0) : r && !e ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][t], this), this.base.scrollToItem($), this.prevCurrentOpened = !0) : n && o && m && this.base.scrollToItem($ - i);
293
+ t !== "" && (S = (g = this.base.getGroupedDataModernMode(s, t)) == null ? void 0 : g.indexOf(m)), o && e ? (this.base.vs.container ? (this.base.scrollToVirtualItem(e, S - i), this.base.vs.translate > 0 && S - i < 0 && (this.base.vs.container.scrollTop = this.base.vs.translate)) : this.$nextTick(() => {
294
+ const T = this.$refs.list;
295
+ T && (this.base.vs.list = T.list, this.base.list = T.list, this.base.vs.scrollerRef(T.$el));
296
+ const w = this.$refs.scrollElement;
297
+ w && (this.base.vs.scrollElement = w), this.base.scrollToVirtualItem(e, S - i), this.base.vs.translate > 0 && S - i < 0 && (this.base.vs.container.scrollTop = this.base.vs.translate);
298
+ }), this.prevCurrentOpened = !0) : o && !e ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][t], this), this.base.scrollToItem(S), this.prevCurrentOpened = !0) : n && a && m && this.scrollToFocused && this.base.scrollToItem(S - i);
284
299
  }
285
300
  this.scrollToFocused = !1, this.searchBarRef(), this.setValidity();
286
301
  },
287
302
  mounted() {
288
- this.observer = Oe && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.hasMounted = !0, this.input = this.inputRef.input, this.base.wrapper = X(this, "kendoAnchor"), this.element = X(this, "kendoAnchor"), this.base.didMount(), this.searchBarRef(), this.setValidity();
303
+ this.observer = Re && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.hasMounted = !0, this.input = this.inputRef.input, this.base.wrapper = te(this, "kendoAnchor"), this.element = te(this, "kendoAnchor"), this.base.didMount(), this.searchBarRef(), this.setValidity();
289
304
  },
290
305
  methods: {
291
306
  clearFilter(e) {
@@ -297,12 +312,12 @@ const vt = /* @__PURE__ */ $e({
297
312
  },
298
313
  findByFieldValue(e, t) {
299
314
  return t.map((i) => {
300
- const n = this.dataItems.findIndex((o) => x(o, e) === i);
315
+ const n = this.dataItems.findIndex((a) => O(a, e) === i);
301
316
  return this.dataItems[n] || i;
302
317
  });
303
318
  },
304
319
  primitiveValue() {
305
- const e = this.computedValue(), t = e.map((s) => x(s, this.valueField));
320
+ const e = this.computedValue(), t = e.map((s) => O(s, this.valueField));
306
321
  return this.valuePrimitive ? t : e;
307
322
  },
308
323
  validity() {
@@ -314,38 +329,53 @@ const vt = /* @__PURE__ */ $e({
314
329
  };
315
330
  },
316
331
  handleItemSelect(e, t) {
332
+ this.currentSelectAllFocused && (t.data.currentSelectAllFocused = !1);
317
333
  const {
318
334
  dataItems: s = [],
319
335
  dataItemKey: i,
320
336
  virtual: n
321
- } = this.$props, o = this.computedValue(), r = n ? n.skip : 0, d = s[e - r], c = o.findIndex((g) => te(g, d, i));
322
- let a = [];
323
- c !== -1 ? (a = o, a.splice(c, 1)) : a = [...o, d], (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) && !this.adaptiveState && this.clearFilter(t), this.currentFocusedIndex !== void 0 && (t.data.currentFocusedIndex = void 0), this.triggerOnChange(a, t), this.base.triggerPageChangeCornerItems(d, t);
337
+ } = this.$props, a = this.computedValue(), o = n ? n.skip : 0, d = s[e - o], c = a.findIndex((g) => V(g, d, i));
338
+ this._lastSelectedOrDeselectedItemIndex = s.findIndex((g) => V(g, d, i));
339
+ let l = [];
340
+ c !== -1 ? (l = a, l.splice(c, 1)) : l = [...a, d], (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) && !this.adaptiveState && !this.$props.checkboxes && this.clearFilter(t), t.data.currentFocusedIndex = e, this.triggerOnChange(l, t), this.base.triggerPageChangeCornerItems(d, t);
324
341
  },
325
342
  onTagDelete(e, t) {
326
343
  const s = this.isOpen, i = this.base.initState();
327
344
  i.event = t, s && this.base.togglePopup(i), this.currentFocused || (i.data.currentFocused = !0);
328
345
  const n = this.computedValue();
329
- H(n, e, this.$props.dataItemKey), this.triggerOnChange(n, i), this.applyState(i);
346
+ z(n, e, this.$props.dataItemKey), this.triggerOnChange(n, i), this.applyState(i);
330
347
  },
331
348
  onNavigate(e, t) {
332
349
  const {
333
350
  allowCustom: s,
334
- dataItems: i = []
335
- } = this.$props, n = this.isOpen, o = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
336
- focusedType: r,
337
- focusedIndex: d
338
- } = this.getFocusedState(), c = s && o, a = oe(r), h = this.base, g = h.vs;
339
- if (n && t === f.up && a)
340
- this.currentFocusedIndex !== void 0 && (e.data.currentFocusedIndex = void 0);
351
+ dataItems: i = [],
352
+ selectAll: n
353
+ } = this.$props, a = this.isOpen, o = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
354
+ focusedType: d,
355
+ focusedIndex: c
356
+ } = this.getFocusedState(), l = s && o, f = ue(d), g = this.base, m = g.vs;
357
+ if (this.currentSelectAllFocused) {
358
+ t === h.down && (e.data.currentSelectAllFocused = !1, l || (this.itemFocus(0, e), this.scrollToFocused = !0)), this.applyState(e);
359
+ return;
360
+ }
361
+ if (n && a && c === -1 && !f) {
362
+ t === h.down && (e.data.currentSelectAllFocused = !0), this.applyState(e);
363
+ return;
364
+ }
365
+ if (n && a && t === h.up && c === 0 && !l) {
366
+ e.data.currentSelectAllFocused = !0, e.data.currentFocusedIndex = void 0, this.applyState(e);
367
+ return;
368
+ }
369
+ if (a && t === h.up && f)
370
+ n && (e.data.currentSelectAllFocused = !0), this.currentFocusedIndex !== void 0 && (e.data.currentFocusedIndex = void 0);
341
371
  else {
342
- const m = h.navigation.navigate({
372
+ const S = g.navigation.navigate({
343
373
  keyCode: t,
344
- current: d,
345
- max: (g.enabled ? g.total : i.length) - 1,
346
- min: c ? -1 : 0
374
+ current: c,
375
+ max: (m.enabled ? m.total : i.length) - 1,
376
+ min: l ? -1 : 0
347
377
  });
348
- m !== void 0 && (this.itemFocus(m, e), this.scrollToFocused = !0);
378
+ S !== void 0 && (this.itemFocus(S, e), this.scrollToFocused = !0);
349
379
  }
350
380
  this.applyState(e);
351
381
  },
@@ -354,68 +384,68 @@ const vt = /* @__PURE__ */ $e({
354
384
  dataItems: s = [],
355
385
  allowCustom: i,
356
386
  virtual: n
357
- } = this.$props, o = n ? n.skip : 0, r = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
387
+ } = this.$props, a = n ? n.skip : 0, o = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
358
388
  focusedIndex: d
359
- } = this.getFocusedState(), c = i && r, a = s[e - o];
360
- a && d !== e ? this.currentFocusedIndex !== e && (t.data.currentFocusedIndex = e, t.data.activedescendant = L.PopupList) : c && e === -1 && this.currentFocusedIndex !== void 0 && (t.data.currentFocusedIndex = void 0), this.base.triggerPageChangeCornerItems(a, t);
389
+ } = this.getFocusedState(), c = i && o, l = s[e - a];
390
+ l && d !== e ? this.currentFocusedIndex !== e && (t.data.currentFocusedIndex = e, t.data.activedescendant = K.PopupList) : c && e === -1 && this.currentFocusedIndex !== void 0 && (t.data.currentFocusedIndex = void 0), this.base.triggerPageChangeCornerItems(l, t);
361
391
  },
362
392
  searchBarRef() {
363
393
  this.input && this.currentFocused && setTimeout(() => this.input.focus(), 0);
364
394
  },
365
395
  onChangeHandler(e) {
366
396
  const t = this.base.initState(), s = e && (e.currentTarget && e.currentTarget.value || e.value), i = this.isOpen;
367
- t.event = e, this.$props.filter === void 0 && (t.data.currentText = s), t.data.currentFocusedIndex = void 0, i || this.base.togglePopup(t), this.base.filterChanged(s, t), this.$props.filterable && (t.data.group = void 0), this.applyState(t);
397
+ t.event = e, this.$props.filter === void 0 && (t.data.currentText = s), t.data.currentFocusedIndex = void 0, i ? this.scrollToFocused = !0 : this.base.togglePopup(t), this.base.filterChanged(s, t), this.$props.filterable && (t.data.group = void 0), this.applyState(t);
368
398
  },
369
399
  clearButtonClick(e) {
370
400
  const t = this.isOpen, s = this.base.initState();
371
401
  s.event = e, e.stopPropagation(), this.computedValue().length > 0 && this.triggerOnChange([], s), this.currentFocusedIndex !== void 0 && (s.data.currentFocusedIndex = void 0), t && this.base.togglePopup(s);
372
402
  const i = this.$props.filter !== void 0 ? this.$props.filter : this.currentText;
373
- Pe(i) && i !== "" && this.base.filterChanged("", s), this.currentText && (s.data.currentText = ""), this.applyState(s);
403
+ je(i) && i !== "" && this.base.filterChanged("", s), this.currentText && (s.data.currentText = ""), this.applyState(s);
374
404
  },
375
405
  onInputKeyDown(e) {
376
406
  this.isScrolling && (this.isScrolling = !1);
377
407
  const t = e.keyCode, s = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, i = this.isOpen, {
378
408
  focusedItem: n
379
- } = this.getFocusedState(), o = this.base.initState();
380
- if (o.event = e, !s && this.computedValue().length > 0 && (t === f.left || t === f.right || t === f.home || t === f.end || t === f.delete || t === f.backspace))
381
- return this.onTagsNavigate(e, o);
382
- const r = () => {
383
- e.preventDefault(), this.base.togglePopup(o), this.applyState(o);
409
+ } = this.getFocusedState(), a = this.base.initState();
410
+ if (a.event = e, !s && this.computedValue().length > 0 && (t === h.left || t === h.right || t === h.home || t === h.end || t === h.delete || t === h.backspace))
411
+ return this.onTagsNavigate(e, a);
412
+ const o = () => {
413
+ e.preventDefault(), this.base.togglePopup(a), this.applyState(a);
384
414
  };
385
- i ? e.altKey && t === f.up ? r() : t === f.up || t === f.down ? (e.preventDefault(), this.onNavigate(o, t)) : t === f.enter ? (e.preventDefault(), this.$props.allowCustom && s && n === null ? this.customItemSelect(e) : this.selectFocusedItem(e)) : t === f.esc && (this.adaptiveState && this.handleWrapperClick(e), r()) : e.altKey && t === f.down && r();
415
+ i ? e.altKey && t === h.up ? o() : t === h.up || t === h.down ? (e.preventDefault(), this.onNavigate(a, t)) : t === h.enter || t === h.space && this.currentSelectAllFocused ? (e.preventDefault(), this.currentSelectAllFocused ? this.toggleSelectAll(e) : this.$props.allowCustom && s && n === null ? this.customItemSelect(e) : this.selectFocusedItem(e)) : t === h.esc && (this.adaptiveState && this.handleWrapperClick(e), o()) : (e.altKey && t === h.down || t === h.space && this.$props.selectAll) && o();
386
416
  },
387
417
  onTagsNavigate(e, t) {
388
- const s = e.keyCode, i = this.currentFocusedTag, n = this._tags, o = this.$props.dataItemKey;
389
- let r = i ? n.findIndex((a) => ae(a, i, o)) : -1, d;
390
- const c = r !== -1;
391
- if (s === f.left)
392
- c ? r = Math.max(0, r - 1) : r = n.length - 1, d = n[r];
393
- else if (s === f.right)
394
- r === n.length - 1 ? d = void 0 : c && (r = Math.min(n.length - 1, r + 1), d = n[r]);
395
- else if (s === f.home)
418
+ const s = e.keyCode, i = this.currentFocusedTag, n = this._tags, a = this.$props.dataItemKey;
419
+ let o = i ? n.findIndex((l) => ce(l, i, a)) : -1, d;
420
+ const c = o !== -1;
421
+ if (s === h.left)
422
+ c ? o = Math.max(0, o - 1) : o = n.length - 1, d = n[o];
423
+ else if (s === h.right)
424
+ o === n.length - 1 ? d = void 0 : c && (o = Math.min(n.length - 1, o + 1), d = n[o]);
425
+ else if (s === h.home)
396
426
  d = n[0];
397
- else if (s === f.end)
427
+ else if (s === h.end)
398
428
  d = n[n.length - 1];
399
- else if (s === f.delete) {
429
+ else if (s === h.delete) {
400
430
  if (c) {
401
- const a = this.computedValue();
402
- H(a, n[r].data, o), this.triggerOnChange(a, t);
431
+ const l = this.computedValue();
432
+ z(l, n[o].data, a), this.triggerOnChange(l, t);
403
433
  }
404
- } else if (s === f.backspace) {
405
- const a = this.computedValue();
434
+ } else if (s === h.backspace) {
435
+ const l = this.computedValue();
406
436
  if (c)
407
- H(a, n[r].data, o), this.triggerOnChange(a, t);
437
+ z(l, n[o].data, a), this.triggerOnChange(l, t);
408
438
  else if (!c && n.length) {
409
- const h = n.pop();
410
- H(a, h.data, o), this.triggerOnChange(a, t);
439
+ const f = n.pop();
440
+ z(l, f.data, a), this.triggerOnChange(l, t);
411
441
  }
412
442
  }
413
- d !== i && (t.data.currentFocusedTag = d, t.data.activedescendant = L.TagsList), this.applyState(t);
443
+ d !== i && (t.data.currentFocusedTag = d, t.data.activedescendant = K.TagsList), this.applyState(t);
414
444
  },
415
445
  triggerOnChange(e, t) {
416
446
  this.$props.value === void 0 && (t.data.currentValue = [...e]), this.valuesItemsDuringOnChange = [], this.setItems(e, this.valuesItemsDuringOnChange), t.events.push({
417
447
  type: "change"
418
- });
448
+ }), this.base.repositionPopup();
419
449
  },
420
450
  selectFocusedItem(e) {
421
451
  const {
@@ -429,52 +459,81 @@ const vt = /* @__PURE__ */ $e({
429
459
  setItems(e, t) {
430
460
  t.length = 0, t.push(...e);
431
461
  },
462
+ shouldKeepNoFocusOnOpen(e, t) {
463
+ return this.$props.selectAll && t === void 0 && this.computedValue().length === 0 && !(this.$props.allowCustom && e);
464
+ },
432
465
  getFocusedState() {
433
- const e = this.currentFocusedIndex, t = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
466
+ if (this.currentSelectAllFocused)
467
+ return {
468
+ focusedType: k.None,
469
+ focusedIndex: -1
470
+ };
471
+ const e = this.currentFocusedIndex, t = this.$props.filter !== void 0 ? this.$props.filter : this.currentText;
472
+ if (this.shouldKeepNoFocusOnOpen(t, e))
473
+ return {
474
+ focusedType: k.None,
475
+ focusedIndex: -1
476
+ };
477
+ const {
434
478
  allowCustom: s,
435
479
  dataItems: i = [],
436
480
  dataItemKey: n,
437
- virtual: o,
438
- textField: r,
439
- focusedItemIndex: d = Ee
440
- } = this.$props, c = o && o.skip || 0;
441
- let a;
481
+ virtual: a,
482
+ textField: o,
483
+ focusedItemIndex: d = _e
484
+ } = this.$props, c = a && a.skip || 0;
485
+ let l;
442
486
  if (e !== void 0)
443
487
  return {
444
488
  focusedIndex: e,
445
489
  focusedItem: i[e - c],
446
- focusedType: S.ListItem
490
+ focusedType: k.ListItem
447
491
  };
448
- const h = this.computedValue();
492
+ const f = this.computedValue();
449
493
  if (s && t)
450
494
  return {
451
495
  focusedItem: null,
452
496
  focusedIndex: -1,
453
- focusedType: S.CustomItem
497
+ focusedType: k.CustomItem
454
498
  };
455
499
  if (t)
456
- return a = d(i, t, r), {
457
- focusedItem: i[a],
458
- focusedIndex: a + c,
459
- focusedType: S.ListItem
500
+ return l = d(i, t, o), {
501
+ focusedItem: i[l],
502
+ focusedIndex: l + c,
503
+ focusedType: k.ListItem
460
504
  };
461
- if (h.length) {
462
- const g = h[h.length - 1];
463
- return a = i.findIndex((m) => te(m, g, n)), i[a] !== void 0 ? {
464
- focusedIndex: a + c,
465
- focusedItem: i[a],
466
- focusedType: S.ListItem
505
+ if (f.length) {
506
+ if (this.$props.selectAll) {
507
+ const m = f[f.length - 1], S = i.findIndex((T) => V(T, m, n));
508
+ return S !== -1 ? {
509
+ focusedIndex: S + c,
510
+ focusedItem: i[S],
511
+ focusedType: k.ListItem
512
+ } : c === 0 ? {
513
+ focusedItem: i[0],
514
+ focusedIndex: 0,
515
+ focusedType: k.ListItem
516
+ } : {
517
+ focusedType: k.None,
518
+ focusedIndex: -1
519
+ };
520
+ }
521
+ const g = f[f.length - 1];
522
+ return l = i.findIndex((m) => V(m, g, n)), i[l] !== void 0 ? {
523
+ focusedIndex: l + c,
524
+ focusedItem: i[l],
525
+ focusedType: k.ListItem
467
526
  } : {
468
- focusedType: S.None,
527
+ focusedType: k.None,
469
528
  focusedIndex: -1
470
529
  };
471
530
  }
472
531
  return c === 0 ? {
473
532
  focusedItem: i[0],
474
533
  focusedIndex: 0,
475
- focusedType: S.ListItem
534
+ focusedType: k.ListItem
476
535
  } : {
477
- focusedType: S.None,
536
+ focusedType: k.None,
478
537
  focusedIndex: -1
479
538
  };
480
539
  },
@@ -490,8 +549,8 @@ const vt = /* @__PURE__ */ $e({
490
549
  [s]: t
491
550
  } : t;
492
551
  this.currentText !== void 0 && (i.data.currentText = ""), i.data.currentFocusedIndex = void 0, this.base.filterChanged("", i);
493
- const o = [...this.computedValue(), n];
494
- this.triggerOnChange(o, i), this.base.togglePopup(i), this.applyState(i);
552
+ const a = [...this.computedValue(), n];
553
+ this.triggerOnChange(a, i), this.base.togglePopup(i), this.applyState(i);
495
554
  },
496
555
  handleWrapperClick(e) {
497
556
  const t = this.isOpen, s = this.input;
@@ -499,7 +558,7 @@ const vt = /* @__PURE__ */ $e({
499
558
  const i = this.base.initState();
500
559
  i.event = e, this.currentFocused || (i.events.push({
501
560
  type: "focus"
502
- }), i.data.currentFocused = !0), this.clearFilter(i), this.base.togglePopup(i), this.applyState(i);
561
+ }), i.data.currentFocused = !0), this.base.togglePopup(i), this.applyState(i);
503
562
  },
504
563
  onCancel(e) {
505
564
  const t = this.base.initState();
@@ -511,7 +570,7 @@ const vt = /* @__PURE__ */ $e({
511
570
  },
512
571
  handleItemClick(e, t) {
513
572
  const s = this.base.initState();
514
- s.event = t, this.handleItemSelect(e, s), this.$props.autoClose && !this.adaptiveState && this.base.togglePopup(s), this.applyState(s);
573
+ s.event = t, this.handleItemSelect(e, s), this.$props.autoClose && !this.$props.checkboxes && !this.adaptiveState && this.base.togglePopup(s), this.applyState(s);
515
574
  },
516
575
  handleBlur(e) {
517
576
  if (!this.currentFocused || this._skipFocusEvent)
@@ -520,7 +579,7 @@ const vt = /* @__PURE__ */ $e({
520
579
  allowCustom: i,
521
580
  filterable: n
522
581
  } = this.$props;
523
- s.event = e, s.data.currentFocused = !1, s.events.push({
582
+ s.event = e, s.data.currentFocused = !1, s.data.currentSelectAllFocused = !1, s.events.push({
524
583
  type: "blur"
525
584
  }), t && !this.adaptiveState && (this.currentOpened && (s.data.currentOpened = !1), s.events.push({
526
585
  type: "close"
@@ -530,12 +589,21 @@ const vt = /* @__PURE__ */ $e({
530
589
  this._skipFocusEvent || this.base.handleFocus(e);
531
590
  },
532
591
  onPopupOpened() {
533
- this.input && this.currentFocused && this.focusElement(this.input);
592
+ this.input && this.currentFocused && this.focusElement(this.input), this.measureStickyHeadersHeight();
534
593
  },
535
594
  onPopupClosed() {
536
595
  this.currentFocused && setTimeout(() => {
537
596
  this.currentFocused && this.focusElement(this.input);
538
- }, 0);
597
+ }, 0), this.stickyHeadersHeight = 0;
598
+ },
599
+ measureStickyHeadersHeight() {
600
+ let e = 0;
601
+ const t = document.getElementById(this.base.listBoxId), s = t == null ? void 0 : t.closest(".k-list");
602
+ if (s) {
603
+ const i = s.querySelector(".k-list-sticky-header"), n = s.querySelector(".k-list-group-sticky-header");
604
+ i && (e += i.offsetHeight), n && (e += n.offsetHeight);
605
+ }
606
+ this.stickyHeadersHeight = e;
539
607
  },
540
608
  focusElement(e) {
541
609
  this._skipFocusEvent = !0, e.focus(), setTimeout(() => this._skipFocusEvent = !1, 30);
@@ -544,7 +612,7 @@ const vt = /* @__PURE__ */ $e({
544
612
  this.base.applyState(e), this.valuesItemsDuringOnChange = null;
545
613
  },
546
614
  setValidity() {
547
- this.input && this.input.setCustomValidity && this.input.setCustomValidity(this.validity().valid ? "" : this.$props.validationMessage || Je);
615
+ this.input && this.input.setCustomValidity && this.input.setCustomValidity(this.validity().valid ? "" : this.$props.validationMessage || tt);
548
616
  },
549
617
  focus() {
550
618
  this.input && this.input.focus();
@@ -568,15 +636,61 @@ const vt = /* @__PURE__ */ $e({
568
636
  groupField: n
569
637
  } = this.$props;
570
638
  let {
571
- dataItems: o = []
572
- } = this.$props, r;
573
- if (!n || !o.length)
639
+ dataItems: a = []
640
+ } = this.$props, o;
641
+ if (!n || !a.length)
574
642
  return;
575
- const d = s && ((g = s.querySelector(".k-list-item")) == null ? void 0 : g.offsetHeight) || 0, c = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : d), h = e.target.scrollTop - t.skip * c;
576
- n && (o = this.base.getGroupedDataModernMode(o, n), o = this.base.getGroupedDataModernMode(o, n), r = o[0][n]);
577
- for (let m = 1; m < o.length && !(c * m > h); m++)
578
- o[m] && o[m][n] && (r = o[m][n]);
579
- r !== this.group && (i.data.group = r, this.applyState(i));
643
+ const d = s && ((g = s.querySelector(".k-list-item")) == null ? void 0 : g.offsetHeight) || 0, c = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : d), f = e.target.scrollTop - t.skip * c;
644
+ n && (a = this.base.getGroupedDataModernMode(a, n), a = this.base.getGroupedDataModernMode(a, n), o = a[0][n]);
645
+ for (let m = 1; m < a.length && !(c * m > f); m++)
646
+ a[m] && a[m][n] && (o = a[m][n]);
647
+ o !== this.group && (i.data.group = o, this.applyState(i));
648
+ },
649
+ getSelectableItems() {
650
+ return (this.$props.dataItems || []).filter((t) => !(t != null && t.disabled));
651
+ },
652
+ areAllSelectableItemsSelected() {
653
+ const e = this.getSelectableItems();
654
+ if (e.length === 0 || !e.every((n) => this.computedValue().some((a) => V(a, n, this.$props.dataItemKey))))
655
+ return !1;
656
+ const {
657
+ virtual: s,
658
+ dataItemKey: i
659
+ } = this.$props;
660
+ return !(s && s.total !== void 0 && (i ? this.computedValue().filter((a) => (a == null ? void 0 : a[i]) !== void 0).length : this.computedValue().length) < s.total);
661
+ },
662
+ areSomeSelectableItemsSelected() {
663
+ return this.computedValue().length > 0;
664
+ },
665
+ handleSelectAllItemClick(e) {
666
+ e.stopPropagation(), this.toggleSelectAll(e);
667
+ },
668
+ handleSelectAllItemKeyDown(e) {
669
+ e.keyCode !== h.enter && e.keyCode !== h.space || (e.preventDefault(), this.toggleSelectAll(e));
670
+ },
671
+ toggleSelectAll(e) {
672
+ if (this.$props.disabled)
673
+ return;
674
+ const t = this.areAllSelectableItemsSelected(), s = this.getSelectableItems();
675
+ if (s.length === 0)
676
+ return;
677
+ const i = {
678
+ event: e,
679
+ target: this,
680
+ allSelected: !t,
681
+ defaultPrevented: !1,
682
+ preventDefault() {
683
+ this.defaultPrevented = !0;
684
+ }
685
+ };
686
+ if (this.$emit("selectallchange", i), i.defaultPrevented)
687
+ return;
688
+ const n = this.base.initState();
689
+ n.data.currentFocusedIndex = void 0;
690
+ let a = [];
691
+ t ? a = this.computedValue().filter((o) => !s.some((d) => V(d, o, this.$props.dataItemKey))) : (a = [...this.computedValue()], s.forEach((o) => {
692
+ a.some((c) => V(c, o, this.$props.dataItemKey)) || a.push(o);
693
+ })), n.data.currentSelectAllFocused = !0, this.triggerOnChange(a, n), this.applyState(n);
580
694
  }
581
695
  },
582
696
  render() {
@@ -586,178 +700,228 @@ const vt = /* @__PURE__ */ $e({
586
700
  dir: s,
587
701
  disabled: i,
588
702
  tags: n,
589
- textField: o,
590
- dataItemKey: r,
703
+ textField: a,
704
+ dataItemKey: o,
591
705
  virtual: d,
592
706
  loading: c,
593
- size: a,
594
- fillMode: h,
707
+ size: l,
708
+ fillMode: f,
595
709
  rounded: g,
596
710
  tagsRounded: m,
597
- removeTagIcon: $,
598
- adaptiveTitle: re,
599
- header: P,
600
- footer: W,
601
- inputAttributes: le,
602
- groupStickyHeaderItemRender: de,
603
- dataItems: F = []
604
- } = this.$props, ue = this.currentFocused, D = Object.assign({}, {
711
+ removeTagIcon: S,
712
+ adaptiveTitle: T,
713
+ header: w,
714
+ footer: Y,
715
+ inputAttributes: he,
716
+ groupStickyHeaderItemRender: pe,
717
+ dataItems: H = []
718
+ } = this.$props, fe = this.currentFocused, D = Object.assign({}, {
605
719
  animate: !0,
606
720
  height: "200px"
607
- }, this.$props.popupSettings), B = this.currentFocusedTag, G = this.computedValue(), M = (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) || "", ce = !c && (!!M || G.length > 0), y = this.base.vs, N = this.$props.id || this.inputId, pe = b.call(this, this.$props.tagRender, I.call(this)), A = this.isOpen, T = this.adaptiveState, q = Ue(this);
608
- this.group === void 0 && this.$props.groupField !== void 0 && (this.group = x(this.$props.dataItems[0], this.$props.groupField)), y.enabled = d !== void 0, d !== void 0 && (y.skip = d.skip, y.total = d.total, y.pageSize = d.pageSize);
609
- let v = [];
610
- this.initialAdaptiveRenderingValues ? [...this.initialAdaptiveRenderingValues].forEach((p) => {
611
- v.push({
612
- text: x(p, o),
613
- data: [p]
614
- });
615
- }) : n === void 0 ? this.computedValue().forEach((u) => {
616
- v.push({
617
- text: x(u, o),
618
- data: [u]
721
+ }, this.$props.popupSettings), P = this.currentFocusedTag, J = this.computedValue(), E = (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) || "", ge = !c && (!!E || J.length > 0), A = this.base.vs, j = this.$props.id || this.inputId, me = C.call(this, this.$props.tagRender, F.call(this)), N = this.isOpen, R = this.adaptiveState, M = Ze(this);
722
+ this.group === void 0 && this.$props.groupField !== void 0 && (this.group = O(this.$props.dataItems[0], this.$props.groupField)), A.enabled = d !== void 0, d !== void 0 && (A.skip = d.skip, A.total = d.total, A.pageSize = d.pageSize);
723
+ let x = [];
724
+ if (this.initialAdaptiveRenderingValues)
725
+ [...this.initialAdaptiveRenderingValues].forEach((p) => {
726
+ x.push({
727
+ text: O(p, a),
728
+ data: [p]
729
+ });
619
730
  });
620
- }) : v.push(...n), v.length > 0 && this.setItems(v, this._tags);
621
- const he = !this.$props.validityStyles || this.validity().valid, fe = function(u) {
731
+ else if (n === void 0) {
732
+ const {
733
+ allowCustom: u,
734
+ selectAll: p,
735
+ dataItemKey: v
736
+ } = this.$props;
737
+ if (u && p && v) {
738
+ const I = this.computedValue(), b = I.filter((y) => y[v] !== void 0), $ = I.filter((y) => y[v] === void 0);
739
+ if (b.length > 0) {
740
+ const y = M.toLanguageString(ne, L[ne]).replace("{0}", b.length.toString());
741
+ x.push({
742
+ text: y,
743
+ data: [...b]
744
+ });
745
+ }
746
+ $.forEach((y) => {
747
+ x.push({
748
+ text: O(y, a),
749
+ data: [y]
750
+ });
751
+ });
752
+ } else
753
+ this.computedValue().forEach((I) => {
754
+ x.push({
755
+ text: O(I, a),
756
+ data: [I]
757
+ });
758
+ });
759
+ } else
760
+ x.push(...n);
761
+ x.length > 0 && this.setItems(x, this._tags);
762
+ const ve = !this.$props.validityStyles || this.validity().valid, Se = function(u) {
622
763
  const p = this.activedescendant, {
623
- placeholder: k
764
+ placeholder: v
624
765
  } = this.$props, {
625
- focusedIndex: O
626
- } = this.getFocusedState(), C = v.length === 0 || G.length === 0 && !M ? k : void 0, V = p === L.TagsList && B !== void 0 ? `tag-${this.base.guid}-${B.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${O}`;
627
- return l(Ae, {
766
+ focusedIndex: I
767
+ } = this.getFocusedState(), b = x.length === 0 || J.length === 0 && !E ? v : void 0, $ = p === K.TagsList && P !== void 0 ? `tag-${this.base.guid}-${P.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${I}`;
768
+ return r(Ne, {
628
769
  id: u,
629
- size: Math.max((C || "").length, M.length, 1),
770
+ size: Math.max((b || "").length, E.length, 1),
630
771
  tabIndex: this.$props.tabIndex,
631
772
  accessKey: this.$props.accessKey,
632
- placeholder: C,
633
- value: T ? "" : M,
773
+ placeholder: b,
774
+ value: R ? "" : E,
634
775
  onChange: this.onChangeHandler,
635
776
  onBlur: this.handleBlur,
636
777
  onKeydown: this.onInputKeyDown,
637
- ref: (w) => {
638
- this.inputRef = w;
778
+ ref: (y) => {
779
+ this.inputRef = y;
639
780
  },
640
781
  disabled: i,
641
- expanded: A,
782
+ expanded: N,
642
783
  owns: this.base.listBoxId,
643
- activedescendant: V,
784
+ activedescendant: $,
644
785
  "aria-describedBy": `tagslist-${this.base.guid}${this.$props.ariaDescribedBy ? " " + this.$props.ariaDescribedBy : ""}`,
645
786
  "aria-labelledBy": this.$props.ariaLabelledBy,
646
787
  "aria-label": this.$props.ariaLabel,
647
- inputAttributes: le
788
+ inputAttributes: he
648
789
  }, null);
649
- }, U = function() {
790
+ }, Ie = () => {
791
+ const {
792
+ checkboxes: u,
793
+ selectAll: p
794
+ } = this.$props;
795
+ if (!p)
796
+ return null;
797
+ const v = this.areAllSelectableItemsSelected(), I = !v && this.areSomeSelectableItemsSelected(), b = M.toLanguageString(re, L[re]), $ = this.currentSelectAllFocused;
798
+ return r("div", {
799
+ class: "k-list-sticky-header"
800
+ }, [r("div", De({
801
+ class: B("k-list-sticky-header-item", {
802
+ "k-selected": !u && v,
803
+ "k-focus": $
804
+ }),
805
+ "aria-label": b
806
+ }, !u && {
807
+ tabindex: 0,
808
+ "aria-selected": v
809
+ }, {
810
+ onClick: this.handleSelectAllItemClick,
811
+ onKeydown: this.handleSelectAllItemKeyDown
812
+ }), [u && r(Ue, {
813
+ checked: v,
814
+ value: I ? null : v,
815
+ tabIndex: -1
816
+ }, null), r("span", {
817
+ class: "k-list-item-text"
818
+ }, [b])])]);
819
+ }, Q = function() {
650
820
  let u;
651
821
  const {
652
822
  groupField: p
653
- } = this.$props, k = b.call(this, this.$props.itemRender, I.call(this)), O = b.call(this, this.$props.groupHeaderItemRender, I.call(this)), C = b.call(this, this.$props.listNoDataRender, I.call(this)), V = d ? d.skip : 0, {
654
- focusedIndex: w
655
- } = this.getFocusedState(), K = `translateY(${y.translate}px)`;
656
- let J = F;
657
- return p && (J = this.base.getGroupedDataModernMode(F, p)), l(Be, {
823
+ } = this.$props, v = C.call(this, this.$props.itemRender, F.call(this)), I = C.call(this, this.$props.groupHeaderItemRender, F.call(this)), b = C.call(this, this.$props.listNoDataRender, F.call(this)), $ = d ? d.skip : 0, {
824
+ focusedIndex: y
825
+ } = this.getFocusedState(), W = `translateY(${A.translate}px)`;
826
+ let Z = H;
827
+ return p && (Z = this.base.getGroupedDataModernMode(H, p)), r(Pe, {
658
828
  id: this.base.listBoxId,
659
- show: A,
660
- dataItems: J.slice(),
661
- focusedIndex: w,
829
+ show: N,
830
+ dataItems: Z.slice(),
831
+ focusedIndex: y,
662
832
  value: this.computedValue(),
663
- textField: o,
664
- valueField: r,
833
+ textField: a,
834
+ valueField: o,
665
835
  optionsGuid: this.base.guid,
666
836
  ref: "list",
667
837
  wrapperStyle: {
668
- maxHeight: T ? void 0 : D.height
838
+ maxHeight: R ? void 0 : this.stickyHeadersHeight > 0 && D.height ? `calc(${D.height} - ${this.stickyHeadersHeight}px)` : D.height
669
839
  },
670
840
  wrapperCssClass: "k-list-content",
671
- listStyle: y.enabled ? {
672
- transform: K
841
+ listStyle: A.enabled ? {
842
+ transform: W
673
843
  } : void 0,
674
844
  key: "listKey",
675
- skip: V,
845
+ skip: $,
676
846
  onListclick: this.handleItemClick,
677
- itemRender: k,
678
- groupHeaderItemRender: O,
679
- noDataRender: C,
847
+ itemRender: v,
848
+ groupHeaderItemRender: I,
849
+ noDataRender: b,
680
850
  groupField: p,
681
- onScroll: this.onScroll
682
- }, E(u = ge.call(this)) ? u : {
851
+ onScroll: this.onScroll,
852
+ showSelectionCheckbox: this.$props.checkboxes
853
+ }, _(u = be.call(this)) ? u : {
683
854
  default: () => [u]
684
855
  });
685
- }, ge = function() {
686
- return y.enabled && l("div", {
856
+ }, be = function() {
857
+ return A.enabled && r("div", {
687
858
  ref: "scrollElement",
688
859
  key: "scrollElementKey"
689
860
  }, null);
690
- }, me = function() {
861
+ }, ye = function() {
691
862
  const u = this.base, {
692
863
  allowCustom: p
693
- } = this.$props, k = b.call(this, this.$props.groupStickyHeaderItemRender, I.call(this)), O = u.getTemplateDef.call(this, P), C = u.getTemplateDef.call(this, W), V = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
694
- focusedType: w
695
- } = this.getFocusedState(), K = p && V && l("div", {
696
- class: "k-list",
864
+ } = this.$props, v = C.call(this, this.$props.groupStickyHeaderItemRender, F.call(this)), I = u.getTemplateDef.call(this, w), b = u.getTemplateDef.call(this, Y), $ = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
865
+ focusedType: y
866
+ } = this.getFocusedState(), W = p && $ && r("div", {
867
+ class: B("k-list-custom-value", {
868
+ "k-focus": ue(y)
869
+ }),
697
870
  key: "customitem",
698
- onClick: this.customItemSelect
699
- }, [l("div", {
700
- class: R("k-item k-custom-item", {
701
- "k-focus": oe(w)
702
- })
703
- }, [V, l(Re, {
704
- name: "plus",
705
- icon: je,
706
- style: {
707
- float: "right"
708
- }
709
- }, null)])]);
710
- return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = x(F[0], this.$props.groupField)), l(De, {
871
+ onClick: this.customItemSelect,
872
+ onMousedown: de
873
+ }, [$]);
874
+ return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = O(H[0], this.$props.groupField)), r(Le, {
711
875
  ref: "container",
712
- onMousedown: Qe,
876
+ onMousedown: de,
713
877
  dir: s !== void 0 ? s : u.dirCalculated,
714
878
  onBlur: this.handleBlur,
715
879
  width: this.popupWidth,
716
880
  popupSettings: {
717
881
  ...D,
718
882
  anchor: this.anchor,
719
- show: A,
883
+ show: N,
720
884
  onOpen: this.onPopupOpened,
721
885
  onClose: this.onPopupClosed,
722
- popupClass: R(D.popupClass, "k-list", {
723
- [`k-list-${z[a] || a}`]: a,
886
+ popupClass: B(D.popupClass, "k-list", {
887
+ [`k-list-${U[l] || l}`]: l,
724
888
  "k-virtual-list": this.base.vs.enabled
725
889
  }),
726
- className: R("k-list-container", D.className)
890
+ className: B("k-list-container", D.className)
727
891
  },
728
- itemsCount: F.length
892
+ itemsCount: H.length
729
893
  }, {
730
- default: () => [O && l("div", {
894
+ default: () => [I && r("div", {
731
895
  class: "k-list-header"
732
- }, [O]), K, this.group && F.length !== 0 && l(ee, {
896
+ }, [I]), Ie.call(this), this.group && H.length !== 0 && r(ie, {
733
897
  group: this.group,
734
- render: k
735
- }, null), U.call(this), C && l("div", {
898
+ render: v
899
+ }, null), W, Q.call(this), b && r("div", {
736
900
  class: "k-list-footer"
737
- }, [C]), d && P]
901
+ }, [b]), d && w]
738
902
  });
739
- }, ve = function() {
903
+ }, ke = function() {
740
904
  const u = this.$props.filter !== void 0 ? this.$props.filter : this.currentText;
741
- return this.$props.filterable && l(qe, {
905
+ return this.$props.filterable && r(Xe, {
742
906
  value: u,
743
907
  ref: "filterInput",
744
908
  onChange: this.onChangeHandler,
745
909
  onKeydown: this.onInputKeyDown,
746
- size: a,
910
+ size: l,
747
911
  rounded: g,
748
- fillMode: h
912
+ fillMode: f
749
913
  }, null);
750
- }, be = () => [l("div", {
914
+ }, xe = () => [r("div", {
751
915
  class: "k-actionsheet-titlebar-group k-hbox"
752
- }, [l("div", {
916
+ }, [r("div", {
753
917
  class: "k-actionsheet-title"
754
- }, [l("div", {
918
+ }, [r("div", {
755
919
  class: "k-text-center"
756
- }, [re]), l("div", {
920
+ }, [T]), r("div", {
757
921
  class: "k-actionsheet-subtitle k-text-center"
758
- }, null)]), l("div", {
922
+ }, null)]), r("div", {
759
923
  class: "k-actionsheet-actions"
760
- }, [l(j, {
924
+ }, [r(G, {
761
925
  tabIndex: 5,
762
926
  "aria-label": "Cancel",
763
927
  "aria-disabled": "false",
@@ -765,72 +929,72 @@ const vt = /* @__PURE__ */ $e({
765
929
  fillMode: "flat",
766
930
  onClick: this.onCancel,
767
931
  icon: "x",
768
- svgIcon: _e
769
- }, null)])]), l("div", {
932
+ svgIcon: Ge
933
+ }, null)])]), r("div", {
770
934
  class: "k-actionsheet-titlebar-group k-actionsheet-filter"
771
- }, [ve.call(this)])], Ie = b.call(this, be, I.call(this)), Se = () => {
772
- const u = q.toLanguageString(se, ie[se]), p = q.toLanguageString(ne, ie[ne]);
773
- return [l(j, {
935
+ }, [ke.call(this)])], $e = C.call(this, xe, F.call(this)), Ce = () => {
936
+ const u = M.toLanguageString(ae, L[ae]), p = M.toLanguageString(le, L[le]);
937
+ return [r(G, {
774
938
  size: "large",
775
939
  "aria-label": u,
776
940
  "aria-disabled": "false",
777
941
  type: "button",
778
942
  onClick: this.onCancel
779
- }, E(u) ? u : {
943
+ }, _(u) ? u : {
780
944
  default: () => [u]
781
- }), l(j, {
945
+ }), r(G, {
782
946
  themeColor: "primary",
783
947
  size: "large",
784
948
  "aria-label": p,
785
949
  "aria-disabled": "false",
786
950
  type: "button",
787
951
  onClick: this.handleWrapperClick
788
- }, E(p) ? p : {
952
+ }, _(p) ? p : {
789
953
  default: () => [p]
790
954
  })];
791
- }, ye = b.call(this, Se, I.call(this)), ke = () => {
792
- const u = this.base.getTemplateDef.call(this, P, _), p = this.base.getTemplateDef.call(this, W, _), k = b.call(this, de, I.call(this));
793
- return l("div", {
955
+ }, Fe = C.call(this, Ce, F.call(this)), Te = () => {
956
+ const u = this.base.getTemplateDef.call(this, w, q), p = this.base.getTemplateDef.call(this, Y, q), v = C.call(this, pe, F.call(this));
957
+ return r("div", {
794
958
  class: "k-list-container"
795
- }, [u && l("div", {
959
+ }, [u && r("div", {
796
960
  class: "k-list-header"
797
- }, [u]), l("div", {
798
- class: R("k-list", {
799
- [`k-list-${z[a] || a}`]: T ? !1 : a,
800
- "k-list-lg": !!T,
801
- "k-virtual-list": y.enabled
961
+ }, [u]), r("div", {
962
+ class: B("k-list", {
963
+ [`k-list-${U[l] || l}`]: R ? !1 : l,
964
+ "k-list-lg": !!R,
965
+ "k-virtual-list": A.enabled
802
966
  })
803
- }, [this.group && F.length !== 0 && l(ee, {
967
+ }, [this.group && H.length !== 0 && r(ie, {
804
968
  group: this.group,
805
- render: k
806
- }, null), U.call(this), p && l("div", {
969
+ render: v
970
+ }, null), Q.call(this), p && r("div", {
807
971
  class: "k-list-footer"
808
972
  }, [p])])]);
809
- }, Ce = b.call(this, ke, I.call(this)), xe = function() {
810
- return l(Ge, {
811
- expand: A,
973
+ }, Ae = C.call(this, Te, F.call(this)), Oe = function() {
974
+ return r(Qe, {
975
+ expand: N,
812
976
  animation: !0,
813
977
  animationStyles: this.animationStyles,
814
978
  className: this.classNameAdaptive,
815
979
  contentClassName: "!k-overflow-hidden",
816
980
  footerClassName: "k-actions k-actions-stretched",
817
- header: Ie,
818
- content: Ce,
819
- footer: ye,
981
+ header: $e,
982
+ content: Ae,
983
+ footer: Fe,
820
984
  onClose: this.onCancel,
821
985
  navigatableElements: ["input.k-input-inner", ".k-actionsheet-actions > button"]
822
986
  }, null);
823
- }, Y = [_(function() {
987
+ }, X = [q(function() {
824
988
  let u;
825
- return l("span", {
826
- ref: we(this, "kendoAnchor"),
827
- class: R("k-multiselect", "k-input", {
828
- [`k-input-${z[a] || a}`]: a,
829
- [`k-rounded-${Ye[g] || g}`]: g,
830
- [`k-input-${h}`]: h,
831
- "k-focus": ue && !i,
989
+ return r("span", {
990
+ ref: Me(this, "kendoAnchor"),
991
+ class: B("k-multiselect", "k-input", {
992
+ [`k-input-${U[l] || l}`]: l,
993
+ [`k-rounded-${et[g] || g}`]: g,
994
+ [`k-input-${f}`]: f,
995
+ "k-focus": fe && !i,
832
996
  "k-disabled": i,
833
- "k-invalid": !he,
997
+ "k-invalid": !ve,
834
998
  "k-loading": c,
835
999
  "k-required": this.required
836
1000
  }),
@@ -841,38 +1005,40 @@ const vt = /* @__PURE__ */ $e({
841
1005
  dir: s,
842
1006
  onFocusin: this.handleFocus,
843
1007
  onClick: this.handleWrapperClick,
844
- onMousedown: Ne
845
- }, [l(Me, {
846
- removeTagIcon: $,
1008
+ onMousedown: We
1009
+ }, [r(Ee, {
1010
+ removeTagIcon: S,
847
1011
  tagsRounded: m,
848
- size: a,
849
- fillMode: h,
850
- tagRender: pe,
1012
+ size: l,
1013
+ fillMode: f,
1014
+ tagRender: me,
851
1015
  onTagdelete: this.onTagDelete,
852
- dataItems: v,
1016
+ dataItems: x,
853
1017
  guid: this.base.guid,
854
- focused: B ? v.find((p) => ae(p, B, r)) : void 0
855
- }, E(u = fe.call(this, N)) ? u : {
1018
+ summarizeAfter: this.$props.summarizeAfter,
1019
+ summaryText: this.$props.summarizeAfter && x.length > this.$props.summarizeAfter ? M.toLanguageString(oe, L[oe]).replace("{0}", (x.length - this.$props.summarizeAfter).toString()) : void 0,
1020
+ focused: P ? x.find((p) => ce(p, P, o)) : void 0
1021
+ }, _(u = Se.call(this, j)) ? u : {
856
1022
  default: () => [u]
857
- }), v.length > 0 && ce && l(He, {
1023
+ }), x.length > 0 && ge && r(ze, {
858
1024
  onClearclick: this.clearButtonClick
859
- }, null), l("span", {
1025
+ }, null), r("span", {
860
1026
  class: c ? "k-input-loading-icon k-icon k-i-loading" : void 0
861
- }, null), !T && me.call(this)]);
1027
+ }, null), !R && ye.call(this)]);
862
1028
  }.call(this), {
863
1029
  ...this.$attrs
864
- }), T && xe.call(this)];
865
- return t ? l("span", {
1030
+ }), R && Oe.call(this)];
1031
+ return t ? r("span", {
866
1032
  class: this.spanClassNames,
867
1033
  dir: this.$props.dir
868
- }, [Y, this.$props.label ? N ? l("label", {
869
- for: N,
1034
+ }, [X, this.$props.label ? j ? r("label", {
1035
+ for: j,
870
1036
  class: "k-floating-label"
871
- }, [this.$props.label]) : l("span", {
1037
+ }, [this.$props.label]) : r("span", {
872
1038
  class: "k-label"
873
- }, [this.$props.label]) : null]) : Y;
1039
+ }, [this.$props.label]) : null]) : X;
874
1040
  }
875
1041
  });
876
1042
  export {
877
- vt as MultiSelect
1043
+ kt as MultiSelect
878
1044
  };