@progress/kendo-vue-gauges 5.3.0-dev.202410141143 → 5.3.0-develop.1

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.
Files changed (271) hide show
  1. package/ArcCenter.js +8 -0
  2. package/ArcCenter.mjs +50 -0
  3. package/ArcGauge.js +8 -0
  4. package/ArcGauge.mjs +150 -0
  5. package/BaseGauge.js +8 -0
  6. package/BaseGauge.mjs +140 -0
  7. package/CircularGauge.js +8 -0
  8. package/CircularGauge.mjs +20 -0
  9. package/LinearGauge.js +8 -0
  10. package/LinearGauge.mjs +94 -0
  11. package/README.md +24 -53
  12. package/RadialGauge.js +8 -0
  13. package/RadialGauge.mjs +98 -0
  14. package/dist/cdn/js/kendo-vue-gauges.js +8 -1
  15. package/index.d.mts +891 -0
  16. package/index.d.ts +891 -0
  17. package/index.js +8 -0
  18. package/index.mjs +17 -0
  19. package/package-metadata.js +8 -0
  20. package/package-metadata.mjs +18 -0
  21. package/package.json +23 -49
  22. package/store/reducer.js +8 -0
  23. package/store/reducer.mjs +44 -0
  24. package/store/store.js +8 -0
  25. package/store/store.mjs +19 -0
  26. package/theming/theme-service.js +12 -0
  27. package/theming/theme-service.mjs +48 -0
  28. package/dist/es/ArcCenter.d.ts +0 -53
  29. package/dist/es/ArcCenter.js +0 -76
  30. package/dist/es/ArcGauge.d.ts +0 -48
  31. package/dist/es/ArcGauge.js +0 -211
  32. package/dist/es/ArcGaugeProps.d.ts +0 -33
  33. package/dist/es/ArcGaugeProps.js +0 -1
  34. package/dist/es/BaseGauge.d.ts +0 -47
  35. package/dist/es/BaseGauge.js +0 -213
  36. package/dist/es/BaseGaugeProps.d.ts +0 -44
  37. package/dist/es/BaseGaugeProps.js +0 -2
  38. package/dist/es/CircularGauge.d.ts +0 -43
  39. package/dist/es/CircularGauge.js +0 -34
  40. package/dist/es/CircularGaugeProps.d.ts +0 -17
  41. package/dist/es/CircularGaugeProps.js +0 -1
  42. package/dist/es/LinearGauge.d.ts +0 -43
  43. package/dist/es/LinearGauge.js +0 -125
  44. package/dist/es/LinearGaugeProps.d.ts +0 -15
  45. package/dist/es/LinearGaugeProps.js +0 -1
  46. package/dist/es/RadialGauge.d.ts +0 -43
  47. package/dist/es/RadialGauge.js +0 -129
  48. package/dist/es/RadialGaugeProps.d.ts +0 -15
  49. package/dist/es/RadialGaugeProps.js +0 -1
  50. package/dist/es/additionalTypes.ts +0 -21
  51. package/dist/es/main.d.ts +0 -10
  52. package/dist/es/main.js +0 -6
  53. package/dist/es/package-metadata.d.ts +0 -5
  54. package/dist/es/package-metadata.js +0 -11
  55. package/dist/es/store/reducer.d.ts +0 -14
  56. package/dist/es/store/reducer.js +0 -102
  57. package/dist/es/store/store.d.ts +0 -26
  58. package/dist/es/store/store.js +0 -28
  59. package/dist/es/theming/theme-service.d.ts +0 -6
  60. package/dist/es/theming/theme-service.js +0 -53
  61. package/dist/es/types/arc-scale.interface.d.ts +0 -28
  62. package/dist/es/types/arc-scale.interface.js +0 -2
  63. package/dist/es/types/border.interface.d.ts +0 -18
  64. package/dist/es/types/border.interface.js +0 -1
  65. package/dist/es/types/cap.interface.d.ts +0 -13
  66. package/dist/es/types/cap.interface.js +0 -1
  67. package/dist/es/types/circular-scale.interface.d.ts +0 -10
  68. package/dist/es/types/circular-scale.interface.js +0 -1
  69. package/dist/es/types/color-range.interface.d.ts +0 -21
  70. package/dist/es/types/color-range.interface.js +0 -1
  71. package/dist/es/types/dash-type.interface.d.ts +0 -4
  72. package/dist/es/types/dash-type.interface.js +0 -1
  73. package/dist/es/types/gauge-area.interface.d.ts +0 -27
  74. package/dist/es/types/gauge-area.interface.js +0 -1
  75. package/dist/es/types/labels.interface.d.ts +0 -47
  76. package/dist/es/types/labels.interface.js +0 -2
  77. package/dist/es/types/line-cap.d.ts +0 -4
  78. package/dist/es/types/line-cap.js +0 -1
  79. package/dist/es/types/line.interface.d.ts +0 -22
  80. package/dist/es/types/line.interface.js +0 -1
  81. package/dist/es/types/linear-pointer-shape.d.ts +0 -4
  82. package/dist/es/types/linear-pointer-shape.js +0 -1
  83. package/dist/es/types/linear-pointer.interface.d.ts +0 -36
  84. package/dist/es/types/linear-pointer.interface.js +0 -1
  85. package/dist/es/types/linear-scale.interface.d.ts +0 -26
  86. package/dist/es/types/linear-scale.interface.js +0 -2
  87. package/dist/es/types/margin.interface.d.ts +0 -21
  88. package/dist/es/types/margin.interface.js +0 -1
  89. package/dist/es/types/padding.interface.d.ts +0 -21
  90. package/dist/es/types/padding.interface.js +0 -1
  91. package/dist/es/types/radial-label-position.d.ts +0 -4
  92. package/dist/es/types/radial-label-position.js +0 -1
  93. package/dist/es/types/radial-labels.interface.d.ts +0 -8
  94. package/dist/es/types/radial-labels.interface.js +0 -1
  95. package/dist/es/types/radial-pointer.interface.d.ts +0 -22
  96. package/dist/es/types/radial-pointer.interface.js +0 -2
  97. package/dist/es/types/radial-scale.interface.d.ts +0 -28
  98. package/dist/es/types/radial-scale.interface.js +0 -2
  99. package/dist/es/types/range.interface.d.ts +0 -21
  100. package/dist/es/types/range.interface.js +0 -1
  101. package/dist/es/types/scale.interface.d.ts +0 -47
  102. package/dist/es/types/scale.interface.js +0 -1
  103. package/dist/es/types/ticks.interface.d.ts +0 -21
  104. package/dist/es/types/ticks.interface.js +0 -2
  105. package/dist/es/types.d.ts +0 -21
  106. package/dist/es/types.js +0 -1
  107. package/dist/es/utils/common.d.ts +0 -4
  108. package/dist/es/utils/common.js +0 -39
  109. package/dist/esm/ArcCenter.d.ts +0 -53
  110. package/dist/esm/ArcCenter.js +0 -76
  111. package/dist/esm/ArcGauge.d.ts +0 -48
  112. package/dist/esm/ArcGauge.js +0 -211
  113. package/dist/esm/ArcGaugeProps.d.ts +0 -33
  114. package/dist/esm/ArcGaugeProps.js +0 -1
  115. package/dist/esm/BaseGauge.d.ts +0 -47
  116. package/dist/esm/BaseGauge.js +0 -213
  117. package/dist/esm/BaseGaugeProps.d.ts +0 -44
  118. package/dist/esm/BaseGaugeProps.js +0 -2
  119. package/dist/esm/CircularGauge.d.ts +0 -43
  120. package/dist/esm/CircularGauge.js +0 -34
  121. package/dist/esm/CircularGaugeProps.d.ts +0 -17
  122. package/dist/esm/CircularGaugeProps.js +0 -1
  123. package/dist/esm/LinearGauge.d.ts +0 -43
  124. package/dist/esm/LinearGauge.js +0 -125
  125. package/dist/esm/LinearGaugeProps.d.ts +0 -15
  126. package/dist/esm/LinearGaugeProps.js +0 -1
  127. package/dist/esm/RadialGauge.d.ts +0 -43
  128. package/dist/esm/RadialGauge.js +0 -129
  129. package/dist/esm/RadialGaugeProps.d.ts +0 -15
  130. package/dist/esm/RadialGaugeProps.js +0 -1
  131. package/dist/esm/additionalTypes.ts +0 -21
  132. package/dist/esm/main.d.ts +0 -10
  133. package/dist/esm/main.js +0 -6
  134. package/dist/esm/package-metadata.d.ts +0 -5
  135. package/dist/esm/package-metadata.js +0 -11
  136. package/dist/esm/package.json +0 -3
  137. package/dist/esm/store/reducer.d.ts +0 -14
  138. package/dist/esm/store/reducer.js +0 -102
  139. package/dist/esm/store/store.d.ts +0 -26
  140. package/dist/esm/store/store.js +0 -28
  141. package/dist/esm/theming/theme-service.d.ts +0 -6
  142. package/dist/esm/theming/theme-service.js +0 -53
  143. package/dist/esm/types/arc-scale.interface.d.ts +0 -28
  144. package/dist/esm/types/arc-scale.interface.js +0 -2
  145. package/dist/esm/types/border.interface.d.ts +0 -18
  146. package/dist/esm/types/border.interface.js +0 -1
  147. package/dist/esm/types/cap.interface.d.ts +0 -13
  148. package/dist/esm/types/cap.interface.js +0 -1
  149. package/dist/esm/types/circular-scale.interface.d.ts +0 -10
  150. package/dist/esm/types/circular-scale.interface.js +0 -1
  151. package/dist/esm/types/color-range.interface.d.ts +0 -21
  152. package/dist/esm/types/color-range.interface.js +0 -1
  153. package/dist/esm/types/dash-type.interface.d.ts +0 -4
  154. package/dist/esm/types/dash-type.interface.js +0 -1
  155. package/dist/esm/types/gauge-area.interface.d.ts +0 -27
  156. package/dist/esm/types/gauge-area.interface.js +0 -1
  157. package/dist/esm/types/labels.interface.d.ts +0 -47
  158. package/dist/esm/types/labels.interface.js +0 -2
  159. package/dist/esm/types/line-cap.d.ts +0 -4
  160. package/dist/esm/types/line-cap.js +0 -1
  161. package/dist/esm/types/line.interface.d.ts +0 -22
  162. package/dist/esm/types/line.interface.js +0 -1
  163. package/dist/esm/types/linear-pointer-shape.d.ts +0 -4
  164. package/dist/esm/types/linear-pointer-shape.js +0 -1
  165. package/dist/esm/types/linear-pointer.interface.d.ts +0 -36
  166. package/dist/esm/types/linear-pointer.interface.js +0 -1
  167. package/dist/esm/types/linear-scale.interface.d.ts +0 -26
  168. package/dist/esm/types/linear-scale.interface.js +0 -2
  169. package/dist/esm/types/margin.interface.d.ts +0 -21
  170. package/dist/esm/types/margin.interface.js +0 -1
  171. package/dist/esm/types/padding.interface.d.ts +0 -21
  172. package/dist/esm/types/padding.interface.js +0 -1
  173. package/dist/esm/types/radial-label-position.d.ts +0 -4
  174. package/dist/esm/types/radial-label-position.js +0 -1
  175. package/dist/esm/types/radial-labels.interface.d.ts +0 -8
  176. package/dist/esm/types/radial-labels.interface.js +0 -1
  177. package/dist/esm/types/radial-pointer.interface.d.ts +0 -22
  178. package/dist/esm/types/radial-pointer.interface.js +0 -2
  179. package/dist/esm/types/radial-scale.interface.d.ts +0 -28
  180. package/dist/esm/types/radial-scale.interface.js +0 -2
  181. package/dist/esm/types/range.interface.d.ts +0 -21
  182. package/dist/esm/types/range.interface.js +0 -1
  183. package/dist/esm/types/scale.interface.d.ts +0 -47
  184. package/dist/esm/types/scale.interface.js +0 -1
  185. package/dist/esm/types/ticks.interface.d.ts +0 -21
  186. package/dist/esm/types/ticks.interface.js +0 -2
  187. package/dist/esm/types.d.ts +0 -21
  188. package/dist/esm/types.js +0 -1
  189. package/dist/esm/utils/common.d.ts +0 -4
  190. package/dist/esm/utils/common.js +0 -39
  191. package/dist/npm/ArcCenter.d.ts +0 -53
  192. package/dist/npm/ArcCenter.js +0 -83
  193. package/dist/npm/ArcGauge.d.ts +0 -48
  194. package/dist/npm/ArcGauge.js +0 -218
  195. package/dist/npm/ArcGaugeProps.d.ts +0 -33
  196. package/dist/npm/ArcGaugeProps.js +0 -5
  197. package/dist/npm/BaseGauge.d.ts +0 -47
  198. package/dist/npm/BaseGauge.js +0 -220
  199. package/dist/npm/BaseGaugeProps.d.ts +0 -44
  200. package/dist/npm/BaseGaugeProps.js +0 -6
  201. package/dist/npm/CircularGauge.d.ts +0 -43
  202. package/dist/npm/CircularGauge.js +0 -41
  203. package/dist/npm/CircularGaugeProps.d.ts +0 -17
  204. package/dist/npm/CircularGaugeProps.js +0 -5
  205. package/dist/npm/LinearGauge.d.ts +0 -43
  206. package/dist/npm/LinearGauge.js +0 -132
  207. package/dist/npm/LinearGaugeProps.d.ts +0 -15
  208. package/dist/npm/LinearGaugeProps.js +0 -5
  209. package/dist/npm/RadialGauge.d.ts +0 -43
  210. package/dist/npm/RadialGauge.js +0 -136
  211. package/dist/npm/RadialGaugeProps.d.ts +0 -15
  212. package/dist/npm/RadialGaugeProps.js +0 -5
  213. package/dist/npm/additionalTypes.ts +0 -21
  214. package/dist/npm/main.d.ts +0 -10
  215. package/dist/npm/main.js +0 -30
  216. package/dist/npm/package-metadata.d.ts +0 -5
  217. package/dist/npm/package-metadata.js +0 -14
  218. package/dist/npm/store/reducer.d.ts +0 -14
  219. package/dist/npm/store/reducer.js +0 -107
  220. package/dist/npm/store/store.d.ts +0 -26
  221. package/dist/npm/store/store.js +0 -31
  222. package/dist/npm/theming/theme-service.d.ts +0 -6
  223. package/dist/npm/theming/theme-service.js +0 -56
  224. package/dist/npm/types/arc-scale.interface.d.ts +0 -28
  225. package/dist/npm/types/arc-scale.interface.js +0 -3
  226. package/dist/npm/types/border.interface.d.ts +0 -18
  227. package/dist/npm/types/border.interface.js +0 -2
  228. package/dist/npm/types/cap.interface.d.ts +0 -13
  229. package/dist/npm/types/cap.interface.js +0 -2
  230. package/dist/npm/types/circular-scale.interface.d.ts +0 -10
  231. package/dist/npm/types/circular-scale.interface.js +0 -2
  232. package/dist/npm/types/color-range.interface.d.ts +0 -21
  233. package/dist/npm/types/color-range.interface.js +0 -2
  234. package/dist/npm/types/dash-type.interface.d.ts +0 -4
  235. package/dist/npm/types/dash-type.interface.js +0 -2
  236. package/dist/npm/types/gauge-area.interface.d.ts +0 -27
  237. package/dist/npm/types/gauge-area.interface.js +0 -2
  238. package/dist/npm/types/labels.interface.d.ts +0 -47
  239. package/dist/npm/types/labels.interface.js +0 -3
  240. package/dist/npm/types/line-cap.d.ts +0 -4
  241. package/dist/npm/types/line-cap.js +0 -2
  242. package/dist/npm/types/line.interface.d.ts +0 -22
  243. package/dist/npm/types/line.interface.js +0 -2
  244. package/dist/npm/types/linear-pointer-shape.d.ts +0 -4
  245. package/dist/npm/types/linear-pointer-shape.js +0 -2
  246. package/dist/npm/types/linear-pointer.interface.d.ts +0 -36
  247. package/dist/npm/types/linear-pointer.interface.js +0 -2
  248. package/dist/npm/types/linear-scale.interface.d.ts +0 -26
  249. package/dist/npm/types/linear-scale.interface.js +0 -3
  250. package/dist/npm/types/margin.interface.d.ts +0 -21
  251. package/dist/npm/types/margin.interface.js +0 -2
  252. package/dist/npm/types/padding.interface.d.ts +0 -21
  253. package/dist/npm/types/padding.interface.js +0 -2
  254. package/dist/npm/types/radial-label-position.d.ts +0 -4
  255. package/dist/npm/types/radial-label-position.js +0 -2
  256. package/dist/npm/types/radial-labels.interface.d.ts +0 -8
  257. package/dist/npm/types/radial-labels.interface.js +0 -2
  258. package/dist/npm/types/radial-pointer.interface.d.ts +0 -22
  259. package/dist/npm/types/radial-pointer.interface.js +0 -3
  260. package/dist/npm/types/radial-scale.interface.d.ts +0 -28
  261. package/dist/npm/types/radial-scale.interface.js +0 -3
  262. package/dist/npm/types/range.interface.d.ts +0 -21
  263. package/dist/npm/types/range.interface.js +0 -2
  264. package/dist/npm/types/scale.interface.d.ts +0 -47
  265. package/dist/npm/types/scale.interface.js +0 -2
  266. package/dist/npm/types/ticks.interface.d.ts +0 -21
  267. package/dist/npm/types/ticks.interface.js +0 -3
  268. package/dist/npm/types.d.ts +0 -21
  269. package/dist/npm/types.js +0 -2
  270. package/dist/npm/utils/common.d.ts +0 -4
  271. package/dist/npm/utils/common.js +0 -43
package/ArcCenter.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),l=require("@progress/kendo-vue-common"),c=t.defineComponent({name:"KendoArcCenter",props:{center:[String,Function,Object]},inject:{arcCenterValue:{default:null},centerStyles:{default:null}},created(){this.element=null},render(){const{center:n}=this.$props,r={zIndex:-1,...this.centerStyles};let e=null;return n?(e=l.getTemplate.call(this,{h:t.h,template:n,defaultRendering:"",additionalProps:{value:this.arcCenterValue.value,color:this.arcCenterValue.color}}),t.createVNode("div",{class:"k-arcgauge-label",style:r},[e])):e}});exports.ArcCenter=c;
package/ArcCenter.mjs ADDED
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { defineComponent as n, h as l, createVNode as a } from "vue";
9
+ import { getTemplate as c } from "@progress/kendo-vue-common";
10
+ const u = /* @__PURE__ */ n({
11
+ name: "KendoArcCenter",
12
+ props: {
13
+ center: [String, Function, Object]
14
+ },
15
+ inject: {
16
+ arcCenterValue: {
17
+ default: null
18
+ },
19
+ centerStyles: {
20
+ default: null
21
+ }
22
+ },
23
+ created() {
24
+ this.element = null;
25
+ },
26
+ render() {
27
+ const {
28
+ center: t
29
+ } = this.$props, r = {
30
+ zIndex: -1,
31
+ ...this.centerStyles
32
+ };
33
+ let e = null;
34
+ return t ? (e = c.call(this, {
35
+ h: l,
36
+ template: t,
37
+ defaultRendering: "",
38
+ additionalProps: {
39
+ value: this.arcCenterValue.value,
40
+ color: this.arcCenterValue.color
41
+ }
42
+ }), a("div", {
43
+ class: "k-arcgauge-label",
44
+ style: r
45
+ }, [e])) : e;
46
+ }
47
+ });
48
+ export {
49
+ u as ArcCenter
50
+ };
package/ArcGauge.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),g=require("./BaseGauge.js"),d=require("@progress/kendo-charts"),h=require("./ArcCenter.js"),c=require("@progress/kendo-drawing"),s=require("@progress/kendo-vue-common"),f=o.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=d.ArcGauge},data(){return{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=s.getDefaultSlots(this),{centerRender:t,className:r,value:n,transitions:a,scale:i}=this.$props,l=t?s.templateRendering.call(this,t,s.getListeners.call(this)):void 0;return o.createVNode(g.BaseGauge,{value:n,scale:i,transitions:a,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:u=>{this.baseGaugeRef=u},gaugeConstructor:this.gaugeType,getTarget:this.getTarget,class:s.classNames("k-gauge k-arcgauge",r),onRender:this.positionCenter},{default:()=>[e,o.createVNode(h.ArcCenter,{center:l,ref:u=>{this.centerRef=u}},null)]})},methods:{positionCenter(){const e=this.center.$el.offsetWidth,t=this.center.$el.offsetHeight,r=this.gaugeInstance(),n=r.centerLabelPosition(e,t);this.centerStyles.left=n.left+"px",this.centerStyles.top=n.top+"px",this.arcCenterValue.value=r.value(),this.arcCenterValue.color=r.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 this.gaugeInstance!==null&&this.$el?c.drawDOM(this.$el,e):Promise.resolve(new c.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{value:t,color:r,colors:n,opacity:a,scale:i}=this.$props;return Object.assign({},e,{value:t,color:r,colors:n,opacity:a,scale:i})}}});exports.ArcGauge=f;
package/ArcGauge.mjs ADDED
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { defineComponent as l, createVNode as o } from "vue";
9
+ import { BaseGauge as c } from "./BaseGauge.mjs";
10
+ import { ArcGauge as g } from "@progress/kendo-charts";
11
+ import { ArcCenter as h } from "./ArcCenter.mjs";
12
+ import { drawDOM as d, Group as f } from "@progress/kendo-drawing";
13
+ import { getDefaultSlots as p, templateRendering as m, getListeners as b, classNames as v } from "@progress/kendo-vue-common";
14
+ const $ = /* @__PURE__ */ l({
15
+ name: "KendoArcGauge",
16
+ props: {
17
+ dir: String,
18
+ renderAs: {
19
+ type: String,
20
+ default: "svg",
21
+ validator: function(e) {
22
+ return ["svg", "canvas"].includes(e);
23
+ }
24
+ },
25
+ gaugeConstructor: [Object, Function],
26
+ value: {
27
+ type: Number,
28
+ default: void 0
29
+ },
30
+ color: String,
31
+ colors: {
32
+ type: Array,
33
+ default: void 0
34
+ },
35
+ opacity: {
36
+ type: Number,
37
+ default: void 0
38
+ },
39
+ scale: {
40
+ type: Object,
41
+ default: void 0
42
+ },
43
+ centerRender: [String, Function, Object],
44
+ transitions: {
45
+ type: Boolean,
46
+ default: void 0
47
+ }
48
+ },
49
+ created() {
50
+ this.gaugeType = g;
51
+ },
52
+ data() {
53
+ return {
54
+ centerStyles: {
55
+ top: null,
56
+ left: null
57
+ },
58
+ arcCenterValue: {
59
+ value: "",
60
+ color: ""
61
+ }
62
+ };
63
+ },
64
+ provide() {
65
+ return {
66
+ centerStyles: this.$data.centerStyles,
67
+ arcCenterValue: this.$data.arcCenterValue
68
+ };
69
+ },
70
+ mounted() {
71
+ this._baseGauge = this.baseGaugeRef, this.center = this.centerRef, this.positionCenter();
72
+ },
73
+ watch: {
74
+ colors: function(e, t) {
75
+ this.prevColors = t;
76
+ }
77
+ },
78
+ updated() {
79
+ this._baseGauge = this.baseGaugeRef, this.center = this.centerRef;
80
+ },
81
+ render() {
82
+ const e = p(this), {
83
+ centerRender: t,
84
+ className: r,
85
+ value: n,
86
+ transitions: s,
87
+ scale: a
88
+ } = this.$props, u = t ? m.call(this, t, b.call(this)) : void 0;
89
+ return o(c, {
90
+ value: n,
91
+ scale: a,
92
+ transitions: s,
93
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
94
+ ref: (i) => {
95
+ this.baseGaugeRef = i;
96
+ },
97
+ gaugeConstructor: this.gaugeType,
98
+ getTarget: this.getTarget,
99
+ class: v("k-gauge k-arcgauge", r),
100
+ onRender: this.positionCenter
101
+ }, {
102
+ default: () => [e, o(h, {
103
+ center: u,
104
+ ref: (i) => {
105
+ this.centerRef = i;
106
+ }
107
+ }, null)]
108
+ });
109
+ },
110
+ methods: {
111
+ positionCenter() {
112
+ const e = this.center.$el.offsetWidth, t = this.center.$el.offsetHeight, r = this.gaugeInstance(), n = r.centerLabelPosition(e, t);
113
+ this.centerStyles.left = n.left + "px", this.centerStyles.top = n.top + "px", this.arcCenterValue.value = r.value(), this.arcCenterValue.color = r.currentColor();
114
+ },
115
+ gaugeInstance() {
116
+ return this._baseGauge ? this._baseGauge.gaugeInstance : null;
117
+ },
118
+ surface() {
119
+ return this._baseGauge ? this._baseGauge.surface : null;
120
+ },
121
+ element() {
122
+ return this._baseGauge ? this._baseGauge.element : null;
123
+ },
124
+ exportVisual(e) {
125
+ return this.gaugeInstance !== null && this.$el ? d(this.$el, e) : Promise.resolve(new f());
126
+ },
127
+ getTarget() {
128
+ return this;
129
+ },
130
+ deriveOptionsFromParent(e) {
131
+ const {
132
+ value: t,
133
+ color: r,
134
+ colors: n,
135
+ opacity: s,
136
+ scale: a
137
+ } = this.$props;
138
+ return Object.assign({}, e, {
139
+ value: t,
140
+ color: r,
141
+ colors: n,
142
+ opacity: s,
143
+ scale: a
144
+ });
145
+ }
146
+ }
147
+ });
148
+ export {
149
+ $ as ArcGauge
150
+ };
package/BaseGauge.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
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;
package/BaseGauge.mjs ADDED
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { defineComponent as u, inject as d, createVNode as g } from "vue";
9
+ import { provideIntlService as l } from "@progress/kendo-vue-intl";
10
+ import { loadTheme as p } from "./theming/theme-service.mjs";
11
+ import f from "./store/store.mjs";
12
+ import { themeReducer as m } from "./store/reducer.mjs";
13
+ import { validatePackage as v, getDefaultSlots as S, canUseDOM as O } from "@progress/kendo-vue-common";
14
+ import { packageMetadata as I } from "./package-metadata.mjs";
15
+ const F = /* @__PURE__ */ u({
16
+ name: "KendoBaseGauge",
17
+ props: {
18
+ dir: String,
19
+ renderAs: {
20
+ type: String,
21
+ default: "svg",
22
+ validator: function(e) {
23
+ return ["svg", "canvas"].includes(e);
24
+ }
25
+ },
26
+ scale: Object,
27
+ value: Number,
28
+ pointer: {
29
+ type: [Object, Array],
30
+ default: function() {
31
+ }
32
+ },
33
+ gaugeConstructor: [Object, Function],
34
+ deriveOptionsFromParent: Function,
35
+ transitions: {
36
+ type: Boolean,
37
+ default: void 0
38
+ },
39
+ getTarget: Function,
40
+ onRender: Function
41
+ },
42
+ created() {
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
+ },
45
+ mounted() {
46
+ p(this.themeStore, this.instantiateCoreGauge.bind(this)), this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this)), window.addEventListener("resize", this.onWindowResize);
47
+ },
48
+ watch: {
49
+ dir: function(e, t) {
50
+ this._prevDir = t;
51
+ },
52
+ renderAs: function(e, t) {
53
+ this._prevRenderAs = t;
54
+ },
55
+ scale: function(e, t) {
56
+ this._prevScale = t;
57
+ }
58
+ },
59
+ updated() {
60
+ const {
61
+ dir: e,
62
+ getTarget: t,
63
+ gaugeConstructor: i,
64
+ className: n,
65
+ renderAs: o,
66
+ scale: h,
67
+ ...r
68
+ } = this.$props;
69
+ if (this.gaugeInstance !== null) {
70
+ const a = this._prevDir !== e || this._prevRenderAs !== o || this._prevScale !== h, s = r;
71
+ a || this.gaugeInstance.noTransitionsRedraw(), a || (o || "svg") !== (this._prevRenderAs || "svg") ? this.refresh() : Object.keys(r).indexOf("pointer") > -1 && r.pointer ? Array.isArray(s.pointer) ? this.refreshAllValues(s.pointer.map((c) => c.value)) : this.refreshValue((s.pointer || {}).value) : this.refreshValue(s.value), this._prevDir !== e && this.gaugeInstance.setDirection(this.getDirection(e)), this.$emit("render", {
72
+ sender: this
73
+ });
74
+ }
75
+ },
76
+ destroyed() {
77
+ this.themeUnsubscriber(), this.gaugeInstance !== null && (this.gaugeInstance.destroy(), this.gaugeInstance = null), window.removeEventListener("resize", this.onWindowResize);
78
+ },
79
+ setup: function() {
80
+ return {
81
+ kendoIntlService: d("kendoIntlService", {})
82
+ };
83
+ },
84
+ render() {
85
+ const e = S(this), t = Object.assign({}, {
86
+ position: "relative"
87
+ });
88
+ return this._intl = l(this), g("div", {
89
+ style: t
90
+ }, [e]);
91
+ },
92
+ methods: {
93
+ instantiateCoreGauge() {
94
+ const {
95
+ dir: e,
96
+ gaugeConstructor: t
97
+ } = this.$props, i = this.getGaugeOptions();
98
+ this.gaugeInstance = new t(this.$el, i, this.themeStore.getState(), {
99
+ rtl: this.getDirection(e),
100
+ intlService: this._intl,
101
+ sender: this
102
+ });
103
+ },
104
+ refresh() {
105
+ if (this.gaugeInstance !== null) {
106
+ const e = this.themeStore.getState(), t = this.getGaugeOptions();
107
+ this.gaugeInstance.setOptions(t, e);
108
+ }
109
+ },
110
+ refreshValue(e) {
111
+ this.gaugeInstance.value(e);
112
+ },
113
+ refreshAllValues(e) {
114
+ this.gaugeInstance.allValues(e);
115
+ },
116
+ getDirection(e) {
117
+ return (e !== void 0 ? e : O && window.getComputedStyle(this.$el).direction || "ltr") === "rtl";
118
+ },
119
+ getGaugeOptions() {
120
+ const {
121
+ renderAs: e,
122
+ transitions: t,
123
+ deriveOptionsFromParent: i
124
+ } = this.$props;
125
+ let n = Object.assign({
126
+ renderAs: e,
127
+ transitions: t
128
+ });
129
+ return i && (n = i(n)), n;
130
+ },
131
+ onWindowResize() {
132
+ this.gaugeInstance !== null && (this.gaugeInstance.resize(), this.$emit("render", {
133
+ sender: this
134
+ }));
135
+ }
136
+ }
137
+ });
138
+ export {
139
+ F as BaseGauge
140
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ArcGauge.js"),r=require("@progress/kendo-charts"),t=require("vue"),u=t.defineComponent({name:"KendoCircularGauge",extends:e.ArcGauge,created(){this.gaugeType=r.CircularGauge,this.arcCenterStyles={}}});exports.CircularGauge=u;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ArcGauge as e } from "./ArcGauge.mjs";
9
+ import { CircularGauge as r } from "@progress/kendo-charts";
10
+ import { defineComponent as a } from "vue";
11
+ const u = /* @__PURE__ */ a({
12
+ name: "KendoCircularGauge",
13
+ extends: e,
14
+ created() {
15
+ this.gaugeType = r, this.arcCenterStyles = {};
16
+ }
17
+ });
18
+ export {
19
+ u as CircularGauge
20
+ };
package/LinearGauge.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=require("./BaseGauge.js"),a=require("@progress/kendo-charts"),u=require("@progress/kendo-drawing"),i=require("@progress/kendo-vue-common");function o(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const g=n.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=i.getDefaultSlots(this);return n.createVNode(s.BaseGauge,{transitions:this.$props.transitions,scale:this.$props.scale,pointer:this.$props.pointer,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:t=>{this.baseGaugeRef=t},gaugeConstructor:a.LinearGauge,getTarget:this.getTarget,class:"k-gauge"},o(e)?e:{default:()=>[e]})},methods:{gaugeInstance(){return this._baseGauge!==null?this._baseGauge.gaugeInstance:null},surface(){return this._baseGauge!==null?this._baseGauge.surface:null},element(){return this._baseGauge!==null?this._baseGauge.element:null},exportVisual(e){return this.gaugeInstance()!==null?Promise.resolve(this.gaugeInstance().exportVisual(e)):Promise.resolve(new u.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{pointer:t,scale:r}=this.$props;return Object.assign({},e,{pointer:t,scale:r})}}});exports.LinearGauge=g;
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { defineComponent as n, createVNode as s, isVNode as a } from "vue";
9
+ import { BaseGauge as i } from "./BaseGauge.mjs";
10
+ import { LinearGauge as u } from "@progress/kendo-charts";
11
+ import { Group as o } from "@progress/kendo-drawing";
12
+ import { getDefaultSlots as g } from "@progress/kendo-vue-common";
13
+ function l(e) {
14
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !a(e);
15
+ }
16
+ const m = /* @__PURE__ */ n({
17
+ name: "KendoLinearGauge",
18
+ props: {
19
+ dir: String,
20
+ renderAs: {
21
+ type: String,
22
+ default: "svg",
23
+ validator: function(e) {
24
+ return ["svg", "canvas"].includes(e);
25
+ }
26
+ },
27
+ gaugeConstructor: [Object, Function],
28
+ pointer: {
29
+ type: [Object, Array],
30
+ default: void 0
31
+ },
32
+ scale: {
33
+ type: Object,
34
+ default: void 0
35
+ },
36
+ transitions: {
37
+ type: Boolean,
38
+ default: void 0
39
+ }
40
+ },
41
+ mounted() {
42
+ this._baseGauge = this.baseGaugeRef;
43
+ },
44
+ updated() {
45
+ this._baseGauge = this.baseGaugeRef;
46
+ },
47
+ render() {
48
+ const e = g(this);
49
+ return s(i, {
50
+ transitions: this.$props.transitions,
51
+ scale: this.$props.scale,
52
+ pointer: this.$props.pointer,
53
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
54
+ ref: (t) => {
55
+ this.baseGaugeRef = t;
56
+ },
57
+ gaugeConstructor: u,
58
+ getTarget: this.getTarget,
59
+ class: "k-gauge"
60
+ }, l(e) ? e : {
61
+ default: () => [e]
62
+ });
63
+ },
64
+ methods: {
65
+ gaugeInstance() {
66
+ return this._baseGauge !== null ? this._baseGauge.gaugeInstance : null;
67
+ },
68
+ surface() {
69
+ return this._baseGauge !== null ? this._baseGauge.surface : null;
70
+ },
71
+ element() {
72
+ return this._baseGauge !== null ? this._baseGauge.element : null;
73
+ },
74
+ exportVisual(e) {
75
+ return this.gaugeInstance() !== null ? Promise.resolve(this.gaugeInstance().exportVisual(e)) : Promise.resolve(new o());
76
+ },
77
+ getTarget() {
78
+ return this;
79
+ },
80
+ deriveOptionsFromParent(e) {
81
+ const {
82
+ pointer: t,
83
+ scale: r
84
+ } = this.$props;
85
+ return Object.assign({}, e, {
86
+ pointer: t,
87
+ scale: r
88
+ });
89
+ }
90
+ }
91
+ });
92
+ export {
93
+ m as LinearGauge
94
+ };
package/README.md CHANGED
@@ -1,75 +1,46 @@
1
- <a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges&utm_content=banner" target="_blank">
1
+ <a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-utils&utm_content=banner" target="_blank">
2
2
  <img src="https://www.telerik.com/kendo-vue-ui/npm-banner.svg" alt="Kendo UI for Vue NPM Banner">
3
3
  </a>
4
4
 
5
- # Kendo UI for Vue Gauges Library for Vue
5
+ ## Kendo UI for Vue Gauges Package for Vue
6
6
 
7
7
  > **Important**
8
- > * This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)&mdash;a commercial UI library.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendovue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges).
11
- > * The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
12
8
  >
13
- > [Start using Kendo UI for Vue](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) and speed up your development process!
14
-
15
- The Kendo UI for Vue Gauges provide a set of Vue components for building beautiful and customizable gauges.
16
-
17
- What's in this package (ToC):
18
-
19
- * [Vue ArcGauge component](#vue-arcgauge-component)
20
- * [Vue CircularGauge component](#vue-circulargauge-component)
21
- * [Vue LinearGauge component](#vue-lineargauge-component)
22
- * [Vue RadialGauge component](#vue-radialgauge-component)
23
- * [Vue Gauges Library Shared Features](#vue-gauges-library-shared-features)
24
- * [Support Options](#support-options)
25
- * [Resources](#resources)
9
+ > - This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)&mdash;a commercial UI library.
10
+ > - You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges).
11
+ > - To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/kendo-vue-ui-develop/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges).
12
+ > - The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
13
+ >
14
+ > [Start using Kendo UI for Vue](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges) and speed up your development process!
26
15
 
16
+ ## Vue Gauges
27
17
 
28
18
  > Historically, all Kendo UI for Vue Native components support both **Vue 2** and **Vue 3**, however, Vue 2 is currently in its end-of-support phase till Nov 2024. After our last major release for 2024, Vue 2 will no longer be supported in the new versions of the Kendo UI for Vue components. Please check our [Vue 2 End of Support article](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/) for more details.
29
19
 
30
- ## Vue ArcGauge Component
31
-
32
- [The Kendo UI for Vue ArcGauge component](https://www.telerik.com/kendo-vue-ui/components/gauges/arcgauge/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) is perfect for representing value ranges across a sleek looking arc. This Vue component features the ability to define a minimum and maximum angle, letting arcs range from 0 to 360 degrees, and the current value will be displayed within the arc itself as well as a template in the middle of the component.
33
-
34
- ## Vue CircularGauge Component
35
-
36
- [The Kendo UI for Vue Circular Gauge component](https://www.telerik.com/kendo-vue-ui/components/gauges/circulargauge/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) is a data visualization component that represents a value within a full-circle arc. This eye-catching Vue component is compact, simple to bind to data sources and provides a broad set of configuration options to ensure a natural fit in any Vue application.
37
-
38
- ## Vue LinearGauge Component
39
-
40
- [The Kendo UI for Vue LinearGauge component](https://www.telerik.com/kendo-vue-ui/components/gauges/lineargauge/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) represents values on a linear scale, providing not just a bar to showcase current value but also a scale of tick and labels to help showcase what the value represents. The Vue LinearGauge can be rendered in both horizontal and vertical modes.
41
-
42
- ## Vue RadialGauge Component
43
-
44
- [The Kendo UI for Vue RadialGauge component](https://www.telerik.com/kendo-vue-ui/components/gauges/radialgauge/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) represents values on a circular arc with a centralized pointer to indicate the current value. The gauge can animate the pointer to various values, provides support for multiple pointers and allows for deep customization with the out-of-the-box configuration options.
45
-
46
- ## Vue Gauges Library Shared Features
47
-
48
20
  Among the many features which the Kendo UI for Vue Gauges deliver are:
49
21
 
50
- * **Scale options**&mdash;You can customize the color, width range and other scale options.
51
- * **Globalization**&mdash; Using the globalization feature you can format the gauges value based on the culture and use RTL.
52
- * **Export**&mdash;The gauges can be exported to an image, a PDF or a SVG allowing to easily save them locally or on the server.
53
- * [**Theme support**](https://www.telerik.com/kendo-vue-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)&mdash;The Kendo UI for Vue Gauges, as well as all 100+ components in the Kendo UI for Vue suite, are styled in four polished themes (Bootstrap, Material, Default and Fluent) and can be further customized to match your specific design guidelines.
22
+ - TODO 1
23
+ - TODO 2
24
+ - TODO 3
54
25
 
55
26
  ## Support Options
56
27
 
57
28
  For any issues you might encounter while working with the Kendo UI for Vue Gauges, use any of the available support channels:
58
29
 
59
- * Industry-leading technical support&mdash;Kendo UI for Vue paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated Kendo UI for Vue support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges).
60
- * Product forums&mdash;The [Kendo UI for Vue forums](https://www.telerik.com/forums/kendo-ui-vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) are part of the free support you can get from the community and from the Kendo UI for Vue team.
61
- * Feedback portal&mdash;The [Kendo UI for Vue feedback portal](https://feedback.telerik.com/kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges) is where you can request and vote for new features to be added.
30
+ - Industry-leading technical support&mdash;Kendo UI for Vue paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated Kendo UI for Vue support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges).
31
+ - Product forums&mdash;The [Kendo UI for Vue forums](https://www.telerik.com/forums/kendo-ui-vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges) are part of the free support you can get from the community and from the Kendo UI for Vue team.
32
+ - Feedback portal&mdash;The [Kendo UI for Vue feedback portal](https://feedback.telerik.com/kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges) is where you can request and vote for new features to be added.
62
33
 
63
34
  ## Resources
64
35
 
65
- * [Getting Started with Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
66
- * [Getting Started with the Kendo UI for Vue Gauges](https://www.telerik.com/kendo-vue-ui/components/gauges/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
67
- * [API Reference of the Kendo UI for Vue gauges](https://www.telerik.com/kendo-vue-ui/components/gauges/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
68
- * [Kendo UI for Vue Roadmap](https://www.telerik.com/support/whats-new/kendo-vue-ui/roadmap/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
69
- * [Blogs](https://www.telerik.com/blogs/tag/kendo?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
70
- * [Demos, documentation, and component reference](https://www.telerik.com/kendo-vue-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
71
- * [Kendo UI for Vue pricing and licensing](https://www.telerik.com/kendo-ui/pricing/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-gauges)
36
+ - [Getting Started with Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
37
+ - [Getting Started with the Kendo UI for Vue Gauges](https://www.telerik.com/kendo-vue-ui/components/gauges/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
38
+ - [API Reference of the Kendo UI for Vue Gauges](https://www.telerik.com/kendo-vue-ui/components/gauges/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
39
+ - [Kendo UI for Vue Roadmap](https://www.telerik.com/kendo-vue-ui/roadmap/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
40
+ - [Blogs](https://www.telerik.com/blogs/tag/vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
41
+ - [Demos, documentation, and component reference](https://www.telerik.com/kendo-vue-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
42
+ - [Kendo UI for Vue pricing and licensing](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmgauges)
72
43
 
73
- *Copyright © 2023 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
44
+ _Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
74
45
 
75
- *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
46
+ _Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
package/RadialGauge.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),u=require("./BaseGauge.js"),i=require("@progress/kendo-charts"),o=require("@progress/kendo-drawing"),g=require("@progress/kendo-vue-common");function l(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!r.isVNode(e)}const c=r.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=g.getDefaultSlots(this),{pointer:t,scale:n,transitions:a}=this.$props;return r.createVNode(u.BaseGauge,{transitions:a,scale:n,pointer:t,deriveOptionsFromParent:this.deriveOptionsFromParent,ref:s=>{this.baseGaugeRef=s},gaugeConstructor:i.RadialGauge,getTarget:this.getTarget,class:"k-gauge"},l(e)?e:{default:()=>[e]})},methods:{gaugeInstance(){return this._baseGauge!==null?this._baseGauge.gaugeInstance:null},surface(){return this._baseGauge!==null?this._baseGauge.surface:null},element(){return this._baseGauge!==null?this._baseGauge.element:null},exportVisual(e){return this.gaugeInstance()!==null?Promise.resolve(this.gaugeInstance().exportVisual(e)):Promise.resolve(new o.Group)},getTarget(){return this},deriveOptionsFromParent(e){const{pointer:t,scale:n}=this.$props;return Object.assign({},e,{pointer:t,scale:n})}}});exports.RadialGauge=c;