@eeacms/volto-arcgis-block 0.1.323 → 0.1.324
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ 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
|
+
### [0.1.324](https://github.com/eea/volto-arcgis-block/compare/0.1.323...0.1.324) - 11 December 2024
|
|
8
|
+
|
|
7
9
|
### [0.1.323](https://github.com/eea/volto-arcgis-block/compare/0.1.322...0.1.323) - 10 December 2024
|
|
8
10
|
|
|
9
11
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React, { createRef } from 'react';
|
|
2
2
|
import { loadModules } from 'esri-loader';
|
|
3
3
|
import { Loader } from 'semantic-ui-react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
|
|
7
|
-
|
|
8
|
-
import Highcharts from 'highcharts';
|
|
9
|
-
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
4
|
+
import loadable from '@loadable/component';
|
|
5
|
+
import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
|
|
6
|
+
// import { FontAwesomeIcon } from '@eeacms/volto-clms-utils/components';
|
|
7
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
10
8
|
|
|
11
9
|
var GeometryEngine, Graphic, esriRequest;
|
|
12
10
|
|
|
13
|
-
//
|
|
11
|
+
// import Highcharts from 'highcharts';
|
|
14
12
|
|
|
13
|
+
const HighchartsReact = loadable(() => import('highcharts-react-official'));
|
|
15
14
|
class InfoWidget extends React.Component {
|
|
16
15
|
/**
|
|
17
16
|
* Creator of the InfoWidget widget class
|
|
@@ -1156,11 +1155,12 @@ class InfoWidget extends React.Component {
|
|
|
1156
1155
|
{this.state.pixelInfo && !noData && (
|
|
1157
1156
|
<>
|
|
1158
1157
|
{this.loadVariableSelector(this.state.layerIndex)}
|
|
1159
|
-
{
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1158
|
+
{this.Highcharts && (
|
|
1159
|
+
<HighchartsReact
|
|
1160
|
+
highcharts={this.Highcharts}
|
|
1161
|
+
options={this.loadInfoChart(this.state.layerIndex)}
|
|
1162
|
+
/>
|
|
1163
|
+
)}
|
|
1164
1164
|
{this.loadStatisticsSelector(this.state.layerIndex)}
|
|
1165
1165
|
{this.loadTimeInfoTable(this.state.layerIndex)}
|
|
1166
1166
|
</>
|
|
@@ -1197,5 +1197,4 @@ class InfoWidget extends React.Component {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
-
|
|
1201
|
-
export default InfoWidget;
|
|
1200
|
+
export default injectLazyLibs('highcharts')(InfoWidget);
|
|
@@ -21,6 +21,7 @@ import HotspotWidget from './HotspotWidget';
|
|
|
21
21
|
import PanWidget from './PanWidget';
|
|
22
22
|
import BookmarkWidget from './BookmarkWidget';
|
|
23
23
|
import LoadingSpinner from './LoadingSpinner';
|
|
24
|
+
import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
|
|
24
25
|
|
|
25
26
|
//import "isomorphic-fetch"; <-- Necessary to use fetch?
|
|
26
27
|
var Map, MapView, Zoom, intl, Basemap, WebTileLayer, Extent;
|
|
@@ -163,19 +164,9 @@ class MapViewer extends React.Component {
|
|
|
163
164
|
// return obj;
|
|
164
165
|
// }
|
|
165
166
|
|
|
166
|
-
// waitForContainer(mapdiv) {
|
|
167
|
-
// while (mapdiv === null) {
|
|
168
|
-
// new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms
|
|
169
|
-
// }
|
|
170
|
-
// return mapdiv;
|
|
171
|
-
// }
|
|
172
|
-
|
|
173
167
|
async componentDidMount() {
|
|
174
168
|
loadCss();
|
|
175
169
|
await this.loader();
|
|
176
|
-
// this.state.url = window.location.href;
|
|
177
|
-
// await this.waitForDataFill(this.compCfg);
|
|
178
|
-
|
|
179
170
|
this.positronCompositeBasemap = new Basemap({
|
|
180
171
|
title: 'Positron composite',
|
|
181
172
|
thumbnailUrl: this.cfgUrls.positronCompositeThumbnail,
|
|
@@ -185,12 +176,8 @@ class MapViewer extends React.Component {
|
|
|
185
176
|
copyright: '© OpenStreetMap (and) contributors, CC-BY-SA',
|
|
186
177
|
}),
|
|
187
178
|
],
|
|
188
|
-
// referenceLayers: [
|
|
189
|
-
// new _WebTileLayer(...)
|
|
190
|
-
// ],
|
|
191
179
|
});
|
|
192
180
|
this.map = new Map({
|
|
193
|
-
// basemap: 'topo',
|
|
194
181
|
basemap: this.positronCompositeBasemap,
|
|
195
182
|
logo: false,
|
|
196
183
|
});
|
|
@@ -290,7 +277,6 @@ class MapViewer extends React.Component {
|
|
|
290
277
|
componentWillUnmount() {
|
|
291
278
|
// clean up
|
|
292
279
|
if (this.view) {
|
|
293
|
-
//clearInterval(this.intervalId);
|
|
294
280
|
this.view.container = null;
|
|
295
281
|
this.view.destroy();
|
|
296
282
|
delete this.view;
|
|
@@ -549,4 +535,5 @@ export default compose(
|
|
|
549
535
|
}),
|
|
550
536
|
{ MapViewerConfig },
|
|
551
537
|
),
|
|
538
|
+
injectLazyLibs('highcharts'),
|
|
552
539
|
)(MapViewer);
|