@eeacms/volto-arcgis-block 0.1.403 → 0.1.405
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.405](https://github.com/eea/volto-arcgis-block/compare/0.1.404...0.1.405) - 12 November 2025
|
|
8
|
+
|
|
9
|
+
### [0.1.404](https://github.com/eea/volto-arcgis-block/compare/0.1.403...0.1.404) - 5 November 2025
|
|
10
|
+
|
|
11
|
+
#### :hammer_and_wrench: Others
|
|
12
|
+
|
|
13
|
+
- Merge pull request #1050 from eea/develop [Unai Bolivar - [`0708eba`](https://github.com/eea/volto-arcgis-block/commit/0708ebafa517a330ecc02ec7ad073b67cdb9f60d)]
|
|
7
14
|
### [0.1.403](https://github.com/eea/volto-arcgis-block/compare/0.1.402...0.1.403) - 4 November 2025
|
|
8
15
|
|
|
9
16
|
### [0.1.402](https://github.com/eea/volto-arcgis-block/compare/0.1.401...0.1.402) - 3 November 2025
|
package/package.json
CHANGED
|
@@ -247,18 +247,60 @@ class BookmarkWidget extends React.Component {
|
|
|
247
247
|
this.sessionBookmarks.push(bookmark);
|
|
248
248
|
});
|
|
249
249
|
this.Bookmarks.when(() => {
|
|
250
|
-
|
|
251
|
-
.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
250
|
+
if (this.userID !== null) {
|
|
251
|
+
document.querySelector('.upload-bookmark-button').style.display =
|
|
252
|
+
'flex';
|
|
253
|
+
document
|
|
254
|
+
.querySelectorAll('.esri-bookmarks__bookmark')
|
|
255
|
+
.forEach((bookmark) => {
|
|
256
|
+
if (bookmark.childNodes.length < 4) {
|
|
257
|
+
let tooltip = document.createElement('div');
|
|
258
|
+
tooltip.setAttribute('tooltip', 'Download bookmark');
|
|
259
|
+
tooltip.setAttribute('direction', 'left');
|
|
260
|
+
tooltip.setAttribute('type', 'widget');
|
|
261
|
+
let download_button = document.createElement('div');
|
|
262
|
+
tooltip.appendChild(download_button);
|
|
263
|
+
download_button.className =
|
|
264
|
+
'esri-button download-bookmark-button';
|
|
265
|
+
download_button.innerText = '⭳';
|
|
266
|
+
download_button.bookmarkName = bookmark.innerText;
|
|
267
|
+
download_button.addEventListener('click', (e) => {
|
|
268
|
+
this.downloadBookmark(e.currentTarget.bookmarkName);
|
|
269
|
+
});
|
|
270
|
+
bookmark.insertBefore(tooltip, bookmark.childNodes[2]);
|
|
271
|
+
}
|
|
259
272
|
});
|
|
260
|
-
|
|
261
|
-
}
|
|
273
|
+
let bookmarkList = document.querySelector('.esri-bookmarks__list');
|
|
274
|
+
const config = { childList: true };
|
|
275
|
+
const callback = function (mutationList, observer) {
|
|
276
|
+
for (const mutation of mutationList) {
|
|
277
|
+
if (mutation.type === 'childList') {
|
|
278
|
+
document
|
|
279
|
+
.querySelectorAll('.esri-bookmarks__bookmark')
|
|
280
|
+
.forEach((bookmark) => {
|
|
281
|
+
if (bookmark.childNodes.length < 4) {
|
|
282
|
+
let tooltip = document.createElement('div');
|
|
283
|
+
tooltip.setAttribute('tooltip', 'Download bookmark');
|
|
284
|
+
tooltip.setAttribute('direction', 'left');
|
|
285
|
+
tooltip.setAttribute('type', 'widget');
|
|
286
|
+
let download_button = document.createElement('div');
|
|
287
|
+
tooltip.appendChild(download_button);
|
|
288
|
+
download_button.className =
|
|
289
|
+
'esri-button download-bookmark-button';
|
|
290
|
+
download_button.innerText = '⭳';
|
|
291
|
+
download_button.bookmarkName = bookmark.innerText;
|
|
292
|
+
download_button.addEventListener('click', (e) => {
|
|
293
|
+
this.downloadBookmark(e.currentTarget.bookmarkName);
|
|
294
|
+
});
|
|
295
|
+
bookmark.insertBefore(tooltip, bookmark.childNodes[2]);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
const observer = new MutationObserver(callback);
|
|
302
|
+
observer.observe(bookmarkList, config);
|
|
303
|
+
}
|
|
262
304
|
this.arcgisEventHandles.push(
|
|
263
305
|
this.Bookmarks.bookmarks.on('change', (e) => {
|
|
264
306
|
if (!this._isMounted) return;
|
|
@@ -804,20 +846,6 @@ class BookmarkWidget extends React.Component {
|
|
|
804
846
|
);
|
|
805
847
|
});
|
|
806
848
|
});
|
|
807
|
-
document
|
|
808
|
-
.querySelectorAll('.esri-bookmarks__bookmark')
|
|
809
|
-
.forEach((bookmark) => {
|
|
810
|
-
if (bookmark.childNodes.length < 4) {
|
|
811
|
-
let download_button = document.createElement('button');
|
|
812
|
-
download_button.className = 'esri-button download-bookmark-button';
|
|
813
|
-
download_button.innerText = '⭳';
|
|
814
|
-
download_button.bookmarkName = bookmark.innerText;
|
|
815
|
-
download_button.addEventListener('click', (e) => {
|
|
816
|
-
this.downloadBookmark(e.currentTarget.bookmarkName);
|
|
817
|
-
});
|
|
818
|
-
bookmark.insertBefore(download_button, bookmark.childNodes[2]);
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
849
|
}
|
|
822
850
|
componentWillUnmount() {
|
|
823
851
|
this._isMounted = false;
|
|
@@ -1187,7 +1215,8 @@ class BookmarkWidget extends React.Component {
|
|
|
1187
1215
|
}}
|
|
1188
1216
|
type="submit"
|
|
1189
1217
|
>
|
|
1190
|
-
|
|
1218
|
+
<span class="esri-bookmarks__add-bookmark-icon esri-icon-plus"></span>
|
|
1219
|
+
Upload a bookmark
|
|
1191
1220
|
</button>
|
|
1192
1221
|
</div>
|
|
1193
1222
|
</div>
|
|
@@ -289,13 +289,16 @@
|
|
|
289
289
|
color: white !important;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
.upload-bookmark-button {
|
|
292
|
+
button.upload-bookmark-button {
|
|
293
|
+
display: none;
|
|
293
294
|
width: 16rem !important;
|
|
294
295
|
justify-content: start !important;
|
|
296
|
+
padding-left: 3px;
|
|
295
297
|
border-color: #a0b128 !important;
|
|
296
298
|
margin-left: 0.65rem;
|
|
297
299
|
background-color: white !important;
|
|
298
300
|
color: #a0b128 !important;
|
|
301
|
+
font-size: 12px !important;
|
|
299
302
|
}
|
|
300
303
|
|
|
301
304
|
.upload-bookmark-button:hover {
|