3 Commits

Author SHA1 Message Date
d69a72e90d Merge branch 'develop'
Some checks failed
FarmMaps/FarmMapsLib/pipeline/head There was a failure building this commit
# Conflicts:
#	package-lock.json
#	package.json
2026-02-16 22:57:18 +01:00
jenkins
fdfc1bc5c1 [ci skip] Updated packages #71
Some checks reported errors
FarmMaps/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2025-12-10 14:45:00 +00:00
e7b1842297 trigger build
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
2025-12-10 15:13:05 +01:00
16 changed files with 7876 additions and 11562 deletions

View File

@@ -52,6 +52,7 @@ ng serve
``` ```
*Go*` *Go*`
Point your browser to http://localhost:4200 Point your browser to http://localhost:4200
*ESLint* *ESLint*

19046
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "farmmaps-lib-app", "name": "farmmaps-lib-app",
"version": "4.22.0", "version": "4.19.1",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
@@ -11,90 +11,83 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular-eslint/eslint-plugin": "20.7.0", "@angular-eslint/eslint-plugin": "^18.2.0",
"@angular/animations": "^21.1.0", "@angular/animations": "18.2.3",
"@angular/common": "^21.1.0", "@angular/common": "18.2.3",
"@angular/compiler": "^21.1.0", "@angular/compiler": "18.2.3",
"@angular/core": "^21.1.0", "@angular/core": "18.2.3",
"@angular/forms": "^21.1.0", "@angular/forms": "18.2.3",
"@angular/platform-browser": "^21.1.0", "@angular/platform-browser": "18.2.3",
"@angular/platform-browser-dynamic": "^21.1.0", "@angular/platform-browser-dynamic": "18.2.3",
"@angular/router": "^21.1.0", "@angular/router": "18.2.3",
"@farmmaps/common": "file:dist/common", "@farmmaps/common": "file:dist/common",
"@farmmaps/common-map": "file:dist/common-map", "@farmmaps/common-map": "file:dist/common-map",
"@farmmaps/common-map3d": "file:dist/common-map3d", "@farmmaps/common-map3d": "file:dist/common-map3d",
"@farmmaps/ng-openlayers": "file:dist/ng-openlayers", "@farmmaps/ng-openlayers": "file:dist/ng-openlayers",
"@microsoft/signalr": "^10.0.0", "@microsoft/signalr": "^3.1.16",
"@ng-bootstrap/ng-bootstrap": "^20.0.0", "@ng-bootstrap/ng-bootstrap": "^17.0.1",
"@ngrx/effects": "^21.0.1", "@ngrx/effects": "^18.0.2",
"@ngrx/router-store": "^21.0.1", "@ngrx/router-store": "^18.0.2",
"@ngrx/store": "^21.0.1", "@ngrx/store": "^18.0.2",
"@popperjs/core": "2.11.8", "@popperjs/core": "^2.11.8",
"angular-oauth2-oidc": "^20.0.2", "angular-oauth2-oidc": "^17.0.2",
"assert": "^2.1.0", "assert": "^2.0.0",
"bootstrap": "^5.3.8", "bootstrap": "^5.3.3",
"browserify-zlib": "^0.2.0", "browserify-zlib": "^0.2.0",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"cesium": "^1.97.0", "cesium": "^1.97.0",
"core-js": "^3.48.0", "core-js": "^2.6.12",
"https-browserify": "^1.0.0", "https-browserify": "^1.0.0",
"moment": "^2.29.4", "moment": "^2.29.4",
"ngrx-store-localstorage": "^20.1.0", "ngrx-store-localstorage": "^18.0.0",
"ngx-avatars": "1.10.1", "ngx-avatars": "^1.8.0",
"ngx-clipboard": "^16.0.0", "ngx-clipboard": "^16.0.0",
"ngx-image-cropper": "^7.0.0", "ngx-image-cropper": "^7.0.0",
"ngx-uploadx": "^7.0.1", "ngx-uploadx": "^6.2.0",
"ol": "^8.2.0", "ol": "^8.2.0",
"olcs": "^2.13.1", "olcs": "^2.13.1",
"resumablejs": "^1.1.0", "resumablejs": "^1.1.0",
"rxjs": "^7.8.0", "rxjs": "^7.8.1",
"stream": "^0.0.2", "stream": "^0.0.2",
"stream-http": "^3.2.0", "stream-http": "^3.2.0",
"tassign": "^1.0.0", "tassign": "^1.0.0",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"url": "^0.11.0", "url": "^0.11.0",
"util": "^0.12.4", "util": "^0.12.4",
"zone.js": "~0.15.1" "zone.js": "~0.14.10"
}, },
"optionalDependencies": { "optionalDependencies": {
"@lmdb/lmdb-linux-x64": "^3.1.0", "@lmdb/lmdb-linux-x64": "^3.1.0",
"@rollup/rollup-linux-x64-gnu": "^4.21.2" "@rollup/rollup-linux-x64-gnu": "^4.21.2"
}, },
"devDependencies": { "devDependencies": {
"@angular-builders/custom-webpack": "^21.0.3", "@angular-builders/custom-webpack": "^18.0.0",
"@angular-devkit/build-angular": "^21.1.0", "@angular-devkit/build-angular": "18.2.3",
"@angular/build": "^21.1.0", "@angular/cli": "18.2.3",
"@angular/cli": "^21.1.0", "@angular/compiler-cli": "18.2.3",
"@angular/compiler-cli": "^21.1.0", "@angular/language-service": "18.2.3",
"@angular/language-service": "^21.1.0", "@angular/localize": "18.2.3",
"@angular/localize": "^21.1.0",
"@types/arcgis-rest-api": "^10.4.5", "@types/arcgis-rest-api": "^10.4.5",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "^2.0.9",
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^8.53.1", "@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^8.53.1", "@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
"@vitest/browser": "^4.0.17", "@typescript-eslint/parser": "^6.18.0",
"@vitest/browser-playwright": "^4.0.17", "codelyzer": "^6.0.2",
"eslint": "^9.39.2", "eslint": "^8.35.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.32.0", "eslint-plugin-import": "^2.27.5",
"jsdom": "^27.4.0", "jasmine-core": "^4.3.0",
"ng-packagr": "^21.1.0", "jasmine-spec-reporter": "^7.0.0",
"karma": "^6.3.20",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"ng-packagr": "^18.2.1",
"protractor": "~7.0.0",
"ts-node": "^8.8.1", "ts-node": "^8.8.1",
"typescript": "~5.9.3", "typescript": "~5.4.4"
"vitest": "^4.0.17"
},
"overrides": {
"ngrx-store-localstorage": {
"@angular/common": "$@angular/common",
"@angular/core": "$@angular/core"
},
"ngx-avatars": {
"@angular/common": "$@angular/common",
"@angular/core": "$@angular/core"
},
"ngx-uploadx": {
"@angular/common": "$@angular/common",
"@angular/core": "$@angular/core"
}
} }
} }

View File

@@ -8,11 +8,11 @@
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/core": "^21.1.0", "@angular/core": "21.1.0",
"ngrx-store-localstorage": "^20.1.0", "ngrx-store-localstorage": "20.1.0",
"@ngrx/effects": "^21.0.1", "@ngrx/effects": "21.0.1",
"@ngrx/router-store": "^21.0.1", "@ngrx/router-store": "21.0.1",
"@ngrx/store": "^21.0.1", "@ngrx/store": "21.0.1",
"tassign": "^1.0.0" "tassign": "^1.0.0"
}, },
"overrides": { "overrides": {

View File

@@ -8,8 +8,8 @@
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/common": "^21.1.0", "@angular/common": "21.1.0",
"@angular/core": "^21.1.0", "@angular/core": "21.1.0",
"cesium": "^1.97.0", "cesium": "^1.97.0",
"ol-cesium": ">=2.13.0" "ol-cesium": ">=2.13.0"
} }

View File

@@ -6,19 +6,19 @@
}, },
"peerDependencies": { "peerDependencies": {
"@ng-bootstrap/ng-bootstrap": "^20.0.0", "@ng-bootstrap/ng-bootstrap": "^20.0.0",
"@angular/common": "^21.1.0", "@angular/common": "21.1.0",
"@angular/core": "^21.1.0", "@angular/core": "21.1.0",
"@angular/forms": "^21.1.0", "@angular/forms": "21.1.0",
"@ngrx/effects": "^21.0.1", "@ngrx/effects": "21.0.1",
"@ngrx/router-store": "^21.0.1", "@ngrx/router-store": "21.0.1",
"@ngrx/store": "^21.0.1", "@ngrx/store": "21.0.1",
"tassign": "^1.0.0", "tassign": "^1.0.0",
"bootstrap": "^5.3.3", "bootstrap": "^5.3.3",
"@microsoft/signalr": "^10.0.0", "@microsoft/signalr": "10.0.0",
"ngx-uploadx": "^7.0.1", "ngx-uploadx": "7.0.1",
"angular-oauth2-oidc": "^20.0.2", "angular-oauth2-oidc": "20.0.2",
"moment": "^2.29.4", "moment": "^2.29.4",
"ngx-avatars": "^1.10.1", "ngx-avatars": "1.10.1",
"ngx-image-cropper": "^7.0.0", "ngx-image-cropper": "^7.0.0",
"ngx-clipboard": "^16.0.0" "ngx-clipboard": "^16.0.0"
} }

View File

@@ -39,9 +39,6 @@ import { PackagePreloadStrategy } from './services/package-preload-strategy.serv
import { SenmlService } from './services/senml-service'; import { SenmlService } from './services/senml-service';
import { DeviceService } from './services/device.service'; import { DeviceService } from './services/device.service';
import { GradientService} from './services/gradient.service'; import { GradientService} from './services/gradient.service';
import { UserDataService } from './services/user-data.service';
import { CacheService } from './services/cache-service';
import { SharedItemService } from './services/shared.item.service';
export { export {
FolderService, FolderService,
@@ -72,10 +69,7 @@ export {
SenmlService, SenmlService,
PackagePreloadStrategy, PackagePreloadStrategy,
DeviceService, DeviceService,
GradientService, GradientService
UserDataService,
CacheService,
SharedItemService
}; };
@NgModule({ @NgModule({

View File

@@ -61,9 +61,6 @@ import { IItemTask, ItemTask } from './models/itemTask';
import { IJsonline } from './models/json-line'; import { IJsonline } from './models/json-line';
import { IListItem } from './models/list.item'; import { IListItem } from './models/list.item';
import { IPackage, IPackages } from './models/package'; import { IPackage, IPackages } from './models/package';
import { IAclRights } from './models/acl.rights';
import { IListItemAclRights } from './models/list.item.acl.rights';
import { ISharedItem } from './models/shared.item';
import { IQueryState } from './models/query.state'; import { IQueryState } from './models/query.state';
import { ISenMLItem } from './models/senml-item'; import { ISenMLItem } from './models/senml-item';
import { ITypeaheadItem } from './models/typeahead.item'; import { ITypeaheadItem } from './models/typeahead.item';
@@ -82,7 +79,6 @@ export {
commonReducers, EditImageModalComponent, commonReducers, EditImageModalComponent,
GradientComponent, GradientComponent,
GradientSelectComponent, HasClaimDirective, HasPackageDirective, HasRoleDirective, IAuthconfigFactory, IColor, IDataLayer, IEventMessage, IGradientstop, IItem, IItemLinkType, IItemTask, IItemType, IItemTypes, IJsonline, IListItem, IPackage, GradientSelectComponent, HasClaimDirective, HasPackageDirective, HasRoleDirective, IAuthconfigFactory, IColor, IDataLayer, IEventMessage, IGradientstop, IItem, IItemLinkType, IItemTask, IItemType, IItemTypes, IJsonline, IListItem, IPackage,
IAclRights, IListItemAclRights, ISharedItem,
IPackages, IQueryState, ISenMLItem, Item, ItemLinkComponent, ItemTask, ITypeaheadItem, IUrlType, IUser, MenuBackgroundComponent, NotFoundComponent, IPackages, IQueryState, ISenMLItem, Item, ItemLinkComponent, ItemTask, ITypeaheadItem, IUrlType, IUser, MenuBackgroundComponent, NotFoundComponent,
NotImplementedComponent, PackageExistsDirective, ResumableFileUploadComponent, SafePipe, SecureOAuthStorage, SessionClearedComponent, SidePanelComponent, TagInputComponent, ThumbnailComponent, TimespanComponent, UserMenuComponent, WeatherCurrentObservation NotImplementedComponent, PackageExistsDirective, ResumableFileUploadComponent, SafePipe, SecureOAuthStorage, SessionClearedComponent, SidePanelComponent, TagInputComponent, ThumbnailComponent, TimespanComponent, UserMenuComponent, WeatherCurrentObservation
}; };

View File

@@ -1,9 +0,0 @@
export interface IAclRights {
id?: number,
claim: any,
expires: Date,
rights: number,
owner: any,
deep: boolean
}

View File

@@ -1,6 +0,0 @@
import { IAclRights } from './acl.rights';
import { IItem } from './item';
export interface IListItemAclRights extends IItem {
aclRights: IAclRights[]
}

View File

@@ -1,13 +0,0 @@
import { IUser } from "./user";
export interface ISharedItem {
code: string,
name: string,
type: string,
sharedToUser: IUser,
rights: Date,
expires: Date,
dataDate: Date,
childItems: ISharedItem[]
}

View File

@@ -1,45 +0,0 @@
import { Injectable } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
import { Observable, ReplaySubject, Subscription, timer } from 'rxjs';
import { catchError, take } from 'rxjs/operators';
import { IItem } from '../models/item';
import { ItemService } from './item.service';
const REFRESH_INTERVAL = 15 * 60 * 1000; // 15m
@Injectable({ providedIn: 'root'})
export class CacheService {
private proxyCacheMap: { [key: string]: ReplaySubject<IItem[]> } = {};
private subscriptionMap: { [key: string]: Subscription } = {};
constructor(private itemService: ItemService, public oauthService: OAuthService) {
timer(0, REFRESH_INTERVAL).subscribe(() => {
this.subscriptionMap = {};
})
}
getItemList(itemType: string) : Observable<IItem[]> {
if (!this.proxyCacheMap[itemType]) {
this.proxyCacheMap[itemType] = new ReplaySubject(1);
}
if (this.oauthService.getAccessToken() != null && !this.subscriptionMap[itemType]) {
this.subscriptionMap[itemType] = this.itemService.getItemList(itemType)
.pipe(
catchError(error => {
this.subscriptionMap[itemType].unsubscribe();
this.subscriptionMap[itemType] = null;
throw error;
}),
).subscribe(items => {
this.proxyCacheMap[itemType].next(items);
});
}
return this.proxyCacheMap[itemType].asObservable()
.pipe(
take(1)
);
}
}

View File

@@ -1,74 +0,0 @@
import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { IListItemAclRights } from '../models/list.item.acl.rights';
import { ISharedItem } from '../models/shared.item';
import { AppConfig } from '../shared/app.config';
import { IListItem } from '../models/list.item';
@Injectable({
providedIn: 'root'
})
export class SharedItemService {
constructor(
public httpClient: HttpClient,
public appConfig: AppConfig) {
}
apiEndpoint() {
return this.appConfig.getConfig('apiEndPoint');
}
public getSharedUsersForItem(itemCode: string): Observable<any> {
return this.httpClient.get<any>(`${this.apiEndpoint()}/api/v1/items/${itemCode}/sharedusers`);
}
getSharedItemsWithRightsInfo(userCode: string): Observable<ISharedItem[]> {
return this.httpClient.get<any>(`${this.apiEndpoint()}/api/v1/users/${userCode}/shared`);
}
shareItem(itemCode: string, userCode: string, userRights: string, expireTimespan: string, deep: boolean): Observable<any> {
const body = {
rights: userRights,
expire: expireTimespan,
deep: deep
};
return this.httpClient.post<any>(`${this.apiEndpoint()}/api/v1/items/${itemCode}/share/${userCode}`, body);
}
revokeSharedItem(itemCode: string, userCode: string): Observable<any> {
return this.httpClient.delete<any>(`${this.apiEndpoint()}/api/v1/items/${itemCode}/share/${userCode}`);
}
getSharedItemRights(sharedByMe: boolean): Observable<IListItemAclRights[]> {
let params = new HttpParams();
params = params.append('byMe', sharedByMe);
return this.httpClient.get<any>(`${this.apiEndpoint()}/api/v1/user/rights`, {params: params});
}
getSharedItemsByParent(parentCode: string): Observable<ISharedItem[]> {
return this.httpClient.get<any>(`${this.apiEndpoint()}/api/v1/items/${parentCode}/sharedchildren`);
}
getSharedWithCurrentUser(profile: string): Observable<IListItem[]> {
let params = new HttpParams();
if (profile != null) {
params = params.append('sharedBy', profile);
}
return this.httpClient.get<any>(`${this.apiEndpoint()}/api/v1/items/shared/`, {params: params});
}
// this method does not belong here, belongs in some sort of item service
public copyItem(itemCode: string, newParentCode: string, newUserCode: string): Observable<any> {
const body = {
itemCode: itemCode,
newParentCode: newParentCode,
newUserCode: newUserCode
};
return this.httpClient.post<any>(`${this.apiEndpoint()}/api/v1/items/copy`, body);
}
}

View File

@@ -1,35 +0,0 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { AppConfig } from '../shared/app.config';
import { IUser } from '../models/user';
@Injectable({
providedIn: 'root'
})
export class UserDataService {
constructor(
public httpClient: HttpClient,
public appConfig: AppConfig) {
}
ApiEndpoint() {
return this.appConfig.getConfig('apiEndPoint');
}
loadUserNotifications(): Observable<any> {
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/notifications`);
}
readUserNotification(notificationCode: string): Observable<any> {
return this.httpClient.put<any>(`${this.ApiEndpoint()}/api/v1/notifications/${notificationCode}`, null);
}
deleteUserNotification(notificationCode: string): Observable<any> {
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/notifications/${notificationCode}`);
}
getUserConnections(userCode: string, active: boolean): Observable<IUser[]> {
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/users/${userCode}/connections?active=${active}`);
}
}

View File

@@ -12,15 +12,15 @@
"tslib": "^2.3.0" "tslib": "^2.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/common": "21.1.0", "@angular/common": "20.3.16",
"@angular/core": "21.1.0", "@angular/core": "20.3.16",
"ol": "^8.2.0" "ol": "^8.2.0"
} }
}, },
"node_modules/@angular/common": { "node_modules/@angular/common": {
"version": "21.1.0", "version": "20.3.16",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@angular/common/-/common-21.1.0.tgz", "resolved": "https://registry.npmjs.org/@angular/common/-/common-20.3.16.tgz",
"integrity": "sha512-hL3Chp51TU9iBcIfkNtoBS1wuseP1gsyDW2IFtK5HUpAVhbso9B3fdCaDTFkU98A2unluo2YgzI6D/6IS6N+1g==", "integrity": "sha512-GRAziNlntwdnJy3F+8zCOvDdy7id0gITjDnM6P9+n2lXvtDuBLGJKU3DWBbvxcCjtD6JK/g/rEX5fbCxbUHkQQ==",
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -30,14 +30,14 @@
"node": "^20.19.0 || ^22.12.0 || >=24.0.0" "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/core": "21.1.0", "@angular/core": "20.3.16",
"rxjs": "^6.5.3 || ^7.4.0" "rxjs": "^6.5.3 || ^7.4.0"
} }
}, },
"node_modules/@angular/core": { "node_modules/@angular/core": {
"version": "21.1.0", "version": "20.3.16",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@angular/core/-/core-21.1.0.tgz", "resolved": "https://registry.npmjs.org/@angular/core/-/core-20.3.16.tgz",
"integrity": "sha512-QTl9s8GYNN0pt1k3GE6UVlfe6zWtfdykhfchinKq2YJywQ6LBM4UcZgoc56YkgscmyrRFYrr4JYUJjlzTF57+A==", "integrity": "sha512-KSFPKvOmWWLCJBbEO+CuRUXfecX2FRuO0jNi9c54ptXMOPHlK1lIojUnyXmMNzjdHgRug8ci9qDuftvC2B7MKg==",
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -47,9 +47,9 @@
"node": "^20.19.0 || ^22.12.0 || >=24.0.0" "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/compiler": "21.1.0", "@angular/compiler": "20.3.16",
"rxjs": "^6.5.3 || ^7.4.0", "rxjs": "^6.5.3 || ^7.4.0",
"zone.js": "~0.15.0 || ~0.16.0" "zone.js": "~0.15.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@angular/compiler": { "@angular/compiler": {
@@ -256,7 +256,7 @@
}, },
"node_modules/rxjs": { "node_modules/rxjs": {
"version": "7.8.2", "version": "7.8.2",
"resolved": "https://repository.akkerweb.nl/repository/npm-group/rxjs/-/rxjs-7.8.2.tgz", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true, "peer": true,

View File

@@ -31,8 +31,8 @@
"tslib": "^2.3.0" "tslib": "^2.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"@angular/common": "^21.1.0", "@angular/common": "21.1.0",
"@angular/core": "^21.1.0", "@angular/core": "21.1.0",
"ol": "^8.2.0" "ol": "^8.2.0"
} }
} }