@progress/kendo-vue-gauges 6.1.0-develop.6 → 6.1.0-develop.7
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/BaseGauge.js +1 -1
- package/BaseGauge.mjs +6 -6
- package/dist/cdn/js/kendo-vue-gauges.js +1 -1
- package/index.d.mts +29 -23
- package/index.d.ts +29 -23
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +4 -4
- package/theming/theme-service.js +1 -5
- package/theming/theme-service.mjs +7 -32
package/BaseGauge.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 o=require("vue"),g=require("@progress/kendo-vue-intl"),l=require("./theming/theme-service.js"),p=require("./store/store.js"),v=require("./store/reducer.js"),a=require("@progress/kendo-vue-common"),f=require("./package-metadata.js"),m=o.defineComponent({name:"KendoBaseGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},scale:Object,value:Number,pointer:{type:[Object,Array],default:function(){}},gaugeConstructor:[Object,Function],deriveOptionsFromParent:Function,transitions:{type:Boolean,default:void 0},getTarget:Function,onRender:Function},created(){a.validatePackage(f.packageMetadata),this.gaugeInstance=null,this.themeStore={},this._prevRenderAs=this.renderAs,this._prevDir=this.dir,this._prevScale=this.scale,this.themeStore=p.default(v.themeReducer)},mounted(){l.loadTheme(this.themeStore,this.instantiateCoreGauge.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)},watch:{dir:function(e,t){this._prevDir=t},renderAs:function(e,t){this._prevRenderAs=t},scale:function(e,t){this._prevScale=t}},updated(){const{dir:e,getTarget:t,gaugeConstructor:n,className:s,renderAs:u,scale:h,...r}=this.$props;if(this.gaugeInstance!==null){const c=this._prevDir!==e||this._prevRenderAs!==u||this._prevScale!==h,i=r;c||this.gaugeInstance.noTransitionsRedraw(),c||(u||"svg")!==(this._prevRenderAs||"svg")?this.refresh():Object.keys(r).indexOf("pointer")>-1&&r.pointer?Array.isArray(i.pointer)?this.refreshAllValues(i.pointer.map(d=>d.value)):this.refreshValue((i.pointer||{}).value):this.refreshValue(i.value),this._prevDir!==e&&this.gaugeInstance.setDirection(this.getDirection(e)),this.$emit("render",{sender:this})}},destroyed(){this.themeUnsubscriber(),this.gaugeInstance!==null&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)},setup:function(){return{kendoIntlService:o.inject("kendoIntlService",{})}},render(){const e=a.getDefaultSlots(this),t=Object.assign({},{position:"relative"});return this._intl=g.provideIntlService(this),o.createVNode("div",{style:t},[e])},methods:{instantiateCoreGauge(){const{dir:e,gaugeConstructor:t}=this.$props,n=this.getGaugeOptions();this.gaugeInstance=new t(this.$el,n,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:this._intl,sender:this})},refresh(){if(this.gaugeInstance!==null){const e=this.themeStore.getState(),t=this.getGaugeOptions();this.gaugeInstance.setOptions(t,e)}},refreshValue(e){this.gaugeInstance.value(e)},refreshAllValues(e){this.gaugeInstance.allValues(e)},getDirection(e){return(e!==void 0?e:a.canUseDOM&&window.getComputedStyle(this.$el).direction||"ltr")==="rtl"},getGaugeOptions(){const{renderAs:e,transitions:t,deriveOptionsFromParent:n}=this.$props;let s=Object.assign({renderAs:e,transitions:t});return n&&(s=n(s)),s},onWindowResize(){this.gaugeInstance!==null&&(this.gaugeInstance.resize(),this.$emit("render",{sender:this}))}}});exports.BaseGauge=m;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),g=require("@progress/kendo-vue-intl"),l=require("./theming/theme-service.js"),p=require("./store/store.js"),v=require("./store/reducer.js"),a=require("@progress/kendo-vue-common"),f=require("./package-metadata.js"),m=o.defineComponent({name:"KendoBaseGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},scale:Object,value:Number,pointer:{type:[Object,Array],default:function(){}},gaugeConstructor:[Object,Function],deriveOptionsFromParent:Function,transitions:{type:Boolean,default:void 0},getTarget:Function,onRender:Function},created(){a.validatePackage(f.packageMetadata),this.gaugeInstance=null,this.themeStore={},this._prevRenderAs=this.renderAs,this._prevDir=this.dir,this._prevScale=this.scale,this.themeStore=p.default(v.themeReducer)},mounted(){l.loadTheme(this.themeStore,this.instantiateCoreGauge.bind(this),this.$el),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)},watch:{dir:function(e,t){this._prevDir=t},renderAs:function(e,t){this._prevRenderAs=t},scale:function(e,t){this._prevScale=t}},updated(){const{dir:e,getTarget:t,gaugeConstructor:n,className:s,renderAs:u,scale:h,...r}=this.$props;if(this.gaugeInstance!==null){const c=this._prevDir!==e||this._prevRenderAs!==u||this._prevScale!==h,i=r;c||this.gaugeInstance.noTransitionsRedraw(),c||(u||"svg")!==(this._prevRenderAs||"svg")?this.refresh():Object.keys(r).indexOf("pointer")>-1&&r.pointer?Array.isArray(i.pointer)?this.refreshAllValues(i.pointer.map(d=>d.value)):this.refreshValue((i.pointer||{}).value):this.refreshValue(i.value),this._prevDir!==e&&this.gaugeInstance.setDirection(this.getDirection(e)),this.$emit("render",{sender:this})}},destroyed(){this.themeUnsubscriber(),this.gaugeInstance!==null&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)},setup:function(){return{kendoIntlService:o.inject("kendoIntlService",{})}},render(){const e=a.getDefaultSlots(this),t=Object.assign({},{position:"relative"});return this._intl=g.provideIntlService(this),o.createVNode("div",{style:t},[e])},methods:{instantiateCoreGauge(){const{dir:e,gaugeConstructor:t}=this.$props,n=this.getGaugeOptions();this.gaugeInstance=new t(this.$el,n,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:this._intl,sender:this})},refresh(){if(this.gaugeInstance!==null){const e=this.themeStore.getState(),t=this.getGaugeOptions();this.gaugeInstance.setOptions(t,e)}},refreshValue(e){this.gaugeInstance.value(e)},refreshAllValues(e){this.gaugeInstance.allValues(e)},getDirection(e){return(e!==void 0?e:a.canUseDOM&&window.getComputedStyle(this.$el).direction||"ltr")==="rtl"},getGaugeOptions(){const{renderAs:e,transitions:t,deriveOptionsFromParent:n}=this.$props;let s=Object.assign({renderAs:e,transitions:t});return n&&(s=n(s)),s},onWindowResize(){this.gaugeInstance!==null&&(this.gaugeInstance.resize(),this.$emit("render",{sender:this}))}}});exports.BaseGauge=m;
|
package/BaseGauge.mjs
CHANGED
|
@@ -43,7 +43,7 @@ const F = /* @__PURE__ */ u({
|
|
|
43
43
|
v(I), this.gaugeInstance = null, this.themeStore = {}, this._prevRenderAs = this.renderAs, this._prevDir = this.dir, this._prevScale = this.scale, this.themeStore = f(m);
|
|
44
44
|
},
|
|
45
45
|
mounted() {
|
|
46
|
-
p(this.themeStore, this.instantiateCoreGauge.bind(this)), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
|
|
46
|
+
p(this.themeStore, this.instantiateCoreGauge.bind(this), this.$el), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
|
|
47
47
|
},
|
|
48
48
|
watch: {
|
|
49
49
|
dir: function(e, t) {
|
|
@@ -61,14 +61,14 @@ const F = /* @__PURE__ */ u({
|
|
|
61
61
|
dir: e,
|
|
62
62
|
getTarget: t,
|
|
63
63
|
gaugeConstructor: i,
|
|
64
|
-
className:
|
|
64
|
+
className: s,
|
|
65
65
|
renderAs: o,
|
|
66
66
|
scale: h,
|
|
67
67
|
...r
|
|
68
68
|
} = this.$props;
|
|
69
69
|
if (this.gaugeInstance !== null) {
|
|
70
|
-
const a = this._prevDir !== e || this._prevRenderAs !== o || this._prevScale !== h,
|
|
71
|
-
a || this.gaugeInstance.noTransitionsRedraw(), a || (o || "svg") !== (this._prevRenderAs || "svg") ? this.refresh() : Object.keys(r).indexOf("pointer") > -1 && r.pointer ? Array.isArray(
|
|
70
|
+
const a = this._prevDir !== e || this._prevRenderAs !== o || this._prevScale !== h, n = r;
|
|
71
|
+
a || this.gaugeInstance.noTransitionsRedraw(), a || (o || "svg") !== (this._prevRenderAs || "svg") ? this.refresh() : Object.keys(r).indexOf("pointer") > -1 && r.pointer ? Array.isArray(n.pointer) ? this.refreshAllValues(n.pointer.map((c) => c.value)) : this.refreshValue((n.pointer || {}).value) : this.refreshValue(n.value), this._prevDir !== e && this.gaugeInstance.setDirection(this.getDirection(e)), this.$emit("render", {
|
|
72
72
|
sender: this
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -122,11 +122,11 @@ const F = /* @__PURE__ */ u({
|
|
|
122
122
|
transitions: t,
|
|
123
123
|
deriveOptionsFromParent: i
|
|
124
124
|
} = this.$props;
|
|
125
|
-
let
|
|
125
|
+
let s = Object.assign({
|
|
126
126
|
renderAs: e,
|
|
127
127
|
transitions: t
|
|
128
128
|
});
|
|
129
|
-
return i && (
|
|
129
|
+
return i && (s = i(s)), s;
|
|
130
130
|
},
|
|
131
131
|
onWindowResize() {
|
|
132
132
|
this.gaugeInstance !== null && (this.gaugeInstance.resize(), this.$emit("render", {
|
|
@@ -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-intl"),require("@progress/kendo-charts"),require("@progress/kendo-vue-common"),require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-intl","@progress/kendo-charts","@progress/kendo-vue-common","@progress/kendo-drawing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueGauges={},e.Vue,e.KendoVueIntl,e.KendoCharts,e.KendoVueCommon,e.KendoDrawing)}(this,(function(e,t,s,r,n,a){"use strict";class i{constructor(e){this.store=e}setStyle(e,t){this.store.dispatch({type:"set",payload:{field:e,value:t}})}setColors(){this.mapColor("pointer.color","gauge-pointer"),this.mapColor("scale.rangePlaceholderColor","gauge-track"),this.mapColor("scale.labels.color","normal-text-color"),this.mapColor("scale.minorTicks.color","normal-text-color"),this.mapColor("scale.majorTicks.color","normal-text-color"),this.mapColor("scale.line.color","normal-text-color")}mapColor(e,t){this.setStyle(e,this.queryStyle(t).backgroundColor)}queryStyle(e){const t=this.element;return window.getComputedStyle(null==t?void 0:t.querySelector(`.k-var--${e}`))}}const o=1e3/60,u=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return l.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},l={configurationItem:(e,t)=>Object.assign(e,{[t.gaugeKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[r,n]=t.gaugeCollectionIdxKey.split("_"),a=e[r].map(((e,r)=>parseInt(n,10)===r?(s=!0,t.payload):e));return!1===s&&a.splice(parseInt(n,10),0,t.payload),Object.assign(e,{[r]:a})},themeItem(e,t){let s={},r=Object.assign(s,e);const{field:n,value:a}=t.payload,i=n.split(".");let o=i.shift();for(;i.length>0;)s=s[o]=s[o]||{},o=i.shift();return s[o]=a,r}},c={name:"@progress/kendo-vue-gauges",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1639640368,version:"$VERSION",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"},d=t.defineComponent({name:"KendoBaseGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},scale:Object,value:Number,pointer:{type:[Object,Array],default:function(){}},gaugeConstructor:[Object,Function],deriveOptionsFromParent:Function,transitions:{type:Boolean,default:void 0},getTarget:Function,onRender:Function},created(){n.validatePackage(c),this.gaugeInstance=null,this.themeStore={},this._prevRenderAs=this.renderAs,this._prevDir=this.dir,this._prevScale=this.scale,this.themeStore=(e=>{let t,s,r=[];const a=a=>{t=e(t,a),n.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout((()=>r.forEach((e=>e()))),o))};return a({}),{getState:()=>t,dispatch:a,subscribe:e=>(r.push(e),()=>r=r.filter((t=>t!==e)))}})(u)},mounted(){((e,t)=>{const s=new i(e);if("undefined"==typeof document)return void e.dispatch({type:"push",payload:r.chartBaseTheme()});const n=s.element=document.createElement("div");n.style.display="none",n.innerHTML='\n <div class="k-var--gauge-pointer"></div>\n <div class="k-var--gauge-track"></div>\n <div class="k-var--normal-text-color"></div>\n',document.body.appendChild(n);try{e.dispatch({type:"push",payload:r.chartBaseTheme()}),s.setColors()}finally{document.body.removeChild(s.element),delete s.element,t()}})(this.themeStore,this.instantiateCoreGauge.bind(this)),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)},watch:{dir:function(e,t){this._prevDir=t},renderAs:function(e,t){this._prevRenderAs=t},scale:function(e,t){this._prevScale=t}},updated(){const{dir:e,getTarget:t,gaugeConstructor:s,className:r,renderAs:n,scale:a,...i}=this.$props;if(null!==this.gaugeInstance){const t=this._prevDir!==e||this._prevRenderAs!==n||this._prevScale!==a,s=i;t||this.gaugeInstance.noTransitionsRedraw(),t||(n||"svg")!==(this._prevRenderAs||"svg")?this.refresh():Object.keys(i).indexOf("pointer")>-1&&i.pointer?Array.isArray(s.pointer)?this.refreshAllValues(s.pointer.map((e=>e.value))):this.refreshValue((s.pointer||{}).value):this.refreshValue(s.value),this._prevDir!==e&&this.gaugeInstance.setDirection(this.getDirection(e)),this.$emit("render",{sender:this})}},destroyed(){this.themeUnsubscriber(),null!==this.gaugeInstance&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)},setup:function(){return{kendoIntlService:t.inject("kendoIntlService",{})}},render(){const e=n.getDefaultSlots(this),r=Object.assign({},{position:"relative"});return this._intl=s.provideIntlService(this),t.createVNode("div",{style:r},[e])},methods:{instantiateCoreGauge(){const{dir:e,gaugeConstructor:t}=this.$props,s=this.getGaugeOptions();this.gaugeInstance=new t(this.$el,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:this._intl,sender:this})},refresh(){if(null!==this.gaugeInstance){const e=this.themeStore.getState(),t=this.getGaugeOptions();this.gaugeInstance.setOptions(t,e)}},refreshValue(e){this.gaugeInstance.value(e)},refreshAllValues(e){this.gaugeInstance.allValues(e)},getDirection(e){return"rtl"===(void 0!==e?e:n.canUseDOM&&window.getComputedStyle(this.$el).direction||"ltr")},getGaugeOptions(){const{renderAs:e,transitions:t,deriveOptionsFromParent:s}=this.$props;let r=Object.assign({renderAs:e,transitions:t});return s&&(r=s(r)),r},onWindowResize(){null!==this.gaugeInstance&&(this.gaugeInstance.resize(),this.$emit("render",{sender:this}))}}}),g=t.defineComponent({name:"KendoArcCenter",props:{center:[String,Function,Object]},inject:{arcCenterValue:{default:null},centerStyles:{default:null}},created(){this.element=null},render(){const{center:e}=this.$props,s={zIndex:-1,...this.centerStyles};let r=null;return e?(r=n.getTemplate.call(this,{h:t.h,template:e,defaultRendering:"",additionalProps:{value:this.arcCenterValue.value,color:this.arcCenterValue.color}}),t.createVNode("div",{class:"k-arcgauge-label",style:s},[r])):r}}),h=t.defineComponent({name:"KendoArcGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},gaugeConstructor:[Object,Function],value:{type:Number,default:void 0},color:String,colors:{type:Array,default:void 0},opacity:{type:Number,default:void 0},scale:{type:Object,default:void 0},centerRender:[String,Function,Object],transitions:{type:Boolean,default:void 0}},created(){this.gaugeType=r.ArcGauge},data:()=>({centerStyles:{top:null,left:null},arcCenterValue:{value:"",color:""}}),provide(){return{centerStyles:this.$data.centerStyles,arcCenterValue:this.$data.arcCenterValue}},mounted(){this._baseGauge=this.baseGaugeRef,this.center=this.centerRef,this.positionCenter()},watch:{colors:function(e,t){this.prevColors=t}},updated(){this._baseGauge=this.baseGaugeRef,this.center=this.centerRef},render(){const e=n.getDefaultSlots(this),{centerRender:s,className:r,value:a,transitions:i,scale:o}=this.$props,u=s?n.templateRendering.call(this,s,n.getListeners.call(this)):void 0;return t.createVNode(d,{value:a,scale:o,transitions:i,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this.baseGaugeRef=e},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,class:n.classNames("k-gauge k-arcgauge",r),onRender:this.positionCenter},{default:()=>[e,t.createVNode(g,{center:u,ref:e=>{this.centerRef=e}},null)]})},methods:{positionCenter(){const e=this.center.$el.offsetWidth,t=this.center.$el.offsetHeight,s=this.gaugeInstance(),r=s.centerLabelPosition(e,t);this.centerStyles.left=r.left+"px",this.centerStyles.top=r.top+"px",this.arcCenterValue.value=s.value(),this.arcCenterValue.color=s.currentColor()},gaugeInstance(){return this._baseGauge?this._baseGauge.gaugeInstance:null},surface(){return this._baseGauge?this._baseGauge.surface:null},element(){return this._baseGauge?this._baseGauge.element:null},exportVisual(e){return null!==this.gaugeInstance&&this.$el?a.drawDOM(this.$el,e):Promise.resolve(new a.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{value:t,color:s,colors:r,opacity:n,scale:a}=this.$props;return Object.assign({},e,{value:t,color:s,colors:r,opacity:n,scale:a})}}}),p=t.defineComponent({name:"KendoCircularGauge",extends:h,created(){this.gaugeType=r.CircularGauge,this.arcCenterStyles={}}});const m=t.defineComponent({name:"KendoLinearGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},gaugeConstructor:[Object,Function],pointer:{type:[Object,Array],default:void 0},scale:{type:Object,default:void 0},transitions:{type:Boolean,default:void 0}},mounted(){this._baseGauge=this.baseGaugeRef},updated(){this._baseGauge=this.baseGaugeRef},render(){const e=n.getDefaultSlots(this);return t.createVNode(d,{transitions:this.$props.transitions,scale:this.$props.scale,pointer:this.$props.pointer,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this.baseGaugeRef=e},gaugeConstructor:r.LinearGauge,getTarget:this.getTarget,class:"k-gauge"},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]})},methods:{gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},surface(){return null!==this._baseGauge?this._baseGauge.surface:null},element(){return null!==this._baseGauge?this._baseGauge.element:null},exportVisual(e){return null!==this.gaugeInstance()?Promise.resolve(this.gaugeInstance().exportVisual(e)):Promise.resolve(new a.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{pointer:t,scale:s}=this.$props;return Object.assign({},e,{pointer:t,scale:s})}}});const f=t.defineComponent({name:"KendoRadialGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},gaugeConstructor:[Object,Function],pointer:{type:[Object,Array],default:void 0},scale:{type:Object,default:void 0},transitions:{type:Boolean,default:void 0}},mounted(){this._baseGauge=this.baseGaugeRef},updated(){this._baseGauge=this.baseGaugeRef},render(){const e=n.getDefaultSlots(this),{pointer:s,scale:a,transitions:i}=this.$props;return t.createVNode(d,{transitions:i,scale:a,pointer:s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this.baseGaugeRef=e},gaugeConstructor:r.RadialGauge,getTarget:this.getTarget,class:"k-gauge"},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]})},methods:{gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},surface(){return null!==this._baseGauge?this._baseGauge.surface:null},element(){return null!==this._baseGauge?this._baseGauge.element:null},exportVisual(e){return null!==this.gaugeInstance()?Promise.resolve(this.gaugeInstance().exportVisual(e)):Promise.resolve(new a.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{pointer:t,scale:s}=this.$props;return Object.assign({},e,{pointer:t,scale:s})}}});e.ArcGauge=h,e.CircularGauge=p,e.LinearGauge=m,e.RadialGauge=f}));
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-intl"),require("@progress/kendo-charts"),require("@progress/kendo-vue-common"),require("@progress/kendo-drawing")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-intl","@progress/kendo-charts","@progress/kendo-vue-common","@progress/kendo-drawing"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueGauges={},e.Vue,e.KendoVueIntl,e.KendoCharts,e.KendoVueCommon,e.KendoDrawing)}(this,(function(e,t,s,n,r,i){"use strict";const a=1e3/60,o=(e,t)=>{if(!t.type)return{};switch(t.type){case"set":return u.themeItem(e,t);case"push":return Object.assign(e,t.payload);default:return e}},u={configurationItem:(e,t)=>Object.assign(e,{[t.gaugeKey]:t.payload}),collectionConfigurationItem(e,t){let s=!1;const[n,r]=t.gaugeCollectionIdxKey.split("_"),i=e[n].map(((e,n)=>parseInt(r,10)===n?(s=!0,t.payload):e));return!1===s&&i.splice(parseInt(r,10),0,t.payload),Object.assign(e,{[n]:i})},themeItem(e,t){let s={},n=Object.assign(s,e);const{field:r,value:i}=t.payload,a=r.split(".");let o=a.shift();for(;a.length>0;)s=s[o]=s[o]||{},o=a.shift();return s[o]=i,n}},l={name:"@progress/kendo-vue-gauges",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1639640368,version:"$VERSION",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"},c=t.defineComponent({name:"KendoBaseGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},scale:Object,value:Number,pointer:{type:[Object,Array],default:function(){}},gaugeConstructor:[Object,Function],deriveOptionsFromParent:Function,transitions:{type:Boolean,default:void 0},getTarget:Function,onRender:Function},created(){r.validatePackage(l),this.gaugeInstance=null,this.themeStore={},this._prevRenderAs=this.renderAs,this._prevDir=this.dir,this._prevScale=this.scale,this.themeStore=(e=>{let t,s,n=[];const i=i=>{t=e(t,i),r.canUseDOM&&(window.clearTimeout(s),s=window.setTimeout((()=>n.forEach((e=>e()))),a))};return i({}),{getState:()=>t,dispatch:i,subscribe:e=>(n.push(e),()=>n=n.filter((t=>t!==e)))}})(o)},mounted(){((e,t,s)=>{let r={};if("undefined"!=typeof document)try{r=n.gaugeTheme(s)}finally{e.dispatch({type:"push",payload:r}),t()}else e.dispatch({type:"push",payload:r})})(this.themeStore,this.instantiateCoreGauge.bind(this),this.$el),this.themeUnsubscriber=this.themeStore.subscribe(this.refresh.bind(this)),window.addEventListener("resize",this.onWindowResize)},watch:{dir:function(e,t){this._prevDir=t},renderAs:function(e,t){this._prevRenderAs=t},scale:function(e,t){this._prevScale=t}},updated(){const{dir:e,getTarget:t,gaugeConstructor:s,className:n,renderAs:r,scale:i,...a}=this.$props;if(null!==this.gaugeInstance){const t=this._prevDir!==e||this._prevRenderAs!==r||this._prevScale!==i,s=a;t||this.gaugeInstance.noTransitionsRedraw(),t||(r||"svg")!==(this._prevRenderAs||"svg")?this.refresh():Object.keys(a).indexOf("pointer")>-1&&a.pointer?Array.isArray(s.pointer)?this.refreshAllValues(s.pointer.map((e=>e.value))):this.refreshValue((s.pointer||{}).value):this.refreshValue(s.value),this._prevDir!==e&&this.gaugeInstance.setDirection(this.getDirection(e)),this.$emit("render",{sender:this})}},destroyed(){this.themeUnsubscriber(),null!==this.gaugeInstance&&(this.gaugeInstance.destroy(),this.gaugeInstance=null),window.removeEventListener("resize",this.onWindowResize)},setup:function(){return{kendoIntlService:t.inject("kendoIntlService",{})}},render(){const e=r.getDefaultSlots(this),n=Object.assign({},{position:"relative"});return this._intl=s.provideIntlService(this),t.createVNode("div",{style:n},[e])},methods:{instantiateCoreGauge(){const{dir:e,gaugeConstructor:t}=this.$props,s=this.getGaugeOptions();this.gaugeInstance=new t(this.$el,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:this._intl,sender:this})},refresh(){if(null!==this.gaugeInstance){const e=this.themeStore.getState(),t=this.getGaugeOptions();this.gaugeInstance.setOptions(t,e)}},refreshValue(e){this.gaugeInstance.value(e)},refreshAllValues(e){this.gaugeInstance.allValues(e)},getDirection(e){return"rtl"===(void 0!==e?e:r.canUseDOM&&window.getComputedStyle(this.$el).direction||"ltr")},getGaugeOptions(){const{renderAs:e,transitions:t,deriveOptionsFromParent:s}=this.$props;let n=Object.assign({renderAs:e,transitions:t});return s&&(n=s(n)),n},onWindowResize(){null!==this.gaugeInstance&&(this.gaugeInstance.resize(),this.$emit("render",{sender:this}))}}}),g=t.defineComponent({name:"KendoArcCenter",props:{center:[String,Function,Object]},inject:{arcCenterValue:{default:null},centerStyles:{default:null}},created(){this.element=null},render(){const{center:e}=this.$props,s={zIndex:-1,...this.centerStyles};let n=null;return e?(n=r.getTemplate.call(this,{h:t.h,template:e,defaultRendering:"",additionalProps:{value:this.arcCenterValue.value,color:this.arcCenterValue.color}}),t.createVNode("div",{class:"k-arcgauge-label",style:s},[n])):n}}),d=t.defineComponent({name:"KendoArcGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},gaugeConstructor:[Object,Function],value:{type:Number,default:void 0},color:String,colors:{type:Array,default:void 0},opacity:{type:Number,default:void 0},scale:{type:Object,default:void 0},centerRender:[String,Function,Object],transitions:{type:Boolean,default:void 0}},created(){this.gaugeType=n.ArcGauge},data:()=>({centerStyles:{top:null,left:null},arcCenterValue:{value:"",color:""}}),provide(){return{centerStyles:this.$data.centerStyles,arcCenterValue:this.$data.arcCenterValue}},mounted(){this._baseGauge=this.baseGaugeRef,this.center=this.centerRef,this.positionCenter()},watch:{colors:function(e,t){this.prevColors=t}},updated(){this._baseGauge=this.baseGaugeRef,this.center=this.centerRef},render(){const e=r.getDefaultSlots(this),{centerRender:s,className:n,value:i,transitions:a,scale:o}=this.$props,u=s?r.templateRendering.call(this,s,r.getListeners.call(this)):void 0;return t.createVNode(c,{value:i,scale:o,transitions:a,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this.baseGaugeRef=e},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,class:r.classNames("k-gauge k-arcgauge",n),onRender:this.positionCenter},{default:()=>[e,t.createVNode(g,{center:u,ref:e=>{this.centerRef=e}},null)]})},methods:{positionCenter(){const e=this.center.$el.offsetWidth,t=this.center.$el.offsetHeight,s=this.gaugeInstance(),n=s.centerLabelPosition(e,t);this.centerStyles.left=n.left+"px",this.centerStyles.top=n.top+"px",this.arcCenterValue.value=s.value(),this.arcCenterValue.color=s.currentColor()},gaugeInstance(){return this._baseGauge?this._baseGauge.gaugeInstance:null},surface(){return this._baseGauge?this._baseGauge.surface:null},element(){return this._baseGauge?this._baseGauge.element:null},exportVisual(e){return null!==this.gaugeInstance&&this.$el?i.drawDOM(this.$el,e):Promise.resolve(new i.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{value:t,color:s,colors:n,opacity:r,scale:i}=this.$props;return Object.assign({},e,{value:t,color:s,colors:n,opacity:r,scale:i})}}}),h=t.defineComponent({name:"KendoCircularGauge",extends:d,created(){this.gaugeType=n.CircularGauge,this.arcCenterStyles={}}});const p=t.defineComponent({name:"KendoLinearGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},gaugeConstructor:[Object,Function],pointer:{type:[Object,Array],default:void 0},scale:{type:Object,default:void 0},transitions:{type:Boolean,default:void 0}},mounted(){this._baseGauge=this.baseGaugeRef},updated(){this._baseGauge=this.baseGaugeRef},render(){const e=r.getDefaultSlots(this);return t.createVNode(c,{transitions:this.$props.transitions,scale:this.$props.scale,pointer:this.$props.pointer,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this.baseGaugeRef=e},gaugeConstructor:n.LinearGauge,getTarget:this.getTarget,class:"k-gauge"},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]})},methods:{gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},surface(){return null!==this._baseGauge?this._baseGauge.surface:null},element(){return null!==this._baseGauge?this._baseGauge.element:null},exportVisual(e){return null!==this.gaugeInstance()?Promise.resolve(this.gaugeInstance().exportVisual(e)):Promise.resolve(new i.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{pointer:t,scale:s}=this.$props;return Object.assign({},e,{pointer:t,scale:s})}}});const f=t.defineComponent({name:"KendoRadialGauge",props:{dir:String,renderAs:{type:String,default:"svg",validator:function(e){return["svg","canvas"].includes(e)}},gaugeConstructor:[Object,Function],pointer:{type:[Object,Array],default:void 0},scale:{type:Object,default:void 0},transitions:{type:Boolean,default:void 0}},mounted(){this._baseGauge=this.baseGaugeRef},updated(){this._baseGauge=this.baseGaugeRef},render(){const e=r.getDefaultSlots(this),{pointer:s,scale:i,transitions:a}=this.$props;return t.createVNode(c,{transitions:a,scale:i,pointer:s,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:e=>{this.baseGaugeRef=e},gaugeConstructor:n.RadialGauge,getTarget:this.getTarget,class:"k-gauge"},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!t.isVNode(e)}(e)?e:{default:()=>[e]})},methods:{gaugeInstance(){return null!==this._baseGauge?this._baseGauge.gaugeInstance:null},surface(){return null!==this._baseGauge?this._baseGauge.surface:null},element(){return null!==this._baseGauge?this._baseGauge.element:null},exportVisual(e){return null!==this.gaugeInstance()?Promise.resolve(this.gaugeInstance().exportVisual(e)):Promise.resolve(new i.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{pointer:t,scale:s}=this.$props;return Object.assign({},e,{pointer:t,scale:s})}}});e.ArcGauge=d,e.CircularGauge=h,e.LinearGauge=p,e.RadialGauge=f}));
|
package/index.d.mts
CHANGED
|
@@ -5,13 +5,19 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
import { ArcScale as ArcScale_2 } from './types';
|
|
9
|
+
import { ColorRange as ColorRange_2 } from './types';
|
|
8
10
|
import { ComponentOptionsMixin } from 'vue';
|
|
9
11
|
import { ComponentProvideOptions } from 'vue';
|
|
10
12
|
import { DefineComponent } from 'vue';
|
|
11
13
|
import { ExtractPropTypes } from 'vue';
|
|
12
14
|
import { Group } from '@progress/kendo-drawing';
|
|
15
|
+
import { LinearPointer as LinearPointer_2 } from './types';
|
|
16
|
+
import { LinearScale as LinearScale_2 } from './types';
|
|
13
17
|
import { PropType } from 'vue';
|
|
14
18
|
import { PublicProps } from 'vue';
|
|
19
|
+
import { RadialPointer as RadialPointer_2 } from './types';
|
|
20
|
+
import { RadialScale as RadialScale_2 } from './types';
|
|
15
21
|
import { Surface } from '@progress/kendo-drawing';
|
|
16
22
|
|
|
17
23
|
/**
|
|
@@ -31,7 +37,7 @@ default: any;
|
|
|
31
37
|
};
|
|
32
38
|
color: PropType<string>;
|
|
33
39
|
colors: {
|
|
34
|
-
type: PropType<
|
|
40
|
+
type: PropType<ColorRange_2[]>;
|
|
35
41
|
default: any;
|
|
36
42
|
};
|
|
37
43
|
opacity: {
|
|
@@ -39,7 +45,7 @@ type: PropType<number>;
|
|
|
39
45
|
default: any;
|
|
40
46
|
};
|
|
41
47
|
scale: {
|
|
42
|
-
type: PropType<
|
|
48
|
+
type: PropType<ArcScale_2>;
|
|
43
49
|
default: any;
|
|
44
50
|
};
|
|
45
51
|
centerRender: PropType<any>;
|
|
@@ -78,7 +84,7 @@ default: any;
|
|
|
78
84
|
};
|
|
79
85
|
color: PropType<string>;
|
|
80
86
|
colors: {
|
|
81
|
-
type: PropType<
|
|
87
|
+
type: PropType<ColorRange_2[]>;
|
|
82
88
|
default: any;
|
|
83
89
|
};
|
|
84
90
|
opacity: {
|
|
@@ -86,7 +92,7 @@ type: PropType<number>;
|
|
|
86
92
|
default: any;
|
|
87
93
|
};
|
|
88
94
|
scale: {
|
|
89
|
-
type: PropType<
|
|
95
|
+
type: PropType<ArcScale_2>;
|
|
90
96
|
default: any;
|
|
91
97
|
};
|
|
92
98
|
centerRender: PropType<any>;
|
|
@@ -96,8 +102,8 @@ default: any;
|
|
|
96
102
|
};
|
|
97
103
|
}>> & Readonly<{}>, {
|
|
98
104
|
value: number;
|
|
99
|
-
scale:
|
|
100
|
-
colors:
|
|
105
|
+
scale: ArcScale_2;
|
|
106
|
+
colors: ColorRange_2[];
|
|
101
107
|
opacity: number;
|
|
102
108
|
renderAs: string;
|
|
103
109
|
transitions: boolean;
|
|
@@ -263,7 +269,7 @@ default: any;
|
|
|
263
269
|
};
|
|
264
270
|
color: PropType<string>;
|
|
265
271
|
colors: {
|
|
266
|
-
type: PropType<
|
|
272
|
+
type: PropType<ColorRange_2[]>;
|
|
267
273
|
default: any;
|
|
268
274
|
};
|
|
269
275
|
opacity: {
|
|
@@ -271,7 +277,7 @@ type: PropType<number>;
|
|
|
271
277
|
default: any;
|
|
272
278
|
};
|
|
273
279
|
scale: {
|
|
274
|
-
type: PropType<
|
|
280
|
+
type: PropType<ArcScale_2>;
|
|
275
281
|
default: any;
|
|
276
282
|
};
|
|
277
283
|
centerRender: PropType<any>;
|
|
@@ -310,7 +316,7 @@ default: any;
|
|
|
310
316
|
};
|
|
311
317
|
color: PropType<string>;
|
|
312
318
|
colors: {
|
|
313
|
-
type: PropType<
|
|
319
|
+
type: PropType<ColorRange_2[]>;
|
|
314
320
|
default: any;
|
|
315
321
|
};
|
|
316
322
|
opacity: {
|
|
@@ -318,7 +324,7 @@ type: PropType<number>;
|
|
|
318
324
|
default: any;
|
|
319
325
|
};
|
|
320
326
|
scale: {
|
|
321
|
-
type: PropType<
|
|
327
|
+
type: PropType<ArcScale_2>;
|
|
322
328
|
default: any;
|
|
323
329
|
};
|
|
324
330
|
centerRender: PropType<any>;
|
|
@@ -328,8 +334,8 @@ default: any;
|
|
|
328
334
|
};
|
|
329
335
|
}>> & Readonly<{}>, {
|
|
330
336
|
value: number;
|
|
331
|
-
scale:
|
|
332
|
-
colors:
|
|
337
|
+
scale: ArcScale_2;
|
|
338
|
+
colors: ColorRange_2[];
|
|
333
339
|
opacity: number;
|
|
334
340
|
renderAs: string;
|
|
335
341
|
transitions: boolean;
|
|
@@ -495,11 +501,11 @@ validator: (value: string) => any;
|
|
|
495
501
|
};
|
|
496
502
|
gaugeConstructor: PropType<object>;
|
|
497
503
|
pointer: {
|
|
498
|
-
type: PropType<
|
|
504
|
+
type: PropType<LinearPointer_2 | LinearPointer_2[]>;
|
|
499
505
|
default: any;
|
|
500
506
|
};
|
|
501
507
|
scale: {
|
|
502
|
-
type: PropType<
|
|
508
|
+
type: PropType<LinearScale_2>;
|
|
503
509
|
default: any;
|
|
504
510
|
};
|
|
505
511
|
transitions: {
|
|
@@ -522,11 +528,11 @@ validator: (value: string) => any;
|
|
|
522
528
|
};
|
|
523
529
|
gaugeConstructor: PropType<object>;
|
|
524
530
|
pointer: {
|
|
525
|
-
type: PropType<
|
|
531
|
+
type: PropType<LinearPointer_2 | LinearPointer_2[]>;
|
|
526
532
|
default: any;
|
|
527
533
|
};
|
|
528
534
|
scale: {
|
|
529
|
-
type: PropType<
|
|
535
|
+
type: PropType<LinearScale_2>;
|
|
530
536
|
default: any;
|
|
531
537
|
};
|
|
532
538
|
transitions: {
|
|
@@ -534,7 +540,7 @@ type: PropType<boolean>;
|
|
|
534
540
|
default: any;
|
|
535
541
|
};
|
|
536
542
|
}>> & Readonly<{}>, {
|
|
537
|
-
scale:
|
|
543
|
+
scale: LinearScale_2;
|
|
538
544
|
pointer: any;
|
|
539
545
|
renderAs: string;
|
|
540
546
|
transitions: boolean;
|
|
@@ -678,11 +684,11 @@ validator: (value: string) => any;
|
|
|
678
684
|
};
|
|
679
685
|
gaugeConstructor: PropType<object>;
|
|
680
686
|
pointer: {
|
|
681
|
-
type: PropType<
|
|
687
|
+
type: PropType<RadialPointer_2 | RadialPointer_2[]>;
|
|
682
688
|
default: any;
|
|
683
689
|
};
|
|
684
690
|
scale: {
|
|
685
|
-
type: PropType<
|
|
691
|
+
type: PropType<RadialScale_2>;
|
|
686
692
|
default: any;
|
|
687
693
|
};
|
|
688
694
|
transitions: {
|
|
@@ -705,11 +711,11 @@ validator: (value: string) => any;
|
|
|
705
711
|
};
|
|
706
712
|
gaugeConstructor: PropType<object>;
|
|
707
713
|
pointer: {
|
|
708
|
-
type: PropType<
|
|
714
|
+
type: PropType<RadialPointer_2 | RadialPointer_2[]>;
|
|
709
715
|
default: any;
|
|
710
716
|
};
|
|
711
717
|
scale: {
|
|
712
|
-
type: PropType<
|
|
718
|
+
type: PropType<RadialScale_2>;
|
|
713
719
|
default: any;
|
|
714
720
|
};
|
|
715
721
|
transitions: {
|
|
@@ -717,8 +723,8 @@ type: PropType<boolean>;
|
|
|
717
723
|
default: any;
|
|
718
724
|
};
|
|
719
725
|
}>> & Readonly<{}>, {
|
|
720
|
-
scale:
|
|
721
|
-
pointer:
|
|
726
|
+
scale: RadialScale_2;
|
|
727
|
+
pointer: RadialPointer_2 | RadialPointer_2[];
|
|
722
728
|
renderAs: string;
|
|
723
729
|
transitions: boolean;
|
|
724
730
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
package/index.d.ts
CHANGED
|
@@ -5,13 +5,19 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
import { ArcScale as ArcScale_2 } from './types';
|
|
9
|
+
import { ColorRange as ColorRange_2 } from './types';
|
|
8
10
|
import { ComponentOptionsMixin } from 'vue';
|
|
9
11
|
import { ComponentProvideOptions } from 'vue';
|
|
10
12
|
import { DefineComponent } from 'vue';
|
|
11
13
|
import { ExtractPropTypes } from 'vue';
|
|
12
14
|
import { Group } from '@progress/kendo-drawing';
|
|
15
|
+
import { LinearPointer as LinearPointer_2 } from './types';
|
|
16
|
+
import { LinearScale as LinearScale_2 } from './types';
|
|
13
17
|
import { PropType } from 'vue';
|
|
14
18
|
import { PublicProps } from 'vue';
|
|
19
|
+
import { RadialPointer as RadialPointer_2 } from './types';
|
|
20
|
+
import { RadialScale as RadialScale_2 } from './types';
|
|
15
21
|
import { Surface } from '@progress/kendo-drawing';
|
|
16
22
|
|
|
17
23
|
/**
|
|
@@ -31,7 +37,7 @@ default: any;
|
|
|
31
37
|
};
|
|
32
38
|
color: PropType<string>;
|
|
33
39
|
colors: {
|
|
34
|
-
type: PropType<
|
|
40
|
+
type: PropType<ColorRange_2[]>;
|
|
35
41
|
default: any;
|
|
36
42
|
};
|
|
37
43
|
opacity: {
|
|
@@ -39,7 +45,7 @@ type: PropType<number>;
|
|
|
39
45
|
default: any;
|
|
40
46
|
};
|
|
41
47
|
scale: {
|
|
42
|
-
type: PropType<
|
|
48
|
+
type: PropType<ArcScale_2>;
|
|
43
49
|
default: any;
|
|
44
50
|
};
|
|
45
51
|
centerRender: PropType<any>;
|
|
@@ -78,7 +84,7 @@ default: any;
|
|
|
78
84
|
};
|
|
79
85
|
color: PropType<string>;
|
|
80
86
|
colors: {
|
|
81
|
-
type: PropType<
|
|
87
|
+
type: PropType<ColorRange_2[]>;
|
|
82
88
|
default: any;
|
|
83
89
|
};
|
|
84
90
|
opacity: {
|
|
@@ -86,7 +92,7 @@ type: PropType<number>;
|
|
|
86
92
|
default: any;
|
|
87
93
|
};
|
|
88
94
|
scale: {
|
|
89
|
-
type: PropType<
|
|
95
|
+
type: PropType<ArcScale_2>;
|
|
90
96
|
default: any;
|
|
91
97
|
};
|
|
92
98
|
centerRender: PropType<any>;
|
|
@@ -96,8 +102,8 @@ default: any;
|
|
|
96
102
|
};
|
|
97
103
|
}>> & Readonly<{}>, {
|
|
98
104
|
value: number;
|
|
99
|
-
scale:
|
|
100
|
-
colors:
|
|
105
|
+
scale: ArcScale_2;
|
|
106
|
+
colors: ColorRange_2[];
|
|
101
107
|
opacity: number;
|
|
102
108
|
renderAs: string;
|
|
103
109
|
transitions: boolean;
|
|
@@ -263,7 +269,7 @@ default: any;
|
|
|
263
269
|
};
|
|
264
270
|
color: PropType<string>;
|
|
265
271
|
colors: {
|
|
266
|
-
type: PropType<
|
|
272
|
+
type: PropType<ColorRange_2[]>;
|
|
267
273
|
default: any;
|
|
268
274
|
};
|
|
269
275
|
opacity: {
|
|
@@ -271,7 +277,7 @@ type: PropType<number>;
|
|
|
271
277
|
default: any;
|
|
272
278
|
};
|
|
273
279
|
scale: {
|
|
274
|
-
type: PropType<
|
|
280
|
+
type: PropType<ArcScale_2>;
|
|
275
281
|
default: any;
|
|
276
282
|
};
|
|
277
283
|
centerRender: PropType<any>;
|
|
@@ -310,7 +316,7 @@ default: any;
|
|
|
310
316
|
};
|
|
311
317
|
color: PropType<string>;
|
|
312
318
|
colors: {
|
|
313
|
-
type: PropType<
|
|
319
|
+
type: PropType<ColorRange_2[]>;
|
|
314
320
|
default: any;
|
|
315
321
|
};
|
|
316
322
|
opacity: {
|
|
@@ -318,7 +324,7 @@ type: PropType<number>;
|
|
|
318
324
|
default: any;
|
|
319
325
|
};
|
|
320
326
|
scale: {
|
|
321
|
-
type: PropType<
|
|
327
|
+
type: PropType<ArcScale_2>;
|
|
322
328
|
default: any;
|
|
323
329
|
};
|
|
324
330
|
centerRender: PropType<any>;
|
|
@@ -328,8 +334,8 @@ default: any;
|
|
|
328
334
|
};
|
|
329
335
|
}>> & Readonly<{}>, {
|
|
330
336
|
value: number;
|
|
331
|
-
scale:
|
|
332
|
-
colors:
|
|
337
|
+
scale: ArcScale_2;
|
|
338
|
+
colors: ColorRange_2[];
|
|
333
339
|
opacity: number;
|
|
334
340
|
renderAs: string;
|
|
335
341
|
transitions: boolean;
|
|
@@ -495,11 +501,11 @@ validator: (value: string) => any;
|
|
|
495
501
|
};
|
|
496
502
|
gaugeConstructor: PropType<object>;
|
|
497
503
|
pointer: {
|
|
498
|
-
type: PropType<
|
|
504
|
+
type: PropType<LinearPointer_2 | LinearPointer_2[]>;
|
|
499
505
|
default: any;
|
|
500
506
|
};
|
|
501
507
|
scale: {
|
|
502
|
-
type: PropType<
|
|
508
|
+
type: PropType<LinearScale_2>;
|
|
503
509
|
default: any;
|
|
504
510
|
};
|
|
505
511
|
transitions: {
|
|
@@ -522,11 +528,11 @@ validator: (value: string) => any;
|
|
|
522
528
|
};
|
|
523
529
|
gaugeConstructor: PropType<object>;
|
|
524
530
|
pointer: {
|
|
525
|
-
type: PropType<
|
|
531
|
+
type: PropType<LinearPointer_2 | LinearPointer_2[]>;
|
|
526
532
|
default: any;
|
|
527
533
|
};
|
|
528
534
|
scale: {
|
|
529
|
-
type: PropType<
|
|
535
|
+
type: PropType<LinearScale_2>;
|
|
530
536
|
default: any;
|
|
531
537
|
};
|
|
532
538
|
transitions: {
|
|
@@ -534,7 +540,7 @@ type: PropType<boolean>;
|
|
|
534
540
|
default: any;
|
|
535
541
|
};
|
|
536
542
|
}>> & Readonly<{}>, {
|
|
537
|
-
scale:
|
|
543
|
+
scale: LinearScale_2;
|
|
538
544
|
pointer: any;
|
|
539
545
|
renderAs: string;
|
|
540
546
|
transitions: boolean;
|
|
@@ -678,11 +684,11 @@ validator: (value: string) => any;
|
|
|
678
684
|
};
|
|
679
685
|
gaugeConstructor: PropType<object>;
|
|
680
686
|
pointer: {
|
|
681
|
-
type: PropType<
|
|
687
|
+
type: PropType<RadialPointer_2 | RadialPointer_2[]>;
|
|
682
688
|
default: any;
|
|
683
689
|
};
|
|
684
690
|
scale: {
|
|
685
|
-
type: PropType<
|
|
691
|
+
type: PropType<RadialScale_2>;
|
|
686
692
|
default: any;
|
|
687
693
|
};
|
|
688
694
|
transitions: {
|
|
@@ -705,11 +711,11 @@ validator: (value: string) => any;
|
|
|
705
711
|
};
|
|
706
712
|
gaugeConstructor: PropType<object>;
|
|
707
713
|
pointer: {
|
|
708
|
-
type: PropType<
|
|
714
|
+
type: PropType<RadialPointer_2 | RadialPointer_2[]>;
|
|
709
715
|
default: any;
|
|
710
716
|
};
|
|
711
717
|
scale: {
|
|
712
|
-
type: PropType<
|
|
718
|
+
type: PropType<RadialScale_2>;
|
|
713
719
|
default: any;
|
|
714
720
|
};
|
|
715
721
|
transitions: {
|
|
@@ -717,8 +723,8 @@ type: PropType<boolean>;
|
|
|
717
723
|
default: any;
|
|
718
724
|
};
|
|
719
725
|
}>> & Readonly<{}>, {
|
|
720
|
-
scale:
|
|
721
|
-
pointer:
|
|
726
|
+
scale: RadialScale_2;
|
|
727
|
+
pointer: RadialPointer_2 | RadialPointer_2[];
|
|
722
728
|
renderAs: string;
|
|
723
729
|
transitions: boolean;
|
|
724
730
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
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-gauges",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-gauges",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1738834468,version:"6.1.0-develop.7",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.1.0-develop.
|
|
13
|
+
publishDate: 1738834468,
|
|
14
|
+
version: "6.1.0-develop.7",
|
|
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-gauges",
|
|
3
|
-
"version": "6.1.0-develop.
|
|
3
|
+
"version": "6.1.0-develop.7",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@progress/kendo-drawing": "^1.21.1",
|
|
22
22
|
"@progress/kendo-licensing": "^1.3.4",
|
|
23
|
-
"@progress/kendo-vue-common": "6.1.0-develop.
|
|
24
|
-
"@progress/kendo-vue-intl": "6.1.0-develop.
|
|
23
|
+
"@progress/kendo-vue-common": "6.1.0-develop.7",
|
|
24
|
+
"@progress/kendo-vue-intl": "6.1.0-develop.7",
|
|
25
25
|
"vue": "^3.0.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"package": {
|
|
44
44
|
"productName": "Kendo UI for Vue",
|
|
45
45
|
"productCode": "KENDOUIVUE",
|
|
46
|
-
"publishDate":
|
|
46
|
+
"publishDate": 1738834468,
|
|
47
47
|
"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"
|
|
48
48
|
}
|
|
49
49
|
},
|
package/theming/theme-service.js
CHANGED
|
@@ -5,8 +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
|
|
9
|
-
<div class="k-var--gauge-pointer"></div>
|
|
10
|
-
<div class="k-var--gauge-track"></div>
|
|
11
|
-
<div class="k-var--normal-text-color"></div>
|
|
12
|
-
`;class s{constructor(o){this.store=o}setStyle(o,e){this.store.dispatch({type:"set",payload:{field:o,value:e}})}setColors(){this.mapColor("pointer.color","gauge-pointer"),this.mapColor("scale.rangePlaceholderColor","gauge-track"),this.mapColor("scale.labels.color","normal-text-color"),this.mapColor("scale.minorTicks.color","normal-text-color"),this.mapColor("scale.majorTicks.color","normal-text-color"),this.mapColor("scale.line.color","normal-text-color")}mapColor(o,e){this.setStyle(o,this.queryStyle(e).backgroundColor)}queryStyle(o){const e=this.element;return window.getComputedStyle(e==null?void 0:e.querySelector(`.k-var--${o}`))}}const c=(t,o)=>{const e=new s(t);if(typeof document=="undefined"){t.dispatch({type:"push",payload:r.chartBaseTheme()});return}const l=e.element=document.createElement("div");l.style.display="none",l.innerHTML=a,document.body.appendChild(l);try{t.dispatch({type:"push",payload:r.chartBaseTheme()}),e.setColors()}finally{document.body.removeChild(e.element),delete e.element,o()}};exports.loadTheme=c;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-charts"),l=(t,a,d)=>{let e={};if(typeof document=="undefined"){t.dispatch({type:"push",payload:e});return}try{e=o.gaugeTheme(d)}finally{t.dispatch({type:"push",payload:e}),a()}};exports.loadTheme=l;
|
|
@@ -5,44 +5,19 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
<div class="k-var--gauge-track"></div>
|
|
12
|
-
<div class="k-var--normal-text-color"></div>
|
|
13
|
-
`;
|
|
14
|
-
class s {
|
|
15
|
-
constructor(o) {
|
|
16
|
-
this.store = o;
|
|
17
|
-
}
|
|
18
|
-
setStyle(o, e) {
|
|
19
|
-
this.store.dispatch({ type: "set", payload: { field: o, value: e } });
|
|
20
|
-
}
|
|
21
|
-
setColors() {
|
|
22
|
-
this.mapColor("pointer.color", "gauge-pointer"), this.mapColor("scale.rangePlaceholderColor", "gauge-track"), this.mapColor("scale.labels.color", "normal-text-color"), this.mapColor("scale.minorTicks.color", "normal-text-color"), this.mapColor("scale.majorTicks.color", "normal-text-color"), this.mapColor("scale.line.color", "normal-text-color");
|
|
23
|
-
}
|
|
24
|
-
mapColor(o, e) {
|
|
25
|
-
this.setStyle(o, this.queryStyle(e).backgroundColor);
|
|
26
|
-
}
|
|
27
|
-
queryStyle(o) {
|
|
28
|
-
const e = this.element;
|
|
29
|
-
return window.getComputedStyle(e == null ? void 0 : e.querySelector(`.k-var--${o}`));
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const i = (t, o) => {
|
|
33
|
-
const e = new s(t);
|
|
8
|
+
import { gaugeTheme as d } from "@progress/kendo-charts";
|
|
9
|
+
const h = (t, p, a) => {
|
|
10
|
+
let e = {};
|
|
34
11
|
if (typeof document == "undefined") {
|
|
35
|
-
t.dispatch({ type: "push", payload:
|
|
12
|
+
t.dispatch({ type: "push", payload: e });
|
|
36
13
|
return;
|
|
37
14
|
}
|
|
38
|
-
const l = e.element = document.createElement("div");
|
|
39
|
-
l.style.display = "none", l.innerHTML = a, document.body.appendChild(l);
|
|
40
15
|
try {
|
|
41
|
-
|
|
16
|
+
e = d(a);
|
|
42
17
|
} finally {
|
|
43
|
-
|
|
18
|
+
t.dispatch({ type: "push", payload: e }), p();
|
|
44
19
|
}
|
|
45
20
|
};
|
|
46
21
|
export {
|
|
47
|
-
|
|
22
|
+
h as loadTheme
|
|
48
23
|
};
|