diff --git a/package.json b/package.json index 9c8cf17118..3d2156e20c 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,8 @@ "jest-environment-jsdom": "^29.7.0", "json5@1.x": ">=1.0.2", "json5@0.x": ">=1.0.2", - "@codemirror/view": "^6.34.2", + "@codemirror/view": "^6.38.1", + "@codemirror/state": "^6.5.2", "enzyme>cheerio": "1.0.0-rc.10", "ts-node": "10.9.2", "react-big-calendar@1>clsx": "2.1.0" diff --git a/packages/pluggableWidgets/area-chart-web/CHANGELOG.md b/packages/pluggableWidgets/area-chart-web/CHANGELOG.md index 31c64e4597..0200e8f191 100644 --- a/packages/pluggableWidgets/area-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/area-chart-web/CHANGELOG.md @@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] - 2025-06-03 +## [6.1.1] - 2025-07-15 + +### Changed + +- We updated shared charts dependency. + +## [6.1.0] - 2025-06-04 ### Fixed diff --git a/packages/pluggableWidgets/area-chart-web/package.json b/packages/pluggableWidgets/area-chart-web/package.json index cfe7b1c2f7..6072320230 100644 --- a/packages/pluggableWidgets/area-chart-web/package.json +++ b/packages/pluggableWidgets/area-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/area-chart-web", "widgetName": "AreaChart", - "version": "6.2.0", + "version": "6.1.1", "description": "An area chart displays a solid color between the traces of a graph.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0.2965", "appName": "Area Chart" }, "testProject": { diff --git a/packages/pluggableWidgets/area-chart-web/src/package.xml b/packages/pluggableWidgets/area-chart-web/src/package.xml index 0929537270..6248233e6f 100644 --- a/packages/pluggableWidgets/area-chart-web/src/package.xml +++ b/packages/pluggableWidgets/area-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md b/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md index 4c2e228426..d7373f934b 100644 --- a/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/bar-chart-web/CHANGELOG.md @@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] - 2025-06-03 +## [6.1.1] - 2025-07-15 + +### Changed + +- We updated shared charts dependency. + +## [6.1.0] - 2025-06-04 ### Fixed diff --git a/packages/pluggableWidgets/bar-chart-web/package.json b/packages/pluggableWidgets/bar-chart-web/package.json index 396c217930..7e2956c529 100644 --- a/packages/pluggableWidgets/bar-chart-web/package.json +++ b/packages/pluggableWidgets/bar-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/bar-chart-web", "widgetName": "BarChart", - "version": "6.2.0", + "version": "6.1.1", "description": "Shows difference between the data points for one or more categories.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0.2965", "appName": "Bar Chart" }, "testProject": { diff --git a/packages/pluggableWidgets/bar-chart-web/src/package.xml b/packages/pluggableWidgets/bar-chart-web/src/package.xml index 687257e3a7..bfe0b65836 100644 --- a/packages/pluggableWidgets/bar-chart-web/src/package.xml +++ b/packages/pluggableWidgets/bar-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md b/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md index e3b816fac4..9e9278a0ad 100644 --- a/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/bubble-chart-web/CHANGELOG.md @@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] - 2025-06-03 +## [6.1.1] - 2025-07-15 + +### Changed + +- We updated shared charts dependency. + +## [6.1.0] - 2025-06-04 ### Fixed diff --git a/packages/pluggableWidgets/bubble-chart-web/package.json b/packages/pluggableWidgets/bubble-chart-web/package.json index 055276a8d6..cedd52e2f2 100644 --- a/packages/pluggableWidgets/bubble-chart-web/package.json +++ b/packages/pluggableWidgets/bubble-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/bubble-chart-web", "widgetName": "BubbleChart", - "version": "6.2.0", + "version": "6.1.1", "description": "Shows data in a bubble format graph.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0.2965", "appName": "Bubble Chart" }, "testProject": { diff --git a/packages/pluggableWidgets/bubble-chart-web/src/package.xml b/packages/pluggableWidgets/bubble-chart-web/src/package.xml index 118cdd6a80..7e74f83a85 100644 --- a/packages/pluggableWidgets/bubble-chart-web/src/package.xml +++ b/packages/pluggableWidgets/bubble-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/chart-playground-web/CHANGELOG.md b/packages/pluggableWidgets/chart-playground-web/CHANGELOG.md index 2299c110d3..a2a108b4c6 100644 --- a/packages/pluggableWidgets/chart-playground-web/CHANGELOG.md +++ b/packages/pluggableWidgets/chart-playground-web/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [2.0.1] - 2025-07-15 + +### Changed + +- We updated shared charts dependency. + ## [2.0.0] - 2025-02-28 ### Changed diff --git a/packages/pluggableWidgets/chart-playground-web/package.json b/packages/pluggableWidgets/chart-playground-web/package.json index b7437c73df..33564aa468 100644 --- a/packages/pluggableWidgets/chart-playground-web/package.json +++ b/packages/pluggableWidgets/chart-playground-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/chart-playground-web", "widgetName": "ChartPlayground", - "version": "2.0.0", + "version": "2.0.1", "description": "A small playground widget for charts", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", diff --git a/packages/pluggableWidgets/chart-playground-web/src/package.xml b/packages/pluggableWidgets/chart-playground-web/src/package.xml index d4b762fbec..ab684e5183 100644 --- a/packages/pluggableWidgets/chart-playground-web/src/package.xml +++ b/packages/pluggableWidgets/chart-playground-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/charts-web/CHANGELOG.md b/packages/pluggableWidgets/charts-web/CHANGELOG.md index 380d19f3e3..3cd7455063 100644 --- a/packages/pluggableWidgets/charts-web/CHANGELOG.md +++ b/packages/pluggableWidgets/charts-web/CHANGELOG.md @@ -6,51 +6,103 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] Charts - 2025-06-03 +## [6.1.2] Charts - 2025-09-22 -### [6.2.0] AreaChart +### [1.1.2] CustomChart #### Fixed -- We fixed an issue with aggregate being removed on plotly 3.0 +- We fixed an issue where event data attribute wouldn't successfully get its value set. + +## [6.1.1] Charts - 2025-07-15 + +### [6.1.1] AreaChart + +#### Changed + +- We updated shared charts dependency. + +### [6.1.1] BarChart + +#### Changed + +- We updated shared charts dependency. -### [6.2.0] BarChart +### [6.1.1] BubbleChart + +#### Changed + +- We updated shared charts dependency. + +### [6.1.1] ColumnChart + +#### Changed + +- We updated shared charts dependency. + +### [1.1.1] CustomChart #### Fixed -- We fixed an issue with aggregate being removed on plotly 3.0 +- We fixed an issue with incorrect parsing and merging of layout and data properties. + +### [6.1.1] HeatMap -### [6.2.0] BubbleChart +#### Fixed + +- We fixed on click events by correctly adding datasource. + +### [6.1.1] PieChart + +#### Changed + +- We updated shared charts dependency. + +### [6.1.1] TimeSeries + +#### Changed + +- We updated shared charts dependency. + +### [2.0.1] ChartPlayground + +#### Changed + +- We updated shared charts dependency. + +## [6.1.0] Charts - 2025-06-04 + +### [6.1.0] AreaChart #### Fixed - We fixed an issue with aggregate being removed on plotly 3.0 -### [6.2.0] ColumnChart +### [6.1.0] BarChart #### Fixed - We fixed an issue with aggregate being removed on plotly 3.0 -### [1.2.0] CustomChart +### [6.1.0] BubbleChart -#### Changed +#### Fixed -- We increase the version to update shared code. +- We fixed an issue with aggregate being removed on plotly 3.0 -### [6.2.0] LineChart +### [6.1.0] ColumnChart #### Fixed - We fixed an issue with aggregate being removed on plotly 3.0 -### [6.2.0] PieChart +### [1.1.0] CustomChart #### Changed - We increase the version to update shared code. -### [6.2.0] TimeSeries +### [6.1.0] TimeSeries #### Fixed diff --git a/packages/pluggableWidgets/charts-web/package.json b/packages/pluggableWidgets/charts-web/package.json index 8ab734d550..518de4a1d7 100644 --- a/packages/pluggableWidgets/charts-web/package.json +++ b/packages/pluggableWidgets/charts-web/package.json @@ -1,6 +1,6 @@ { "name": "@mendix/charts-web", - "version": "6.2.0", + "version": "6.1.2", "description": "Chart widgets collection for data visualization", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -28,7 +28,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "10.6.0.23934", + "minimumMXVersion": "9.24.0.2965", "appNumber": 105695, "appName": "Charts", "reactReady": true diff --git a/packages/pluggableWidgets/charts-web/src/package.xml b/packages/pluggableWidgets/charts-web/src/package.xml index 3291946680..a26f540bbb 100644 --- a/packages/pluggableWidgets/charts-web/src/package.xml +++ b/packages/pluggableWidgets/charts-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/column-chart-web/CHANGELOG.md b/packages/pluggableWidgets/column-chart-web/CHANGELOG.md index 0376ce0467..9cb4ea357c 100644 --- a/packages/pluggableWidgets/column-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/column-chart-web/CHANGELOG.md @@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] - 2025-06-03 +## [6.1.1] - 2025-07-15 + +### Changed + +- We updated shared charts dependency. + +## [6.1.0] - 2025-06-04 ### Fixed diff --git a/packages/pluggableWidgets/column-chart-web/package.json b/packages/pluggableWidgets/column-chart-web/package.json index 9d22a35101..f6075687ae 100644 --- a/packages/pluggableWidgets/column-chart-web/package.json +++ b/packages/pluggableWidgets/column-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/column-chart-web", "widgetName": "ColumnChart", - "version": "6.2.0", + "version": "6.1.1", "description": "Shows data in a column format graph.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0.2965", "appName": "Column Chart" }, "testProject": { diff --git a/packages/pluggableWidgets/column-chart-web/src/package.xml b/packages/pluggableWidgets/column-chart-web/src/package.xml index 543022649e..7f6b2de5a5 100644 --- a/packages/pluggableWidgets/column-chart-web/src/package.xml +++ b/packages/pluggableWidgets/column-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/custom-chart-web/CHANGELOG.md b/packages/pluggableWidgets/custom-chart-web/CHANGELOG.md index 0d53035801..1fac626c38 100644 --- a/packages/pluggableWidgets/custom-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/custom-chart-web/CHANGELOG.md @@ -6,7 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [1.2.0] - 2025-06-03 +## [1.1.2] - 2025-09-22 + +### Fixed + +- We fixed an issue where event data attribute wouldn't successfully get its value set. + +## [1.1.1] - 2025-07-15 + +### Fixed + +- We fixed an issue with incorrect parsing and merging of layout and data properties. + +## [1.1.0] - 2025-06-04 ### Changed diff --git a/packages/pluggableWidgets/custom-chart-web/package.json b/packages/pluggableWidgets/custom-chart-web/package.json index 5915b281ea..95ee4e607d 100644 --- a/packages/pluggableWidgets/custom-chart-web/package.json +++ b/packages/pluggableWidgets/custom-chart-web/package.json @@ -1,8 +1,8 @@ { "name": "@mendix/custom-chart-web", "widgetName": "CustomChart", - "version": "1.2.0", - "description": "", + "version": "1.1.2", + "description": "Create customizable charts with Plotly.js for advanced visualization needs", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", "repository": { @@ -20,7 +20,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "10.16.0", + "minimumMXVersion": "9.24.0.2965", "appNumber": 1234, "appName": "Custom chart" }, @@ -39,7 +39,7 @@ "publish-marketplace": "rui-publish-marketplace", "release": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pluggable-widgets-tools release:web", "start": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pluggable-widgets-tools start:server", - "test": "echo 'FIXME: Finish custom-chart-web unit test migration'", + "test": "pluggable-widgets-tools test:unit:web:enzyme-free", "update-changelog": "rui-update-changelog-widget", "verify": "rui-verify-package-format" }, diff --git a/packages/pluggableWidgets/custom-chart-web/src/__tests__/__snapshots__/mergeChartProps.spec.ts.snap b/packages/pluggableWidgets/custom-chart-web/src/__tests__/__snapshots__/mergeChartProps.spec.ts.snap new file mode 100644 index 0000000000..dae080df89 --- /dev/null +++ b/packages/pluggableWidgets/custom-chart-web/src/__tests__/__snapshots__/mergeChartProps.spec.ts.snap @@ -0,0 +1,71 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`mergeChartProps utility function Data merging behavior should only process traces that exist in chart props 1`] = `[]`; + +exports[`mergeChartProps utility function Data merging behavior should preserve original trace data when editor state has missing or falsy entries 1`] = `[]`; + +exports[`mergeChartProps utility function Edge cases should handle empty chart props data 1`] = `[]`; + +exports[`mergeChartProps utility function Edge cases should handle falsy values in editor state data without warnings 1`] = `[]`; + +exports[`mergeChartProps utility function Edge cases should handle null JSON parsing 1`] = `[]`; + +exports[`mergeChartProps utility function Edge cases should handle various malformed JSON types 1`] = ` +[ + [ + "Editor props for trace(1) is not a valid JSON:{invalid json}", + ], + [ + "Please make sure the props is a valid JSON string.", + ], + [ + "Editor props for trace(3) is not a valid JSON:undefined", + ], + [ + "Please make sure the props is a valid JSON string.", + ], +] +`; + +exports[`mergeChartProps utility function JSON parsing failures generate console warnings should handle mixed valid and invalid JSON 1`] = ` +[ + [ + "Editor props for trace(1) is not a valid JSON:invalid json", + ], + [ + "Please make sure the props is a valid JSON string.", + ], +] +`; + +exports[`mergeChartProps utility function JSON parsing failures generate console warnings should not warn for valid JSON 1`] = `[]`; + +exports[`mergeChartProps utility function JSON parsing failures generate console warnings should not warn when editor state has undefined entries 1`] = `[]`; + +exports[`mergeChartProps utility function JSON parsing failures generate console warnings should warn for invalid JSON in editor state data 1`] = ` +[ + [ + "Editor props for trace(0) is not a valid JSON:invalid json", + ], + [ + "Please make sure the props is a valid JSON string.", + ], +] +`; + +exports[`mergeChartProps utility function JSON parsing failures generate console warnings should warn for multiple invalid JSON entries 1`] = ` +[ + [ + "Editor props for trace(0) is not a valid JSON:invalid json", + ], + [ + "Please make sure the props is a valid JSON string.", + ], + [ + "Editor props for trace(1) is not a valid JSON:{broken: json}", + ], + [ + "Please make sure the props is a valid JSON string.", + ], +] +`; diff --git a/packages/pluggableWidgets/custom-chart-web/src/__tests__/mergeChartProps.spec.ts b/packages/pluggableWidgets/custom-chart-web/src/__tests__/mergeChartProps.spec.ts new file mode 100644 index 0000000000..222bd5adbe --- /dev/null +++ b/packages/pluggableWidgets/custom-chart-web/src/__tests__/mergeChartProps.spec.ts @@ -0,0 +1,402 @@ +import { EditorStoreState } from "@mendix/shared-charts/main"; +import { ChartProps } from "../components/PlotlyChart"; +import { mergeChartProps } from "../utils/utils"; + +// Mock console.warn to capture warnings +let consoleWarnSpy: jest.SpyInstance; +let consoleMockCalls: string[][]; + +beforeEach(() => { + consoleMockCalls = []; + consoleWarnSpy = jest.spyOn(console, "warn").mockImplementation((...args: any[]) => { + consoleMockCalls.push(args.map(arg => String(arg))); + }); +}); + +afterEach(() => { + consoleWarnSpy.mockRestore(); +}); + +describe("mergeChartProps utility function", () => { + describe("JSON parsing failures generate console warnings", () => { + it("should warn for invalid JSON in editor state data", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1, 2], y: [3, 4], type: "scatter" }], + layout: { title: "Test Chart" }, + config: { displayModeBar: false }, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: ["invalid json"] + }; + + // Act + mergeChartProps(chartProps, editorState); + + // Assert + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should warn for multiple invalid JSON entries", () => { + // Arrange + const chartProps: ChartProps = { + data: [ + { x: [1], y: [2], type: "scatter" }, + { x: [3], y: [4], type: "bar" } + ], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: ["invalid json", "{broken: json}"] + }; + + // Act + mergeChartProps(chartProps, editorState); + + // Assert + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should not warn when editor state has undefined entries", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1], y: [2], type: "scatter" }], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: [] // Empty array, so data[0] will be undefined + }; + + // Act + mergeChartProps(chartProps, editorState); + + // Assert + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should not warn for valid JSON", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1], y: [2], type: "scatter" }], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: ['{"marker": {"color": "red"}}'] + }; + + // Act + mergeChartProps(chartProps, editorState); + + // Assert + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should handle mixed valid and invalid JSON", () => { + // Arrange + const chartProps: ChartProps = { + data: [ + { x: [1], y: [2], type: "scatter" }, + { x: [3], y: [4], type: "bar" }, + { x: [5], y: [6], type: "scatter" as const } + ], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: [ + '{"marker": {"color": "red"}}', // Valid + "invalid json", // Invalid + '{"marker": {"color": "blue"}}' // Valid + ] + }; + + // Act + mergeChartProps(chartProps, editorState); + + // Assert + expect(consoleMockCalls).toMatchSnapshot(); + }); + }); + + describe("Data merging behavior", () => { + it("should merge valid editor state data with chart props", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1, 2], y: [3, 4], type: "scatter", name: "original" }], + layout: { title: "Original Title" }, + config: { displayModeBar: true }, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: '{"title": "Modified Title"}', + config: '{"displayModeBar": false}', + data: ['{"marker": {"color": "red"}, "name": "modified"}'] + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert + expect(result.data[0]).toEqual({ + x: [1, 2], + y: [3, 4], + type: "scatter", + name: "modified", // Overridden by editor state + marker: { color: "red" } // Added by editor state + }); + expect(result.layout.title).toBe("Modified Title"); + expect(result.config.displayModeBar).toBe(false); + }); + + it("should use empty object for invalid JSON entries", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1], y: [2], type: "scatter", name: "original" }], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: ["invalid json"] + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert + expect(result.data[0]).toEqual({ + x: [1], + y: [2], + type: "scatter", + name: "original" // Original properties preserved + }); + }); + + it("should only process traces that exist in chart props", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1], y: [2], type: "scatter" }], // Only 1 trace + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: [ + '{"marker": {"color": "red"}}', // Will be processed + '{"marker": {"color": "blue"}}', // Will be ignored + "invalid json" // Will be ignored + ] + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert + expect(result.data).toHaveLength(1); // Only 1 trace in result + expect(result.data[0]).toEqual({ + x: [1], + y: [2], + type: "scatter", + marker: { color: "red" } + }); + expect(consoleMockCalls).toMatchSnapshot(); // No warnings for ignored entries + }); + + it("should preserve original trace data when editor state has missing or falsy entries", () => { + // Arrange + const chartProps: ChartProps = { + data: [ + { x: [1], y: [1], type: "scatter", name: "original1", marker: { color: "blue" } }, + { x: [2], y: [2], type: "bar", name: "original2" }, + { x: [3], y: [3], type: "scatter", name: "original3" } + ], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: [""] // Only one entry (empty string), so traces 1 and 2 will get undefined + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert - All original trace data should be preserved + expect(result.data[0]).toEqual({ + x: [1], + y: [1], + type: "scatter", + name: "original1", + marker: { color: "blue" } + }); + expect(result.data[1]).toEqual({ x: [2], y: [2], type: "bar", name: "original2" }); + expect(result.data[2]).toEqual({ x: [3], y: [3], type: "scatter", name: "original3" }); + expect(consoleMockCalls).toMatchSnapshot(); + }); + }); + + describe("Edge cases", () => { + it("should handle empty chart props data", () => { + // Arrange + const chartProps: ChartProps = { + data: [], // No traces + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: ["invalid json"] // Will be ignored + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert + expect(result.data).toHaveLength(0); + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should handle null JSON parsing", () => { + // Arrange + const chartProps: ChartProps = { + data: [{ x: [1], y: [2], type: "scatter" }], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: ["null"] // Valid JSON that parses to null + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert + expect(result.data[0]).toEqual({ + x: [1], + y: [2], + type: "scatter" + // null gets merged, but doesn't add properties + }); + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should handle various malformed JSON types", () => { + // Arrange + const chartProps: ChartProps = { + data: [ + { x: [1], y: [1], type: "scatter" }, + { x: [2], y: [2], type: "bar" }, + { x: [3], y: [3], type: "scatter" as const }, + { x: [4], y: [4], type: "scatter" } + ], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: [ + '{"valid": "json"}', // Valid + "{invalid json}", // Invalid + "", // Invalid empty string - treated as falsy, early return + "undefined" // Invalid + ] + }; + + // Act + mergeChartProps(chartProps, editorState); + + // Assert + expect(consoleMockCalls).toMatchSnapshot(); + }); + + it("should handle falsy values in editor state data without warnings", () => { + // Arrange + const chartProps: ChartProps = { + data: [ + { x: [1], y: [1], type: "scatter", name: "trace1" }, + { x: [2], y: [2], type: "bar", name: "trace2" }, + { x: [3], y: [3], type: "scatter", name: "trace3" } + ], + layout: {}, + config: {}, + width: 800, + height: 600 + }; + + const editorState: EditorStoreState = { + layout: "{}", + config: "{}", + data: [ + "", // Empty string - falsy + null as any, // null - falsy + undefined as any // undefined - falsy + ] + }; + + // Act + const result = mergeChartProps(chartProps, editorState); + + // Assert - No warnings should be generated for falsy values + expect(consoleMockCalls).toMatchSnapshot(); + // Original traces should be returned unchanged + expect(result.data[0]).toEqual({ x: [1], y: [1], type: "scatter", name: "trace1" }); + expect(result.data[1]).toEqual({ x: [2], y: [2], type: "bar", name: "trace2" }); + expect(result.data[2]).toEqual({ x: [3], y: [3], type: "scatter", name: "trace3" }); + }); + }); +}); diff --git a/packages/pluggableWidgets/custom-chart-web/src/controllers/ChartPropsController.ts b/packages/pluggableWidgets/custom-chart-web/src/controllers/ChartPropsController.ts index 522aab94ae..7bd9b99af0 100644 --- a/packages/pluggableWidgets/custom-chart-web/src/controllers/ChartPropsController.ts +++ b/packages/pluggableWidgets/custom-chart-web/src/controllers/ChartPropsController.ts @@ -4,7 +4,7 @@ import { executeAction } from "@mendix/widget-plugin-platform/framework/execute- import { makeAutoObservable } from "mobx"; import { Config, Data, Layout } from "plotly.js-dist-min"; import { ChartProps } from "../components/PlotlyChart"; -import { parseConfig, parseData, parseLayout } from "../utils/utils"; +import { parseConfig, parseData, parseLayout, mergeChartProps } from "../utils/utils"; import { ControllerProps } from "./typings"; interface SizeProvider { @@ -125,10 +125,9 @@ export class ChartPropsController implements ReactiveController { private get chartOnClick(): (data: any) => void { return (data: any): void => { if (this.props.eventDataAttribute) { - this.props.eventDataAttribute?.setValue(JSON.stringify(data.points[0].bbox)); - } else { - executeAction(this.props.onClick); + this.props.eventDataAttribute.setValue(JSON.stringify(data.points[0].bbox)); } + executeAction(this.props.onClick); }; } @@ -158,29 +157,6 @@ export class ChartPropsController implements ReactiveController { get mergedProps(): ChartProps { const props = this.chartProps; const state = this.editorStateGate.props; - return { - ...props, - config: { - ...props.config, - ...parseConfig(state.config) - }, - layout: { - ...props.layout, - ...parseLayout(state.layout) - }, - data: props.data.map((trace, index) => { - let stateTrace: Data; - try { - stateTrace = JSON.parse(state.data[index]); - } catch { - console.warn(`Failed to parse data for trace(${index})`); - stateTrace = {}; - } - return { - ...trace, - ...stateTrace - } as Data; - }) - }; + return mergeChartProps(props, state); } } diff --git a/packages/pluggableWidgets/custom-chart-web/src/hooks/useCustomChart.ts b/packages/pluggableWidgets/custom-chart-web/src/hooks/useCustomChart.ts index 65da32ace3..5f72215182 100644 --- a/packages/pluggableWidgets/custom-chart-web/src/hooks/useCustomChart.ts +++ b/packages/pluggableWidgets/custom-chart-web/src/hooks/useCustomChart.ts @@ -2,7 +2,6 @@ import { EditorStoreState, initStateFromProps, PlaygroundData, useEditorStore } import { GateProvider } from "@mendix/widget-plugin-mobx-kit/GateProvider"; import { useConst } from "@mendix/widget-plugin-mobx-kit/react/useConst"; import { useSetup } from "@mendix/widget-plugin-mobx-kit/react/useSetup"; -import { executeAction } from "@mendix/widget-plugin-platform/framework/execute-action"; import { CSSProperties, Ref, RefCallback, useEffect } from "react"; import { CustomChartControllerHost } from "src/controllers/CustomChartControllerHost"; import { mergeRefs } from "src/utils/mergeRefs"; @@ -45,13 +44,6 @@ export function useCustomChart(props: CustomChartContainerProps): UseCustomChart editorStateGateProvider.setProps(editorStore.state); }); - useEffect(() => { - if (props.eventDataAttribute?.value && props.onClick) { - executeAction(props.onClick); - props.eventDataAttribute.setValue(""); - } - }, [props.eventDataAttribute?.value]); - const containerStyle: CSSProperties = { width: props.widthUnit === "percentage" ? `${props.width}%` : `${props.width}px` }; diff --git a/packages/pluggableWidgets/custom-chart-web/src/package.xml b/packages/pluggableWidgets/custom-chart-web/src/package.xml index b63d811c08..2fcf393346 100644 --- a/packages/pluggableWidgets/custom-chart-web/src/package.xml +++ b/packages/pluggableWidgets/custom-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/custom-chart-web/src/utils/utils.spec.ts b/packages/pluggableWidgets/custom-chart-web/src/utils/utils.spec.ts new file mode 100644 index 0000000000..f420cd1770 --- /dev/null +++ b/packages/pluggableWidgets/custom-chart-web/src/utils/utils.spec.ts @@ -0,0 +1,56 @@ +import { parseData, parseLayout, parseConfig } from "../utils/utils"; + +describe("parseData", () => { + it("returns empty array when all inputs are empty", () => { + expect(parseData()).toEqual([]); + }); + + it("parses staticData only", () => { + const staticData = JSON.stringify([{ x: [1], y: [2] }]); + expect(parseData(staticData)).toEqual([{ x: [1], y: [2] }]); + }); + + it("parses sampleData when attributeData and staticData are empty", () => { + const sampleData = JSON.stringify([{ x: [3], y: [4] }]); + expect(parseData(undefined, undefined, sampleData)).toEqual([{ x: [3], y: [4] }]); + }); + + it("parses attributeData and ignores sampleData if attributeData is present", () => { + const attributeData = JSON.stringify([{ x: [5], y: [6] }]); + const sampleData = JSON.stringify([{ x: [7], y: [8] }]); + expect(parseData(undefined, attributeData, sampleData)).toEqual([{ x: [5], y: [6] }]); + }); +}); + +describe("parseLayout", () => { + it("returns empty object when all inputs are empty", () => { + expect(parseLayout()).toEqual({}); + }); + + it("parses staticLayout only", () => { + const staticLayout = JSON.stringify({ title: "Test" }); + expect(parseLayout(staticLayout)).toEqual({ title: "Test" }); + }); + + it("parses sampleLayout when attributeLayout and staticLayout are empty", () => { + const sampleLayout = JSON.stringify({ title: "Sample" }); + expect(parseLayout(undefined, undefined, sampleLayout)).toEqual({ title: "Sample" }); + }); + + it("parses attributeLayout and ignores sampleLayout if attributeLayout is present", () => { + const attributeLayout = JSON.stringify({ title: "Attr" }); + const sampleLayout = JSON.stringify({ title: "Sample" }); + expect(parseLayout(undefined, attributeLayout, sampleLayout)).toEqual({ title: "Attr" }); + }); +}); + +describe("parseConfig", () => { + it("returns empty object when configOptions is empty", () => { + expect(parseConfig()).toEqual({}); + }); + + it("parses configOptions", () => { + const configOptions = JSON.stringify({ responsive: true }); + expect(parseConfig(configOptions)).toEqual({ responsive: true }); + }); +}); diff --git a/packages/pluggableWidgets/custom-chart-web/src/utils/utils.ts b/packages/pluggableWidgets/custom-chart-web/src/utils/utils.ts index 75a6c72817..c5eadc2810 100644 --- a/packages/pluggableWidgets/custom-chart-web/src/utils/utils.ts +++ b/packages/pluggableWidgets/custom-chart-web/src/utils/utils.ts @@ -1,16 +1,16 @@ +import { EditorStoreState } from "@mendix/shared-charts/main"; import { Config, Data, Layout } from "plotly.js-dist-min"; +import { ChartProps } from "../components/PlotlyChart"; + export function parseData(staticData?: string, attributeData?: string, sampleData?: string): Data[] { let finalData: Data[] = []; try { - if (staticData) { - finalData = [...finalData, ...JSON.parse(staticData)]; - } - if (attributeData) { - finalData = [...finalData, ...JSON.parse(attributeData)]; - } - if (!finalData.length && sampleData) { - finalData = [...finalData, ...JSON.parse(sampleData)]; + const dataAttribute = attributeData ? JSON.parse(attributeData) : []; + finalData = [...finalData, ...(staticData ? JSON.parse(staticData) : []), ...dataAttribute]; + + if (dataAttribute.length === 0) { + finalData = [...finalData, ...(sampleData ? JSON.parse(sampleData) : [])]; } } catch (error) { console.error("Error parsing chart data:", error); @@ -23,14 +23,11 @@ export function parseLayout(staticLayout?: string, attributeLayout?: string, sam let finalLayout: Partial = {}; try { - if (staticLayout) { - finalLayout = { ...finalLayout, ...JSON.parse(staticLayout) }; - } - if (attributeLayout) { - finalLayout = { ...finalLayout, ...JSON.parse(attributeLayout) }; - } - if (Object.keys(finalLayout).length === 0 && sampleLayout) { - finalLayout = { ...finalLayout, ...JSON.parse(sampleLayout) }; + const layoutAttribute = attributeLayout ? JSON.parse(attributeLayout) : {}; + finalLayout = { ...finalLayout, ...(staticLayout ? JSON.parse(staticLayout) : {}), ...layoutAttribute }; + + if (Object.keys(layoutAttribute).length === 0) { + finalLayout = { ...finalLayout, ...(sampleLayout ? JSON.parse(sampleLayout) : {}) }; } } catch (error) { console.error("Error parsing chart layout:", error); @@ -50,3 +47,33 @@ export function parseConfig(configOptions?: string): Partial { return {}; } } + +export function mergeChartProps(chartProps: ChartProps, editorState: EditorStoreState): ChartProps { + return { + ...chartProps, + config: { + ...chartProps.config, + ...parseConfig(editorState.config) + }, + layout: { + ...chartProps.layout, + ...parseLayout(editorState.layout) + }, + data: chartProps.data.map((trace, index) => { + let stateTrace: Data = {}; + try { + if (!editorState.data || !editorState.data[index]) { + return trace; + } + stateTrace = JSON.parse(editorState.data[index]); + } catch { + console.warn(`Editor props for trace(${index}) is not a valid JSON:${editorState.data[index]}`); + console.warn("Please make sure the props is a valid JSON string."); + } + return { + ...trace, + ...stateTrace + } as Data; + }) + }; +} diff --git a/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md b/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md index a217374a92..3f8247d2b8 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/heatmap-chart-web/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [6.1.1] - 2025-07-15 + +### Fixed + +- We fixed on click events by correctly adding datasource. + ## [6.0.0] - 2025-02-28 ### Changed diff --git a/packages/pluggableWidgets/heatmap-chart-web/package.json b/packages/pluggableWidgets/heatmap-chart-web/package.json index 38200905a9..23ad296da0 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/package.json +++ b/packages/pluggableWidgets/heatmap-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/heatmap-chart-web", "widgetName": "HeatMap", - "version": "6.0.0", + "version": "6.1.1", "description": "Shows data in a heatmap format graph.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", diff --git a/packages/pluggableWidgets/heatmap-chart-web/src/HeatMap.xml b/packages/pluggableWidgets/heatmap-chart-web/src/HeatMap.xml index 4fb1191485..3e6fbf874b 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/src/HeatMap.xml +++ b/packages/pluggableWidgets/heatmap-chart-web/src/HeatMap.xml @@ -184,7 +184,7 @@ - + On click action diff --git a/packages/pluggableWidgets/heatmap-chart-web/src/hooks/data.ts b/packages/pluggableWidgets/heatmap-chart-web/src/hooks/data.ts index 2060fb04ee..782186d301 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/src/hooks/data.ts +++ b/packages/pluggableWidgets/heatmap-chart-web/src/hooks/data.ts @@ -1,10 +1,11 @@ -import { ValueStatus } from "mendix"; -import { useEffect, useMemo, useState } from "react"; +import { ObjectItem, ValueStatus } from "mendix"; +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { ensure } from "@mendix/pluggable-widgets-tools"; import { HeatMapContainerProps } from "../../typings/HeatMapProps"; import { ChartWidgetProps, compareAttrValuesAsc } from "@mendix/shared-charts/main"; import { executeAction } from "@mendix/widget-plugin-platform/framework/execute-action"; import Big from "big.js"; +import { PlotDatum } from "plotly.js-dist-min"; type HeatMapDataSeriesHooks = Pick< HeatMapContainerProps, @@ -33,6 +34,7 @@ type LocalHeatMapData = { verticalAxisValue: AttributeValue; horizontalSortValue: string | Big | Date | undefined; verticalSortValue: string | Big | Date | undefined; + id: string; }; function getUniqueValues(values: T[]): T[] { @@ -67,6 +69,7 @@ export const useHeatMapDataSeries = ({ verticalSortOrder }: HeatMapDataSeriesHooks): HeatMapHookData => { const [heatmapChartData, setHeatMapData] = useState([]); + const objectMap = useRef>(new Map()); useEffect(() => { if (seriesDataSource.status === ValueStatus.Available && seriesDataSource.items) { @@ -76,7 +79,8 @@ export const useHeatMapDataSeries = ({ horizontalAxisValue: formatValueAttribute(horizontalAxisAttribute?.get(dataSourceItem).value), horizontalSortValue: horizontalSortAttribute?.get(dataSourceItem).value, verticalAxisValue: formatValueAttribute(verticalAxisAttribute?.get(dataSourceItem).value), - verticalSortValue: verticalSortAttribute?.get(dataSourceItem).value + verticalSortValue: verticalSortAttribute?.get(dataSourceItem).value, + id: dataSourceItem.id })); setHeatMapData(dataSourceItems); } @@ -90,7 +94,29 @@ export const useHeatMapDataSeries = ({ verticalSortAttribute ]); - const onClick = useMemo(() => (onClickAction ? () => executeAction(onClickAction) : undefined), [onClickAction]); + const onClick = useCallback( + (item: ObjectItem, data: PlotDatum) => { + let selectedObjectItem: ObjectItem | undefined = item; + if (selectedObjectItem === null || selectedObjectItem === undefined) { + const selectedLocalHeatmapData = heatmapChartData.values().find(heatMapPointData => { + return ( + heatMapPointData.horizontalAxisValue === data.x && + heatMapPointData.verticalAxisValue === data.y && + heatMapPointData.value === data.z + ); + }); + + if (selectedLocalHeatmapData) { + selectedObjectItem = objectMap.current.get(selectedLocalHeatmapData.id); + } + } + + if (selectedObjectItem) { + executeAction(onClickAction?.get(selectedObjectItem)); + } + }, + [onClickAction, heatmapChartData] + ); return useMemo(() => { // `Array.reverse` mutates, so we make a copy. diff --git a/packages/pluggableWidgets/heatmap-chart-web/src/package.xml b/packages/pluggableWidgets/heatmap-chart-web/src/package.xml index 307cdfc052..4a8df91434 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/src/package.xml +++ b/packages/pluggableWidgets/heatmap-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/heatmap-chart-web/typings/HeatMapProps.d.ts b/packages/pluggableWidgets/heatmap-chart-web/typings/HeatMapProps.d.ts index dc4c190529..4b958f1d77 100644 --- a/packages/pluggableWidgets/heatmap-chart-web/typings/HeatMapProps.d.ts +++ b/packages/pluggableWidgets/heatmap-chart-web/typings/HeatMapProps.d.ts @@ -4,7 +4,7 @@ * @author Mendix Widgets Framework Team */ import { ComponentType, CSSProperties, ReactNode } from "react"; -import { ActionValue, DynamicValue, ListValue, ListAttributeValue, ListExpressionValue } from "mendix"; +import { DynamicValue, ListValue, ListActionValue, ListAttributeValue, ListExpressionValue } from "mendix"; import { Big } from "big.js"; export type HorizontalSortOrderEnum = "asc" | "desc"; @@ -55,7 +55,7 @@ export interface HeatMapContainerProps { width: number; heightUnit: HeightUnitEnum; height: number; - onClickAction?: ActionValue; + onClickAction?: ListActionValue; tooltipHoverText?: ListExpressionValue; enableThemeConfig: boolean; customLayout: string; diff --git a/packages/pluggableWidgets/line-chart-web/package.json b/packages/pluggableWidgets/line-chart-web/package.json index 6d468db2d2..8835af1500 100644 --- a/packages/pluggableWidgets/line-chart-web/package.json +++ b/packages/pluggableWidgets/line-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/line-chart-web", "widgetName": "LineChart", - "version": "6.2.0", + "version": "6.1.0", "description": "Shows data in a line format graph.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0.2965", "appName": "Line Chart" }, "testProject": { diff --git a/packages/pluggableWidgets/line-chart-web/src/package.xml b/packages/pluggableWidgets/line-chart-web/src/package.xml index 8b9f9e1c98..70ce0881cc 100644 --- a/packages/pluggableWidgets/line-chart-web/src/package.xml +++ b/packages/pluggableWidgets/line-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md b/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md index e55eb02fd4..a31379910e 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/CHANGELOG.md @@ -6,11 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] - 2025-06-03 +## [6.1.1] - 2025-07-15 ### Changed -- We increase the version to update shared code. +- We updated shared charts dependency. + +## [6.1.0] - 2025-06-04 + +## # Breaking + +- We remove listened to selection in order for charts to works on Studio Pro 9.24. ## [6.0.0] - 2025-02-28 diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/package.json b/packages/pluggableWidgets/pie-doughnut-chart-web/package.json index 5b1dbdcfc5..866632cea4 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/package.json +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/pie-doughnut-chart-web", "widgetName": "PieChart", - "version": "6.2.0", + "version": "6.1.1", "description": "Shows data in a pie format graph.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0", "appName": "Pie Chart" }, "testProject": { diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.tsx b/packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.tsx index 97513e3f02..0dce3dba91 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.tsx +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/src/PieChart.tsx @@ -39,11 +39,10 @@ export function PieChart(props: PieChartContainerProps): ReactElement | null { seriesSortOrder: props.seriesSortOrder, seriesValueAttribute: props.seriesValueAttribute, onClickAction: props.onClickAction, - tooltipHoverText: props.tooltipHoverText, - seriesItemSelection: props.seriesItemSelection + tooltipHoverText: props.tooltipHoverText }); - const isPieClickable = props.seriesItemSelection?.type === "Single" || props.onClickAction; + const isPieClickable = props.onClickAction; return ( - - Selection type - - - - - - diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/src/hooks/data.ts b/packages/pluggableWidgets/pie-doughnut-chart-web/src/hooks/data.ts index 084bb505e7..8db2b91da6 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/src/hooks/data.ts +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/src/hooks/data.ts @@ -18,7 +18,6 @@ type PieChartDataSeriesHooks = Pick< | "seriesSortOrder" | "seriesValueAttribute" | "tooltipHoverText" - | "seriesItemSelection" >; type LocalPieChartData = { @@ -39,8 +38,7 @@ export const usePieChartDataSeries = ({ seriesSortOrder, seriesValueAttribute, onClickAction, - tooltipHoverText, - seriesItemSelection + tooltipHoverText }: PieChartDataSeriesHooks): ChartWidgetProps["data"] => { const [pieChartData, setPieChartData] = useState([]); @@ -76,11 +74,8 @@ export const usePieChartDataSeries = ({ const onClick = useCallback( (item: ObjectItem) => { executeAction(onClickAction?.get(item)); - if (seriesItemSelection && seriesItemSelection.type === "Single") { - seriesItemSelection.setSelection(item); - } }, - [onClickAction, seriesItemSelection] + [onClickAction] ); return useMemo( diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/src/package.xml b/packages/pluggableWidgets/pie-doughnut-chart-web/src/package.xml index c19a1068a7..04d9c2c693 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/src/package.xml +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/pluggableWidgets/pie-doughnut-chart-web/typings/PieChartProps.d.ts b/packages/pluggableWidgets/pie-doughnut-chart-web/typings/PieChartProps.d.ts index f5dc83b04f..003f501dc5 100644 --- a/packages/pluggableWidgets/pie-doughnut-chart-web/typings/PieChartProps.d.ts +++ b/packages/pluggableWidgets/pie-doughnut-chart-web/typings/PieChartProps.d.ts @@ -4,7 +4,7 @@ * @author Mendix Widgets Framework Team */ import { ComponentType, CSSProperties, ReactNode } from "react"; -import { ListValue, ListActionValue, ListAttributeValue, ListExpressionValue, SelectionSingleValue } from "mendix"; +import { ListValue, ListActionValue, ListAttributeValue, ListExpressionValue } from "mendix"; import { Big } from "big.js"; export type SeriesSortOrderEnum = "asc" | "desc"; @@ -24,7 +24,6 @@ export interface PieChartContainerProps { seriesSortAttribute?: ListAttributeValue; seriesSortOrder: SeriesSortOrderEnum; seriesColorAttribute?: ListExpressionValue; - seriesItemSelection?: SelectionSingleValue; enableAdvancedOptions: boolean; showPlaygroundSlot: boolean; playground?: ReactNode; @@ -59,7 +58,6 @@ export interface PieChartPreviewProps { seriesSortAttribute: string; seriesSortOrder: SeriesSortOrderEnum; seriesColorAttribute: string; - seriesItemSelection: "None" | "Single"; enableAdvancedOptions: boolean; showPlaygroundSlot: boolean; playground: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> }; diff --git a/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md b/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md index fa7a135ccb..c256ba8122 100644 --- a/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md +++ b/packages/pluggableWidgets/time-series-chart-web/CHANGELOG.md @@ -6,7 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [6.2.0] - 2025-06-03 +## [6.1.1] - 2025-07-15 + +### Changed + +- We updated shared charts dependency. + +## [6.1.0] - 2025-06-04 ### Fixed diff --git a/packages/pluggableWidgets/time-series-chart-web/package.json b/packages/pluggableWidgets/time-series-chart-web/package.json index b542d46aad..c8a44a109b 100644 --- a/packages/pluggableWidgets/time-series-chart-web/package.json +++ b/packages/pluggableWidgets/time-series-chart-web/package.json @@ -1,7 +1,7 @@ { "name": "@mendix/time-series-chart-web", "widgetName": "TimeSeries", - "version": "6.2.0", + "version": "6.1.1", "description": "Shows data changes over period of time.", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "license": "Apache-2.0", @@ -18,7 +18,7 @@ }, "packagePath": "com.mendix.widget.web", "marketplace": { - "minimumMXVersion": "9.6.0", + "minimumMXVersion": "9.24.0", "appName": "Time Series" }, "testProject": { diff --git a/packages/pluggableWidgets/time-series-chart-web/src/package.xml b/packages/pluggableWidgets/time-series-chart-web/src/package.xml index ea4fcbe768..31208498ef 100644 --- a/packages/pluggableWidgets/time-series-chart-web/src/package.xml +++ b/packages/pluggableWidgets/time-series-chart-web/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/packages/shared/charts/package.json b/packages/shared/charts/package.json index a60cfe5125..7b26e21ae5 100644 --- a/packages/shared/charts/package.json +++ b/packages/shared/charts/package.json @@ -1,6 +1,6 @@ { "name": "@mendix/shared-charts", - "version": "2.2.0", + "version": "2.1.1", "description": "Shared components for charts", "copyright": "© Mendix Technology BV 2025. All rights reserved.", "private": true, diff --git a/packages/shared/charts/src/components/ChartView.tsx b/packages/shared/charts/src/components/ChartView.tsx index 3ef04c5837..d8fd5856de 100644 --- a/packages/shared/charts/src/components/ChartView.tsx +++ b/packages/shared/charts/src/components/ChartView.tsx @@ -32,10 +32,16 @@ export const ChartView = ({ const [{ curveNumber, pointIndex, pointIndices, pointNumber, pointNumbers }] = event.points; const index = pointIndex ?? pointNumber; const indices = pointIndices ?? pointNumbers; - const itemIndex = getItemIndex(index, indices); - const { dataSourceItems, onClick } = data[curveNumber]; - const item = dataSourceItems[itemIndex]; - onClick?.(item); + try { + const itemIndex = getItemIndex(index, indices); + const { dataSourceItems, onClick } = data[curveNumber]; + const item = dataSourceItems[itemIndex]; + onClick?.(item); + } catch (_e: any) { + // let the chart handle it's own onClick + const { onClick } = data[curveNumber]; + onClick?.(null, event.points[0]); + } }, [data] ); diff --git a/packages/shared/charts/src/components/types.ts b/packages/shared/charts/src/components/types.ts index d101cd784f..cdeb918657 100644 --- a/packages/shared/charts/src/components/types.ts +++ b/packages/shared/charts/src/components/types.ts @@ -1,11 +1,13 @@ import { ObjectItem } from "mendix"; -import { Config, Data, Layout } from "plotly.js-dist-min"; +import { Config, Data, Layout, PlotDatum } from "plotly.js-dist-min"; declare module "plotly.js-dist-min" { interface PlotDatum { /** This array appears on only when aggregation is used */ pointIndices?: number[]; pointNumbers?: number[]; + // this is only appear on 3 dimentional matrix datasource + z?: number; } } export type ExtraTraceProps = { @@ -14,7 +16,7 @@ export type ExtraTraceProps = { /** JSON string. Expected to be an object with custom 'trace' options. */ customSeriesOptions: string | undefined; /** Click handler for each point on current 'trace'. Should be call with ObjectItem associated with clicked point. */ - onClick?: (item: ObjectItem) => void; + onClick?: (item: ObjectItem | null, data?: Partial) => void; }; export type PlotTrace = Partial & ExtraTraceProps; diff --git a/packages/shared/charts/src/helpers/useEditorStore.ts b/packages/shared/charts/src/helpers/useEditorStore.ts index e2ac492d8c..7610acf221 100644 --- a/packages/shared/charts/src/helpers/useEditorStore.ts +++ b/packages/shared/charts/src/helpers/useEditorStore.ts @@ -1,7 +1,7 @@ import { Data } from "plotly.js-dist-min"; -import { useState, useReducer, useEffect } from "react"; -import { EditorStore, EditorStoreState } from "./EditorStore"; +import { useEffect, useReducer, useState } from "react"; import { fallback, pprint } from "../utils/json"; +import { EditorStore, EditorStoreState } from "./EditorStore"; export type EditorStoreInitializer = () => EditorStoreState; @@ -37,6 +37,6 @@ export function initStateFromProps(data: Array>): EditorStoreIniti return () => ({ layout: pprint(fallback("")), config: pprint(fallback("")), - data: data.map(trace => pprint(fallback(trace.name))) + data: data.map(trace => pprint(JSON.stringify(trace))) }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82ee8ab610..06dd62216c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,7 +20,8 @@ overrides: jest-environment-jsdom: ^29.7.0 json5@1.x: '>=1.0.2' json5@0.x: '>=1.0.2' - '@codemirror/view': ^6.34.2 + '@codemirror/view': ^6.38.1 + '@codemirror/state': ^6.5.2 enzyme>cheerio: 1.0.0-rc.10 ts-node: 10.9.2 react-big-calendar@1>clsx: 2.1.0 @@ -829,10 +830,10 @@ importers: version: link:../../shared/widget-plugin-platform '@uiw/codemirror-theme-github': specifier: ^4.21.25 - version: 4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2) + version: 4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3) '@uiw/react-codemirror': specifier: ^4.21.25 - version: 4.22.2(@babel/runtime@7.25.7)(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2))(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.2)(codemirror@6.0.1(@lezer/common@1.2.2))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 4.22.2(@babel/runtime@7.25.7)(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2))(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.5.2)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.38.3)(codemirror@6.0.1(@lezer/common@1.2.2))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: '@mendix/automation-utils': specifier: workspace:* @@ -1986,10 +1987,10 @@ importers: version: 0.24.2 '@uiw/codemirror-theme-github': specifier: ^4.21.25 - version: 4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2) + version: 4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3) '@uiw/react-codemirror': specifier: ^4.21.25 - version: 4.22.2(@babel/runtime@7.25.7)(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2))(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.2)(codemirror@6.0.1(@lezer/common@1.2.2))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 4.22.2(@babel/runtime@7.25.7)(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2))(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.5.2)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.38.3)(codemirror@6.0.1(@lezer/common@1.2.2))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) classnames: specifier: ^2.2.6 version: 2.3.2 @@ -3487,12 +3488,12 @@ packages: resolution: {integrity: sha512-MjfDrHy0gHKlPWsvSsikhO1+BOh+eBHNgfH1OXs1+DAf30IonQldgMM3kxLDTG9ktE7kDLaA1j/l7KMPA4KNfw==} peerDependencies: '@codemirror/language': ^6.0.0 - '@codemirror/state': ^6.0.0 - '@codemirror/view': ^6.34.2 + '@codemirror/state': ^6.5.2 + '@codemirror/view': ^6.38.1 '@lezer/common': ^1.0.0 - '@codemirror/commands@6.7.0': - resolution: {integrity: sha512-+cduIZ2KbesDhbykV02K25A5xIVrquSPz4UxxYBemRlAT2aW8dhwUgLDwej7q/RJUHKk4nALYcR1puecDvbdqw==} + '@codemirror/commands@6.8.1': + resolution: {integrity: sha512-KlGVYufHMQzxbdQONiLyGQDUW0itrLZwq3CcY7xpv9ZLRHqzkBSoteocBHtMCoY7/Ci4xhzSrToIeLg7FxHuaw==} '@codemirror/lang-css@6.3.1': resolution: {integrity: sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==} @@ -3515,14 +3516,14 @@ packages: '@codemirror/search@6.5.6': resolution: {integrity: sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q==} - '@codemirror/state@6.4.1': - resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==} + '@codemirror/state@6.5.2': + resolution: {integrity: sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==} '@codemirror/theme-one-dark@6.1.2': resolution: {integrity: sha512-F+sH0X16j/qFLMAfbciKTxVOwkdAS336b7AXTKOZhy8BR3eH/RelsnLgLFINrpST63mmN2OuwUt0W2ndUgYwUA==} - '@codemirror/view@6.34.2': - resolution: {integrity: sha512-d6n0WFvL970A9Z+l9N2dO+Hk9ev4hDYQzIx+B9tCyBP0W5wPEszi1rhuyFesNSkLZzXbQE5FPH7F/z/TMJfoPA==} + '@codemirror/view@6.38.3': + resolution: {integrity: sha512-x2t87+oqwB1mduiQZ6huIghjMt4uZKFEdj66IcXw7+a5iBEvv9lh7EWDRHI7crnD4BMGpnyq/RzmCGbiEZLcvQ==} '@commitlint/cli@19.8.0': resolution: {integrity: sha512-t/fCrLVu+Ru01h0DtlgHZXbHV2Y8gKocTR5elDOqIRUzQd0/6hpt2VIWOj9b3NDo7y4/gfxeR2zRtXq/qO6iUg==} @@ -3905,6 +3906,9 @@ packages: resolution: {integrity: sha512-5ueL4UDitzVtceQ8J4kY+Px3WK+eZTsmGwha3MBKHKqiHvKrjWWwBCIl1K8BuJSc5OFh83uI8IFNoFvQxX2uUw==} hasBin: true + '@marijn/find-cluster-break@1.0.2': + resolution: {integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==} + '@melloware/coloris@0.24.2': resolution: {integrity: sha512-6IhdPOBIc922jRMx2p6Sl6mRzqjGF7x67q0ZziA5e4NTqWoSPHBEnSmiUCcsXiNHZJ6zdOQt+6Z/eZxpxcHjDA==} @@ -4895,8 +4899,8 @@ packages: '@codemirror/language': '>=6.0.0' '@codemirror/lint': '>=6.0.0' '@codemirror/search': '>=6.0.0' - '@codemirror/state': '>=6.0.0' - '@codemirror/view': ^6.34.2 + '@codemirror/state': ^6.5.2 + '@codemirror/view': ^6.38.1 '@uiw/codemirror-theme-github@4.22.2': resolution: {integrity: sha512-tqGOOgVzbStJWUQmMLRWyymyD3DPF4TUSJx2DcXpeCF3YStWMd957I26uQQaqR1ppAcWFsprjkl2oL3piBxFdA==} @@ -4905,16 +4909,16 @@ packages: resolution: {integrity: sha512-gsLHn6SUuV5iboBvGrM7YimzLFHQmsNlkGIYs3UaVUJTo/A/ZrKoSJNyPziShLRjBXA2UwKdBTIU6VhHyyaChw==} peerDependencies: '@codemirror/language': '>=6.0.0' - '@codemirror/state': '>=6.0.0' - '@codemirror/view': ^6.34.2 + '@codemirror/state': ^6.5.2 + '@codemirror/view': ^6.38.1 '@uiw/react-codemirror@4.22.2': resolution: {integrity: sha512-okCSl+WJG63gRx8Fdz7v0C6RakBQnbb3pHhuzIgDB+fwhipgFodSnu2n9oOsQesJ5YQ7mSOcKMgX0JEsu4nnfQ==} peerDependencies: '@babel/runtime': '>=7.11.0' - '@codemirror/state': '>=6.0.0' + '@codemirror/state': ^6.5.2 '@codemirror/theme-one-dark': '>=6.0.0' - '@codemirror/view': ^6.34.2 + '@codemirror/view': ^6.38.1 codemirror: '>=6.0.0' react: ^18.0.0 react-dom: ^18.0.0 @@ -12252,25 +12256,25 @@ snapshots: dependencies: commander: 2.20.3 - '@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2)': + '@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2)': dependencies: '@codemirror/language': 6.10.2 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 '@lezer/common': 1.2.2 - '@codemirror/commands@6.7.0': + '@codemirror/commands@6.8.1': dependencies: '@codemirror/language': 6.10.2 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 '@lezer/common': 1.2.2 - '@codemirror/lang-css@6.3.1(@codemirror/view@6.34.2)': + '@codemirror/lang-css@6.3.1(@codemirror/view@6.38.3)': dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2) + '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2) '@codemirror/language': 6.10.2 - '@codemirror/state': 6.4.1 + '@codemirror/state': 6.5.2 '@lezer/common': 1.2.2 '@lezer/css': 1.1.11 transitivePeerDependencies: @@ -12278,23 +12282,23 @@ snapshots: '@codemirror/lang-html@6.4.9': dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2) - '@codemirror/lang-css': 6.3.1(@codemirror/view@6.34.2) + '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2) + '@codemirror/lang-css': 6.3.1(@codemirror/view@6.38.3) '@codemirror/lang-javascript': 6.2.3 '@codemirror/language': 6.10.2 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 '@lezer/common': 1.2.2 '@lezer/css': 1.1.11 '@lezer/html': 1.3.10 '@codemirror/lang-javascript@6.2.3': dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2) + '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2) '@codemirror/language': 6.10.2 '@codemirror/lint': 6.8.2 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 '@lezer/common': 1.2.2 '@lezer/javascript': 1.5.1 @@ -12305,8 +12309,8 @@ snapshots: '@codemirror/language@6.10.2': dependencies: - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 '@lezer/common': 1.2.2 '@lezer/highlight': 1.2.1 '@lezer/lr': 1.4.1 @@ -12314,28 +12318,31 @@ snapshots: '@codemirror/lint@6.8.2': dependencies: - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 crelt: 1.0.6 '@codemirror/search@6.5.6': dependencies: - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 crelt: 1.0.6 - '@codemirror/state@6.4.1': {} + '@codemirror/state@6.5.2': + dependencies: + '@marijn/find-cluster-break': 1.0.2 '@codemirror/theme-one-dark@6.1.2': dependencies: '@codemirror/language': 6.10.2 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 '@lezer/highlight': 1.2.1 - '@codemirror/view@6.34.2': + '@codemirror/view@6.38.3': dependencies: - '@codemirror/state': 6.4.1 + '@codemirror/state': 6.5.2 + crelt: 1.0.6 style-mod: 4.1.2 w3c-keyname: 2.2.8 @@ -12976,6 +12983,8 @@ snapshots: sort-object: 3.0.3 tinyqueue: 3.0.0 + '@marijn/find-cluster-break@1.0.2': {} + '@melloware/coloris@0.24.2': {} '@mendix/pluggable-widgets-tools@10.21.0(@jest/transform@29.7.0)(@jest/types@29.6.3)(@swc/core@1.7.26(@swc/helpers@0.5.15))(@types/babel__core@7.20.3)(@types/node@22.14.0)(picomatch@4.0.2)(react-dom@18.2.0(react@18.2.0))(react-native@0.75.3(@babel/core@7.26.10)(@babel/preset-env@7.26.9(@babel/core@7.26.10))(@types/react@18.2.36)(react@18.2.0)(typescript@5.1.6))(react@18.2.0)(tslib@2.8.1)': @@ -13019,7 +13028,7 @@ snapshots: enzyme-to-json: 3.6.2(enzyme@3.11.0) eslint: 7.32.0 eslint-config-prettier: 8.10.0(eslint@7.32.0) - eslint-plugin-jest: 24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.1.6))(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2) + eslint-plugin-jest: 24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2) eslint-plugin-prettier: 3.4.1(eslint-config-prettier@8.10.0(eslint@7.32.0))(eslint@7.32.0)(prettier@3.5.3) eslint-plugin-promise: 4.3.1 eslint-plugin-react: 7.28.0(eslint@7.32.0) @@ -14726,38 +14735,38 @@ snapshots: '@typescript-eslint/types': 8.29.0 eslint-visitor-keys: 4.2.0 - '@uiw/codemirror-extensions-basic-setup@4.22.2(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2))(@codemirror/commands@6.7.0)(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)': + '@uiw/codemirror-extensions-basic-setup@4.22.2(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2))(@codemirror/commands@6.8.1)(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)': dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2) - '@codemirror/commands': 6.7.0 + '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2) + '@codemirror/commands': 6.8.1 '@codemirror/language': 6.10.2 '@codemirror/lint': 6.8.2 '@codemirror/search': 6.5.6 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 - '@uiw/codemirror-theme-github@4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)': + '@uiw/codemirror-theme-github@4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)': dependencies: - '@uiw/codemirror-themes': 4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2) + '@uiw/codemirror-themes': 4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3) transitivePeerDependencies: - '@codemirror/language' - '@codemirror/state' - '@codemirror/view' - '@uiw/codemirror-themes@4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)': + '@uiw/codemirror-themes@4.22.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)': dependencies: '@codemirror/language': 6.10.2 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 - '@uiw/react-codemirror@4.22.2(@babel/runtime@7.25.7)(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2))(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.4.1)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.34.2)(codemirror@6.0.1(@lezer/common@1.2.2))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@uiw/react-codemirror@4.22.2(@babel/runtime@7.25.7)(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2))(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.5.2)(@codemirror/theme-one-dark@6.1.2)(@codemirror/view@6.38.3)(codemirror@6.0.1(@lezer/common@1.2.2))(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.25.7 - '@codemirror/commands': 6.7.0 - '@codemirror/state': 6.4.1 + '@codemirror/commands': 6.8.1 + '@codemirror/state': 6.5.2 '@codemirror/theme-one-dark': 6.1.2 - '@codemirror/view': 6.34.2 - '@uiw/codemirror-extensions-basic-setup': 4.22.2(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2))(@codemirror/commands@6.7.0)(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2) + '@codemirror/view': 6.38.3 + '@uiw/codemirror-extensions-basic-setup': 4.22.2(@codemirror/autocomplete@6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2))(@codemirror/commands@6.8.1)(@codemirror/language@6.10.2)(@codemirror/lint@6.8.2)(@codemirror/search@6.5.6)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3) codemirror: 6.0.1(@lezer/common@1.2.2) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -15630,13 +15639,13 @@ snapshots: codemirror@6.0.1(@lezer/common@1.2.2): dependencies: - '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.4.1)(@codemirror/view@6.34.2)(@lezer/common@1.2.2) - '@codemirror/commands': 6.7.0 + '@codemirror/autocomplete': 6.16.2(@codemirror/language@6.10.2)(@codemirror/state@6.5.2)(@codemirror/view@6.38.3)(@lezer/common@1.2.2) + '@codemirror/commands': 6.8.1 '@codemirror/language': 6.10.2 '@codemirror/lint': 6.8.2 '@codemirror/search': 6.5.6 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.34.2 + '@codemirror/state': 6.5.2 + '@codemirror/view': 6.38.3 transitivePeerDependencies: - '@lezer/common' @@ -16890,22 +16899,12 @@ snapshots: eslint: 9.23.0(jiti@2.4.2) globals: 15.15.0 - eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.1.6))(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2): - dependencies: - '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@5.8.2) - eslint: 7.32.0 - optionalDependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.1.6))(eslint@7.32.0)(typescript@5.1.6) - transitivePeerDependencies: - - supports-color - - typescript - eslint-plugin-jest@24.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2): dependencies: '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@5.8.2) eslint: 7.32.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.8.2))(eslint@7.32.0)(typescript@5.8.2) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.1.6))(eslint@7.32.0)(typescript@5.1.6) transitivePeerDependencies: - supports-color - typescript