@igo2/geo 20.1.0-next.16 → 20.1.0-next.18

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.
@@ -17593,9 +17593,7 @@ class DirectionsComponent {
17593
17593
  directionsSourceService = inject(DirectionsSourceService);
17594
17594
  searchService = inject(SearchService);
17595
17595
  queryService = inject(QueryService);
17596
- messageService = inject(MessageService);
17597
17596
  projection = 'EPSG:4326';
17598
- hasOsrmPrivateAccess = false;
17599
17597
  twoSourcesAvailable = false;
17600
17598
  storeEmpty$$;
17601
17599
  storeChange$$;
@@ -17607,7 +17605,6 @@ class DirectionsComponent {
17607
17605
  isTranslating = false;
17608
17606
  previousStops = [];
17609
17607
  searchs$$ = [];
17610
- authenticated$$;
17611
17608
  contextUri = input(undefined, ...(ngDevMode ? [{ debugName: "contextUri" }] : []));
17612
17609
  stopsStore = input.required(...(ngDevMode ? [{ debugName: "stopsStore" }] : []));
17613
17610
  stopsFeatureStore = input.required(...(ngDevMode ? [{ debugName: "stopsFeatureStore" }] : []));
@@ -17632,19 +17629,6 @@ class DirectionsComponent {
17632
17629
  .authorization;
17633
17630
  }
17634
17631
  ngOnInit() {
17635
- this.authenticated$$ = this.authenticated$().subscribe((authenticated) => {
17636
- if (authenticated) {
17637
- const profileWithAuth = this.directionsSourceService.sources[0].getProfileWithAuthorization();
17638
- if (profileWithAuth) {
17639
- this.http
17640
- .get(profileWithAuth.authorization.url)
17641
- .subscribe((user) => {
17642
- this.hasOsrmPrivateAccess =
17643
- user[profileWithAuth.authorization.property];
17644
- });
17645
- }
17646
- }
17647
- });
17648
17632
  this.twoSourcesAvailable =
17649
17633
  this.directionsSourceService.sources[0].profiles.length === 2
17650
17634
  ? true
@@ -17660,10 +17644,9 @@ class DirectionsComponent {
17660
17644
  }
17661
17645
  ngOnDestroy() {
17662
17646
  this.queryService.queryEnabled = true;
17663
- this.storeEmpty$$.unsubscribe();
17664
- this.storeChange$$.unsubscribe();
17665
- this.routesQueries$$.map((u) => u.unsubscribe());
17666
- this.authenticated$$.unsubscribe();
17647
+ this.storeEmpty$$?.unsubscribe();
17648
+ this.storeChange$$?.unsubscribe();
17649
+ this.routesQueries$$?.map((u) => u.unsubscribe());
17667
17650
  this.freezeStores();
17668
17651
  const stopsFeatureStore = this.stopsFeatureStore();
17669
17652
  if (stopsFeatureStore.empty) {
@@ -17919,19 +17902,8 @@ class DirectionsComponent {
17919
17902
  ? ol.addInteraction(interaction)
17920
17903
  : ol.removeInteraction(interaction));
17921
17904
  }
17922
- onTogglePrivateModeControl(isActive) {
17923
- this.directionsSourceService.sources[0].profiles.forEach((profile) => (profile.enabled = false));
17924
- if (isActive) {
17925
- this.directionsSourceService.sources[0].profiles.find((profile) => profile.authorization).enabled = true;
17926
- this.messageService.alert(this.languageService.translate.instant('igo.geo.directions.forestRoadsWarning.text'), this.languageService.translate.instant('igo.geo.directions.forestRoadsWarning.title'));
17927
- }
17928
- else {
17929
- this.directionsSourceService.sources[0].profiles.find((profile) => !profile.authorization).enabled = true;
17930
- }
17931
- this.getRoutes();
17932
- }
17933
17905
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DirectionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
17934
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DirectionsComponent, isStandalone: true, selector: "igo-directions", inputs: { contextUri: { classPropertyName: "contextUri", publicName: "contextUri", isSignal: true, isRequired: false, transformFunction: null }, stopsStore: { classPropertyName: "stopsStore", publicName: "stopsStore", isSignal: true, isRequired: true, transformFunction: null }, stopsFeatureStore: { classPropertyName: "stopsFeatureStore", publicName: "stopsFeatureStore", isSignal: true, isRequired: true, transformFunction: null }, routesFeatureStore: { classPropertyName: "routesFeatureStore", publicName: "routesFeatureStore", isSignal: true, isRequired: true, transformFunction: null }, stepsFeatureStore: { classPropertyName: "stepsFeatureStore", publicName: "stepsFeatureStore", isSignal: true, isRequired: true, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, coordRoundedDecimals: { classPropertyName: "coordRoundedDecimals", publicName: "coordRoundedDecimals", isSignal: true, isRequired: false, transformFunction: null }, authenticated$: { classPropertyName: "authenticated$", publicName: "authenticated$", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"directions-options\">\n <mat-slide-toggle\n [checked]=\"directionControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleDirectionsControl($event.checked)\"\n >\n {{ 'igo.geo.directions.toggle.activateControl' | translate }}\n </mat-slide-toggle>\n @if (hasOsrmPrivateAccess && twoSourcesAvailable) {\n <mat-slide-toggle\n [checked]=\"enabledProfileHasAuthorization\"\n [labelPosition]=\"'before'\"\n (change)=\"onTogglePrivateModeControl($event.checked)\"\n >\n {{ 'igo.geo.directions.toggle.type' | translate }}\n </mat-slide-toggle>\n }\n</div>\n\n<igo-directions-inputs\n (stopInputHasFocus)=\"onStopInputHasFocusChange($event)\"\n [coordRoundedDecimals]=\"coordRoundedDecimals()\"\n [projection]=\"projection\"\n [stopsFeatureStore]=\"stopsFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n [debounce]=\"debounce()\"\n [length]=\"length()\"\n/>\n\n@if (routesFeatureStore().all().length > 0) {\n <igo-directions-buttons\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [contextUri]=\"contextUri()\"\n (zoomOnActiveRoute)=\"zoomOnActiveRoute()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n />\n}\n\n<igo-directions-results\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n/>\n", styles: [":host{display:block;padding:16px}.directions-options{display:flex;flex-flow:column;align-items:center;row-gap:8px;margin-bottom:16px}.directions-options mat-slide-toggle{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;margin-right:auto;width:auto;padding-right:0}.directions-options mat-slide-toggle ::ng-deep .mdc-slide-toggle{margin-left:auto;margin-right:0}\n"], dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: DirectionsButtonsComponent, selector: "igo-directions-buttons", inputs: ["contextUri", "stopsStore", "routesFeatureStore", "stepsFeatureStore"], outputs: ["zoomOnActiveRoute"] }, { kind: "component", type: DirectionsInputsComponent, selector: "igo-directions-inputs", inputs: ["stopsStore", "stopsFeatureStore", "projection", "coordRoundedDecimals", "debounce", "length"], outputs: ["stopInputHasFocus"] }, { kind: "component", type: DirectionsResultsComponent, selector: "igo-directions-results", inputs: ["routesFeatureStore", "stepsFeatureStore"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
17906
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DirectionsComponent, isStandalone: true, selector: "igo-directions", inputs: { contextUri: { classPropertyName: "contextUri", publicName: "contextUri", isSignal: true, isRequired: false, transformFunction: null }, stopsStore: { classPropertyName: "stopsStore", publicName: "stopsStore", isSignal: true, isRequired: true, transformFunction: null }, stopsFeatureStore: { classPropertyName: "stopsFeatureStore", publicName: "stopsFeatureStore", isSignal: true, isRequired: true, transformFunction: null }, routesFeatureStore: { classPropertyName: "routesFeatureStore", publicName: "routesFeatureStore", isSignal: true, isRequired: true, transformFunction: null }, stepsFeatureStore: { classPropertyName: "stepsFeatureStore", publicName: "stepsFeatureStore", isSignal: true, isRequired: true, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, coordRoundedDecimals: { classPropertyName: "coordRoundedDecimals", publicName: "coordRoundedDecimals", isSignal: true, isRequired: false, transformFunction: null }, authenticated$: { classPropertyName: "authenticated$", publicName: "authenticated$", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"directions-options\">\n <mat-slide-toggle\n [checked]=\"directionControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleDirectionsControl($event.checked)\"\n >\n {{ 'igo.geo.directions.toggle.activateControl' | translate }}\n </mat-slide-toggle>\n</div>\n\n<igo-directions-inputs\n (stopInputHasFocus)=\"onStopInputHasFocusChange($event)\"\n [coordRoundedDecimals]=\"coordRoundedDecimals()\"\n [projection]=\"projection\"\n [stopsFeatureStore]=\"stopsFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n [debounce]=\"debounce()\"\n [length]=\"length()\"\n/>\n\n@if (routesFeatureStore().all().length > 0) {\n <igo-directions-buttons\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [contextUri]=\"contextUri()\"\n (zoomOnActiveRoute)=\"zoomOnActiveRoute()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n />\n}\n\n<igo-directions-results\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n/>\n", styles: [":host{display:block;padding:16px}.directions-options{display:flex;flex-flow:column;align-items:center;row-gap:8px;margin-bottom:16px}.directions-options mat-slide-toggle{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;margin-right:auto;width:auto;padding-right:0}.directions-options mat-slide-toggle ::ng-deep .mdc-slide-toggle{margin-left:auto;margin-right:0}\n"], dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: DirectionsButtonsComponent, selector: "igo-directions-buttons", inputs: ["contextUri", "stopsStore", "routesFeatureStore", "stepsFeatureStore"], outputs: ["zoomOnActiveRoute"] }, { kind: "component", type: DirectionsInputsComponent, selector: "igo-directions-inputs", inputs: ["stopsStore", "stopsFeatureStore", "projection", "coordRoundedDecimals", "debounce", "length"], outputs: ["stopInputHasFocus"] }, { kind: "component", type: DirectionsResultsComponent, selector: "igo-directions-results", inputs: ["routesFeatureStore", "stepsFeatureStore"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
17935
17907
  }
17936
17908
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DirectionsComponent, decorators: [{
17937
17909
  type: Component,
@@ -17941,7 +17913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
17941
17913
  DirectionsInputsComponent,
17942
17914
  DirectionsResultsComponent,
17943
17915
  IgoLanguageModule
17944
- ], template: "<div class=\"directions-options\">\n <mat-slide-toggle\n [checked]=\"directionControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleDirectionsControl($event.checked)\"\n >\n {{ 'igo.geo.directions.toggle.activateControl' | translate }}\n </mat-slide-toggle>\n @if (hasOsrmPrivateAccess && twoSourcesAvailable) {\n <mat-slide-toggle\n [checked]=\"enabledProfileHasAuthorization\"\n [labelPosition]=\"'before'\"\n (change)=\"onTogglePrivateModeControl($event.checked)\"\n >\n {{ 'igo.geo.directions.toggle.type' | translate }}\n </mat-slide-toggle>\n }\n</div>\n\n<igo-directions-inputs\n (stopInputHasFocus)=\"onStopInputHasFocusChange($event)\"\n [coordRoundedDecimals]=\"coordRoundedDecimals()\"\n [projection]=\"projection\"\n [stopsFeatureStore]=\"stopsFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n [debounce]=\"debounce()\"\n [length]=\"length()\"\n/>\n\n@if (routesFeatureStore().all().length > 0) {\n <igo-directions-buttons\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [contextUri]=\"contextUri()\"\n (zoomOnActiveRoute)=\"zoomOnActiveRoute()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n />\n}\n\n<igo-directions-results\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n/>\n", styles: [":host{display:block;padding:16px}.directions-options{display:flex;flex-flow:column;align-items:center;row-gap:8px;margin-bottom:16px}.directions-options mat-slide-toggle{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;margin-right:auto;width:auto;padding-right:0}.directions-options mat-slide-toggle ::ng-deep .mdc-slide-toggle{margin-left:auto;margin-right:0}\n"] }]
17916
+ ], template: "<div class=\"directions-options\">\n <mat-slide-toggle\n [checked]=\"directionControlIsActive\"\n [labelPosition]=\"'before'\"\n (change)=\"onToggleDirectionsControl($event.checked)\"\n >\n {{ 'igo.geo.directions.toggle.activateControl' | translate }}\n </mat-slide-toggle>\n</div>\n\n<igo-directions-inputs\n (stopInputHasFocus)=\"onStopInputHasFocusChange($event)\"\n [coordRoundedDecimals]=\"coordRoundedDecimals()\"\n [projection]=\"projection\"\n [stopsFeatureStore]=\"stopsFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n [debounce]=\"debounce()\"\n [length]=\"length()\"\n/>\n\n@if (routesFeatureStore().all().length > 0) {\n <igo-directions-buttons\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [contextUri]=\"contextUri()\"\n (zoomOnActiveRoute)=\"zoomOnActiveRoute()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n [stopsStore]=\"stopsStore()\"\n />\n}\n\n<igo-directions-results\n [stepsFeatureStore]=\"stepsFeatureStore()\"\n [routesFeatureStore]=\"routesFeatureStore()\"\n/>\n", styles: [":host{display:block;padding:16px}.directions-options{display:flex;flex-flow:column;align-items:center;row-gap:8px;margin-bottom:16px}.directions-options mat-slide-toggle{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-form-field{width:100%}.directions-options mat-slide-toggle ::ng-deep .mdc-label{margin-left:0;margin-right:auto;width:auto;padding-right:0}.directions-options mat-slide-toggle ::ng-deep .mdc-slide-toggle{margin-left:auto;margin-right:0}\n"] }]
17945
17917
  }], propDecorators: { contextUri: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextUri", required: false }] }], stopsStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "stopsStore", required: true }] }], stopsFeatureStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "stopsFeatureStore", required: true }] }], routesFeatureStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "routesFeatureStore", required: true }] }], stepsFeatureStore: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepsFeatureStore", required: true }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], coordRoundedDecimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "coordRoundedDecimals", required: false }] }], authenticated$: [{ type: i0.Input, args: [{ isSignal: true, alias: "authenticated$", required: true }] }] } });
17946
17918
 
17947
17919
  class IgoDirectionsModule {