diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5ca0e85c3b0..7a1b034d325 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -30,10 +30,6 @@ updates: # See https://github.com/apache/superset/pull/37384#issuecomment-3793991389 # TODO: remove the plugin once Lodash usage has been migrated to a more readily tree-shakeable alternative - dependency-name: "@swc/plugin-transform-imports" - # There's an issue with polygon color filling starting from geostyler-openlayers-parser 5.2.0 - # See https://github.com/geostyler/geostyler-openlayers-parser/pull/828 - # TODO: remove once the issue got fixed - - dependency-name: "geostyler-openlayers-parser" # `just-handlerbars-helpers` library in plugin-chart-handlebars requires `currencyformatter`` to be < 2 - dependency-name: "currencyformatter.js" update-types: ["version-update:semver-major"] @@ -285,11 +281,6 @@ updates: - package-ecosystem: "npm" directory: "/superset-frontend/plugins/plugin-chart-cartodiagram/" - ignore: - # There's an issue with polygon color filling starting from geostyler-openlayers-parser 5.2.0 - # See https://github.com/geostyler/geostyler-openlayers-parser/pull/828 - # TODO: remove once the issue got fixed - - dependency-name: "geostyler-openlayers-parser" schedule: interval: "daily" labels: diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 03036729572..5aa30798716 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -91,7 +91,7 @@ "geolib": "^3.3.4", "geostyler": "^18.3.1", "geostyler-data": "^1.1.0", - "geostyler-openlayers-parser": "5.1.2", + "geostyler-openlayers-parser": "^5.4.0", "geostyler-style": "11.0.2", "geostyler-wfs-parser": "^3.0.1", "google-auth-library": "^10.6.1", @@ -26626,13 +26626,13 @@ } }, "node_modules/geostyler-openlayers-parser": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/geostyler-openlayers-parser/-/geostyler-openlayers-parser-5.1.2.tgz", - "integrity": "sha512-iwzP1qMPTw0vz91RTCiOXsm0r58EHAkHrbUXD4rk8xtPqI0mc33k27SmpNdVYI1dIQZjzO72ZlVBuvtXAlbnKQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/geostyler-openlayers-parser/-/geostyler-openlayers-parser-5.4.0.tgz", + "integrity": "sha512-BdlG10/wvok7KCOdtzM/NKfiUfkx+uqLDgesC3lNZnviz02S+zIQRtbAkb/Abin6/2boMFRL3i7YIt4D98xMNw==", "license": "BSD-2-Clause", "dependencies": { "css-font-parser": "^2.0.0", - "geostyler-style": "^10.3.0", + "geostyler-style": "^11.0.1", "lodash": "^4.17.21" }, "engines": { @@ -26645,19 +26645,6 @@ "ol": ">=7.4" } }, - "node_modules/geostyler-openlayers-parser/node_modules/geostyler-style": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/geostyler-style/-/geostyler-style-10.5.0.tgz", - "integrity": "sha512-XnKrjm5XY2hBc98h5uKaAdYAgy+R9YuBzf8aGo4SPmYoPtAlnNaGWkRZB8j/vnuzQg8/kpGVOJ94o+42WUhuhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=20.6.0", - "npm": ">=10.0.0" - }, - "funding": { - "url": "https://opencollective.com/geostyler" - } - }, "node_modules/geostyler-qgis-parser": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/geostyler-qgis-parser/-/geostyler-qgis-parser-4.1.0.tgz", @@ -26802,26 +26789,6 @@ "react": ">=16.8.0" } }, - "node_modules/geostyler/node_modules/geostyler-openlayers-parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/geostyler-openlayers-parser/-/geostyler-openlayers-parser-5.4.0.tgz", - "integrity": "sha512-BdlG10/wvok7KCOdtzM/NKfiUfkx+uqLDgesC3lNZnviz02S+zIQRtbAkb/Abin6/2boMFRL3i7YIt4D98xMNw==", - "license": "BSD-2-Clause", - "dependencies": { - "css-font-parser": "^2.0.0", - "geostyler-style": "^11.0.1", - "lodash": "^4.17.21" - }, - "engines": { - "node": ">=20.6.0" - }, - "funding": { - "url": "https://opencollective.com/geostyler" - }, - "peerDependencies": { - "ol": ">=7.4" - } - }, "node_modules/geotiff": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/geotiff/-/geotiff-3.0.3.tgz", @@ -52706,7 +52673,7 @@ "@types/react-redux": "*", "geostyler": "^18.3.1", "geostyler-data": "^1.0.0", - "geostyler-openlayers-parser": "5.1.2", + "geostyler-openlayers-parser": "^5.4.0", "geostyler-style": "^11.0.2", "geostyler-wfs-parser": "^3.0.1", "ol": "^10.8.0", diff --git a/superset-frontend/package.json b/superset-frontend/package.json index d0b8f8bf818..e00744f93ba 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -172,7 +172,7 @@ "geolib": "^3.3.4", "geostyler": "^18.3.1", "geostyler-data": "^1.1.0", - "geostyler-openlayers-parser": "5.1.2", + "geostyler-openlayers-parser": "^5.4.0", "geostyler-style": "11.0.2", "geostyler-wfs-parser": "^3.0.1", "google-auth-library": "^10.6.1", diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/package.json b/superset-frontend/plugins/plugin-chart-cartodiagram/package.json index 46623c55096..e467c2103db 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/package.json +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/package.json @@ -42,7 +42,7 @@ "@types/react-redux": "*", "geostyler": "^18.3.1", "geostyler-data": "^1.0.0", - "geostyler-openlayers-parser": "5.1.2", + "geostyler-openlayers-parser": "^5.4.0", "geostyler-style": "^11.0.2", "geostyler-wfs-parser": "^3.0.1", "ol": "^10.8.0", diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/layerUtil.test.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/layerUtil.test.ts index 05f63e9b8a5..a4141d89543 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/layerUtil.test.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/layerUtil.test.ts @@ -36,6 +36,7 @@ describe('layerUtil', () => { describe('createWfsLayer', () => { test('properly applies style', async () => { const colorToExpect = '#123456'; + const fillColor = '#ff0000'; const wfsLayerConf: WfsLayerConf = { title: 'osm:osm-fuel', @@ -61,7 +62,7 @@ describe('layerUtil', () => { }, { kind: 'Fill', - color: '#000000', + color: fillColor, }, ], }, @@ -76,8 +77,8 @@ describe('layerUtil', () => { expect(style!.length).toEqual(3); // @ts-expect-error upgrade `ol` package for better type of StyleLike type. - const colorAtLayer = style![1].getImage().getFill().getColor(); - expect(colorToExpect).toEqual(colorAtLayer); + const colorAtLayer = style![2].getFill().getColor(); + expect(colorAtLayer).toEqual(fillColor); }); }); diff --git a/superset-frontend/src/explore/components/controls/LayerConfigsControl/GeoStylerWrapper.tsx b/superset-frontend/src/explore/components/controls/LayerConfigsControl/GeoStylerWrapper.tsx index d43da761ef8..bed0f9ef427 100644 --- a/superset-frontend/src/explore/components/controls/LayerConfigsControl/GeoStylerWrapper.tsx +++ b/superset-frontend/src/explore/components/controls/LayerConfigsControl/GeoStylerWrapper.tsx @@ -25,6 +25,7 @@ import { CardStyle } from 'geostyler'; import { FC } from 'react'; import { GeoStylerWrapperProps } from './types'; +import 'geostyler/dist/index.css'; export const GeoStylerWrapper: FC = ({ className,