Compare commits
No commits in common. "747499d009a136cbd8534d3c01269fc8d605a4c3" and "c4f4a4f61e7be3f086841fd6651398be64ff2b9c" have entirely different histories.
747499d009
...
c4f4a4f61e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.3.0",
|
||||
"version": "4.2.1",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
@ -57,7 +57,7 @@
|
||||
"zone.js": "~0.13.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^16",
|
||||
"@angular-builders/custom-webpack": "^15",
|
||||
"@angular-devkit/build-angular": "^16.2.11",
|
||||
"@angular/cli": "^16.2.11",
|
||||
"@angular/compiler-cli": "^16.2.12",
|
||||
|
@ -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,11 +342,6 @@ export class ClearFeatures implements Action {
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
export class SetPanelExtraWide implements Action {
|
||||
readonly type = SETPANELEXTRAWIDE;
|
||||
constructor(public panelExtraWide:boolean) {}
|
||||
}
|
||||
|
||||
export type Actions = SetMapState
|
||||
| Init
|
||||
| Clear
|
||||
@ -394,6 +389,5 @@ export type Actions = SetMapState
|
||||
| SetPeriod
|
||||
| ToggleShowDataLayerSlide
|
||||
| SetViewState
|
||||
| ClearFeatures
|
||||
| SetPanelExtraWide;
|
||||
| ClearFeatures;
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
panelVisible:panelVisible$|async,
|
||||
openedModalName:openedModalName$|async,
|
||||
panelCollapsed:panelCollapsed$|async,
|
||||
panelExtraWide:panelExtraWide$|async,
|
||||
searchMinified:searchMinified$|async,
|
||||
selectedItem:selectedItem$|async,
|
||||
parentItem:parentItem$|async,
|
||||
@ -65,7 +64,7 @@
|
||||
</div>
|
||||
<div class="side-panel-container">
|
||||
|
||||
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false" [extrawide]="state.panelExtraWide">
|
||||
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false">
|
||||
<div class="panel-wrapper" *ngIf="noContent">
|
||||
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
|
||||
</div>
|
||||
@ -85,7 +84,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</fm-side-panel>
|
||||
<fm-side-panel [resizeable]="true" [visible]="!noContent" [extrawide]="state.panelExtraWide">
|
||||
<fm-side-panel [resizeable]="true" [visible]="!noContent">
|
||||
<router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet>
|
||||
</fm-side-panel>
|
||||
</div>
|
||||
|
@ -66,7 +66,6 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public parentCode$: Observable<string> =this.store.select(mapReducers.selectGetParentCode);
|
||||
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
|
||||
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 clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
|
||||
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
|
||||
@ -209,18 +208,12 @@ 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) {
|
||||
|
@ -49,7 +49,6 @@ export interface State {
|
||||
features: Array<Feature<Geometry>>,
|
||||
panelVisible: boolean,
|
||||
panelCollapsed: boolean,
|
||||
panelExtraWide: boolean,
|
||||
selectedFeature: Feature<Geometry>,
|
||||
selectedItem:IItem,
|
||||
parentItem:IItem,
|
||||
@ -95,7 +94,6 @@ export const initialState: State = {
|
||||
features: [],
|
||||
panelVisible: false,
|
||||
panelCollapsed: false,
|
||||
panelExtraWide: false,
|
||||
selectedFeature: null,
|
||||
selectedItem: null,
|
||||
parentItem: null,
|
||||
@ -574,10 +572,6 @@ 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;
|
||||
}
|
||||
@ -589,7 +583,6 @@ 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;
|
||||
@ -625,7 +618,6 @@ 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);
|
||||
|
@ -10,27 +10,18 @@
|
||||
"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"
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
|
@ -11,27 +11,18 @@
|
||||
"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"
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
|
@ -7,7 +7,6 @@ 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 = [
|
||||
@ -22,7 +21,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '**', component: NotFoundComponent,
|
||||
canActivate: [NavBarGuard, ProductionGuard]
|
||||
canActivate: [NavBarGuard]
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="side-panel hidden" [ngClass]="{'hidden':!visible,'collapsed':collapsed,'resizeable':(resizeable && mobile),'resizing':resizing,'left':left,'extrawide':extrawide}" [ngStyle]="{'top':top}">
|
||||
<div class="side-panel hidden" [ngClass]="{'hidden':!visible,'collapsed':collapsed,'resizeable':(resizeable && mobile),'resizing':resizing,'left':left}" [ngStyle]="{'top':top}">
|
||||
<div *ngIf="collapsable" class="arrow rounded-end p-2" (click)="handleToggleClick($event)">
|
||||
<i class="fal fa-chevron-left" aria-hidden="true"></i>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
}
|
||||
|
||||
.side-panel.collapsed {
|
||||
left:-44rem;
|
||||
left:-22rem;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
@ -76,6 +76,7 @@ div.resizegrip > span {
|
||||
|
||||
.resizeable .resizegrip {
|
||||
display:block;
|
||||
|
||||
}
|
||||
|
||||
.resizeable .content {
|
||||
@ -93,17 +94,10 @@ div.resizegrip > span {
|
||||
|
||||
.side-panel.hidden {
|
||||
width: 22rem;
|
||||
left:-22rem;
|
||||
left:-24rem;
|
||||
height:100%;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.side-panel.extrawide {
|
||||
top:0px;
|
||||
width: 44rem;
|
||||
height:100%;
|
||||
left:0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'fm-side-panel',
|
||||
@ -13,7 +13,6 @@ export class SidePanelComponent implements OnChanges {
|
||||
@Input() public collapsable: boolean;
|
||||
@Input() public resizeable = false;
|
||||
@Input() public left = false;
|
||||
@Input() public extrawide: boolean;
|
||||
@Output() onResize: EventEmitter<number> = new EventEmitter<number>();
|
||||
@ViewChild("resizeGrip") elementView: ElementRef;
|
||||
public mobile = true;
|
||||
@ -42,7 +41,7 @@ export class SidePanelComponent implements OnChanges {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.parentHeight = this.element.nativeElement.offsetParent?.clientHeight;
|
||||
this.parentHeight = this.element.nativeElement.offsetParent.clientHeight;
|
||||
this.setTop();
|
||||
}
|
||||
|
||||
|
@ -5,9 +5,6 @@
|
||||
<div class="card" *ngIf="user">
|
||||
<div class="card-body">
|
||||
<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>
|
||||
</div>
|
||||
|
@ -20,14 +20,11 @@ export class UserMenuComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
getProvider():string | null {
|
||||
const ownedClaims = this.oauthService.getIdentityClaims();
|
||||
if(ownedClaims) {
|
||||
if (ownedClaims["idp"] != "local") {
|
||||
return ownedClaims["idp"];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
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():"";
|
||||
}
|
||||
|
||||
logout(event:MouseEvent) {
|
||||
|
@ -64,8 +64,6 @@ 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
|
||||
};
|
||||
|
@ -152,13 +152,6 @@ export class ItemService {
|
||||
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> {
|
||||
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
||||
}
|
||||
@ -203,4 +196,5 @@ export class ItemService {
|
||||
getBreadcrumbs(itemCode: string): Observable<IListItem[]> {
|
||||
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
import { Injectable, isDevMode } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ProductionGuard {
|
||||
canActivate(): boolean {
|
||||
return !isDevMode();
|
||||
}
|
||||
}
|
@ -29,8 +29,7 @@
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true,
|
||||
"compilationMode": "partial"
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
|
@ -2,35 +2,19 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"declarationMap": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"types": [],
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2018"
|
||||
],
|
||||
"paths": {
|
||||
"@angular/*": [
|
||||
|
||||
"node_modules/@angular/*"
|
||||
|
||||
]
|
||||
}
|
||||
"es2020"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true,
|
||||
"compilationMode": "partial"
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
|
@ -1,39 +1,9 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "./tsconfig.lib.json",
|
||||
"compilerOptions": {
|
||||
"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/*"
|
||||
|
||||
]
|
||||
}
|
||||
"declarationMap": false
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true,
|
||||
"compilationMode": "partial"
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user