Compare commits
20 Commits
develop
...
3550740542
Author | SHA1 | Date | |
---|---|---|---|
|
3550740542 | ||
|
b9d61a55f6 | ||
c10cdf809b | |||
b90bb25ae7 | |||
|
67e7223479 | ||
7f37363486 | |||
28c6182224 | |||
|
d601418eea | ||
39c15d6519 | |||
ea7e9584ab | |||
642a773d26 | |||
|
4f78c67f30 | ||
1d7f56dee3 | |||
7fd440f63e | |||
206409513b | |||
|
1c6907339a | ||
25b180df49 | |||
83739ee4e9 | |||
|
1c3f5600f8 | ||
84a1a04b19 |
@@ -18,5 +18,6 @@ module.exports = {
|
|||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
This is a sample FarmMaps client in Angular 7.x.
|
This is a sample FarmMaps client in Angular 7.x.
|
||||||
|
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
Use one of the two options below to get started.
|
Use one of the two options below to get started.
|
||||||
|
47
angular.json
47
angular.json
@@ -209,11 +209,11 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "projects/common-map/tsconfig.lib.json",
|
"tsConfig": "projects/common-map/tsconfig.lib.json",
|
||||||
"project": "projects/common-map/ng-package.json"
|
"project": "projects/common-map/ng-package.json"
|
||||||
},
|
}
|
||||||
"configurations": {
|
, "configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/common-map/tsconfig.lib.prod.json"
|
"tsConfig": "projects/common-map/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
@@ -253,43 +253,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"ng-openlayers": {
|
|
||||||
"projectType": "library",
|
|
||||||
"root": "projects/ng-openlayers",
|
|
||||||
"sourceRoot": "projects/ng-openlayers/src",
|
|
||||||
"prefix": "ng-openlayers",
|
|
||||||
"architect": {
|
|
||||||
"build": {
|
|
||||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": "projects/ng-openlayers/tsconfig.lib.json",
|
|
||||||
"project": "projects/ng-openlayers/ng-package.json"
|
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"tsConfig": "projects/ng-openlayers/tsconfig.lib.prod.json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"test": {
|
|
||||||
"builder": "@angular-devkit/build-angular:karma",
|
|
||||||
"options": {
|
|
||||||
"main": "projects/ng-openlayers/src/test.ts",
|
|
||||||
"tsConfig": "projects/ng-openlayers/tsconfig.spec.json",
|
|
||||||
"karmaConfig": "projects/ng-openlayers/karma.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-eslint/builder:lint",
|
|
||||||
"options": {
|
|
||||||
"lintFilePatterns": [
|
|
||||||
"projects/ng-openlayers/**/*.ts",
|
|
||||||
"projects/ng-openlayers/**/*.html"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"cli": {
|
"cli": {
|
||||||
|
23225
package-lock.json
generated
23225
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
72
package.json
72
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "4.18.0",
|
"version": "4.5.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
@@ -10,39 +10,39 @@
|
|||||||
"e2e": "ng e2e"
|
"e2e": "ng e2e"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-eslint/eslint-plugin": "^18.2.0",
|
"@angular/animations": "^17.3.3",
|
||||||
"@angular/animations": "18.2.3",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/common": "18.2.3",
|
"@angular/compiler": "^17.3.3",
|
||||||
"@angular/compiler": "18.2.3",
|
"@angular/core": "^17.3.3",
|
||||||
"@angular/core": "18.2.3",
|
"@angular-eslint/eslint-plugin": "^15.2.1",
|
||||||
"@angular/forms": "18.2.3",
|
"@angular/forms": "^17.3.3",
|
||||||
"@angular/platform-browser": "18.2.3",
|
"@angular/platform-browser": "^17.3.3",
|
||||||
"@angular/platform-browser-dynamic": "18.2.3",
|
"@angular/platform-browser-dynamic": "^17.3.3",
|
||||||
"@angular/router": "18.2.3",
|
"@angular/router": "^17.3.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",
|
"ng-openlayers": "17.1.3",
|
||||||
"@microsoft/signalr": "^3.1.16",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
|
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
|
||||||
"@ngrx/effects": "^18.0.2",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": "^18.0.2",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": "^18.0.2",
|
"@ngrx/store": "^17",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.6",
|
||||||
"angular-oauth2-oidc": "^17.0.2",
|
"angular-oauth2-oidc": "^13",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"bootstrap": "^5.3.3",
|
"bootstrap": "^5.2.0",
|
||||||
"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": "^2.6.12",
|
"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": "^18.0.0",
|
"ngrx-store-localstorage": "17.0.0",
|
||||||
"ngx-avatars": "^1.8.0",
|
"ngx-avatars": "1.7.0",
|
||||||
"ngx-clipboard": "^16.0.0",
|
"ngx-clipboard": "16.0.0",
|
||||||
"ngx-image-cropper": "^7.0.0",
|
"ngx-image-cropper": "^7.2.1",
|
||||||
"ngx-uploadx": "^6.2.0",
|
"ngx-uploadx": "^6.2.0",
|
||||||
"ol": "^8.2.0",
|
"ol": "^8.2.0",
|
||||||
"olcs": "^2.13.1",
|
"olcs": "^2.13.1",
|
||||||
@@ -54,23 +54,19 @@
|
|||||||
"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.14.10"
|
"zone.js": "~0.14.4"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"devDependencies": {
|
||||||
"@lmdb/lmdb-linux-x64": "^3.1.0",
|
"@angular-builders/custom-webpack": "^17",
|
||||||
"@rollup/rollup-linux-x64-gnu": "^4.21.2"
|
"@angular-devkit/build-angular": "^17.3.3",
|
||||||
},
|
"@angular/cli": "^17.3.3",
|
||||||
"devDependencies": {
|
"@angular/compiler-cli": "^17.3.3",
|
||||||
"@angular-builders/custom-webpack": "^18.0.0",
|
"@angular/language-service": "^17.3.3",
|
||||||
"@angular-devkit/build-angular": "18.2.3",
|
"@angular/localize": "^17.3.3",
|
||||||
"@angular/cli": "18.2.3",
|
|
||||||
"@angular/compiler-cli": "18.2.3",
|
|
||||||
"@angular/language-service": "18.2.3",
|
|
||||||
"@angular/localize": "18.2.3",
|
|
||||||
"@types/arcgis-rest-api": "^10.4.5",
|
"@types/arcgis-rest-api": "^10.4.5",
|
||||||
"@types/jasmine": "~2.8.8",
|
"@types/jasmine": "~2.8.8",
|
||||||
"@types/jasminewd2": "^2.0.9",
|
"@types/jasminewd2": "^2.0.9",
|
||||||
"@types/node": "^22.5.4",
|
"@types/node": "^18.11.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||||
"@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
|
"@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
|
||||||
"@typescript-eslint/parser": "^6.18.0",
|
"@typescript-eslint/parser": "^6.18.0",
|
||||||
@@ -85,7 +81,7 @@
|
|||||||
"karma-coverage-istanbul-reporter": "^3.0.3",
|
"karma-coverage-istanbul-reporter": "^3.0.3",
|
||||||
"karma-jasmine": "^5.1.0",
|
"karma-jasmine": "^5.1.0",
|
||||||
"karma-jasmine-html-reporter": "^2.0.0",
|
"karma-jasmine-html-reporter": "^2.0.0",
|
||||||
"ng-packagr": "^18.2.1",
|
"ng-packagr": "^17.3.0",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"ts-node": "^8.8.1",
|
"ts-node": "^8.8.1",
|
||||||
"typescript": "~5.4.4"
|
"typescript": "~5.4.4"
|
||||||
|
@@ -18,5 +18,6 @@ module.exports = {
|
|||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
207
projects/common-map/package-lock.json
generated
207
projects/common-map/package-lock.json
generated
@@ -11,207 +11,20 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": "^18.2.3",
|
"@angular/core": "^17.3.3",
|
||||||
"@ngrx/effects": "^18.0.2",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": "^18.0.2",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": "^18.0.2",
|
"@ngrx/store": "^17",
|
||||||
"ngrx-store-localstorage": "^18",
|
"ng-openlayers": "17.1.3",
|
||||||
|
"ngrx-store-localstorage": "^17",
|
||||||
|
"ol": "^8.2.0",
|
||||||
"tassign": "^1.0.0"
|
"tassign": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../../dist/libs/ng-openlayers": {
|
|
||||||
"version": "18.0.0",
|
|
||||||
"extraneous": true,
|
|
||||||
"license": "MPL-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": "^18.2.3",
|
|
||||||
"@angular/core": "^18.2.3",
|
|
||||||
"ol": "^8.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dist/ng-openlayers": {
|
|
||||||
"extraneous": true
|
|
||||||
},
|
|
||||||
"node_modules/@angular/common": {
|
|
||||||
"version": "18.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/common/-/common-18.2.3.tgz",
|
|
||||||
"integrity": "sha512-NFL4yXXImSCH7i1xnHykUjHa9vl9827fGiwSV2mnf7LjSUsyDzFD8/54dNuYN9OY8AUD+PnK0YdNro6cczVyIA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/core": "18.2.3",
|
|
||||||
"rxjs": "^6.5.3 || ^7.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@angular/core": {
|
|
||||||
"version": "18.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/core/-/core-18.2.3.tgz",
|
|
||||||
"integrity": "sha512-VGhMJxj7d0rYpqVfQrcGRB7EE/BCziotft/I/YPl6bOMPSAvMukG7DXQuJdYpNrr62ks78mlzHlZX/cdmB9Prw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"rxjs": "^6.5.3 || ^7.4.0",
|
|
||||||
"zone.js": "~0.14.10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@angular/platform-browser": {
|
|
||||||
"version": "18.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-18.2.3.tgz",
|
|
||||||
"integrity": "sha512-M2ob4zN7tAcL2mx7U6KnZNqNFPFl9MlPBE0FrjQjIzAjU0wSYPIJXmaPu9aMUp9niyo+He5iX98I+URi2Yc99g==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/animations": "18.2.3",
|
|
||||||
"@angular/common": "18.2.3",
|
|
||||||
"@angular/core": "18.2.3"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"@angular/animations": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@angular/router": {
|
|
||||||
"version": "18.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/router/-/router-18.2.3.tgz",
|
|
||||||
"integrity": "sha512-fvD9eSDIiIbeYoUokoWkXzu7/ZaxlzKPUHFqX1JuKuH5ciQDeT/d7lp4mj31Bxammhohzi3+z12THJYsCkj/iQ==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": "18.2.3",
|
|
||||||
"@angular/core": "18.2.3",
|
|
||||||
"@angular/platform-browser": "18.2.3",
|
|
||||||
"rxjs": "^6.5.3 || ^7.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@ngrx/effects": {
|
|
||||||
"version": "18.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-18.0.2.tgz",
|
|
||||||
"integrity": "sha512-YojXcOD9Lsq4kl2HCjENccyUM/mOlgBdtddsg9j/ojzSUgu3ZuBVKLN3atrL2TJYkbMX1MN0RzafSkL3TPGFIA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@ngrx/operators": "18.0.1",
|
|
||||||
"tslib": "^2.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/core": "^18.0.0",
|
|
||||||
"@ngrx/store": "18.0.2",
|
|
||||||
"rxjs": "^6.5.3 || ^7.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@ngrx/operators": {
|
|
||||||
"version": "18.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@ngrx/operators/-/operators-18.0.1.tgz",
|
|
||||||
"integrity": "sha512-M+QMrHNKgcuiLaRGZxJ4aQi5/OCRfKC4+T/63dsHyLFZ53/FFpF6a/ytSO1Q+tzOplZ5o99S+i8FVaZqNQ3LmQ==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"rxjs": "^6.5.3 || ^7.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@ngrx/router-store": {
|
|
||||||
"version": "18.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@ngrx/router-store/-/router-store-18.0.2.tgz",
|
|
||||||
"integrity": "sha512-jUrQ/uJJ53x8O1XbN2YxH2GpRREZlwS5gRxlCoc4fWL4Us/uS1/K6+QfRmKBPtpTKBIixqsOb+dIUV5iwBrivA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": "^18.0.0",
|
|
||||||
"@angular/core": "^18.0.0",
|
|
||||||
"@angular/router": "^18.0.0",
|
|
||||||
"@ngrx/store": "18.0.2",
|
|
||||||
"rxjs": "^6.5.3 || ^7.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@ngrx/store": {
|
|
||||||
"version": "18.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@ngrx/store/-/store-18.0.2.tgz",
|
|
||||||
"integrity": "sha512-ajwv0+njsO4vzArp9esnFvs1wyUb1U1W8E8LSCKrcW2hWWo9o1Pezj+JRsdQwatxHfrrPFuTDyajsl6GQM/JSA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/core": "^18.0.0",
|
|
||||||
"rxjs": "^6.5.3 || ^7.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/deepmerge": {
|
|
||||||
"version": "4.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
|
||||||
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ngrx-store-localstorage": {
|
|
||||||
"version": "18.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ngrx-store-localstorage/-/ngrx-store-localstorage-18.0.0.tgz",
|
|
||||||
"integrity": "sha512-WoDePvMWiWF9LQHe+dTqbpm8lxoKCPoIvA0/1enIPTmdLQsOpdDKhMSD5YgwuqDusNfEik3QslProTFGyXZwtw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"deepmerge": "^4.2.2",
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": "^18.0.1",
|
|
||||||
"@angular/core": "^18.0.1",
|
|
||||||
"@ngrx/store": "^18.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/rxjs": {
|
|
||||||
"version": "7.8.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
|
||||||
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tassign": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tassign/-/tassign-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-k0Ti9f+A1R0BRdArEbiUHldd+A40kZ5qsiNSNk4czx61wkAoSZYjqkaQs0jC63AfgPdCXVPstDq2ZW5ZLRTCgw==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.7.0",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
|
||||||
"integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA=="
|
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
|
||||||
},
|
|
||||||
"node_modules/zone.js": {
|
|
||||||
"version": "0.14.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz",
|
|
||||||
"integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==",
|
|
||||||
"peer": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,11 +8,13 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": "18.2.3",
|
"@angular/core": "^17.3.3",
|
||||||
"ngrx-store-localstorage": "^18.0.0",
|
"ngrx-store-localstorage": "^17",
|
||||||
"@ngrx/effects": "^18.0.2",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": "^18.0.2",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": "^18.0.2",
|
"@ngrx/store": "^17",
|
||||||
"tassign": "^1.0.0"
|
"tassign": "^1.0.0",
|
||||||
|
"ng-openlayers": "17.1.3",
|
||||||
|
"ol": "^8.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,13 +1,12 @@
|
|||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { IMapState } from '../models/map.state';
|
import { IItem, IQueryState } from '@farmmaps/common';
|
||||||
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
|
import { Style } from 'ol/style';
|
||||||
import { IItemLayer } from '../models/item.layer';
|
import { IItemLayer } from '../models/item.layer';
|
||||||
import { ILayervalue } from '../models/layer.value';
|
import { ILayervalue } from '../models/layer.value';
|
||||||
import { IQueryState } from '@farmmaps/common';
|
import { IMapState } from '../models/map.state';
|
||||||
import { IItem } from '@farmmaps/common';
|
|
||||||
import { Feature } from 'ol';
|
|
||||||
import { Style } from 'ol/style';
|
|
||||||
import { Geometry } from 'ol/geom';
|
|
||||||
import { IPeriodState } from '../models/period.state';
|
import { IPeriodState } from '../models/period.state';
|
||||||
|
|
||||||
export const SETSTATE = '[Map] SetState';
|
export const SETSTATE = '[Map] SetState';
|
||||||
@@ -158,7 +157,7 @@ export class PreviousTemporal implements Action {
|
|||||||
export class SelectTemporal implements Action {
|
export class SelectTemporal implements Action {
|
||||||
readonly type = SELECTTEMPORAL;
|
readonly type = SELECTTEMPORAL;
|
||||||
|
|
||||||
constructor(item:IItem) { }
|
constructor() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AddFeatureSuccess implements Action {
|
export class AddFeatureSuccess implements Action {
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { MapComponent } from './components/map/map.component';
|
import { MapComponent } from './components/map/map.component';
|
||||||
import { AuthGuard } from '@farmmaps/common';
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
|
@@ -6,10 +6,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store';
|
import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store';
|
||||||
import { AngularOpenlayersModule } from '@farmmaps/ng-openlayers';
|
import { AngularOpenlayersModule } from 'ng-openlayers';
|
||||||
|
|
||||||
//common modules
|
//common modules
|
||||||
import { AppCommonModule } from '@farmmaps/common';
|
import { AppCommonModule, ItemTypeService } from '@farmmaps/common';
|
||||||
|
|
||||||
import * as mapActions from './actions/map.actions';
|
import * as mapActions from './actions/map.actions';
|
||||||
import * as mapEffects from './effects/map.effects';
|
import * as mapEffects from './effects/map.effects';
|
||||||
@@ -113,120 +113,120 @@ export {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
AngularOpenlayersModule,
|
AngularOpenlayersModule,
|
||||||
MapRoutingModule,
|
MapRoutingModule,
|
||||||
StoreModule.forFeature(MODULE_NAME, mapReducers.reducer, { metaReducers: metaReducers }),
|
StoreModule.forFeature(MODULE_NAME, mapReducers.reducer, { metaReducers: metaReducers }),
|
||||||
EffectsModule.forFeature([mapEffects.MapEffects]),
|
EffectsModule.forFeature([mapEffects.MapEffects]),
|
||||||
NgbModule,
|
NgbModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
AppCommonModule
|
AppCommonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ZoomToExtentComponent,
|
ZoomToExtentComponent,
|
||||||
ItemVectorSourceComponent,
|
ItemVectorSourceComponent,
|
||||||
ItemLayersComponent,
|
ItemLayersComponent,
|
||||||
FileDropTargetComponent,
|
FileDropTargetComponent,
|
||||||
MapComponent,
|
MapComponent,
|
||||||
MetaDataModalComponent,
|
MetaDataModalComponent,
|
||||||
RotationResetComponent,
|
RotationResetComponent,
|
||||||
MapSearchComponent,
|
MapSearchComponent,
|
||||||
SelectPeriodModalComponent,
|
SelectPeriodModalComponent,
|
||||||
LayerListComponent,
|
LayerListComponent,
|
||||||
LegendComponent,
|
LegendComponent,
|
||||||
LayerVectorImageComponent,
|
LayerVectorImageComponent,
|
||||||
FeatureListComponent,
|
FeatureListComponent,
|
||||||
WidgetHostDirective,
|
WidgetHostDirective,
|
||||||
FeatureListContainerComponent,
|
FeatureListContainerComponent,
|
||||||
FeatureListCroppingschemeComponent,
|
FeatureListCroppingschemeComponent,
|
||||||
FeatureListCropfieldComponent,
|
FeatureListCropfieldComponent,
|
||||||
FeatureListFeatureContainerComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
FeatureListFeatureComponent,
|
FeatureListFeatureComponent,
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
FeatureListFeatureCroppingschemeComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
FeatureListFeatureCropfieldComponent,
|
||||||
SelectedItemContainerComponent,
|
SelectedItemContainerComponent,
|
||||||
SelectedItemComponent,
|
SelectedItemComponent,
|
||||||
SelectedItemCropfieldComponent,
|
SelectedItemCropfieldComponent,
|
||||||
SelectedItemGeotiffComponent,
|
SelectedItemGeotiffComponent,
|
||||||
SelectedItemTemporalComponent,
|
SelectedItemTemporalComponent,
|
||||||
SelectedItemShapeComponent,
|
SelectedItemShapeComponent,
|
||||||
ItemListItemComponent,
|
ItemListItemComponent,
|
||||||
ItemListItemContainerComponent,
|
ItemListItemContainerComponent,
|
||||||
ItemListComponent,
|
ItemListComponent,
|
||||||
ItemWidgetListComponent,
|
ItemWidgetListComponent,
|
||||||
WidgetStatusComponent,
|
WidgetStatusComponent,
|
||||||
GpsLocation,
|
GpsLocation,
|
||||||
PanToLocation,
|
PanToLocation,
|
||||||
LayerSwitcher,
|
LayerSwitcher,
|
||||||
HistogramDetailsComponent,
|
HistogramDetailsComponent,
|
||||||
StatisticsDetailsComponent,
|
StatisticsDetailsComponent,
|
||||||
ifZoomToShowDirective,
|
ifZoomToShowDirective,
|
||||||
ZoomToShowAlert,
|
ZoomToShowAlert,
|
||||||
LayerValuesComponent,
|
LayerValuesComponent,
|
||||||
GeometryThumbnailComponent
|
GeometryThumbnailComponent
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
ItemVectorSourceComponent,
|
ItemVectorSourceComponent,
|
||||||
ItemLayersComponent,
|
ItemLayersComponent,
|
||||||
FileDropTargetComponent,
|
FileDropTargetComponent,
|
||||||
MetaDataModalComponent,
|
MetaDataModalComponent,
|
||||||
MapComponent,
|
MapComponent,
|
||||||
GpsLocation,
|
GpsLocation,
|
||||||
PanToLocation,
|
PanToLocation,
|
||||||
LayerSwitcher,
|
LayerSwitcher,
|
||||||
FeatureListFeatureComponent,
|
FeatureListFeatureComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
FeatureListFeatureCropfieldComponent,
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
FeatureListFeatureCroppingschemeComponent,
|
||||||
SelectedItemContainerComponent,
|
SelectedItemContainerComponent,
|
||||||
SelectedItemComponent,
|
SelectedItemComponent,
|
||||||
SelectedItemCropfieldComponent,
|
SelectedItemCropfieldComponent,
|
||||||
SelectedItemGeotiffComponent,
|
SelectedItemGeotiffComponent,
|
||||||
SelectedItemTemporalComponent,
|
SelectedItemTemporalComponent,
|
||||||
SelectedItemShapeComponent,
|
SelectedItemShapeComponent,
|
||||||
ItemListItemComponent,
|
ItemListItemComponent,
|
||||||
ItemListItemContainerComponent,
|
ItemListItemContainerComponent,
|
||||||
ItemListComponent,
|
ItemListComponent,
|
||||||
ItemWidgetListComponent,
|
ItemWidgetListComponent,
|
||||||
WidgetStatusComponent,
|
WidgetStatusComponent,
|
||||||
RotationResetComponent,
|
RotationResetComponent,
|
||||||
MapSearchComponent,
|
MapSearchComponent,
|
||||||
SelectPeriodModalComponent,
|
SelectPeriodModalComponent,
|
||||||
LayerListComponent,
|
LayerListComponent,
|
||||||
LegendComponent,
|
LegendComponent,
|
||||||
LayerVectorImageComponent,
|
LayerVectorImageComponent,
|
||||||
FeatureListComponent,
|
FeatureListComponent,
|
||||||
WidgetHostDirective,
|
WidgetHostDirective,
|
||||||
FeatureListContainerComponent,
|
FeatureListContainerComponent,
|
||||||
FeatureListCroppingschemeComponent,
|
FeatureListCroppingschemeComponent,
|
||||||
FeatureListCropfieldComponent,
|
FeatureListCropfieldComponent,
|
||||||
FeatureListFeatureContainerComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
ZoomToExtentComponent,
|
ZoomToExtentComponent,
|
||||||
ifZoomToShowDirective,
|
ifZoomToShowDirective,
|
||||||
ZoomToShowAlert,
|
ZoomToShowAlert,
|
||||||
GeometryThumbnailComponent
|
GeometryThumbnailComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
FeatureIconService,
|
FeatureIconService,
|
||||||
GeolocationService,
|
GeolocationService,
|
||||||
DeviceOrientationService,
|
DeviceOrientationService,
|
||||||
TemporalService,
|
TemporalService,
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
ItemTypeService,
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemTemporalComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemShapeComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemTemporalComponent, multi: true },
|
||||||
{ provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemShapeComponent, multi: true },
|
||||||
{ provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
|
{ provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
|
||||||
]
|
{ provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
export class AppCommonMapModule {
|
export class AppCommonMapModule {
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output, Inject } from '@angular/core';
|
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
import * as proj from 'ol/proj';
|
import { Feature } from 'ol';
|
||||||
import {Point,Geometry} from 'ol/geom';
|
|
||||||
import { GeoJSON } from 'ol/format';
|
import { GeoJSON } from 'ol/format';
|
||||||
import { Feature} from 'ol';
|
import { Geometry, Point } from 'ol/geom';
|
||||||
|
|
||||||
export interface IDroppedFile {
|
export interface IDroppedFile {
|
||||||
files: any,
|
files: any,
|
||||||
@@ -28,7 +27,6 @@ export class FileDropTargetComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.element = this.map.instance.getViewport();
|
this.element = this.map.instance.getViewport();
|
||||||
const other = this;
|
|
||||||
this.element.addEventListener('drop', this.onDrop, false);
|
this.element.addEventListener('drop', this.onDrop, false);
|
||||||
this.element.addEventListener('dragover', this.preventDefault, false);
|
this.element.addEventListener('dragover', this.preventDefault, false);
|
||||||
this.element.addEventListener('dragenter', this.preventDefault, false);
|
this.element.addEventListener('dragenter', this.preventDefault, false);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges ,Host} from '@angular/core';
|
import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';
|
||||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import Overlay from 'ol/Overlay';
|
import Overlay from 'ol/Overlay';
|
||||||
import { fromLonLat, toLonLat } from 'ol/proj';
|
import { fromLonLat } from 'ol/proj';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -1,25 +1,21 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { LayerGroupComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
import { AppConfig, IItem, ItemService } from '@farmmaps/common';
|
||||||
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
import { LayerGroupComponent, MapComponent } from 'ng-openlayers';
|
||||||
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
|
||||||
import { ILayerData} from '../../../models/layer.data';
|
|
||||||
import { IRenderoutputTiles,IRenderoutputImage,IGradientstop,ILayer,IHistogram,IColor} from '../../../models/color.map';
|
|
||||||
import {Extent} from 'ol/extent';
|
|
||||||
import Projection from 'ol/proj/Projection';
|
|
||||||
import * as proj from 'ol/proj';
|
|
||||||
import * as loadingstrategy from 'ol/loadingstrategy';
|
|
||||||
import * as style from 'ol/style';
|
|
||||||
import {Tile,Layer,Image} from 'ol/layer';
|
|
||||||
import {XYZ,ImageStatic,OSM,BingMaps,TileWMS,TileArcGISRest,TileJSON,Source} from 'ol/source';
|
|
||||||
import {Vector as VectorSource} from 'ol/source';
|
|
||||||
import { Vector as VectorLayer } from 'ol/layer';
|
|
||||||
import { VectorImage as VectorImageLayer } from 'ol/layer';
|
|
||||||
import VectorTileSource from 'ol/source/VectorTile';
|
|
||||||
import VectorTileLayer from 'ol/layer/VectorTile';
|
|
||||||
import {GeoJSON,MVT} from 'ol/format';
|
|
||||||
import { Geometry } from 'ol/geom';
|
|
||||||
import BaseLayer from 'ol/layer/Base';
|
|
||||||
import Feature from 'ol/Feature';
|
import Feature from 'ol/Feature';
|
||||||
|
import { Extent } from 'ol/extent';
|
||||||
|
import { GeoJSON, MVT } from 'ol/format';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
|
import { Image, Layer, Tile, VectorImage as VectorImageLayer, Vector as VectorLayer } from 'ol/layer';
|
||||||
|
import VectorTileLayer from 'ol/layer/VectorTile';
|
||||||
|
import * as loadingstrategy from 'ol/loadingstrategy';
|
||||||
|
import * as proj from 'ol/proj';
|
||||||
|
import Projection from 'ol/proj/Projection';
|
||||||
|
import { BingMaps, ImageStatic, OSM, Source, TileArcGISRest, TileJSON, TileWMS, Vector as VectorSource, XYZ } from 'ol/source';
|
||||||
|
import VectorTileSource from 'ol/source/VectorTile';
|
||||||
|
import * as style from 'ol/style';
|
||||||
|
import { IColor, IGradientstop, IHistogram, ILayer, IRenderoutputImage, IRenderoutputTiles } from '../../../models/color.map';
|
||||||
|
import { IItemLayer, ITemporalItemLayer } from '../../../models/item.layer';
|
||||||
|
import { ILayerData } from '../../../models/layer.data';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-item-layers',
|
selector: 'fm-map-item-layers',
|
||||||
@@ -94,7 +90,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
getColor(item: IItem, layer: ILayer, feature): style.Style {
|
getColor(item: IItem, layer: any, feature): style.Style {
|
||||||
const value = layer.indexKey ? feature.get(layer.indexKey) : feature.get(layer.name);
|
const value = layer.indexKey ? feature.get(layer.indexKey) : feature.get(layer.name);
|
||||||
const key = item.code + "_" + value;
|
const key = item.code + "_" + value;
|
||||||
if (!this.styleCache[key]) {
|
if (!this.styleCache[key]) {
|
||||||
@@ -153,7 +149,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
const data = item.data;
|
const data = item.data;
|
||||||
const l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
const l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
||||||
if (l && l.rendering && l.rendering.renderoutputType == "VectorTiles") {
|
if (l && l.rendering && l.rendering.renderoutputType == "VectorTiles") {
|
||||||
var rt = l.rendering as IRenderoutputTiles;
|
const rt = l.rendering as IRenderoutputTiles;
|
||||||
layer = new VectorTileLayer({
|
layer = new VectorTileLayer({
|
||||||
declutter: true,
|
declutter: true,
|
||||||
source: new VectorTileSource({
|
source: new VectorTileSource({
|
||||||
@@ -167,7 +163,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (l && l.rendering && l.rendering.renderoutputType == "Tiles") {
|
} else if (l && l.rendering && l.rendering.renderoutputType == "Tiles") {
|
||||||
var rt = l.rendering as IRenderoutputTiles;
|
const rt = l.rendering as IRenderoutputTiles;
|
||||||
layer = new Tile({
|
layer = new Tile({
|
||||||
source: new XYZ({
|
source: new XYZ({
|
||||||
maxZoom: rt.maxzoom,
|
maxZoom: rt.maxzoom,
|
||||||
@@ -176,11 +172,12 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||||
const __this = this;
|
const __this = this;
|
||||||
const format = new GeoJSON();
|
const format = new GeoJSON();
|
||||||
const source = new VectorSource({
|
const source = new VectorSource({
|
||||||
strategy: loadingstrategy.bbox,
|
strategy: loadingstrategy.bbox,
|
||||||
loader: function (extent: Extent, resolution: number, projection: Projection) {
|
loader: function (extent: Extent, _resolution: number, projection: Projection) {
|
||||||
const source = this as VectorSource<Feature<Geometry>>;
|
const source = this as VectorSource<Feature<Geometry>>;
|
||||||
__this.itemService.getItemFeatures(item.code, extent, projection.getCode(), layerIndex).subscribe(function (data) {
|
__this.itemService.getItemFeatures(item.code, extent, projection.getCode(), layerIndex).subscribe(function (data) {
|
||||||
const features = format.readFeatures(data).filter(feature => feature instanceof Feature) as Feature[];
|
const features = format.readFeatures(data).filter(feature => feature instanceof Feature) as Feature[];
|
||||||
@@ -237,7 +234,6 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
|
|
||||||
createSelectionLayer(itemLayer:IItemLayer):Layer<Source> {
|
createSelectionLayer(itemLayer:IItemLayer):Layer<Source> {
|
||||||
let layerIndex = -1;
|
let layerIndex = -1;
|
||||||
const layer: Layer<Source> = null;
|
|
||||||
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : itemLayer.item.data.layers[0].index;
|
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : itemLayer.item.data.layers[0].index;
|
||||||
const data = itemLayer.item.data;
|
const data = itemLayer.item.data;
|
||||||
const l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
const l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
||||||
@@ -265,7 +261,8 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
createExternalLayer(item:IItem,itemLayer:IItemLayer):Layer<Source> {
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
createExternalLayer(item:IItem,_itemLayer:IItemLayer):Layer<Source> {
|
||||||
const data = item.data as ILayerData;
|
const data = item.data as ILayerData;
|
||||||
let layer: Layer<Source> = null;
|
let layer: Layer<Source> = null;
|
||||||
switch (data.interfaceType) {
|
switch (data.interfaceType) {
|
||||||
@@ -319,7 +316,6 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
|
|
||||||
createLayer(itemLayer: IItemLayer): Layer<Source> {
|
createLayer(itemLayer: IItemLayer): Layer<Source> {
|
||||||
let layer: Layer<Source> = null;
|
let layer: Layer<Source> = null;
|
||||||
const layerIndex = -1;
|
|
||||||
if (itemLayer.item.itemType == 'vnd.farmmaps.itemtype.geotiff.processed') {
|
if (itemLayer.item.itemType == 'vnd.farmmaps.itemtype.geotiff.processed') {
|
||||||
layer = this.createGeotiffLayer(itemLayer.item,itemLayer);
|
layer = this.createGeotiffLayer(itemLayer.item,itemLayer);
|
||||||
} else if (itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
|
} else if (itemLayer.item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
|
||||||
@@ -379,10 +375,6 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
if(this.topLayerPrerenderEventhandlerInstalled && this.onPrerender.observers.length > 0 )
|
if(this.topLayerPrerenderEventhandlerInstalled && this.onPrerender.observers.length > 0 )
|
||||||
{
|
{
|
||||||
if(this.instance.getVisible()) {
|
if(this.instance.getVisible()) {
|
||||||
const olLayers = this.instance.getLayers().getArray().forEach((l:any) => {
|
|
||||||
l.un('prerender',this.topLayerPrerenderEventhandler);
|
|
||||||
l.un('postrender',this.topLayerPostrenderEventhandler);
|
|
||||||
});
|
|
||||||
this.topLayerPrerenderEventhandlerInstalled = false;
|
this.topLayerPrerenderEventhandlerInstalled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -415,17 +407,15 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
|
|
||||||
updateLayers(itemLayers: IItemLayer[] | IItemLayer) {
|
updateLayers(itemLayers: IItemLayer[] | IItemLayer) {
|
||||||
this.unInstallTopLayerPrerenderEventhandler();
|
this.unInstallTopLayerPrerenderEventhandler();
|
||||||
let dataLayer = false;
|
|
||||||
let ils:IItemLayer[] = [];
|
let ils:IItemLayer[] = [];
|
||||||
if(Array.isArray(itemLayers)) {
|
if(Array.isArray(itemLayers)) {
|
||||||
ils = itemLayers;
|
ils = itemLayers;
|
||||||
} else {
|
} else {
|
||||||
dataLayer=true;
|
|
||||||
ils=[itemLayers];
|
ils=[itemLayers];
|
||||||
}
|
}
|
||||||
const newLayers: Layer<Source>[] = [];
|
const newLayers: Layer<Source>[] = [];
|
||||||
if (ils) {
|
if (ils) {
|
||||||
ils.forEach((itemLayer, index) => {
|
ils.forEach((itemLayer) => {
|
||||||
if(itemLayer.item.itemType == 'vnd.farmmaps.itemtype.temporal') {
|
if(itemLayer.item.itemType == 'vnd.farmmaps.itemtype.temporal') {
|
||||||
const il = itemLayer as ITemporalItemLayer;
|
const il = itemLayer as ITemporalItemLayer;
|
||||||
const previousLayer = this.addOrUpdateOlLayer(il.previousItemLayer,newLayers.length);
|
const previousLayer = this.addOrUpdateOlLayer(il.previousItemLayer,newLayers.length);
|
||||||
|
@@ -1,25 +1,22 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken, OnDestroy, LOCALE_ID } from '@angular/core';
|
import { Component, EventEmitter, Host, Inject, Input, LOCALE_ID, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
import { FolderService, IItem, ItemService, ItemTypeService } from '@farmmaps/common';
|
||||||
import { ItemService, ItemTypeService, IItem, IItemType, FolderService } from '@farmmaps/common';
|
import { LayerVectorComponent, MapComponent, SourceVectorComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
import { Feature } from 'ol';
|
import { formatNumber } from '@angular/common';
|
||||||
import { Point, Geometry } from 'ol/geom';
|
import { Feature, MapBrowserEvent } from 'ol';
|
||||||
import { MapBrowserEvent } from 'ol';
|
|
||||||
import { Types } from 'ol/MapBrowserEventType';
|
|
||||||
import * as style from 'ol/style';
|
|
||||||
import * as color from 'ol/color';
|
import * as color from 'ol/color';
|
||||||
import * as loadingstrategy from 'ol/loadingstrategy';
|
|
||||||
import * as condition from 'ol/events/condition';
|
|
||||||
import * as extent from 'ol/extent';
|
import * as extent from 'ol/extent';
|
||||||
import { Vector, Cluster, Source } from 'ol/source';
|
import { getCenter } from 'ol/extent';
|
||||||
import { Layer } from 'ol/layer';
|
|
||||||
import { GeoJSON } from 'ol/format';
|
import { GeoJSON } from 'ol/format';
|
||||||
|
import { Geometry, Point } from 'ol/geom';
|
||||||
import { Select } from 'ol/interaction';
|
import { Select } from 'ol/interaction';
|
||||||
|
import { Layer } from 'ol/layer';
|
||||||
|
import * as loadingstrategy from 'ol/loadingstrategy';
|
||||||
|
import { Source, Vector } from 'ol/source';
|
||||||
|
import * as style from 'ol/style';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
import { IStyles } from '../../../models/style.cache';
|
import { IStyles } from '../../../models/style.cache';
|
||||||
import { FeatureIconService } from '../../../services/feature-icon.service';
|
import { FeatureIconService } from '../../../services/feature-icon.service';
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import { getCenter } from 'ol/extent';
|
|
||||||
import { formatNumber } from '@angular/common';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-item-source-vector',
|
selector: 'fm-map-item-source-vector',
|
||||||
@@ -30,10 +27,8 @@ import { formatNumber } from '@angular/common';
|
|||||||
})
|
})
|
||||||
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnDestroy, OnChanges {
|
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
instance: Vector<Feature<Geometry>>;
|
instance: Vector<Feature<Geometry>>;
|
||||||
private _format: GeoJSON;
|
|
||||||
private _select: Select;
|
private _select: Select;
|
||||||
private _hoverSelect: Select;
|
private _hoverSelect: Select;
|
||||||
private _iconScale = 0.05;
|
|
||||||
@Input() features: Array<Feature<Geometry>>;
|
@Input() features: Array<Feature<Geometry>>;
|
||||||
@Input() selectedFeature: Feature<Geometry>;
|
@Input() selectedFeature: Feature<Geometry>;
|
||||||
@Input() selectedItem: IItem;
|
@Input() selectedItem: IItem;
|
||||||
@@ -46,7 +41,6 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
|
|
||||||
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, private map: MapComponent, private itemTypeService: ItemTypeService, private featureIconService$: FeatureIconService, private folderService: FolderService, @Inject(LOCALE_ID) private locale: string) {
|
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, private map: MapComponent, private itemTypeService: ItemTypeService, private featureIconService$: FeatureIconService, private folderService: FolderService, @Inject(LOCALE_ID) private locale: string) {
|
||||||
super(layer);
|
super(layer);
|
||||||
this._format = new GeoJSON();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
geometry(feature: Feature<Geometry>) {
|
geometry(feature: Feature<Geometry>) {
|
||||||
@@ -204,6 +198,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
if (changes["styles"]) {
|
if (changes["styles"]) {
|
||||||
const styles = changes["styles"].currentValue;
|
const styles = changes["styles"].currentValue;
|
||||||
for (const key in styles) {
|
for (const key in styles) {
|
||||||
|
// eslint-disable-next-line no-prototype-builtins
|
||||||
if (styles.hasOwnProperty(key)) {
|
if (styles.hasOwnProperty(key)) {
|
||||||
this.stylesCache[key] = styles[key];
|
this.stylesCache[key] = styles[key];
|
||||||
}
|
}
|
||||||
|
@@ -1,17 +1,16 @@
|
|||||||
import { Component, OnInit, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
|
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||||
import { IItemLayer } from '../../../models/item.layer';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../../reducers/map.reducer';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import * as mapActions from '../../../actions/map.actions';
|
import { ClipboardService } from 'ngx-clipboard';
|
||||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
|
||||||
import { ILayervalue } from '../../../models/layer.value';
|
|
||||||
import { Observable, interval, Subject } from 'rxjs';
|
|
||||||
import { debounce, throttle } from 'rxjs/operators';
|
|
||||||
import { toLonLat } from 'ol/proj';
|
|
||||||
import { toStringHDMS } from 'ol/coordinate';
|
import { toStringHDMS } from 'ol/coordinate';
|
||||||
import { ClipboardService } from 'ngx-clipboard'
|
import { WKT } from 'ol/format';
|
||||||
import { GeoJSON, WKT } from 'ol/format';
|
|
||||||
import { Point } from 'ol/geom';
|
import { Point } from 'ol/geom';
|
||||||
|
import { toLonLat } from 'ol/proj';
|
||||||
|
import { Observable, Subject, interval } from 'rxjs';
|
||||||
|
import { throttle } from 'rxjs/operators';
|
||||||
|
import * as mapActions from '../../../actions/map.actions';
|
||||||
|
import { ILayervalue } from '../../../models/layer.value';
|
||||||
|
import * as mapReducers from '../../../reducers/map.reducer';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-layer-values',
|
selector: 'fm-map-layer-values',
|
||||||
@@ -45,7 +44,7 @@ export class LayerValuesComponent implements OnInit, AfterViewInit {
|
|||||||
this.map.instance.on('moveend', () => {
|
this.map.instance.on('moveend', () => {
|
||||||
this.moveEndSubject.next({});
|
this.moveEndSubject.next({});
|
||||||
});
|
});
|
||||||
this.moveEndSubject.pipe(throttle(ev => interval(100))).subscribe(() => this.updateValuesLocation());
|
this.moveEndSubject.pipe(throttle(() => interval(100))).subscribe(() => this.updateValuesLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
updateValuesLocation() {
|
updateValuesLocation() {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { LayerVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
import { LayerVectorComponent, MapComponent } from 'ng-openlayers';
|
||||||
import RenderType from 'ol/layer/Vector';
|
import RenderType from 'ol/layer/Vector';
|
||||||
import { Vector as VectorSource } from 'ol/source';
|
import { Vector as VectorSource } from 'ol/source';
|
||||||
import { Geometry } from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, OnInit, Input, Host, OnChanges, SimpleChanges,ChangeDetectorRef } from '@angular/core';
|
import { ChangeDetectorRef, Component, Host, Input, OnChanges, OnInit } from '@angular/core';
|
||||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import {IMapState} from '../../../models/map.state'
|
import { View } from 'ol';
|
||||||
import {View} from 'ol';
|
|
||||||
import { fromLonLat } from 'ol/proj';
|
import { fromLonLat } from 'ol/proj';
|
||||||
|
import { IMapState } from '../../../models/map.state';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -29,7 +29,7 @@ export class PanToLocation implements OnInit,OnChanges{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges() {
|
||||||
// if (changes.position && this.instance) {
|
// if (changes.position && this.instance) {
|
||||||
// var p = changes.position.currentValue as Position;
|
// var p = changes.position.currentValue as Position;
|
||||||
// this.instance.setPosition(fromLonLat([p.coords.longitude, p.coords.latitude]));
|
// this.instance.setPosition(fromLonLat([p.coords.longitude, p.coords.latitude]));
|
||||||
@@ -64,17 +64,17 @@ export class PanToLocation implements OnInit,OnChanges{
|
|||||||
const newCenter = fromLonLat([this.position.coords.longitude,this.position.coords.latitude]);
|
const newCenter = fromLonLat([this.position.coords.longitude,this.position.coords.latitude]);
|
||||||
const extent = [newCenter[0]-500,newCenter[1]-500,newCenter[0]+500,newCenter[1]+500];
|
const extent = [newCenter[0]-500,newCenter[1]-500,newCenter[0]+500,newCenter[1]+500];
|
||||||
const options = { padding: [0, 0, 0, 0],minResolution:1 };
|
const options = { padding: [0, 0, 0, 0],minResolution:1 };
|
||||||
const size = this.map.instance.getSize();
|
//const size = this.map.instance.getSize();
|
||||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
//const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||||
const threshold = 44 * rem;
|
//const threshold = 44 * rem;
|
||||||
let left = 1 * rem;
|
//let left = 1 * rem;
|
||||||
const right = 1 * rem;
|
//const right = 1 * rem;
|
||||||
let bottom = Math.round(size[1] / 2);
|
//let bottom = Math.round(size[1] / 2);
|
||||||
const top = 1 * rem;
|
//const top = 1 * rem;
|
||||||
if (size[0] > threshold) {
|
//if (size[0] > threshold) {
|
||||||
bottom = 1 * rem;
|
// bottom = 1 * rem;
|
||||||
left = 23 * rem;
|
// left = 23 * rem;
|
||||||
}
|
//}
|
||||||
//options.padding = [top, right, bottom, left];
|
//options.padding = [top, right, bottom, left];
|
||||||
if (this.animate) options["duration"] = 2000;
|
if (this.animate) options["duration"] = 2000;
|
||||||
view.fit(extent, options);
|
view.fit(extent, options);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, Host, Input, OnInit, ChangeDetectorRef } from '@angular/core';
|
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
|
||||||
import { ViewComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
import {View} from 'ol';
|
import { View } from 'ol';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Component, Host, Input, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
import { Component, Host, Input, OnChanges } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ViewComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
import { MapComponent, ViewComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -30,7 +30,7 @@ export class ZoomToExtentComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges() {
|
||||||
if (this.extent) {
|
if (this.extent) {
|
||||||
const options = { padding: [0, 0, 0, 0],minResolution:1 };
|
const options = { padding: [0, 0, 0, 0],minResolution:1 };
|
||||||
const size = this.map.instance.getSize();
|
const size = this.map.instance.getSize();
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject} from '@angular/core';
|
import { Component, ComponentFactory, ComponentFactoryResolver, Inject, Input, SimpleChanges, ViewChild } from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { IQueryState } from '@farmmaps/common';
|
||||||
import { Geometry} from 'ol/geom';
|
|
||||||
import { FeatureListComponent,AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
|
||||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
|
||||||
import {IQueryState,PackageService } from '@farmmaps/common';
|
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
import { AbstractFeatureListComponent, FeatureListComponent } from '../feature-list/feature-list.component';
|
||||||
|
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -17,7 +17,7 @@ import { Observable } from 'rxjs';
|
|||||||
})
|
})
|
||||||
export class FeatureListContainerComponent {
|
export class FeatureListContainerComponent {
|
||||||
|
|
||||||
constructor(private store: Store<mapReducers.State>,private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListComponent) public featureLists: AbstractFeatureListComponent[],private packageService:PackageService ) {
|
constructor(private store: Store<mapReducers.State>,private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListComponent) public featureLists: AbstractFeatureListComponent[]) {
|
||||||
this.featureLists = [...this.featureLists].reverse();
|
this.featureLists = [...this.featureLists].reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<h3>{{schemeItem.name}}</h3>
|
<h3>{{schemeItem.name}}</h3>
|
||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<div class="cropfields">
|
<div class="cropfields">
|
||||||
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave()">
|
||||||
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import { Component, Injectable,AfterViewInit, OnInit,SimpleChanges, ChangeDetectorRef} from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
import { Component, Injectable, OnInit } from '@angular/core';
|
||||||
import {ForItemType } from '../for-item/for-itemtype.decorator';
|
import { IItem, ItemService, ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
import {ForChild } from '../for-item/for-child.decorator';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import { commonReducers, ItemTypeService, IItem,ItemService } from '@farmmaps/common';
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
import { AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
||||||
|
import { ForChild } from '../for-item/for-child.decorator';
|
||||||
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
|
|
||||||
@ForChild()
|
@ForChild()
|
||||||
@ForItemType("vnd.farmmaps.itemtype.cropfield")
|
@ForItemType("vnd.farmmaps.itemtype.cropfield")
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<h3><i class="far fa-farm"></i> <span i18n>Farms</span></h3>
|
<h3><i class="far fa-farm"></i> <span i18n>Farms</span></h3>
|
||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<div class="farms">
|
<div class="farms">
|
||||||
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features"[ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features"[ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave()">
|
||||||
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,15 +1,14 @@
|
|||||||
import { Component, Injectable } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
import { Component, Injectable } from '@angular/core';
|
||||||
|
import { ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
|
import { Action, Store } from '@ngrx/store';
|
||||||
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
|
import { tassign } from 'tassign';
|
||||||
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
import { AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { Store,Action } from '@ngrx/store';
|
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import { commonReducers, ItemTypeService } from '@farmmaps/common';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
import { tassign } from 'tassign';
|
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { Feature } from 'ol';
|
|
||||||
import { Geometry} from 'ol/geom';
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.croppingscheme")
|
@ForItemType("vnd.farmmaps.itemtype.croppingscheme")
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -20,7 +19,7 @@ import { Geometry} from 'ol/geom';
|
|||||||
})
|
})
|
||||||
export class FeatureListCroppingschemeComponent extends AbstractFeatureListComponent {
|
export class FeatureListCroppingschemeComponent extends AbstractFeatureListComponent {
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, private router: Router) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location) {
|
||||||
super(store, itemTypeService, location);
|
super(store, itemTypeService, location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject, Type} from '@angular/core';
|
import { Component, ComponentFactory, ComponentFactoryResolver, Inject, Input, SimpleChanges, ViewChild } from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { Geometry } from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
import { AbstractFeatureListFeatureComponent,FeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
import { AbstractFeatureListFeatureComponent, FeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
||||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import { Component, Injectable,ViewChild,AfterViewInit} from '@angular/core';
|
import { Component, Injectable } from '@angular/core';
|
||||||
|
import { AppConfig, ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { Geometry } from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
import { Store } from '@ngrx/store';
|
import { getArea } from 'ol/sphere';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
|
||||||
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import {getArea} from 'ol/sphere';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
import { Component, Input, Injectable} from '@angular/core';
|
import { Component, Injectable } from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { AppConfig, ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
|
||||||
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<fm-back-button></fm-back-button>
|
<fm-back-button></fm-back-button>
|
||||||
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave()">
|
||||||
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,15 +1,12 @@
|
|||||||
import { Component, Input, Injectable,Directive,SimpleChanges } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
import { Component, Directive, Injectable, Input } from '@angular/core';
|
||||||
|
import { IQueryState, ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
|
import { Action, Store } from '@ngrx/store';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { Geometry} from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
import { Store,Action} from '@ngrx/store';
|
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import { commonReducers,ItemTypeService, IItem, Item } from '@farmmaps/common';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
import { Observable, from } from 'rxjs';
|
|
||||||
import { withLatestFrom } from 'rxjs/operators';
|
|
||||||
import { tassign } from 'tassign';
|
import { tassign } from 'tassign';
|
||||||
import { IQueryState } from '@farmmaps/common';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -37,11 +34,11 @@ export abstract class AbstractFeatureListComponent {
|
|||||||
return new mapActions.DoQuery(newQuery)
|
return new mapActions.DoQuery(newQuery)
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFeatureMouseEnter(feature) {
|
handleFeatureMouseEnter(feature:Feature<Geometry>) {
|
||||||
this.store.dispatch(new mapActions.SelectFeature(feature));
|
this.store.dispatch(new mapActions.SelectFeature(feature));
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFeatureMouseLeave(feature) {
|
handleFeatureMouseLeave() {
|
||||||
this.store.dispatch(new mapActions.SelectFeature(null));
|
this.store.dispatch(new mapActions.SelectFeature(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, Input, AfterViewInit, ViewChild } from '@angular/core';
|
import { AfterViewInit, Component, Input, ViewChild } from '@angular/core';
|
||||||
import { Feature} from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { Geometry,Polygon,MultiPolygon } from 'ol/geom';
|
|
||||||
import * as extent from 'ol/extent';
|
import * as extent from 'ol/extent';
|
||||||
|
import { Geometry, Polygon } from 'ol/geom';
|
||||||
import * as render from 'ol/render';
|
import * as render from 'ol/render';
|
||||||
import * as style from 'ol/style';
|
import * as style from 'ol/style';
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input, OnChanges } from '@angular/core';
|
import { Directive, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
||||||
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import { Layer } from 'ol/layer';
|
import { Layer } from 'ol/layer';
|
||||||
import { Source } from 'ol/source';
|
import { Source } from 'ol/source';
|
||||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[fmMapIfZoomToShow]',
|
selector: '[fmMapIfZoomToShow]',
|
||||||
@@ -36,7 +36,7 @@ export class ifZoomToShowDirective implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.map$.instance.on('moveend', (e) => {
|
this.map$.instance.on('moveend', () => {
|
||||||
this.checkZoom();
|
this.checkZoom();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject, Type} from '@angular/core';
|
import { Component, ComponentFactory, ComponentFactoryResolver, Inject, Input, SimpleChanges, ViewChild } from '@angular/core';
|
||||||
import { AbstractItemListItemComponent,ItemListItemComponent } from '../item-list-item/item-list-item.component';
|
import { IListItem } from '@farmmaps/common';
|
||||||
|
import { AbstractItemListItemComponent, ItemListItemComponent } from '../item-list-item/item-list-item.component';
|
||||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||||
import { IItem, IListItem } from '@farmmaps/common';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -27,7 +27,6 @@ export class ItemListItemContainerComponent {
|
|||||||
|
|
||||||
let selected = -1;
|
let selected = -1;
|
||||||
let maxMatches =0;
|
let maxMatches =0;
|
||||||
const showItem = true;
|
|
||||||
for (let i = 0; i < this.itemComponentList.length; i++) {
|
for (let i = 0; i < this.itemComponentList.length; i++) {
|
||||||
let matches=0;
|
let matches=0;
|
||||||
let criteria=0;
|
let criteria=0;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, Input, Injectable, Inject, Optional,ComponentFactoryResolver, ViewContainerRef, QueryList, ComponentFactory, ViewChildren,AfterViewInit } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
import { AfterViewInit, Component, ComponentFactory, ComponentFactoryResolver, Inject, Injectable, Input, Optional, QueryList, ViewChildren, ViewContainerRef } from '@angular/core';
|
||||||
|
import { IListItem, ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { commonReducers,ItemTypeService, IItem, Item,IListItem } from '@farmmaps/common';
|
|
||||||
import { AbstractItemWidgetComponent } from '../item-list-item/item-list-item.component';
|
import { AbstractItemWidgetComponent } from '../item-list-item/item-list-item.component';
|
||||||
|
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<li class="nav-item py-0">
|
<li class="nav-item py-0">
|
||||||
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Base maps</span></span>
|
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Base maps</span></span>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<fm-map-layer-list [baseLayers]="true" [itemLayers]="baseMaps|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
|
<fm-map-layer-list [baseLayers]="true" [itemLayers]="baseLayers|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item py-0">
|
<li class="nav-item py-0">
|
||||||
@@ -20,17 +20,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item py-0" *ngIf="selectedItemLayer$ | async as selectedItemLayer">
|
<li class="nav-item py-0" *ngIf="selectedItemLayer$ | async as selectedItemLayer">
|
||||||
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Overlay slider</span><span class="slideButton"><a href="#" title="Compare" class="btn btn-light btn-sm" (click)="handleToggleShowDatalayerSlide($event)"><i class="fal fa-sliders-h-square"></i></a></span></span>
|
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Data</span><span class="slideButton"><a href="#" title="Compare" class="btn btn-light btn-sm" (click)="handleToggleShowDatalayerSlide($event)"><i class="fal fa-sliders-h-square"></i></a></span></span>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<fm-map-layer-list [dataLayers]="true" [itemLayers]="[selectedItemLayer]" [selectedLayer]="selectedItemLayer" (onToggleVisibility)="handleOnToggleVisibility($event)" (onSetOpacity)="handleOnSetOpacity($event)" (onZoomToExtent)="handleZoomToExtent($event)" (onSelectLayer)="handleSelectOverlayLayer($event)"></fm-map-layer-list>
|
<fm-map-layer-list [dataLayers]="true" [itemLayers]="[selectedItemLayer]" [selectedLayer]="selectedItemLayer" (onToggleVisibility)="handleOnToggleVisibility($event)" (onSetOpacity)="handleOnSetOpacity($event)" (onZoomToExtent)="handleZoomToExtent($event)" (onSelectLayer)="handleSelectOverlayLayer($event)"></fm-map-layer-list>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item py-0">
|
|
||||||
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Aerial photos</span></span>
|
|
||||||
<div class="mb-4">
|
|
||||||
<fm-map-layer-list [baseLayers]="true" [itemLayers]="aerialMaps|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
import { Component, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, OnChanges, OnInit } from '@angular/core';
|
||||||
import {IItemLayer} from '../../models/item.layer';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import { createEmpty, extend } from 'ol/extent';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import {createEmpty,extend } from 'ol/extent';
|
import { IItemLayer } from '../../models/item.layer';
|
||||||
import { filter, map, Observable } from 'rxjs';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-layer-switcher',
|
selector: 'fm-map-layer-switcher',
|
||||||
@@ -17,8 +17,7 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
public overlayLayers: Observable<Array<IItemLayer>>;
|
public overlayLayers: Observable<Array<IItemLayer>>;
|
||||||
public selectedOverlayLayer: Observable<IItemLayer>;
|
public selectedOverlayLayer: Observable<IItemLayer>;
|
||||||
public selectedItemLayer$: Observable<IItemLayer>;
|
public selectedItemLayer$: Observable<IItemLayer>;
|
||||||
public baseMaps: Observable<Array<IItemLayer>>;
|
public baseLayers: Observable<Array<IItemLayer>>;
|
||||||
public aerialMaps: Observable<Array<IItemLayer>>;
|
|
||||||
public selectedBaseLayer: Observable<IItemLayer>;
|
public selectedBaseLayer: Observable<IItemLayer>;
|
||||||
|
|
||||||
constructor( private store: Store<mapReducers.State>) {
|
constructor( private store: Store<mapReducers.State>) {
|
||||||
@@ -27,18 +26,15 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.overlayLayers = this.store.select(mapReducers.selectGetOverlayLayers);
|
this.overlayLayers = this.store.select(mapReducers.selectGetOverlayLayers);
|
||||||
this.selectedOverlayLayer = this.store.select(mapReducers.selectGetSelectedOverlayLayer);
|
this.selectedOverlayLayer = this.store.select(mapReducers.selectGetSelectedOverlayLayer);
|
||||||
this.baseMaps = this.store.select(mapReducers.selectGetBaseMaps);
|
this.baseLayers = this.store.select(mapReducers.selectGetBaseLayers);
|
||||||
this.aerialMaps = this.store.select(mapReducers.selectGetArealMaps);
|
|
||||||
this.selectedBaseLayer = this.store.select(mapReducers.selectGetSelectedBaseLayer);
|
this.selectedBaseLayer = this.store.select(mapReducers.selectGetSelectedBaseLayer);
|
||||||
this.selectedItemLayer$ = this.store.select(mapReducers.selectGetSelectedItemLayer)
|
this.selectedItemLayer$ = this.store.select(mapReducers.selectGetSelectedItemLayer)
|
||||||
this.showLayerSwitcher = this.store.select(mapReducers.selectGetShowLayerSwitcher);
|
this.showLayerSwitcher = this.store.select(mapReducers.selectGetShowLayerSwitcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleClick(event:Event) {
|
handleClick(event:Event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.store.dispatch(new mapActions.ShowLayerSwitcher(true));
|
this.store.dispatch(new mapActions.ShowLayerSwitcher(true));
|
||||||
@@ -49,8 +45,6 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
this.store.dispatch(new mapActions.ShowLayerSwitcher(false));
|
this.store.dispatch(new mapActions.ShowLayerSwitcher(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleOnToggleVisibility(itemLayer: IItemLayer) {
|
handleOnToggleVisibility(itemLayer: IItemLayer) {
|
||||||
this.store.dispatch(new mapActions.SetVisibility(itemLayer,!itemLayer.visible));
|
this.store.dispatch(new mapActions.SetVisibility(itemLayer,!itemLayer.visible));
|
||||||
}
|
}
|
||||||
@@ -85,4 +79,3 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@@ -1,5 +1,5 @@
|
|||||||
import {Component, Input} from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import {IHistogram, ILayer} from '../../../models/color.map';
|
import { IHistogram } from '../../../models/color.map';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-histogram-details',
|
selector: 'fm-map-histogram-details',
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit, Input,AfterViewInit } from '@angular/core';
|
import { AfterViewInit, Component, Input, OnInit } from '@angular/core';
|
||||||
import { IColorMap, IColor, IColorEntry,ILayer, IRenderer } from '../../models/color.map';
|
import { IColor, ILayer, IRenderer } from '../../models/color.map';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
<div class="map-search collapsed" [ngClass]="{'collapsed':collapsedLocal,searchcollapsed:searchMinifiedLocal}" (click)="$event.stopPropagation()">
|
<div class="map-search collapsed" [ngClass]="{'collapsed':collapsedLocal,searchcollapsed:searchMinifiedLocal}" (click)="$event.stopPropagation()">
|
||||||
<div class="card p-2">
|
<div class="card p-2">
|
||||||
<form class="form" (ngSubmit)="handleSearch($event)">
|
<form class="form" (ngSubmit)="handleSearch()">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<button type="button" class="btn btn-outline-secondary" (click)="handleToggleMenu($event)"><i class="fal fa-bars" aria-hidden="true"></i></button>
|
<button type="button" class="btn btn-outline-secondary" (click)="handleToggleMenu()"><i class="fal fa-bars" aria-hidden="true"></i></button>
|
||||||
<input #searchText class="form-control" type="text" (focus)="handleFocus($event)" [ngModel]="searchTextLocal" name="searchTextLocal" (ngModelChange)="handleChange($event)" [ngbTypeahead]="search" [resultTemplate]="rt" [inputFormatter]="formatter" (selectItem)="handleSelect($event)" placeholder="Search" i18n-placeholder />
|
<input #searchText class="form-control" type="text" (focus)="handleFocus()" [ngModel]="searchTextLocal" name="searchTextLocal" (ngModelChange)="handleChange($event)" [ngbTypeahead]="search" [resultTemplate]="rt" [inputFormatter]="formatter" (selectItem)="handleSelect($event)" placeholder="Search" i18n-placeholder />
|
||||||
<button type="submit" class="btn btn-outline-secondary" [disabled]="disabled"><i class="fal fa-search"></i></button>
|
<button type="submit" class="btn btn-outline-secondary" [disabled]="disabled"><i class="fal fa-search"></i></button>
|
||||||
<button type="button" class="clear btn btn-outline-secondary" [disabled]="!clearEnabled" (click)="handleClearClick($event)"><i class="fas fa-times"></i></button>
|
<button type="button" class="clear btn btn-outline-secondary" [disabled]="!clearEnabled" (click)="handleClearClick()"><i class="fas fa-times"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
import { Component, Input, Output, OnInit, EventEmitter, SimpleChanges, OnChanges, ViewChild } from '@angular/core';
|
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||||
import { Observable , of,merge,forkJoin } from 'rxjs';
|
import { IQueryState, TimespanService, TypeaheadService } from '@farmmaps/common';
|
||||||
import { debounceTime,distinctUntilChanged,tap,switchMap,catchError,map} from 'rxjs/operators';
|
import { Observable, forkJoin, of } from 'rxjs';
|
||||||
import { TypeaheadService, TimespanService } from '@farmmaps/common';
|
import { catchError, debounceTime, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';
|
||||||
import { IQueryState } from '@farmmaps/common';
|
|
||||||
import { IPeriodState } from '../../models/period.state';
|
|
||||||
import { tassign } from 'tassign';
|
import { tassign } from 'tassign';
|
||||||
|
import { IPeriodState } from '../../models/period.state';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-map-search',
|
selector: 'fm-map-map-search',
|
||||||
@@ -54,7 +53,6 @@ export class MapSearchComponent {
|
|||||||
public searchMinifiedLocal = false;
|
public searchMinifiedLocal = false;
|
||||||
public periodLocal: IPeriodState = { startDate:new Date(new Date(Date.now()).getFullYear(), new Date(Date.now()).getMonth() - 3, 1), endDate:new Date(Date.now())};
|
public periodLocal: IPeriodState = { startDate:new Date(new Date(Date.now()).getFullYear(), new Date(Date.now()).getMonth() - 3, 1), endDate:new Date(Date.now())};
|
||||||
public filterOptionsLocal: IQueryState;
|
public filterOptionsLocal: IQueryState;
|
||||||
private extent: number[];
|
|
||||||
public searchTextLocal: any;
|
public searchTextLocal: any;
|
||||||
public searchTextLocalOutput: string;
|
public searchTextLocalOutput: string;
|
||||||
public dateFilter = true;
|
public dateFilter = true;
|
||||||
@@ -81,12 +79,12 @@ export class MapSearchComponent {
|
|||||||
catchError(() => {
|
catchError(() => {
|
||||||
this.searchFailed = true;
|
this.searchFailed = true;
|
||||||
return of([]);
|
return of([]);
|
||||||
}),map( (sa:string[]) => sa.map((s,i) => ({"name":s,"type":"tag"})))),
|
}),map( (sa:string[]) => sa.map((s) => ({"name":s,"type":"tag"})))),
|
||||||
this.typeaheadService.getCityTypeaheadItems(term).pipe(
|
this.typeaheadService.getCityTypeaheadItems(term).pipe(
|
||||||
catchError(() => {
|
catchError(() => {
|
||||||
this.searchFailed = true;
|
this.searchFailed = true;
|
||||||
return of([]);
|
return of([]);
|
||||||
}),map( (sa:string[]) => sa.map((s,i) => ({"name":s,"type":"city"})))),
|
}),map( (sa:string[]) => sa.map((s) => ({"name":s,"type":"city"})))),
|
||||||
).pipe(map(([a1,a2]) => [...a1, ...a2] ),map(a => a.sort((a, b) => (a.name.toUpperCase() > b.name.toUpperCase()) ? 1 : -1)))
|
).pipe(map(([a1,a2]) => [...a1, ...a2] ),map(a => a.sort((a, b) => (a.name.toUpperCase() > b.name.toUpperCase()) ? 1 : -1)))
|
||||||
),
|
),
|
||||||
tap(() => this.searching = false),
|
tap(() => this.searching = false),
|
||||||
@@ -94,7 +92,7 @@ export class MapSearchComponent {
|
|||||||
|
|
||||||
formatter = (x: { name: string }) => x.name;
|
formatter = (x: { name: string }) => x.name;
|
||||||
|
|
||||||
handleSearch(event) {
|
handleSearch() {
|
||||||
this.filterOptionsLocal.tags = null;
|
this.filterOptionsLocal.tags = null;
|
||||||
this.filterOptionsLocal.itemType = null;
|
this.filterOptionsLocal.itemType = null;
|
||||||
this.filterOptionsLocal.itemCode = null;
|
this.filterOptionsLocal.itemCode = null;
|
||||||
@@ -168,11 +166,11 @@ export class MapSearchComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
handleToggleMenu(event) {
|
handleToggleMenu() {
|
||||||
this.onToggleMenu.emit({});
|
this.onToggleMenu.emit({});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFocus(event) {
|
handleFocus() {
|
||||||
this.onSearchExpand.emit({});
|
this.onSearchExpand.emit({});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,7 +185,7 @@ export class MapSearchComponent {
|
|||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClearClick(event) {
|
handleClearClick() {
|
||||||
this.onClear.emit({});
|
this.onClear.emit({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
<fm-map-file-drop-target [parentCode]="state.parentCode" (onFileDropped)="handleFileDropped($event)"></fm-map-file-drop-target>
|
<fm-map-file-drop-target [parentCode]="state.parentCode" (onFileDropped)="handleFileDropped($event)"></fm-map-file-drop-target>
|
||||||
|
|
||||||
<div *ngIf="noContent">
|
<div *ngIf="noContent">
|
||||||
<fm-map-map-search #mapSearch [openedModalName]="state.openedModalName" (onOpenModal)="handleOpenModal($event)" (onCloseModal)="handleCloseModal()" [ngClass]="{'menuVisible':state.menuVisible}" (onToggleMenu)="handleToggleMenu($event)" (onSearchCollapse)="handleSearchCollapse($event)" (onSearchExpand)="handleSearchExpand($event)" [collapsed]="state.searchCollapsed" [searchMinified]="state.searchMinified" (onSearch)="handleSearch($event)" (onClear)="handleClearSearch($event)" [filterOptions]="state.queryState" [clearEnabled]="state.clearEnabled" [period]="state.period" (onPeriodChange)="handlePeriodChange($event)" (onCitySearch)="handleCitySearch($event)"></fm-map-map-search>
|
<fm-map-map-search #mapSearch [openedModalName]="state.openedModalName" (onOpenModal)="handleOpenModal($event)" (onCloseModal)="handleCloseModal()" [ngClass]="{'menuVisible':state.menuVisible}" (onToggleMenu)="handleToggleMenu()" (onSearchCollapse)="handleSearchCollapse()" (onSearchExpand)="handleSearchExpand()" [collapsed]="state.searchCollapsed" [searchMinified]="state.searchMinified" (onSearch)="handleSearch($event)" (onClear)="handleClearSearch()" [filterOptions]="state.queryState" [clearEnabled]="state.clearEnabled" [period]="state.period" (onPeriodChange)="handlePeriodChange($event)" (onCitySearch)="handleCitySearch($event)"></fm-map-map-search>
|
||||||
</div>
|
</div>
|
||||||
<div class="side-panel-container">
|
<div class="side-panel-container">
|
||||||
|
|
||||||
|
@@ -52,20 +52,11 @@ aol-map { position:absolute;width:100%;height:calc( 100vh );}
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.control-container {
|
|
||||||
margin-left: 1em;
|
|
||||||
margin-right: 1em;
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
.control-container {
|
||||||
.control-container {
|
float:right;
|
||||||
float: right;
|
margin-right: 1em;
|
||||||
margin-right: 1em;
|
pointer-events: all;
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen .viewport-container {
|
.fullscreen .viewport-container {
|
||||||
|
@@ -1,42 +1,29 @@
|
|||||||
import { Component, OnInit, OnDestroy, HostListener, ViewChild, AfterViewInit,NgZone,ElementRef } from '@angular/core';
|
/* eslint-disable no-prototype-builtins */
|
||||||
import { Location } from '@angular/common';
|
import { AfterViewInit, Component, ElementRef, HostListener, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||||
import { Observable, Subject, Subscription, from,of ,EMPTY } from 'rxjs';
|
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
|
||||||
import { withLatestFrom, switchMap,skip } from 'rxjs/operators';
|
import { DeviceService, GeolocatorService, IItem, IItemType, IQueryState, ItemTypeService, ResumableFileUploadService, StateSerializerService, commonActions, commonReducers } from '@farmmaps/common';
|
||||||
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { DeviceService } from '@farmmaps/common';
|
import { Feature } from 'ol';
|
||||||
import {getRenderPixel} from 'ol/render';
|
import { Extent, createEmpty, extend } from 'ol/extent';
|
||||||
|
import { Circle, Geometry, Point } from 'ol/geom';
|
||||||
// Map
|
import { transform } from 'ol/proj';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import { getRenderPixel } from 'ol/render';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
import { IMapState} from '../../models/map.state';
|
|
||||||
import { IClickedFeature} from '../../models/clicked.feature';
|
|
||||||
import { IQuery } from '../../reducers/map.reducer'
|
|
||||||
import { ISelectedFeatures } from '../../models/selected.features';
|
|
||||||
import { IItemLayer } from '../../models/item.layer';
|
|
||||||
import { IListItem, IQueryState } from '@farmmaps/common';
|
|
||||||
import { IPeriodState } from '../../models/period.state';
|
|
||||||
import {IStyles} from '../../models/style.cache';
|
|
||||||
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
|
|
||||||
import { StateSerializerService } from '@farmmaps/common';
|
|
||||||
import { GeolocationService} from '../../services/geolocation.service';
|
|
||||||
import { GeolocatorService } from '@farmmaps/common';
|
|
||||||
import {DeviceOrientationService} from '../../services/device-orientation.service';
|
|
||||||
|
|
||||||
// AppCommon
|
|
||||||
import { ResumableFileUploadService, ItemTypeService } from '@farmmaps/common';
|
|
||||||
import { IItemType, IItem } from '@farmmaps/common';
|
|
||||||
import {commonReducers} from '@farmmaps/common';
|
|
||||||
import {commonActions} from '@farmmaps/common';
|
|
||||||
|
|
||||||
import {Feature} from 'ol';
|
|
||||||
import {Geometry,Point,Circle} from 'ol/geom';
|
|
||||||
import {Extent,createEmpty,extend } from 'ol/extent';
|
|
||||||
import {transform} from 'ol/proj';
|
|
||||||
import { tassign } from 'tassign';
|
|
||||||
import * as style from 'ol/style';
|
import * as style from 'ol/style';
|
||||||
|
import { EMPTY, Observable, Subject, Subscription, from, of } from 'rxjs';
|
||||||
|
import { skip, switchMap, withLatestFrom } from 'rxjs/operators';
|
||||||
|
import { tassign } from 'tassign';
|
||||||
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import { IClickedFeature } from '../../models/clicked.feature';
|
||||||
|
import { IItemLayer } from '../../models/item.layer';
|
||||||
|
import { IMapState } from '../../models/map.state';
|
||||||
|
import { IPeriodState } from '../../models/period.state';
|
||||||
|
import { ISelectedFeatures } from '../../models/selected.features';
|
||||||
|
import { IStyles } from '../../models/style.cache';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
import { IQuery } from '../../reducers/map.reducer';
|
||||||
|
import { DeviceOrientationService } from '../../services/device-orientation.service';
|
||||||
|
import { GeolocationService } from '../../services/geolocation.service';
|
||||||
|
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-map',
|
selector: 'fm-map-map',
|
||||||
@@ -106,7 +93,6 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
private uploadService: ResumableFileUploadService,
|
private uploadService: ResumableFileUploadService,
|
||||||
private serializeService: StateSerializerService,
|
private serializeService: StateSerializerService,
|
||||||
public itemTypeService: ItemTypeService,
|
public itemTypeService: ItemTypeService,
|
||||||
private location: Location,
|
|
||||||
private geolocationService: GeolocationService,
|
private geolocationService: GeolocationService,
|
||||||
private geolocaterService: GeolocatorService,
|
private geolocaterService: GeolocatorService,
|
||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
@@ -389,15 +375,15 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSearchCollapse(event) {
|
handleSearchCollapse() {
|
||||||
this.store.dispatch(new mapActions.CollapseSearch());
|
this.store.dispatch(new mapActions.CollapseSearch());
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSearchExpand(event) {
|
handleSearchExpand() {
|
||||||
this.store.dispatch(new mapActions.ExpandSearch());
|
this.store.dispatch(new mapActions.ExpandSearch());
|
||||||
}
|
}
|
||||||
|
|
||||||
handleToggleMenu(event) {
|
handleToggleMenu() {
|
||||||
this.store.dispatch(new commonActions.ToggleMenu());
|
this.store.dispatch(new commonActions.ToggleMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,11 +464,11 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOnDownload(event) {
|
handleOnDownload() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClearSearch(event) {
|
handleClearSearch() {
|
||||||
this.store.dispatch(new mapActions.Clear());
|
this.store.dispatch(new mapActions.Clear());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<ng-template #content let-c="close" let-d="dismiss">
|
<ng-template #content let-c="close" let-d="dismiss">
|
||||||
<form [formGroup]="metaDataForm" (ngSubmit)="handleMetaDataEntered($event)">
|
<form [formGroup]="metaDataForm" (ngSubmit)="handleMetaDataEntered()">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title" i18n>Add metadata</h4>
|
<h4 class="modal-title" i18n>Add metadata</h4>
|
||||||
<button type="button" class="close" aria-label="Close" (click)="d('Cross click'); onCloseModal.emit()">
|
<button type="button" class="close" aria-label="Close" (click)="d('Cross click'); onCloseModal.emit()">
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, Output, ViewChild, EventEmitter, Input, ElementRef, HostListener } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||||
import { UntypedFormGroup,UntypedFormBuilder, Validators } from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||||
import { IListItem } from '@farmmaps/common';
|
import { IListItem } from '@farmmaps/common';
|
||||||
|
import { NgbModal, NgbModalRef } from "@ng-bootstrap/ng-bootstrap";
|
||||||
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
|
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
|
||||||
import {NgbModal, NgbModalRef} from "@ng-bootstrap/ng-bootstrap";
|
|
||||||
|
|
||||||
export interface IMetaData {
|
export interface IMetaData {
|
||||||
droppedFile: IDroppedFile,
|
droppedFile: IDroppedFile,
|
||||||
@@ -37,7 +37,7 @@ export class MetaDataModalComponent {
|
|||||||
|
|
||||||
public metaDataForm: UntypedFormGroup;
|
public metaDataForm: UntypedFormGroup;
|
||||||
|
|
||||||
handleMetaDataEntered(event) {
|
handleMetaDataEntered() {
|
||||||
if (this.metaDataForm.valid) {
|
if (this.metaDataForm.valid) {
|
||||||
this.onAddFilesWithMetaData.emit({ droppedFile: this.droppedFile, attributes: { name: this.metaDataForm.value.name } });
|
this.onAddFilesWithMetaData.emit({ droppedFile: this.droppedFile, attributes: { name: this.metaDataForm.value.name } });
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ export class MetaDataModalComponent {
|
|||||||
setTimeout(() => this.modalRef = this.modalService.open(this._templateModal, { backdrop: 'static', keyboard: false }));
|
setTimeout(() => this.modalRef = this.modalService.open(this._templateModal, { backdrop: 'static', keyboard: false }));
|
||||||
}
|
}
|
||||||
|
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.modalRef.close();
|
this.modalRef.close();
|
||||||
this.metaDataForm.patchValue({ name: "" });
|
this.metaDataForm.patchValue({ name: "" });
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import { Component, Output, ViewChild, EventEmitter, Input, ElementRef, HostListener } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
|
||||||
import { NgbModal, NgbModalRef, NgbDateStruct, NgbCalendar, NgbDateAdapter } from "@ng-bootstrap/ng-bootstrap";
|
|
||||||
import { NgbDateNativeAdapter } from '@farmmaps/common';
|
import { NgbDateNativeAdapter } from '@farmmaps/common';
|
||||||
|
import { NgbDateStruct, NgbModal, NgbModalRef } from "@ng-bootstrap/ng-bootstrap";
|
||||||
|
|
||||||
|
|
||||||
const equals = (one: NgbDateStruct, two: NgbDateStruct) =>
|
const equals = (one: NgbDateStruct, two: NgbDateStruct) =>
|
||||||
@@ -52,7 +51,7 @@ export class SelectPeriodModalComponent {
|
|||||||
@Output() onCloseModal = new EventEmitter<any>();
|
@Output() onCloseModal = new EventEmitter<any>();
|
||||||
@Output() onSelect = new EventEmitter<{ startDate: Date, endDate: Date }>();
|
@Output() onSelect = new EventEmitter<{ startDate: Date, endDate: Date }>();
|
||||||
|
|
||||||
constructor(private modalService: NgbModal, private calendar: NgbCalendar) { }
|
constructor(private modalService: NgbModal) { }
|
||||||
|
|
||||||
openModal() {
|
openModal() {
|
||||||
//Timeout trick to avoid ExpressionChangedAfterItHasBeenCheckedError
|
//Timeout trick to avoid ExpressionChangedAfterItHasBeenCheckedError
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject, Type} from '@angular/core';
|
import { Component, ComponentFactory, ComponentFactoryResolver, Inject, Input, SimpleChanges, ViewChild } from '@angular/core';
|
||||||
import { IItem } from '@farmmaps/common';
|
import { IItem } from '@farmmaps/common';
|
||||||
import { AbstractSelectedItemComponent, SelectedItemComponent } from '../selected-item/selected-item.component';
|
|
||||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
|
||||||
import { IItemLayer } from '../../models/item.layer';
|
import { IItemLayer } from '../../models/item.layer';
|
||||||
|
import { AbstractSelectedItemComponent, SelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
|
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -28,7 +28,6 @@ export class SelectedItemContainerComponent {
|
|||||||
|
|
||||||
let selected = -1;
|
let selected = -1;
|
||||||
let maxMatches =0;
|
let maxMatches =0;
|
||||||
const showItem = true;
|
|
||||||
for (let i = 0; i < this.selectedItemComponents.length; i++) {
|
for (let i = 0; i < this.selectedItemComponents.length; i++) {
|
||||||
let matches=0;
|
let matches=0;
|
||||||
let criteria=0;
|
let criteria=0;
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
import { Component, Input, Injectable, OnInit } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Feature } from 'ol';
|
import { Component, Injectable, OnInit } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { FolderService, IItem, IListItem, ItemService, ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
import { GeoJSON } from 'ol/format';
|
||||||
|
import { getArea } from 'ol/sphere';
|
||||||
|
import { Observable, of } from 'rxjs';
|
||||||
|
import { combineLatest, switchMap } from 'rxjs/operators';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { commonReducers, ItemTypeService, IItem, Item, ItemService, FolderService, IListItem} from '@farmmaps/common';
|
|
||||||
import { Router, ActivatedRoute, ParamMap, Event } from '@angular/router';
|
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
import { Observable,of } from 'rxjs';
|
|
||||||
import {GeoJSON} from 'ol/format';
|
|
||||||
import {getArea} from 'ol/sphere';
|
|
||||||
import { withLatestFrom,switchMap,combineLatest } from 'rxjs/operators';
|
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.cropfield")
|
@ForItemType("vnd.farmmaps.itemtype.cropfield")
|
||||||
@@ -24,8 +23,8 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
|
|||||||
|
|
||||||
public items: Observable<IListItem[]>;
|
public items: Observable<IListItem[]>;
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService, private folderService$: FolderService) {
|
||||||
super(store, itemTypeService, itemService$, location,router);
|
super(store, itemTypeService,location,router);
|
||||||
}
|
}
|
||||||
|
|
||||||
areaInHa(item:IItem):number {
|
areaInHa(item:IItem):number {
|
||||||
@@ -43,7 +42,7 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
|
|||||||
const atLocationItems = this.itemService$.getItemList(null,null,null,this.item.code,true);
|
const atLocationItems = this.itemService$.getItemList(null,null,null,this.item.code,true);
|
||||||
this.items = childItems.pipe(
|
this.items = childItems.pipe(
|
||||||
combineLatest(atLocationItems),
|
combineLatest(atLocationItems),
|
||||||
switchMap(([ci,ali]) => {
|
switchMap(([ci, ali]) => {
|
||||||
const retVal:IListItem[] = [];
|
const retVal:IListItem[] = [];
|
||||||
const codes = {};
|
const codes = {};
|
||||||
ci.forEach((listItem) => {
|
ci.forEach((listItem) => {
|
||||||
|
@@ -7,31 +7,28 @@
|
|||||||
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="item?.data.layers;let layers">
|
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||||
<div class="legend-container">
|
|
||||||
<div class="card menu-card">
|
|
||||||
<div *ngIf="layers.length>1">
|
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
|
||||||
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<fm-map-layer-legend [showTitle]="layers.length == 1"
|
|
||||||
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card menu-card">
|
<div class="card menu-card">
|
||||||
<ul class="p-0 mt-2">
|
<div *ngIf="layers.length>1">
|
||||||
<li *ngIf="item.isEditable"><a href="#" class="ms-1 me-1" (click)="handleOnEdit(item)"><i class="fal fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
<select (change)="onLayerChanged($event.target.value)">
|
||||||
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
|
||||||
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
</select>
|
||||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
</div>
|
||||||
</ng-container>
|
<fm-map-layer-legend [showTitle]="layers.length == 1"
|
||||||
<li><fm-item-link class="text-primary p-0" [itemCode]="item.code" pathSuffix="data" [showText]="true"></fm-item-link></li>
|
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||||
<li><a href="#" (click)="download($event,item,layers,itemLayer.layerIndex)"><i class="fal fa-download" aria-hidden="true" i18n-title title="Download"></i> <span i18n>Download</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
</div>
|
||||||
</ng-container>
|
<div class="card menu-card">
|
||||||
|
<ul class="p-0 mt-2">
|
||||||
|
<li *ngIf="item.isEditable"><a href="#" class="ms-1 me-1" (click)="handleOnEdit(item)"><i class="fal fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
||||||
|
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
||||||
|
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||||
|
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||||
|
</ng-container>
|
||||||
|
<li><fm-item-link class="text-primary p-0" [itemCode]="item.code" pathSuffix="data" [showText]="true"></fm-item-link></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Component, Injectable, OnDestroy } from '@angular/core';
|
import { Component, Injectable } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { commonReducers, FolderService, IItem, IItemLinkType, ItemService, ItemTypeService, IUrlType } from '@farmmaps/common';
|
import { ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
@@ -17,15 +16,10 @@ import { AbstractSelectedItemComponent } from '../selected-item/selected-item.co
|
|||||||
templateUrl: './selected-item-geotiff.component.html',
|
templateUrl: './selected-item-geotiff.component.html',
|
||||||
styleUrls: ['./selected-item-geotiff.component.scss']
|
styleUrls: ['./selected-item-geotiff.component.scss']
|
||||||
})
|
})
|
||||||
export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent implements OnDestroy {
|
export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent {
|
||||||
sub: Subscription;
|
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router) {
|
||||||
super(store, itemTypeService,itemService,location,router);
|
super(store, itemTypeService,location,router);
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
|
||||||
if (this.sub) this.sub.unsubscribe();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onLayerChanged(layerIndex: number) {
|
onLayerChanged(layerIndex: number) {
|
||||||
@@ -35,13 +29,4 @@ export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent
|
|||||||
layer(layers:any,layerIndex:number) {
|
layer(layers:any,layerIndex:number) {
|
||||||
return layers.find(l => l.index == layerIndex);
|
return layers.find(l => l.index == layerIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
download(event:MouseEvent,item:IItem,layers:any,layerIndex:number) {
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
const itemLink : IItemLinkType = {itemcode:item.code,query:`layer=${this.layer(layers,layerIndex).name}`,pathsuffix:"download", validminutes:10}
|
|
||||||
this.sub = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
|
|
||||||
window.location.href = itemLinkUrl.url;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -7,28 +7,25 @@
|
|||||||
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="item?.data.layers;let layers">
|
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||||
<div class="legend-container">
|
|
||||||
<div class="card menu-card">
|
|
||||||
<div *ngIf="layers.length>1">
|
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
|
||||||
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card menu-card">
|
<div class="card menu-card">
|
||||||
<ul class="p-0 mt-2">
|
<div *ngIf="layers.length>1">
|
||||||
<li *ngIf="item.isEditable"><a href="#" class="mt-1 me-1" (click)="handleOnEdit(item)" ><i class="fal fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
<select (change)="onLayerChanged($event.target.value)">
|
||||||
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
|
||||||
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-olus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
</select>
|
||||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
</div>
|
||||||
</ng-container>
|
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||||
<li><a href="#" (click)="download($event,item,layers,itemLayer.layerIndex)"><i class="fal fa-download" aria-hidden="true" i18n-title title="Download"></i> <span i18n>Download</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</div>
|
||||||
|
<div class="card menu-card">
|
||||||
|
<ul class="p-0 mt-2">
|
||||||
|
<li *ngIf="item.isEditable"><a href="#" class="mt-1 me-1" (click)="handleOnEdit(item)" ><i class="fal fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
||||||
|
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
||||||
|
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-olus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||||
|
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||||
|
</ng-container>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,13 +1,12 @@
|
|||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Component, Injectable, OnDestroy } from '@angular/core';
|
import { Component, Injectable } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { commonReducers, FolderService, IItem, IItemLinkType, ItemService, ItemTypeService, IUrlType } from '@farmmaps/common';
|
import { ItemTypeService, commonReducers } from '@farmmaps/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.shape.processed")
|
@ForItemType("vnd.farmmaps.itemtype.shape.processed")
|
||||||
@@ -17,18 +16,13 @@ import { Subscription } from 'rxjs';
|
|||||||
templateUrl: './selected-item-shape.component.html',
|
templateUrl: './selected-item-shape.component.html',
|
||||||
styleUrls: ['./selected-item-shape.component.scss']
|
styleUrls: ['./selected-item-shape.component.scss']
|
||||||
})
|
})
|
||||||
export class SelectedItemShapeComponent extends AbstractSelectedItemComponent implements OnDestroy {
|
export class SelectedItemShapeComponent extends AbstractSelectedItemComponent {
|
||||||
|
|
||||||
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router) {
|
||||||
|
super(store, itemTypeService,location,router);
|
||||||
|
}
|
||||||
public selectedLayer = 0;
|
public selectedLayer = 0;
|
||||||
sub: Subscription;
|
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
|
||||||
super(store, itemTypeService,itemService,location,router);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
|
||||||
if (this.sub) this.sub.unsubscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
onLayerChanged(layerIndex: number) {
|
onLayerChanged(layerIndex: number) {
|
||||||
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
|
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
|
||||||
}
|
}
|
||||||
@@ -36,13 +30,4 @@ export class SelectedItemShapeComponent extends AbstractSelectedItemComponent im
|
|||||||
layer(layers:any,layerIndex:number) {
|
layer(layers:any,layerIndex:number) {
|
||||||
return layers.find(l => l.index == layerIndex);
|
return layers.find(l => l.index == layerIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
download(event:MouseEvent,item:IItem,layers:any,layerIndex:number) {
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
const itemLink : IItemLinkType = {itemcode:item.code,query:`layer=${this.layer(layers,layerIndex).name}`,pathsuffix:"download", validminutes:10}
|
|
||||||
this.sub = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
|
|
||||||
window.location.href = itemLinkUrl.url;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -7,46 +7,43 @@
|
|||||||
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="item?.data.layers;let layers">
|
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||||
<div class="legend-container">
|
|
||||||
<div class="card menu-card">
|
|
||||||
<h5><span i18n>Date</span>: {{temporalService.selectedDate(itemLayer)}}</h5>
|
|
||||||
<div class="d-flex justify-content-between">
|
|
||||||
<div>
|
|
||||||
<button *ngIf="temporalService.hasPrevious(itemLayer)" type="button" class="btn btn-link p-0" (click)="handlePreviousTemporal($event)">
|
|
||||||
<i class="fal fa-arrow-circle-left" aria-hidden="true" i18n-title title="Previous"></i> {{ temporalService.previousDate(itemLayer) }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button *ngIf="temporalService.hasNext(itemLayer)" type="button" class="btn btn-link p-0" (click)="handleNextTemporal($event)">
|
|
||||||
{{ temporalService.nextDate(itemLayer)}} <i class="fal fa-arrow-circle-right" aria-hidden="true" i18n-title title="Next"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<fm-map-zoom-to-show-alert [layer]="currentItemLayer()?.layer"></fm-map-zoom-to-show-alert>
|
|
||||||
</div>
|
|
||||||
<div class="card menu-card pt-2">
|
|
||||||
<div *ngIf="layers.length>1">
|
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
|
||||||
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<fm-map-layer-legend [showTitle]="layers.length == 1"
|
|
||||||
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card menu-card">
|
<div class="card menu-card">
|
||||||
<ul class="p-0 mt-2">
|
<h5><span i18n>Date</span>: {{temporalService.selectedDate(itemLayer)}}</h5>
|
||||||
<li *ngIf="item.isEditable"><a href="#" class="mt-1 me-1" (click)="handleOnEdit(item)"><i class="fal fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
<div class="d-flex justify-content-between">
|
||||||
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
<div>
|
||||||
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
<button *ngIf="temporalService.hasPrevious(itemLayer)" type="button" class="btn btn-link p-0" (click)="handlePreviousTemporal($event)">
|
||||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
<i class="fal fa-arrow-circle-left" aria-hidden="true" i18n-title title="Previous"></i> {{ temporalService.previousDate(itemLayer) }}
|
||||||
</ng-container>
|
</button>
|
||||||
<li><a href="#" (click)="handleGoToChart(item)"><i class="fal fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i> <span i18n>Show chart</span></a></li>
|
</div>
|
||||||
<li><a href="#" (click)="download($event,item,layers,itemLayer.layerIndex)"><i class="fal fa-download" aria-hidden="true" i18n-title title="Download"></i> <span i18n>Download</span></a></li>
|
<div>
|
||||||
</ul>
|
<button *ngIf="temporalService.hasNext(itemLayer)" type="button" class="btn btn-link p-0" (click)="handleNextTemporal($event)">
|
||||||
|
{{ temporalService.nextDate(itemLayer)}} <i class="fal fa-arrow-circle-right" aria-hidden="true" i18n-title title="Next"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<fm-map-zoom-to-show-alert [layer]="currentItemLayer()?.layer"></fm-map-zoom-to-show-alert>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
<div class="card menu-card pt-2">
|
||||||
|
<div *ngIf="layers.length>1">
|
||||||
|
<select (change)="onLayerChanged($event.target.value)">
|
||||||
|
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<fm-map-layer-legend [showTitle]="layers.length == 1"
|
||||||
|
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card menu-card">
|
||||||
|
<ul class="p-0 mt-2">
|
||||||
|
<li *ngIf="item.isEditable"><a href="#" class="mt-1 me-1" (click)="handleOnEdit(item)"><i class="fal fa-pencil" aria-hidden="true" i18n-title title="Edit"></i> <span i18n>Edit</span></a></li>
|
||||||
|
<ng-container *ngIf="itemTypeService.isLayer(item)">
|
||||||
|
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||||
|
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||||
|
</ng-container>
|
||||||
|
<li><a href="#" (click)="handleGoToChart(item)"><i class="fal fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i> <span i18n>Show chart</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,15 +1,16 @@
|
|||||||
|
import { Component, Injectable } from '@angular/core';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Component, Injectable, OnDestroy } from '@angular/core';
|
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { commonReducers, IItem, IItemLinkType, ItemService, ItemTypeService, IUrlType } from '@farmmaps/common';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
import { IItemLayer, ITemporalItemLayer } from '../../models/item.layer';
|
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { TemporalService } from '../../services/temporal.service';
|
import { commonReducers, ItemTypeService, IItem } from '@farmmaps/common';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
|
import { ITemporalItemLayer} from '../../models/item.layer';
|
||||||
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import { IItemLayer } from '../../models/item.layer';
|
||||||
|
import {TemporalService} from '../../services/temporal.service';
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.temporal")
|
@ForItemType("vnd.farmmaps.itemtype.temporal")
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -18,15 +19,10 @@ import { AbstractSelectedItemComponent } from '../selected-item/selected-item.co
|
|||||||
templateUrl: './selected-item-temporal.component.html',
|
templateUrl: './selected-item-temporal.component.html',
|
||||||
styleUrls: ['./selected-item-temporal.component.scss']
|
styleUrls: ['./selected-item-temporal.component.scss']
|
||||||
})
|
})
|
||||||
export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent implements OnDestroy {
|
export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent {
|
||||||
sub: Subscription;
|
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router,public temporalService:TemporalService) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router,public temporalService:TemporalService) {
|
||||||
super(store, itemTypeService,itemService,location,router);
|
super(store, itemTypeService,location,router);
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
|
||||||
if (this.sub) this.sub.unsubscribe();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onLayerChanged(layerIndex: number) {
|
onLayerChanged(layerIndex: number) {
|
||||||
@@ -37,6 +33,8 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
|
|||||||
return (this.itemLayer as ITemporalItemLayer)?.selectedItemLayer
|
return (this.itemLayer as ITemporalItemLayer)?.selectedItemLayer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleNextTemporal(event:MouseEvent) {
|
handleNextTemporal(event:MouseEvent) {
|
||||||
this.store.dispatch(new mapActions.NextTemporal());
|
this.store.dispatch(new mapActions.NextTemporal());
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -63,13 +61,4 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
|
|||||||
this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]);
|
this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
download(event:MouseEvent,item:IItem,layers:any,layerIndex:number) {
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
const itemLink : IItemLinkType = {itemcode:item.code,query:`layer=${this.layer(layers,layerIndex).name}`,pathsuffix:"download", validminutes:10}
|
|
||||||
this.sub = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
|
|
||||||
window.location.href = itemLinkUrl.url;
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@ import {Component, Injectable, Input, Directive} from '@angular/core';
|
|||||||
import {Location} from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
import {Store} from '@ngrx/store';
|
import {Store} from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import {AppConfig, commonReducers, IItem, ItemService, ItemTypeService} from '@farmmaps/common';
|
import {AppConfig, commonReducers, IItem, ItemTypeService} from '@farmmaps/common';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import { IItemLayer } from '../../models/item.layer';
|
import { IItemLayer } from '../../models/item.layer';
|
||||||
@@ -15,7 +15,7 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
@Input() parentItem: IItem;
|
@Input() parentItem: IItem;
|
||||||
@Input() itemLayer: IItemLayer;
|
@Input() itemLayer: IItemLayer;
|
||||||
@Input() overlayLayers: Array<IItemLayer>;
|
@Input() overlayLayers: Array<IItemLayer>;
|
||||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, public itemService: ItemService, private location: Location, public router: Router) {
|
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location, public router: Router) {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOnView(item: IItem) {
|
handleOnView(item: IItem) {
|
||||||
@@ -37,11 +37,6 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOnDelete(item: IItem) {
|
|
||||||
this.itemService.deleteItem(item.code);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
handleAddAsLayer(item: IItem,layerIndex = -1) {
|
handleAddAsLayer(item: IItem,layerIndex = -1) {
|
||||||
this.store.dispatch(new mapActions.AddLayer(item,layerIndex));
|
this.store.dispatch(new mapActions.AddLayer(item,layerIndex));
|
||||||
return false;
|
return false;
|
||||||
@@ -81,8 +76,8 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
})
|
})
|
||||||
export class SelectedItemComponent extends AbstractSelectedItemComponent {
|
export class SelectedItemComponent extends AbstractSelectedItemComponent {
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, itemService: ItemService, location: Location, router: Router, public config:AppConfig) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, public config:AppConfig) {
|
||||||
super(store, itemTypeService,itemService,location,router);
|
super(store, itemTypeService,location,router);
|
||||||
}
|
}
|
||||||
|
|
||||||
getThumbnailUrl(item:IItem):string {
|
getThumbnailUrl(item:IItem):string {
|
||||||
|
@@ -1,35 +1,34 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
import { Store, Action, createFeatureSelector } from '@ngrx/store';
|
import { Actions, createEffect, ofType } from '@ngrx/effects';
|
||||||
import { ROUTER_NAVIGATED, RouterReducerState } from '@ngrx/router-store';
|
|
||||||
import * as fromRouter from '@ngrx/router-store';
|
import * as fromRouter from '@ngrx/router-store';
|
||||||
import { createEffect, Actions, ofType } from '@ngrx/effects';
|
import { ROUTER_NAVIGATED, RouterReducerState } from '@ngrx/router-store';
|
||||||
|
import { Action, Store, createFeatureSelector } from '@ngrx/store';
|
||||||
|
|
||||||
import { EMPTY, Observable, of } from 'rxjs';
|
import { EMPTY, Observable, of } from 'rxjs';
|
||||||
import { withLatestFrom, switchMap, map, catchError, mergeMap } from 'rxjs/operators';
|
import { catchError, map, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators';
|
||||||
|
|
||||||
import { GeoJSON, WKT } from 'ol/format';
|
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { getCenter, createEmpty, extend } from 'ol/extent';
|
import { createEmpty, extend, getCenter } from 'ol/extent';
|
||||||
import { Point, Geometry } from 'ol/geom'
|
import { GeoJSON, WKT } from 'ol/format';
|
||||||
|
import { Geometry, Point } from 'ol/geom';
|
||||||
|
|
||||||
|
|
||||||
|
import { commonReducers } from '@farmmaps/common';
|
||||||
import * as mapActions from '../actions/map.actions';
|
import * as mapActions from '../actions/map.actions';
|
||||||
import * as mapReducers from '../reducers/map.reducer';
|
import * as mapReducers from '../reducers/map.reducer';
|
||||||
import { commonReducers } from '@farmmaps/common';
|
|
||||||
|
|
||||||
import { commonActions } from '@farmmaps/common';
|
import { commonActions } from '@farmmaps/common';
|
||||||
|
|
||||||
import { IItem } from '@farmmaps/common';
|
import { IItem, ItemService } from '@farmmaps/common';
|
||||||
import { FolderService, ItemService } from '@farmmaps/common';
|
|
||||||
import { tassign } from 'tassign';
|
import { tassign } from 'tassign';
|
||||||
|
|
||||||
import { FeatureIconService } from '../services/feature-icon.service';
|
import { FeatureIconService } from '../services/feature-icon.service';
|
||||||
|
|
||||||
import * as style from 'ol/style';
|
import * as style from 'ol/style';
|
||||||
|
|
||||||
import { ItemTypeService, IQueryState } from '@farmmaps/common';
|
import { IQueryState } from '@farmmaps/common';
|
||||||
import { TemporalItemLayer } from '../models/item.layer'
|
import { TemporalItemLayer } from '../models/item.layer';
|
||||||
|
|
||||||
export const getRouterState = createFeatureSelector<RouterReducerState>('router');
|
export const getRouterState = createFeatureSelector<RouterReducerState>('router');
|
||||||
|
|
||||||
@@ -65,7 +64,7 @@ export class MapEffects {
|
|||||||
init$ = createEffect(() => this.actions$.pipe(
|
init$ = createEffect(() => this.actions$.pipe(
|
||||||
ofType(mapActions.INIT),
|
ofType(mapActions.INIT),
|
||||||
withLatestFrom(this.store$.select(commonReducers.selectGetRootItems)),
|
withLatestFrom(this.store$.select(commonReducers.selectGetRootItems)),
|
||||||
switchMap(([action, rootItems]) => {
|
switchMap(([, rootItems]) => {
|
||||||
const actions = [];
|
const actions = [];
|
||||||
for (const rootItem of rootItems) {
|
for (const rootItem of rootItems) {
|
||||||
if (rootItem.itemType == "UPLOADS_FOLDER") actions.push(new mapActions.SetParent(rootItem.code));
|
if (rootItem.itemType == "UPLOADS_FOLDER") actions.push(new mapActions.SetParent(rootItem.code));
|
||||||
@@ -107,12 +106,12 @@ export class MapEffects {
|
|||||||
initBaseLayers$ = createEffect(() => this.actions$.pipe(
|
initBaseLayers$ = createEffect(() => this.actions$.pipe(
|
||||||
ofType(mapActions.INIT),
|
ofType(mapActions.INIT),
|
||||||
withLatestFrom(this.store$.select(mapReducers.selectGetProjection)),
|
withLatestFrom(this.store$.select(mapReducers.selectGetProjection)),
|
||||||
map(([action, projection]) => new mapActions.LoadBaseLayers(projection)))
|
map(([, projection]) => new mapActions.LoadBaseLayers(projection)))
|
||||||
);
|
);
|
||||||
|
|
||||||
loadBaseLayers$ = createEffect(() => this.actions$.pipe(
|
loadBaseLayers$ = createEffect(() => this.actions$.pipe(
|
||||||
ofType(mapActions.LOADBASELAYERS),
|
ofType(mapActions.LOADBASELAYERS),
|
||||||
switchMap((action: mapActions.LoadBaseLayers) => {
|
switchMap(() => {
|
||||||
return this.itemService$.getItemList("vnd.farmmaps.itemtype.layer", { "isBaseLayer": true }).pipe(
|
return this.itemService$.getItemList("vnd.farmmaps.itemtype.layer", { "isBaseLayer": true }).pipe(
|
||||||
map((items: IItem[]) => new mapActions.LoadBaseLayersSuccess(items)),
|
map((items: IItem[]) => new mapActions.LoadBaseLayersSuccess(items)),
|
||||||
catchError(error => of(new commonActions.Fail(error))));
|
catchError(error => of(new commonActions.Fail(error))));
|
||||||
@@ -178,7 +177,7 @@ export class MapEffects {
|
|||||||
|
|
||||||
hideMenu$ = createEffect(() => this.actions$.pipe(
|
hideMenu$ = createEffect(() => this.actions$.pipe(
|
||||||
ofType(mapActions.STARTSEARCHSUCCESS),
|
ofType(mapActions.STARTSEARCHSUCCESS),
|
||||||
mergeMap((action: mapActions.StartSearchSuccess) => {
|
mergeMap(() => {
|
||||||
return of(new commonActions.SetMenuVisible(false));
|
return of(new commonActions.SetMenuVisible(false));
|
||||||
})));
|
})));
|
||||||
|
|
||||||
@@ -336,7 +335,7 @@ export class MapEffects {
|
|||||||
ofType(mapActions.ADDLAYER, mapActions.REMOVELAYER, mapActions.SELECTITEMSUCCESS, mapActions.SELECTTEMPORALITEMSSUCCESS, mapActions.NEXTTEMPORAL, mapActions.PREVIOUSTEMPORAL, mapActions.TOGGLELAYERVALUESENABLED, mapActions.SETLAYERINDEX, mapActions.SETSELECTEDITEMLAYER),
|
ofType(mapActions.ADDLAYER, mapActions.REMOVELAYER, mapActions.SELECTITEMSUCCESS, mapActions.SELECTTEMPORALITEMSSUCCESS, mapActions.NEXTTEMPORAL, mapActions.PREVIOUSTEMPORAL, mapActions.TOGGLELAYERVALUESENABLED, mapActions.SETLAYERINDEX, mapActions.SETSELECTEDITEMLAYER),
|
||||||
withLatestFrom(this.store$.select(mapReducers.selectGetLayerValuesX)),
|
withLatestFrom(this.store$.select(mapReducers.selectGetLayerValuesX)),
|
||||||
withLatestFrom(this.store$.select(mapReducers.selectGetLayerValuesY)),
|
withLatestFrom(this.store$.select(mapReducers.selectGetLayerValuesY)),
|
||||||
map(([[action, x], y]) => new mapActions.SetLayerValuesLocation(x, y))
|
map(([[, x], y]) => new mapActions.SetLayerValuesLocation(x, y))
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
@@ -402,7 +401,7 @@ export class MapEffects {
|
|||||||
})
|
})
|
||||||
));
|
));
|
||||||
|
|
||||||
constructor(private actions$: Actions, private store$: Store<mapReducers.State>, private folderService$: FolderService, private itemService$: ItemService, private featureIconService$: FeatureIconService, private itemTypeService$: ItemTypeService) {
|
constructor(private actions$: Actions, private store$: Store<mapReducers.State>, private itemService$: ItemService, private featureIconService$: FeatureIconService) {
|
||||||
this._geojsonFormat = new GeoJSON();
|
this._geojsonFormat = new GeoJSON();
|
||||||
this._wktFormat = new WKT();
|
this._wktFormat = new WKT();
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { IItem,IListItem } from '@farmmaps/common';
|
import { IItem } from '@farmmaps/common';
|
||||||
import {Layer} from 'ol/layer';
|
import { Layer } from 'ol/layer';
|
||||||
import { Source } from 'ol/source';
|
import { Source } from 'ol/source';
|
||||||
|
|
||||||
export interface IItemLayer {
|
export interface IItemLayer {
|
||||||
|
@@ -1,21 +1,15 @@
|
|||||||
import { tassign } from 'tassign';
|
import { IItem, IQueryState, commonActions } from '@farmmaps/common';
|
||||||
import { IItem,Item } from '@farmmaps/common';
|
|
||||||
import { IItemLayer,ItemLayer,ITemporalItemLayer,TemporalItemLayer} from '../models/item.layer';
|
|
||||||
import { IMapState} from '../models/map.state';
|
|
||||||
import { IQueryState} from '@farmmaps/common';
|
|
||||||
import { IPeriodState } from '../models/period.state';
|
|
||||||
import { IStyles} from '../models/style.cache';
|
|
||||||
import { ILayervalue } from '../models/layer.value';
|
|
||||||
import * as mapActions from '../actions/map.actions';
|
|
||||||
import {commonActions} from '@farmmaps/common';
|
|
||||||
import { createSelector, createFeatureSelector } from '@ngrx/store';
|
|
||||||
|
|
||||||
import {Feature} from 'ol';
|
|
||||||
import {Geometry} from 'ol/geom';
|
|
||||||
|
|
||||||
|
|
||||||
import { ROUTER_NAVIGATION, RouterNavigationAction } from '@ngrx/router-store';
|
import { ROUTER_NAVIGATION, RouterNavigationAction } from '@ngrx/router-store';
|
||||||
|
import { createFeatureSelector, createSelector } from '@ngrx/store';
|
||||||
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
|
import { tassign } from 'tassign';
|
||||||
|
import * as mapActions from '../actions/map.actions';
|
||||||
|
import { IItemLayer, ITemporalItemLayer, ItemLayer, TemporalItemLayer } from '../models/item.layer';
|
||||||
|
import { ILayervalue } from '../models/layer.value';
|
||||||
|
import { IMapState } from '../models/map.state';
|
||||||
|
import { IPeriodState } from '../models/period.state';
|
||||||
|
import { IStyles } from '../models/style.cache';
|
||||||
import { MODULE_NAME } from '../module-name';
|
import { MODULE_NAME } from '../module-name';
|
||||||
|
|
||||||
const startDate:Date = new Date(new Date(Date.now()).getFullYear(), new Date(Date.now()).getMonth() - 3, 1);
|
const startDate:Date = new Date(new Date(Date.now()).getFullYear(), new Date(Date.now()).getMonth() - 3, 1);
|
||||||
@@ -125,7 +119,6 @@ export const initialState: State = {
|
|||||||
export function reducer(state = initialState, action: mapActions.Actions | commonActions.Actions | RouterNavigationAction): State {
|
export function reducer(state = initialState, action: mapActions.Actions | commonActions.Actions | RouterNavigationAction): State {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case ROUTER_NAVIGATION: {
|
case ROUTER_NAVIGATION: {
|
||||||
const a = action as RouterNavigationAction;
|
|
||||||
return tassign(state);
|
return tassign(state);
|
||||||
}
|
}
|
||||||
case mapActions.SETMAPSTATE: {
|
case mapActions.SETMAPSTATE: {
|
||||||
@@ -287,9 +280,6 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case mapActions.SELECTTEMPORAL:{
|
|
||||||
//todo implement
|
|
||||||
}
|
|
||||||
case mapActions.STARTSEARCH: {
|
case mapActions.STARTSEARCH: {
|
||||||
const a = action as mapActions.StartSearch;
|
const a = action as mapActions.StartSearch;
|
||||||
const panelVisible = a.queryState.itemCode!=null ||a.queryState.itemType!=null||a.queryState.parentCode!=null || a.queryState.query != null || a.queryState.tags != null;
|
const panelVisible = a.queryState.itemCode!=null ||a.queryState.itemType!=null||a.queryState.parentCode!=null || a.queryState.query != null || a.queryState.tags != null;
|
||||||
@@ -338,8 +328,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
case mapActions.UPDATEFEATURESUCCESS: {
|
case mapActions.UPDATEFEATURESUCCESS: {
|
||||||
const a = action as mapActions.UpdateFeatureSuccess;
|
const a = action as mapActions.UpdateFeatureSuccess;
|
||||||
const features: any[] = [];
|
const features: any[] = [];
|
||||||
var index = -1;
|
for (let i = 0; i < state.features.length; i++) {
|
||||||
for (var i = 0; i < state.features.length; i++) {
|
|
||||||
if (state.features[i].getId() == a.feature.getId()) {
|
if (state.features[i].getId() == a.feature.getId()) {
|
||||||
features.push(a.feature);
|
features.push(a.feature);
|
||||||
} else {
|
} else {
|
||||||
@@ -419,7 +408,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
const a = action as mapActions.SetLayerIndex;
|
const a = action as mapActions.SetLayerIndex;
|
||||||
if (a.itemLayer == null) {
|
if (a.itemLayer == null) {
|
||||||
if(state.selectedItemLayer.item.itemType == "vnd.farmmaps.itemtype.temporal") {
|
if(state.selectedItemLayer.item.itemType == "vnd.farmmaps.itemtype.temporal") {
|
||||||
var newItemlayer = tassign(state.selectedItemLayer,{layerIndex:a.layerIndex});
|
const newItemlayer = tassign(state.selectedItemLayer,{layerIndex:a.layerIndex});
|
||||||
const tl = newItemlayer as ITemporalItemLayer;
|
const tl = newItemlayer as ITemporalItemLayer;
|
||||||
if(tl.previousItemLayer) {
|
if(tl.previousItemLayer) {
|
||||||
const nl = new ItemLayer(tl.previousItemLayer.item);
|
const nl = new ItemLayer(tl.previousItemLayer.item);
|
||||||
@@ -443,6 +432,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
tl.nextItemLayer = nl;
|
tl.nextItemLayer = nl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// eslint-disable-next-line no-var
|
||||||
var newItemlayer = new ItemLayer(state.selectedItemLayer.item);
|
var newItemlayer = new ItemLayer(state.selectedItemLayer.item);
|
||||||
newItemlayer.layerIndex = a.layerIndex;
|
newItemlayer.layerIndex = a.layerIndex;
|
||||||
|
|
||||||
@@ -464,7 +454,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
baseLayers.push(l);
|
baseLayers.push(l);
|
||||||
}
|
}
|
||||||
let selectedBaseLayer: IItemLayer = null;
|
let selectedBaseLayer: IItemLayer = null;
|
||||||
var mapState = tassign(state.mapState);
|
const mapState = tassign(state.mapState);
|
||||||
const sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode);
|
const sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode);
|
||||||
const db = baseLayers.filter(layer => layer.item.data && layer.item.data.default === true);
|
const db = baseLayers.filter(layer => layer.item.data && layer.item.data.default === true);
|
||||||
if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb.length>0) {
|
if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb.length>0) {
|
||||||
@@ -486,7 +476,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
baseLayers.forEach((l) => l.visible = false);
|
baseLayers.forEach((l) => l.visible = false);
|
||||||
const i = state.baseLayers.indexOf(a.itemLayer);
|
const i = state.baseLayers.indexOf(a.itemLayer);
|
||||||
baseLayers[i].visible = true;
|
baseLayers[i].visible = true;
|
||||||
var mapState = tassign(state.mapState);
|
const mapState = tassign(state.mapState);
|
||||||
mapState.baseLayerCode = a.itemLayer.item.code;
|
mapState.baseLayerCode = a.itemLayer.item.code;
|
||||||
return tassign(state, {mapState:mapState, baseLayers:baseLayers,selectedBaseLayer:a.itemLayer });
|
return tassign(state, {mapState:mapState, baseLayers:baseLayers,selectedBaseLayer:a.itemLayer });
|
||||||
}
|
}
|
||||||
@@ -560,8 +550,8 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(state.features.length>0) {
|
if(state.features.length>0) {
|
||||||
var index = -1;
|
let index = -1;
|
||||||
for (var i = 0; i < state.features.length; i++) {
|
for (let i = 0; i < state.features.length; i++) {
|
||||||
if (state.features[i].getId() == a.itemCode ) {
|
if (state.features[i].getId() == a.itemCode ) {
|
||||||
index=i;
|
index=i;
|
||||||
}
|
}
|
||||||
@@ -637,8 +627,6 @@ export const selectGetExtent = createSelector(selectMapState, getExtent);
|
|||||||
export const selectGetViewExtent = createSelector(selectMapState, getViewExtent);
|
export const selectGetViewExtent = createSelector(selectMapState, getViewExtent);
|
||||||
export const selectGetOverlayLayers = createSelector(selectMapState, getOverlayLayers);
|
export const selectGetOverlayLayers = createSelector(selectMapState, getOverlayLayers);
|
||||||
export const selectGetBaseLayers = createSelector(selectMapState, getBaseLayers);
|
export const selectGetBaseLayers = createSelector(selectMapState, getBaseLayers);
|
||||||
export const selectGetBaseMaps = createSelector(selectGetBaseLayers, (layers) => layers.filter(layer => layer.item.data.category === "baseMap"));
|
|
||||||
export const selectGetArealMaps = createSelector(selectGetBaseLayers, (layers) => layers.filter(layer => layer.item.data.category === "aerialPhoto").sort((a, b) => a.item.dataDate <= b.item.dataDate ? 1 : -1));
|
|
||||||
export const selectGetProjection = createSelector(selectMapState, getProjection);
|
export const selectGetProjection = createSelector(selectMapState, getProjection);
|
||||||
export const selectGetSelectedBaseLayer = createSelector(selectMapState, getSelectedBaseLayer);
|
export const selectGetSelectedBaseLayer = createSelector(selectMapState, getSelectedBaseLayer);
|
||||||
export const selectGetSelectedOverlayLayer = createSelector(selectMapState, getSelectedOverlayLayer);
|
export const selectGetSelectedOverlayLayer = createSelector(selectMapState, getSelectedOverlayLayer);
|
||||||
|
@@ -15,7 +15,6 @@ export class DeviceOrientationService {
|
|||||||
// Calculate equation components
|
// Calculate equation components
|
||||||
const cA = Math.cos(alphaRad);
|
const cA = Math.cos(alphaRad);
|
||||||
const sA = Math.sin(alphaRad);
|
const sA = Math.sin(alphaRad);
|
||||||
const cB = Math.cos(betaRad);
|
|
||||||
const sB = Math.sin(betaRad);
|
const sB = Math.sin(betaRad);
|
||||||
const cG = Math.cos(gammaRad);
|
const cG = Math.cos(gammaRad);
|
||||||
const sG = Math.sin(gammaRad);
|
const sG = Math.sin(gammaRad);
|
||||||
@@ -23,7 +22,6 @@ export class DeviceOrientationService {
|
|||||||
// Calculate A, B, C rotation components
|
// Calculate A, B, C rotation components
|
||||||
const rA = - cA * sG - sA * sB * cG;
|
const rA = - cA * sG - sA * sB * cG;
|
||||||
const rB = - sA * sG + cA * sB * cG;
|
const rB = - sA * sG + cA * sB * cG;
|
||||||
const rC = - cB * cG;
|
|
||||||
|
|
||||||
// Calculate compass heading
|
// Calculate compass heading
|
||||||
let compassHeading = Math.atan(rA / rB);
|
let compassHeading = Math.atan(rA / rB);
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
import { Injectable} from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
|
||||||
import { Point } from 'ol/geom';
|
|
||||||
import * as extent from 'ol/extent';
|
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FeatureIconService {
|
export class FeatureIconService {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observer, Observable,BehaviorSubject } from 'rxjs';
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GeolocationService class.
|
* GeolocationService class.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Injectable} from '@angular/core';
|
import { DatePipe } from '@angular/common';
|
||||||
import {DatePipe} from '@angular/common';
|
import { Injectable } from '@angular/core';
|
||||||
import {TimespanService} from '@farmmaps/common';
|
import { TimespanService } from '@farmmaps/common';
|
||||||
import { IItemLayer, ITemporalItemLayer,TemporalItemLayer} from '../models/item.layer';
|
import { IItemLayer, ITemporalItemLayer } from '../models/item.layer';
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@@ -22,7 +22,9 @@
|
|||||||
"node_modules/@angular/*"
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
|
@@ -22,7 +22,9 @@
|
|||||||
"node_modules/@angular/*"
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
|
@@ -18,5 +18,6 @@ module.exports = {
|
|||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
546
projects/common-map3d/package-lock.json
generated
546
projects/common-map3d/package-lock.json
generated
@@ -11,555 +11,17 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": "^18.2.3",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/core": "^18.2.3",
|
"@angular/core": "^17.3.3",
|
||||||
"cesium": "^1.97.0",
|
"cesium": ">=1.82.1",
|
||||||
|
"ng-openlayers": "17.1.3",
|
||||||
"ol-cesium": ">=2.13.0"
|
"ol-cesium": ">=2.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../../dist/libs/ng-openlayers": {
|
|
||||||
"version": "18.0.0",
|
|
||||||
"extraneous": true,
|
|
||||||
"license": "MPL-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": "^18.2.3",
|
|
||||||
"@angular/core": "^18.2.3",
|
|
||||||
"ol": "^8.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dist/ng-openlayers": {
|
|
||||||
"extraneous": true
|
|
||||||
},
|
|
||||||
"node_modules/@angular/common": {
|
|
||||||
"version": "18.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/common/-/common-18.2.3.tgz",
|
|
||||||
"integrity": "sha512-NFL4yXXImSCH7i1xnHykUjHa9vl9827fGiwSV2mnf7LjSUsyDzFD8/54dNuYN9OY8AUD+PnK0YdNro6cczVyIA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/core": "18.2.3",
|
|
||||||
"rxjs": "^6.5.3 || ^7.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@angular/core": {
|
|
||||||
"version": "18.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@angular/core/-/core-18.2.3.tgz",
|
|
||||||
"integrity": "sha512-VGhMJxj7d0rYpqVfQrcGRB7EE/BCziotft/I/YPl6bOMPSAvMukG7DXQuJdYpNrr62ks78mlzHlZX/cdmB9Prw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"rxjs": "^6.5.3 || ^7.4.0",
|
|
||||||
"zone.js": "~0.14.10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@cesium/engine": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@cesium/engine/-/engine-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-0z3mJNNly407h3/bAvGoGnjA0ygprkVz32z9x1VNmPXf9AuybKu7Q4wRrChUhC/qsNj3L45kP6KqyDuHSe2bhw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@tweenjs/tween.js": "^25.0.0",
|
|
||||||
"@zip.js/zip.js": "^2.7.34",
|
|
||||||
"autolinker": "^4.0.0",
|
|
||||||
"bitmap-sdf": "^1.0.3",
|
|
||||||
"dompurify": "^3.0.2",
|
|
||||||
"draco3d": "^1.5.1",
|
|
||||||
"earcut": "^3.0.0",
|
|
||||||
"grapheme-splitter": "^1.0.4",
|
|
||||||
"jsep": "^1.3.8",
|
|
||||||
"kdbush": "^4.0.1",
|
|
||||||
"ktx-parse": "^0.7.0",
|
|
||||||
"lerc": "^2.0.0",
|
|
||||||
"mersenne-twister": "^1.1.0",
|
|
||||||
"meshoptimizer": "^0.21.0",
|
|
||||||
"pako": "^2.0.4",
|
|
||||||
"protobufjs": "^7.1.0",
|
|
||||||
"rbush": "^4.0.0",
|
|
||||||
"topojson-client": "^3.1.0",
|
|
||||||
"urijs": "^1.19.7"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@cesium/widgets": {
|
|
||||||
"version": "8.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@cesium/widgets/-/widgets-8.0.0.tgz",
|
|
||||||
"integrity": "sha512-Rnid5BbLBZjwFdbr3lgOwK3fhql/BeEbf5l9ZZE+Zc7V8Fb6wgKM8QmrL+bbJ+BtuiELp+SkNxcF97Ktifxb4g==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@cesium/engine": "^11.0.0",
|
|
||||||
"nosleep.js": "^0.12.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@petamoriken/float16": {
|
|
||||||
"version": "3.8.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.7.tgz",
|
|
||||||
"integrity": "sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/aspromise": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/base64": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/codegen": {
|
|
||||||
"version": "2.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
|
||||||
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/eventemitter": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/fetch": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@protobufjs/aspromise": "^1.1.1",
|
|
||||||
"@protobufjs/inquire": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/float": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/inquire": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/path": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
|
||||||
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/pool": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@protobufjs/utf8": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@tweenjs/tween.js": {
|
|
||||||
"version": "25.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-25.0.0.tgz",
|
|
||||||
"integrity": "sha512-XKLA6syeBUaPzx4j3qwMqzzq+V4uo72BnlbOjmuljLrRqdsd3qnzvZZoxvMHZ23ndsRS4aufU6JOZYpCbU6T1A==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
|
||||||
"version": "22.5.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz",
|
|
||||||
"integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"undici-types": "~6.19.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/rbush": {
|
|
||||||
"version": "3.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/rbush/-/rbush-3.0.4.tgz",
|
|
||||||
"integrity": "sha512-knSt9cCW8jj1ZSFcFeBZaX++OucmfPxxHiRwTahZfJlnQsek7O0bazTJHWD2RVj9LEoejUYF2de3/stf+QXcXw==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@zip.js/zip.js": {
|
|
||||||
"version": "2.7.52",
|
|
||||||
"resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.52.tgz",
|
|
||||||
"integrity": "sha512-+5g7FQswvrCHwYKNMd/KFxZSObctLSsQOgqBSi0LzwHo3li9Eh1w5cF5ndjQw9Zbr3ajVnd2+XyiX85gAetx1Q==",
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
|
||||||
"bun": ">=0.7.0",
|
|
||||||
"deno": ">=1.0.0",
|
|
||||||
"node": ">=16.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/autolinker": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/autolinker/-/autolinker-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-fl5Kh6BmEEZx+IWBfEirnRUU5+cOiV0OK7PEt0RBKvJMJ8GaRseIOeDU3FKf4j3CE5HVefcjHmhYPOcaVt0bZw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/bitmap-sdf": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/bitmap-sdf/-/bitmap-sdf-1.0.4.tgz",
|
|
||||||
"integrity": "sha512-1G3U4n5JE6RAiALMxu0p1XmeZkTeCwGKykzsLTCqVzfSDaN6S7fKnkIkfejogz+iwqBWc0UYAIKnKHNN7pSfDg==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/cesium": {
|
|
||||||
"version": "1.121.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/cesium/-/cesium-1.121.1.tgz",
|
|
||||||
"integrity": "sha512-WpdaGFd8qCOHiE9khV0sWWjCMXAX1U9Aou8MzMC/F0Akp6YqcOk4HLk4LLhZKeOjO/Bh27iTIW2mxEZ5+dtCxg==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@cesium/engine": "^11.0.0",
|
|
||||||
"@cesium/widgets": "^8.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=18.18.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/color-name": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==",
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.20"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/color-parse": {
|
|
||||||
"version": "2.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-parse/-/color-parse-2.0.2.tgz",
|
|
||||||
"integrity": "sha512-eCtOz5w5ttWIUcaKLiktF+DxZO1R9KLNY/xhbV6CkhM7sR3GhVghmt6X6yOnzeaM24po+Z9/S1apbXMwA3Iepw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"color-name": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/color-rgba": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"color-parse": "^2.0.0",
|
|
||||||
"color-space": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/color-space": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-space/-/color-space-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/commander": {
|
|
||||||
"version": "2.20.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
|
||||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/dompurify": {
|
|
||||||
"version": "3.1.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz",
|
|
||||||
"integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/draco3d": {
|
|
||||||
"version": "1.5.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz",
|
|
||||||
"integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/earcut": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-41Fs7Q/PLq1SDbqjsgcY7GA42T0jvaCNGXgGtsNdvg+Yv8eIu06bxv4/PoREkZ9nMDNwnUSG9OFB9+yv8eKhDg==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/geotiff": {
|
|
||||||
"version": "2.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/geotiff/-/geotiff-2.1.3.tgz",
|
|
||||||
"integrity": "sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@petamoriken/float16": "^3.4.7",
|
|
||||||
"lerc": "^3.0.0",
|
|
||||||
"pako": "^2.0.4",
|
|
||||||
"parse-headers": "^2.0.2",
|
|
||||||
"quick-lru": "^6.1.1",
|
|
||||||
"web-worker": "^1.2.0",
|
|
||||||
"xml-utils": "^1.0.2",
|
|
||||||
"zstddec": "^0.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.19"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/geotiff/node_modules/lerc": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/grapheme-splitter": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
|
|
||||||
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/jsep": {
|
|
||||||
"version": "1.3.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.9.tgz",
|
|
||||||
"integrity": "sha512-i1rBX5N7VPl0eYb6+mHNp52sEuaS2Wi8CDYx1X5sn9naevL78+265XJqy1qENEk7mRKwS06NHpUqiBwR7qeodw==",
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10.16.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/kdbush": {
|
|
||||||
"version": "4.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz",
|
|
||||||
"integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/ktx-parse": {
|
|
||||||
"version": "0.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ktx-parse/-/ktx-parse-0.7.1.tgz",
|
|
||||||
"integrity": "sha512-FeA3g56ksdFNwjXJJsc1CCc7co+AJYDp6ipIp878zZ2bU8kWROatLYf39TQEd4/XRSUvBXovQ8gaVKWPXsCLEQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/lerc": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lerc/-/lerc-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-7qo1Mq8ZNmaR4USHHm615nEW2lPeeWJ3bTyoqFbd35DLx0LUH7C6ptt5FDCTAlbIzs3+WKrk5SkJvw8AFDE2hg==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/long": {
|
|
||||||
"version": "5.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
|
||||||
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/mersenne-twister": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mersenne-twister/-/mersenne-twister-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-mUYWsMKNrm4lfygPkL3OfGzOPTR2DBlTkBNHM//F6hGp8cLThY897crAlk3/Jo17LEOOjQUrNAx6DvgO77QJkA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/meshoptimizer": {
|
|
||||||
"version": "0.21.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.21.0.tgz",
|
|
||||||
"integrity": "sha512-WabtlpnK/GgD0GMwYd1fBTfYHf4MIcQPEg6dt7y4GuDcY51RzLSkSNE8ZogD7U3Vs2/fIf4z89TOLpA80EOnhg==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/nosleep.js": {
|
|
||||||
"version": "0.12.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nosleep.js/-/nosleep.js-0.12.0.tgz",
|
|
||||||
"integrity": "sha512-9d1HbpKLh3sdWlhXMhU6MMH+wQzKkrgfRkYV0EBdvt99YJfj0ilCJrWRDYG2130Tm4GXbEoTCx5b34JSaP+HhA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/ol": {
|
|
||||||
"version": "10.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ol/-/ol-10.1.0.tgz",
|
|
||||||
"integrity": "sha512-/efepydpzhFoeczA9KAN5t7G0WpFhP46ZXEfSl6JbZ7ipQZ2axpkYB2qt0qcOUlPFYMt7/XQFApH652KB08tTg==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@types/rbush": "^3.0.3",
|
|
||||||
"color-rgba": "^3.0.0",
|
|
||||||
"color-space": "^2.0.1",
|
|
||||||
"earcut": "^3.0.0",
|
|
||||||
"geotiff": "^2.0.7",
|
|
||||||
"pbf": "4.0.1",
|
|
||||||
"rbush": "^4.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/openlayers"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ol-cesium": {
|
|
||||||
"version": "2.17.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ol-cesium/-/ol-cesium-2.17.0.tgz",
|
|
||||||
"integrity": "sha512-XaMXjQYuq2eMPAgAx2e1wjN4I4QwfmPC+9YgU4xoMCj/MBj8oDQusyloQ4TaovypqbZg+0jJDDSZc7BhXckBwA==",
|
|
||||||
"peer": true,
|
|
||||||
"peerDependencies": {
|
|
||||||
"cesium": ">= 1.62.0",
|
|
||||||
"ol": ">= 6.0.1 || 7 || 8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/pako": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/parse-headers": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/pbf": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"resolve-protobuf-schema": "^2.1.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"pbf": "bin/pbf"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/protobufjs": {
|
|
||||||
"version": "7.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz",
|
|
||||||
"integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@protobufjs/aspromise": "^1.1.2",
|
|
||||||
"@protobufjs/base64": "^1.1.2",
|
|
||||||
"@protobufjs/codegen": "^2.0.4",
|
|
||||||
"@protobufjs/eventemitter": "^1.1.0",
|
|
||||||
"@protobufjs/fetch": "^1.1.0",
|
|
||||||
"@protobufjs/float": "^1.0.2",
|
|
||||||
"@protobufjs/inquire": "^1.1.0",
|
|
||||||
"@protobufjs/path": "^1.1.2",
|
|
||||||
"@protobufjs/pool": "^1.1.0",
|
|
||||||
"@protobufjs/utf8": "^1.1.0",
|
|
||||||
"@types/node": ">=13.7.0",
|
|
||||||
"long": "^5.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/protocol-buffers-schema": {
|
|
||||||
"version": "3.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
|
|
||||||
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/quick-lru": {
|
|
||||||
"version": "6.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz",
|
|
||||||
"integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==",
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/quickselect": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/rbush": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-IP0UpfeWQujYC8Jg162rMNc01Rf0gWMMAb2Uxus/Q0qOFw4lCcq6ZnQEZwUoJqWyUGJ9th7JjwI4yIWo+uvoAQ==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"quickselect": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/resolve-protobuf-schema": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"protocol-buffers-schema": "^3.3.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/rxjs": {
|
|
||||||
"version": "7.8.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
|
||||||
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/topojson-client": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"commander": "2"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"topo2geo": "bin/topo2geo",
|
|
||||||
"topomerge": "bin/topomerge",
|
|
||||||
"topoquantize": "bin/topoquantize"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
|
||||||
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
|
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
|
||||||
},
|
|
||||||
"node_modules/undici-types": {
|
|
||||||
"version": "6.19.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
|
||||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/urijs": {
|
|
||||||
"version": "1.19.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz",
|
|
||||||
"integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/web-worker": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/xml-utils": {
|
|
||||||
"version": "1.10.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.10.1.tgz",
|
|
||||||
"integrity": "sha512-Dn6vJ1Z9v1tepSjvnCpwk5QqwIPcEFKdgnjqfYOABv1ngSofuAhtlugcUC3ehS1OHdgDWSG6C5mvj+Qm15udTQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/zone.js": {
|
|
||||||
"version": "0.14.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz",
|
|
||||||
"integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/zstddec": {
|
|
||||||
"version": "0.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.1.0.tgz",
|
|
||||||
"integrity": "sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==",
|
|
||||||
"peer": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,13 +4,14 @@
|
|||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^17.3.3",
|
||||||
|
"@angular/core": "^17.3.3",
|
||||||
|
"ng-openlayers": "17.1.3",
|
||||||
|
"cesium": ">=1.82.1",
|
||||||
|
"ol-cesium": ">=2.13.0"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": "18.2.3",
|
|
||||||
"@angular/core": "18.2.3",
|
|
||||||
"cesium": "^1.97.0",
|
|
||||||
"ol-cesium": ">=2.13.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,15 +1,14 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { AppCommonModule } from '@farmmaps/common';
|
|
||||||
import { AppCommonMapModule } from '@farmmaps/common-map';
|
|
||||||
import { AngularOpenlayersModule } from '@farmmaps/ng-openlayers';
|
|
||||||
import { Switch2D3DComponent } from './components/olcs/switch2d3d/switch2d3d.component';
|
import { Switch2D3DComponent } from './components/olcs/switch2d3d/switch2d3d.component';
|
||||||
|
import { AppCommonModule} from '@farmmaps/common';
|
||||||
|
import { AppCommonMapModule} from '@farmmaps/common-map';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [Switch2D3DComponent],
|
declarations: [Switch2D3DComponent],
|
||||||
imports: [
|
imports: [
|
||||||
AppCommonModule,
|
AppCommonModule,
|
||||||
AppCommonMapModule,
|
AppCommonMapModule
|
||||||
AngularOpenlayersModule,
|
|
||||||
],
|
],
|
||||||
exports: [Switch2D3DComponent]
|
exports: [Switch2D3DComponent]
|
||||||
})
|
})
|
||||||
|
@@ -1 +1 @@
|
|||||||
<div *fmHasPackage="'vnd.farmmaps.itemtype.package.3d'" (click)="handleClick($event)" class="btn btn-outline-primary twotreed"><i class="fas fa-spinner fa-spin loading" [ngClass]="{'loading':loading}"></i>{{label}}</div>
|
<div *fmHasPackage="'vnd.farmmaps.itemtype.package.3d'" (click)="handleClick()" class="btn btn-outline-primary twotreed"><i class="fas fa-spinner fa-spin loading" [ngClass]="{'loading':loading}"></i>{{label}}</div>
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import { Component, OnInit,Input,Host } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { Interaction} from 'ol/interaction';
|
import { mapActions, mapReducers } from '@farmmaps/common-map';
|
||||||
import { MapComponent } from '@farmmaps/ng-openlayers';
|
import { Store } from '@ngrx/store';
|
||||||
|
import { MapComponent } from 'ng-openlayers';
|
||||||
|
import { Interaction } from 'ol/interaction';
|
||||||
import OLCesium from 'olcs/OLCesium';
|
import OLCesium from 'olcs/OLCesium';
|
||||||
import RasterSynchronizer from 'olcs/RasterSynchronizer';
|
import RasterSynchronizer from 'olcs/RasterSynchronizer';
|
||||||
import VectorSynchronizer from 'olcs/VectorSynchronizer';
|
import VectorSynchronizer from 'olcs/VectorSynchronizer';
|
||||||
import { mapReducers,mapActions } from '@farmmaps/common-map';
|
|
||||||
import { Store } from '@ngrx/store';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map3d-switch2d3d',
|
selector: 'fm-map3d-switch2d3d',
|
||||||
@@ -49,11 +49,7 @@ export class Switch2D3DComponent {
|
|||||||
this.interactions=[];
|
this.interactions=[];
|
||||||
this.map.instance.getInteractions().forEach((i) => {
|
this.map.instance.getInteractions().forEach((i) => {
|
||||||
if(i.getActive()) {
|
if(i.getActive()) {
|
||||||
// AW-6241 TODO How to fix?
|
this.interactions.push(i);
|
||||||
// error TS2345: Argument of type 'import("C:/Project/Farmmaps/FarmMapsLib/node_modules/ol/interaction/Interaction").default'
|
|
||||||
// is not assignable to parameter of type 'import("C:/Project/Farmmaps/FarmMapsLib/projects/common-map3d/node_modules/ol/interaction/Interaction").default'.
|
|
||||||
// Line below commented out
|
|
||||||
// this.interactions.push(i);
|
|
||||||
i.setActive(false);
|
i.setActive(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -65,7 +61,7 @@ export class Switch2D3DComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClick(event) {
|
handleClick() {
|
||||||
this.enable = !this.enable;
|
this.enable = !this.enable;
|
||||||
if(this.enable) {
|
if(this.enable) {
|
||||||
this.store.dispatch(new mapActions.SetViewState(false));
|
this.store.dispatch(new mapActions.SetViewState(false));
|
||||||
|
@@ -23,7 +23,9 @@
|
|||||||
"node_modules/@angular/*"
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
|
@@ -23,7 +23,9 @@
|
|||||||
"node_modules/@angular/*"
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
|
@@ -18,5 +18,6 @@ module.exports = {
|
|||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3751
projects/common/package-lock.json
generated
3751
projects/common/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "@farmmaps/common",
|
"name": "@farmmaps/common",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
|
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
|
||||||
"@angular/common": "18.2.3",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/core": "18.2.3",
|
"@angular/core": "^17.3.3",
|
||||||
"@angular/forms": "18.2.3",
|
"@angular/forms": "^17.3.3",
|
||||||
"@ngrx/effects": "^18.0.2",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": "^18.0.2",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": "^18.0.2",
|
"@ngrx/store": "^17",
|
||||||
"tassign": "^1.0.0",
|
"tassign": "^1.0.0",
|
||||||
"bootstrap": "^5.3.3",
|
"bootstrap": "^5.2.0",
|
||||||
"@microsoft/signalr": "^3.1.16",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"ngx-uploadx": "^6.2.0",
|
"ngx-uploadx": "^6.2.0",
|
||||||
"angular-oauth2-oidc": "^17.0.2",
|
"angular-oauth2-oidc": "^13",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"ngx-avatars": "^1.8.0",
|
"ngx-avatars": "1.7.0",
|
||||||
"ngx-image-cropper": "^7.0.0",
|
"ngx-image-cropper": "^7.2.1",
|
||||||
"ngx-clipboard": "^16.0.0"
|
"ngx-clipboard": "16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -71,8 +71,6 @@ export const TOGGLENOTIFICATIONMENU = '[AppCommon] ToggleNotificationMenu';
|
|||||||
|
|
||||||
export const TOGGLEHELPMENU = '[AppCommon] ToggleHelpMenu';
|
export const TOGGLEHELPMENU = '[AppCommon] ToggleHelpMenu';
|
||||||
|
|
||||||
export const TOGGLESETTINGMENU = '[AppCommon] ToggleSettingMenu';
|
|
||||||
|
|
||||||
export const SETMENUVISIBLE = '[AppCommon] SetMenuVisible';
|
export const SETMENUVISIBLE = '[AppCommon] SetMenuVisible';
|
||||||
|
|
||||||
export const ONLINE = '[AppCommon] Online';
|
export const ONLINE = '[AppCommon] Online';
|
||||||
@@ -83,11 +81,6 @@ export const SETPAGEMODE = '[AppCommon] SetPageMode';
|
|||||||
|
|
||||||
export const SETUNREADNOTIFICATIONS = '[AppCommon] SetUnreadNotifications';
|
export const SETUNREADNOTIFICATIONS = '[AppCommon] SetUnreadNotifications';
|
||||||
|
|
||||||
export const SWITCHLANGUAGE = '[AppCommon] SwitchLanguage';
|
|
||||||
|
|
||||||
export const SETSETTINGMENUBACKGROUNDCOLOR = '[AppCommon] SetSettingMenuBackgroundColor';
|
|
||||||
|
|
||||||
|
|
||||||
export class InitUser implements Action {
|
export class InitUser implements Action {
|
||||||
readonly type = INITUSER;
|
readonly type = INITUSER;
|
||||||
|
|
||||||
@@ -339,12 +332,6 @@ export class ToggleHelpMenu implements Action {
|
|||||||
constructor() { }
|
constructor() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ToggleSettingMenu implements Action {
|
|
||||||
readonly type = TOGGLESETTINGMENU;
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
}
|
|
||||||
|
|
||||||
export class SetMenuVisible implements Action {
|
export class SetMenuVisible implements Action {
|
||||||
readonly type = SETMENUVISIBLE;
|
readonly type = SETMENUVISIBLE;
|
||||||
|
|
||||||
@@ -376,17 +363,6 @@ export class SetUnreadNotifications implements Action {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SwitchLanguage implements Action {
|
|
||||||
readonly type = SWITCHLANGUAGE;
|
|
||||||
|
|
||||||
constructor(public locale:string) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
export class SetSettingMenuBackgroundColor implements Action {
|
|
||||||
readonly type = SETSETTINGMENUBACKGROUNDCOLOR;
|
|
||||||
|
|
||||||
constructor(public color:string) { }
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Actions = OpenModal
|
export type Actions = OpenModal
|
||||||
| InitRoot
|
| InitRoot
|
||||||
@@ -432,10 +408,7 @@ export type Actions = OpenModal
|
|||||||
| ToggleAppMenu
|
| ToggleAppMenu
|
||||||
| ToggleNotificationMenu
|
| ToggleNotificationMenu
|
||||||
| ToggleHelpMenu
|
| ToggleHelpMenu
|
||||||
| ToggleSettingMenu
|
|
||||||
| NotificationEvent
|
| NotificationEvent
|
||||||
| SetUnreadNotifications
|
| SetUnreadNotifications;
|
||||||
| SwitchLanguage
|
|
||||||
| SetSettingMenuBackgroundColor;
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,12 +1,11 @@
|
|||||||
import {NgModule} from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import {RouterModule} from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import {AuthCallbackComponent} from './components/auth-callback/auth-callback.component';
|
import { AuthCallbackComponent } from './components/auth-callback/auth-callback.component';
|
||||||
import {AuthCallbackGuard} from './components/auth-callback/auth-callback.guard';
|
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||||
import {NavBarGuard} from './services/nav-bar-guard.service';
|
import { SessionClearedComponent } from './components/session-cleared/session-cleared.component';
|
||||||
import {FullScreenGuard} from './services/full-screen-guard.service';
|
import { FullScreenGuard } from './services/full-screen-guard.service';
|
||||||
import {SessionClearedComponent} from './components/session-cleared/session-cleared.component';
|
import { NavBarGuard } from './services/nav-bar-guard.service';
|
||||||
import {NotFoundComponent} from './components/not-found/not-found.component';
|
|
||||||
import { ProductionGuard } from './services/production-guard.service';
|
import { ProductionGuard } from './services/production-guard.service';
|
||||||
|
|
||||||
|
|
||||||
|
@@ -13,7 +13,6 @@ import { SchemaService } from './services/schema.service';
|
|||||||
import { FolderService } from './services/folder.service';
|
import { FolderService } from './services/folder.service';
|
||||||
import { TimespanService } from './services/timespan.service';
|
import { TimespanService } from './services/timespan.service';
|
||||||
import { ItemService } from './services/item.service';
|
import { ItemService } from './services/item.service';
|
||||||
import { TaskService } from './services/task.service';
|
|
||||||
import { AdminService } from './services/admin.service';
|
import { AdminService } from './services/admin.service';
|
||||||
import { EventService } from './services/event.service';
|
import { EventService } from './services/event.service';
|
||||||
import { TypeaheadService } from './services/typeahead.service';
|
import { TypeaheadService } from './services/typeahead.service';
|
||||||
@@ -45,7 +44,6 @@ export {
|
|||||||
ItemTypeService,
|
ItemTypeService,
|
||||||
TimespanService,
|
TimespanService,
|
||||||
ItemService,
|
ItemService,
|
||||||
TaskService,
|
|
||||||
AdminService,
|
AdminService,
|
||||||
EventService,
|
EventService,
|
||||||
TypeaheadService,
|
TypeaheadService,
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
// angular modules
|
// angular modules
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { InjectionToken, NgModule } from '@angular/core';
|
import { InjectionToken, NgModule } from '@angular/core';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
@@ -34,7 +34,6 @@ import { HasClaimDirective } from './components/has-claim/has-claim.directive';
|
|||||||
import { HasPackageDirective } from './components/has-package/has-package.directive';
|
import { HasPackageDirective } from './components/has-package/has-package.directive';
|
||||||
import { HasRoleDirective } from './components/has-role/has-role.directive';
|
import { HasRoleDirective } from './components/has-role/has-role.directive';
|
||||||
import { HelpMenuComponent } from './components/help-menu/help-menu.component';
|
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 { ItemLinkComponent } from './components/item-link/item-link.component';
|
||||||
import { MenuBackgroundComponent } from './components/menu-background/menu-background.component';
|
import { MenuBackgroundComponent } from './components/menu-background/menu-background.component';
|
||||||
import { NotFoundComponent } from './components/not-found/not-found.component';
|
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||||
@@ -56,8 +55,8 @@ import { IColor, IGradientstop } from './models/gradient';
|
|||||||
import { IItem, Item } from './models/item';
|
import { IItem, Item } from './models/item';
|
||||||
import { IItemType } from './models/item.type';
|
import { IItemType } from './models/item.type';
|
||||||
import { IItemTypes } from './models/item.types';
|
import { IItemTypes } from './models/item.types';
|
||||||
import { IItemLinkType } from './models/itemlink.type';
|
|
||||||
import { IItemTask, ItemTask } from './models/itemTask';
|
import { IItemTask, ItemTask } from './models/itemTask';
|
||||||
|
import { IItemLinkType } from './models/itemlink.type';
|
||||||
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';
|
||||||
@@ -75,82 +74,87 @@ import { SecureOAuthStorage } from './shared/secureOAuthStorage';
|
|||||||
export const FM_COMMON_STARTPAGE = new InjectionToken<string>('fm-common-startpage');
|
export const FM_COMMON_STARTPAGE = new InjectionToken<string>('fm-common-startpage');
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Alert, AppComponent, AuthCallbackComponent, AuthConfigFactory, AvatarComponent, BackButtonComponent, commonActions,
|
Alert, AppComponent, AuthCallbackComponent, AuthConfigFactory, AvatarComponent, BackButtonComponent, 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,
|
||||||
IPackages, IQueryState, ISenMLItem, Item, ItemLinkComponent, ItemTask, ITypeaheadItem, IUrlType, IUser, MenuBackgroundComponent, NotFoundComponent,
|
IPackages, IQueryState, ISenMLItem, ITypeaheadItem, IUrlType, IUser, Item, ItemLinkComponent, ItemTask, 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, commonActions,
|
||||||
|
commonReducers
|
||||||
};
|
};
|
||||||
|
|
||||||
@NgModule({ declarations: [
|
@NgModule({
|
||||||
AppComponent,
|
imports: [
|
||||||
AuthCallbackComponent,
|
CommonModule,
|
||||||
SidePanelComponent,
|
HttpClientModule,
|
||||||
SafePipe,
|
AppCommonRoutingModule,
|
||||||
NotFoundComponent,
|
StoreModule.forFeature(MODULE_NAME, commonReducers.reducer),
|
||||||
NotImplementedComponent,
|
EffectsModule.forFeature([commonEffects.AppCommonEffects]),
|
||||||
ResumableFileUploadComponent,
|
OAuthModule.forRoot(),
|
||||||
TimespanComponent,
|
NgbModule,
|
||||||
TagInputComponent,
|
FormsModule,
|
||||||
SessionClearedComponent,
|
UploadxModule,
|
||||||
MenuBackgroundComponent,
|
ClipboardModule,
|
||||||
HasPackageDirective,
|
AvatarModule,
|
||||||
PackageExistsDirective,
|
ImageCropperModule
|
||||||
HasClaimDirective,
|
],
|
||||||
HasRoleDirective,
|
declarations: [
|
||||||
UserMenuComponent,
|
AppComponent,
|
||||||
GradientComponent,
|
AuthCallbackComponent,
|
||||||
GradientSelectComponent,
|
SidePanelComponent,
|
||||||
AppMenuComponent,
|
SafePipe,
|
||||||
NotificationMenuComponent,
|
NotFoundComponent,
|
||||||
HelpMenuComponent,
|
NotImplementedComponent,
|
||||||
SettingMenuComponent,
|
ResumableFileUploadComponent,
|
||||||
BackButtonComponent,
|
TimespanComponent,
|
||||||
ThumbnailComponent,
|
TagInputComponent,
|
||||||
EditImageModalComponent,
|
SessionClearedComponent,
|
||||||
AvatarComponent,
|
MenuBackgroundComponent,
|
||||||
ItemLinkComponent
|
HasPackageDirective,
|
||||||
],
|
PackageExistsDirective,
|
||||||
exports: [
|
HasClaimDirective,
|
||||||
NgbModule,
|
HasRoleDirective,
|
||||||
UploadxModule,
|
UserMenuComponent,
|
||||||
ClipboardModule,
|
GradientComponent,
|
||||||
CommonModule,
|
GradientSelectComponent,
|
||||||
AppComponent,
|
AppMenuComponent,
|
||||||
ResumableFileUploadComponent,
|
NotificationMenuComponent,
|
||||||
AuthCallbackComponent,
|
HelpMenuComponent,
|
||||||
SidePanelComponent,
|
BackButtonComponent,
|
||||||
SafePipe,
|
ThumbnailComponent,
|
||||||
NotFoundComponent,
|
EditImageModalComponent,
|
||||||
NotImplementedComponent,
|
AvatarComponent,
|
||||||
ResumableFileUploadComponent,
|
ItemLinkComponent
|
||||||
TimespanComponent,
|
],
|
||||||
TagInputComponent,
|
exports: [
|
||||||
SessionClearedComponent,
|
NgbModule,
|
||||||
MenuBackgroundComponent,
|
UploadxModule,
|
||||||
HasPackageDirective,
|
ClipboardModule,
|
||||||
PackageExistsDirective,
|
CommonModule,
|
||||||
HasClaimDirective,
|
AppComponent,
|
||||||
HasRoleDirective,
|
ResumableFileUploadComponent,
|
||||||
UserMenuComponent,
|
AuthCallbackComponent,
|
||||||
GradientComponent,
|
SidePanelComponent,
|
||||||
GradientSelectComponent,
|
SafePipe,
|
||||||
BackButtonComponent,
|
NotFoundComponent,
|
||||||
ThumbnailComponent,
|
NotImplementedComponent,
|
||||||
AvatarComponent,
|
ResumableFileUploadComponent,
|
||||||
ItemLinkComponent,
|
TimespanComponent,
|
||||||
EditImageModalComponent
|
TagInputComponent,
|
||||||
], imports: [CommonModule,
|
SessionClearedComponent,
|
||||||
AppCommonRoutingModule,
|
MenuBackgroundComponent,
|
||||||
StoreModule.forFeature(MODULE_NAME, commonReducers.reducer),
|
HasPackageDirective,
|
||||||
EffectsModule.forFeature([commonEffects.AppCommonEffects]),
|
PackageExistsDirective,
|
||||||
OAuthModule.forRoot(),
|
HasClaimDirective,
|
||||||
NgbModule,
|
HasRoleDirective,
|
||||||
FormsModule,
|
UserMenuComponent,
|
||||||
UploadxModule,
|
GradientComponent,
|
||||||
ClipboardModule,
|
GradientSelectComponent,
|
||||||
AvatarModule,
|
BackButtonComponent,
|
||||||
ImageCropperModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
|
ThumbnailComponent,
|
||||||
|
AvatarComponent,
|
||||||
|
ItemLinkComponent,
|
||||||
|
EditImageModalComponent
|
||||||
|
]
|
||||||
|
})
|
||||||
export class AppCommonModule {
|
export class AppCommonModule {
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="app fullscreen" (click)="handleClick($event)" [ngClass]="{'fullscreen' :(fullScreen|async),'pagemode':(isPageMode|async),'appmode':!(isPageMode|async)}">
|
<div class="app fullscreen" (click)="handleClick()" [ngClass]="{'fullscreen' :(fullScreen|async),'pagemode':(isPageMode|async),'appmode':!(isPageMode|async)}">
|
||||||
<nav class="navbar navbar-light navbar-expand bg-light navigation-clean">
|
<nav class="navbar navbar-light navbar-expand bg-light navigation-clean">
|
||||||
<div class="container-fluid p-3 justify-content-start">
|
<div class="container-fluid p-3 justify-content-start">
|
||||||
<div class="header-logo pageonly"><router-outlet name="header-logo"></router-outlet></div>
|
<div class="header-logo pageonly"><router-outlet name="header-logo"></router-outlet></div>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="d-flex flex-row">
|
<div class="d-flex flex-row">
|
||||||
<div class="mt-2 mb-2 flex-grow-1 logo" (click)="handleHome($event)"><router-outlet name="side-panel-logo"></router-outlet></div>
|
<div class="mt-2 mb-2 flex-grow-1 logo" (click)="handleHome()"><router-outlet name="side-panel-logo"></router-outlet></div>
|
||||||
<div class="mt-2 mb-2 ms-2"><button type="button" class="btn btn-outline-secondary" (click)="handleToggleMenu($event)"><i class="fal fa-times" aria-hidden="true"></i></button></div>
|
<div class="mt-2 mb-2 ms-2"><button type="button" class="btn btn-outline-secondary" (click)="handleToggleMenu($event)"><i class="fal fa-times" aria-hidden="true"></i></button></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-column cards">
|
<div class="d-flex flex-column cards">
|
||||||
@@ -33,7 +33,6 @@
|
|||||||
<fm-resumable-file-upload></fm-resumable-file-upload>
|
<fm-resumable-file-upload></fm-resumable-file-upload>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="user-menu apponly">
|
<div class="user-menu apponly">
|
||||||
<fm-setting-menu [user]="user|async" [showMenu]="settingMenuVisible|async" [backgroundColor]="settingMenuBackgroundColor|async"></fm-setting-menu>
|
|
||||||
<fm-help-menu [user]="user|async" [showMenu]="helpMenuVisible|async"></fm-help-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-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>
|
<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;
|
max-height:0em;
|
||||||
}
|
}
|
||||||
|
|
||||||
fm-help-menu,fm-app-menu,fm-user-menu,fm-notification-menu,fm-setting-menu {
|
fm-help-menu,fm-app-menu,fm-user-menu,fm-notification-menu {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
|
@@ -1,21 +1,18 @@
|
|||||||
import { Component, OnInit, OnDestroy, Inject, Optional, ViewEncapsulation, RendererFactory2, PLATFORM_ID, ChangeDetectionStrategy, HostListener, Input } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, HostListener, Inject, Input, OnDestroy, OnInit, Optional, ViewEncapsulation } from '@angular/core';
|
||||||
import { Router, NavigationStart, NavigationEnd, RouteConfigLoadStart, RouteConfigLoadEnd, ActivatedRoute, PRIMARY_OUTLET } from '@angular/router';
|
import { NavigationEnd, NavigationStart, RouteConfigLoadEnd, RouteConfigLoadStart, Router } from '@angular/router';
|
||||||
import { Meta, Title, MetaDefinition } from '@angular/platform-browser'; import { DOCUMENT } from "@angular/common";
|
import { Action, Store } from '@ngrx/store';
|
||||||
import { Subscription, Observable } from 'rxjs';
|
import { OAuthErrorEvent, OAuthService } from 'angular-oauth2-oidc';
|
||||||
|
import { Observable, Subscription } from 'rxjs';
|
||||||
import { distinctUntilChanged } from 'rxjs/operators';
|
import { distinctUntilChanged } from 'rxjs/operators';
|
||||||
import { Store, Action } from '@ngrx/store';
|
|
||||||
import { IUser } from '../../models/user';
|
|
||||||
import { OAuthService, OAuthErrorEvent } from 'angular-oauth2-oidc';
|
|
||||||
import { FM_COMMON_STARTPAGE } from '../../common.module';
|
import { FM_COMMON_STARTPAGE } from '../../common.module';
|
||||||
|
import { IUser } from '../../models/user';
|
||||||
|
|
||||||
//AppCommon
|
//AppCommon
|
||||||
|
import * as commonActions from '../../actions/app-common.actions';
|
||||||
import { IEventMessage } from '../../models/event.message';
|
import { IEventMessage } from '../../models/event.message';
|
||||||
import { IListItem } from '../../models/list.item';
|
import { IListItem } from '../../models/list.item';
|
||||||
import { EventService } from '../../services/event.service';
|
import { EventService } from '../../services/event.service';
|
||||||
import { ItemTypeService } from '../../services/itemtype.service';
|
|
||||||
import * as commonActions from '../../actions/app-common.actions';
|
|
||||||
import { HealthCheckService } from '../../services/healthcheck.service';
|
import { HealthCheckService } from '../../services/healthcheck.service';
|
||||||
import { AppConfig } from '../../shared/app.config';
|
|
||||||
|
|
||||||
import * as appReducers from '../../reducers/app-common.reducer';
|
import * as appReducers from '../../reducers/app-common.reducer';
|
||||||
|
|
||||||
@@ -27,12 +24,6 @@ import * as appReducers from '../../reducers/app-common.reducer';
|
|||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit, OnDestroy {
|
export class AppComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
// This will go at the END of your title for example "Home - Angular Universal..." <-- after the dash (-)
|
|
||||||
private endPageTitle = 'Farmmaps';
|
|
||||||
// If no Title is provided, we'll use a default one before the dash(-)
|
|
||||||
private defaultPageTitle = 'Farmmaps';
|
|
||||||
|
|
||||||
private routerSub$: Subscription;
|
private routerSub$: Subscription;
|
||||||
private eventSub$: Subscription;
|
private eventSub$: Subscription;
|
||||||
|
|
||||||
@@ -45,30 +36,21 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
public accountMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAccountMenuVisible);
|
public accountMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAccountMenuVisible);
|
||||||
public appMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAppMenuVisible);
|
public appMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetAppMenuVisible);
|
||||||
public notificationMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetNotificationMenuVisible);
|
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 helpMenuVisible: Observable<boolean> = this.store$.select(appReducers.SelectGetHelpMenuVisible);
|
||||||
public unreadNotifications: Observable<number> = this.store$.select(appReducers.SelectgetUnreadNotifications);
|
public unreadNotifications: Observable<number> = this.store$.select(appReducers.SelectgetUnreadNotifications);
|
||||||
public user: Observable<IUser> = this.store$.select(appReducers.SelectGetUser);
|
public user: Observable<IUser> = this.store$.select(appReducers.SelectGetUser);
|
||||||
public isPageMode: Observable<boolean> = this.store$.select(appReducers.SelectGetIsPageMode);
|
public isPageMode: Observable<boolean> = this.store$.select(appReducers.SelectGetIsPageMode);
|
||||||
public settingMenuBackgroundColor: Observable<string> = this.store$.select(appReducers.SelectGetSettingMenuBackgroundColor);
|
|
||||||
@Input() showUploadProgress = true;
|
@Input() showUploadProgress = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Optional() @Inject(FM_COMMON_STARTPAGE) public startPage: string,
|
@Optional() @Inject(FM_COMMON_STARTPAGE) public startPage: string,
|
||||||
public router: Router,
|
public router: Router,
|
||||||
private activatedRoute$: ActivatedRoute,
|
|
||||||
private title$: Title,
|
|
||||||
private meta$: Meta,
|
|
||||||
private store$: Store<appReducers.State>,
|
private store$: Store<appReducers.State>,
|
||||||
private eventService$: EventService,
|
private eventService$: EventService,
|
||||||
private healthCheckService$: HealthCheckService,
|
private healthCheckService$: HealthCheckService,
|
||||||
private itemTypeService$: ItemTypeService,
|
private oauthService$: OAuthService) {
|
||||||
private oauthService$: OAuthService,
|
|
||||||
private appConfig$: AppConfig
|
|
||||||
) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getActionFromEvent(event: IEventMessage): Action {
|
getActionFromEvent(event: IEventMessage): Action {
|
||||||
let action: Action = null;
|
let action: Action = null;
|
||||||
//console.debug(`${event.eventType} Event received`);
|
//console.debug(`${event.eventType} Event received`);
|
||||||
@@ -165,30 +147,28 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private InstallRouteEventHandler() {
|
private InstallRouteEventHandler() {
|
||||||
const other = this;
|
|
||||||
this.routerSub$ = this.router.events.subscribe(event => {
|
this.routerSub$ = this.router.events.subscribe(event => {
|
||||||
if (event instanceof RouteConfigLoadStart) {
|
if (event instanceof RouteConfigLoadStart) {
|
||||||
other.store$.dispatch(new commonActions.StartRouteLoading());
|
this.store$.dispatch(new commonActions.StartRouteLoading());
|
||||||
}
|
}
|
||||||
if (event instanceof NavigationEnd && (event.url == "/" || event.url.startsWith("/content"))) {
|
if (event instanceof NavigationEnd && (event.url == "/" || event.url.startsWith("/content"))) {
|
||||||
other.store$.dispatch(new commonActions.SetPageMode(true));
|
this.store$.dispatch(new commonActions.SetPageMode(true));
|
||||||
} else if (event instanceof NavigationEnd) {
|
} else if (event instanceof NavigationEnd) {
|
||||||
other.store$.dispatch(new commonActions.SetPageMode(false));
|
this.store$.dispatch(new commonActions.SetPageMode(false));
|
||||||
}
|
}
|
||||||
if (event instanceof RouteConfigLoadEnd) {
|
if (event instanceof RouteConfigLoadEnd) {
|
||||||
other.store$.dispatch(new commonActions.EndRouteLoading());
|
this.store$.dispatch(new commonActions.EndRouteLoading());
|
||||||
}
|
}
|
||||||
if (event instanceof NavigationStart) {
|
if (event instanceof NavigationStart) {
|
||||||
other.store$.dispatch(new commonActions.SetMenuVisible(false));
|
this.store$.dispatch(new commonActions.SetMenuVisible(false));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private InstallEventServiceEventHandler() {
|
private InstallEventServiceEventHandler() {
|
||||||
const other = this;
|
|
||||||
this.eventSub$ = this.eventService$.event.subscribe(event => {
|
this.eventSub$ = this.eventService$.event.subscribe(event => {
|
||||||
const action = other.getActionFromEvent(event);
|
const action = this.getActionFromEvent(event);
|
||||||
if (action) other.store$.dispatch(action);
|
if (action) this.store$.dispatch(action);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +183,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClick(event: MouseEvent) {
|
handleClick() {
|
||||||
this.store$.dispatch(new commonActions.Escape(false, true));
|
this.store$.dispatch(new commonActions.Escape(false, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +196,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
this.store$.dispatch(new commonActions.ToggleMenu());
|
this.store$.dispatch(new commonActions.ToggleMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
handleHome(event: MouseEvent) {
|
handleHome() {
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { OAuthService } from 'angular-oauth2-oidc';
|
import { OAuthService } from 'angular-oauth2-oidc';
|
||||||
import { Location} from '@angular/common';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-auth-callback',
|
selector: 'fm-auth-callback',
|
||||||
@@ -10,11 +9,11 @@ import { Location} from '@angular/common';
|
|||||||
export class AuthCallbackComponent {
|
export class AuthCallbackComponent {
|
||||||
|
|
||||||
constructor(private router$: Router,private oauthService$:OAuthService) {
|
constructor(private router$: Router,private oauthService$:OAuthService) {
|
||||||
oauthService$.loadDiscoveryDocument().then(() => {
|
this.oauthService$.loadDiscoveryDocument().then(() => {
|
||||||
oauthService$.tryLoginCodeFlow().then(() => {
|
this.oauthService$.tryLoginCodeFlow().then(() => {
|
||||||
router$.navigateByUrl((oauthService$.state && oauthService$.state!="")?decodeURIComponent(oauthService$.state):"");
|
this.router$.navigateByUrl((this.oauthService$.state && this.oauthService$.state!="")?decodeURIComponent(this.oauthService$.state):"");
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
router$.navigateByUrl("/");
|
this.router$.navigateByUrl("/");
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Location } from "@angular/common";
|
import {Component, HostListener} from '@angular/core';
|
||||||
import { Component, EventEmitter, HostListener, Output } from '@angular/core';
|
import {Location} from "@angular/common";
|
||||||
import { DeviceService } from '../../services/device.service';
|
import { DeviceService} from '../../services/device.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-back-button',
|
selector: 'fm-back-button',
|
||||||
@@ -8,18 +8,16 @@ import { DeviceService } from '../../services/device.service';
|
|||||||
styleUrls: ['./back-button.component.scss']
|
styleUrls: ['./back-button.component.scss']
|
||||||
})
|
})
|
||||||
export class BackButtonComponent {
|
export class BackButtonComponent {
|
||||||
@Output() beforeLocationBack = new EventEmitter();
|
|
||||||
|
|
||||||
@HostListener('click')
|
@HostListener('click')
|
||||||
onBackClicked() {
|
onBackClicked() {
|
||||||
this.beforeLocationBack.emit();
|
|
||||||
this.location.back();
|
this.location.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private location: Location,private deviceService:DeviceService) {
|
constructor(private location: Location,private deviceService:DeviceService) { }
|
||||||
}
|
|
||||||
|
|
||||||
public show() {
|
public show() {
|
||||||
return !this.deviceService.IsMobile();
|
return !this.deviceService.IsMobile();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<i class="fal fa-image"></i>
|
<i class="fal fa-image"></i>
|
||||||
<div i18n>No image selected</div>
|
<div i18n>No image selected</div>
|
||||||
</div>
|
</div>
|
||||||
<image-cropper #imageCropper output="base64"
|
<image-cropper #imageCropper
|
||||||
[imageChangedEvent]="imageChangedEvent"
|
[imageChangedEvent]="imageChangedEvent"
|
||||||
[maintainAspectRatio]="true"
|
[maintainAspectRatio]="true"
|
||||||
[format]="imageType"
|
[format]="imageType"
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
import { Component, OnInit,ViewChild,ElementRef,EventEmitter, Output } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
|
||||||
import { HttpClient, HttpParams, HttpHeaders } from "@angular/common/http";
|
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
|
||||||
import {NgbModal} from "@ng-bootstrap/ng-bootstrap"
|
import { ImageCroppedEvent, LoadedImage } from 'ngx-image-cropper';
|
||||||
import { ImageCroppedEvent,LoadedImage } from 'ngx-image-cropper';
|
import { ImageService } from '../../services/image.service';
|
||||||
import {ImageService } from '../../services/image.service';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-edit-image-modal',
|
selector: 'fm-edit-image-modal',
|
||||||
@@ -47,7 +46,8 @@ export class EditImageModalComponent implements OnInit {
|
|||||||
imageCropped(event: ImageCroppedEvent) {
|
imageCropped(event: ImageCroppedEvent) {
|
||||||
this.croppedImage = event.base64;
|
this.croppedImage = event.base64;
|
||||||
}
|
}
|
||||||
imageLoaded(image: LoadedImage) {
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
imageLoaded(_image: LoadedImage) {
|
||||||
this.isImageLoaded=true;
|
this.isImageLoaded=true;
|
||||||
}
|
}
|
||||||
cropperReady() {
|
cropperReady() {
|
||||||
|
@@ -1,11 +1,8 @@
|
|||||||
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input,OnDestroy } from '@angular/core';
|
import { Directive, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
||||||
import { Store} from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as appCommonReducer from '../../reducers/app-common.reducer'
|
import { Observable } from 'rxjs';
|
||||||
import { IPackages } from '../../models/package';
|
|
||||||
import { Observable, Subscription } from 'rxjs';
|
|
||||||
import { skip } from 'rxjs/operators';
|
|
||||||
import {OAuthService } from 'angular-oauth2-oidc';
|
|
||||||
import { IUser } from '../../models/user';
|
import { IUser } from '../../models/user';
|
||||||
|
import * as appCommonReducer from '../../reducers/app-common.reducer';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[fm-hasclaim]',
|
selector: '[fm-hasclaim]',
|
||||||
|
@@ -34,8 +34,8 @@ export class HasPackageDirective implements OnDestroy, AfterViewInit {
|
|||||||
|
|
||||||
constructor(private hostTemplateRef: TemplateRef<any>, private viewContainerRef: ViewContainerRef,
|
constructor(private hostTemplateRef: TemplateRef<any>, private viewContainerRef: ViewContainerRef,
|
||||||
private store: Store<appCommonReducer.State>, private packageService: PackageService) {
|
private store: Store<appCommonReducer.State>, private packageService: PackageService) {
|
||||||
this.thenTemplate = hostTemplateRef;
|
this.thenTemplate = this.hostTemplateRef;
|
||||||
this.packSub = this.store.select(appCommonReducer.SelectGetValidUserPackages).subscribe((_) => {
|
this.packSub = this.store.select(appCommonReducer.SelectGetValidUserPackages).subscribe(() => {
|
||||||
this.updateView();
|
this.updateView();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit,Input } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { Store, Action } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
import * as commonActions from '../../actions/app-common.actions';
|
||||||
import * as appReducers from '../../reducers/app-common.reducer';
|
import * as appReducers from '../../reducers/app-common.reducer';
|
||||||
import * as commonActions from '../../actions/app-common.actions';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-menu-background',
|
selector: 'fm-menu-background',
|
||||||
|
@@ -34,8 +34,8 @@ export class PackageExistsDirective implements OnDestroy, AfterViewInit {
|
|||||||
|
|
||||||
constructor(private hostTemplateRef: TemplateRef<any>, private viewContainerRef: ViewContainerRef,
|
constructor(private hostTemplateRef: TemplateRef<any>, private viewContainerRef: ViewContainerRef,
|
||||||
private store: Store<appCommonReducer.State>, private packageService: PackageService) {
|
private store: Store<appCommonReducer.State>, private packageService: PackageService) {
|
||||||
this.thenTemplate = hostTemplateRef;
|
this.thenTemplate = this.hostTemplateRef;
|
||||||
this.packSub = this.store.select(appCommonReducer.SelectGetPackages).subscribe((_) => {
|
this.packSub = this.store.select(appCommonReducer.SelectGetPackages).subscribe(() => {
|
||||||
this.updateView();
|
this.updateView();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,6 @@ div.resumable-file-upload {
|
|||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
max-height: 250px;
|
max-height: 250px;
|
||||||
z-index: 1;
|
|
||||||
/*z-index:2000 !important;*/
|
/*z-index:2000 !important;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import { Component, Input,Output, HostListener, ChangeDetectorRef, OnDestroy, OnInit,EventEmitter } from '@angular/core';
|
import { ChangeDetectorRef, Component, HostListener, Input, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { ResumableFileUploadService, File } from './resumable-file-upload.service';
|
|
||||||
import { Subscription } from 'rxjs';
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as commonReducer from '../../reducers/app-common.reducer';
|
import { Subscription } from 'rxjs';
|
||||||
import * as commonActions from '../../actions/app-common.actions';
|
import * as commonActions from '../../actions/app-common.actions';
|
||||||
|
import * as commonReducer from '../../reducers/app-common.reducer';
|
||||||
|
import { File, ResumableFileUploadService } from './resumable-file-upload.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -29,7 +29,7 @@ export class ResumableFileUploadComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.uploadService.init();
|
this.uploadService.init();
|
||||||
this.refreshSub = this.uploadService.refresh.subscribe((e: any) => {
|
this.refreshSub = this.uploadService.refresh.subscribe(() => {
|
||||||
this.cd.markForCheck();
|
this.cd.markForCheck();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,7 @@
|
|||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
import { OAuthService } from 'angular-oauth2-oidc';
|
import { OAuthService } from 'angular-oauth2-oidc';
|
||||||
import { Subject , Subscription } from 'rxjs';
|
import { UploadState, UploadxOptions, UploadxService } from 'ngx-uploadx';
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { Subject, Subscription } from 'rxjs';
|
||||||
import { UploadxService, UploadState,UploadxOptions} from 'ngx-uploadx';
|
|
||||||
import { AppConfig } from '../../shared/app.config';
|
import { AppConfig } from '../../shared/app.config';
|
||||||
|
|
||||||
|
|
||||||
@@ -19,7 +18,7 @@ export class ResumableFileUploadService implements OnDestroy{
|
|||||||
private _eventSub:Subscription;
|
private _eventSub:Subscription;
|
||||||
private initialized = false;
|
private initialized = false;
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient,private oauthService: OAuthService,private uploadService: UploadxService,public appConfig: AppConfig) {
|
constructor(private oauthService: OAuthService,private uploadService: UploadxService,public appConfig: AppConfig) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,11 +40,9 @@ export class ResumableFileUploadService implements OnDestroy{
|
|||||||
|
|
||||||
updatetotalprogress() {
|
updatetotalprogress() {
|
||||||
let totalProgress =0;
|
let totalProgress =0;
|
||||||
let n=0;
|
|
||||||
for(let i =0;i<this.files.length;i++) {
|
for(let i =0;i<this.files.length;i++) {
|
||||||
if(!this.files[i].error) {
|
if(!this.files[i].error) {
|
||||||
totalProgress+=this.files[i].progress;
|
totalProgress+=this.files[i].progress;
|
||||||
n++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.totalProgress=totalProgress/this.files.length;
|
this.totalProgress=totalProgress/this.files.length;
|
||||||
@@ -86,7 +83,7 @@ export class ResumableFileUploadService implements OnDestroy{
|
|||||||
this.refresh.next({});
|
this.refresh.next({});
|
||||||
}
|
}
|
||||||
|
|
||||||
addFiles = (files: any[], event: any, metadata:any) => {
|
addFiles = (files: any[], _event: any, metadata:any) => {
|
||||||
for (const f of files) {
|
for (const f of files) {
|
||||||
const options:UploadxOptions = {metadata:metadata};
|
const options:UploadxOptions = {metadata:metadata};
|
||||||
this.uploadService.handleFiles(f,options);
|
this.uploadService.handleFiles(f,options);
|
||||||
@@ -133,7 +130,6 @@ export class ResumableFileUploadService implements OnDestroy{
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class File {
|
export class File {
|
||||||
private file: any;
|
|
||||||
public fileName: string;
|
public fileName: string;
|
||||||
public progress: number;
|
public progress: number;
|
||||||
public identifier: string;
|
public identifier: string;
|
||||||
@@ -142,9 +138,7 @@ export class File {
|
|||||||
public error: boolean;
|
public error: boolean;
|
||||||
public errorMessage: string;
|
public errorMessage: string;
|
||||||
|
|
||||||
|
|
||||||
constructor(state: UploadState) {
|
constructor(state: UploadState) {
|
||||||
this.file = state;
|
|
||||||
this.fileName = state.file.name;
|
this.fileName = state.file.name;
|
||||||
this.progress = state.progress?state.progress:0;
|
this.progress = state.progress?state.progress:0;
|
||||||
this.identifier = state.uploadId;
|
this.identifier = state.uploadId;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router, ActivatedRoute, ParamMap } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as appCommonReducers from '../../reducers/app-common.reducer';
|
|
||||||
import * as appCommonActions from '../../actions/app-common.actions';
|
import * as appCommonActions from '../../actions/app-common.actions';
|
||||||
|
import * as appCommonReducers from '../../reducers/app-common.reducer';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
<div>
|
|
||||||
<div (click)="toggle($event)" class="rounded-circle menu-button hidden" [style.background-color]="backgroundColor" [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>
|
|
@@ -1,80 +0,0 @@
|
|||||||
.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;
|
|
||||||
}
|
|
@@ -1,38 +0,0 @@
|
|||||||
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;
|
|
||||||
@Input() backgroundColor:string;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,5 +1,5 @@
|
|||||||
<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,'extrawide':extrawide}" [ngStyle]="{'top':top}">
|
||||||
<div *ngIf="collapsable" class="arrow rounded-end p-2" (click)="handleToggleClick($event)">
|
<div *ngIf="collapsable" class="arrow rounded-end p-2" (click)="handleToggleClick()">
|
||||||
<i class="fal fa-chevron-left" aria-hidden="true"></i>
|
<i class="fal fa-chevron-left" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
<div draggable="true" class="resizegrip" (dragstart)="handleStartGripDrag($event)" (touchstart)="handleStartGripDrag($event)" (dragend)="handleEndGripDrag()" (touchend)="handleEndGripDrag()" (drag)="handleGripDrag($event)" (touchmove)="handleGripDrag($event)">
|
<div draggable="true" class="resizegrip" (dragstart)="handleStartGripDrag($event)" (touchstart)="handleStartGripDrag($event)" (dragend)="handleEndGripDrag()" (touchend)="handleEndGripDrag()" (drag)="handleGripDrag($event)" (touchmove)="handleGripDrag($event)">
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges, ViewChild } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-side-panel',
|
selector: 'fm-side-panel',
|
||||||
@@ -22,7 +22,7 @@ export class SidePanelComponent implements OnChanges {
|
|||||||
private resizeTop=50;
|
private resizeTop=50;
|
||||||
public resizing=false;
|
public resizing=false;
|
||||||
|
|
||||||
constructor(private element: ElementRef,private ref: ChangeDetectorRef) {
|
constructor(private element: ElementRef) {
|
||||||
this.collapsable = false;
|
this.collapsable = false;
|
||||||
this.setTop();
|
this.setTop();
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ export class SidePanelComponent implements OnChanges {
|
|||||||
this.setTop();
|
this.setTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
handleToggleClick(event) {
|
handleToggleClick() {
|
||||||
if (this.collapsable) {
|
if (this.collapsable) {
|
||||||
this.collapsed = !this.collapsed;
|
this.collapsed = !this.collapsed;
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ export class SidePanelComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('window:resize', ['$event'])
|
@HostListener('window:resize', ['$event'])
|
||||||
handleResize(event) {
|
handleResize() {
|
||||||
this.setTop();
|
this.setTop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<span class="tag rounded bg-primary text-white" *ngFor="let tag of tags;"><span>{{tag}}</span> <i
|
<span class="tag rounded bg-primary text-white" *ngFor="let tag of tags;"><span>{{tag}}</span> <i
|
||||||
(click)="handleDeleteTag(tag)" class="fal fa-times" aria-hidden="true"></i></span><input
|
(click)="handleDeleteTag(tag)" class="fal fa-times" aria-hidden="true"></i></span><input
|
||||||
type="text" #tagInputElement
|
type="text" #tagInputElement
|
||||||
(blur)="handleBlur($event, false)"
|
(blur)="handleBlur(false)"
|
||||||
(keyup)="handleKeyUp($event)"
|
(keyup)="handleKeyUp($event)"
|
||||||
[(ngModel)]="tag"
|
[(ngModel)]="tag"
|
||||||
[ngbTypeahead]="findTag"
|
[ngbTypeahead]="findTag"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user