@progress/kendo-vue-charts 10.0.1-develop.6 → 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",{innerHTML: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;
@@ -11,10 +11,10 @@ import { InstanceObserver as f } from "@progress/kendo-charts";
11
11
  import { TooltipPoint as u } from "./Point.mjs";
12
12
  import { SharedTooltipContent as m } from "./SharedTooltipContent.mjs";
13
13
  import { TooltipPopup as S } from "./Popup.mjs";
14
- function T(t) {
14
+ function C(t) {
15
15
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !d(t);
16
16
  }
17
- const C = "k-chart-shared-tooltip", y = "k-chart-tooltip-inverse", v = /* @__PURE__ */ h({
17
+ const T = "k-chart-shared-tooltip", y = "k-chart-tooltip-inverse", v = /* @__PURE__ */ h({
18
18
  name: "KendoSeriesTooltip",
19
19
  // static contextType = ChartContext;
20
20
  data() {
@@ -74,9 +74,7 @@ const C = "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
- innerHTML: 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,
@@ -90,7 +88,7 @@ const C = "k-chart-shared-tooltip", y = "k-chart-tooltip-inverse", v = /* @__PUR
90
88
  }) : o;
91
89
  }
92
90
  } : Function.prototype, s = c({
93
- [C]: this.shared,
91
+ [T]: this.shared,
94
92
  [y]: !!this.className
95
93
  });
96
94
  return a(S, {
@@ -99,7 +97,7 @@ const C = "k-chart-shared-tooltip", y = "k-chart-tooltip-inverse", v = /* @__PUR
99
97
  popupOffset: this.popupOffset,
100
98
  popupStyles: this.popupStyles,
101
99
  className: s
102
- }, T(t = e.call(this)) ? t : {
100
+ }, C(t = e.call(this)) ? t : {
103
101
  default: () => [t]
104
102
  });
105
103
  },
@@ -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 e=require("vue"),u="k-chart-shared-tooltip-marker",p=e.defineComponent({name:"KendoSharedTooltipPopup",props:{categoryText:String,colorMarker:{type:Boolean,default:void 0},colspan:Number,nameColumn:{type:Boolean,default:void 0},points:Array},render(){const{categoryText:o,colorMarker:n,colspan:r,nameColumn:a,points:l}=this.$props,d=function(t,c){const s=e.h("span",{innerHTML:t.formattedValue});return e.createVNode("tr",{key:c},[n&&e.createVNode("td",null,[e.createVNode("span",{class:u,style:{backgroundColor:t.series.color}},null)]),a&&e.createVNode("td",null,[t.series.name]),s])};return e.createVNode("table",null,[e.createVNode("thead",null,[e.createVNode("tr",null,[e.createVNode("th",{colspan:r},[o])])]),e.createVNode("tbody",null,[l.map(d.bind(this),this)])])}});exports.SharedTooltipContent=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u="k-chart-shared-tooltip-marker",p=e.defineComponent({name:"KendoSharedTooltipPopup",props:{categoryText:String,colorMarker:{type:Boolean,default:void 0},colspan:Number,nameColumn:{type:Boolean,default:void 0},points:Array},render(){const{categoryText:o,colorMarker:r,colspan:n,nameColumn:a,points:l}=this.$props,d=function(t,c){const s=e.createVNode("td",null,[t.formattedValue]);return e.createVNode("tr",{key:c},[r&&e.createVNode("td",null,[e.createVNode("span",{class:u,style:{backgroundColor:t.series.color}},null)]),a&&e.createVNode("td",null,[t.series.name]),s])};return e.createVNode("table",null,[e.createVNode("thead",null,[e.createVNode("tr",null,[e.createVNode("th",{colspan:n},[o])])]),e.createVNode("tbody",null,[l.map(d.bind(this),this)])])}});exports.SharedTooltipContent=p;
@@ -5,8 +5,8 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as u, createVNode as e, h as c } from "vue";
9
- const i = "k-chart-shared-tooltip-marker", h = /* @__PURE__ */ u({
8
+ import { defineComponent as p, createVNode as e } from "vue";
9
+ const c = "k-chart-shared-tooltip-marker", m = /* @__PURE__ */ p({
10
10
  name: "KendoSharedTooltipPopup",
11
11
  props: {
12
12
  categoryText: String,
@@ -23,29 +23,27 @@ const i = "k-chart-shared-tooltip-marker", h = /* @__PURE__ */ u({
23
23
  },
24
24
  render() {
25
25
  const {
26
- categoryText: o,
27
- colorMarker: t,
26
+ categoryText: t,
27
+ colorMarker: n,
28
28
  colspan: r,
29
29
  nameColumn: l,
30
30
  points: a
31
- } = this.$props, s = function(n, p) {
32
- const d = c("span", {
33
- innerHTML: n.formattedValue
34
- });
31
+ } = this.$props, s = function(o, d) {
32
+ const u = e("td", null, [o.formattedValue]);
35
33
  return e("tr", {
36
- key: p
37
- }, [t && e("td", null, [e("span", {
38
- class: i,
34
+ key: d
35
+ }, [n && e("td", null, [e("span", {
36
+ class: c,
39
37
  style: {
40
- backgroundColor: n.series.color
38
+ backgroundColor: o.series.color
41
39
  }
42
- }, null)]), l && e("td", null, [n.series.name]), d]);
40
+ }, null)]), l && e("td", null, [o.series.name]), u]);
43
41
  };
44
42
  return e("table", null, [e("thead", null, [e("tr", null, [e("th", {
45
43
  colspan: r
46
- }, [o])])]), e("tbody", null, [a.map(s.bind(this), this)])]);
44
+ }, [t])])]), e("tbody", null, [a.map(s.bind(this), this)])]);
47
45
  }
48
46
  });
49
47
  export {
50
- h as SharedTooltipContent
48
+ m as SharedTooltipContent
51
49
  };