@progress/kendo-vue-gauges 5.3.0-dev.202409130647 → 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
@@ -1,220 +0,0 @@
1
- "use strict";
2
-
3
- var __rest = undefined && undefined.__rest || function (s, e) {
4
- var t = {};
5
- for (var p in s) {
6
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
7
- }
8
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", {
14
- value: true
15
- });
16
- exports.BaseGaugeVue2 = exports.BaseGauge = void 0;
17
- // @ts-ignore
18
- var Vue = require("vue");
19
- var allVue = Vue;
20
- var gh = allVue.h;
21
- var isV3 = allVue.version && allVue.version[0] === '3';
22
- var inject = allVue.inject;
23
- var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
24
- var theme_service_1 = require("./theming/theme-service");
25
- var store_1 = require("./store/store");
26
- var reducer_1 = require("./store/reducer");
27
- var kendo_vue_common_1 = require("@progress/kendo-vue-common");
28
- var kendo_vue_common_2 = require("@progress/kendo-vue-common");
29
- var package_metadata_1 = require("./package-metadata");
30
- /**
31
- * @hidden
32
- */
33
- var BaseGaugeVue2 = {
34
- name: 'KendoBaseGauge',
35
- props: {
36
- dir: String,
37
- renderAs: {
38
- type: String,
39
- default: 'svg',
40
- validator: function validator(value) {
41
- return ['svg', 'canvas'].includes(value);
42
- }
43
- },
44
- scale: Object,
45
- value: Number,
46
- pointer: {
47
- type: [Object, Array],
48
- default: function _default() {
49
- return undefined;
50
- }
51
- },
52
- gaugeConstructor: [Object, Function],
53
- deriveOptionsFromParent: Function,
54
- transitions: {
55
- type: Boolean,
56
- default: undefined
57
- }
58
- },
59
- inject: {
60
- kendoIntlService: {
61
- default: null
62
- }
63
- },
64
- created: function created() {
65
- (0, kendo_vue_common_2.validatePackage)(package_metadata_1.packageMetadata);
66
- this.gaugeInstance = null;
67
- this.themeStore = {};
68
- this._prevRenderAs = this.renderAs;
69
- this._prevDir = this.dir;
70
- this._prevScale = this.scale;
71
- this.themeStore = (0, store_1.default)(reducer_1.themeReducer);
72
- },
73
- mounted: function mounted() {
74
- (0, theme_service_1.loadTheme)(this.themeStore, this.instantiateCoreGauge.bind(this));
75
- this.themeUnsubscriber = this.themeStore.subscribe(this.refresh.bind(this));
76
- window.addEventListener('resize', this.onWindowResize);
77
- },
78
- watch: {
79
- dir: function dir(_newDir, oldDir) {
80
- this._prevDir = oldDir;
81
- },
82
- renderAs: function renderAs(_newRenderAs, oldRenderAs) {
83
- this._prevRenderAs = oldRenderAs;
84
- },
85
- scale: function scale(_newScale, oldScale) {
86
- this._prevScale = oldScale;
87
- }
88
- },
89
- updated: function updated() {
90
- var _a = this.$props,
91
- dir = _a.dir,
92
- getTarget = _a.getTarget,
93
- gaugeConstructor = _a.gaugeConstructor,
94
- className = _a.className,
95
- renderAs = _a.renderAs,
96
- scale = _a.scale,
97
- currentOthers = __rest(_a, ["dir", "getTarget", "gaugeConstructor", "className", "renderAs", "scale"]);
98
- if (this.gaugeInstance !== null) {
99
- var optionsChanged = this._prevDir !== dir || this._prevRenderAs !== renderAs || this._prevScale !== scale;
100
- var typedCurrentOthers = currentOthers;
101
- if (!optionsChanged) {
102
- this.gaugeInstance.noTransitionsRedraw();
103
- }
104
- if (optionsChanged || (renderAs || 'svg') !== (this._prevRenderAs || 'svg')) {
105
- this.refresh();
106
- } else {
107
- if (Object.keys(currentOthers).indexOf('pointer') > -1 && currentOthers.pointer) {
108
- var isPointerArray = Array.isArray(typedCurrentOthers.pointer);
109
- if (isPointerArray) {
110
- this.refreshAllValues(typedCurrentOthers.pointer.map(function (item) {
111
- return item.value;
112
- }));
113
- } else {
114
- this.refreshValue((typedCurrentOthers.pointer || {}).value);
115
- }
116
- } else {
117
- this.refreshValue(typedCurrentOthers.value);
118
- }
119
- }
120
- if (this._prevDir !== dir) {
121
- this.gaugeInstance.setDirection(this.getDirection(dir));
122
- }
123
- this.$emit('render', {
124
- sender: this
125
- });
126
- }
127
- },
128
- destroyed: function destroyed() {
129
- this.themeUnsubscriber();
130
- if (this.gaugeInstance !== null) {
131
- this.gaugeInstance.destroy();
132
- this.gaugeInstance = null;
133
- }
134
- window.removeEventListener('resize', this.onWindowResize);
135
- },
136
- // @ts-ignore
137
- setup: !isV3 ? undefined : function () {
138
- var v3 = !!isV3;
139
- var kendoIntlService = inject('kendoIntlService', {});
140
- return {
141
- v3: v3,
142
- kendoIntlService: kendoIntlService
143
- };
144
- },
145
- // @ts-ignore
146
- render: function render(createElement) {
147
- var h = gh || createElement;
148
- var defaultSlots = (0, kendo_vue_common_2.getDefaultSlots)(this);
149
- var gaugeStyles = Object.assign({}, {
150
- position: 'relative'
151
- });
152
- this._intl = (0, kendo_vue_intl_1.provideIntlService)(this);
153
- return h("div", {
154
- style: gaugeStyles
155
- }, [defaultSlots]);
156
- },
157
- methods: {
158
- instantiateCoreGauge: function instantiateCoreGauge() {
159
- var _a = this.$props,
160
- dir = _a.dir,
161
- gaugeConstructor = _a.gaugeConstructor;
162
- var gaugeOptions = this.getGaugeOptions();
163
- this.gaugeInstance = new gaugeConstructor(this.$el, gaugeOptions, this.themeStore.getState(), {
164
- rtl: this.getDirection(dir),
165
- intlService: this._intl,
166
- sender: this
167
- });
168
- },
169
- refresh: function refresh() {
170
- if (this.gaugeInstance !== null) {
171
- var themeOptions = this.themeStore.getState();
172
- var gaugeOptions = this.getGaugeOptions();
173
- this.gaugeInstance.setOptions(gaugeOptions, themeOptions);
174
- }
175
- },
176
- refreshValue: function refreshValue(value) {
177
- this.gaugeInstance.value(value);
178
- },
179
- refreshAllValues: function refreshAllValues(values) {
180
- this.gaugeInstance.allValues(values);
181
- },
182
- getDirection: function getDirection(dir) {
183
- var _this = this;
184
- var directionFromWindow = function directionFromWindow() {
185
- return kendo_vue_common_1.canUseDOM && window.getComputedStyle(_this.$el).direction;
186
- };
187
- var direction = dir !== undefined ? dir : directionFromWindow() || 'ltr';
188
- return direction === 'rtl';
189
- },
190
- getGaugeOptions: function getGaugeOptions() {
191
- var _a = this.$props,
192
- renderAs = _a.renderAs,
193
- transitions = _a.transitions,
194
- deriveOptionsFromParent = _a.deriveOptionsFromParent;
195
- var gaugeOptions = Object.assign({
196
- renderAs: renderAs,
197
- transitions: transitions
198
- });
199
- if (deriveOptionsFromParent) {
200
- // Add options from parent - required by TS
201
- gaugeOptions = deriveOptionsFromParent(gaugeOptions);
202
- }
203
- return gaugeOptions;
204
- },
205
- onWindowResize: function onWindowResize() {
206
- if (this.gaugeInstance !== null) {
207
- this.gaugeInstance.resize();
208
- this.$emit('render', {
209
- sender: this
210
- });
211
- }
212
- }
213
- }
214
- };
215
- exports.BaseGaugeVue2 = BaseGaugeVue2;
216
- /**
217
- * @hidden
218
- */
219
- var BaseGauge = BaseGaugeVue2;
220
- exports.BaseGauge = BaseGauge;
@@ -1,44 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export interface BaseGaugePrivateProps {
5
- /**
6
- * @hidden
7
- */
8
- deriveOptionsFromParent?: (options: any) => any;
9
- /**
10
- * @hidden
11
- */
12
- gaugeConstructor?: object;
13
- /**
14
- * @hidden
15
- */
16
- getTarget?: () => any;
17
- }
18
- /**
19
- * @hidden
20
- */
21
- export interface BaseGaugeProps extends BaseGaugePrivateProps {
22
- /**
23
- * Represents the `dir` HTML attribute.
24
- */
25
- dir?: string;
26
- value?: number;
27
- scale?: object;
28
- pointer?: object;
29
- color?: any;
30
- colors?: any[];
31
- opacity?: any;
32
- /**
33
- * Sets the preferred rendering engine. If not supported by the browser, the Gauge switches to the first available mode.
34
- *
35
- * The supported values are:
36
- * - `"svg"`&mdash;If available, renders the component as an inline `.svg` file.
37
- * - `"canvas"`&mdash;If available, renders the component as a `canvas` element.
38
- */
39
- renderAs?: 'svg' | 'canvas' | string;
40
- /**
41
- * If set to `true`, the Gauge plays animations when it displays the series. By default, animations are enabled.
42
- */
43
- transitions?: boolean;
44
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- // tslint:enable:max-line-length
@@ -1,43 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- import { CircularGaugeProps } from './CircularGaugeProps';
7
- import { ArcGaugeState, ArcGaugeComputed, ArcGaugeMethods, ArcGaugeData } from './ArcGauge';
8
- /**
9
- * @hidden
10
- */
11
- export interface CircularGaugeState extends ArcGaugeState {
12
- }
13
- /**
14
- * @hidden
15
- */
16
- export interface CircularGaugeComputed extends ArcGaugeComputed {
17
- [key: string]: any;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- export interface CircularGaugeMethods extends ArcGaugeMethods {
23
- [key: string]: any;
24
- }
25
- /**
26
- * @hidden
27
- */
28
- export interface CircularGaugeData extends ArcGaugeData {
29
- }
30
- /**
31
- * @hidden
32
- */
33
- export interface CircularGaugeAll extends Vue2type, CircularGaugeMethods, CircularGaugeData, CircularGaugeComputed, CircularGaugeState {
34
- }
35
- /**
36
- * @hidden
37
- */
38
- declare let CircularGaugeVue2: ComponentOptions<CircularGaugeAll, DefaultData<CircularGaugeData>, DefaultMethods<CircularGaugeAll>, CircularGaugeComputed, RecordPropsDefinition<CircularGaugeProps>>;
39
- /**
40
- * @hidden
41
- */
42
- declare const CircularGauge: DefineComponent<CircularGaugeProps, any, CircularGaugeData, CircularGaugeComputed, CircularGaugeMethods, {}, {}, {}, string, CircularGaugeProps, CircularGaugeProps, {}>;
43
- export { CircularGauge, CircularGaugeVue2 };
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var __assign = undefined && undefined.__assign || function () {
4
- __assign = Object.assign || function (t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) {
8
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
9
- }
10
- }
11
- return t;
12
- };
13
- return __assign.apply(this, arguments);
14
- };
15
- Object.defineProperty(exports, "__esModule", {
16
- value: true
17
- });
18
- exports.CircularGaugeVue2 = exports.CircularGauge = void 0;
19
- // @ts-ignore
20
- var Vue = require("vue");
21
- var allVue = Vue;
22
- var gh = allVue.h;
23
- var isV3 = allVue.version && allVue.version[0] === '3';
24
- var ArcGauge_1 = require("./ArcGauge");
25
- var kendo_charts_1 = require("@progress/kendo-charts");
26
- /**
27
- * @hidden
28
- */
29
- var CircularGaugeVue2 = __assign(__assign({}, ArcGauge_1.ArcGauge), {
30
- name: 'KendoCircularGauge',
31
- created: function created() {
32
- this.gaugeType = kendo_charts_1.CircularGauge;
33
- this.arcCenterStyles = {};
34
- }
35
- });
36
- exports.CircularGaugeVue2 = CircularGaugeVue2;
37
- /**
38
- * @hidden
39
- */
40
- var CircularGauge = CircularGaugeVue2;
41
- exports.CircularGauge = CircularGauge;
@@ -1,17 +0,0 @@
1
- import { ArcGaugeProps } from './ArcGaugeProps';
2
- import { CircularScale } from './types/circular-scale.interface';
3
- import { ColorRange } from './types/color-range.interface';
4
- /**
5
- * Represents the props of the [Kendo UI for Vue CircularGauge component]({% slug overview_circulargauge_gauges %}).
6
- */
7
- export interface CircularGaugeProps extends ArcGaugeProps {
8
- /**
9
- * The color ranges of the value pointer
10
- * ([see example]({% slug colorranges_circulargauge %})).
11
- */
12
- colors?: ColorRange[];
13
- /**
14
- * The scale options of the CircularGauge.
15
- */
16
- scale?: CircularScale;
17
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,43 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- import { LinearGaugeProps } from './LinearGaugeProps';
7
- /**
8
- * @hidden
9
- */
10
- export interface LinearGaugeState {
11
- baseGauge: any;
12
- }
13
- /**
14
- * @hidden
15
- */
16
- export interface LinearGaugeComputed {
17
- [key: string]: any;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- export interface LinearGaugeMethods {
23
- [key: string]: any;
24
- }
25
- /**
26
- * @hidden
27
- */
28
- export interface LinearGaugeData {
29
- }
30
- /**
31
- * @hidden
32
- */
33
- export interface LinearGaugeAll extends Vue2type, LinearGaugeMethods, LinearGaugeData, LinearGaugeComputed, LinearGaugeState {
34
- }
35
- /**
36
- * @hidden
37
- */
38
- declare let LinearGaugeVue2: ComponentOptions<LinearGaugeAll, DefaultData<LinearGaugeData>, DefaultMethods<LinearGaugeAll>, LinearGaugeComputed, RecordPropsDefinition<LinearGaugeProps>>;
39
- /**
40
- * @hidden
41
- */
42
- declare const LinearGauge: DefineComponent<LinearGaugeProps, any, LinearGaugeData, LinearGaugeComputed, LinearGaugeMethods, {}, {}, {}, string, LinearGaugeProps, LinearGaugeProps, {}>;
43
- export { LinearGauge, LinearGaugeVue2 };
@@ -1,132 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.LinearGaugeVue2 = exports.LinearGauge = void 0;
7
- // @ts-ignore
8
- var Vue = require("vue");
9
- var allVue = Vue;
10
- var gh = allVue.h;
11
- var isV3 = allVue.version && allVue.version[0] === '3';
12
- var BaseGauge_1 = require("./BaseGauge");
13
- var kendo_charts_1 = require("@progress/kendo-charts");
14
- var kendo_drawing_1 = require("@progress/kendo-drawing");
15
- var kendo_vue_common_1 = require("@progress/kendo-vue-common");
16
- /**
17
- * @hidden
18
- */
19
- var LinearGaugeVue2 = {
20
- name: 'KendoLinearGauge',
21
- props: {
22
- dir: String,
23
- renderAs: {
24
- type: String,
25
- default: 'svg',
26
- validator: function validator(value) {
27
- return ['svg', 'canvas'].includes(value);
28
- }
29
- },
30
- gaugeConstructor: [Object, Function],
31
- pointer: {
32
- type: [Object, Array],
33
- default: undefined
34
- },
35
- scale: {
36
- type: Object,
37
- default: undefined
38
- },
39
- transitions: {
40
- type: Boolean,
41
- default: undefined
42
- }
43
- },
44
- mounted: function mounted() {
45
- this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
46
- },
47
- updated: function updated() {
48
- this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
49
- },
50
- // @ts-ignore
51
- setup: !isV3 ? undefined : function () {
52
- var v3 = !!isV3;
53
- return {
54
- v3: v3
55
- };
56
- },
57
- // @ts-ignore
58
- render: function render(createElement) {
59
- var _this = this;
60
- var h = gh || createElement;
61
- var defaultSlots = (0, kendo_vue_common_1.getDefaultSlots)(this);
62
- return (
63
- // @ts-ignore function children
64
- h(BaseGauge_1.BaseGauge, {
65
- transitions: this.$props.transitions,
66
- attrs: this.v3 ? undefined : {
67
- transitions: this.$props.transitions,
68
- scale: this.$props.scale,
69
- pointer: this.$props.pointer,
70
- deriveOptionsFromParent: this.deriveOptionsFromParent,
71
- gaugeConstructor: kendo_charts_1.LinearGauge,
72
- getTarget: this.getTarget
73
- },
74
- scale: this.$props.scale,
75
- pointer: this.$props.pointer,
76
- deriveOptionsFromParent: this.deriveOptionsFromParent,
77
- ref: this.v3 ? function (el) {
78
- _this.baseGaugeRef = el;
79
- } : 'baseGauge',
80
- gaugeConstructor: kendo_charts_1.LinearGauge,
81
- getTarget: this.getTarget,
82
- "class": 'k-gauge'
83
- }, this.v3 ? function () {
84
- return [defaultSlots];
85
- } : [defaultSlots])
86
- );
87
- },
88
- methods: {
89
- gaugeInstance: function gaugeInstance() {
90
- if (this._baseGauge !== null) {
91
- return this._baseGauge.gaugeInstance;
92
- }
93
- return null;
94
- },
95
- surface: function surface() {
96
- if (this._baseGauge !== null) {
97
- return this._baseGauge.surface;
98
- }
99
- return null;
100
- },
101
- element: function element() {
102
- if (this._baseGauge !== null) {
103
- return this._baseGauge.element;
104
- }
105
- return null;
106
- },
107
- exportVisual: function exportVisual(options) {
108
- if (this.gaugeInstance() !== null) {
109
- return Promise.resolve(this.gaugeInstance().exportVisual(options));
110
- }
111
- return Promise.resolve(new kendo_drawing_1.Group());
112
- },
113
- getTarget: function getTarget() {
114
- return this;
115
- },
116
- deriveOptionsFromParent: function deriveOptionsFromParent(options) {
117
- var _a = this.$props,
118
- pointer = _a.pointer,
119
- scale = _a.scale;
120
- return Object.assign({}, options, {
121
- pointer: pointer,
122
- scale: scale
123
- });
124
- }
125
- }
126
- };
127
- exports.LinearGaugeVue2 = LinearGaugeVue2;
128
- /**
129
- * @hidden
130
- */
131
- var LinearGauge = LinearGaugeVue2;
132
- exports.LinearGauge = LinearGauge;
@@ -1,15 +0,0 @@
1
- import { BaseGaugeProps } from './BaseGaugeProps';
2
- import { LinearPointer, LinearScale } from './types';
3
- /**
4
- * Represents the props of the [Kendo UI for Vue LinearGauge component]({% slug overview_lineargauge_gauges %}).
5
- */
6
- export interface LinearGaugeProps extends BaseGaugeProps {
7
- /**
8
- * The configuration of the pointers ([see example]({% slug multiplepointers_lineargauge %})).
9
- */
10
- pointer: LinearPointer | LinearPointer[];
11
- /**
12
- * The configuration of the scale.
13
- */
14
- scale?: LinearScale;
15
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,43 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- import { RadialGaugeProps } from './RadialGaugeProps';
7
- /**
8
- * @hidden
9
- */
10
- export interface RadialGaugeState {
11
- baseGauge: any;
12
- }
13
- /**
14
- * @hidden
15
- */
16
- export interface RadialGaugeComputed {
17
- [key: string]: any;
18
- }
19
- /**
20
- * @hidden
21
- */
22
- export interface RadialGaugeMethods {
23
- [key: string]: any;
24
- }
25
- /**
26
- * @hidden
27
- */
28
- export interface RadialGaugeData {
29
- }
30
- /**
31
- * @hidden
32
- */
33
- export interface RadialGaugeAll extends Vue2type, RadialGaugeMethods, RadialGaugeData, RadialGaugeComputed, RadialGaugeState {
34
- }
35
- /**
36
- * @hidden
37
- */
38
- declare let RadialGaugeVue2: ComponentOptions<RadialGaugeAll, DefaultData<RadialGaugeData>, DefaultMethods<RadialGaugeAll>, RadialGaugeComputed, RecordPropsDefinition<RadialGaugeProps>>;
39
- /**
40
- * @hidden
41
- */
42
- declare const RadialGauge: DefineComponent<RadialGaugeProps, any, RadialGaugeData, RadialGaugeComputed, RadialGaugeMethods, {}, {}, {}, string, RadialGaugeProps, RadialGaugeProps, {}>;
43
- export { RadialGauge, RadialGaugeVue2 };