@progress/kendo-vue-dropdowns 6.1.0-develop.4 → 6.1.0-develop.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,43 +5,43 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as ge, h as k, createVNode as s, isVNode as ve } from "vue";
9
- import { validatePackage as be, guid as N, canUseDOM as Se, getRef as g, getTabIndex as ke, templateRendering as u, getListeners as f, getTemplate as E, noop as z, Keys as n, setRef as v, classNames as V, Icon as ye, kendoThemeMaps as Fe } from "@progress/kendo-vue-common";
10
- import { Popup as we } from "@progress/kendo-vue-popup";
11
- import { provideLocalizationService as Re } from "@progress/kendo-vue-intl";
8
+ import { defineComponent as me, h as S, createVNode as s, isVNode as ge } from "vue";
9
+ import { validatePackage as ve, guid as N, canUseDOM as be, getRef as g, getTabIndex as ke, templateRendering as u, getListeners as f, getTemplate as D, noop as z, Keys as a, setRef as v, classNames as V, Icon as Se, kendoThemeMaps as ye } from "@progress/kendo-vue-common";
10
+ import { Popup as Fe } from "@progress/kendo-vue-popup";
11
+ import { provideLocalizationService as we } from "@progress/kendo-vue-intl";
12
12
  import { TreeView as q } from "@progress/kendo-vue-treeview";
13
- import { packageMetadata as xe } from "../package-metadata.mjs";
14
- import { getItemValue as j, areSame as Ve, matchTags as _ } from "../common/utils.mjs";
15
- import { ListNoData as $e } from "../DropDownTree/ListNoData.mjs";
16
- import { nodata as G, messages as M, adaptiveModeFooterCancel as H, adaptiveModeFooterApply as U } from "../messages/main.mjs";
17
- import { FloatingLabel as Ie } from "@progress/kendo-vue-labels";
13
+ import { packageMetadata as Re } from "../package-metadata.mjs";
14
+ import { getItemValue as j, areSame as xe, matchTags as _ } from "../common/utils.mjs";
15
+ import { ListNoData as Ve } from "../DropDownTree/ListNoData.mjs";
16
+ import { nodata as G, messages as E, adaptiveModeFooterCancel as H, adaptiveModeFooterApply as U } from "../messages/main.mjs";
17
+ import { FloatingLabel as $e } from "@progress/kendo-vue-labels";
18
18
  import { Button as B } from "@progress/kendo-vue-buttons";
19
- import { TagList as Te } from "../MultiSelect/TagList.mjs";
20
- import { ClearButton as Ce } from "../common/ClearButton.mjs";
19
+ import { TagList as Ie } from "../MultiSelect/TagList.mjs";
20
+ import { ClearButton as Te } from "../common/ClearButton.mjs";
21
21
  import { ListFilter as J } from "../common/ListFilter.mjs";
22
- import { getMultiSelectTreeValue as De } from "./utils.mjs";
23
- import { MOBILE_SMALL_DEVICE as Q, MOBILE_MEDIUM_DEVICE as Ee } from "../common/constants.mjs";
24
- import { ActionSheet as Me } from "@progress/kendo-vue-layout";
22
+ import { getMultiSelectTreeValue as Ce } from "./utils.mjs";
23
+ import { MOBILE_SMALL_DEVICE as Me, MOBILE_MEDIUM_DEVICE as De } from "../common/constants.mjs";
24
+ import { ActionSheet as Ee } from "@progress/kendo-vue-layout";
25
25
  import { xIcon as Be } from "@progress/kendo-svg-icons";
26
26
  import Ae from "../common/DropDownBase.mjs";
27
27
  function $(e) {
28
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
28
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ge(e);
29
29
  }
30
30
  const Oe = "Please select a value from the list!", {
31
- sizeMap: X,
31
+ sizeMap: Q,
32
32
  roundedMap: Pe
33
- } = Fe, Ke = (e) => e.split("_").map((t) => parseInt(t, 10)), Y = (e, t) => {
33
+ } = ye, Ke = (e) => e.split("_").map((t) => parseInt(t, 10)), X = (e, t) => {
34
34
  const {
35
35
  validationMessage: i,
36
- valid: a,
36
+ valid: n,
37
37
  required: o
38
38
  } = e;
39
39
  return {
40
40
  customError: i !== void 0,
41
- valid: !!(a !== void 0 ? a : !o || t),
41
+ valid: !!(n !== void 0 ? n : !o || t),
42
42
  valueMissing: !t
43
43
  };
44
- }, at = /* @__PURE__ */ ge({
44
+ }, nt = /* @__PURE__ */ me({
45
45
  name: "KendoMultiSelectTree",
46
46
  model: {
47
47
  event: "changemodel"
@@ -165,10 +165,16 @@ const Oe = "Please select a value from the list!", {
165
165
  inject: {
166
166
  kendoLocalizationService: {
167
167
  default: null
168
+ },
169
+ adaptiveModeBreakpoints: {
170
+ default: {
171
+ small: Me,
172
+ medium: De
173
+ }
168
174
  }
169
175
  },
170
176
  created() {
171
- this.observer = null, be(xe), this.base = new Ae(this), this.componentGuid = N(), this.anchor = N();
177
+ this.observer = null, ve(Re), this.base = new Ae(this), this.componentGuid = N(), this.anchor = N();
172
178
  },
173
179
  data() {
174
180
  return {
@@ -184,17 +190,17 @@ const Oe = "Please select a value from the list!", {
184
190
  },
185
191
  computed: {
186
192
  animationStyles() {
187
- return this.windowWidth <= Q ? {
193
+ return this.windowWidth <= this.adaptiveModeBreakpoints.small ? {
188
194
  top: 0,
189
195
  width: "100%",
190
196
  height: "100%"
191
197
  } : void 0;
192
198
  },
193
199
  classNameAdaptive() {
194
- return this.windowWidth <= Q ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom";
200
+ return this.windowWidth <= this.adaptiveModeBreakpoints.small ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom";
195
201
  },
196
202
  adaptiveState() {
197
- return this.windowWidth <= Ee && this.$props.adaptive;
203
+ return this.windowWidth <= this.adaptiveModeBreakpoints.medium && this.$props.adaptive;
198
204
  },
199
205
  isOpen() {
200
206
  return this.opened !== void 0 ? this.opened : this.openState;
@@ -227,7 +233,7 @@ const Oe = "Please select a value from the list!", {
227
233
  }
228
234
  },
229
235
  mounted() {
230
- this.observer = Se && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.elementRef = g(this, "kendoAnchor"), this.inputRef = g(this, "input"), this.selectRef = g(this, "select"), this.treeViewRef = g(this, "treeView"), this.skipFocusRef = !1, this.popupRef = g(this, "popup"), this.calculatePopupWidth();
236
+ this.observer = be && window.ResizeObserver && new ResizeObserver(this.calculateMedia), document != null && document.body && this.observer && this.observer.observe(document.body), this.elementRef = g(this, "kendoAnchor"), this.inputRef = g(this, "input"), this.selectRef = g(this, "select"), this.treeViewRef = g(this, "treeView"), this.skipFocusRef = !1, this.popupRef = g(this, "popup"), this.calculatePopupWidth();
231
237
  },
232
238
  updated() {
233
239
  this.inputRef = g(this, "input"), this.treeViewRef = g(this, "treeView"), this.popupRef && this.isOpen && this.hasValue && this.popupRef.reposition(), this.setValidity(), this.calculatePopupWidth();
@@ -236,40 +242,40 @@ const Oe = "Please select a value from the list!", {
236
242
  let e;
237
243
  const t = this.$props.id || this.componentGuid, {
238
244
  dataItems: i,
239
- dataItemKey: a,
245
+ dataItemKey: n,
240
246
  popupSettings: o = {},
241
- disabled: d,
247
+ disabled: r,
242
248
  placeholder: l,
243
- label: r,
249
+ label: d,
244
250
  name: h,
245
251
  checkField: b,
246
252
  checkIndeterminateField: F,
247
253
  subItemsField: A,
248
- validationMessage: Z,
249
- valid: ee,
254
+ validationMessage: Y,
255
+ valid: Z,
250
256
  value: O,
251
257
  required: I,
252
- validityStyles: te,
253
- adaptiveTitle: ie
254
- } = this.$props, w = ke(this.$props.tabIndex, d), T = Re(this), se = Y({
255
- validationMessage: Z,
256
- valid: ee,
258
+ validityStyles: ee,
259
+ adaptiveTitle: te
260
+ } = this.$props, w = ke(this.$props.tabIndex, r), T = we(this), ie = X({
261
+ validationMessage: Y,
262
+ valid: Z,
257
263
  required: I
258
- }, this.hasValue), R = this.$props.dir, P = this.adaptiveState, K = u.call(this, this.item, f.call(this)), ne = u.call(this, this.tag, f.call(this)), ae = u.call(this, this.$props.header, f.call(this)), oe = u.call(this, this.$props.footer, f.call(this)), C = E.call(this, {
259
- h: k,
264
+ }, this.hasValue), R = this.$props.dir, P = this.adaptiveState, K = u.call(this, this.item, f.call(this)), se = u.call(this, this.tag, f.call(this)), ae = u.call(this, this.$props.header, f.call(this)), ne = u.call(this, this.$props.footer, f.call(this)), C = D.call(this, {
265
+ h: S,
260
266
  template: ae
261
- }), D = E.call(this, {
262
- h: k,
263
- template: oe
264
- }), le = u.call(this, this.$props.listNoData, f.call(this)), re = s($e, null, $(e = T.toLanguageString(G, M[G])) ? e : {
267
+ }), M = D.call(this, {
268
+ h: S,
269
+ template: ne
270
+ }), oe = u.call(this, this.$props.listNoData, f.call(this)), le = s(Ve, null, $(e = T.toLanguageString(G, E[G])) ? e : {
265
271
  default: () => [e]
266
- }), L = E.call(this, {
267
- h: k,
268
- defaultRendering: re,
269
- template: le
270
- }), W = !te || se.valid, {
272
+ }), L = D.call(this, {
273
+ h: S,
274
+ defaultRendering: le,
275
+ template: oe
276
+ }), W = !ee || ie.valid, {
271
277
  size: c,
272
- rounded: S,
278
+ rounded: k,
273
279
  fillMode: y
274
280
  } = this.$props, de = () => [s("div", {
275
281
  class: "k-actionsheet-titlebar-group k-hbox"
@@ -277,7 +283,7 @@ const Oe = "Please select a value from the list!", {
277
283
  class: "k-actionsheet-title"
278
284
  }, [s("div", {
279
285
  class: "k-text-center"
280
- }, [ie]), s("div", {
286
+ }, [te]), s("div", {
281
287
  class: "k-actionsheet-subtitle k-text-center"
282
288
  }, [l])]), s("div", {
283
289
  class: "k-actionsheet-actions"
@@ -298,12 +304,12 @@ const Oe = "Please select a value from the list!", {
298
304
  onChange: this.onFilterChange,
299
305
  onKeydown: this.onInputKeyDown,
300
306
  size: c,
301
- rounded: S,
307
+ rounded: k,
302
308
  fillMode: y,
303
309
  onFocus: this.onFocus,
304
310
  onBlur: this.onBlur
305
- }, null)])], he = u.call(this, de, f.call(this)), ce = () => {
306
- const p = T.toLanguageString(H, M[H]), m = T.toLanguageString(U, M[U]);
311
+ }, null)])], re = u.call(this, de, f.call(this)), he = () => {
312
+ const p = T.toLanguageString(H, E[H]), m = T.toLanguageString(U, E[U]);
307
313
  return [s(B, {
308
314
  size: "large",
309
315
  "aria-label": p,
@@ -322,15 +328,15 @@ const Oe = "Please select a value from the list!", {
322
328
  }, $(m) ? m : {
323
329
  default: () => [m]
324
330
  })];
325
- }, pe = u.call(this, ce, f.call(this)), ue = () => {
326
- const p = this.base.getTemplateDef.call(this, C, k), m = this.base.getTemplateDef.call(this, D, k);
331
+ }, ce = u.call(this, he, f.call(this)), pe = () => {
332
+ const p = this.base.getTemplateDef.call(this, C, S), m = this.base.getTemplateDef.call(this, M, S);
327
333
  return [p && s("div", {
328
334
  class: "k-list-header"
329
335
  }, [p]), i.length > 0 ? s(q, {
330
336
  ref: v(this, "treeView"),
331
337
  tabIndex: w,
332
338
  dataItems: i,
333
- focusIdField: a,
339
+ focusIdField: n,
334
340
  textField: this.$props.textField,
335
341
  checkField: b,
336
342
  checkIndeterminateField: F,
@@ -349,30 +355,30 @@ const Oe = "Please select a value from the list!", {
349
355
  }, null) : L, m && s("div", {
350
356
  class: "k-list-footer"
351
357
  }, [m])];
352
- }, fe = u.call(this, ue, f.call(this)), me = function() {
353
- return s(Me, {
358
+ }, ue = u.call(this, pe, f.call(this)), fe = function() {
359
+ return s(Ee, {
354
360
  expand: this.isOpen,
355
361
  animation: !0,
356
362
  animationStyles: this.animationStyles,
357
363
  className: this.classNameAdaptive,
358
364
  footerClassName: "k-actions k-actions-stretched",
359
365
  contentClassName: "!k-overflow-hidden",
360
- header: he,
361
- content: fe,
362
- footer: pe,
366
+ header: re,
367
+ content: ue,
368
+ footer: ce,
363
369
  onClose: this.onCancel,
364
370
  navigatableElements: ["input.k-input-inner", ".k-actionsheet-actions > button"]
365
371
  }, null);
366
- }, x = [k(function() {
372
+ }, x = [S(function() {
367
373
  return s("span", {
368
374
  ref: v(this, "kendoAnchor"),
369
375
  class: V("k-multiselecttree k-input", this.$props.className, {
370
- [`k-input-${X[c] || c}`]: c,
371
- [`k-rounded-${Pe[S] || S}`]: S,
376
+ [`k-input-${Q[c] || c}`]: c,
377
+ [`k-rounded-${Pe[k] || k}`]: k,
372
378
  [`k-input-${y}`]: y,
373
- "k-focus": this.focusedState && !d,
379
+ "k-focus": this.focusedState && !r,
374
380
  "k-invalid": !W,
375
- "k-disabled": d,
381
+ "k-disabled": r,
376
382
  "k-loading": this.$props.loading,
377
383
  "k-required": I
378
384
  }),
@@ -387,25 +393,25 @@ const Oe = "Please select a value from the list!", {
387
393
  role: "combobox",
388
394
  "aria-haspopup": "tree",
389
395
  "aria-expanded": this.isOpen,
390
- "aria-disabled": d,
391
- "aria-label": r,
396
+ "aria-disabled": r,
397
+ "aria-label": d,
392
398
  "aria-labelledby": this.$props.ariaLabelledBy,
393
399
  "aria-describedby": this.$props.ariaLabelledBy ? this.$props.ariaLabelledBy : "tagslist-" + t,
394
400
  "aria-required": this.$props.required,
395
401
  onClick: this.onWrapperClick
396
402
  }, [
397
- this.tagsToRenderRef.length > 0 && s(Te, {
403
+ this.tagsToRenderRef.length > 0 && s(Ie, {
398
404
  id: "tagslist-" + t,
399
405
  class: V("k-input-values k-chip-list k-selection-multiple", {
400
- [`k-chip-list-${X[c] || c}`]: c,
406
+ [`k-chip-list-${Q[c] || c}`]: c,
401
407
  "k-readonly": this.hasValue
402
408
  }),
403
- tagRender: ne,
409
+ tagRender: se,
404
410
  onTagdelete: this.onTagDelete,
405
411
  dataItems: this.tagsToRenderRef,
406
412
  guid: t,
407
- focused: this.focusedTagState ? this.tagsToRenderRef.find((p) => this.focusedTagState && _(p, this.focusedTagState, a)) : void 0,
408
- tagsRounded: S,
413
+ focused: this.focusedTagState ? this.tagsToRenderRef.find((p) => this.focusedTagState && _(p, this.focusedTagState, n)) : void 0,
414
+ tagsRounded: k,
409
415
  size: c,
410
416
  fillMode: y
411
417
  }, null),
@@ -419,11 +425,11 @@ const Oe = "Please select a value from the list!", {
419
425
  }, [this.tagsToRenderRef.length === 0 && s("span", {
420
426
  class: "k-input-value-text"
421
427
  }, [l])]),
422
- this.$props.loading && s(ye, {
428
+ this.$props.loading && s(Se, {
423
429
  class: "k-input-loading-icon",
424
430
  name: "loading"
425
431
  }, null),
426
- this.hasValue && !d && s(Ce, {
432
+ this.hasValue && !r && s(Te, {
427
433
  onClearclick: this.onClear
428
434
  }, null),
429
435
  /* Dummy component to support forms */
@@ -433,7 +439,7 @@ const Oe = "Please select a value from the list!", {
433
439
  tabindex: -1,
434
440
  "aria-hidden": !0,
435
441
  required: I,
436
- title: r,
442
+ title: d,
437
443
  style: {
438
444
  opacity: 0,
439
445
  width: 1,
@@ -445,7 +451,7 @@ const Oe = "Please select a value from the list!", {
445
451
  }, [s("option", {
446
452
  value: this.$props.valueMap ? this.$props.valueMap.call(void 0, O) : O
447
453
  }, null)]),
448
- !P && s(we, {
454
+ !P && s(Fe, {
449
455
  style: {
450
456
  width: this.popupWidth,
451
457
  direction: R
@@ -468,7 +474,7 @@ const Oe = "Please select a value from the list!", {
468
474
  onChange: this.onFilterChange,
469
475
  onKeydown: this.onInputKeyDown,
470
476
  size: c,
471
- rounded: S,
477
+ rounded: k,
472
478
  fillMode: y,
473
479
  onFocus: this.onFocus,
474
480
  onBlur: this.onBlur
@@ -478,7 +484,7 @@ const Oe = "Please select a value from the list!", {
478
484
  ref: v(this, "treeView"),
479
485
  tabIndex: w,
480
486
  dataItems: i,
481
- focusIdField: a,
487
+ focusIdField: n,
482
488
  textField: this.$props.textField,
483
489
  checkField: b,
484
490
  checkIndeterminateField: F,
@@ -494,20 +500,20 @@ const Oe = "Please select a value from the list!", {
494
500
  checkboxes: !0,
495
501
  size: c,
496
502
  item: K
497
- }, null) : L, D && s("div", {
503
+ }, null) : L, M && s("div", {
498
504
  class: "k-list-footer"
499
- }, [D])]
505
+ }, [M])]
500
506
  })
501
507
  ]);
502
508
  }.call(this), {
503
509
  ...this.$attrs
504
- }), P && me.call(this)];
505
- return r ? s(Ie, {
506
- label: r,
510
+ }), P && fe.call(this)];
511
+ return d ? s($e, {
512
+ label: d,
507
513
  editorValue: this.hasValue,
508
514
  editorPlaceholder: l,
509
515
  editorValid: W,
510
- editorDisabled: d,
516
+ editorDisabled: r,
511
517
  editorId: t,
512
518
  dir: R
513
519
  }, $(x) ? x : {
@@ -546,45 +552,45 @@ const Oe = "Please select a value from the list!", {
546
552
  validationMessage: e,
547
553
  valid: t,
548
554
  required: i
549
- } = this.$props, a = Y({
555
+ } = this.$props, n = X({
550
556
  validationMessage: e,
551
557
  valid: t,
552
558
  required: i
553
559
  }, this.hasValue);
554
- this.selectRef.setCustomValidity(a.valid ? "" : this.validationMessage === void 0 ? Oe : this.validationMessage);
560
+ this.selectRef.setCustomValidity(n.valid ? "" : this.validationMessage === void 0 ? Oe : this.validationMessage);
555
561
  }
556
562
  },
557
563
  changeValue(e, t, i) {
558
- const a = {
564
+ const n = {
559
565
  dataItemKey: this.dataItemKey,
560
566
  checkField: this.checkField,
561
567
  checkIndeterminateField: this.checkIndeterminateField,
562
568
  expandField: this.expandField,
563
569
  subItemsField: this.subItemsField
564
- }, o = De(this.dataItems, {
565
- ...a,
570
+ }, o = Ce(this.dataItems, {
571
+ ...n,
566
572
  items: t,
567
573
  operation: i,
568
574
  value: this.computedValue
569
- }), d = {
575
+ }), r = {
570
576
  items: t,
571
577
  operation: i,
572
578
  value: o,
573
579
  ...e
574
580
  };
575
- this.$emit("changemodel", o), this.$emit("update:modelValue", o), this.$emit("change", d);
581
+ this.$emit("changemodel", o), this.$emit("update:modelValue", o), this.$emit("change", r);
576
582
  },
577
583
  onChange(e) {
578
- if (Ve(e.item, this.computedValue, this.dataItemKey))
584
+ if (xe(e.item, this.computedValue, this.dataItemKey))
579
585
  return;
580
586
  const {
581
587
  item: t,
582
588
  event: i
583
- } = e, a = {
589
+ } = e, n = {
584
590
  event: i,
585
591
  target: this
586
592
  };
587
- this.changeValue(a, [t], "toggle");
593
+ this.changeValue(n, [t], "toggle");
588
594
  },
589
595
  openPopup(e) {
590
596
  if (!this.isOpen) {
@@ -661,47 +667,47 @@ const Oe = "Please select a value from the list!", {
661
667
  const {
662
668
  keyCode: t,
663
669
  altKey: i
664
- } = e, a = this.treeViewRef && this.treeViewRef.$el, o = this.inputRef && this.inputRef.input;
670
+ } = e, n = this.treeViewRef && this.treeViewRef.$el, o = this.inputRef && this.inputRef.input;
665
671
  if (this.$props.disabled || e.defaultPrevented && o === e.target)
666
672
  return;
667
- const d = {
673
+ const r = {
668
674
  event: e,
669
675
  target: this
670
676
  };
671
- if (this.computedValue && this.computedValue.length > 0 && (t === n.left || t === n.right || t === n.home || t === n.end || t === n.delete || t === n.backspace)) {
677
+ if (this.computedValue && this.computedValue.length > 0 && (t === a.left || t === a.right || t === a.home || t === a.end || t === a.delete || t === a.backspace)) {
672
678
  const l = this.tagsToRenderRef;
673
- let r = this.focusedTagState ? l.findIndex((F) => _(F, this.focusedTagState, this.dataItemKey)) : -1, h;
674
- const b = r !== -1;
675
- t === n.left ? (b ? r = Math.max(0, r - 1) : r = l.length - 1, h = l[r]) : t === n.right ? b ? (r = Math.min(l.length - 1, r + 1), h = l[r]) : h = l[0] : t === n.home ? h = l[0] : t === n.end ? h = l[l.length - 1] : (t === n.delete || t === n.backspace) && b && this.changeValue(d, l[r].data, "delete"), h !== this.focusedTagState && (this.focusedTagState = h);
679
+ let d = this.focusedTagState ? l.findIndex((F) => _(F, this.focusedTagState, this.dataItemKey)) : -1, h;
680
+ const b = d !== -1;
681
+ t === a.left ? (b ? d = Math.max(0, d - 1) : d = l.length - 1, h = l[d]) : t === a.right ? b ? (d = Math.min(l.length - 1, d + 1), h = l[d]) : h = l[0] : t === a.home ? h = l[0] : t === a.end ? h = l[l.length - 1] : (t === a.delete || t === a.backspace) && b && this.changeValue(r, l[d].data, "delete"), h !== this.focusedTagState && (this.focusedTagState = h);
676
682
  }
677
683
  if (this.isOpen)
678
- if (t === n.esc || i && t === n.up)
684
+ if (t === a.esc || i && t === a.up)
679
685
  e.preventDefault(), this.switchFocus(() => {
680
686
  this.focusElement(this.elementRef);
681
- }), this.closePopup(d);
682
- else if (a && a.querySelector(".k-focus") && (t === n.up || t === n.down || t === n.left || t === n.right || t === n.home || t === n.end)) {
683
- if (t === n.up) {
684
- const l = Array.from(a.querySelectorAll(".k-treeview-item")), r = [...l].reverse().find((h) => !!(h && h.querySelector(".k-focus")));
685
- if (r && l.indexOf(r) === 0)
687
+ }), this.closePopup(r);
688
+ else if (n && n.querySelector(".k-focus") && (t === a.up || t === a.down || t === a.left || t === a.right || t === a.home || t === a.end)) {
689
+ if (t === a.up) {
690
+ const l = Array.from(n.querySelectorAll(".k-treeview-item")), d = [...l].reverse().find((h) => !!(h && h.querySelector(".k-focus")));
691
+ if (d && l.indexOf(d) === 0)
686
692
  return this.switchFocus(() => {
687
693
  this.focusElement(o || this.elementRef);
688
694
  });
689
695
  }
690
696
  this.switchFocus(z);
691
- } else t === n.down && this.switchFocus(() => {
692
- this.focusElement(o || a);
697
+ } else t === a.down && this.switchFocus(() => {
698
+ this.focusElement(o || n);
693
699
  });
694
700
  else
695
- i && t === n.down && (e.preventDefault(), this.openPopup(d));
701
+ i && t === a.down && (e.preventDefault(), this.openPopup(r));
696
702
  },
697
703
  onInputKeyDown(e) {
698
704
  const {
699
705
  keyCode: t,
700
706
  altKey: i
701
707
  } = e;
702
- (t === n.esc || i && t === n.up) && (e.preventDefault(), this.switchFocus(() => {
708
+ (t === a.esc || i && t === a.up) && (e.preventDefault(), this.switchFocus(() => {
703
709
  this.focusElement(this.elementRef);
704
- }), t === n.esc && this.adaptiveState ? this.onCancel(e) : this.closePopup(e)), !(i || t !== n.up && t !== n.down) && (e.preventDefault(), this.switchFocus(t === n.up ? () => {
710
+ }), t === a.esc && this.adaptiveState ? this.onCancel(e) : this.closePopup(e)), !(i || t !== a.up && t !== a.down) && (e.preventDefault(), this.switchFocus(t === a.up ? () => {
705
711
  this.focusElement(this.elementRef);
706
712
  } : () => {
707
713
  this.focusElement(this.treeViewRef && this.treeViewRef.$el);
@@ -730,11 +736,11 @@ const Oe = "Please select a value from the list!", {
730
736
  const {
731
737
  item: t,
732
738
  itemHierarchicalIndex: i,
733
- event: a
739
+ event: n
734
740
  } = e, o = {
735
741
  level: Ke(i),
736
742
  item: t,
737
- event: a,
743
+ event: n,
738
744
  target: this
739
745
  };
740
746
  this.$emit("expandchange", o);
@@ -754,5 +760,5 @@ const Oe = "Please select a value from the list!", {
754
760
  }
755
761
  });
756
762
  export {
757
- at as MultiSelectTree
763
+ nt as MultiSelectTree
758
764
  };