@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.
- package/AutoComplete/AutoComplete.js +1 -1
- package/AutoComplete/AutoComplete.mjs +75 -72
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +71 -68
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +3 -1
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +82 -79
- package/common/SearchBar.js +1 -1
- package/common/SearchBar.mjs +12 -11
- package/dist/cdn/js/kendo-vue-dropdowns.js +1 -1
- package/index.d.mts +21 -0
- package/index.d.ts +21 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +4 -3
- package/package.json +19 -10
|
@@ -5,36 +5,36 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { guid as X, canUseDOM as
|
|
10
|
-
import { ListContainer as
|
|
11
|
-
import { List as
|
|
12
|
-
import { TagList as
|
|
8
|
+
import { defineComponent as Fe, ref as Q, inject as Te, h as _, createVNode as r, isVNode as Oe } from "vue";
|
|
9
|
+
import { guid as X, canUseDOM as Ve, getRef as Z, Keys as f, templateRendering as b, getListeners as I, classNames as R, setRef as we, kendoThemeMaps as Re, Icon as De } from "@progress/kendo-vue-common";
|
|
10
|
+
import { ListContainer as Be } from "../common/ListContainer.mjs";
|
|
11
|
+
import { List as Me } from "../common/List.mjs";
|
|
12
|
+
import { TagList as Ae } from "./TagList.mjs";
|
|
13
13
|
import { SearchBar as Le } from "../common/SearchBar.mjs";
|
|
14
|
-
import
|
|
14
|
+
import He from "../common/DropDownBase.mjs";
|
|
15
15
|
import { GroupStickyHeader as ee } from "../common/GroupStickyHeader.mjs";
|
|
16
|
-
import { ClearButton as
|
|
17
|
-
import { ActiveDescendant as
|
|
18
|
-
import { getItemValue as x, areSame as te, removeDataItems as H, isPresent as
|
|
19
|
-
import { xIcon as
|
|
20
|
-
import { Button as
|
|
21
|
-
import { MOBILE_SMALL_DEVICE as se, MOBILE_MEDIUM_DEVICE as
|
|
22
|
-
import { ActionSheet as
|
|
23
|
-
import { ListFilter as
|
|
24
|
-
import { provideLocalizationService as
|
|
16
|
+
import { ClearButton as Ee } from "../common/ClearButton.mjs";
|
|
17
|
+
import { ActiveDescendant as L } from "../common/settings.mjs";
|
|
18
|
+
import { getItemValue as x, areSame as te, removeDataItems as H, isPresent as Pe, matchDataCollections as Ne, itemIndexStartsWith as Ke, preventDefaultNonInputs as _e } from "../common/utils.mjs";
|
|
19
|
+
import { xIcon as je, plusIcon as ze } from "@progress/kendo-svg-icons";
|
|
20
|
+
import { Button as j } from "@progress/kendo-vue-buttons";
|
|
21
|
+
import { MOBILE_SMALL_DEVICE as se, MOBILE_MEDIUM_DEVICE as We } from "../common/constants.mjs";
|
|
22
|
+
import { ActionSheet as Ge } from "@progress/kendo-vue-layout";
|
|
23
|
+
import { ListFilter as qe } from "../common/ListFilter.mjs";
|
|
24
|
+
import { provideLocalizationService as Ue } from "@progress/kendo-vue-intl";
|
|
25
25
|
import { adaptiveModeFooterCancel as ie, messages as ne, adaptiveModeFooterApply as ae } from "../messages/main.mjs";
|
|
26
26
|
const {
|
|
27
|
-
sizeMap:
|
|
28
|
-
roundedMap:
|
|
29
|
-
} =
|
|
27
|
+
sizeMap: z,
|
|
28
|
+
roundedMap: Ye
|
|
29
|
+
} = Re;
|
|
30
30
|
function E(e) {
|
|
31
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
31
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Oe(e);
|
|
32
32
|
}
|
|
33
|
-
const
|
|
33
|
+
const Je = "Please enter a valid value!", Qe = (e) => e.preventDefault(), oe = (e, t, s) => !!e != !!t || e.text !== t.text ? !1 : e === t || Ne(e.data, t.data, s), le = (e) => e === S.CustomItem;
|
|
34
34
|
var S = /* @__PURE__ */ function(e) {
|
|
35
35
|
return e[e.None = 0] = "None", e[e.ListItem = 1] = "ListItem", e[e.CustomItem = 2] = "CustomItem", e;
|
|
36
36
|
}(S || {});
|
|
37
|
-
const
|
|
37
|
+
const vt = /* @__PURE__ */ Fe({
|
|
38
38
|
name: "KendoMultiSelect",
|
|
39
39
|
emits: {
|
|
40
40
|
changemodel: null,
|
|
@@ -173,10 +173,11 @@ const mt = /* @__PURE__ */ $e({
|
|
|
173
173
|
adaptiveTitle: {
|
|
174
174
|
type: String,
|
|
175
175
|
default: void 0
|
|
176
|
-
}
|
|
176
|
+
},
|
|
177
|
+
inputAttributes: Object
|
|
177
178
|
},
|
|
178
179
|
setup() {
|
|
179
|
-
const e = Q(null), t = Q(null), s =
|
|
180
|
+
const e = Q(null), t = Q(null), s = Te("kendoLocalizationService", {});
|
|
180
181
|
return {
|
|
181
182
|
inputRef: e,
|
|
182
183
|
kendoAnchorRef: t,
|
|
@@ -208,11 +209,11 @@ const mt = /* @__PURE__ */ $e({
|
|
|
208
209
|
return this.windowWidth <= se ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom";
|
|
209
210
|
},
|
|
210
211
|
adaptiveState() {
|
|
211
|
-
return this.windowWidth <=
|
|
212
|
+
return this.windowWidth <= We && this.$props.adaptive;
|
|
212
213
|
}
|
|
213
214
|
},
|
|
214
215
|
created() {
|
|
215
|
-
this.observer = null, this.valuesItemsDuringOnChange = null, this._tags = [], this._skipFocusEvent = !1, this.scrollToFocused = !1, this.base = new
|
|
216
|
+
this.observer = null, this.valuesItemsDuringOnChange = null, this._tags = [], this._skipFocusEvent = !1, this.scrollToFocused = !1, this.base = new He(this), this.anchor = X(), this.inputId = X();
|
|
216
217
|
},
|
|
217
218
|
inject: {
|
|
218
219
|
kendoLocalizationService: {
|
|
@@ -233,7 +234,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
233
234
|
last: ""
|
|
234
235
|
},
|
|
235
236
|
suggested: "",
|
|
236
|
-
activedescendant:
|
|
237
|
+
activedescendant: L.PopupList,
|
|
237
238
|
group: void 0,
|
|
238
239
|
isScrolling: !1,
|
|
239
240
|
itemHeight: 0,
|
|
@@ -282,7 +283,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
282
283
|
this.scrollToFocused = !1, this.searchBarRef(), this.setValidity();
|
|
283
284
|
},
|
|
284
285
|
mounted() {
|
|
285
|
-
this.observer =
|
|
286
|
+
this.observer = Ve && 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 = Z(this, "kendoAnchor"), this.element = Z(this, "kendoAnchor"), this.base.didMount(), this.searchBarRef(), this.setValidity();
|
|
286
287
|
},
|
|
287
288
|
methods: {
|
|
288
289
|
clearFilter(e) {
|
|
@@ -354,7 +355,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
354
355
|
} = this.$props, o = n ? n.skip : 0, l = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
|
|
355
356
|
focusedIndex: d
|
|
356
357
|
} = this.getFocusedState(), c = i && l, a = s[e - o];
|
|
357
|
-
a && d !== e ? this.currentFocusedIndex !== e && (t.data.currentFocusedIndex = e, t.data.activedescendant =
|
|
358
|
+
a && d !== e ? this.currentFocusedIndex !== e && (t.data.currentFocusedIndex = e, t.data.activedescendant = L.PopupList) : c && e === -1 && this.currentFocusedIndex !== void 0 && (t.data.currentFocusedIndex = void 0), this.base.triggerPageChangeCornerItems(a, t);
|
|
358
359
|
},
|
|
359
360
|
searchBarRef() {
|
|
360
361
|
this.input && this.currentFocused && setTimeout(() => this.input.focus(), 0);
|
|
@@ -367,7 +368,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
367
368
|
const t = this.isOpen, s = this.base.initState();
|
|
368
369
|
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);
|
|
369
370
|
const i = this.$props.filter !== void 0 ? this.$props.filter : this.currentText;
|
|
370
|
-
|
|
371
|
+
Pe(i) && i !== "" && this.base.filterChanged("", s), this.currentText && (s.data.currentText = ""), this.applyState(s);
|
|
371
372
|
},
|
|
372
373
|
onInputKeyDown(e) {
|
|
373
374
|
this.isScrolling && (this.isScrolling = !1);
|
|
@@ -407,7 +408,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
407
408
|
H(a, p.data, o), this.triggerOnChange(a, t);
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
|
-
d !== i && (t.data.currentFocusedTag = d, t.data.activedescendant =
|
|
411
|
+
d !== i && (t.data.currentFocusedTag = d, t.data.activedescendant = L.TagsList), this.applyState(t);
|
|
411
412
|
},
|
|
412
413
|
triggerOnChange(e, t) {
|
|
413
414
|
this.$props.value === void 0 && (t.data.currentValue = [...e]), this.valuesItemsDuringOnChange = [], this.setItems(e, this.valuesItemsDuringOnChange), t.events.push({
|
|
@@ -433,7 +434,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
433
434
|
dataItemKey: n,
|
|
434
435
|
virtual: o,
|
|
435
436
|
textField: l,
|
|
436
|
-
focusedItemIndex: d =
|
|
437
|
+
focusedItemIndex: d = Ke
|
|
437
438
|
} = this.$props, c = o && o.skip || 0;
|
|
438
439
|
let a;
|
|
439
440
|
if (e !== void 0)
|
|
@@ -541,7 +542,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
541
542
|
this.base.applyState(e), this.valuesItemsDuringOnChange = null;
|
|
542
543
|
},
|
|
543
544
|
setValidity() {
|
|
544
|
-
this.input && this.input.setCustomValidity && this.input.setCustomValidity(this.validity().valid ? "" : this.$props.validationMessage ||
|
|
545
|
+
this.input && this.input.setCustomValidity && this.input.setCustomValidity(this.validity().valid ? "" : this.$props.validationMessage || Je);
|
|
545
546
|
},
|
|
546
547
|
focus() {
|
|
547
548
|
this.input && this.input.focus();
|
|
@@ -594,12 +595,13 @@ const mt = /* @__PURE__ */ $e({
|
|
|
594
595
|
adaptiveTitle: re,
|
|
595
596
|
header: P,
|
|
596
597
|
footer: W,
|
|
597
|
-
|
|
598
|
+
inputAttributes: de,
|
|
599
|
+
groupStickyHeaderItemRender: ue,
|
|
598
600
|
dataItems: F = []
|
|
599
|
-
} = this.$props,
|
|
601
|
+
} = this.$props, ce = this.currentFocused, D = Object.assign({}, {
|
|
600
602
|
animate: !0,
|
|
601
603
|
height: "200px"
|
|
602
|
-
}, this.$props.popupSettings), B = this.currentFocusedTag, G = this.computedValue(), M = (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) || "",
|
|
604
|
+
}, this.$props.popupSettings), B = this.currentFocusedTag, G = this.computedValue(), M = (this.$props.filter !== void 0 ? this.$props.filter : this.currentText) || "", pe = !c && (!!M || G.length > 0), y = this.base.vs, N = this.$props.id || this.inputId, he = b.call(this, this.$props.tagRender, I.call(this)), A = this.isOpen, T = this.adaptiveState, q = Ue(this);
|
|
603
605
|
this.group === void 0 && this.$props.groupField !== void 0 && (this.group = x(this.$props.dataItems[0], this.$props.groupField)), y.enabled = d !== void 0, d !== void 0 && (y.skip = d.skip, y.total = d.total, y.pageSize = d.pageSize);
|
|
604
606
|
let v = [];
|
|
605
607
|
this.initialAdaptiveRenderingValues ? [...this.initialAdaptiveRenderingValues].forEach((h) => {
|
|
@@ -613,12 +615,12 @@ const mt = /* @__PURE__ */ $e({
|
|
|
613
615
|
data: [u]
|
|
614
616
|
});
|
|
615
617
|
}) : v.push(...n), v.length > 0 && this.setItems(v, this._tags);
|
|
616
|
-
const
|
|
618
|
+
const fe = !this.$props.validityStyles || this.validity().valid, ge = function(u) {
|
|
617
619
|
const h = this.activedescendant, {
|
|
618
620
|
placeholder: k
|
|
619
621
|
} = this.$props, {
|
|
620
622
|
focusedIndex: O
|
|
621
|
-
} = this.getFocusedState(), C = v.length === 0 || G.length === 0 && !M ? k : void 0, V = h ===
|
|
623
|
+
} = this.getFocusedState(), C = v.length === 0 || G.length === 0 && !M ? k : void 0, V = h === L.TagsList && B !== void 0 ? `tag-${this.base.guid}-${B.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${O}`;
|
|
622
624
|
return r(Le, {
|
|
623
625
|
id: u,
|
|
624
626
|
size: Math.max((C || "").length, M.length, 1),
|
|
@@ -633,12 +635,13 @@ const mt = /* @__PURE__ */ $e({
|
|
|
633
635
|
this.inputRef = w;
|
|
634
636
|
},
|
|
635
637
|
disabled: i,
|
|
636
|
-
expanded:
|
|
638
|
+
expanded: A,
|
|
637
639
|
owns: this.base.listBoxId,
|
|
638
640
|
activedescendant: V,
|
|
639
641
|
"aria-describedBy": `tagslist-${this.base.guid}${this.$props.ariaDescribedBy ? " " + this.$props.ariaDescribedBy : ""}`,
|
|
640
642
|
"aria-labelledBy": this.$props.ariaLabelledBy,
|
|
641
|
-
"aria-label": this.$props.ariaLabel
|
|
643
|
+
"aria-label": this.$props.ariaLabel,
|
|
644
|
+
inputAttributes: de
|
|
642
645
|
}, null);
|
|
643
646
|
}, U = function() {
|
|
644
647
|
let u;
|
|
@@ -648,9 +651,9 @@ const mt = /* @__PURE__ */ $e({
|
|
|
648
651
|
focusedIndex: w
|
|
649
652
|
} = this.getFocusedState(), K = `translateY(${y.translate}px)`;
|
|
650
653
|
let J = F;
|
|
651
|
-
return h && (J = this.base.getGroupedDataModernMode(F, h)), r(
|
|
654
|
+
return h && (J = this.base.getGroupedDataModernMode(F, h)), r(Me, {
|
|
652
655
|
id: this.base.listBoxId,
|
|
653
|
-
show:
|
|
656
|
+
show: A,
|
|
654
657
|
dataItems: J.slice(),
|
|
655
658
|
focusedIndex: w,
|
|
656
659
|
value: this.computedValue(),
|
|
@@ -673,15 +676,15 @@ const mt = /* @__PURE__ */ $e({
|
|
|
673
676
|
noDataRender: C,
|
|
674
677
|
groupField: h,
|
|
675
678
|
onScroll: this.onScroll
|
|
676
|
-
}, E(u =
|
|
679
|
+
}, E(u = me.call(this)) ? u : {
|
|
677
680
|
default: () => [u]
|
|
678
681
|
});
|
|
679
|
-
},
|
|
682
|
+
}, me = function() {
|
|
680
683
|
return y.enabled && r("div", {
|
|
681
684
|
ref: "scrollElement",
|
|
682
685
|
key: "scrollElementKey"
|
|
683
686
|
}, null);
|
|
684
|
-
},
|
|
687
|
+
}, ve = function() {
|
|
685
688
|
const u = this.base, {
|
|
686
689
|
allowCustom: h
|
|
687
690
|
} = this.$props, k = b.call(this, this.$props.groupStickyHeaderItemRender, I.call(this)), O = u.getTemplateDef.call(this, P), C = u.getTemplateDef.call(this, W), V = this.$props.filter !== void 0 ? this.$props.filter : this.currentText, {
|
|
@@ -694,27 +697,27 @@ const mt = /* @__PURE__ */ $e({
|
|
|
694
697
|
class: R("k-item k-custom-item", {
|
|
695
698
|
"k-focus": le(w)
|
|
696
699
|
})
|
|
697
|
-
}, [V, r(
|
|
700
|
+
}, [V, r(De, {
|
|
698
701
|
name: "plus",
|
|
699
702
|
icon: ze,
|
|
700
703
|
style: {
|
|
701
704
|
float: "right"
|
|
702
705
|
}
|
|
703
706
|
}, null)])]);
|
|
704
|
-
return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = x(F[0], this.$props.groupField)), r(
|
|
707
|
+
return this.group === void 0 && this.$props.groupField !== void 0 && (this.group = x(F[0], this.$props.groupField)), r(Be, {
|
|
705
708
|
ref: "container",
|
|
706
|
-
onMousedown:
|
|
709
|
+
onMousedown: Qe,
|
|
707
710
|
dir: s !== void 0 ? s : u.dirCalculated,
|
|
708
711
|
onBlur: this.handleBlur,
|
|
709
712
|
width: this.popupWidth,
|
|
710
713
|
popupSettings: {
|
|
711
714
|
...D,
|
|
712
715
|
anchor: this.anchor,
|
|
713
|
-
show:
|
|
716
|
+
show: A,
|
|
714
717
|
onOpen: this.onPopupOpened,
|
|
715
718
|
onClose: this.onPopupClosed,
|
|
716
719
|
popupClass: R(D.popupClass, "k-list", {
|
|
717
|
-
[`k-list-${
|
|
720
|
+
[`k-list-${z[a] || a}`]: a,
|
|
718
721
|
"k-virtual-list": this.base.vs.enabled
|
|
719
722
|
}),
|
|
720
723
|
className: R("k-list-container", D.className)
|
|
@@ -730,9 +733,9 @@ const mt = /* @__PURE__ */ $e({
|
|
|
730
733
|
class: "k-list-footer"
|
|
731
734
|
}, [C]), d && P]
|
|
732
735
|
});
|
|
733
|
-
},
|
|
736
|
+
}, be = function() {
|
|
734
737
|
const u = this.$props.filter !== void 0 ? this.$props.filter : this.currentText;
|
|
735
|
-
return this.$props.filterable && r(
|
|
738
|
+
return this.$props.filterable && r(qe, {
|
|
736
739
|
value: u,
|
|
737
740
|
ref: "filterInput",
|
|
738
741
|
onChange: this.onChangeHandler,
|
|
@@ -741,7 +744,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
741
744
|
rounded: g,
|
|
742
745
|
fillMode: p
|
|
743
746
|
}, null);
|
|
744
|
-
},
|
|
747
|
+
}, Ie = () => [r("div", {
|
|
745
748
|
class: "k-actionsheet-titlebar-group k-hbox"
|
|
746
749
|
}, [r("div", {
|
|
747
750
|
class: "k-actionsheet-title"
|
|
@@ -751,7 +754,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
751
754
|
class: "k-actionsheet-subtitle k-text-center"
|
|
752
755
|
}, null)]), r("div", {
|
|
753
756
|
class: "k-actionsheet-actions"
|
|
754
|
-
}, [r(
|
|
757
|
+
}, [r(j, {
|
|
755
758
|
tabIndex: 5,
|
|
756
759
|
"aria-label": "Cancel",
|
|
757
760
|
"aria-disabled": "false",
|
|
@@ -759,12 +762,12 @@ const mt = /* @__PURE__ */ $e({
|
|
|
759
762
|
fillMode: "flat",
|
|
760
763
|
onClick: this.onCancel,
|
|
761
764
|
icon: "x",
|
|
762
|
-
svgIcon:
|
|
765
|
+
svgIcon: je
|
|
763
766
|
}, null)])]), r("div", {
|
|
764
767
|
class: "k-actionsheet-titlebar-group k-actionsheet-filter"
|
|
765
|
-
}, [
|
|
768
|
+
}, [be.call(this)])], Se = b.call(this, Ie, I.call(this)), ye = () => {
|
|
766
769
|
const u = q.toLanguageString(ie, ne[ie]), h = q.toLanguageString(ae, ne[ae]);
|
|
767
|
-
return [r(
|
|
770
|
+
return [r(j, {
|
|
768
771
|
size: "large",
|
|
769
772
|
"aria-label": u,
|
|
770
773
|
"aria-disabled": "false",
|
|
@@ -772,7 +775,7 @@ const mt = /* @__PURE__ */ $e({
|
|
|
772
775
|
onClick: this.onCancel
|
|
773
776
|
}, E(u) ? u : {
|
|
774
777
|
default: () => [u]
|
|
775
|
-
}), r(
|
|
778
|
+
}), r(j, {
|
|
776
779
|
themeColor: "primary",
|
|
777
780
|
size: "large",
|
|
778
781
|
"aria-label": h,
|
|
@@ -782,15 +785,15 @@ const mt = /* @__PURE__ */ $e({
|
|
|
782
785
|
}, E(h) ? h : {
|
|
783
786
|
default: () => [h]
|
|
784
787
|
})];
|
|
785
|
-
},
|
|
786
|
-
const u = this.base.getTemplateDef.call(this, P, _), h = this.base.getTemplateDef.call(this, W, _), k = b.call(this,
|
|
788
|
+
}, ke = b.call(this, ye, I.call(this)), Ce = () => {
|
|
789
|
+
const u = this.base.getTemplateDef.call(this, P, _), h = this.base.getTemplateDef.call(this, W, _), k = b.call(this, ue, I.call(this));
|
|
787
790
|
return r("div", {
|
|
788
791
|
class: "k-list-container"
|
|
789
792
|
}, [u && r("div", {
|
|
790
793
|
class: "k-list-header"
|
|
791
794
|
}, [u]), r("div", {
|
|
792
795
|
class: R("k-list", {
|
|
793
|
-
[`k-list-${
|
|
796
|
+
[`k-list-${z[a] || a}`]: T ? !1 : a,
|
|
794
797
|
"k-list-lg": !!T,
|
|
795
798
|
"k-virtual-list": y.enabled
|
|
796
799
|
})
|
|
@@ -800,31 +803,31 @@ const mt = /* @__PURE__ */ $e({
|
|
|
800
803
|
}, null), U.call(this), h && r("div", {
|
|
801
804
|
class: "k-list-footer"
|
|
802
805
|
}, [h])])]);
|
|
803
|
-
},
|
|
804
|
-
return r(
|
|
805
|
-
expand:
|
|
806
|
+
}, xe = b.call(this, Ce, I.call(this)), $e = function() {
|
|
807
|
+
return r(Ge, {
|
|
808
|
+
expand: A,
|
|
806
809
|
animation: !0,
|
|
807
810
|
animationStyles: this.animationStyles,
|
|
808
811
|
className: this.classNameAdaptive,
|
|
809
812
|
contentClassName: "!k-overflow-hidden",
|
|
810
813
|
footerClassName: "k-actions k-actions-stretched",
|
|
811
|
-
header:
|
|
812
|
-
content:
|
|
813
|
-
footer:
|
|
814
|
+
header: Se,
|
|
815
|
+
content: xe,
|
|
816
|
+
footer: ke,
|
|
814
817
|
onClose: this.onCancel,
|
|
815
818
|
navigatableElements: ["input.k-input-inner", ".k-actionsheet-actions > button"]
|
|
816
819
|
}, null);
|
|
817
820
|
}, Y = [_(function() {
|
|
818
821
|
let u;
|
|
819
822
|
return r("span", {
|
|
820
|
-
ref:
|
|
823
|
+
ref: we(this, "kendoAnchor"),
|
|
821
824
|
class: R("k-multiselect", "k-input", {
|
|
822
|
-
[`k-input-${
|
|
823
|
-
[`k-rounded-${
|
|
825
|
+
[`k-input-${z[a] || a}`]: a,
|
|
826
|
+
[`k-rounded-${Ye[g] || g}`]: g,
|
|
824
827
|
[`k-input-${p}`]: p,
|
|
825
|
-
"k-focus":
|
|
828
|
+
"k-focus": ce && !i,
|
|
826
829
|
"k-disabled": i,
|
|
827
|
-
"k-invalid": !
|
|
830
|
+
"k-invalid": !fe,
|
|
828
831
|
"k-loading": c,
|
|
829
832
|
"k-required": this.required
|
|
830
833
|
}),
|
|
@@ -835,27 +838,27 @@ const mt = /* @__PURE__ */ $e({
|
|
|
835
838
|
dir: s,
|
|
836
839
|
onFocusin: this.handleFocus,
|
|
837
840
|
onClick: this.handleWrapperClick,
|
|
838
|
-
onMousedown:
|
|
839
|
-
}, [r(
|
|
841
|
+
onMousedown: _e
|
|
842
|
+
}, [r(Ae, {
|
|
840
843
|
removeTagIcon: $,
|
|
841
844
|
tagsRounded: m,
|
|
842
845
|
size: a,
|
|
843
846
|
fillMode: p,
|
|
844
|
-
tagRender:
|
|
847
|
+
tagRender: he,
|
|
845
848
|
onTagdelete: this.onTagDelete,
|
|
846
849
|
dataItems: v,
|
|
847
850
|
guid: this.base.guid,
|
|
848
851
|
focused: B ? v.find((h) => oe(h, B, l)) : void 0
|
|
849
|
-
}, E(u =
|
|
852
|
+
}, E(u = ge.call(this, N)) ? u : {
|
|
850
853
|
default: () => [u]
|
|
851
|
-
}), v.length > 0 &&
|
|
854
|
+
}), v.length > 0 && pe && r(Ee, {
|
|
852
855
|
onClearclick: this.clearButtonClick
|
|
853
856
|
}, null), r("span", {
|
|
854
857
|
class: c ? "k-input-loading-icon k-icon k-i-loading" : void 0
|
|
855
|
-
}, null), !T &&
|
|
858
|
+
}, null), !T && ve.call(this)]);
|
|
856
859
|
}.call(this), {
|
|
857
860
|
...this.$attrs
|
|
858
|
-
}), T &&
|
|
861
|
+
}), T && $e.call(this)];
|
|
859
862
|
return t ? r("span", {
|
|
860
863
|
class: this.spanClassNames,
|
|
861
864
|
dir: this.$props.dir
|
|
@@ -868,5 +871,5 @@ const mt = /* @__PURE__ */ $e({
|
|
|
868
871
|
}
|
|
869
872
|
});
|
|
870
873
|
export {
|
|
871
|
-
|
|
874
|
+
vt as MultiSelect
|
|
872
875
|
};
|
package/common/SearchBar.js
CHANGED
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),n=require("@progress/kendo-vue-common"),d=s.defineComponent({name:"search-bar",emits:{change:null,keydown:null,focus:null,blur:null},props:{value:String,id:String,placeholder:String,tabIndex:Number,size:{type:Number,default:void 0},suggestedText:String,focused:Boolean,disabled:Boolean,readOnly:Boolean,expanded:Boolean,owns:String,name:String,activedescendant:String,ariaDescribedBy:String,clearButton:Boolean,accessKey:String,ariaLabelledBy:String,ariaLabel:{type:String,default:void 0},onClearbuttonclick:Function,inputAttributes:Object},data(){return{prevValue:void 0,prevSuggestedText:void 0}},watch:{suggestedText:function(e,t){this.prevSuggestedText=t},value:function(e,t){this.prevValue=t}},updated(){const{value:e,suggestedText:t,focused:r}=this.$props;this.input||(this.input=this.$refs.input);const i=this.input,a=this.$data.prevValue!==e||t!==this.prevSuggestedText,o=a&&this.$data.prevValue&&this.$data.prevValue.startsWith(e)&&!(this.$data.prevSuggestedText&&t&&this.$data.prevSuggestedText.endsWith(t));r&&i&&n.canUseDOM&&document.activeElement!==i&&i.focus(),t&&a&&!o&&i&&i.setSelectionRange(e.length-t.length,e.length)},setup(){return{inputRef:s.ref(null)}},mounted(){this.input=n.getRef(this,"input")},methods:{onChange(e){this.$emit("change",e)},onBlur(e){this.$emit("blur",e)},onFocus(e){this.$emit("focus",e)},onKeyDown(e){this.$emit("keydown",e)},clearButtonClick(e){this.$emit("clearbuttonclick",e)}},render(){return s.createVNode("input",s.mergeProps({autocomplete:"off",id:this.$props.id,type:"text",key:"searchbar",placeholder:this.$props.placeholder,class:"k-input-inner",tabindex:this.$props.tabIndex,accesskey:this.$props.accessKey,role:"combobox",name:this.$props.name,value:this.$props.value,size:this.$props.size?this.$props.size:20,onInput:this.onChange,ref:n.setRef(this,"input"),onKeydown:this.onKeyDown,onFocusin:this.onFocus,onBlur:this.onBlur,"aria-disabled":this.$props.disabled||void 0,disabled:this.$props.disabled||void 0,readonly:this.$props.readOnly||void 0,"aria-autocomplete":this.$props.suggestedText?"both":"list","aria-haspopup":"listbox","aria-expanded":this.$props.expanded||!1,"aria-controls":this.$props.owns,"aria-activedescendant":this.$props.expanded?this.$props.activedescendant:void 0,"aria-describedby":this.$props.ariaDescribedBy,"aria-labelledby":this.$props.ariaLabelledBy,"aria-label":this.$props.ariaLabel},this.$props.inputAttributes),null)}});exports.SearchBar=d;
|
package/common/SearchBar.mjs
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as r, ref as o, createVNode as d } from "vue";
|
|
9
|
-
import { canUseDOM as
|
|
10
|
-
const
|
|
8
|
+
import { defineComponent as r, ref as o, createVNode as d, mergeProps as p } from "vue";
|
|
9
|
+
import { canUseDOM as u, getRef as l, setRef as h } from "@progress/kendo-vue-common";
|
|
10
|
+
const b = /* @__PURE__ */ r({
|
|
11
11
|
name: "search-bar",
|
|
12
12
|
emits: {
|
|
13
13
|
change: null,
|
|
@@ -40,7 +40,8 @@ const g = /* @__PURE__ */ r({
|
|
|
40
40
|
type: String,
|
|
41
41
|
default: void 0
|
|
42
42
|
},
|
|
43
|
-
onClearbuttonclick: Function
|
|
43
|
+
onClearbuttonclick: Function,
|
|
44
|
+
inputAttributes: Object
|
|
44
45
|
},
|
|
45
46
|
data() {
|
|
46
47
|
return {
|
|
@@ -60,11 +61,11 @@ const g = /* @__PURE__ */ r({
|
|
|
60
61
|
const {
|
|
61
62
|
value: e,
|
|
62
63
|
suggestedText: t,
|
|
63
|
-
focused:
|
|
64
|
+
focused: n
|
|
64
65
|
} = this.$props;
|
|
65
66
|
this.input || (this.input = this.$refs.input);
|
|
66
|
-
const i = this.input,
|
|
67
|
-
|
|
67
|
+
const i = this.input, s = this.$data.prevValue !== e || t !== this.prevSuggestedText, a = s && this.$data.prevValue && this.$data.prevValue.startsWith(e) && !(this.$data.prevSuggestedText && t && this.$data.prevSuggestedText.endsWith(t));
|
|
68
|
+
n && i && u && document.activeElement !== i && i.focus(), t && s && !a && i && i.setSelectionRange(e.length - t.length, e.length);
|
|
68
69
|
},
|
|
69
70
|
setup() {
|
|
70
71
|
return {
|
|
@@ -92,7 +93,7 @@ const g = /* @__PURE__ */ r({
|
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
render() {
|
|
95
|
-
return d("input", {
|
|
96
|
+
return d("input", p({
|
|
96
97
|
autocomplete: "off",
|
|
97
98
|
id: this.$props.id,
|
|
98
99
|
type: "text",
|
|
@@ -106,7 +107,7 @@ const g = /* @__PURE__ */ r({
|
|
|
106
107
|
value: this.$props.value,
|
|
107
108
|
size: this.$props.size ? this.$props.size : 20,
|
|
108
109
|
onInput: this.onChange,
|
|
109
|
-
ref:
|
|
110
|
+
ref: h(this, "input"),
|
|
110
111
|
onKeydown: this.onKeyDown,
|
|
111
112
|
onFocusin: this.onFocus,
|
|
112
113
|
onBlur: this.onBlur,
|
|
@@ -121,9 +122,9 @@ const g = /* @__PURE__ */ r({
|
|
|
121
122
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
122
123
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
123
124
|
"aria-label": this.$props.ariaLabel
|
|
124
|
-
}, null);
|
|
125
|
+
}, this.$props.inputAttributes), null);
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
128
|
export {
|
|
128
|
-
|
|
129
|
+
b as SearchBar
|
|
129
130
|
};
|