@eeacms/volto-eea-map 5.0.8 → 6.0.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.
- package/.eslintrc.js +6 -6
- package/CHANGELOG.md +21 -0
- package/DEVELOP.md +19 -17
- package/README.md +33 -19
- package/docker-compose.yml +1 -1
- package/jest-addon.config.js +11 -4
- package/package.json +1 -1
- package/src/Arcgis/Editor/Editor.jsx +2 -2
- package/src/Arcgis/Editor/Fold/Fold.jsx +1 -1
- package/src/Arcgis/Editor/Panels/SettingsGeneralPanel.jsx +3 -3
- package/src/Arcgis/Editor/Panels/SettingsLayersPanel.jsx +4 -3
- package/src/Arcgis/Editor/Panels/StructureBaseLayerPanel.jsx +2 -2
- package/src/Arcgis/Editor/Panels/StructureLayersPanel.jsx +5 -3
- package/src/Arcgis/Editor/Panels/StructureWidgetsPanel.jsx +5 -4
- package/src/Arcgis/Editor/SidebarGroup.jsx +1 -1
- package/src/Arcgis/Layer/Layer.jsx +3 -1
- package/src/Arcgis/Map/Map.jsx +8 -2
- package/src/Arcgis/Map/MapBuilder.jsx +7 -3
- package/src/Arcgis/Widget/Widget.jsx +1 -1
- package/src/Arcgis/helpers.js +1 -1
- package/src/Blocks/EmbedEEAMap/Edit.jsx +2 -2
- package/src/Blocks/EmbedEEAMap/View.jsx +2 -2
- package/src/Toolbar/FigureNote.jsx +1 -1
- package/src/Toolbar/MoreInfoLink.jsx +1 -1
- package/src/Toolbar/Sources.jsx +1 -1
- package/src/Views/VisualizationView.jsx +2 -2
- package/src/Widgets/ArcgisColorPickerWidget.jsx +2 -1
- package/src/Widgets/ArcgisRendererWidget/ArcgisRendererWidget.jsx +2 -1
- package/src/Widgets/ArcgisRendererWidget/RendererEditor/Simple.jsx +3 -4
- package/src/Widgets/ArcgisRendererWidget/RendererEditor/_EditorModal.jsx +1 -1
- package/src/Widgets/ArcgisSliderWidget.jsx +1 -1
- package/src/Widgets/ArcgisViewpointWidget.jsx +3 -2
- package/src/Widgets/VisualizationViewWidget.jsx +1 -1
- package/src/Widgets/VisualizationWidget.jsx +5 -3
- package/src/constants.js +1 -1
- package/src/hooks/useChangedProps.jsx +2 -1
- package/src/index.js +1 -1
- package/src/{jsoneditor.js → jsoneditor.jsx} +2 -2
package/.eslintrc.js
CHANGED
|
@@ -16,16 +16,16 @@ if (configFile) {
|
|
|
16
16
|
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
const
|
|
19
|
+
const { AddonRegistry } = require('@plone/registry/addon-registry');
|
|
20
|
+
const { registry } = AddonRegistry.init(projectRootPath);
|
|
21
21
|
|
|
22
22
|
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
23
|
-
const addonAliases = Object.keys(
|
|
23
|
+
const addonAliases = Object.keys(registry.packages).map((o) => [
|
|
24
24
|
o,
|
|
25
|
-
|
|
25
|
+
registry.packages[o].modulePath,
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
|
-
const addonExtenders =
|
|
28
|
+
const addonExtenders = registry.getEslintExtenders().map((m) => require(m));
|
|
29
29
|
|
|
30
30
|
const defaultConfig = {
|
|
31
31
|
extends: `${voltoPath}/.eslintrc`,
|
|
@@ -34,7 +34,7 @@ const defaultConfig = {
|
|
|
34
34
|
alias: {
|
|
35
35
|
map: [
|
|
36
36
|
['@plone/volto', '@plone/volto/src'],
|
|
37
|
-
['@plone/volto-slate', '@plone/volto
|
|
37
|
+
['@plone/volto-slate', '@plone/volto-slate/src'],
|
|
38
38
|
...addonAliases,
|
|
39
39
|
['@package', `${__dirname}/src`],
|
|
40
40
|
['@root', `${__dirname}/src`],
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [6.0.1](https://github.com/eea/volto-eea-map/compare/6.0.0...6.0.1) - 8 April 2026
|
|
8
|
+
|
|
9
|
+
#### :bug: Bug Fixes
|
|
10
|
+
|
|
11
|
+
- fix: make test [Alin V. (Claudiu) - [`cdd10aa`](https://github.com/eea/volto-eea-map/commit/cdd10aa38e58f4c38643ed99b7a603685d3b2074)]
|
|
12
|
+
|
|
13
|
+
## [6.0.0](https://github.com/eea/volto-eea-map/compare/5.0.8...6.0.0) - 25 March 2026
|
|
14
|
+
|
|
15
|
+
#### :rocket: New Features
|
|
16
|
+
|
|
17
|
+
- feat: Volto 18 support - refs #287700 [Alin Voinea - [`1282044`](https://github.com/eea/volto-eea-map/commit/12820446f44bbdb052d0cd7b05745825e049baf6)]
|
|
18
|
+
|
|
19
|
+
#### :house: Internal changes
|
|
20
|
+
|
|
21
|
+
- chore: [JENKINSFILE] add package version in sonarqube [valentinab25 - [`488ddb3`](https://github.com/eea/volto-eea-map/commit/488ddb3bf14ba7564a7619fdebd086f4d3f6b70f)]
|
|
22
|
+
- chore: [JENKINSFILE] use sonarqube branches [EEA Jenkins - [`0d503ea`](https://github.com/eea/volto-eea-map/commit/0d503ea78bbb5ed77c0d7cfa0e0247a77953e822)]
|
|
23
|
+
|
|
24
|
+
#### :hammer_and_wrench: Others
|
|
25
|
+
|
|
26
|
+
- test: Fix SonarQube bugs [Alin Voinea - [`d7e712d`](https://github.com/eea/volto-eea-map/commit/d7e712d3997ca6d0f908928b7f6e05c6e5355898)]
|
|
27
|
+
- tests: Fix Sonar Qube tags - refs #297339 [Alin Voinea - [`e1ae40d`](https://github.com/eea/volto-eea-map/commit/e1ae40dfaad699ad116245abf220bafb3f945dae)]
|
|
7
28
|
### [5.0.8](https://github.com/eea/volto-eea-map/compare/5.0.7...5.0.8) - 18 December 2024
|
|
8
29
|
|
|
9
30
|
#### :hammer_and_wrench: Others
|
package/DEVELOP.md
CHANGED
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
|
|
27
27
|
### Or add @eeacms/volto-eea-map to your Volto project
|
|
28
28
|
|
|
29
|
-
Before starting make sure your development environment is properly set. See [Volto
|
|
29
|
+
Before starting make sure your development environment is properly set. See the official Plone documentation for [creating a project with Cookieplone](https://6.docs.plone.org/install/create-project-cookieplone.html) and [installing an add-on in development mode in Volto 18 and 19](https://6.docs.plone.org/volto/development/add-ons/install-an-add-on-dev-18.html).
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
For new Volto 18+ projects, use Cookieplone. It includes `mrs-developer` by default.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
1. Create a new Volto project with Cookieplone
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
yo @plone/volto my-volto-project --addon @eeacms/volto-eea-map --skip-install
|
|
38
|
-
cd my-volto-project
|
|
35
|
+
uvx cookieplone project
|
|
36
|
+
cd project-title
|
|
39
37
|
|
|
40
38
|
1. Add the following to `mrs.developer.json`:
|
|
41
39
|
|
|
42
40
|
{
|
|
43
41
|
"volto-eea-map": {
|
|
42
|
+
"output": "packages",
|
|
44
43
|
"url": "https://github.com/eea/volto-eea-map.git",
|
|
45
44
|
"package": "@eeacms/volto-eea-map",
|
|
46
45
|
"branch": "develop",
|
|
@@ -48,28 +47,31 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
1.
|
|
50
|
+
1. Add `@eeacms/volto-eea-map` to the `addons` key in your project `volto.config.js`
|
|
51
|
+
|
|
52
|
+
1. Install or refresh the project setup
|
|
52
53
|
|
|
53
|
-
make
|
|
54
|
-
yarn
|
|
54
|
+
make install
|
|
55
55
|
|
|
56
|
-
1. Start backend
|
|
56
|
+
1. Start backend in one terminal
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
make backend-start
|
|
59
59
|
|
|
60
|
-
...wait for backend to setup and start
|
|
60
|
+
...wait for backend to setup and start, ending with `Ready to handle requests`
|
|
61
61
|
|
|
62
62
|
...you can also check http://localhost:8080/Plone
|
|
63
63
|
|
|
64
|
-
1. Start frontend
|
|
64
|
+
1. Start frontend in a second terminal
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
make frontend-start
|
|
67
67
|
|
|
68
68
|
1. Go to http://localhost:3000
|
|
69
69
|
|
|
70
70
|
1. Happy hacking!
|
|
71
71
|
|
|
72
|
-
cd
|
|
72
|
+
cd packages/volto-eea-map
|
|
73
|
+
|
|
74
|
+
For legacy Volto 17 projects, keep using the yarn-based workflow from the Volto 17 documentation.
|
|
73
75
|
|
|
74
76
|
## Cypress
|
|
75
77
|
|
|
@@ -81,7 +83,7 @@ project where you added `volto-eea-map` to `mrs.developer.json`
|
|
|
81
83
|
Go to:
|
|
82
84
|
|
|
83
85
|
```BASH
|
|
84
|
-
cd
|
|
86
|
+
cd packages/volto-eea-map/
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
Start:
|
package/README.md
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
[](https://github.com/eea/volto-eea-map/releases)
|
|
4
4
|
|
|
5
5
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-eea-map/job/master/display/redirect)
|
|
6
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-eea-map
|
|
6
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map)
|
|
7
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map)
|
|
8
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map)
|
|
9
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map)
|
|
10
10
|
|
|
11
11
|
[](https://ci.eionet.europa.eu/view/Github/job/volto-addons/job/volto-eea-map/job/develop/display/redirect)
|
|
12
|
-
[](https://sonarqube.eea.europa.eu/api/project_badges/measure?project=volto-eea-map
|
|
12
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map&branch=develop)
|
|
13
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map&branch=develop)
|
|
14
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map&branch=develop)
|
|
15
|
+
[](https://sonarqube.eea.europa.eu/dashboard?id=volto-eea-map&branch=develop)
|
|
16
16
|
|
|
17
17
|
[Volto](https://github.com/plone/volto) add-on
|
|
18
18
|
|
|
@@ -51,6 +51,11 @@ After this, sources can be added from the visualization edit interface. "Data Pr
|
|
|
51
51
|
|
|
52
52
|
Go to http://localhost:3000
|
|
53
53
|
|
|
54
|
+
`make start` now defaults to Volto 18. To run the same setup against Volto 17, use:
|
|
55
|
+
|
|
56
|
+
VOLTO_VERSION=17 make
|
|
57
|
+
VOLTO_VERSION=17 make start
|
|
58
|
+
|
|
54
59
|
### Add volto-eea-map to your Volto project
|
|
55
60
|
|
|
56
61
|
1. Make sure you have a [Plone backend](https://plone.org/download) up-and-running at http://localhost:8080/Plone
|
|
@@ -64,30 +69,39 @@ Go to http://localhost:3000
|
|
|
64
69
|
- If you already have a volto project, just update `package.json`:
|
|
65
70
|
|
|
66
71
|
```JSON
|
|
67
|
-
"addons": [
|
|
68
|
-
"@eeacms/volto-eea-map"
|
|
69
|
-
],
|
|
70
|
-
|
|
71
72
|
"dependencies": {
|
|
72
73
|
"@eeacms/volto-eea-map": "*"
|
|
73
74
|
}
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
and `volto.config.js`:
|
|
78
|
+
|
|
79
|
+
```JavaScript
|
|
80
|
+
const addons = ['@eeacms/volto-eea-map'];
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- If not, create one with Cookieplone, as recommended by the official Plone documentation for Volto 18+:
|
|
77
84
|
|
|
78
85
|
```
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
cd my-volto-project
|
|
86
|
+
uvx cookieplone project
|
|
87
|
+
cd project-title
|
|
82
88
|
```
|
|
83
89
|
|
|
84
|
-
1. Install
|
|
90
|
+
1. Install or update dependencies, then start the project:
|
|
85
91
|
|
|
86
92
|
```
|
|
87
|
-
|
|
88
|
-
yarn start
|
|
93
|
+
make install
|
|
89
94
|
```
|
|
90
95
|
|
|
96
|
+
For a Cookieplone project, start the backend and frontend in separate terminals:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
make backend-start
|
|
100
|
+
make frontend-start
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
For a legacy Volto 17 project, install the package with `yarn` and restart the frontend as usual.
|
|
104
|
+
|
|
91
105
|
1. Go to http://localhost:3000
|
|
92
106
|
|
|
93
107
|
1. Happy editing!
|
package/docker-compose.yml
CHANGED
package/jest-addon.config.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
require('dotenv').config({ path: __dirname + '/.env' })
|
|
2
2
|
|
|
3
|
+
const fs = require('fs')
|
|
4
|
+
const path = require('path')
|
|
5
|
+
|
|
6
|
+
const voltoSlatePath = fs.existsSync(
|
|
7
|
+
path.join(__dirname, '../../../node_modules/@plone/volto-slate/src'),
|
|
8
|
+
)
|
|
9
|
+
? '<rootDir>/node_modules/@plone/volto-slate/src'
|
|
10
|
+
: '<rootDir>/node_modules/@plone/volto/packages/volto-slate/src'
|
|
11
|
+
|
|
3
12
|
module.exports = {
|
|
4
13
|
testMatch: ['**/src/addons/**/?(*.)+(spec|test).[jt]s?(x)'],
|
|
5
14
|
collectCoverageFrom: [
|
|
@@ -17,10 +26,8 @@ module.exports = {
|
|
|
17
26
|
'@eeacms/search/(.*)$': '<rootDir>/src/addons/volto-searchlib/searchlib/$1',
|
|
18
27
|
'@eeacms/search': '<rootDir>/src/addons/volto-searchlib/searchlib',
|
|
19
28
|
'@eeacms/(.*?)/(.*)$': '<rootDir>/node_modules/@eeacms/$1/src/$2',
|
|
20
|
-
'@plone/volto-slate$':
|
|
21
|
-
|
|
22
|
-
'@plone/volto-slate/(.*)$':
|
|
23
|
-
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src/$1',
|
|
29
|
+
'@plone/volto-slate$': voltoSlatePath,
|
|
30
|
+
'@plone/volto-slate/(.*)$': `${voltoSlatePath}/$1`,
|
|
24
31
|
'~/(.*)$': '<rootDir>/src/$1',
|
|
25
32
|
'load-volto-addons':
|
|
26
33
|
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo, useRef, useState, useMemo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import isNil from 'lodash/isNil';
|
|
3
3
|
|
|
4
4
|
import SidebarGroup from './SidebarGroup';
|
|
5
5
|
|
|
6
|
-
import _MapBuilder from '
|
|
6
|
+
import _MapBuilder from '@eeacms/volto-eea-map/Arcgis/Map/MapBuilder';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
StructureBaseLayerPanel,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
5
5
|
|
|
6
6
|
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
7
7
|
import upKeySVG from '@plone/volto/icons/up-key.svg';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
2
|
+
import toNumber from 'lodash/toNumber';
|
|
3
3
|
import Panel from './Panel';
|
|
4
|
-
import Fold from '
|
|
4
|
+
import Fold from '@eeacms/volto-eea-map/Arcgis/Editor/Fold/Fold';
|
|
5
5
|
import { getDefaultWidgets } from '@eeacms/volto-eea-map/constants';
|
|
6
6
|
|
|
7
7
|
const mapSchema = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useState, useEffect, useContext, useMemo } from 'react';
|
|
2
2
|
import { Segment, Dimmer, Loader } from 'semantic-ui-react';
|
|
3
|
-
import
|
|
3
|
+
import isNil from 'lodash/isNil';
|
|
4
|
+
import toNumber from 'lodash/toNumber';
|
|
4
5
|
import { v4 as uuid } from 'uuid';
|
|
5
|
-
import
|
|
6
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
6
7
|
import {
|
|
7
8
|
debounce,
|
|
8
9
|
getLayers,
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
import { blendModes } from '@eeacms/volto-eea-map/constants';
|
|
12
13
|
import EditorContext from '@eeacms/volto-eea-map/Arcgis/Editor/EditorContext';
|
|
13
14
|
import Panel from './Panel';
|
|
14
|
-
import Fold from '
|
|
15
|
+
import Fold from '@eeacms/volto-eea-map/Arcgis/Editor/Fold/Fold';
|
|
15
16
|
|
|
16
17
|
function Layer({ $map, layer, layers, index, value, onChangeValue }) {
|
|
17
18
|
const uid = useState(uuid());
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
3
3
|
import { basemaps } from '@eeacms/volto-eea-map/constants';
|
|
4
4
|
import { getBasemap } from '@eeacms/volto-eea-map/Arcgis/helpers';
|
|
5
|
-
import Fold from '
|
|
5
|
+
import Fold from '@eeacms/volto-eea-map/Arcgis/Editor/Fold/Fold';
|
|
6
6
|
|
|
7
7
|
import Panel from './Panel';
|
|
8
8
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { memo, useState, useEffect, useContext, useMemo } from 'react';
|
|
2
2
|
import { compose } from 'redux';
|
|
3
|
-
import
|
|
3
|
+
import isNil from 'lodash/isNil';
|
|
4
|
+
import toNumber from 'lodash/toNumber';
|
|
4
5
|
import { v4 as uuid } from 'uuid';
|
|
5
6
|
import { QueryBuilder, Rule as QBRule, useRule } from 'react-querybuilder';
|
|
6
7
|
import { Dimmer, Loader } from 'semantic-ui-react';
|
|
7
|
-
import
|
|
8
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
9
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
8
10
|
import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
|
9
11
|
import addSVG from '@plone/volto/icons/add.svg';
|
|
10
12
|
import {
|
|
@@ -14,7 +16,7 @@ import {
|
|
|
14
16
|
} from '@eeacms/volto-eea-map/Arcgis/helpers';
|
|
15
17
|
import EditorContext from '@eeacms/volto-eea-map/Arcgis/Editor/EditorContext';
|
|
16
18
|
import Panel from './Panel';
|
|
17
|
-
import Fold from '
|
|
19
|
+
import Fold from '@eeacms/volto-eea-map/Arcgis/Editor/Fold/Fold';
|
|
18
20
|
|
|
19
21
|
function getLayersChoices(layers = []) {
|
|
20
22
|
return layers.map((layer) => [
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
3
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
4
|
+
import { withVariationSchemaEnhancer } from '@plone/volto/helpers//Extensions';
|
|
4
5
|
import addSVG from '@plone/volto/icons/add.svg';
|
|
5
6
|
import Panel from './Panel';
|
|
6
|
-
import Fold from '
|
|
7
|
-
import { debounce, getWidgets } from '
|
|
7
|
+
import Fold from '@eeacms/volto-eea-map/Arcgis/Editor/Fold/Fold';
|
|
8
|
+
import { debounce, getWidgets } from '@eeacms/volto-eea-map/Arcgis/helpers';
|
|
8
9
|
import {
|
|
9
10
|
expandKeys,
|
|
10
11
|
positions,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useContext, useEffect, useMemo, memo } from 'react';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import
|
|
3
|
+
import uniq from 'lodash/uniq';
|
|
4
|
+
import isObject from 'lodash/isObject';
|
|
5
|
+
import isNaN from 'lodash/isNaN';
|
|
4
6
|
|
|
5
7
|
import useClass from '@eeacms/volto-eea-map/hooks/useClass';
|
|
6
8
|
import useChangedProps from '@eeacms/volto-eea-map/hooks/useChangedProps';
|
package/src/Arcgis/Map/Map.jsx
CHANGED
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
useMemo,
|
|
8
8
|
} from 'react';
|
|
9
9
|
import { EventEmitter } from 'events';
|
|
10
|
-
import
|
|
10
|
+
import isNaN from 'lodash/isNaN';
|
|
11
|
+
import isObject from 'lodash/isObject';
|
|
11
12
|
|
|
12
13
|
import useClass from '@eeacms/volto-eea-map/hooks/useClass';
|
|
13
14
|
import useChangedProps from '@eeacms/volto-eea-map/hooks/useChangedProps';
|
|
@@ -76,6 +77,7 @@ class $Map extends EventEmitter {
|
|
|
76
77
|
#props = {};
|
|
77
78
|
#map = null;
|
|
78
79
|
#view = null;
|
|
80
|
+
#withCustomViewpoint = undefined;
|
|
79
81
|
reactiveUtils = null;
|
|
80
82
|
|
|
81
83
|
constructor(props) {
|
|
@@ -104,12 +106,16 @@ class $Map extends EventEmitter {
|
|
|
104
106
|
return this.#props;
|
|
105
107
|
}
|
|
106
108
|
|
|
109
|
+
get withCustomViewpoint() {
|
|
110
|
+
return this.#withCustomViewpoint;
|
|
111
|
+
}
|
|
112
|
+
|
|
107
113
|
set props(props) {
|
|
108
114
|
this.#props = props;
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
set withCustomViewpoint(value) {
|
|
112
|
-
this
|
|
118
|
+
this.#withCustomViewpoint = value;
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
async loadModules() {
|
|
@@ -8,10 +8,14 @@ import React, {
|
|
|
8
8
|
useRef,
|
|
9
9
|
} from 'react';
|
|
10
10
|
import Map from './Map';
|
|
11
|
-
import Layer from '
|
|
12
|
-
import Widget from '
|
|
11
|
+
import Layer from '@eeacms/volto-eea-map/Arcgis/Layer/Layer';
|
|
12
|
+
import Widget from '@eeacms/volto-eea-map/Arcgis/Widget/Widget';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
getBasemap,
|
|
16
|
+
getLayers,
|
|
17
|
+
getWidgets,
|
|
18
|
+
} from '@eeacms/volto-eea-map/Arcgis/helpers';
|
|
15
19
|
|
|
16
20
|
const MapBuilder = forwardRef((props, ref) => {
|
|
17
21
|
const { data, properties } = props || {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useContext, useEffect, useMemo, memo } from 'react';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
|
|
4
|
-
import MapContext from '
|
|
4
|
+
import MapContext from '@eeacms/volto-eea-map/Arcgis/Map/MapContext';
|
|
5
5
|
|
|
6
6
|
import useClass from '@eeacms/volto-eea-map/hooks/useClass';
|
|
7
7
|
|
package/src/Arcgis/helpers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { Message } from 'semantic-ui-react';
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
4
|
+
import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
|
|
5
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
6
6
|
import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
|
|
7
7
|
|
|
8
8
|
import { schema } from './schema';
|
|
@@ -2,8 +2,8 @@ import React, { useMemo, useEffect } from 'react';
|
|
|
2
2
|
import { v4 as uuid } from 'uuid';
|
|
3
3
|
import { connect } from 'react-redux';
|
|
4
4
|
import { compose } from 'redux';
|
|
5
|
-
import { flattenToAppURL } from '@plone/volto/helpers';
|
|
6
|
-
import { getContent } from '@plone/volto/actions';
|
|
5
|
+
import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
|
|
6
|
+
import { getContent } from '@plone/volto/actions/content/content';
|
|
7
7
|
import { PrivacyProtection } from '@eeacms/volto-embed';
|
|
8
8
|
import { getLayers } from '@eeacms/volto-eea-map/Arcgis/helpers';
|
|
9
9
|
import MapBuilder from '@eeacms/volto-eea-map/Arcgis/Map/MapBuilder';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
4
4
|
|
|
5
5
|
const Link = ({ children, ...props }) => {
|
|
6
6
|
if (props.href) {
|
package/src/Toolbar/Sources.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { Popup } from 'semantic-ui-react';
|
|
4
|
-
import
|
|
4
|
+
import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink';
|
|
5
5
|
|
|
6
6
|
const Link = ({ children, ...props }) => {
|
|
7
7
|
if (props.href) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { hasBlocksData } from '@plone/volto/helpers';
|
|
2
|
+
import { hasBlocksData } from '@plone/volto/helpers/Blocks/Blocks';
|
|
3
3
|
import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
4
4
|
import { pickMetadata } from '@eeacms/volto-embed/helpers';
|
|
5
5
|
import MapBuilder from '@eeacms/volto-eea-map/Arcgis/Map/MapBuilder';
|
|
6
|
-
import Toolbar from '
|
|
6
|
+
import Toolbar from '@eeacms/volto-eea-map/Toolbar/Toolbar';
|
|
7
7
|
|
|
8
8
|
const VisualizationView = (props) => {
|
|
9
9
|
const content = props && props.content ? props.content : {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
3
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
3
4
|
import { Button } from 'semantic-ui-react';
|
|
4
5
|
import loadable from '@loadable/component';
|
|
5
6
|
import clearSVG from '@plone/volto/icons/clear.svg';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { compose } from 'redux';
|
|
3
3
|
import { injectIntl } from 'react-intl';
|
|
4
|
-
import
|
|
4
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
5
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
5
6
|
import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
|
|
6
7
|
import {
|
|
7
8
|
customSelectStyles,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { InlineForm } from '@plone/volto/components';
|
|
1
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
2
|
+
import toNumber from 'lodash/toNumber';
|
|
4
3
|
|
|
5
4
|
import { simpleSymbols as simpleSymbolsOptions } from '@eeacms/volto-eea-map/constants';
|
|
6
5
|
|
|
7
|
-
import { simpleSymbols } from '
|
|
6
|
+
import { simpleSymbols } from '@eeacms/volto-eea-map/Widgets/ArcgisRendererWidget/RendererEditor/_defaults';
|
|
8
7
|
|
|
9
8
|
export default function Simple(props) {
|
|
10
9
|
const { $map, value, id, onChange } = props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
2
|
import { Modal, Button } from 'semantic-ui-react';
|
|
3
3
|
import { toast } from 'react-toastify';
|
|
4
|
-
import
|
|
4
|
+
import Toast from '@plone/volto/components/manage/Toast/Toast';
|
|
5
5
|
import {
|
|
6
6
|
initEditor,
|
|
7
7
|
destroyEditor,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import toNumber from 'lodash/toNumber';
|
|
3
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
4
|
+
import InlineForm from '@plone/volto/components/manage/Form/InlineForm';
|
|
4
5
|
|
|
5
6
|
export default function ArcgisViewpointWidget(props) {
|
|
6
7
|
const [watchViewpoint, setWatchViewpoint] = useState(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { connect } from 'react-redux';
|
|
2
2
|
import { pickMetadata } from '@eeacms/volto-embed/helpers';
|
|
3
3
|
import MapBuilder from '@eeacms/volto-eea-map/Arcgis/Map/MapBuilder';
|
|
4
|
-
import Toolbar from '
|
|
4
|
+
import Toolbar from '@eeacms/volto-eea-map/Toolbar/Toolbar';
|
|
5
5
|
|
|
6
6
|
function VisualizationViewWidget(props) {
|
|
7
7
|
const { value, content } = props;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from 'react';
|
|
2
2
|
import { Modal, Button, Grid } from 'semantic-ui-react';
|
|
3
3
|
import { toast } from 'react-toastify';
|
|
4
|
-
import
|
|
4
|
+
import Icon from '@plone/volto/components/theme/Icon/Icon';
|
|
5
|
+
import Toast from '@plone/volto/components/manage/Toast/Toast';
|
|
6
|
+
import FormFieldWrapper from '@plone/volto/components/manage/Widgets/FormFieldWrapper';
|
|
5
7
|
import MapBuilder from '@eeacms/volto-eea-map/Arcgis/Map/MapBuilder';
|
|
6
8
|
import {
|
|
7
9
|
initEditor,
|
|
@@ -11,8 +13,8 @@ import {
|
|
|
11
13
|
} from '@eeacms/volto-eea-map/jsoneditor';
|
|
12
14
|
import editSVG from '@plone/volto/icons/editing.svg';
|
|
13
15
|
import '@eeacms/volto-eea-map/styles/editor.less';
|
|
14
|
-
import MapEditor from '
|
|
15
|
-
import { debounce } from '
|
|
16
|
+
import MapEditor from '@eeacms/volto-eea-map/Arcgis/Editor/Editor';
|
|
17
|
+
import { debounce } from '@eeacms/volto-eea-map/Arcgis/helpers';
|
|
16
18
|
|
|
17
19
|
function JsonEditorModal(props) {
|
|
18
20
|
const { value, onClose, onChange } = props;
|
package/src/constants.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import isFunction from 'lodash/isFunction';
|
|
3
|
+
import isEqual from 'lodash/isEqual';
|
|
3
4
|
|
|
4
5
|
export default function useChangedEffect(callback, props) {
|
|
5
6
|
const prevPropsRef = useRef(props);
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import isString from 'lodash/isString';
|
|
2
2
|
import { toast } from 'react-toastify';
|
|
3
|
-
import
|
|
3
|
+
import Toast from '@plone/volto/components/manage/Toast/Toast';
|
|
4
4
|
|
|
5
5
|
import loadable from '@loadable/component';
|
|
6
6
|
|