@progress/kendo-react-charts 9.4.0-develop.2 → 9.4.0-develop.21
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 +29 -24
- package/Chart.js +1 -1
- package/Chart.mjs +3 -4
- package/ChartBreadcrumb.js +1 -1
- package/ChartBreadcrumb.mjs +0 -1
- package/ChartContext.js +1 -1
- package/ChartContext.mjs +0 -1
- package/ChartNoDataOverlay.js +1 -1
- package/ChartNoDataOverlay.mjs +4 -5
- package/Container.js +1 -1
- package/Container.mjs +3 -4
- package/DonutCenter.js +1 -1
- package/DonutCenter.mjs +0 -1
- package/NOTICE.txt +40 -51
- package/Sparkline.js +1 -1
- package/Sparkline.mjs +0 -1
- package/StockChart.js +1 -1
- package/StockChart.mjs +0 -1
- package/components/AxisDefaults.js +1 -1
- package/components/AxisDefaults.mjs +0 -1
- package/components/CategoryAxis.js +1 -1
- package/components/CategoryAxis.mjs +10 -11
- package/components/CategoryAxisItem.js +1 -1
- package/components/CategoryAxisItem.mjs +0 -1
- package/components/ChartArea.js +1 -1
- package/components/ChartArea.mjs +4 -5
- package/components/Legend.js +1 -1
- package/components/Legend.mjs +3 -4
- package/components/Navigator.js +1 -1
- package/components/Navigator.mjs +0 -1
- package/components/Pane.js +1 -1
- package/components/Pane.mjs +3 -4
- package/components/PaneDefaults.js +1 -1
- package/components/PaneDefaults.mjs +5 -6
- package/components/Panes.js +1 -1
- package/components/Panes.mjs +4 -5
- package/components/PlotArea.js +1 -1
- package/components/PlotArea.mjs +3 -4
- package/components/Series.js +1 -1
- package/components/Series.mjs +5 -6
- package/components/SeriesDefaults.js +1 -1
- package/components/SeriesDefaults.mjs +0 -1
- package/components/SeriesItem.js +1 -1
- package/components/SeriesItem.mjs +0 -1
- package/components/Subtitle.js +1 -1
- package/components/Subtitle.mjs +0 -1
- package/components/Title.js +1 -1
- package/components/Title.mjs +0 -1
- package/components/Tooltip.js +1 -1
- package/components/Tooltip.mjs +3 -4
- package/components/ValueAxis.js +1 -1
- package/components/ValueAxis.mjs +10 -11
- package/components/ValueAxisItem.js +1 -1
- package/components/ValueAxisItem.mjs +2 -3
- package/components/XAxis.js +1 -1
- package/components/XAxis.mjs +5 -6
- package/components/XAxisItem.js +1 -1
- package/components/XAxisItem.mjs +0 -1
- package/components/YAxis.js +1 -1
- package/components/YAxis.mjs +9 -10
- package/components/YAxisItem.js +1 -1
- package/components/YAxisItem.mjs +0 -1
- package/components/Zoomable.js +1 -1
- package/components/Zoomable.mjs +3 -4
- package/components/axis-defaults/Crosshair.js +1 -1
- package/components/axis-defaults/Crosshair.mjs +2 -3
- package/components/axis-defaults/CrosshairTooltip.js +1 -1
- package/components/axis-defaults/CrosshairTooltip.mjs +2 -3
- package/components/axis-defaults/Labels.js +1 -1
- package/components/axis-defaults/Labels.mjs +5 -6
- package/components/axis-defaults/Title.js +1 -1
- package/components/axis-defaults/Title.mjs +0 -1
- package/components/base/CollectionConfigurationComponent.js +1 -1
- package/components/base/CollectionConfigurationComponent.mjs +12 -13
- package/components/base/ConfigurationComponent.js +1 -1
- package/components/base/ConfigurationComponent.mjs +0 -1
- package/components/category-axis-item/Crosshair.js +1 -1
- package/components/category-axis-item/Crosshair.mjs +4 -5
- package/components/category-axis-item/CrosshairTooltip.js +1 -1
- package/components/category-axis-item/CrosshairTooltip.mjs +3 -4
- package/components/category-axis-item/Labels.js +1 -1
- package/components/category-axis-item/Labels.mjs +0 -1
- package/components/category-axis-item/Notes.js +1 -1
- package/components/category-axis-item/Notes.mjs +4 -5
- package/components/category-axis-item/NotesIcon.js +1 -1
- package/components/category-axis-item/NotesIcon.mjs +0 -1
- package/components/category-axis-item/NotesLabel.js +1 -1
- package/components/category-axis-item/NotesLabel.mjs +2 -3
- package/components/category-axis-item/RangeLabels.js +1 -1
- package/components/category-axis-item/RangeLabels.mjs +0 -1
- package/components/category-axis-item/Title.js +1 -1
- package/components/category-axis-item/Title.mjs +0 -1
- package/components/legend/InactiveItems.js +1 -1
- package/components/legend/InactiveItems.mjs +0 -1
- package/components/legend/Item.js +1 -1
- package/components/legend/Item.mjs +0 -1
- package/components/legend/Title.js +1 -1
- package/components/legend/Title.mjs +0 -1
- package/components/navigator/CategoryAxis.js +1 -1
- package/components/navigator/CategoryAxis.mjs +0 -1
- package/components/navigator/Hint.js +1 -1
- package/components/navigator/Hint.mjs +3 -4
- package/components/navigator/Pane.js +1 -1
- package/components/navigator/Pane.mjs +0 -1
- package/components/navigator/Select.js +1 -1
- package/components/navigator/Select.mjs +0 -1
- package/components/navigator/Series.js +1 -1
- package/components/navigator/Series.mjs +0 -1
- package/components/navigator/SeriesItem.js +1 -1
- package/components/navigator/SeriesItem.mjs +2 -3
- package/components/pane-defaults/Title.js +1 -1
- package/components/pane-defaults/Title.mjs +0 -1
- package/components/series-item/ErrorBars.js +1 -1
- package/components/series-item/ErrorBars.mjs +3 -4
- package/components/series-item/Extremes.js +1 -1
- package/components/series-item/Extremes.mjs +0 -1
- package/components/series-item/Highlight.js +1 -1
- package/components/series-item/Highlight.mjs +3 -4
- package/components/series-item/Labels.js +1 -1
- package/components/series-item/Labels.mjs +0 -1
- package/components/series-item/LabelsFrom.js +1 -1
- package/components/series-item/LabelsFrom.mjs +3 -4
- package/components/series-item/LabelsTo.js +1 -1
- package/components/series-item/LabelsTo.mjs +2 -3
- package/components/series-item/Markers.js +1 -1
- package/components/series-item/Markers.mjs +2 -3
- package/components/series-item/Notes.js +1 -1
- package/components/series-item/Notes.mjs +2 -3
- package/components/series-item/NotesIcon.js +1 -1
- package/components/series-item/NotesIcon.mjs +3 -4
- package/components/series-item/NotesLabel.js +1 -1
- package/components/series-item/NotesLabel.mjs +0 -1
- package/components/series-item/Outliers.js +1 -1
- package/components/series-item/Outliers.mjs +2 -3
- package/components/series-item/Tooltip.js +1 -1
- package/components/series-item/Tooltip.mjs +0 -1
- package/components/value-axis-item/Crosshair.js +1 -1
- package/components/value-axis-item/Crosshair.mjs +3 -4
- package/components/value-axis-item/CrosshairTooltip.js +1 -1
- package/components/value-axis-item/CrosshairTooltip.mjs +3 -4
- package/components/value-axis-item/Labels.js +1 -1
- package/components/value-axis-item/Labels.mjs +0 -1
- package/components/value-axis-item/Notes.js +1 -1
- package/components/value-axis-item/Notes.mjs +4 -5
- package/components/value-axis-item/NotesIcon.js +1 -1
- package/components/value-axis-item/NotesIcon.mjs +2 -3
- package/components/value-axis-item/NotesLabel.js +1 -1
- package/components/value-axis-item/NotesLabel.mjs +0 -1
- package/components/value-axis-item/Title.js +1 -1
- package/components/value-axis-item/Title.mjs +0 -1
- package/components/x-axis-item/Crosshair.js +1 -1
- package/components/x-axis-item/Crosshair.mjs +3 -4
- package/components/x-axis-item/CrosshairTooltip.js +1 -1
- package/components/x-axis-item/CrosshairTooltip.mjs +3 -4
- package/components/x-axis-item/Labels.js +1 -1
- package/components/x-axis-item/Labels.mjs +0 -1
- package/components/x-axis-item/Notes.js +1 -1
- package/components/x-axis-item/Notes.mjs +3 -4
- package/components/x-axis-item/NotesIcon.js +1 -1
- package/components/x-axis-item/NotesIcon.mjs +2 -3
- package/components/x-axis-item/NotesLabel.js +1 -1
- package/components/x-axis-item/NotesLabel.mjs +2 -3
- package/components/x-axis-item/Title.js +1 -1
- package/components/x-axis-item/Title.mjs +0 -1
- package/components/y-axis-item/Crosshair.js +1 -1
- package/components/y-axis-item/Crosshair.mjs +3 -4
- package/components/y-axis-item/CrosshairTooltip.js +1 -1
- package/components/y-axis-item/CrosshairTooltip.mjs +3 -4
- package/components/y-axis-item/Labels.js +1 -1
- package/components/y-axis-item/Labels.mjs +0 -1
- package/components/y-axis-item/Notes.js +1 -1
- package/components/y-axis-item/Notes.mjs +3 -4
- package/components/y-axis-item/NotesIcon.js +1 -1
- package/components/y-axis-item/NotesIcon.mjs +2 -3
- package/components/y-axis-item/NotesLabel.js +1 -1
- package/components/y-axis-item/NotesLabel.mjs +2 -3
- package/components/y-axis-item/Title.js +1 -1
- package/components/y-axis-item/Title.mjs +0 -1
- package/dist/cdn/js/kendo-react-charts.js +8 -1
- package/events/axis-label-click-event.js +1 -1
- package/events/axis-label-click-event.mjs +0 -1
- package/events/base-event.js +1 -1
- package/events/base-event.mjs +2 -3
- package/events/chart-event-builder.js +1 -1
- package/events/chart-event-builder.mjs +4 -5
- package/events/dom-event.js +1 -1
- package/events/dom-event.mjs +7 -8
- package/events/drag-end-event.js +1 -1
- package/events/drag-end-event.mjs +4 -5
- package/events/drag-event.js +1 -1
- package/events/drag-event.mjs +2 -3
- package/events/drag-start-event.js +1 -1
- package/events/drag-start-event.mjs +0 -1
- package/events/drilldown-event.js +1 -1
- package/events/drilldown-event.mjs +0 -1
- package/events/drilldown-state-change-event.js +1 -1
- package/events/drilldown-state-change-event.mjs +0 -1
- package/events/legend-item-click-event.js +1 -1
- package/events/legend-item-click-event.mjs +0 -1
- package/events/legend-item-hover-event.js +1 -1
- package/events/legend-item-hover-event.mjs +0 -1
- package/events/legend-item-leave-event.js +1 -1
- package/events/legend-item-leave-event.mjs +0 -1
- package/events/navigator-filter-event.js +1 -1
- package/events/navigator-filter-event.mjs +0 -1
- package/events/note-click-event.js +1 -1
- package/events/note-click-event.mjs +0 -1
- package/events/note-hover-event.js +1 -1
- package/events/note-hover-event.mjs +2 -3
- package/events/plot-area-click-event.js +1 -1
- package/events/plot-area-click-event.mjs +0 -1
- package/events/plot-area-hover-event.js +1 -1
- package/events/plot-area-hover-event.mjs +3 -4
- package/events/preventable-event.js +1 -1
- package/events/preventable-event.mjs +0 -1
- package/events/render-event.js +1 -1
- package/events/render-event.mjs +2 -3
- package/events/select-end-event.js +1 -1
- package/events/select-end-event.mjs +2 -3
- package/events/select-event.js +1 -1
- package/events/select-event.mjs +4 -5
- package/events/select-start-event.js +1 -1
- package/events/select-start-event.mjs +2 -3
- package/events/series-click-event.js +1 -1
- package/events/series-click-event.mjs +0 -1
- package/events/series-hover-event.js +1 -1
- package/events/series-hover-event.mjs +0 -1
- package/events/zoom-end-event.js +1 -1
- package/events/zoom-end-event.mjs +5 -6
- package/events/zoom-event.js +1 -1
- package/events/zoom-event.mjs +0 -1
- package/events/zoom-start-event.js +1 -1
- package/events/zoom-start-event.mjs +2 -3
- package/index.js +2 -1
- package/messages.js +1 -1
- package/messages.mjs +0 -1
- package/methods/index.js +1 -1
- package/methods/index.mjs +9 -10
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +7 -7
- package/sankey/Sankey.js +1 -1
- package/sankey/Sankey.mjs +25 -23
- package/sankey/SankeyTooltip.js +1 -1
- package/sankey/SankeyTooltip.mjs +7 -8
- package/sankey/messages.js +1 -1
- package/sankey/messages.mjs +0 -1
- package/sankey/propTypes.js +1 -1
- package/sankey/propTypes.mjs +0 -1
- package/sankey/utils.js +1 -1
- package/sankey/utils.mjs +0 -1
- package/store/reducer.js +1 -1
- package/store/reducer.mjs +3 -4
- package/store/store.js +1 -1
- package/store/store.mjs +0 -1
- package/tooltip/Crosshair.js +1 -1
- package/tooltip/Crosshair.mjs +6 -7
- package/tooltip/CrosshairContainer.js +1 -1
- package/tooltip/CrosshairContainer.mjs +0 -1
- package/tooltip/Point.js +1 -1
- package/tooltip/Point.mjs +4 -5
- package/tooltip/Popup.js +1 -1
- package/tooltip/Popup.mjs +6 -7
- package/tooltip/Series.js +1 -1
- package/tooltip/Series.mjs +18 -19
- package/tooltip/SharedTooltipContent.js +1 -1
- package/tooltip/SharedTooltipContent.mjs +0 -1
- package/utils/index.js +1 -1
- package/utils/index.mjs +9 -10
- package/sankey/theme-service.js +0 -29
- package/sankey/theme-service.mjs +0 -100
- package/theming/theme-service.js +0 -51
- package/theming/theme-service.mjs +0 -122
package/utils/index.mjs
CHANGED
|
@@ -5,23 +5,22 @@
|
|
|
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
|
-
|
|
13
|
-
return !!e;
|
|
8
|
+
function i(e, t) {
|
|
9
|
+
let r = e;
|
|
10
|
+
for (; r && r !== t; )
|
|
11
|
+
r = r.parentNode;
|
|
12
|
+
return !!r;
|
|
14
13
|
}
|
|
15
|
-
function l(
|
|
16
|
-
const n =
|
|
14
|
+
function l(e, t, r, o) {
|
|
15
|
+
const n = e[t];
|
|
17
16
|
if (n && Array.isArray(n)) {
|
|
18
17
|
for (const a of n)
|
|
19
18
|
if (!a.type || a.type !== o)
|
|
20
|
-
return new Error(`${
|
|
19
|
+
return new Error(`${r} children should be Array of type ${o.displayName}.`);
|
|
21
20
|
}
|
|
22
21
|
return null;
|
|
23
22
|
}
|
|
24
|
-
const u = (
|
|
23
|
+
const u = (e) => e === void 0 ? !1 : !e;
|
|
25
24
|
export {
|
|
26
25
|
i as hasParent,
|
|
27
26
|
u as toggle,
|
package/sankey/theme-service.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=t=>`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`,d=t=>window.getComputedStyle(t).backgroundColor,v=t=>t.toLowerCase().charCodeAt(0)-97,u=t=>{const e=t.match(/series-([a-z])$/);if(e!==null)return v(e[1]);const s=t.split("--series-")[1];return parseInt(s,10)-1},h=30,m=()=>{let t=`
|
|
9
|
-
<div class="k-var--series-a"></div>
|
|
10
|
-
<div class="k-var--series-b"></div>
|
|
11
|
-
<div class="k-var--series-c"></div>
|
|
12
|
-
<div class="k-var--series-d"></div>
|
|
13
|
-
<div class="k-var--series-e"></div>
|
|
14
|
-
<div class="k-var--series-f"></div>
|
|
15
|
-
`;for(let e=0;e<h;e++)t+=`
|
|
16
|
-
<div class="k-var--series-${e+1}"></div>`;return t},k=`
|
|
17
|
-
<div class="k-var--background"></div>
|
|
18
|
-
<div class="k-var--normal-text-color"></div>
|
|
19
|
-
<div class="k-var--kendo-color-subtle"></div>
|
|
20
|
-
|
|
21
|
-
<div class="k-widget k-chart">
|
|
22
|
-
<div class="k-var--chart-font"></div>
|
|
23
|
-
<div class="k-var--chart-title-font"></div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="k-var--series-unset"></div>
|
|
26
|
-
<div class="k-var--series">
|
|
27
|
-
${m()}
|
|
28
|
-
</div>
|
|
29
|
-
`;class y{constructor(e){this.store=e}setStyle(e,s){const o=e.split(".");let l=this.store;o.forEach((i,c,n)=>{c<n.length-1&&(l=l[i]=l[i]||{})});const r=o.pop();r&&(l[r]=s)}setColors(){this.mapColor("labels.color","normal-text-color"),this.mapColor("labels.stroke.color","background");const e=this.element.querySelector(".k-var--kendo-color-subtle");e.style.color="var(--kendo-color-subtle)",this.mapColor("links.color","kendo-color-subtle","color"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("title.color","normal-text-color")}setFonts(){const e=a(this.queryStyle("chart-title-font")),s=a(this.queryStyle("chart-font"));this.setStyle("title.font",e),this.setStyle("labels.font",s),this.setStyle("legend.labels.font",s)}setNodeColors(){const e=this.element;if(!e)return;const s=[].slice.call(e.querySelectorAll(".k-var--series div")),o=d(e.querySelector(".k-var--series-unset")),l=s.reduce((r,i)=>{const c=u(i.className),n=d(i);return n!==o&&(r[c]=n),r},[]);this.setStyle("nodeColors",l)}mapColor(e,s,o="backgroundColor"){this.setStyle(e,this.queryStyle(s)[o])}queryStyle(e){const s=this.element;return window.getComputedStyle(s.querySelector(`.k-var--${e}`))}}const C=(t,e)=>{const s={nodeColors:[]},o=new y(s),l=o.element=t.createElement("div");l.style.display="none",l.innerHTML=k,t.body.appendChild(l);try{o.setColors(),o.setFonts(),o.setNodeColors()}finally{t.body.removeChild(o.element),o.element=null,e(s)}};exports.loadTheme=C;
|
package/sankey/theme-service.mjs
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";
|
|
9
|
-
const a = (t) => `${t.fontWeight} ${t.fontSize} ${t.fontFamily}`, d = (t) => window.getComputedStyle(t).backgroundColor, v = (t) => t.toLowerCase().charCodeAt(0) - 97, u = (t) => {
|
|
10
|
-
const e = t.match(/series-([a-z])$/);
|
|
11
|
-
if (e !== null)
|
|
12
|
-
return v(e[1]);
|
|
13
|
-
const s = t.split("--series-")[1];
|
|
14
|
-
return parseInt(s, 10) - 1;
|
|
15
|
-
};
|
|
16
|
-
const h = () => {
|
|
17
|
-
let t = `
|
|
18
|
-
<div class="k-var--series-a"></div>
|
|
19
|
-
<div class="k-var--series-b"></div>
|
|
20
|
-
<div class="k-var--series-c"></div>
|
|
21
|
-
<div class="k-var--series-d"></div>
|
|
22
|
-
<div class="k-var--series-e"></div>
|
|
23
|
-
<div class="k-var--series-f"></div>
|
|
24
|
-
`;
|
|
25
|
-
for (let e = 0; e < 30; e++)
|
|
26
|
-
t += `
|
|
27
|
-
<div class="k-var--series-${e + 1}"></div>`;
|
|
28
|
-
return t;
|
|
29
|
-
}, k = `
|
|
30
|
-
<div class="k-var--background"></div>
|
|
31
|
-
<div class="k-var--normal-text-color"></div>
|
|
32
|
-
<div class="k-var--kendo-color-subtle"></div>
|
|
33
|
-
|
|
34
|
-
<div class="k-widget k-chart">
|
|
35
|
-
<div class="k-var--chart-font"></div>
|
|
36
|
-
<div class="k-var--chart-title-font"></div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="k-var--series-unset"></div>
|
|
39
|
-
<div class="k-var--series">
|
|
40
|
-
${h()}
|
|
41
|
-
</div>
|
|
42
|
-
`;
|
|
43
|
-
class m {
|
|
44
|
-
constructor(e) {
|
|
45
|
-
this.store = e;
|
|
46
|
-
}
|
|
47
|
-
setStyle(e, s) {
|
|
48
|
-
const o = e.split(".");
|
|
49
|
-
let l = this.store;
|
|
50
|
-
o.forEach((i, c, n) => {
|
|
51
|
-
c < n.length - 1 && (l = l[i] = l[i] || {});
|
|
52
|
-
});
|
|
53
|
-
const r = o.pop();
|
|
54
|
-
r && (l[r] = s);
|
|
55
|
-
}
|
|
56
|
-
setColors() {
|
|
57
|
-
this.mapColor("labels.color", "normal-text-color"), this.mapColor("labels.stroke.color", "background");
|
|
58
|
-
const e = this.element.querySelector(".k-var--kendo-color-subtle");
|
|
59
|
-
e.style.color = "var(--kendo-color-subtle)", this.mapColor("links.color", "kendo-color-subtle", "color"), this.mapColor("legend.labels.color", "normal-text-color"), this.mapColor("title.color", "normal-text-color");
|
|
60
|
-
}
|
|
61
|
-
setFonts() {
|
|
62
|
-
const e = a(this.queryStyle("chart-title-font")), s = a(this.queryStyle("chart-font"));
|
|
63
|
-
this.setStyle("title.font", e), this.setStyle("labels.font", s), this.setStyle("legend.labels.font", s);
|
|
64
|
-
}
|
|
65
|
-
setNodeColors() {
|
|
66
|
-
const e = this.element;
|
|
67
|
-
if (!e)
|
|
68
|
-
return;
|
|
69
|
-
const s = [].slice.call(e.querySelectorAll(".k-var--series div")), o = d(e.querySelector(".k-var--series-unset")), l = s.reduce(
|
|
70
|
-
(r, i) => {
|
|
71
|
-
const c = u(i.className), n = d(i);
|
|
72
|
-
return n !== o && (r[c] = n), r;
|
|
73
|
-
},
|
|
74
|
-
[]
|
|
75
|
-
// Will populate the colors in this array
|
|
76
|
-
);
|
|
77
|
-
this.setStyle("nodeColors", l);
|
|
78
|
-
}
|
|
79
|
-
mapColor(e, s, o = "backgroundColor") {
|
|
80
|
-
this.setStyle(e, this.queryStyle(s)[o]);
|
|
81
|
-
}
|
|
82
|
-
queryStyle(e) {
|
|
83
|
-
const s = this.element;
|
|
84
|
-
return window.getComputedStyle(s.querySelector(`.k-var--${e}`));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const C = (t, e) => {
|
|
88
|
-
const s = {
|
|
89
|
-
nodeColors: []
|
|
90
|
-
}, o = new m(s), l = o.element = t.createElement("div");
|
|
91
|
-
l.style.display = "none", l.innerHTML = k, t.body.appendChild(l);
|
|
92
|
-
try {
|
|
93
|
-
o.setColors(), o.setFonts(), o.setNodeColors();
|
|
94
|
-
} finally {
|
|
95
|
-
t.body.removeChild(o.element), o.element = null, e(s);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
export {
|
|
99
|
-
C as loadTheme
|
|
100
|
-
};
|
package/theming/theme-service.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-charts"),r=t=>`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`,d=t=>window.getComputedStyle(t).backgroundColor,v=t=>t.toLowerCase().charCodeAt(0)-97,u=t=>{const e=t.match(/series-([a-z])$/);if(e!==null)return v(e[1]);const s=t.split("--series-")[1];return parseInt(s,10)-1},m=30,p=()=>{let t=`
|
|
9
|
-
<div class="k-var--series-a"></div>
|
|
10
|
-
<div class="k-var--series-b"></div>
|
|
11
|
-
<div class="k-var--series-c"></div>
|
|
12
|
-
<div class="k-var--series-d"></div>
|
|
13
|
-
<div class="k-var--series-e"></div>
|
|
14
|
-
<div class="k-var--series-f"></div>
|
|
15
|
-
`;for(let e=0;e<m;e++)t+=`
|
|
16
|
-
<div class="k-var--series-${e+1}"></div>`;return t},f=`
|
|
17
|
-
<div class="k-var--primary"></div>
|
|
18
|
-
<div class="k-var--base"></div>
|
|
19
|
-
<div class="k-var--background"></div>
|
|
20
|
-
|
|
21
|
-
<div class="k-var--normal-background"></div>
|
|
22
|
-
<div class="k-var--normal-text-color"></div>
|
|
23
|
-
<div class="k-var--hover-background"></div>
|
|
24
|
-
<div class="k-var--hover-text-color"></div>
|
|
25
|
-
<div class="k-var--selected-background"></div>
|
|
26
|
-
<div class="k-var--selected-text-color"></div>
|
|
27
|
-
<div class="k-var--chart-error-bars-background"></div>
|
|
28
|
-
<div class="k-var--chart-notes-background"></div>
|
|
29
|
-
<div class="k-var--chart-notes-border"></div>
|
|
30
|
-
<div class="k-var--chart-notes-lines"></div>
|
|
31
|
-
<div class="k-var--chart-crosshair-background"></div>
|
|
32
|
-
|
|
33
|
-
<div class="k-var--chart-inactive"></div>
|
|
34
|
-
<div class="k-var--chart-major-lines"></div>
|
|
35
|
-
<div class="k-var--chart-minor-lines"></div>
|
|
36
|
-
<div class="k-var--chart-area-opacity"></div>
|
|
37
|
-
<div class="k-var--chart-area-inactive-opacity"></div>
|
|
38
|
-
<div class="k-var--chart-line-inactive-opacity"></div>
|
|
39
|
-
|
|
40
|
-
<div class="k-widget k-chart">
|
|
41
|
-
<div class="k-var--chart-font"></div>
|
|
42
|
-
<div class="k-var--chart-title-font"></div>
|
|
43
|
-
<div class="k-var--chart-pane-title-font"></div>
|
|
44
|
-
<div class="k-var--chart-label-font"></div>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="k-var--series-unset"></div>
|
|
48
|
-
<div class="k-var--series">
|
|
49
|
-
${p()}
|
|
50
|
-
</div>
|
|
51
|
-
`;class y{constructor(e){this.store=e}setStyle(e,s){this.store.dispatch({type:"set",payload:{field:e,value:s}})}setColors(){this.mapColor("axisDefaults.crosshair.color","chart-crosshair-background"),this.mapColor("axisDefaults.labels.color","normal-text-color"),this.mapColor("axisDefaults.line.color","chart-major-lines"),this.mapColor("axisDefaults.majorGridLines.color","chart-major-lines"),this.mapColor("axisDefaults.minorGridLines.color","chart-minor-lines"),this.mapColor("axisDefaults.notes.icon.background","chart-notes-background"),this.mapColor("axisDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("axisDefaults.notes.line.color","chart-notes-lines"),this.mapColor("axisDefaults.title.color","normal-text-color"),this.mapColor("chartArea.background","background"),this.mapColor("legend.inactiveItems.labels.color","chart-inactive"),this.mapColor("legend.inactiveItems.markers.color","chart-inactive"),this.mapColor("legend.labels.color","normal-text-color"),this.mapColor("seriesDefaults.boxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.boxPlot.mean.color","base"),this.mapColor("seriesDefaults.boxPlot.median.color","base"),this.mapColor("seriesDefaults.boxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.bullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.candlestick.downColor","normal-text-color"),this.mapColor("seriesDefaults.candlestick.line.color","normal-text-color"),this.mapColor("seriesDefaults.errorBars.color","chart-error-bars-background"),this.mapColor("seriesDefaults.horizontalWaterfall.line.color","chart-major-lines"),this.mapColor("seriesDefaults.icon.border.color","chart-major-lines"),this.mapColor("seriesDefaults.labels.background","background"),this.mapColor("seriesDefaults.labels.color","normal-text-color"),this.mapColor("seriesDefaults.notes.icon.background","chart-notes-background"),this.mapColor("seriesDefaults.notes.icon.border.color","chart-notes-border"),this.mapColor("seriesDefaults.notes.line.color","chart-notes-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.downColor","chart-major-lines"),this.mapColor("seriesDefaults.verticalBoxPlot.mean.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.median.color","base"),this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color","primary"),this.mapColor("seriesDefaults.verticalBullet.target.color","normal-text-color"),this.mapColor("seriesDefaults.waterfall.line.color","chart-major-lines"),this.mapColor("title.color","normal-text-color"),this.mapColor("subtitle.color","normal-text-color");const e=parseFloat(this.queryStyle("chart-area-opacity").opacity);isNaN(e)||(this.setStyle("seriesDefaults.area.opacity",e),this.setStyle("seriesDefaults.radarArea.opacity",e),this.setStyle("seriesDefaults.verticalArea.opacity",e),this.setStyle("seriesDefaults.labels.opacity",e)),this.setInactiveOpacity(["area","verticalArea"],"chart-area-inactive-opacity"),this.setInactiveOpacity(["line","verticalLine"],"chart-line-inactive-opacity")}setFonts(){const e=r(this.queryStyle("chart-font")),s=r(this.queryStyle("chart-title-font")),a=r(this.queryStyle("chart-pane-title-font")),o=r(this.queryStyle("chart-label-font"));this.setStyle("axisDefaults.labels.font",o),this.setStyle("axisDefaults.notes.label.font",e),this.setStyle("axisDefaults.title.font",e),this.setStyle("legend.labels.font",e),this.setStyle("seriesDefaults.labels.font",o),this.setStyle("seriesDefaults.notes.label.font",e),this.setStyle("title.font",s),this.setStyle("subtitle.font",a),this.setStyle("paneDefaults.title.font",a)}setSeriesColors(){const e=this.element,s=[].slice.call(e.querySelectorAll(".k-var--series div")),a=d(e.querySelector(".k-var--series-unset")),o=s.reduce((l,i)=>{const h=u(i.className),c=d(i);return c!==a&&(l[h]=c),l},[]);this.setStyle("seriesColors",o)}mapColor(e,s){this.setStyle(e,this.queryStyle(s).backgroundColor)}queryStyle(e){const s=this.element;return window.getComputedStyle(s.querySelector(`.k-var--${e}`))}setInactiveOpacity(e,s){const a=parseFloat(this.queryStyle(s).opacity);!isNaN(a)&&a<1&&e.forEach(o=>this.setStyle(`seriesDefaults.${o}.highlight.inactiveOpacity`,a))}}const k=(t,e,s)=>{const a=new y(t);if(typeof s=="undefined"){t.dispatch({type:"push",payload:n.chartBaseTheme()});return}const o=a.element=s.createElement("div");o.style.display="none",o.innerHTML=f,s.body.appendChild(o);try{t.dispatch({type:"push",payload:n.chartBaseTheme()}),a.setColors(),a.setFonts(),a.setSeriesColors()}finally{s.body.removeChild(a.element),delete a.element,e()}};exports.loadTheme=k;
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use client";
|
|
9
|
-
import { chartBaseTheme as n } from "@progress/kendo-charts";
|
|
10
|
-
const r = (t) => `${t.fontWeight} ${t.fontSize} ${t.fontFamily}`, d = (t) => window.getComputedStyle(t).backgroundColor, v = (t) => t.toLowerCase().charCodeAt(0) - 97, u = (t) => {
|
|
11
|
-
const e = t.match(/series-([a-z])$/);
|
|
12
|
-
if (e !== null)
|
|
13
|
-
return v(e[1]);
|
|
14
|
-
const s = t.split("--series-")[1];
|
|
15
|
-
return parseInt(s, 10) - 1;
|
|
16
|
-
}, m = 30, p = () => {
|
|
17
|
-
let t = `
|
|
18
|
-
<div class="k-var--series-a"></div>
|
|
19
|
-
<div class="k-var--series-b"></div>
|
|
20
|
-
<div class="k-var--series-c"></div>
|
|
21
|
-
<div class="k-var--series-d"></div>
|
|
22
|
-
<div class="k-var--series-e"></div>
|
|
23
|
-
<div class="k-var--series-f"></div>
|
|
24
|
-
`;
|
|
25
|
-
for (let e = 0; e < m; e++)
|
|
26
|
-
t += `
|
|
27
|
-
<div class="k-var--series-${e + 1}"></div>`;
|
|
28
|
-
return t;
|
|
29
|
-
}, f = `
|
|
30
|
-
<div class="k-var--primary"></div>
|
|
31
|
-
<div class="k-var--base"></div>
|
|
32
|
-
<div class="k-var--background"></div>
|
|
33
|
-
|
|
34
|
-
<div class="k-var--normal-background"></div>
|
|
35
|
-
<div class="k-var--normal-text-color"></div>
|
|
36
|
-
<div class="k-var--hover-background"></div>
|
|
37
|
-
<div class="k-var--hover-text-color"></div>
|
|
38
|
-
<div class="k-var--selected-background"></div>
|
|
39
|
-
<div class="k-var--selected-text-color"></div>
|
|
40
|
-
<div class="k-var--chart-error-bars-background"></div>
|
|
41
|
-
<div class="k-var--chart-notes-background"></div>
|
|
42
|
-
<div class="k-var--chart-notes-border"></div>
|
|
43
|
-
<div class="k-var--chart-notes-lines"></div>
|
|
44
|
-
<div class="k-var--chart-crosshair-background"></div>
|
|
45
|
-
|
|
46
|
-
<div class="k-var--chart-inactive"></div>
|
|
47
|
-
<div class="k-var--chart-major-lines"></div>
|
|
48
|
-
<div class="k-var--chart-minor-lines"></div>
|
|
49
|
-
<div class="k-var--chart-area-opacity"></div>
|
|
50
|
-
<div class="k-var--chart-area-inactive-opacity"></div>
|
|
51
|
-
<div class="k-var--chart-line-inactive-opacity"></div>
|
|
52
|
-
|
|
53
|
-
<div class="k-widget k-chart">
|
|
54
|
-
<div class="k-var--chart-font"></div>
|
|
55
|
-
<div class="k-var--chart-title-font"></div>
|
|
56
|
-
<div class="k-var--chart-pane-title-font"></div>
|
|
57
|
-
<div class="k-var--chart-label-font"></div>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div class="k-var--series-unset"></div>
|
|
61
|
-
<div class="k-var--series">
|
|
62
|
-
${p()}
|
|
63
|
-
</div>
|
|
64
|
-
`;
|
|
65
|
-
class y {
|
|
66
|
-
constructor(e) {
|
|
67
|
-
this.store = e;
|
|
68
|
-
}
|
|
69
|
-
setStyle(e, s) {
|
|
70
|
-
this.store.dispatch({ type: "set", payload: { field: e, value: s } });
|
|
71
|
-
}
|
|
72
|
-
setColors() {
|
|
73
|
-
this.mapColor("axisDefaults.crosshair.color", "chart-crosshair-background"), this.mapColor("axisDefaults.labels.color", "normal-text-color"), this.mapColor("axisDefaults.line.color", "chart-major-lines"), this.mapColor("axisDefaults.majorGridLines.color", "chart-major-lines"), this.mapColor("axisDefaults.minorGridLines.color", "chart-minor-lines"), this.mapColor("axisDefaults.notes.icon.background", "chart-notes-background"), this.mapColor("axisDefaults.notes.icon.border.color", "chart-notes-border"), this.mapColor("axisDefaults.notes.line.color", "chart-notes-lines"), this.mapColor("axisDefaults.title.color", "normal-text-color"), this.mapColor("chartArea.background", "background"), this.mapColor("legend.inactiveItems.labels.color", "chart-inactive"), this.mapColor("legend.inactiveItems.markers.color", "chart-inactive"), this.mapColor("legend.labels.color", "normal-text-color"), this.mapColor("seriesDefaults.boxPlot.downColor", "chart-major-lines"), this.mapColor("seriesDefaults.boxPlot.mean.color", "base"), this.mapColor("seriesDefaults.boxPlot.median.color", "base"), this.mapColor("seriesDefaults.boxPlot.whiskers.color", "primary"), this.mapColor("seriesDefaults.bullet.target.color", "normal-text-color"), this.mapColor("seriesDefaults.candlestick.downColor", "normal-text-color"), this.mapColor("seriesDefaults.candlestick.line.color", "normal-text-color"), this.mapColor("seriesDefaults.errorBars.color", "chart-error-bars-background"), this.mapColor("seriesDefaults.horizontalWaterfall.line.color", "chart-major-lines"), this.mapColor("seriesDefaults.icon.border.color", "chart-major-lines"), this.mapColor("seriesDefaults.labels.background", "background"), this.mapColor("seriesDefaults.labels.color", "normal-text-color"), this.mapColor("seriesDefaults.notes.icon.background", "chart-notes-background"), this.mapColor("seriesDefaults.notes.icon.border.color", "chart-notes-border"), this.mapColor("seriesDefaults.notes.line.color", "chart-notes-lines"), this.mapColor("seriesDefaults.verticalBoxPlot.downColor", "chart-major-lines"), this.mapColor("seriesDefaults.verticalBoxPlot.mean.color", "base"), this.mapColor("seriesDefaults.verticalBoxPlot.median.color", "base"), this.mapColor("seriesDefaults.verticalBoxPlot.whiskers.color", "primary"), this.mapColor("seriesDefaults.verticalBullet.target.color", "normal-text-color"), this.mapColor("seriesDefaults.waterfall.line.color", "chart-major-lines"), this.mapColor("title.color", "normal-text-color"), this.mapColor("subtitle.color", "normal-text-color");
|
|
74
|
-
const e = parseFloat(this.queryStyle("chart-area-opacity").opacity);
|
|
75
|
-
isNaN(e) || (this.setStyle("seriesDefaults.area.opacity", e), this.setStyle("seriesDefaults.radarArea.opacity", e), this.setStyle("seriesDefaults.verticalArea.opacity", e), this.setStyle("seriesDefaults.labels.opacity", e)), this.setInactiveOpacity(["area", "verticalArea"], "chart-area-inactive-opacity"), this.setInactiveOpacity(["line", "verticalLine"], "chart-line-inactive-opacity");
|
|
76
|
-
}
|
|
77
|
-
setFonts() {
|
|
78
|
-
const e = r(this.queryStyle("chart-font")), s = r(this.queryStyle("chart-title-font")), a = r(this.queryStyle("chart-pane-title-font")), o = r(this.queryStyle("chart-label-font"));
|
|
79
|
-
this.setStyle("axisDefaults.labels.font", o), this.setStyle("axisDefaults.notes.label.font", e), this.setStyle("axisDefaults.title.font", e), this.setStyle("legend.labels.font", e), this.setStyle("seriesDefaults.labels.font", o), this.setStyle("seriesDefaults.notes.label.font", e), this.setStyle("title.font", s), this.setStyle("subtitle.font", a), this.setStyle("paneDefaults.title.font", a);
|
|
80
|
-
}
|
|
81
|
-
setSeriesColors() {
|
|
82
|
-
const e = this.element, s = [].slice.call(e.querySelectorAll(".k-var--series div")), a = d(e.querySelector(".k-var--series-unset")), o = s.reduce(
|
|
83
|
-
(l, i) => {
|
|
84
|
-
const h = u(i.className), c = d(i);
|
|
85
|
-
return c !== a && (l[h] = c), l;
|
|
86
|
-
},
|
|
87
|
-
[]
|
|
88
|
-
// Will populate the series colors in this array
|
|
89
|
-
);
|
|
90
|
-
this.setStyle("seriesColors", o);
|
|
91
|
-
}
|
|
92
|
-
mapColor(e, s) {
|
|
93
|
-
this.setStyle(e, this.queryStyle(s).backgroundColor);
|
|
94
|
-
}
|
|
95
|
-
queryStyle(e) {
|
|
96
|
-
const s = this.element;
|
|
97
|
-
return window.getComputedStyle(s.querySelector(`.k-var--${e}`));
|
|
98
|
-
}
|
|
99
|
-
setInactiveOpacity(e, s) {
|
|
100
|
-
const a = parseFloat(this.queryStyle(s).opacity);
|
|
101
|
-
!isNaN(a) && a < 1 && e.forEach(
|
|
102
|
-
(o) => this.setStyle(`seriesDefaults.${o}.highlight.inactiveOpacity`, a)
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const C = (t, e, s) => {
|
|
107
|
-
const a = new y(t);
|
|
108
|
-
if (typeof s == "undefined") {
|
|
109
|
-
t.dispatch({ type: "push", payload: n() });
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
const o = a.element = s.createElement("div");
|
|
113
|
-
o.style.display = "none", o.innerHTML = f, s.body.appendChild(o);
|
|
114
|
-
try {
|
|
115
|
-
t.dispatch({ type: "push", payload: n() }), a.setColors(), a.setFonts(), a.setSeriesColors();
|
|
116
|
-
} finally {
|
|
117
|
-
s.body.removeChild(a.element), delete a.element, e();
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
export {
|
|
121
|
-
C as loadTheme
|
|
122
|
-
};
|