@igo2/geo 21.0.0-next.24 → 21.0.0-next.26

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.
@@ -1785,9 +1785,7 @@ function generateIdFromSourceOptions(options) {
1785
1785
  osm: () => 'OSM',
1786
1786
  tiledebug: () => 'tiledebug'
1787
1787
  };
1788
- const generator = options.type
1789
- ? (generators[options.type] ?? generateId)
1790
- : generateId;
1788
+ const generator = generators[options.type] ?? generateId;
1791
1789
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1792
1790
  return generator(options);
1793
1791
  }
@@ -1894,7 +1892,7 @@ class DataSource {
1894
1892
  }
1895
1893
  events = new Map();
1896
1894
  properties = new DatasourceProperties();
1897
- constructor(options = {}, dataService) {
1895
+ constructor(options, dataService) {
1898
1896
  this.options = options;
1899
1897
  this.dataService = dataService;
1900
1898
  this.options = options;
@@ -4778,6 +4776,9 @@ function hasVectorSourceLoader(dataSource) {
4778
4776
  }
4779
4777
 
4780
4778
  class FeatureDataSource extends DataSource {
4779
+ constructor(options = { type: 'vector' }) {
4780
+ super(options);
4781
+ }
4781
4782
  get saveableOptions() {
4782
4783
  const baseOptions = super.saveableOptions;
4783
4784
  return {
@@ -7073,6 +7074,9 @@ function provideDirectionsSourceService() {
7073
7074
  }
7074
7075
 
7075
7076
  class OSMDataSource extends DataSource {
7077
+ constructor(options = { type: 'osm' }) {
7078
+ super(options);
7079
+ }
7076
7080
  createOlSource() {
7077
7081
  if (!this.options.url) {
7078
7082
  this.options.url = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
@@ -11036,7 +11040,8 @@ class DataSourceService {
11036
11040
  }
11037
11041
  observables.push(of(options));
11038
11042
  return forkJoin(observables).pipe(map((opts) => {
11039
- const optionsMerged = opts.reduce((a, b) => ObjectUtils.mergeDeep(a, b));
11043
+ const [firstOptions, ...remainingOptions] = opts;
11044
+ const optionsMerged = remainingOptions.reduce((a, b) => ObjectUtils.mergeDeep(a, b), firstOptions);
11040
11045
  return new ArcGISRestDataSource(optionsMerged);
11041
11046
  }), catchError(() => {
11042
11047
  return of(undefined);
@@ -11064,7 +11069,8 @@ class DataSourceService {
11064
11069
  }
11065
11070
  observables.push(of(options));
11066
11071
  return forkJoin(observables).pipe(map((opts) => {
11067
- const optionsMerged = opts.reduce((a, b) => ObjectUtils.mergeDeep(a, b));
11072
+ const [firstOptions, ...remainingOptions] = opts;
11073
+ const optionsMerged = remainingOptions.reduce((a, b) => ObjectUtils.mergeDeep(a, b), firstOptions);
11068
11074
  return new ImageArcGISRestDataSource(optionsMerged);
11069
11075
  }), catchError(() => {
11070
11076
  return of(undefined);
@@ -11092,7 +11098,8 @@ class DataSourceService {
11092
11098
  }
11093
11099
  observables.push(of(options));
11094
11100
  return forkJoin(observables).pipe(map((opts) => {
11095
- const optionsMerged = opts.reduce((a, b) => ObjectUtils.mergeDeep(a, b));
11101
+ const [firstOptions, ...remainingOptions] = opts;
11102
+ const optionsMerged = remainingOptions.reduce((a, b) => ObjectUtils.mergeDeep(a, b), firstOptions);
11096
11103
  return new TileArcGISRestDataSource(optionsMerged);
11097
11104
  }), catchError(() => {
11098
11105
  return of(undefined);
@@ -11644,6 +11651,9 @@ function mergeLayersOptions(layersOptionsTree, layersOptions) {
11644
11651
  return tree;
11645
11652
  }
11646
11653
  function handleExternalDataSource(options) {
11654
+ if (!options.sourceOptions) {
11655
+ return;
11656
+ }
11647
11657
  options.sourceOptions = {
11648
11658
  ...options.sourceOptions,
11649
11659
  optionsFromCapabilities: true,
@@ -12864,9 +12874,9 @@ class LayerUnavailableComponent {
12864
12874
  get title() {
12865
12875
  const sourceOptions = this.layerOptions()?.sourceOptions;
12866
12876
  return (this.layerOptions()?.title ??
12867
- sourceOptions?.['params']?.['LAYERS'] ??
12868
- sourceOptions?.['params']?.['layers'] ??
12869
- sourceOptions?.['layer']);
12877
+ sourceOptions?.params?.['LAYERS'] ??
12878
+ sourceOptions?.params?.['layers'] ??
12879
+ sourceOptions?.layer);
12870
12880
  }
12871
12881
  handleRemove(layerOptions) {
12872
12882
  this.remove.emit(layerOptions);
@@ -20016,17 +20026,9 @@ class OgcFilterableItemComponent {
20016
20026
  firstFieldName =
20017
20027
  includedFields[0].name === undefined ? '' : includedFields[0].name;
20018
20028
  }
20019
- let fieldNameGeometry;
20020
- const datasourceOptions = this.datasource
20021
- .options;
20022
- if (datasourceOptions.fieldNameGeometry) {
20023
- fieldNameGeometry = datasourceOptions.fieldNameGeometry;
20024
- }
20025
- else if (this.datasource.options.paramsWFS &&
20026
- this.datasource.options.paramsWFS.fieldNameGeometry) {
20027
- fieldNameGeometry = this.datasource.options.paramsWFS
20028
- .fieldNameGeometry;
20029
- }
20029
+ const paramsWFS = this.datasource.options
20030
+ .paramsWFS;
20031
+ const fieldNameGeometry = this.datasource.options.fieldNameGeometry ?? paramsWFS?.fieldNameGeometry;
20030
20032
  const allowedOperators = this.ogcFilterWriter.computeAllowedOperators(this.datasource.options.sourceFields, firstFieldName, this.datasource.options.ogcFilters.allowedOperatorsType);
20031
20033
  const firstOperatorName = Object.keys(allowedOperators)[0];
20032
20034
  arr.push(this.ogcFilterWriter.addInterfaceFilter({
@@ -32370,7 +32372,7 @@ class SearchResultsItemComponent {
32370
32372
  }
32371
32373
  }
32372
32374
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32373
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchResultsItemComponent, isStandalone: true, selector: "igo-search-results-item", inputs: { result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: true, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, withZoomButton: { classPropertyName: "withZoomButton", publicName: "withZoomButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zoomEvent: "zoomEvent" }, ngImport: i0, template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon matListItemIcon>{{ showIcons() ? icon : 'blank' }}</mat-icon>\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [innerHTML]=\"titleHtml | sanitizeHtml\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"tooltipHtml\"\n matTooltipClass=\"search-result-tooltip\"\n ></span>\n } @else {\n <span\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"title\"\n >{{ title }}</span\n >\n }\n\n <div matListItemMeta>\n @if (withZoomButton()) {\n <button igoStopPropagation mat-icon-button (click)=\"onZoomHandler()\">\n <mat-icon>search</mat-icon>\n </button>\n }\n\n <ng-content select=\"[igoSearchItemToolbar]\" />\n </div>\n</mat-list-item>\n", styles: [":host ::ng-deep small{color:#8c8c8c}:host div[matlistitemmeta]:empty{display:none}:host ::ng-deep .search-result-tooltip{white-space:pre-line}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:#000}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#000000de}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32375
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: SearchResultsItemComponent, isStandalone: true, selector: "igo-search-results-item", inputs: { result: { classPropertyName: "result", publicName: "result", isSignal: true, isRequired: true, transformFunction: null }, map: { classPropertyName: "map", publicName: "map", isSignal: true, isRequired: false, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, withZoomButton: { classPropertyName: "withZoomButton", publicName: "withZoomButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zoomEvent: "zoomEvent" }, ngImport: i0, template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon\n matListItemIcon\n [class.igo-search-results-item__icon-hidden]=\"!showIcons()\"\n [attr.aria-hidden]=\"!showIcons() ? 'true' : null\"\n >{{ icon }}</mat-icon\n >\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [innerHTML]=\"titleHtml | sanitizeHtml\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"tooltipHtml\"\n matTooltipClass=\"search-result-tooltip\"\n ></span>\n } @else {\n <span\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"title\"\n >{{ title }}</span\n >\n }\n\n <div matListItemMeta>\n @if (withZoomButton()) {\n <button igoStopPropagation mat-icon-button (click)=\"onZoomHandler()\">\n <mat-icon>search</mat-icon>\n </button>\n }\n\n <ng-content select=\"[igoSearchItemToolbar]\" />\n </div>\n</mat-list-item>\n", styles: [":host ::ng-deep small{color:#8c8c8c}:host div[matlistitemmeta]:empty{display:none}:host ::ng-deep .search-result-tooltip{white-space:pre-line}.igo-search-results-item__icon-hidden{visibility:hidden}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:#000}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#000000de}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i1$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$2.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i1$2.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i1$2.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: StopPropagationDirective, selector: "[igoStopPropagation]" }, { kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
32374
32376
  }
32375
32377
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: SearchResultsItemComponent, decorators: [{
32376
32378
  type: Component,
@@ -32381,7 +32383,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
32381
32383
  MatButtonModule,
32382
32384
  SanitizeHtmlPipe,
32383
32385
  StopPropagationDirective
32384
- ], template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon matListItemIcon>{{ showIcons() ? icon : 'blank' }}</mat-icon>\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [innerHTML]=\"titleHtml | sanitizeHtml\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"tooltipHtml\"\n matTooltipClass=\"search-result-tooltip\"\n ></span>\n } @else {\n <span\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"title\"\n >{{ title }}</span\n >\n }\n\n <div matListItemMeta>\n @if (withZoomButton()) {\n <button igoStopPropagation mat-icon-button (click)=\"onZoomHandler()\">\n <mat-icon>search</mat-icon>\n </button>\n }\n\n <ng-content select=\"[igoSearchItemToolbar]\" />\n </div>\n</mat-list-item>\n", styles: [":host ::ng-deep small{color:#8c8c8c}:host div[matlistitemmeta]:empty{display:none}:host ::ng-deep .search-result-tooltip{white-space:pre-line}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:#000}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#000000de}\n"] }]
32386
+ ], template: "<mat-list-item\n (mouseenter)=\"onMouseEvent($event)\"\n (mouseleave)=\"onMouseEvent($event)\"\n>\n @if (icon) {\n <mat-icon\n matListItemIcon\n [class.igo-search-results-item__icon-hidden]=\"!showIcons()\"\n [attr.aria-hidden]=\"!showIcons() ? 'true' : null\"\n >{{ icon }}</mat-icon\n >\n }\n\n @if (titleHtml) {\n <span\n matListItemTitle\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n [innerHTML]=\"titleHtml | sanitizeHtml\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"tooltipHtml\"\n matTooltipClass=\"search-result-tooltip\"\n ></span>\n } @else {\n <span\n class=\"igo-list-item-with-text-overflow-ellipsis\"\n matTooltipShowDelay=\"500\"\n [matTooltip]=\"title\"\n >{{ title }}</span\n >\n }\n\n <div matListItemMeta>\n @if (withZoomButton()) {\n <button igoStopPropagation mat-icon-button (click)=\"onZoomHandler()\">\n <mat-icon>search</mat-icon>\n </button>\n }\n\n <ng-content select=\"[igoSearchItemToolbar]\" />\n </div>\n</mat-list-item>\n", styles: [":host ::ng-deep small{color:#8c8c8c}:host div[matlistitemmeta]:empty{display:none}:host ::ng-deep .search-result-tooltip{white-space:pre-line}.igo-search-results-item__icon-hidden{visibility:hidden}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:#000}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#000000de}\n"] }]
32385
32387
  }], propDecorators: { result: [{ type: i0.Input, args: [{ isSignal: true, alias: "result", required: true }] }], map: [{ type: i0.Input, args: [{ isSignal: true, alias: "map", required: false }] }], showIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcons", required: false }] }], withZoomButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "withZoomButton", required: false }] }], zoomEvent: [{ type: i0.Output, args: ["zoomEvent"] }] } });
32386
32388
 
32387
32389
  class SaveFeatureDialogComponent {
@@ -34916,7 +34918,9 @@ class ILayerSearchSource extends SearchSource {
34916
34918
  return options;
34917
34919
  }
34918
34920
  extractResults(response, term) {
34919
- return response.items.map((data) => this.dataToResult(data, term, response));
34921
+ return response.items
34922
+ .filter((data) => data.properties.format !== undefined)
34923
+ .map((data) => this.dataToResult(data, term, response));
34920
34924
  }
34921
34925
  dataToResult(data, term, response) {
34922
34926
  const layerOptions = this.computeLayerOptions(data);