@progress/kendo-vue-dropdowns 6.1.0-develop.1 → 6.1.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,30 +5,30 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as Ie, ref as z, inject as ke, h as _, createVNode as o, isVNode as xe } from "vue";
9
- import Ce from "../common/DropDownBase.mjs";
8
+ import { defineComponent as ke, ref as z, inject as xe, h as _, createVNode as o, isVNode as Ce } from "vue";
9
+ import $e from "../common/DropDownBase.mjs";
10
10
  import { GroupStickyHeader as J } from "../common/GroupStickyHeader.mjs";
11
- import { guid as Q, canUseDOM as $e, getRef as X, Keys as $, templateRendering as O, getListeners as V, classNames as L, setRef as Oe, Icon as Ve, kendoThemeMaps as Fe } from "@progress/kendo-vue-common";
11
+ import { guid as Q, canUseDOM as Oe, getRef as X, Keys as $, templateRendering as O, getListeners as V, classNames as L, setRef as Ve, Icon as Fe, kendoThemeMaps as Te } from "@progress/kendo-vue-common";
12
12
  import { Button as Z } from "@progress/kendo-vue-buttons";
13
- import { areSame as I, getItemValue as k, isPresent as b, getItemIndexByText as ee, suggestValue as Te, itemIndexStartsWith as te } from "../common/utils.mjs";
14
- import { SearchBar as Be } from "../common/SearchBar.mjs";
15
- import { ListContainer as De } from "../common/ListContainer.mjs";
16
- import { List as we } from "../common/List.mjs";
17
- import { ClearButton as Me } from "../common/ClearButton.mjs";
18
- import { provideLocalizationService as Re } from "@progress/kendo-vue-intl";
19
- import { expandButton as ie, messages as He } from "../messages/main.mjs";
20
- import { xIcon as Le, caretAltDownIcon as Ee } from "@progress/kendo-svg-icons";
21
- import { MOBILE_SMALL_DEVICE as se, MOBILE_MEDIUM_DEVICE as Ne } from "../common/constants.mjs";
13
+ import { areSame as I, getItemValue as k, isPresent as b, getItemIndexByText as ee, suggestValue as Be, itemIndexStartsWith as te } from "../common/utils.mjs";
14
+ import { SearchBar as De } from "../common/SearchBar.mjs";
15
+ import { ListContainer as we } from "../common/ListContainer.mjs";
16
+ import { List as Me } from "../common/List.mjs";
17
+ import { ClearButton as Re } from "../common/ClearButton.mjs";
18
+ import { provideLocalizationService as He } from "@progress/kendo-vue-intl";
19
+ import { expandButton as ie, messages as Le } from "../messages/main.mjs";
20
+ import { xIcon as Ee, caretAltDownIcon as Ne } from "@progress/kendo-svg-icons";
21
+ import { MOBILE_SMALL_DEVICE as se, MOBILE_MEDIUM_DEVICE as Ae } from "../common/constants.mjs";
22
22
  import { ActionSheet as je } from "@progress/kendo-vue-layout";
23
23
  import { ListFilter as Ke } from "../common/ListFilter.mjs";
24
24
  const {
25
25
  sizeMap: G,
26
- roundedMap: Ae
27
- } = Fe;
28
- function Pe(e) {
29
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
26
+ roundedMap: Pe
27
+ } = Te;
28
+ function ze(e) {
29
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Ce(e);
30
30
  }
31
- const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
31
+ const _e = "Please enter a valid value!", rt = /* @__PURE__ */ ke({
32
32
  name: "KendoComboBox",
33
33
  model: {
34
34
  event: "changemodel"
@@ -180,7 +180,8 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
180
180
  type: String,
181
181
  default: void 0
182
182
  },
183
- onFilterchange: Function
183
+ onFilterchange: Function,
184
+ inputAttributes: Object
184
185
  },
185
186
  inject: {
186
187
  kendoLocalizationService: {
@@ -211,10 +212,10 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
211
212
  };
212
213
  },
213
214
  created() {
214
- this.observer = null, this.valueDuringOnChange = void 0, this.currentText = void 0, this.currentValue = void 0, this.currentFocused = void 0, this.currentOpened = void 0, this.prevCurrentValue = this.computedValue(), this.base = new Ce(this), this.anchor = Q(), this.inputId = Q();
215
+ this.observer = null, this.valueDuringOnChange = void 0, this.currentText = void 0, this.currentValue = void 0, this.currentFocused = void 0, this.currentOpened = void 0, this.prevCurrentValue = this.computedValue(), this.base = new $e(this), this.anchor = Q(), this.inputId = Q();
215
216
  },
216
217
  setup() {
217
- const e = z(null), t = z(null), s = z(null), i = ke("kendoLocalizationService", {});
218
+ const e = z(null), t = z(null), s = z(null), i = xe("kendoLocalizationService", {});
218
219
  return {
219
220
  inputRef: e,
220
221
  elementRef: t,
@@ -223,7 +224,7 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
223
224
  };
224
225
  },
225
226
  mounted() {
226
- this.observer = $e && 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.setValidity();
227
+ 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.setValidity();
227
228
  },
228
229
  updated() {
229
230
  var g;
@@ -250,8 +251,8 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
250
251
  else if (l && !h && !this.isScrolling) {
251
252
  let F = 0;
252
253
  if (i && this.getFocusedIndex() !== -1 && e.length > 0) {
253
- const T = e[this.getFocusedIndex()][n], w = this.base.getGroupedDataModernMode(e, i), K = w.findIndex((x) => x[n] === T);
254
- F = w.slice(0, K).filter((x) => Object.keys(x).length === 1).length;
254
+ const T = e[this.getFocusedIndex()][n], w = this.base.getGroupedDataModernMode(e, i), j = w.findIndex((x) => x[n] === T);
255
+ F = w.slice(0, j).filter((x) => Object.keys(x).length === 1).length;
255
256
  }
256
257
  this.base.scrollToItem(this.getFocusedIndex() + F);
257
258
  }
@@ -307,7 +308,7 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
307
308
  return this.windowWidth <= se ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom";
308
309
  },
309
310
  adaptiveState() {
310
- return this.windowWidth <= Ne && this.$props.adaptive;
311
+ return this.windowWidth <= Ae && this.$props.adaptive;
311
312
  }
312
313
  },
313
314
  methods: {
@@ -470,10 +471,10 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
470
471
  dataItems: t,
471
472
  textField: s
472
473
  } = this.$props;
473
- this.suggested = Te(e, t, s);
474
+ this.suggested = Be(e, t, s);
474
475
  },
475
476
  setValidity() {
476
- this.input && this.input.setCustomValidity && this.input.setCustomValidity(this.validity().valid ? "" : this.$props.validationMessage || ze);
477
+ this.input && this.input.setCustomValidity && this.input.setCustomValidity(this.validity().valid ? "" : this.$props.validationMessage || _e);
477
478
  },
478
479
  triggerOnChange(e, t) {
479
480
  const s = this.computedValue();
@@ -533,20 +534,21 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
533
534
  adaptiveTitle: F,
534
535
  header: T,
535
536
  footer: w,
536
- groupStickyHeaderItemRender: K,
537
- placeholder: x
537
+ groupStickyHeaderItemRender: j,
538
+ placeholder: x,
539
+ inputAttributes: ne
538
540
  } = this.$props;
539
- const ne = this.currentFocused, ae = !this.$props.validityStyles || this.validity().valid, E = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, W = k(this.computedValue(), n), q = b(E) ? E : W, le = s && (!!q || b(this.computedValue())), C = this.base, y = C.vs, A = this.$props.id || this.inputId, N = Object.assign({}, {
541
+ const ae = this.currentFocused, le = !this.$props.validityStyles || this.validity().valid, E = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, W = k(this.computedValue(), n), q = b(E) ? E : W, oe = s && (!!q || b(this.computedValue())), C = this.base, y = C.vs, K = this.$props.id || this.inputId, N = Object.assign({}, {
540
542
  animate: !0,
541
543
  height: "200px"
542
- }, this.$props.popupSettings), oe = Re(this).toLanguageString(ie, He[ie]), M = this.isOpen, R = this.adaptiveState;
544
+ }, this.$props.popupSettings), re = He(this).toLanguageString(ie, Le[ie]), M = this.isOpen, R = this.adaptiveState;
543
545
  y.enabled = g !== void 0, g !== void 0 && (y.skip = g.skip, y.total = g.total, y.pageSize = g.pageSize), this.group === void 0 && this.$props.groupField !== void 0 && (this.group = k(this.$props.dataItems[0], this.$props.groupField));
544
- const re = (p) => {
546
+ const de = (p) => {
545
547
  const c = this.base.initState();
546
548
  c.event = p;
547
549
  const f = p.event.target.value;
548
550
  c.data.text = f, this.base.filterChanged(f, c), this.applyState(c);
549
- }, de = () => [o("div", {
551
+ }, ue = () => [o("div", {
550
552
  class: "k-actionsheet-titlebar-group k-hbox"
551
553
  }, [o("div", {
552
554
  class: "k-actionsheet-title"
@@ -564,11 +566,11 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
564
566
  fillMode: "flat",
565
567
  onClick: this.toggleBtnClick,
566
568
  icon: "x",
567
- svgIcon: Le
569
+ svgIcon: Ee
568
570
  }, null)])]), o("div", {
569
571
  class: "k-actionsheet-titlebar-group k-actionsheet-filter"
570
- }, [fe.call(this)])], ue = O.call(this, de, V.call(this)), pe = () => {
571
- const p = C.getTemplateDef.call(this, T, _), c = C.getTemplateDef.call(this, w, _), f = O.call(this, K, V.call(this)), v = this.$props.dataItems || [];
572
+ }, [ge.call(this)])], pe = O.call(this, ue, V.call(this)), ce = () => {
573
+ const p = C.getTemplateDef.call(this, T, _), c = C.getTemplateDef.call(this, w, _), f = O.call(this, j, V.call(this)), v = this.$props.dataItems || [];
572
574
  return o("div", {
573
575
  class: "k-list-container"
574
576
  }, [p && o("div", {
@@ -587,25 +589,25 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
587
589
  }, null), U.call(this), c && o("div", {
588
590
  class: "k-list-footer"
589
591
  }, [c])])]);
590
- }, ce = O.call(this, pe, V.call(this)), he = function() {
592
+ }, he = O.call(this, ce, V.call(this)), fe = function() {
591
593
  return o(je, {
592
594
  expand: M,
593
595
  animation: !0,
594
596
  animationStyles: this.animationStyles,
595
597
  className: this.classNameAdaptive,
596
598
  contentClassName: "!k-overflow-hidden",
597
- header: ue,
598
- content: ce,
599
+ header: pe,
600
+ content: he,
599
601
  onClose: this.toggleBtnClick,
600
602
  navigatableElements: ["input.k-input-inner", ".k-actionsheet-actions > button"]
601
603
  }, null);
602
- }, fe = function() {
604
+ }, ge = function() {
603
605
  const c = this.base.initState().data.text;
604
606
  return o(Ke, {
605
607
  adaptiveMode: !0,
606
608
  value: c,
607
609
  ref: "filterInput",
608
- onChange: (f) => re(f),
610
+ onChange: (f) => de(f),
609
611
  onKeydown: this.onInputKeyDown,
610
612
  size: this.$props.size,
611
613
  rounded: this.$props.rounded,
@@ -618,17 +620,17 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
618
620
  groupField: f
619
621
  } = this.$props;
620
622
  let v = this.$props.dataItems || [];
621
- const B = O.call(this, this.$props.itemRender, V.call(this)), j = O.call(this, this.$props.groupHeaderItemRender, V.call(this)), P = O.call(this, this.$props.listNoDataRender, V.call(this));
623
+ const B = O.call(this, this.$props.itemRender, V.call(this)), A = O.call(this, this.$props.groupHeaderItemRender, V.call(this)), P = O.call(this, this.$props.listNoDataRender, V.call(this));
622
624
  g || (g = {
623
625
  skip: 0
624
626
  });
625
- const H = g.skip, be = `translateY(${y.translate}px)`, Se = M ? this.getFocusedIndex() : void 0, ye = b(E) && E !== W ? null : this.computedValue();
626
- return f && (v = this.base.getGroupedDataModernMode(v, f)), o(we, {
627
+ const H = g.skip, Se = `translateY(${y.translate}px)`, ye = M ? this.getFocusedIndex() : void 0, Ie = b(E) && E !== W ? null : this.computedValue();
628
+ return f && (v = this.base.getGroupedDataModernMode(v, f)), o(Me, {
627
629
  id: C.listBoxId,
628
630
  show: M,
629
631
  dataItems: v,
630
- focusedIndex: Se,
631
- value: ye,
632
+ focusedIndex: ye,
633
+ value: Ie,
632
634
  textField: n,
633
635
  valueField: c,
634
636
  optionsGuid: C.guid,
@@ -640,27 +642,27 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
640
642
  "k-list-scroller": !this.$props.virtual
641
643
  }),
642
644
  listStyle: y.enabled ? {
643
- transform: be
645
+ transform: Se
644
646
  } : void 0,
645
647
  key: "listkey",
646
648
  skip: H,
647
649
  onListclick: this.handleItemClick,
648
650
  itemRender: B,
649
- groupHeaderItemRender: j,
651
+ groupHeaderItemRender: A,
650
652
  noDataRender: P,
651
653
  groupField: f,
652
654
  onScroll: this.onScroll
653
- }, Pe(p = ge.call(this)) ? p : {
655
+ }, ze(p = me.call(this)) ? p : {
654
656
  default: () => [p]
655
657
  });
656
- }, ge = function() {
658
+ }, me = function() {
657
659
  return y.enabled && o("div", {
658
660
  ref: "scrollElement",
659
661
  key: "scrollElementKey"
660
662
  }, null);
661
- }, me = function() {
663
+ }, ve = function() {
662
664
  const p = O.call(this, this.$props.groupStickyHeaderItemRender, V.call(this)), c = C.getTemplateDef.call(this, T), f = C.getTemplateDef.call(this, w), v = this.$props.dataItems || [];
663
- return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = k(v[0], this.$props.groupField)), o(De, {
665
+ return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = k(v[0], this.$props.groupField)), o(we, {
664
666
  ref: "container",
665
667
  onMousedown: (B) => B.preventDefault(),
666
668
  width: this.popupWidth,
@@ -685,7 +687,7 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
685
687
  class: "k-list-footer"
686
688
  }, [f])]
687
689
  });
688
- }, ve = function(p, c) {
690
+ }, be = function(p, c) {
689
691
  const {
690
692
  tabIndex: f,
691
693
  dataItems: v = [],
@@ -694,8 +696,8 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
694
696
  g || (g = {
695
697
  skip: 0
696
698
  });
697
- const j = this.computedValue(), P = Math.max(0, v.findIndex((H) => I(H, j, B)));
698
- return this.suggested && !I(this.valueOnDidUpdate, j, B) && (this.suggested = ""), o(Be, {
699
+ const A = this.computedValue(), P = Math.max(0, v.findIndex((H) => I(H, A, B)));
700
+ return this.suggested && !I(this.valueOnDidUpdate, A, B) && (this.suggested = ""), o(De, {
699
701
  id: c,
700
702
  placeholder: x,
701
703
  tabIndex: f || void 0,
@@ -715,56 +717,57 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
715
717
  activedescendant: this.base.guid + "-" + (P + g.skip),
716
718
  ariaLabelledBy: this.$props.ariaLabelledBy,
717
719
  ariaDescribedBy: this.$props.ariaDescribedBy,
718
- ariaLabel: this.$props.ariaLabel
720
+ ariaLabel: this.$props.ariaLabel,
721
+ inputAttributes: ne
719
722
  }, null);
720
723
  }, Y = [_(function() {
721
724
  return o("span", {
722
725
  class: L("k-combobox k-input", {
723
726
  [`k-input-${G[m] || m}`]: m,
724
- [`k-rounded-${Ae[D] || D}`]: D,
727
+ [`k-rounded-${Pe[D] || D}`]: D,
725
728
  [`k-input-${S}`]: S,
726
- "k-invalid": !ae,
729
+ "k-invalid": !le,
727
730
  "k-loading": r,
728
731
  "k-required": this.required,
729
732
  "k-disabled": t,
730
- "k-focus": ne && !t
733
+ "k-focus": ae && !t
731
734
  }, l),
732
- ref: Oe(this, "kendoAnchor"),
735
+ ref: Ve(this, "kendoAnchor"),
733
736
  style: i ? {
734
737
  ...a,
735
738
  width: void 0
736
739
  } : a,
737
740
  dir: e
738
- }, [ve.call(this, q || "", A), le && !r && o(Me, {
741
+ }, [be.call(this, q || "", K), oe && !r && o(Re, {
739
742
  onClearclick: this.clearButtonClick,
740
743
  key: "clearbutton"
741
- }, null), r && o(Ve, {
744
+ }, null), r && o(Fe, {
742
745
  name: "loading",
743
746
  class: "k-input-loading-icon",
744
747
  key: "loading"
745
748
  }, null), o(Z, {
746
749
  type: "button",
747
750
  tabIndex: -1,
748
- "aria-label": oe,
751
+ "aria-label": re,
749
752
  size: m,
750
753
  fillMode: S,
751
754
  rounded: null,
752
755
  class: "k-input-button",
753
756
  icon: d || "caret-alt-down",
754
- svgIcon: u || Ee,
757
+ svgIcon: u || Ne,
755
758
  iconClass: h,
756
759
  onClick: this.toggleBtnClick,
757
760
  onMousedown: (p) => p.preventDefault()
758
- }, null), !R && me.call(this)]);
761
+ }, null), !R && ve.call(this)]);
759
762
  }.call(this), {
760
763
  ...this.$attrs
761
- }), R && he.call(this)];
764
+ }), R && fe.call(this)];
762
765
  return i ? o("span", {
763
766
  class: this.spanClassNames,
764
767
  onFocusin: this.handleFocus,
765
768
  dir: this.$props.dir
766
- }, [Y, this.$props.label ? A ? o("label", {
767
- for: A,
769
+ }, [Y, this.$props.label ? K ? o("label", {
770
+ for: K,
768
771
  class: "k-floating-label"
769
772
  }, [this.$props.label]) : o("span", {
770
773
  class: "k-label"
@@ -772,5 +775,5 @@ const ze = "Please enter a valid value!", ot = /* @__PURE__ */ Ie({
772
775
  }
773
776
  });
774
777
  export {
775
- ot as ComboBox
778
+ rt as ComboBox
776
779
  };
@@ -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 n=require("vue"),i=require("@progress/kendo-vue-common"),P=require("@progress/kendo-vue-buttons"),ce=require("../common/ListContainer.js"),he=require("../common/ListFilter.js"),fe=require("../common/ListDefaultItem.js"),ge=require("../common/List.js"),me=require("../common/DropDownBase.js"),_=require("../common/GroupStickyHeader.js"),w=require("../messages/main.js"),ve=require("@progress/kendo-vue-intl"),L=require("../common/constants.js"),be=require("@progress/kendo-vue-layout"),p=require("../common/utils.js"),j=require("@progress/kendo-svg-icons"),{sizeMap:T,roundedMap:ye}=i.kendoThemeMaps;function Ie(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const Se="Please select a value from the list!",ke=n.defineComponent({name:"KendoDropDownList",model:{event:"changemodel"},props:{id:String,title:String,dataItemKey:{type:[Object,String]},defaultValue:{type:[String,Object,Number,Boolean],default:void 0},name:String,modelValue:{type:[String,Object,Number,Boolean],default:void 0},value:{type:[String,Object,Number,Boolean],default:void 0},label:{type:String},required:{type:Boolean,default:!1},leftRightKeysNavigation:{type:Boolean,default:!0},valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String,default:void 0},validityStyles:{type:Boolean,default:!0},delay:{type:Number,default:500},ignoreCase:{type:Boolean,default:!0},icon:String,svgIcon:Object,iconClassName:String,defaultItem:[Object,String],valueRender:[String,Function,Object],valueMap:Function,opened:{type:Boolean,default:void 0},disabled:Boolean,dir:{type:String,default:void 0},tabIndex:{type:Number,default:0},accessKey:String,dataItems:Array,textField:String,valueField:String,valuePrimitive:Boolean,className:String,loading:Boolean,popupSettings:{type:Object,default:{animate:!0,height:"200px",anchor:""}},itemRender:[String,Function,Object],groupHeaderItemRender:[String,Function,Object],groupStickyHeaderItemRender:[String,Function,Object],listNoDataRender:[String,Function,Object],focusedItemIndex:Function,header:[String,Function,Object],footer:[String,Function,Object],filterable:Boolean,filter:{type:String,default:void 0},virtual:{type:Object,default:void 0},ariaLabelledBy:String,ariaLabel:String,ariaDescribedBy:String,rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},groupField:{type:String},adaptive:{type:Boolean,default:void 0},adaptiveTitle:{type:String,default:void 0},onChange:Function},inject:{kendoLocalizationService:{default:null}},data(){return{hasMounted:!1,currentText:"",currentValue:"",currentFocused:!1,currentOpened:!1,searchState:{word:"",last:""},_skipFocusEvent:!1,valueDuringOnChange:{},_navigated:!1,group:void 0,isScrolling:!1,itemHeight:0,state:void 0,popupWidth:void 0,windowWidth:0}},watch:{currentOpened:function(e,t){this.prevCurrentOpened=t},opened:function(e,t){this.prevOpened=t},virtual:function(e,t){e&&t&&e.total!==t.total&&(this.virtualTotalHasChanged=!0),this.virtualHasChanged=!0},isOpen:function(){setTimeout(()=>{const e=document.querySelector(".k-list-item");this.itemHeight=this.base.getListItemHeight(e)},100)}},created(){this.observer=null,this.valueDuringOnChange=void 0,this.currentText=void 0,this.currentValue=void 0,this.prevCurrentValue=this.computedValue(),this.currentFocused=void 0,this.currentOpened=void 0,this.base=new me(this),this.anchor=i.guid(),this.inputId=i.guid()},setup(){const e=n.ref(null),t=n.ref(null),a=n.ref(null);return{selectRef:e,baseWrapperRef:t,kendoAnchorRef:a}},mounted(){this.observer=i.canUseDOM&&window.ResizeObserver&&new ResizeObserver(this.calculateMedia),document!=null&&document.body&&this.observer&&this.observer.observe(document.body),this.hasMounted=!0,this.select=i.getRef(this,"select"),this.base.wrapper=i.getRef(this,"kendoAnchor"),this.base.didMount(),this.setValidity()},updated(){var I;const{dataItems:e=[],dataItemKey:t,virtual:a,groupField:r,textField:o}=this.$props,s=this.isOpen,d=this.prevOpened!==void 0?this.prevOpened:this.prevCurrentOpened,l=!d&&s,u=this.$refs.list,f=this.$refs.filterInput,c=this.$refs.scrollElement;if(this.$refs.scroller,u&&(this.base.vs.list=u.list,this.base.list=u.list),c&&(this.base.vs.scrollElement=c),f&&(this.filterInput=f),u&&e.length&&this.base.vs.scrollerRef(u.$el),this.$props.popupSettings.animate||l&&this.onPopupOpened(),a&&this.virtualTotalHasChanged)this.base.vs.calcScrollElementHeight(),this.base.vs.reset(),this.virtualTotalHasChanged=!1;else{const v=this.computedValue(),m=this.prevCurrentValue;let h=e.findIndex(b=>p.areSame(b,v,t));r&&(h=(I=this.base.getGroupedDataModernMode(e,r))==null?void 0:I.indexOf(v));const S=!p.areSame(m,v,t);l&&a?(this.base.scrollToVirtualItem(a,h),this.prevCurrentOpened=!0):l&&!a?(e&&e.length!==0&&this.base.resetGroupStickyHeader(e[0][r],this),this.base.scrollToItem(h),this.prevCurrentOpened=!0):s&&d&&v&&S&&!this._navigated?this.base.scrollToItem(h):s&&d&&this._navigated&&(this._navigated&&a&&a.skip===0?this.base.vs.reset():this._navigated&&a&&a.skip===a.total-a.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.prevCurrentValue=this.computedValue(),this.setValidity()},computed:{index(){const{dataItems:e=[],dataItemKey:t}=this.$props,a=this.computedValue();return e.findIndex(r=>p.areSame(r,a,t))},spanClassNames(){const e=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.currentFocused,"k-empty":!this.computedValue(),"k-invalid":!e&&e!==void 0,"k-rtl":this.$props.dir==="rtl"}},dropDownListId(){return`value-${this.base.guid}${this.$props.ariaDescribedBy?" "+this.$props.ariaDescribedBy:""}`},isOpen(){return this.$props.opened!==void 0?this.$props.opened:this.currentOpened},animationStyles(){return this.windowWidth<=L.MOBILE_SMALL_DEVICE?{top:0,width:"100%",height:"100%"}:void 0},classNameAdaptiv(){return this.windowWidth<=L.MOBILE_SMALL_DEVICE?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"},adaptiveState(){return this.windowWidth<=L.MOBILE_MEDIUM_DEVICE&&this.$props.adaptive}},methods:{focus(){this.base.wrapper&&this.base.wrapper.focus()},computedValue(){let e;return this.valueDuringOnChange!==void 0?e=this.valueDuringOnChange:this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:this.currentValue!==void 0?e=this.currentValue:this.$props.defaultValue!==void 0&&(e=this.$props.defaultValue),!p.isPresent(e)&&this.$props.defaultItem!==void 0&&(e=this.$props.defaultItem),this.valuePrimitive&&this.findByFieldValue(this.valueField,e)||e},findByFieldValue(e,t){const a=this.dataItems.findIndex(r=>p.getItemValue(r,e)===t);return this.dataItems[a]},primitiveValue(){const e=this.computedValue();return this.valuePrimitive?p.getItemValue(e,this.valueField):e},validity(){const e=this.$props.validationMessage!==void 0,t=!this.$props.required||this.computedValue()!==null&&this.computedValue()!==""&&this.computedValue()!==void 0,a=this.$props.valid!==void 0?this.$props.valid:t;return{customError:e,valid:a,valueMissing:this.computedValue()===null}},handleItemSelect(e,t){const{dataItems:a=[],virtual:r,dataItemKey:o,defaultItem:s}=this.$props,d=r?r.skip:0,l=e===-1&&s!==void 0?s:a[e-d],u=!p.areSame(l,this.computedValue(),o);this.triggerOnChange(l,t),u&&this.base.triggerPageChangeCornerItems(l,t)},onNavigate(e,t){const{dataItems:a=[],defaultItem:r,dataItemKey:o,virtual:s={skip:0,total:0,pageSize:0}}=this.$props,d=this.base.vs,l=this.computedValue(),u=a.findIndex(c=>p.areSame(c,l,o)),f=this.base.navigation.navigate({current:s.skip+u,max:(d.enabled?s.total:a.length)-1,min:r!==void 0?-1:0,keyCode:t});f!==void 0&&this.handleItemSelect(f,e),this.applyState(e)},search(e){clearTimeout(this.typingTimeout),this.$props.filterable||(this.typingTimeout=setTimeout(()=>this.searchState.word="",this.$props.delay),this.selectNext(e))},selectNext(e){const{dataItems:t=[],dataItemKey:a}=this.$props;let r=t.map((b,x)=>({item:b,itemIndex:x}));const o=this.searchState.word,s=this.searchState.last,d=p.sameCharsOnly(o,s);let l=r.length,u=Math.max(0,t.findIndex(b=>p.areSame(b,this.computedValue(),a))),f;this.$props.defaultItem&&(f={item:this.$props.defaultItem,itemIndex:-1},l+=1,u+=1),u+=d?1:0,r=p.shuffleData(r,u,f);let c,I,v,m=0;const{textField:h,ignoreCase:S}=this.$props;for(;m<l;m++)if(c=p.getItemValue(r[m].item,h),I=d&&p.matchText(c,s,S),v=p.matchText(c,o,S),I||v){m=r[m].itemIndex;break}if(m!==l){const b=this.base.initState();b.event=e,this.handleItemSelect(m,b),this.applyState(b),this.valueDuringOnChange=void 0}},handleKeyDown(e){this.isScrolling&&(this.isScrolling=!1);const{dataItems:t=[],leftRightKeysNavigation:a,filterable:r,disabled:o,virtual:s={skip:0,total:0,pageSize:0}}=this.$props,d=this.isOpen,l=e.keyCode,u=l===i.Keys.home||l===i.Keys.end,f=l===i.Keys.up||l===i.Keys.down,c=!d&&(e.altKey&&l===i.Keys.down||l===i.Keys.enter||l===i.Keys.space),I=d&&(e.altKey&&l===i.Keys.up||l===i.Keys.esc),v=a&&(l===i.Keys.left||l===i.Keys.right),m=f||!r&&(v||u),h=this.base.initState();if(h.event=e,!o){if(u&&this.base.vs.enabled)l===i.Keys.home?s.skip!==0?(this.base.triggerOnPageChange(h,0,s.pageSize),this._navigated=!0):this.triggerOnChange(t[0],h):s.skip<s.total-s.pageSize?(this.base.triggerOnPageChange(h,s.total-s.pageSize,s.pageSize),this._navigated=!0):this.triggerOnChange(t[t.length-1],h);else if(d&&l===i.Keys.enter){const S=this.focusedIndex();S!==void 0&&this.handleItemSelect(S,h),this.base.togglePopup(h),e.preventDefault()}else c||I?(this.adaptiveState&&this.handleWrapperClick(e),this.base.togglePopup(h),e.preventDefault()):m&&(this.onNavigate(h,l),e.preventDefault());this.applyState(h)}},handleItemClick(e,t){this.base.handleItemClick(e,t),this.valueDuringOnChange=void 0},handleFocus(e){this._skipFocusEvent||this.base.handleFocus(e)},handleBlur(e){if(this._skipFocusEvent||!this.currentFocused)return;const t=this.isOpen,a=this.base.initState();a.event=e,a.data.currentFocused=!1,a.events.push({type:"blur"}),t&&!this.adaptiveState&&this.base.togglePopup(a),this.applyState(a)},handleDefaultItemClick(e){const t=this.base.initState();t.event=e,this.base.togglePopup(t),this.triggerOnChange(this.$props.defaultItem,t),this.applyState(t)},handleWrapperClick(e){const t=this.base.initState();t.event=e,this.currentFocused||(t.data.currentFocused=!0),this.base.togglePopup(t),this.applyState(t)},handleKeyPress(e){if(this.$props.filterable||e.keyCode===i.Keys.enter)return;let t=String.fromCharCode(e.charCode||e.keyCode);this.$props.ignoreCase&&(t=t.toLowerCase()),t===" "&&e.preventDefault(),this.searchState={word:this.searchState.word+t,last:this.searchState.last+t},this.search(e)},handleListFilterChange(e){const t=this.base.initState();t.event=e,this.$props.filter===void 0&&(t.data.currentText=e.target.value),this.base.filterChanged(e.target.value,t),t.data.group=void 0,this.applyState(t)},onPopupOpened(){this.filterInput&&this.focusElement(this.filterInput.input)},onPopupClosed(){this.currentFocused&&setTimeout(()=>{this.currentFocused&&this.base.wrapper&&this.focusElement(this.base.wrapper)})},focusedIndex(){const e=p.isPresent(this.$props.filter)?this.$props.filter:this.currentText,{dataItems:t=[],virtual:a={skip:0},dataItemKey:r,textField:o,focusedItemIndex:s}=this.$props,d=this.computedValue(),u=!(t.findIndex(f=>p.areSame(f,d,r))<0&&!this.$props.defaultItem);return!u&&e&&a.skip===0?s?s(t,e,o):t.indexOf(p.getFocusedItem(t,e,o)):!u&&a.skip===0?0:void 0},focusElement(e){this._skipFocusEvent=!0,e.focus(),setTimeout(()=>this._skipFocusEvent=!1,30)},setValidity(){this.select&&this.select.setCustomValidity&&this.select.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||Se)},triggerOnChange(e,t){p.areSame(this.computedValue(),e,this.$props.dataItemKey)||(this.$props.value===void 0&&(this.currentValue=e),this.valueDuringOnChange=e,t.events.push({type:"change"}))},applyState(e){this.base.applyState(e),this.valueDuringOnChange=void 0},calculateMedia(e){for(let t of e)this.windowWidth=t.target.clientWidth},repositionPopup(){this.base.repositionPopup()},onScroll(e){this.isScrolling=!0;const{vs:t,list:a}=this.base;t.scrollHandler(e);const r=this.base.initState(),{groupField:o}=this.$props;let{dataItems:s=[]}=this.$props,d;if(!o||!s.length)return;const l=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:a?a.children[0].offsetHeight:0),f=e.target.scrollTop-t.skip*l;o&&(s=this.base.getGroupedDataModernMode(s,o),d=s[0][o]);for(let c=1;c<s.length&&!(l*c>f);c++)s[c]&&s[c][o]&&(d=s[c][o]);d!==this.group&&(r.data.group=d,this.applyState(r))}},render(){const{style:e,className:t,label:a,dir:r,virtual:o={skip:0},size:s,rounded:d,fillMode:l,dataItemKey:u,dataItems:f=[],disabled:c,tabIndex:I,loading:v,icon:m,svgIcon:h,iconClassName:S,adaptiveTitle:b,header:x,footer:R,groupStickyHeaderItemRender:q}=this.$props,C=this.isOpen,z=p.getItemValue(this.computedValue(),this.$props.textField),A=!this.$props.validityStyles||this.validity().valid,k=this.base,V=k.vs,D=this.$props.id||this.inputId;V.enabled=this.$props.virtual!==void 0;const O=Object.assign({},{animate:!0,height:"200px"},this.$props.popupSettings),W=ve.provideLocalizationService(this).toLanguageString(w.selectButton,w.messages[w.selectButton]),N=this.adaptiveState;this.group===void 0&&this.$props.groupField!==void 0&&(this.group=p.getItemValue(this.$props.dataItems[0],this.$props.groupField));const G=i.templateRendering.call(this,this.$props.valueRender,i.getListeners.call(this)),U=this.currentFocused,M=this.primitiveValue(),Y=f.findIndex(g=>p.areSame(g,M,u)),J=n.createVNode("span",{class:"k-input-inner",id:this.dropDownListId},[n.createVNode("span",{class:"k-input-value-text"},[z])]);let Q=i.getTemplate.call(this,{h:n.h,template:G,defaultRendering:J,additionalProps:{value:this.computedValue(),...this.$data}});const X=function(g){return n.createVNode("select",{name:this.$props.name,id:D,ref:i.setRef(this,"select"),tabindex:-1,"aria-hidden":!0,title:this.$props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},[n.createVNode("option",{value:this.$props.valueMap?this.$props.valueMap.call(void 0,g):g},null)])},Z=()=>[n.createVNode("div",{class:"k-actionsheet-titlebar-group k-hbox"},[n.createVNode("div",{class:"k-actionsheet-title"},[n.createVNode("div",{class:"k-text-center"},[b]),n.createVNode("div",{class:"k-actionsheet-subtitle k-text-center"},null)]),n.createVNode("div",{class:"k-actionsheet-actions"},[n.createVNode(P.Button,{tabIndex:5,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.handleWrapperClick,icon:"x",svgIcon:j.xIcon},null)])]),n.createVNode("div",{class:"k-actionsheet-titlebar-group k-actionsheet-filter"},[E.call(this)])],ee=i.templateRendering.call(this,Z,i.getListeners.call(this)),te=()=>{const g=k.getTemplateDef.call(this,x,n.h),y=k.getTemplateDef.call(this,R,n.h),$=i.templateRendering.call(this,q,i.getListeners.call(this));return n.createVNode("div",{class:"k-list-container"},[g&&n.createVNode("div",{class:"k-list-header"},[g]),n.createVNode("div",{class:i.classNames("k-list",{[`k-list-${T[s]||s}`]:N?!1:s,"k-list-lg":!!N,"k-virtual-list":V.enabled})},[K.call(this),this.group&&f.length!==0&&n.createVNode(_.GroupStickyHeader,{group:this.group,render:$},null),B.call(this),y&&n.createVNode("div",{class:"k-list-footer"},[y])])])},ie=i.templateRendering.call(this,te,i.getListeners.call(this)),se=function(){return n.createVNode(be.ActionSheet,{expand:C,animation:!0,animationStyles:this.animationStyles,className:this.classNameAdaptive,contentClassName:"!k-overflow-hidden",header:ee,content:ie,onClose:this.handleWrapperClick,navigatableElements:["input.k-input-inner",".k-actionsheet-actions > button"]},null)},K=function(){const{textField:g,defaultItem:y}=this.$props;return y!==void 0&&n.createVNode(fe.ListDefaultItem,{defaultItem:y,textField:g,selected:p.areSame(this.computedValue(),y,u),key:"defaultitemkey",onDefaultitemclick:this.handleDefaultItemClick},null)},B=function(){let g;const{textField:y,groupField:$}=this.$props;let F=this.$props.dataItems||[];const re=i.templateRendering.call(this,this.$props.itemRender,i.getListeners.call(this)),oe=i.templateRendering.call(this,this.$props.groupHeaderItemRender,i.getListeners.call(this)),de=i.templateRendering.call(this,this.$props.listNoDataRender,i.getListeners.call(this)),ue=o.skip,pe=`translateY(${V.translate}px)`;return $&&(F=this.base.getGroupedDataModernMode(F,$)),n.createVNode(ge.List,{id:this.base.listBoxId,show:C,dataItems:F.slice(),focusedIndex:this.focusedIndex(),value:this.computedValue(),textField:y,valueField:u,optionsGuid:this.base.guid,ref:"list",wrapperStyle:{maxHeight:O.height},wrapperCssClass:"k-list-content",listStyle:V.enabled?{transform:pe}:void 0,key:"listkey",skip:ue,onListclick:this.handleItemClick,itemRender:re,groupHeaderItemRender:oe,noDataRender:de,groupField:$,onScroll:this.onScroll},Ie(g=ae.call(this))?g:{default:()=>[g]})},E=function(){const g=this.$props.filter!==void 0?this.$props.filter:this.currentText;return this.$props.filterable&&n.createVNode(he.ListFilter,{value:g,ref:"filterInput",onChange:this.handleListFilterChange,onKeydown:this.handleKeyDown,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,ariaControlsId:this.base.listBoxId,ariaActivedescendantId:`option-${this.base.guid}-${this.focusedIndex()}`},null)},ae=function(){return V.enabled&&n.createVNode("div",{ref:"scrollElement",key:"scrollElementKey"},null)},ne=function(){const g=i.templateRendering.call(this,this.$props.groupStickyHeaderItemRender,i.getListeners.call(this)),y=k.getTemplateDef.call(this,x),$=k.getTemplateDef.call(this,R);return n.createVNode(ce.ListContainer,{ref:"container",onMousedown:p.preventDefaultNonInputs,dir:r!==void 0?r:k.dirCalculated,width:this.popupWidth,popupSettings:{...O,popupClass:i.classNames(O.popupClass,"k-list",{[`k-list-${T[s]||s}`]:s,"k-virtual-list":this.base.vs.enabled}),className:i.classNames("k-list-container",O.className),anchor:this.anchor,show:C},onOpen:this.onPopupOpened,onClose:this.onPopupClosed,onBlur:this.handleBlur},{default:()=>[E.call(this),K.call(this),this.group&&f.length!==0&&n.createVNode(_.GroupStickyHeader,{group:this.group,render:g},null),y&&n.createVNode("div",{class:"k-list-header"},[y]),B.call(this),$&&n.createVNode("div",{class:"k-list-footer"},[$])]})};this.$props.virtual!==void 0&&(k.vs.skip=o.skip,k.vs.total=o.total,k.vs.pageSize=o.pageSize);const le=function(){return n.createVNode("span",{ref:i.setRef(this,"kendoAnchor"),class:i.classNames("k-dropdownlist k-picker",t,{[`k-picker-${T[s]||s}`]:s,[`k-rounded-${ye[d]||d}`]:d,[`k-picker-${l}`]:l,"k-focus":U,"k-disabled":c,"k-invalid":!A,"k-loading":v,"k-required":this.required}),style:a?{...e,width:void 0}:e,dir:r,onMousedown:C?p.preventDefaultNonInputs:i.noop,onFocusin:this.handleFocus,onFocusout:this.handleBlur,tabindex:i.getTabIndex(I,c),accesskey:this.$props.accessKey,onKeydown:this.handleKeyDown,onKeypress:this.handleKeyPress,role:"combobox",onClick:c?i.noop:this.handleWrapperClick,"aria-disabled":c||void 0,"aria-haspopup":!0,"aria-expanded":C||!1,"aria-owns":this.base.listBoxId,"aria-activedescendant":C?"option-"+this.base.guid+"-"+(Y+(o?o.skip:0)):void 0,"aria-label":this.$props.ariaLabel||this.$props.label,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedBy":this.dropDownListId,title:this.$props.title},[Q,v&&n.createVNode(i.Icon,{name:"loading",class:"k-input-loading-icon",key:"loading"},null),n.createVNode(P.Button,{type:"button",tabIndex:-1,size:s,fillMode:l,rounded:null,ariaLabel:W,class:"k-input-button",icon:m||"caret-alt-down",svgIcon:h||j.caretAltDownIcon,iconClass:S},null),X.call(this,M),!N&&ne.call(this)])},H=[n.h(le.call(this),{...this.$attrs}),N&&se.call(this)];return a?n.createVNode("span",{class:this.spanClassNames,onFocusin:this.handleFocus,onFocusout:this.handleBlur,dir:this.$props.dir},[H,this.$props.label?D?n.createVNode("label",{for:D,class:"k-floating-label"},[this.$props.label]):n.createVNode("span",{class:"k-label"},[this.$props.label]):null]):H}});exports.DropDownList=ke;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("@progress/kendo-vue-common"),P=require("@progress/kendo-vue-buttons"),ce=require("../common/ListContainer.js"),he=require("../common/ListFilter.js"),fe=require("../common/ListDefaultItem.js"),ge=require("../common/List.js"),me=require("../common/DropDownBase.js"),_=require("../common/GroupStickyHeader.js"),F=require("../messages/main.js"),ve=require("@progress/kendo-vue-intl"),L=require("../common/constants.js"),be=require("@progress/kendo-vue-layout"),p=require("../common/utils.js"),j=require("@progress/kendo-svg-icons"),{sizeMap:T,roundedMap:ye}=i.kendoThemeMaps;function Ie(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const Se="Please select a value from the list!",ke=n.defineComponent({name:"KendoDropDownList",model:{event:"changemodel"},props:{id:String,title:String,dataItemKey:{type:[Object,String]},defaultValue:{type:[String,Object,Number,Boolean],default:void 0},name:String,modelValue:{type:[String,Object,Number,Boolean],default:void 0},value:{type:[String,Object,Number,Boolean],default:void 0},label:{type:String},required:{type:Boolean,default:!1},leftRightKeysNavigation:{type:Boolean,default:!0},valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String,default:void 0},validityStyles:{type:Boolean,default:!0},delay:{type:Number,default:500},ignoreCase:{type:Boolean,default:!0},icon:String,svgIcon:Object,iconClassName:String,defaultItem:[Object,String],valueRender:[String,Function,Object],valueMap:Function,opened:{type:Boolean,default:void 0},disabled:Boolean,dir:{type:String,default:void 0},tabIndex:{type:Number,default:0},accessKey:String,dataItems:Array,textField:String,valueField:String,valuePrimitive:Boolean,className:String,loading:Boolean,popupSettings:{type:Object,default:{animate:!0,height:"200px",anchor:""}},itemRender:[String,Function,Object],groupHeaderItemRender:[String,Function,Object],groupStickyHeaderItemRender:[String,Function,Object],listNoDataRender:[String,Function,Object],focusedItemIndex:Function,header:[String,Function,Object],footer:[String,Function,Object],filterable:Boolean,filter:{type:String,default:void 0},virtual:{type:Object,default:void 0},ariaLabelledBy:String,ariaLabel:String,ariaDescribedBy:String,rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},groupField:{type:String},adaptive:{type:Boolean,default:void 0},adaptiveTitle:{type:String,default:void 0},onChange:Function},inject:{kendoLocalizationService:{default:null}},data(){return{hasMounted:!1,currentText:"",currentValue:"",currentFocused:!1,currentOpened:!1,searchState:{word:"",last:""},_skipFocusEvent:!1,valueDuringOnChange:{},_navigated:!1,group:void 0,isScrolling:!1,itemHeight:0,state:void 0,popupWidth:void 0,windowWidth:0}},watch:{currentOpened:function(e,t){this.prevCurrentOpened=t},opened:function(e,t){this.prevOpened=t},virtual:function(e,t){e&&t&&e.total!==t.total&&(this.virtualTotalHasChanged=!0),this.virtualHasChanged=!0},isOpen:function(){setTimeout(()=>{const e=document.querySelector(".k-list-item");this.itemHeight=this.base.getListItemHeight(e)},100)}},created(){this.observer=null,this.valueDuringOnChange=void 0,this.currentText=void 0,this.currentValue=void 0,this.prevCurrentValue=this.computedValue(),this.currentFocused=void 0,this.currentOpened=void 0,this.base=new me(this),this.anchor=i.guid(),this.inputId=i.guid()},setup(){const e=n.ref(null),t=n.ref(null),a=n.ref(null);return{selectRef:e,baseWrapperRef:t,kendoAnchorRef:a}},mounted(){this.observer=i.canUseDOM&&window.ResizeObserver&&new ResizeObserver(this.calculateMedia),document!=null&&document.body&&this.observer&&this.observer.observe(document.body),this.hasMounted=!0,this.select=i.getRef(this,"select"),this.base.wrapper=i.getRef(this,"kendoAnchor"),this.base.didMount(),this.setValidity()},updated(){var I;const{dataItems:e=[],dataItemKey:t,virtual:a,groupField:r,textField:o}=this.$props,s=this.isOpen,d=this.prevOpened!==void 0?this.prevOpened:this.prevCurrentOpened,l=!d&&s,u=this.$refs.list,f=this.$refs.filterInput,c=this.$refs.scrollElement;if(this.$refs.scroller,u&&(this.base.vs.list=u.list,this.base.list=u.list),c&&(this.base.vs.scrollElement=c),f&&(this.filterInput=f),u&&e.length&&this.base.vs.scrollerRef(u.$el),this.$props.popupSettings.animate||l&&this.onPopupOpened(),a&&this.virtualTotalHasChanged)this.base.vs.calcScrollElementHeight(),this.base.vs.reset(),this.virtualTotalHasChanged=!1;else{const v=this.computedValue(),m=this.prevCurrentValue;let h=e.findIndex(b=>p.areSame(b,v,t));r&&(h=(I=this.base.getGroupedDataModernMode(e,r))==null?void 0:I.indexOf(v));const S=!p.areSame(m,v,t);l&&a?(this.base.scrollToVirtualItem(a,h),this.prevCurrentOpened=!0):l&&!a?(e&&e.length!==0&&this.base.resetGroupStickyHeader(e[0][r],this),this.base.scrollToItem(h),this.prevCurrentOpened=!0):s&&d&&v&&S&&!this._navigated?this.base.scrollToItem(h):s&&d&&this._navigated&&(this._navigated&&a&&a.skip===0?this.base.vs.reset():this._navigated&&a&&a.skip===a.total-a.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.prevCurrentValue=this.computedValue(),this.setValidity()},computed:{index(){const{dataItems:e=[],dataItemKey:t}=this.$props,a=this.computedValue();return e.findIndex(r=>p.areSame(r,a,t))},spanClassNames(){const e=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.currentFocused,"k-empty":!this.computedValue(),"k-invalid":!e&&e!==void 0,"k-rtl":this.$props.dir==="rtl"}},dropDownListId(){return`value-${this.base.guid}${this.$props.ariaDescribedBy?" "+this.$props.ariaDescribedBy:""}`},isOpen(){return this.$props.opened!==void 0?this.$props.opened:this.currentOpened},animationStyles(){return this.windowWidth<=L.MOBILE_SMALL_DEVICE?{top:0,width:"100%",height:"100%"}:void 0},classNameAdaptiv(){return this.windowWidth<=L.MOBILE_SMALL_DEVICE?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"},adaptiveState(){return this.windowWidth<=L.MOBILE_MEDIUM_DEVICE&&this.$props.adaptive}},methods:{focus(){this.base.wrapper&&this.base.wrapper.focus()},computedValue(){let e;return this.valueDuringOnChange!==void 0?e=this.valueDuringOnChange:this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:this.currentValue!==void 0?e=this.currentValue:this.$props.defaultValue!==void 0&&(e=this.$props.defaultValue),!p.isPresent(e)&&this.$props.defaultItem!==void 0&&(e=this.$props.defaultItem),this.valuePrimitive&&this.findByFieldValue(this.valueField,e)||e},findByFieldValue(e,t){const a=this.dataItems.findIndex(r=>p.getItemValue(r,e)===t);return this.dataItems[a]},primitiveValue(){const e=this.computedValue();return this.valuePrimitive?p.getItemValue(e,this.valueField):e},validity(){const e=this.$props.validationMessage!==void 0,t=!this.$props.required||this.computedValue()!==null&&this.computedValue()!==""&&this.computedValue()!==void 0,a=this.$props.valid!==void 0?this.$props.valid:t;return{customError:e,valid:a,valueMissing:this.computedValue()===null}},handleItemSelect(e,t){const{dataItems:a=[],virtual:r,dataItemKey:o,defaultItem:s}=this.$props,d=r?r.skip:0,l=e===-1&&s!==void 0?s:a[e-d],u=!p.areSame(l,this.computedValue(),o);this.triggerOnChange(l,t),u&&this.base.triggerPageChangeCornerItems(l,t)},onNavigate(e,t){const{dataItems:a=[],defaultItem:r,dataItemKey:o,virtual:s={skip:0,total:0,pageSize:0}}=this.$props,d=this.base.vs,l=this.computedValue(),u=a.findIndex(c=>p.areSame(c,l,o)),f=this.base.navigation.navigate({current:s.skip+u,max:(d.enabled?s.total:a.length)-1,min:r!==void 0?-1:0,keyCode:t});f!==void 0&&this.handleItemSelect(f,e),this.applyState(e)},search(e){clearTimeout(this.typingTimeout),this.$props.filterable||(this.typingTimeout=setTimeout(()=>this.searchState.word="",this.$props.delay),this.selectNext(e))},selectNext(e){const{dataItems:t=[],dataItemKey:a}=this.$props;let r=t.map((b,x)=>({item:b,itemIndex:x}));const o=this.searchState.word,s=this.searchState.last,d=p.sameCharsOnly(o,s);let l=r.length,u=Math.max(0,t.findIndex(b=>p.areSame(b,this.computedValue(),a))),f;this.$props.defaultItem&&(f={item:this.$props.defaultItem,itemIndex:-1},l+=1,u+=1),u+=d?1:0,r=p.shuffleData(r,u,f);let c,I,v,m=0;const{textField:h,ignoreCase:S}=this.$props;for(;m<l;){if(c=p.getItemValue(r[m].item,h),I=d&&p.matchText(c,s,S),v=p.matchText(c,o,S),I||v){m=r[m].itemIndex;break}m++}if(m!==l){const b=this.base.initState();b.event=e,this.handleItemSelect(m,b),this.applyState(b),this.valueDuringOnChange=void 0}},handleKeyDown(e){this.isScrolling&&(this.isScrolling=!1);const{dataItems:t=[],leftRightKeysNavigation:a,filterable:r,disabled:o,virtual:s={skip:0,total:0,pageSize:0}}=this.$props,d=this.isOpen,l=e.keyCode,u=l===i.Keys.home||l===i.Keys.end,f=l===i.Keys.up||l===i.Keys.down,c=!d&&(e.altKey&&l===i.Keys.down||l===i.Keys.enter||l===i.Keys.space),I=d&&(e.altKey&&l===i.Keys.up||l===i.Keys.esc),v=a&&(l===i.Keys.left||l===i.Keys.right),m=f||!r&&(v||u),h=this.base.initState();if(h.event=e,!o){if(u&&this.base.vs.enabled)l===i.Keys.home?s.skip!==0?(this.base.triggerOnPageChange(h,0,s.pageSize),this._navigated=!0):this.triggerOnChange(t[0],h):s.skip<s.total-s.pageSize?(this.base.triggerOnPageChange(h,s.total-s.pageSize,s.pageSize),this._navigated=!0):this.triggerOnChange(t[t.length-1],h);else if(d&&l===i.Keys.enter){const S=this.focusedIndex();S!==void 0&&this.handleItemSelect(S,h),this.base.togglePopup(h),e.preventDefault()}else c||I?(this.adaptiveState&&this.handleWrapperClick(e),this.base.togglePopup(h),e.preventDefault()):m&&(this.onNavigate(h,l),e.preventDefault());this.applyState(h)}},handleItemClick(e,t){this.base.handleItemClick(e,t),this.valueDuringOnChange=void 0},handleFocus(e){this._skipFocusEvent||this.base.handleFocus(e)},handleBlur(e){if(this._skipFocusEvent||!this.currentFocused)return;const t=this.isOpen,a=this.base.initState();a.event=e,a.data.currentFocused=!1,a.events.push({type:"blur"}),t&&!this.adaptiveState&&this.base.togglePopup(a),this.applyState(a)},handleDefaultItemClick(e){const t=this.base.initState();t.event=e,this.base.togglePopup(t),this.triggerOnChange(this.$props.defaultItem,t),this.applyState(t)},handleWrapperClick(e){const t=this.base.initState();t.event=e,this.currentFocused||(t.data.currentFocused=!0),this.base.togglePopup(t),this.applyState(t)},handleKeyPress(e){if(this.$props.filterable||e.keyCode===i.Keys.enter)return;let t=String.fromCharCode(e.charCode||e.keyCode);this.$props.ignoreCase&&(t=t.toLowerCase()),t===" "&&e.preventDefault(),this.searchState={word:this.searchState.word+t,last:this.searchState.last+t},this.search(e)},handleListFilterChange(e){const t=this.base.initState();t.event=e,this.$props.filter===void 0&&(t.data.currentText=e.target.value),this.base.filterChanged(e.target.value,t),t.data.group=void 0,this.applyState(t)},onPopupOpened(){this.filterInput&&this.focusElement(this.filterInput.input)},onPopupClosed(){this.currentFocused&&setTimeout(()=>{this.currentFocused&&this.base.wrapper&&this.focusElement(this.base.wrapper)})},focusedIndex(){const e=p.isPresent(this.$props.filter)?this.$props.filter:this.currentText,{dataItems:t=[],virtual:a={skip:0},dataItemKey:r,textField:o,focusedItemIndex:s}=this.$props,d=this.computedValue(),u=!(t.findIndex(f=>p.areSame(f,d,r))<0&&!this.$props.defaultItem);return!u&&e&&a.skip===0?s?s(t,e,o):t.indexOf(p.getFocusedItem(t,e,o)):!u&&a.skip===0?0:void 0},focusElement(e){this._skipFocusEvent=!0,e.focus(),setTimeout(()=>this._skipFocusEvent=!1,30)},setValidity(){this.select&&this.select.setCustomValidity&&this.select.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||Se)},triggerOnChange(e,t){p.areSame(this.computedValue(),e,this.$props.dataItemKey)||(this.$props.value===void 0&&(this.currentValue=e),this.valueDuringOnChange=e,t.events.push({type:"change"}))},applyState(e){this.base.applyState(e),this.valueDuringOnChange=void 0},calculateMedia(e){for(let t of e)this.windowWidth=t.target.clientWidth},repositionPopup(){this.base.repositionPopup()},onScroll(e){this.isScrolling=!0;const{vs:t,list:a}=this.base;t.scrollHandler(e);const r=this.base.initState(),{groupField:o}=this.$props;let{dataItems:s=[]}=this.$props,d;if(!o||!s.length)return;const l=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:a?a.children[0].offsetHeight:0),f=e.target.scrollTop-t.skip*l;o&&(s=this.base.getGroupedDataModernMode(s,o),d=s[0][o]);for(let c=1;c<s.length&&!(l*c>f);c++)s[c]&&s[c][o]&&(d=s[c][o]);d!==this.group&&(r.data.group=d,this.applyState(r))}},render(){const{style:e,className:t,label:a,dir:r,virtual:o={skip:0},size:s,rounded:d,fillMode:l,dataItemKey:u,dataItems:f=[],disabled:c,tabIndex:I,loading:v,icon:m,svgIcon:h,iconClassName:S,adaptiveTitle:b,header:x,footer:R,groupStickyHeaderItemRender:q}=this.$props,C=this.isOpen,z=p.getItemValue(this.computedValue(),this.$props.textField),A=!this.$props.validityStyles||this.validity().valid,k=this.base,V=k.vs,D=this.$props.id||this.inputId;V.enabled=this.$props.virtual!==void 0;const O=Object.assign({},{animate:!0,height:"200px"},this.$props.popupSettings),W=ve.provideLocalizationService(this).toLanguageString(F.selectButton,F.messages[F.selectButton]),N=this.adaptiveState;this.group===void 0&&this.$props.groupField!==void 0&&(this.group=p.getItemValue(this.$props.dataItems[0],this.$props.groupField));const G=i.templateRendering.call(this,this.$props.valueRender,i.getListeners.call(this)),U=this.currentFocused,M=this.primitiveValue(),Y=f.findIndex(g=>p.areSame(g,M,u)),J=n.createVNode("span",{class:"k-input-inner",id:this.dropDownListId},[n.createVNode("span",{class:"k-input-value-text"},[z])]);let Q=i.getTemplate.call(this,{h:n.h,template:G,defaultRendering:J,additionalProps:{value:this.computedValue(),...this.$data}});const X=function(g){return n.createVNode("select",{name:this.$props.name,id:D,ref:i.setRef(this,"select"),tabindex:-1,"aria-hidden":!0,title:this.$props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},[n.createVNode("option",{value:this.$props.valueMap?this.$props.valueMap.call(void 0,g):g},null)])},Z=()=>[n.createVNode("div",{class:"k-actionsheet-titlebar-group k-hbox"},[n.createVNode("div",{class:"k-actionsheet-title"},[n.createVNode("div",{class:"k-text-center"},[b]),n.createVNode("div",{class:"k-actionsheet-subtitle k-text-center"},null)]),n.createVNode("div",{class:"k-actionsheet-actions"},[n.createVNode(P.Button,{tabIndex:5,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.handleWrapperClick,icon:"x",svgIcon:j.xIcon},null)])]),n.createVNode("div",{class:"k-actionsheet-titlebar-group k-actionsheet-filter"},[E.call(this)])],ee=i.templateRendering.call(this,Z,i.getListeners.call(this)),te=()=>{const g=k.getTemplateDef.call(this,x,n.h),y=k.getTemplateDef.call(this,R,n.h),$=i.templateRendering.call(this,q,i.getListeners.call(this));return n.createVNode("div",{class:"k-list-container"},[g&&n.createVNode("div",{class:"k-list-header"},[g]),n.createVNode("div",{class:i.classNames("k-list",{[`k-list-${T[s]||s}`]:N?!1:s,"k-list-lg":!!N,"k-virtual-list":V.enabled})},[K.call(this),this.group&&f.length!==0&&n.createVNode(_.GroupStickyHeader,{group:this.group,render:$},null),B.call(this),y&&n.createVNode("div",{class:"k-list-footer"},[y])])])},ie=i.templateRendering.call(this,te,i.getListeners.call(this)),se=function(){return n.createVNode(be.ActionSheet,{expand:C,animation:!0,animationStyles:this.animationStyles,className:this.classNameAdaptive,contentClassName:"!k-overflow-hidden",header:ee,content:ie,onClose:this.handleWrapperClick,navigatableElements:["input.k-input-inner",".k-actionsheet-actions > button"]},null)},K=function(){const{textField:g,defaultItem:y}=this.$props;return y!==void 0&&n.createVNode(fe.ListDefaultItem,{defaultItem:y,textField:g,selected:p.areSame(this.computedValue(),y,u),key:"defaultitemkey",onDefaultitemclick:this.handleDefaultItemClick},null)},B=function(){let g;const{textField:y,groupField:$}=this.$props;let w=this.$props.dataItems||[];const re=i.templateRendering.call(this,this.$props.itemRender,i.getListeners.call(this)),oe=i.templateRendering.call(this,this.$props.groupHeaderItemRender,i.getListeners.call(this)),de=i.templateRendering.call(this,this.$props.listNoDataRender,i.getListeners.call(this)),ue=o.skip,pe=`translateY(${V.translate}px)`;return $&&(w=this.base.getGroupedDataModernMode(w,$)),n.createVNode(ge.List,{id:this.base.listBoxId,show:C,dataItems:w.slice(),focusedIndex:this.focusedIndex(),value:this.computedValue(),textField:y,valueField:u,optionsGuid:this.base.guid,ref:"list",wrapperStyle:{maxHeight:O.height},wrapperCssClass:"k-list-content",listStyle:V.enabled?{transform:pe}:void 0,key:"listkey",skip:ue,onListclick:this.handleItemClick,itemRender:re,groupHeaderItemRender:oe,noDataRender:de,groupField:$,onScroll:this.onScroll},Ie(g=ae.call(this))?g:{default:()=>[g]})},E=function(){const g=this.$props.filter!==void 0?this.$props.filter:this.currentText;return this.$props.filterable&&n.createVNode(he.ListFilter,{value:g,ref:"filterInput",onChange:this.handleListFilterChange,onKeydown:this.handleKeyDown,size:this.$props.size,rounded:this.$props.rounded,fillMode:this.$props.fillMode,ariaControlsId:this.base.listBoxId,ariaActivedescendantId:`option-${this.base.guid}-${this.focusedIndex()}`},null)},ae=function(){return V.enabled&&n.createVNode("div",{ref:"scrollElement",key:"scrollElementKey"},null)},ne=function(){const g=i.templateRendering.call(this,this.$props.groupStickyHeaderItemRender,i.getListeners.call(this)),y=k.getTemplateDef.call(this,x),$=k.getTemplateDef.call(this,R);return n.createVNode(ce.ListContainer,{ref:"container",onMousedown:p.preventDefaultNonInputs,dir:r!==void 0?r:k.dirCalculated,width:this.popupWidth,popupSettings:{...O,popupClass:i.classNames(O.popupClass,"k-list",{[`k-list-${T[s]||s}`]:s,"k-virtual-list":this.base.vs.enabled}),className:i.classNames("k-list-container",O.className),anchor:this.anchor,show:C},onOpen:this.onPopupOpened,onClose:this.onPopupClosed,onBlur:this.handleBlur},{default:()=>[E.call(this),K.call(this),this.group&&f.length!==0&&n.createVNode(_.GroupStickyHeader,{group:this.group,render:g},null),y&&n.createVNode("div",{class:"k-list-header"},[y]),B.call(this),$&&n.createVNode("div",{class:"k-list-footer"},[$])]})};this.$props.virtual!==void 0&&(k.vs.skip=o.skip,k.vs.total=o.total,k.vs.pageSize=o.pageSize);const le=function(){return n.createVNode("span",{ref:i.setRef(this,"kendoAnchor"),class:i.classNames("k-dropdownlist k-picker",t,{[`k-picker-${T[s]||s}`]:s,[`k-rounded-${ye[d]||d}`]:d,[`k-picker-${l}`]:l,"k-focus":U,"k-disabled":c,"k-invalid":!A,"k-loading":v,"k-required":this.required}),style:a?{...e,width:void 0}:e,dir:r,onMousedown:C?p.preventDefaultNonInputs:i.noop,onFocusin:this.handleFocus,onFocusout:this.handleBlur,tabindex:i.getTabIndex(I,c),accesskey:this.$props.accessKey,onKeydown:this.handleKeyDown,onKeypress:this.handleKeyPress,role:"combobox",onClick:c?i.noop:this.handleWrapperClick,"aria-disabled":c||void 0,"aria-haspopup":!0,"aria-expanded":C||!1,"aria-owns":this.base.listBoxId,"aria-activedescendant":C?"option-"+this.base.guid+"-"+(Y+(o?o.skip:0)):void 0,"aria-label":this.$props.ariaLabel||this.$props.label,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedBy":this.dropDownListId,title:this.$props.title},[Q,v&&n.createVNode(i.Icon,{name:"loading",class:"k-input-loading-icon",key:"loading"},null),n.createVNode(P.Button,{type:"button",tabIndex:-1,size:s,fillMode:l,rounded:null,ariaLabel:W,class:"k-input-button",icon:m||"caret-alt-down",svgIcon:h||j.caretAltDownIcon,iconClass:S},null),X.call(this,M),!N&&ne.call(this)])},H=[n.h(le.call(this),{...this.$attrs}),N&&se.call(this)];return a?n.createVNode("span",{class:this.spanClassNames,onFocusin:this.handleFocus,onFocusout:this.handleBlur,dir:this.$props.dir},[H,this.$props.label?D?n.createVNode("label",{for:D,class:"k-floating-label"},[this.$props.label]):n.createVNode("span",{class:"k-label"},[this.$props.label]):null]):H}});exports.DropDownList=ke;
@@ -362,11 +362,13 @@ const Ge = "Please select a value from the list!", dt = /* @__PURE__ */ $e({
362
362
  textField: p,
363
363
  ignoreCase: S
364
364
  } = this.$props;
365
- for (; g < a; g++)
365
+ for (; g < a; ) {
366
366
  if (u = F(l[g].item, p), I = r && Z(u, i, S), m = Z(u, o, S), I || m) {
367
367
  g = l[g].itemIndex;
368
368
  break;
369
369
  }
370
+ g++;
371
+ }
370
372
  if (g !== a) {
371
373
  const v = this.base.initState();
372
374
  v.event = e, this.handleItemSelect(g, v), this.applyState(v), this.valueDuringOnChange = void 0;
@@ -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 l=require("vue"),a=require("@progress/kendo-vue-common"),me=require("../common/ListContainer.js"),ve=require("../common/List.js"),Ie=require("./TagList.js"),ye=require("../common/SearchBar.js"),be=require("../common/DropDownBase.js"),U=require("../common/GroupStickyHeader.js"),Se=require("../common/ClearButton.js"),w=require("../common/settings.js"),g=require("../common/utils.js"),Y=require("@progress/kendo-svg-icons"),E=require("@progress/kendo-vue-buttons"),H=require("../common/constants.js"),ke=require("@progress/kendo-vue-layout"),Ce=require("../common/ListFilter.js"),xe=require("@progress/kendo-vue-intl"),T=require("../messages/main.js"),{sizeMap:P,roundedMap:$e}=a.kendoThemeMaps;function B(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!l.isVNode(e)}const Fe="Please enter a valid value!",Ve=e=>e.preventDefault(),J=(e,t,s)=>!!e!=!!t||e.text!==t.text?!1:e===t||g.matchDataCollections(e.data,t.data,s),Q=e=>e===y.CustomItem;var y=function(e){return e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem",e}(y||{});const Te=l.defineComponent({name:"KendoMultiSelect",emits:{changemodel:null,"update:modelValue":null,filterchange:null,change:null,pagechange:null,focus:null,blur:null,open:null,close:null,scroll:null},model:{event:"changemodel"},props:{autoClose:{type:Boolean,default:!0},removeTagIcon:String,allowCustom:Boolean,modelValue:Array,opened:{type:Boolean,default:void 0},disabled:Boolean,dir:String,tabIndex:{type:Number,default:0},accessKey:String,dataItems:Array,textField:String,label:String,loading:Boolean,name:String,value:Array,defaultValue:Array,valueField:String,valuePrimitive:Boolean,dataItemKey:String,placeholder:String,tags:Array,required:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String,default:void 0},validityStyles:{type:Boolean,default:!0},tagRender:[String,Function,Object],id:String,popupSettings:{type:Object,default:function(){return{animate:!0,height:"200px",anchor:""}}},itemRender:[String,Function,Object],groupHeaderItemRender:[String,Function,Object],groupStickyHeaderItemRender:[String,Function,Object],listNoDataRender:[String,Function,Object],focusedItemIndex:Function,virtual:{type:Object,default:void 0},header:[String,Function,Object],footer:[String,Function,Object],filterable:Boolean,filter:{type:String,default:void 0},ariaLabel:{type:String,default:void 0},ariaLabelledBy:String,ariaDescribedBy:String,rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},tagsRounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},groupField:{type:String},adaptive:{type:Boolean,default:void 0},adaptiveTitle:{type:String,default:void 0}},setup(){const e=l.ref(null),t=l.ref(null),s=l.inject("kendoLocalizationService",{});return{inputRef:e,kendoAnchorRef:t,kendoLocalizationService:s}},computed:{spanClassNames(){const e=!this.hasMounted||!this.$props.validityStyles||this.validity().valid,t=this.currentText||g.getItemValue(this.computedValue()[0],this.$props.textField);return{"k-floating-label-container":!0,"k-focus":this.currentFocused,"k-empty":!(t&&t!==0),"k-invalid":!e&&e!==void 0,"k-rtl":this.$props.dir==="rtl"}},isOpen(){return this.$props.opened!==void 0?this.$props.opened:this.currentOpened},animationStyles(){return this.windowWidth<=H.MOBILE_SMALL_DEVICE?{top:0,width:"100%",height:"100%"}:void 0},classNameAdaptive(){return this.windowWidth<=H.MOBILE_SMALL_DEVICE?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"},adaptiveState(){return this.windowWidth<=H.MOBILE_MEDIUM_DEVICE&&this.$props.adaptive}},created(){this.observer=null,this.valuesItemsDuringOnChange=null,this._tags=[],this._skipFocusEvent=!1,this.scrollToFocused=!1,this.base=new be(this),this.anchor=a.guid(),this.inputId=a.guid()},inject:{kendoLocalizationService:{default:null}},data(){return{hasMounted:!1,currentText:"",currentValue:"",currentFocused:!1,currentOpened:!1,currentFocusedIndex:void 0,currentFocusedTag:void 0,searchState:{word:"",last:""},suggested:"",activedescendant:w.ActiveDescendant.PopupList,group:void 0,isScrolling:!1,itemHeight:0,windowWidth:0,popupWidth:void 0,initialAdaptiveRenderingValues:void 0}},watch:{currentOpened:function(e,t){this.prevCurrentOpened=t},opened:function(e,t){this.prevOpened=t},virtual:function(e,t){e&&t&&e.total!==t.total&&(this.virtualTotalHasChanged=!0)},isOpen:function(e){e?this.initialAdaptiveRenderingValues=this.base.component.currentValue:this.initialAdaptiveRenderingValues=void 0,setTimeout(()=>{const t=document.querySelector(".k-list-item");this.itemHeight=this.base.getListItemHeight(t)},100)}},updated(){var m;const{virtual:e,groupField:t="",dataItems:s=[]}=this.$props,i=e?e.skip:0,n=this.isOpen,r=this.prevOpened!==void 0?this.prevOpened:this.prevCurrentOpened,d=!r&&n,u=r&&!n,p=Object.assign({},{animate:!0,height:"200px"},this.$props.popupSettings),o=this.$refs.list,h=this.$refs.scrollElement;if(o&&(this.base.vs.list=o.list,this.base.list=o.list),h&&(this.base.vs.scrollElement=h),o&&s.length&&this.base.vs.scrollerRef(o.$el),!p.animate&&u&&this.onPopupClosed(),!this.isScrolling)if(e&&this.virtualTotalHasChanged)this.base.vs.calcScrollElementHeight(),this.base.vs.reset(),this.virtualTotalHasChanged=!1;else{let{focusedItem:v,focusedIndex:C}=this.getFocusedState();t!==""&&(C=(m=this.base.getGroupedDataModernMode(s,t))==null?void 0:m.indexOf(v)),d&&e?(this.base.scrollToVirtualItem(e,C-i),this.prevCurrentOpened=!0):d&&!e?(s&&s.length!==0&&this.base.resetGroupStickyHeader(s[0][t],this),this.base.scrollToItem(C),this.prevCurrentOpened=!0):n&&r&&v&&this.base.scrollToItem(C-i)}this.scrollToFocused=!1,this.searchBarRef(),this.setValidity()},mounted(){this.observer=a.canUseDOM&&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=a.getRef(this,"kendoAnchor"),this.element=a.getRef(this,"kendoAnchor"),this.base.didMount(),this.searchBarRef(),this.setValidity()},methods:{clearFilter(e){this.currentText&&(e.data.currentText=""),this.base.filterChanged("",e)},computedValue(){const e=[];return this.valuesItemsDuringOnChange?e.push(...this.valuesItemsDuringOnChange):this.$props.value?e.push(...this.$props.value):this.$props.modelValue!==void 0?e.push(...this.$props.modelValue):this.currentValue?e.push(...this.currentValue):this.$props.defaultValue&&e.push(...this.$props.defaultValue),this.valuePrimitive&&this.findByFieldValue(this.valueField,e)||e},findByFieldValue(e,t){return t.map(i=>{const n=this.dataItems.findIndex(r=>g.getItemValue(r,e)===i);return this.dataItems[n]||i})},primitiveValue(){const e=this.computedValue(),t=e.map(s=>g.getItemValue(s,this.valueField));return this.valuePrimitive?t:e},validity(){const e=this.$props.validationMessage!==void 0,t=this.computedValue(),s=!this.$props.required||t!==null&&t.length>0&&t!==void 0,i=this.$props.valid!==void 0?this.$props.valid:s;return{customError:e,valid:i,valueMissing:t===null}},handleItemSelect(e,t){const{dataItems:s=[],dataItemKey:i,virtual:n}=this.$props,r=this.computedValue(),d=n?n.skip:0,u=s[e-d],p=r.findIndex(m=>g.areSame(m,u,i));let o=[];p!==-1?(o=r,o.splice(p,1)):o=[...r,u],(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(o,t),this.base.triggerPageChangeCornerItems(u,t)},onTagDelete(e,t){const s=this.isOpen,i=this.base.initState();i.event=t,s&&this.base.togglePopup(i),this.currentFocused||(i.data.currentFocused=!0);const n=this.computedValue();g.removeDataItems(n,e,this.$props.dataItemKey),this.triggerOnChange(n,i),this.applyState(i)},onNavigate(e,t){const{allowCustom:s,dataItems:i=[]}=this.$props,n=this.isOpen,r=this.$props.filter!==void 0?this.$props.filter:this.currentText,{focusedType:d,focusedIndex:u}=this.getFocusedState(),p=s&&r,o=Q(d),h=this.base,m=h.vs;if(n&&t===a.Keys.up&&o)this.currentFocusedIndex!==void 0&&(e.data.currentFocusedIndex=void 0);else{const v=h.navigation.navigate({keyCode:t,current:u,max:(m.enabled?m.total:i.length)-1,min:p?-1:0});v!==void 0&&(this.itemFocus(v,e),this.scrollToFocused=!0)}this.applyState(e)},itemFocus(e,t){const{dataItems:s=[],allowCustom:i,virtual:n}=this.$props,r=n?n.skip:0,d=this.$props.filter!==void 0?this.$props.filter:this.currentText,{focusedIndex:u}=this.getFocusedState(),p=i&&d,o=s[e-r];o&&u!==e?this.currentFocusedIndex!==e&&(t.data.currentFocusedIndex=e,t.data.activedescendant=w.ActiveDescendant.PopupList):p&&e===-1&&this.currentFocusedIndex!==void 0&&(t.data.currentFocusedIndex=void 0),this.base.triggerPageChangeCornerItems(o,t)},searchBarRef(){this.input&&this.currentFocused&&setTimeout(()=>this.input.focus(),0)},onChangeHandler(e){const t=this.base.initState(),s=e&&(e.currentTarget&&e.currentTarget.value||e.value),i=this.isOpen;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)},clearButtonClick(e){const t=this.isOpen,s=this.base.initState();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);const i=this.$props.filter!==void 0?this.$props.filter:this.currentText;g.isPresent(i)&&i!==""&&this.base.filterChanged("",s),this.currentText&&(s.data.currentText=""),this.applyState(s)},onInputKeyDown(e){this.isScrolling&&(this.isScrolling=!1);const t=e.keyCode,s=this.$props.filter!==void 0?this.$props.filter:this.currentText,i=this.isOpen,{focusedItem:n}=this.getFocusedState(),r=this.base.initState();if(r.event=e,!s&&this.computedValue().length>0&&(t===a.Keys.left||t===a.Keys.right||t===a.Keys.home||t===a.Keys.end||t===a.Keys.delete||t===a.Keys.backspace))return this.onTagsNavigate(e,r);const d=()=>{e.preventDefault(),this.base.togglePopup(r),this.applyState(r)};i?e.altKey&&t===a.Keys.up?d():t===a.Keys.up||t===a.Keys.down?(e.preventDefault(),this.onNavigate(r,t)):t===a.Keys.enter?(e.preventDefault(),this.$props.allowCustom&&s&&n===null?this.customItemSelect(e):this.selectFocusedItem(e)):t===a.Keys.esc&&(this.adaptiveState&&this.handleWrapperClick(e),d()):e.altKey&&t===a.Keys.down&&d()},onTagsNavigate(e,t){const s=e.keyCode,i=this.currentFocusedTag,n=this._tags,r=this.$props.dataItemKey;let d=i?n.findIndex(o=>J(o,i,r)):-1,u;const p=d!==-1;if(s===a.Keys.left)p?d=Math.max(0,d-1):d=n.length-1,u=n[d];else if(s===a.Keys.right)d===n.length-1?u=void 0:p&&(d=Math.min(n.length-1,d+1),u=n[d]);else if(s===a.Keys.home)u=n[0];else if(s===a.Keys.end)u=n[n.length-1];else if(s===a.Keys.delete){if(p){const o=this.computedValue();g.removeDataItems(o,n[d].data,r),this.triggerOnChange(o,t)}}else if(s===a.Keys.backspace){const o=this.computedValue();if(p)g.removeDataItems(o,n[d].data,r),this.triggerOnChange(o,t);else if(!p&&n.length){const h=n.pop();g.removeDataItems(o,h.data,r),this.triggerOnChange(o,t)}}u!==i&&(t.data.currentFocusedTag=u,t.data.activedescendant=w.ActiveDescendant.TagsList),this.applyState(t)},triggerOnChange(e,t){this.$props.value===void 0&&(t.data.currentValue=[...e]),this.valuesItemsDuringOnChange=[],this.setItems(e,this.valuesItemsDuringOnChange),t.events.push({type:"change"})},selectFocusedItem(e){const{dataItems:t=[],virtual:s}=this.$props,{focusedIndex:i}=this.getFocusedState(),n=s?s.skip:0;t[i-n]!==void 0&&this.handleItemClick(i,e)},setItems(e,t){t.length=0,t.push(...e)},getFocusedState(){const e=this.currentFocusedIndex,t=this.$props.filter!==void 0?this.$props.filter:this.currentText,{allowCustom:s,dataItems:i=[],dataItemKey:n,virtual:r,textField:d,focusedItemIndex:u=g.itemIndexStartsWith}=this.$props,p=r&&r.skip||0;let o;if(e!==void 0)return{focusedIndex:e,focusedItem:i[e-p],focusedType:y.ListItem};const h=this.computedValue();if(s&&t)return{focusedItem:null,focusedIndex:-1,focusedType:y.CustomItem};if(t)return o=u(i,t,d),{focusedItem:i[o],focusedIndex:o+p,focusedType:y.ListItem};if(h.length){const m=h[h.length-1];return o=i.findIndex(v=>g.areSame(v,m,n)),i[o]!==void 0?{focusedIndex:o+p,focusedItem:i[o],focusedType:y.ListItem}:{focusedType:y.None,focusedIndex:-1}}return p===0?{focusedItem:i[0],focusedIndex:0,focusedType:y.ListItem}:{focusedType:y.None,focusedIndex:-1}},customItemSelect(e){const t=this.$props.filter!==void 0?this.$props.filter:this.currentText,{textField:s}=this.$props;if(!t)return;const i=this.base.initState();i.event=e;const n=s?{[s]:t}:t;this.currentText!==void 0&&(i.data.currentText=""),i.data.currentFocusedIndex=void 0,this.base.filterChanged("",i);const r=[...this.computedValue(),n];this.triggerOnChange(r,i),this.base.togglePopup(i),this.applyState(i)},handleWrapperClick(e){const t=this.isOpen,s=this.input;!t&&s&&this.focusElement(s);const i=this.base.initState();i.event=e,this.currentFocused||(i.events.push({type:"focus"}),i.data.currentFocused=!0),this.clearFilter(i),this.base.togglePopup(i),this.applyState(i)},onCancel(e){const t=this.base.initState();t.event=e,e.stopPropagation();const s=this.isOpen;t.focusedIndex!==void 0&&(t.data.focusedIndex=void 0),s&&this.base.togglePopup(t),t.events.push({type:"onCancel"}),this.clearFilter(t),this.triggerOnChange([...this.initialAdaptiveRenderingValues],t),this.base.triggerPageChangeCornerItems([...this.initialAdaptiveRenderingValues],t),this.applyState(t)},handleItemClick(e,t){const s=this.base.initState();s.event=t,this.handleItemSelect(e,s),this.$props.autoClose&&!this.adaptiveState&&this.base.togglePopup(s),this.applyState(s)},handleBlur(e){if(!this.currentFocused||this._skipFocusEvent)return;const t=this.isOpen,s=this.base.initState(),{allowCustom:i,filterable:n}=this.$props;s.event=e,s.data.currentFocused=!1,s.events.push({type:"blur"}),t&&!this.adaptiveState&&(this.currentOpened&&(s.data.currentOpened=!1),s.events.push({type:"close"})),!i&&!n&&this.currentText&&(s.data.currentText=""),this.applyState(s)},handleFocus(e){this._skipFocusEvent||this.base.handleFocus(e)},onPopupOpened(){this.input&&this.currentFocused&&this.focusElement(this.input)},onPopupClosed(){this.currentFocused&&setTimeout(()=>{this.currentFocused&&this.focusElement(this.input)},0)},focusElement(e){this._skipFocusEvent=!0,e.focus(),setTimeout(()=>this._skipFocusEvent=!1,30)},applyState(e){this.base.applyState(e),this.valuesItemsDuringOnChange=null},setValidity(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||Fe)},focus(){this.input&&this.input.focus()},calculateMedia(e){for(let t of e)this.windowWidth=t.target.clientWidth},repositionPopup(){this.base.repositionPopup()},onScroll(e){this.isScrolling=!0;const{vs:t,list:s}=this.base;t.scrollHandler(e);const i=this.base.initState(),{groupField:n}=this.$props;let{dataItems:r=[]}=this.$props,d;if(!n||!r.length)return;const u=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*u;n&&(r=this.base.getGroupedDataModernMode(r,n),r=this.base.getGroupedDataModernMode(r,n),d=r[0][n]);for(let h=1;h<r.length&&!(u*h>o);h++)r[h]&&r[h][n]&&(d=r[h][n]);d!==this.group&&(i.data.group=d,this.applyState(i))}},render(){const{style:e,label:t,dir:s,disabled:i,tags:n,textField:r,dataItemKey:d,virtual:u,loading:p,size:o,fillMode:h,rounded:m,tagsRounded:v,removeTagIcon:C,adaptiveTitle:X,header:M,footer:q,groupStickyHeaderItemRender:Z,dataItems:x=[]}=this.$props,ee=this.currentFocused,N=Object.assign({},{animate:!0,height:"200px"},this.$props.popupSettings),R=this.currentFocusedTag,_=this.computedValue(),D=(this.$props.filter!==void 0?this.$props.filter:this.currentText)||"",te=!p&&(!!D||_.length>0),b=this.base.vs,A=this.$props.id||this.inputId,se=a.templateRendering.call(this,this.$props.tagRender,a.getListeners.call(this)),L=this.isOpen,$=this.adaptiveState,j=xe.provideLocalizationService(this);this.group===void 0&&this.$props.groupField!==void 0&&(this.group=g.getItemValue(this.$props.dataItems[0],this.$props.groupField)),b.enabled=u!==void 0,u!==void 0&&(b.skip=u.skip,b.total=u.total,b.pageSize=u.pageSize);let I=[];this.initialAdaptiveRenderingValues?[...this.initialAdaptiveRenderingValues].forEach(f=>{I.push({text:g.getItemValue(f,r),data:[f]})}):n===void 0?this.computedValue().forEach(c=>{I.push({text:g.getItemValue(c,r),data:[c]})}):I.push(...n),I.length>0&&this.setItems(I,this._tags);const ie=!this.$props.validityStyles||this.validity().valid,ne=function(c){const f=this.activedescendant,{placeholder:S}=this.$props,{focusedIndex:F}=this.getFocusedState(),k=I.length===0||_.length===0&&!D?S:void 0,V=f===w.ActiveDescendant.TagsList&&R!==void 0?`tag-${this.base.guid}-${R.text.replace(/\s+/g,"-")}`:`option-${this.base.guid}-${F}`;return l.createVNode(ye.SearchBar,{id:c,size:Math.max((k||"").length,D.length,1),tabIndex:this.$props.tabIndex,accessKey:this.$props.accessKey,placeholder:k,value:$?"":D,onChange:this.onChangeHandler,onBlur:this.handleBlur,onKeydown:this.onInputKeyDown,ref:O=>{this.inputRef=O},disabled:i,expanded:L,owns:this.base.listBoxId,activedescendant:V,"aria-describedBy":`tagslist-${this.base.guid}${this.$props.ariaDescribedBy?" "+this.$props.ariaDescribedBy:""}`,"aria-labelledBy":this.$props.ariaLabelledBy,"aria-label":this.$props.ariaLabel},null)},z=function(){let c;const{groupField:f}=this.$props,S=a.templateRendering.call(this,this.$props.itemRender,a.getListeners.call(this)),F=a.templateRendering.call(this,this.$props.groupHeaderItemRender,a.getListeners.call(this)),k=a.templateRendering.call(this,this.$props.listNoDataRender,a.getListeners.call(this)),V=u?u.skip:0,{focusedIndex:O}=this.getFocusedState(),K=`translateY(${b.translate}px)`;let G=x;return f&&(G=this.base.getGroupedDataModernMode(x,f)),l.createVNode(ve.List,{id:this.base.listBoxId,show:L,dataItems:G.slice(),focusedIndex:O,value:this.computedValue(),textField:r,valueField:d,optionsGuid:this.base.guid,ref:"list",wrapperStyle:{maxHeight:$?void 0:N.height},wrapperCssClass:"k-list-content",listStyle:b.enabled?{transform:K}:void 0,key:"listKey",skip:V,onListclick:this.handleItemClick,itemRender:S,groupHeaderItemRender:F,noDataRender:k,groupField:f,onScroll:this.onScroll},B(c=ae.call(this))?c:{default:()=>[c]})},ae=function(){return b.enabled&&l.createVNode("div",{ref:"scrollElement",key:"scrollElementKey"},null)},oe=function(){const c=this.base,{allowCustom:f}=this.$props,S=a.templateRendering.call(this,this.$props.groupStickyHeaderItemRender,a.getListeners.call(this)),F=c.getTemplateDef.call(this,M),k=c.getTemplateDef.call(this,q),V=this.$props.filter!==void 0?this.$props.filter:this.currentText,{focusedType:O}=this.getFocusedState(),K=f&&V&&l.createVNode("div",{class:"k-list",key:"customitem",onClick:this.customItemSelect},[l.createVNode("div",{class:a.classNames("k-item k-custom-item",{"k-focus":Q(O)})},[V,l.createVNode(a.Icon,{name:"plus",icon:Y.plusIcon,style:{float:"right"}},null)])]);return this.group===void 0&&this.$props.groupField!==void 0&&(this.group=g.getItemValue(x[0],this.$props.groupField)),l.createVNode(me.ListContainer,{ref:"container",onMousedown:Ve,dir:s!==void 0?s:c.dirCalculated,onBlur:this.handleBlur,width:this.popupWidth,popupSettings:{...N,anchor:this.anchor,show:L,onOpen:this.onPopupOpened,onClose:this.onPopupClosed,popupClass:a.classNames(N.popupClass,"k-list",{[`k-list-${P[o]||o}`]:o,"k-virtual-list":this.base.vs.enabled}),className:a.classNames("k-list-container",N.className)},itemsCount:x.length},{default:()=>[F&&l.createVNode("div",{class:"k-list-header"},[F]),K,this.group&&x.length!==0&&l.createVNode(U.GroupStickyHeader,{group:this.group,render:S},null),z.call(this),k&&l.createVNode("div",{class:"k-list-footer"},[k]),u&&M]})},re=function(){const c=this.$props.filter!==void 0?this.$props.filter:this.currentText;return this.$props.filterable&&l.createVNode(Ce.ListFilter,{value:c,ref:"filterInput",onChange:this.onChangeHandler,onKeydown:this.onInputKeyDown,size:o,rounded:m,fillMode:h},null)},le=()=>[l.createVNode("div",{class:"k-actionsheet-titlebar-group k-hbox"},[l.createVNode("div",{class:"k-actionsheet-title"},[l.createVNode("div",{class:"k-text-center"},[X]),l.createVNode("div",{class:"k-actionsheet-subtitle k-text-center"},null)]),l.createVNode("div",{class:"k-actionsheet-actions"},[l.createVNode(E.Button,{tabIndex:5,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.onCancel,icon:"x",svgIcon:Y.xIcon},null)])]),l.createVNode("div",{class:"k-actionsheet-titlebar-group k-actionsheet-filter"},[re.call(this)])],de=a.templateRendering.call(this,le,a.getListeners.call(this)),ue=()=>{const c=j.toLanguageString(T.adaptiveModeFooterCancel,T.messages[T.adaptiveModeFooterCancel]),f=j.toLanguageString(T.adaptiveModeFooterApply,T.messages[T.adaptiveModeFooterApply]);return[l.createVNode(E.Button,{size:"large","aria-label":c,"aria-disabled":"false",type:"button",onClick:this.onCancel},B(c)?c:{default:()=>[c]}),l.createVNode(E.Button,{themeColor:"primary",size:"large","aria-label":f,"aria-disabled":"false",type:"button",onClick:this.handleWrapperClick},B(f)?f:{default:()=>[f]})]},ce=a.templateRendering.call(this,ue,a.getListeners.call(this)),pe=()=>{const c=this.base.getTemplateDef.call(this,M,l.h),f=this.base.getTemplateDef.call(this,q,l.h),S=a.templateRendering.call(this,Z,a.getListeners.call(this));return l.createVNode("div",{class:"k-list-container"},[c&&l.createVNode("div",{class:"k-list-header"},[c]),l.createVNode("div",{class:a.classNames("k-list",{[`k-list-${P[o]||o}`]:$?!1:o,"k-list-lg":!!$,"k-virtual-list":b.enabled})},[this.group&&x.length!==0&&l.createVNode(U.GroupStickyHeader,{group:this.group,render:S},null),z.call(this),f&&l.createVNode("div",{class:"k-list-footer"},[f])])])},he=a.templateRendering.call(this,pe,a.getListeners.call(this)),fe=function(){return l.createVNode(ke.ActionSheet,{expand:L,animation:!0,animationStyles:this.animationStyles,className:this.classNameAdaptive,contentClassName:"!k-overflow-hidden",footerClassName:"k-actions k-actions-stretched",header:de,content:he,footer:ce,onClose:this.onCancel,navigatableElements:["input.k-input-inner",".k-actionsheet-actions > button"]},null)},ge=function(){let c;return l.createVNode("span",{ref:a.setRef(this,"kendoAnchor"),class:a.classNames("k-multiselect","k-input",{[`k-input-${P[o]||o}`]:o,[`k-rounded-${$e[m]||m}`]:m,[`k-input-${h}`]:h,"k-focus":ee&&!i,"k-disabled":i,"k-invalid":!ie,"k-loading":p,"k-required":this.required}),style:t?{...e,width:void 0}:e,dir:s,onFocusin:this.handleFocus,onClick:this.handleWrapperClick,onMousedown:g.preventDefaultNonInputs},[l.createVNode(Ie.TagList,{removeTagIcon:C,tagsRounded:v,size:o,fillMode:h,tagRender:se,onTagdelete:this.onTagDelete,dataItems:I,guid:this.base.guid,focused:R?I.find(f=>J(f,R,d)):void 0},B(c=ne.call(this,A))?c:{default:()=>[c]}),I.length>0&&te&&l.createVNode(Se.ClearButton,{onClearclick:this.clearButtonClick},null),l.createVNode("span",{class:p?"k-input-loading-icon k-icon k-i-loading":void 0},null),!$&&oe.call(this)])},W=[l.h(ge.call(this),{...this.$attrs}),$&&fe.call(this)];return t?l.createVNode("span",{class:this.spanClassNames,dir:this.$props.dir},[W,this.$props.label?A?l.createVNode("label",{for:A,class:"k-floating-label"},[this.$props.label]):l.createVNode("span",{class:"k-label"},[this.$props.label]):null]):W}});exports.MultiSelect=Te;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),a=require("@progress/kendo-vue-common"),ve=require("../common/ListContainer.js"),Ie=require("../common/List.js"),be=require("./TagList.js"),ye=require("../common/SearchBar.js"),Se=require("../common/DropDownBase.js"),U=require("../common/GroupStickyHeader.js"),ke=require("../common/ClearButton.js"),w=require("../common/settings.js"),g=require("../common/utils.js"),Y=require("@progress/kendo-svg-icons"),E=require("@progress/kendo-vue-buttons"),H=require("../common/constants.js"),Ce=require("@progress/kendo-vue-layout"),xe=require("../common/ListFilter.js"),$e=require("@progress/kendo-vue-intl"),T=require("../messages/main.js"),{sizeMap:P,roundedMap:Fe}=a.kendoThemeMaps;function B(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!l.isVNode(e)}const Ve="Please enter a valid value!",Te=e=>e.preventDefault(),J=(e,t,s)=>!!e!=!!t||e.text!==t.text?!1:e===t||g.matchDataCollections(e.data,t.data,s),Q=e=>e===b.CustomItem;var b=function(e){return e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem",e}(b||{});const Oe=l.defineComponent({name:"KendoMultiSelect",emits:{changemodel:null,"update:modelValue":null,filterchange:null,change:null,pagechange:null,focus:null,blur:null,open:null,close:null,scroll:null},model:{event:"changemodel"},props:{autoClose:{type:Boolean,default:!0},removeTagIcon:String,allowCustom:Boolean,modelValue:Array,opened:{type:Boolean,default:void 0},disabled:Boolean,dir:String,tabIndex:{type:Number,default:0},accessKey:String,dataItems:Array,textField:String,label:String,loading:Boolean,name:String,value:Array,defaultValue:Array,valueField:String,valuePrimitive:Boolean,dataItemKey:String,placeholder:String,tags:Array,required:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String,default:void 0},validityStyles:{type:Boolean,default:!0},tagRender:[String,Function,Object],id:String,popupSettings:{type:Object,default:function(){return{animate:!0,height:"200px",anchor:""}}},itemRender:[String,Function,Object],groupHeaderItemRender:[String,Function,Object],groupStickyHeaderItemRender:[String,Function,Object],listNoDataRender:[String,Function,Object],focusedItemIndex:Function,virtual:{type:Object,default:void 0},header:[String,Function,Object],footer:[String,Function,Object],filterable:Boolean,filter:{type:String,default:void 0},ariaLabel:{type:String,default:void 0},ariaLabelledBy:String,ariaDescribedBy:String,rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},tagsRounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},groupField:{type:String},adaptive:{type:Boolean,default:void 0},adaptiveTitle:{type:String,default:void 0},inputAttributes:Object},setup(){const e=l.ref(null),t=l.ref(null),s=l.inject("kendoLocalizationService",{});return{inputRef:e,kendoAnchorRef:t,kendoLocalizationService:s}},computed:{spanClassNames(){const e=!this.hasMounted||!this.$props.validityStyles||this.validity().valid,t=this.currentText||g.getItemValue(this.computedValue()[0],this.$props.textField);return{"k-floating-label-container":!0,"k-focus":this.currentFocused,"k-empty":!(t&&t!==0),"k-invalid":!e&&e!==void 0,"k-rtl":this.$props.dir==="rtl"}},isOpen(){return this.$props.opened!==void 0?this.$props.opened:this.currentOpened},animationStyles(){return this.windowWidth<=H.MOBILE_SMALL_DEVICE?{top:0,width:"100%",height:"100%"}:void 0},classNameAdaptive(){return this.windowWidth<=H.MOBILE_SMALL_DEVICE?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"},adaptiveState(){return this.windowWidth<=H.MOBILE_MEDIUM_DEVICE&&this.$props.adaptive}},created(){this.observer=null,this.valuesItemsDuringOnChange=null,this._tags=[],this._skipFocusEvent=!1,this.scrollToFocused=!1,this.base=new Se(this),this.anchor=a.guid(),this.inputId=a.guid()},inject:{kendoLocalizationService:{default:null}},data(){return{hasMounted:!1,currentText:"",currentValue:"",currentFocused:!1,currentOpened:!1,currentFocusedIndex:void 0,currentFocusedTag:void 0,searchState:{word:"",last:""},suggested:"",activedescendant:w.ActiveDescendant.PopupList,group:void 0,isScrolling:!1,itemHeight:0,windowWidth:0,popupWidth:void 0,initialAdaptiveRenderingValues:void 0}},watch:{currentOpened:function(e,t){this.prevCurrentOpened=t},opened:function(e,t){this.prevOpened=t},virtual:function(e,t){e&&t&&e.total!==t.total&&(this.virtualTotalHasChanged=!0)},isOpen:function(e){e?this.initialAdaptiveRenderingValues=this.base.component.currentValue:this.initialAdaptiveRenderingValues=void 0,setTimeout(()=>{const t=document.querySelector(".k-list-item");this.itemHeight=this.base.getListItemHeight(t)},100)}},updated(){var m;const{virtual:e,groupField:t="",dataItems:s=[]}=this.$props,i=e?e.skip:0,n=this.isOpen,r=this.prevOpened!==void 0?this.prevOpened:this.prevCurrentOpened,d=!r&&n,u=r&&!n,p=Object.assign({},{animate:!0,height:"200px"},this.$props.popupSettings),o=this.$refs.list,h=this.$refs.scrollElement;if(o&&(this.base.vs.list=o.list,this.base.list=o.list),h&&(this.base.vs.scrollElement=h),o&&s.length&&this.base.vs.scrollerRef(o.$el),!p.animate&&u&&this.onPopupClosed(),!this.isScrolling)if(e&&this.virtualTotalHasChanged)this.base.vs.calcScrollElementHeight(),this.base.vs.reset(),this.virtualTotalHasChanged=!1;else{let{focusedItem:v,focusedIndex:C}=this.getFocusedState();t!==""&&(C=(m=this.base.getGroupedDataModernMode(s,t))==null?void 0:m.indexOf(v)),d&&e?(this.base.scrollToVirtualItem(e,C-i),this.prevCurrentOpened=!0):d&&!e?(s&&s.length!==0&&this.base.resetGroupStickyHeader(s[0][t],this),this.base.scrollToItem(C),this.prevCurrentOpened=!0):n&&r&&v&&this.base.scrollToItem(C-i)}this.scrollToFocused=!1,this.searchBarRef(),this.setValidity()},mounted(){this.observer=a.canUseDOM&&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=a.getRef(this,"kendoAnchor"),this.element=a.getRef(this,"kendoAnchor"),this.base.didMount(),this.searchBarRef(),this.setValidity()},methods:{clearFilter(e){this.currentText&&(e.data.currentText=""),this.base.filterChanged("",e)},computedValue(){const e=[];return this.valuesItemsDuringOnChange?e.push(...this.valuesItemsDuringOnChange):this.$props.value?e.push(...this.$props.value):this.$props.modelValue!==void 0?e.push(...this.$props.modelValue):this.currentValue?e.push(...this.currentValue):this.$props.defaultValue&&e.push(...this.$props.defaultValue),this.valuePrimitive&&this.findByFieldValue(this.valueField,e)||e},findByFieldValue(e,t){return t.map(i=>{const n=this.dataItems.findIndex(r=>g.getItemValue(r,e)===i);return this.dataItems[n]||i})},primitiveValue(){const e=this.computedValue(),t=e.map(s=>g.getItemValue(s,this.valueField));return this.valuePrimitive?t:e},validity(){const e=this.$props.validationMessage!==void 0,t=this.computedValue(),s=!this.$props.required||t!==null&&t.length>0&&t!==void 0,i=this.$props.valid!==void 0?this.$props.valid:s;return{customError:e,valid:i,valueMissing:t===null}},handleItemSelect(e,t){const{dataItems:s=[],dataItemKey:i,virtual:n}=this.$props,r=this.computedValue(),d=n?n.skip:0,u=s[e-d],p=r.findIndex(m=>g.areSame(m,u,i));let o=[];p!==-1?(o=r,o.splice(p,1)):o=[...r,u],(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(o,t),this.base.triggerPageChangeCornerItems(u,t)},onTagDelete(e,t){const s=this.isOpen,i=this.base.initState();i.event=t,s&&this.base.togglePopup(i),this.currentFocused||(i.data.currentFocused=!0);const n=this.computedValue();g.removeDataItems(n,e,this.$props.dataItemKey),this.triggerOnChange(n,i),this.applyState(i)},onNavigate(e,t){const{allowCustom:s,dataItems:i=[]}=this.$props,n=this.isOpen,r=this.$props.filter!==void 0?this.$props.filter:this.currentText,{focusedType:d,focusedIndex:u}=this.getFocusedState(),p=s&&r,o=Q(d),h=this.base,m=h.vs;if(n&&t===a.Keys.up&&o)this.currentFocusedIndex!==void 0&&(e.data.currentFocusedIndex=void 0);else{const v=h.navigation.navigate({keyCode:t,current:u,max:(m.enabled?m.total:i.length)-1,min:p?-1:0});v!==void 0&&(this.itemFocus(v,e),this.scrollToFocused=!0)}this.applyState(e)},itemFocus(e,t){const{dataItems:s=[],allowCustom:i,virtual:n}=this.$props,r=n?n.skip:0,d=this.$props.filter!==void 0?this.$props.filter:this.currentText,{focusedIndex:u}=this.getFocusedState(),p=i&&d,o=s[e-r];o&&u!==e?this.currentFocusedIndex!==e&&(t.data.currentFocusedIndex=e,t.data.activedescendant=w.ActiveDescendant.PopupList):p&&e===-1&&this.currentFocusedIndex!==void 0&&(t.data.currentFocusedIndex=void 0),this.base.triggerPageChangeCornerItems(o,t)},searchBarRef(){this.input&&this.currentFocused&&setTimeout(()=>this.input.focus(),0)},onChangeHandler(e){const t=this.base.initState(),s=e&&(e.currentTarget&&e.currentTarget.value||e.value),i=this.isOpen;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)},clearButtonClick(e){const t=this.isOpen,s=this.base.initState();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);const i=this.$props.filter!==void 0?this.$props.filter:this.currentText;g.isPresent(i)&&i!==""&&this.base.filterChanged("",s),this.currentText&&(s.data.currentText=""),this.applyState(s)},onInputKeyDown(e){this.isScrolling&&(this.isScrolling=!1);const t=e.keyCode,s=this.$props.filter!==void 0?this.$props.filter:this.currentText,i=this.isOpen,{focusedItem:n}=this.getFocusedState(),r=this.base.initState();if(r.event=e,!s&&this.computedValue().length>0&&(t===a.Keys.left||t===a.Keys.right||t===a.Keys.home||t===a.Keys.end||t===a.Keys.delete||t===a.Keys.backspace))return this.onTagsNavigate(e,r);const d=()=>{e.preventDefault(),this.base.togglePopup(r),this.applyState(r)};i?e.altKey&&t===a.Keys.up?d():t===a.Keys.up||t===a.Keys.down?(e.preventDefault(),this.onNavigate(r,t)):t===a.Keys.enter?(e.preventDefault(),this.$props.allowCustom&&s&&n===null?this.customItemSelect(e):this.selectFocusedItem(e)):t===a.Keys.esc&&(this.adaptiveState&&this.handleWrapperClick(e),d()):e.altKey&&t===a.Keys.down&&d()},onTagsNavigate(e,t){const s=e.keyCode,i=this.currentFocusedTag,n=this._tags,r=this.$props.dataItemKey;let d=i?n.findIndex(o=>J(o,i,r)):-1,u;const p=d!==-1;if(s===a.Keys.left)p?d=Math.max(0,d-1):d=n.length-1,u=n[d];else if(s===a.Keys.right)d===n.length-1?u=void 0:p&&(d=Math.min(n.length-1,d+1),u=n[d]);else if(s===a.Keys.home)u=n[0];else if(s===a.Keys.end)u=n[n.length-1];else if(s===a.Keys.delete){if(p){const o=this.computedValue();g.removeDataItems(o,n[d].data,r),this.triggerOnChange(o,t)}}else if(s===a.Keys.backspace){const o=this.computedValue();if(p)g.removeDataItems(o,n[d].data,r),this.triggerOnChange(o,t);else if(!p&&n.length){const h=n.pop();g.removeDataItems(o,h.data,r),this.triggerOnChange(o,t)}}u!==i&&(t.data.currentFocusedTag=u,t.data.activedescendant=w.ActiveDescendant.TagsList),this.applyState(t)},triggerOnChange(e,t){this.$props.value===void 0&&(t.data.currentValue=[...e]),this.valuesItemsDuringOnChange=[],this.setItems(e,this.valuesItemsDuringOnChange),t.events.push({type:"change"})},selectFocusedItem(e){const{dataItems:t=[],virtual:s}=this.$props,{focusedIndex:i}=this.getFocusedState(),n=s?s.skip:0;t[i-n]!==void 0&&this.handleItemClick(i,e)},setItems(e,t){t.length=0,t.push(...e)},getFocusedState(){const e=this.currentFocusedIndex,t=this.$props.filter!==void 0?this.$props.filter:this.currentText,{allowCustom:s,dataItems:i=[],dataItemKey:n,virtual:r,textField:d,focusedItemIndex:u=g.itemIndexStartsWith}=this.$props,p=r&&r.skip||0;let o;if(e!==void 0)return{focusedIndex:e,focusedItem:i[e-p],focusedType:b.ListItem};const h=this.computedValue();if(s&&t)return{focusedItem:null,focusedIndex:-1,focusedType:b.CustomItem};if(t)return o=u(i,t,d),{focusedItem:i[o],focusedIndex:o+p,focusedType:b.ListItem};if(h.length){const m=h[h.length-1];return o=i.findIndex(v=>g.areSame(v,m,n)),i[o]!==void 0?{focusedIndex:o+p,focusedItem:i[o],focusedType:b.ListItem}:{focusedType:b.None,focusedIndex:-1}}return p===0?{focusedItem:i[0],focusedIndex:0,focusedType:b.ListItem}:{focusedType:b.None,focusedIndex:-1}},customItemSelect(e){const t=this.$props.filter!==void 0?this.$props.filter:this.currentText,{textField:s}=this.$props;if(!t)return;const i=this.base.initState();i.event=e;const n=s?{[s]:t}:t;this.currentText!==void 0&&(i.data.currentText=""),i.data.currentFocusedIndex=void 0,this.base.filterChanged("",i);const r=[...this.computedValue(),n];this.triggerOnChange(r,i),this.base.togglePopup(i),this.applyState(i)},handleWrapperClick(e){const t=this.isOpen,s=this.input;!t&&s&&this.focusElement(s);const i=this.base.initState();i.event=e,this.currentFocused||(i.events.push({type:"focus"}),i.data.currentFocused=!0),this.clearFilter(i),this.base.togglePopup(i),this.applyState(i)},onCancel(e){const t=this.base.initState();t.event=e,e.stopPropagation();const s=this.isOpen;t.focusedIndex!==void 0&&(t.data.focusedIndex=void 0),s&&this.base.togglePopup(t),t.events.push({type:"onCancel"}),this.clearFilter(t),this.triggerOnChange([...this.initialAdaptiveRenderingValues],t),this.base.triggerPageChangeCornerItems([...this.initialAdaptiveRenderingValues],t),this.applyState(t)},handleItemClick(e,t){const s=this.base.initState();s.event=t,this.handleItemSelect(e,s),this.$props.autoClose&&!this.adaptiveState&&this.base.togglePopup(s),this.applyState(s)},handleBlur(e){if(!this.currentFocused||this._skipFocusEvent)return;const t=this.isOpen,s=this.base.initState(),{allowCustom:i,filterable:n}=this.$props;s.event=e,s.data.currentFocused=!1,s.events.push({type:"blur"}),t&&!this.adaptiveState&&(this.currentOpened&&(s.data.currentOpened=!1),s.events.push({type:"close"})),!i&&!n&&this.currentText&&(s.data.currentText=""),this.applyState(s)},handleFocus(e){this._skipFocusEvent||this.base.handleFocus(e)},onPopupOpened(){this.input&&this.currentFocused&&this.focusElement(this.input)},onPopupClosed(){this.currentFocused&&setTimeout(()=>{this.currentFocused&&this.focusElement(this.input)},0)},focusElement(e){this._skipFocusEvent=!0,e.focus(),setTimeout(()=>this._skipFocusEvent=!1,30)},applyState(e){this.base.applyState(e),this.valuesItemsDuringOnChange=null},setValidity(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||Ve)},focus(){this.input&&this.input.focus()},calculateMedia(e){for(let t of e)this.windowWidth=t.target.clientWidth},repositionPopup(){this.base.repositionPopup()},onScroll(e){this.isScrolling=!0;const{vs:t,list:s}=this.base;t.scrollHandler(e);const i=this.base.initState(),{groupField:n}=this.$props;let{dataItems:r=[]}=this.$props,d;if(!n||!r.length)return;const u=this.itemHeight=this.itemHeight||(t.enabled?t.itemHeight:s?s.children[0].offsetHeight:0),o=e.target.scrollTop-t.skip*u;n&&(r=this.base.getGroupedDataModernMode(r,n),r=this.base.getGroupedDataModernMode(r,n),d=r[0][n]);for(let h=1;h<r.length&&!(u*h>o);h++)r[h]&&r[h][n]&&(d=r[h][n]);d!==this.group&&(i.data.group=d,this.applyState(i))}},render(){const{style:e,label:t,dir:s,disabled:i,tags:n,textField:r,dataItemKey:d,virtual:u,loading:p,size:o,fillMode:h,rounded:m,tagsRounded:v,removeTagIcon:C,adaptiveTitle:X,header:M,footer:q,inputAttributes:Z,groupStickyHeaderItemRender:ee,dataItems:x=[]}=this.$props,te=this.currentFocused,N=Object.assign({},{animate:!0,height:"200px"},this.$props.popupSettings),R=this.currentFocusedTag,_=this.computedValue(),D=(this.$props.filter!==void 0?this.$props.filter:this.currentText)||"",se=!p&&(!!D||_.length>0),y=this.base.vs,A=this.$props.id||this.inputId,ie=a.templateRendering.call(this,this.$props.tagRender,a.getListeners.call(this)),L=this.isOpen,$=this.adaptiveState,j=$e.provideLocalizationService(this);this.group===void 0&&this.$props.groupField!==void 0&&(this.group=g.getItemValue(this.$props.dataItems[0],this.$props.groupField)),y.enabled=u!==void 0,u!==void 0&&(y.skip=u.skip,y.total=u.total,y.pageSize=u.pageSize);let I=[];this.initialAdaptiveRenderingValues?[...this.initialAdaptiveRenderingValues].forEach(f=>{I.push({text:g.getItemValue(f,r),data:[f]})}):n===void 0?this.computedValue().forEach(c=>{I.push({text:g.getItemValue(c,r),data:[c]})}):I.push(...n),I.length>0&&this.setItems(I,this._tags);const ne=!this.$props.validityStyles||this.validity().valid,ae=function(c){const f=this.activedescendant,{placeholder:S}=this.$props,{focusedIndex:F}=this.getFocusedState(),k=I.length===0||_.length===0&&!D?S:void 0,V=f===w.ActiveDescendant.TagsList&&R!==void 0?`tag-${this.base.guid}-${R.text.replace(/\s+/g,"-")}`:`option-${this.base.guid}-${F}`;return l.createVNode(ye.SearchBar,{id:c,size:Math.max((k||"").length,D.length,1),tabIndex:this.$props.tabIndex,accessKey:this.$props.accessKey,placeholder:k,value:$?"":D,onChange:this.onChangeHandler,onBlur:this.handleBlur,onKeydown:this.onInputKeyDown,ref:O=>{this.inputRef=O},disabled:i,expanded:L,owns:this.base.listBoxId,activedescendant:V,"aria-describedBy":`tagslist-${this.base.guid}${this.$props.ariaDescribedBy?" "+this.$props.ariaDescribedBy:""}`,"aria-labelledBy":this.$props.ariaLabelledBy,"aria-label":this.$props.ariaLabel,inputAttributes:Z},null)},z=function(){let c;const{groupField:f}=this.$props,S=a.templateRendering.call(this,this.$props.itemRender,a.getListeners.call(this)),F=a.templateRendering.call(this,this.$props.groupHeaderItemRender,a.getListeners.call(this)),k=a.templateRendering.call(this,this.$props.listNoDataRender,a.getListeners.call(this)),V=u?u.skip:0,{focusedIndex:O}=this.getFocusedState(),K=`translateY(${y.translate}px)`;let G=x;return f&&(G=this.base.getGroupedDataModernMode(x,f)),l.createVNode(Ie.List,{id:this.base.listBoxId,show:L,dataItems:G.slice(),focusedIndex:O,value:this.computedValue(),textField:r,valueField:d,optionsGuid:this.base.guid,ref:"list",wrapperStyle:{maxHeight:$?void 0:N.height},wrapperCssClass:"k-list-content",listStyle:y.enabled?{transform:K}:void 0,key:"listKey",skip:V,onListclick:this.handleItemClick,itemRender:S,groupHeaderItemRender:F,noDataRender:k,groupField:f,onScroll:this.onScroll},B(c=oe.call(this))?c:{default:()=>[c]})},oe=function(){return y.enabled&&l.createVNode("div",{ref:"scrollElement",key:"scrollElementKey"},null)},re=function(){const c=this.base,{allowCustom:f}=this.$props,S=a.templateRendering.call(this,this.$props.groupStickyHeaderItemRender,a.getListeners.call(this)),F=c.getTemplateDef.call(this,M),k=c.getTemplateDef.call(this,q),V=this.$props.filter!==void 0?this.$props.filter:this.currentText,{focusedType:O}=this.getFocusedState(),K=f&&V&&l.createVNode("div",{class:"k-list",key:"customitem",onClick:this.customItemSelect},[l.createVNode("div",{class:a.classNames("k-item k-custom-item",{"k-focus":Q(O)})},[V,l.createVNode(a.Icon,{name:"plus",icon:Y.plusIcon,style:{float:"right"}},null)])]);return this.group===void 0&&this.$props.groupField!==void 0&&(this.group=g.getItemValue(x[0],this.$props.groupField)),l.createVNode(ve.ListContainer,{ref:"container",onMousedown:Te,dir:s!==void 0?s:c.dirCalculated,onBlur:this.handleBlur,width:this.popupWidth,popupSettings:{...N,anchor:this.anchor,show:L,onOpen:this.onPopupOpened,onClose:this.onPopupClosed,popupClass:a.classNames(N.popupClass,"k-list",{[`k-list-${P[o]||o}`]:o,"k-virtual-list":this.base.vs.enabled}),className:a.classNames("k-list-container",N.className)},itemsCount:x.length},{default:()=>[F&&l.createVNode("div",{class:"k-list-header"},[F]),K,this.group&&x.length!==0&&l.createVNode(U.GroupStickyHeader,{group:this.group,render:S},null),z.call(this),k&&l.createVNode("div",{class:"k-list-footer"},[k]),u&&M]})},le=function(){const c=this.$props.filter!==void 0?this.$props.filter:this.currentText;return this.$props.filterable&&l.createVNode(xe.ListFilter,{value:c,ref:"filterInput",onChange:this.onChangeHandler,onKeydown:this.onInputKeyDown,size:o,rounded:m,fillMode:h},null)},de=()=>[l.createVNode("div",{class:"k-actionsheet-titlebar-group k-hbox"},[l.createVNode("div",{class:"k-actionsheet-title"},[l.createVNode("div",{class:"k-text-center"},[X]),l.createVNode("div",{class:"k-actionsheet-subtitle k-text-center"},null)]),l.createVNode("div",{class:"k-actionsheet-actions"},[l.createVNode(E.Button,{tabIndex:5,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",onClick:this.onCancel,icon:"x",svgIcon:Y.xIcon},null)])]),l.createVNode("div",{class:"k-actionsheet-titlebar-group k-actionsheet-filter"},[le.call(this)])],ue=a.templateRendering.call(this,de,a.getListeners.call(this)),ce=()=>{const c=j.toLanguageString(T.adaptiveModeFooterCancel,T.messages[T.adaptiveModeFooterCancel]),f=j.toLanguageString(T.adaptiveModeFooterApply,T.messages[T.adaptiveModeFooterApply]);return[l.createVNode(E.Button,{size:"large","aria-label":c,"aria-disabled":"false",type:"button",onClick:this.onCancel},B(c)?c:{default:()=>[c]}),l.createVNode(E.Button,{themeColor:"primary",size:"large","aria-label":f,"aria-disabled":"false",type:"button",onClick:this.handleWrapperClick},B(f)?f:{default:()=>[f]})]},pe=a.templateRendering.call(this,ce,a.getListeners.call(this)),he=()=>{const c=this.base.getTemplateDef.call(this,M,l.h),f=this.base.getTemplateDef.call(this,q,l.h),S=a.templateRendering.call(this,ee,a.getListeners.call(this));return l.createVNode("div",{class:"k-list-container"},[c&&l.createVNode("div",{class:"k-list-header"},[c]),l.createVNode("div",{class:a.classNames("k-list",{[`k-list-${P[o]||o}`]:$?!1:o,"k-list-lg":!!$,"k-virtual-list":y.enabled})},[this.group&&x.length!==0&&l.createVNode(U.GroupStickyHeader,{group:this.group,render:S},null),z.call(this),f&&l.createVNode("div",{class:"k-list-footer"},[f])])])},fe=a.templateRendering.call(this,he,a.getListeners.call(this)),ge=function(){return l.createVNode(Ce.ActionSheet,{expand:L,animation:!0,animationStyles:this.animationStyles,className:this.classNameAdaptive,contentClassName:"!k-overflow-hidden",footerClassName:"k-actions k-actions-stretched",header:ue,content:fe,footer:pe,onClose:this.onCancel,navigatableElements:["input.k-input-inner",".k-actionsheet-actions > button"]},null)},me=function(){let c;return l.createVNode("span",{ref:a.setRef(this,"kendoAnchor"),class:a.classNames("k-multiselect","k-input",{[`k-input-${P[o]||o}`]:o,[`k-rounded-${Fe[m]||m}`]:m,[`k-input-${h}`]:h,"k-focus":te&&!i,"k-disabled":i,"k-invalid":!ne,"k-loading":p,"k-required":this.required}),style:t?{...e,width:void 0}:e,dir:s,onFocusin:this.handleFocus,onClick:this.handleWrapperClick,onMousedown:g.preventDefaultNonInputs},[l.createVNode(be.TagList,{removeTagIcon:C,tagsRounded:v,size:o,fillMode:h,tagRender:ie,onTagdelete:this.onTagDelete,dataItems:I,guid:this.base.guid,focused:R?I.find(f=>J(f,R,d)):void 0},B(c=ae.call(this,A))?c:{default:()=>[c]}),I.length>0&&se&&l.createVNode(ke.ClearButton,{onClearclick:this.clearButtonClick},null),l.createVNode("span",{class:p?"k-input-loading-icon k-icon k-i-loading":void 0},null),!$&&re.call(this)])},W=[l.h(me.call(this),{...this.$attrs}),$&&ge.call(this)];return t?l.createVNode("span",{class:this.spanClassNames,dir:this.$props.dir},[W,this.$props.label?A?l.createVNode("label",{for:A,class:"k-floating-label"},[this.$props.label]):l.createVNode("span",{class:"k-label"},[this.$props.label]):null]):W}});exports.MultiSelect=Oe;