@progress/kendo-vue-charts 10.0.1-develop.7 → 10.1.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.
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
- const i = (s, e) => e.chartCollectionIdxKey ? o.collectionConfigurationItem(s, e) : e.chartKey ? o.configurationItem(s, e) : {}, u = (s, e) => {
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 o.themeItem(s, e);
13
+ return y.themeItem(r, e);
13
14
  case "push":
14
- return Object.assign(s, e.payload);
15
+ return Object.assign(r, e.payload);
15
16
  default:
16
- return s;
17
+ return r;
17
18
  }
18
19
  else
19
20
  return {};
20
- }, f = (s, e) => {
21
+ }, c = (r, e) => {
21
22
  if (e.type)
22
23
  switch (e.type) {
23
24
  case "add":
24
- return [...s, e.payload];
25
+ return [...r, e.payload];
25
26
  case "remove":
26
- return s.filter((l) => l !== e.payload);
27
+ return r.filter((l) => l !== e.payload);
27
28
  default:
28
- return s;
29
+ return r;
29
30
  }
30
31
  else
31
32
  return [];
32
- }, o = {
33
- configurationItem(s, e) {
34
- return s[e.chartKey] && Object.keys(s[e.chartKey]).length ? Object.assign(s, {
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
- ...s[e.chartKey],
37
+ ...r[e.chartKey],
37
38
  ...e.payload
38
39
  }
39
- }) : Object.assign(s, {
40
+ }) : Object.assign(r, {
40
41
  [e.chartKey]: e.payload
41
42
  });
42
43
  },
43
- collectionConfigurationItem(s, e) {
44
+ collectionConfigurationItem(r, e) {
44
45
  let l = !1;
45
- const [d, n] = e.chartCollectionIdxKey.split("_"), t = (e.parentKey ? s[e.parentKey] ? s[e.parentKey][d] || [] : [] : s[d] || []).map((r, p) => parseInt(n, 10) === p || e.payload && e.payload.uid === r.uid ? (l = !0, e.payload) : r);
46
- if (l === !1 && !e.uid && t.splice(parseInt(n, 10), 0, e.payload), e.uid) {
47
- const r = t.findIndex((p) => p.uid === e.uid);
48
- r > -1 && t.splice(r, 1);
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(s, {
51
+ return e.parentKey ? Object.assign(r, {
51
52
  [e.parentKey]: {
52
- [d]: t
53
+ [s]: d
53
54
  }
54
- }) : Object.assign(s, {
55
- [d]: t
55
+ }) : Object.assign(r, {
56
+ [s]: d
56
57
  });
57
58
  },
58
- themeItem(s, e) {
59
- let l = {};
60
- const d = Object.assign(l, s), { field: n, value: y } = e.payload, t = n.split(".");
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
- f as observersReducer,
69
- i as optionsReducer,
70
- u as themeReducer
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",{textContent: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;
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;
@@ -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,