@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,315 @@
|
|
|
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 e from "react";
|
|
10
|
+
import { ExpansionPanel as X, ExpansionPanelContent as _ } from "@progress/kendo-react-layout";
|
|
11
|
+
import { FormElement as D } from "@progress/kendo-react-form";
|
|
12
|
+
import { FormFieldSet as T } from "../FormFieldSet.mjs";
|
|
13
|
+
import { FormField as s } from "../FormField.mjs";
|
|
14
|
+
import { Input as V, ColorPicker as v, NumericTextBox as W, Checkbox as j } from "@progress/kendo-react-inputs";
|
|
15
|
+
import { updateState as g, ActionTypes as c, nullItem as m, ensureValue as F, stopPropagation as q, fontNames as x, itemRender as E, parseFont as C, dropdownlistCommonProps as y, fontSizes as d } from "../../utils.mjs";
|
|
16
|
+
import { formatXAxis as G, messages as r, formatCategoryAxis as H, formatCategoryAxisTitle as J, formatCategoryAxisTitlePlaceholder as Q, formatCategoryAxisTitleFont as U, formatCategoryAxisTitleFontPlaceholder as Y, formatCategoryAxisTitleSize as Z, formatCategoryAxisTitleSizePlaceholder as $, formatCategoryAxisTitleColor as ee, formatCategoryAxisLabels as te, formatCategoryAxisLabelsFont as ae, formatCategoryAxisLabelsFontPlaceholder as oe, formatCategoryAxisLabelsSize as le, formatCategoryAxisLabelsSizePlaceholder as re, formatCategoryAxisLabelsColor as ie, formatCategoryAxisLabelsRotation as ne, formatCategoryAxisLabelsRotationAuto as se, formatCategoryAxisLabelsReverseOrder as ge } from "../../messages.mjs";
|
|
17
|
+
import { useLocalization as ce } from "@progress/kendo-react-intl";
|
|
18
|
+
import { Reveal as me } from "@progress/kendo-react-animation";
|
|
19
|
+
import { ComboBox as A } from "@progress/kendo-react-dropdowns";
|
|
20
|
+
const Te = (n) => {
|
|
21
|
+
var f, b, L, S, h;
|
|
22
|
+
const l = ce(), t = n.state, k = t.seriesType, [u, p] = e.useState(!1), z = e.useCallback((a) => {
|
|
23
|
+
p(!a.expanded);
|
|
24
|
+
}, []), P = e.useCallback(
|
|
25
|
+
(a) => {
|
|
26
|
+
n.onStateChange(g(t, c.categoryAxisTitleText, a.target.value));
|
|
27
|
+
},
|
|
28
|
+
[t]
|
|
29
|
+
), R = e.useCallback(
|
|
30
|
+
(a) => {
|
|
31
|
+
const o = a.target.value || m;
|
|
32
|
+
F(o) && n.onStateChange(g(t, c.categoryAxisTitleFontSize, o.value));
|
|
33
|
+
},
|
|
34
|
+
[t]
|
|
35
|
+
), I = e.useCallback(
|
|
36
|
+
(a) => {
|
|
37
|
+
const o = a.target.value || m;
|
|
38
|
+
n.onStateChange(g(t, c.categoryAxisTitleFontName, o.value));
|
|
39
|
+
},
|
|
40
|
+
[t]
|
|
41
|
+
), N = e.useCallback(
|
|
42
|
+
(a) => {
|
|
43
|
+
n.onStateChange(g(t, c.categoryAxisTitleColor, a.value));
|
|
44
|
+
},
|
|
45
|
+
[t]
|
|
46
|
+
), w = e.useCallback(
|
|
47
|
+
(a) => {
|
|
48
|
+
const o = a.target.value || m;
|
|
49
|
+
F(o) && n.onStateChange(g(t, c.categoryAxisLabelsFontSize, o.value));
|
|
50
|
+
},
|
|
51
|
+
[t]
|
|
52
|
+
), K = e.useCallback(
|
|
53
|
+
(a) => {
|
|
54
|
+
const o = a.target.value || m;
|
|
55
|
+
n.onStateChange(g(t, c.categoryAxisLabelsFontName, o.value));
|
|
56
|
+
},
|
|
57
|
+
[t]
|
|
58
|
+
), M = e.useCallback(
|
|
59
|
+
(a) => {
|
|
60
|
+
n.onStateChange(g(t, c.categoryAxisLabelsColor, a.value));
|
|
61
|
+
},
|
|
62
|
+
[t]
|
|
63
|
+
), O = e.useCallback(
|
|
64
|
+
(a) => {
|
|
65
|
+
n.onStateChange(g(t, c.categoryAxisLabelsRotation, a.target.value));
|
|
66
|
+
},
|
|
67
|
+
[t]
|
|
68
|
+
), B = e.useCallback(
|
|
69
|
+
(a) => {
|
|
70
|
+
n.onStateChange(g(t, c.categoryAxisReverseOrder, a.value));
|
|
71
|
+
},
|
|
72
|
+
[t]
|
|
73
|
+
);
|
|
74
|
+
return /* @__PURE__ */ e.createElement(
|
|
75
|
+
X,
|
|
76
|
+
{
|
|
77
|
+
style: { maxWidth: "576px" },
|
|
78
|
+
title: k === "scatter" ? l.toLanguageString(G, r.formatXAxis) : l.toLanguageString(H, r.formatCategoryAxis),
|
|
79
|
+
expanded: u,
|
|
80
|
+
tabIndex: 0,
|
|
81
|
+
onAction: z
|
|
82
|
+
},
|
|
83
|
+
/* @__PURE__ */ e.createElement(me, null, u && /* @__PURE__ */ e.createElement(_, null, /* @__PURE__ */ e.createElement(D, { onKeyDown: q }, /* @__PURE__ */ e.createElement(
|
|
84
|
+
T,
|
|
85
|
+
{
|
|
86
|
+
legend: l.toLanguageString(
|
|
87
|
+
J,
|
|
88
|
+
r.formatCategoryAxisTitle
|
|
89
|
+
)
|
|
90
|
+
},
|
|
91
|
+
/* @__PURE__ */ e.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4" }, /* @__PURE__ */ e.createElement(s, { className: "k-col-span-2" }, /* @__PURE__ */ e.createElement(
|
|
92
|
+
V,
|
|
93
|
+
{
|
|
94
|
+
placeholder: l.toLanguageString(
|
|
95
|
+
Q,
|
|
96
|
+
r.formatCategoryAxisTitlePlaceholder
|
|
97
|
+
),
|
|
98
|
+
value: ((f = t.categoryAxis[0].title) == null ? void 0 : f.text) || "",
|
|
99
|
+
onChange: P
|
|
100
|
+
}
|
|
101
|
+
)), /* @__PURE__ */ e.createElement(
|
|
102
|
+
s,
|
|
103
|
+
{
|
|
104
|
+
className: "k-col-span-2",
|
|
105
|
+
editorId: "categoryAxisTitleFont",
|
|
106
|
+
labelText: l.toLanguageString(
|
|
107
|
+
U,
|
|
108
|
+
r.formatCategoryAxisTitleFont
|
|
109
|
+
)
|
|
110
|
+
},
|
|
111
|
+
/* @__PURE__ */ e.createElement(
|
|
112
|
+
A,
|
|
113
|
+
{
|
|
114
|
+
id: "categoryAxisTitleFont",
|
|
115
|
+
data: x,
|
|
116
|
+
textField: "text",
|
|
117
|
+
dataItemKey: "value",
|
|
118
|
+
itemRender: E,
|
|
119
|
+
placeholder: l.toLanguageString(
|
|
120
|
+
Y,
|
|
121
|
+
r.formatCategoryAxisTitleFontPlaceholder
|
|
122
|
+
),
|
|
123
|
+
value: x.find(
|
|
124
|
+
(a) => {
|
|
125
|
+
var o, i;
|
|
126
|
+
return a.value === ((i = C(((o = t.categoryAxis[0].title) == null ? void 0 : o.font) || "")) == null ? void 0 : i.name);
|
|
127
|
+
}
|
|
128
|
+
) || m,
|
|
129
|
+
onChange: I,
|
|
130
|
+
...y
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
), /* @__PURE__ */ e.createElement(
|
|
134
|
+
s,
|
|
135
|
+
{
|
|
136
|
+
editorId: "categoryAxisTitleFontSize",
|
|
137
|
+
labelText: l.toLanguageString(
|
|
138
|
+
Z,
|
|
139
|
+
r.formatCategoryAxisTitleSize
|
|
140
|
+
)
|
|
141
|
+
},
|
|
142
|
+
/* @__PURE__ */ e.createElement(
|
|
143
|
+
A,
|
|
144
|
+
{
|
|
145
|
+
id: "categoryAxisTitleFontSize",
|
|
146
|
+
data: d,
|
|
147
|
+
textField: "text",
|
|
148
|
+
dataItemKey: "value",
|
|
149
|
+
placeholder: l.toLanguageString(
|
|
150
|
+
$,
|
|
151
|
+
r.formatCategoryAxisTitleSizePlaceholder
|
|
152
|
+
),
|
|
153
|
+
value: d.find(
|
|
154
|
+
(a) => {
|
|
155
|
+
var o, i;
|
|
156
|
+
return a.value === ((i = C(((o = t.categoryAxis[0].title) == null ? void 0 : o.font) || "")) == null ? void 0 : i.size);
|
|
157
|
+
}
|
|
158
|
+
) || m,
|
|
159
|
+
onChange: R,
|
|
160
|
+
allowCustom: !0,
|
|
161
|
+
...y
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
), /* @__PURE__ */ e.createElement(
|
|
165
|
+
s,
|
|
166
|
+
{
|
|
167
|
+
editorId: "categoryAxisTitleColor",
|
|
168
|
+
labelText: l.toLanguageString(
|
|
169
|
+
ee,
|
|
170
|
+
r.formatCategoryAxisTitleColor
|
|
171
|
+
)
|
|
172
|
+
},
|
|
173
|
+
/* @__PURE__ */ e.createElement(
|
|
174
|
+
v,
|
|
175
|
+
{
|
|
176
|
+
id: "categoryAxisTitleColor",
|
|
177
|
+
view: "gradient",
|
|
178
|
+
value: ((b = t.categoryAxis[0].title) == null ? void 0 : b.color) || "",
|
|
179
|
+
onChange: N,
|
|
180
|
+
fillMode: "outline"
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
))
|
|
184
|
+
), /* @__PURE__ */ e.createElement(
|
|
185
|
+
T,
|
|
186
|
+
{
|
|
187
|
+
legend: l.toLanguageString(
|
|
188
|
+
te,
|
|
189
|
+
r.formatCategoryAxisLabels
|
|
190
|
+
)
|
|
191
|
+
},
|
|
192
|
+
/* @__PURE__ */ e.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4" }, /* @__PURE__ */ e.createElement(
|
|
193
|
+
s,
|
|
194
|
+
{
|
|
195
|
+
className: "k-col-span-2",
|
|
196
|
+
editorId: "categoryAxisLabelsFont",
|
|
197
|
+
labelText: l.toLanguageString(
|
|
198
|
+
ae,
|
|
199
|
+
r.formatCategoryAxisLabelsFont
|
|
200
|
+
)
|
|
201
|
+
},
|
|
202
|
+
/* @__PURE__ */ e.createElement(
|
|
203
|
+
A,
|
|
204
|
+
{
|
|
205
|
+
id: "categoryAxisLabelsFont",
|
|
206
|
+
data: x,
|
|
207
|
+
textField: "text",
|
|
208
|
+
dataItemKey: "value",
|
|
209
|
+
placeholder: l.toLanguageString(
|
|
210
|
+
oe,
|
|
211
|
+
r.formatCategoryAxisLabelsFontPlaceholder
|
|
212
|
+
),
|
|
213
|
+
value: x.find(
|
|
214
|
+
(a) => {
|
|
215
|
+
var o, i;
|
|
216
|
+
return a.value === ((i = C(((o = t.categoryAxis[0].labels) == null ? void 0 : o.font) || "")) == null ? void 0 : i.name);
|
|
217
|
+
}
|
|
218
|
+
) || m,
|
|
219
|
+
onChange: K,
|
|
220
|
+
itemRender: E,
|
|
221
|
+
...y
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
), /* @__PURE__ */ e.createElement(
|
|
225
|
+
s,
|
|
226
|
+
{
|
|
227
|
+
editorId: "categoryAxisLabelsFontSize",
|
|
228
|
+
labelText: l.toLanguageString(
|
|
229
|
+
le,
|
|
230
|
+
r.formatCategoryAxisLabelsSize
|
|
231
|
+
)
|
|
232
|
+
},
|
|
233
|
+
/* @__PURE__ */ e.createElement(
|
|
234
|
+
A,
|
|
235
|
+
{
|
|
236
|
+
id: "categoryAxisLabelsFontSize",
|
|
237
|
+
data: d,
|
|
238
|
+
textField: "text",
|
|
239
|
+
dataItemKey: "value",
|
|
240
|
+
placeholder: l.toLanguageString(
|
|
241
|
+
re,
|
|
242
|
+
r.formatCategoryAxisLabelsSizePlaceholder
|
|
243
|
+
),
|
|
244
|
+
value: d.find(
|
|
245
|
+
(a) => {
|
|
246
|
+
var o, i;
|
|
247
|
+
return a.value === ((i = C(((o = t.categoryAxis[0].labels) == null ? void 0 : o.font) || "")) == null ? void 0 : i.size);
|
|
248
|
+
}
|
|
249
|
+
) || m,
|
|
250
|
+
onChange: w,
|
|
251
|
+
allowCustom: !0,
|
|
252
|
+
...y
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
), /* @__PURE__ */ e.createElement(
|
|
256
|
+
s,
|
|
257
|
+
{
|
|
258
|
+
editorId: "categoryAxisLabelsColor",
|
|
259
|
+
labelText: l.toLanguageString(
|
|
260
|
+
ie,
|
|
261
|
+
r.formatCategoryAxisLabelsColor
|
|
262
|
+
)
|
|
263
|
+
},
|
|
264
|
+
/* @__PURE__ */ e.createElement(
|
|
265
|
+
v,
|
|
266
|
+
{
|
|
267
|
+
id: "categoryAxisLabelsColor",
|
|
268
|
+
view: "gradient",
|
|
269
|
+
value: ((L = t.categoryAxis[0].labels) == null ? void 0 : L.color) || "",
|
|
270
|
+
onChange: M,
|
|
271
|
+
fillMode: "outline"
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
), /* @__PURE__ */ e.createElement(
|
|
275
|
+
s,
|
|
276
|
+
{
|
|
277
|
+
editorId: "categoryAxisLabelsRotation",
|
|
278
|
+
labelText: l.toLanguageString(
|
|
279
|
+
ne,
|
|
280
|
+
r.formatCategoryAxisLabelsRotation
|
|
281
|
+
)
|
|
282
|
+
},
|
|
283
|
+
/* @__PURE__ */ e.createElement(
|
|
284
|
+
W,
|
|
285
|
+
{
|
|
286
|
+
id: "categoryAxisLabelsRotation",
|
|
287
|
+
value: typeof ((S = t.categoryAxis[0].labels) == null ? void 0 : S.rotation) == "number" ? (h = t.categoryAxis[0].labels) == null ? void 0 : h.rotation : null,
|
|
288
|
+
placeholder: l.toLanguageString(
|
|
289
|
+
se,
|
|
290
|
+
r.formatCategoryAxisLabelsRotationAuto
|
|
291
|
+
),
|
|
292
|
+
onChange: O,
|
|
293
|
+
fillMode: "outline",
|
|
294
|
+
min: -360,
|
|
295
|
+
max: 360,
|
|
296
|
+
step: 1
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
), /* @__PURE__ */ e.createElement(s, { className: "k-col-span-2" }, /* @__PURE__ */ e.createElement(
|
|
300
|
+
j,
|
|
301
|
+
{
|
|
302
|
+
label: l.toLanguageString(
|
|
303
|
+
ge,
|
|
304
|
+
r.formatCategoryAxisLabelsReverseOrder
|
|
305
|
+
),
|
|
306
|
+
checked: t.categoryAxis[0].reverse || !1,
|
|
307
|
+
onChange: B
|
|
308
|
+
}
|
|
309
|
+
)))
|
|
310
|
+
))))
|
|
311
|
+
);
|
|
312
|
+
};
|
|
313
|
+
export {
|
|
314
|
+
Te as CategoryAxisPanel
|
|
315
|
+
};
|
|
@@ -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 e=require("react"),c=require("@progress/kendo-react-layout"),x=require("@progress/kendo-react-form"),d=require("../FormFieldSet.js"),g=require("../FormField.js"),s=require("@progress/kendo-react-inputs"),o=require("../../utils.js"),a=require("../../messages.js"),k=require("@progress/kendo-react-intl"),b=require("@progress/kendo-react-animation"),E=l=>{var u;const t=k.useLocalization(),r=l.state,[m,h]=e.useState(!1),C=e.useCallback(n=>{h(!n.expanded)},[]),A=e.useCallback(n=>{l.onStateChange(o.updateState(r,o.ActionTypes.areaMarginLeft,n.target.value))},[r]),f=e.useCallback(n=>{l.onStateChange(o.updateState(r,o.ActionTypes.areaMarginRight,n.target.value))},[r]),M=e.useCallback(n=>{l.onStateChange(o.updateState(r,o.ActionTypes.areaMarginTop,n.target.value))},[r]),p=e.useCallback(n=>{l.onStateChange(o.updateState(r,o.ActionTypes.areaMarginBottom,n.target.value))},[r]),i=r.area.margin,S=e.useCallback(n=>{l.onStateChange(o.updateState(r,o.ActionTypes.areaBackground,n.value))},[r]);return e.createElement(c.ExpansionPanel,{style:{maxWidth:"576px"},title:t.toLanguageString(a.formatChartArea,a.messages.formatChartArea),expanded:m,tabIndex:0,onAction:C},e.createElement(b.Reveal,null,m&&e.createElement(c.ExpansionPanelContent,null,e.createElement(x.FormElement,{onKeyDown:o.stopPropagation},e.createElement(d.FormFieldSet,{legend:t.toLanguageString(a.formatChartAreaMargins,a.messages.formatChartAreaMargins)},e.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},e.createElement(g.FormField,{labelText:t.toLanguageString(a.formatChartAreaMarginsLeft,a.messages.formatChartAreaMarginsLeft),editorId:"left"},e.createElement(s.NumericTextBox,{id:"left",value:i.left!==void 0?i.left:null,onChange:A,placeholder:t.toLanguageString(a.formatChartAreaMarginsAuto,a.messages.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),e.createElement(g.FormField,{labelText:t.toLanguageString(a.formatChartAreaMarginsRight,a.messages.formatChartAreaMarginsRight),editorId:"right"},e.createElement(s.NumericTextBox,{id:"right",value:i.right!==void 0?i.right:null,onChange:f,placeholder:t.toLanguageString(a.formatChartAreaMarginsAuto,a.messages.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),e.createElement(g.FormField,{labelText:t.toLanguageString(a.formatChartAreaMarginsTop,a.messages.formatChartAreaMarginsTop),editorId:"top"},e.createElement(s.NumericTextBox,{id:"top",value:i.top!==void 0?i.top:null,onChange:M,placeholder:t.toLanguageString(a.formatChartAreaMarginsAuto,a.messages.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})),e.createElement(g.FormField,{labelText:t.toLanguageString(a.formatChartAreaMarginsBottom,a.messages.formatChartAreaMarginsBottom),editorId:"bottom"},e.createElement(s.NumericTextBox,{id:"bottom",value:i.bottom!==void 0?i.bottom:null,onChange:p,placeholder:t.toLanguageString(a.formatChartAreaMarginsAuto,a.messages.formatChartAreaMarginsAuto),min:0,max:1e3,step:1,fillMode:"outline"})))),e.createElement(d.FormFieldSet,{legend:t.toLanguageString(a.formatChartAreaBackground,a.messages.formatChartAreaBackground)},e.createElement(g.FormField,{labelText:t.toLanguageString(a.formatChartAreaBackgroundColor,a.messages.formatChartAreaBackgroundColor),editorId:"background"},e.createElement(s.ColorPicker,{id:"background",value:((u=r.area)==null?void 0:u.background)||"",onChange:S,view:"gradient",fillMode:"outline"})))))))};exports.ChartAreaPanel=E;
|
|
@@ -0,0 +1,200 @@
|
|
|
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 k, ExpansionPanelContent as S } from "@progress/kendo-react-layout";
|
|
11
|
+
import { FormElement as b } from "@progress/kendo-react-form";
|
|
12
|
+
import { FormFieldSet as C } from "../FormFieldSet.mjs";
|
|
13
|
+
import { FormField as g } from "../FormField.mjs";
|
|
14
|
+
import { NumericTextBox as u, ColorPicker as v } from "@progress/kendo-react-inputs";
|
|
15
|
+
import { updateState as i, ActionTypes as m, stopPropagation as L } from "../../utils.mjs";
|
|
16
|
+
import { formatChartArea as B, messages as r, formatChartAreaMargins as T, formatChartAreaMarginsLeft as I, formatChartAreaMarginsAuto as c, formatChartAreaMarginsRight as R, formatChartAreaMarginsTop as F, formatChartAreaMarginsBottom as P, formatChartAreaBackground as y, formatChartAreaBackgroundColor as w } from "../../messages.mjs";
|
|
17
|
+
import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
18
|
+
import { Reveal as N } from "@progress/kendo-react-animation";
|
|
19
|
+
const Q = (l) => {
|
|
20
|
+
var h;
|
|
21
|
+
const e = z(), t = l.state, [d, s] = a.useState(!1), f = a.useCallback((o) => {
|
|
22
|
+
s(!o.expanded);
|
|
23
|
+
}, []), A = a.useCallback(
|
|
24
|
+
(o) => {
|
|
25
|
+
l.onStateChange(i(t, m.areaMarginLeft, o.target.value));
|
|
26
|
+
},
|
|
27
|
+
[t]
|
|
28
|
+
), p = a.useCallback(
|
|
29
|
+
(o) => {
|
|
30
|
+
l.onStateChange(i(t, m.areaMarginRight, o.target.value));
|
|
31
|
+
},
|
|
32
|
+
[t]
|
|
33
|
+
), M = a.useCallback(
|
|
34
|
+
(o) => {
|
|
35
|
+
l.onStateChange(i(t, m.areaMarginTop, o.target.value));
|
|
36
|
+
},
|
|
37
|
+
[t]
|
|
38
|
+
), x = a.useCallback(
|
|
39
|
+
(o) => {
|
|
40
|
+
l.onStateChange(i(t, m.areaMarginBottom, o.target.value));
|
|
41
|
+
},
|
|
42
|
+
[t]
|
|
43
|
+
), n = t.area.margin, E = a.useCallback(
|
|
44
|
+
(o) => {
|
|
45
|
+
l.onStateChange(i(t, m.areaBackground, o.value));
|
|
46
|
+
},
|
|
47
|
+
[t]
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ a.createElement(
|
|
50
|
+
k,
|
|
51
|
+
{
|
|
52
|
+
style: { maxWidth: "576px" },
|
|
53
|
+
title: e.toLanguageString(B, r.formatChartArea),
|
|
54
|
+
expanded: d,
|
|
55
|
+
tabIndex: 0,
|
|
56
|
+
onAction: f
|
|
57
|
+
},
|
|
58
|
+
/* @__PURE__ */ a.createElement(N, null, d && /* @__PURE__ */ a.createElement(S, null, /* @__PURE__ */ a.createElement(b, { onKeyDown: L }, /* @__PURE__ */ a.createElement(
|
|
59
|
+
C,
|
|
60
|
+
{
|
|
61
|
+
legend: e.toLanguageString(
|
|
62
|
+
T,
|
|
63
|
+
r.formatChartAreaMargins
|
|
64
|
+
)
|
|
65
|
+
},
|
|
66
|
+
/* @__PURE__ */ a.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4" }, /* @__PURE__ */ a.createElement(
|
|
67
|
+
g,
|
|
68
|
+
{
|
|
69
|
+
labelText: e.toLanguageString(
|
|
70
|
+
I,
|
|
71
|
+
r.formatChartAreaMarginsLeft
|
|
72
|
+
),
|
|
73
|
+
editorId: "left"
|
|
74
|
+
},
|
|
75
|
+
/* @__PURE__ */ a.createElement(
|
|
76
|
+
u,
|
|
77
|
+
{
|
|
78
|
+
id: "left",
|
|
79
|
+
value: n.left !== void 0 ? n.left : null,
|
|
80
|
+
onChange: A,
|
|
81
|
+
placeholder: e.toLanguageString(
|
|
82
|
+
c,
|
|
83
|
+
r.formatChartAreaMarginsAuto
|
|
84
|
+
),
|
|
85
|
+
min: 0,
|
|
86
|
+
max: 1e3,
|
|
87
|
+
step: 1,
|
|
88
|
+
fillMode: "outline"
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
), /* @__PURE__ */ a.createElement(
|
|
92
|
+
g,
|
|
93
|
+
{
|
|
94
|
+
labelText: e.toLanguageString(
|
|
95
|
+
R,
|
|
96
|
+
r.formatChartAreaMarginsRight
|
|
97
|
+
),
|
|
98
|
+
editorId: "right"
|
|
99
|
+
},
|
|
100
|
+
/* @__PURE__ */ a.createElement(
|
|
101
|
+
u,
|
|
102
|
+
{
|
|
103
|
+
id: "right",
|
|
104
|
+
value: n.right !== void 0 ? n.right : null,
|
|
105
|
+
onChange: p,
|
|
106
|
+
placeholder: e.toLanguageString(
|
|
107
|
+
c,
|
|
108
|
+
r.formatChartAreaMarginsAuto
|
|
109
|
+
),
|
|
110
|
+
min: 0,
|
|
111
|
+
max: 1e3,
|
|
112
|
+
step: 1,
|
|
113
|
+
fillMode: "outline"
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
), /* @__PURE__ */ a.createElement(
|
|
117
|
+
g,
|
|
118
|
+
{
|
|
119
|
+
labelText: e.toLanguageString(
|
|
120
|
+
F,
|
|
121
|
+
r.formatChartAreaMarginsTop
|
|
122
|
+
),
|
|
123
|
+
editorId: "top"
|
|
124
|
+
},
|
|
125
|
+
/* @__PURE__ */ a.createElement(
|
|
126
|
+
u,
|
|
127
|
+
{
|
|
128
|
+
id: "top",
|
|
129
|
+
value: n.top !== void 0 ? n.top : null,
|
|
130
|
+
onChange: M,
|
|
131
|
+
placeholder: e.toLanguageString(
|
|
132
|
+
c,
|
|
133
|
+
r.formatChartAreaMarginsAuto
|
|
134
|
+
),
|
|
135
|
+
min: 0,
|
|
136
|
+
max: 1e3,
|
|
137
|
+
step: 1,
|
|
138
|
+
fillMode: "outline"
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
), /* @__PURE__ */ a.createElement(
|
|
142
|
+
g,
|
|
143
|
+
{
|
|
144
|
+
labelText: e.toLanguageString(
|
|
145
|
+
P,
|
|
146
|
+
r.formatChartAreaMarginsBottom
|
|
147
|
+
),
|
|
148
|
+
editorId: "bottom"
|
|
149
|
+
},
|
|
150
|
+
/* @__PURE__ */ a.createElement(
|
|
151
|
+
u,
|
|
152
|
+
{
|
|
153
|
+
id: "bottom",
|
|
154
|
+
value: n.bottom !== void 0 ? n.bottom : null,
|
|
155
|
+
onChange: x,
|
|
156
|
+
placeholder: e.toLanguageString(
|
|
157
|
+
c,
|
|
158
|
+
r.formatChartAreaMarginsAuto
|
|
159
|
+
),
|
|
160
|
+
min: 0,
|
|
161
|
+
max: 1e3,
|
|
162
|
+
step: 1,
|
|
163
|
+
fillMode: "outline"
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
))
|
|
167
|
+
), /* @__PURE__ */ a.createElement(
|
|
168
|
+
C,
|
|
169
|
+
{
|
|
170
|
+
legend: e.toLanguageString(
|
|
171
|
+
y,
|
|
172
|
+
r.formatChartAreaBackground
|
|
173
|
+
)
|
|
174
|
+
},
|
|
175
|
+
/* @__PURE__ */ a.createElement(
|
|
176
|
+
g,
|
|
177
|
+
{
|
|
178
|
+
labelText: e.toLanguageString(
|
|
179
|
+
w,
|
|
180
|
+
r.formatChartAreaBackgroundColor
|
|
181
|
+
),
|
|
182
|
+
editorId: "background"
|
|
183
|
+
},
|
|
184
|
+
/* @__PURE__ */ a.createElement(
|
|
185
|
+
v,
|
|
186
|
+
{
|
|
187
|
+
id: "background",
|
|
188
|
+
value: ((h = t.area) == null ? void 0 : h.background) || "",
|
|
189
|
+
onChange: E,
|
|
190
|
+
view: "gradient",
|
|
191
|
+
fillMode: "outline"
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
))))
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
export {
|
|
199
|
+
Q as ChartAreaPanel
|
|
200
|
+
};
|
|
@@ -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 T=require("react"),b=require("@progress/kendo-react-animation"),f=require("@progress/kendo-react-intl"),m=require("@progress/kendo-react-layout"),t=require("../../utils.js"),E=require("../SeriesTypesWrap.js"),l=require("../SeriesTypeButton.js"),o=require("../../messages.js"),u=require("@progress/kendo-svg-icons");function q(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(c,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return c.default=n,Object.freeze(c)}const a=q(T),x=n=>{const c=f.useLocalization(),e=n.state,s=e.seriesType,{isStackFalse:S,isStackNormal:d,isStack100:C}=t.stackState(e),[i,g]=a.useState(!0),k=a.useCallback(r=>{g(!r.expanded)},[]),p=()=>{n.onStateChange(t.mergeStates(e,t.createState(e.data,"column")))},h=()=>{const r=t.mergeStates(e,t.createState(e.data,"column"));n.onStateChange(t.updateState(r,t.ActionTypes.stacked,t.stackNormal))},y=()=>{const r=t.mergeStates(e,t.createState(e.data,"column"));n.onStateChange(t.updateState(r,t.ActionTypes.stacked,t.stack100))};return a.createElement(m.ExpansionPanel,{style:{maxWidth:"576px"},title:c.toLanguageString(o.columnChart,o.messages.columnChart),expanded:i,tabIndex:0,onAction:k},a.createElement(b.Reveal,null,i&&a.createElement(m.ExpansionPanelContent,null,a.createElement(E.SeriesTypesWrap,null,a.createElement(l.SeriesTypeButton,{selected:s==="column"&&S,onClick:p,icon:u.chartColumnClusteredIcon,iconName:"chart-column-clustered"},c.toLanguageString(o.columnChartColumn,o.messages.columnChartColumn)),a.createElement(l.SeriesTypeButton,{selected:s==="column"&&d,onClick:h,icon:u.chartColumnStackedIcon,iconName:"chart-column-stacked"},c.toLanguageString(o.columnChartStackedColumn,o.messages.columnChartStackedColumn)),a.createElement(l.SeriesTypeButton,{selected:s==="column"&&C,onClick:y,icon:u.chartColumnStacked100Icon,iconName:"chart-column-stacked100"},c.toLanguageString(o.columnChart100StackedColumn,o.messages.columnChart100StackedColumn))))))};exports.ColumnChartPanel=x;
|
|
@@ -0,0 +1,77 @@
|
|
|
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 e from "react";
|
|
10
|
+
import { Reveal as f } from "@progress/kendo-react-animation";
|
|
11
|
+
import { useLocalization as y } from "@progress/kendo-react-intl";
|
|
12
|
+
import { ExpansionPanel as T, ExpansionPanelContent as L } from "@progress/kendo-react-layout";
|
|
13
|
+
import { stackState as N, mergeStates as m, createState as r, updateState as i, ActionTypes as C, stackNormal as I, stack100 as A } from "../../utils.mjs";
|
|
14
|
+
import { SeriesTypesWrap as P } from "../SeriesTypesWrap.mjs";
|
|
15
|
+
import { SeriesTypeButton as s } from "../SeriesTypeButton.mjs";
|
|
16
|
+
import { columnChart as b, messages as c, columnChartColumn as w, columnChartStackedColumn as z, columnChart100StackedColumn as R } from "../../messages.mjs";
|
|
17
|
+
import { chartColumnClusteredIcon as W, chartColumnStackedIcon as v, chartColumnStacked100Icon as B } from "@progress/kendo-svg-icons";
|
|
18
|
+
const M = (a) => {
|
|
19
|
+
const o = y(), t = a.state, l = t.seriesType, { isStackFalse: d, isStackNormal: S, isStack100: h } = N(t), [u, k] = e.useState(!0), p = e.useCallback((n) => {
|
|
20
|
+
k(!n.expanded);
|
|
21
|
+
}, []), g = () => {
|
|
22
|
+
a.onStateChange(m(t, r(t.data, "column")));
|
|
23
|
+
}, x = () => {
|
|
24
|
+
const n = m(t, r(t.data, "column"));
|
|
25
|
+
a.onStateChange(i(n, C.stacked, I));
|
|
26
|
+
}, E = () => {
|
|
27
|
+
const n = m(t, r(t.data, "column"));
|
|
28
|
+
a.onStateChange(i(n, C.stacked, A));
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ e.createElement(
|
|
31
|
+
T,
|
|
32
|
+
{
|
|
33
|
+
style: { maxWidth: "576px" },
|
|
34
|
+
title: o.toLanguageString(b, c.columnChart),
|
|
35
|
+
expanded: u,
|
|
36
|
+
tabIndex: 0,
|
|
37
|
+
onAction: p
|
|
38
|
+
},
|
|
39
|
+
/* @__PURE__ */ e.createElement(f, null, u && /* @__PURE__ */ e.createElement(L, null, /* @__PURE__ */ e.createElement(P, null, /* @__PURE__ */ e.createElement(
|
|
40
|
+
s,
|
|
41
|
+
{
|
|
42
|
+
selected: l === "column" && d,
|
|
43
|
+
onClick: g,
|
|
44
|
+
icon: W,
|
|
45
|
+
iconName: "chart-column-clustered"
|
|
46
|
+
},
|
|
47
|
+
o.toLanguageString(w, c.columnChartColumn)
|
|
48
|
+
), /* @__PURE__ */ e.createElement(
|
|
49
|
+
s,
|
|
50
|
+
{
|
|
51
|
+
selected: l === "column" && S,
|
|
52
|
+
onClick: x,
|
|
53
|
+
icon: v,
|
|
54
|
+
iconName: "chart-column-stacked"
|
|
55
|
+
},
|
|
56
|
+
o.toLanguageString(
|
|
57
|
+
z,
|
|
58
|
+
c.columnChartStackedColumn
|
|
59
|
+
)
|
|
60
|
+
), /* @__PURE__ */ e.createElement(
|
|
61
|
+
s,
|
|
62
|
+
{
|
|
63
|
+
selected: l === "column" && h,
|
|
64
|
+
onClick: E,
|
|
65
|
+
icon: B,
|
|
66
|
+
iconName: "chart-column-stacked100"
|
|
67
|
+
},
|
|
68
|
+
o.toLanguageString(
|
|
69
|
+
R,
|
|
70
|
+
c.columnChart100StackedColumn
|
|
71
|
+
)
|
|
72
|
+
))))
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
M as ColumnChartPanel
|
|
77
|
+
};
|
|
@@ -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 e=require("react"),x=require("@progress/kendo-react-form"),g=require("@progress/kendo-react-layout"),n=require("../../utils.js"),c=require("../FormFieldSet.js"),f=require("@progress/kendo-react-intl"),a=require("../../messages.js"),u=require("@progress/kendo-react-dropdowns"),A=require("../SeriesGrid.js"),y=require("@progress/kendo-react-animation"),E=r=>{const i=f.useLocalization(),t=r.state,s=t.seriesType,[l,d]=e.useState(!0),m=e.useCallback(o=>{d(!o.expanded)},[]),C=e.useCallback(o=>{r.onStateChange(n.updateState(t,n.ActionTypes.categoryAxisX,o.target.value))},[t]),S=e.useCallback(o=>{r.onStateChange(n.updateState(t,n.ActionTypes.seriesChange,o))},[t]),p=e.useCallback(o=>{r.onStateChange(n.updateState(t,n.ActionTypes.valueAxisY,o.target.value))},[t]);return e.createElement(g.ExpansionPanel,{style:{maxWidth:"576px"},title:i.toLanguageString(a.configuration,a.messages.configuration),expanded:l,tabIndex:0,onAction:m},e.createElement(y.Reveal,null,l&&e.createElement(g.ExpansionPanelContent,null,e.createElement(x.FormElement,{onKeyDown:n.stopPropagation},e.createElement(c.FormFieldSet,{legend:s==="scatter"?i.toLanguageString(a.configurationXAxis,a.messages.configurationXAxis):i.toLanguageString(a.configurationCategoryAxis,a.messages.configurationCategoryAxis)},e.createElement(u.DropDownList,{data:t.columns||[],value:t.categoryField,onChange:C,...n.dropdownlistCommonProps})),n.isCategorical(s)&&e.createElement(c.FormFieldSet,{legend:i.toLanguageString(a.configurationSeries,a.messages.configurationSeries)},e.createElement(A.SeriesGrid,{data:t.series,initialData:t.initialSeries,onChange:S})),s==="pie"&&e.createElement(c.FormFieldSet,{legend:i.toLanguageString(a.configurationValueAxis,a.messages.configurationValueAxis)},e.createElement(u.DropDownList,{data:t.columns||[],value:t.valueField||"",...n.dropdownlistCommonProps,onChange:p}))))))};exports.ConfigurationPanel=E;
|