@progress/kendo-vue-progressbars 6.4.1 → 6.4.2-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.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as z, createVNode as n } from "vue";
|
|
9
|
-
import {
|
|
9
|
+
import { getTabIndex as B, classNames as h, getDir as D, validatePackage as I } from "@progress/kendo-vue-common";
|
|
10
10
|
import { calculateRatio as j } from "../common/utils.mjs";
|
|
11
11
|
import { packageMetadata as w } from "../package-metadata.mjs";
|
|
12
12
|
const E = /* @__PURE__ */ z({
|
|
@@ -48,7 +48,7 @@ const E = /* @__PURE__ */ z({
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
created() {
|
|
51
|
-
|
|
51
|
+
I(w);
|
|
52
52
|
},
|
|
53
53
|
data() {
|
|
54
54
|
return {
|
|
@@ -105,7 +105,7 @@ const E = /* @__PURE__ */ z({
|
|
|
105
105
|
"k-disabled": a
|
|
106
106
|
}),
|
|
107
107
|
dir: this.currentDir,
|
|
108
|
-
tabindex:
|
|
108
|
+
tabindex: B(f, a),
|
|
109
109
|
role: "progressbar",
|
|
110
110
|
"aria-label": this.$props.ariaLabel,
|
|
111
111
|
"aria-valuemin": l,
|
|
@@ -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-animation"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-animation","@progress/kendo-vue-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueProgressbars={},e.Vue,e.KendoVueAnimation,e.KendoVueCommon)}(this,(function(e,t,r,s){"use strict";const a=(e,t,r)=>{const s=Math.abs((t-e)/100);return Math.abs((r-e)/s)},i=(e,t,r,s)=>{const a=Math.max(r,.01),i=100/a*100;e&&t&&(e.style.width=s?"100%":`${a}%`,t.style.width=s?"100%":`${i}%`,e.style.height=s?`${a}%`:"100%",t.style.height=s?`${i}%`:"100%")},o={name:"@progress/kendo-vue-progressbars",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1636730390,version:"6.4.
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-animation"),require("@progress/kendo-vue-common")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-animation","@progress/kendo-vue-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueProgressbars={},e.Vue,e.KendoVueAnimation,e.KendoVueCommon)}(this,(function(e,t,r,s){"use strict";const a=(e,t,r)=>{const s=Math.abs((t-e)/100);return Math.abs((r-e)/s)},i=(e,t,r,s)=>{const a=Math.max(r,.01),i=100/a*100;e&&t&&(e.style.width=s?"100%":`${a}%`,t.style.width=s?"100%":`${i}%`,e.style.height=s?`${a}%`:"100%",t.style.height=s?`${i}%`:"100%")},o={name:"@progress/kendo-vue-progressbars",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1636730390,version:"6.4.2-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},n=t.defineComponent({name:"KendoProgressBar",props:{animation:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:!1},reverse:{type:Boolean,default:!1},label:String,labelRender:[String,Object,Function],labelVisible:{type:Boolean,default:!0},labelPlacement:{type:String,default:void 0,validator:function(e){return["start","center","end"].includes(e)}},dir:{type:String,default:void 0},max:{type:Number,default:100},min:{type:Number,default:0},value:{type:Number,default:0},orientation:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}},tabIndex:Number,emptyStyle:Object,emptyClassName:String,progressStyle:Object,progressClassName:String,ariaLabel:String},created(){s.validatePackage(o),this.currentDir=this.$props.dir},mounted(){this._progressStatus=s.getRef(this,"progressStatus"),this._progressStatusWrap=s.getRef(this,"progressStatusWrap"),this.currentDir=void 0!==this.$props.dir?this.$props.dir:s.isRtl(this.$el)?"rtl":"ltr",this.animationFrame=r.animate({duration:this.animationDuration,onStart:this.handleStart,onUpdate:this.handleUpdate,onEnd:this.handleEnd})},unmounted(){r.cancelAnimation(this.animationFrame)},data:()=>({currentDir:void 0}),watch:{value:function(e,t){this.prevValue=t,this.animationFrame=r.animate({duration:this.animationDuration,onStart:this.handleStart,onUpdate:this.handleUpdate,onEnd:this.handleEnd})}},computed:{wrapperClass(){const{disabled:e,reverse:t,orientation:r,value:s}=this.$props,a="vertical"===r;return{"k-progressbar":!0,"k-progressbar-horizontal":!a,"k-progressbar-vertical":a,"k-progressbar-reverse":t,"k-progressbar-indeterminate":null===s,"k-disabled":e}},isVertical(){return"vertical"===this.orientation},animationDuration(){const{animation:e}=this.$props;return"boolean"!=typeof e&&void 0!==e?e.duration:e?400:0}},render(){const{disabled:e,labelVisible:r,labelPlacement:a,max:i,min:o,tabIndex:n,emptyStyle:l,emptyClassName:p,progressStyle:d,progressClassName:u}=this.$props,h=this.$props.value||0,c=null===this.$props.value,m=(e=>{const t=e.toString().split(".");return 1===t.length?`${t[0]}`:`${t[0]}.${t[1].substr(0,3)}`})(h),g={value:h},b=this.$props.labelRender?s.templateRendering.call(this,this.$props.labelRender,s.getListeners.call(this)):void 0,v=t.h("span",{class:"k-progress-status"},m),f=s.getTemplate.call(this,{h:t.h,template:b,defaultRendering:v,additionalProps:g}),y=r?this.$props.label?t.createVNode("span",{class:"k-progress-status"},[this.$props.label]):f:void 0,k=s.classNames("k-progress-status-wrap",{"k-progress-start":"start"===a,"k-progress-center":"center"===a,"k-progress-end":"end"===a||void 0===a});return t.createVNode("div",{class:this.wrapperClass,dir:this.currentDir,tabindex:s.getTabIndex(n,e),role:"progressbar","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":c?void 0:h,"aria-disabled":e,"aria-label":this.$props.ariaLabel},[t.createVNode("span",{class:k+(p?" "+p:""),style:l},[y]),t.createVNode("div",{class:"k-progressbar-value k-selected",style:d,ref:s.setRef(this,"progressStatus")},[t.createVNode("span",{class:k+(u?" "+u:""),ref:s.setRef(this,"progressStatusWrap")},[y])])])},methods:{focus(){this.$el&&this.$el.focus()},progressStatusElement(){return this._progressStatus},progressStatusWrapElement(){return this._progressStatusWrap},handleStart(){const e=a(this.min,this.max,this.prevValue);i(this._progressStatus,this._progressStatusWrap,e,this.isVertical)},handleUpdate(e){const t=a(this.min,this.max,this.prevValue+(this.value-this.prevValue)*e);i(this._progressStatus,this._progressStatusWrap,t,this.isVertical)},handleEnd(){const e=a(this.min,this.max,this.value);i(this._progressStatus,this._progressStatusWrap,e,this.isVertical)}}}),l=t.defineComponent({name:"KendoChunkProgressBar",props:{chunkCount:{type:Number,default:5},ariaLabel:String,disabled:Boolean,reverse:{type:Boolean,default:!1},max:{type:Number,default:100},min:{type:Number,default:0},value:{type:Number,default:0},tabIndex:Number,emptyStyle:Object,emptyClassName:String,progressStyle:Object,progressClassName:String,orientation:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}}},created(){s.validatePackage(o)},data:()=>({currentDir:void 0}),mounted(){this.currentDir=s.getDir(this.$el,this.$props.dir)},render(){const{chunkCount:e,disabled:r,orientation:a,min:i,max:o,reverse:n,tabIndex:l,emptyStyle:p,emptyClassName:d,progressStyle:u,progressClassName:h}=this.$props,c=this.$props.value,m=null===this.$props.value,g="vertical"===a;return t.createVNode("div",{class:s.classNames("k-progressbar","k-chunk-progressbar",{"k-progressbar-horizontal":!g,"k-progressbar-vertical":g,"k-progressbar-reverse":n,"k-progressbar-indeterminate":m,"k-disabled":r}),dir:this.currentDir,tabindex:s.getTabIndex(l,r),role:"progressbar","aria-label":this.$props.ariaLabel,"aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":m?void 0:c,"aria-disabled":r},[t.createVNode("ul",{class:"k-progressbar-chunks k-reset"},[function(e){let r=[];const a=100/e+"%",n=((e,t,r)=>Math.max((r-e)/(t-e),1e-5))(i,o,c),l=Math.floor(n*e),m=Array(e).fill(!1);for(let e=0;e<l;e++)m[e]=!0;for(let i=0;i<e;++i){const o=m[i],n=o?h:d,l={width:g?void 0:a,height:g?a:void 0,...o?u:p};r.push(t.createVNode("li",{key:i,class:s.classNames("k-progressbar-chunk",{"k-first":0===i,"k-last":i===e-1,"k-selected":o},n),style:l},null))}return r}.call(this,e)])])},methods:{focusElement(){this.$el&&this.$el.focus()}}});e.ChunkProgressBar=l,e.ProgressBar=n}));
|
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-progressbars",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-progressbars",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1750421566,version:"6.4.2-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};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: "6.4.
|
|
13
|
+
publishDate: 1750421566,
|
|
14
|
+
version: "6.4.2-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-progressbars",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.2-develop.3",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@progress/kendo-licensing": "^1.4.0",
|
|
22
|
-
"@progress/kendo-vue-common": "6.4.
|
|
23
|
-
"@progress/kendo-vue-animation": "6.4.
|
|
22
|
+
"@progress/kendo-vue-common": "6.4.2-develop.3",
|
|
23
|
+
"@progress/kendo-vue-animation": "6.4.2-develop.3",
|
|
24
24
|
"vue": "^3.0.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"package": {
|
|
41
41
|
"productName": "Kendo UI for Vue",
|
|
42
42
|
"productCode": "KENDOUIVUE",
|
|
43
|
-
"publishDate":
|
|
43
|
+
"publishDate": 1750421566,
|
|
44
44
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as P, h as m, createVNode as r } from "vue";
|
|
9
9
|
import { animate as g, cancelAnimation as x } from "@progress/kendo-vue-animation";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { templateRendering as R, getListeners as D, getTemplate as C, classNames as E, getTabIndex as I, setRef as b, getRef as f, isRtl as O, validatePackage as W } from "@progress/kendo-vue-common";
|
|
11
|
+
import { calculatePercentage as o, updateProgress as l, truncateNumber as A } from "../common/utils.mjs";
|
|
12
12
|
import { DEFAULT_ANIMATION_DURATION as B, NO_ANIMATION as U } from "../common/constants.mjs";
|
|
13
13
|
import { packageMetadata as w } from "../package-metadata.mjs";
|
|
14
14
|
const K = /* @__PURE__ */ P({
|
|
@@ -70,10 +70,10 @@ const K = /* @__PURE__ */ P({
|
|
|
70
70
|
ariaLabel: String
|
|
71
71
|
},
|
|
72
72
|
created() {
|
|
73
|
-
|
|
73
|
+
W(w), this.currentDir = this.$props.dir;
|
|
74
74
|
},
|
|
75
75
|
mounted() {
|
|
76
|
-
this._progressStatus =
|
|
76
|
+
this._progressStatus = f(this, "progressStatus"), this._progressStatusWrap = f(this, "progressStatusWrap"), this.currentDir = this.$props.dir !== void 0 ? this.$props.dir : O(this.$el) ? "rtl" : "ltr", this.animationFrame = g({
|
|
77
77
|
duration: this.animationDuration,
|
|
78
78
|
onStart: this.handleStart,
|
|
79
79
|
onUpdate: this.handleUpdate,
|
|
@@ -139,16 +139,16 @@ const K = /* @__PURE__ */ P({
|
|
|
139
139
|
progressClassName: u
|
|
140
140
|
} = this.$props, n = this.$props.value || 0, y = this.$props.value === null, N = A(n), k = {
|
|
141
141
|
value: n
|
|
142
|
-
}, $ = this.$props.labelRender ?
|
|
142
|
+
}, $ = this.$props.labelRender ? R.call(this, this.$props.labelRender, D.call(this)) : void 0, _ = m("span", {
|
|
143
143
|
class: "k-progress-status"
|
|
144
|
-
}, N), V =
|
|
144
|
+
}, N), V = C.call(this, {
|
|
145
145
|
h: m,
|
|
146
146
|
template: $,
|
|
147
147
|
defaultRendering: _,
|
|
148
148
|
additionalProps: k
|
|
149
149
|
}), h = t ? this.$props.label ? r("span", {
|
|
150
150
|
class: "k-progress-status"
|
|
151
|
-
}, [this.$props.label]) : V : void 0, c =
|
|
151
|
+
}, [this.$props.label]) : V : void 0, c = E("k-progress-status-wrap", {
|
|
152
152
|
"k-progress-start": s === "start",
|
|
153
153
|
"k-progress-center": s === "center",
|
|
154
154
|
"k-progress-end": s === "end" || s === void 0
|
|
@@ -156,7 +156,7 @@ const K = /* @__PURE__ */ P({
|
|
|
156
156
|
return r("div", {
|
|
157
157
|
class: this.wrapperClass,
|
|
158
158
|
dir: this.currentDir,
|
|
159
|
-
tabindex:
|
|
159
|
+
tabindex: I(p, e),
|
|
160
160
|
role: "progressbar",
|
|
161
161
|
"aria-valuemin": a,
|
|
162
162
|
"aria-valuemax": i,
|
|
@@ -169,10 +169,10 @@ const K = /* @__PURE__ */ P({
|
|
|
169
169
|
}, [h]), r("div", {
|
|
170
170
|
class: "k-progressbar-value k-selected",
|
|
171
171
|
style: v,
|
|
172
|
-
ref:
|
|
172
|
+
ref: b(this, "progressStatus")
|
|
173
173
|
}, [r("span", {
|
|
174
174
|
class: c + (u ? " " + u : ""),
|
|
175
|
-
ref:
|
|
175
|
+
ref: b(this, "progressStatusWrap")
|
|
176
176
|
}, [h])])]);
|
|
177
177
|
},
|
|
178
178
|
methods: {
|