Skip to content

Commit 861f3ea

Browse files
committed
feat: support PascalCase component usage for global plugin installations
e. g. `<ol-map>` can now be used as `<OlMap>` as well.
1 parent 5d367b9 commit 861f3ea

File tree

8 files changed

+84
-84
lines changed

8 files changed

+84
-84
lines changed

Diff for: src/components/animations/index.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import OlAnimationZoom from "./OlAnimationZoom.vue";
99
import type { Vue3OpenlayersGlobalOptions } from "@/types";
1010

1111
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
12-
app.component("ol-animation-drop", OLAnimationDrop);
13-
app.component("ol-animation-fade", OlAnimationFade);
14-
app.component("ol-animation-path", OlAnimationPath);
15-
app.component("ol-animation-shake", OlAnimationShake);
16-
app.component("ol-animation-slide", OlAnimationSlide);
17-
app.component("ol-animation-teleport", OlAnimationTeleport);
18-
app.component("ol-animation-zoom", OlAnimationZoom);
12+
app.component("OlAnimationDrop", OLAnimationDrop);
13+
app.component("OlAnimationFade", OlAnimationFade);
14+
app.component("OlAnimationPath", OlAnimationPath);
15+
app.component("OlAnimationShake", OlAnimationShake);
16+
app.component("OlAnimationSlide", OlAnimationSlide);
17+
app.component("OlAnimationTeleport", OlAnimationTeleport);
18+
app.component("OlAnimationZoom", OlAnimationZoom);
1919

2020
app.provide("ol-options", options);
2121
}

Diff for: src/components/geometries/index.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import OlGeomPolygon from "./OlGeomPolygon.vue";
99
import type { Vue3OpenlayersGlobalOptions } from "@/types";
1010

1111
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
12-
app.component("ol-geom-circle", OlGeomCircle);
13-
app.component("ol-geom-line-string", OlGeomLineString);
14-
app.component("ol-geom-multi-line-string", OlGeomMultiLineString);
15-
app.component("ol-geom-multi-point", OlGeomMultiPoint);
16-
app.component("ol-geom-multi-polygon", OlGeomMultiPolygon);
17-
app.component("ol-geom-point", OlGeomPoint);
18-
app.component("ol-geom-polygon", OlGeomPolygon);
12+
app.component("OlGeomCircle", OlGeomCircle);
13+
app.component("OlGeomLineString", OlGeomLineString);
14+
app.component("OlGeomMultiLineString", OlGeomMultiLineString);
15+
app.component("OlGeomMultiPoint", OlGeomMultiPoint);
16+
app.component("OlGeomMultiPolygon", OlGeomMultiPolygon);
17+
app.component("OlGeomPoint", OlGeomPoint);
18+
app.component("OlGeomPolygon", OlGeomPolygon);
1919

2020
app.provide("ol-options", options);
2121
}

Diff for: src/components/interaction/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ import OlTransformInteraction from "./OlTransformInteraction.vue";
1212
import type { Vue3OpenlayersGlobalOptions } from "@/types";
1313

1414
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
15-
app.component("ol-interaction-clusterselect", OlClusterSelectInteraction);
16-
app.component("ol-interaction-dragbox", OlDragBoxInteraction);
17-
app.component("ol-interaction-dragrotate", OlDragRotateInteraction);
18-
app.component("ol-interaction-dragrotatezoom", OlDragRotateZoomInteraction);
19-
app.component("ol-interaction-link", OlLinktInteraction);
20-
app.component("ol-interaction-select", OlSelectInteraction);
21-
app.component("ol-interaction-draw", OlDrawInteraction);
22-
app.component("ol-interaction-modify", OlModifyInteraction);
23-
app.component("ol-interaction-snap", OlSnapInteraction);
24-
app.component("ol-interaction-transform", OlTransformInteraction);
15+
app.component("OlInteractionClusterselect", OlClusterSelectInteraction);
16+
app.component("OlInteractionDragbox", OlDragBoxInteraction);
17+
app.component("OlInteractionDragrotate", OlDragRotateInteraction);
18+
app.component("OlInteractionDragrotatezoom", OlDragRotateZoomInteraction);
19+
app.component("OlInteractionLink", OlLinktInteraction);
20+
app.component("OlInteractionSelect", OlSelectInteraction);
21+
app.component("OlInteractionDraw", OlDrawInteraction);
22+
app.component("OlInteractionModify", OlModifyInteraction);
23+
app.component("OlInteractionSnap", OlSnapInteraction);
24+
app.component("OlInteractionTransform", OlTransformInteraction);
2525

2626
app.provide("ol-options", options);
2727
}

Diff for: src/components/layers/index.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ import OlWebglVectorLayer from "./OlWebglVectorLayer.vue";
1212
import type { Vue3OpenlayersGlobalOptions } from "@/types";
1313

1414
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
15-
app.component("ol-animated-clusterlayer", OlAnimatedClusterLayer);
16-
app.component("ol-heatmap-layer", OlHeatmapLayer);
17-
app.component("ol-image-layer", OlImageLayer);
18-
app.component("ol-layer-group", OlLayerGroup);
19-
app.component("ol-tile-layer", OlTileLayer);
20-
app.component("ol-vector-image-layer", OlVectorImageLayer);
21-
app.component("ol-vector-layer", OlVectorLayer);
22-
app.component("ol-vector-tile-layer", OlVectorTileLayer);
23-
app.component("ol-webgl-tile-layer", OlWebglTileLayer);
24-
app.component("ol-webgl-vector-layer", OlWebglVectorLayer);
15+
app.component("OlAnimatedClusterlayer", OlAnimatedClusterLayer);
16+
app.component("OlHeatmapLayer", OlHeatmapLayer);
17+
app.component("OlImageLayer", OlImageLayer);
18+
app.component("OlLayerGroup", OlLayerGroup);
19+
app.component("OlTileLayer", OlTileLayer);
20+
app.component("OlVectorImageLayer", OlVectorImageLayer);
21+
app.component("OlVectorLayer", OlVectorLayer);
22+
app.component("OlVectorTileLayer", OlVectorTileLayer);
23+
app.component("OlWebglTileLayer", OlWebglTileLayer);
24+
app.component("OlWebglVectorLayer", OlWebglVectorLayer);
2525

2626
app.provide("ol-options", options);
2727
}

Diff for: src/components/map/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import OlView from "./OlView.vue";
88
import type { Vue3OpenlayersGlobalOptions } from "@/types";
99

1010
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
11-
app.component("ol-feature", OlFeature);
12-
app.component("ol-geolocation", OlGeoLocation);
13-
app.component("ol-map", OlMap);
14-
app.component("ol-overlay", OlOverlay);
15-
app.component("ol-projection-register", OlProjectionRegister);
16-
app.component("ol-view", OlView);
11+
app.component("OlFeature", OlFeature);
12+
app.component("OlGeolocation", OlGeoLocation);
13+
app.component("OlMap", OlMap);
14+
app.component("OlOverlay", OlOverlay);
15+
app.component("OlProjectionRegister", OlProjectionRegister);
16+
app.component("OlView", OlView);
1717

1818
app.provide("ol-options", options);
1919
}

Diff for: src/components/mapControls/index.ts

+21-21
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@ import OlZoomToExtentControl from "./OlZoomToExtentControl.vue";
2323
import type { Vue3OpenlayersGlobalOptions } from "@/types";
2424

2525
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
26-
app.component("ol-attribution-control", OlAttributionControl);
27-
app.component("ol-fullscreen-control", OlFullScreenControl);
28-
app.component("ol-mouseposition-control", OlMousePositionControl);
29-
app.component("ol-overviewmap-control", OlOverviewMapControl);
30-
app.component("ol-scaleline-control", OlScaleLineControl);
31-
app.component("ol-zoom-control", OlZoomControl);
32-
app.component("ol-zoomslider-control", OlZoomSliderControl);
33-
app.component("ol-zoomtoextent-control", OlZoomToExtentControl);
34-
app.component("ol-rotate-control", OlRotateControl);
35-
app.component("ol-context-menu-control", OlContextMenuControl);
36-
app.component("ol-search-control", OlSearchControl);
37-
app.component("ol-swipe-control", OlSwipeControl);
38-
app.component("ol-control-bar", OlControlBar);
39-
app.component("ol-toggle-control", OlToggleControl);
40-
app.component("ol-button-control", OlButtonControl);
41-
app.component("ol-printdialog-control", OlPrintDialogControl);
42-
app.component("ol-profile-control", OlProfileControl);
43-
app.component("ol-videorecorder-control", OlVideoRecorderControl);
44-
app.component("ol-layerswitcher-control", OlLayerSwitcherControl);
45-
app.component("ol-layerswitcherimage-control", OlLayerSwitcherImageControl);
46-
app.component("ol-zone-control", OlZoneControl);
26+
app.component("OlAttributionControl", OlAttributionControl);
27+
app.component("OlFullscreenControl", OlFullScreenControl);
28+
app.component("OlMousepositionControl", OlMousePositionControl);
29+
app.component("OlOverviewmapControl", OlOverviewMapControl);
30+
app.component("OlScalelineControl", OlScaleLineControl);
31+
app.component("OlZoomControl", OlZoomControl);
32+
app.component("OlZoomsliderControl", OlZoomSliderControl);
33+
app.component("OlZoomtoextentControl", OlZoomToExtentControl);
34+
app.component("OlRotateControl", OlRotateControl);
35+
app.component("OlContextMenuControl", OlContextMenuControl);
36+
app.component("OlSearchControl", OlSearchControl);
37+
app.component("OlSwipeControl", OlSwipeControl);
38+
app.component("OlControlBar", OlControlBar);
39+
app.component("OlToggleControl", OlToggleControl);
40+
app.component("OlButtonControl", OlButtonControl);
41+
app.component("OlPrintdialogControl", OlPrintDialogControl);
42+
app.component("OlProfileControl", OlProfileControl);
43+
app.component("OlVideorecorderControl", OlVideoRecorderControl);
44+
app.component("OlLayerswitcherControl", OlLayerSwitcherControl);
45+
app.component("OlLayerswitcherimageControl", OlLayerSwitcherImageControl);
46+
app.component("OlZoneControl", OlZoneControl);
4747

4848
app.provide("ol-options", options);
4949
}

Diff for: src/components/sources/index.ts

+16-16
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ import OlSourceWMTS from "./OlSourceWMTS.vue";
1818
import type { Vue3OpenlayersGlobalOptions } from "@/types";
1919

2020
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
21-
app.component("ol-source-bingmaps", OlSourceBingMaps);
22-
app.component("ol-source-cluster", OlSourceCluster);
23-
app.component("ol-source-image-static", OlSourceImageStatic);
24-
app.component("ol-source-image-wms", OlSourceImageWMS);
25-
app.component("ol-source-osm", OlSourceOSM);
26-
app.component("ol-source-stadia-maps", OlSourceStadiaMaps);
27-
app.component("ol-source-tianditu", OlSourceTianditu);
28-
app.component("ol-source-tile-arcgis-rest", OlSourceTileArcGISRest);
29-
app.component("ol-source-tile-debug", OlSourceTileDebug);
30-
app.component("ol-source-geo-tiff", OlSourceGeoTIFF);
31-
app.component("ol-source-tile-json", OlSourceTileJSON);
32-
app.component("ol-source-tile-wms", OlSourceTileWMS);
33-
app.component("ol-source-vector", OlSourceVector);
34-
app.component("ol-source-vector-tile", OlSourceVectorTile);
35-
app.component("ol-source-xyz", OlSourceXYZ);
36-
app.component("ol-source-wmts", OlSourceWMTS);
21+
app.component("OlSourceBingmaps", OlSourceBingMaps);
22+
app.component("OlSourceCluster", OlSourceCluster);
23+
app.component("OlSourceImageStatic", OlSourceImageStatic);
24+
app.component("OlSourceImageWms", OlSourceImageWMS);
25+
app.component("OlSourceOsm", OlSourceOSM);
26+
app.component("OlSourceStadiaMaps", OlSourceStadiaMaps);
27+
app.component("OlSourceTianditu", OlSourceTianditu);
28+
app.component("OlSourceTileArcgisRest", OlSourceTileArcGISRest);
29+
app.component("OlSourceTileDebug", OlSourceTileDebug);
30+
app.component("OlSourceGeoTiff", OlSourceGeoTIFF);
31+
app.component("OlSourceTileJson", OlSourceTileJSON);
32+
app.component("OlSourceTileWms", OlSourceTileWMS);
33+
app.component("OlSourceVector", OlSourceVector);
34+
app.component("OlSourceVectorTile", OlSourceVectorTile);
35+
app.component("OlSourceXyz", OlSourceXYZ);
36+
app.component("OlSourceWmts", OlSourceWMTS);
3737

3838
app.provide("ol-options", options);
3939
}

Diff for: src/components/styles/index.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ type OverrideStyleFunction = (
1717
) => Style | Style[] | void;
1818

1919
function install(app: App, options?: Vue3OpenlayersGlobalOptions) {
20-
app.component("ol-style", OlStyle);
21-
app.component("ol-style-circle", OlStyleCircle);
22-
app.component("ol-style-stroke", OlStyleStroke);
23-
app.component("ol-style-fill", OlStyleFill);
24-
app.component("ol-style-icon", OlStyleIcon);
25-
app.component("ol-style-text", OlStyleText);
26-
app.component("ol-style-flowline", OlStyleFlowline);
20+
app.component("OlStyle", OlStyle);
21+
app.component("OlStyleCircle", OlStyleCircle);
22+
app.component("OlStyleStroke", OlStyleStroke);
23+
app.component("OlStyleFill", OlStyleFill);
24+
app.component("OlStyleIcon", OlStyleIcon);
25+
app.component("OlStyleText", OlStyleText);
26+
app.component("OlStyleFlowline", OlStyleFlowline);
2727

2828
app.provide("ol-options", options);
2929
}

0 commit comments

Comments
 (0)