@eeacms/volto-arcgis-block 0.1.346 → 0.1.348
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,10 +4,21 @@ 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.348](https://github.com/eea/volto-arcgis-block/compare/0.1.347...0.1.348) - 3 April 2025
|
|
8
|
+
|
|
9
|
+
### [0.1.347](https://github.com/eea/volto-arcgis-block/compare/0.1.346...0.1.347) - 2 April 2025
|
|
10
|
+
|
|
11
|
+
#### :hammer_and_wrench: Others
|
|
12
|
+
|
|
13
|
+
- Merge pull request #923 from eea/develop [Unai Bolivar - [`8073c9e`](https://github.com/eea/volto-arcgis-block/commit/8073c9efeb07111d95eb0abdfc55738339590cbc)]
|
|
14
|
+
- CLMS-282464 (feat): package.json second modify [Urkorue - [`1677d0a`](https://github.com/eea/volto-arcgis-block/commit/1677d0ac1577f04578258c4158acb5d2de9bb071)]
|
|
15
|
+
- CLMS-282464 (feat): package.json modified [Urkorue - [`02fcba4`](https://github.com/eea/volto-arcgis-block/commit/02fcba4787d9cd838cb62acaf37802cf17e92569)]
|
|
16
|
+
- CLMS-282464 (feat): Family filter added [Urkorue - [`61268f3`](https://github.com/eea/volto-arcgis-block/commit/61268f3bb623260a559401f428f2dff913c84515)]
|
|
7
17
|
### [0.1.346](https://github.com/eea/volto-arcgis-block/compare/0.1.345...0.1.346) - 1 April 2025
|
|
8
18
|
|
|
9
19
|
#### :hammer_and_wrench: Others
|
|
10
20
|
|
|
21
|
+
- Merge pull request #919 from eea/develop [Unai Bolivar - [`b16a335`](https://github.com/eea/volto-arcgis-block/commit/b16a335748297d68b1df1e9e9159f62e28b7defd)]
|
|
11
22
|
- CLMS-286065 (bug): Pan cursor no longer pushes other widget buttons down when loading in view [Unai Bolivar - [`98bb42b`](https://github.com/eea/volto-arcgis-block/commit/98bb42bcf2ef04fae4b2821c2b7290e911c84478)]
|
|
12
23
|
- CLMS-286065 (bug): Fixed bug where deleting a user service does not uncheck the rest of the user services [Unai Bolivar - [`300be08`](https://github.com/eea/volto-arcgis-block/commit/300be0808a3c81ee21581ae64080b1533ac9b784)]
|
|
13
24
|
- CLMS-286081 (bug): Fixed persistence for user services of logged user. [Unai Bolivar - [`43dacf7`](https://github.com/eea/volto-arcgis-block/commit/43dacf79aefaf6925f9cdfdaedacb7fcae9fab63)]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-arcgis-block",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.348",
|
|
4
4
|
"description": "volto-arcgis-block: Volto add-on",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "European Environment Agency: CodeSyntax",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"url": "git@github.com:eea/volto-arcgis-block.git"
|
|
17
17
|
},
|
|
18
18
|
"addons": [
|
|
19
|
-
"@eeacms/volto-clms-utils"
|
|
19
|
+
"@eeacms/volto-clms-utils",
|
|
20
|
+
"@eeacms/volto-taxonomy"
|
|
20
21
|
],
|
|
21
22
|
"lint-staged": {
|
|
22
23
|
"src/**/*.{js,jsx,ts,tsx,json}": [
|
|
@@ -65,7 +66,8 @@
|
|
|
65
66
|
"esri-loader": "3.4.0",
|
|
66
67
|
"highcharts": "^9.3.2",
|
|
67
68
|
"highcharts-react-official": "^3.1.0",
|
|
68
|
-
"react-datepicker": "4.15.0"
|
|
69
|
+
"react-datepicker": "4.15.0",
|
|
70
|
+
"@eeacms/volto-taxonomy": "5.1.0"
|
|
69
71
|
},
|
|
70
72
|
"devDependencies": {
|
|
71
73
|
"@cypress/code-coverage": "^3.9.5",
|
|
@@ -23,7 +23,7 @@ import BookmarkWidget from './BookmarkWidget';
|
|
|
23
23
|
import LoadingSpinner from './LoadingSpinner';
|
|
24
24
|
import UploadWidget from './UploadWidget';
|
|
25
25
|
import { injectLazyLibs } from '@plone/volto/helpers/Loadable';
|
|
26
|
-
|
|
26
|
+
import { getTaxonomy } from '@eeacms/volto-taxonomy/actions';
|
|
27
27
|
|
|
28
28
|
//import "isomorphic-fetch"; <-- Necessary to use fetch?
|
|
29
29
|
var Map, MapView, Zoom, intl, Basemap, WebTileLayer, Extent;
|
|
@@ -76,7 +76,7 @@ class MapViewer extends React.Component {
|
|
|
76
76
|
this.uploadFileHandler = this.uploadFileHandler.bind(this);
|
|
77
77
|
this.uploadFileErrorHandler = this.uploadFileErrorHandler.bind(this);
|
|
78
78
|
this.uploadUrlServiceHandler = this.uploadUrlServiceHandler.bind(this);
|
|
79
|
-
|
|
79
|
+
this.getTaxonomy = this.props.getTaxonomy.bind(this);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
mapLayersHandler(newLayers) {
|
|
@@ -649,17 +649,18 @@ export const CheckUserID = ({ reference }) => {
|
|
|
649
649
|
onServiceChange={reference.serviceChangeHandler}
|
|
650
650
|
uploadFileErrorHandler={reference.uploadFileErrorHandler}
|
|
651
651
|
userID={user_id}
|
|
652
|
+
getTaxonomy={reference.getTaxonomy}
|
|
652
653
|
/>
|
|
653
654
|
</>
|
|
654
655
|
)}
|
|
655
656
|
</>
|
|
656
657
|
);
|
|
657
658
|
};
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
659
|
+
const mapDispatchToProps = (dispatch) => {
|
|
660
|
+
return {
|
|
661
|
+
getTaxonomy: (name) => dispatch(getTaxonomy(name)),
|
|
662
|
+
};
|
|
663
|
+
};
|
|
663
664
|
|
|
664
665
|
export default compose(
|
|
665
666
|
connect(
|
|
@@ -668,6 +669,6 @@ export default compose(
|
|
|
668
669
|
}),
|
|
669
670
|
{ MapViewerConfig },
|
|
670
671
|
),
|
|
671
|
-
|
|
672
|
+
connect(null, mapDispatchToProps),
|
|
672
673
|
injectLazyLibs('highcharts'),
|
|
673
674
|
)(MapViewer, MenuWidget);
|
|
@@ -501,7 +501,7 @@ class MenuWidget extends React.Component {
|
|
|
501
501
|
});
|
|
502
502
|
|
|
503
503
|
this.activeLayersHandler = this.props.activeLayersHandler;
|
|
504
|
-
|
|
504
|
+
this.getTaxonomy = this.props.getTaxonomy;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
507
|
loader() {
|
|
@@ -4729,39 +4729,39 @@ class MenuWidget extends React.Component {
|
|
|
4729
4729
|
}
|
|
4730
4730
|
}
|
|
4731
4731
|
async loadFamilyFilters() {
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4732
|
+
var selectedFamily = document.getElementById('select-family');
|
|
4733
|
+
var selectedProduct = document.getElementById('select-product');
|
|
4734
|
+
this.removeOptions(selectedFamily);
|
|
4735
|
+
let tax = await this.getTaxonomy('collective.taxonomy.family');
|
|
4736
|
+
let hasFamily = false;
|
|
4737
|
+
selectedFamily.options.add(
|
|
4738
|
+
new Option('Select a sub-group', 'default', false, false),
|
|
4739
|
+
);
|
|
4740
|
+
selectedFamily.options[0].disabled = true;
|
|
4741
|
+
tax.tree.forEach((element) => {
|
|
4742
|
+
if (element.title === selectedProduct.selectedOptions[0].text) {
|
|
4743
|
+
hasFamily = true;
|
|
4744
|
+
element.children.forEach((child) => {
|
|
4745
|
+
selectedFamily.options.add(
|
|
4746
|
+
new Option(child.title, child.key, child.key),
|
|
4747
|
+
);
|
|
4748
|
+
});
|
|
4749
|
+
}
|
|
4750
|
+
});
|
|
4751
|
+
let familyFilter = document.querySelector('.menu-family-filter');
|
|
4752
|
+
if (familyFilter) {
|
|
4753
|
+
if (!hasFamily) {
|
|
4754
|
+
familyFilter.setAttribute('style', 'display: none;');
|
|
4755
|
+
} else {
|
|
4756
|
+
familyFilter.setAttribute('style', 'display: flex;');
|
|
4757
|
+
}
|
|
4758
|
+
}
|
|
4759
4759
|
}
|
|
4760
4760
|
async menuSearch() {
|
|
4761
4761
|
let searchText;
|
|
4762
4762
|
let componentFilter;
|
|
4763
4763
|
let productFilter;
|
|
4764
|
-
|
|
4764
|
+
let familyFilter;
|
|
4765
4765
|
let result = false;
|
|
4766
4766
|
if (document.querySelector('#menu-searchtext')) {
|
|
4767
4767
|
searchText = document
|
|
@@ -4774,9 +4774,15 @@ class MenuWidget extends React.Component {
|
|
|
4774
4774
|
if (document.getElementById('select-product')) {
|
|
4775
4775
|
productFilter = document.getElementById('select-product').value;
|
|
4776
4776
|
}
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4777
|
+
if (document.getElementById('select-family')) {
|
|
4778
|
+
familyFilter = document.getElementById('select-family').value;
|
|
4779
|
+
}
|
|
4780
|
+
if (
|
|
4781
|
+
document.querySelector('.menu-family-filter').getAttribute('style') ===
|
|
4782
|
+
'display: none;'
|
|
4783
|
+
) {
|
|
4784
|
+
familyFilter = 'default';
|
|
4785
|
+
}
|
|
4780
4786
|
for (let index = 0; index < this.compCfg.length; index++) {
|
|
4781
4787
|
let componentFound = false;
|
|
4782
4788
|
let componentChecked = false;
|
|
@@ -4809,7 +4815,8 @@ class MenuWidget extends React.Component {
|
|
|
4809
4815
|
if (
|
|
4810
4816
|
searchText === '' &&
|
|
4811
4817
|
componentFilter === 'default' &&
|
|
4812
|
-
productFilter === 'default'
|
|
4818
|
+
productFilter === 'default' &&
|
|
4819
|
+
familyFilter === 'default'
|
|
4813
4820
|
) {
|
|
4814
4821
|
this.filtersApplied = false;
|
|
4815
4822
|
componentFound = true;
|
|
@@ -4837,7 +4844,9 @@ class MenuWidget extends React.Component {
|
|
|
4837
4844
|
productFilter === 'default') &&
|
|
4838
4845
|
(this.compCfg[index].ComponentPosition.toString() ===
|
|
4839
4846
|
componentFilter ||
|
|
4840
|
-
componentFilter === 'default')
|
|
4847
|
+
componentFilter === 'default') &&
|
|
4848
|
+
(dataset?.FamilyTitle === familyFilter ||
|
|
4849
|
+
familyFilter === 'default'))
|
|
4841
4850
|
) {
|
|
4842
4851
|
this.filtersApplied = true;
|
|
4843
4852
|
componentFound = true;
|
|
@@ -5166,10 +5175,14 @@ class MenuWidget extends React.Component {
|
|
|
5166
5175
|
></select>
|
|
5167
5176
|
</span>
|
|
5168
5177
|
<span className="menu-filter menu-family-filter">
|
|
5169
|
-
|
|
5178
|
+
Product sub-group
|
|
5170
5179
|
<select
|
|
5171
5180
|
id="select-family"
|
|
5172
5181
|
class="esri-select filter-select"
|
|
5182
|
+
onBlur={() => {}}
|
|
5183
|
+
onChange={() => {
|
|
5184
|
+
this.menuSearch();
|
|
5185
|
+
}}
|
|
5173
5186
|
></select>
|
|
5174
5187
|
</span>
|
|
5175
5188
|
</div>
|