Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"i18next-browser-languagedetector": "^3.0.3",
"i18next-xhr-backend": "^3.1.2",
"jspdf": "^1.5.3",
"mapbox-gl": "^1.13.0",
"mapbox-gl-inspect": "^1.3.1",
"maplibre-gl": "^1.14.0",
"marked": "^0.7.0",
"memoize-one": "^5.0.4",
"memoizee": "^0.4.14",
Expand Down Expand Up @@ -101,7 +101,6 @@
"!src/App.js",
"!src/config/i18n.js",
"!src/**/index.js",

"!src/terra-front/**/stories/**/*.js",
"!src/terra-front/**/*.stories.js"
],
Expand Down
2 changes: 1 addition & 1 deletion src/terra-front/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as lib from '.';

jest.mock('mapbox-gl', () => ({}));
jest.mock('maplibre-gl', () => ({}));

it('should export each modules', () => {
expect(lib.Api).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import mapBoxGl from 'mapbox-gl';
import mapBoxGl from 'maplibre-gl';
import debounce from 'lodash.debounce';
import centroid from '@turf/centroid';
import uuid from 'uuid/v4';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react';
import renderer from 'react-test-renderer';
import ReactDOM from 'react-dom';
import mapboxGl from 'mapbox-gl';
import mapboxGl from 'maplibre-gl';
import centroid from '@turf/centroid';

import { setInteractions, fitZoom } from '../services/mapUtils';
Expand All @@ -20,7 +20,7 @@ import {
import BackgroundStyles from './components/BackgroundStyles';

jest.mock('@turf/bbox', () => jest.fn());
jest.mock('mapbox-gl', () => {
jest.mock('maplibre-gl', () => {
const Popup = jest.fn(function Popup () {
this.listeners = [];
// eslint-disable-next-line no-underscore-dangle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Marker } from 'mapbox-gl';
import { Marker } from 'maplibre-gl';
import { getLayerOpacity } from '../../services/mapUtils';
import piechart from './piechartMarker';

Expand Down
4 changes: 2 additions & 2 deletions src/terra-front/modules/Map/Map/Map.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import mapBoxGl from 'mapbox-gl';
import mapBoxGl from 'maplibre-gl';
import PropTypes from 'prop-types';
import 'mapbox-gl/dist/mapbox-gl.css';
import 'maplibre-gl/dist/maplibre-gl.css';
import MapboxDraw from '@mapbox/mapbox-gl-draw';
import { detailedDiff } from 'deep-object-diff';

Expand Down
4 changes: 2 additions & 2 deletions src/terra-front/modules/Map/Map/Map.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';
import mapboxgl from 'mapbox-gl';
import mapboxgl from 'maplibre-gl';

import { MapComponent as Map } from './Map';
import { updateCluster } from '../services/cluster';
Expand All @@ -14,7 +14,7 @@ const props = {
accessToken: 'pk.eyJ1IjoibWFraW5hY29ycHVzIiwiYSI6ImNqY3E4ZTNwcTFta3ozMm80d2xzY29wM2MifQ.Nwl_FHrWAIQ46s_lY0KNiQ',
};

jest.mock('mapbox-gl', () => {
jest.mock('maplibre-gl', () => {
const off = jest.fn();
const map = {
addControl: jest.fn(() => {}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Icon, Position, Toaster } from '@blueprintjs/core';
import { Marker } from 'mapbox-gl';
import { Marker } from 'maplibre-gl';
import { parse, stringify } from 'query-string';
import AbstractControl from '../../../helpers/AbstractMapControl';
import Tooltip from '../../../../../components/Tooltip';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jest.mock('react-dom', () => ({
render: jest.fn(),
}));

jest.mock('mapbox-gl', () => ({
jest.mock('maplibre-gl', () => ({
Marker: () => ({}),
}));

Expand Down
4 changes: 2 additions & 2 deletions src/terra-front/modules/Map/Map/withMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import React from 'react';
import PropTypes from 'prop-types';
import mapBoxGl from 'mapbox-gl';
import mapBoxGl from 'maplibre-gl';
import { addMapDebug } from '../helpers/mapDebug';

import 'mapbox-gl/dist/mapbox-gl.css';
import 'maplibre-gl/dist/maplibre-gl.css';

export const DEFAULT_LAYER_TYPES_WEIGHT = {
background: 100,
Expand Down
4 changes: 2 additions & 2 deletions src/terra-front/modules/Map/Map/withMap.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';
import mapboxgl from 'mapbox-gl';
import mapboxgl from 'maplibre-gl';

import { withMap } from './withMap';


jest.mock('mapbox-gl', () => {
jest.mock('maplibre-gl', () => {
const addedLayers = [];
const map = {
once: jest.fn((e, fn) => fn()),
Expand Down
2 changes: 1 addition & 1 deletion src/terra-front/modules/Map/helpers/mapDebug.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import mapBoxGl from 'mapbox-gl';
import mapBoxGl from 'maplibre-gl';
import MapboxInspect from 'mapbox-gl-inspect';
import renderInspectPopup from 'mapbox-gl-inspect/lib/renderPopup';
import 'mapbox-gl-inspect/dist/mapbox-gl-inspect.css';
Expand Down
4 changes: 2 additions & 2 deletions src/terra-front/modules/Map/helpers/mapDebug.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* eslint-disable no-console */
import mapBoxGl from 'mapbox-gl';
import mapBoxGl from 'maplibre-gl';
import MapboxInspect from 'mapbox-gl-inspect';
import renderInspectPopup from 'mapbox-gl-inspect/lib/renderPopup';
import { addMapDebug } from './mapDebug';

jest.mock('mapbox-gl', () => {
jest.mock('maplibre-gl', () => {
const mockedPopup = { on: jest.fn() };

return {
Expand Down