@progress/kendo-react-chart-wizard 16.2.0-develop.2 → 16.2.0-develop.20
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/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/components/panels/BarChartPanel.js +1 -1
- package/components/panels/BarChartPanel.mjs +32 -33
- package/components/panels/CategoryAxisPanel.js +1 -1
- package/components/panels/CategoryAxisPanel.mjs +29 -30
- package/components/panels/ChartAreaPanel.js +1 -1
- package/components/panels/ChartAreaPanel.mjs +42 -46
- package/components/panels/ColumnChartPanel.js +1 -1
- package/components/panels/ColumnChartPanel.mjs +33 -37
- package/components/panels/ConfigurationPanel.js +1 -1
- package/components/panels/ConfigurationPanel.mjs +29 -33
- package/components/panels/LegendPanel.js +1 -1
- package/components/panels/LegendPanel.mjs +42 -62
- package/components/panels/LineChartPanel.js +1 -1
- package/components/panels/LineChartPanel.mjs +32 -36
- package/components/panels/PieChartPanel.js +1 -1
- package/components/panels/PieChartPanel.mjs +20 -21
- package/components/panels/ScatterChartPanel.js +1 -1
- package/components/panels/ScatterChartPanel.mjs +19 -20
- package/components/panels/SeriesPanel.js +1 -1
- package/components/panels/SeriesPanel.mjs +19 -23
- package/components/panels/TitlePanel.js +1 -1
- package/components/panels/TitlePanel.mjs +18 -28
- package/components/panels/ValueAxisPanel.js +1 -1
- package/components/panels/ValueAxisPanel.mjs +43 -52
- package/dist/cdn/js/kendo-react-chart-wizard.js +1 -1
- package/package.json +13 -19
|
@@ -6,41 +6,40 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { pieChart as x, messages as i, pieChartPie as f } from "../../messages.mjs";
|
|
9
|
+
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
10
|
+
import { ExpansionPanel as d, ExpansionPanelContent as h } from "@progress/kendo-react-layout";
|
|
11
|
+
import { mergeStates as C, createState as P } from "../../utils.mjs";
|
|
12
|
+
import { pieChart as u, messages as i, pieChartPie as x } from "../../messages.mjs";
|
|
14
13
|
import { SeriesTypesWrap as g } from "../SeriesTypesWrap.mjs";
|
|
15
14
|
import { SeriesTypeButton as S } from "../SeriesTypeButton.mjs";
|
|
16
|
-
import { chartPieIcon as
|
|
17
|
-
const
|
|
18
|
-
const n =
|
|
19
|
-
s(!
|
|
20
|
-
}, []),
|
|
21
|
-
a.onStateChange(
|
|
15
|
+
import { chartPieIcon as f } from "@progress/kendo-svg-icons";
|
|
16
|
+
const A = (a) => {
|
|
17
|
+
const n = l(), t = a.state, r = t.seriesType, [o, s] = e.useState(!0), p = e.useCallback((m) => {
|
|
18
|
+
s(!m.expanded);
|
|
19
|
+
}, []), c = () => {
|
|
20
|
+
a.onStateChange(C(t, P(t.data, "pie")));
|
|
22
21
|
};
|
|
23
22
|
return /* @__PURE__ */ e.createElement(
|
|
24
|
-
|
|
23
|
+
d,
|
|
25
24
|
{
|
|
26
25
|
style: { maxWidth: "576px" },
|
|
27
|
-
title: n.toLanguageString(
|
|
28
|
-
expanded:
|
|
26
|
+
title: n.toLanguageString(u, i.pieChart),
|
|
27
|
+
expanded: o,
|
|
29
28
|
tabIndex: 0,
|
|
30
29
|
onAction: p
|
|
31
30
|
},
|
|
32
|
-
/* @__PURE__ */ e.createElement(
|
|
31
|
+
/* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement(g, null, /* @__PURE__ */ e.createElement(
|
|
33
32
|
S,
|
|
34
33
|
{
|
|
35
|
-
selected:
|
|
36
|
-
onClick:
|
|
37
|
-
icon:
|
|
34
|
+
selected: r === "pie",
|
|
35
|
+
onClick: c,
|
|
36
|
+
icon: f,
|
|
38
37
|
iconName: "chart-pie"
|
|
39
38
|
},
|
|
40
|
-
n.toLanguageString(
|
|
41
|
-
)))
|
|
39
|
+
n.toLanguageString(x, i.pieChartPie)
|
|
40
|
+
)))
|
|
42
41
|
);
|
|
43
42
|
};
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
A as PieChartPanel
|
|
46
45
|
};
|
|
@@ -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 p=require("react"),g=require("@progress/kendo-react-
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react"),g=require("@progress/kendo-react-intl"),s=require("@progress/kendo-react-layout"),o=require("../../utils.js"),c=require("../../messages.js"),m=require("../SeriesTypesWrap.js"),y=require("../SeriesTypeButton.js"),h=require("@progress/kendo-svg-icons");function C(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const r=C(p),b=e=>{const a=g.useLocalization(),t=e.state,n=t.seriesType,[i,l]=r.useState(!0),u=r.useCallback(d=>{l(!d.expanded)},[]),S=()=>{e.onStateChange(o.mergeStates(t,o.createState(t.data,"scatter")))};return r.createElement(s.ExpansionPanel,{style:{maxWidth:"576px"},title:a.toLanguageString(c.scatterChart,c.messages.scatterChart),expanded:i,tabIndex:0,onAction:u},r.createElement(s.ExpansionPanelContent,null,r.createElement(m.SeriesTypesWrap,null,r.createElement(y.SeriesTypeButton,{selected:n==="scatter",onClick:S,icon:h.chartScatterIcon,iconName:"chart-scatter"},a.toLanguageString(c.scatterChartScatter,c.messages.scatterChartScatter)))))};exports.ScatterChartPanel=b;
|
|
@@ -6,41 +6,40 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { scatterChart as x, messages as o, scatterChartScatter as f } from "../../messages.mjs";
|
|
9
|
+
import { useLocalization as p } from "@progress/kendo-react-intl";
|
|
10
|
+
import { ExpansionPanel as S, ExpansionPanelContent as d } from "@progress/kendo-react-layout";
|
|
11
|
+
import { mergeStates as h, createState as C } from "../../utils.mjs";
|
|
12
|
+
import { scatterChart as u, messages as n, scatterChartScatter as x } from "../../messages.mjs";
|
|
14
13
|
import { SeriesTypesWrap as g } from "../SeriesTypesWrap.mjs";
|
|
15
|
-
import { SeriesTypeButton as
|
|
16
|
-
import { chartScatterIcon as
|
|
17
|
-
const
|
|
18
|
-
const r =
|
|
14
|
+
import { SeriesTypeButton as f } from "../SeriesTypeButton.mjs";
|
|
15
|
+
import { chartScatterIcon as E } from "@progress/kendo-svg-icons";
|
|
16
|
+
const A = (a) => {
|
|
17
|
+
const r = p(), e = a.state, o = e.seriesType, [c, s] = t.useState(!0), i = t.useCallback((l) => {
|
|
19
18
|
s(!l.expanded);
|
|
20
19
|
}, []), m = () => {
|
|
21
|
-
a.onStateChange(
|
|
20
|
+
a.onStateChange(h(e, C(e.data, "scatter")));
|
|
22
21
|
};
|
|
23
22
|
return /* @__PURE__ */ t.createElement(
|
|
24
|
-
|
|
23
|
+
S,
|
|
25
24
|
{
|
|
26
25
|
style: { maxWidth: "576px" },
|
|
27
|
-
title: r.toLanguageString(
|
|
28
|
-
expanded:
|
|
26
|
+
title: r.toLanguageString(u, n.scatterChart),
|
|
27
|
+
expanded: c,
|
|
29
28
|
tabIndex: 0,
|
|
30
29
|
onAction: i
|
|
31
30
|
},
|
|
32
|
-
/* @__PURE__ */ t.createElement(
|
|
33
|
-
|
|
31
|
+
/* @__PURE__ */ t.createElement(d, null, /* @__PURE__ */ t.createElement(g, null, /* @__PURE__ */ t.createElement(
|
|
32
|
+
f,
|
|
34
33
|
{
|
|
35
|
-
selected:
|
|
34
|
+
selected: o === "scatter",
|
|
36
35
|
onClick: m,
|
|
37
|
-
icon:
|
|
36
|
+
icon: E,
|
|
38
37
|
iconName: "chart-scatter"
|
|
39
38
|
},
|
|
40
|
-
r.toLanguageString(
|
|
41
|
-
)))
|
|
39
|
+
r.toLanguageString(x, n.scatterChartScatter)
|
|
40
|
+
)))
|
|
42
41
|
);
|
|
43
42
|
};
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
A as ScatterChartPanel
|
|
46
45
|
};
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),y=require("@progress/kendo-react-layout"),P=require("@progress/kendo-react-form"),d=require("../FormField.js"),C=require("@progress/kendo-react-inputs"),l=require("../../utils.js"),o=require("../../messages.js"),T=require("@progress/kendo-react-intl"),q=require("@progress/kendo-react-dropdowns");function w(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:()=>n[i]})}}return t.default=n,Object.freeze(t)}const a=w(A),D=n=>{var S,g,p,f,b;const[t,i]=a.useState(""),r=T.useLocalization(),s=n.state,u=s.seriesType,v=typeof((S=s.series[0])==null?void 0:S.stack)=="object"?(g=s.series[0])==null?void 0:g.stack.type:!1,[h,E]=a.useState(!1),k=a.useCallback(e=>{E(!e.expanded)},[]),x=e=>{t&&n.onStateChange(l.updateState(s,l.ActionTypes.seriesColor,{seriesName:t,color:e.value}))},L=e=>{n.onStateChange(l.updateState(s,l.ActionTypes.seriesLabel,{seriesName:t,all:!t,visible:e.value}))},m={name:r.toLanguageString(o.formatSeriesAllSeries,o.messages.formatSeriesAllSeries)},F=e=>{const c=e.target.value.name;i(c===m.name?"":c)};return a.useEffect(()=>{i("")},[u,v]),a.createElement(y.ExpansionPanel,{style:{maxWidth:"576px"},title:r.toLanguageString(o.formatSeries,o.messages.formatSeries),expanded:h,tabIndex:0,onAction:k},a.createElement(y.ExpansionPanelContent,null,a.createElement(P.FormElement,{onKeyDown:l.stopPropagation},a.createElement(d.FormField,{editorId:"apply-to-series",labelText:r.toLanguageString(o.formatSeriesApplyTo,o.messages.formatSeriesApplyTo)},a.createElement(q.DropDownList,{id:"apply-to-series",data:s.series,textField:"name",dataItemKey:"name",defaultItem:m,disabled:!l.isCategorical(u),value:s.series.find(e=>e.name===t)||m,onChange:F,...l.dropdownlistCommonProps})),a.createElement(d.FormField,{editorId:"seriesColor",labelText:r.toLanguageString(o.formatSeriesColor,o.messages.formatSeriesColor)},a.createElement(C.ColorPicker,{id:"seriesColor",value:t?(p=s.series.find(e=>e.name===t))==null?void 0:p.color:"",onChange:x,disabled:!t,view:"gradient",fillMode:"outline"})),a.createElement(d.FormField,null,a.createElement(C.Checkbox,{label:r.toLanguageString(o.formatSeriesShowLabels,o.messages.formatSeriesShowLabels),checked:t?(b=(f=s.series.find(e=>e.name===t))==null?void 0:f.labels)==null?void 0:b.visible:s.series.every(e=>{var c;return(c=e.labels)==null?void 0:c.visible}),onChange:L})))))};exports.SeriesPanel=D;
|
|
@@ -10,22 +10,21 @@ import { ExpansionPanel as k, ExpansionPanelContent as w } from "@progress/kendo
|
|
|
10
10
|
import { FormElement as T } from "@progress/kendo-react-form";
|
|
11
11
|
import { FormField as m } from "../FormField.mjs";
|
|
12
12
|
import { ColorPicker as P, Checkbox as I } from "@progress/kendo-react-inputs";
|
|
13
|
-
import { stopPropagation as D, dropdownlistCommonProps as F, isCategorical as z, updateState as
|
|
14
|
-
import { formatSeriesAllSeries as K, messages as i, formatSeries as N, formatSeriesApplyTo as
|
|
13
|
+
import { stopPropagation as D, dropdownlistCommonProps as F, isCategorical as z, updateState as C, ActionTypes as b } from "../../utils.mjs";
|
|
14
|
+
import { formatSeriesAllSeries as K, messages as i, formatSeries as N, formatSeriesApplyTo as j, formatSeriesColor as M, formatSeriesShowLabels as R } from "../../messages.mjs";
|
|
15
15
|
import { useLocalization as W } from "@progress/kendo-react-intl";
|
|
16
16
|
import { DropDownList as q } from "@progress/kendo-react-dropdowns";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
h(!e.expanded);
|
|
17
|
+
const X = (n) => {
|
|
18
|
+
var d, p, f, g, u;
|
|
19
|
+
const [a, c] = t.useState(""), r = W(), o = n.state, S = o.seriesType, h = typeof ((d = o.series[0]) == null ? void 0 : d.stack) == "object" ? (p = o.series[0]) == null ? void 0 : p.stack.type : !1, [v, x] = t.useState(!1), E = t.useCallback((e) => {
|
|
20
|
+
x(!e.expanded);
|
|
22
21
|
}, []), y = (e) => {
|
|
23
22
|
a && n.onStateChange(
|
|
24
|
-
|
|
23
|
+
C(o, b.seriesColor, { seriesName: a, color: e.value })
|
|
25
24
|
);
|
|
26
25
|
}, L = (e) => {
|
|
27
26
|
n.onStateChange(
|
|
28
|
-
|
|
27
|
+
C(o, b.seriesLabel, {
|
|
29
28
|
seriesName: a,
|
|
30
29
|
all: !a,
|
|
31
30
|
visible: e.value
|
|
@@ -39,23 +38,20 @@ const Z = (n) => {
|
|
|
39
38
|
};
|
|
40
39
|
return t.useEffect(() => {
|
|
41
40
|
c("");
|
|
42
|
-
}, [S,
|
|
41
|
+
}, [S, h]), /* @__PURE__ */ t.createElement(
|
|
43
42
|
k,
|
|
44
43
|
{
|
|
45
44
|
style: { maxWidth: "576px" },
|
|
46
45
|
title: r.toLanguageString(N, i.formatSeries),
|
|
47
|
-
expanded:
|
|
46
|
+
expanded: v,
|
|
48
47
|
tabIndex: 0,
|
|
49
|
-
onAction:
|
|
48
|
+
onAction: E
|
|
50
49
|
},
|
|
51
|
-
/* @__PURE__ */ t.createElement(
|
|
50
|
+
/* @__PURE__ */ t.createElement(w, null, /* @__PURE__ */ t.createElement(T, { onKeyDown: D }, /* @__PURE__ */ t.createElement(
|
|
52
51
|
m,
|
|
53
52
|
{
|
|
54
53
|
editorId: "apply-to-series",
|
|
55
|
-
labelText: r.toLanguageString(
|
|
56
|
-
R,
|
|
57
|
-
i.formatSeriesApplyTo
|
|
58
|
-
)
|
|
54
|
+
labelText: r.toLanguageString(j, i.formatSeriesApplyTo)
|
|
59
55
|
},
|
|
60
56
|
/* @__PURE__ */ t.createElement(
|
|
61
57
|
q,
|
|
@@ -75,13 +71,13 @@ const Z = (n) => {
|
|
|
75
71
|
m,
|
|
76
72
|
{
|
|
77
73
|
editorId: "seriesColor",
|
|
78
|
-
labelText: r.toLanguageString(
|
|
74
|
+
labelText: r.toLanguageString(M, i.formatSeriesColor)
|
|
79
75
|
},
|
|
80
76
|
/* @__PURE__ */ t.createElement(
|
|
81
77
|
P,
|
|
82
78
|
{
|
|
83
79
|
id: "seriesColor",
|
|
84
|
-
value: a ? (
|
|
80
|
+
value: a ? (f = o.series.find((e) => e.name === a)) == null ? void 0 : f.color : "",
|
|
85
81
|
onChange: y,
|
|
86
82
|
disabled: !a,
|
|
87
83
|
view: "gradient",
|
|
@@ -92,18 +88,18 @@ const Z = (n) => {
|
|
|
92
88
|
I,
|
|
93
89
|
{
|
|
94
90
|
label: r.toLanguageString(
|
|
95
|
-
|
|
91
|
+
R,
|
|
96
92
|
i.formatSeriesShowLabels
|
|
97
93
|
),
|
|
98
|
-
checked: a ? (
|
|
94
|
+
checked: a ? (u = (g = o.series.find((e) => e.name === a)) == null ? void 0 : g.labels) == null ? void 0 : u.visible : o.series.every((e) => {
|
|
99
95
|
var s;
|
|
100
96
|
return (s = e.labels) == null ? void 0 : s.visible;
|
|
101
97
|
}),
|
|
102
98
|
onChange: L
|
|
103
99
|
}
|
|
104
|
-
))))
|
|
100
|
+
))))
|
|
105
101
|
);
|
|
106
102
|
};
|
|
107
103
|
export {
|
|
108
|
-
|
|
104
|
+
X as SeriesPanel
|
|
109
105
|
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),p=require("@progress/kendo-react-layout"),k=require("@progress/kendo-react-form"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),p=require("@progress/kendo-react-layout"),k=require("@progress/kendo-react-form"),u=require("../FormField.js"),e=require("../../utils.js"),T=require("@progress/kendo-react-dropdowns"),f=require("@progress/kendo-react-inputs"),z=require("@progress/kendo-react-intl"),t=require("../../messages.js");function I(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const m=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(l,i,m.get?m:{enumerable:!0,get:()=>n[i]})}}return l.default=n,Object.freeze(l)}const a=I(E),P=n=>{const l=z.useLocalization(),i=n.state,[m,v]=a.useState(!1),S=a.useCallback(o=>{v(!o.expanded)},[]),r=[{value:"chartTitle",text:l.toLanguageString(t.formatTitleChartTitle,t.messages.formatTitleChartTitle)},{value:"chartSubtitle",text:l.toLanguageString(t.formatTitleChartSubtitle,t.messages.formatTitleChartSubtitle)}],[s,C]=a.useState(r[0]),x=a.useCallback(o=>{C(o.target.value)},[]),F=o=>{const c=s.value===r[0].value?e.ActionTypes.titleText:e.ActionTypes.subtitleText;n.onStateChange(e.updateState(i,c,o.target.value))},b=o=>{const c=s.value===r[0].value?e.ActionTypes.titleFontName:e.ActionTypes.subtitleFontName,g=o.target.value||e.nullItem;n.onStateChange(e.updateState(i,c,g.value))},h=o=>{const c=s.value===r[0].value?e.ActionTypes.titleFontSize:e.ActionTypes.subtitleFontSize,g=o.target.value||e.nullItem;e.ensureValue(g)&&n.onStateChange(e.updateState(i,c,g.value))},y=o=>{const c=s.value===r[0].value?e.ActionTypes.titleColor:e.ActionTypes.subtitleColor;n.onStateChange(e.updateState(i,c,o.value))},d=(s.value===r[0].value?i.title:i.subtitle)||{text:"",font:"",color:""};return a.createElement(p.ExpansionPanel,{style:{maxWidth:"576px"},title:l.toLanguageString(t.formatTitle,t.messages.formatTitle),expanded:m,tabIndex:0,onAction:S},a.createElement(p.ExpansionPanelContent,null,a.createElement(k.FormElement,{onKeyDown:e.stopPropagation},a.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},a.createElement(u.FormField,{className:"k-col-span-2",editorId:"apply-to-title",labelText:l.toLanguageString(t.formatTitleApplyTo,t.messages.formatTitleApplyTo)},a.createElement(T.DropDownList,{id:"apply-to-title",data:r,textField:"text",dataItemKey:"value",value:r.find(o=>o.value===s.value),onChange:x,...e.dropdownlistCommonProps})),a.createElement(u.FormField,{className:"k-col-span-2",editorId:"titleText",labelText:l.toLanguageString(t.formatTitleLabel,t.messages.formatTitleLabel)},a.createElement(f.Input,{id:"titleText",placeholder:s.value===r[0].value?r[0].text:r[1].text,value:d.text,onChange:F})),a.createElement(u.FormField,{className:"k-col-span-2",editorId:"titleFont",labelText:l.toLanguageString(t.formatTitleFont,t.messages.formatTitleFont)},a.createElement(T.ComboBox,{id:"titleFont",data:e.fontNames,textField:"text",dataItemKey:"value",placeholder:l.toLanguageString(t.formatTitleFontPlaceholder,t.messages.formatTitleFontPlaceholder),value:e.fontNames.find(o=>o.value===e.parseFont(d.font).name)||e.nullItem,onChange:b,itemRender:e.itemRender,...e.dropdownlistCommonProps})),a.createElement(u.FormField,{editorId:"titleFontSize",labelText:l.toLanguageString(t.formatTitleSize,t.messages.formatTitleSize)},a.createElement(T.ComboBox,{id:"titleFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:l.toLanguageString(t.formatTitleSizePlaceholder,t.messages.formatTitleSizePlaceholder),value:e.fontSizes.find(o=>o.value===e.parseFont(d.font).size)||e.nullItem,onChange:h,itemRender:e.itemRender,allowCustom:!0,...e.dropdownlistCommonProps})),a.createElement(u.FormField,{editorId:"titleColor",labelText:l.toLanguageString(t.formatTitleColor,t.messages.formatTitleColor)},a.createElement(f.ColorPicker,{id:"titleColor",value:d.color||"",onChange:y,view:"gradient",fillMode:"outline"}))))))};exports.TitlePanel=P;
|
|
@@ -9,14 +9,13 @@ import * as t from "react";
|
|
|
9
9
|
import { ExpansionPanel as P, ExpansionPanelContent as N } from "@progress/kendo-react-layout";
|
|
10
10
|
import { FormElement as A } from "@progress/kendo-react-form";
|
|
11
11
|
import { FormField as u } from "../FormField.mjs";
|
|
12
|
-
import { stopPropagation as w, dropdownlistCommonProps as f, itemRender as
|
|
13
|
-
import { DropDownList as D, ComboBox as
|
|
12
|
+
import { stopPropagation as w, dropdownlistCommonProps as f, itemRender as v, nullItem as g, fontNames as x, parseFont as p, fontSizes as C, ActionTypes as n, updateState as T, ensureValue as K } from "../../utils.mjs";
|
|
13
|
+
import { DropDownList as D, ComboBox as S } from "@progress/kendo-react-dropdowns";
|
|
14
14
|
import { Input as R, ColorPicker as B } from "@progress/kendo-react-inputs";
|
|
15
15
|
import { useLocalization as M } from "@progress/kendo-react-intl";
|
|
16
16
|
import { formatTitleChartTitle as V, messages as o, formatTitleChartSubtitle as W, formatTitle as j, formatTitleApplyTo as q, formatTitleLabel as G, formatTitleFont as H, formatTitleFontPlaceholder as J, formatTitleSize as O, formatTitleSizePlaceholder as Q, formatTitleColor as U } from "../../messages.mjs";
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const l = M(), m = c.state, [v, F] = t.useState(!1), b = t.useCallback((e) => {
|
|
17
|
+
const lt = (c) => {
|
|
18
|
+
const l = M(), m = c.state, [h, F] = t.useState(!1), b = t.useCallback((e) => {
|
|
20
19
|
F(!e.expanded);
|
|
21
20
|
}, []), a = [
|
|
22
21
|
{
|
|
@@ -51,19 +50,16 @@ const nt = (c) => {
|
|
|
51
50
|
{
|
|
52
51
|
style: { maxWidth: "576px" },
|
|
53
52
|
title: l.toLanguageString(j, o.formatTitle),
|
|
54
|
-
expanded:
|
|
53
|
+
expanded: h,
|
|
55
54
|
tabIndex: 0,
|
|
56
55
|
onAction: b
|
|
57
56
|
},
|
|
58
|
-
/* @__PURE__ */ t.createElement(
|
|
57
|
+
/* @__PURE__ */ t.createElement(N, null, /* @__PURE__ */ t.createElement(A, { onKeyDown: w }, /* @__PURE__ */ t.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4" }, /* @__PURE__ */ t.createElement(
|
|
59
58
|
u,
|
|
60
59
|
{
|
|
61
60
|
className: "k-col-span-2",
|
|
62
61
|
editorId: "apply-to-title",
|
|
63
|
-
labelText: l.toLanguageString(
|
|
64
|
-
q,
|
|
65
|
-
o.formatTitleApplyTo
|
|
66
|
-
)
|
|
62
|
+
labelText: l.toLanguageString(q, o.formatTitleApplyTo)
|
|
67
63
|
},
|
|
68
64
|
/* @__PURE__ */ t.createElement(
|
|
69
65
|
D,
|
|
@@ -82,10 +78,7 @@ const nt = (c) => {
|
|
|
82
78
|
{
|
|
83
79
|
className: "k-col-span-2",
|
|
84
80
|
editorId: "titleText",
|
|
85
|
-
labelText: l.toLanguageString(
|
|
86
|
-
G,
|
|
87
|
-
o.formatTitleLabel
|
|
88
|
-
)
|
|
81
|
+
labelText: l.toLanguageString(G, o.formatTitleLabel)
|
|
89
82
|
},
|
|
90
83
|
/* @__PURE__ */ t.createElement(
|
|
91
84
|
R,
|
|
@@ -104,7 +97,7 @@ const nt = (c) => {
|
|
|
104
97
|
labelText: l.toLanguageString(H, o.formatTitleFont)
|
|
105
98
|
},
|
|
106
99
|
/* @__PURE__ */ t.createElement(
|
|
107
|
-
|
|
100
|
+
S,
|
|
108
101
|
{
|
|
109
102
|
id: "titleFont",
|
|
110
103
|
data: x,
|
|
@@ -114,9 +107,9 @@ const nt = (c) => {
|
|
|
114
107
|
J,
|
|
115
108
|
o.formatTitleFontPlaceholder
|
|
116
109
|
),
|
|
117
|
-
value: x.find((e) => e.value ===
|
|
110
|
+
value: x.find((e) => e.value === p(s.font).name) || g,
|
|
118
111
|
onChange: y,
|
|
119
|
-
itemRender:
|
|
112
|
+
itemRender: v,
|
|
120
113
|
...f
|
|
121
114
|
}
|
|
122
115
|
)
|
|
@@ -127,19 +120,19 @@ const nt = (c) => {
|
|
|
127
120
|
labelText: l.toLanguageString(O, o.formatTitleSize)
|
|
128
121
|
},
|
|
129
122
|
/* @__PURE__ */ t.createElement(
|
|
130
|
-
|
|
123
|
+
S,
|
|
131
124
|
{
|
|
132
125
|
id: "titleFontSize",
|
|
133
|
-
data:
|
|
126
|
+
data: C,
|
|
134
127
|
textField: "text",
|
|
135
128
|
dataItemKey: "value",
|
|
136
129
|
placeholder: l.toLanguageString(
|
|
137
130
|
Q,
|
|
138
131
|
o.formatTitleSizePlaceholder
|
|
139
132
|
),
|
|
140
|
-
value:
|
|
133
|
+
value: C.find((e) => e.value === p(s.font).size) || g,
|
|
141
134
|
onChange: I,
|
|
142
|
-
itemRender:
|
|
135
|
+
itemRender: v,
|
|
143
136
|
allowCustom: !0,
|
|
144
137
|
...f
|
|
145
138
|
}
|
|
@@ -148,10 +141,7 @@ const nt = (c) => {
|
|
|
148
141
|
u,
|
|
149
142
|
{
|
|
150
143
|
editorId: "titleColor",
|
|
151
|
-
labelText: l.toLanguageString(
|
|
152
|
-
U,
|
|
153
|
-
o.formatTitleColor
|
|
154
|
-
)
|
|
144
|
+
labelText: l.toLanguageString(U, o.formatTitleColor)
|
|
155
145
|
},
|
|
156
146
|
/* @__PURE__ */ t.createElement(
|
|
157
147
|
B,
|
|
@@ -163,9 +153,9 @@ const nt = (c) => {
|
|
|
163
153
|
fillMode: "outline"
|
|
164
154
|
}
|
|
165
155
|
)
|
|
166
|
-
))))
|
|
156
|
+
))))
|
|
167
157
|
);
|
|
168
158
|
};
|
|
169
159
|
export {
|
|
170
|
-
|
|
160
|
+
lt as TitlePanel
|
|
171
161
|
};
|
|
@@ -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 j=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),h=require("@progress/kendo-react-layout"),B=require("@progress/kendo-react-form"),y=require("../FormFieldSet.js"),m=require("../FormField.js"),d=require("@progress/kendo-react-inputs"),e=require("../../utils.js"),a=require("../../messages.js"),M=require("@progress/kendo-react-intl"),g=require("@progress/kendo-react-dropdowns");function _(i){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const s in i)if(s!=="default"){const x=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(o,s,x.get?x:{enumerable:!0,get:()=>i[s]})}}return o.default=i,Object.freeze(o)}const l=_(j),Y=i=>{var f,b,v,F,L,S,V,C,T,p;const o=M.useLocalization(),s=i.state,x=s.seriesType,c={text:o.toLanguageString(a.formatValueAxisLabelsFormatText,a.messages.formatValueAxisLabelsFormatText),value:""},A=[{value:"n0",text:o.toLanguageString(a.formatValueAxisLabelsFormatNumber,a.messages.formatValueAxisLabelsFormatNumber)},{value:"c0",text:o.toLanguageString(a.formatValueAxisLabelsFormatCurrency,a.messages.formatValueAxisLabelsFormatCurrency)},{value:"p0",text:o.toLanguageString(a.formatValueAxisLabelsFormatPercent,a.messages.formatValueAxisLabelsFormatPercent)}],[E,z]=l.useState(!1),P=l.useCallback(t=>{z(!t.expanded)},[]),I=t=>{i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisTitleText,t.target.value))},k=t=>{const n=t.target.value||e.nullItem;e.ensureValue(n)&&i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisTitleFontSize,n.value))},N=t=>{const n=t.target.value||e.nullItem;i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisTitleFontName,n.value))},R=t=>{i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisTitleColor,t.value))},w=t=>{const n=t.target.value||e.nullItem;e.ensureValue(n)&&i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisLabelsFontSize,n.value))},q=t=>{const n=t.target.value||e.nullItem;i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisLabelsFontName,n.value))},D=t=>{i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisLabelsColor,t.value))},K=t=>{i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisLabelsRotation,t.target.value))},O=t=>{const n=t.target.value;i.onStateChange(e.updateState(s,e.ActionTypes.valueAxisLabelsFormat,n.value))};return l.createElement(h.ExpansionPanel,{style:{maxWidth:"576px"},title:x==="scatter"?o.toLanguageString(a.formatYAxis,a.messages.formatYAxis):o.toLanguageString(a.formatValueAxis,a.messages.formatValueAxis),expanded:E,tabIndex:0,onAction:P},l.createElement(h.ExpansionPanelContent,null,l.createElement(B.FormElement,{onKeyDown:e.stopPropagation},l.createElement(y.FormFieldSet,{legend:o.toLanguageString(a.formatValueAxisTitle,a.messages.formatValueAxisTitle)},l.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},l.createElement(m.FormField,{className:"k-col-span-2"},l.createElement(d.Input,{placeholder:o.toLanguageString(a.formatValueAxisTitlePlaceholder,a.messages.formatValueAxisTitlePlaceholder),value:((b=(f=s.valueAxis[0])==null?void 0:f.title)==null?void 0:b.text)||"",onChange:I})),l.createElement(m.FormField,{className:"k-col-span-2",editorId:"valueAxisTitleFont",labelText:o.toLanguageString(a.formatValueAxisTitleFont,a.messages.formatValueAxisTitleFont)},l.createElement(g.ComboBox,{id:"valueAxisTitleFont",data:e.fontNames,textField:"text",dataItemKey:"value",itemRender:e.itemRender,placeholder:o.toLanguageString(a.formatValueAxisTitleFontPlaceholder,a.messages.formatValueAxisTitleFontPlaceholder),value:e.fontNames.find(t=>{var n,r,u;return t.value===((u=e.parseFont(((r=(n=s.valueAxis[0])==null?void 0:n.title)==null?void 0:r.font)||""))==null?void 0:u.name)})||e.nullItem,onChange:N,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisTitleFontSize",labelText:o.toLanguageString(a.formatValueAxisTitleSize,a.messages.formatValueAxisTitleSize)},l.createElement(g.ComboBox,{id:"valueAxisTitleFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:o.toLanguageString(a.formatValueAxisTitleSizePlaceholder,a.messages.formatValueAxisTitleSizePlaceholder),value:e.fontSizes.find(t=>{var n,r,u;return t.value===((u=e.parseFont(((r=(n=s.valueAxis[0])==null?void 0:n.title)==null?void 0:r.font)||""))==null?void 0:u.size)})||e.nullItem,onChange:k,allowCustom:!0,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisTitleColor",labelText:o.toLanguageString(a.formatValueAxisTitleColor,a.messages.formatValueAxisTitleColor)},l.createElement(d.ColorPicker,{id:"valueAxisTitleColor",view:"gradient",value:((F=(v=s.valueAxis[0])==null?void 0:v.title)==null?void 0:F.color)||"",onChange:R,fillMode:"outline"})))),l.createElement(y.FormFieldSet,{legend:o.toLanguageString(a.formatValueAxisLabels,a.messages.formatValueAxisLabels)},l.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},l.createElement(m.FormField,{className:"k-col-span-2",editorId:"valueAxisLabelsFormat",labelText:o.toLanguageString(a.formatValueAxisLabelsFormat,a.messages.formatValueAxisLabelsFormat)},l.createElement(g.DropDownList,{id:"valueAxisLabelsFormat",data:A,textField:"text",dataItemKey:"value",defaultItem:c,value:A.find(t=>{var n,r;return t.value===((r=(n=s.valueAxis[0])==null?void 0:n.labels)==null?void 0:r.format)})||c,onChange:O,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{className:"k-col-span-2",editorId:"valueAxisLabelsFont",labelText:o.toLanguageString(a.formatValueAxisLabelsFont,a.messages.formatValueAxisLabelsFont)},l.createElement(g.ComboBox,{id:"valueAxisLabelsFont",data:e.fontNames,textField:"text",dataItemKey:"value",placeholder:o.toLanguageString(a.formatValueAxisLabelsFontPlaceholder,a.messages.formatValueAxisLabelsFontPlaceholder),value:e.fontNames.find(t=>{var n,r,u;return t.value===((u=e.parseFont(((r=(n=s.valueAxis[0])==null?void 0:n.labels)==null?void 0:r.font)||""))==null?void 0:u.name)})||e.nullItem,onChange:q,itemRender:e.itemRender,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisLabelsFontSize",labelText:o.toLanguageString(a.formatValueAxisLabelsSize,a.messages.formatValueAxisLabelsSize)},l.createElement(g.ComboBox,{id:"valueAxisLabelsFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:o.toLanguageString(a.formatValueAxisLabelsSizePlaceholder,a.messages.formatValueAxisLabelsSizePlaceholder),value:e.fontSizes.find(t=>{var n,r,u;return t.value===((u=e.parseFont(((r=(n=s.valueAxis[0])==null?void 0:n.labels)==null?void 0:r.font)||""))==null?void 0:u.size)})||e.nullItem,onChange:w,allowCustom:!0,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisLabelsColor",labelText:o.toLanguageString(a.formatValueAxisLabelsColor,a.messages.formatValueAxisLabelsColor)},l.createElement(d.ColorPicker,{id:"valueAxisLabelsColor",view:"gradient",value:((S=(L=s.valueAxis[0])==null?void 0:L.labels)==null?void 0:S.color)||"",onChange:D,fillMode:"outline"})),l.createElement(m.FormField,{editorId:"valueAxisLabelsRotation",labelText:o.toLanguageString(a.formatValueAxisLabelsRotation,a.messages.formatValueAxisLabelsRotation)},l.createElement(d.NumericTextBox,{id:"valueAxisLabelsRotation",value:typeof((C=(V=s.valueAxis[0])==null?void 0:V.labels)==null?void 0:C.rotation)=="number"?(p=(T=s.valueAxis[0])==null?void 0:T.labels)==null?void 0:p.rotation:null,placeholder:o.toLanguageString(a.formatValueAxisLabelsRotationAuto,a.messages.formatValueAxisLabelsRotationAuto),onChange:K,fillMode:"outline",min:-360,max:360,step:1})))))))};exports.ValueAxisPanel=Y;
|