@eeacms/volto-arcgis-block 0.1.83 → 0.1.85

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,13 @@ 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.85](https://github.com/eea/volto-arcgis-block/compare/0.1.84...0.1.85) - 10 January 2023
8
+
9
+ ### [0.1.84](https://github.com/eea/volto-arcgis-block/compare/0.1.83...0.1.84) - 28 December 2022
10
+
11
+ #### :hammer_and_wrench: Others
12
+
13
+ - Style lint applied [masanchez85 - [`5635db5`](https://github.com/eea/volto-arcgis-block/commit/5635db5b49669c47df08ce611f54753ab5494f4e)]
7
14
  ### [0.1.83](https://github.com/eea/volto-arcgis-block/compare/0.1.82...0.1.83) - 22 December 2022
8
15
 
9
16
  #### :rocket: New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.83",
3
+ "version": "0.1.85",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -34,6 +34,7 @@ export const AddCartItem = ({
34
34
  const [message, setMessage] = useState(0);
35
35
  const [showMessage] = useState(false);
36
36
  const [modal, setModal] = useState(false);
37
+ const [loginUrl] = React.useState('');
37
38
 
38
39
  const checkArea = (e) => {
39
40
  let check = document.querySelector('.area-panel input:checked').value;
@@ -183,7 +184,7 @@ export const AddCartItem = ({
183
184
  closeModal(e);
184
185
  };
185
186
 
186
- const showLogin = (e) => {
187
+ /*const showLogin = (e) => {
187
188
  e.stopPropagation();
188
189
  document.querySelector('.login-panel').style.display = 'block';
189
190
  let left = e.currentTarget.offsetLeft + 48;
@@ -196,7 +197,7 @@ export const AddCartItem = ({
196
197
  e.currentTarget.closest('.ccl-expandable__button').offsetHeight / 2 -
197
198
  document.querySelector('.login-panel').offsetHeight / 2;
198
199
  document.querySelector('.login-panel').style.top = top + 'px';
199
- };
200
+ };*/
200
201
 
201
202
  return (
202
203
  <>
@@ -231,7 +232,7 @@ export const AddCartItem = ({
231
232
  Cancel
232
233
  </button>
233
234
  </div>
234
- ) : (
235
+ ) : isLoggedIn ? ( // If isLoggedIn == true and user clicks download
235
236
  <>
236
237
  <Modal
237
238
  size="tiny"
@@ -276,18 +277,6 @@ export const AddCartItem = ({
276
277
  </p>
277
278
  </li>
278
279
  <br />
279
- <li>
280
- <p>
281
- If you would like to download data for your area of
282
- interest and for the selected time interval, please
283
- follow this{' '}
284
- <UniversalLink
285
- href={dataset.DatasetURL + '/download-by-area'}
286
- >
287
- link.
288
- </UniversalLink>
289
- </p>
290
- </li>
291
280
  </>
292
281
  ) : (
293
282
  <li>
@@ -353,10 +342,110 @@ export const AddCartItem = ({
353
342
  <span
354
343
  className={'map-menu-icon map-menu-icon-login'}
355
344
  onClick={(e) => {
356
- isLoggedIn ? showModal(e) : showLogin(e);
345
+ showModal(e);
357
346
  }}
358
347
  onKeyDown={(e) => {
359
- isLoggedIn ? showModal(e) : showLogin(e);
348
+ showModal(e);
349
+ }}
350
+ tabIndex="0"
351
+ role="button"
352
+ >
353
+ <FontAwesomeIcon
354
+ className={isLoggedIn ? '' : ' locked'}
355
+ icon={['fas', 'download']}
356
+ />
357
+ {!isLoggedIn && <FontAwesomeIcon icon={['fas', 'lock']} />}
358
+ </span>
359
+ }
360
+ content="Download"
361
+ {...popupSettings}
362
+ />
363
+ </>
364
+ ) : (
365
+ // If isLoggedIn == false and user clicks download
366
+ <>
367
+ <Modal
368
+ size="tiny"
369
+ onClose={() => closeModal()}
370
+ onOpen={() => showModal()}
371
+ open={modal}
372
+ className="modal-clms-container"
373
+ >
374
+ <div className="modal-close modal-clms-close">
375
+ <span
376
+ className="ccl-icon-close"
377
+ aria-label="Close"
378
+ onClick={(e) => closeModal(e)}
379
+ onKeyDown={(e) => closeModal(e)}
380
+ tabIndex="0"
381
+ role="button"
382
+ ></span>
383
+ </div>
384
+ <Modal.Content>
385
+ <div className="content">
386
+ <div className="modal-login-title">
387
+ This website uses EU Login for user authentication.
388
+ </div>
389
+ <div className="modal-login-text">
390
+ <p>
391
+ {' '}
392
+ EU Login, the European Commission Authentication Service,
393
+ enables you to access various web applications centrally
394
+ using the same e-mail and password. You can read more{' '}
395
+ <UniversalLink
396
+ openLinkInNewTab
397
+ href="https://ecas.ec.europa.eu/cas/about.html"
398
+ >
399
+ here
400
+ </UniversalLink>
401
+ .
402
+ </p>
403
+ <p>
404
+ {' '}
405
+ If you have EU Login account, please click 'Login using EU
406
+ Login'.
407
+ </p>
408
+ <p>
409
+ If you don't have EU Login account, please follow this{' '}
410
+ <UniversalLink
411
+ openLinkInNewTab
412
+ href="https://ecas.ec.europa.eu/cas/eim/external/register.cgi"
413
+ >
414
+ link
415
+ </UniversalLink>{' '}
416
+ to create it.
417
+ </p>
418
+ <p>
419
+ If you have other questions, please contact our
420
+ <UniversalLink openLinkInNewTab href="/en/service-desk">
421
+ {' '}
422
+ Service desk
423
+ </UniversalLink>
424
+ .
425
+ </p>
426
+ </div>
427
+ </div>
428
+ </Modal.Content>
429
+ <Modal.Actions>
430
+ <div className="modal-buttons">
431
+ <a
432
+ href={loginUrl || '#'}
433
+ className="ccl-button ccl-button-green"
434
+ >
435
+ Login using EU Login
436
+ </a>
437
+ </div>
438
+ </Modal.Actions>
439
+ </Modal>
440
+ <Popup
441
+ trigger={
442
+ <span
443
+ className={'map-menu-icon map-menu-icon-login'}
444
+ onClick={(e) => {
445
+ showModal(e);
446
+ }}
447
+ onKeyDown={(e) => {
448
+ showModal(e);
360
449
  }}
361
450
  tabIndex="0"
362
451
  role="button"
@@ -377,7 +466,7 @@ export const AddCartItem = ({
377
466
  );
378
467
  };
379
468
 
380
- export const CheckLogin = () => {
469
+ /*export const CheckLogin = () => {
381
470
  const { isLoggedIn } = useCartState();
382
471
  return (
383
472
  <>
@@ -400,7 +489,7 @@ export const CheckLogin = () => {
400
489
  )}
401
490
  </>
402
491
  );
403
- };
492
+ };*/
404
493
 
405
494
  export const TouchScreenPopup = () => {
406
495
  return (
@@ -2665,17 +2754,6 @@ class MenuWidget extends React.Component {
2665
2754
  <span className="opacity-label right">100 %</span>
2666
2755
  </div>
2667
2756
  </div>
2668
- <div className="login-panel">
2669
- <div
2670
- className="esri-icon-close"
2671
- id="login_close"
2672
- role="button"
2673
- onClick={() => this.closeLogin()}
2674
- onKeyDown={() => this.closeLogin()}
2675
- tabIndex="0"
2676
- ></div>
2677
- {!this.props.download && <CheckLogin />}
2678
- </div>
2679
2757
  <div className="touchScreenPopup-panel">
2680
2758
  <div
2681
2759
  className="esri-icon-close"
@@ -162,7 +162,7 @@ class TimesliderWidget extends React.Component {
162
162
  view: this.props.view,
163
163
  container: document.querySelector('.timeslider-panel'),
164
164
  timeVisible: true,
165
- mode: this.props.download ? 'time-window' : 'instant',
165
+ mode: /*this.props.download ? 'time-window' : 'instant'*/ 'time-window',
166
166
  loop: false,
167
167
  labelFormatFunction: (value, type, element, layout) => {
168
168
  if (!this.TimesliderWidget.fullTimeExtent) {
@@ -186,9 +186,10 @@ class TimesliderWidget extends React.Component {
186
186
  }
187
187
  },
188
188
  values: this.props.time.start
189
- ? this.props.download
189
+ ? /*this.props.download
190
190
  ? [new Date(this.props.time.start), new Date(this.props.time.end)]
191
- : [new Date(this.props.time.start)]
191
+ : [new Date(this.props.time.start)]*/
192
+ [new Date(this.props.time.start), new Date(this.props.time.end)]
192
193
  : null,
193
194
  });
194
195
  this.props.view.ui.add(this.container.current, 'bottom-right');
@@ -224,6 +225,8 @@ class TimesliderWidget extends React.Component {
224
225
  this.props.time.dataset.setAttribute('time-start', start);
225
226
  this.props.time.dataset.setAttribute('time-end', end);
226
227
  }
228
+ /*this.props.time.dataset.setAttribute('time-start', start);
229
+ this.props.time.dataset.setAttribute('time-end', end);*/
227
230
  });
228
231
  } else {
229
232
  let serviceType = '';
@@ -301,6 +304,8 @@ class TimesliderWidget extends React.Component {
301
304
  this.props.time.dataset.setAttribute('time-start', start);
302
305
  this.props.time.dataset.setAttribute('time-end', end);
303
306
  }
307
+ /*this.props.time.dataset.setAttribute('time-start', start);
308
+ this.props.time.dataset.setAttribute('time-end', end);*/
304
309
  if (this.layer.type === 'wmts') {
305
310
  this.layer.customParameters = {};
306
311
  this.layer.customParameters['TIME'] =
@@ -809,7 +809,7 @@
809
809
  right: 0;
810
810
  display: none;
811
811
  margin: 0.5rem;
812
- color: black;
812
+ color: #a0b128;
813
813
  cursor: pointer;
814
814
  }
815
815
 
@@ -829,6 +829,47 @@
829
829
  display: none;
830
830
  }
831
831
 
832
+ .esri-time-slider__mode--time-window .esri-slider__segment-0,
833
+ .esri-time-slider__mode--time-window .esri-slider__segment-1,
834
+ .esri-time-slider__mode--time-window .esri-slider__segment-2 {
835
+ background-color: #c5c5c5 !important;
836
+ }
837
+
838
+ .esri-slider__thumb {
839
+ border-color: #a0b128 !important;
840
+ outline: none !important;
841
+ }
842
+
843
+ .esri-slider__thumb:hover {
844
+ border-color: #7c8921 !important;
845
+ }
846
+
847
+ .esri-widget--button {
848
+ overflow: visible !important;
849
+ width: 36px !important;
850
+ height: 36px !important;
851
+ border: none !important;
852
+ background-color: rgba(160, 177, 40, 0.8) !important;
853
+ box-shadow: none !important;
854
+ color: #fff !important;
855
+ font-size: 18px !important;
856
+ line-height: 1.1rem !important;
857
+ outline: none !important;
858
+ }
859
+
860
+ .esri-widget--button:hover {
861
+ background-color: #7c8921 !important;
862
+ color: white !important;
863
+ }
864
+
865
+ .esri-time-slider__slider {
866
+ background-color: rgba(160, 177, 40, 0.058823529411764705) !important;
867
+ }
868
+
869
+ .esri-time-slider__slider .esri-slider {
870
+ background-color: transparent !important;
871
+ }
872
+
832
873
  /* Scale */
833
874
  .esri-scale-bar {
834
875
  z-index: 0;
@@ -1055,3 +1096,30 @@ input[type='range']::-ms-track {
1055
1096
  font-size: 0.875rem;
1056
1097
  text-align: center;
1057
1098
  }
1099
+
1100
+ /* Privacy protection tooltip */
1101
+ .ui.primary.buttons .button,
1102
+ .ui.primary.button {
1103
+ background-color: #a0b128 !important;
1104
+ background-image: none;
1105
+ color: #ffffff;
1106
+ text-shadow: none;
1107
+ }
1108
+
1109
+ .privacy-toggle .ui.toggle.checkbox input:checked ~ label:before {
1110
+ background-color: #a0b128 !important;
1111
+ }
1112
+
1113
+ .privacy-toggle .ui.checked.toggle.checkbox input:checked ~ label:before {
1114
+ background-color: #a0b128 !important;
1115
+ }
1116
+
1117
+ .ui.checkbox input:checked ~ label:before {
1118
+ border: 1px solid #a0b128 !important;
1119
+ box-shadow: none;
1120
+ }
1121
+
1122
+ .privacy-toggle .ui.checkbox input:checked ~ label:after {
1123
+ color: #a0b128 !important;
1124
+ content: '\e800';
1125
+ }