@progress/kendo-vue-gauges 2.7.1 → 2.7.3-dev.202201070829

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 (170) hide show
  1. package/dist/cdn/js/kendo-vue-gauges.js +1 -1
  2. package/dist/es/ArcCenter.d.ts +48 -0
  3. package/dist/es/ArcCenter.js +53 -0
  4. package/dist/es/ArcGauge.d.ts +43 -0
  5. package/dist/es/ArcGauge.js +196 -0
  6. package/dist/es/ArcGaugeProps.d.ts +33 -0
  7. package/dist/es/ArcGaugeProps.js +0 -0
  8. package/dist/es/BaseGauge.d.ts +42 -0
  9. package/dist/es/BaseGauge.js +222 -0
  10. package/dist/es/BaseGaugeProps.d.ts +42 -0
  11. package/dist/es/BaseGaugeProps.js +1 -0
  12. package/dist/es/CircularGauge.d.ts +38 -0
  13. package/dist/es/CircularGauge.js +33 -0
  14. package/dist/es/CircularGaugeProps.d.ts +17 -0
  15. package/dist/es/CircularGaugeProps.js +0 -0
  16. package/dist/es/GaugeContext.d.ts +1 -0
  17. package/dist/es/GaugeContext.js +12 -0
  18. package/dist/es/LinearGauge.d.ts +38 -0
  19. package/dist/es/LinearGauge.js +113 -0
  20. package/dist/es/LinearGaugeProps.d.ts +15 -0
  21. package/dist/es/LinearGaugeProps.js +0 -0
  22. package/dist/es/RadialGauge.d.ts +38 -0
  23. package/dist/es/RadialGauge.js +114 -0
  24. package/dist/es/RadialGaugeProps.d.ts +15 -0
  25. package/dist/es/RadialGaugeProps.js +0 -0
  26. package/dist/es/additionalTypes.ts +3 -0
  27. package/dist/es/common/gauges.d.ts +1 -0
  28. package/dist/es/common/gauges.js +5 -0
  29. package/dist/es/main.d.ts +10 -1
  30. package/dist/es/main.js +7 -8
  31. package/dist/es/package-metadata.js +1 -1
  32. package/dist/es/store/reducer.d.ts +14 -0
  33. package/dist/es/store/reducer.js +100 -0
  34. package/dist/es/store/store.d.ts +26 -0
  35. package/dist/es/store/store.js +28 -0
  36. package/dist/es/theming/theme-service.d.ts +3 -0
  37. package/dist/es/theming/theme-service.js +50 -0
  38. package/dist/es/types/arc-scale.interface.d.ts +28 -0
  39. package/dist/es/types/arc-scale.interface.js +1 -0
  40. package/dist/es/types/border.interface.d.ts +18 -0
  41. package/dist/es/types/border.interface.js +0 -0
  42. package/dist/es/types/cap.interface.d.ts +13 -0
  43. package/dist/es/types/cap.interface.js +0 -0
  44. package/dist/es/types/circular-scale.interface.d.ts +10 -0
  45. package/dist/es/types/circular-scale.interface.js +0 -0
  46. package/dist/es/types/color-range.interface.d.ts +21 -0
  47. package/dist/es/types/color-range.interface.js +0 -0
  48. package/dist/es/types/dash-type.interface.d.ts +4 -0
  49. package/dist/es/types/dash-type.interface.js +0 -0
  50. package/dist/es/types/gauge-area.interface.d.ts +27 -0
  51. package/dist/es/types/gauge-area.interface.js +0 -0
  52. package/dist/es/types/labels.interface.d.ts +47 -0
  53. package/dist/es/types/labels.interface.js +1 -0
  54. package/dist/es/types/line-cap.d.ts +4 -0
  55. package/dist/es/types/line-cap.js +0 -0
  56. package/dist/es/types/line.interface.d.ts +22 -0
  57. package/dist/es/types/line.interface.js +0 -0
  58. package/dist/es/types/linear-pointer-shape.d.ts +4 -0
  59. package/dist/es/types/linear-pointer-shape.js +0 -0
  60. package/dist/es/types/linear-pointer.interface.d.ts +36 -0
  61. package/dist/es/types/linear-pointer.interface.js +0 -0
  62. package/dist/es/types/linear-scale.interface.d.ts +26 -0
  63. package/dist/es/types/linear-scale.interface.js +1 -0
  64. package/dist/es/types/margin.interface.d.ts +21 -0
  65. package/dist/es/types/margin.interface.js +0 -0
  66. package/dist/es/types/padding.interface.d.ts +21 -0
  67. package/dist/es/types/padding.interface.js +0 -0
  68. package/dist/es/types/radial-label-position.d.ts +4 -0
  69. package/dist/es/types/radial-label-position.js +0 -0
  70. package/dist/es/types/radial-labels.interface.d.ts +8 -0
  71. package/dist/es/types/radial-labels.interface.js +0 -0
  72. package/dist/es/types/radial-pointer.interface.d.ts +22 -0
  73. package/dist/es/types/radial-pointer.interface.js +1 -0
  74. package/dist/es/types/radial-scale.interface.d.ts +28 -0
  75. package/dist/es/types/radial-scale.interface.js +1 -0
  76. package/dist/es/types/range.interface.d.ts +21 -0
  77. package/dist/es/types/range.interface.js +0 -0
  78. package/dist/es/types/scale.interface.d.ts +47 -0
  79. package/dist/es/types/scale.interface.js +0 -0
  80. package/dist/es/types/ticks.interface.d.ts +21 -0
  81. package/dist/es/types/ticks.interface.js +1 -0
  82. package/dist/es/types.d.ts +21 -0
  83. package/dist/es/types.js +0 -0
  84. package/dist/es/utils/common.d.ts +1 -0
  85. package/dist/es/utils/common.js +36 -0
  86. package/dist/npm/ArcCenter.d.ts +48 -0
  87. package/dist/npm/ArcCenter.js +63 -0
  88. package/dist/npm/ArcGauge.d.ts +43 -0
  89. package/dist/npm/ArcGauge.js +210 -0
  90. package/dist/npm/ArcGaugeProps.d.ts +33 -0
  91. package/dist/npm/ArcGaugeProps.js +5 -0
  92. package/dist/npm/BaseGauge.d.ts +42 -0
  93. package/dist/npm/BaseGauge.js +238 -0
  94. package/dist/npm/BaseGaugeProps.d.ts +42 -0
  95. package/dist/npm/BaseGaugeProps.js +5 -0
  96. package/dist/npm/CircularGauge.d.ts +38 -0
  97. package/dist/npm/CircularGauge.js +44 -0
  98. package/dist/npm/CircularGaugeProps.d.ts +17 -0
  99. package/dist/npm/CircularGaugeProps.js +5 -0
  100. package/dist/npm/GaugeContext.d.ts +1 -0
  101. package/dist/npm/GaugeContext.js +13 -0
  102. package/dist/npm/LinearGauge.d.ts +38 -0
  103. package/dist/npm/LinearGauge.js +126 -0
  104. package/dist/npm/LinearGaugeProps.d.ts +15 -0
  105. package/dist/npm/LinearGaugeProps.js +5 -0
  106. package/dist/npm/RadialGauge.d.ts +38 -0
  107. package/dist/npm/RadialGauge.js +127 -0
  108. package/dist/npm/RadialGaugeProps.d.ts +15 -0
  109. package/dist/npm/RadialGaugeProps.js +5 -0
  110. package/dist/npm/additionalTypes.ts +3 -0
  111. package/dist/npm/common/gauges.d.ts +1 -0
  112. package/dist/npm/common/gauges.js +5 -0
  113. package/dist/npm/main.d.ts +10 -1
  114. package/dist/npm/main.js +21 -8
  115. package/dist/npm/package-metadata.js +1 -1
  116. package/dist/npm/store/reducer.d.ts +14 -0
  117. package/dist/npm/store/reducer.js +105 -0
  118. package/dist/npm/store/store.d.ts +26 -0
  119. package/dist/npm/store/store.js +31 -0
  120. package/dist/npm/theming/theme-service.d.ts +3 -0
  121. package/dist/npm/theming/theme-service.js +53 -0
  122. package/dist/npm/types/arc-scale.interface.d.ts +28 -0
  123. package/dist/npm/types/arc-scale.interface.js +3 -0
  124. package/dist/npm/types/border.interface.d.ts +18 -0
  125. package/dist/npm/types/border.interface.js +2 -0
  126. package/dist/npm/types/cap.interface.d.ts +13 -0
  127. package/dist/npm/types/cap.interface.js +2 -0
  128. package/dist/npm/types/circular-scale.interface.d.ts +10 -0
  129. package/dist/npm/types/circular-scale.interface.js +2 -0
  130. package/dist/npm/types/color-range.interface.d.ts +21 -0
  131. package/dist/npm/types/color-range.interface.js +2 -0
  132. package/dist/npm/types/dash-type.interface.d.ts +4 -0
  133. package/dist/npm/types/dash-type.interface.js +2 -0
  134. package/dist/npm/types/gauge-area.interface.d.ts +27 -0
  135. package/dist/npm/types/gauge-area.interface.js +2 -0
  136. package/dist/npm/types/labels.interface.d.ts +47 -0
  137. package/dist/npm/types/labels.interface.js +3 -0
  138. package/dist/npm/types/line-cap.d.ts +4 -0
  139. package/dist/npm/types/line-cap.js +2 -0
  140. package/dist/npm/types/line.interface.d.ts +22 -0
  141. package/dist/npm/types/line.interface.js +2 -0
  142. package/dist/npm/types/linear-pointer-shape.d.ts +4 -0
  143. package/dist/npm/types/linear-pointer-shape.js +2 -0
  144. package/dist/npm/types/linear-pointer.interface.d.ts +36 -0
  145. package/dist/npm/types/linear-pointer.interface.js +2 -0
  146. package/dist/npm/types/linear-scale.interface.d.ts +26 -0
  147. package/dist/npm/types/linear-scale.interface.js +3 -0
  148. package/dist/npm/types/margin.interface.d.ts +21 -0
  149. package/dist/npm/types/margin.interface.js +2 -0
  150. package/dist/npm/types/padding.interface.d.ts +21 -0
  151. package/dist/npm/types/padding.interface.js +2 -0
  152. package/dist/npm/types/radial-label-position.d.ts +4 -0
  153. package/dist/npm/types/radial-label-position.js +2 -0
  154. package/dist/npm/types/radial-labels.interface.d.ts +8 -0
  155. package/dist/npm/types/radial-labels.interface.js +2 -0
  156. package/dist/npm/types/radial-pointer.interface.d.ts +22 -0
  157. package/dist/npm/types/radial-pointer.interface.js +3 -0
  158. package/dist/npm/types/radial-scale.interface.d.ts +28 -0
  159. package/dist/npm/types/radial-scale.interface.js +3 -0
  160. package/dist/npm/types/range.interface.d.ts +21 -0
  161. package/dist/npm/types/range.interface.js +2 -0
  162. package/dist/npm/types/scale.interface.d.ts +47 -0
  163. package/dist/npm/types/scale.interface.js +2 -0
  164. package/dist/npm/types/ticks.interface.d.ts +21 -0
  165. package/dist/npm/types/ticks.interface.js +3 -0
  166. package/dist/npm/types.d.ts +21 -0
  167. package/dist/npm/types.js +2 -0
  168. package/dist/npm/utils/common.d.ts +1 -0
  169. package/dist/npm/utils/common.js +39 -0
  170. package/package.json +7 -7
@@ -0,0 +1,38 @@
1
+ import { DefineComponent } from './additionalTypes';
2
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
3
+ declare type DefaultData<V> = object | ((this: V) => {});
4
+ declare type DefaultMethods<V> = {
5
+ [key: string]: (this: V, ...args: any[]) => any;
6
+ };
7
+ import { CircularGaugeProps } from './CircularGaugeProps';
8
+ import { ArcGaugeState, ArcGaugeComputed, ArcGaugeMethods, ArcGaugeData } from './ArcGauge';
9
+ /**
10
+ * @hidden
11
+ */
12
+ export interface CircularGaugeState extends ArcGaugeState {
13
+ }
14
+ /**
15
+ * @hidden
16
+ */
17
+ export interface CircularGaugeComputed extends ArcGaugeComputed {
18
+ [key: string]: any;
19
+ }
20
+ /**
21
+ * @hidden
22
+ */
23
+ export interface CircularGaugeMethods extends ArcGaugeMethods {
24
+ [key: string]: any;
25
+ }
26
+ /**
27
+ * @hidden
28
+ */
29
+ export interface CircularGaugeData extends ArcGaugeData {
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ export interface CircularGaugeAll extends Vue, CircularGaugeMethods, CircularGaugeData, CircularGaugeComputed, CircularGaugeState {
35
+ }
36
+ declare let CircularGauge: ComponentOptions<CircularGaugeAll, DefaultData<CircularGaugeData>, DefaultMethods<CircularGaugeAll>, CircularGaugeComputed, RecordPropsDefinition<CircularGaugeProps>>;
37
+ declare const CircularGaugeVue3: DefineComponent<CircularGaugeProps, any, CircularGaugeData, CircularGaugeComputed, CircularGaugeMethods, {}, {}, {}, string, CircularGaugeProps, CircularGaugeProps, {}>;
38
+ export { CircularGauge, CircularGaugeVue3 };
@@ -0,0 +1,33 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+
6
+ for (var p in s) {
7
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
+ }
9
+ }
10
+
11
+ return t;
12
+ };
13
+
14
+ return __assign.apply(this, arguments);
15
+ }; // @ts-ignore
16
+
17
+
18
+ import * as Vue from 'vue';
19
+ var allVue = Vue;
20
+ var gh = allVue.h;
21
+ import { ArcGauge } from './ArcGauge';
22
+ import { CircularGauge as KendoCircularGauge } from '@progress/kendo-charts'; // tslint:enable:max-line-length
23
+
24
+ var CircularGauge = __assign(__assign({}, ArcGauge), {
25
+ name: 'KendoCircularGauge',
26
+ created: function created() {
27
+ this.gaugeType = KendoCircularGauge;
28
+ this.arcCenterStyles = {};
29
+ }
30
+ });
31
+
32
+ var CircularGaugeVue3 = CircularGauge;
33
+ export { CircularGauge, CircularGaugeVue3 };
@@ -0,0 +1,17 @@
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 [KendoReact 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
+ }
File without changes
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,12 @@
1
+ // import { Store } from './store/store';
2
+ // /**
3
+ // * @hidden
4
+ // */
5
+ // export interface GaugeContextType {
6
+ // observersStore: Store;
7
+ // }
8
+ // /**
9
+ // * @hidden
10
+ // */
11
+ // export const GaugeContext = React.createContext<GaugeContextType | null>(null);
12
+ // GaugeContext.displayName = 'GaugeContext';
@@ -0,0 +1,38 @@
1
+ import { DefineComponent } from './additionalTypes';
2
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
3
+ declare type DefaultData<V> = object | ((this: V) => {});
4
+ declare type DefaultMethods<V> = {
5
+ [key: string]: (this: V, ...args: any[]) => any;
6
+ };
7
+ import { LinearGaugeProps } from './LinearGaugeProps';
8
+ /**
9
+ * @hidden
10
+ */
11
+ export interface LinearGaugeState {
12
+ baseGauge: any;
13
+ }
14
+ /**
15
+ * @hidden
16
+ */
17
+ export interface LinearGaugeComputed {
18
+ [key: string]: any;
19
+ }
20
+ /**
21
+ * @hidden
22
+ */
23
+ export interface LinearGaugeMethods {
24
+ [key: string]: any;
25
+ }
26
+ /**
27
+ * @hidden
28
+ */
29
+ export interface LinearGaugeData {
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ export interface LinearGaugeAll extends Vue, LinearGaugeMethods, LinearGaugeData, LinearGaugeComputed, LinearGaugeState {
35
+ }
36
+ declare let LinearGauge: ComponentOptions<LinearGaugeAll, DefaultData<LinearGaugeData>, DefaultMethods<LinearGaugeAll>, LinearGaugeComputed, RecordPropsDefinition<LinearGaugeProps>>;
37
+ declare const LinearGaugeVue3: DefineComponent<LinearGaugeProps, any, LinearGaugeData, LinearGaugeComputed, LinearGaugeMethods, {}, {}, {}, string, LinearGaugeProps, LinearGaugeProps, {}>;
38
+ export { LinearGauge, LinearGaugeVue3 };
@@ -0,0 +1,113 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ import { BaseGauge } from './BaseGauge';
6
+ import { LinearGauge as KendoLinearGauge } from '@progress/kendo-charts';
7
+ import { Group } from '@progress/kendo-drawing';
8
+ import { getDefaultSlots } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length
9
+
10
+ var LinearGauge = {
11
+ name: 'KendoLinearGauge',
12
+ props: {
13
+ dir: String,
14
+ renderAs: {
15
+ type: String,
16
+ default: 'svg',
17
+ validator: function validator(value) {
18
+ return ['svg', 'canvas'].includes(value);
19
+ }
20
+ },
21
+ gaugeConstructor: [Object, Function],
22
+ pointer: {
23
+ type: [Object, Array],
24
+ default: undefined
25
+ },
26
+ scale: {
27
+ type: Object,
28
+ default: undefined
29
+ }
30
+ },
31
+ mounted: function mounted() {
32
+ this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
33
+ },
34
+ updated: function updated() {
35
+ this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
36
+ },
37
+ // @ts-ignore
38
+ setup: !gh ? undefined : function () {
39
+ var v3 = !!gh;
40
+ return {
41
+ v3: v3
42
+ };
43
+ },
44
+ // @ts-ignore
45
+ render: function render(createElement) {
46
+ var _this = this;
47
+
48
+ var h = gh || createElement;
49
+ var defaultSlots = getDefaultSlots(this);
50
+ return (// @ts-ignore function children
51
+ h(BaseGauge, {
52
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
53
+ attrs: this.v3 ? undefined : {
54
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
55
+ gaugeConstructor: KendoLinearGauge,
56
+ getTarget: this.getTarget
57
+ },
58
+ ref: this.v3 ? function (el) {
59
+ _this.baseGaugeRef = el;
60
+ } : 'baseGauge',
61
+ gaugeConstructor: KendoLinearGauge,
62
+ getTarget: this.getTarget,
63
+ "class": 'k-gauge'
64
+ }, this.v3 ? function () {
65
+ return [defaultSlots];
66
+ } : [defaultSlots])
67
+ );
68
+ },
69
+ methods: {
70
+ gaugeInstance: function gaugeInstance() {
71
+ if (this._baseGauge !== null) {
72
+ return this._baseGauge.gaugeInstance;
73
+ }
74
+
75
+ return null;
76
+ },
77
+ surface: function surface() {
78
+ if (this._baseGauge !== null) {
79
+ return this._baseGauge.surface;
80
+ }
81
+
82
+ return null;
83
+ },
84
+ element: function element() {
85
+ if (this._baseGauge !== null) {
86
+ return this._baseGauge.element;
87
+ }
88
+
89
+ return null;
90
+ },
91
+ exportVisual: function exportVisual(options) {
92
+ if (this.gaugeInstance !== null) {
93
+ return Promise.resolve(this.gaugeInstance.exportVisual(options));
94
+ }
95
+
96
+ return Promise.resolve(new Group());
97
+ },
98
+ getTarget: function getTarget() {
99
+ return this;
100
+ },
101
+ deriveOptionsFromParent: function deriveOptionsFromParent(options) {
102
+ var _a = this.$props,
103
+ pointer = _a.pointer,
104
+ scale = _a.scale;
105
+ return Object.assign({}, options, {
106
+ pointer: pointer,
107
+ scale: scale
108
+ });
109
+ }
110
+ }
111
+ };
112
+ var LinearGaugeVue3 = LinearGauge;
113
+ export { LinearGauge, LinearGaugeVue3 };
@@ -0,0 +1,15 @@
1
+ import { BaseGaugeProps } from './BaseGaugeProps';
2
+ import { LinearPointer, LinearScale } from './types';
3
+ /**
4
+ * Represents the props of the [KendoReact 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
+ }
File without changes
@@ -0,0 +1,38 @@
1
+ import { DefineComponent } from './additionalTypes';
2
+ import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
3
+ declare type DefaultData<V> = object | ((this: V) => {});
4
+ declare type DefaultMethods<V> = {
5
+ [key: string]: (this: V, ...args: any[]) => any;
6
+ };
7
+ import { RadialGaugeProps } from './RadialGaugeProps';
8
+ /**
9
+ * @hidden
10
+ */
11
+ export interface RadialGaugeState {
12
+ baseGauge: any;
13
+ }
14
+ /**
15
+ * @hidden
16
+ */
17
+ export interface RadialGaugeComputed {
18
+ [key: string]: any;
19
+ }
20
+ /**
21
+ * @hidden
22
+ */
23
+ export interface RadialGaugeMethods {
24
+ [key: string]: any;
25
+ }
26
+ /**
27
+ * @hidden
28
+ */
29
+ export interface RadialGaugeData {
30
+ }
31
+ /**
32
+ * @hidden
33
+ */
34
+ export interface RadialGaugeAll extends Vue, RadialGaugeMethods, RadialGaugeData, RadialGaugeComputed, RadialGaugeState {
35
+ }
36
+ declare let RadialGauge: ComponentOptions<RadialGaugeAll, DefaultData<RadialGaugeData>, DefaultMethods<RadialGaugeAll>, RadialGaugeComputed, RecordPropsDefinition<RadialGaugeProps>>;
37
+ declare const RadialGaugeVue3: DefineComponent<RadialGaugeProps, any, RadialGaugeData, RadialGaugeComputed, RadialGaugeMethods, {}, {}, {}, string, RadialGaugeProps, RadialGaugeProps, {}>;
38
+ export { RadialGauge, RadialGaugeVue3 };
@@ -0,0 +1,114 @@
1
+ // @ts-ignore
2
+ import * as Vue from 'vue';
3
+ var allVue = Vue;
4
+ var gh = allVue.h;
5
+ import { BaseGauge } from './BaseGauge';
6
+ import { RadialGauge as KendoRadialGauge } from '@progress/kendo-charts';
7
+ import { Group } from '@progress/kendo-drawing';
8
+ import { getDefaultSlots } from '@progress/kendo-vue-common'; // tslint:enable:max-line-length
9
+
10
+ var RadialGauge = {
11
+ name: 'KendoRadialGauge',
12
+ props: {
13
+ dir: String,
14
+ renderAs: {
15
+ type: String,
16
+ default: 'svg',
17
+ validator: function validator(value) {
18
+ return ['svg', 'canvas'].includes(value);
19
+ }
20
+ },
21
+ gaugeConstructor: [Object, Function],
22
+ pointer: {
23
+ type: [Object, Array],
24
+ default: undefined
25
+ },
26
+ scale: {
27
+ type: Object,
28
+ default: undefined
29
+ }
30
+ },
31
+ mounted: function mounted() {
32
+ this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
33
+ },
34
+ updated: function updated() {
35
+ this._baseGauge = this.v3 ? this.baseGaugeRef : this.$refs.baseGauge;
36
+ },
37
+ // @ts-ignore
38
+ setup: !gh ? undefined : function () {
39
+ var v3 = !!gh;
40
+ return {
41
+ v3: v3
42
+ };
43
+ },
44
+ // @ts-ignore
45
+ render: function render(createElement) {
46
+ var _this = this;
47
+
48
+ var h = gh || createElement;
49
+ var defaultSlots = getDefaultSlots(this);
50
+ var className = this.$props.className;
51
+ return (// @ts-ignore function children
52
+ h(BaseGauge, {
53
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
54
+ attrs: this.v3 ? undefined : {
55
+ deriveOptionsFromParent: this.deriveOptionsFromParent,
56
+ gaugeConstructor: KendoRadialGauge,
57
+ getTarget: this.getTarget
58
+ },
59
+ ref: this.v3 ? function (el) {
60
+ _this.baseGaugeRef = el;
61
+ } : 'baseGauge',
62
+ gaugeConstructor: KendoRadialGauge,
63
+ getTarget: this.getTarget,
64
+ "class": 'k-gauge'
65
+ }, this.v3 ? function () {
66
+ return [defaultSlots];
67
+ } : [defaultSlots])
68
+ );
69
+ },
70
+ methods: {
71
+ gaugeInstance: function gaugeInstance() {
72
+ if (this._baseGauge !== null) {
73
+ return this._baseGauge.gaugeInstance;
74
+ }
75
+
76
+ return null;
77
+ },
78
+ surface: function surface() {
79
+ if (this._baseGauge !== null) {
80
+ return this._baseGauge.surface;
81
+ }
82
+
83
+ return null;
84
+ },
85
+ element: function element() {
86
+ if (this._baseGauge !== null) {
87
+ return this._baseGauge.element;
88
+ }
89
+
90
+ return null;
91
+ },
92
+ exportVisual: function exportVisual(options) {
93
+ if (this.gaugeInstance !== null) {
94
+ return Promise.resolve(this.gaugeInstance.exportVisual(options));
95
+ }
96
+
97
+ return Promise.resolve(new Group());
98
+ },
99
+ getTarget: function getTarget() {
100
+ return this;
101
+ },
102
+ deriveOptionsFromParent: function deriveOptionsFromParent(options) {
103
+ var _a = this.$props,
104
+ pointer = _a.pointer,
105
+ scale = _a.scale;
106
+ return Object.assign({}, options, {
107
+ pointer: pointer,
108
+ scale: scale
109
+ });
110
+ }
111
+ }
112
+ };
113
+ var RadialGaugeVue3 = RadialGauge;
114
+ export { RadialGauge, RadialGaugeVue3 };
@@ -0,0 +1,15 @@
1
+ import { BaseGaugeProps } from './BaseGaugeProps';
2
+ import { RadialPointer, RadialScale } from './types';
3
+ /**
4
+ * Represents the props of the [KendoReact RadialGauge component]({% slug overview_radialgauge_gauges %}).
5
+ */
6
+ export interface RadialGaugeProps extends BaseGaugeProps {
7
+ /**
8
+ * The configuration of the pointers ([see example]({% slug multiplepointers_radialgauge %})).
9
+ */
10
+ pointer: RadialPointer | RadialPointer[];
11
+ /**
12
+ * The configuration of the scale.
13
+ */
14
+ scale?: RadialScale;
15
+ }
File without changes
@@ -0,0 +1,3 @@
1
+ // @ts-ignore
2
+ import { DefineComponent } from 'vue';
3
+ export { DefineComponent };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ // import { ArcGauge } from './../ArcGauge';
2
+ // import { LinearGauge } from './../LinearGauge';
3
+ // import { RadialGauge } from './../RadialGauge';
4
+ // type Gauges = ArcGauge | LinearGauge | RadialGauge;
5
+ // export { Gauges };
package/dist/es/main.d.ts CHANGED
@@ -1 +1,10 @@
1
- export {};
1
+ import { ArcGauge } from './ArcGauge';
2
+ import { ArcGaugeProps } from './ArcGaugeProps';
3
+ import { CircularGauge } from './CircularGauge';
4
+ import { CircularGaugeProps } from './CircularGaugeProps';
5
+ import { LinearGauge } from './LinearGauge';
6
+ import { LinearGaugeProps } from './LinearGaugeProps';
7
+ import { RadialGauge } from './RadialGauge';
8
+ import { RadialGaugeProps } from './RadialGaugeProps';
9
+ export * from './types';
10
+ export { ArcGauge, ArcGaugeProps, CircularGauge, CircularGaugeProps, LinearGauge, LinearGaugeProps, RadialGauge, RadialGaugeProps };
package/dist/es/main.js CHANGED
@@ -1,8 +1,7 @@
1
- // import { ArcGauge } from './ArcGauge';
2
- // import { ArcGaugeProps } from './ArcGaugeProps';
3
- // import { CircularGauge } from './CircularGauge';
4
- // import { CircularGaugeProps } from './CircularGaugeProps';
5
- // import { LinearGauge } from './LinearGauge';
6
- // import { LinearGaugeProps } from './LinearGaugeProps';
7
- // import { RadialGauge } from './RadialGauge';
8
- // import { RadialGaugeProps } from './RadialGaugeProps';
1
+ import { ArcGauge } from './ArcGauge';
2
+ import { CircularGauge } from './CircularGauge';
3
+ import { LinearGauge } from './LinearGauge';
4
+ import { RadialGauge } from './RadialGauge';
5
+ // export * from './common/gauges';
6
+ export * from './types';
7
+ export { ArcGauge, CircularGauge, LinearGauge, RadialGauge };
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-gauges',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1640003918,
8
+ publishDate: 1641543705,
9
9
  version: '',
10
10
  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'
11
11
  };
@@ -0,0 +1,14 @@
1
+ import { StoreAction } from './store';
2
+ /**
3
+ * @hidden
4
+ */
5
+ declare const optionsReducer: (currentState: any, action: StoreAction) => object;
6
+ /**
7
+ * @hidden
8
+ */
9
+ declare const themeReducer: (currentState: any, action: StoreAction) => any;
10
+ /**
11
+ * @hidden
12
+ */
13
+ declare const observersReducer: (currentState: any, action: StoreAction) => any;
14
+ export { optionsReducer, themeReducer, observersReducer };
@@ -0,0 +1,100 @@
1
+ var __spreadArrays = (this && this.__spreadArrays) || function () {
2
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
4
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
5
+ r[k] = a[j];
6
+ return r;
7
+ };
8
+ /**
9
+ * @hidden
10
+ */
11
+ var optionsReducer = function (currentState, action) {
12
+ if (action.gaugeCollectionIdxKey) {
13
+ return reducers.collectionConfigurationItem(currentState, action);
14
+ }
15
+ else if (action.gaugeKey) {
16
+ return reducers.configurationItem(currentState, action);
17
+ }
18
+ else {
19
+ return {};
20
+ }
21
+ };
22
+ /**
23
+ * @hidden
24
+ */
25
+ var themeReducer = function (currentState, action) {
26
+ if (action.type) {
27
+ switch (action.type) {
28
+ case 'set':
29
+ return reducers.themeItem(currentState, action);
30
+ case 'push':
31
+ return Object.assign(currentState, action.payload);
32
+ default:
33
+ return currentState;
34
+ }
35
+ }
36
+ else {
37
+ return {};
38
+ }
39
+ };
40
+ /**
41
+ * @hidden
42
+ */
43
+ var observersReducer = function (currentState, action) {
44
+ if (action.type) {
45
+ switch (action.type) {
46
+ case 'add':
47
+ return __spreadArrays(currentState, [action.payload]);
48
+ case 'remove':
49
+ return currentState.filter(function (element) { return element !== action.payload; });
50
+ default:
51
+ return currentState;
52
+ }
53
+ }
54
+ else {
55
+ return [];
56
+ }
57
+ };
58
+ /**
59
+ * @hidden
60
+ */
61
+ var reducers = {
62
+ configurationItem: function (currentState, action) {
63
+ var _a;
64
+ return Object.assign(currentState, (_a = {},
65
+ _a[action.gaugeKey] = action.payload,
66
+ _a));
67
+ },
68
+ collectionConfigurationItem: function (currentState, action) {
69
+ var _a;
70
+ var inCollection = false;
71
+ var _b = action.gaugeCollectionIdxKey.split('_'), collectionName = _b[0], collectionIdx = _b[1];
72
+ var collection = currentState[collectionName].map(function (item, index) {
73
+ if (parseInt(collectionIdx, 10) === index) {
74
+ inCollection = true;
75
+ return action.payload;
76
+ }
77
+ return item;
78
+ });
79
+ if (inCollection === false) {
80
+ collection.splice(parseInt(collectionIdx, 10), 0, action.payload);
81
+ }
82
+ return Object.assign(currentState, (_a = {},
83
+ _a[collectionName] = collection,
84
+ _a));
85
+ },
86
+ themeItem: function (currentState, action) {
87
+ var store = {};
88
+ var nextStore = Object.assign(store, currentState);
89
+ var _a = action.payload, field = _a.field, value = _a.value;
90
+ var parts = field.split('.');
91
+ var key = parts.shift();
92
+ while (parts.length > 0) {
93
+ store = store[key] = store[key] || {};
94
+ key = parts.shift();
95
+ }
96
+ store[key] = value;
97
+ return nextStore;
98
+ }
99
+ };
100
+ export { optionsReducer, themeReducer, observersReducer };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @hidden
3
+ */
4
+ export declare const THROTTLE_MS: number;
5
+ /**
6
+ * @hidden
7
+ */
8
+ export interface StoreAction {
9
+ gaugeKey?: string;
10
+ gaugeCollectionIdxKey?: string;
11
+ type?: string;
12
+ payload: any;
13
+ }
14
+ /**
15
+ * @hidden
16
+ */
17
+ export interface Store {
18
+ getState(): any;
19
+ dispatch(action: StoreAction | object): void;
20
+ subscribe(f: Function): Function;
21
+ }
22
+ /**
23
+ * @hidden
24
+ */
25
+ declare const createStore: (reducer: any) => Store;
26
+ export default createStore;
@@ -0,0 +1,28 @@
1
+ import { canUseDOM } from '@progress/kendo-vue-common';
2
+ /**
3
+ * @hidden
4
+ */
5
+ export var THROTTLE_MS = 1000 / 60;
6
+ /**
7
+ * @hidden
8
+ */
9
+ var createStore = function (reducer) {
10
+ var state;
11
+ var timerId;
12
+ var listeners = [];
13
+ var getState = function () { return state; };
14
+ var dispatch = function (action) {
15
+ state = reducer(state, action);
16
+ if (canUseDOM) {
17
+ window.clearTimeout(timerId);
18
+ timerId = window.setTimeout(function () { return listeners.forEach(function (l) { return l(); }); }, THROTTLE_MS);
19
+ }
20
+ };
21
+ var subscribe = function (listener) {
22
+ listeners.push(listener);
23
+ return function () { return listeners = listeners.filter(function (l) { return l !== listener; }); };
24
+ };
25
+ dispatch({});
26
+ return { getState: getState, dispatch: dispatch, subscribe: subscribe };
27
+ };
28
+ export default createStore;