Compare commits
11 Commits
d69a72e90d
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73d0a99cd6 | ||
| 5991adf0c6 | |||
| d7ab7e84ce | |||
| 18092fcc24 | |||
|
|
5e84eb4404 | ||
| a5324c5164 | |||
|
|
7c2911afae | ||
| 0fe20b6649 | |||
|
|
c49534050a | ||
| bab870cc43 | |||
|
|
cad022e772 |
110
package-lock.json
generated
110
package-lock.json
generated
@@ -1,50 +1,50 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.20.0",
|
||||
"version": "4.22.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.20.0",
|
||||
"version": "4.22.0",
|
||||
"dependencies": {
|
||||
"@angular-eslint/eslint-plugin": "20.7.0",
|
||||
"@angular/animations": "21.1.0",
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/compiler": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/forms": "21.1.0",
|
||||
"@angular/platform-browser": "21.1.0",
|
||||
"@angular/platform-browser-dynamic": "21.1.0",
|
||||
"@angular/router": "21.1.0",
|
||||
"@angular/animations": "^21.1.0",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/compiler": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"@angular/forms": "^21.1.0",
|
||||
"@angular/platform-browser": "^21.1.0",
|
||||
"@angular/platform-browser-dynamic": "^21.1.0",
|
||||
"@angular/router": "^21.1.0",
|
||||
"@farmmaps/common": "file:dist/common",
|
||||
"@farmmaps/common-map": "file:dist/common-map",
|
||||
"@farmmaps/common-map3d": "file:dist/common-map3d",
|
||||
"@farmmaps/ng-openlayers": "file:dist/ng-openlayers",
|
||||
"@microsoft/signalr": "10.0.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "20.0.0",
|
||||
"@ngrx/effects": "21.0.1",
|
||||
"@ngrx/router-store": "21.0.1",
|
||||
"@ngrx/store": "21.0.1",
|
||||
"@microsoft/signalr": "^10.0.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "^20.0.0",
|
||||
"@ngrx/effects": "^21.0.1",
|
||||
"@ngrx/router-store": "^21.0.1",
|
||||
"@ngrx/store": "^21.0.1",
|
||||
"@popperjs/core": "2.11.8",
|
||||
"angular-oauth2-oidc": "20.0.2",
|
||||
"assert": "2.1.0",
|
||||
"bootstrap": "5.3.8",
|
||||
"angular-oauth2-oidc": "^20.0.2",
|
||||
"assert": "^2.1.0",
|
||||
"bootstrap": "^5.3.8",
|
||||
"browserify-zlib": "^0.2.0",
|
||||
"buffer": "^6.0.3",
|
||||
"cesium": "^1.97.0",
|
||||
"core-js": "^2.6.12",
|
||||
"core-js": "^3.48.0",
|
||||
"https-browserify": "^1.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"ngrx-store-localstorage": "20.1.0",
|
||||
"ngrx-store-localstorage": "^20.1.0",
|
||||
"ngx-avatars": "1.10.1",
|
||||
"ngx-clipboard": "^16.0.0",
|
||||
"ngx-image-cropper": "^7.0.0",
|
||||
"ngx-uploadx": "7.0.1",
|
||||
"ngx-uploadx": "^7.0.1",
|
||||
"ol": "^8.2.0",
|
||||
"olcs": "^2.13.1",
|
||||
"resumablejs": "^1.1.0",
|
||||
"rxjs": "^7.8.1",
|
||||
"rxjs": "^7.8.0",
|
||||
"stream": "^0.0.2",
|
||||
"stream-http": "^3.2.0",
|
||||
"tassign": "^1.0.0",
|
||||
@@ -54,27 +54,27 @@
|
||||
"zone.js": "~0.15.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "21.0.3",
|
||||
"@angular-devkit/build-angular": "21.1.0",
|
||||
"@angular/build": "21.1.0",
|
||||
"@angular/cli": "21.1.0",
|
||||
"@angular/compiler-cli": "21.1.0",
|
||||
"@angular/language-service": "21.1.0",
|
||||
"@angular/localize": "21.1.0",
|
||||
"@angular-builders/custom-webpack": "^21.0.3",
|
||||
"@angular-devkit/build-angular": "^21.1.0",
|
||||
"@angular/build": "^21.1.0",
|
||||
"@angular/cli": "^21.1.0",
|
||||
"@angular/compiler-cli": "^21.1.0",
|
||||
"@angular/language-service": "^21.1.0",
|
||||
"@angular/localize": "^21.1.0",
|
||||
"@types/arcgis-rest-api": "^10.4.5",
|
||||
"@types/node": "^22.5.4",
|
||||
"@typescript-eslint/eslint-plugin": "8.53.1",
|
||||
"@typescript-eslint/parser": "8.53.1",
|
||||
"@vitest/browser": "4.0.17",
|
||||
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
||||
"@typescript-eslint/parser": "^8.53.1",
|
||||
"@vitest/browser": "^4.0.17",
|
||||
"@vitest/browser-playwright": "^4.0.17",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"jsdom": "^27.4.0",
|
||||
"ng-packagr": "21.1.0",
|
||||
"ng-packagr": "^21.1.0",
|
||||
"ts-node": "^8.8.1",
|
||||
"typescript": "~5.9.3",
|
||||
"vitest": "4.0.17"
|
||||
"vitest": "^4.0.17"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@lmdb/lmdb-linux-x64": "^3.1.0",
|
||||
@@ -83,7 +83,7 @@
|
||||
},
|
||||
"dist/common": {
|
||||
"name": "@farmmaps/common",
|
||||
"version": "4.20.0-prerelease.2615",
|
||||
"version": "4.22.0-prerelease.2619",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
@@ -108,42 +108,42 @@
|
||||
},
|
||||
"dist/common-map": {
|
||||
"name": "@farmmaps/common-map",
|
||||
"version": "4.20.0-prerelease.2615",
|
||||
"version": "4.22.0-prerelease.2620",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "21.1.0",
|
||||
"@ngrx/effects": "21.0.1",
|
||||
"@ngrx/router-store": "21.0.1",
|
||||
"@ngrx/store": "21.0.1",
|
||||
"ngrx-store-localstorage": "20.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"@ngrx/effects": "^21.0.1",
|
||||
"@ngrx/router-store": "^21.0.1",
|
||||
"@ngrx/store": "^21.0.1",
|
||||
"ngrx-store-localstorage": "^20.1.0",
|
||||
"tassign": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"dist/common-map3d": {
|
||||
"name": "@farmmaps/common-map3d",
|
||||
"version": "4.20.0-prerelease.2615",
|
||||
"version": "4.22.0-prerelease.2620",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"cesium": "^1.97.0",
|
||||
"ol-cesium": ">=2.13.0"
|
||||
}
|
||||
},
|
||||
"dist/ng-openlayers": {
|
||||
"name": "@farmmaps/ng-openlayers",
|
||||
"version": "4.20.0-prerelease.2615",
|
||||
"version": "18.0.0",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"ol": "^8.2.0"
|
||||
}
|
||||
},
|
||||
@@ -10172,9 +10172,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "2.6.12",
|
||||
"version": "3.48.0",
|
||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/core-js/-/core-js-3.48.0.tgz",
|
||||
"integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT"
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/core-js"
|
||||
}
|
||||
},
|
||||
"node_modules/core-js-compat": {
|
||||
"version": "3.47.0",
|
||||
|
||||
88
package.json
88
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "farmmaps-lib-app",
|
||||
"version": "4.20.0",
|
||||
"scripts": {
|
||||
"version": "4.22.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
@@ -10,44 +10,44 @@
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"dependencies": {
|
||||
"@angular-eslint/eslint-plugin": "20.7.0",
|
||||
"@angular/animations": "21.1.0",
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/compiler": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/forms": "21.1.0",
|
||||
"@angular/platform-browser": "21.1.0",
|
||||
"@angular/platform-browser-dynamic": "21.1.0",
|
||||
"@angular/router": "21.1.0",
|
||||
"@angular/animations": "^21.1.0",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/compiler": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"@angular/forms": "^21.1.0",
|
||||
"@angular/platform-browser": "^21.1.0",
|
||||
"@angular/platform-browser-dynamic": "^21.1.0",
|
||||
"@angular/router": "^21.1.0",
|
||||
"@farmmaps/common": "file:dist/common",
|
||||
"@farmmaps/common-map": "file:dist/common-map",
|
||||
"@farmmaps/common-map3d": "file:dist/common-map3d",
|
||||
"@farmmaps/ng-openlayers": "file:dist/ng-openlayers",
|
||||
"@microsoft/signalr": "10.0.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "20.0.0",
|
||||
"@ngrx/effects": "21.0.1",
|
||||
"@ngrx/router-store": "21.0.1",
|
||||
"@ngrx/store": "21.0.1",
|
||||
"@microsoft/signalr": "^10.0.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "^20.0.0",
|
||||
"@ngrx/effects": "^21.0.1",
|
||||
"@ngrx/router-store": "^21.0.1",
|
||||
"@ngrx/store": "^21.0.1",
|
||||
"@popperjs/core": "2.11.8",
|
||||
"angular-oauth2-oidc": "20.0.2",
|
||||
"assert": "2.1.0",
|
||||
"bootstrap": "5.3.8",
|
||||
"angular-oauth2-oidc": "^20.0.2",
|
||||
"assert": "^2.1.0",
|
||||
"bootstrap": "^5.3.8",
|
||||
"browserify-zlib": "^0.2.0",
|
||||
"buffer": "^6.0.3",
|
||||
"cesium": "^1.97.0",
|
||||
"core-js": "^2.6.12",
|
||||
"core-js": "^3.48.0",
|
||||
"https-browserify": "^1.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"ngrx-store-localstorage": "20.1.0",
|
||||
"ngrx-store-localstorage": "^20.1.0",
|
||||
"ngx-avatars": "1.10.1",
|
||||
"ngx-clipboard": "^16.0.0",
|
||||
"ngx-image-cropper": "^7.0.0",
|
||||
"ngx-uploadx": "7.0.1",
|
||||
"ngx-uploadx": "^7.0.1",
|
||||
"ol": "^8.2.0",
|
||||
"olcs": "^2.13.1",
|
||||
"resumablejs": "^1.1.0",
|
||||
"rxjs": "^7.8.1",
|
||||
"rxjs": "^7.8.0",
|
||||
"stream": "^0.0.2",
|
||||
"stream-http": "^3.2.0",
|
||||
"tassign": "^1.0.0",
|
||||
@@ -56,43 +56,43 @@
|
||||
"util": "^0.12.4",
|
||||
"zone.js": "~0.15.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"optionalDependencies": {
|
||||
"@lmdb/lmdb-linux-x64": "^3.1.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "^4.21.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "21.0.3",
|
||||
"@angular-devkit/build-angular": "21.1.0",
|
||||
"@angular/build": "21.1.0",
|
||||
"@angular/cli": "21.1.0",
|
||||
"@angular/compiler-cli": "21.1.0",
|
||||
"@angular/language-service": "21.1.0",
|
||||
"@angular/localize": "21.1.0",
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^21.0.3",
|
||||
"@angular-devkit/build-angular": "^21.1.0",
|
||||
"@angular/build": "^21.1.0",
|
||||
"@angular/cli": "^21.1.0",
|
||||
"@angular/compiler-cli": "^21.1.0",
|
||||
"@angular/language-service": "^21.1.0",
|
||||
"@angular/localize": "^21.1.0",
|
||||
"@types/arcgis-rest-api": "^10.4.5",
|
||||
"@types/node": "^22.5.4",
|
||||
"@typescript-eslint/eslint-plugin": "8.53.1",
|
||||
"@typescript-eslint/parser": "8.53.1",
|
||||
"@vitest/browser": "4.0.17",
|
||||
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
||||
"@typescript-eslint/parser": "^8.53.1",
|
||||
"@vitest/browser": "^4.0.17",
|
||||
"@vitest/browser-playwright": "^4.0.17",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-import": "2.32.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"jsdom": "^27.4.0",
|
||||
"ng-packagr": "21.1.0",
|
||||
"ng-packagr": "^21.1.0",
|
||||
"ts-node": "^8.8.1",
|
||||
"typescript": "~5.9.3",
|
||||
"vitest": "4.0.17"
|
||||
"vitest": "^4.0.17"
|
||||
},
|
||||
"overrides": {
|
||||
"ngrx-store-localstorage": {
|
||||
"overrides": {
|
||||
"ngrx-store-localstorage": {
|
||||
"@angular/common": "$@angular/common",
|
||||
"@angular/core": "$@angular/core"
|
||||
},
|
||||
"ngx-avatars": {
|
||||
"ngx-avatars": {
|
||||
"@angular/common": "$@angular/common",
|
||||
"@angular/core": "$@angular/core"
|
||||
},
|
||||
"ngx-uploadx": {
|
||||
"ngx-uploadx": {
|
||||
"@angular/common": "$@angular/common",
|
||||
"@angular/core": "$@angular/core"
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "21.1.0",
|
||||
"ngrx-store-localstorage": "20.1.0",
|
||||
"@ngrx/effects": "21.0.1",
|
||||
"@ngrx/router-store": "21.0.1",
|
||||
"@ngrx/store": "21.0.1",
|
||||
"@angular/core": "^21.1.0",
|
||||
"ngrx-store-localstorage": "^20.1.0",
|
||||
"@ngrx/effects": "^21.0.1",
|
||||
"@ngrx/router-store": "^21.0.1",
|
||||
"@ngrx/store": "^21.0.1",
|
||||
"tassign": "^1.0.0"
|
||||
},
|
||||
"overrides": {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"cesium": "^1.97.0",
|
||||
"ol-cesium": ">=2.13.0"
|
||||
}
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ng-bootstrap/ng-bootstrap": "^20.0.0",
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/forms": "21.1.0",
|
||||
"@ngrx/effects": "21.0.1",
|
||||
"@ngrx/router-store": "21.0.1",
|
||||
"@ngrx/store": "21.0.1",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"@angular/forms": "^21.1.0",
|
||||
"@ngrx/effects": "^21.0.1",
|
||||
"@ngrx/router-store": "^21.0.1",
|
||||
"@ngrx/store": "^21.0.1",
|
||||
"tassign": "^1.0.0",
|
||||
"bootstrap": "^5.3.3",
|
||||
"@microsoft/signalr": "10.0.0",
|
||||
"ngx-uploadx": "7.0.1",
|
||||
"angular-oauth2-oidc": "20.0.2",
|
||||
"@microsoft/signalr": "^10.0.0",
|
||||
"ngx-uploadx": "^7.0.1",
|
||||
"angular-oauth2-oidc": "^20.0.2",
|
||||
"moment": "^2.29.4",
|
||||
"ngx-avatars": "1.10.1",
|
||||
"ngx-avatars": "^1.10.1",
|
||||
"ngx-image-cropper": "^7.0.0",
|
||||
"ngx-clipboard": "^16.0.0"
|
||||
}
|
||||
|
||||
@@ -38,7 +38,10 @@ import { PackageService } from './services/package.service';
|
||||
import { PackagePreloadStrategy } from './services/package-preload-strategy.service';
|
||||
import { SenmlService } from './services/senml-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 {
|
||||
FolderService,
|
||||
@@ -69,7 +72,10 @@ export {
|
||||
SenmlService,
|
||||
PackagePreloadStrategy,
|
||||
DeviceService,
|
||||
GradientService
|
||||
GradientService,
|
||||
UserDataService,
|
||||
CacheService,
|
||||
SharedItemService
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -61,6 +61,9 @@ import { IItemTask, ItemTask } from './models/itemTask';
|
||||
import { IJsonline } from './models/json-line';
|
||||
import { IListItem } from './models/list.item';
|
||||
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 { ISenMLItem } from './models/senml-item';
|
||||
import { ITypeaheadItem } from './models/typeahead.item';
|
||||
@@ -79,6 +82,7 @@ export {
|
||||
commonReducers, EditImageModalComponent,
|
||||
GradientComponent,
|
||||
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,
|
||||
NotImplementedComponent, PackageExistsDirective, ResumableFileUploadComponent, SafePipe, SecureOAuthStorage, SessionClearedComponent, SidePanelComponent, TagInputComponent, ThumbnailComponent, TimespanComponent, UserMenuComponent, WeatherCurrentObservation
|
||||
};
|
||||
|
||||
9
projects/common/src/fm/models/acl.rights.ts
Normal file
9
projects/common/src/fm/models/acl.rights.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export interface IAclRights {
|
||||
id?: number,
|
||||
claim: any,
|
||||
expires: Date,
|
||||
rights: number,
|
||||
owner: any,
|
||||
deep: boolean
|
||||
}
|
||||
|
||||
6
projects/common/src/fm/models/list.item.acl.rights.ts
Normal file
6
projects/common/src/fm/models/list.item.acl.rights.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { IAclRights } from './acl.rights';
|
||||
import { IItem } from './item';
|
||||
|
||||
export interface IListItemAclRights extends IItem {
|
||||
aclRights: IAclRights[]
|
||||
}
|
||||
13
projects/common/src/fm/models/shared.item.ts
Normal file
13
projects/common/src/fm/models/shared.item.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { IUser } from "./user";
|
||||
|
||||
export interface ISharedItem {
|
||||
code: string,
|
||||
name: string,
|
||||
type: string,
|
||||
sharedToUser: IUser,
|
||||
rights: Date,
|
||||
expires: Date,
|
||||
dataDate: Date,
|
||||
childItems: ISharedItem[]
|
||||
}
|
||||
|
||||
45
projects/common/src/fm/services/cache-service.ts
Normal file
45
projects/common/src/fm/services/cache-service.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
74
projects/common/src/fm/services/shared.item.service.ts
Normal file
74
projects/common/src/fm/services/shared.item.service.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
35
projects/common/src/fm/services/user-data.service.ts
Normal file
35
projects/common/src/fm/services/user-data.service.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
24
projects/ng-openlayers/package-lock.json
generated
24
projects/ng-openlayers/package-lock.json
generated
@@ -12,15 +12,15 @@
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "20.3.16",
|
||||
"@angular/core": "20.3.16",
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"ol": "^8.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/common": {
|
||||
"version": "20.3.16",
|
||||
"resolved": "https://registry.npmjs.org/@angular/common/-/common-20.3.16.tgz",
|
||||
"integrity": "sha512-GRAziNlntwdnJy3F+8zCOvDdy7id0gITjDnM6P9+n2lXvtDuBLGJKU3DWBbvxcCjtD6JK/g/rEX5fbCxbUHkQQ==",
|
||||
"version": "21.1.0",
|
||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@angular/common/-/common-21.1.0.tgz",
|
||||
"integrity": "sha512-hL3Chp51TU9iBcIfkNtoBS1wuseP1gsyDW2IFtK5HUpAVhbso9B3fdCaDTFkU98A2unluo2YgzI6D/6IS6N+1g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
@@ -30,14 +30,14 @@
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "20.3.16",
|
||||
"@angular/core": "21.1.0",
|
||||
"rxjs": "^6.5.3 || ^7.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@angular/core": {
|
||||
"version": "20.3.16",
|
||||
"resolved": "https://registry.npmjs.org/@angular/core/-/core-20.3.16.tgz",
|
||||
"integrity": "sha512-KSFPKvOmWWLCJBbEO+CuRUXfecX2FRuO0jNi9c54ptXMOPHlK1lIojUnyXmMNzjdHgRug8ci9qDuftvC2B7MKg==",
|
||||
"version": "21.1.0",
|
||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@angular/core/-/core-21.1.0.tgz",
|
||||
"integrity": "sha512-QTl9s8GYNN0pt1k3GE6UVlfe6zWtfdykhfchinKq2YJywQ6LBM4UcZgoc56YkgscmyrRFYrr4JYUJjlzTF57+A==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
@@ -47,9 +47,9 @@
|
||||
"node": "^20.19.0 || ^22.12.0 || >=24.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/compiler": "20.3.16",
|
||||
"@angular/compiler": "21.1.0",
|
||||
"rxjs": "^6.5.3 || ^7.4.0",
|
||||
"zone.js": "~0.15.0"
|
||||
"zone.js": "~0.15.0 || ~0.16.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@angular/compiler": {
|
||||
@@ -256,7 +256,7 @@
|
||||
},
|
||||
"node_modules/rxjs": {
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/rxjs/-/rxjs-7.8.2.tgz",
|
||||
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "21.1.0",
|
||||
"@angular/core": "21.1.0",
|
||||
"@angular/common": "^21.1.0",
|
||||
"@angular/core": "^21.1.0",
|
||||
"ol": "^8.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user