@progress/kendo-react-chart-wizard 8.3.0-develop.9 → 8.3.0
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/ChartWizard.js +1 -1
- package/ChartWizard.mjs +88 -942
- package/components/ChartComponent.js +8 -0
- package/components/ChartComponent.mjs +69 -0
- package/components/FormField.js +8 -0
- package/components/FormField.mjs +16 -0
- package/{common/get-wizard-data-from-data-rows.js → components/FormFieldSet.js} +1 -1
- package/{common/get-wizard-data-from-data-rows.mjs → components/FormFieldSet.mjs} +3 -14
- package/components/SeriesGrid.js +8 -0
- package/components/SeriesGrid.mjs +89 -0
- package/components/SeriesTypeButton.js +8 -0
- package/components/SeriesTypeButton.mjs +30 -0
- package/components/SeriesTypesWrap.js +8 -0
- package/components/SeriesTypesWrap.mjs +14 -0
- package/components/panels/BarChartPanel.js +8 -0
- package/components/panels/BarChartPanel.mjs +71 -0
- package/components/panels/CategoryAxisPanel.js +8 -0
- package/components/panels/CategoryAxisPanel.mjs +315 -0
- package/components/panels/ChartAreaPanel.js +8 -0
- package/components/panels/ChartAreaPanel.mjs +200 -0
- package/components/panels/ColumnChartPanel.js +8 -0
- package/components/panels/ColumnChartPanel.mjs +77 -0
- package/components/panels/ConfigurationPanel.js +8 -0
- package/components/panels/ConfigurationPanel.mjs +102 -0
- package/components/panels/LegendPanel.js +8 -0
- package/components/panels/LegendPanel.mjs +190 -0
- package/components/panels/LineChartPanel.js +8 -0
- package/components/panels/LineChartPanel.mjs +74 -0
- package/components/panels/PieChartPanel.js +8 -0
- package/components/panels/PieChartPanel.mjs +47 -0
- package/components/panels/ScatterChartPanel.js +8 -0
- package/components/panels/ScatterChartPanel.mjs +47 -0
- package/components/panels/SeriesPanel.js +8 -0
- package/components/panels/SeriesPanel.mjs +110 -0
- package/components/panels/TitlePanel.js +8 -0
- package/components/panels/TitlePanel.mjs +172 -0
- package/components/panels/ValueAxisPanel.js +8 -0
- package/components/panels/ValueAxisPanel.mjs +332 -0
- package/dist/cdn/js/kendo-react-chart-wizard.js +1 -1
- package/grid-integration/get-wizard-data-from-grid-selection.js +1 -1
- package/grid-integration/get-wizard-data-from-grid-selection.mjs +4 -4
- package/index.d.mts +15 -194
- package/index.d.ts +15 -194
- package/index.js +1 -1
- package/index.mjs +8 -18
- package/messages.js +1 -1
- package/messages.mjs +109 -215
- package/package.json +15 -15
- package/types/export.js +8 -0
- package/types/export.mjs +39 -0
- package/utils.js +8 -0
- package/utils.mjs +81 -0
- package/SeriesGrid.js +0 -8
- package/SeriesGrid.mjs +0 -85
- package/chart-wizard-state.js +0 -8
- package/chart-wizard-state.mjs +0 -360
- package/export.js +0 -8
- package/export.mjs +0 -70
- /package/{SeriesGridCells.js → components/SeriesGridCells.js} +0 -0
- /package/{SeriesGridCells.mjs → components/SeriesGridCells.mjs} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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 * as t from "react";
|
|
10
|
+
import { ExpansionPanel as P, ExpansionPanelContent as N } from "@progress/kendo-react-layout";
|
|
11
|
+
import { FormElement as A } from "@progress/kendo-react-form";
|
|
12
|
+
import { FormField as u } from "../FormField.mjs";
|
|
13
|
+
import { stopPropagation as w, dropdownlistCommonProps as f, fontNames as p, parseFont as x, nullItem as g, itemRender as C, fontSizes as S, ActionTypes as n, updateState as T, ensureValue as K } from "../../utils.mjs";
|
|
14
|
+
import { DropDownList as D, ComboBox as h } from "@progress/kendo-react-dropdowns";
|
|
15
|
+
import { Input as R, ColorPicker as B } from "@progress/kendo-react-inputs";
|
|
16
|
+
import { useLocalization as M } from "@progress/kendo-react-intl";
|
|
17
|
+
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";
|
|
18
|
+
import { Reveal as X } from "@progress/kendo-react-animation";
|
|
19
|
+
const nt = (c) => {
|
|
20
|
+
const l = M(), m = c.state, [v, F] = t.useState(!1), b = t.useCallback((e) => {
|
|
21
|
+
F(!e.expanded);
|
|
22
|
+
}, []), a = [
|
|
23
|
+
{
|
|
24
|
+
value: "chartTitle",
|
|
25
|
+
text: l.toLanguageString(V, o.formatTitleChartTitle)
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: "chartSubtitle",
|
|
29
|
+
text: l.toLanguageString(W, o.formatTitleChartSubtitle)
|
|
30
|
+
}
|
|
31
|
+
], [i, E] = t.useState(a[0]), z = t.useCallback((e) => {
|
|
32
|
+
E(e.target.value);
|
|
33
|
+
}, []), L = (e) => {
|
|
34
|
+
const r = i.value === a[0].value ? n.titleText : n.subtitleText;
|
|
35
|
+
c.onStateChange(T(m, r, e.target.value));
|
|
36
|
+
}, y = (e) => {
|
|
37
|
+
const r = i.value === a[0].value ? n.titleFontName : n.subtitleFontName, d = e.target.value || g;
|
|
38
|
+
c.onStateChange(T(m, r, d.value));
|
|
39
|
+
}, I = (e) => {
|
|
40
|
+
const r = i.value === a[0].value ? n.titleFontSize : n.subtitleFontSize, d = e.target.value || g;
|
|
41
|
+
K(d) && c.onStateChange(T(m, r, d.value));
|
|
42
|
+
}, k = (e) => {
|
|
43
|
+
const r = i.value === a[0].value ? n.titleColor : n.subtitleColor;
|
|
44
|
+
c.onStateChange(T(m, r, e.value));
|
|
45
|
+
}, s = (i.value === a[0].value ? m.title : m.subtitle) || {
|
|
46
|
+
text: "",
|
|
47
|
+
font: "",
|
|
48
|
+
color: ""
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ t.createElement(
|
|
51
|
+
P,
|
|
52
|
+
{
|
|
53
|
+
style: { maxWidth: "576px" },
|
|
54
|
+
title: l.toLanguageString(j, o.formatTitle),
|
|
55
|
+
expanded: v,
|
|
56
|
+
tabIndex: 0,
|
|
57
|
+
onAction: b
|
|
58
|
+
},
|
|
59
|
+
/* @__PURE__ */ t.createElement(X, null, v && /* @__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(
|
|
60
|
+
u,
|
|
61
|
+
{
|
|
62
|
+
className: "k-col-span-2",
|
|
63
|
+
editorId: "apply-to-title",
|
|
64
|
+
labelText: l.toLanguageString(
|
|
65
|
+
q,
|
|
66
|
+
o.formatTitleApplyTo
|
|
67
|
+
)
|
|
68
|
+
},
|
|
69
|
+
/* @__PURE__ */ t.createElement(
|
|
70
|
+
D,
|
|
71
|
+
{
|
|
72
|
+
id: "apply-to-title",
|
|
73
|
+
data: a,
|
|
74
|
+
textField: "text",
|
|
75
|
+
dataItemKey: "value",
|
|
76
|
+
value: a.find((e) => e.value === i.value),
|
|
77
|
+
onChange: z,
|
|
78
|
+
...f
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
), /* @__PURE__ */ t.createElement(
|
|
82
|
+
u,
|
|
83
|
+
{
|
|
84
|
+
className: "k-col-span-2",
|
|
85
|
+
editorId: "titleText",
|
|
86
|
+
labelText: l.toLanguageString(
|
|
87
|
+
G,
|
|
88
|
+
o.formatTitleLabel
|
|
89
|
+
)
|
|
90
|
+
},
|
|
91
|
+
/* @__PURE__ */ t.createElement(
|
|
92
|
+
R,
|
|
93
|
+
{
|
|
94
|
+
id: "titleText",
|
|
95
|
+
placeholder: i.value === a[0].value ? a[0].text : a[1].text,
|
|
96
|
+
value: s.text,
|
|
97
|
+
onChange: L
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
), /* @__PURE__ */ t.createElement(
|
|
101
|
+
u,
|
|
102
|
+
{
|
|
103
|
+
className: "k-col-span-2",
|
|
104
|
+
editorId: "titleFont",
|
|
105
|
+
labelText: l.toLanguageString(H, o.formatTitleFont)
|
|
106
|
+
},
|
|
107
|
+
/* @__PURE__ */ t.createElement(
|
|
108
|
+
h,
|
|
109
|
+
{
|
|
110
|
+
id: "titleFont",
|
|
111
|
+
data: p,
|
|
112
|
+
textField: "text",
|
|
113
|
+
dataItemKey: "value",
|
|
114
|
+
placeholder: l.toLanguageString(
|
|
115
|
+
J,
|
|
116
|
+
o.formatTitleFontPlaceholder
|
|
117
|
+
),
|
|
118
|
+
value: p.find((e) => e.value === x(s.font).name) || g,
|
|
119
|
+
onChange: y,
|
|
120
|
+
itemRender: C,
|
|
121
|
+
...f
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
), /* @__PURE__ */ t.createElement(
|
|
125
|
+
u,
|
|
126
|
+
{
|
|
127
|
+
editorId: "titleFontSize",
|
|
128
|
+
labelText: l.toLanguageString(O, o.formatTitleSize)
|
|
129
|
+
},
|
|
130
|
+
/* @__PURE__ */ t.createElement(
|
|
131
|
+
h,
|
|
132
|
+
{
|
|
133
|
+
id: "titleFontSize",
|
|
134
|
+
data: S,
|
|
135
|
+
textField: "text",
|
|
136
|
+
dataItemKey: "value",
|
|
137
|
+
placeholder: l.toLanguageString(
|
|
138
|
+
Q,
|
|
139
|
+
o.formatTitleSizePlaceholder
|
|
140
|
+
),
|
|
141
|
+
value: S.find((e) => e.value === x(s.font).size) || g,
|
|
142
|
+
onChange: I,
|
|
143
|
+
itemRender: C,
|
|
144
|
+
allowCustom: !0,
|
|
145
|
+
...f
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
), /* @__PURE__ */ t.createElement(
|
|
149
|
+
u,
|
|
150
|
+
{
|
|
151
|
+
editorId: "titleColor",
|
|
152
|
+
labelText: l.toLanguageString(
|
|
153
|
+
U,
|
|
154
|
+
o.formatTitleColor
|
|
155
|
+
)
|
|
156
|
+
},
|
|
157
|
+
/* @__PURE__ */ t.createElement(
|
|
158
|
+
B,
|
|
159
|
+
{
|
|
160
|
+
id: "titleColor",
|
|
161
|
+
value: s.color || "",
|
|
162
|
+
onChange: k,
|
|
163
|
+
view: "gradient",
|
|
164
|
+
fillMode: "outline"
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
)))))
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
nt as TitlePanel
|
|
172
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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 l=require("react"),h=require("@progress/kendo-react-layout"),M=require("@progress/kendo-react-form"),E=require("../FormFieldSet.js"),m=require("../FormField.js"),g=require("@progress/kendo-react-inputs"),e=require("../../utils.js"),a=require("../../messages.js"),Y=require("@progress/kendo-react-intl"),j=require("@progress/kendo-react-animation"),x=require("@progress/kendo-react-dropdowns"),O=u=>{var f,v,F,b,L,S,V,C,T,p;const s=Y.useLocalization(),n=u.state,y=n.seriesType,d={text:s.toLanguageString(a.formatValueAxisLabelsFormatText,a.messages.formatValueAxisLabelsFormatText),value:""},c=[{value:"n0",text:s.toLanguageString(a.formatValueAxisLabelsFormatNumber,a.messages.formatValueAxisLabelsFormatNumber)},{value:"c0",text:s.toLanguageString(a.formatValueAxisLabelsFormatCurrency,a.messages.formatValueAxisLabelsFormatCurrency)},{value:"p0",text:s.toLanguageString(a.formatValueAxisLabelsFormatPercent,a.messages.formatValueAxisLabelsFormatPercent)}],[A,z]=l.useState(!1),I=l.useCallback(t=>{z(!t.expanded)},[]),P=t=>{u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisTitleText,t.target.value))},k=t=>{const o=t.target.value||e.nullItem;e.ensureValue(o)&&u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisTitleFontSize,o.value))},R=t=>{const o=t.target.value||e.nullItem;u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisTitleFontName,o.value))},N=t=>{u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisTitleColor,t.value))},w=t=>{const o=t.target.value||e.nullItem;e.ensureValue(o)&&u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisLabelsFontSize,o.value))},q=t=>{const o=t.target.value||e.nullItem;u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisLabelsFontName,o.value))},K=t=>{u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisLabelsColor,t.value))},B=t=>{u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisLabelsRotation,t.target.value))},D=t=>{const o=t.target.value;u.onStateChange(e.updateState(n,e.ActionTypes.valueAxisLabelsFormat,o.value))};return l.createElement(h.ExpansionPanel,{style:{maxWidth:"576px"},title:y==="scatter"?s.toLanguageString(a.formatYAxis,a.messages.formatYAxis):s.toLanguageString(a.formatValueAxis,a.messages.formatValueAxis),expanded:A,tabIndex:0,onAction:I},l.createElement(j.Reveal,null,A&&l.createElement(h.ExpansionPanelContent,null,l.createElement(M.FormElement,{onKeyDown:e.stopPropagation},l.createElement(E.FormFieldSet,{legend:s.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(g.Input,{placeholder:s.toLanguageString(a.formatValueAxisTitlePlaceholder,a.messages.formatValueAxisTitlePlaceholder),value:((v=(f=n.valueAxis[0])==null?void 0:f.title)==null?void 0:v.text)||"",onChange:P})),l.createElement(m.FormField,{className:"k-col-span-2",editorId:"valueAxisTitleFont",labelText:s.toLanguageString(a.formatValueAxisTitleFont,a.messages.formatValueAxisTitleFont)},l.createElement(x.ComboBox,{id:"valueAxisTitleFont",data:e.fontNames,textField:"text",dataItemKey:"value",itemRender:e.itemRender,placeholder:s.toLanguageString(a.formatValueAxisTitleFontPlaceholder,a.messages.formatValueAxisTitleFontPlaceholder),value:e.fontNames.find(t=>{var o,i,r;return t.value===((r=e.parseFont(((i=(o=n.valueAxis[0])==null?void 0:o.title)==null?void 0:i.font)||""))==null?void 0:r.name)})||e.nullItem,onChange:R,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisTitleFontSize",labelText:s.toLanguageString(a.formatValueAxisTitleSize,a.messages.formatValueAxisTitleSize)},l.createElement(x.ComboBox,{id:"valueAxisTitleFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:s.toLanguageString(a.formatValueAxisTitleSizePlaceholder,a.messages.formatValueAxisTitleSizePlaceholder),value:e.fontSizes.find(t=>{var o,i,r;return t.value===((r=e.parseFont(((i=(o=n.valueAxis[0])==null?void 0:o.title)==null?void 0:i.font)||""))==null?void 0:r.size)})||e.nullItem,onChange:k,allowCustom:!0,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisTitleColor",labelText:s.toLanguageString(a.formatValueAxisTitleColor,a.messages.formatValueAxisTitleColor)},l.createElement(g.ColorPicker,{id:"valueAxisTitleColor",view:"gradient",value:((b=(F=n.valueAxis[0])==null?void 0:F.title)==null?void 0:b.color)||"",onChange:N,fillMode:"outline"})))),l.createElement(E.FormFieldSet,{legend:s.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:s.toLanguageString(a.formatValueAxisLabelsFormat,a.messages.formatValueAxisLabelsFormat)},l.createElement(x.DropDownList,{id:"valueAxisLabelsFormat",data:c,textField:"text",dataItemKey:"value",defaultItem:d,value:c.find(t=>{var o,i;return t.value===((i=(o=n.valueAxis[0])==null?void 0:o.labels)==null?void 0:i.format)})||d,onChange:D,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{className:"k-col-span-2",editorId:"valueAxisLabelsFont",labelText:s.toLanguageString(a.formatValueAxisLabelsFont,a.messages.formatValueAxisLabelsFont)},l.createElement(x.ComboBox,{id:"valueAxisLabelsFont",data:e.fontNames,textField:"text",dataItemKey:"value",placeholder:s.toLanguageString(a.formatValueAxisLabelsFontPlaceholder,a.messages.formatValueAxisLabelsFontPlaceholder),value:e.fontNames.find(t=>{var o,i,r;return t.value===((r=e.parseFont(((i=(o=n.valueAxis[0])==null?void 0:o.labels)==null?void 0:i.font)||""))==null?void 0:r.name)})||e.nullItem,onChange:q,itemRender:e.itemRender,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisLabelsFontSize",labelText:s.toLanguageString(a.formatValueAxisLabelsSize,a.messages.formatValueAxisLabelsSize)},l.createElement(x.ComboBox,{id:"valueAxisLabelsFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:s.toLanguageString(a.formatValueAxisLabelsSizePlaceholder,a.messages.formatValueAxisLabelsSizePlaceholder),value:e.fontSizes.find(t=>{var o,i,r;return t.value===((r=e.parseFont(((i=(o=n.valueAxis[0])==null?void 0:o.labels)==null?void 0:i.font)||""))==null?void 0:r.size)})||e.nullItem,onChange:w,allowCustom:!0,...e.dropdownlistCommonProps})),l.createElement(m.FormField,{editorId:"valueAxisLabelsColor",labelText:s.toLanguageString(a.formatValueAxisLabelsColor,a.messages.formatValueAxisLabelsColor)},l.createElement(g.ColorPicker,{id:"valueAxisLabelsColor",view:"gradient",value:((S=(L=n.valueAxis[0])==null?void 0:L.labels)==null?void 0:S.color)||"",onChange:K,fillMode:"outline"})),l.createElement(m.FormField,{editorId:"valueAxisLabelsRotation",labelText:s.toLanguageString(a.formatValueAxisLabelsRotation,a.messages.formatValueAxisLabelsRotation)},l.createElement(g.NumericTextBox,{id:"valueAxisLabelsRotation",value:typeof((C=(V=n.valueAxis[0])==null?void 0:V.labels)==null?void 0:C.rotation)=="number"?(p=(T=n.valueAxis[0])==null?void 0:T.labels)==null?void 0:p.rotation:null,placeholder:s.toLanguageString(a.formatValueAxisLabelsRotationAuto,a.messages.formatValueAxisLabelsRotationAuto),onChange:B,fillMode:"outline",min:-360,max:360,step:1}))))))))};exports.ValueAxisPanel=O;
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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 a from "react";
|
|
10
|
+
import { ExpansionPanel as J, ExpansionPanelContent as O } from "@progress/kendo-react-layout";
|
|
11
|
+
import { FormElement as Q } from "@progress/kendo-react-form";
|
|
12
|
+
import { FormFieldSet as N } from "../FormFieldSet.mjs";
|
|
13
|
+
import { FormField as u } from "../FormField.mjs";
|
|
14
|
+
import { Input as U, ColorPicker as y, NumericTextBox as X } from "@progress/kendo-react-inputs";
|
|
15
|
+
import { stopPropagation as Z, fontNames as c, itemRender as k, parseFont as d, nullItem as g, dropdownlistCommonProps as A, fontSizes as f, updateState as m, ActionTypes as x, ensureValue as R } from "../../utils.mjs";
|
|
16
|
+
import { formatValueAxisLabelsFormatText as $, messages as o, formatValueAxisLabelsFormatNumber as ee, formatValueAxisLabelsFormatCurrency as ae, formatValueAxisLabelsFormatPercent as te, formatYAxis as le, formatValueAxis as oe, formatValueAxisTitle as ie, formatValueAxisTitlePlaceholder as ne, formatValueAxisTitleFont as se, formatValueAxisTitleFontPlaceholder as re, formatValueAxisTitleSize as ue, formatValueAxisTitleSizePlaceholder as me, formatValueAxisTitleColor as xe, formatValueAxisLabels as ge, formatValueAxisLabelsFormat as Ae, formatValueAxisLabelsFont as ce, formatValueAxisLabelsFontPlaceholder as de, formatValueAxisLabelsSize as fe, formatValueAxisLabelsSizePlaceholder as ve, formatValueAxisLabelsColor as Le, formatValueAxisLabelsRotation as be, formatValueAxisLabelsRotationAuto as Ve } from "../../messages.mjs";
|
|
17
|
+
import { useLocalization as Se } from "@progress/kendo-react-intl";
|
|
18
|
+
import { Reveal as Fe } from "@progress/kendo-react-animation";
|
|
19
|
+
import { ComboBox as v, DropDownList as Ce } from "@progress/kendo-react-dropdowns";
|
|
20
|
+
const we = (r) => {
|
|
21
|
+
var S, F, C, h, T, E, p, z, P, I;
|
|
22
|
+
const l = Se(), i = r.state, w = i.seriesType, L = {
|
|
23
|
+
text: l.toLanguageString($, o.formatValueAxisLabelsFormatText),
|
|
24
|
+
value: ""
|
|
25
|
+
}, b = [
|
|
26
|
+
{
|
|
27
|
+
value: "n0",
|
|
28
|
+
text: l.toLanguageString(
|
|
29
|
+
ee,
|
|
30
|
+
o.formatValueAxisLabelsFormatNumber
|
|
31
|
+
)
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
value: "c0",
|
|
35
|
+
text: l.toLanguageString(
|
|
36
|
+
ae,
|
|
37
|
+
o.formatValueAxisLabelsFormatCurrency
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
value: "p0",
|
|
42
|
+
text: l.toLanguageString(
|
|
43
|
+
te,
|
|
44
|
+
o.formatValueAxisLabelsFormatPercent
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
], [V, K] = a.useState(!1), D = a.useCallback((e) => {
|
|
48
|
+
K(!e.expanded);
|
|
49
|
+
}, []), M = (e) => {
|
|
50
|
+
r.onStateChange(m(i, x.valueAxisTitleText, e.target.value));
|
|
51
|
+
}, B = (e) => {
|
|
52
|
+
const t = e.target.value || g;
|
|
53
|
+
R(t) && r.onStateChange(m(i, x.valueAxisTitleFontSize, t.value));
|
|
54
|
+
}, Y = (e) => {
|
|
55
|
+
const t = e.target.value || g;
|
|
56
|
+
r.onStateChange(m(i, x.valueAxisTitleFontName, t.value));
|
|
57
|
+
}, _ = (e) => {
|
|
58
|
+
r.onStateChange(m(i, x.valueAxisTitleColor, e.value));
|
|
59
|
+
}, W = (e) => {
|
|
60
|
+
const t = e.target.value || g;
|
|
61
|
+
R(t) && r.onStateChange(m(i, x.valueAxisLabelsFontSize, t.value));
|
|
62
|
+
}, j = (e) => {
|
|
63
|
+
const t = e.target.value || g;
|
|
64
|
+
r.onStateChange(m(i, x.valueAxisLabelsFontName, t.value));
|
|
65
|
+
}, q = (e) => {
|
|
66
|
+
r.onStateChange(m(i, x.valueAxisLabelsColor, e.value));
|
|
67
|
+
}, G = (e) => {
|
|
68
|
+
r.onStateChange(m(i, x.valueAxisLabelsRotation, e.target.value));
|
|
69
|
+
}, H = (e) => {
|
|
70
|
+
const t = e.target.value;
|
|
71
|
+
r.onStateChange(m(i, x.valueAxisLabelsFormat, t.value));
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ a.createElement(
|
|
74
|
+
J,
|
|
75
|
+
{
|
|
76
|
+
style: { maxWidth: "576px" },
|
|
77
|
+
title: w === "scatter" ? l.toLanguageString(le, o.formatYAxis) : l.toLanguageString(oe, o.formatValueAxis),
|
|
78
|
+
expanded: V,
|
|
79
|
+
tabIndex: 0,
|
|
80
|
+
onAction: D
|
|
81
|
+
},
|
|
82
|
+
/* @__PURE__ */ a.createElement(Fe, null, V && /* @__PURE__ */ a.createElement(O, null, /* @__PURE__ */ a.createElement(Q, { onKeyDown: Z }, /* @__PURE__ */ a.createElement(
|
|
83
|
+
N,
|
|
84
|
+
{
|
|
85
|
+
legend: l.toLanguageString(
|
|
86
|
+
ie,
|
|
87
|
+
o.formatValueAxisTitle
|
|
88
|
+
)
|
|
89
|
+
},
|
|
90
|
+
/* @__PURE__ */ a.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4" }, /* @__PURE__ */ a.createElement(u, { className: "k-col-span-2" }, /* @__PURE__ */ a.createElement(
|
|
91
|
+
U,
|
|
92
|
+
{
|
|
93
|
+
placeholder: l.toLanguageString(
|
|
94
|
+
ne,
|
|
95
|
+
o.formatValueAxisTitlePlaceholder
|
|
96
|
+
),
|
|
97
|
+
value: ((F = (S = i.valueAxis[0]) == null ? void 0 : S.title) == null ? void 0 : F.text) || "",
|
|
98
|
+
onChange: M
|
|
99
|
+
}
|
|
100
|
+
)), /* @__PURE__ */ a.createElement(
|
|
101
|
+
u,
|
|
102
|
+
{
|
|
103
|
+
className: "k-col-span-2",
|
|
104
|
+
editorId: "valueAxisTitleFont",
|
|
105
|
+
labelText: l.toLanguageString(
|
|
106
|
+
se,
|
|
107
|
+
o.formatValueAxisTitleFont
|
|
108
|
+
)
|
|
109
|
+
},
|
|
110
|
+
/* @__PURE__ */ a.createElement(
|
|
111
|
+
v,
|
|
112
|
+
{
|
|
113
|
+
id: "valueAxisTitleFont",
|
|
114
|
+
data: c,
|
|
115
|
+
textField: "text",
|
|
116
|
+
dataItemKey: "value",
|
|
117
|
+
itemRender: k,
|
|
118
|
+
placeholder: l.toLanguageString(
|
|
119
|
+
re,
|
|
120
|
+
o.formatValueAxisTitleFontPlaceholder
|
|
121
|
+
),
|
|
122
|
+
value: c.find(
|
|
123
|
+
(e) => {
|
|
124
|
+
var t, n, s;
|
|
125
|
+
return e.value === ((s = d(((n = (t = i.valueAxis[0]) == null ? void 0 : t.title) == null ? void 0 : n.font) || "")) == null ? void 0 : s.name);
|
|
126
|
+
}
|
|
127
|
+
) || g,
|
|
128
|
+
onChange: Y,
|
|
129
|
+
...A
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
), /* @__PURE__ */ a.createElement(
|
|
133
|
+
u,
|
|
134
|
+
{
|
|
135
|
+
editorId: "valueAxisTitleFontSize",
|
|
136
|
+
labelText: l.toLanguageString(
|
|
137
|
+
ue,
|
|
138
|
+
o.formatValueAxisTitleSize
|
|
139
|
+
)
|
|
140
|
+
},
|
|
141
|
+
/* @__PURE__ */ a.createElement(
|
|
142
|
+
v,
|
|
143
|
+
{
|
|
144
|
+
id: "valueAxisTitleFontSize",
|
|
145
|
+
data: f,
|
|
146
|
+
textField: "text",
|
|
147
|
+
dataItemKey: "value",
|
|
148
|
+
placeholder: l.toLanguageString(
|
|
149
|
+
me,
|
|
150
|
+
o.formatValueAxisTitleSizePlaceholder
|
|
151
|
+
),
|
|
152
|
+
value: f.find(
|
|
153
|
+
(e) => {
|
|
154
|
+
var t, n, s;
|
|
155
|
+
return e.value === ((s = d(((n = (t = i.valueAxis[0]) == null ? void 0 : t.title) == null ? void 0 : n.font) || "")) == null ? void 0 : s.size);
|
|
156
|
+
}
|
|
157
|
+
) || g,
|
|
158
|
+
onChange: B,
|
|
159
|
+
allowCustom: !0,
|
|
160
|
+
...A
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
), /* @__PURE__ */ a.createElement(
|
|
164
|
+
u,
|
|
165
|
+
{
|
|
166
|
+
editorId: "valueAxisTitleColor",
|
|
167
|
+
labelText: l.toLanguageString(
|
|
168
|
+
xe,
|
|
169
|
+
o.formatValueAxisTitleColor
|
|
170
|
+
)
|
|
171
|
+
},
|
|
172
|
+
/* @__PURE__ */ a.createElement(
|
|
173
|
+
y,
|
|
174
|
+
{
|
|
175
|
+
id: "valueAxisTitleColor",
|
|
176
|
+
view: "gradient",
|
|
177
|
+
value: ((h = (C = i.valueAxis[0]) == null ? void 0 : C.title) == null ? void 0 : h.color) || "",
|
|
178
|
+
onChange: _,
|
|
179
|
+
fillMode: "outline"
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
))
|
|
183
|
+
), /* @__PURE__ */ a.createElement(
|
|
184
|
+
N,
|
|
185
|
+
{
|
|
186
|
+
legend: l.toLanguageString(
|
|
187
|
+
ge,
|
|
188
|
+
o.formatValueAxisLabels
|
|
189
|
+
)
|
|
190
|
+
},
|
|
191
|
+
/* @__PURE__ */ a.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4" }, /* @__PURE__ */ a.createElement(
|
|
192
|
+
u,
|
|
193
|
+
{
|
|
194
|
+
className: "k-col-span-2",
|
|
195
|
+
editorId: "valueAxisLabelsFormat",
|
|
196
|
+
labelText: l.toLanguageString(
|
|
197
|
+
Ae,
|
|
198
|
+
o.formatValueAxisLabelsFormat
|
|
199
|
+
)
|
|
200
|
+
},
|
|
201
|
+
/* @__PURE__ */ a.createElement(
|
|
202
|
+
Ce,
|
|
203
|
+
{
|
|
204
|
+
id: "valueAxisLabelsFormat",
|
|
205
|
+
data: b,
|
|
206
|
+
textField: "text",
|
|
207
|
+
dataItemKey: "value",
|
|
208
|
+
defaultItem: L,
|
|
209
|
+
value: b.find(
|
|
210
|
+
(e) => {
|
|
211
|
+
var t, n;
|
|
212
|
+
return e.value === ((n = (t = i.valueAxis[0]) == null ? void 0 : t.labels) == null ? void 0 : n.format);
|
|
213
|
+
}
|
|
214
|
+
) || L,
|
|
215
|
+
onChange: H,
|
|
216
|
+
...A
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
), /* @__PURE__ */ a.createElement(
|
|
220
|
+
u,
|
|
221
|
+
{
|
|
222
|
+
className: "k-col-span-2",
|
|
223
|
+
editorId: "valueAxisLabelsFont",
|
|
224
|
+
labelText: l.toLanguageString(
|
|
225
|
+
ce,
|
|
226
|
+
o.formatValueAxisLabelsFont
|
|
227
|
+
)
|
|
228
|
+
},
|
|
229
|
+
/* @__PURE__ */ a.createElement(
|
|
230
|
+
v,
|
|
231
|
+
{
|
|
232
|
+
id: "valueAxisLabelsFont",
|
|
233
|
+
data: c,
|
|
234
|
+
textField: "text",
|
|
235
|
+
dataItemKey: "value",
|
|
236
|
+
placeholder: l.toLanguageString(
|
|
237
|
+
de,
|
|
238
|
+
o.formatValueAxisLabelsFontPlaceholder
|
|
239
|
+
),
|
|
240
|
+
value: c.find(
|
|
241
|
+
(e) => {
|
|
242
|
+
var t, n, s;
|
|
243
|
+
return e.value === ((s = d(((n = (t = i.valueAxis[0]) == null ? void 0 : t.labels) == null ? void 0 : n.font) || "")) == null ? void 0 : s.name);
|
|
244
|
+
}
|
|
245
|
+
) || g,
|
|
246
|
+
onChange: j,
|
|
247
|
+
itemRender: k,
|
|
248
|
+
...A
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
), /* @__PURE__ */ a.createElement(
|
|
252
|
+
u,
|
|
253
|
+
{
|
|
254
|
+
editorId: "valueAxisLabelsFontSize",
|
|
255
|
+
labelText: l.toLanguageString(
|
|
256
|
+
fe,
|
|
257
|
+
o.formatValueAxisLabelsSize
|
|
258
|
+
)
|
|
259
|
+
},
|
|
260
|
+
/* @__PURE__ */ a.createElement(
|
|
261
|
+
v,
|
|
262
|
+
{
|
|
263
|
+
id: "valueAxisLabelsFontSize",
|
|
264
|
+
data: f,
|
|
265
|
+
textField: "text",
|
|
266
|
+
dataItemKey: "value",
|
|
267
|
+
placeholder: l.toLanguageString(
|
|
268
|
+
ve,
|
|
269
|
+
o.formatValueAxisLabelsSizePlaceholder
|
|
270
|
+
),
|
|
271
|
+
value: f.find(
|
|
272
|
+
(e) => {
|
|
273
|
+
var t, n, s;
|
|
274
|
+
return e.value === ((s = d(((n = (t = i.valueAxis[0]) == null ? void 0 : t.labels) == null ? void 0 : n.font) || "")) == null ? void 0 : s.size);
|
|
275
|
+
}
|
|
276
|
+
) || g,
|
|
277
|
+
onChange: W,
|
|
278
|
+
allowCustom: !0,
|
|
279
|
+
...A
|
|
280
|
+
}
|
|
281
|
+
)
|
|
282
|
+
), /* @__PURE__ */ a.createElement(
|
|
283
|
+
u,
|
|
284
|
+
{
|
|
285
|
+
editorId: "valueAxisLabelsColor",
|
|
286
|
+
labelText: l.toLanguageString(
|
|
287
|
+
Le,
|
|
288
|
+
o.formatValueAxisLabelsColor
|
|
289
|
+
)
|
|
290
|
+
},
|
|
291
|
+
/* @__PURE__ */ a.createElement(
|
|
292
|
+
y,
|
|
293
|
+
{
|
|
294
|
+
id: "valueAxisLabelsColor",
|
|
295
|
+
view: "gradient",
|
|
296
|
+
value: ((E = (T = i.valueAxis[0]) == null ? void 0 : T.labels) == null ? void 0 : E.color) || "",
|
|
297
|
+
onChange: q,
|
|
298
|
+
fillMode: "outline"
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
), /* @__PURE__ */ a.createElement(
|
|
302
|
+
u,
|
|
303
|
+
{
|
|
304
|
+
editorId: "valueAxisLabelsRotation",
|
|
305
|
+
labelText: l.toLanguageString(
|
|
306
|
+
be,
|
|
307
|
+
o.formatValueAxisLabelsRotation
|
|
308
|
+
)
|
|
309
|
+
},
|
|
310
|
+
/* @__PURE__ */ a.createElement(
|
|
311
|
+
X,
|
|
312
|
+
{
|
|
313
|
+
id: "valueAxisLabelsRotation",
|
|
314
|
+
value: typeof ((z = (p = i.valueAxis[0]) == null ? void 0 : p.labels) == null ? void 0 : z.rotation) == "number" ? (I = (P = i.valueAxis[0]) == null ? void 0 : P.labels) == null ? void 0 : I.rotation : null,
|
|
315
|
+
placeholder: l.toLanguageString(
|
|
316
|
+
Ve,
|
|
317
|
+
o.formatValueAxisLabelsRotationAuto
|
|
318
|
+
),
|
|
319
|
+
onChange: G,
|
|
320
|
+
fillMode: "outline",
|
|
321
|
+
min: -360,
|
|
322
|
+
max: 360,
|
|
323
|
+
step: 1
|
|
324
|
+
}
|
|
325
|
+
)
|
|
326
|
+
))
|
|
327
|
+
))))
|
|
328
|
+
);
|
|
329
|
+
};
|
|
330
|
+
export {
|
|
331
|
+
we as ValueAxisPanel
|
|
332
|
+
};
|