@progress/kendo-vue-scrollview 8.4.0-develop.2 → 8.4.0-develop.4
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/ScrollView.js +1 -1
- package/ScrollView.mjs +8 -7
- package/dist/cdn/js/kendo-vue-scrollview.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -4
package/ScrollView.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 t=require("vue"),i=require("@progress/kendo-vue-common"),v=require("./package-metadata.js"),l=require("@progress/kendo-svg-icons"),u=t.defineComponent({name:"KendoScrollView",props:{activeView:{type:Number,default:1},dataItems:{type:Array,default:function(){return[]}},arrows:{type:Boolean,default:!0},automaticViewChange:{type:Boolean,default:!0},automaticViewChangeInterval:{type:Number,default:5e3},content:[Object,String,Function],dir:String,endless:Boolean,pageable:{type:Boolean,default:!0},pagerOverlay:{type:String,default:"none"}},created(){i.validatePackage(v.packageMetadata),this.timeoutRef=null},mounted(){this.wrapElement=i.getRef(this,"wrapElement"),this.currentDir=this.$props.dir!==void 0?this.$props.dir:i.isRtl(this.$el)?"rtl":"ltr",this.runAutomaticChange()},updated(){const e=this.dataItems.length;this.wrapElement&&(this.wrapElement.style.setProperty("--kendo-scrollview-views",`${e}`),this.wrapElement.style.setProperty("--kendo-scrollview-current",`${this.active}`)),this.runAutomaticChange()},data(){return{active:this.activeView||1,currentDir:void 0}},computed:{scrollViewClasses(){return{"k-scrollview":!0,"k-scrollview-light":this.pagerOverlay==="light","k-scrollview-dark":this.pagerOverlay==="dark"}},displayLeftArrow(){let e;return this.isRtl?e=this.active<this.dataItems.length:e=this.active>1,(this.endless||e)&&this.dataItems.length>0},displayRightArrow(){let e;return this.isRtl?e=this.active>1:e=this.active<this.dataItems.length,(this.endless||e)&&this.dataItems.length>0},isRtl(){return this.currentDir==="rtl"}},render(){const{pageable:e,arrows:s,content:n}=this.$props,c=this.dataItems.length,o=this.dataItems.map(function(r,a){const h=i.templateRendering.call(this,r.content||n,i.getListeners.call(this)),d=i.getTemplate.call(this,{h:t.h,template:h,defaultRendering:null,additionalProps:{item:r,items:this.dataItems}});return t.createVNode("div",{class:"k-scrollview-view","aria-hidden":this.active!==a+1},[d])},this);return t.createVNode("div",{class:this.scrollViewClasses,tabindex:0,dir:this.currentDir,onKeydown:this.handleKeyDown},[t.createVNode("div",{class:"k-scrollview-wrap k-scrollview-animate",style:`--kendo-scrollview-views:${c}; --kendo-scrollview-current:${this.active};`,ref:i.setRef(this,"wrapElement")},[o]),t.createVNode("div",{class:"k-scrollview-elements"},[s&&[this.displayLeftArrow&&t.createVNode("span",{class:"k-scrollview-prev","aria-label":"previous",onClick:this.handlePrevClick},[t.createVNode(i.Icon,{name:this.isRtl?"chevron-right":"chevron-left",icon:this.isRtl?l.chevronRightIcon:l.chevronLeftIcon,size:"xxxlarge"},null)]),this.displayRightArrow&&t.createVNode("span",{class:"k-scrollview-next","aria-label":"next",onClick:this.handleNextClick},[t.createVNode(i.Icon,{name:this.isRtl?"chevron-left":"chevron-right",icon:this.isRtl?l.chevronLeftIcon:l.chevronRightIcon,size:"xxxlarge"},null)])],e&&t.createVNode("div",{class:"k-scrollview-nav-wrap"},[t.createVNode("ul",{class:"k-scrollview-nav"},[this.dataItems.map(function(r,a){return t.createVNode("li",{class:i.classNames("k-link",{"k-primary":this.active===a+1}),key:a+1,onClick:()=>this.setActive(a+1)},null)},this)])])])])},methods:{runAutomaticChange(){if(this.automaticViewChange){this.resetTimeout();const e=this,s=this.active;this.timeoutRef=setTimeout(function(){e.setActive(s===e.dataItems.length?e.endless?1:s:s+1)},this.automaticViewChangeInterval)}},resetTimeout(){this.timeoutRef&&clearTimeout(this.timeoutRef)},setActive(e){this.active=e},focusElement(){this.$el&&this.$el.focus()},prev(){this.endless?this.active>1?this.setActive(this.active-1):this.setActive(this.dataItems.length):this.active>1&&this.setActive(this.active-1)},next(){this.endless?this.active<this.dataItems.length?this.setActive(this.active+1):this.setActive(1):this.active<this.dataItems.length&&this.setActive(this.active+1)},handlePrevClick(){this.isRtl?this.next():this.prev()},handleNextClick(){this.isRtl?this.prev():this.next()},handleKeyDown(e){switch(e.keyCode){case i.Keys.left:e.preventDefault(),this.isRtl?this.next():this.prev();break;case i.Keys.right:e.preventDefault(),this.isRtl?this.prev():this.next();break}}}});exports.ScrollView=u;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("@progress/kendo-vue-common"),v=require("./package-metadata.js"),l=require("@progress/kendo-svg-icons"),u=t.defineComponent({name:"KendoScrollView",props:{activeView:{type:Number,default:1},dataItems:{type:Array,default:function(){return[]}},arrows:{type:Boolean,default:!0},automaticViewChange:{type:Boolean,default:!0},automaticViewChangeInterval:{type:Number,default:5e3},content:[Object,String,Function],dir:String,endless:Boolean,pageable:{type:Boolean,default:!0},pagerOverlay:{type:String,default:"none"}},created(){i.validatePackage(v.packageMetadata),this.timeoutRef=null},mounted(){this.wrapElement=i.getRef(this,"wrapElement"),this.currentDir=this.$props.dir!==void 0?this.$props.dir:i.isRtl(this.$el)?"rtl":"ltr",this.runAutomaticChange()},updated(){const e=this.dataItems.length;this.wrapElement&&(this.wrapElement.style.setProperty("--kendo-scrollview-views",`${e}`),this.wrapElement.style.setProperty("--kendo-scrollview-current",`${this.active}`)),this.runAutomaticChange()},data(){return{active:this.activeView||1,currentDir:void 0}},computed:{scrollViewClasses(){return{"k-scrollview":!0,"k-scrollview-light":this.pagerOverlay==="light","k-scrollview-dark":this.pagerOverlay==="dark"}},displayLeftArrow(){let e;return this.isRtl?e=this.active<this.dataItems.length:e=this.active>1,(this.endless||e)&&this.dataItems.length>0},displayRightArrow(){let e;return this.isRtl?e=this.active>1:e=this.active<this.dataItems.length,(this.endless||e)&&this.dataItems.length>0},isRtl(){return this.currentDir==="rtl"}},render(){const{pageable:e,arrows:s,content:n}=this.$props,c=this.dataItems.length,o=this.dataItems.map(function(r,a){const h=i.templateRendering.call(this,r.content||n,i.getListeners.call(this)),d=i.getTemplate.call(this,{h:t.h,template:h,defaultRendering:null,additionalProps:{item:r,items:this.dataItems}});return t.createVNode("div",{class:"k-scrollview-view","aria-hidden":this.active!==a+1},[d])},this);return t.createVNode("div",{class:this.scrollViewClasses,tabindex:0,dir:this.currentDir,onKeydown:this.handleKeyDown},[t.createVNode("div",{class:"k-scrollview-wrap k-scrollview-animate",style:`--kendo-scrollview-views:${c}; --kendo-scrollview-current:${this.active};`,ref:i.setRef(this,"wrapElement")},[o]),t.createVNode("div",{class:"k-scrollview-elements"},[s&&[this.displayLeftArrow&&t.createVNode("span",{class:"k-scrollview-prev","aria-label":"previous",onClick:this.handlePrevClick},[t.createVNode(i.Icon,{name:this.isRtl?"chevron-right":"chevron-left",icon:this.isRtl?l.chevronRightIcon:l.chevronLeftIcon,size:"xxxlarge"},null)]),this.displayRightArrow&&t.createVNode("span",{class:"k-scrollview-next","aria-label":"next",onClick:this.handleNextClick},[t.createVNode(i.Icon,{name:this.isRtl?"chevron-left":"chevron-right",icon:this.isRtl?l.chevronLeftIcon:l.chevronRightIcon,size:"xxxlarge"},null)])],e&&t.createVNode("div",{class:"k-scrollview-nav-wrap"},[t.createVNode("ul",{class:"k-scrollview-nav"},[this.dataItems.map(function(r,a){return t.createVNode("li",{role:"button",class:i.classNames("k-link",{"k-primary":this.active===a+1}),key:a+1,onClick:()=>this.setActive(a+1)},null)},this)])])])])},methods:{runAutomaticChange(){if(this.automaticViewChange){this.resetTimeout();const e=this,s=this.active;this.timeoutRef=setTimeout(function(){e.setActive(s===e.dataItems.length?e.endless?1:s:s+1)},this.automaticViewChangeInterval)}},resetTimeout(){this.timeoutRef&&clearTimeout(this.timeoutRef)},setActive(e){this.active=e},focusElement(){this.$el&&this.$el.focus()},prev(){this.endless?this.active>1?this.setActive(this.active-1):this.setActive(this.dataItems.length):this.active>1&&this.setActive(this.active-1)},next(){this.endless?this.active<this.dataItems.length?this.setActive(this.active+1):this.setActive(1):this.active<this.dataItems.length&&this.setActive(this.active+1)},handlePrevClick(){this.isRtl?this.next():this.prev()},handleNextClick(){this.isRtl?this.prev():this.next()},handleKeyDown(e){switch(e.keyCode){case i.Keys.left:e.preventDefault(),this.isRtl?this.next():this.prev();break;case i.Keys.right:e.preventDefault(),this.isRtl?this.prev():this.next();break}}}});exports.ScrollView=u;
|
package/ScrollView.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as m, h as p, createVNode as e } from "vue";
|
|
9
|
-
import { Keys as
|
|
9
|
+
import { Keys as a, templateRendering as f, getListeners as w, getTemplate as g, setRef as k, Icon as r, classNames as y, getRef as R, isRtl as I, validatePackage as C } from "@progress/kendo-vue-common";
|
|
10
10
|
import { packageMetadata as A } from "./package-metadata.mjs";
|
|
11
11
|
import { chevronRightIcon as n, chevronLeftIcon as h } from "@progress/kendo-svg-icons";
|
|
12
12
|
const D = /* @__PURE__ */ m({
|
|
@@ -87,13 +87,13 @@ const D = /* @__PURE__ */ m({
|
|
|
87
87
|
pageable: t,
|
|
88
88
|
arrows: i,
|
|
89
89
|
content: o
|
|
90
|
-
} = this.$props, c = this.dataItems.length, d = this.dataItems.map(function(
|
|
91
|
-
const v = f.call(this,
|
|
90
|
+
} = this.$props, c = this.dataItems.length, d = this.dataItems.map(function(l, s) {
|
|
91
|
+
const v = f.call(this, l.content || o, w.call(this)), u = g.call(this, {
|
|
92
92
|
h: p,
|
|
93
93
|
template: v,
|
|
94
94
|
defaultRendering: null,
|
|
95
95
|
additionalProps: {
|
|
96
|
-
item:
|
|
96
|
+
item: l,
|
|
97
97
|
items: this.dataItems
|
|
98
98
|
}
|
|
99
99
|
});
|
|
@@ -133,8 +133,9 @@ const D = /* @__PURE__ */ m({
|
|
|
133
133
|
class: "k-scrollview-nav-wrap"
|
|
134
134
|
}, [e("ul", {
|
|
135
135
|
class: "k-scrollview-nav"
|
|
136
|
-
}, [this.dataItems.map(function(
|
|
136
|
+
}, [this.dataItems.map(function(l, s) {
|
|
137
137
|
return e("li", {
|
|
138
|
+
role: "button",
|
|
138
139
|
class: y("k-link", {
|
|
139
140
|
"k-primary": this.active === s + 1
|
|
140
141
|
}),
|
|
@@ -176,10 +177,10 @@ const D = /* @__PURE__ */ m({
|
|
|
176
177
|
},
|
|
177
178
|
handleKeyDown(t) {
|
|
178
179
|
switch (t.keyCode) {
|
|
179
|
-
case
|
|
180
|
+
case a.left:
|
|
180
181
|
t.preventDefault(), this.isRtl ? this.next() : this.prev();
|
|
181
182
|
break;
|
|
182
|
-
case
|
|
183
|
+
case a.right:
|
|
183
184
|
t.preventDefault(), this.isRtl ? this.prev() : this.next();
|
|
184
185
|
break;
|
|
185
186
|
}
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueScrollview={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons)}(this,function(e,t,i,s){"use strict";const
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueScrollview={},e.Vue,e.KendoVueCommon,e.KendoSVGIcons)}(this,function(e,t,i,s){"use strict";const r={name:"@progress/kendo-vue-scrollview",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:0,version:"8.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/"},a=t.defineComponent({name:"KendoScrollView",props:{activeView:{type:Number,default:1},dataItems:{type:Array,default:function(){return[]}},arrows:{type:Boolean,default:!0},automaticViewChange:{type:Boolean,default:!0},automaticViewChangeInterval:{type:Number,default:5e3},content:[Object,String,Function],dir:String,endless:Boolean,pageable:{type:Boolean,default:!0},pagerOverlay:{type:String,default:"none"}},created(){i.validatePackage(r),this.timeoutRef=null},mounted(){this.wrapElement=i.getRef(this,"wrapElement"),this.currentDir=void 0!==this.$props.dir?this.$props.dir:i.isRtl(this.$el)?"rtl":"ltr",this.runAutomaticChange()},updated(){const e=this.dataItems.length;this.wrapElement&&(this.wrapElement.style.setProperty("--kendo-scrollview-views",`${e}`),this.wrapElement.style.setProperty("--kendo-scrollview-current",`${this.active}`)),this.runAutomaticChange()},data(){return{active:this.activeView||1,currentDir:void 0}},computed:{scrollViewClasses(){return{"k-scrollview":!0,"k-scrollview-light":"light"===this.pagerOverlay,"k-scrollview-dark":"dark"===this.pagerOverlay}},displayLeftArrow(){let e;return e=this.isRtl?this.active<this.dataItems.length:this.active>1,(this.endless||e)&&this.dataItems.length>0},displayRightArrow(){let e;return e=this.isRtl?this.active>1:this.active<this.dataItems.length,(this.endless||e)&&this.dataItems.length>0},isRtl(){return"rtl"===this.currentDir}},render(){const{pageable:e,arrows:r,content:a}=this.$props,l=this.dataItems.length,n=this.dataItems.map(function(e,s){const r=i.templateRendering.call(this,e.content||a,i.getListeners.call(this)),l=i.getTemplate.call(this,{h:t.h,template:r,defaultRendering:null,additionalProps:{item:e,items:this.dataItems}});return t.createVNode("div",{class:"k-scrollview-view","aria-hidden":this.active!==s+1},[l])},this);return t.createVNode("div",{class:this.scrollViewClasses,tabindex:0,dir:this.currentDir,onKeydown:this.handleKeyDown},[t.createVNode("div",{class:"k-scrollview-wrap k-scrollview-animate",style:`--kendo-scrollview-views:${l}; --kendo-scrollview-current:${this.active};`,ref:i.setRef(this,"wrapElement")},[n]),t.createVNode("div",{class:"k-scrollview-elements"},[r&&[this.displayLeftArrow&&t.createVNode("span",{class:"k-scrollview-prev","aria-label":"previous",onClick:this.handlePrevClick},[t.createVNode(i.Icon,{name:this.isRtl?"chevron-right":"chevron-left",icon:this.isRtl?s.chevronRightIcon:s.chevronLeftIcon,size:"xxxlarge"},null)]),this.displayRightArrow&&t.createVNode("span",{class:"k-scrollview-next","aria-label":"next",onClick:this.handleNextClick},[t.createVNode(i.Icon,{name:this.isRtl?"chevron-left":"chevron-right",icon:this.isRtl?s.chevronLeftIcon:s.chevronRightIcon,size:"xxxlarge"},null)])],e&&t.createVNode("div",{class:"k-scrollview-nav-wrap"},[t.createVNode("ul",{class:"k-scrollview-nav"},[this.dataItems.map(function(e,s){return t.createVNode("li",{role:"button",class:i.classNames("k-link",{"k-primary":this.active===s+1}),key:s+1,onClick:()=>this.setActive(s+1)},null)},this)])])])])},methods:{runAutomaticChange(){if(this.automaticViewChange){this.resetTimeout();const e=this,t=this.active;this.timeoutRef=setTimeout(function(){e.setActive(t===e.dataItems.length?e.endless?1:t:t+1)},this.automaticViewChangeInterval)}},resetTimeout(){this.timeoutRef&&clearTimeout(this.timeoutRef)},setActive(e){this.active=e},focusElement(){this.$el&&this.$el.focus()},prev(){this.endless?this.active>1?this.setActive(this.active-1):this.setActive(this.dataItems.length):this.active>1&&this.setActive(this.active-1)},next(){this.endless?this.active<this.dataItems.length?this.setActive(this.active+1):this.setActive(1):this.active<this.dataItems.length&&this.setActive(this.active+1)},handlePrevClick(){this.isRtl?this.next():this.prev()},handleNextClick(){this.isRtl?this.prev():this.next()},handleKeyDown(e){switch(e.keyCode){case i.Keys.left:e.preventDefault(),this.isRtl?this.next():this.prev();break;case i.Keys.right:e.preventDefault(),this.isRtl?this.prev():this.next()}}}});e.ScrollView=a});
|
package/package-metadata.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 e={name:"@progress/kendo-vue-scrollview",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-scrollview",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1779123401,version:"8.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "8.4.0-develop.
|
|
13
|
+
publishDate: 1779123401,
|
|
14
|
+
version: "8.4.0-develop.4",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-scrollview",
|
|
3
|
-
"version": "8.4.0-develop.
|
|
3
|
+
"version": "8.4.0-develop.4",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@progress/kendo-licensing": "^1.7.2",
|
|
28
|
-
"@progress/kendo-vue-common": "8.4.0-develop.
|
|
29
|
-
"@progress/kendo-svg-icons": "^4.
|
|
28
|
+
"@progress/kendo-vue-common": "8.4.0-develop.4",
|
|
29
|
+
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
30
30
|
"vue": "^3.0.2"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"package": {
|
|
47
47
|
"productName": "Kendo UI for Vue",
|
|
48
48
|
"productCode": "KENDOUIVUE",
|
|
49
|
-
"publishDate":
|
|
49
|
+
"publishDate": 1779123401,
|
|
50
50
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
@@ -56,5 +56,10 @@
|
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
58
58
|
"url": "git+https://github.com/telerik/kendo-vue.git"
|
|
59
|
+
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"@progress/kendo-svg-icons": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
59
64
|
}
|
|
60
65
|
}
|