@progress/kendo-vue-charts 6.1.0-develop.6 → 6.1.0-develop.7

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/BaseChart.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 l=require("vue"),v=require("@progress/kendo-vue-intl"),m=require("@progress/kendo-charts"),h=require("@progress/kendo-vue-common"),c=require("./utils/main.js"),b=require("./events/chart-event-builder.js"),S=require("./events/dom-event.js"),O=require("./theming/theme-service.js"),C=require("./store/store.js"),d=require("./store/reducer.js"),I=require("./tooltip/Series.js"),y=require("./tooltip/CrosshairContainer.js"),g=require("./package-metadata.js"),k=l.defineComponent({name:"KendoBaseChart",props:{deriveOptionsFromParent:{type:Function,default:void 0},chartConstructor:{type:[Object,Function],default:void 0},className:String,chartStyle:Object,wrapper:String,getTarget:{type:Function,default:void 0},dataItems:{type:Array,default:void 0},dir:String,renderAs:{type:String,default:void 0,validator:function(e){return["svg","canvas"].includes(e)}},pannable:{type:[Boolean,Object],default:void 0},zoomable:{type:[Boolean,Object],default:void 0},seriesColors:{type:Array,default:void 0},transitions:{type:Boolean,default:!0},paneDefaults:{type:Object,default:void 0},panes:{type:Array,default:void 0},seriesDefaults:{type:Object,default:void 0},axisDefaults:{type:Object,default:void 0},allListeners:{type:Object,default:void 0},onLegenditemclick:Function,onBasechartevent:Function,onRefresh:Function},inject:{kendoIntlService:{default:null}},provide(){return{optionsState:this.optionsState,dispatchOptions:this.dispatchOptions,observersState:this.observersState,dispatchObservers:this.dispatchObservers,childrenObserver:this.childrenObserver,chartRefresh:this.refresh}},created(){this.chartInstance=null,this.element=null,this.suppressTransitions=!1,h.validatePackage(g.packageMetadata),this.showLicenseWatermark=h.shouldShowValidationUI(g.packageMetadata),this.themeStore=C.default(d.themeReducer),this.chartObserver=new m.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick"})},data(){return{optionsState:{},observersState:[],childrenObserver:new m.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),showLicenseWatermark:!1}},mounted(){this.element=h.getRef(this,"element"),O.loadTheme(this.themeStore,this.instantiateCoreChart),window.addEventListener("resize",this.onWindowResize)},unmounted(){this.onDestroyed()},updated(){if(this.chartInstance!==null){const e=v.provideIntlService(this),t=this.chartInstance.chartService;e.locale!==t._intlService.locale&&(this.chartInstance.chartService._intlService=e,this.chartInstance.chartService.format._intlService=e,this.chartInstance.noTransitionsRedraw()),this.refresh()}},render(){const e=h.getDefaultSlots(this),{chartStyle:t={},className:s,wrapper:n}=this.$props,i=Object.assign({},t,{position:"relative"}),r=this.showLicenseWatermark?l.createVNode(h.WatermarkOverlay,null,null):null,o=function(){return l.createVNode("div",{onMouseleave:this.onChartMouseLeave,ref:h.setRef(this,"element"),class:"k-chart-surface"},[e,r])};return l.h(n,{style:i,class:s,key:"chartElement"},[l.h(I.SeriesTooltip,{key:"seriesTooltip"}),l.h(y.CrosshairContainer,{key:"crosshairTooltips",optionsState:{...this.optionsState}}),o.call(this)])},methods:{dispatchOptions(e){d.optionsReducer(this.optionsState,e)},dispatchObservers(e){this.observersState=d.observersReducer(this.observersState,e)},onDestroyed(){this.chartInstance!==null&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)},getDirection(e){return e!==void 0?e==="rtl":h.isRtl(this.element)},getChartOptions(){const{renderAs:e,pannable:t,zoomable:s,paneDefaults:n,panes:i,transitions:r,seriesColors:o,seriesDefaults:u,axisDefaults:f,deriveOptionsFromParent:p}=this.$props;let a={};return e!==void 0&&(a.renderAs=e),t!==void 0&&(a.pannable=t),s!==void 0&&(a.zoomable=s),n!==void 0&&(a.paneDefaults=n),i!==void 0&&(a.panes=i),r!==void 0&&(a.transitions=r),o!==void 0&&(a.seriesColors=o),u!==void 0&&(a.seriesDefaults=u),f!==void 0&&(a.axisDefaults=f),a=Object.assign(a,this.optionsState),p&&(a=p(a)),a},refresh(){if(this.chartInstance!==null){const e=this.themeStore.getState(),t=this.getChartOptions(),s=t.transitions;this.suppressTransitions&&(t.transitions=!1),h.hasListener.call(this,"refresh")?this.trigger("refresh",{chartOptions:t,themeOptions:e,chartInstance:this.chartInstance}):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=s,this.suppressTransitions=!1)}},instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.$props,s=this.getChartOptions();let n=null;this.element&&(n=this.element.lastElementChild,n&&this.element.removeChild(n)),this.chartInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:v.provideIntlService(this),observer:this.chartObserver,sender:this}),this.element&&n&&this.element.appendChild(n)},trigger(e,t){const s=this.$props.getTarget(),n=b.create(e,t,s),i=this.observersState;let r=!1;for(let o=0;o<i.length;o++)i[o].trigger(e,t)&&(r=!0);return r===!1&&n?(this.$emit("basechartevent",e.toLowerCase(),n),n.isDefaultPrevented&&n.isDefaultPrevented()):r},triggerDomEvent(e,t){const s=this.observersState;let n=!1;for(let i=0;i<s.length;i++)s[i].trigger(e,t)&&(n=!0);return n},onRender(e){this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},hasListener(e){return this.$props.allListeners?Object.keys(this.$props.allListeners).some(t=>t.toLowerCase().indexOf(e.toLowerCase())!==-1):!1},onLegendItemClick(e){if(this.chartInstance!==null)if(this.hasListener("legenditemclick"))this.$emit("legenditemclick",e);else{const{series:t}=this.optionsState;if(!t)return;let s={};const{seriesIndex:n,pointIndex:i}=e,r=t[n];if(i===void 0)s=Object.assign({},r,{visible:c.toggle(r.visible)});else{const o=r.pointVisibility=r.pointVisibility||[];o[i]=c.toggle(o[i]),s=Object.assign({},r)}this.dispatchOptions({chartCollectionIdxKey:`series_${n}`,payload:s}),this.suppressTransitions=!0,this.refresh()}},onWindowResize(){this.chartInstance!==null&&this.chartInstance.resize()},onChartMouseLeave(e){const t=S.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},onChildMouseLeave(e){const{event:t}=e;return this.chartInstance&&!c.hasParent(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},requiresHandlers(e){for(let t=0;t<e.length;t++){const s=e[t];if(this.hasListener(s))return!0}return!1}}});exports.BaseChart=k;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),v=require("@progress/kendo-vue-intl"),m=require("@progress/kendo-charts"),h=require("@progress/kendo-vue-common"),c=require("./utils/main.js"),b=require("./events/chart-event-builder.js"),S=require("./events/dom-event.js"),O=require("./theming/theme-service.js"),C=require("./store/store.js"),d=require("./store/reducer.js"),I=require("./tooltip/Series.js"),y=require("./tooltip/CrosshairContainer.js"),g=require("./package-metadata.js"),k=l.defineComponent({name:"KendoBaseChart",props:{deriveOptionsFromParent:{type:Function,default:void 0},chartConstructor:{type:[Object,Function],default:void 0},className:String,chartStyle:Object,wrapper:String,getTarget:{type:Function,default:void 0},dataItems:{type:Array,default:void 0},dir:String,renderAs:{type:String,default:void 0,validator:function(e){return["svg","canvas"].includes(e)}},pannable:{type:[Boolean,Object],default:void 0},zoomable:{type:[Boolean,Object],default:void 0},seriesColors:{type:Array,default:void 0},transitions:{type:Boolean,default:!0},paneDefaults:{type:Object,default:void 0},panes:{type:Array,default:void 0},seriesDefaults:{type:Object,default:void 0},axisDefaults:{type:Object,default:void 0},allListeners:{type:Object,default:void 0},onLegenditemclick:Function,onBasechartevent:Function,onRefresh:Function},inject:{kendoIntlService:{default:null}},provide(){return{optionsState:this.optionsState,dispatchOptions:this.dispatchOptions,observersState:this.observersState,dispatchObservers:this.dispatchObservers,childrenObserver:this.childrenObserver,chartRefresh:this.refresh}},created(){this.chartInstance=null,this.element=null,this.suppressTransitions=!1,h.validatePackage(g.packageMetadata),this.showLicenseWatermark=h.shouldShowValidationUI(g.packageMetadata),this.themeStore=C.default(d.themeReducer),this.chartObserver=new m.InstanceObserver(this,{render:"onRender",legendItemClick:"onLegendItemClick"})},data(){return{optionsState:{},observersState:[],childrenObserver:new m.InstanceObserver(this,{onMouseLeave:"onChildMouseLeave"}),showLicenseWatermark:!1}},mounted(){this.element=h.getRef(this,"element"),O.loadTheme(this.themeStore,this.instantiateCoreChart,this.element),window.addEventListener("resize",this.onWindowResize)},unmounted(){this.onDestroyed()},updated(){if(this.chartInstance!==null){const e=v.provideIntlService(this),t=this.chartInstance.chartService;e.locale!==t._intlService.locale&&(this.chartInstance.chartService._intlService=e,this.chartInstance.chartService.format._intlService=e,this.chartInstance.noTransitionsRedraw()),this.refresh()}},render(){const e=h.getDefaultSlots(this),{chartStyle:t={},className:s,wrapper:n}=this.$props,i=Object.assign({},t,{position:"relative"}),r=this.showLicenseWatermark?l.createVNode(h.WatermarkOverlay,null,null):null,o=function(){return l.createVNode("div",{onMouseleave:this.onChartMouseLeave,ref:h.setRef(this,"element"),class:"k-chart-surface"},[e,r])};return l.h(n,{style:i,class:s,key:"chartElement"},[l.h(I.SeriesTooltip,{key:"seriesTooltip"}),l.h(y.CrosshairContainer,{key:"crosshairTooltips",optionsState:{...this.optionsState}}),o.call(this)])},methods:{dispatchOptions(e){d.optionsReducer(this.optionsState,e)},dispatchObservers(e){this.observersState=d.observersReducer(this.observersState,e)},onDestroyed(){this.chartInstance!==null&&(this.chartInstance.destroy(),this.chartInstance=null),window.removeEventListener("resize",this.onWindowResize)},getDirection(e){return e!==void 0?e==="rtl":h.isRtl(this.element)},getChartOptions(){const{renderAs:e,pannable:t,zoomable:s,paneDefaults:n,panes:i,transitions:r,seriesColors:o,seriesDefaults:u,axisDefaults:f,deriveOptionsFromParent:p}=this.$props;let a={};return e!==void 0&&(a.renderAs=e),t!==void 0&&(a.pannable=t),s!==void 0&&(a.zoomable=s),n!==void 0&&(a.paneDefaults=n),i!==void 0&&(a.panes=i),r!==void 0&&(a.transitions=r),o!==void 0&&(a.seriesColors=o),u!==void 0&&(a.seriesDefaults=u),f!==void 0&&(a.axisDefaults=f),a=Object.assign(a,this.optionsState),p&&(a=p(a)),a},refresh(){if(this.chartInstance!==null){const e=this.themeStore.getState(),t=this.getChartOptions(),s=t.transitions;this.suppressTransitions&&(t.transitions=!1),h.hasListener.call(this,"refresh")?this.trigger("refresh",{chartOptions:t,themeOptions:e,chartInstance:this.chartInstance}):this.chartInstance.setOptions(t,e),this.suppressTransitions&&(t.transitions=s,this.suppressTransitions=!1)}},instantiateCoreChart(){const{dir:e,chartConstructor:t}=this.$props,s=this.getChartOptions();let n=null;this.element&&(n=this.element.lastElementChild,n&&this.element.removeChild(n)),this.chartInstance=new t(this.element,s,this.themeStore.getState(),{rtl:this.getDirection(e),intlService:v.provideIntlService(this),observer:this.chartObserver,sender:this}),this.element&&n&&this.element.appendChild(n)},trigger(e,t){const s=this.$props.getTarget(),n=b.create(e,t,s),i=this.observersState;let r=!1;for(let o=0;o<i.length;o++)i[o].trigger(e,t)&&(r=!0);return r===!1&&n?(this.$emit("basechartevent",e.toLowerCase(),n),n.isDefaultPrevented&&n.isDefaultPrevented()):r},triggerDomEvent(e,t){const s=this.observersState;let n=!1;for(let i=0;i<s.length;i++)s[i].trigger(e,t)&&(n=!0);return n},onRender(e){this.chartInstance!==null&&(this.surface=e.sender.surface,this.trigger("render",e))},hasListener(e){return this.$props.allListeners?Object.keys(this.$props.allListeners).some(t=>t.toLowerCase().indexOf(e.toLowerCase())!==-1):!1},onLegendItemClick(e){if(this.chartInstance!==null)if(this.hasListener("legenditemclick"))this.$emit("legenditemclick",e);else{const{series:t}=this.optionsState;if(!t)return;let s={};const{seriesIndex:n,pointIndex:i}=e,r=t[n];if(i===void 0)s=Object.assign({},r,{visible:c.toggle(r.visible)});else{const o=r.pointVisibility=r.pointVisibility||[];o[i]=c.toggle(o[i]),s=Object.assign({},r)}this.dispatchOptions({chartCollectionIdxKey:`series_${n}`,payload:s}),this.suppressTransitions=!0,this.refresh()}},onWindowResize(){this.chartInstance!==null&&this.chartInstance.resize()},onChartMouseLeave(e){const t=S.toDomEvent(this,e);this.triggerDomEvent("onMouseLeave",t)?e.preventDefault():this.chartInstance!==null&&this.chartInstance.hideElements()},onChildMouseLeave(e){const{event:t}=e;return this.chartInstance&&!c.hasParent(t.relatedTarget,this.element)&&this.chartInstance.hideElements(),!1},requiresHandlers(e){for(let t=0;t<e.length;t++){const s=e[t];if(this.hasListener(s))return!0}return!1}}});exports.BaseChart=k;
package/BaseChart.mjs CHANGED
@@ -120,7 +120,7 @@ const J = /* @__PURE__ */ g({
120
120
  };
121
121
  },
122
122
  mounted() {
123
- this.element = O(this, "element"), R(this.themeStore, this.instantiateCoreChart), window.addEventListener("resize", this.onWindowResize);
123
+ this.element = O(this, "element"), R(this.themeStore, this.instantiateCoreChart, this.element), window.addEventListener("resize", this.onWindowResize);
124
124
  },
125
125
  unmounted() {
126
126
  this.onDestroyed();
@@ -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 u=require("./base/ConfigurationComponent.js"),r=require("@progress/kendo-vue-common"),d=require("../utils/main.js"),t=require("vue"),i=t.defineComponent({name:"KendoChartLegend",props:{align:{type:String,default:function(){},validator:function(e){return["start","center","end"].includes(e)}},background:{type:String,default:void 0},border:{type:Object,default:function(){}},height:{type:Number,default:void 0},labels:{type:Object,default:function(){}},margin:{type:[Object,Number],default:function(){}},offsetX:{type:Number,default:void 0},offsetY:{type:Number,default:void 0},orientation:{type:String,default:function(){},validator:function(e){return["vertical","horizontal"].includes(e)}},padding:{type:[Object,Number],default:function(){}},position:{type:String,default:function(){},validator:function(e){return["top","bottom","left","right","custom"].includes(e)}},reverse:{type:Boolean,default:void 0},visible:{type:Boolean,default:!0},width:{type:Number,default:void 0},inactiveItems:{type:Object,default:function(){}},item:{type:Object,default:function(){}},spacing:{type:Number,default:void 0},title:{type:Object,default:function(){}}},render(){const e=r.getDefaultSlots(this),n=d.removeUndefinedProps(this.$props);return t.h(u.Configuration,{config:n,chartKey:"legend"},function(){return e})}});exports.ChartLegend=i;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./base/ConfigurationComponent.js"),r=require("@progress/kendo-vue-common"),i=require("../utils/main.js"),t=require("vue"),d=t.defineComponent({name:"KendoChartLegend",props:{align:{type:String,default:function(){},validator:function(e){return["start","center","end"].includes(e)}},background:{type:String,default:void 0},border:{type:Object,default:function(){}},height:{type:Number,default:void 0},labels:{type:Object,default:function(){}},margin:{type:[Object,Number],default:function(){}},offsetX:{type:Number,default:void 0},offsetY:{type:Number,default:void 0},orientation:{type:String,default:function(){},validator:function(e){return["vertical","horizontal"].includes(e)}},padding:{type:[Object,Number],default:function(){}},position:{type:String,default:function(){},validator:function(e){return["top","bottom","left","right","custom"].includes(e)}},reverse:{type:Boolean,default:void 0},visible:{type:Boolean,default:!0},width:{type:Number,default:void 0},inactiveItems:{type:Object,default:function(){}},item:{type:Object,default:function(){}},spacing:{type:Number,default:void 0},title:{type:Object,default:function(){}},focusHighlight:{type:Object,default:function(){}}},render(){const e=r.getDefaultSlots(this),n=i.removeUndefinedProps(this.$props);return t.h(u.Configuration,{config:n,chartKey:"legend"},function(){return e})}});exports.ChartLegend=d;
@@ -102,6 +102,11 @@ const c = /* @__PURE__ */ d({
102
102
  type: Object,
103
103
  default: function() {
104
104
  }
105
+ },
106
+ focusHighlight: {
107
+ type: Object,
108
+ default: function() {
109
+ }
105
110
  }
106
111
  },
107
112
  render() {
@@ -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 r=require("./base/ConfigurationComponent.js"),a=require("@progress/kendo-vue-common"),u=require("../utils/main.js"),t=require("vue"),o=t.defineComponent({name:"KendoChartSeriesDefaults",props:{border:{type:Object,default:function(){}},gap:Number,overlay:{type:Object,default:function(){}},spacing:Number,stack:{type:[Boolean,String,Object],default:function(){}},type:{type:String,default:function(){},validator:function(e){return["area","bar","boxPlot","bubble","bullet","candlestick","column","donut","funnel","horizontalWaterfall","line","ohlc","pie","polarArea","polarLine","polarScatter","radarArea","radarColumn","radarLine","rangeArea","rangeBar","rangeColumn","scatter","scatterLine","verticalArea","verticalBoxPlot","verticalBullet","verticalLine","verticalRangeArea","waterfall"].includes(e)}},visual:{type:Function,default:void 0},labels:{type:Object,default:function(){}},notes:{type:Object,default:function(){}},tooltip:{type:Object,default:function(){}}},render(){const e=a.getDefaultSlots(this),n=u.removeUndefinedProps(this.$props);return t.h(r.Configuration,{config:n,chartKey:"seriesDefaults"},function(){return e})}});exports.ChartSeriesDefaults=o;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./base/ConfigurationComponent.js"),a=require("@progress/kendo-vue-common"),u=require("../utils/main.js"),t=require("vue"),o=t.defineComponent({name:"KendoChartSeriesDefaults",props:{border:{type:Object,default:function(){}},gap:Number,overlay:{type:Object,default:function(){}},spacing:Number,stack:{type:[Boolean,String,Object],default:function(){}},type:{type:String,default:function(){},validator:function(e){return["area","bar","boxPlot","bubble","bullet","candlestick","column","donut","funnel","horizontalWaterfall","line","ohlc","pie","polarArea","polarLine","polarScatter","radarArea","radarColumn","radarLine","rangeArea","rangeBar","rangeColumn","scatter","scatterLine","verticalArea","verticalBoxPlot","verticalBullet","verticalLine","verticalRangeArea","waterfall"].includes(e)}},visual:{type:Function,default:void 0},labels:{type:Object,default:function(){}},notes:{type:Object,default:function(){}},tooltip:{type:Object,default:function(){}},focusHighlight:{type:Object,default:function(){}}},render(){const e=a.getDefaultSlots(this),n=u.removeUndefinedProps(this.$props);return t.h(r.Configuration,{config:n,chartKey:"seriesDefaults"},function(){return e})}});exports.ChartSeriesDefaults=o;
@@ -8,8 +8,8 @@
8
8
  import { Configuration as n } from "./base/ConfigurationComponent.mjs";
9
9
  import { getDefaultSlots as r } from "@progress/kendo-vue-common";
10
10
  import { removeUndefinedProps as a } from "../utils/main.mjs";
11
- import { defineComponent as o, h as u } from "vue";
12
- const c = /* @__PURE__ */ o({
11
+ import { defineComponent as u, h as o } from "vue";
12
+ const c = /* @__PURE__ */ u({
13
13
  name: "KendoChartSeriesDefaults",
14
14
  props: {
15
15
  border: {
@@ -55,11 +55,16 @@ const c = /* @__PURE__ */ o({
55
55
  type: Object,
56
56
  default: function() {
57
57
  }
58
+ },
59
+ focusHighlight: {
60
+ type: Object,
61
+ default: function() {
62
+ }
58
63
  }
59
64
  },
60
65
  render() {
61
66
  const e = r(this), t = a(this.$props);
62
- return u(n, {
67
+ return o(n, {
63
68
  config: t,
64
69
  chartKey: "seriesDefaults"
65
70
  }, function() {