Compare commits
63 Commits
3f9b4dcdaa
...
2024.10
Author | SHA1 | Date | |
---|---|---|---|
|
31d3e58062 | ||
0231421cef | |||
|
6b95fb7f77 | ||
da7e193219 | |||
31f9b48bd7 | |||
|
1d6b30edff | ||
349a76395b | |||
|
32b3b98f76 | ||
010ed6e010 | |||
a8675f5c49 | |||
|
f76ef44dee | ||
2387a0e39e | |||
98980fc857 | |||
|
6f7d8fe248 | ||
03a1ccd597 | |||
|
f2c133e9bd | ||
|
9c866e500f | ||
3b692359c6 | |||
3d4042e8c6 | |||
|
3db760dd96 | ||
b5828cd0fa | |||
af4e6f45d1 | |||
|
79def90bc7 | ||
53c60427f1 | |||
|
7d7e5bcd37 | ||
72a172ccb2 | |||
2728a91ab4 | |||
|
28d2b5d4a3 | ||
b70e385097 | |||
7392c6170c | |||
367348088a | |||
|
5efd5b78c9 | ||
0498d64c36 | |||
|
e17ac435b5 | ||
|
3e11c7cefd | ||
|
b3dcd1e58b | ||
|
681fc819a6 | ||
2a62d2df48 | |||
|
004bcea0b6 | ||
8efa46fa66 | |||
cefa788295 | |||
2da783d6be | |||
749be159f1 | |||
|
4e24527950 | ||
45263a59f4 | |||
|
5cdef30c71 | ||
cdba2af921 | |||
658c2c84cd | |||
|
1274d96f1d | ||
35ccb4f4c5 | |||
|
47fbc5eab9 | ||
564d08b5b9 | |||
7e17a49dc6 | |||
|
3f286ee042 | ||
747499d009 | |||
|
c4f4a4f61e | ||
6b095b7f49 | |||
b2791eb80b | |||
|
4c93a9f766 | ||
93554bc7c4 | |||
d074cd81cf | |||
87547aafcc | |||
6ab5ba8a56 |
@@ -2,7 +2,6 @@
|
||||
|
||||
This is a sample FarmMaps client in Angular 7.x.
|
||||
|
||||
|
||||
## Quick start
|
||||
|
||||
Use one of the two options below to get started.
|
||||
@@ -53,7 +52,7 @@ ng serve
|
||||
```
|
||||
*Go*`
|
||||
|
||||
Point your browser to http://localhost:4200
|
||||
Point your browser to http://localhost:4200
|
||||
|
||||
*ESLint*
|
||||
|
||||
|
20293
package-lock.json
generated
20293
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.10.0",
|
||||
"scripts": {
|
||||
"version": "4.11.1",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
@@ -10,12 +10,12 @@
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"dependencies": {
|
||||
"@angular-eslint/eslint-plugin": "^18.2.0",
|
||||
"@angular/animations": "^18.2.3",
|
||||
"@angular/common": "^18.2.3",
|
||||
"@angular/compiler": "^18.2.3",
|
||||
"@angular/core": "^18.2.3",
|
||||
"@angular-eslint/eslint-plugin": "^18.2.0",
|
||||
"@angular/forms": "^18.2.3",
|
||||
"@angular/platform-browser": "^18.2.3",
|
||||
"@angular/platform-browser-dynamic": "^18.2.3",
|
||||
@@ -23,7 +23,7 @@
|
||||
"@farmmaps/common": "file:dist/common",
|
||||
"@farmmaps/common-map": "file:dist/common-map",
|
||||
"@farmmaps/common-map3d": "file:dist/common-map3d",
|
||||
"ng-openlayers": "file:dist/ng-openlayers",
|
||||
"@farmmaps/ng-openlayers": "file:dist/ng-openlayers",
|
||||
"@microsoft/signalr": "^3.1.16",
|
||||
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
|
||||
"@ngrx/effects": "^18.0.2",
|
||||
@@ -39,9 +39,9 @@
|
||||
"core-js": "^2.6.12",
|
||||
"https-browserify": "^1.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"ngrx-store-localstorage": "18.0.0",
|
||||
"ngx-avatars": "1.8.0",
|
||||
"ngx-clipboard": "16.0.0",
|
||||
"ngrx-store-localstorage": "^18.0.0",
|
||||
"ngx-avatars": "^1.8.0",
|
||||
"ngx-clipboard": "^16.0.0",
|
||||
"ngx-image-cropper": "^7.0.0",
|
||||
"ngx-uploadx": "^6.2.0",
|
||||
"ol": "^8.2.0",
|
||||
@@ -56,8 +56,12 @@
|
||||
"util": "^0.12.4",
|
||||
"zone.js": "~0.14.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^18",
|
||||
"optionalDependencies": {
|
||||
"@lmdb/lmdb-linux-x64": "^3.1.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.21.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^18.0.0",
|
||||
"@angular-devkit/build-angular": "^18.2.3",
|
||||
"@angular/cli": "^18.2.3",
|
||||
"@angular/compiler-cli": "^18.2.3",
|
||||
@@ -66,7 +70,7 @@
|
||||
"@types/arcgis-rest-api": "^10.4.5",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "^2.0.9",
|
||||
"@types/node": "^12.20.15",
|
||||
"@types/node": "^22.5.4",
|
||||
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
|
||||
"@typescript-eslint/parser": "^6.18.0",
|
||||
|
13
projects/common-map/package-lock.json
generated
13
projects/common-map/package-lock.json
generated
@@ -12,10 +12,9 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "^18.2.3",
|
||||
"@ngrx/effects": "^18",
|
||||
"@ngrx/router-store": "^18",
|
||||
"@ngrx/store": "^18",
|
||||
"ng-openlayers": "file:dist/ng-openlayers",
|
||||
"@ngrx/effects": "^18.0.2",
|
||||
"@ngrx/router-store": "^18.0.2",
|
||||
"@ngrx/store": "^18.0.2",
|
||||
"ngrx-store-localstorage": "^18",
|
||||
"tassign": "^1.0.0"
|
||||
}
|
||||
@@ -34,7 +33,7 @@
|
||||
}
|
||||
},
|
||||
"dist/ng-openlayers": {
|
||||
"peer": true
|
||||
"extraneous": true
|
||||
},
|
||||
"node_modules/@angular/common": {
|
||||
"version": "18.2.3",
|
||||
@@ -173,10 +172,6 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ng-openlayers": {
|
||||
"resolved": "dist/ng-openlayers",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/ngrx-store-localstorage": {
|
||||
"version": "18.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ngrx-store-localstorage/-/ngrx-store-localstorage-18.0.0.tgz",
|
||||
|
@@ -9,11 +9,10 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "^18.2.3",
|
||||
"ngrx-store-localstorage": "^18",
|
||||
"ngrx-store-localstorage": "^18.0.0",
|
||||
"@ngrx/effects": "^18.0.2",
|
||||
"@ngrx/router-store": "^18.0.2",
|
||||
"@ngrx/store": "^18.0.2",
|
||||
"tassign": "^1.0.0",
|
||||
"ng-openlayers": "file:dist/ng-openlayers"
|
||||
"tassign": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store';
|
||||
import { AngularOpenlayersModule } from 'ng-openlayers';
|
||||
import { AngularOpenlayersModule } from '@farmmaps/ng-openlayers';
|
||||
|
||||
//common modules
|
||||
import { AppCommonModule } from '@farmmaps/common';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output, Inject } from '@angular/core';
|
||||
import { MapComponent } from 'ng-openlayers';
|
||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||
|
||||
import * as proj from 'ol/proj';
|
||||
import {Point,Geometry} from 'ol/geom';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges ,Host} from '@angular/core';
|
||||
import { MapComponent } from 'ng-openlayers';
|
||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import Overlay from 'ol/Overlay';
|
||||
import { fromLonLat, toLonLat } from 'ol/proj';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||
import { LayerGroupComponent, MapComponent } from 'ng-openlayers';
|
||||
import { LayerGroupComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
||||
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
||||
import { ILayerData} from '../../../models/layer.data';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken, OnDestroy, LOCALE_ID } from '@angular/core';
|
||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ng-openlayers';
|
||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import { ItemService, ItemTypeService, IItem, IItemType, FolderService } from '@farmmaps/common';
|
||||
|
||||
import { Feature } from 'ol';
|
||||
|
@@ -3,7 +3,7 @@ import { IItemLayer } from '../../../models/item.layer';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../../reducers/map.reducer';
|
||||
import * as mapActions from '../../../actions/map.actions';
|
||||
import { MapComponent } from 'ng-openlayers';
|
||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import { ILayervalue } from '../../../models/layer.value';
|
||||
import { Observable, interval, Subject } from 'rxjs';
|
||||
import { debounce, throttle } from 'rxjs/operators';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { LayerVectorComponent, MapComponent } from 'ng-openlayers';
|
||||
import { LayerVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import RenderType from 'ol/layer/Vector';
|
||||
import { Vector as VectorSource } from 'ol/source';
|
||||
import { Geometry } from 'ol/geom';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, Input, Host, OnChanges, SimpleChanges,ChangeDetectorRef } from '@angular/core';
|
||||
import { MapComponent } from 'ng-openlayers';
|
||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import {IMapState} from '../../../models/map.state'
|
||||
import {View} from 'ol';
|
||||
import { fromLonLat } from 'ol/proj';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Component, Host, Input, OnInit, ChangeDetectorRef } from '@angular/core';
|
||||
import { ViewComponent, MapComponent } from 'ng-openlayers';
|
||||
import { ViewComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||
|
||||
import {View} from 'ol';
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component, Host, Input, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ViewComponent, MapComponent } from 'ng-openlayers';
|
||||
import { ViewComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input, OnChanges } from '@angular/core';
|
||||
import { Layer } from 'ol/layer';
|
||||
import { Source } from 'ol/source';
|
||||
import { MapComponent } from 'ng-openlayers';
|
||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||
|
||||
@Directive({
|
||||
selector: '[fmMapIfZoomToShow]',
|
||||
|
9
projects/common-map3d/package-lock.json
generated
9
projects/common-map3d/package-lock.json
generated
@@ -13,8 +13,7 @@
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^18.2.3",
|
||||
"@angular/core": "^18.2.3",
|
||||
"cesium": ">=1.82.1",
|
||||
"ng-openlayers": "file:dist/ng-openlayers",
|
||||
"cesium": "^1.97.0",
|
||||
"ol-cesium": ">=2.13.0"
|
||||
}
|
||||
},
|
||||
@@ -32,7 +31,7 @@
|
||||
}
|
||||
},
|
||||
"dist/ng-openlayers": {
|
||||
"peer": true
|
||||
"extraneous": true
|
||||
},
|
||||
"node_modules/@angular/common": {
|
||||
"version": "18.2.3",
|
||||
@@ -373,10 +372,6 @@
|
||||
"integrity": "sha512-WabtlpnK/GgD0GMwYd1fBTfYHf4MIcQPEg6dt7y4GuDcY51RzLSkSNE8ZogD7U3Vs2/fIf4z89TOLpA80EOnhg==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/ng-openlayers": {
|
||||
"resolved": "dist/ng-openlayers",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/nosleep.js": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/nosleep.js/-/nosleep.js-0.12.0.tgz",
|
||||
|
@@ -10,8 +10,7 @@
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^18.2.3",
|
||||
"@angular/core": "^18.2.3",
|
||||
"ng-openlayers": "file:dist/ng-openlayers",
|
||||
"cesium": ">=1.82.1",
|
||||
"cesium": "^1.97.0",
|
||||
"ol-cesium": ">=2.13.0"
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AppCommonModule } from '@farmmaps/common';
|
||||
import { AppCommonMapModule } from '@farmmaps/common-map';
|
||||
import { AngularOpenlayersModule } from 'ng-openlayers';
|
||||
import { AngularOpenlayersModule } from '@farmmaps/ng-openlayers';
|
||||
import { Switch2D3DComponent } from './components/olcs/switch2d3d/switch2d3d.component';
|
||||
|
||||
@NgModule({
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit,Input,Host } from '@angular/core';
|
||||
import { Interaction} from 'ol/interaction';
|
||||
import { MapComponent } from 'ng-openlayers';
|
||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||
import OLCesium from 'olcs/OLCesium';
|
||||
import RasterSynchronizer from 'olcs/RasterSynchronizer';
|
||||
import VectorSynchronizer from 'olcs/VectorSynchronizer';
|
||||
|
4
projects/common/package-lock.json
generated
4
projects/common/package-lock.json
generated
@@ -19,8 +19,8 @@
|
||||
"angular-oauth2-oidc": "^17.0.2",
|
||||
"bootstrap": "^5.3.3",
|
||||
"moment": "^2.29.4",
|
||||
"ngx-avatars": "1.8.0",
|
||||
"ngx-clipboard": "16.0.0",
|
||||
"ngx-avatars": "^1.8.0",
|
||||
"ngx-clipboard": "^16.0.0",
|
||||
"ngx-image-cropper": "^7.0.0",
|
||||
"ngx-uploadx": "^6.2.0",
|
||||
"tassign": "^1.0.0"
|
||||
|
@@ -18,8 +18,8 @@
|
||||
"ngx-uploadx": "^6.2.0",
|
||||
"angular-oauth2-oidc": "^17.0.2",
|
||||
"moment": "^2.29.4",
|
||||
"ngx-avatars": "1.8.0",
|
||||
"ngx-avatars": "^1.8.0",
|
||||
"ngx-image-cropper": "^7.0.0",
|
||||
"ngx-clipboard": "16.0.0"
|
||||
"ngx-clipboard": "^16.0.0"
|
||||
}
|
||||
}
|
||||
|
@@ -71,6 +71,8 @@ export const TOGGLENOTIFICATIONMENU = '[AppCommon] ToggleNotificationMenu';
|
||||
|
||||
export const TOGGLEHELPMENU = '[AppCommon] ToggleHelpMenu';
|
||||
|
||||
export const TOGGLESETTINGMENU = '[AppCommon] ToggleSettingMenu';
|
||||
|
||||
export const SETMENUVISIBLE = '[AppCommon] SetMenuVisible';
|
||||
|
||||
export const ONLINE = '[AppCommon] Online';
|
||||
@@ -332,6 +334,12 @@ export class ToggleHelpMenu implements Action {
|
||||
constructor() { }
|
||||
}
|
||||
|
||||
export class ToggleSettingMenu implements Action {
|
||||
readonly type = TOGGLESETTINGMENU;
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
|
||||
export class SetMenuVisible implements Action {
|
||||
readonly type = SETMENUVISIBLE;
|
||||
|
||||
@@ -408,6 +416,7 @@ export type Actions = OpenModal
|
||||
| ToggleAppMenu
|
||||
| ToggleNotificationMenu
|
||||
| ToggleHelpMenu
|
||||
| ToggleSettingMenu
|
||||
| NotificationEvent
|
||||
| SetUnreadNotifications;
|
||||
|
||||
|
@@ -34,6 +34,7 @@ import { HasClaimDirective } from './components/has-claim/has-claim.directive';
|
||||
import { HasPackageDirective } from './components/has-package/has-package.directive';
|
||||
import { HasRoleDirective } from './components/has-role/has-role.directive';
|
||||
import { HelpMenuComponent } from './components/help-menu/help-menu.component';
|
||||
import { SettingMenuComponent } from './components/setting-menu/setting-menu.component';
|
||||
import { ItemLinkComponent } from './components/item-link/item-link.component';
|
||||
import { MenuBackgroundComponent } from './components/menu-background/menu-background.component';
|
||||
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||
@@ -104,6 +105,7 @@ export {
|
||||
AppMenuComponent,
|
||||
NotificationMenuComponent,
|
||||
HelpMenuComponent,
|
||||
SettingMenuComponent,
|
||||
BackButtonComponent,
|
||||
ThumbnailComponent,
|
||||
EditImageModalComponent,
|
||||
|
@@ -33,6 +33,7 @@
|
||||
<fm-resumable-file-upload></fm-resumable-file-upload>
|
||||
</ng-container>
|
||||
<div class="user-menu apponly">
|
||||
<fm-setting-menu [user]="user|async" [showMenu]="settingMenuVisible|async"></fm-setting-menu>
|
||||
<fm-help-menu [user]="user|async" [showMenu]="helpMenuVisible|async"></fm-help-menu>
|
||||
<fm-notification-menu [user]="user|async" [unread]="unreadNotifications|async" [showMenu]="notificationMenuVisible|async"></fm-notification-menu>
|
||||
<fm-app-menu [user]="user|async" [showMenu]="appMenuVisible|async"></fm-app-menu>
|
||||
|
@@ -119,7 +119,7 @@ body { background: #f1f1f1; line-height: 18px; user-select:none;font-family: Lat
|
||||
max-height:0em;
|
||||
}
|
||||
|
||||
fm-help-menu,fm-app-menu,fm-user-menu,fm-notification-menu {
|
||||
fm-help-menu,fm-app-menu,fm-user-menu,fm-notification-menu,fm-setting-menu {
|
||||
display: inline-block;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
public accountMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAccountMenuVisible);
|
||||
public appMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAppMenuVisible);
|
||||
public notificationMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetNotificationMenuVisible);
|
||||
public settingMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetSettingMenuVisible);
|
||||
public helpMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetHelpMenuVisible);
|
||||
public unreadNotifications: Observable<number> = this.store$.select(appReducers.SelectgetUnreadNotifications);
|
||||
public user: Observable<IUser> = this.store$.select(appReducers.SelectGetUser);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import {Component, HostListener} from '@angular/core';
|
||||
import {Location} from "@angular/common";
|
||||
import { DeviceService} from '../../services/device.service';
|
||||
import { Location } from "@angular/common";
|
||||
import { Component, EventEmitter, HostListener, Output } from '@angular/core';
|
||||
import { DeviceService } from '../../services/device.service';
|
||||
|
||||
@Component({
|
||||
selector: 'fm-back-button',
|
||||
@@ -8,16 +8,18 @@ import { DeviceService} from '../../services/device.service';
|
||||
styleUrls: ['./back-button.component.scss']
|
||||
})
|
||||
export class BackButtonComponent {
|
||||
@Output() beforeLocationBack = new EventEmitter();
|
||||
|
||||
@HostListener('click')
|
||||
onBackClicked() {
|
||||
this.beforeLocationBack.emit();
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
constructor(private location: Location,private deviceService:DeviceService) { }
|
||||
constructor(private location: Location,private deviceService:DeviceService) {
|
||||
}
|
||||
|
||||
public show() {
|
||||
return !this.deviceService.IsMobile();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<div>
|
||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [ngClass]="{'hidden':!user || noContent}">
|
||||
<span i18n-title title="Settings"><i class="fas fa-gear" aria-hidden="true"></i></span>
|
||||
<div class="menu hidden" [ngClass]="{'hidden':!showMenu}">
|
||||
<router-outlet name="setting-menu" (activate)="activateRoute()" (deactivate)="deActivateRoute()"></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,80 @@
|
||||
.menu-button {
|
||||
background-color: gray;
|
||||
display: inline-block;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
line-height: 2.5em;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.menu-button > span {
|
||||
color:white;
|
||||
}
|
||||
|
||||
.menu {
|
||||
max-height: calc( 100vh - 4rem);
|
||||
//transition: max-height 0.2s;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 20px rgba(0,0,0,.3);
|
||||
position: fixed;
|
||||
top: 3.4rem;
|
||||
right:0.5rem;
|
||||
left:0.5rem;
|
||||
background-color: #fff;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.5rem;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
:host-context(.fullscreen) .menu {
|
||||
top:4em;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding:0.5rem;
|
||||
min-width: 10rem;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.menu.hidden {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.menu-button.hidden {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 44rem) {
|
||||
.menu {
|
||||
position: absolute;
|
||||
top: 3rem;
|
||||
right:0;
|
||||
left: unset;
|
||||
max-width: 30em;
|
||||
}
|
||||
|
||||
:host-context(.fullscreen) .menu {
|
||||
top: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
.unread {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top:-0.5em;
|
||||
right: -0.5em;
|
||||
}
|
||||
|
||||
.unread.hidden {
|
||||
display: none;
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
import { Input } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
import { IUser } from '../../models/user';
|
||||
import {Store} from '@ngrx/store';
|
||||
import * as appReducers from '../../reducers/app-common.reducer';
|
||||
import * as appActions from '../../actions/app-common.actions';
|
||||
|
||||
@Component({
|
||||
selector: 'fm-setting-menu',
|
||||
templateUrl: './setting-menu.component.html',
|
||||
styleUrls: ['./setting-menu.component.scss']
|
||||
})
|
||||
export class SettingMenuComponent implements OnInit {
|
||||
|
||||
@Input() user:IUser;
|
||||
@Input() showMenu:boolean;
|
||||
public noContent = true;
|
||||
|
||||
constructor(private store: Store<appReducers.State>) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
toggle(event:MouseEvent) {
|
||||
event.stopPropagation();
|
||||
this.store.dispatch(new appActions.ToggleSettingMenu());
|
||||
}
|
||||
|
||||
activateRoute() {
|
||||
this.noContent=false;
|
||||
}
|
||||
|
||||
deActivateRoute() {
|
||||
this.noContent=true;
|
||||
}
|
||||
}
|
@@ -25,6 +25,7 @@ export class Item implements IItem {
|
||||
public state?: number;
|
||||
public data?:any;
|
||||
public isEditable?:boolean;
|
||||
public owner?: string;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
@@ -11,4 +11,5 @@ export interface IListItem {
|
||||
size?: number;
|
||||
state?: number;
|
||||
thumbnail?: boolean;
|
||||
owner?: string;
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ export interface State {
|
||||
appMenuVisible: boolean,
|
||||
notificationMenuVisible: boolean,
|
||||
helpMenuVisible: boolean,
|
||||
settingMenuVisible: boolean,
|
||||
unreadNotifications: number,
|
||||
isOnline: boolean,
|
||||
isPageMode:boolean
|
||||
@@ -47,6 +48,7 @@ export const initialState: State = {
|
||||
appMenuVisible: false,
|
||||
notificationMenuVisible: false,
|
||||
helpMenuVisible: false,
|
||||
settingMenuVisible: false,
|
||||
unreadNotifications: 0,
|
||||
isOnline: true,
|
||||
isPageMode: true
|
||||
@@ -106,26 +108,29 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
});
|
||||
}
|
||||
case appCommonActions.TOGGLEMENU: {
|
||||
return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible,appMenuVisible:!state.menuVisible?false:state.appMenuVisible,notificationMenuVisible:!state.menuVisible?false:state.notificationMenuVisible,helpMenuVisible:!state.menuVisible?false:state.helpMenuVisible });
|
||||
return tassign(state, { menuVisible: !state.menuVisible,accountMenuVisible:!state.menuVisible?false:state.accountMenuVisible,appMenuVisible:!state.menuVisible?false:state.appMenuVisible,notificationMenuVisible:!state.menuVisible?false:state.notificationMenuVisible,helpMenuVisible:!state.menuVisible?false:state.helpMenuVisible,settingMenuVisible:!state.menuVisible?false:state.settingMenuVisible });
|
||||
}
|
||||
case appCommonActions.TOGGLEACCOUNTMENU: {
|
||||
return tassign(state, { accountMenuVisible: !state.accountMenuVisible,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false });
|
||||
return tassign(state, { accountMenuVisible: !state.accountMenuVisible,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLEAPPMENU: {
|
||||
return tassign(state, { appMenuVisible: !state.appMenuVisible,accountMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false });
|
||||
return tassign(state, { appMenuVisible: !state.appMenuVisible,accountMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLENOTIFICATIONMENU: {
|
||||
return tassign(state, { notificationMenuVisible : !state.notificationMenuVisible,accountMenuVisible:false,appMenuVisible:false,helpMenuVisible:false });
|
||||
return tassign(state, { notificationMenuVisible : !state.notificationMenuVisible,accountMenuVisible:false,appMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLEHELPMENU: {
|
||||
return tassign(state, { helpMenuVisible : !state.helpMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false });
|
||||
return tassign(state, { helpMenuVisible : !state.helpMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false,settingMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.TOGGLESETTINGMENU: {
|
||||
return tassign(state, { settingMenuVisible : !state.settingMenuVisible,accountMenuVisible:false,appMenuVisible:false,notificationMenuVisible:false,helpMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.ESCAPE: {
|
||||
return tassign(state, { menuVisible: false,accountMenuVisible:false,appMenuVisible: false,notificationMenuVisible:false,helpMenuVisible:false });
|
||||
return tassign(state, { menuVisible: false,accountMenuVisible:false,appMenuVisible: false,notificationMenuVisible:false,helpMenuVisible:false,settingMenuVisible:false });
|
||||
}
|
||||
case appCommonActions.SETMENUVISIBLE: {
|
||||
const a = action as appCommonActions.SetMenuVisible;
|
||||
return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible,appMenuVisible:a.visible?false:state.appMenuVisible,notificationMenuVisible:a.visible?false:state.notificationMenuVisible,helpMenuVisible:a.visible?false:state.helpMenuVisible });
|
||||
return tassign(state, { menuVisible: a.visible,accountMenuVisible:a.visible?false:state.accountMenuVisible,appMenuVisible:a.visible?false:state.appMenuVisible,notificationMenuVisible:a.visible?false:state.notificationMenuVisible,helpMenuVisible:a.visible?false:state.helpMenuVisible,settingMenuVisible:a.visible?false:state.settingMenuVisible });
|
||||
}
|
||||
case appCommonActions.INITUSERPACKAGESSUCCESS:{
|
||||
const a = action as appCommonActions.InitUserPackagesSuccess;
|
||||
@@ -203,6 +208,7 @@ export const getAccountMenuVisible = (state: State) => state.accountMenuVisible;
|
||||
export const getAppMenuVisible = (state: State) => state.appMenuVisible;
|
||||
export const getNotificationMenuVisible = (state: State) => state.notificationMenuVisible;
|
||||
export const getHelpMenuVisible = (state: State) => state.helpMenuVisible;
|
||||
export const getSettingMenuVisible = (state: State) => state.settingMenuVisible;
|
||||
export const getUnreadNotifications = (state: State) => state.unreadNotifications;
|
||||
export const getIsOnline = (state: State) => state.isOnline;
|
||||
export const getIsPageMode = (state: State) => state.isPageMode;
|
||||
@@ -227,6 +233,7 @@ export const SelectGetAccountMenuVisible = createSelector(selectAppCommonState,g
|
||||
export const SelectGetAppMenuVisible = createSelector(selectAppCommonState,getAppMenuVisible);
|
||||
export const SelectGetNotificationMenuVisible = createSelector(selectAppCommonState,getNotificationMenuVisible);
|
||||
export const SelectGetHelpMenuVisible = createSelector(selectAppCommonState,getHelpMenuVisible);
|
||||
export const SelectGetSettingMenuVisible = createSelector(selectAppCommonState,getSettingMenuVisible);
|
||||
export const SelectgetUnreadNotifications = createSelector(selectAppCommonState,getUnreadNotifications);
|
||||
|
||||
export const SelectGetIsOnline = createSelector(selectAppCommonState,getIsOnline);
|
||||
|
@@ -81,7 +81,7 @@ export class ItemService {
|
||||
|
||||
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string,
|
||||
indexed?: boolean, validToday?: boolean,tags?:string,crs?:string, startDate?: Date, endDate?: Date,
|
||||
skip?: number, take?: number): Observable<IItem[]> {
|
||||
skip?: number, take?: number, sourceTask?: string): Observable<IItem[]> {
|
||||
let params = new HttpParams();
|
||||
if(itemType) params = params.append("it", itemType);
|
||||
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
|
||||
@@ -93,14 +93,16 @@ export class ItemService {
|
||||
if (crs) params = params.append("crs", crs);
|
||||
if (startDate) params = params.append("sDate", startDate.toISOString());
|
||||
if (endDate) params = params.append("eDate", endDate.toISOString());
|
||||
if (sourceTask) params = params.append("sourceTask", sourceTask);
|
||||
if(skip) params = params.append("skip", skip);
|
||||
if(take) params = params.append("take", take);
|
||||
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
||||
}
|
||||
|
||||
getItemListCount(itemType: string, startDate?: Date, endDate?: Date): Observable<number> {
|
||||
getItemListCount(itemType: string, startDate?: Date, endDate?: Date, sourceTask?: string): Observable<number> {
|
||||
let params = new HttpParams();
|
||||
params = params.append("it", itemType);
|
||||
if (sourceTask) params = params.append("sourceTask", sourceTask);
|
||||
if (startDate) params = params.append("sDate", startDate.toISOString());
|
||||
if (endDate) params = params.append("eDate", endDate.toISOString());
|
||||
return this.httpClient.get<number>(`${this.ApiEndpoint()}/api/v1/items/count`, { params: params });
|
||||
|
@@ -1,11 +1,10 @@
|
||||
{
|
||||
"name": "ng-openlayers",
|
||||
"name": "@farmmaps/ng-openlayers",
|
||||
"version": "18.0.0",
|
||||
"description": "OpenLayers library for Angular (migrated from angular 17 to 18)",
|
||||
"author": "Kamil Furtak (kamil.furtak@gmail.com) / Farmmaps",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kamilfurtak/ng-openlayers.git"
|
||||
"publishConfig": {
|
||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kamilfurtak/ng-openlayers/issues"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "ng-openlayers",
|
||||
"name": "@farmmaps/ng-openlayers",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "libs/ng-openlayers/src",
|
||||
|
@@ -20,7 +20,7 @@ const routes = [
|
||||
|
||||
{
|
||||
path: '',
|
||||
canActivate: [NavBarGuard],
|
||||
//canActivate: [NavBarGuard],
|
||||
component: LandingpageComponent
|
||||
},
|
||||
{
|
||||
@@ -43,6 +43,11 @@ const routes = [
|
||||
component: TestComponent,
|
||||
outlet: 'help-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: TestComponent,
|
||||
outlet: 'setting-menu'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: LogoComponent,
|
||||
|
Reference in New Issue
Block a user