@progress/kendo-vue-dropdowns 9.3.0-develop.2 → 9.3.0-develop.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,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 t=require("vue"),p=require("@progress/kendo-vue-common"),i=require("./utils.js"),b=require("@progress/kendo-vue-inputs"),S=require("./ListItemIcon.js"),V=t.defineComponent({name:"KendoListItem",inheritAttrs:!1,props:{id:String,index:Number,dataItem:[Object,String,Number],textField:String,focused:Boolean,selected:Boolean,disabled:Boolean,group:String,virtual:Boolean,render:Object,onItemClick:Function,actionsField:String,descriptionField:String,iconField:String,svgIconField:String,checkboxField:String},computed:{itemClass(){return{"k-list-item":!0,"k-selected":this.$props.selected,"k-focus":this.$props.focused}}},methods:{handleClick(s){this.$emit("itemClick",this.$props.index,s)}},render(){var u;const{selected:s,disabled:l,virtual:h,actionsField:c,descriptionField:d,iconField:o,svgIconField:r,checkboxField:a,dataItem:e,textField:m}=this.$props,g=()=>{if(!a)return null;const n=i.getItemValue(e,a)||!1;return t.createVNode("span",{class:"k-checkbox-wrap"},[t.createVNode(b.Checkbox,{checked:n,onChange:C=>{e.onCheckboxChange&&e.onCheckboxChange(e,C.value)}},null)])},k=()=>c?i.getItemValue(e,c):null,I=()=>{if(!d)return null;const n=i.getItemValue(e,d);return n?t.createVNode("span",{class:"k-list-item-description"},[n]):null},f=t.createVNode("li",{id:this.$props.id,role:"option","aria-selected":s,"aria-disabled":l?!0:void 0,class:p.classNames("k-list-item",{"k-selected":s,"k-focus":this.$props.focused,"k-disabled":l,[this.$attrs.class]:this.$attrs.class}),onClick:this.handleClick,style:h?{position:"relative"}:this.$attrs.style||{position:"unset"}},[g(),(r||o)&&t.createVNode(S.ListItemIcon,{icon:o?i.getItemValue(e,o):void 0,svgIcon:r?i.getItemValue(e,r):void 0},null),t.createVNode("span",{class:"k-list-item-text"},[((u=i.getItemValue(e,m))==null?void 0:u.toString())||""]),k(),I()]);return p.getTemplate.call(this,{h:t.h,template:this.$props.render,defaultRendering:f,additionalProps:{...this.$props,itemClass:this.itemClass},additionalListeners:{click:this.handleClick}})}});exports.ListItem=V;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),h=require("@progress/kendo-vue-common"),i=require("./utils.js"),p=require("@progress/kendo-vue-inputs"),x=require("./ListItemIcon.js"),V=t.defineComponent({name:"KendoListItem",inheritAttrs:!1,props:{id:String,index:Number,dataItem:[Object,String,Number],textField:String,focused:Boolean,selected:Boolean,disabled:Boolean,group:String,virtual:Boolean,render:Object,onItemClick:Function,actionsField:String,descriptionField:String,iconField:String,svgIconField:String,checkboxField:String,showSelectionCheckbox:Boolean},computed:{itemClass(){return{"k-list-item":!0,"k-selected":this.$props.selected,"k-focus":this.$props.focused}}},methods:{handleClick(n){this.$emit("itemClick",this.$props.index,n)}},render(){var u;const{selected:n,disabled:l,virtual:m,actionsField:c,descriptionField:d,iconField:o,svgIconField:r,checkboxField:a,showSelectionCheckbox:k,dataItem:e,textField:g}=this.$props,b=()=>{if(k)return t.createVNode(p.Checkbox,{checked:n,tabIndex:-1},null);if(!a)return null;const s=i.getItemValue(e,a)||!1;return t.createVNode("span",{class:"k-checkbox-wrap"},[t.createVNode(p.Checkbox,{checked:s,onChange:S=>{e.onCheckboxChange&&e.onCheckboxChange(e,S.value)}},null)])},C=()=>c?i.getItemValue(e,c):null,I=()=>{if(!d)return null;const s=i.getItemValue(e,d);return s?t.createVNode("span",{class:"k-list-item-description"},[s]):null},f=t.createVNode("li",{id:this.$props.id,role:"option","aria-selected":n,"aria-disabled":l?!0:void 0,class:h.classNames("k-list-item",{"k-selected":n,"k-focus":this.$props.focused,"k-disabled":l,[this.$attrs.class]:this.$attrs.class}),onClick:this.handleClick,style:m?{position:"relative"}:this.$attrs.style||{position:"unset"}},[b(),(r||o)&&t.createVNode(x.ListItemIcon,{icon:o?i.getItemValue(e,o):void 0,svgIcon:r?i.getItemValue(e,r):void 0},null),t.createVNode("span",{class:"k-list-item-text"},[((u=i.getItemValue(e,g))==null?void 0:u.toString())||""]),C(),I()]);return h.getTemplate.call(this,{h:t.h,template:this.$props.render,defaultRendering:f,additionalProps:{...this.$props,itemClass:this.itemClass},additionalListeners:{click:this.handleClick}})}});exports.ListItem=V;
@@ -5,12 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as b, createVNode as t, h as x } from "vue";
9
- import { classNames as F, getTemplate as S } from "@progress/kendo-vue-common";
8
+ import { defineComponent as S, createVNode as t, h as F } from "vue";
9
+ import { classNames as I, getTemplate as $ } from "@progress/kendo-vue-common";
10
10
  import { getItemValue as i } from "./utils.mjs";
11
- import { Checkbox as $ } from "@progress/kendo-vue-inputs";
12
- import { ListItemIcon as I } from "./ListItemIcon.mjs";
13
- const y = /* @__PURE__ */ b({
11
+ import { Checkbox as h } from "@progress/kendo-vue-inputs";
12
+ import { ListItemIcon as v } from "./ListItemIcon.mjs";
13
+ const y = /* @__PURE__ */ S({
14
14
  name: "KendoListItem",
15
15
  inheritAttrs: !1,
16
16
  props: {
@@ -29,7 +29,8 @@ const y = /* @__PURE__ */ b({
29
29
  descriptionField: String,
30
30
  iconField: String,
31
31
  svgIconField: String,
32
- checkboxField: String
32
+ checkboxField: String,
33
+ showSelectionCheckbox: Boolean
33
34
  },
34
35
  computed: {
35
36
  itemClass() {
@@ -41,14 +42,14 @@ const y = /* @__PURE__ */ b({
41
42
  }
42
43
  },
43
44
  methods: {
44
- handleClick(s) {
45
- this.$emit("itemClick", this.$props.index, s);
45
+ handleClick(n) {
46
+ this.$emit("itemClick", this.$props.index, n);
46
47
  }
47
48
  },
48
49
  render() {
49
50
  var p;
50
51
  const {
51
- selected: s,
52
+ selected: n,
52
53
  disabled: l,
53
54
  virtual: u,
54
55
  actionsField: c,
@@ -56,34 +57,40 @@ const y = /* @__PURE__ */ b({
56
57
  iconField: o,
57
58
  svgIconField: r,
58
59
  checkboxField: a,
60
+ showSelectionCheckbox: m,
59
61
  dataItem: e,
60
- textField: h
61
- } = this.$props, m = () => {
62
+ textField: k
63
+ } = this.$props, f = () => {
64
+ if (m)
65
+ return t(h, {
66
+ checked: n,
67
+ tabIndex: -1
68
+ }, null);
62
69
  if (!a)
63
70
  return null;
64
- const n = i(e, a) || !1;
71
+ const s = i(e, a) || !1;
65
72
  return t("span", {
66
73
  class: "k-checkbox-wrap"
67
- }, [t($, {
68
- checked: n,
69
- onChange: (C) => {
70
- e.onCheckboxChange && e.onCheckboxChange(e, C.value);
74
+ }, [t(h, {
75
+ checked: s,
76
+ onChange: (x) => {
77
+ e.onCheckboxChange && e.onCheckboxChange(e, x.value);
71
78
  }
72
79
  }, null)]);
73
- }, k = () => c ? i(e, c) : null, f = () => {
80
+ }, g = () => c ? i(e, c) : null, C = () => {
74
81
  if (!d)
75
82
  return null;
76
- const n = i(e, d);
77
- return n ? t("span", {
83
+ const s = i(e, d);
84
+ return s ? t("span", {
78
85
  class: "k-list-item-description"
79
- }, [n]) : null;
80
- }, g = t("li", {
86
+ }, [s]) : null;
87
+ }, b = t("li", {
81
88
  id: this.$props.id,
82
89
  role: "option",
83
- "aria-selected": s,
90
+ "aria-selected": n,
84
91
  "aria-disabled": l ? !0 : void 0,
85
- class: F("k-list-item", {
86
- "k-selected": s,
92
+ class: I("k-list-item", {
93
+ "k-selected": n,
87
94
  "k-focus": this.$props.focused,
88
95
  "k-disabled": l,
89
96
  [this.$attrs.class]: this.$attrs.class
@@ -94,16 +101,16 @@ const y = /* @__PURE__ */ b({
94
101
  } : this.$attrs.style || {
95
102
  position: "unset"
96
103
  }
97
- }, [m(), (r || o) && t(I, {
104
+ }, [f(), (r || o) && t(v, {
98
105
  icon: o ? i(e, o) : void 0,
99
106
  svgIcon: r ? i(e, r) : void 0
100
107
  }, null), t("span", {
101
108
  class: "k-list-item-text"
102
- }, [((p = i(e, h)) == null ? void 0 : p.toString()) || ""]), k(), f()]);
103
- return S.call(this, {
104
- h: x,
109
+ }, [((p = i(e, k)) == null ? void 0 : p.toString()) || ""]), g(), C()]);
110
+ return $.call(this, {
111
+ h: F,
105
112
  template: this.$props.render,
106
- defaultRendering: g,
113
+ defaultRendering: b,
107
114
  additionalProps: {
108
115
  ...this.$props,
109
116
  itemClass: this.itemClass
@@ -32,7 +32,7 @@ export default class VirtualScroll {
32
32
  ScrollChange: (Event: any) => void;
33
33
  private prevScrollPos;
34
34
  private listTranslate;
35
- private scrollSyncing;
35
+ scrollSyncing: boolean;
36
36
  constructor();
37
37
  get translate(): number;
38
38
  scrollerRef: (element: HTMLDivElement | null) => void;