@igo2/context 1.10.0 → 1.12.0

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.
Files changed (70) hide show
  1. package/bundles/igo2-context.umd.js +165 -136
  2. package/bundles/igo2-context.umd.js.map +1 -1
  3. package/esm2015/lib/context-import-export/context-import-export/context-import-export.component.js +1 -1
  4. package/esm2015/lib/context-import-export/context-import-export.module.js +1 -1
  5. package/esm2015/lib/context-import-export/index.js +1 -1
  6. package/esm2015/lib/context-import-export/shared/context-export.errors.js +1 -1
  7. package/esm2015/lib/context-import-export/shared/context-export.interface.js +1 -1
  8. package/esm2015/lib/context-import-export/shared/context-export.service.js +1 -1
  9. package/esm2015/lib/context-import-export/shared/context-export.utils.js +1 -1
  10. package/esm2015/lib/context-import-export/shared/context-import.errors.js +1 -1
  11. package/esm2015/lib/context-import-export/shared/context-import.service.js +1 -1
  12. package/esm2015/lib/context-import-export/shared/context-import.utils.js +10 -8
  13. package/esm2015/lib/context-import-export/shared/index.js +1 -1
  14. package/esm2015/lib/context-manager/context-edit/context-edit-binding.directive.js +1 -1
  15. package/esm2015/lib/context-manager/context-edit/context-edit.component.js +1 -1
  16. package/esm2015/lib/context-manager/context-edit/index.js +1 -1
  17. package/esm2015/lib/context-manager/context-form/context-form.component.js +1 -1
  18. package/esm2015/lib/context-manager/context-form/index.js +1 -1
  19. package/esm2015/lib/context-manager/context-item/context-item.component.js +101 -99
  20. package/esm2015/lib/context-manager/context-item/index.js +1 -1
  21. package/esm2015/lib/context-manager/context-list/context-list-binding.directive.js +18 -5
  22. package/esm2015/lib/context-manager/context-list/context-list.component.js +8 -7
  23. package/esm2015/lib/context-manager/context-list/context-list.enum.js +1 -1
  24. package/esm2015/lib/context-manager/context-list/index.js +1 -1
  25. package/esm2015/lib/context-manager/context-manager.module.js +1 -1
  26. package/esm2015/lib/context-manager/context-permissions/context-permissions-binding.directive.js +1 -1
  27. package/esm2015/lib/context-manager/context-permissions/context-permissions.component.js +1 -1
  28. package/esm2015/lib/context-manager/context-permissions/index.js +1 -1
  29. package/esm2015/lib/context-manager/index.js +1 -1
  30. package/esm2015/lib/context-manager/shared/context.enum.js +1 -1
  31. package/esm2015/lib/context-manager/shared/context.interface.js +1 -1
  32. package/esm2015/lib/context-manager/shared/context.service.js +25 -12
  33. package/esm2015/lib/context-manager/shared/index.js +1 -1
  34. package/esm2015/lib/context-manager/shared/layer-context.directive.js +1 -1
  35. package/esm2015/lib/context-manager/shared/map-context.directive.js +4 -1
  36. package/esm2015/lib/context-map-button/bookmark-button/bookmark-button.component.js +1 -1
  37. package/esm2015/lib/context-map-button/bookmark-button/bookmark-dialog.component.js +1 -1
  38. package/esm2015/lib/context-map-button/bookmark-button/index.js +1 -1
  39. package/esm2015/lib/context-map-button/context-map-button.module.js +1 -1
  40. package/esm2015/lib/context-map-button/index.js +1 -1
  41. package/esm2015/lib/context-map-button/poi-button/index.js +1 -1
  42. package/esm2015/lib/context-map-button/poi-button/poi-button.component.js +1 -1
  43. package/esm2015/lib/context-map-button/poi-button/poi-dialog.component.js +1 -1
  44. package/esm2015/lib/context-map-button/poi-button/shared/index.js +1 -1
  45. package/esm2015/lib/context-map-button/poi-button/shared/poi.interface.js +1 -1
  46. package/esm2015/lib/context-map-button/poi-button/shared/poi.service.js +1 -1
  47. package/esm2015/lib/context-map-button/user-button/index.js +1 -1
  48. package/esm2015/lib/context-map-button/user-button/user-button.animation.js +1 -1
  49. package/esm2015/lib/context-map-button/user-button/user-button.component.js +1 -1
  50. package/esm2015/lib/context-map-button/user-button/user-dialog.component.js +1 -1
  51. package/esm2015/lib/context.module.js +1 -1
  52. package/esm2015/lib/share-map/index.js +1 -1
  53. package/esm2015/lib/share-map/share-map/share-map-api.component.js +1 -1
  54. package/esm2015/lib/share-map/share-map/share-map-url.component.js +1 -1
  55. package/esm2015/lib/share-map/share-map/share-map.component.js +1 -1
  56. package/esm2015/lib/share-map/share-map.module.js +1 -1
  57. package/esm2015/lib/share-map/shared/index.js +1 -1
  58. package/esm2015/lib/share-map/shared/share-map.service.js +3 -3
  59. package/esm2015/lib/sidenav/index.js +1 -1
  60. package/esm2015/lib/sidenav/sidenav.component.js +1 -1
  61. package/esm2015/lib/sidenav/sidenav.module.js +1 -1
  62. package/esm2015/public_api.js +1 -1
  63. package/fesm2015/igo2-context.js +162 -128
  64. package/fesm2015/igo2-context.js.map +1 -1
  65. package/lib/context-manager/context-item/context-item.component.d.ts +5 -8
  66. package/lib/context-manager/context-list/context-list-binding.directive.d.ts +5 -3
  67. package/lib/context-manager/shared/context.interface.d.ts +7 -1
  68. package/lib/context-manager/shared/context.service.d.ts +4 -3
  69. package/ngcc.config.js +3 -3
  70. package/package.json +6 -6
@@ -189,6 +189,7 @@ function addImportedFeaturesToMap(olFeatures, map, layerTitle) {
189
189
  source.ol.addFeatures(olFeatures);
190
190
  const layer = new VectorLayer({
191
191
  title: layerTitle,
192
+ isIgoInternalLayer: true,
192
193
  source,
193
194
  style: new olStyle.Style({
194
195
  stroke,
@@ -208,23 +209,23 @@ function addImportedFeaturesStyledToMap(olFeatures, map, layerTitle, styleListSe
208
209
  let distance;
209
210
  if (styleListService.getStyleList(layerTitle.toString() + '.styleByAttribute')) {
210
211
  const styleByAttribute = styleListService.getStyleList(layerTitle.toString() + '.styleByAttribute');
211
- style = (feature) => {
212
- return styleService.createStyleByAttribute(feature, styleByAttribute);
212
+ style = (feature, resolution) => {
213
+ return styleService.createStyleByAttribute(feature, styleByAttribute, resolution);
213
214
  };
214
215
  }
215
216
  else if (styleListService.getStyleList(layerTitle.toString() + '.clusterStyle')) {
216
217
  const clusterParam = styleListService.getStyleList(layerTitle.toString() + '.clusterParam');
217
218
  distance = styleListService.getStyleList(layerTitle.toString() + '.distance');
218
- const baseStyle = styleService.createStyle(styleListService.getStyleList(layerTitle.toString() + '.clusterStyle'));
219
- style = (feature) => {
220
- return styleService.createClusterStyle(feature, clusterParam, baseStyle);
219
+ style = (feature, resolution) => {
220
+ const baseStyle = styleService.createStyle(styleListService.getStyleList(layerTitle.toString() + '.clusterStyle'), feature, resolution);
221
+ return styleService.createClusterStyle(feature, resolution, clusterParam, baseStyle);
221
222
  };
222
223
  }
223
224
  else if (styleListService.getStyleList(layerTitle.toString() + '.style')) {
224
- style = styleService.createStyle(styleListService.getStyleList(layerTitle.toString() + '.style'));
225
+ style = (feature, resolution) => styleService.createStyle(styleListService.getStyleList(layerTitle.toString() + '.style'), feature, resolution);
225
226
  }
226
227
  else {
227
- style = styleService.createStyle(styleListService.getStyleList('default.style'));
228
+ style = (feature, resolution) => styleService.createStyle(styleListService.getStyleList('default.style'), feature, resolution);
228
229
  }
229
230
  let source;
230
231
  if (styleListService.getStyleList(layerTitle.toString() + '.clusterStyle')) {
@@ -246,6 +247,7 @@ function addImportedFeaturesStyledToMap(olFeatures, map, layerTitle, styleListSe
246
247
  }
247
248
  const layer = new VectorLayer({
248
249
  title: layerTitle,
250
+ isIgoInternalLayer: true,
249
251
  source,
250
252
  style
251
253
  });
@@ -406,12 +408,13 @@ var Scope;
406
408
  })(Scope || (Scope = {}));
407
409
 
408
410
  class ContextService {
409
- constructor(http, authService, languageService, config, messageService, route) {
411
+ constructor(http, authService, languageService, config, messageService, storageService, route) {
410
412
  this.http = http;
411
413
  this.authService = authService;
412
414
  this.languageService = languageService;
413
415
  this.config = config;
414
416
  this.messageService = messageService;
417
+ this.storageService = storageService;
415
418
  this.route = route;
416
419
  this.context$ = new BehaviorSubject(undefined);
417
420
  this.contexts$ = new BehaviorSubject({ ours: [] });
@@ -443,7 +446,7 @@ class ContextService {
443
446
  }
444
447
  }
445
448
  get defaultContextUri() {
446
- return this._defaultContextUri || this.options.defaultContextUri;
449
+ return this.storageService.get('favorite.context.uri') || this._defaultContextUri || this.options.defaultContextUri;
447
450
  }
448
451
  set defaultContextUri(uri) {
449
452
  this._defaultContextUri = uri;
@@ -470,10 +473,17 @@ class ContextService {
470
473
  }));
471
474
  }
472
475
  getDefault() {
473
- const url = this.baseUrl + '/contexts/default';
474
- return this.http.get(url).pipe(tap((context) => {
475
- this.defaultContextId$.next(context.id);
476
- }));
476
+ if (this.authService.authenticated) {
477
+ const url = this.baseUrl + '/contexts/default';
478
+ return this.http.get(url).pipe(tap((context) => {
479
+ this.defaultContextId$.next(context.id);
480
+ }));
481
+ }
482
+ else {
483
+ const uri = this.storageService.get('favorite.context.uri');
484
+ this.defaultContextId$.next(uri);
485
+ return this.getContextByUri(uri);
486
+ }
477
487
  }
478
488
  getProfilByUser() {
479
489
  if (this.baseUrl) {
@@ -483,8 +493,14 @@ class ContextService {
483
493
  return of([]);
484
494
  }
485
495
  setDefault(id) {
486
- const url = this.baseUrl + '/contexts/default';
487
- return this.http.post(url, { defaultContextId: id });
496
+ if (this.authService.authenticated) {
497
+ const url = this.baseUrl + '/contexts/default';
498
+ return this.http.post(url, { defaultContextId: id });
499
+ }
500
+ else {
501
+ this.storageService.set('favorite.context.uri', id);
502
+ return of(undefined);
503
+ }
488
504
  }
489
505
  hideContext(id) {
490
506
  const url = this.baseUrl + '/contexts/' + id + '/hide';
@@ -904,7 +920,6 @@ class ContextService {
904
920
  if (centerKey && params[centerKey]) {
905
921
  const centerParams = params[centerKey];
906
922
  this.mapViewFromRoute.center = centerParams.split(',').map(Number);
907
- this.mapViewFromRoute.geolocate = false;
908
923
  }
909
924
  const projectionKey = this.route.options.projectionKey;
910
925
  if (projectionKey && params[projectionKey]) {
@@ -992,14 +1007,14 @@ class ContextService {
992
1007
  return found;
993
1008
  }
994
1009
  }
995
- ContextService.ɵfac = function ContextService_Factory(t) { return new (t || ContextService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.AuthService), i0.ɵɵinject(i3.LanguageService), i0.ɵɵinject(i3.ConfigService), i0.ɵɵinject(i3.MessageService), i0.ɵɵinject(i3.RouteService, 8)); };
1010
+ ContextService.ɵfac = function ContextService_Factory(t) { return new (t || ContextService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.AuthService), i0.ɵɵinject(i3.LanguageService), i0.ɵɵinject(i3.ConfigService), i0.ɵɵinject(i3.MessageService), i0.ɵɵinject(i3.StorageService), i0.ɵɵinject(i3.RouteService, 8)); };
996
1011
  ContextService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ContextService, factory: ContextService.ɵfac, providedIn: 'root' });
997
1012
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextService, [{
998
1013
  type: Injectable,
999
1014
  args: [{
1000
1015
  providedIn: 'root'
1001
1016
  }]
1002
- }], function () { return [{ type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.LanguageService }, { type: i3.ConfigService }, { type: i3.MessageService }, { type: i3.RouteService, decorators: [{
1017
+ }], function () { return [{ type: i1.HttpClient }, { type: i2.AuthService }, { type: i3.LanguageService }, { type: i3.ConfigService }, { type: i3.MessageService }, { type: i3.StorageService }, { type: i3.RouteService, decorators: [{
1003
1018
  type: Optional
1004
1019
  }] }]; }, null); })();
1005
1020
 
@@ -1344,6 +1359,9 @@ class MapContextDirective {
1344
1359
  if (!this.component.view || viewContext.keepCurrentView !== true) {
1345
1360
  this.component.view = viewContext;
1346
1361
  }
1362
+ if (this.component.map.geolocationController) {
1363
+ this.component.map.geolocationController.updateGeolocationOptions(viewContext);
1364
+ }
1347
1365
  const controlsContext = context.map.controls;
1348
1366
  if (!this.component.controls && controlsContext) {
1349
1367
  if (this.mediaService.isMobile()) {
@@ -1566,19 +1584,19 @@ BookmarkDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Boo
1566
1584
  function ContextItemComponent_button_1_mat_icon_2_Template(rf, ctx) { if (rf & 1) {
1567
1585
  i0.ɵɵelement(0, "mat-icon", 7);
1568
1586
  } if (rf & 2) {
1569
- const ctx_r2 = i0.ɵɵnextContext(2);
1570
- i0.ɵɵpropertyInterpolate("svgIcon", ctx_r2.context.icon ? ctx_r2.context.icon : ctx_r2.context.scope === "public" ? "earth" : "star");
1587
+ const ctx_r3 = i0.ɵɵnextContext(2);
1588
+ i0.ɵɵpropertyInterpolate("svgIcon", ctx_r3.context.icon ? ctx_r3.context.icon : ctx_r3.context.scope === "public" ? "earth" : "star");
1571
1589
  } }
1572
1590
  function ContextItemComponent_button_1_img_3_Template(rf, ctx) { if (rf & 1) {
1573
1591
  i0.ɵɵelement(0, "img", 8);
1574
1592
  } if (rf & 2) {
1575
- const ctx_r3 = i0.ɵɵnextContext(2);
1576
- i0.ɵɵproperty("src", ctx_r3.context.iconImage, i0.ɵɵsanitizeUrl);
1593
+ const ctx_r4 = i0.ɵɵnextContext(2);
1594
+ i0.ɵɵproperty("src", ctx_r4.context.iconImage, i0.ɵɵsanitizeUrl);
1577
1595
  } }
1578
1596
  function ContextItemComponent_button_1_Template(rf, ctx) { if (rf & 1) {
1579
- const _r5 = i0.ɵɵgetCurrentView();
1597
+ const _r6 = i0.ɵɵgetCurrentView();
1580
1598
  i0.ɵɵelementStart(0, "button", 4);
1581
- i0.ɵɵlistener("click", function ContextItemComponent_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.favoriteClick(ctx_r4.context); });
1599
+ i0.ɵɵlistener("click", function ContextItemComponent_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.favoriteClick(ctx_r5.context); });
1582
1600
  i0.ɵɵpipe(1, "translate");
1583
1601
  i0.ɵɵtemplate(2, ContextItemComponent_button_1_mat_icon_2_Template, 1, 1, "mat-icon", 5);
1584
1602
  i0.ɵɵtemplate(3, ContextItemComponent_button_1_img_3_Template, 1, 1, "img", 6);
@@ -1591,118 +1609,129 @@ function ContextItemComponent_button_1_Template(rf, ctx) { if (rf & 1) {
1591
1609
  i0.ɵɵadvance(1);
1592
1610
  i0.ɵɵproperty("ngIf", ctx_r0.context.iconImage);
1593
1611
  } }
1594
- function ContextItemComponent_div_4_button_1_Template(rf, ctx) { if (rf & 1) {
1595
- const _r15 = i0.ɵɵgetCurrentView();
1596
- i0.ɵɵelementStart(0, "button", 20);
1597
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(2); return ctx_r14.save.emit(ctx_r14.context); });
1612
+ function ContextItemComponent_button_2_Template(rf, ctx) { if (rf & 1) {
1613
+ const _r8 = i0.ɵɵgetCurrentView();
1614
+ i0.ɵɵelementStart(0, "button", 4);
1615
+ i0.ɵɵlistener("click", function ContextItemComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.favoriteClick(ctx_r7.context); });
1598
1616
  i0.ɵɵpipe(1, "translate");
1599
- i0.ɵɵelement(2, "mat-icon", 21);
1617
+ i0.ɵɵelement(2, "mat-icon", 9);
1600
1618
  i0.ɵɵelementEnd();
1601
1619
  } if (rf & 2) {
1602
- const ctx_r6 = i0.ɵɵnextContext(2);
1603
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.save"))("color", ctx_r6.color);
1620
+ const ctx_r1 = i0.ɵɵnextContext();
1621
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.favorite"))("color", ctx_r1.default ? "primary" : "default");
1604
1622
  } }
1605
- function ContextItemComponent_div_4_button_4_Template(rf, ctx) { if (rf & 1) {
1606
- const _r17 = i0.ɵɵgetCurrentView();
1607
- i0.ɵɵelementStart(0, "button", 22);
1608
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(2); return ctx_r16.managePermissions.emit(ctx_r16.context); });
1623
+ function ContextItemComponent_div_5_button_1_Template(rf, ctx) { if (rf & 1) {
1624
+ const _r18 = i0.ɵɵgetCurrentView();
1625
+ i0.ɵɵelementStart(0, "button", 21);
1626
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(2); return ctx_r17.save.emit(ctx_r17.context); });
1609
1627
  i0.ɵɵpipe(1, "translate");
1610
- i0.ɵɵelement(2, "mat-icon", 23);
1628
+ i0.ɵɵelement(2, "mat-icon", 22);
1611
1629
  i0.ɵɵelementEnd();
1612
1630
  } if (rf & 2) {
1613
- const ctx_r8 = i0.ɵɵnextContext(2);
1614
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.managePermissions"))("color", ctx_r8.color);
1631
+ const ctx_r9 = i0.ɵɵnextContext(2);
1632
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.save"))("color", ctx_r9.color);
1615
1633
  } }
1616
- function ContextItemComponent_div_4_button_5_Template(rf, ctx) { if (rf & 1) {
1617
- const _r19 = i0.ɵɵgetCurrentView();
1618
- i0.ɵɵelementStart(0, "button", 24);
1619
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(2); return ctx_r18.clone.emit(ctx_r18.context); });
1634
+ function ContextItemComponent_div_5_button_4_Template(rf, ctx) { if (rf & 1) {
1635
+ const _r20 = i0.ɵɵgetCurrentView();
1636
+ i0.ɵɵelementStart(0, "button", 23);
1637
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(2); return ctx_r19.managePermissions.emit(ctx_r19.context); });
1620
1638
  i0.ɵɵpipe(1, "translate");
1621
- i0.ɵɵelement(2, "mat-icon", 25);
1639
+ i0.ɵɵelement(2, "mat-icon", 24);
1622
1640
  i0.ɵɵelementEnd();
1623
1641
  } if (rf & 2) {
1624
- const ctx_r9 = i0.ɵɵnextContext(2);
1625
- i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.clone"))("color", ctx_r9.color);
1642
+ const ctx_r11 = i0.ɵɵnextContext(2);
1643
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.managePermissions"))("color", ctx_r11.color);
1626
1644
  } }
1627
- function ContextItemComponent_div_4_button_6_Template(rf, ctx) { if (rf & 1) {
1628
- const _r21 = i0.ɵɵgetCurrentView();
1629
- i0.ɵɵelementStart(0, "button", 26);
1630
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(2); return ctx_r20.edit.emit(ctx_r20.context); });
1645
+ function ContextItemComponent_div_5_button_5_Template(rf, ctx) { if (rf & 1) {
1646
+ const _r22 = i0.ɵɵgetCurrentView();
1647
+ i0.ɵɵelementStart(0, "button", 25);
1648
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.clone.emit(ctx_r21.context); });
1631
1649
  i0.ɵɵpipe(1, "translate");
1632
- i0.ɵɵelement(2, "mat-icon", 27);
1650
+ i0.ɵɵelement(2, "mat-icon", 26);
1633
1651
  i0.ɵɵelementEnd();
1634
1652
  } if (rf & 2) {
1635
- const ctx_r10 = i0.ɵɵnextContext(2);
1636
- i0.ɵɵproperty("color", ctx_r10.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.edit"));
1653
+ const ctx_r12 = i0.ɵɵnextContext(2);
1654
+ i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.clone"))("color", ctx_r12.color);
1637
1655
  } }
1638
- function ContextItemComponent_div_4_button_7_Template(rf, ctx) { if (rf & 1) {
1639
- const _r23 = i0.ɵɵgetCurrentView();
1640
- i0.ɵɵelementStart(0, "button", 28);
1641
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(2); return ctx_r22.hide.emit(ctx_r22.context); });
1656
+ function ContextItemComponent_div_5_button_6_Template(rf, ctx) { if (rf & 1) {
1657
+ const _r24 = i0.ɵɵgetCurrentView();
1658
+ i0.ɵɵelementStart(0, "button", 27);
1659
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r24); const ctx_r23 = i0.ɵɵnextContext(2); return ctx_r23.edit.emit(ctx_r23.context); });
1642
1660
  i0.ɵɵpipe(1, "translate");
1643
- i0.ɵɵelement(2, "mat-icon", 29);
1661
+ i0.ɵɵelement(2, "mat-icon", 28);
1644
1662
  i0.ɵɵelementEnd();
1645
1663
  } if (rf & 2) {
1646
- const ctx_r11 = i0.ɵɵnextContext(2);
1647
- i0.ɵɵproperty("color", ctx_r11.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.hide"));
1664
+ const ctx_r13 = i0.ɵɵnextContext(2);
1665
+ i0.ɵɵproperty("color", ctx_r13.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.edit"));
1648
1666
  } }
1649
- function ContextItemComponent_div_4_button_8_Template(rf, ctx) { if (rf & 1) {
1650
- const _r25 = i0.ɵɵgetCurrentView();
1651
- i0.ɵɵelementStart(0, "button", 28);
1652
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r25); const ctx_r24 = i0.ɵɵnextContext(2); return ctx_r24.show.emit(ctx_r24.context); });
1667
+ function ContextItemComponent_div_5_button_7_Template(rf, ctx) { if (rf & 1) {
1668
+ const _r26 = i0.ɵɵgetCurrentView();
1669
+ i0.ɵɵelementStart(0, "button", 29);
1670
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r25 = i0.ɵɵnextContext(2); return ctx_r25.hide.emit(ctx_r25.context); });
1653
1671
  i0.ɵɵpipe(1, "translate");
1654
1672
  i0.ɵɵelement(2, "mat-icon", 30);
1655
1673
  i0.ɵɵelementEnd();
1656
1674
  } if (rf & 2) {
1657
- const ctx_r12 = i0.ɵɵnextContext(2);
1658
- i0.ɵɵproperty("color", ctx_r12.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.show"));
1675
+ const ctx_r14 = i0.ɵɵnextContext(2);
1676
+ i0.ɵɵproperty("color", ctx_r14.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.hide"));
1659
1677
  } }
1660
- function ContextItemComponent_div_4_button_9_Template(rf, ctx) { if (rf & 1) {
1661
- const _r27 = i0.ɵɵgetCurrentView();
1662
- i0.ɵɵelementStart(0, "button", 31);
1663
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r27); const ctx_r26 = i0.ɵɵnextContext(2); return ctx_r26.delete.emit(ctx_r26.context); });
1678
+ function ContextItemComponent_div_5_button_8_Template(rf, ctx) { if (rf & 1) {
1679
+ const _r28 = i0.ɵɵgetCurrentView();
1680
+ i0.ɵɵelementStart(0, "button", 29);
1681
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(2); return ctx_r27.show.emit(ctx_r27.context); });
1682
+ i0.ɵɵpipe(1, "translate");
1683
+ i0.ɵɵelement(2, "mat-icon", 31);
1684
+ i0.ɵɵelementEnd();
1685
+ } if (rf & 2) {
1686
+ const ctx_r15 = i0.ɵɵnextContext(2);
1687
+ i0.ɵɵproperty("color", ctx_r15.color)("matTooltip", i0.ɵɵpipeBind1(1, 2, "igo.context.contextManager.show"));
1688
+ } }
1689
+ function ContextItemComponent_div_5_button_9_Template(rf, ctx) { if (rf & 1) {
1690
+ const _r30 = i0.ɵɵgetCurrentView();
1691
+ i0.ɵɵelementStart(0, "button", 32);
1692
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r30); const ctx_r29 = i0.ɵɵnextContext(2); return ctx_r29.delete.emit(ctx_r29.context); });
1664
1693
  i0.ɵɵpipe(1, "translate");
1665
- i0.ɵɵelement(2, "mat-icon", 32);
1694
+ i0.ɵɵelement(2, "mat-icon", 33);
1666
1695
  i0.ɵɵelementEnd();
1667
1696
  } if (rf & 2) {
1668
1697
  i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 1, "igo.context.contextManager.delete"));
1669
1698
  } }
1670
- function ContextItemComponent_div_4_Template(rf, ctx) { if (rf & 1) {
1671
- const _r29 = i0.ɵɵgetCurrentView();
1672
- i0.ɵɵelementStart(0, "div", 9);
1673
- i0.ɵɵtemplate(1, ContextItemComponent_div_4_button_1_Template, 3, 4, "button", 10);
1674
- i0.ɵɵelementStart(2, "div", 11, 12);
1675
- i0.ɵɵtemplate(4, ContextItemComponent_div_4_button_4_Template, 3, 4, "button", 13);
1676
- i0.ɵɵtemplate(5, ContextItemComponent_div_4_button_5_Template, 3, 4, "button", 14);
1677
- i0.ɵɵtemplate(6, ContextItemComponent_div_4_button_6_Template, 3, 4, "button", 15);
1678
- i0.ɵɵtemplate(7, ContextItemComponent_div_4_button_7_Template, 3, 4, "button", 16);
1679
- i0.ɵɵtemplate(8, ContextItemComponent_div_4_button_8_Template, 3, 4, "button", 16);
1680
- i0.ɵɵtemplate(9, ContextItemComponent_div_4_button_9_Template, 3, 3, "button", 17);
1699
+ function ContextItemComponent_div_5_Template(rf, ctx) { if (rf & 1) {
1700
+ const _r32 = i0.ɵɵgetCurrentView();
1701
+ i0.ɵɵelementStart(0, "div", 10);
1702
+ i0.ɵɵtemplate(1, ContextItemComponent_div_5_button_1_Template, 3, 4, "button", 11);
1703
+ i0.ɵɵelementStart(2, "div", 12, 13);
1704
+ i0.ɵɵtemplate(4, ContextItemComponent_div_5_button_4_Template, 3, 4, "button", 14);
1705
+ i0.ɵɵtemplate(5, ContextItemComponent_div_5_button_5_Template, 3, 4, "button", 15);
1706
+ i0.ɵɵtemplate(6, ContextItemComponent_div_5_button_6_Template, 3, 4, "button", 16);
1707
+ i0.ɵɵtemplate(7, ContextItemComponent_div_5_button_7_Template, 3, 4, "button", 17);
1708
+ i0.ɵɵtemplate(8, ContextItemComponent_div_5_button_8_Template, 3, 4, "button", 17);
1709
+ i0.ɵɵtemplate(9, ContextItemComponent_div_5_button_9_Template, 3, 3, "button", 18);
1681
1710
  i0.ɵɵelementEnd();
1682
- i0.ɵɵelementStart(10, "button", 18);
1683
- i0.ɵɵlistener("click", function ContextItemComponent_div_4_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r29); const ctx_r28 = i0.ɵɵnextContext(); return ctx_r28.collapsed = !ctx_r28.collapsed; });
1684
- i0.ɵɵelement(11, "mat-icon", 19);
1711
+ i0.ɵɵelementStart(10, "button", 19);
1712
+ i0.ɵɵlistener("click", function ContextItemComponent_div_5_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r32); const ctx_r31 = i0.ɵɵnextContext(); return ctx_r31.collapsed = !ctx_r31.collapsed; });
1713
+ i0.ɵɵelement(11, "mat-icon", 20);
1685
1714
  i0.ɵɵelementEnd();
1686
1715
  i0.ɵɵelementEnd();
1687
1716
  } if (rf & 2) {
1688
- const _r7 = i0.ɵɵreference(3);
1689
- const ctx_r1 = i0.ɵɵnextContext();
1717
+ const _r10 = i0.ɵɵreference(3);
1718
+ const ctx_r2 = i0.ɵɵnextContext();
1690
1719
  i0.ɵɵadvance(1);
1691
- i0.ɵɵproperty("ngIf", ctx_r1.collapsed && ctx_r1.selected && (ctx_r1.context.permission === ctx_r1.typePermission[ctx_r1.typePermission.write] || ctx_r1.context.imported));
1720
+ i0.ɵɵproperty("ngIf", ctx_r2.collapsed && ctx_r2.selected && (ctx_r2.context.permission === ctx_r2.typePermission[ctx_r2.typePermission.write] || ctx_r2.context.imported));
1692
1721
  i0.ɵɵadvance(3);
1693
- i0.ɵɵproperty("ngIf", ctx_r1.canShare && !ctx_r1.context.imported);
1722
+ i0.ɵɵproperty("ngIf", ctx_r2.canShare && !ctx_r2.context.imported);
1694
1723
  i0.ɵɵadvance(1);
1695
- i0.ɵɵproperty("ngIf", !ctx_r1.context.imported);
1724
+ i0.ɵɵproperty("ngIf", !ctx_r2.context.imported);
1696
1725
  i0.ɵɵadvance(1);
1697
- i0.ɵɵproperty("ngIf", ctx_r1.context.permission === ctx_r1.typePermission[ctx_r1.typePermission.write] && !ctx_r1.context.imported);
1726
+ i0.ɵɵproperty("ngIf", ctx_r2.context.permission === ctx_r2.typePermission[ctx_r2.typePermission.write] && !ctx_r2.context.imported);
1698
1727
  i0.ɵɵadvance(1);
1699
- i0.ɵɵproperty("ngIf", !ctx_r1.context.hidden && !ctx_r1.context.imported);
1728
+ i0.ɵɵproperty("ngIf", !ctx_r2.context.hidden && !ctx_r2.context.imported);
1700
1729
  i0.ɵɵadvance(1);
1701
- i0.ɵɵproperty("ngIf", ctx_r1.context.hidden && !ctx_r1.context.imported);
1730
+ i0.ɵɵproperty("ngIf", ctx_r2.context.hidden && !ctx_r2.context.imported);
1702
1731
  i0.ɵɵadvance(1);
1703
- i0.ɵɵproperty("ngIf", ctx_r1.context.permission === ctx_r1.typePermission[ctx_r1.typePermission.write] || ctx_r1.context.imported);
1732
+ i0.ɵɵproperty("ngIf", ctx_r2.context.permission === ctx_r2.typePermission[ctx_r2.typePermission.write] || ctx_r2.context.imported);
1704
1733
  i0.ɵɵadvance(1);
1705
- i0.ɵɵproperty("color", ctx_r1.color)("target", _r7)("collapsed", ctx_r1.collapsed);
1734
+ i0.ɵɵproperty("color", ctx_r2.color)("target", _r10)("collapsed", ctx_r2.collapsed);
1706
1735
  } }
1707
1736
  const _c0$1 = function (a0) { return { "mat-list-item-light": a0 }; };
1708
1737
  class ContextItemComponent {
@@ -1712,7 +1741,7 @@ class ContextItemComponent {
1712
1741
  this.typePermission = TypePermission;
1713
1742
  this.color = 'primary';
1714
1743
  this.collapsed = true;
1715
- this._default = false;
1744
+ this.showFavorite = true;
1716
1745
  this.edit = new EventEmitter();
1717
1746
  this.delete = new EventEmitter();
1718
1747
  this.save = new EventEmitter();
@@ -1723,18 +1752,6 @@ class ContextItemComponent {
1723
1752
  this.managePermissions = new EventEmitter();
1724
1753
  this.manageTools = new EventEmitter();
1725
1754
  }
1726
- get context() {
1727
- return this._context;
1728
- }
1729
- set context(value) {
1730
- this._context = value;
1731
- }
1732
- get default() {
1733
- return this._default;
1734
- }
1735
- set default(value) {
1736
- this._default = value;
1737
- }
1738
1755
  get hidden() {
1739
1756
  return this.context.hidden;
1740
1757
  }
@@ -1742,24 +1759,25 @@ class ContextItemComponent {
1742
1759
  return this.storageService.get('canShare') === true;
1743
1760
  }
1744
1761
  favoriteClick(context) {
1745
- if (this.auth.authenticated) {
1746
- this.favorite.emit(context);
1747
- }
1762
+ this.favorite.emit(context);
1748
1763
  }
1749
1764
  }
1750
1765
  ContextItemComponent.ɵfac = function ContextItemComponent_Factory(t) { return new (t || ContextItemComponent)(i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.StorageService)); };
1751
- ContextItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextItemComponent, selectors: [["igo-context-item"]], inputs: { context: "context", default: "default", selected: "selected" }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools" }, decls: 5, vars: 6, consts: [[1, "mat-list-item", 3, "ngClass"], ["mat-list-avatar", "", "mat-icon-button", "", "igoStopPropagation", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], ["matLine", ""], ["igoStopPropagation", "", "class", "igo-actions-container", 4, "ngIf"], ["mat-list-avatar", "", "mat-icon-button", "", "igoStopPropagation", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click"], [3, "svgIcon", 4, "ngIf"], [3, "src", 4, "ngIf"], [3, "svgIcon"], [3, "src"], ["igoStopPropagation", "", 1, "igo-actions-container"], ["class", "save-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], [1, "igo-actions-expand-container"], ["actions", ""], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], ["class", "clone-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], ["class", "edit-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click", 4, "ngIf"], ["class", "hide-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click", 4, "ngIf"], ["class", "delete-button", "mat-icon-button", "", "color", "warn", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], ["mat-icon-button", "", "igoCollapse", "", 1, "actions-button", 3, "color", "target", "collapsed", "click"], ["svgIcon", "dots-horizontal"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "save-button", 3, "matTooltip", "color", "click"], ["svgIcon", "content-save"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click"], ["svgIcon", "account-arrow-right"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "clone-button", 3, "matTooltip", "color", "click"], ["svgIcon", "content-copy"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "edit-button", 3, "color", "matTooltip", "click"], ["svgIcon", "pencil"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "hide-button", 3, "color", "matTooltip", "click"], ["svgIcon", "eye"], ["svgIcon", "eye-off"], ["mat-icon-button", "", "color", "warn", "matTooltipShowDelay", "500", 1, "delete-button", 3, "matTooltip", "click"], ["svgIcon", "delete"]], template: function ContextItemComponent_Template(rf, ctx) { if (rf & 1) {
1766
+ ContextItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextItemComponent, selectors: [["igo-context-item"]], inputs: { showFavorite: "showFavorite", context: "context", default: "default", selected: "selected" }, outputs: { edit: "edit", delete: "delete", save: "save", clone: "clone", hide: "hide", show: "show", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools" }, decls: 6, vars: 7, consts: [[1, "mat-list-item", 3, "ngClass"], ["mat-list-avatar", "", "mat-icon-button", "", "igoStopPropagation", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], ["matLine", ""], ["igoStopPropagation", "", "class", "igo-actions-container", 4, "ngIf"], ["mat-list-avatar", "", "mat-icon-button", "", "igoStopPropagation", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click"], [3, "svgIcon", 4, "ngIf"], [3, "src", 4, "ngIf"], [3, "svgIcon"], [3, "src"], ["svgIcon", "star"], ["igoStopPropagation", "", 1, "igo-actions-container"], ["class", "save-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], [1, "igo-actions-expand-container"], ["actions", ""], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], ["class", "clone-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click", 4, "ngIf"], ["class", "edit-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click", 4, "ngIf"], ["class", "hide-button", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "color", "matTooltip", "click", 4, "ngIf"], ["class", "delete-button", "mat-icon-button", "", "color", "warn", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], ["mat-icon-button", "", "igoCollapse", "", 1, "actions-button", 3, "color", "target", "collapsed", "click"], ["svgIcon", "dots-horizontal"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "save-button", 3, "matTooltip", "color", "click"], ["svgIcon", "content-save"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "color", "click"], ["svgIcon", "account-arrow-right"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "clone-button", 3, "matTooltip", "color", "click"], ["svgIcon", "content-copy"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "edit-button", 3, "color", "matTooltip", "click"], ["svgIcon", "pencil"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "hide-button", 3, "color", "matTooltip", "click"], ["svgIcon", "eye"], ["svgIcon", "eye-off"], ["mat-icon-button", "", "color", "warn", "matTooltipShowDelay", "500", 1, "delete-button", 3, "matTooltip", "click"], ["svgIcon", "delete"]], template: function ContextItemComponent_Template(rf, ctx) { if (rf & 1) {
1752
1767
  i0.ɵɵelementStart(0, "mat-list-item", 0);
1753
1768
  i0.ɵɵtemplate(1, ContextItemComponent_button_1_Template, 4, 6, "button", 1);
1754
- i0.ɵɵelementStart(2, "h4", 2);
1755
- i0.ɵɵtext(3);
1769
+ i0.ɵɵtemplate(2, ContextItemComponent_button_2_Template, 3, 4, "button", 1);
1770
+ i0.ɵɵelementStart(3, "h4", 2);
1771
+ i0.ɵɵtext(4);
1756
1772
  i0.ɵɵelementEnd();
1757
- i0.ɵɵtemplate(4, ContextItemComponent_div_4_Template, 12, 10, "div", 3);
1773
+ i0.ɵɵtemplate(5, ContextItemComponent_div_5_Template, 12, 10, "div", 3);
1758
1774
  i0.ɵɵelementEnd();
1759
1775
  } if (rf & 2) {
1760
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$1, ctx.hidden));
1776
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$1, ctx.hidden));
1761
1777
  i0.ɵɵadvance(1);
1762
1778
  i0.ɵɵproperty("ngIf", ctx.auth.authenticated);
1779
+ i0.ɵɵadvance(1);
1780
+ i0.ɵɵproperty("ngIf", !ctx.auth.authenticated && ctx.showFavorite);
1763
1781
  i0.ɵɵadvance(2);
1764
1782
  i0.ɵɵtextInterpolate(ctx.context.title);
1765
1783
  i0.ɵɵadvance(1);
@@ -1773,7 +1791,9 @@ ContextItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
1773
1791
  styleUrls: ['./context-item.component.scss'],
1774
1792
  changeDetection: ChangeDetectionStrategy.OnPush
1775
1793
  }]
1776
- }], function () { return [{ type: i2.AuthService }, { type: i3.StorageService }]; }, { context: [{
1794
+ }], function () { return [{ type: i2.AuthService }, { type: i3.StorageService }]; }, { showFavorite: [{
1795
+ type: Input
1796
+ }], context: [{
1777
1797
  type: Input
1778
1798
  }], default: [{
1779
1799
  type: Input
@@ -1945,15 +1965,15 @@ function ContextListComponent_ng_template_14_igo_collapsible_0_Template(rf, ctx)
1945
1965
  function ContextListComponent_ng_template_14_1_ng_template_0_Template(rf, ctx) { if (rf & 1) {
1946
1966
  const _r56 = i0.ɵɵgetCurrentView();
1947
1967
  i0.ɵɵelementStart(0, "igo-context-item", 32);
1948
- i0.ɵɵlistener("select", function ContextListComponent_ng_template_14_1_ng_template_0_Template_igo_context_item_select_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r56); const context_r54 = restoredCtx.$implicit; const ctx_r55 = i0.ɵɵnextContext(3); return ctx_r55.select.emit(context_r54); })("unselect", function ContextListComponent_ng_template_14_1_ng_template_0_Template_igo_context_item_unselect_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r56); const context_r54 = restoredCtx.$implicit; const ctx_r57 = i0.ɵɵnextContext(3); return ctx_r57.unselect.emit(context_r54); });
1968
+ i0.ɵɵlistener("favorite", function ContextListComponent_ng_template_14_1_ng_template_0_Template_igo_context_item_favorite_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r56); const context_r54 = restoredCtx.$implicit; const ctx_r55 = i0.ɵɵnextContext(3); return ctx_r55.favorite.emit(context_r54); })("select", function ContextListComponent_ng_template_14_1_ng_template_0_Template_igo_context_item_select_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r56); const context_r54 = restoredCtx.$implicit; const ctx_r57 = i0.ɵɵnextContext(3); return ctx_r57.select.emit(context_r54); })("unselect", function ContextListComponent_ng_template_14_1_ng_template_0_Template_igo_context_item_unselect_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r56); const context_r54 = restoredCtx.$implicit; const ctx_r58 = i0.ɵɵnextContext(3); return ctx_r58.unselect.emit(context_r54); });
1949
1969
  i0.ɵɵelementEnd();
1950
1970
  } if (rf & 2) {
1951
1971
  const context_r54 = ctx.$implicit;
1952
1972
  const ctx_r53 = i0.ɵɵnextContext(3);
1953
- i0.ɵɵproperty("selected", ctx_r53.selectedContext && ctx_r53.selectedContext.uri === context_r54.uri)("context", context_r54)("default", ctx_r53.defaultContextId === context_r54.id);
1973
+ i0.ɵɵproperty("showFavorite", ctx_r53.configService.getConfig("favoriteContext4NonAuthenticated"))("selected", ctx_r53.selectedContext && ctx_r53.selectedContext.uri === context_r54.uri)("context", context_r54)("default", ctx_r53.configService.getConfig("context") ? ctx_r53.defaultContextId === context_r54.id : ctx_r53.defaultContextId === context_r54.uri);
1954
1974
  } }
1955
1975
  function ContextListComponent_ng_template_14_1_Template(rf, ctx) { if (rf & 1) {
1956
- i0.ɵɵtemplate(0, ContextListComponent_ng_template_14_1_ng_template_0_Template, 1, 3, "ng-template", 10);
1976
+ i0.ɵɵtemplate(0, ContextListComponent_ng_template_14_1_ng_template_0_Template, 1, 4, "ng-template", 10);
1957
1977
  } if (rf & 2) {
1958
1978
  const groupContexts_r32 = i0.ɵɵnextContext().$implicit;
1959
1979
  i0.ɵɵproperty("ngForOf", groupContexts_r32.value);
@@ -2033,7 +2053,8 @@ class ContextListComponent {
2033
2053
  this._map = value;
2034
2054
  }
2035
2055
  get defaultContextId() {
2036
- return this._defaultContextId;
2056
+ return this.configService.getConfig('context') ? this._defaultContextId :
2057
+ this.storageService.get('favorite.context.uri') || this._defaultContextId;
2037
2058
  }
2038
2059
  set defaultContextId(value) {
2039
2060
  this._defaultContextId = value;
@@ -2284,7 +2305,7 @@ class ContextListComponent {
2284
2305
  }
2285
2306
  }
2286
2307
  ContextListComponent.ɵfac = function ContextListComponent_Factory(t) { return new (t || ContextListComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i3.ConfigService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i1$2.MatDialog), i0.ɵɵdirectiveInject(i3.LanguageService), i0.ɵɵdirectiveInject(i3.StorageService)); };
2287
- ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextListComponent, selectors: [["igo-context-list"]], inputs: { contexts: "contexts", selectedContext: "selectedContext", map: "map", defaultContextId: "defaultContextId", term: "term" }, outputs: { select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, decls: 17, vars: 16, consts: [[3, "navigation"], [3, "ngClass", 4, "ngIf"], ["class", "sort-alpha", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], ["class", "add-context-button", "icon", "plus", 3, "iconColor", "store", "withIcon", "withTitle", "horizontal", "mode", 4, "ngIf"], ["class", "users-filter", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "matMenuTriggerFor", 4, "ngIf"], ["accountMenu", "matMenu"], [4, "ngFor", "ngForOf"], [1, "profilsMenu"], [1, "mat-menu-item", 3, "checked", "click", "change"], ["mat-menu-item", ""], ["ngFor", "", 3, "ngForOf"], [3, "ngClass"], ["matInput", "", "type", "text", 3, "placeholder", "ngModel", "ngModelChange"], ["mat-button", "", "mat-icon-button", "", "matSuffix", "", "class", "clear-button", "aria-label", "Clear", "color", "warn", 3, "click", 4, "ngIf"], ["mat-button", "", "mat-icon-button", "", "matSuffix", "", "aria-label", "Clear", "color", "warn", 1, "clear-button", 3, "click"], ["svgIcon", "close"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "sort-alpha", 3, "matTooltip", "click"], ["color", "primary", "svgIcon", "sort-alphabetical-variant"], ["color", "warn", "svgIcon", "sort-variant-remove"], ["icon", "plus", 1, "add-context-button", 3, "iconColor", "store", "withIcon", "withTitle", "horizontal", "mode"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "users-filter", 3, "matTooltip", "matMenuTriggerFor"], ["color", "primary", "svgIcon", "filter-menu"], [1, "mat-menu-item", 3, "checked", "indeterminate", "click", "change"], ["mat-menu-item", "", 3, "matMenuTriggerFor", 4, "ngIf"], ["mat-menu-item", "", 4, "ngIf"], ["subAccountMenu", "matMenu"], ["class", "mat-menu-item", 3, "checked", "click", "change", 4, "ngFor", "ngForOf"], ["mat-menu-item", "", 3, "matMenuTriggerFor"], [3, "title", "collapsed", "toggle", 4, "ngIf"], [4, "ngIf"], [3, "title", "collapsed", "toggle"], ["igoListItem", "", "color", "accent", 3, "selected", "context", "default", "edit", "delete", "clone", "save", "hide", "show", "favorite", "manageTools", "managePermissions", "select", "unselect"], ["igoListItem", "", "color", "accent", 3, "selected", "context", "default", "select", "unselect"]], template: function ContextListComponent_Template(rf, ctx) { if (rf & 1) {
2308
+ ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextListComponent, selectors: [["igo-context-list"]], inputs: { contexts: "contexts", selectedContext: "selectedContext", map: "map", defaultContextId: "defaultContextId", term: "term" }, outputs: { select: "select", unselect: "unselect", edit: "edit", delete: "delete", save: "save", clone: "clone", create: "create", hide: "hide", show: "show", showHiddenContexts: "showHiddenContexts", favorite: "favorite", managePermissions: "managePermissions", manageTools: "manageTools", filterPermissionsChanged: "filterPermissionsChanged" }, decls: 17, vars: 16, consts: [[3, "navigation"], [3, "ngClass", 4, "ngIf"], ["class", "sort-alpha", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "click", 4, "ngIf"], ["class", "add-context-button", "icon", "plus", 3, "iconColor", "store", "withIcon", "withTitle", "horizontal", "mode", 4, "ngIf"], ["class", "users-filter", "mat-icon-button", "", "matTooltipShowDelay", "500", 3, "matTooltip", "matMenuTriggerFor", 4, "ngIf"], ["accountMenu", "matMenu"], [4, "ngFor", "ngForOf"], [1, "profilsMenu"], [1, "mat-menu-item", 3, "checked", "click", "change"], ["mat-menu-item", ""], ["ngFor", "", 3, "ngForOf"], [3, "ngClass"], ["matInput", "", "type", "text", 3, "placeholder", "ngModel", "ngModelChange"], ["mat-button", "", "mat-icon-button", "", "matSuffix", "", "class", "clear-button", "aria-label", "Clear", "color", "warn", 3, "click", 4, "ngIf"], ["mat-button", "", "mat-icon-button", "", "matSuffix", "", "aria-label", "Clear", "color", "warn", 1, "clear-button", 3, "click"], ["svgIcon", "close"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "sort-alpha", 3, "matTooltip", "click"], ["color", "primary", "svgIcon", "sort-alphabetical-variant"], ["color", "warn", "svgIcon", "sort-variant-remove"], ["icon", "plus", 1, "add-context-button", 3, "iconColor", "store", "withIcon", "withTitle", "horizontal", "mode"], ["mat-icon-button", "", "matTooltipShowDelay", "500", 1, "users-filter", 3, "matTooltip", "matMenuTriggerFor"], ["color", "primary", "svgIcon", "filter-menu"], [1, "mat-menu-item", 3, "checked", "indeterminate", "click", "change"], ["mat-menu-item", "", 3, "matMenuTriggerFor", 4, "ngIf"], ["mat-menu-item", "", 4, "ngIf"], ["subAccountMenu", "matMenu"], ["class", "mat-menu-item", 3, "checked", "click", "change", 4, "ngFor", "ngForOf"], ["mat-menu-item", "", 3, "matMenuTriggerFor"], [3, "title", "collapsed", "toggle", 4, "ngIf"], [4, "ngIf"], [3, "title", "collapsed", "toggle"], ["igoListItem", "", "color", "accent", 3, "selected", "context", "default", "edit", "delete", "clone", "save", "hide", "show", "favorite", "manageTools", "managePermissions", "select", "unselect"], ["igoListItem", "", "color", "accent", 3, "showFavorite", "selected", "context", "default", "favorite", "select", "unselect"]], template: function ContextListComponent_Template(rf, ctx) { if (rf & 1) {
2288
2309
  i0.ɵɵelementStart(0, "igo-list", 0);
2289
2310
  i0.ɵɵtemplate(1, ContextListComponent_mat_form_field_1_Template, 4, 6, "mat-form-field", 1);
2290
2311
  i0.ɵɵtemplate(2, ContextListComponent_button_2_Template, 3, 3, "button", 2);
@@ -2327,7 +2348,7 @@ ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
2327
2348
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 10, "igo.context.contextManager.showHidden"), " ");
2328
2349
  i0.ɵɵadvance(2);
2329
2350
  i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind1(15, 12, i0.ɵɵpipeBind1(16, 14, ctx.contexts$)));
2330
- } }, directives: [i5$1.ListComponent, i7.NgIf, i7$1.MatMenu, i7.NgForOf, i8.MatCheckbox, i7$1.MatMenuItem, i3$1.MatFormField, i7.NgClass, i3$2.MatInput, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgModel, i5.MatButton, i3$1.MatSuffix, i9.MatIcon, i6$2.MatTooltip, i5$1.ActionbarComponent, i7$1.MatMenuTrigger, i5$1.CollapsibleComponent, ContextItemComponent, i5$1.ListItemDirective], pipes: [i6$1.TranslatePipe, i5$1.KeyValuePipe, i7.AsyncPipe], styles: [".context-filter-max-width[_ngcontent-%COMP%]{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width[_ngcontent-%COMP%]{width:calc(100% - 135px);margin:5px;padding-left:6px}.clear-button[_ngcontent-%COMP%]{padding-right:5px}mat-form-field[_ngcontent-%COMP%]{height:40px}.profilsMenu[_ngcontent-%COMP%]{display:flex}.profilsMenu[_ngcontent-%COMP%] > mat-checkbox[_ngcontent-%COMP%]{width:8px}.add-context-button[_ngcontent-%COMP%]{margin:0;width:40px;display:inline-flex}"], changeDetection: 0 });
2351
+ } }, directives: [i5$1.ListComponent, i7.NgIf, i7$1.MatMenu, i7.NgForOf, i8.MatCheckbox, i7$1.MatMenuItem, i3$1.MatFormField, i7.NgClass, i3$2.MatInput, i4.DefaultValueAccessor, i4.NgControlStatus, i4.NgModel, i5.MatButton, i3$1.MatSuffix, i9.MatIcon, i6$2.MatTooltip, i5$1.ActionbarComponent, i7$1.MatMenuTrigger, i5$1.CollapsibleComponent, ContextItemComponent, i5$1.ListItemDirective], pipes: [i6$1.TranslatePipe, i5$1.KeyValuePipe, i7.AsyncPipe], styles: [".context-filter-max-width[_ngcontent-%COMP%]{width:calc(100% - 100px);margin:5px;padding-left:6px}.context-filter-min-width[_ngcontent-%COMP%]{width:calc(100% - 135px);margin:5px;padding-left:6px}.clear-button[_ngcontent-%COMP%]{padding-right:5px}mat-form-field[_ngcontent-%COMP%]{height:40px}.profilsMenu[_ngcontent-%COMP%]{display:flex}.profilsMenu[_ngcontent-%COMP%] > mat-checkbox[_ngcontent-%COMP%]{width:8px}.add-context-button[_ngcontent-%COMP%]{margin:0;width:40px;display:inline-flex;overflow:hidden}"], changeDetection: 0 });
2331
2352
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextListComponent, [{
2332
2353
  type: Component,
2333
2354
  args: [{
@@ -2377,7 +2398,7 @@ ContextListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Contex
2377
2398
  }] }); })();
2378
2399
 
2379
2400
  class ContextListBindingDirective {
2380
- constructor(component, contextService, mapService, languageService, confirmDialogService, messageService, auth, storageService) {
2401
+ constructor(component, contextService, mapService, languageService, confirmDialogService, messageService, auth, storageService, cdRef) {
2381
2402
  this.contextService = contextService;
2382
2403
  this.mapService = mapService;
2383
2404
  this.languageService = languageService;
@@ -2385,6 +2406,7 @@ class ContextListBindingDirective {
2385
2406
  this.messageService = messageService;
2386
2407
  this.auth = auth;
2387
2408
  this.storageService = storageService;
2409
+ this.cdRef = cdRef;
2388
2410
  this.component = component;
2389
2411
  }
2390
2412
  onSelect(context) {
@@ -2424,14 +2446,22 @@ class ContextListBindingDirective {
2424
2446
  });
2425
2447
  }
2426
2448
  onFavorite(context) {
2449
+ if (!context.id) {
2450
+ context.id = context.uri;
2451
+ }
2427
2452
  this.contextService.setDefault(context.id).subscribe(() => {
2453
+ if (this.previousMessageId) {
2454
+ this.messageService.remove(this.previousMessageId);
2455
+ }
2428
2456
  this.contextService.defaultContextId$.next(context.id);
2429
2457
  const translate = this.languageService.translate;
2430
2458
  const message = translate.instant('igo.context.contextManager.dialog.favoriteMsg', {
2431
2459
  value: context.title
2432
2460
  });
2433
2461
  const title = translate.instant('igo.context.contextManager.dialog.favoriteTitle');
2434
- this.messageService.success(message, title);
2462
+ const messageObj = this.messageService.success(message, title);
2463
+ this.previousMessageId = messageObj.toastId;
2464
+ this.cdRef.detectChanges();
2435
2465
  });
2436
2466
  }
2437
2467
  onManageTools(context) {
@@ -2516,6 +2546,10 @@ class ContextListBindingDirective {
2516
2546
  this.defaultContextId$$ = this.contextService.defaultContextId$.subscribe((id) => {
2517
2547
  this.component.defaultContextId = id;
2518
2548
  });
2549
+ const storedContextUri = this.storageService.get('favorite.context.uri');
2550
+ if (storedContextUri && !this.auth.authenticated) {
2551
+ this.contextService.defaultContextId$.next(storedContextUri);
2552
+ }
2519
2553
  // See feature-list.component for an explanation about the debounce time
2520
2554
  this.selectedContext$$ = this.contextService.context$
2521
2555
  .pipe(debounceTime(100))
@@ -2562,7 +2596,7 @@ class ContextListBindingDirective {
2562
2596
  this.component.contexts = contexts;
2563
2597
  }
2564
2598
  }
2565
- ContextListBindingDirective.ɵfac = function ContextListBindingDirective_Factory(t) { return new (t || ContextListBindingDirective)(i0.ɵɵdirectiveInject(ContextListComponent, 2), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i1$1.MapService), i0.ɵɵdirectiveInject(i3.LanguageService), i0.ɵɵdirectiveInject(i5$1.ConfirmDialogService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.StorageService)); };
2599
+ ContextListBindingDirective.ɵfac = function ContextListBindingDirective_Factory(t) { return new (t || ContextListBindingDirective)(i0.ɵɵdirectiveInject(ContextListComponent, 2), i0.ɵɵdirectiveInject(ContextService), i0.ɵɵdirectiveInject(i1$1.MapService), i0.ɵɵdirectiveInject(i3.LanguageService), i0.ɵɵdirectiveInject(i5$1.ConfirmDialogService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.StorageService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
2566
2600
  ContextListBindingDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ContextListBindingDirective, selectors: [["", "igoContextListBinding", ""]], hostBindings: function ContextListBindingDirective_HostBindings(rf, ctx) { if (rf & 1) {
2567
2601
  i0.ɵɵlistener("select", function ContextListBindingDirective_select_HostBindingHandler($event) { return ctx.onSelect($event); })("edit", function ContextListBindingDirective_edit_HostBindingHandler($event) { return ctx.onEdit($event); })("save", function ContextListBindingDirective_save_HostBindingHandler($event) { return ctx.onSave($event); })("favorite", function ContextListBindingDirective_favorite_HostBindingHandler($event) { return ctx.onFavorite($event); })("manageTools", function ContextListBindingDirective_manageTools_HostBindingHandler($event) { return ctx.onManageTools($event); })("managePermissions", function ContextListBindingDirective_managePermissions_HostBindingHandler($event) { return ctx.onManagePermissions($event); })("delete", function ContextListBindingDirective_delete_HostBindingHandler($event) { return ctx.onDelete($event); })("clone", function ContextListBindingDirective_clone_HostBindingHandler($event) { return ctx.onClone($event); })("create", function ContextListBindingDirective_create_HostBindingHandler($event) { return ctx.onCreate($event); })("filterPermissionsChanged", function ContextListBindingDirective_filterPermissionsChanged_HostBindingHandler() { return ctx.loadContexts(); })("showHiddenContexts", function ContextListBindingDirective_showHiddenContexts_HostBindingHandler() { return ctx.showHiddenContexts(); })("show", function ContextListBindingDirective_show_HostBindingHandler($event) { return ctx.onShowContext($event); })("hide", function ContextListBindingDirective_hide_HostBindingHandler($event) { return ctx.onHideContext($event); });
2568
2602
  } } });
@@ -2573,7 +2607,7 @@ ContextListBindingDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type:
2573
2607
  }]
2574
2608
  }], function () { return [{ type: ContextListComponent, decorators: [{
2575
2609
  type: Self
2576
- }] }, { type: ContextService }, { type: i1$1.MapService }, { type: i3.LanguageService }, { type: i5$1.ConfirmDialogService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: i3.StorageService }]; }, { onSelect: [{
2610
+ }] }, { type: ContextService }, { type: i1$1.MapService }, { type: i3.LanguageService }, { type: i5$1.ConfirmDialogService }, { type: i3.MessageService }, { type: i2.AuthService }, { type: i3.StorageService }, { type: i0.ChangeDetectorRef }]; }, { onSelect: [{
2577
2611
  type: HostListener,
2578
2612
  args: ['select', ['$event']]
2579
2613
  }], onEdit: [{
@@ -3993,8 +4027,8 @@ class ShareMapService {
3993
4027
  let visibleKey = this.route.options.visibleOnLayersKey;
3994
4028
  let invisibleKey = this.route.options.visibleOffLayersKey;
3995
4029
  const layers = map.layers;
3996
- const visibleLayers = layers.filter(lay => lay.visible && lay.id !== 'searchPointerSummaryId');
3997
- const invisibleLayers = layers.filter(lay => !lay.visible && lay.id !== 'searchPointerSummaryId');
4030
+ const visibleLayers = layers.filter(lay => lay.visible && !lay.isIgoInternalLayer);
4031
+ const invisibleLayers = layers.filter(lay => !lay.visible && !lay.isIgoInternalLayer);
3998
4032
  if (visibleLayers.length === 0) {
3999
4033
  visibleKey = '';
4000
4034
  }