@eeacms/volto-arcgis-block 0.1.39 → 0.1.42

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,8 +4,53 @@ 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.42](https://github.com/eea/volto-arcgis-block/compare/0.1.41...0.1.42)
8
+
9
+ - Ux improvements [`#131`](https://github.com/eea/volto-arcgis-block/pull/131)
10
+ - ESLint fix [`886f2e9`](https://github.com/eea/volto-arcgis-block/commit/886f2e9596e0e542cd4aeb1bd41c292d9f1aa01e)
11
+ - ESLint fix [`d833192`](https://github.com/eea/volto-arcgis-block/commit/d8331920e3f6e54a6e8a690586a9046304f4c28b)
12
+ - Layer opacity [`3397c91`](https://github.com/eea/volto-arcgis-block/commit/3397c91d34904d16745ad2906a4aa39d8ab4cd97)
13
+
14
+ #### [0.1.41](https://github.com/eea/volto-arcgis-block/compare/0.1.40...0.1.41)
15
+
16
+ > 11 May 2022
17
+
18
+ - Develop [`#130`](https://github.com/eea/volto-arcgis-block/pull/130)
19
+ - Ux improvements [`#129`](https://github.com/eea/volto-arcgis-block/pull/129)
20
+ - Use cases [`#128`](https://github.com/eea/volto-arcgis-block/pull/128)
21
+ - ESLint fix [`f0b6fa1`](https://github.com/eea/volto-arcgis-block/commit/f0b6fa10a5077af8ff22adec5ea1480a0d18a569)
22
+ - Measurement and opacity [`49483b1`](https://github.com/eea/volto-arcgis-block/commit/49483b12f777e7b0887abeb57f94a607fe6aeeb2)
23
+ - ESLint fix [`779dfd8`](https://github.com/eea/volto-arcgis-block/commit/779dfd89eea1ca7ada41cc9bfc9f9a106d30f6cc)
24
+ - Legend and link [`56019f0`](https://github.com/eea/volto-arcgis-block/commit/56019f095f2d2d2420c492e8b93e335261325933)
25
+
26
+ #### [0.1.40](https://github.com/eea/volto-arcgis-block/compare/0.1.39...0.1.40)
27
+
28
+ > 29 April 2022
29
+
30
+ - Develop [`#127`](https://github.com/eea/volto-arcgis-block/pull/127)
31
+ - Timeslider icon [`#126`](https://github.com/eea/volto-arcgis-block/pull/126)
32
+ - Hide opacity icon [`#125`](https://github.com/eea/volto-arcgis-block/pull/125)
33
+ - Use cases scroll [`#124`](https://github.com/eea/volto-arcgis-block/pull/124)
34
+ - Legend url [`#123`](https://github.com/eea/volto-arcgis-block/pull/123)
35
+ - Ux improvements [`#122`](https://github.com/eea/volto-arcgis-block/pull/122)
36
+ - Use cases [`#121`](https://github.com/eea/volto-arcgis-block/pull/121)
37
+ - ESLint fix [`5ba8a0d`](https://github.com/eea/volto-arcgis-block/commit/5ba8a0d17da0eee1de15b54c687500a725c50f56)
38
+ - ESLint fix [`04cb275`](https://github.com/eea/volto-arcgis-block/commit/04cb275d6701a382e6c6c6166f524c404d435f36)
39
+ - Zoom tooltip [`57369bd`](https://github.com/eea/volto-arcgis-block/commit/57369bd2a56064194991001b6646b99c4213711c)
40
+ - ESLint fix [`33a56de`](https://github.com/eea/volto-arcgis-block/commit/33a56de6deda3b755fcbb6738801eb9fad1004c3)
41
+ - Back button change [`480dce0`](https://github.com/eea/volto-arcgis-block/commit/480dce04285f49207070d05bed7c882eccac0e33)
42
+ - ESLint fix [`0477826`](https://github.com/eea/volto-arcgis-block/commit/04778262550a8077a711e04c1c1ebe22ae1d6254)
43
+ - UX improvements [`151dc4b`](https://github.com/eea/volto-arcgis-block/commit/151dc4b02d0a73fdd66de9d594620ac0fa5f1dbf)
44
+ - deleted failing tests [`ddaa9e6`](https://github.com/eea/volto-arcgis-block/commit/ddaa9e6f06db6960a4c214d3be2420c48b26715d)
45
+ - cleaning unnecessary files [`2c02199`](https://github.com/eea/volto-arcgis-block/commit/2c021990912beb02b603a1de89aecd62e0063769)
46
+ - commands added [`049e60b`](https://github.com/eea/volto-arcgis-block/commit/049e60b7d124d1c05abd0b2775b510795f4ed59f)
47
+ - Mapviewer testing implementation [`0103002`](https://github.com/eea/volto-arcgis-block/commit/0103002869eea108e16e3b5ff2e77a725dcc7c4b)
48
+
7
49
  #### [0.1.39](https://github.com/eea/volto-arcgis-block/compare/0.1.38...0.1.39)
8
50
 
51
+ > 24 March 2022
52
+
53
+ - Develop [`#119`](https://github.com/eea/volto-arcgis-block/pull/119)
9
54
  - Parser time [`#116`](https://github.com/eea/volto-arcgis-block/pull/116)
10
55
  - Info widget bug fix [`#118`](https://github.com/eea/volto-arcgis-block/pull/118)
11
56
  - Use cases [`#117`](https://github.com/eea/volto-arcgis-block/pull/117)
package/Jenkinsfile CHANGED
@@ -184,10 +184,10 @@ pipeline {
184
184
  unstash "xunit-reports"
185
185
  unstash "cypress-coverage"
186
186
  def scannerHome = tool 'SonarQubeScanner';
187
- def nodeJS = tool 'NodeJS11';
187
+ def nodeJS = tool 'NodeJS';
188
188
  withSonarQubeEnv('Sonarqube') {
189
189
  sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
190
- sh "export PATH=$PATH:${scannerHome}/bin:${nodeJS}/bin; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
190
+ sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
191
191
  sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done'''
192
192
  }
193
193
  }
@@ -313,3 +313,10 @@ Cypress.Commands.add('store', () => {
313
313
  Cypress.Commands.add('settings', (key, value) => {
314
314
  return cy.window().its('settings');
315
315
  });
316
+ Cypress.Commands.add('openClmsPortal',() =>{
317
+ //login
318
+ cy.visit('/login')
319
+ //By ID
320
+ cy.get('#login').type('admin')
321
+ cy.get('#password').type('admin{enter}')
322
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.39",
3
+ "version": "0.1.42",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -77,11 +77,14 @@ class AreaWidget extends React.Component {
77
77
  openMenu() {
78
78
  if (this.state.showMapMenu) {
79
79
  this.props.mapViewer.setActiveWidget();
80
- this.container.current.querySelector('.area-panel').style.display =
80
+ this.container.current.querySelector('.right-panel').style.display =
81
81
  'none';
82
82
  this.container.current
83
83
  .querySelector('.esri-widget--button')
84
- .classList.replace('esri-icon-close', 'esri-icon-cursor-marquee');
84
+ .classList.remove('active-widget');
85
+ document
86
+ .querySelector('.esri-ui-top-right.esri-ui-corner')
87
+ .classList.remove('show-panel');
85
88
  // By invoking the setState, we notify the state we want to reach
86
89
  // and ensure that the component is rendered again
87
90
  this.setState({ showMapMenu: false });
@@ -91,11 +94,14 @@ class AreaWidget extends React.Component {
91
94
  ).checked = true;
92
95
  } else {
93
96
  this.props.mapViewer.setActiveWidget(this);
94
- this.container.current.querySelector('.area-panel').style.display =
95
- 'block';
97
+ this.container.current.querySelector('.right-panel').style.display =
98
+ 'flex';
96
99
  this.container.current
97
100
  .querySelector('.esri-widget--button')
98
- .classList.replace('esri-icon-cursor-marquee', 'esri-icon-close');
101
+ .classList.add('active-widget');
102
+ document
103
+ .querySelector('.esri-ui-top-right.esri-ui-corner')
104
+ .classList.add('show-panel');
99
105
  // By invoking the setState, we notify the state we want to reach
100
106
  // and ensure that the component is rendered again
101
107
  this.setState({ showMapMenu: true });
@@ -253,139 +259,147 @@ class AreaWidget extends React.Component {
253
259
  <>
254
260
  <div ref={this.container} className="area-container">
255
261
  {!this.props.download && (
256
- <div
257
- className={this.menuClass}
258
- id="map_area_button"
259
- title="Area"
260
- onClick={this.openMenu.bind(this)}
261
- onKeyDown={this.openMenu.bind(this)}
262
- tabIndex="0"
263
- role="button"
264
- ></div>
262
+ <div tooltip="Area selection" direction="left" type="widget">
263
+ <div
264
+ className={this.menuClass}
265
+ id="map_area_button"
266
+ title="Area"
267
+ onClick={this.openMenu.bind(this)}
268
+ onKeyDown={this.openMenu.bind(this)}
269
+ tabIndex="0"
270
+ role="button"
271
+ ></div>
272
+ </div>
265
273
  )}
266
- <div className="area-panel">
267
- <div className="ccl-form">
268
- <fieldset className="ccl-fieldset">
269
- <div className="map-download-header">
270
- <legend className="ccl-form-legend">
271
- <span className="map-download-header-title">
272
- Select area
273
- </span>
274
- <span className="info-icon" tooltip="Info" direction="up">
275
- <i className="fas fa-info-circle"></i>
276
- </span>
277
- </legend>
278
- </div>
279
- <div className="ccl-form-group">
280
- <input
281
- type="radio"
282
- id="download_area_select_nuts0"
283
- name="downloadAreaSelect"
284
- value="nuts0"
285
- className="ccl-checkbox cl-required ccl-form-check-input"
286
- defaultChecked
287
- onClick={this.nuts0handler.bind(this)}
288
- ></input>
289
- <label
290
- className="ccl-form-radio-label"
291
- htmlFor="download_area_select_nuts0"
292
- >
293
- <span>NUTS 0</span>
294
- </label>
295
- </div>
296
- <div className="ccl-form-group">
297
- <input
298
- type="radio"
299
- id="download_area_select_nuts1"
300
- name="downloadAreaSelect"
301
- value="nuts1"
302
- className="ccl-checkbox ccl-required ccl-form-check-input"
303
- onClick={this.nuts1handler.bind(this)}
304
- ></input>
305
- <label
306
- className="ccl-form-radio-label"
307
- htmlFor="download_area_select_nuts1"
308
- >
309
- <span>NUTS 1</span>
310
- </label>
311
- </div>
312
- <div className="ccl-form-group">
313
- <input
314
- type="radio"
315
- id="download_area_select_nuts2"
316
- name="downloadAreaSelect"
317
- value="nuts2"
318
- className="ccl-checkbox ccl-required ccl-form-check-input"
319
- onClick={this.nuts2handler.bind(this)}
320
- ></input>
321
- <label
322
- className="ccl-form-radio-label"
323
- htmlFor="download_area_select_nuts2"
324
- >
325
- <span>NUTS 2</span>
326
- </label>
327
- </div>
328
- <div className="ccl-form-group">
329
- <input
330
- type="radio"
331
- id="download_area_select_nuts3"
332
- name="downloadAreaSelect"
333
- value="nuts3"
334
- className="ccl-radio ccl-required ccl-form-check-input"
335
- onClick={this.nuts3handler.bind(this)}
336
- ></input>
337
- <label
338
- className="ccl-form-radio-label"
339
- htmlFor="download_area_select_nuts3"
340
- >
341
- <span>NUTS 3</span>
342
- </label>
343
- </div>
344
- <div className="ccl-form-group">
345
- <input
346
- type="radio"
347
- id="download_area_select_rectangle"
348
- name="downloadAreaSelect"
349
- value="area"
350
- className="ccl-radio ccl-required ccl-form-check-input"
351
- onClick={this.rectanglehandler.bind(this)}
352
- ></input>
353
- <label
354
- className="ccl-form-radio-label"
355
- htmlFor="download_area_select_rectangle"
356
- >
357
- <span>By rectangle</span>
358
- <div>
359
- (Mantain the left button of the mouse clicked and draw a
360
- rectangle in the map)
274
+ <div className={this.props.download ? '' : 'right-panel'}>
275
+ {!this.props.download && (
276
+ <div className="right-panel-header">
277
+ <span>Area selection</span>
278
+ <span
279
+ className="map-menu-icon esri-icon-close"
280
+ onClick={this.openMenu.bind(this)}
281
+ onKeyDown={this.openMenu.bind(this)}
282
+ tabIndex="0"
283
+ role="button"
284
+ ></span>
285
+ </div>
286
+ )}
287
+ <div className="right-panel-content">
288
+ <div className="area-panel">
289
+ <div className="ccl-form">
290
+ <fieldset className="ccl-fieldset">
291
+ <div className="ccl-form-group">
292
+ <input
293
+ type="radio"
294
+ id="download_area_select_nuts0"
295
+ name="downloadAreaSelect"
296
+ value="nuts0"
297
+ className="ccl-checkbox cl-required ccl-form-check-input"
298
+ defaultChecked
299
+ onClick={this.nuts0handler.bind(this)}
300
+ ></input>
301
+ <label
302
+ className="ccl-form-radio-label"
303
+ htmlFor="download_area_select_nuts0"
304
+ >
305
+ <span>NUTS 0</span>
306
+ </label>
361
307
  </div>
362
- </label>
363
- </div>
364
- <div>
365
- {/* <div class="map-download-resource">
366
- <div class="ccl-form">
367
- <div class="map-download-header">
368
- <label for="download_area_select" class="map-download-header-title">Download resource as</label>
369
- <span class="info-icon" tooltip="Info" direction="up">
370
- <FontAwesomeIcon
371
- className="map-menu-icon"
372
- icon={['fas', 'info-circle']}
373
- />
374
- </span>
375
- </div>
376
- <div class="ccl-select-container">
377
- <div class="ccl-select-container">
378
- <select class="ccl-select" id="download_area_select" name="" >
379
- <option value="option1">GeoTiff</option>
380
- <option value="option2">ESRI Geodatabase</option>
381
- <option value="option3">SQLite Database</option>
382
- </select>
308
+ <div className="ccl-form-group">
309
+ <input
310
+ type="radio"
311
+ id="download_area_select_nuts1"
312
+ name="downloadAreaSelect"
313
+ value="nuts1"
314
+ className="ccl-checkbox ccl-required ccl-form-check-input"
315
+ onClick={this.nuts1handler.bind(this)}
316
+ ></input>
317
+ <label
318
+ className="ccl-form-radio-label"
319
+ htmlFor="download_area_select_nuts1"
320
+ >
321
+ <span>NUTS 1</span>
322
+ </label>
323
+ </div>
324
+ <div className="ccl-form-group">
325
+ <input
326
+ type="radio"
327
+ id="download_area_select_nuts2"
328
+ name="downloadAreaSelect"
329
+ value="nuts2"
330
+ className="ccl-checkbox ccl-required ccl-form-check-input"
331
+ onClick={this.nuts2handler.bind(this)}
332
+ ></input>
333
+ <label
334
+ className="ccl-form-radio-label"
335
+ htmlFor="download_area_select_nuts2"
336
+ >
337
+ <span>NUTS 2</span>
338
+ </label>
339
+ </div>
340
+ <div className="ccl-form-group">
341
+ <input
342
+ type="radio"
343
+ id="download_area_select_nuts3"
344
+ name="downloadAreaSelect"
345
+ value="nuts3"
346
+ className="ccl-radio ccl-required ccl-form-check-input"
347
+ onClick={this.nuts3handler.bind(this)}
348
+ ></input>
349
+ <label
350
+ className="ccl-form-radio-label"
351
+ htmlFor="download_area_select_nuts3"
352
+ >
353
+ <span>NUTS 3</span>
354
+ </label>
355
+ </div>
356
+ <div className="ccl-form-group">
357
+ <input
358
+ type="radio"
359
+ id="download_area_select_rectangle"
360
+ name="downloadAreaSelect"
361
+ value="area"
362
+ className="ccl-radio ccl-required ccl-form-check-input"
363
+ onClick={this.rectanglehandler.bind(this)}
364
+ ></input>
365
+ <label
366
+ className="ccl-form-radio-label"
367
+ htmlFor="download_area_select_rectangle"
368
+ >
369
+ <span>By rectangle</span>
370
+ <div>
371
+ (Mantain the left button of the mouse clicked and draw
372
+ a rectangle in the map)
373
+ </div>
374
+ </label>
375
+ </div>
376
+ <div>
377
+ {/* <div class="map-download-resource">
378
+ <div class="ccl-form">
379
+ <div class="map-download-header">
380
+ <label for="download_area_select" class="map-download-header-title">Download resource as</label>
381
+ <span class="info-icon" tooltip="Info" direction="up">
382
+ <FontAwesomeIcon
383
+ className="map-menu-icon"
384
+ icon={['fas', 'info-circle']}
385
+ />
386
+ </span>
387
+ </div>
388
+ <div class="ccl-select-container">
389
+ <div class="ccl-select-container">
390
+ <select class="ccl-select" id="download_area_select" name="" >
391
+ <option value="option1">GeoTiff</option>
392
+ <option value="option2">ESRI Geodatabase</option>
393
+ <option value="option3">SQLite Database</option>
394
+ </select>
395
+ </div>
396
+ </div>
383
397
  </div>
384
- </div>
398
+ </div> */}
385
399
  </div>
386
- </div> */}
400
+ </fieldset>
387
401
  </div>
388
- </fieldset>
402
+ </div>
389
403
  </div>
390
404
  </div>
391
405
  </div>
@@ -62,20 +62,28 @@ class BasemapWidget extends React.Component {
62
62
 
63
63
  if (this.state.showMapMenu) {
64
64
  this.props.mapViewer.setActiveWidget();
65
- this.basemapGallery.domNode.style.display = 'none';
65
+ this.container.current.querySelector('.right-panel').style.display =
66
+ 'none';
66
67
  this.container.current
67
68
  .querySelector('.esri-widget--button')
68
- .classList.replace('esri-icon-close', 'esri-icon-basemap');
69
+ .classList.remove('active-widget');
70
+ document
71
+ .querySelector('.esri-ui-top-right.esri-ui-corner')
72
+ .classList.remove('show-panel');
69
73
  // By invoking the setState, we notify the state we want to reach
70
74
  // and ensure that the component is rendered again
71
75
  this.setState({ showMapMenu: false });
72
76
  } else {
73
77
  this.props.mapViewer.setActiveWidget(this);
74
78
  this.basemapGallery.domNode.classList.add('basemap-gallery-container');
75
- this.basemapGallery.domNode.style.display = 'block';
79
+ this.container.current.querySelector('.right-panel').style.display =
80
+ 'flex';
76
81
  this.container.current
77
82
  .querySelector('.esri-widget--button')
78
- .classList.replace('esri-icon-basemap', 'esri-icon-close');
83
+ .classList.add('active-widget');
84
+ document
85
+ .querySelector('.esri-ui-top-right.esri-ui-corner')
86
+ .classList.add('show-panel');
79
87
  // By invoking the setState, we notify the state we want to reach
80
88
  // and ensure that the component is rendered again
81
89
  this.setState({ showMapMenu: true });
@@ -101,17 +109,33 @@ class BasemapWidget extends React.Component {
101
109
  return (
102
110
  <>
103
111
  <div ref={this.container} className="basemap-container">
104
- <div
105
- // ref={this.basemaps}
106
- className={this.menuClass}
107
- id="map_basemap_button"
108
- role="button"
109
- title="Basemap gallery"
110
- onClick={this.openMenu.bind(this)}
111
- onKeyDown={() => this.openMenu.bind(this)}
112
- tabIndex={0}
113
- ></div>
114
- <div className="basemap-panel"></div>
112
+ <div tooltip="Basemap gallery" direction="left" type="widget">
113
+ <div
114
+ // ref={this.basemaps}
115
+ className={this.menuClass}
116
+ id="map_basemap_button"
117
+ title="Basemap gallery"
118
+ onClick={this.openMenu.bind(this)}
119
+ onKeyDown={this.openMenu.bind(this)}
120
+ tabIndex="0"
121
+ role="button"
122
+ ></div>
123
+ </div>
124
+ <div className="right-panel">
125
+ <div className="right-panel-header">
126
+ <span>Basemap gallery</span>
127
+ <span
128
+ className="map-menu-icon esri-icon-close"
129
+ onClick={this.openMenu.bind(this)}
130
+ onKeyDown={this.openMenu.bind(this)}
131
+ tabIndex="0"
132
+ role="button"
133
+ ></span>
134
+ </div>
135
+ <div className="right-panel-content">
136
+ <div className="basemap-panel"></div>
137
+ </div>
138
+ </div>
115
139
  </div>
116
140
  </>
117
141
  );