@progress/kendo-react-charts 9.4.0-develop.24 → 9.4.0-develop.3
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 +1 -1
- package/BaseChart.mjs +24 -29
- package/Chart.js +1 -1
- package/Chart.mjs +4 -3
- package/ChartBreadcrumb.js +1 -1
- package/ChartBreadcrumb.mjs +1 -0
- package/ChartContext.js +1 -1
- package/ChartContext.mjs +1 -0
- package/ChartNoDataOverlay.js +1 -1
- package/ChartNoDataOverlay.mjs +5 -4
- package/Container.js +1 -1
- package/Container.mjs +4 -3
- package/DonutCenter.js +1 -1
- package/DonutCenter.mjs +1 -0
- package/NOTICE.txt +51 -40
- package/Sparkline.js +1 -1
- package/Sparkline.mjs +1 -0
- package/StockChart.js +1 -1
- package/StockChart.mjs +1 -0
- package/components/AxisDefaults.js +1 -1
- package/components/AxisDefaults.mjs +1 -0
- package/components/CategoryAxis.js +1 -1
- package/components/CategoryAxis.mjs +11 -10
- package/components/CategoryAxisItem.js +1 -1
- package/components/CategoryAxisItem.mjs +1 -0
- package/components/ChartArea.js +1 -1
- package/components/ChartArea.mjs +5 -4
- package/components/Legend.js +1 -1
- package/components/Legend.mjs +4 -3
- package/components/Navigator.js +1 -1
- package/components/Navigator.mjs +1 -0
- package/components/Pane.js +1 -1
- package/components/Pane.mjs +4 -3
- package/components/PaneDefaults.js +1 -1
- package/components/PaneDefaults.mjs +6 -5
- package/components/Panes.js +1 -1
- package/components/Panes.mjs +5 -4
- package/components/PlotArea.js +1 -1
- package/components/PlotArea.mjs +4 -3
- package/components/Series.js +1 -1
- package/components/Series.mjs +6 -5
- package/components/SeriesDefaults.js +1 -1
- package/components/SeriesDefaults.mjs +1 -0
- package/components/SeriesItem.js +1 -1
- package/components/SeriesItem.mjs +1 -0
- package/components/Subtitle.js +1 -1
- package/components/Subtitle.mjs +1 -0
- package/components/Title.js +1 -1
- package/components/Title.mjs +1 -0
- package/components/Tooltip.js +1 -1
- package/components/Tooltip.mjs +4 -3
- package/components/ValueAxis.js +1 -1
- package/components/ValueAxis.mjs +11 -10
- package/components/ValueAxisItem.js +1 -1
- package/components/ValueAxisItem.mjs +3 -2
- package/components/XAxis.js +1 -1
- package/components/XAxis.mjs +6 -5
- package/components/XAxisItem.js +1 -1
- package/components/XAxisItem.mjs +1 -0
- package/components/YAxis.js +1 -1
- package/components/YAxis.mjs +10 -9
- package/components/YAxisItem.js +1 -1
- package/components/YAxisItem.mjs +1 -0
- package/components/Zoomable.js +1 -1
- package/components/Zoomable.mjs +4 -3
- package/components/axis-defaults/Crosshair.js +1 -1
- package/components/axis-defaults/Crosshair.mjs +3 -2
- package/components/axis-defaults/CrosshairTooltip.js +1 -1
- package/components/axis-defaults/CrosshairTooltip.mjs +3 -2
- package/components/axis-defaults/Labels.js +1 -1
- package/components/axis-defaults/Labels.mjs +6 -5
- package/components/axis-defaults/Title.js +1 -1
- package/components/axis-defaults/Title.mjs +1 -0
- package/components/base/CollectionConfigurationComponent.js +1 -1
- package/components/base/CollectionConfigurationComponent.mjs +13 -12
- package/components/base/ConfigurationComponent.js +1 -1
- package/components/base/ConfigurationComponent.mjs +1 -0
- package/components/category-axis-item/Crosshair.js +1 -1
- package/components/category-axis-item/Crosshair.mjs +5 -4
- package/components/category-axis-item/CrosshairTooltip.js +1 -1
- package/components/category-axis-item/CrosshairTooltip.mjs +4 -3
- package/components/category-axis-item/Labels.js +1 -1
- package/components/category-axis-item/Labels.mjs +1 -0
- package/components/category-axis-item/Notes.js +1 -1
- package/components/category-axis-item/Notes.mjs +5 -4
- package/components/category-axis-item/NotesIcon.js +1 -1
- package/components/category-axis-item/NotesIcon.mjs +1 -0
- package/components/category-axis-item/NotesLabel.js +1 -1
- package/components/category-axis-item/NotesLabel.mjs +3 -2
- package/components/category-axis-item/RangeLabels.js +1 -1
- package/components/category-axis-item/RangeLabels.mjs +1 -0
- package/components/category-axis-item/Title.js +1 -1
- package/components/category-axis-item/Title.mjs +1 -0
- package/components/legend/InactiveItems.js +1 -1
- package/components/legend/InactiveItems.mjs +1 -0
- package/components/legend/Item.js +1 -1
- package/components/legend/Item.mjs +1 -0
- package/components/legend/Title.js +1 -1
- package/components/legend/Title.mjs +1 -0
- package/components/navigator/CategoryAxis.js +1 -1
- package/components/navigator/CategoryAxis.mjs +1 -0
- package/components/navigator/Hint.js +1 -1
- package/components/navigator/Hint.mjs +4 -3
- package/components/navigator/Pane.js +1 -1
- package/components/navigator/Pane.mjs +1 -0
- package/components/navigator/Select.js +1 -1
- package/components/navigator/Select.mjs +1 -0
- package/components/navigator/Series.js +1 -1
- package/components/navigator/Series.mjs +1 -0
- package/components/navigator/SeriesItem.js +1 -1
- package/components/navigator/SeriesItem.mjs +3 -2
- package/components/pane-defaults/Title.js +1 -1
- package/components/pane-defaults/Title.mjs +1 -0
- package/components/series-item/ErrorBars.js +1 -1
- package/components/series-item/ErrorBars.mjs +4 -3
- package/components/series-item/Extremes.js +1 -1
- package/components/series-item/Extremes.mjs +1 -0
- package/components/series-item/Highlight.js +1 -1
- package/components/series-item/Highlight.mjs +4 -3
- package/components/series-item/Labels.js +1 -1
- package/components/series-item/Labels.mjs +1 -0
- package/components/series-item/LabelsFrom.js +1 -1
- package/components/series-item/LabelsFrom.mjs +4 -3
- package/components/series-item/LabelsTo.js +1 -1
- package/components/series-item/LabelsTo.mjs +3 -2
- package/components/series-item/Markers.js +1 -1
- package/components/series-item/Markers.mjs +3 -2
- package/components/series-item/Notes.js +1 -1
- package/components/series-item/Notes.mjs +3 -2
- package/components/series-item/NotesIcon.js +1 -1
- package/components/series-item/NotesIcon.mjs +4 -3
- package/components/series-item/NotesLabel.js +1 -1
- package/components/series-item/NotesLabel.mjs +1 -0
- package/components/series-item/Outliers.js +1 -1
- package/components/series-item/Outliers.mjs +3 -2
- package/components/series-item/Tooltip.js +1 -1
- package/components/series-item/Tooltip.mjs +1 -0
- package/components/value-axis-item/Crosshair.js +1 -1
- package/components/value-axis-item/Crosshair.mjs +4 -3
- package/components/value-axis-item/CrosshairTooltip.js +1 -1
- package/components/value-axis-item/CrosshairTooltip.mjs +4 -3
- package/components/value-axis-item/Labels.js +1 -1
- package/components/value-axis-item/Labels.mjs +1 -0
- package/components/value-axis-item/Notes.js +1 -1
- package/components/value-axis-item/Notes.mjs +5 -4
- package/components/value-axis-item/NotesIcon.js +1 -1
- package/components/value-axis-item/NotesIcon.mjs +3 -2
- package/components/value-axis-item/NotesLabel.js +1 -1
- package/components/value-axis-item/NotesLabel.mjs +1 -0
- package/components/value-axis-item/Title.js +1 -1
- package/components/value-axis-item/Title.mjs +1 -0
- package/components/x-axis-item/Crosshair.js +1 -1
- package/components/x-axis-item/Crosshair.mjs +4 -3
- package/components/x-axis-item/CrosshairTooltip.js +1 -1
- package/components/x-axis-item/CrosshairTooltip.mjs +4 -3
- package/components/x-axis-item/Labels.js +1 -1
- package/components/x-axis-item/Labels.mjs +1 -0
- package/components/x-axis-item/Notes.js +1 -1
- package/components/x-axis-item/Notes.mjs +4 -3
- package/components/x-axis-item/NotesIcon.js +1 -1
- package/components/x-axis-item/NotesIcon.mjs +3 -2
- package/components/x-axis-item/NotesLabel.js +1 -1
- package/components/x-axis-item/NotesLabel.mjs +3 -2
- package/components/x-axis-item/Title.js +1 -1
- package/components/x-axis-item/Title.mjs +1 -0
- package/components/y-axis-item/Crosshair.js +1 -1
- package/components/y-axis-item/Crosshair.mjs +4 -3
- package/components/y-axis-item/CrosshairTooltip.js +1 -1
- package/components/y-axis-item/CrosshairTooltip.mjs +4 -3
- package/components/y-axis-item/Labels.js +1 -1
- package/components/y-axis-item/Labels.mjs +1 -0
- package/components/y-axis-item/Notes.js +1 -1
- package/components/y-axis-item/Notes.mjs +4 -3
- package/components/y-axis-item/NotesIcon.js +1 -1
- package/components/y-axis-item/NotesIcon.mjs +3 -2
- package/components/y-axis-item/NotesLabel.js +1 -1
- package/components/y-axis-item/NotesLabel.mjs +3 -2
- package/components/y-axis-item/Title.js +1 -1
- package/components/y-axis-item/Title.mjs +1 -0
- package/dist/cdn/js/kendo-react-charts.js +1 -8
- package/events/axis-label-click-event.js +1 -1
- package/events/axis-label-click-event.mjs +1 -0
- package/events/base-event.js +1 -1
- package/events/base-event.mjs +3 -2
- package/events/chart-event-builder.js +1 -1
- package/events/chart-event-builder.mjs +5 -4
- package/events/dom-event.js +1 -1
- package/events/dom-event.mjs +8 -7
- package/events/drag-end-event.js +1 -1
- package/events/drag-end-event.mjs +5 -4
- package/events/drag-event.js +1 -1
- package/events/drag-event.mjs +3 -2
- package/events/drag-start-event.js +1 -1
- package/events/drag-start-event.mjs +1 -0
- package/events/drilldown-event.js +1 -1
- package/events/drilldown-event.mjs +1 -0
- package/events/drilldown-state-change-event.js +1 -1
- package/events/drilldown-state-change-event.mjs +1 -0
- package/events/legend-item-click-event.js +1 -1
- package/events/legend-item-click-event.mjs +1 -0
- package/events/legend-item-hover-event.js +1 -1
- package/events/legend-item-hover-event.mjs +1 -0
- package/events/legend-item-leave-event.js +1 -1
- package/events/legend-item-leave-event.mjs +1 -0
- package/events/navigator-filter-event.js +1 -1
- package/events/navigator-filter-event.mjs +1 -0
- package/events/note-click-event.js +1 -1
- package/events/note-click-event.mjs +1 -0
- package/events/note-hover-event.js +1 -1
- package/events/note-hover-event.mjs +3 -2
- package/events/plot-area-click-event.js +1 -1
- package/events/plot-area-click-event.mjs +1 -0
- package/events/plot-area-hover-event.js +1 -1
- package/events/plot-area-hover-event.mjs +4 -3
- package/events/preventable-event.js +1 -1
- package/events/preventable-event.mjs +1 -0
- package/events/render-event.js +1 -1
- package/events/render-event.mjs +3 -2
- package/events/select-end-event.js +1 -1
- package/events/select-end-event.mjs +3 -2
- package/events/select-event.js +1 -1
- package/events/select-event.mjs +5 -4
- package/events/select-start-event.js +1 -1
- package/events/select-start-event.mjs +3 -2
- package/events/series-click-event.js +1 -1
- package/events/series-click-event.mjs +1 -0
- package/events/series-hover-event.js +1 -1
- package/events/series-hover-event.mjs +1 -0
- package/events/zoom-end-event.js +1 -1
- package/events/zoom-end-event.mjs +6 -5
- package/events/zoom-event.js +1 -1
- package/events/zoom-event.mjs +1 -0
- package/events/zoom-start-event.js +1 -1
- package/events/zoom-start-event.mjs +3 -2
- package/index.js +1 -2
- package/messages.js +1 -1
- package/messages.mjs +1 -0
- package/methods/index.js +1 -1
- package/methods/index.mjs +10 -9
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +3 -2
- package/package.json +8 -8
- package/sankey/Sankey.js +1 -1
- package/sankey/Sankey.mjs +23 -25
- package/sankey/SankeyTooltip.js +1 -1
- package/sankey/SankeyTooltip.mjs +8 -7
- package/sankey/messages.js +1 -1
- package/sankey/messages.mjs +1 -0
- package/sankey/propTypes.js +1 -1
- package/sankey/propTypes.mjs +1 -0
- package/sankey/theme-service.js +29 -0
- package/sankey/theme-service.mjs +100 -0
- package/sankey/utils.js +1 -1
- package/sankey/utils.mjs +1 -0
- package/store/reducer.js +1 -1
- package/store/reducer.mjs +4 -3
- package/store/store.js +1 -1
- package/store/store.mjs +1 -0
- package/theming/theme-service.js +51 -0
- package/theming/theme-service.mjs +122 -0
- package/tooltip/Crosshair.js +1 -1
- package/tooltip/Crosshair.mjs +7 -6
- package/tooltip/CrosshairContainer.js +1 -1
- package/tooltip/CrosshairContainer.mjs +1 -0
- package/tooltip/Point.js +1 -1
- package/tooltip/Point.mjs +5 -4
- package/tooltip/Popup.js +1 -1
- package/tooltip/Popup.mjs +7 -6
- package/tooltip/Series.js +1 -1
- package/tooltip/Series.mjs +19 -18
- package/tooltip/SharedTooltipContent.js +1 -1
- package/tooltip/SharedTooltipContent.mjs +1 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +10 -9
package/tooltip/Crosshair.mjs
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as r from "react";
|
|
9
|
-
import { classNames as
|
|
10
|
+
import { classNames as m } from "@progress/kendo-react-common";
|
|
10
11
|
import { InstanceObserver as S } from "@progress/kendo-charts";
|
|
11
12
|
import { TooltipPopup as d } from "./Popup.mjs";
|
|
12
13
|
import { ChartContext as f } from "../ChartContext.mjs";
|
|
@@ -23,7 +24,7 @@ const v = "k-chart-crosshair-tooltip", C = "k-chart-tooltip-inverse", n = class
|
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
render() {
|
|
26
|
-
const { popupContend: t, className: o, ...e } = this.state, p = this.state.popupShown ? () => t : Function.prototype, s =
|
|
27
|
+
const { popupContend: t, className: o, ...e } = this.state, p = this.state.popupShown ? () => t : Function.prototype, s = m({
|
|
27
28
|
[v]: !0,
|
|
28
29
|
[C]: !!o
|
|
29
30
|
});
|
|
@@ -37,8 +38,8 @@ const v = "k-chart-crosshair-tooltip", C = "k-chart-tooltip-inverse", n = class
|
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
onShowTooltip(t) {
|
|
40
|
-
const { anchor: o, style: e, className: p, crosshair: s, axisName:
|
|
41
|
-
s &&
|
|
41
|
+
const { anchor: o, style: e, className: p, crosshair: s, axisName: a, axisIndex: c, value: l } = t, { name: h, index: u } = this.props;
|
|
42
|
+
s && a === h && c === u && this.setState({
|
|
42
43
|
popupShown: !0,
|
|
43
44
|
popupAlign: o.align,
|
|
44
45
|
popupOffset: o.point,
|
|
@@ -56,7 +57,7 @@ const v = "k-chart-crosshair-tooltip", C = "k-chart-tooltip-inverse", n = class
|
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
n.contextType = f;
|
|
59
|
-
let
|
|
60
|
+
let i = n;
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
i as CrosshairTooltip
|
|
62
63
|
};
|
|
@@ -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 a=require("react"),p=require("../Container.js"),b=require("./Crosshair.js"),h=require("../ChartContext.js");function x(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const i=x(a),u=["categoryAxis","valueAxis","xAxis","yAxis"];function f(s){const t={};for(let e=0;e<u.length;e++){const o=d(s,u[e]);for(let n=0;n<o.length;n++){const r=o[n];t[r.name+r.index]=r}}return t}function d(s,t){const e=[];if(s[t]){const o=[].concat(s[t]);for(let n=0;n<o.length;n++){const r=(o[n].crosshair||{}).tooltip;r&&r.visible&&e.push({index:n,name:t})}}return e}const l=class l extends i.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var t;this.setState({tooltips:f((t=this.context)==null?void 0:t.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:t}=this.state,e=Object.keys(t).map(o=>i.createElement(b.CrosshairTooltip,{...t[o],key:o}));return i.createElement(p.Container,null,e)}componentWillUnmount(){this.storeUnsubscriber()}};l.contextType=h.ChartContext;let c=l;exports.CrosshairTooltipContainer=c;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),p=require("../Container.js"),b=require("./Crosshair.js"),h=require("../ChartContext.js");function x(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const i=x(a),u=["categoryAxis","valueAxis","xAxis","yAxis"];function f(s){const t={};for(let e=0;e<u.length;e++){const o=d(s,u[e]);for(let n=0;n<o.length;n++){const r=o[n];t[r.name+r.index]=r}}return t}function d(s,t){const e=[];if(s[t]){const o=[].concat(s[t]);for(let n=0;n<o.length;n++){const r=(o[n].crosshair||{}).tooltip;r&&r.visible&&e.push({index:n,name:t})}}return e}const l=class l extends i.Component{constructor(){super(...arguments),this.context=null,this.state={tooltips:{}},this.storeUnsubscriber=Function.prototype,this.subscriber=()=>{var t;this.setState({tooltips:f((t=this.context)==null?void 0:t.optionsStore.getState())})}}componentDidMount(){this.storeUnsubscriber=this.context.optionsStore.subscribe(this.subscriber)}render(){const{tooltips:t}=this.state,e=Object.keys(t).map(o=>i.createElement(b.CrosshairTooltip,{...t[o],key:o}));return i.createElement(p.Container,null,e)}componentWillUnmount(){this.storeUnsubscriber()}};l.contextType=h.ChartContext;let c=l;exports.CrosshairTooltipContainer=c;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as r from "react";
|
|
9
10
|
import { Container as u } from "../Container.mjs";
|
|
10
11
|
import { CrosshairTooltip as a } from "./Crosshair.mjs";
|
package/tooltip/Point.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"});class s{constructor(t,e){this.value=t.value,this.category=t.category,this.categoryIndex=t.categoryIx,this.series=t.series,this.dataItem=t.dataItem,this.percentage=t.percentage,this.runningTotal=t.runningTotal,this.total=t.total,this.low=t.low,this.high=t.high,this.xLow=t.xLow,this.xHigh=t.xHigh,this.yLow=t.yLow,this.yHigh=t.yHigh,this.point=t,this.format=((t.options||{}).tooltip||{}).format||e}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}}exports.TooltipPoint=s;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(t,e){this.value=t.value,this.category=t.category,this.categoryIndex=t.categoryIx,this.series=t.series,this.dataItem=t.dataItem,this.percentage=t.percentage,this.runningTotal=t.runningTotal,this.total=t.total,this.low=t.low,this.high=t.high,this.xLow=t.xLow,this.xHigh=t.xHigh,this.yLow=t.yLow,this.yHigh=t.yHigh,this.point=t,this.format=((t.options||{}).tooltip||{}).format||e}get formattedValue(){return this.format?this.point.formatValue(this.format):String(this.value)}}exports.TooltipPoint=s;
|
package/tooltip/Point.mjs
CHANGED
|
@@ -5,17 +5,18 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
"use client";
|
|
9
|
+
class h {
|
|
9
10
|
/**
|
|
10
11
|
* @hidden
|
|
11
12
|
*/
|
|
12
|
-
constructor(t,
|
|
13
|
-
this.value = t.value, this.category = t.category, this.categoryIndex = t.categoryIx, this.series = t.series, this.dataItem = t.dataItem, this.percentage = t.percentage, this.runningTotal = t.runningTotal, this.total = t.total, this.low = t.low, this.high = t.high, this.xLow = t.xLow, this.xHigh = t.xHigh, this.yLow = t.yLow, this.yHigh = t.yHigh, this.point = t, this.format = ((t.options || {}).tooltip || {}).format ||
|
|
13
|
+
constructor(t, s) {
|
|
14
|
+
this.value = t.value, this.category = t.category, this.categoryIndex = t.categoryIx, this.series = t.series, this.dataItem = t.dataItem, this.percentage = t.percentage, this.runningTotal = t.runningTotal, this.total = t.total, this.low = t.low, this.high = t.high, this.xLow = t.xLow, this.xHigh = t.xHigh, this.yLow = t.yLow, this.yHigh = t.yHigh, this.point = t, this.format = ((t.options || {}).tooltip || {}).format || s;
|
|
14
15
|
}
|
|
15
16
|
get formattedValue() {
|
|
16
17
|
return this.format ? this.point.formatValue(this.format) : String(this.value);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
h as TooltipPoint
|
|
21
22
|
};
|
package/tooltip/Popup.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("react"),h=require("@progress/kendo-charts"),f=require("../events/dom-event.js"),v=require("../utils/index.js"),d=require("@progress/kendo-react-popup"),m=require("../ChartContext.js");function O(s){const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),h=require("@progress/kendo-charts"),f=require("../events/dom-event.js"),v=require("../utils/index.js"),d=require("@progress/kendo-react-popup"),m=require("../ChartContext.js");function O(s){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>s[t]})}}return o.default=s,Object.freeze(o)}const r=O(l),b={horizontal:"fit",vertical:"fit"},C="k-chart-tooltip",y="k-chart-tooltip-wrapper",i=class i extends r.Component{constructor(o,t){super(o,t),this.context=null,this.element=null,this.onChartMouseLeave=e=>{const{syntheticEvent:n}=e;return!!v.hasParent(n.relatedTarget,this.element)},this.onMouseLeave=e=>{const n=f.toDomEvent(this,e);this.context.childrenObserver.trigger("onMouseLeave",n)&&e.preventDefault()},this.popupRef=e=>{this.element=e;const n=e&&e.closest(".k-animation-container");n&&(n.style.transition="initial")},this.chartObserver=new h.InstanceObserver(this,{onMouseLeave:"onChartMouseLeave"}),t.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupShown:o,popupAlign:t,popupOffset:e,popupStyles:n,popupContent:c,className:p}=this.props,u=[C,p].join(" ").trim();return r.createElement(d.Popup,{animate:!1,popupAlign:t,offset:e,show:o,collision:b,className:y},r.createElement("div",{className:u,style:n,onMouseLeave:this.onMouseLeave,ref:this.popupRef},c()))}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}};i.contextType=m.ChartContext;let a=i;exports.TooltipPopup=a;
|
package/tooltip/Popup.mjs
CHANGED
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
"use client";
|
|
9
|
+
import * as n from "react";
|
|
9
10
|
import { InstanceObserver as h } from "@progress/kendo-charts";
|
|
10
11
|
import { toDomEvent as l } from "../events/dom-event.mjs";
|
|
11
12
|
import { hasParent as m } from "../utils/index.mjs";
|
|
12
13
|
import { Popup as u } from "@progress/kendo-react-popup";
|
|
13
14
|
import { ChartContext as f } from "../ChartContext.mjs";
|
|
14
|
-
const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-chart-tooltip-wrapper",
|
|
15
|
+
const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-chart-tooltip-wrapper", r = class r extends n.Component {
|
|
15
16
|
constructor(s, o) {
|
|
16
17
|
super(s, o), this.context = null, this.element = null, this.onChartMouseLeave = (e) => {
|
|
17
18
|
const { syntheticEvent: t } = e;
|
|
@@ -32,7 +33,7 @@ const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-
|
|
|
32
33
|
}
|
|
33
34
|
render() {
|
|
34
35
|
const { popupShown: s, popupAlign: o, popupOffset: e, popupStyles: t, popupContent: a, className: p } = this.props, c = [d, p].join(" ").trim();
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ n.createElement(
|
|
36
37
|
u,
|
|
37
38
|
{
|
|
38
39
|
animate: !1,
|
|
@@ -42,7 +43,7 @@ const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-
|
|
|
42
43
|
collision: v,
|
|
43
44
|
className: C
|
|
44
45
|
},
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ n.createElement("div", { className: c, style: t, onMouseLeave: this.onMouseLeave, ref: this.popupRef }, a())
|
|
46
47
|
);
|
|
47
48
|
}
|
|
48
49
|
componentWillUnmount() {
|
|
@@ -52,8 +53,8 @@ const v = { horizontal: "fit", vertical: "fit" }, d = "k-chart-tooltip", C = "k-
|
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
-
let i =
|
|
56
|
+
r.contextType = f;
|
|
57
|
+
let i = r;
|
|
57
58
|
export {
|
|
58
59
|
i as TooltipPopup
|
|
59
60
|
};
|
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 f=require("react"),m=require("@progress/kendo-react-common"),S=require("@progress/kendo-charts"),h=require("./Point.js"),y=require("./SharedTooltipContent.js"),T=require("./Popup.js"),C=require("../ChartContext.js");function O(p){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const e in p)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>p[e]})}}return t.default=p,Object.freeze(t)}const a=O(f),x="k-chart-shared-tooltip",g="k-chart-tooltip-inverse",l=class l extends a.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new S.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:t,shared:e,className:n,...r}=this.state,i=this.state.popupShown?()=>{const o=this.findRenderFunction();if(e)return o!==null?o(t):a.createElement(y.SharedTooltipContent,{...t});const d=t.point,u=this.findRenderFunctionByIndex(d.series.index);return u!==null?u(t):o!==null?o(t):a.createElement("span",{dangerouslySetInnerHTML:{__html:t.point.formattedValue}})}:Function.prototype,s=m.classNames({[x]:e,[g]:!!n});return a.createElement(T.TooltipPopup,{...r,popupContent:i,className:s})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(t){const{anchor:e,style:n,shared:r,className:i,crosshair:s}=t;let o;s||(r?o=this.createSharedTooltipContext(t):o=this.createTooltipContext(t),this.setState({popupShown:!0,popupAlign:e.align,popupOffset:e.point,popupContext:o,popupStyles:n,className:i,shared:r}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(t){const{points:e,categoryText:n}=t,r=e.filter(o=>typeof o.series.name!="undefined").length>0,i=t.series.length>1;let s=1;return r&&s++,i&&s++,{categoryText:n,colorMarker:i,colspan:s,nameColumn:r,points:t.points.map(o=>new h.TooltipPoint(o,t.format))}}createTooltipContext(t){const{point:e,format:n}=t;return{point:new h.TooltipPoint(e,n)}}findRenderFunctionByIndex(t){const e=this.context.optionsStore.getState().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.context.optionsStore.getState().tooltip;return t!==void 0&&t.hasOwnProperty("render")?t.render:null}};l.contextType=C.ChartContext;let c=l;exports.SeriesTooltip=c;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),m=require("@progress/kendo-react-common"),S=require("@progress/kendo-charts"),h=require("./Point.js"),y=require("./SharedTooltipContent.js"),T=require("./Popup.js"),C=require("../ChartContext.js");function O(p){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const e in p)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>p[e]})}}return t.default=p,Object.freeze(t)}const a=O(f),x="k-chart-shared-tooltip",g="k-chart-tooltip-inverse",l=class l extends a.Component{constructor(){super(...arguments),this.context=null,this.state={popupShown:!1},this.chartObserver=null}componentDidMount(){this.chartObserver=new S.InstanceObserver(this,{showTooltip:"onShowTooltip",hideTooltip:"onHideTooltip"}),this.context.observersStore.dispatch({type:"add",payload:this.chartObserver})}render(){const{popupContext:t,shared:e,className:n,...r}=this.state,i=this.state.popupShown?()=>{const o=this.findRenderFunction();if(e)return o!==null?o(t):a.createElement(y.SharedTooltipContent,{...t});const d=t.point,u=this.findRenderFunctionByIndex(d.series.index);return u!==null?u(t):o!==null?o(t):a.createElement("span",{dangerouslySetInnerHTML:{__html:t.point.formattedValue}})}:Function.prototype,s=m.classNames({[x]:e,[g]:!!n});return a.createElement(T.TooltipPopup,{...r,popupContent:i,className:s})}componentWillUnmount(){this.context.observersStore.dispatch({type:"remove",payload:this.chartObserver})}onShowTooltip(t){const{anchor:e,style:n,shared:r,className:i,crosshair:s}=t;let o;s||(r?o=this.createSharedTooltipContext(t):o=this.createTooltipContext(t),this.setState({popupShown:!0,popupAlign:e.align,popupOffset:e.point,popupContext:o,popupStyles:n,className:i,shared:r}))}onHideTooltip(){this.setState({popupShown:!1,popupStyles:{},className:void 0})}createSharedTooltipContext(t){const{points:e,categoryText:n}=t,r=e.filter(o=>typeof o.series.name!="undefined").length>0,i=t.series.length>1;let s=1;return r&&s++,i&&s++,{categoryText:n,colorMarker:i,colspan:s,nameColumn:r,points:t.points.map(o=>new h.TooltipPoint(o,t.format))}}createTooltipContext(t){const{point:e,format:n}=t;return{point:new h.TooltipPoint(e,n)}}findRenderFunctionByIndex(t){const e=this.context.optionsStore.getState().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.context.optionsStore.getState().tooltip;return t!==void 0&&t.hasOwnProperty("render")?t.render:null}};l.contextType=C.ChartContext;let c=l;exports.SeriesTooltip=c;
|
package/tooltip/Series.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as p from "react";
|
|
9
10
|
import { classNames as d } from "@progress/kendo-react-common";
|
|
10
11
|
import { InstanceObserver as m } from "@progress/kendo-charts";
|
|
@@ -28,12 +29,12 @@ const T = "k-chart-shared-tooltip", x = "k-chart-tooltip-inverse", a = class a e
|
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
|
-
const { popupContext: t, shared:
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
return
|
|
32
|
+
const { popupContext: t, shared: e, className: n, ...r } = this.state, i = this.state.popupShown ? () => {
|
|
33
|
+
const o = this.findRenderFunction();
|
|
34
|
+
if (e)
|
|
35
|
+
return o !== null ? o(t) : /* @__PURE__ */ p.createElement(f, { ...t });
|
|
35
36
|
const u = t.point, l = this.findRenderFunctionByIndex(u.series.index);
|
|
36
|
-
return l !== null ? l(t) :
|
|
37
|
+
return l !== null ? l(t) : o !== null ? o(t) : /* @__PURE__ */ p.createElement(
|
|
37
38
|
"span",
|
|
38
39
|
{
|
|
39
40
|
dangerouslySetInnerHTML: {
|
|
@@ -42,7 +43,7 @@ const T = "k-chart-shared-tooltip", x = "k-chart-tooltip-inverse", a = class a e
|
|
|
42
43
|
}
|
|
43
44
|
);
|
|
44
45
|
} : Function.prototype, s = d({
|
|
45
|
-
[T]:
|
|
46
|
+
[T]: e,
|
|
46
47
|
[x]: !!n
|
|
47
48
|
});
|
|
48
49
|
return /* @__PURE__ */ p.createElement(S, { ...r, popupContent: i, className: s });
|
|
@@ -54,13 +55,13 @@ const T = "k-chart-shared-tooltip", x = "k-chart-tooltip-inverse", a = class a e
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
onShowTooltip(t) {
|
|
57
|
-
const { anchor:
|
|
58
|
-
let
|
|
59
|
-
s || (r ?
|
|
58
|
+
const { anchor: e, style: n, shared: r, className: i, crosshair: s } = t;
|
|
59
|
+
let o;
|
|
60
|
+
s || (r ? o = this.createSharedTooltipContext(t) : o = this.createTooltipContext(t), this.setState({
|
|
60
61
|
popupShown: !0,
|
|
61
|
-
popupAlign:
|
|
62
|
-
popupOffset:
|
|
63
|
-
popupContext:
|
|
62
|
+
popupAlign: e.align,
|
|
63
|
+
popupOffset: e.point,
|
|
64
|
+
popupContext: o,
|
|
64
65
|
popupStyles: n,
|
|
65
66
|
className: i,
|
|
66
67
|
shared: r
|
|
@@ -74,23 +75,23 @@ const T = "k-chart-shared-tooltip", x = "k-chart-tooltip-inverse", a = class a e
|
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
createSharedTooltipContext(t) {
|
|
77
|
-
const { points:
|
|
78
|
+
const { points: e, categoryText: n } = t, r = e.filter((o) => typeof o.series.name != "undefined").length > 0, i = t.series.length > 1;
|
|
78
79
|
let s = 1;
|
|
79
80
|
return r && s++, i && s++, {
|
|
80
81
|
categoryText: n,
|
|
81
82
|
colorMarker: i,
|
|
82
83
|
colspan: s,
|
|
83
84
|
nameColumn: r,
|
|
84
|
-
points: t.points.map((
|
|
85
|
+
points: t.points.map((o) => new c(o, t.format))
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
88
|
createTooltipContext(t) {
|
|
88
|
-
const { point:
|
|
89
|
-
return { point: new c(
|
|
89
|
+
const { point: e, format: n } = t;
|
|
90
|
+
return { point: new c(e, n) };
|
|
90
91
|
}
|
|
91
92
|
findRenderFunctionByIndex(t) {
|
|
92
|
-
const
|
|
93
|
-
return
|
|
93
|
+
const e = this.context.optionsStore.getState().series;
|
|
94
|
+
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;
|
|
94
95
|
}
|
|
95
96
|
findRenderFunction() {
|
|
96
97
|
const t = this.context.optionsStore.getState().tooltip;
|
|
@@ -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 m=require("react");function d(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const e=d(m),i="k-chart-shared-tooltip-marker",p=t=>{const{categoryText:r,colorMarker:n,colspan:l,nameColumn:o,points:c}=t,s=(a,u)=>e.createElement("tr",{key:u},n&&e.createElement("td",null,e.createElement("span",{className:i,style:{backgroundColor:a.series.color}})),o&&e.createElement("td",null,a.series.name),e.createElement("td",{dangerouslySetInnerHTML:{__html:a.formattedValue}}));return e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",{colSpan:l},r))),e.createElement("tbody",null,c.map(s)))};exports.SharedTooltipContent=p;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react");function d(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>t[n]})}}return r.default=t,Object.freeze(r)}const e=d(m),i="k-chart-shared-tooltip-marker",p=t=>{const{categoryText:r,colorMarker:n,colspan:l,nameColumn:o,points:c}=t,s=(a,u)=>e.createElement("tr",{key:u},n&&e.createElement("td",null,e.createElement("span",{className:i,style:{backgroundColor:a.series.color}})),o&&e.createElement("td",null,a.series.name),e.createElement("td",{dangerouslySetInnerHTML:{__html:a.formattedValue}}));return e.createElement("table",null,e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",{colSpan:l},r))),e.createElement("tbody",null,c.map(s)))};exports.SharedTooltipContent=p;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as e from "react";
|
|
9
10
|
const u = "k-chart-shared-tooltip-marker", E = (l) => {
|
|
10
11
|
const { categoryText: r, colorMarker: n, colspan: a, nameColumn: o, points: c } = l, m = (t, s) => /* @__PURE__ */ e.createElement("tr", { key: s }, n && /* @__PURE__ */ e.createElement("td", null, /* @__PURE__ */ e.createElement("span", { className: u, style: { backgroundColor: t.series.color } })), o && /* @__PURE__ */ e.createElement("td", null, t.series.name), /* @__PURE__ */ e.createElement("td", { dangerouslySetInnerHTML: { __html: t.formattedValue } }));
|
package/utils/index.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"});function l(r,t){let e=r;for(;e&&e!==t;)e=e.parentNode;return!!e}function i(r,t,e,o){const n=r[t];if(n&&Array.isArray(n)){for(const a of n)if(!a.type||a.type!==o)return new Error(`${e} children should be Array of type ${o.displayName}.`)}return null}const u=r=>r===void 0?!1:!r;exports.hasParent=l;exports.toggle=u;exports.validateChildren=i;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function l(r,t){let e=r;for(;e&&e!==t;)e=e.parentNode;return!!e}function i(r,t,e,o){const n=r[t];if(n&&Array.isArray(n)){for(const a of n)if(!a.type||a.type!==o)return new Error(`${e} children should be Array of type ${o.displayName}.`)}return null}const u=r=>r===void 0?!1:!r;exports.hasParent=l;exports.toggle=u;exports.validateChildren=i;
|
package/utils/index.mjs
CHANGED
|
@@ -5,22 +5,23 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
"use client";
|
|
9
|
+
function i(r, t) {
|
|
10
|
+
let e = r;
|
|
11
|
+
for (; e && e !== t; )
|
|
12
|
+
e = e.parentNode;
|
|
13
|
+
return !!e;
|
|
13
14
|
}
|
|
14
|
-
function l(
|
|
15
|
-
const n =
|
|
15
|
+
function l(r, t, e, o) {
|
|
16
|
+
const n = r[t];
|
|
16
17
|
if (n && Array.isArray(n)) {
|
|
17
18
|
for (const a of n)
|
|
18
19
|
if (!a.type || a.type !== o)
|
|
19
|
-
return new Error(`${
|
|
20
|
+
return new Error(`${e} children should be Array of type ${o.displayName}.`);
|
|
20
21
|
}
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
|
-
const u = (
|
|
24
|
+
const u = (r) => r === void 0 ? !1 : !r;
|
|
24
25
|
export {
|
|
25
26
|
i as hasParent,
|
|
26
27
|
u as toggle,
|