@eeacms/volto-arcgis-block 0.1.286 → 0.1.287
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,11 @@ 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.287](https://github.com/eea/volto-arcgis-block/compare/0.1.286...0.1.287) - 13 June 2024
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- CLMS-270731 (Feat): Prepackage option added [Urkorue - [`13c5f1b`](https://github.com/eea/volto-arcgis-block/commit/13c5f1ba0d214de14c0a9feffdb18cc18d972b10)]
|
|
7
12
|
### [0.1.286](https://github.com/eea/volto-arcgis-block/compare/0.1.285...0.1.286) - 11 June 2024
|
|
8
13
|
|
|
9
14
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -48,6 +48,7 @@ class AreaWidget extends React.Component {
|
|
|
48
48
|
this.generateFeatureCollection = this.generateFeatureCollection.bind(this);
|
|
49
49
|
this.addFeatureCollectionToMap = this.addFeatureCollectionToMap.bind(this);
|
|
50
50
|
this.checkFeatureCount = this.checkFeatureCount.bind(this);
|
|
51
|
+
this.prepackage = false;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
loader() {
|
|
@@ -200,11 +201,25 @@ class AreaWidget extends React.Component {
|
|
|
200
201
|
if (id === 'nuts1' || id === 'nuts2' || id === 'nuts3') {
|
|
201
202
|
document.getElementById('download_area_select_nuts').checked = true;
|
|
202
203
|
}
|
|
203
|
-
if (id === 'nuts0' || id === 'area') {
|
|
204
|
+
if (id === 'nuts0' || id === 'area' || id === 'prepackage') {
|
|
204
205
|
document.getElementById('download_area_select_nuts1').checked = false;
|
|
205
206
|
document.getElementById('download_area_select_nuts2').checked = false;
|
|
206
207
|
document.getElementById('download_area_select_nuts3').checked = false;
|
|
207
208
|
}
|
|
209
|
+
this.props.prepackageHandler(
|
|
210
|
+
document.querySelector('#download_prepackage').checked,
|
|
211
|
+
);
|
|
212
|
+
if (document.querySelector('#download_prepackage').checked) {
|
|
213
|
+
this.setState({
|
|
214
|
+
showInfoPopup: true,
|
|
215
|
+
infoPopupType: 'download',
|
|
216
|
+
});
|
|
217
|
+
} else {
|
|
218
|
+
this.setState({
|
|
219
|
+
showInfoPopup: true,
|
|
220
|
+
infoPopupType: 'area',
|
|
221
|
+
});
|
|
222
|
+
}
|
|
208
223
|
}
|
|
209
224
|
nuts0handler(e) {
|
|
210
225
|
this.loadNutsService(e.target.value, [0]);
|
|
@@ -835,87 +850,66 @@ class AreaWidget extends React.Component {
|
|
|
835
850
|
document.querySelector('.esri-attribution__powered-by').style.display =
|
|
836
851
|
'none';
|
|
837
852
|
}
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
// this.setState({
|
|
899
|
-
// showInfoPopup: true,
|
|
900
|
-
// infoPopupType: 'download',
|
|
901
|
-
// });
|
|
902
|
-
// // if (this.props.download) {
|
|
903
|
-
// // document.querySelector(
|
|
904
|
-
// // '.drawRectanglePopup-block',
|
|
905
|
-
// // ).style.display = 'none';
|
|
906
|
-
// // }
|
|
907
|
-
// }
|
|
908
|
-
// });
|
|
909
|
-
// if (
|
|
910
|
-
// !found && count==0
|
|
911
|
-
// ) {
|
|
912
|
-
// document.querySelector('.no-result-message').style.display = 'block';
|
|
913
|
-
// } else if (found) {
|
|
914
|
-
// document.querySelector('.no-result-message').style.display = 'none';
|
|
915
|
-
// }
|
|
916
|
-
// });
|
|
917
|
-
// });
|
|
918
|
-
// }
|
|
853
|
+
areaSearch() {
|
|
854
|
+
let searchText = document.querySelector('#area-searchtext').value;
|
|
855
|
+
if (searchText.length <= 2) {
|
|
856
|
+
this.loadNutsService('nuts0', [0]);
|
|
857
|
+
this.loadCountriesService('nuts0');
|
|
858
|
+
document.getElementById('download_area_select_nuts0').checked = true;
|
|
859
|
+
this.nutsRadioButton('nuts0');
|
|
860
|
+
} else if (searchText.length === 3) {
|
|
861
|
+
this.loadNutsService('nuts1', [1, 2]);
|
|
862
|
+
document.getElementById('download_area_select_nuts1').checked = true;
|
|
863
|
+
this.nutsRadioButton('nuts1');
|
|
864
|
+
} else if (searchText.length === 4) {
|
|
865
|
+
this.loadNutsService('nuts2', [3, 4, 5]);
|
|
866
|
+
document.getElementById('download_area_select_nuts2').checked = true;
|
|
867
|
+
this.nutsRadioButton('nuts2');
|
|
868
|
+
} else if (searchText.length === 5) {
|
|
869
|
+
this.loadNutsService('nuts3', [6, 7, 8]);
|
|
870
|
+
document.getElementById('download_area_select_nuts3').checked = true;
|
|
871
|
+
this.nutsRadioButton('nuts3');
|
|
872
|
+
}
|
|
873
|
+
let found = false;
|
|
874
|
+
let count = this.nutsGroupLayer.layers.items.length;
|
|
875
|
+
const queryParams = this.nutsGroupLayer.layers.items[0].createQuery();
|
|
876
|
+
queryParams.where = `(NUTS_ID = '${searchText}')`;
|
|
877
|
+
queryParams.outSpatialReference = this.props.view.spatialReference;
|
|
878
|
+
document.querySelector('.no-result-message').style.display = 'none';
|
|
879
|
+
this.nutsGroupLayer.layers.items.forEach((item) => {
|
|
880
|
+
item.queryFeatures(queryParams).then((response) => {
|
|
881
|
+
count = count - 1;
|
|
882
|
+
response.features.forEach((feature) => {
|
|
883
|
+
if (feature.attributes.NUTS_ID === searchText) {
|
|
884
|
+
found = true;
|
|
885
|
+
this.props.updateArea(feature);
|
|
886
|
+
let symbol = new SimpleFillSymbol(
|
|
887
|
+
'solid',
|
|
888
|
+
new SimpleLineSymbol('solid', new Color([232, 104, 80]), 2),
|
|
889
|
+
new Color([232, 104, 80, 0.25]),
|
|
890
|
+
);
|
|
891
|
+
let highlight = new Graphic(feature.geometry, symbol);
|
|
892
|
+
this.props.view.graphics.removeAll();
|
|
893
|
+
this.props.view.graphics.add(highlight);
|
|
894
|
+
this.setState({
|
|
895
|
+
showInfoPopup: true,
|
|
896
|
+
infoPopupType: 'download',
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
if (!found && count === 0) {
|
|
901
|
+
document.querySelector('.no-result-message').style.display = 'block';
|
|
902
|
+
} else if (found) {
|
|
903
|
+
document.querySelector('.no-result-message').style.display = 'none';
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
prepackageButton(event) {
|
|
910
|
+
this.clearWidget();
|
|
911
|
+
this.nutsRadioButton(event.target.value);
|
|
912
|
+
}
|
|
919
913
|
|
|
920
914
|
/**
|
|
921
915
|
* This method is executed after the rener method is executed
|
|
@@ -1071,135 +1065,165 @@ class AreaWidget extends React.Component {
|
|
|
1071
1065
|
)}
|
|
1072
1066
|
<div className="right-panel-content">
|
|
1073
1067
|
<div className="area-panel">
|
|
1074
|
-
<div className="
|
|
1075
|
-
{/* <input
|
|
1076
|
-
type="text"
|
|
1077
|
-
maxLength="6"
|
|
1078
|
-
id="area-searchtext"
|
|
1079
|
-
placeholder="Search"
|
|
1080
|
-
/>
|
|
1081
|
-
<button
|
|
1082
|
-
aria-label="Search"
|
|
1083
|
-
class="esri-button area-searchbutton"
|
|
1084
|
-
onClick={this.areaSearch.bind(this)}
|
|
1085
|
-
onKeyDown={(e) => {
|
|
1086
|
-
if (
|
|
1087
|
-
!e.altKey &&
|
|
1088
|
-
e.code !== 'Tab' &&
|
|
1089
|
-
!e.ctrlKey &&
|
|
1090
|
-
e.code !== 'Delete' &&
|
|
1091
|
-
!e.shiftKey &&
|
|
1092
|
-
!e.code.startsWith('F')
|
|
1093
|
-
) {
|
|
1094
|
-
this.areaSearch.bind(this);
|
|
1095
|
-
}
|
|
1096
|
-
}}
|
|
1097
|
-
>
|
|
1098
|
-
<span class="ccl-icon-zoom"></span>
|
|
1099
|
-
</button>
|
|
1100
|
-
<div className="no-result-message">No result found</div> */}
|
|
1101
|
-
<div className="ccl-form">
|
|
1068
|
+
<div className="ccl-form ccl-form-head">
|
|
1102
1069
|
<fieldset className="ccl-fieldset">
|
|
1103
1070
|
<div className="ccl-form-group">
|
|
1104
1071
|
<input
|
|
1105
1072
|
type="radio"
|
|
1106
|
-
id="
|
|
1107
|
-
name="downloadAreaSelect"
|
|
1108
|
-
value="nuts0"
|
|
1109
|
-
className="ccl-checkbox cl-required ccl-form-check-input"
|
|
1110
|
-
defaultChecked
|
|
1111
|
-
onClick={this.nuts0handler.bind(this)}
|
|
1112
|
-
></input>
|
|
1113
|
-
<label
|
|
1114
|
-
className="ccl-form-radio-label"
|
|
1115
|
-
htmlFor="download_area_select_nuts0"
|
|
1116
|
-
>
|
|
1117
|
-
<span>By country</span>
|
|
1118
|
-
</label>
|
|
1119
|
-
</div>
|
|
1120
|
-
<div className="ccl-form-group">
|
|
1121
|
-
<input
|
|
1122
|
-
type="radio"
|
|
1123
|
-
id="download_area_select_nuts"
|
|
1073
|
+
id="download_prepackage"
|
|
1124
1074
|
name="downloadAreaSelect"
|
|
1125
|
-
value="
|
|
1126
|
-
className="ccl-checkbox
|
|
1127
|
-
onClick={this.
|
|
1075
|
+
value="prepackage"
|
|
1076
|
+
className="ccl-checkbox ccl-required ccl-form-check-input"
|
|
1077
|
+
onClick={this.prepackageButton.bind(this)}
|
|
1128
1078
|
></input>
|
|
1129
1079
|
<label
|
|
1130
1080
|
className="ccl-form-radio-label"
|
|
1131
|
-
htmlFor="
|
|
1081
|
+
htmlFor="download_prepackage"
|
|
1132
1082
|
>
|
|
1133
|
-
<span>
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
}
|
|
1138
|
-
target="_blank"
|
|
1139
|
-
rel="noopener noreferrer"
|
|
1140
|
-
onClick={(e) => e.stopPropagation()}
|
|
1141
|
-
onKeyDown={(e) => e.stopPropagation()}
|
|
1142
|
-
>
|
|
1143
|
-
<span className="map-menu-icon nuts-menu-icon">
|
|
1144
|
-
<FontAwesomeIcon icon={['fa', 'info-circle']} />
|
|
1145
|
-
</span>
|
|
1146
|
-
</a>
|
|
1083
|
+
<span>
|
|
1084
|
+
For fast download check out the pre-packaged data
|
|
1085
|
+
collection
|
|
1086
|
+
</span>
|
|
1147
1087
|
</label>
|
|
1148
1088
|
</div>
|
|
1149
|
-
|
|
1089
|
+
</fieldset>
|
|
1090
|
+
</div>
|
|
1091
|
+
<div className="area-header">
|
|
1092
|
+
Area selection options for custom download:
|
|
1093
|
+
</div>
|
|
1094
|
+
<div className="area-header2">
|
|
1095
|
+
Select by country or region on the map:
|
|
1096
|
+
<div className="ccl-form">
|
|
1097
|
+
<fieldset className="ccl-fieldset">
|
|
1150
1098
|
<div className="ccl-form-group">
|
|
1151
1099
|
<input
|
|
1152
1100
|
type="radio"
|
|
1153
|
-
id="
|
|
1154
|
-
name="
|
|
1155
|
-
value="
|
|
1156
|
-
className="ccl-checkbox
|
|
1157
|
-
|
|
1101
|
+
id="download_area_select_nuts0"
|
|
1102
|
+
name="downloadAreaSelect"
|
|
1103
|
+
value="nuts0"
|
|
1104
|
+
className="ccl-checkbox cl-required ccl-form-check-input"
|
|
1105
|
+
defaultChecked
|
|
1106
|
+
onClick={this.nuts0handler.bind(this)}
|
|
1158
1107
|
></input>
|
|
1159
1108
|
<label
|
|
1160
1109
|
className="ccl-form-radio-label"
|
|
1161
|
-
htmlFor="
|
|
1110
|
+
htmlFor="download_area_select_nuts0"
|
|
1162
1111
|
>
|
|
1163
|
-
<span>
|
|
1112
|
+
<span>View countries</span>
|
|
1164
1113
|
</label>
|
|
1165
1114
|
</div>
|
|
1166
1115
|
<div className="ccl-form-group">
|
|
1167
1116
|
<input
|
|
1168
1117
|
type="radio"
|
|
1169
|
-
id="
|
|
1170
|
-
name="
|
|
1171
|
-
value="
|
|
1172
|
-
className="ccl-checkbox
|
|
1173
|
-
onClick={this.
|
|
1118
|
+
id="download_area_select_nuts"
|
|
1119
|
+
name="downloadAreaSelect"
|
|
1120
|
+
value="nuts"
|
|
1121
|
+
className="ccl-checkbox cl-required ccl-form-check-input"
|
|
1122
|
+
onClick={this.nutsRadioButtonGeneral.bind(this)}
|
|
1174
1123
|
></input>
|
|
1175
1124
|
<label
|
|
1176
1125
|
className="ccl-form-radio-label"
|
|
1177
|
-
htmlFor="
|
|
1126
|
+
htmlFor="download_area_select_nuts"
|
|
1178
1127
|
>
|
|
1179
|
-
<span>NUTS
|
|
1128
|
+
<span>View NUTS</span>
|
|
1129
|
+
<a
|
|
1130
|
+
href={
|
|
1131
|
+
'https://land.copernicus.eu/en/faq/map-viewer/what-are-nuts'
|
|
1132
|
+
}
|
|
1133
|
+
target="_blank"
|
|
1134
|
+
rel="noopener noreferrer"
|
|
1135
|
+
onClick={(e) => e.stopPropagation()}
|
|
1136
|
+
onKeyDown={(e) => e.stopPropagation()}
|
|
1137
|
+
>
|
|
1138
|
+
<span className="map-menu-icon nuts-menu-icon">
|
|
1139
|
+
<FontAwesomeIcon icon={['fa', 'info-circle']} />
|
|
1140
|
+
</span>
|
|
1141
|
+
</a>
|
|
1180
1142
|
</label>
|
|
1181
1143
|
</div>
|
|
1182
|
-
<div className="
|
|
1183
|
-
<
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1144
|
+
<div className="nuts-form">
|
|
1145
|
+
<div className="ccl-form-group">
|
|
1146
|
+
<input
|
|
1147
|
+
type="radio"
|
|
1148
|
+
id="download_area_select_nuts1"
|
|
1149
|
+
name="downloadAreaSelectNuts"
|
|
1150
|
+
value="nuts1"
|
|
1151
|
+
className="ccl-checkbox ccl-required ccl-form-check-input"
|
|
1152
|
+
onClick={this.nuts1handler.bind(this)}
|
|
1153
|
+
></input>
|
|
1154
|
+
<label
|
|
1155
|
+
className="ccl-form-radio-label"
|
|
1156
|
+
htmlFor="download_area_select_nuts1"
|
|
1157
|
+
>
|
|
1158
|
+
<span>NUTS 1 (major socio-economic regions)</span>
|
|
1159
|
+
</label>
|
|
1160
|
+
</div>
|
|
1161
|
+
<div className="ccl-form-group">
|
|
1162
|
+
<input
|
|
1163
|
+
type="radio"
|
|
1164
|
+
id="download_area_select_nuts2"
|
|
1165
|
+
name="downloadAreaSelectNuts"
|
|
1166
|
+
value="nuts2"
|
|
1167
|
+
className="ccl-checkbox ccl-required ccl-form-check-input"
|
|
1168
|
+
onClick={this.nuts2handler.bind(this)}
|
|
1169
|
+
></input>
|
|
1170
|
+
<label
|
|
1171
|
+
className="ccl-form-radio-label"
|
|
1172
|
+
htmlFor="download_area_select_nuts2"
|
|
1173
|
+
>
|
|
1174
|
+
<span>NUTS 2 (basic regions)</span>
|
|
1175
|
+
</label>
|
|
1176
|
+
</div>
|
|
1177
|
+
<div className="ccl-form-group">
|
|
1178
|
+
<input
|
|
1179
|
+
type="radio"
|
|
1180
|
+
id="download_area_select_nuts3"
|
|
1181
|
+
name="downloadAreaSelectNuts"
|
|
1182
|
+
value="nuts3"
|
|
1183
|
+
className="ccl-radio ccl-required ccl-form-check-input"
|
|
1184
|
+
onClick={this.nuts3handler.bind(this)}
|
|
1185
|
+
></input>
|
|
1186
|
+
<label
|
|
1187
|
+
className="ccl-form-radio-label"
|
|
1188
|
+
htmlFor="download_area_select_nuts3"
|
|
1189
|
+
>
|
|
1190
|
+
<span>NUTS 3 (small regions)</span>
|
|
1191
|
+
</label>
|
|
1192
|
+
</div>
|
|
1197
1193
|
</div>
|
|
1198
|
-
</
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1194
|
+
</fieldset>
|
|
1195
|
+
</div>
|
|
1196
|
+
</div>
|
|
1197
|
+
<div className="area-header">Type country or region code:</div>
|
|
1198
|
+
<input
|
|
1199
|
+
type="text"
|
|
1200
|
+
maxLength="6"
|
|
1201
|
+
id="area-searchtext"
|
|
1202
|
+
placeholder="Search"
|
|
1203
|
+
/>
|
|
1204
|
+
<button
|
|
1205
|
+
aria-label="Search"
|
|
1206
|
+
class="esri-button area-searchbutton"
|
|
1207
|
+
onClick={this.areaSearch.bind(this)}
|
|
1208
|
+
onKeyDown={(e) => {
|
|
1209
|
+
if (
|
|
1210
|
+
!e.altKey &&
|
|
1211
|
+
e.code !== 'Tab' &&
|
|
1212
|
+
!e.ctrlKey &&
|
|
1213
|
+
e.code !== 'Delete' &&
|
|
1214
|
+
!e.shiftKey &&
|
|
1215
|
+
!e.code.startsWith('F')
|
|
1216
|
+
) {
|
|
1217
|
+
this.areaSearch.bind(this);
|
|
1218
|
+
}
|
|
1219
|
+
}}
|
|
1220
|
+
>
|
|
1221
|
+
<span class="ccl-icon-zoom"></span>
|
|
1222
|
+
</button>
|
|
1223
|
+
<div className="no-result-message">No result found</div>
|
|
1224
|
+
<br></br>
|
|
1225
|
+
<div className="ccl-form">
|
|
1226
|
+
<fieldset className="ccl-fieldset">
|
|
1203
1227
|
<div className="ccl-form-group">
|
|
1204
1228
|
<input
|
|
1205
1229
|
type="radio"
|
|
@@ -1213,9 +1237,8 @@ class AreaWidget extends React.Component {
|
|
|
1213
1237
|
className="ccl-form-radio-label"
|
|
1214
1238
|
htmlFor="download_area_select_rectangle"
|
|
1215
1239
|
>
|
|
1216
|
-
<span>
|
|
1217
|
-
|
|
1218
|
-
area of interest
|
|
1240
|
+
<span className="rectangle-header">
|
|
1241
|
+
Draw a rectangle on the map
|
|
1219
1242
|
</span>
|
|
1220
1243
|
</label>
|
|
1221
1244
|
</div>
|
|
@@ -66,6 +66,7 @@ class MapViewer extends React.Component {
|
|
|
66
66
|
this.hotspotDataHandler = this.hotspotDataHandler.bind(this);
|
|
67
67
|
this.mapLayersHandler = this.mapLayersHandler.bind(this);
|
|
68
68
|
this.bookmarkHandler = this.bookmarkHandler.bind(this);
|
|
69
|
+
this.prepackageHandler = this.prepackageHandler.bind(this);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
mapLayersHandler(newLayers) {
|
|
@@ -114,6 +115,10 @@ class MapViewer extends React.Component {
|
|
|
114
115
|
this.mapViewer.setState({ area: shared_value });
|
|
115
116
|
}
|
|
116
117
|
|
|
118
|
+
prepackageHandler(prepackage) {
|
|
119
|
+
this.setState({ prepackageChecked: prepackage });
|
|
120
|
+
}
|
|
121
|
+
|
|
117
122
|
loader() {
|
|
118
123
|
return loadModules([
|
|
119
124
|
'esri/WebMap',
|
|
@@ -420,6 +425,8 @@ class MapViewer extends React.Component {
|
|
|
420
425
|
mapLayersHandler={this.mapLayersHandler}
|
|
421
426
|
bookmarkData={this.state.bookmarkData}
|
|
422
427
|
bookmarkHandler={this.bookmarkHandler}
|
|
428
|
+
prepackageChecked={this.state.prepackageChecked}
|
|
429
|
+
prepackageHandler={this.prepackageHandler}
|
|
423
430
|
/>
|
|
424
431
|
); //call conf
|
|
425
432
|
}
|
|
@@ -490,6 +497,8 @@ export const CheckLogin = ({ reference }) => {
|
|
|
490
497
|
updateArea={reference.updateArea}
|
|
491
498
|
urls={reference.cfgUrls}
|
|
492
499
|
mapviewer_config={reference.props.mapviewer_config}
|
|
500
|
+
prepackageChecked={reference.state.prepackageChecked}
|
|
501
|
+
prepackageHandler={reference.prepackageHandler}
|
|
493
502
|
/>
|
|
494
503
|
)}
|
|
495
504
|
</>
|
|
@@ -27,6 +27,7 @@ export const AddCartItem = ({
|
|
|
27
27
|
areaData,
|
|
28
28
|
dataset,
|
|
29
29
|
handleOpenPopup,
|
|
30
|
+
prepackage,
|
|
30
31
|
}) => {
|
|
31
32
|
const { addCartItem, isLoggedIn } = useCartState();
|
|
32
33
|
|
|
@@ -185,7 +186,7 @@ export const AddCartItem = ({
|
|
|
185
186
|
Add to cart
|
|
186
187
|
</button>
|
|
187
188
|
</div>
|
|
188
|
-
) : isLoggedIn ? ( // If isLoggedIn == true and user clicks download
|
|
189
|
+
) : isLoggedIn && !prepackage ? ( // If isLoggedIn == true and user clicks download
|
|
189
190
|
<Popup
|
|
190
191
|
trigger={
|
|
191
192
|
<span
|
|
@@ -250,6 +251,39 @@ export const AddCartItem = ({
|
|
|
250
251
|
content="Download"
|
|
251
252
|
{...popupSettings}
|
|
252
253
|
/>
|
|
254
|
+
) : isLoggedIn && prepackage ? (
|
|
255
|
+
<Popup
|
|
256
|
+
trigger={
|
|
257
|
+
<span
|
|
258
|
+
className={
|
|
259
|
+
'map-menu-icon map-menu-icon-login' +
|
|
260
|
+
(dataset.HasPrepackagedFiles ? ' logged' : '')
|
|
261
|
+
}
|
|
262
|
+
onClick={(e) => {
|
|
263
|
+
if (dataset.HasPrepackagedFiles) {
|
|
264
|
+
window.location = dataset.DatasetURL + '#download';
|
|
265
|
+
}
|
|
266
|
+
}}
|
|
267
|
+
onKeyDown={(e) => {}}
|
|
268
|
+
tabIndex="0"
|
|
269
|
+
role="button"
|
|
270
|
+
>
|
|
271
|
+
<FontAwesomeIcon
|
|
272
|
+
className={dataset.HasPrepackagedFiles ? '' : ' locked'}
|
|
273
|
+
icon={['fas', 'download']}
|
|
274
|
+
/>
|
|
275
|
+
{!dataset.HasPrepackagedFiles && (
|
|
276
|
+
<FontAwesomeIcon icon={['fas', 'lock']} />
|
|
277
|
+
)}
|
|
278
|
+
</span>
|
|
279
|
+
}
|
|
280
|
+
content={
|
|
281
|
+
dataset.HasPrepackagedFiles
|
|
282
|
+
? ' Download Prepackage'
|
|
283
|
+
: 'No Prepackage available'
|
|
284
|
+
}
|
|
285
|
+
{...popupSettings}
|
|
286
|
+
/>
|
|
253
287
|
) : (
|
|
254
288
|
// If isLoggedIn == false and user clicks download
|
|
255
289
|
<Popup
|
|
@@ -1464,6 +1498,7 @@ class MenuWidget extends React.Component {
|
|
|
1464
1498
|
areaData={this.props.area}
|
|
1465
1499
|
dataset={dataset}
|
|
1466
1500
|
handleOpenPopup={this.handleOpenPopup}
|
|
1501
|
+
prepackage={this.props.prepackageChecked}
|
|
1467
1502
|
/>
|
|
1468
1503
|
) : (
|
|
1469
1504
|
<span
|
|
@@ -3965,6 +4000,7 @@ class MenuWidget extends React.Component {
|
|
|
3965
4000
|
download={this.props.download}
|
|
3966
4001
|
areaData={this.props.area}
|
|
3967
4002
|
handleOpenPopup={this.handleOpenPopup}
|
|
4003
|
+
prepackage={this.props.prepackageChecked}
|
|
3968
4004
|
/>
|
|
3969
4005
|
</div>
|
|
3970
4006
|
)}
|
|
@@ -317,6 +317,10 @@ div.esri-popover
|
|
|
317
317
|
margin: 0;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
.area-panel {
|
|
321
|
+
padding-top: 13rem;
|
|
322
|
+
}
|
|
323
|
+
|
|
320
324
|
/* .area-container .area-header { */
|
|
321
325
|
/* margin-bottom: 1rem; */
|
|
322
326
|
/* } */
|
|
@@ -326,21 +330,24 @@ div.esri-popover
|
|
|
326
330
|
font-weight: bold;
|
|
327
331
|
}
|
|
328
332
|
|
|
333
|
+
.area-header2 {
|
|
334
|
+
padding-right: 0;
|
|
335
|
+
margin-left: 1.5rem;
|
|
336
|
+
}
|
|
337
|
+
|
|
329
338
|
.rectangle-header {
|
|
330
|
-
padding-top: 1rem;
|
|
331
|
-
border-width: 2px;
|
|
332
|
-
border-style: solid none none none;
|
|
333
|
-
border-color: #a0b128;
|
|
334
|
-
margin-bottom: 1rem;
|
|
335
339
|
font-weight: bold;
|
|
336
340
|
}
|
|
337
341
|
|
|
338
342
|
.area-panel .ccl-form {
|
|
339
343
|
padding-bottom: 1rem !important;
|
|
344
|
+
margin-left: 1rem !important;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.area-panel .ccl-form-head {
|
|
340
348
|
border-width: 2px;
|
|
341
349
|
border-style: none none solid none;
|
|
342
350
|
border-color: #a0b128;
|
|
343
|
-
margin-left: 1rem !important;
|
|
344
351
|
}
|
|
345
352
|
|
|
346
353
|
.area-panel .ccl-form:last-child {
|
|
@@ -380,9 +387,9 @@ label.ccl-form-radio-label span.nuts-menu-icon {
|
|
|
380
387
|
}
|
|
381
388
|
|
|
382
389
|
#area-searchtext {
|
|
383
|
-
width:
|
|
384
|
-
height: 1.
|
|
385
|
-
margin-
|
|
390
|
+
width: 7rem;
|
|
391
|
+
height: 1.5rem;
|
|
392
|
+
margin-bottom: 1rem;
|
|
386
393
|
margin-left: 1rem !important;
|
|
387
394
|
}
|
|
388
395
|
|
|
@@ -391,7 +398,7 @@ label.ccl-form-radio-label span.nuts-menu-icon {
|
|
|
391
398
|
height: 1.5rem !important;
|
|
392
399
|
min-height: 1.5rem !important;
|
|
393
400
|
margin-top: 0 !important;
|
|
394
|
-
margin-left: 0
|
|
401
|
+
margin-left: 0 !important;
|
|
395
402
|
}
|
|
396
403
|
|
|
397
404
|
.no-result-message {
|
|
@@ -1212,7 +1219,7 @@ label.ccl-form-radio-label span.nuts-menu-icon {
|
|
|
1212
1219
|
}
|
|
1213
1220
|
|
|
1214
1221
|
.right-panel-content {
|
|
1215
|
-
overflow: auto;
|
|
1222
|
+
overflow: auto !important;
|
|
1216
1223
|
height: 100%;
|
|
1217
1224
|
padding: 1rem;
|
|
1218
1225
|
}
|