@progress/kendo-vue-dropdowns 8.4.0-develop.1 → 8.4.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,29 +5,29 @@
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";
8
+ import { defineComponent as $e, h as j, 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 w, kendoThemeMaps as De, setRef as Ve, Icon as Be } from "@progress/kendo-vue-common";
10
+ import { ListContainer as we } from "../common/ListContainer.mjs";
11
+ import { List as Re } from "../common/List.mjs";
12
12
  import { TagList as Me } from "./TagList.mjs";
13
13
  import { SearchBar as Ae } from "../common/SearchBar.mjs";
14
14
  import Le from "../common/DropDownBase.mjs";
15
15
  import { GroupStickyHeader as ee } from "../common/GroupStickyHeader.mjs";
16
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";
17
+ import { ActiveDescendant as E } from "../common/settings.mjs";
18
+ import { getItemValue as C, itemIndexStartsWith as Ee, areSame as te, removeDataItems as P, isPresent as Pe, preventDefaultNonInputs as Ne, matchDataCollections as Ke } from "../common/utils.mjs";
19
19
  import { xIcon as _e, plusIcon as je } from "@progress/kendo-svg-icons";
20
- import { Button as j } from "@progress/kendo-vue-buttons";
20
+ import { Button as z } from "@progress/kendo-vue-buttons";
21
21
  import { MOBILE_MEDIUM_DEVICE as ze, MOBILE_SMALL_DEVICE as We } from "../common/constants.mjs";
22
22
  import { ActionSheet as Ge } from "@progress/kendo-vue-layout";
23
23
  import { ListFilter as qe } from "../common/ListFilter.mjs";
24
24
  import { provideLocalizationService as Ue } from "@progress/kendo-vue-intl";
25
25
  import { adaptiveModeFooterCancel as se, messages as ie, adaptiveModeFooterApply as ne } from "../messages/main.mjs";
26
26
  const {
27
- sizeMap: z,
27
+ sizeMap: W,
28
28
  roundedMap: Ye
29
- } = Ve;
30
- function E(e) {
29
+ } = De;
30
+ function N(e) {
31
31
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Te(e);
32
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;
@@ -182,7 +182,7 @@ const vt = /* @__PURE__ */ $e({
182
182
  },
183
183
  computed: {
184
184
  spanClassNames() {
185
- const e = !this.hasMounted || !this.$props.validityStyles || this.validity().valid, t = this.currentText || x(this.computedValue()[0], this.$props.textField);
185
+ const e = !this.hasMounted || !this.$props.validityStyles || this.validity().valid, t = this.currentText || C(this.computedValue()[0], this.$props.textField);
186
186
  return {
187
187
  "k-floating-label-container": !0,
188
188
  "k-focus": this.currentFocused,
@@ -236,7 +236,7 @@ const vt = /* @__PURE__ */ $e({
236
236
  last: ""
237
237
  },
238
238
  suggested: "",
239
- activedescendant: L.PopupList,
239
+ activedescendant: E.PopupList,
240
240
  group: void 0,
241
241
  isScrolling: !1,
242
242
  itemHeight: 0,
@@ -297,12 +297,12 @@ const vt = /* @__PURE__ */ $e({
297
297
  },
298
298
  findByFieldValue(e, t) {
299
299
  return t.map((i) => {
300
- const n = this.dataItems.findIndex((o) => x(o, e) === i);
300
+ const n = this.dataItems.findIndex((o) => C(o, e) === i);
301
301
  return this.dataItems[n] || i;
302
302
  });
303
303
  },
304
304
  primitiveValue() {
305
- const e = this.computedValue(), t = e.map((s) => x(s, this.valueField));
305
+ const e = this.computedValue(), t = e.map((s) => C(s, this.valueField));
306
306
  return this.valuePrimitive ? t : e;
307
307
  },
308
308
  validity() {
@@ -326,7 +326,7 @@ const vt = /* @__PURE__ */ $e({
326
326
  const s = this.isOpen, i = this.base.initState();
327
327
  i.event = t, s && this.base.togglePopup(i), this.currentFocused || (i.data.currentFocused = !0);
328
328
  const n = this.computedValue();
329
- H(n, e, this.$props.dataItemKey), this.triggerOnChange(n, i), this.applyState(i);
329
+ P(n, e, this.$props.dataItemKey), this.triggerOnChange(n, i), this.applyState(i);
330
330
  },
331
331
  onNavigate(e, t) {
332
332
  const {
@@ -357,7 +357,7 @@ const vt = /* @__PURE__ */ $e({
357
357
  } = this.$props, o = n ? n.skip : 0, r = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
358
358
  focusedIndex: d
359
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);
360
+ a && d !== e ? this.currentFocusedIndex !== e && (t.data.currentFocusedIndex = e, t.data.activedescendant = E.PopupList) : c && e === -1 && this.currentFocusedIndex !== void 0 && (t.data.currentFocusedIndex = void 0), this.base.triggerPageChangeCornerItems(a, t);
361
361
  },
362
362
  searchBarRef() {
363
363
  this.input && this.currentFocused && setTimeout(() => this.input.focus(), 0);
@@ -399,18 +399,18 @@ const vt = /* @__PURE__ */ $e({
399
399
  else if (s === f.delete) {
400
400
  if (c) {
401
401
  const a = this.computedValue();
402
- H(a, n[r].data, o), this.triggerOnChange(a, t);
402
+ P(a, n[r].data, o), this.triggerOnChange(a, t);
403
403
  }
404
404
  } else if (s === f.backspace) {
405
405
  const a = this.computedValue();
406
406
  if (c)
407
- H(a, n[r].data, o), this.triggerOnChange(a, t);
407
+ P(a, n[r].data, o), this.triggerOnChange(a, t);
408
408
  else if (!c && n.length) {
409
409
  const h = n.pop();
410
- H(a, h.data, o), this.triggerOnChange(a, t);
410
+ P(a, h.data, o), this.triggerOnChange(a, t);
411
411
  }
412
412
  }
413
- d !== i && (t.data.currentFocusedTag = d, t.data.activedescendant = L.TagsList), this.applyState(t);
413
+ d !== i && (t.data.currentFocusedTag = d, t.data.activedescendant = E.TagsList), this.applyState(t);
414
414
  },
415
415
  triggerOnChange(e, t) {
416
416
  this.$props.value === void 0 && (t.data.currentValue = [...e]), this.valuesItemsDuringOnChange = [], this.setItems(e, this.valuesItemsDuringOnChange), t.events.push({
@@ -596,25 +596,25 @@ const vt = /* @__PURE__ */ $e({
596
596
  tagsRounded: m,
597
597
  removeTagIcon: $,
598
598
  adaptiveTitle: re,
599
- header: P,
600
- footer: W,
599
+ header: K,
600
+ footer: G,
601
601
  inputAttributes: le,
602
602
  groupStickyHeaderItemRender: de,
603
603
  dataItems: F = []
604
- } = this.$props, ue = this.currentFocused, D = Object.assign({}, {
604
+ } = this.$props, ue = this.currentFocused, R = Object.assign({}, {
605
605
  animate: !0,
606
606
  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);
607
+ }, this.$props.popupSettings), M = this.currentFocusedTag, q = this.computedValue(), A = (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) || "", ce = !c && !i && (!!A || q.length > 0), y = this.base.vs, _ = this.$props.id || this.inputId, pe = b.call(this, this.$props.tagRender, I.call(this)), L = this.isOpen, T = this.adaptiveState, U = Ue(this);
608
+ this.group === void 0 && this.$props.groupField !== void 0 && (this.group = C(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
609
  let v = [];
610
610
  this.initialAdaptiveRenderingValues ? [...this.initialAdaptiveRenderingValues].forEach((p) => {
611
611
  v.push({
612
- text: x(p, o),
612
+ text: C(p, o),
613
613
  data: [p]
614
614
  });
615
615
  }) : n === void 0 ? this.computedValue().forEach((u) => {
616
616
  v.push({
617
- text: x(u, o),
617
+ text: C(u, o),
618
618
  data: [u]
619
619
  });
620
620
  }) : v.push(...n), v.length > 0 && this.setItems(v, this._tags);
@@ -623,63 +623,63 @@ const vt = /* @__PURE__ */ $e({
623
623
  placeholder: k
624
624
  } = this.$props, {
625
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}`;
626
+ } = this.getFocusedState(), x = v.length === 0 || q.length === 0 && !A ? k : void 0, D = p === E.TagsList && M !== void 0 ? `tag-${this.base.guid}-${M.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${O}`, V = this.$props.ariaDescribedBy ? " " + this.$props.ariaDescribedBy : "", B = v.length > 0 ? `tagslist-${this.base.guid}${V}` : this.$props.ariaDescribedBy;
627
627
  return l(Ae, {
628
628
  id: u,
629
- size: Math.max((C || "").length, M.length, 1),
629
+ size: Math.max((x || "").length, A.length, 1),
630
630
  tabIndex: this.$props.tabIndex,
631
631
  accessKey: this.$props.accessKey,
632
- placeholder: C,
633
- value: T ? "" : M,
632
+ placeholder: x,
633
+ value: T ? "" : A,
634
634
  onChange: this.onChangeHandler,
635
635
  onBlur: this.handleBlur,
636
636
  onKeydown: this.onInputKeyDown,
637
- ref: (w) => {
638
- this.inputRef = w;
637
+ ref: (H) => {
638
+ this.inputRef = H;
639
639
  },
640
640
  disabled: i,
641
- expanded: A,
641
+ expanded: L,
642
642
  owns: this.base.listBoxId,
643
- activedescendant: V,
644
- "aria-describedBy": `tagslist-${this.base.guid}${this.$props.ariaDescribedBy ? " " + this.$props.ariaDescribedBy : ""}`,
643
+ activedescendant: D,
644
+ ariaDescribedBy: B,
645
645
  "aria-labelledBy": this.$props.ariaLabelledBy,
646
646
  "aria-label": this.$props.ariaLabel,
647
647
  inputAttributes: le
648
648
  }, null);
649
- }, U = function() {
649
+ }, Y = function() {
650
650
  let u;
651
651
  const {
652
652
  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, {
653
+ } = this.$props, k = b.call(this, this.$props.itemRender, I.call(this)), O = b.call(this, this.$props.groupHeaderItemRender, I.call(this)), x = b.call(this, this.$props.listNoDataRender, I.call(this)), D = d ? d.skip : 0, {
654
+ focusedIndex: V
655
+ } = this.getFocusedState(), B = `translateY(${y.translate}px)`;
656
+ let H = F;
657
+ return p && (H = this.base.getGroupedDataModernMode(F, p)), l(Re, {
658
658
  id: this.base.listBoxId,
659
- show: A,
660
- dataItems: J.slice(),
661
- focusedIndex: w,
659
+ show: L,
660
+ dataItems: H.slice(),
661
+ focusedIndex: V,
662
662
  value: this.computedValue(),
663
663
  textField: o,
664
664
  valueField: r,
665
665
  optionsGuid: this.base.guid,
666
666
  ref: "list",
667
667
  wrapperStyle: {
668
- maxHeight: T ? void 0 : D.height
668
+ maxHeight: T ? void 0 : R.height
669
669
  },
670
670
  wrapperCssClass: "k-list-content",
671
671
  listStyle: y.enabled ? {
672
- transform: K
672
+ transform: B
673
673
  } : void 0,
674
674
  key: "listKey",
675
- skip: V,
675
+ skip: D,
676
676
  onListclick: this.handleItemClick,
677
677
  itemRender: k,
678
678
  groupHeaderItemRender: O,
679
- noDataRender: C,
679
+ noDataRender: x,
680
680
  groupField: p,
681
681
  onScroll: this.onScroll
682
- }, E(u = ge.call(this)) ? u : {
682
+ }, N(u = ge.call(this)) ? u : {
683
683
  default: () => [u]
684
684
  });
685
685
  }, ge = function() {
@@ -690,51 +690,51 @@ const vt = /* @__PURE__ */ $e({
690
690
  }, me = function() {
691
691
  const u = this.base, {
692
692
  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", {
693
+ } = this.$props, k = b.call(this, this.$props.groupStickyHeaderItemRender, I.call(this)), O = u.getTemplateDef.call(this, K), x = u.getTemplateDef.call(this, G), D = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
694
+ focusedType: V
695
+ } = this.getFocusedState(), B = p && D && l("div", {
696
696
  class: "k-list",
697
697
  key: "customitem",
698
698
  onClick: this.customItemSelect
699
699
  }, [l("div", {
700
- class: R("k-item k-custom-item", {
701
- "k-focus": oe(w)
700
+ class: w("k-item k-custom-item", {
701
+ "k-focus": oe(V)
702
702
  })
703
- }, [V, l(Re, {
703
+ }, [D, l(Be, {
704
704
  name: "plus",
705
705
  icon: je,
706
706
  style: {
707
707
  float: "right"
708
708
  }
709
709
  }, null)])]);
710
- return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = x(F[0], this.$props.groupField)), l(De, {
710
+ return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = C(F[0], this.$props.groupField)), l(we, {
711
711
  ref: "container",
712
712
  onMousedown: Qe,
713
713
  dir: s !== void 0 ? s : u.dirCalculated,
714
714
  onBlur: this.handleBlur,
715
715
  width: this.popupWidth,
716
716
  popupSettings: {
717
- ...D,
717
+ ...R,
718
718
  anchor: this.anchor,
719
- show: A,
719
+ show: L,
720
720
  onOpen: this.onPopupOpened,
721
721
  onClose: this.onPopupClosed,
722
- popupClass: R(D.popupClass, "k-list", {
723
- [`k-list-${z[a] || a}`]: a,
722
+ popupClass: w(R.popupClass, "k-list", {
723
+ [`k-list-${W[a] || a}`]: a,
724
724
  "k-virtual-list": this.base.vs.enabled
725
725
  }),
726
- className: R("k-list-container", D.className)
726
+ className: w("k-list-container", R.className)
727
727
  },
728
728
  itemsCount: F.length
729
729
  }, {
730
730
  default: () => [O && l("div", {
731
731
  class: "k-list-header"
732
- }, [O]), K, this.group && F.length !== 0 && l(ee, {
732
+ }, [O]), B, this.group && F.length !== 0 && l(ee, {
733
733
  group: this.group,
734
734
  render: k
735
- }, null), U.call(this), C && l("div", {
735
+ }, null), Y.call(this), x && l("div", {
736
736
  class: "k-list-footer"
737
- }, [C]), d && P]
737
+ }, [x]), d && K]
738
738
  });
739
739
  }, ve = function() {
740
740
  const u = this.$props.filter !== void 0 ? this.$props.filter : this.currentText;
@@ -757,7 +757,7 @@ const vt = /* @__PURE__ */ $e({
757
757
  class: "k-actionsheet-subtitle k-text-center"
758
758
  }, null)]), l("div", {
759
759
  class: "k-actionsheet-actions"
760
- }, [l(j, {
760
+ }, [l(z, {
761
761
  tabIndex: 5,
762
762
  "aria-label": "Cancel",
763
763
  "aria-disabled": "false",
@@ -769,63 +769,63 @@ const vt = /* @__PURE__ */ $e({
769
769
  }, null)])]), l("div", {
770
770
  class: "k-actionsheet-titlebar-group k-actionsheet-filter"
771
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, {
772
+ const u = U.toLanguageString(se, ie[se]), p = U.toLanguageString(ne, ie[ne]);
773
+ return [l(z, {
774
774
  size: "large",
775
775
  "aria-label": u,
776
776
  "aria-disabled": "false",
777
777
  type: "button",
778
778
  onClick: this.onCancel
779
- }, E(u) ? u : {
779
+ }, N(u) ? u : {
780
780
  default: () => [u]
781
- }), l(j, {
781
+ }), l(z, {
782
782
  themeColor: "primary",
783
783
  size: "large",
784
784
  "aria-label": p,
785
785
  "aria-disabled": "false",
786
786
  type: "button",
787
787
  onClick: this.handleWrapperClick
788
- }, E(p) ? p : {
788
+ }, N(p) ? p : {
789
789
  default: () => [p]
790
790
  })];
791
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));
792
+ const u = this.base.getTemplateDef.call(this, K, j), p = this.base.getTemplateDef.call(this, G, j), k = b.call(this, de, I.call(this));
793
793
  return l("div", {
794
794
  class: "k-list-container"
795
795
  }, [u && l("div", {
796
796
  class: "k-list-header"
797
797
  }, [u]), l("div", {
798
- class: R("k-list", {
799
- [`k-list-${z[a] || a}`]: T ? !1 : a,
798
+ class: w("k-list", {
799
+ [`k-list-${W[a] || a}`]: T ? !1 : a,
800
800
  "k-list-lg": !!T,
801
801
  "k-virtual-list": y.enabled
802
802
  })
803
803
  }, [this.group && F.length !== 0 && l(ee, {
804
804
  group: this.group,
805
805
  render: k
806
- }, null), U.call(this), p && l("div", {
806
+ }, null), Y.call(this), p && l("div", {
807
807
  class: "k-list-footer"
808
808
  }, [p])])]);
809
- }, Ce = b.call(this, ke, I.call(this)), xe = function() {
809
+ }, xe = b.call(this, ke, I.call(this)), Ce = function() {
810
810
  return l(Ge, {
811
- expand: A,
811
+ expand: L,
812
812
  animation: !0,
813
813
  animationStyles: this.animationStyles,
814
814
  className: this.classNameAdaptive,
815
815
  contentClassName: "!k-overflow-hidden",
816
816
  footerClassName: "k-actions k-actions-stretched",
817
817
  header: Ie,
818
- content: Ce,
818
+ content: xe,
819
819
  footer: ye,
820
820
  onClose: this.onCancel,
821
821
  navigatableElements: ["input.k-input-inner", ".k-actionsheet-actions > button"]
822
822
  }, null);
823
- }, Y = [_(function() {
823
+ }, J = [j(function() {
824
824
  let u;
825
825
  return l("span", {
826
- ref: we(this, "kendoAnchor"),
827
- class: R("k-multiselect", "k-input", {
828
- [`k-input-${z[a] || a}`]: a,
826
+ ref: Ve(this, "kendoAnchor"),
827
+ class: w("k-multiselect", "k-input", {
828
+ [`k-input-${W[a] || a}`]: a,
829
829
  [`k-rounded-${Ye[g] || g}`]: g,
830
830
  [`k-input-${h}`]: h,
831
831
  "k-focus": ue && !i,
@@ -851,8 +851,8 @@ const vt = /* @__PURE__ */ $e({
851
851
  onTagdelete: this.onTagDelete,
852
852
  dataItems: v,
853
853
  guid: this.base.guid,
854
- focused: B ? v.find((p) => ae(p, B, r)) : void 0
855
- }, E(u = fe.call(this, N)) ? u : {
854
+ focused: M ? v.find((p) => ae(p, M, r)) : void 0
855
+ }, N(u = fe.call(this, _)) ? u : {
856
856
  default: () => [u]
857
857
  }), v.length > 0 && ce && l(He, {
858
858
  onClearclick: this.clearButtonClick
@@ -861,16 +861,16 @@ const vt = /* @__PURE__ */ $e({
861
861
  }, null), !T && me.call(this)]);
862
862
  }.call(this), {
863
863
  ...this.$attrs
864
- }), T && xe.call(this)];
864
+ }), T && Ce.call(this)];
865
865
  return t ? l("span", {
866
866
  class: this.spanClassNames,
867
867
  dir: this.$props.dir
868
- }, [Y, this.$props.label ? N ? l("label", {
869
- for: N,
868
+ }, [J, this.$props.label ? _ ? l("label", {
869
+ for: _,
870
870
  class: "k-floating-label"
871
871
  }, [this.$props.label]) : l("span", {
872
872
  class: "k-label"
873
- }, [this.$props.label]) : null]) : Y;
873
+ }, [this.$props.label]) : null]) : J;
874
874
  }
875
875
  });
876
876
  export {
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),n=require("@progress/kendo-vue-common"),v=require("@progress/kendo-vue-buttons"),S=e=>e.preventDefault(),T=e=>e.event.stopPropagation(),b=i.defineComponent({name:"TagList",inheritAttrs:!1,props:{removeTagIcon:String,dataItems:Array,guid:String,focused:Object,tagRender:[String,Function,Object],tagsRounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},id:String,className:String,size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},onTagdelete:Function},computed:{wrapperClass(){const{size:e,disabled:t}=this.$props;return{"k-chip-list":!0,[`k-chip-list-${n.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-disabled":t}}},methods:{onTagDelete(e,t){this.$emit("tagdelete",e,t)}},render(){const e=n.getDefaultSlots(this),{dataItems:t,guid:o,size:d,disabled:l,tagsRounded:u,removeTagIcon:c,id:p,className:g}=this.$props;return i.createVNode("div",{class:n.classNames("k-input-values",g),id:p,style:this.$attrs.style},[i.createVNode("div",{class:this.wrapperClass,role:"listbox",id:"tagslist-"+o},[t.map(function(s,r){const m=`tag-${o}-${s.text.toString().replace(/\s+/g,"-")}`,a=s===this.$props.focused,h=i.createVNode(v.Chip,{id:m,tabIndex:-1,"aria-selected":a,role:"option","aria-setsize":t.length,key:s.text+r,text:s.text,disabled:l,removable:!0,onRemove:f=>this.onTagDelete(s.data,f),removeIcon:c,onMousedown:S,onClick:T,class:a?"k-focus":void 0,rounded:u,size:d},null);return n.getTemplate.call(this,{h:i.h,template:this.$props.tagRender,defaultRendering:h,additionalProps:{...this.$props,tagData:s,index:r},additionalListeners:{tagdelete:this.onTagDelete}})},this)]),e])}});exports.TagList=b;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),n=require("@progress/kendo-vue-common"),v=require("@progress/kendo-vue-buttons"),S=e=>e.preventDefault(),b=e=>e.event.stopPropagation(),T=i.defineComponent({name:"TagList",inheritAttrs:!1,props:{removeTagIcon:String,dataItems:Array,guid:String,focused:Object,tagRender:[String,Function,Object],tagsRounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},id:String,className:String,size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},onTagdelete:Function},computed:{wrapperClass(){const{size:e,disabled:t}=this.$props;return{"k-chip-list":!0,[`k-chip-list-${n.kendoThemeMaps.sizeMap[e]||e}`]:e,"k-disabled":t}}},methods:{onTagDelete(e,t){this.$emit("tagdelete",e,t)}},render(){const e=n.getDefaultSlots(this),{dataItems:t,guid:o,size:l,disabled:d,tagsRounded:u,removeTagIcon:c,id:p,className:g}=this.$props;return i.createVNode("div",{class:n.classNames("k-input-values",g),id:p,style:this.$attrs.style},[i.createVNode("div",{class:this.wrapperClass,role:"listbox","aria-label":"chip list","aria-orientation":"horizontal",id:"tagslist-"+o},[t.map(function(s,a){const m=`tag-${o}-${s.text.toString().replace(/\s+/g,"-")}`,r=s===this.$props.focused,h=i.createVNode(v.Chip,{id:m,tabIndex:-1,"aria-selected":r,role:"option","aria-setsize":t.length,key:s.text+a,text:s.text,disabled:d,removable:!0,onRemove:f=>this.onTagDelete(s.data,f),removeIcon:c,onMousedown:S,onClick:b,class:r?"k-focus":void 0,rounded:u,size:l},null);return n.getTemplate.call(this,{h:i.h,template:this.$props.tagRender,defaultRendering:h,additionalProps:{...this.$props,tagData:s,index:a},additionalListeners:{tagdelete:this.onTagDelete}})},this)]),e])}});exports.TagList=T;
@@ -5,10 +5,10 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as h, createVNode as i, h as v } from "vue";
9
- import { getDefaultSlots as S, classNames as T, getTemplate as $, kendoThemeMaps as b } from "@progress/kendo-vue-common";
8
+ import { defineComponent as f, createVNode as s, h as v } from "vue";
9
+ import { getDefaultSlots as S, classNames as b, getTemplate as T, kendoThemeMaps as $ } from "@progress/kendo-vue-common";
10
10
  import { Chip as k } from "@progress/kendo-vue-buttons";
11
- const x = (e) => e.preventDefault(), y = (e) => e.event.stopPropagation(), C = /* @__PURE__ */ h({
11
+ const x = (e) => e.preventDefault(), y = (e) => e.event.stopPropagation(), C = /* @__PURE__ */ f({
12
12
  name: "TagList",
13
13
  inheritAttrs: !1,
14
14
  props: {
@@ -47,7 +47,7 @@ const x = (e) => e.preventDefault(), y = (e) => e.event.stopPropagation(), C = /
47
47
  } = this.$props;
48
48
  return {
49
49
  "k-chip-list": !0,
50
- [`k-chip-list-${b.sizeMap[e] || e}`]: e,
50
+ [`k-chip-list-${$.sizeMap[e] || e}`]: e,
51
51
  "k-disabled": t
52
52
  };
53
53
  }
@@ -61,47 +61,49 @@ const x = (e) => e.preventDefault(), y = (e) => e.event.stopPropagation(), C = /
61
61
  const e = S(this), {
62
62
  dataItems: t,
63
63
  guid: n,
64
- size: a,
64
+ size: r,
65
65
  disabled: l,
66
66
  tagsRounded: d,
67
- removeTagIcon: u,
68
- id: p,
67
+ removeTagIcon: p,
68
+ id: u,
69
69
  className: c
70
70
  } = this.$props;
71
- return i("div", {
72
- class: T("k-input-values", c),
73
- id: p,
71
+ return s("div", {
72
+ class: b("k-input-values", c),
73
+ id: u,
74
74
  style: this.$attrs.style
75
- }, [i("div", {
75
+ }, [s("div", {
76
76
  class: this.wrapperClass,
77
77
  role: "listbox",
78
+ "aria-label": "chip list",
79
+ "aria-orientation": "horizontal",
78
80
  id: "tagslist-" + n
79
- }, [t.map(function(s, o) {
80
- const g = `tag-${n}-${s.text.toString().replace(/\s+/g, "-")}`, r = s === this.$props.focused, m = i(k, {
81
+ }, [t.map(function(i, o) {
82
+ const g = `tag-${n}-${i.text.toString().replace(/\s+/g, "-")}`, a = i === this.$props.focused, m = s(k, {
81
83
  id: g,
82
84
  tabIndex: -1,
83
- "aria-selected": r,
85
+ "aria-selected": a,
84
86
  role: "option",
85
87
  "aria-setsize": t.length,
86
- key: s.text + o,
87
- text: s.text,
88
+ key: i.text + o,
89
+ text: i.text,
88
90
  disabled: l,
89
91
  removable: !0,
90
- onRemove: (f) => this.onTagDelete(s.data, f),
91
- removeIcon: u,
92
+ onRemove: (h) => this.onTagDelete(i.data, h),
93
+ removeIcon: p,
92
94
  onMousedown: x,
93
95
  onClick: y,
94
- class: r ? "k-focus" : void 0,
96
+ class: a ? "k-focus" : void 0,
95
97
  rounded: d,
96
- size: a
98
+ size: r
97
99
  }, null);
98
- return $.call(this, {
100
+ return T.call(this, {
99
101
  h: v,
100
102
  template: this.$props.tagRender,
101
103
  defaultRendering: m,
102
104
  additionalProps: {
103
105
  ...this.$props,
104
- tagData: s,
106
+ tagData: i,
105
107
  index: o
106
108
  },
107
109
  additionalListeners: {
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),t=require("@progress/kendo-vue-common"),ne=require("@progress/kendo-vue-popup"),oe=require("@progress/kendo-vue-intl"),E=require("@progress/kendo-vue-treeview"),T=require("../package-metadata.js"),y=require("../common/utils.js"),le=require("../DropDownTree/ListNoData.js"),p=require("../messages/main.js"),re=require("@progress/kendo-vue-labels"),$=require("@progress/kendo-vue-buttons"),de=require("../MultiSelect/TagList.js"),ce=require("../common/ClearButton.js"),L=require("../common/ListFilter.js"),he=require("./utils.js"),q=require("../common/constants.js"),ue=require("@progress/kendo-vue-layout"),pe=require("@progress/kendo-svg-icons"),fe=require("../common/DropDownBase.js");function F(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!s.isVNode(e)}const ge="Please select a value from the list!",{sizeMap:A,roundedMap:me}=t.kendoThemeMaps,ve=e=>e.split("_").map(i=>parseInt(i,10)),O=(e,i)=>{const{validationMessage:a,valid:n,required:o}=e;return{customError:a!==void 0,valid:!!(n!==void 0?n:!o||i),valueMissing:!i}},ye=s.defineComponent({name:"KendoMultiSelectTree",model:{event:"changemodel"},emits:{open:e=>!0,close:e=>!0,focus:e=>!0,blur:e=>!0,change:e=>!0,filterchange:e=>!0,expandchange:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0},props:{opened:{type:Boolean,default:void 0},disabled:Boolean,dir:String,tabIndex:Number,accessKey:String,dataItems:{type:Array,default:function(){return[]}},value:Array,modelValue:Array,valueMap:Function,placeholder:String,dataItemKey:{type:String,required:!0},textField:{type:String,required:!0},checkField:{type:String,default:"checkField"},checkIndeterminateField:{type:String,default:"checkIndeterminateField"},expandField:String,subItemsField:{type:String,default:"items"},className:String,label:String,validationMessage:String,validityStyles:{type:Boolean,default:!0},valid:{type:Boolean,default:void 0},required:Boolean,name:String,id:String,ariaLabelledBy:String,ariaDescribedBy:String,filterable:Boolean,filter:String,loading:Boolean,tags:Array,popupSettings:{type:Object,default:function(){return{animate:!0,height:"200px",anchor:""}}},size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},rounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["flat","outline","solid"].includes(e)}},item:[String,Function,Object],tag:[String,Function,Object],header:[String,Function,Object],footer:[String,Function,Object],listNoData:[String,Function,Object],adaptive:{type:Boolean,default:void 0},adaptiveTitle:{type:String,default:void 0}},inject:{kendoLocalizationService:{default:null},adaptiveModeBreakpoints:{default:{small:q.MOBILE_SMALL_DEVICE,medium:q.MOBILE_MEDIUM_DEVICE}}},created(){this.observer=null,t.validatePackage(T.packageMetadata),this.showLicenseWatermark=t.shouldShowValidationUI(T.packageMetadata),this.licenseMessage=t.getLicenseMessage(T.packageMetadata),this.base=new fe(this),this.componentGuid=t.guid(),this.anchor=t.guid()},data(){return{showLicenseWatermark:!1,licenseMessage:void 0,focusedTagState:void 0,openState:!1,focusedState:!1,filterState:"",currentValue:[],popupWidth:"200px",windowWidth:0,initialAdaptiveRenderingValues:void 0}},computed:{animationStyles(){return this.windowWidth<=this.adaptiveModeBreakpoints.small?{top:0,width:"100%",height:"100%"}:void 0},classNameAdaptive(){return this.windowWidth<=this.adaptiveModeBreakpoints.small?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"},adaptiveState(){return this.windowWidth<=this.adaptiveModeBreakpoints.medium&&this.$props.adaptive},isOpen(){return this.opened!==void 0?this.opened:this.openState},computedValue(){return this.value!==void 0?this.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.currentValue},hasValue(){return!!this.computedValue.length},tagsToRenderRef(){if(this.initialAdaptiveRenderingValues===void 0)return this.tags===void 0?this.computedValue.map(e=>({text:y.getItemValue(e,this.$props.textField),data:[e]})):[...this.tags];{const e=this.initialAdaptiveRenderingValues;return e.length>0&&e.map(i=>({text:y.getItemValue(i,this.$props.textField),data:[i]}))}}},watch:{isOpen:function(e){e&&this.value?this.initialAdaptiveRenderingValues=[...this.value]:this.initialAdaptiveRenderingValues=void 0}},mounted(){this.observer=t.canUseDOM&&window.ResizeObserver&&new ResizeObserver(this.calculateMedia),document!=null&&document.body&&this.observer&&this.observer.observe(document.body),this.elementRef=t.getRef(this,"kendoAnchor"),this.inputRef=t.getRef(this,"input"),this.selectRef=t.getRef(this,"select"),this.treeViewRef=t.getRef(this,"treeView"),this.skipFocusRef=!1,this.popupRef=t.getRef(this,"popup"),this.calculatePopupWidth()},updated(){this.inputRef=t.getRef(this,"input"),this.treeViewRef=t.getRef(this,"treeView"),this.popupRef&&this.isOpen&&this.hasValue&&this.popupRef.reposition(),this.setValidity(),this.calculatePopupWidth()},render(){let e;const i=this.$props.id||this.componentGuid,{dataItems:a,dataItemKey:n,popupSettings:o={},disabled:d,placeholder:l,label:r,name:c,checkField:g,checkIndeterminateField:k,subItemsField:M,validationMessage:P,valid:W,value:C,required:R,validityStyles:z,adaptiveTitle:j}=this.$props,V=t.getTabIndex(this.$props.tabIndex,d),w=oe.provideLocalizationService(this),_=O({validationMessage:P,valid:W,required:R},this.hasValue),b=this.$props.dir,K=this.adaptiveState,N=t.templateRendering.call(this,this.item,t.getListeners.call(this)),G=t.templateRendering.call(this,this.tag,t.getListeners.call(this)),H=t.templateRendering.call(this,this.$props.header,t.getListeners.call(this)),U=t.templateRendering.call(this,this.$props.footer,t.getListeners.call(this)),x=t.getTemplate.call(this,{h:s.h,template:H}),I=t.getTemplate.call(this,{h:s.h,template:U}),J=t.templateRendering.call(this,this.$props.listNoData,t.getListeners.call(this)),Q=s.createVNode(le.ListNoData,null,F(e=w.toLanguageString(p.nodata,p.messages[p.nodata]))?e:{default:()=>[e]}),B=t.getTemplate.call(this,{h:s.h,defaultRendering:Q,template:J}),D=!z||_.valid,{size:h,rounded:m,fillMode:v}=this.$props,X=()=>[s.createVNode("div",{class:"k-actionsheet-titlebar-group k-hbox"},[s.createVNode("div",{class:"k-actionsheet-title"},[s.createVNode("div",{class:"k-text-center"},[j]),s.createVNode("div",{class:"k-actionsheet-subtitle k-text-center"},[l])]),s.createVNode("div",{class:"k-actionsheet-actions"},[s.createVNode($.Button,{tabIndex:5,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.onCancel,icon:"x",svgIcon:pe.xIcon},null)])]),s.createVNode("div",{class:"k-actionsheet-titlebar-group k-actionsheet-filter"},[this.$props.filterable&&s.createVNode(L.ListFilter,{value:this.$props.filter===void 0?this.filterState:this.$props.filter,ref:t.setRef(this,"input"),onChange:this.onFilterChange,onKeydown:this.onInputKeyDown,size:h,rounded:m,fillMode:v,onFocus:this.onFocus,onBlur:this.onBlur},null)])],Y=t.templateRendering.call(this,X,t.getListeners.call(this)),Z=()=>{const u=w.toLanguageString(p.adaptiveModeFooterCancel,p.messages[p.adaptiveModeFooterCancel]),f=w.toLanguageString(p.adaptiveModeFooterApply,p.messages[p.adaptiveModeFooterApply]);return[s.createVNode($.Button,{size:"large","aria-label":u,"aria-disabled":"false",type:"button",onClick:this.onCancel},F(u)?u:{default:()=>[u]}),s.createVNode($.Button,{themeColor:"primary",size:"large","aria-label":f,"aria-disabled":"false",type:"button",onClick:this.closePopup},F(f)?f:{default:()=>[f]})]},ee=t.templateRendering.call(this,Z,t.getListeners.call(this)),te=()=>{const u=this.base.getTemplateDef.call(this,x,s.h),f=this.base.getTemplateDef.call(this,I,s.h);return[u&&s.createVNode("div",{class:"k-list-header"},[u]),a.length>0?s.createVNode(E.TreeView,{ref:t.setRef(this,"treeView"),tabIndex:V,dataItems:a,focusIdField:n,textField:this.$props.textField,checkField:g,checkIndeterminateField:k,expandField:this.$props.expandField,childrenField:M,expandIcons:!0,onItemclick:this.onChange,onCheckchange:this.onChange,onExpandchange:this.onExpand,onFocus:this.onFocus,onBlur:this.onBlur,onKeydown:this.onWrapperKeyDown,checkboxes:!0,size:"large",item:N},null):B,f&&s.createVNode("div",{class:"k-list-footer"},[f])]},ie=t.templateRendering.call(this,te,t.getListeners.call(this)),se=function(){return s.createVNode(ue.ActionSheet,{expand:this.isOpen,animation:!0,animationStyles:this.animationStyles,className:this.classNameAdaptive,footerClassName:"k-actions k-actions-stretched",contentClassName:"!k-overflow-hidden",header:Y,content:ie,footer:ee,onClose:this.onCancel,navigatableElements:["input.k-input-inner",".k-actionsheet-actions > button"]},null)},ae=function(){return s.createVNode("span",{ref:t.setRef(this,"kendoAnchor"),class:t.classNames("k-multiselecttree k-input",this.$props.className,{[`k-input-${A[h]||h}`]:h,[`k-rounded-${me[m]||m}`]:m,[`k-input-${v}`]:v,"k-focus":this.focusedState&&!d,"k-invalid":!D,"k-disabled":d,"k-loading":this.$props.loading,"k-required":R}),tabindex:V,accesskey:this.$props.accessKey,id:i,dir:b,onKeydown:this.onWrapperKeyDown,onMousedown:this.onWrapperMouseDown,onFocusin:this.onFocus,onFocusout:this.onBlur,role:"combobox","aria-haspopup":"tree","aria-expanded":this.isOpen,"aria-disabled":d,"aria-label":r,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaLabelledBy?this.$props.ariaLabelledBy:"tagslist-"+i,"aria-required":this.$props.required,onClick:this.onWrapperClick},[this.tagsToRenderRef.length>0&&s.createVNode(de.TagList,{id:"tagslist-"+i,class:t.classNames("k-input-values k-chip-list k-selection-multiple",{[`k-chip-list-${A[h]||h}`]:h,"k-readonly":this.hasValue}),tagRender:G,onTagdelete:this.onTagDelete,dataItems:this.tagsToRenderRef,guid:i,focused:this.focusedTagState?this.tagsToRenderRef.find(u=>this.focusedTagState&&y.matchTags(u,this.focusedTagState,n)):void 0,tagsRounded:m,size:h,fillMode:v},null),s.createVNode("span",{class:"k-input-inner",role:"combobox",tabindex:V,"aria-expanded":this.isOpen,"aria-describedby":"tagslist-"+i,"aria-label":this.$props.ariaLabelledBy},[this.tagsToRenderRef.length===0&&s.createVNode("span",{class:"k-input-value-text"},[l])]),this.$props.loading&&s.createVNode(t.Icon,{class:"k-input-loading-icon",name:"loading"},null),this.hasValue&&!d&&s.createVNode(ce.ClearButton,{onClearclick:this.onClear},null),s.createVNode("select",{name:c,ref:t.setRef(this,"select"),tabindex:-1,"aria-hidden":!0,required:R,title:r,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},[s.createVNode("option",{value:this.$props.valueMap?this.$props.valueMap.call(void 0,C):C},null)]),this.showLicenseWatermark?s.createVNode(t.WatermarkOverlay,{message:this.licenseMessage},null):null,!K&&s.createVNode(ne.Popup,{style:{width:this.popupWidth,direction:b},popupClass:t.classNames(o.popupClass,"k-multiselecttree-popup","popup-"+this.componentGuid),class:t.classNames(o.className,{"k-rtl":b==="rtl"}),animate:o.animate,anchor:this.anchor,show:this.isOpen,onOpen:this.onPopupOpened,onClose:this.onPopupClosed,appendTo:o.appendTo,ref:t.setRef(this,"popup")},{default:()=>[this.$props.filterable&&s.createVNode(L.ListFilter,{value:this.$props.filter===void 0?this.filterState:this.$props.filter,ref:t.setRef(this,"input"),onChange:this.onFilterChange,onKeydown:this.onInputKeyDown,size:h,rounded:m,fillMode:v,onFocus:this.onFocus,onBlur:this.onBlur},null),x&&s.createVNode("div",{class:"k-list-header"},[x]),a.length>0?s.createVNode(E.TreeView,{ref:t.setRef(this,"treeView"),tabIndex:V,dataItems:a,focusIdField:n,textField:this.$props.textField,checkField:g,checkIndeterminateField:k,expandField:this.$props.expandField,childrenField:M,expandIcons:!0,onItemclick:this.onChange,onCheckchange:this.onChange,onExpandchange:this.onExpand,onFocus:this.onFocus,onBlur:this.onBlur,onKeydown:this.onWrapperKeyDown,checkboxes:!0,size:h,item:N},null):B,I&&s.createVNode("div",{class:"k-list-footer"},[I])]})])},S=[s.h(ae.call(this),{...this.$attrs}),K&&se.call(this)];return r?s.createVNode(re.FloatingLabel,{label:r,editorValue:this.hasValue,editorPlaceholder:l,editorValid:D,editorDisabled:d,editorId:i,dir:b},F(S)?S:{default:()=>[S]}):S},methods:{clearFilter(e){this.onFilterChange(e,"")},onCancel(e){const i={event:e,target:this},a={items:[],operation:"toggle",value:this.initialAdaptiveRenderingValues,...i};this.$emit("change",a),this.closePopup(e)},calculateMedia(e){for(let i of e)this.windowWidth=i.target.clientWidth},calculatePopupWidth(){this.elementRef&&(this.popupWidth=this.popupSettings.width!==void 0?this.popupSettings.width:this.elementRef.offsetWidth+"px")},focus(){this.$el&&this.$el.focus()},setValidity(){if(this.selectRef&&this.selectRef.setCustomValidity){const{validationMessage:e,valid:i,required:a}=this.$props,n=O({validationMessage:e,valid:i,required:a},this.hasValue);this.selectRef.setCustomValidity(n.valid?"":this.validationMessage===void 0?ge:this.validationMessage)}},changeValue(e,i,a){const n={dataItemKey:this.dataItemKey,checkField:this.checkField,checkIndeterminateField:this.checkIndeterminateField,expandField:this.expandField,subItemsField:this.subItemsField},o=he.getMultiSelectTreeValue(this.dataItems,{...n,items:i,operation:a,value:this.computedValue}),d={items:i,operation:a,value:o,...e};this.$emit("changemodel",o),this.$emit("update:modelValue",o),this.$emit("change",d)},onChange(e){if(y.areSame(e.item,this.computedValue,this.dataItemKey))return;const{item:i,event:a}=e,n={event:a,target:this};this.changeValue(n,[i],"toggle")},openPopup(e){if(!this.isOpen){const i={...e};this.$emit("open",i),this.opened===void 0&&(this.openState=!0)}},closePopup(e){if(this.$props.filterable&&this.clearFilter({...e,target:{...e.target,value:""}}),this.isOpen){const i={...e};this.$emit("close",i),this.opened===void 0&&(this.openState=!1)}},switchFocus(e){this.skipFocusRef=!0,e(),window.setTimeout(()=>this.skipFocusRef=!1,0)},focusElement(e){e&&this.switchFocus(()=>e.focus())},onPopupOpened(){if(!this.focusedState&&this.isOpen)this.closePopup({target:this});else if(this.$props.filterable){const e=this.inputRef&&this.inputRef.input;this.focusElement(e)}else this.focusElement(this.treeViewRef&&this.treeViewRef.input)},onPopupClosed(){this.focusedState&&this.focusElement(this.elementRef)},onFocus(e){if(!this.focusedState&&!this.skipFocusRef){this.focusedState=!0;const i={event:e,target:this};this.$emit("focus",i)}},onBlur(e){var i;if(this.focusedState&&!this.skipFocusRef&&!this.adaptiveState){this.focusedTagState=void 0,this.focusedState=!1;const a={event:e,target:this},n={...a},o=e.relatedTarget||((i=e.event)==null?void 0:i.relatedTarget);o!=null&&o.closest(".popup-"+this.componentGuid)||(this.$emit("blur",n),this.closePopup(a))}},onWrapperMouseDown(){this.focusedState&&this.switchFocus(t.noop)},onWrapperClick(e){if(!this.$props.disabled&&!e.defaultPrevented){this.focusedState=!0;const i={event:e,target:this};this.isOpen||this.openPopup(i)}},onWrapperKeyDown(e){const{keyCode:i,altKey:a}=e,n=this.treeViewRef&&this.treeViewRef.$el,o=this.inputRef&&this.inputRef.input;if(this.$props.disabled||e.defaultPrevented&&o===e.target)return;const d={event:e,target:this};if(this.computedValue&&this.computedValue.length>0&&(i===t.Keys.left||i===t.Keys.right||i===t.Keys.home||i===t.Keys.end||i===t.Keys.delete||i===t.Keys.backspace)){const l=this.tagsToRenderRef;let r=this.focusedTagState?l.findIndex(k=>y.matchTags(k,this.focusedTagState,this.dataItemKey)):-1,c;const g=r!==-1;i===t.Keys.left?(g?r=Math.max(0,r-1):r=l.length-1,c=l[r]):i===t.Keys.right?g?(r=Math.min(l.length-1,r+1),c=l[r]):c=l[0]:i===t.Keys.home?c=l[0]:i===t.Keys.end?c=l[l.length-1]:(i===t.Keys.delete||i===t.Keys.backspace)&&g&&this.changeValue(d,l[r].data,"delete"),c!==this.focusedTagState&&(this.focusedTagState=c)}if(this.isOpen)if(i===t.Keys.esc||a&&i===t.Keys.up)e.preventDefault(),this.switchFocus(()=>{this.focusElement(this.elementRef)}),this.closePopup(d);else if(n&&n.querySelector(".k-focus")&&(i===t.Keys.up||i===t.Keys.down||i===t.Keys.left||i===t.Keys.right||i===t.Keys.home||i===t.Keys.end)){if(i===t.Keys.up){const l=Array.from(n.querySelectorAll(".k-treeview-item")),r=[...l].reverse().find(c=>!!(c&&c.querySelector(".k-focus")));if(r&&l.indexOf(r)===0)return this.switchFocus(()=>{this.focusElement(o||this.elementRef)})}this.switchFocus(t.noop)}else i===t.Keys.down&&this.switchFocus(()=>{this.focusElement(o||n)});else a&&i===t.Keys.down&&(e.preventDefault(),this.openPopup(d))},onInputKeyDown(e){const{keyCode:i,altKey:a}=e;(i===t.Keys.esc||a&&i===t.Keys.up)&&(e.preventDefault(),this.switchFocus(()=>{this.focusElement(this.elementRef)}),i===t.Keys.esc&&this.adaptiveState?this.onCancel(e):this.closePopup(e)),!(a||i!==t.Keys.up&&i!==t.Keys.down)&&(e.preventDefault(),this.switchFocus(i===t.Keys.up?()=>{this.focusElement(this.elementRef)}:()=>{this.focusElement(this.treeViewRef&&this.treeViewRef.$el)}))},onClear(e){const i={event:e,target:this};this.changeValue(i,[],"clear"),this.closePopup(i),this.filterState="",e.preventDefault()},onTagDelete(e,i){if(this.closePopup({target:this}),!this.focusedState){const a=this.inputRef&&this.inputRef.input;this.focusElement(a)}this.changeValue({event:i,target:this},e,"delete")},onExpand(e){const{item:i,itemHierarchicalIndex:a,event:n}=e,o={level:ve(a),item:i,event:n,target:this};this.$emit("expandchange",o)},onFilterChange(e,i){const a=i?"":e.target.value,o={filter:{field:this.$props.textField,operator:"contains",value:a},event:e,target:this};this.$emit("filterchange",o),this.$props.filter===void 0&&(this.filterState=a)}}});exports.MultiSelectTree=ye;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),t=require("@progress/kendo-vue-common"),ne=require("@progress/kendo-vue-popup"),oe=require("@progress/kendo-vue-intl"),E=require("@progress/kendo-vue-treeview"),T=require("../package-metadata.js"),y=require("../common/utils.js"),le=require("../DropDownTree/ListNoData.js"),p=require("../messages/main.js"),re=require("@progress/kendo-vue-labels"),$=require("@progress/kendo-vue-buttons"),de=require("../MultiSelect/TagList.js"),ce=require("../common/ClearButton.js"),L=require("../common/ListFilter.js"),he=require("./utils.js"),q=require("../common/constants.js"),ue=require("@progress/kendo-vue-layout"),pe=require("@progress/kendo-svg-icons"),fe=require("../common/DropDownBase.js");function F(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!s.isVNode(e)}const ge="Please select a value from the list!",{sizeMap:A,roundedMap:me}=t.kendoThemeMaps,ve=e=>e.split("_").map(i=>parseInt(i,10)),O=(e,i)=>{const{validationMessage:a,valid:n,required:o}=e;return{customError:a!==void 0,valid:!!(n!==void 0?n:!o||i),valueMissing:!i}},ye=s.defineComponent({name:"KendoMultiSelectTree",model:{event:"changemodel"},emits:{open:e=>!0,close:e=>!0,focus:e=>!0,blur:e=>!0,change:e=>!0,filterchange:e=>!0,expandchange:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0},props:{opened:{type:Boolean,default:void 0},disabled:Boolean,dir:String,tabIndex:Number,accessKey:String,dataItems:{type:Array,default:function(){return[]}},value:Array,modelValue:Array,valueMap:Function,placeholder:String,dataItemKey:{type:String,required:!0},textField:{type:String,required:!0},checkField:{type:String,default:"checkField"},checkIndeterminateField:{type:String,default:"checkIndeterminateField"},expandField:String,subItemsField:{type:String,default:"items"},className:String,label:String,validationMessage:String,validityStyles:{type:Boolean,default:!0},valid:{type:Boolean,default:void 0},required:Boolean,name:String,id:String,ariaLabelledBy:String,ariaDescribedBy:String,filterable:Boolean,filter:String,loading:Boolean,tags:Array,popupSettings:{type:Object,default:function(){return{animate:!0,height:"200px",anchor:""}}},size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},rounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["flat","outline","solid"].includes(e)}},item:[String,Function,Object],tag:[String,Function,Object],header:[String,Function,Object],footer:[String,Function,Object],listNoData:[String,Function,Object],adaptive:{type:Boolean,default:void 0},adaptiveTitle:{type:String,default:void 0}},inject:{kendoLocalizationService:{default:null},adaptiveModeBreakpoints:{default:{small:q.MOBILE_SMALL_DEVICE,medium:q.MOBILE_MEDIUM_DEVICE}}},created(){this.observer=null,t.validatePackage(T.packageMetadata),this.showLicenseWatermark=t.shouldShowValidationUI(T.packageMetadata),this.licenseMessage=t.getLicenseMessage(T.packageMetadata),this.base=new fe(this),this.componentGuid=t.guid(),this.anchor=t.guid()},data(){return{showLicenseWatermark:!1,licenseMessage:void 0,focusedTagState:void 0,openState:!1,focusedState:!1,filterState:"",currentValue:[],popupWidth:"200px",windowWidth:0,initialAdaptiveRenderingValues:void 0}},computed:{animationStyles(){return this.windowWidth<=this.adaptiveModeBreakpoints.small?{top:0,width:"100%",height:"100%"}:void 0},classNameAdaptive(){return this.windowWidth<=this.adaptiveModeBreakpoints.small?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"},adaptiveState(){return this.windowWidth<=this.adaptiveModeBreakpoints.medium&&this.$props.adaptive},isOpen(){return this.opened!==void 0?this.opened:this.openState},computedValue(){return this.value!==void 0?this.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.currentValue},hasValue(){return!!this.computedValue.length},tagsToRenderRef(){if(this.initialAdaptiveRenderingValues===void 0)return this.tags===void 0?this.computedValue.map(e=>({text:y.getItemValue(e,this.$props.textField),data:[e]})):[...this.tags];{const e=this.initialAdaptiveRenderingValues;return e.length>0&&e.map(i=>({text:y.getItemValue(i,this.$props.textField),data:[i]}))}}},watch:{isOpen:function(e){e&&this.value?this.initialAdaptiveRenderingValues=[...this.value]:this.initialAdaptiveRenderingValues=void 0}},mounted(){this.observer=t.canUseDOM&&window.ResizeObserver&&new ResizeObserver(this.calculateMedia),document!=null&&document.body&&this.observer&&this.observer.observe(document.body),this.elementRef=t.getRef(this,"kendoAnchor"),this.inputRef=t.getRef(this,"input"),this.selectRef=t.getRef(this,"select"),this.treeViewRef=t.getRef(this,"treeView"),this.skipFocusRef=!1,this.popupRef=t.getRef(this,"popup"),this.calculatePopupWidth()},updated(){this.inputRef=t.getRef(this,"input"),this.treeViewRef=t.getRef(this,"treeView"),this.popupRef&&this.isOpen&&this.hasValue&&this.popupRef.reposition(),this.setValidity(),this.calculatePopupWidth()},render(){let e;const i=this.$props.id||this.componentGuid,{dataItems:a,dataItemKey:n,popupSettings:o={},disabled:d,placeholder:l,label:r,name:c,checkField:g,checkIndeterminateField:k,subItemsField:M,validationMessage:P,valid:W,value:C,required:R,validityStyles:z,adaptiveTitle:j}=this.$props,V=t.getTabIndex(this.$props.tabIndex,d),w=oe.provideLocalizationService(this),_=O({validationMessage:P,valid:W,required:R},this.hasValue),b=this.$props.dir,K=this.adaptiveState,N=t.templateRendering.call(this,this.item,t.getListeners.call(this)),G=t.templateRendering.call(this,this.tag,t.getListeners.call(this)),H=t.templateRendering.call(this,this.$props.header,t.getListeners.call(this)),U=t.templateRendering.call(this,this.$props.footer,t.getListeners.call(this)),x=t.getTemplate.call(this,{h:s.h,template:H}),I=t.getTemplate.call(this,{h:s.h,template:U}),J=t.templateRendering.call(this,this.$props.listNoData,t.getListeners.call(this)),Q=s.createVNode(le.ListNoData,null,F(e=w.toLanguageString(p.nodata,p.messages[p.nodata]))?e:{default:()=>[e]}),B=t.getTemplate.call(this,{h:s.h,defaultRendering:Q,template:J}),D=!z||_.valid,{size:h,rounded:m,fillMode:v}=this.$props,X=()=>[s.createVNode("div",{class:"k-actionsheet-titlebar-group k-hbox"},[s.createVNode("div",{class:"k-actionsheet-title"},[s.createVNode("div",{class:"k-text-center"},[j]),s.createVNode("div",{class:"k-actionsheet-subtitle k-text-center"},[l])]),s.createVNode("div",{class:"k-actionsheet-actions"},[s.createVNode($.Button,{tabIndex:5,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.onCancel,icon:"x",svgIcon:pe.xIcon},null)])]),s.createVNode("div",{class:"k-actionsheet-titlebar-group k-actionsheet-filter"},[this.$props.filterable&&s.createVNode(L.ListFilter,{value:this.$props.filter===void 0?this.filterState:this.$props.filter,ref:t.setRef(this,"input"),onChange:this.onFilterChange,onKeydown:this.onInputKeyDown,size:h,rounded:m,fillMode:v,onFocus:this.onFocus,onBlur:this.onBlur},null)])],Y=t.templateRendering.call(this,X,t.getListeners.call(this)),Z=()=>{const u=w.toLanguageString(p.adaptiveModeFooterCancel,p.messages[p.adaptiveModeFooterCancel]),f=w.toLanguageString(p.adaptiveModeFooterApply,p.messages[p.adaptiveModeFooterApply]);return[s.createVNode($.Button,{size:"large","aria-label":u,"aria-disabled":"false",type:"button",onClick:this.onCancel},F(u)?u:{default:()=>[u]}),s.createVNode($.Button,{themeColor:"primary",size:"large","aria-label":f,"aria-disabled":"false",type:"button",onClick:this.closePopup},F(f)?f:{default:()=>[f]})]},ee=t.templateRendering.call(this,Z,t.getListeners.call(this)),te=()=>{const u=this.base.getTemplateDef.call(this,x,s.h),f=this.base.getTemplateDef.call(this,I,s.h);return[u&&s.createVNode("div",{class:"k-list-header"},[u]),a.length>0?s.createVNode(E.TreeView,{ref:t.setRef(this,"treeView"),tabIndex:V,dataItems:a,focusIdField:n,textField:this.$props.textField,checkField:g,checkIndeterminateField:k,expandField:this.$props.expandField,childrenField:M,expandIcons:!0,onItemclick:this.onChange,onCheckchange:this.onChange,onExpandchange:this.onExpand,onFocus:this.onFocus,onBlur:this.onBlur,onKeydown:this.onWrapperKeyDown,checkboxes:!0,size:"large",item:N},null):B,f&&s.createVNode("div",{class:"k-list-footer"},[f])]},ie=t.templateRendering.call(this,te,t.getListeners.call(this)),se=function(){return s.createVNode(ue.ActionSheet,{expand:this.isOpen,animation:!0,animationStyles:this.animationStyles,className:this.classNameAdaptive,footerClassName:"k-actions k-actions-stretched",contentClassName:"!k-overflow-hidden",header:Y,content:ie,footer:ee,onClose:this.onCancel,navigatableElements:["input.k-input-inner",".k-actionsheet-actions > button"]},null)},ae=function(){return s.createVNode("span",{ref:t.setRef(this,"kendoAnchor"),class:t.classNames("k-multiselecttree k-input",this.$props.className,{[`k-input-${A[h]||h}`]:h,[`k-rounded-${me[m]||m}`]:m,[`k-input-${v}`]:v,"k-focus":this.focusedState&&!d,"k-invalid":!D,"k-disabled":d,"k-loading":this.$props.loading,"k-required":R}),tabindex:V,accesskey:this.$props.accessKey,id:i,dir:b,onKeydown:this.onWrapperKeyDown,onMousedown:this.onWrapperMouseDown,onFocusin:this.onFocus,onFocusout:this.onBlur,role:"combobox","aria-haspopup":"tree","aria-expanded":this.isOpen,"aria-disabled":d||void 0,"aria-label":r,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaLabelledBy?this.$props.ariaLabelledBy:"tagslist-"+i,"aria-required":this.$props.required||void 0,onClick:this.onWrapperClick},[this.tagsToRenderRef.length>0&&s.createVNode(de.TagList,{id:"tagslist-"+i,class:t.classNames("k-input-values k-chip-list k-selection-multiple",{[`k-chip-list-${A[h]||h}`]:h,"k-readonly":this.hasValue}),tagRender:G,onTagdelete:this.onTagDelete,dataItems:this.tagsToRenderRef,guid:i,focused:this.focusedTagState?this.tagsToRenderRef.find(u=>this.focusedTagState&&y.matchTags(u,this.focusedTagState,n)):void 0,tagsRounded:m,size:h,fillMode:v},null),s.createVNode("span",{class:"k-input-inner",role:"combobox",tabindex:V,"aria-expanded":this.isOpen,"aria-describedby":"tagslist-"+i,"aria-label":this.$props.ariaLabelledBy},[this.tagsToRenderRef.length===0&&s.createVNode("span",{class:"k-input-value-text"},[l])]),this.$props.loading&&s.createVNode(t.Icon,{class:"k-input-loading-icon",name:"loading"},null),this.hasValue&&!d&&s.createVNode(ce.ClearButton,{onClearclick:this.onClear},null),s.createVNode("select",{name:c,ref:t.setRef(this,"select"),tabindex:-1,"aria-hidden":!0,required:R,title:r,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},[s.createVNode("option",{value:this.$props.valueMap?this.$props.valueMap.call(void 0,C):C},null)]),this.showLicenseWatermark?s.createVNode(t.WatermarkOverlay,{message:this.licenseMessage},null):null,!K&&s.createVNode(ne.Popup,{style:{width:this.popupWidth,direction:b},popupClass:t.classNames(o.popupClass,"k-multiselecttree-popup","popup-"+this.componentGuid),class:t.classNames(o.className,{"k-rtl":b==="rtl"}),animate:o.animate,anchor:this.anchor,show:this.isOpen,onOpen:this.onPopupOpened,onClose:this.onPopupClosed,appendTo:o.appendTo,ref:t.setRef(this,"popup")},{default:()=>[this.$props.filterable&&s.createVNode(L.ListFilter,{value:this.$props.filter===void 0?this.filterState:this.$props.filter,ref:t.setRef(this,"input"),onChange:this.onFilterChange,onKeydown:this.onInputKeyDown,size:h,rounded:m,fillMode:v,onFocus:this.onFocus,onBlur:this.onBlur},null),x&&s.createVNode("div",{class:"k-list-header"},[x]),a.length>0?s.createVNode(E.TreeView,{ref:t.setRef(this,"treeView"),tabIndex:V,dataItems:a,focusIdField:n,textField:this.$props.textField,checkField:g,checkIndeterminateField:k,expandField:this.$props.expandField,childrenField:M,expandIcons:!0,onItemclick:this.onChange,onCheckchange:this.onChange,onExpandchange:this.onExpand,onFocus:this.onFocus,onBlur:this.onBlur,onKeydown:this.onWrapperKeyDown,checkboxes:!0,size:h,item:N},null):B,I&&s.createVNode("div",{class:"k-list-footer"},[I])]})])},S=[s.h(ae.call(this),{...this.$attrs}),K&&se.call(this)];return r?s.createVNode(re.FloatingLabel,{label:r,editorValue:this.hasValue,editorPlaceholder:l,editorValid:D,editorDisabled:d,editorId:i,dir:b},F(S)?S:{default:()=>[S]}):S},methods:{clearFilter(e){this.onFilterChange(e,"")},onCancel(e){const i={event:e,target:this},a={items:[],operation:"toggle",value:this.initialAdaptiveRenderingValues,...i};this.$emit("change",a),this.closePopup(e)},calculateMedia(e){for(let i of e)this.windowWidth=i.target.clientWidth},calculatePopupWidth(){this.elementRef&&(this.popupWidth=this.popupSettings.width!==void 0?this.popupSettings.width:this.elementRef.offsetWidth+"px")},focus(){this.$el&&this.$el.focus()},setValidity(){if(this.selectRef&&this.selectRef.setCustomValidity){const{validationMessage:e,valid:i,required:a}=this.$props,n=O({validationMessage:e,valid:i,required:a},this.hasValue);this.selectRef.setCustomValidity(n.valid?"":this.validationMessage===void 0?ge:this.validationMessage)}},changeValue(e,i,a){const n={dataItemKey:this.dataItemKey,checkField:this.checkField,checkIndeterminateField:this.checkIndeterminateField,expandField:this.expandField,subItemsField:this.subItemsField},o=he.getMultiSelectTreeValue(this.dataItems,{...n,items:i,operation:a,value:this.computedValue}),d={items:i,operation:a,value:o,...e};this.$emit("changemodel",o),this.$emit("update:modelValue",o),this.$emit("change",d)},onChange(e){if(y.areSame(e.item,this.computedValue,this.dataItemKey))return;const{item:i,event:a}=e,n={event:a,target:this};this.changeValue(n,[i],"toggle")},openPopup(e){if(!this.isOpen){const i={...e};this.$emit("open",i),this.opened===void 0&&(this.openState=!0)}},closePopup(e){if(this.$props.filterable&&this.clearFilter({...e,target:{...e.target,value:""}}),this.isOpen){const i={...e};this.$emit("close",i),this.opened===void 0&&(this.openState=!1)}},switchFocus(e){this.skipFocusRef=!0,e(),window.setTimeout(()=>this.skipFocusRef=!1,0)},focusElement(e){e&&this.switchFocus(()=>e.focus())},onPopupOpened(){if(!this.focusedState&&this.isOpen)this.closePopup({target:this});else if(this.$props.filterable){const e=this.inputRef&&this.inputRef.input;this.focusElement(e)}else this.focusElement(this.treeViewRef&&this.treeViewRef.input)},onPopupClosed(){this.focusedState&&this.focusElement(this.elementRef)},onFocus(e){if(!this.focusedState&&!this.skipFocusRef){this.focusedState=!0;const i={event:e,target:this};this.$emit("focus",i)}},onBlur(e){var i;if(this.focusedState&&!this.skipFocusRef&&!this.adaptiveState){this.focusedTagState=void 0,this.focusedState=!1;const a={event:e,target:this},n={...a},o=e.relatedTarget||((i=e.event)==null?void 0:i.relatedTarget);o!=null&&o.closest(".popup-"+this.componentGuid)||(this.$emit("blur",n),this.closePopup(a))}},onWrapperMouseDown(){this.focusedState&&this.switchFocus(t.noop)},onWrapperClick(e){if(!this.$props.disabled&&!e.defaultPrevented){this.focusedState=!0;const i={event:e,target:this};this.isOpen||this.openPopup(i)}},onWrapperKeyDown(e){const{keyCode:i,altKey:a}=e,n=this.treeViewRef&&this.treeViewRef.$el,o=this.inputRef&&this.inputRef.input;if(this.$props.disabled||e.defaultPrevented&&o===e.target)return;const d={event:e,target:this};if(this.computedValue&&this.computedValue.length>0&&(i===t.Keys.left||i===t.Keys.right||i===t.Keys.home||i===t.Keys.end||i===t.Keys.delete||i===t.Keys.backspace)){const l=this.tagsToRenderRef;let r=this.focusedTagState?l.findIndex(k=>y.matchTags(k,this.focusedTagState,this.dataItemKey)):-1,c;const g=r!==-1;i===t.Keys.left?(g?r=Math.max(0,r-1):r=l.length-1,c=l[r]):i===t.Keys.right?g?(r=Math.min(l.length-1,r+1),c=l[r]):c=l[0]:i===t.Keys.home?c=l[0]:i===t.Keys.end?c=l[l.length-1]:(i===t.Keys.delete||i===t.Keys.backspace)&&g&&this.changeValue(d,l[r].data,"delete"),c!==this.focusedTagState&&(this.focusedTagState=c)}if(this.isOpen)if(i===t.Keys.esc||a&&i===t.Keys.up)e.preventDefault(),this.switchFocus(()=>{this.focusElement(this.elementRef)}),this.closePopup(d);else if(n&&n.querySelector(".k-focus")&&(i===t.Keys.up||i===t.Keys.down||i===t.Keys.left||i===t.Keys.right||i===t.Keys.home||i===t.Keys.end)){if(i===t.Keys.up){const l=Array.from(n.querySelectorAll(".k-treeview-item")),r=[...l].reverse().find(c=>!!(c&&c.querySelector(".k-focus")));if(r&&l.indexOf(r)===0)return this.switchFocus(()=>{this.focusElement(o||this.elementRef)})}this.switchFocus(t.noop)}else i===t.Keys.down&&this.switchFocus(()=>{this.focusElement(o||n)});else a&&i===t.Keys.down&&(e.preventDefault(),this.openPopup(d))},onInputKeyDown(e){const{keyCode:i,altKey:a}=e;(i===t.Keys.esc||a&&i===t.Keys.up)&&(e.preventDefault(),this.switchFocus(()=>{this.focusElement(this.elementRef)}),i===t.Keys.esc&&this.adaptiveState?this.onCancel(e):this.closePopup(e)),!(a||i!==t.Keys.up&&i!==t.Keys.down)&&(e.preventDefault(),this.switchFocus(i===t.Keys.up?()=>{this.focusElement(this.elementRef)}:()=>{this.focusElement(this.treeViewRef&&this.treeViewRef.$el)}))},onClear(e){const i={event:e,target:this};this.changeValue(i,[],"clear"),this.closePopup(i),this.filterState="",e.preventDefault()},onTagDelete(e,i){if(this.closePopup({target:this}),!this.focusedState){const a=this.inputRef&&this.inputRef.input;this.focusElement(a)}this.changeValue({event:i,target:this},e,"delete")},onExpand(e){const{item:i,itemHierarchicalIndex:a,event:n}=e,o={level:ve(a),item:i,event:n,target:this};this.$emit("expandchange",o)},onFilterChange(e,i){const a=i?"":e.target.value,o={filter:{field:this.$props.textField,operator:"contains",value:a},event:e,target:this};this.$emit("filterchange",o),this.$props.filter===void 0&&(this.filterState=a)}}});exports.MultiSelectTree=ye;
@@ -392,11 +392,11 @@ const We = "Please select a value from the list!", {
392
392
  role: "combobox",
393
393
  "aria-haspopup": "tree",
394
394
  "aria-expanded": this.isOpen,
395
- "aria-disabled": d,
395
+ "aria-disabled": d || void 0,
396
396
  "aria-label": r,
397
397
  "aria-labelledby": this.$props.ariaLabelledBy,
398
398
  "aria-describedby": this.$props.ariaLabelledBy ? this.$props.ariaLabelledBy : "tagslist-" + t,
399
- "aria-required": this.$props.required,
399
+ "aria-required": this.$props.required || void 0,
400
400
  onClick: this.onWrapperClick
401
401
  }, [
402
402
  this.tagsToRenderRef.length > 0 && s(Me, {