Skip to content

Commit b0cf692

Browse files
refactor: use standalone components
Closes #305
1 parent c3bed7d commit b0cf692

File tree

101 files changed

+958
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+958
-281
lines changed

projects/ngx-openlayers/src/lib/attribution.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { Component, ElementRef, OnInit } from '@angular/core';
22
import { Attribution } from 'ol/control';
33

44
@Component({
5-
selector: 'aol-attribution',
6-
template: '<ng-content></ng-content>',
5+
selector: 'aol-attribution',
6+
template: '<ng-content></ng-content>',
7+
standalone: true,
78
})
89
export class AttributionComponent implements OnInit {
910
instance: Attribution;

projects/ngx-openlayers/src/lib/attributions.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { AttributionComponent } from './attribution.component';
33
import { SourceComponent } from './sources/source.component';
44

55
@Component({
6-
selector: 'aol-attributions',
7-
template: '<ng-content></ng-content>',
6+
selector: 'aol-attributions',
7+
template: '<ng-content></ng-content>',
8+
standalone: true,
89
})
910
export class AttributionsComponent implements AfterViewInit {
1011
@ContentChildren(AttributionComponent)

projects/ngx-openlayers/src/lib/collectioncoordinates.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import { GeometryPolygonComponent } from './geom/geometrypolygon.component';
99
import { MapComponent } from './map.component';
1010

1111
@Component({
12-
selector: 'aol-collection-coordinates',
13-
template: ` <div class="aol-collection-coordinates"></div> `,
12+
selector: 'aol-collection-coordinates',
13+
template: ` <div class="aol-collection-coordinates"></div> `,
14+
standalone: true,
1415
})
1516
export class CollectionCoordinatesComponent implements OnChanges, OnInit {
1617
@Input()

projects/ngx-openlayers/src/lib/content.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Component, ElementRef } from '@angular/core';
22

33
@Component({
4-
selector: 'aol-content',
5-
template: '<ng-content></ng-content>',
4+
selector: 'aol-content',
5+
template: '<ng-content></ng-content>',
6+
standalone: true,
67
})
78
export class ContentComponent {
89
constructor(public elementRef: ElementRef) {}

projects/ngx-openlayers/src/lib/controls/attribution.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Attribution } from 'ol/control';
33
import { MapComponent } from '../map.component';
44

55
@Component({
6-
selector: 'aol-control-attribution',
7-
template: ``,
6+
selector: 'aol-control-attribution',
7+
template: ``,
8+
standalone: true,
89
})
910
export class ControlAttributionComponent implements OnInit, OnDestroy {
1011
@Input()

projects/ngx-openlayers/src/lib/controls/control.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { ContentComponent } from '../content.component';
44
import { MapComponent } from '../map.component';
55

66
@Component({
7-
selector: 'aol-control',
8-
template: ` <ng-content></ng-content> `,
7+
selector: 'aol-control',
8+
template: ` <ng-content></ng-content> `,
9+
standalone: true,
910
})
1011
export class ControlComponent implements OnInit, OnDestroy {
1112
@ContentChild(ContentComponent, { static: true })

projects/ngx-openlayers/src/lib/controls/default.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import { Options as ZoomOptions } from 'ol/control/Zoom';
88
import { MapComponent } from '../map.component';
99

1010
@Component({
11-
selector: 'aol-control-defaults',
12-
template: '',
11+
selector: 'aol-control-defaults',
12+
template: '',
13+
standalone: true,
1314
})
1415
export class DefaultControlComponent implements OnInit, OnDestroy {
1516
@Input()

projects/ngx-openlayers/src/lib/controls/fullscreen.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { FullScreen } from 'ol/control';
33
import { MapComponent } from '../map.component';
44

55
@Component({
6-
selector: 'aol-control-fullscreen',
7-
template: ` <ng-content></ng-content> `,
6+
selector: 'aol-control-fullscreen',
7+
template: ` <ng-content></ng-content> `,
8+
standalone: true,
89
})
910
export class ControlFullScreenComponent implements OnInit, OnDestroy {
1011
@Input()

projects/ngx-openlayers/src/lib/controls/mouseposition.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { ProjectionLike } from 'ol/proj';
55
import { MapComponent } from '../map.component';
66

77
@Component({
8-
selector: 'aol-control-mouseposition',
9-
template: ``,
8+
selector: 'aol-control-mouseposition',
9+
template: ``,
10+
standalone: true,
1011
})
1112
export class ControlMousePositionComponent implements OnInit, OnDestroy {
1213
@Input()

projects/ngx-openlayers/src/lib/controls/overviewmap.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { Layer } from 'ol/layer';
55
import { MapComponent } from '../map.component';
66

77
@Component({
8-
selector: 'aol-control-overviewmap',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-control-overviewmap',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class ControlOverviewMapComponent implements OnInit, OnChanges, OnDestroy {
1213
@Input()

projects/ngx-openlayers/src/lib/controls/rotate.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Rotate } from 'ol/control';
33
import { MapComponent } from '../map.component';
44

55
@Component({
6-
selector: 'aol-control-rotate',
7-
template: ` <ng-content></ng-content> `,
6+
selector: 'aol-control-rotate',
7+
template: ` <ng-content></ng-content> `,
8+
standalone: true,
89
})
910
export class ControlRotateComponent implements OnInit, OnDestroy {
1011
@Input()

projects/ngx-openlayers/src/lib/controls/scaleline.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { MapComponent } from '../map.component';
44
import { Units } from 'ol/control/ScaleLine';
55

66
@Component({
7-
selector: 'aol-control-scaleline',
8-
template: ` <ng-content></ng-content> `,
7+
selector: 'aol-control-scaleline',
8+
template: ` <ng-content></ng-content> `,
9+
standalone: true,
910
})
1011
export class ControlScaleLineComponent implements OnInit, OnDestroy {
1112
@Input()

projects/ngx-openlayers/src/lib/controls/zoom.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Zoom } from 'ol/control';
33
import { MapComponent } from '../map.component';
44

55
@Component({
6-
selector: 'aol-control-zoom',
7-
template: ` <ng-content></ng-content> `,
6+
selector: 'aol-control-zoom',
7+
template: ` <ng-content></ng-content> `,
8+
standalone: true,
89
})
910
export class ControlZoomComponent implements OnInit, OnDestroy {
1011
@Input()

projects/ngx-openlayers/src/lib/controls/zoomslider.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { ZoomSlider } from 'ol/control';
33
import { MapComponent } from '../map.component';
44

55
@Component({
6-
selector: 'aol-control-zoomslider',
7-
template: ` <ng-content></ng-content> `,
6+
selector: 'aol-control-zoomslider',
7+
template: ` <ng-content></ng-content> `,
8+
standalone: true,
89
})
910
export class ControlZoomSliderComponent implements OnInit, OnDestroy {
1011
@Input()

projects/ngx-openlayers/src/lib/controls/zoomtoextent.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { Extent } from 'ol/extent';
44
import { MapComponent } from '../map.component';
55

66
@Component({
7-
selector: 'aol-control-zoomtoextent',
8-
template: ` <ng-content></ng-content> `,
7+
selector: 'aol-control-zoomtoextent',
8+
template: ` <ng-content></ng-content> `,
9+
standalone: true,
910
})
1011
export class ControlZoomToExtentComponent implements OnInit, OnDestroy {
1112
@Input()

projects/ngx-openlayers/src/lib/coordinate.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import { OverlayComponent } from './overlay.component';
77
import { ViewComponent } from './view.component';
88

99
@Component({
10-
selector: 'aol-coordinate',
11-
template: ` <div class="aol-coordinate"></div> `,
10+
selector: 'aol-coordinate',
11+
template: ` <div class="aol-coordinate"></div> `,
12+
standalone: true,
1213
})
1314
export class CoordinateComponent implements OnChanges, OnInit {
1415
@Input()

projects/ngx-openlayers/src/lib/feature.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Feature } from 'ol';
33
import { SourceVectorComponent } from './sources/vector.component';
44

55
@Component({
6-
selector: 'aol-feature',
7-
template: ` <ng-content></ng-content> `,
6+
selector: 'aol-feature',
7+
template: ` <ng-content></ng-content> `,
8+
standalone: true,
89
})
910
export class FeatureComponent implements OnInit, OnDestroy, OnChanges {
1011
@Input()

projects/ngx-openlayers/src/lib/formats/mvt.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { MVT } from 'ol/format';
44
import { FormatComponent } from './format.component';
55

66
@Component({
7-
selector: 'aol-format-mvt',
8-
template: '',
9-
providers: [{ provide: FormatComponent, useExisting: forwardRef(() => FormatMVTComponent) }],
7+
selector: 'aol-format-mvt',
8+
template: '',
9+
providers: [{ provide: FormatComponent, useExisting: forwardRef(() => FormatMVTComponent) }],
10+
standalone: true,
1011
})
1112
export class FormatMVTComponent extends FormatComponent {
1213
@Input()

projects/ngx-openlayers/src/lib/geom/geometrycircle.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { SimpleGeometryComponent } from './simplegeometry.component';
66

77
@Component({
8-
selector: 'aol-geometry-circle',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-circle',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryCircleComponent extends SimpleGeometryComponent implements OnInit {
1213
componentType = 'geometry-circle';

projects/ngx-openlayers/src/lib/geom/geometrylinestring.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { LineString } from 'ol/geom';
66

77
@Component({
8-
selector: 'aol-geometry-linestring',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-linestring',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryLinestringComponent extends SimpleGeometryComponent implements OnInit {
1213
public componentType = 'geometry-linestring';

projects/ngx-openlayers/src/lib/geom/geometrymultilinestring.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { MultiLineString } from 'ol/geom';
66

77
@Component({
8-
selector: 'aol-geometry-multilinestring',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-multilinestring',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryMultiLinestringComponent extends SimpleGeometryComponent implements OnInit {
1213
public componentType = 'geometry-multilinestring';

projects/ngx-openlayers/src/lib/geom/geometrymultipoint.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { MultiPoint } from 'ol/geom';
66

77
@Component({
8-
selector: 'aol-geometry-multipoint',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-multipoint',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryMultiPointComponent extends SimpleGeometryComponent implements OnInit {
1213
public componentType = 'geometry-multipoint';

projects/ngx-openlayers/src/lib/geom/geometrymultipolygon.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { MultiPolygon } from 'ol/geom';
66

77
@Component({
8-
selector: 'aol-geometry-multipolygon',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-multipolygon',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryMultiPolygonComponent extends SimpleGeometryComponent implements OnInit {
1213
public componentType = 'geometry-multipolygon';

projects/ngx-openlayers/src/lib/geom/geometrypoint.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { Point } from 'ol/geom';
66

77
@Component({
8-
selector: 'aol-geometry-point',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-point',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryPointComponent extends SimpleGeometryComponent implements OnInit {
1213
public componentType = 'geometry-point';

projects/ngx-openlayers/src/lib/geom/geometrypolygon.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from '../map.component';
55
import { Polygon } from 'ol/geom';
66

77
@Component({
8-
selector: 'aol-geometry-polygon',
9-
template: ` <ng-content></ng-content> `,
8+
selector: 'aol-geometry-polygon',
9+
template: ` <ng-content></ng-content> `,
10+
standalone: true,
1011
})
1112
export class GeometryPolygonComponent extends SimpleGeometryComponent implements OnInit {
1213
public componentType = 'geometry-polygon';

projects/ngx-openlayers/src/lib/graticule.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { MapComponent } from './map.component';
55
import { Options } from 'ol/layer/Graticule';
66

77
@Component({
8-
selector: 'aol-graticule',
9-
template: '<ng-content></ng-content>',
8+
selector: 'aol-graticule',
9+
template: '<ng-content></ng-content>',
10+
standalone: true,
1011
})
1112
export class GraticuleComponent implements AfterContentInit, OnChanges, OnDestroy {
1213
@Input()

projects/ngx-openlayers/src/lib/interactions/default.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { Collection } from 'ol';
44
import { MapComponent } from '../map.component';
55

66
@Component({
7-
selector: 'aol-interaction-default',
8-
template: '',
7+
selector: 'aol-interaction-default',
8+
template: '',
9+
standalone: true,
910
})
1011
export class DefaultInteractionComponent implements OnInit, OnDestroy {
1112
instance: Collection<Interaction>;

projects/ngx-openlayers/src/lib/interactions/doubleclickzoom.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { DoubleClickZoom } from 'ol/interaction';
33
import { MapComponent } from '../map.component';
44

55
@Component({
6-
selector: 'aol-interaction-doubleclickzoom',
7-
template: '',
6+
selector: 'aol-interaction-doubleclickzoom',
7+
template: '',
8+
standalone: true,
89
})
910
export class DoubleClickZoomInteractionComponent implements OnInit, OnDestroy {
1011
@Input()

projects/ngx-openlayers/src/lib/interactions/draganddrop.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { ProjectionLike } from 'ol/proj';
55
import { MapComponent } from '../map.component';
66

77
@Component({
8-
selector: 'aol-interaction-draganddrop',
9-
template: '',
8+
selector: 'aol-interaction-draganddrop',
9+
template: '',
10+
standalone: true,
1011
})
1112
export class DragAndDropInteractionComponent implements OnInit, OnDestroy {
1213
@Input()

projects/ngx-openlayers/src/lib/interactions/dragbox.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { EndCondition } from 'ol/interaction/DragBox';
55
import { MapComponent } from '../map.component';
66

77
@Component({
8-
selector: 'aol-interaction-dragbox',
9-
template: '',
8+
selector: 'aol-interaction-dragbox',
9+
template: '',
10+
standalone: true,
1011
})
1112
export class DragBoxInteractionComponent implements OnInit, OnDestroy {
1213
@Input()

projects/ngx-openlayers/src/lib/interactions/dragpan.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { DragPan } from 'ol/interaction';
55
import { MapComponent } from '../map.component';
66

77
@Component({
8-
selector: 'aol-interaction-dragpan',
9-
template: '',
8+
selector: 'aol-interaction-dragpan',
9+
template: '',
10+
standalone: true,
1011
})
1112
export class DragPanInteractionComponent implements OnInit, OnDestroy {
1213
@Input()

projects/ngx-openlayers/src/lib/interactions/dragrotate.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { DragRotate } from 'ol/interaction';
44
import { MapComponent } from '../map.component';
55

66
@Component({
7-
selector: 'aol-interaction-dragrotate',
8-
template: '',
7+
selector: 'aol-interaction-dragrotate',
8+
template: '',
9+
standalone: true,
910
})
1011
export class DragRotateInteractionComponent implements OnInit, OnDestroy {
1112
@Input()

projects/ngx-openlayers/src/lib/interactions/dragrotateandzoom.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import { DragRotateAndZoom } from 'ol/interaction';
44
import { MapComponent } from '../map.component';
55

66
@Component({
7-
selector: 'aol-interaction-dragrotateandzoom',
8-
template: '',
7+
selector: 'aol-interaction-dragrotateandzoom',
8+
template: '',
9+
standalone: true,
910
})
1011
export class DragRotateAndZoomInteractionComponent implements OnInit, OnDestroy {
1112
@Input()

0 commit comments

Comments
 (0)