Skip to content

Commit

Permalink
chore: 🤖 remove url generators
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkibana committed Jun 21, 2021
1 parent 185e169 commit cc382a5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 129 deletions.
7 changes: 1 addition & 6 deletions x-pack/plugins/maps/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ import type {
} from '../../../../src/plugins/visualizations/public';
import { APP_ICON_SOLUTION, APP_ID, MAP_SAVED_OBJECT_TYPE } from '../common/constants';
import { VISUALIZE_GEO_FIELD_TRIGGER } from '../../../../src/plugins/ui_actions/public';
import {
createMapsUrlGenerator,
createRegionMapUrlGenerator,
createTileMapUrlGenerator,
} from './url_generator';
import { createRegionMapUrlGenerator, createTileMapUrlGenerator } from './url_generator';
import { visualizeGeoFieldAction } from './trigger_actions/visualize_geo_field_action';
import { filterByMapExtentAction } from './trigger_actions/filter_by_map_extent_action';
import { MapEmbeddableFactory } from './embeddable/map_embeddable_factory';
Expand Down Expand Up @@ -146,7 +142,6 @@ export class MapsPlugin
useHashedUrl: coreStart.uiSettings.get('state:storeInSessionStorage'),
};
};
plugins.share.urlGenerators.registerUrlGenerator(createMapsUrlGenerator(getStartServices));
plugins.share.urlGenerators.registerUrlGenerator(createTileMapUrlGenerator(getStartServices));
plugins.share.urlGenerators.registerUrlGenerator(createRegionMapUrlGenerator(getStartServices));

Expand Down
113 changes: 0 additions & 113 deletions x-pack/plugins/maps/public/url_generator.test.ts

This file was deleted.

10 changes: 0 additions & 10 deletions x-pack/plugins/maps/public/url_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { lazyLoadMapModules } from './lazy_load_bundle';
const STATE_STORAGE_KEY = '_a';
const GLOBAL_STATE_STORAGE_KEY = '_g';

export const MAPS_APP_URL_GENERATOR = 'MAPS_APP_URL_GENERATOR';
export const MAPS_APP_TILE_MAP_URL_GENERATOR = 'MAPS_APP_TILE_MAP_URL_GENERATOR';
export const MAPS_APP_REGION_MAP_URL_GENERATOR = 'MAPS_APP_REGION_MAP_URL_GENERATOR';

Expand Down Expand Up @@ -112,15 +111,6 @@ async function createMapUrl({
return url;
}

export const createMapsUrlGenerator = (
getStartServices: GetStartServices
): UrlGeneratorsDefinition<typeof MAPS_APP_URL_GENERATOR> => ({
id: MAPS_APP_URL_GENERATOR,
createUrl: async (mapsUrlGeneratorState: MapsUrlGeneratorState): Promise<string> => {
return createMapUrl({ ...mapsUrlGeneratorState, getStartServices });
},
});

export const createTileMapUrlGenerator = (
getStartServices: GetStartServices
): UrlGeneratorsDefinition<typeof MAPS_APP_TILE_MAP_URL_GENERATOR> => ({
Expand Down

0 comments on commit cc382a5

Please sign in to comment.