Compare commits

...

32 Commits

Author SHA1 Message Date
747499d009 Merge branch 'develop'
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
# Conflicts:
#	package-lock.json
#	package.json
2024-02-29 14:54:59 +01:00
jenkins
c74163976a [ci skip] Changed by Jenkins: 2443
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-08 18:37:07 +00:00
Willem Dantuma
c9f43b5b53 Fix span
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-08 19:35:39 +01:00
jenkins
6a240abc0c [ci skip] Changed by Jenkins: 2442
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-08 18:10:48 +00:00
Willem Dantuma
7d8b18a27d Add space
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-08 19:09:19 +01:00
jenkins
4a328054dd [ci skip] Changed by Jenkins: 2441
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-08 17:36:18 +00:00
Willem Dantuma
3e482470b6 Add provider info
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-08 18:33:35 +01:00
jenkins
3bacb8a5d9 [ci skip] Changed by Jenkins: 2440
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-08 17:19:12 +00:00
Willem Dantuma
47afa20a01 Add firstname and lastname
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-08 18:17:42 +01:00
jenkins
f0646a8f6a [ci skip] Changed by Jenkins: 2439
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-01 15:38:22 +00:00
36ebc03189 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-01 16:35:36 +01:00
c0d40d2d5e Aw5812Add wide supp 2024-02-01 16:34:24 +01:00
jenkins
14e504cc79 [ci skip] Changed by Jenkins: 2438
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-01 15:22:56 +00:00
b060fd34bb Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-01 16:21:20 +01:00
0694d4e467 Aw5812Fix null exc 2024-02-01 16:20:57 +01:00
jenkins
7c5867a332 [ci skip] Changed by Jenkins: 2437
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-01 15:02:54 +00:00
8f958e33f1 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-01 16:01:24 +01:00
aa2f305b27 Aw5812wip 2024-02-01 16:01:11 +01:00
jenkins
d02da8f334 [ci skip] Changed by Jenkins: 2436
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-01 14:23:30 +00:00
253553c534 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
# Conflicts:
#	package-lock.json
2024-02-01 15:21:58 +01:00
4641e351fd Aw5812 2024-02-01 15:21:04 +01:00
jenkins
84cf6a3f6e [ci skip] Changed by Jenkins: 2435
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-02-01 12:36:14 +00:00
92b29135b5 Aw5812wip
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-02-01 13:34:38 +01:00
jenkins
f6aebb2f80 [ci skip] Changed by Jenkins: 2434
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-01-30 10:19:44 +00:00
daf78f32b7 Fix error TS500: RangeError: Maximum call stack size exceeded
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-01-30 11:18:11 +01:00
42245612d2 ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2024-01-30 11:00:16 +01:00
a05c1fa874 Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2024-01-30 10:52:02 +01:00
4bda94c360 Fix path
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2024-01-30 10:23:14 +01:00
feaad02c33 Fix path
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2024-01-30 10:06:26 +01:00
af9acebaff Only page not found when no routing is matched on production environment
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2024-01-30 09:54:00 +01:00
jenkins
7ba35052ec [ci skip] Changed by Jenkins: 2427
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2024-01-29 15:27:29 +00:00
2e40d023b1 Aw5812 Update item file
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2024-01-29 16:25:56 +01:00
19 changed files with 153 additions and 34 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.2.1", "version": "4.3.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
@ -57,7 +57,7 @@
"zone.js": "~0.13.3" "zone.js": "~0.13.3"
}, },
"devDependencies": { "devDependencies": {
"@angular-builders/custom-webpack": "^15", "@angular-builders/custom-webpack": "^16",
"@angular-devkit/build-angular": "^16.2.11", "@angular-devkit/build-angular": "^16.2.11",
"@angular/cli": "^16.2.11", "@angular/cli": "^16.2.11",
"@angular/compiler-cli": "^16.2.12", "@angular/compiler-cli": "^16.2.12",

View File

@ -58,7 +58,7 @@ export const GETLAYERVALUESUCCESS = '[Map] GetLayerValueSuccess'
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide' export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
export const SETVIEWSTATE = '[Map] SetViewState' export const SETVIEWSTATE = '[Map] SetViewState'
export const CLEARFEATURES = '[Map] ClearFeatures'; export const CLEARFEATURES = '[Map] ClearFeatures';
export const SETPANELEXTRAWIDE = '[Map] SetPanelExtraWide';
export class Clear implements Action { export class Clear implements Action {
readonly type = CLEAR; readonly type = CLEAR;
@ -342,6 +342,11 @@ export class ClearFeatures implements Action {
constructor() {} constructor() {}
} }
export class SetPanelExtraWide implements Action {
readonly type = SETPANELEXTRAWIDE;
constructor(public panelExtraWide:boolean) {}
}
export type Actions = SetMapState export type Actions = SetMapState
| Init | Init
| Clear | Clear
@ -389,5 +394,6 @@ export type Actions = SetMapState
| SetPeriod | SetPeriod
| ToggleShowDataLayerSlide | ToggleShowDataLayerSlide
| SetViewState | SetViewState
| ClearFeatures; | ClearFeatures
| SetPanelExtraWide;

View File

@ -10,6 +10,7 @@
panelVisible:panelVisible$|async, panelVisible:panelVisible$|async,
openedModalName:openedModalName$|async, openedModalName:openedModalName$|async,
panelCollapsed:panelCollapsed$|async, panelCollapsed:panelCollapsed$|async,
panelExtraWide:panelExtraWide$|async,
searchMinified:searchMinified$|async, searchMinified:searchMinified$|async,
selectedItem:selectedItem$|async, selectedItem:selectedItem$|async,
parentItem:parentItem$|async, parentItem:parentItem$|async,
@ -64,7 +65,7 @@
</div> </div>
<div class="side-panel-container"> <div class="side-panel-container">
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false"> <fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false" [extrawide]="state.panelExtraWide">
<div class="panel-wrapper" *ngIf="noContent"> <div class="panel-wrapper" *ngIf="noContent">
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)"> <div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
</div> </div>
@ -84,7 +85,7 @@
</div> </div>
</div> </div>
</fm-side-panel> </fm-side-panel>
<fm-side-panel [resizeable]="true" [visible]="!noContent"> <fm-side-panel [resizeable]="true" [visible]="!noContent" [extrawide]="state.panelExtraWide">
<router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet> <router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet>
</fm-side-panel> </fm-side-panel>
</div> </div>

View File

@ -66,6 +66,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public parentCode$: Observable<string> =this.store.select(mapReducers.selectGetParentCode); public parentCode$: Observable<string> =this.store.select(mapReducers.selectGetParentCode);
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible); public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed); public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
public panelExtraWide$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelExtraWide);
public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature); public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature);
public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>(); public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem); public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
@ -208,12 +209,18 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
if(component && component.hasOwnProperty('clickedFeature')) { if(component && component.hasOwnProperty('clickedFeature')) {
(component as IClickedFeature).clickedFeature = this.clickedFeature; (component as IClickedFeature).clickedFeature = this.clickedFeature;
} }
if(component && component.hasOwnProperty('extrawide')) {
this.store.dispatch(new mapActions.SetPanelExtraWide(true));
} }
}
handleSidepaneloutletDeactivate(component:any) { handleSidepaneloutletDeactivate(component:any) {
if(component && component.hasOwnProperty('clickedFeature')) { if(component && component.hasOwnProperty('clickedFeature')) {
(component as IClickedFeature).clickedFeature = null; (component as IClickedFeature).clickedFeature = null;
} }
if(component && component.hasOwnProperty('extrawide')) {
this.store.dispatch(new mapActions.SetPanelExtraWide(false));
}
} }
handlePrerender(event:any) { handlePrerender(event:any) {

View File

@ -49,6 +49,7 @@ export interface State {
features: Array<Feature<Geometry>>, features: Array<Feature<Geometry>>,
panelVisible: boolean, panelVisible: boolean,
panelCollapsed: boolean, panelCollapsed: boolean,
panelExtraWide: boolean,
selectedFeature: Feature<Geometry>, selectedFeature: Feature<Geometry>,
selectedItem:IItem, selectedItem:IItem,
parentItem:IItem, parentItem:IItem,
@ -94,6 +95,7 @@ export const initialState: State = {
features: [], features: [],
panelVisible: false, panelVisible: false,
panelCollapsed: false, panelCollapsed: false,
panelExtraWide: false,
selectedFeature: null, selectedFeature: null,
selectedItem: null, selectedItem: null,
parentItem: null, parentItem: null,
@ -572,6 +574,10 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} }
return state; return state;
} }
case mapActions.SETPANELEXTRAWIDE:{
const a= action as mapActions.SetPanelExtraWide;
return tassign(state,{panelExtraWide:a.panelExtraWide});
}
default: { default: {
return state; return state;
} }
@ -583,6 +589,7 @@ export const getParentCode = (state: State) => state.parentCode;
export const getFeatures = (state: State) => state.features; export const getFeatures = (state: State) => state.features;
export const getPanelVisible = (state: State) => state.panelVisible; export const getPanelVisible = (state: State) => state.panelVisible;
export const getPanelCollapsed = (state: State) => state.panelCollapsed; export const getPanelCollapsed = (state: State) => state.panelCollapsed;
export const getPanelExtraWide = (state: State) => state.panelExtraWide;
export const getSelectedFeature = (state: State) => state.selectedFeature; export const getSelectedFeature = (state: State) => state.selectedFeature;
export const getSelectedItem = (state: State) => state.selectedItem; export const getSelectedItem = (state: State) => state.selectedItem;
export const getParentItem = (state: State) => state.parentItem; 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 selectGetFeatures = createSelector(selectMapState, getFeatures);
export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible); export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible);
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed); export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
export const selectGetPanelExtraWide = createSelector(selectMapState, getPanelExtraWide);
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature); export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem); export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
export const selectGetParentItem = createSelector(selectMapState, getParentItem); export const selectGetParentItem = createSelector(selectMapState, getParentItem);

View File

@ -10,18 +10,27 @@
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"esModuleInterop": true,
"types": [], "types": [],
"lib": [ "lib": [
"dom", "dom",
"es2018" "es2018"
] ],
"paths": {
"@angular/*": [
"node_modules/@angular/*"
]
}
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"skipTemplateCodegen": true, "skipTemplateCodegen": true,
"strictMetadataEmit": true, "strictMetadataEmit": true,
"fullTemplateTypeCheck": true, "fullTemplateTypeCheck": true,
"strictInjectionParameters": true, "strictInjectionParameters": true,
"enableResourceInlining": true "enableResourceInlining": true,
"compilationMode": "partial"
}, },
"exclude": [ "exclude": [
"src/test.ts", "src/test.ts",

View File

@ -11,18 +11,27 @@
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"esModuleInterop": true,
"types": [], "types": [],
"lib": [ "lib": [
"dom", "dom",
"es2018" "es2018"
] ],
"paths": {
"@angular/*": [
"node_modules/@angular/*"
]
}
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"skipTemplateCodegen": true, "skipTemplateCodegen": true,
"strictMetadataEmit": true, "strictMetadataEmit": true,
"fullTemplateTypeCheck": true, "fullTemplateTypeCheck": true,
"strictInjectionParameters": true, "strictInjectionParameters": true,
"enableResourceInlining": true "enableResourceInlining": true,
"compilationMode": "partial"
}, },
"exclude": [ "exclude": [
"src/test.ts", "src/test.ts",

View File

@ -7,6 +7,7 @@ import {NavBarGuard} from './services/nav-bar-guard.service';
import {FullScreenGuard} from './services/full-screen-guard.service'; import {FullScreenGuard} from './services/full-screen-guard.service';
import {SessionClearedComponent} from './components/session-cleared/session-cleared.component'; import {SessionClearedComponent} from './components/session-cleared/session-cleared.component';
import {NotFoundComponent} from './components/not-found/not-found.component'; import {NotFoundComponent} from './components/not-found/not-found.component';
import { ProductionGuard } from './services/production-guard.service';
const routes = [ const routes = [
@ -21,7 +22,7 @@ const routes = [
}, },
{ {
path: '**', component: NotFoundComponent, path: '**', component: NotFoundComponent,
canActivate: [NavBarGuard] canActivate: [NavBarGuard, ProductionGuard]
} }
]; ];

View File

@ -1,4 +1,4 @@
<div class="side-panel hidden" [ngClass]="{'hidden':!visible,'collapsed':collapsed,'resizeable':(resizeable && mobile),'resizing':resizing,'left':left}" [ngStyle]="{'top':top}"> <div class="side-panel hidden" [ngClass]="{'hidden':!visible,'collapsed':collapsed,'resizeable':(resizeable && mobile),'resizing':resizing,'left':left,'extrawide':extrawide}" [ngStyle]="{'top':top}">
<div *ngIf="collapsable" class="arrow rounded-end p-2" (click)="handleToggleClick($event)"> <div *ngIf="collapsable" class="arrow rounded-end p-2" (click)="handleToggleClick($event)">
<i class="fal fa-chevron-left" aria-hidden="true"></i> <i class="fal fa-chevron-left" aria-hidden="true"></i>
</div> </div>

View File

@ -15,7 +15,7 @@
} }
.side-panel.collapsed { .side-panel.collapsed {
left:-22rem; left:-44rem;
} }
.arrow { .arrow {
@ -76,7 +76,6 @@ div.resizegrip > span {
.resizeable .resizegrip { .resizeable .resizegrip {
display:block; display:block;
} }
.resizeable .content { .resizeable .content {
@ -94,10 +93,17 @@ div.resizegrip > span {
.side-panel.hidden { .side-panel.hidden {
width: 22rem; width: 22rem;
left:-24rem; left:-22rem;
height:100%; height:100%;
top: 0px; top: 0px;
} }
.side-panel.extrawide {
top:0px;
width: 44rem;
height:100%;
left:0px;
}
} }

View File

@ -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({ @Component({
selector: 'fm-side-panel', selector: 'fm-side-panel',
@ -13,6 +13,7 @@ export class SidePanelComponent implements OnChanges {
@Input() public collapsable: boolean; @Input() public collapsable: boolean;
@Input() public resizeable = false; @Input() public resizeable = false;
@Input() public left = false; @Input() public left = false;
@Input() public extrawide: boolean;
@Output() onResize: EventEmitter<number> = new EventEmitter<number>(); @Output() onResize: EventEmitter<number> = new EventEmitter<number>();
@ViewChild("resizeGrip") elementView: ElementRef; @ViewChild("resizeGrip") elementView: ElementRef;
public mobile = true; public mobile = true;
@ -41,7 +42,7 @@ export class SidePanelComponent implements OnChanges {
} }
ngAfterViewInit() { ngAfterViewInit() {
this.parentHeight = this.element.nativeElement.offsetParent.clientHeight; this.parentHeight = this.element.nativeElement.offsetParent?.clientHeight;
this.setTop(); this.setTop();
} }

View File

@ -5,6 +5,9 @@
<div class="card" *ngIf="user"> <div class="card" *ngIf="user">
<div class="card-body"> <div class="card-body">
<div class="username">{{user.name}}</div> <div class="username">{{user.name}}</div>
<div *ngIf="getProvider(); let provider">
<small><span i18n>Provider</span><span> {{provider}}</span></small>
</div>
<div><a href="#" (click)="logout($event)" i18n>logout</a></div> <div><a href="#" (click)="logout($event)" i18n>logout</a></div>
</div> </div>
</div> </div>

View File

@ -20,11 +20,14 @@ export class UserMenuComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
} }
getLetter():string { getProvider():string | null {
if (this.user && this.user.firstName && this.user.lastName) const ownedClaims = this.oauthService.getIdentityClaims();
return this.user.firstName.substr(0,1).toUpperCase() + if(ownedClaims) {
this.user.lastName.substr(0,1).toUpperCase(); if (ownedClaims["idp"] != "local") {
return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():""; return ownedClaims["idp"];
}
}
return null;
} }
logout(event:MouseEvent) { logout(event:MouseEvent) {

View File

@ -64,6 +64,8 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
code:a.user.code, code:a.user.code,
email:claims["email"]!== undefined ? claims["email"] : a.user.name, email:claims["email"]!== undefined ? claims["email"] : a.user.name,
name:claims["name"]!== undefined?claims["name"] : a.user.email, name:claims["name"]!== undefined?claims["name"] : a.user.email,
lastName:a.user.lastName,
firstName:a.user.firstName,
claims:claims, claims:claims,
searchable: false searchable: false
}; };

View File

@ -152,6 +152,13 @@ export class ItemService {
return this.httpClient.put<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item); return this.httpClient.put<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item);
} }
putItemFile(item: IItem, jsonObject: any): Observable<IItem> {
const formData = new FormData();
const file = new File([JSON.stringify(jsonObject)], 'data.dat', {type: 'application/json'});
formData.append('file', file);
return this.httpClient.put<any>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/data`, formData);
}
deleteItem(code: string): Observable<any> { deleteItem(code: string): Observable<any> {
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`); return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
} }
@ -196,5 +203,4 @@ export class ItemService {
getBreadcrumbs(itemCode: string): Observable<IListItem[]> { getBreadcrumbs(itemCode: string): Observable<IListItem[]> {
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`); return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`);
} }
} }

View File

@ -0,0 +1,10 @@
import { Injectable, isDevMode } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class ProductionGuard {
canActivate(): boolean {
return !isDevMode();
}
}

View File

@ -29,7 +29,8 @@
"strictMetadataEmit": true, "strictMetadataEmit": true,
"fullTemplateTypeCheck": true, "fullTemplateTypeCheck": true,
"strictInjectionParameters": true, "strictInjectionParameters": true,
"enableResourceInlining": true "enableResourceInlining": true,
"compilationMode": "partial"
}, },
"exclude": [ "exclude": [
"src/test.ts", "src/test.ts",

View File

@ -2,19 +2,35 @@
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"declarationMap": true, "module": "es2015",
"moduleResolution": "node",
"declaration": true, "declaration": true,
"sourceMap": true,
"inlineSources": true, "inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"esModuleInterop": true,
"types": [], "types": [],
"lib": [ "lib": [
"dom", "dom",
"es2020" "es2018"
] ],
"paths": {
"@angular/*": [
"node_modules/@angular/*"
]
}
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"skipTemplateCodegen": true, "skipTemplateCodegen": true,
"strictMetadataEmit": true, "strictMetadataEmit": true,
"enableResourceInlining": true "fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true,
"compilationMode": "partial"
}, },
"exclude": [ "exclude": [
"src/test.ts", "src/test.ts",

View File

@ -1,9 +1,39 @@
{ {
"extends": "./tsconfig.lib.json", "extends": "../../tsconfig.json",
"compilerOptions": { "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": { "angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true,
"compilationMode": "partial" "compilationMode": "partial"
} },
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
} }