Skip to content

Commit

Permalink
refactor: Align panel,componentm folder and config names for panel co…
Browse files Browse the repository at this point in the history
…mponents

Align layerm-manager files with  naming convention of the repo

BREAKING CHANGE: panelsEnabled options renamed
  • Loading branch information
FilipLeitner authored and jmacura committed Feb 13, 2024
1 parent 32c7855 commit 842e238
Show file tree
Hide file tree
Showing 137 changed files with 190 additions and 188 deletions.
6 changes: 3 additions & 3 deletions cypress/tests/add-data-url.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
function checkIfLayerAdded(layerName) {
cy.get(`hs-panel-header[name="layermanager"]`).should('be.visible');
cy.get(
'hs-layermanager-layer-list li:first .d-flex button.hs-lm-item-visibility',
'hs-layer-manager-layer-list li:first .d-flex button.hs-lm-item-visibility',
).should('have.class', 'hs-checkmark');
cy.get('hs-layermanager-layer-list li:first .hs-lm-item-title').should(
cy.get('hs-layer-manager-layer-list li:first .hs-lm-item-title').should(
'have.text',
` ${layerName} `, //Extra padding around title
);
Expand Down Expand Up @@ -39,7 +39,7 @@ describe('Hslayers application', () => {
//Open layer manager
cy.get('.hs-sidebar-item[data-cy="layermanager"]').click();
//Turn off all layers
cy.get('hs-layermanager-layer-list li .d-flex button.hs-checkmark').each(
cy.get('hs-layer-manager-layer-list li .d-flex button.hs-checkmark').each(
(button) => {
cy.wrap(button).click();
},
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/layermanager.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Hslayers application', () => {
//Open layer manager
cy.get('.hs-sidebar-item[data-cy="layermanager"]').click();
//Turn off all layers
cy.get('hs-layermanager-layer-list li .d-flex button.hs-checkmark').each(
cy.get('hs-layer-manager-layer-list li .d-flex button.hs-checkmark').each(
(button) => {
cy.wrap(button).click();
},
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/sidebar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Hslayers application', () => {
//Open layer manager
cy.get('.hs-sidebar-item[data-cy="layermanager"]').click();
//Turn off all layers
cy.get('hs-layermanager-layer-list li .d-flex button.hs-checkmark').each(
cy.get('hs-layer-manager-layer-list li .d-flex button.hs-checkmark').each(
(button) => {
cy.wrap(button).click();
},
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/styles.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Hslayers application', () => {
//Open layer manager
cy.get('.hs-sidebar-item[data-cy="layermanager"]').click();
//Turn off all layers
cy.get('hs-layermanager-layer-list li .d-flex button.hs-checkmark').each(
cy.get('hs-layer-manager-layer-list li .d-flex button.hs-checkmark').each(
(button) => {
cy.wrap(button).click();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<hs-map class="hs-flex-fill d-flex"></hs-map>
<hs-mat-overlay class="hs-overlay hs-flex-fill w-100 h-100"></hs-mat-overlay>
<ng-template map-host></ng-template>
<!-- <hs-layermanager-gallery *ngIf="HsLayoutService.componentEnabled('basemapGallery')"></hs-layermanager-gallery> -->
<!-- <hs-layer-manager-gallery *ngIf="HsLayoutService.componentEnabled('basemapGallery')"></hs-layer-manager-gallery> -->
<!-- <hs-toolbar [hidden]="!(panelEnabled('toolbar') && HsLayoutService.componentEnabled('toolbar'))"> -->
<!-- </hs-toolbar> -->
<!-- <hs-geolocation [hidden]="!HsLayoutService.componentEnabled('geolocationButton')"></hs-geolocation> -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Subject} from 'rxjs';
import {ImageWMS, Source, TileWMS} from 'ol/source';
import {Layer} from 'ol/layer';

import {HsLayerDescriptor} from '../../components/layermanager/layer-descriptor.interface';
import {HsLayerDescriptor} from '../../components/layer-manager/layer-descriptor.interface';
import {HsLogService} from '../log/log.service';
import {HsUtilsService} from '../../components/utils/utils.service';
import {HsWmsLayer} from './wms-get-capabilities-response.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Layer} from 'ol/layer';
import {Source} from 'ol/source';

import {HsEventBusService} from '../../components/core/event-bus.service';
import {HsLayerManagerService} from '../../components/layermanager/layermanager.service';
import {HsLayerManagerService} from '../../components/layer-manager/layer-manager.service';
import {HsMapService} from '../../components/map/map.service';
import {HsUtilsService} from '../../components/utils/utils.service';
import {getBase} from '../layer-extensions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {HsGetCapabilitiesErrorComponent} from './common/capabilities-error-dialo
import {HsLanguageService} from '../language/language.service';
import {HsLayoutService} from '../layout/layout.service';
import {HsPanelBaseComponent} from '../layout/panels/panel-base.component';
import {HsShareUrlService} from '../permalink/share-url.service';
import {HsShareUrlService} from '../share/share-url.service';
import {HsSidebarService} from '../sidebar/sidebar.service';
import {servicesSupportedByUrl} from './url/services-supported.const';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ export class HsAddDataCatalogueService extends HsAddDataCatalogueParams {
},
});
}
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
} else if (['KML', 'GEOJSON'].includes(whatToAdd.type)) {
const layer = await this.hsAddDataVectorService.addVectorLayer(
Expand All @@ -518,7 +518,7 @@ export class HsAddDataCatalogueService extends HsAddDataCatalogueParams {
layer: whatToAdd.recordType === 'dataset' ? whatToAdd.name : undefined,
});
} else {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
return whatToAdd.type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {Component, EventEmitter, Input, Output} from '@angular/core';
import {Layer} from 'ol/layer';
import {Source} from 'ol/source';

import {HsLayerDescriptor} from '../../../layermanager/layer-descriptor.interface';
import {HsLayerManagerService} from '../../../layermanager/layermanager.service';
import {HsLayerDescriptor} from '../../../layer-manager/layer-descriptor.interface';
import {HsLayerManagerService} from '../../../layer-manager/layer-manager.service';
import {HsLayerUtilsService} from '../../../utils/layer-utils.service';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class HsAddDataFileBaseComponent
.pipe(takeUntil(this.end))
.subscribe((success) => {
if (success) {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
this.hsAddDataCommonService.setPanelToCatalogue();
}
this.setDataToDefault();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {HsDialogContainerService} from '../../layout/dialogs/dialog-container.se
import {HsLanguageService} from '../../language/language.service';
import {HsLayoutService} from '../../layout/layout.service';
import {HsLogService} from '../../../common/log/log.service';
import {HsShareUrlService} from '../../permalink/share-url.service';
import {HsShareUrlService} from '../../share/share-url.service';
import {servicesSupportedByUrl} from './services-supported.const';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class HsUrlArcGisService implements HsUrlTypeServiceModel {
this.setDataToDefault();
this.hsAddDataCommonService.setPanelToCatalogue();
if (collection.length > 0) {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
return collection;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class HsUrlGeoSparqlComponent {
const response: {layer; complete: boolean} =
await this.hsAddDataVectorService.addNewLayer(this.data);
if (response.complete) {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
this.setDataToDefault();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,6 @@ export class HsUrlWfsService implements HsUrlTypeServiceModel {
);
this.hsMapService.getMap().addLayer(l);
}
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export class HsUrlWmsService implements HsUrlTypeServiceModel {
this.setDataToDefault();
this.hsAddDataCommonService.setPanelToCatalogue();
if (collection.length > 0) {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
return collection;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class HsUrlWmtsService implements HsUrlTypeServiceModel {
this.setDataToDefault();
this.hsAddDataCommonService.setPanelToCatalogue();
if (collection.length > 0) {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
return collection;
//FIX ME: to implement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Source} from 'ol/source';
import {Vector as VectorLayer} from 'ol/layer';
import {Vector as VectorSource} from 'ol/source';

import {HsLayerDescriptor} from '../../layermanager/layer-descriptor.interface';
import {HsLayerDescriptor} from '../../layer-manager/layer-descriptor.interface';
import {accessRightsModel} from '../common/access-rights.model';

export type VectorDataObject = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {HsAddDataVectorService} from '../vector.service';
import {HsCommonLaymanService} from '../../../../common/layman/layman.service';
import {HsConfig} from '../../../../config.service';
import {HsLanguageService} from '../../../language/language.service';
import {HsLayerManagerService} from '../../../layermanager/layermanager.service';
import {HsLayerManagerService} from '../../../layer-manager/layer-manager.service';
import {HsLayerUtilsService} from '../../../utils/layer-utils.service';
import {HsLayoutService} from '../../../layout/layout.service';
import {HsMapService} from '../../../map/map.service';
Expand Down Expand Up @@ -146,7 +146,7 @@ export class HsAddDataVectorFileComponent
* After layer has successfully been added to the map, move to LM panel and clean up the code
*/
moveToLayerManager(): void {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
this.hsAddDataVectorService.setPanelToCatalogue();
this.setToDefault();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';

import {HsAddDataVectorService} from './vector.service';
import {HsMapService} from '../../map/map.service';
import {HsShareUrlService} from '../../permalink/share-url.service';
import {HsShareUrlService} from '../../share/share-url.service';

@Injectable({
providedIn: 'root',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class HsAddDataVectorUrlComponent implements OnInit, OnDestroy {
const response: {layer; complete: boolean} =
await this.hsAddDataVectorService.addNewLayer(this.data);
if (response.complete) {
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
this.setDataToDefault();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class HsCompositionsCatalogueService {
});
this.hsLayoutService.mainpanel$.subscribe((which) => {
if (
this.hsLayoutService.mainpanel === 'composition_browser' ||
this.hsLayoutService.mainpanel === 'compositions' ||
this.hsLayoutService.mainpanel === 'composition'
) {
this.loadFilteredCompositions();
Expand All @@ -90,7 +90,7 @@ export class HsCompositionsCatalogueService {
hsUtilsService.debounce(
({map, event, extent}) => {
if (
(this.hsLayoutService.mainpanel != 'composition_browser' &&
(this.hsLayoutService.mainpanel != 'compositions' &&
this.hsLayoutService.mainpanel != 'composition') ||
this.extentChangeSuppressed
) {
Expand Down Expand Up @@ -124,7 +124,7 @@ export class HsCompositionsCatalogueService {

this.hsCommonLaymanService.authChange.subscribe((endpoint) => {
if (
this.hsLayoutService.mainpanel != 'composition_browser' &&
this.hsLayoutService.mainpanel != 'compositions' &&
this.hsLayoutService.mainpanel != 'composition'
) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export class HsCompositionsMapService {
this.hsLayoutService.mainpanel$.subscribe((which) => {
if (this.extentLayer) {
if (
this.hsLayoutService.mainpanel === 'composition_browser' ||
this.hsLayoutService.mainpanel === 'compositions' ||
this.hsLayoutService.mainpanel === 'composition'
) {
this.extentLayer.setVisible(true);
} else {
this.extentLayer.setVisible(false);
}
}
if (which === 'composition' || which === 'composition_browser') {
if (which === 'composition' || which === 'compositions') {
this.addPointerMoveListener();
} else if (this.pointerMoveListener) {
unByKey(this.pointerMoveListener);
Expand All @@ -54,7 +54,7 @@ export class HsCompositionsMapService {
this.extentLayer = this.createNewExtentLayer();
this.hsMapService.loaded().then((map) => {
if (
this.hsLayoutService.mainpanel === 'composition_browser' ||
this.hsLayoutService.mainpanel === 'compositions' ||
this.hsLayoutService.mainpanel === 'composition'
) {
this.addPointerMoveListener();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {HsConfig} from '../../config.service';
import {HsDialogContainerService} from '../layout/dialogs/dialog-container.service';
import {HsEventBusService} from '../core/event-bus.service';
import {HsLanguageService} from '../language/language.service';
import {HsLayerManagerService} from '../layermanager/layermanager.service';
import {HsLayerManagerService} from '../layer-manager/layer-manager.service';
import {HsLayoutService} from '../layout/layout.service';
import {HsLogService} from '../../common/log/log.service';
import {HsToastService} from '../layout/toast/toast.service';
Expand Down Expand Up @@ -471,7 +471,7 @@ export class HsCompositionsParserService {
!this.loadingOptions.suspendPanelChange
) {
this.loadingOptions.suspendPanelChange = false;
this.hsLayoutService.setMainPanel('layermanager');
this.hsLayoutService.setMainPanel('layerManager');
}
this.composition_edited = false;
this.hsEventBusService.compositionLoads.next(responseData);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="card hs-main-panel h-100 overflow-hidden" style="margin-top: 0 !important;" [ngClass]="panelWidthClass"
*ngIf="isVisible$ | async">
<div class="hs-compositions-header" *ngIf="{layman: hsCommonLaymanService.layman$ | async } as ctx">
<hs-panel-header name="composition_browser" [panelTabs]="'COMPOSITIONS'">
<hs-panel-header name="compositions" [panelTabs]="'COMPOSITIONS'">
<button mainButton class="btn btn-sm btn-outline-primary border-0 align-items-center d-flex gap-2"
(click)="openSaveMapPanel()"> {{'PANEL_HEADER.SAVECOMPOSITION' | translateHs}}
<i class="glyphicon icon-save-floppy"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class HsCompositionsComponent
optionsMenuOpen = false;
selectedCompId: string;
loadFilteredCompositions: any;
name = 'composition_browser';
name = 'compositions';

constructor(
private hsCompositionsService: HsCompositionsService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Geometry} from 'ol/geom';
import {Observable, Subject, lastValueFrom} from 'rxjs';

import {DuplicateHandling, HsMapService} from '../map/map.service';
import {HS_PRMS} from '../permalink/get-params';
import {HS_PRMS} from '../share/get-params';
import {HsCommonEndpointsService} from '../../common/endpoints/endpoints.service';
import {HsCompositionsLaymanService} from './endpoints/compositions-layman.service';
import {HsCompositionsMapService} from './compositions-map.service';
Expand All @@ -19,7 +19,7 @@ import {HsEventBusService} from '../core/event-bus.service';
import {HsLanguageService} from '../language/language.service';
import {HsLogService} from '../../common/log/log.service';
import {HsMapCompositionDescriptor} from './models/composition-descriptor.model';
import {HsShareUrlService} from '../permalink/share-url.service';
import {HsShareUrlService} from '../share/share-url.service';
import {HsToastService} from '../layout/toast/toast.service';
import {HsUtilsService} from '../utils/utils.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Component, ViewRef} from '@angular/core';

import {HsDialogComponent} from '../../layout/dialogs/dialog-component.interface';
import {HsDialogContainerService} from '../../layout/dialogs/dialog-container.service';
import {HsShareService} from '../../permalink/share.service';
import {HsShareService} from '../../share/share.service';
@Component({
selector: 'hs-compositions-share-dialog',
templateUrl: './share-dialog.component.html',
Expand Down
2 changes: 1 addition & 1 deletion projects/hslayers/src/components/core/event-bus.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {HsDimensionDescriptor} from '../../common/get-capabilities/dimension';
import {
HsLayerDescriptor,
HsLayerLoadProgress,
} from '../layermanager/layer-descriptor.interface';
} from '../layer-manager/layer-descriptor.interface';
import {
HsMapCompositionDescriptor,
LaymanCompositionDescriptor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="card hs-main-panel" *ngIf="isVisible$ | async">
<hs-panel-header name="feature_table" [panelTabs]="'FEATURE_TABLE'"></hs-panel-header>
<hs-panel-header name="feature-table" [panelTabs]="'FEATURE_TABLE'"></hs-panel-header>
<div class="card-body">
<div *ngFor="let layer of layers">
<hs-layer-features [layer]="layer"></hs-layer-features>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class HsFeatureTableComponent
implements OnInit
{
layers: VectorLayer<VectorSource>[] = [];
name = 'feature_table';
name = 'feature-table';
constructor(
private hsFeatureTableService: HsFeatureTableService,
private hsConfig: HsConfig,
Expand All @@ -32,7 +32,7 @@ export class HsFeatureTableComponent

ngOnInit(): void {
this.hsSidebarService.addButton({
panel: 'feature_table',
panel: 'featureTable',
module: 'hs.feature-table',
order: 14,
fits: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {HsCompositionsParserService} from '../../compositions/compositions-parse
import {HsDialogComponent} from '../../layout/dialogs/dialog-component.interface';
import {HsDialogContainerService} from '../../layout/dialogs/dialog-container.service';
import {HsEventBusService} from '../../core/event-bus.service';
import {HsLayerManagerService} from '../layermanager.service';
import {HsLayerManagerService} from '../layer-manager.service';
@Component({
selector: 'hs-layermanager-remove-all-dialog',
templateUrl: './remove-all-dialog.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {HsLayerDescriptor} from '../layer-descriptor.interface';
import {HsLayoutService} from '../../layout/layout.service';

@Component({
selector: 'hs-layermanager-time-editor',
templateUrl: 'layermanager-time-editor.component.html',
selector: 'hs-layer-manager-time-editor',
templateUrl: 'layer-manager-time-editor.component.html',
})
export class HsLayerManagerTimeEditorComponent implements OnInit, OnDestroy {
@Input() layer: HsLayerDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
HsLayerEditorSublayerService,
KeyBooleanDict,
} from './layer-editor-sub-layer.service';
import {HsLayerManagerService} from '../layermanager.service';
import {HsLayerManagerService} from '../layer-manager.service';

@Component({
selector: 'hs-layer-editor-sub-layer-checkbox',
Expand Down
Loading

0 comments on commit 842e238

Please sign in to comment.