@progress/kendo-react-chart-wizard 8.3.0-develop.9 → 8.4.0-develop.1

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.
Files changed (60) hide show
  1. package/ChartWizard.js +1 -1
  2. package/ChartWizard.mjs +88 -942
  3. package/components/ChartComponent.js +8 -0
  4. package/components/ChartComponent.mjs +69 -0
  5. package/components/FormField.js +8 -0
  6. package/components/FormField.mjs +16 -0
  7. package/{common/get-wizard-data-from-data-rows.js → components/FormFieldSet.js} +1 -1
  8. package/{common/get-wizard-data-from-data-rows.mjs → components/FormFieldSet.mjs} +3 -14
  9. package/components/SeriesGrid.js +8 -0
  10. package/components/SeriesGrid.mjs +89 -0
  11. package/components/SeriesTypeButton.js +8 -0
  12. package/components/SeriesTypeButton.mjs +30 -0
  13. package/components/SeriesTypesWrap.js +8 -0
  14. package/components/SeriesTypesWrap.mjs +14 -0
  15. package/components/panels/BarChartPanel.js +8 -0
  16. package/components/panels/BarChartPanel.mjs +71 -0
  17. package/components/panels/CategoryAxisPanel.js +8 -0
  18. package/components/panels/CategoryAxisPanel.mjs +315 -0
  19. package/components/panels/ChartAreaPanel.js +8 -0
  20. package/components/panels/ChartAreaPanel.mjs +200 -0
  21. package/components/panels/ColumnChartPanel.js +8 -0
  22. package/components/panels/ColumnChartPanel.mjs +77 -0
  23. package/components/panels/ConfigurationPanel.js +8 -0
  24. package/components/panels/ConfigurationPanel.mjs +102 -0
  25. package/components/panels/LegendPanel.js +8 -0
  26. package/components/panels/LegendPanel.mjs +190 -0
  27. package/components/panels/LineChartPanel.js +8 -0
  28. package/components/panels/LineChartPanel.mjs +74 -0
  29. package/components/panels/PieChartPanel.js +8 -0
  30. package/components/panels/PieChartPanel.mjs +47 -0
  31. package/components/panels/ScatterChartPanel.js +8 -0
  32. package/components/panels/ScatterChartPanel.mjs +47 -0
  33. package/components/panels/SeriesPanel.js +8 -0
  34. package/components/panels/SeriesPanel.mjs +110 -0
  35. package/components/panels/TitlePanel.js +8 -0
  36. package/components/panels/TitlePanel.mjs +172 -0
  37. package/components/panels/ValueAxisPanel.js +8 -0
  38. package/components/panels/ValueAxisPanel.mjs +332 -0
  39. package/dist/cdn/js/kendo-react-chart-wizard.js +1 -1
  40. package/grid-integration/get-wizard-data-from-grid-selection.js +1 -1
  41. package/grid-integration/get-wizard-data-from-grid-selection.mjs +4 -4
  42. package/index.d.mts +15 -194
  43. package/index.d.ts +15 -194
  44. package/index.js +1 -1
  45. package/index.mjs +8 -18
  46. package/messages.js +1 -1
  47. package/messages.mjs +109 -215
  48. package/package.json +15 -15
  49. package/types/export.js +8 -0
  50. package/types/export.mjs +39 -0
  51. package/utils.js +8 -0
  52. package/utils.mjs +81 -0
  53. package/SeriesGrid.js +0 -8
  54. package/SeriesGrid.mjs +0 -85
  55. package/chart-wizard-state.js +0 -8
  56. package/chart-wizard-state.mjs +0 -360
  57. package/export.js +0 -8
  58. package/export.mjs +0 -70
  59. /package/{SeriesGridCells.js → components/SeriesGridCells.js} +0 -0
  60. /package/{SeriesGridCells.mjs → components/SeriesGridCells.mjs} +0 -0
@@ -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"),o=require("@progress/kendo-react-charts"),y=l.forwardRef((E,p)=>{var a,n,i,c,s,m,b,f,u,C,g,h,d;const t=E.state;return l.createElement(o.Chart,{style:{width:"100%",height:"100%"},transitions:!1,ref:p},l.createElement(o.ChartTitle,{text:(a=t.title)==null?void 0:a.text,font:(n=t.title)==null?void 0:n.font,color:((i=t.title)==null?void 0:i.color)||"#000"}),l.createElement(o.ChartSubtitle,{text:(c=t.subtitle)==null?void 0:c.text,font:(s=t.subtitle)==null?void 0:s.font,color:((m=t.subtitle)==null?void 0:m.color)||"#000"}),l.createElement(o.ChartArea,{background:(b=t.area)==null?void 0:b.background,margin:t.area.margin}),t.categoryAxis&&l.createElement(o.ChartCategoryAxis,null,t.categoryAxis.map((e,r)=>l.createElement(o.ChartCategoryAxisItem,{key:r,categories:e.categories,title:e.title&&{text:e.title.text,font:e.title.font,color:e.title.color},labels:e.labels&&{font:e.labels.font,color:e.labels.color,rotation:e.labels.rotation},reverse:e.reverse}))),t.valueAxis&&l.createElement(o.ChartValueAxis,null,t.valueAxis.map((e,r)=>l.createElement(o.ChartValueAxisItem,{key:r,title:e.title&&{text:e.title.text,font:e.title.font,color:e.title.color},labels:e.labels&&{format:e.labels.format,font:e.labels.font,color:e.labels.color,rotation:e.labels.rotation}}))),l.createElement(o.ChartSeries,null,t.series.map((e,r)=>l.createElement(o.ChartSeriesItem,{key:String(e.name)+r,...e}))),l.createElement(o.ChartLegend,{visible:(f=t.legend)==null?void 0:f.visible,position:(u=t.legend)==null?void 0:u.position,labels:{color:((g=(C=t.legend)==null?void 0:C.labels)==null?void 0:g.color)||void 0,font:((d=(h=t.legend)==null?void 0:h.labels)==null?void 0:d.font)||void 0}}))});y.displayName="ChartComponent";exports.ChartComponent=y;
@@ -0,0 +1,69 @@
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 l from "react";
10
+ import { Chart as E, ChartTitle as y, ChartSubtitle as A, ChartArea as v, ChartCategoryAxis as k, ChartCategoryAxisItem as S, ChartValueAxis as I, ChartValueAxisItem as w, ChartSeries as R, ChartSeriesItem as V, ChartLegend as _ } from "@progress/kendo-react-charts";
11
+ const L = l.forwardRef((d, p) => {
12
+ var r, a, n, i, c, m, s, b, f, g, C, h, u;
13
+ const t = d.state;
14
+ return /* @__PURE__ */ l.createElement(E, { style: { width: "100%", height: "100%" }, transitions: !1, ref: p }, /* @__PURE__ */ l.createElement(y, { text: (r = t.title) == null ? void 0 : r.text, font: (a = t.title) == null ? void 0 : a.font, color: ((n = t.title) == null ? void 0 : n.color) || "#000" }), /* @__PURE__ */ l.createElement(
15
+ A,
16
+ {
17
+ text: (i = t.subtitle) == null ? void 0 : i.text,
18
+ font: (c = t.subtitle) == null ? void 0 : c.font,
19
+ color: ((m = t.subtitle) == null ? void 0 : m.color) || "#000"
20
+ }
21
+ ), /* @__PURE__ */ l.createElement(v, { background: (s = t.area) == null ? void 0 : s.background, margin: t.area.margin }), t.categoryAxis && /* @__PURE__ */ l.createElement(k, null, t.categoryAxis.map((e, o) => /* @__PURE__ */ l.createElement(
22
+ S,
23
+ {
24
+ key: o,
25
+ categories: e.categories,
26
+ title: e.title && {
27
+ text: e.title.text,
28
+ font: e.title.font,
29
+ color: e.title.color
30
+ },
31
+ labels: e.labels && {
32
+ font: e.labels.font,
33
+ color: e.labels.color,
34
+ rotation: e.labels.rotation
35
+ },
36
+ reverse: e.reverse
37
+ }
38
+ ))), t.valueAxis && /* @__PURE__ */ l.createElement(I, null, t.valueAxis.map((e, o) => /* @__PURE__ */ l.createElement(
39
+ w,
40
+ {
41
+ key: o,
42
+ title: e.title && {
43
+ text: e.title.text,
44
+ font: e.title.font,
45
+ color: e.title.color
46
+ },
47
+ labels: e.labels && {
48
+ format: e.labels.format,
49
+ font: e.labels.font,
50
+ color: e.labels.color,
51
+ rotation: e.labels.rotation
52
+ }
53
+ }
54
+ ))), /* @__PURE__ */ l.createElement(R, null, t.series.map((e, o) => /* @__PURE__ */ l.createElement(V, { key: String(e.name) + o, ...e }))), /* @__PURE__ */ l.createElement(
55
+ _,
56
+ {
57
+ visible: (b = t.legend) == null ? void 0 : b.visible,
58
+ position: (f = t.legend) == null ? void 0 : f.position,
59
+ labels: {
60
+ color: ((C = (g = t.legend) == null ? void 0 : g.labels) == null ? void 0 : C.color) || void 0,
61
+ font: ((u = (h = t.legend) == null ? void 0 : h.labels) == null ? void 0 : u.font) || void 0
62
+ }
63
+ }
64
+ ));
65
+ });
66
+ L.displayName = "ChartComponent";
67
+ export {
68
+ L as ChartComponent
69
+ };
@@ -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"),a=require("@progress/kendo-react-form"),l=require("@progress/kendo-react-labels"),r=require("../utils.js"),c=e=>t.createElement(a.FieldWrapper,{className:e.className},e.labelText&&e.editorId&&t.createElement(l.Label,{className:"k-form-label",editorId:e.editorId},e.labelText),t.createElement("div",{className:"k-form-field-wrap",onKeyDown:r.stopPropagation},e.children));exports.FormField=c;
@@ -0,0 +1,16 @@
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 t from "react";
10
+ import { FieldWrapper as a } from "@progress/kendo-react-form";
11
+ import { Label as l } from "@progress/kendo-react-labels";
12
+ import { stopPropagation as r } from "../utils.mjs";
13
+ const c = (e) => /* @__PURE__ */ t.createElement(a, { className: e.className }, e.labelText && e.editorId && /* @__PURE__ */ t.createElement(l, { className: "k-form-label", editorId: e.editorId }, e.labelText), /* @__PURE__ */ t.createElement("div", { className: "k-form-field-wrap", onKeyDown: r }, e.children));
14
+ export {
15
+ c as FormField
16
+ };
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-react-common");function d(o){const e=[];return o.forEach(r=>{const{dataItem:s,dataColumns:i}=r,a=[];i.forEach(t=>{a.push({field:t.title||t.field,value:n.getter(t.field)(s)})}),e.push(a)}),e}exports.getWizardDataFromDataRows=d;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),l=e=>t.createElement("fieldset",{className:"k-form-fieldset"},e.legend&&t.createElement("legend",{className:"k-form-legend"},e.legend),e.children);exports.FormFieldSet=l;
@@ -6,19 +6,8 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import { getter as f } from "@progress/kendo-react-common";
10
- function l(r) {
11
- const e = [];
12
- return r.forEach((o) => {
13
- const { dataItem: s, dataColumns: i } = o, a = [];
14
- i.forEach((t) => {
15
- a.push({
16
- field: t.title || t.field,
17
- value: f(t.field)(s)
18
- });
19
- }), e.push(a);
20
- }), e;
21
- }
9
+ import l from "react";
10
+ const n = (e) => /* @__PURE__ */ l.createElement("fieldset", { className: "k-form-fieldset" }, e.legend && /* @__PURE__ */ l.createElement("legend", { className: "k-form-legend" }, e.legend), e.children);
22
11
  export {
23
- l as getWizardDataFromDataRows
12
+ n as FormFieldSet
24
13
  };
@@ -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 n=require("react"),h=require("@progress/kendo-react-buttons"),o=require("@progress/kendo-react-grid"),D=require("@progress/kendo-react-intl"),I=require("@progress/kendo-svg-icons"),d=require("./SeriesGridCells.js"),x=require("../messages.js"),b=require("@progress/kendo-charts"),{messages:G}=b.ChartWizardCommon,s="inEdit",k=e=>{const[r,u]=n.useState(null),m=t=>{if(r===t)return;const a=e.data.slice(),i=a.findIndex(c=>c===r),l=a.findIndex(c=>c===t);a.splice(i,1),a.splice(l,0,r||a[0]),e.onChange.call(void 0,a)},C=t=>{u(t)},g=()=>{const t=e.initialData.find(a=>!e.data.find(i=>i.id===a.id));t&&e.onChange.call(void 0,[...e.data,t])},v=(t,a)=>{const i=e.data.map(l=>({...l,[s]:l.id===t.id?a:void 0}));e.onChange.call(void 0,i)},f=()=>{const t=e.data.map(a=>({...a,[s]:void 0}));e.onChange.call(void 0,t)},E=t=>{const a=t.field||"",i=e.data.map(l=>l.id===t.dataItem.id?{...l,[a]:t.value}:l);e.onChange.call(void 0,i)},S=t=>{const a=e.data.filter(i=>i.id!==t);e.onChange.call(void 0,a)};return n.createElement(d.RemoveSeriesContext.Provider,{value:{onRemove:S,count:e.data.length}},n.createElement(d.ReorderContext.Provider,{value:{reorder:m,dragStart:C}},n.createElement(d.SeriesEditContext.Provider,{value:{enterEdit:v,exitEdit:f}},n.createElement(o.Grid,{className:"k-series-grid",style:{width:"100%"},size:"medium",data:e.data,dataItemKey:"id",onItemChange:E,scrollable:"none",editField:s,cells:{headerCell:d.SeriesHeaderCell,data:d.SeriesDataCell,edit:{text:d.SeriesDataEditCell,boolean:d.SeriesDataEditCell,numeric:d.SeriesDataEditCell,date:d.SeriesDataEditCell}}},n.createElement(o.GridToolbar,null,n.createElement(h.Button,{type:"button",className:"k-toolbar-button",fillMode:"flat",onClick:g,disabled:e.data.length===e.initialData.length,svgIcon:I.plusIcon,icon:"plus"},D.useLocalization().toLanguageString(x.configurationSeriesAdd,G.configurationSeriesAdd))),n.createElement(o.GridColumn,{field:"reorder",width:"40px",editable:!1}),n.createElement(o.GridColumn,{field:"name",title:"Name"}),n.createElement(o.GridColumn,{field:"delete",width:"40px",editable:!1})))))};exports.SeriesGrid=k;
@@ -0,0 +1,89 @@
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 i from "react";
10
+ import { Button as x } from "@progress/kendo-react-buttons";
11
+ import { Grid as D, GridToolbar as I, GridColumn as c } from "@progress/kendo-react-grid";
12
+ import { useLocalization as S } from "@progress/kendo-react-intl";
13
+ import { plusIcon as b } from "@progress/kendo-svg-icons";
14
+ import { RemoveSeriesContext as w, ReorderContext as A, SeriesEditContext as G, SeriesHeaderCell as R, SeriesDataCell as k, SeriesDataEditCell as l } from "./SeriesGridCells.mjs";
15
+ import { configurationSeriesAdd as y } from "../messages.mjs";
16
+ import { ChartWizardCommon as z } from "@progress/kendo-charts";
17
+ const { messages: L } = z, m = "inEdit", M = (e) => {
18
+ const [o, s] = i.useState(null), f = (t) => {
19
+ if (o === t)
20
+ return;
21
+ const a = e.data.slice(), n = a.findIndex((r) => r === o), d = a.findIndex((r) => r === t);
22
+ a.splice(n, 1), a.splice(d, 0, o || a[0]), e.onChange.call(void 0, a);
23
+ }, u = (t) => {
24
+ s(t);
25
+ }, g = () => {
26
+ const t = e.initialData.find((a) => !e.data.find((n) => n.id === a.id));
27
+ t && e.onChange.call(void 0, [...e.data, t]);
28
+ }, v = (t, a) => {
29
+ const n = e.data.map((d) => ({
30
+ ...d,
31
+ [m]: d.id === t.id ? a : void 0
32
+ }));
33
+ e.onChange.call(void 0, n);
34
+ }, C = () => {
35
+ const t = e.data.map((a) => ({ ...a, [m]: void 0 }));
36
+ e.onChange.call(void 0, t);
37
+ }, h = (t) => {
38
+ const a = t.field || "", n = e.data.map((d) => d.id === t.dataItem.id ? { ...d, [a]: t.value } : d);
39
+ e.onChange.call(void 0, n);
40
+ }, E = (t) => {
41
+ const a = e.data.filter((n) => n.id !== t);
42
+ e.onChange.call(void 0, a);
43
+ };
44
+ return /* @__PURE__ */ i.createElement(w.Provider, { value: { onRemove: E, count: e.data.length } }, /* @__PURE__ */ i.createElement(A.Provider, { value: { reorder: f, dragStart: u } }, /* @__PURE__ */ i.createElement(G.Provider, { value: { enterEdit: v, exitEdit: C } }, /* @__PURE__ */ i.createElement(
45
+ D,
46
+ {
47
+ className: "k-series-grid",
48
+ style: { width: "100%" },
49
+ size: "medium",
50
+ data: e.data,
51
+ dataItemKey: "id",
52
+ onItemChange: h,
53
+ scrollable: "none",
54
+ editField: m,
55
+ cells: {
56
+ headerCell: R,
57
+ data: k,
58
+ edit: {
59
+ text: l,
60
+ boolean: l,
61
+ numeric: l,
62
+ date: l
63
+ }
64
+ }
65
+ },
66
+ /* @__PURE__ */ i.createElement(I, null, /* @__PURE__ */ i.createElement(
67
+ x,
68
+ {
69
+ type: "button",
70
+ className: "k-toolbar-button",
71
+ fillMode: "flat",
72
+ onClick: g,
73
+ disabled: e.data.length === e.initialData.length,
74
+ svgIcon: b,
75
+ icon: "plus"
76
+ },
77
+ S().toLanguageString(
78
+ y,
79
+ L.configurationSeriesAdd
80
+ )
81
+ )),
82
+ /* @__PURE__ */ i.createElement(c, { field: "reorder", width: "40px", editable: !1 }),
83
+ /* @__PURE__ */ i.createElement(c, { field: "name", title: "Name" }),
84
+ /* @__PURE__ */ i.createElement(c, { field: "delete", width: "40px", editable: !1 })
85
+ ))));
86
+ };
87
+ export {
88
+ M as SeriesGrid
89
+ };
@@ -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 c=require("react"),n=require("@progress/kendo-react-common"),l=e=>{const a=c.useCallback(t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),e.onClick.call(void 0))},[e.onClick]);return c.createElement("div",{className:n.classNames("k-icon-text-wrapper",{"k-selected":e.selected}),onClick:e.onClick},c.createElement("div",{className:"k-icon-background-area",tabIndex:0,onKeyDown:a},c.createElement(n.IconWrap,{name:e.iconName,icon:e.icon,size:"xlarge",className:"k-svg-i-chart-bar-clustered"})),e.children)};exports.SeriesTypeButton=l;
@@ -0,0 +1,30 @@
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 c from "react";
10
+ import { classNames as n, IconWrap as l } from "@progress/kendo-react-common";
11
+ const o = (e) => {
12
+ const t = c.useCallback(
13
+ (a) => {
14
+ (a.key === "Enter" || a.key === " ") && (a.preventDefault(), e.onClick.call(void 0));
15
+ },
16
+ [e.onClick]
17
+ );
18
+ return /* @__PURE__ */ c.createElement("div", { className: n("k-icon-text-wrapper", { "k-selected": e.selected }), onClick: e.onClick }, /* @__PURE__ */ c.createElement("div", { className: "k-icon-background-area", tabIndex: 0, onKeyDown: t }, /* @__PURE__ */ c.createElement(
19
+ l,
20
+ {
21
+ name: e.iconName,
22
+ icon: e.icon,
23
+ size: "xlarge",
24
+ className: "k-svg-i-chart-bar-clustered"
25
+ }
26
+ )), e.children);
27
+ };
28
+ export {
29
+ o as SeriesTypeButton
30
+ };
@@ -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 r=require("react"),t=require("../utils.js"),s=e=>r.createElement("div",{className:"k-chart-types-wrapper",onKeyDown:t.stopPropagation},e.children);exports.SeriesTypesWrap=s;
@@ -0,0 +1,14 @@
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 r from "react";
10
+ import { stopPropagation as t } from "../utils.mjs";
11
+ const p = (e) => /* @__PURE__ */ r.createElement("div", { className: "k-chart-types-wrapper", onKeyDown: t }, e.children);
12
+ export {
13
+ p as SeriesTypesWrap
14
+ };
@@ -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 B=require("react"),y=require("@progress/kendo-react-animation"),T=require("@progress/kendo-react-intl"),S=require("@progress/kendo-react-layout"),f=require("../SeriesTypesWrap.js"),i=require("../SeriesTypeButton.js"),t=require("../../utils.js"),c=require("../../messages.js"),l=require("@progress/kendo-svg-icons");function E(a){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(n,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return n.default=a,Object.freeze(n)}const r=E(B),q=a=>{const n=T.useLocalization(),e=a.state,s=e.seriesType,{isStackFalse:d,isStackNormal:g,isStack100:b}=t.stackState(e),[u,k]=r.useState(!0),m=r.useCallback(o=>{k(!o.expanded)},[]),p=()=>{a.onStateChange(t.mergeStates(e,t.createState(e.data,"bar")))},h=()=>{const o=t.mergeStates(e,t.createState(e.data,"bar"));a.onStateChange(t.updateState(o,t.ActionTypes.stacked,t.stackNormal))},C=()=>{const o=t.mergeStates(e,t.createState(e.data,"bar"));a.onStateChange(t.updateState(o,t.ActionTypes.stacked,t.stack100))};return r.createElement(S.ExpansionPanel,{style:{maxWidth:"576px"},title:n.toLanguageString(c.barChart,c.messages.barChart),expanded:u,tabIndex:0,onAction:m},r.createElement(y.Reveal,null,u&&r.createElement(S.ExpansionPanelContent,null,r.createElement(f.SeriesTypesWrap,null,r.createElement(i.SeriesTypeButton,{selected:s==="bar"&&d,onClick:p,icon:l.chartBarClusteredIcon,iconName:"chart-bar-clustered"},n.toLanguageString(c.barChartBar,c.messages.barChartBar)),r.createElement(i.SeriesTypeButton,{selected:s==="bar"&&g,onClick:h,icon:l.chartBarStackedIcon,iconName:"chart-bar-stacked"},n.toLanguageString(c.barChartStackedBar,c.messages.barChartStackedBar)),r.createElement(i.SeriesTypeButton,{selected:s==="bar"&&b,onClick:C,icon:l.chartBarStacked100Icon,iconName:"chart-bar-stacked100"},n.toLanguageString(c.barChart100StackedBar,c.messages.barChart100StackedBar))))))};exports.BarChartPanel=q;
@@ -0,0 +1,71 @@
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 x } from "@progress/kendo-react-animation";
11
+ import { useLocalization as E } from "@progress/kendo-react-intl";
12
+ import { ExpansionPanel as f, ExpansionPanelContent as y } from "@progress/kendo-react-layout";
13
+ import { SeriesTypesWrap as T } from "../SeriesTypesWrap.mjs";
14
+ import { SeriesTypeButton as s } from "../SeriesTypeButton.mjs";
15
+ import { stackState as L, mergeStates as i, createState as l, updateState as d, ActionTypes as S, stackNormal as N, stack100 as I } from "../../utils.mjs";
16
+ import { barChart as A, messages as c, barChartBar as P, barChartStackedBar as w, barChart100StackedBar as z } from "../../messages.mjs";
17
+ import { chartBarClusteredIcon as R, chartBarStackedIcon as W, chartBarStacked100Icon as v } from "@progress/kendo-svg-icons";
18
+ const M = (r) => {
19
+ const n = E(), t = r.state, o = t.seriesType, { isStackFalse: h, isStackNormal: k, isStack100: p } = L(t), [m, C] = e.useState(!0), b = e.useCallback((a) => {
20
+ C(!a.expanded);
21
+ }, []), g = () => {
22
+ r.onStateChange(i(t, l(t.data, "bar")));
23
+ }, u = () => {
24
+ const a = i(t, l(t.data, "bar"));
25
+ r.onStateChange(d(a, S.stacked, N));
26
+ }, B = () => {
27
+ const a = i(t, l(t.data, "bar"));
28
+ r.onStateChange(d(a, S.stacked, I));
29
+ };
30
+ return /* @__PURE__ */ e.createElement(
31
+ f,
32
+ {
33
+ style: { maxWidth: "576px" },
34
+ title: n.toLanguageString(A, c.barChart),
35
+ expanded: m,
36
+ tabIndex: 0,
37
+ onAction: b
38
+ },
39
+ /* @__PURE__ */ e.createElement(x, null, m && /* @__PURE__ */ e.createElement(y, null, /* @__PURE__ */ e.createElement(T, null, /* @__PURE__ */ e.createElement(
40
+ s,
41
+ {
42
+ selected: o === "bar" && h,
43
+ onClick: g,
44
+ icon: R,
45
+ iconName: "chart-bar-clustered"
46
+ },
47
+ n.toLanguageString(P, c.barChartBar)
48
+ ), /* @__PURE__ */ e.createElement(
49
+ s,
50
+ {
51
+ selected: o === "bar" && k,
52
+ onClick: u,
53
+ icon: W,
54
+ iconName: "chart-bar-stacked"
55
+ },
56
+ n.toLanguageString(w, c.barChartStackedBar)
57
+ ), /* @__PURE__ */ e.createElement(
58
+ s,
59
+ {
60
+ selected: o === "bar" && p,
61
+ onClick: B,
62
+ icon: v,
63
+ iconName: "chart-bar-stacked100"
64
+ },
65
+ n.toLanguageString(z, c.barChart100StackedBar)
66
+ ))))
67
+ );
68
+ };
69
+ export {
70
+ M as BarChartPanel
71
+ };
@@ -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"),f=require("@progress/kendo-react-layout"),P=require("@progress/kendo-react-form"),b=require("../FormFieldSet.js"),g=require("../FormField.js"),c=require("@progress/kendo-react-inputs"),e=require("../../utils.js"),a=require("../../messages.js"),N=require("@progress/kendo-react-intl"),q=require("@progress/kendo-react-animation"),m=require("@progress/kendo-react-dropdowns"),w=i=>{var x,u,C,y,A;const r=N.useLocalization(),o=i.state,S=o.seriesType,[d,F]=t.useState(!1),L=t.useCallback(l=>{F(!l.expanded)},[]),T=t.useCallback(l=>{i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisTitleText,l.target.value))},[o]),h=t.useCallback(l=>{const n=l.target.value||e.nullItem;e.ensureValue(n)&&i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisTitleFontSize,n.value))},[o]),p=t.useCallback(l=>{const n=l.target.value||e.nullItem;i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisTitleFontName,n.value))},[o]),v=t.useCallback(l=>{i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisTitleColor,l.value))},[o]),k=t.useCallback(l=>{const n=l.target.value||e.nullItem;e.ensureValue(n)&&i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisLabelsFontSize,n.value))},[o]),E=t.useCallback(l=>{const n=l.target.value||e.nullItem;i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisLabelsFontName,n.value))},[o]),z=t.useCallback(l=>{i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisLabelsColor,l.value))},[o]),R=t.useCallback(l=>{i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisLabelsRotation,l.target.value))},[o]),I=t.useCallback(l=>{i.onStateChange(e.updateState(o,e.ActionTypes.categoryAxisReverseOrder,l.value))},[o]);return t.createElement(f.ExpansionPanel,{style:{maxWidth:"576px"},title:S==="scatter"?r.toLanguageString(a.formatXAxis,a.messages.formatXAxis):r.toLanguageString(a.formatCategoryAxis,a.messages.formatCategoryAxis),expanded:d,tabIndex:0,onAction:L},t.createElement(q.Reveal,null,d&&t.createElement(f.ExpansionPanelContent,null,t.createElement(P.FormElement,{onKeyDown:e.stopPropagation},t.createElement(b.FormFieldSet,{legend:r.toLanguageString(a.formatCategoryAxisTitle,a.messages.formatCategoryAxisTitle)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(g.FormField,{className:"k-col-span-2"},t.createElement(c.Input,{placeholder:r.toLanguageString(a.formatCategoryAxisTitlePlaceholder,a.messages.formatCategoryAxisTitlePlaceholder),value:((x=o.categoryAxis[0].title)==null?void 0:x.text)||"",onChange:T})),t.createElement(g.FormField,{className:"k-col-span-2",editorId:"categoryAxisTitleFont",labelText:r.toLanguageString(a.formatCategoryAxisTitleFont,a.messages.formatCategoryAxisTitleFont)},t.createElement(m.ComboBox,{id:"categoryAxisTitleFont",data:e.fontNames,textField:"text",dataItemKey:"value",itemRender:e.itemRender,placeholder:r.toLanguageString(a.formatCategoryAxisTitleFontPlaceholder,a.messages.formatCategoryAxisTitleFontPlaceholder),value:e.fontNames.find(l=>{var n,s;return l.value===((s=e.parseFont(((n=o.categoryAxis[0].title)==null?void 0:n.font)||""))==null?void 0:s.name)})||e.nullItem,onChange:p,...e.dropdownlistCommonProps})),t.createElement(g.FormField,{editorId:"categoryAxisTitleFontSize",labelText:r.toLanguageString(a.formatCategoryAxisTitleSize,a.messages.formatCategoryAxisTitleSize)},t.createElement(m.ComboBox,{id:"categoryAxisTitleFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:r.toLanguageString(a.formatCategoryAxisTitleSizePlaceholder,a.messages.formatCategoryAxisTitleSizePlaceholder),value:e.fontSizes.find(l=>{var n,s;return l.value===((s=e.parseFont(((n=o.categoryAxis[0].title)==null?void 0:n.font)||""))==null?void 0:s.size)})||e.nullItem,onChange:h,allowCustom:!0,...e.dropdownlistCommonProps})),t.createElement(g.FormField,{editorId:"categoryAxisTitleColor",labelText:r.toLanguageString(a.formatCategoryAxisTitleColor,a.messages.formatCategoryAxisTitleColor)},t.createElement(c.ColorPicker,{id:"categoryAxisTitleColor",view:"gradient",value:((u=o.categoryAxis[0].title)==null?void 0:u.color)||"",onChange:v,fillMode:"outline"})))),t.createElement(b.FormFieldSet,{legend:r.toLanguageString(a.formatCategoryAxisLabels,a.messages.formatCategoryAxisLabels)},t.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-2 k-gap-x-4"},t.createElement(g.FormField,{className:"k-col-span-2",editorId:"categoryAxisLabelsFont",labelText:r.toLanguageString(a.formatCategoryAxisLabelsFont,a.messages.formatCategoryAxisLabelsFont)},t.createElement(m.ComboBox,{id:"categoryAxisLabelsFont",data:e.fontNames,textField:"text",dataItemKey:"value",placeholder:r.toLanguageString(a.formatCategoryAxisLabelsFontPlaceholder,a.messages.formatCategoryAxisLabelsFontPlaceholder),value:e.fontNames.find(l=>{var n,s;return l.value===((s=e.parseFont(((n=o.categoryAxis[0].labels)==null?void 0:n.font)||""))==null?void 0:s.name)})||e.nullItem,onChange:E,itemRender:e.itemRender,...e.dropdownlistCommonProps})),t.createElement(g.FormField,{editorId:"categoryAxisLabelsFontSize",labelText:r.toLanguageString(a.formatCategoryAxisLabelsSize,a.messages.formatCategoryAxisLabelsSize)},t.createElement(m.ComboBox,{id:"categoryAxisLabelsFontSize",data:e.fontSizes,textField:"text",dataItemKey:"value",placeholder:r.toLanguageString(a.formatCategoryAxisLabelsSizePlaceholder,a.messages.formatCategoryAxisLabelsSizePlaceholder),value:e.fontSizes.find(l=>{var n,s;return l.value===((s=e.parseFont(((n=o.categoryAxis[0].labels)==null?void 0:n.font)||""))==null?void 0:s.size)})||e.nullItem,onChange:k,allowCustom:!0,...e.dropdownlistCommonProps})),t.createElement(g.FormField,{editorId:"categoryAxisLabelsColor",labelText:r.toLanguageString(a.formatCategoryAxisLabelsColor,a.messages.formatCategoryAxisLabelsColor)},t.createElement(c.ColorPicker,{id:"categoryAxisLabelsColor",view:"gradient",value:((C=o.categoryAxis[0].labels)==null?void 0:C.color)||"",onChange:z,fillMode:"outline"})),t.createElement(g.FormField,{editorId:"categoryAxisLabelsRotation",labelText:r.toLanguageString(a.formatCategoryAxisLabelsRotation,a.messages.formatCategoryAxisLabelsRotation)},t.createElement(c.NumericTextBox,{id:"categoryAxisLabelsRotation",value:typeof((y=o.categoryAxis[0].labels)==null?void 0:y.rotation)=="number"?(A=o.categoryAxis[0].labels)==null?void 0:A.rotation:null,placeholder:r.toLanguageString(a.formatCategoryAxisLabelsRotationAuto,a.messages.formatCategoryAxisLabelsRotationAuto),onChange:R,fillMode:"outline",min:-360,max:360,step:1})),t.createElement(g.FormField,{className:"k-col-span-2"},t.createElement(c.Checkbox,{label:r.toLanguageString(a.formatCategoryAxisLabelsReverseOrder,a.messages.formatCategoryAxisLabelsReverseOrder),checked:o.categoryAxis[0].reverse||!1,onChange:I}))))))))};exports.CategoryAxisPanel=w;