@eeacms/volto-arcgis-block 0.1.407 → 0.1.409
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,23 @@ 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.409](https://github.com/eea/volto-arcgis-block/compare/0.1.408...0.1.409) - 20 November 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Merge pull request #1059 from eea/CLMS-293228 [Unai Bolivar - [`b4b62d5`](https://github.com/eea/volto-arcgis-block/commit/b4b62d570f56f4264417e83612c10e7beae3c3ca)]
|
|
12
|
+
- (bug): change font sizes for titles final [Unai Bolivar - [`083bf44`](https://github.com/eea/volto-arcgis-block/commit/083bf44f0e8024350f21b6fda30abb26ed54513b)]
|
|
13
|
+
- (bug): change font sizes for titles again [Unai Bolivar - [`bc267fe`](https://github.com/eea/volto-arcgis-block/commit/bc267fe92dba4b319d1225217d88b0a30c9a3554)]
|
|
14
|
+
- (bug): change font styles again [Unai Bolivar - [`a4a39f3`](https://github.com/eea/volto-arcgis-block/commit/a4a39f3b039e11b1385a37f70ceccf10d129f8dd)]
|
|
15
|
+
- (bug): change active layers title [Unai Bolivar - [`b2d96f2`](https://github.com/eea/volto-arcgis-block/commit/b2d96f210c9388e99adac6ddf6bfd3377907cd3f)]
|
|
16
|
+
- (bug): fixing font styles [Unai Bolivar - [`af1393c`](https://github.com/eea/volto-arcgis-block/commit/af1393c360de05fa09850b9b929a04ce619c9066)]
|
|
17
|
+
### [0.1.408](https://github.com/eea/volto-arcgis-block/compare/0.1.407...0.1.408) - 19 November 2025
|
|
18
|
+
|
|
19
|
+
#### :hammer_and_wrench: Others
|
|
20
|
+
|
|
21
|
+
- Merge pull request #1058 from eea/develop [Unai Bolivar - [`715204e`](https://github.com/eea/volto-arcgis-block/commit/715204e198fa67a71766f5f315bb4062f2c86a25)]
|
|
22
|
+
- (bug): Fixed child node dissappearing errors that crash the data viewer [Unai Bolivar - [`d2d3503`](https://github.com/eea/volto-arcgis-block/commit/d2d3503371e90f50668964d0771be7de7ca3e447)]
|
|
23
|
+
- (feat): redid the titles produced for the error report [Unai Bolivar - [`08cd2bc`](https://github.com/eea/volto-arcgis-block/commit/08cd2bc75843b7313c54cffecd1b1c637ee2ab23)]
|
|
7
24
|
### [0.1.407](https://github.com/eea/volto-arcgis-block/compare/0.1.406...0.1.407) - 19 November 2025
|
|
8
25
|
|
|
9
26
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ class ErrorReport extends React.Component {
|
|
|
5
5
|
constructor(props) {
|
|
6
6
|
super(props);
|
|
7
7
|
this.container = createRef();
|
|
8
|
+
this.originalParent = null;
|
|
8
9
|
this.state = {
|
|
9
10
|
showMapMenu: false,
|
|
10
11
|
latlong: null,
|
|
@@ -61,7 +62,7 @@ class ErrorReport extends React.Component {
|
|
|
61
62
|
pt.latitude.toFixed(4) +
|
|
62
63
|
' Lon ' +
|
|
63
64
|
pt.longitude.toFixed(4) +
|
|
64
|
-
'. Active
|
|
65
|
+
'. Active layers: ' +
|
|
65
66
|
ds.join(', ');
|
|
66
67
|
try {
|
|
67
68
|
if (
|
|
@@ -96,6 +97,7 @@ class ErrorReport extends React.Component {
|
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
getCheckedDatasets() {
|
|
100
|
+
let checked = [];
|
|
99
101
|
try {
|
|
100
102
|
let uid = sessionStorage.getItem('mv_hydrated_for');
|
|
101
103
|
let key = uid ? 'user_' + uid : 'user_anonymous';
|
|
@@ -109,24 +111,130 @@ class ErrorReport extends React.Component {
|
|
|
109
111
|
} catch {}
|
|
110
112
|
}
|
|
111
113
|
if (Array.isArray(cl)) {
|
|
112
|
-
|
|
114
|
+
checked = [...new Set(cl)].filter((v) => v);
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
117
|
} catch {}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
if (!checked.length) {
|
|
119
|
+
try {
|
|
120
|
+
let ss = sessionStorage.getItem('checkedLayers');
|
|
121
|
+
if (ss) {
|
|
122
|
+
let cl = ss;
|
|
123
|
+
if (typeof ss === 'string') {
|
|
124
|
+
try {
|
|
125
|
+
cl = JSON.parse(ss);
|
|
126
|
+
} catch {}
|
|
127
|
+
}
|
|
128
|
+
if (Array.isArray(cl)) {
|
|
129
|
+
checked = [...new Set(cl)].filter((v) => v);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
} catch {}
|
|
133
|
+
}
|
|
134
|
+
if (checked.length) {
|
|
135
|
+
let titles = [];
|
|
136
|
+
try {
|
|
137
|
+
let esc = function (s) {
|
|
138
|
+
try {
|
|
139
|
+
return CSS && CSS.escape
|
|
140
|
+
? CSS.escape(s)
|
|
141
|
+
: String(s).replace(/[^a-zA-Z0-9_-]/g, '\\$&');
|
|
142
|
+
} catch {
|
|
143
|
+
return String(s).replace(/[^a-zA-Z0-9_-]/g, '\\$&');
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
let findTitleFor = function (val) {
|
|
147
|
+
let v = String(val);
|
|
148
|
+
let e = null;
|
|
121
149
|
try {
|
|
122
|
-
|
|
150
|
+
e = document.querySelector('[data-layer-id="' + esc(v) + '"]');
|
|
123
151
|
} catch {}
|
|
152
|
+
if (!e) {
|
|
153
|
+
try {
|
|
154
|
+
e = document.querySelector('[data-id="' + esc(v) + '"]');
|
|
155
|
+
} catch {}
|
|
156
|
+
}
|
|
157
|
+
if (!e) {
|
|
158
|
+
try {
|
|
159
|
+
let sel1 = 'input[type="checkbox"][value="' + esc(v) + '"]';
|
|
160
|
+
e = document.querySelector(sel1);
|
|
161
|
+
} catch {}
|
|
162
|
+
}
|
|
163
|
+
if (!e) {
|
|
164
|
+
try {
|
|
165
|
+
let sel2 = 'input[type="checkbox"][id*="' + esc(v) + '"]';
|
|
166
|
+
e = document.querySelector(sel2);
|
|
167
|
+
} catch {}
|
|
168
|
+
}
|
|
169
|
+
if (e && e.tagName && e.tagName.toLowerCase() === 'input') {
|
|
170
|
+
let id = e.id;
|
|
171
|
+
if (id) {
|
|
172
|
+
try {
|
|
173
|
+
let selLab = 'label[for="' + esc(id) + '"]';
|
|
174
|
+
let lab = document.querySelector(selLab);
|
|
175
|
+
if (lab && lab.textContent) return lab.textContent.trim();
|
|
176
|
+
} catch {}
|
|
177
|
+
}
|
|
178
|
+
try {
|
|
179
|
+
let cont = e.closest('.toc-item,.ccl-tree__item,.layer-item');
|
|
180
|
+
if (cont) {
|
|
181
|
+
let selT =
|
|
182
|
+
'.toc-item-title,.ccl-tree__label,.layer-title,.title';
|
|
183
|
+
|
|
184
|
+
let lab = cont.querySelector(selT);
|
|
185
|
+
if (lab && lab.textContent) return lab.textContent.trim();
|
|
186
|
+
}
|
|
187
|
+
} catch {}
|
|
188
|
+
}
|
|
189
|
+
if (e) {
|
|
190
|
+
try {
|
|
191
|
+
let sel3 = '.toc-item-title,.ccl-tree__label,.layer-title,.title';
|
|
192
|
+
let lab = e.querySelector(sel3);
|
|
193
|
+
if (lab && lab.textContent) return lab.textContent.trim();
|
|
194
|
+
} catch {}
|
|
195
|
+
try {
|
|
196
|
+
let t = e.getAttribute('data-title');
|
|
197
|
+
if (t) return t;
|
|
198
|
+
} catch {}
|
|
199
|
+
try {
|
|
200
|
+
if (e.textContent) return e.textContent.trim();
|
|
201
|
+
} catch {}
|
|
202
|
+
}
|
|
203
|
+
return null;
|
|
204
|
+
};
|
|
205
|
+
checked.forEach(function (v) {
|
|
206
|
+
let t = findTitleFor(v);
|
|
207
|
+
if (t) titles.push(t);
|
|
208
|
+
});
|
|
209
|
+
} catch {}
|
|
210
|
+
if (titles.length) return [...new Set(titles)];
|
|
211
|
+
let all = [];
|
|
212
|
+
try {
|
|
213
|
+
let coll =
|
|
214
|
+
this.props.view &&
|
|
215
|
+
this.props.view.map &&
|
|
216
|
+
this.props.view.map.allLayers;
|
|
217
|
+
if (coll && coll.items) {
|
|
218
|
+
all = coll.items;
|
|
219
|
+
} else if (coll && coll.toArray) {
|
|
220
|
+
all = coll.toArray();
|
|
124
221
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
222
|
+
} catch {}
|
|
223
|
+
let byId = {};
|
|
224
|
+
let byTitle = {};
|
|
225
|
+
try {
|
|
226
|
+
all.forEach(function (l) {
|
|
227
|
+
if (l && l.id) byId[l.id] = l.title || l.id;
|
|
228
|
+
if (l && l.title) byTitle[l.title] = l.title;
|
|
229
|
+
});
|
|
230
|
+
} catch {}
|
|
231
|
+
let titles2 = [];
|
|
232
|
+
checked.forEach(function (v) {
|
|
233
|
+
if (byTitle[v]) titles2.push(byTitle[v]);
|
|
234
|
+
else if (byId[v]) titles2.push(byId[v]);
|
|
235
|
+
});
|
|
236
|
+
if (titles2.length) return [...new Set(titles2)];
|
|
237
|
+
}
|
|
130
238
|
let layers = [];
|
|
131
239
|
this.props.view.map.layers.forEach(function (l) {
|
|
132
240
|
if (l.visible) {
|
|
@@ -147,7 +255,7 @@ class ErrorReport extends React.Component {
|
|
|
147
255
|
this.state.latlong.x +
|
|
148
256
|
' Lon ' +
|
|
149
257
|
this.state.latlong.y +
|
|
150
|
-
'. Active
|
|
258
|
+
'. Active layers: ' +
|
|
151
259
|
datasets.join(', ');
|
|
152
260
|
try {
|
|
153
261
|
if (navigator && navigator.clipboard && navigator.clipboard.writeText) {
|
|
@@ -182,6 +290,9 @@ class ErrorReport extends React.Component {
|
|
|
182
290
|
async componentDidMount() {
|
|
183
291
|
await this.loader();
|
|
184
292
|
if (!this.container.current) return;
|
|
293
|
+
try {
|
|
294
|
+
this.originalParent = this.container.current.parentNode;
|
|
295
|
+
} catch {}
|
|
185
296
|
this.props.view.when(() => {
|
|
186
297
|
if (!this.container.current) return;
|
|
187
298
|
var group = document.querySelector('.esri-ui-top-right.esri-ui-corner');
|
|
@@ -207,6 +318,24 @@ class ErrorReport extends React.Component {
|
|
|
207
318
|
});
|
|
208
319
|
}
|
|
209
320
|
|
|
321
|
+
componentWillUnmount() {
|
|
322
|
+
try {
|
|
323
|
+
if (this.state && this.state.selecting) {
|
|
324
|
+
this.state.selecting.remove();
|
|
325
|
+
}
|
|
326
|
+
} catch {}
|
|
327
|
+
try {
|
|
328
|
+
if (
|
|
329
|
+
this.container &&
|
|
330
|
+
this.container.current &&
|
|
331
|
+
this.originalParent &&
|
|
332
|
+
this.container.current.parentNode !== this.originalParent
|
|
333
|
+
) {
|
|
334
|
+
this.originalParent.appendChild(this.container.current);
|
|
335
|
+
}
|
|
336
|
+
} catch {}
|
|
337
|
+
}
|
|
338
|
+
|
|
210
339
|
render() {
|
|
211
340
|
return (
|
|
212
341
|
<>
|
|
@@ -278,7 +407,7 @@ class ErrorReport extends React.Component {
|
|
|
278
407
|
{this.state.datasets && this.state.datasets.length > 0 && (
|
|
279
408
|
<>
|
|
280
409
|
<div className="error-report-datasets-title">
|
|
281
|
-
Active
|
|
410
|
+
Active layers
|
|
282
411
|
</div>
|
|
283
412
|
<ul className="error-report-datasets">
|
|
284
413
|
{this.state.datasets.map((d, i) => (
|
|
@@ -334,21 +334,36 @@ button.upload-bookmark-button {
|
|
|
334
334
|
color: white !important;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
+
.right-panel-header span,
|
|
338
|
+
.error-report-coords-heading,
|
|
337
339
|
.error-report-datasets-title {
|
|
338
|
-
margin-top:
|
|
339
|
-
margin-bottom: 0.
|
|
340
|
-
|
|
340
|
+
margin-top: 1rem;
|
|
341
|
+
margin-bottom: 0.5rem;
|
|
342
|
+
color: inherit;
|
|
343
|
+
font-size: 0.9rem;
|
|
341
344
|
font-weight: bold;
|
|
342
345
|
}
|
|
343
346
|
|
|
347
|
+
.error-report-coords,
|
|
348
|
+
.error-report-datasets,
|
|
349
|
+
.error-report-datasets li {
|
|
350
|
+
color: inherit;
|
|
351
|
+
font-size: inherit;
|
|
352
|
+
font-weight: inherit;
|
|
353
|
+
}
|
|
354
|
+
|
|
344
355
|
body.section-map-viewer
|
|
345
356
|
#page-document.ui.container
|
|
346
|
-
.esri-widget__content--empty
|
|
347
|
-
|
|
348
|
-
|
|
357
|
+
.esri-widget__content--empty {
|
|
358
|
+
margin-top: 1rem;
|
|
359
|
+
margin-bottom: 0.5rem;
|
|
360
|
+
color: inherit;
|
|
361
|
+
font-size: 1.25rem; /* Increased font size */
|
|
349
362
|
}
|
|
350
363
|
|
|
351
|
-
|
|
364
|
+
body.section-map-viewer
|
|
365
|
+
#page-document.ui.container
|
|
366
|
+
.esri-widget__content--empty
|
|
352
367
|
div
|
|
353
368
|
div.esri-button-menu__content
|
|
354
369
|
ul.esri-button-menu__item-wrapper
|