@progress/kendo-vue-charts 10.0.1-develop.7 → 10.1.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/dist/cdn/js/kendo-vue-charts.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +6 -11
- package/store/reducer.js +1 -1
- package/store/reducer.mjs +29 -32
- package/tooltip/Series.js +1 -1
- package/tooltip/Series.mjs +1 -3
package/store/reducer.mjs
CHANGED
|
@@ -5,67 +5,64 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
import { setter as n } from "@progress/kendo-vue-common";
|
|
9
|
+
const f = (r, e) => e.chartCollectionIdxKey ? y.collectionConfigurationItem(r, e) : e.chartKey ? y.configurationItem(r, e) : {}, a = (r, e) => {
|
|
9
10
|
if (e.type)
|
|
10
11
|
switch (e.type) {
|
|
11
12
|
case "set":
|
|
12
|
-
return
|
|
13
|
+
return y.themeItem(r, e);
|
|
13
14
|
case "push":
|
|
14
|
-
return Object.assign(
|
|
15
|
+
return Object.assign(r, e.payload);
|
|
15
16
|
default:
|
|
16
|
-
return
|
|
17
|
+
return r;
|
|
17
18
|
}
|
|
18
19
|
else
|
|
19
20
|
return {};
|
|
20
|
-
},
|
|
21
|
+
}, c = (r, e) => {
|
|
21
22
|
if (e.type)
|
|
22
23
|
switch (e.type) {
|
|
23
24
|
case "add":
|
|
24
|
-
return [...
|
|
25
|
+
return [...r, e.payload];
|
|
25
26
|
case "remove":
|
|
26
|
-
return
|
|
27
|
+
return r.filter((l) => l !== e.payload);
|
|
27
28
|
default:
|
|
28
|
-
return
|
|
29
|
+
return r;
|
|
29
30
|
}
|
|
30
31
|
else
|
|
31
32
|
return [];
|
|
32
|
-
},
|
|
33
|
-
configurationItem(
|
|
34
|
-
return
|
|
33
|
+
}, y = {
|
|
34
|
+
configurationItem(r, e) {
|
|
35
|
+
return r[e.chartKey] && Object.keys(r[e.chartKey]).length ? Object.assign(r, {
|
|
35
36
|
[e.chartKey]: {
|
|
36
|
-
...
|
|
37
|
+
...r[e.chartKey],
|
|
37
38
|
...e.payload
|
|
38
39
|
}
|
|
39
|
-
}) : Object.assign(
|
|
40
|
+
}) : Object.assign(r, {
|
|
40
41
|
[e.chartKey]: e.payload
|
|
41
42
|
});
|
|
42
43
|
},
|
|
43
|
-
collectionConfigurationItem(
|
|
44
|
+
collectionConfigurationItem(r, e) {
|
|
44
45
|
let l = !1;
|
|
45
|
-
const [
|
|
46
|
-
if (l === !1 && !e.uid &&
|
|
47
|
-
const
|
|
48
|
-
|
|
46
|
+
const [s, p] = e.chartCollectionIdxKey.split("_"), d = (e.parentKey ? r[e.parentKey] ? r[e.parentKey][s] || [] : [] : r[s] || []).map((o, t) => parseInt(p, 10) === t || e.payload && e.payload.uid === o.uid ? (l = !0, e.payload) : o);
|
|
47
|
+
if (l === !1 && !e.uid && d.splice(parseInt(p, 10), 0, e.payload), e.uid) {
|
|
48
|
+
const o = d.findIndex((t) => t.uid === e.uid);
|
|
49
|
+
o > -1 && d.splice(o, 1);
|
|
49
50
|
}
|
|
50
|
-
return e.parentKey ? Object.assign(
|
|
51
|
+
return e.parentKey ? Object.assign(r, {
|
|
51
52
|
[e.parentKey]: {
|
|
52
|
-
[
|
|
53
|
+
[s]: d
|
|
53
54
|
}
|
|
54
|
-
}) : Object.assign(
|
|
55
|
-
[
|
|
55
|
+
}) : Object.assign(r, {
|
|
56
|
+
[s]: d
|
|
56
57
|
});
|
|
57
58
|
},
|
|
58
|
-
themeItem(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
let r = t.shift();
|
|
62
|
-
for (; t.length > 0; )
|
|
63
|
-
l = l[r] = l[r] || {}, r = t.shift();
|
|
64
|
-
return l[r] = y, d;
|
|
59
|
+
themeItem(r, e) {
|
|
60
|
+
const l = { ...r }, { field: s, value: p } = e.payload;
|
|
61
|
+
return n(s)(l, p), l;
|
|
65
62
|
}
|
|
66
63
|
};
|
|
67
64
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
c as observersReducer,
|
|
66
|
+
f as optionsReducer,
|
|
67
|
+
a as themeReducer
|
|
71
68
|
};
|
package/tooltip/Series.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),l=require("@progress/kendo-vue-common"),u=require("@progress/kendo-charts"),a=require("./Point.js"),h=require("./SharedTooltipContent.js"),d=require("./Popup.js");function c(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!s.isVNode(t)}const f="k-chart-shared-tooltip",S="k-chart-tooltip-inverse",m=s.defineComponent({name:"KendoSeriesTooltip",data(){return{popupShown:!1,popupAlign:void 0,popupOffset:void 0,popupContext:{},popupStyles:void 0,className:void 0,shared:void 0}},inject:{optionsState:{default:{}},observersState:{default:null},dispatchObservers:{default:null}},mounted(){this.chartObserver=new u.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.dispatchObservers({type:"add",payload:this.chartObserver})},unmounted(){this.dispatchObservers({type:"remove",payload:this.chartObserver})},render(){let t;const e=this.popupShown?function(){const n=this.findRenderFunction();if(this.shared){const p=s.createVNode(h.SharedTooltipContent,{categoryText:this.popupContext.categoryText,colorMarker:this.popupContext.colorMarker,colspan:this.popupContext.colspan,nameColumn:this.popupContext.nameColumn,points:this.popupContext.points},null);return l.getTemplate.call(this,{h:s.h,template:n,defaultRendering:p,additionalProps:Object.assign({},this.popupContext)})}else{const p=this.popupContext.point,i=this.findRenderFunctionByIndex(p.series.index),o=s.h("span",
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),l=require("@progress/kendo-vue-common"),u=require("@progress/kendo-charts"),a=require("./Point.js"),h=require("./SharedTooltipContent.js"),d=require("./Popup.js");function c(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!s.isVNode(t)}const f="k-chart-shared-tooltip",S="k-chart-tooltip-inverse",m=s.defineComponent({name:"KendoSeriesTooltip",data(){return{popupShown:!1,popupAlign:void 0,popupOffset:void 0,popupContext:{},popupStyles:void 0,className:void 0,shared:void 0}},inject:{optionsState:{default:{}},observersState:{default:null},dispatchObservers:{default:null}},mounted(){this.chartObserver=new u.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.dispatchObservers({type:"add",payload:this.chartObserver})},unmounted(){this.dispatchObservers({type:"remove",payload:this.chartObserver})},render(){let t;const e=this.popupShown?function(){const n=this.findRenderFunction();if(this.shared){const p=s.createVNode(h.SharedTooltipContent,{categoryText:this.popupContext.categoryText,colorMarker:this.popupContext.colorMarker,colspan:this.popupContext.colspan,nameColumn:this.popupContext.nameColumn,points:this.popupContext.points},null);return l.getTemplate.call(this,{h:s.h,template:n,defaultRendering:p,additionalProps:Object.assign({},this.popupContext)})}else{const p=this.popupContext.point,i=this.findRenderFunctionByIndex(p.series.index),o=s.h("span",this.popupContext.point.formattedValue);return i!==null?l.getTemplate.call(this,{h:s.h,template:i,defaultRendering:o,additionalProps:Object.assign({},this.popupContext)}):n!==null?l.getTemplate.call(this,{h:s.h,template:n,defaultRendering:o,additionalProps:Object.assign({},this.popupContext)}):o}}:Function.prototype,r=l.classNames({[f]:this.shared,[S]:!!this.className});return s.createVNode(d.TooltipPopup,{popupShown:this.popupShown,popupAlign:this.popupAlign,popupOffset:this.popupOffset,popupStyles:this.popupStyles,className:r},c(t=e.call(this))?t:{default:()=>[t]})},methods:{onShowTooltip(t){const{anchor:e,style:r,shared:n,className:p,crosshair:i}=t;let o;i||(n?o=this.createSharedTooltipContext(t):o=this.createTooltipContext(t),this.popupShown=!0,this.popupAlign=e.align,this.popupOffset=e.point,this.popupContext=o,this.popupStyles=r,this.className=p,this.shared=n)},onHideTooltip(){this.popupShown=!1,this.popupStyles={},this.className=void 0},createSharedTooltipContext(t){const{points:e,categoryText:r}=t,n=e.filter(o=>typeof o.series.name!="undefined").length>0,p=t.series.length>1;let i=1;return n&&i++,p&&i++,{categoryText:r,colorMarker:p,colspan:i,nameColumn:n,points:t.points.map(o=>new a.TooltipPoint(o,t.format))}},createTooltipContext(t){const{point:e,format:r}=t;return{point:new a.TooltipPoint(e,r)}},findRenderFunctionByIndex(t){const e=this.optionsState.series;return e!==void 0&&Array.isArray(e)&&e[t]!==void 0&&e[t].hasOwnProperty("tooltip")&&e[t].tooltip.hasOwnProperty("render")?e[t].tooltip.render:null},findRenderFunction(){const t=this.optionsState.tooltip;return t!==void 0&&t.hasOwnProperty("render")?t.render:null}}});exports.SeriesTooltip=m;
|
package/tooltip/Series.mjs
CHANGED
|
@@ -74,9 +74,7 @@ const T = "k-chart-shared-tooltip", y = "k-chart-tooltip-inverse", v = /* @__PUR
|
|
|
74
74
|
additionalProps: Object.assign({}, this.popupContext)
|
|
75
75
|
});
|
|
76
76
|
} else {
|
|
77
|
-
const p = this.popupContext.point, i = this.findRenderFunctionByIndex(p.series.index), o = r("span",
|
|
78
|
-
textContent: this.popupContext.point.formattedValue
|
|
79
|
-
});
|
|
77
|
+
const p = this.popupContext.point, i = this.findRenderFunctionByIndex(p.series.index), o = r("span", this.popupContext.point.formattedValue);
|
|
80
78
|
return i !== null ? l.call(this, {
|
|
81
79
|
h: r,
|
|
82
80
|
template: i,
|