diff --git a/package.json b/package.json
index a03dbe5..fa9734b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "farmmaps-lib-app",
- "version": "4.2.1",
+ "version": "4.3.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
@@ -57,7 +57,7 @@
"zone.js": "~0.13.3"
},
"devDependencies": {
- "@angular-builders/custom-webpack": "^15",
+ "@angular-builders/custom-webpack": "^16",
"@angular-devkit/build-angular": "^16.2.11",
"@angular/cli": "^16.2.11",
"@angular/compiler-cli": "^16.2.12",
diff --git a/projects/common-map/src/fm-map/actions/map.actions.ts b/projects/common-map/src/fm-map/actions/map.actions.ts
index 5225421..82bebc2 100644
--- a/projects/common-map/src/fm-map/actions/map.actions.ts
+++ b/projects/common-map/src/fm-map/actions/map.actions.ts
@@ -58,7 +58,7 @@ export const GETLAYERVALUESUCCESS = '[Map] GetLayerValueSuccess'
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
export const SETVIEWSTATE = '[Map] SetViewState'
export const CLEARFEATURES = '[Map] ClearFeatures';
-
+export const SETPANELEXTRAWIDE = '[Map] SetPanelExtraWide';
export class Clear implements Action {
readonly type = CLEAR;
@@ -342,6 +342,11 @@ export class ClearFeatures implements Action {
constructor() {}
}
+export class SetPanelExtraWide implements Action {
+ readonly type = SETPANELEXTRAWIDE;
+ constructor(public panelExtraWide:boolean) {}
+}
+
export type Actions = SetMapState
| Init
| Clear
@@ -389,5 +394,6 @@ export type Actions = SetMapState
| SetPeriod
| ToggleShowDataLayerSlide
| SetViewState
- | ClearFeatures;
+ | ClearFeatures
+ | SetPanelExtraWide;
diff --git a/projects/common-map/src/fm-map/components/map/map.component.html b/projects/common-map/src/fm-map/components/map/map.component.html
index 1b1d7da..f6afb70 100644
--- a/projects/common-map/src/fm-map/components/map/map.component.html
+++ b/projects/common-map/src/fm-map/components/map/map.component.html
@@ -10,6 +10,7 @@
panelVisible:panelVisible$|async,
openedModalName:openedModalName$|async,
panelCollapsed:panelCollapsed$|async,
+ panelExtraWide:panelExtraWide$|async,
searchMinified:searchMinified$|async,
selectedItem:selectedItem$|async,
parentItem:parentItem$|async,
@@ -64,7 +65,7 @@
-
+
diff --git a/projects/common-map/src/fm-map/components/map/map.component.ts b/projects/common-map/src/fm-map/components/map/map.component.ts
index a3f3b04..d1b0b87 100644
--- a/projects/common-map/src/fm-map/components/map/map.component.ts
+++ b/projects/common-map/src/fm-map/components/map/map.component.ts
@@ -66,6 +66,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public parentCode$: Observable =this.store.select(mapReducers.selectGetParentCode);
public panelVisible$: Observable = this.store.select(mapReducers.selectGetPanelVisible);
public panelCollapsed$: Observable = this.store.select(mapReducers.selectGetPanelCollapsed);
+ public panelExtraWide$: Observable = this.store.select(mapReducers.selectGetPanelExtraWide);
public selectedFeature$: Observable> = this.store.select(mapReducers.selectGetSelectedFeature);
public clickedFeature: Subject> = new Subject>();
public selectedItem$: Observable = this.store.select(mapReducers.selectGetSelectedItem);
@@ -208,12 +209,18 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
if(component && component.hasOwnProperty('clickedFeature')) {
(component as IClickedFeature).clickedFeature = this.clickedFeature;
}
+ if(component && component.hasOwnProperty('extrawide')) {
+ this.store.dispatch(new mapActions.SetPanelExtraWide(true));
}
+ }
handleSidepaneloutletDeactivate(component:any) {
if(component && component.hasOwnProperty('clickedFeature')) {
(component as IClickedFeature).clickedFeature = null;
}
+ if(component && component.hasOwnProperty('extrawide')) {
+ this.store.dispatch(new mapActions.SetPanelExtraWide(false));
+ }
}
handlePrerender(event:any) {
diff --git a/projects/common-map/src/fm-map/reducers/map.reducer.ts b/projects/common-map/src/fm-map/reducers/map.reducer.ts
index fbd0fa3..a0b171f 100644
--- a/projects/common-map/src/fm-map/reducers/map.reducer.ts
+++ b/projects/common-map/src/fm-map/reducers/map.reducer.ts
@@ -49,6 +49,7 @@ export interface State {
features: Array>,
panelVisible: boolean,
panelCollapsed: boolean,
+ panelExtraWide: boolean,
selectedFeature: Feature,
selectedItem:IItem,
parentItem:IItem,
@@ -94,6 +95,7 @@ export const initialState: State = {
features: [],
panelVisible: false,
panelCollapsed: false,
+ panelExtraWide: false,
selectedFeature: null,
selectedItem: null,
parentItem: null,
@@ -572,6 +574,10 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
}
return state;
}
+ case mapActions.SETPANELEXTRAWIDE:{
+ const a= action as mapActions.SetPanelExtraWide;
+ return tassign(state,{panelExtraWide:a.panelExtraWide});
+ }
default: {
return state;
}
@@ -583,6 +589,7 @@ export const getParentCode = (state: State) => state.parentCode;
export const getFeatures = (state: State) => state.features;
export const getPanelVisible = (state: State) => state.panelVisible;
export const getPanelCollapsed = (state: State) => state.panelCollapsed;
+export const getPanelExtraWide = (state: State) => state.panelExtraWide;
export const getSelectedFeature = (state: State) => state.selectedFeature;
export const getSelectedItem = (state: State) => state.selectedItem;
export const getParentItem = (state: State) => state.parentItem;
@@ -618,6 +625,7 @@ export const selectGetParentCode = createSelector(selectMapState, getParentCode)
export const selectGetFeatures = createSelector(selectMapState, getFeatures);
export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible);
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
+export const selectGetPanelExtraWide = createSelector(selectMapState, getPanelExtraWide);
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
export const selectGetParentItem = createSelector(selectMapState, getParentItem);
diff --git a/projects/common-map/tsconfig.lib.json b/projects/common-map/tsconfig.lib.json
index 8c775b0..d8b6e76 100644
--- a/projects/common-map/tsconfig.lib.json
+++ b/projects/common-map/tsconfig.lib.json
@@ -10,18 +10,27 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
+ "esModuleInterop": true,
"types": [],
"lib": [
"dom",
"es2018"
- ]
+ ],
+ "paths": {
+ "@angular/*": [
+
+ "node_modules/@angular/*"
+
+ ]
+ }
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
- "enableResourceInlining": true
+ "enableResourceInlining": true,
+ "compilationMode": "partial"
},
"exclude": [
"src/test.ts",
diff --git a/projects/common-map3d/tsconfig.lib.json b/projects/common-map3d/tsconfig.lib.json
index a78ed73..cfb0d6c 100644
--- a/projects/common-map3d/tsconfig.lib.json
+++ b/projects/common-map3d/tsconfig.lib.json
@@ -11,18 +11,27 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
+ "esModuleInterop": true,
"types": [],
"lib": [
"dom",
"es2018"
- ]
+ ],
+ "paths": {
+ "@angular/*": [
+
+ "node_modules/@angular/*"
+
+ ]
+ }
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
- "enableResourceInlining": true
+ "enableResourceInlining": true,
+ "compilationMode": "partial"
},
"exclude": [
"src/test.ts",
diff --git a/projects/common/src/fm/common-routing.module.ts b/projects/common/src/fm/common-routing.module.ts
index d02f375..987ae89 100644
--- a/projects/common/src/fm/common-routing.module.ts
+++ b/projects/common/src/fm/common-routing.module.ts
@@ -7,6 +7,7 @@ import {NavBarGuard} from './services/nav-bar-guard.service';
import {FullScreenGuard} from './services/full-screen-guard.service';
import {SessionClearedComponent} from './components/session-cleared/session-cleared.component';
import {NotFoundComponent} from './components/not-found/not-found.component';
+import { ProductionGuard } from './services/production-guard.service';
const routes = [
@@ -21,7 +22,7 @@ const routes = [
},
{
path: '**', component: NotFoundComponent,
- canActivate: [NavBarGuard]
+ canActivate: [NavBarGuard, ProductionGuard]
}
];
diff --git a/projects/common/src/fm/components/side-panel/side-panel.component.html b/projects/common/src/fm/components/side-panel/side-panel.component.html
index 0abb358..7c8930f 100644
--- a/projects/common/src/fm/components/side-panel/side-panel.component.html
+++ b/projects/common/src/fm/components/side-panel/side-panel.component.html
@@ -1,4 +1,4 @@
-
+
diff --git a/projects/common/src/fm/components/side-panel/side-panel.component.scss b/projects/common/src/fm/components/side-panel/side-panel.component.scss
index b86df63..d3d8f73 100644
--- a/projects/common/src/fm/components/side-panel/side-panel.component.scss
+++ b/projects/common/src/fm/components/side-panel/side-panel.component.scss
@@ -15,7 +15,7 @@
}
.side-panel.collapsed {
- left:-22rem;
+ left:-44rem;
}
.arrow {
@@ -75,8 +75,7 @@ div.resizegrip > span {
}
.resizeable .resizegrip {
- display:block;
-
+ display:block;
}
.resizeable .content {
@@ -94,9 +93,16 @@ div.resizegrip > span {
.side-panel.hidden {
width: 22rem;
- left:-24rem;
+ left:-22rem;
height:100%;
top: 0px;
+ }
+
+ .side-panel.extrawide {
+ top:0px;
+ width: 44rem;
+ height:100%;
+ left:0px;
}
}
diff --git a/projects/common/src/fm/components/side-panel/side-panel.component.ts b/projects/common/src/fm/components/side-panel/side-panel.component.ts
index bb87a18..e3b13ed 100644
--- a/projects/common/src/fm/components/side-panel/side-panel.component.ts
+++ b/projects/common/src/fm/components/side-panel/side-panel.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef } from '@angular/core';
+import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'fm-side-panel',
@@ -12,7 +12,8 @@ export class SidePanelComponent implements OnChanges {
@Input() public collapsed: boolean;
@Input() public collapsable: boolean;
@Input() public resizeable = false;
- @Input() public left = false;
+ @Input() public left = false;
+ @Input() public extrawide: boolean;
@Output() onResize: EventEmitter
= new EventEmitter();
@ViewChild("resizeGrip") elementView: ElementRef;
public mobile = true;
@@ -41,7 +42,7 @@ export class SidePanelComponent implements OnChanges {
}
ngAfterViewInit() {
- this.parentHeight = this.element.nativeElement.offsetParent.clientHeight;
+ this.parentHeight = this.element.nativeElement.offsetParent?.clientHeight;
this.setTop();
}
diff --git a/projects/common/src/fm/components/user-menu/user-menu.component.html b/projects/common/src/fm/components/user-menu/user-menu.component.html
index 50fc52d..d064856 100644
--- a/projects/common/src/fm/components/user-menu/user-menu.component.html
+++ b/projects/common/src/fm/components/user-menu/user-menu.component.html
@@ -5,6 +5,9 @@
{{user.name}}
+
+ Provider {{provider}}
+
diff --git a/projects/common/src/fm/components/user-menu/user-menu.component.ts b/projects/common/src/fm/components/user-menu/user-menu.component.ts
index 2e9adb5..4b3565b 100644
--- a/projects/common/src/fm/components/user-menu/user-menu.component.ts
+++ b/projects/common/src/fm/components/user-menu/user-menu.component.ts
@@ -20,11 +20,14 @@ export class UserMenuComponent implements OnInit {
ngOnInit(): void {
}
- getLetter():string {
- if (this.user && this.user.firstName && this.user.lastName)
- return this.user.firstName.substr(0,1).toUpperCase() +
- this.user.lastName.substr(0,1).toUpperCase();
- return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():"";
+ getProvider():string | null {
+ const ownedClaims = this.oauthService.getIdentityClaims();
+ if(ownedClaims) {
+ if (ownedClaims["idp"] != "local") {
+ return ownedClaims["idp"];
+ }
+ }
+ return null;
}
logout(event:MouseEvent) {
diff --git a/projects/common/src/fm/reducers/app-common.reducer.ts b/projects/common/src/fm/reducers/app-common.reducer.ts
index b34fda6..d28cb9a 100644
--- a/projects/common/src/fm/reducers/app-common.reducer.ts
+++ b/projects/common/src/fm/reducers/app-common.reducer.ts
@@ -64,6 +64,8 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
code:a.user.code,
email:claims["email"]!== undefined ? claims["email"] : a.user.name,
name:claims["name"]!== undefined?claims["name"] : a.user.email,
+ lastName:a.user.lastName,
+ firstName:a.user.firstName,
claims:claims,
searchable: false
};
diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts
index b13b558..63d5355 100644
--- a/projects/common/src/fm/services/item.service.ts
+++ b/projects/common/src/fm/services/item.service.ts
@@ -152,6 +152,13 @@ export class ItemService {
return this.httpClient.put(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item);
}
+ putItemFile(item: IItem, jsonObject: any): Observable {
+ const formData = new FormData();
+ const file = new File([JSON.stringify(jsonObject)], 'data.dat', {type: 'application/json'});
+ formData.append('file', file);
+ return this.httpClient.put(`${this.ApiEndpoint()}/api/v1/items/${item.code}/data`, formData);
+ }
+
deleteItem(code: string): Observable {
return this.httpClient.delete(`${this.ApiEndpoint()}/api/v1/items/${code}`);
}
@@ -196,5 +203,4 @@ export class ItemService {
getBreadcrumbs(itemCode: string): Observable {
return this.httpClient.get(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`);
}
-
}
diff --git a/projects/common/src/fm/services/production-guard.service.ts b/projects/common/src/fm/services/production-guard.service.ts
new file mode 100644
index 0000000..3093c36
--- /dev/null
+++ b/projects/common/src/fm/services/production-guard.service.ts
@@ -0,0 +1,10 @@
+import { Injectable, isDevMode } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root',
+})
+export class ProductionGuard {
+ canActivate(): boolean {
+ return !isDevMode();
+ }
+}
diff --git a/projects/common/tsconfig.lib.json b/projects/common/tsconfig.lib.json
index 59954cd..d9507c7 100644
--- a/projects/common/tsconfig.lib.json
+++ b/projects/common/tsconfig.lib.json
@@ -29,7 +29,8 @@
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
- "enableResourceInlining": true
+ "enableResourceInlining": true,
+ "compilationMode": "partial"
},
"exclude": [
"src/test.ts",
diff --git a/projects/ngx-openlayers/tsconfig.lib.json b/projects/ngx-openlayers/tsconfig.lib.json
index 773f568..d8b6e76 100644
--- a/projects/ngx-openlayers/tsconfig.lib.json
+++ b/projects/ngx-openlayers/tsconfig.lib.json
@@ -2,19 +2,35 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
- "declarationMap": true,
+ "module": "es2015",
+ "moduleResolution": "node",
"declaration": true,
+ "sourceMap": true,
"inlineSources": true,
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "importHelpers": true,
+ "esModuleInterop": true,
"types": [],
"lib": [
"dom",
- "es2020"
- ]
+ "es2018"
+ ],
+ "paths": {
+ "@angular/*": [
+
+ "node_modules/@angular/*"
+
+ ]
+ }
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
- "enableResourceInlining": true
+ "fullTemplateTypeCheck": true,
+ "strictInjectionParameters": true,
+ "enableResourceInlining": true,
+ "compilationMode": "partial"
},
"exclude": [
"src/test.ts",
diff --git a/projects/ngx-openlayers/tsconfig.lib.prod.json b/projects/ngx-openlayers/tsconfig.lib.prod.json
index 6330633..d8b6e76 100644
--- a/projects/ngx-openlayers/tsconfig.lib.prod.json
+++ b/projects/ngx-openlayers/tsconfig.lib.prod.json
@@ -1,9 +1,39 @@
{
- "extends": "./tsconfig.lib.json",
+ "extends": "../../tsconfig.json",
"compilerOptions": {
- "declarationMap": false
+ "outDir": "../../out-tsc/lib",
+ "module": "es2015",
+ "moduleResolution": "node",
+ "declaration": true,
+ "sourceMap": true,
+ "inlineSources": true,
+ "emitDecoratorMetadata": true,
+ "experimentalDecorators": true,
+ "importHelpers": true,
+ "esModuleInterop": true,
+ "types": [],
+ "lib": [
+ "dom",
+ "es2018"
+ ],
+ "paths": {
+ "@angular/*": [
+
+ "node_modules/@angular/*"
+
+ ]
+ }
},
"angularCompilerOptions": {
+ "skipTemplateCodegen": true,
+ "strictMetadataEmit": true,
+ "fullTemplateTypeCheck": true,
+ "strictInjectionParameters": true,
+ "enableResourceInlining": true,
"compilationMode": "partial"
- }
-}
\ No newline at end of file
+ },
+ "exclude": [
+ "src/test.ts",
+ "**/*.spec.ts"
+ ]
+}