Compare commits
370 Commits
Author | SHA1 | Date | |
---|---|---|---|
35ccb4f4c5 | |||
|
d6587bd63b | ||
|
ede75f63f5 | ||
274f33e709 | |||
4384b12944 | |||
|
10ebdf276a | ||
9c270bfe75 | |||
9031d3e171 | |||
|
c3158c1064 | ||
315b64a561 | |||
|
030dbcec5d | ||
876020828e | |||
393b881e3b | |||
8594a94d62 | |||
|
c543ac7c94 | ||
97d6d569a0 | |||
023048a5bb | |||
4a685d675d | |||
|
1125f4586e | ||
3bdba527ec | |||
fb03cfce44 | |||
6f93cf254c | |||
b5a3a62cee | |||
d306d5c4c1 | |||
e79ae2f623 | |||
bdf4e03b49 | |||
7d5c10d902 | |||
fb192c6e4d | |||
|
6356f149a6 | ||
5c5914327c | |||
|
e306bf601f | ||
f8459aaca4 | |||
|
47fbc5eab9 | ||
564d08b5b9 | |||
7e17a49dc6 | |||
|
ce52cbdbed | ||
752e1e2c42 | |||
|
6b617ed4ad | ||
9b19950945 | |||
|
3f286ee042 | ||
747499d009 | |||
|
c74163976a | ||
|
c9f43b5b53 | ||
|
6a240abc0c | ||
|
7d8b18a27d | ||
|
4a328054dd | ||
|
3e482470b6 | ||
|
3bacb8a5d9 | ||
|
47afa20a01 | ||
|
f0646a8f6a | ||
36ebc03189 | |||
c0d40d2d5e | |||
|
14e504cc79 | ||
b060fd34bb | |||
0694d4e467 | |||
|
7c5867a332 | ||
8f958e33f1 | |||
aa2f305b27 | |||
|
d02da8f334 | ||
253553c534 | |||
4641e351fd | |||
|
84cf6a3f6e | ||
92b29135b5 | |||
|
f6aebb2f80 | ||
daf78f32b7 | |||
42245612d2 | |||
a05c1fa874 | |||
4bda94c360 | |||
feaad02c33 | |||
af9acebaff | |||
|
7ba35052ec | ||
2e40d023b1 | |||
|
c4f4a4f61e | ||
6b095b7f49 | |||
b2791eb80b | |||
|
4d5ed915ad | ||
2fb5967c26 | |||
|
820543913f | ||
ce2f06091b | |||
|
5714cdce72 | ||
10e43e1ea5 | |||
8fa84c6ea8 | |||
|
9f872d0af0 | ||
f6bed668f6 | |||
f70e30204d | |||
7339b91328 | |||
88667b3986 | |||
a996caa73b | |||
ed6f8f4231 | |||
94ef2e269b | |||
da624f0535 | |||
3da646dc4d | |||
778e40a26d | |||
|
94ff567567 | ||
b20ab34859 | |||
1988b3f74d | |||
b0587bc4c3 | |||
681d372ef3 | |||
b1922cdb10 | |||
|
5774bff8df | ||
6254a3be98 | |||
|
7943cefddf | ||
a2a287961c | |||
8e8f18ad7c | |||
|
5cbb6f32f9 | ||
b2469f731e | |||
|
beb439469f | ||
ef49f62ca2 | |||
|
67abc67d9a | ||
|
1f7f410916 | ||
2f176be8c6 | |||
1118c5ca60 | |||
|
c7831d1d87 | ||
31c5e0cb52 | |||
|
c6a632894d | ||
e652c7bb5b | |||
818e04d1f3 | |||
|
ebbac409a0 | ||
5cc976ddd3 | |||
38eae3263e | |||
|
a3eb2d9617 | ||
03e3c7ad95 | |||
8fd8675260 | |||
187811e4e2 | |||
8e304fc6eb | |||
|
4c93a9f766 | ||
93554bc7c4 | |||
d074cd81cf | |||
|
127dc44917 | ||
|
aa5a8f0843 | ||
|
a10aca92f1 | ||
|
e42e94fcf7 | ||
|
2b83ccad1f | ||
|
e31d428c4b | ||
|
429e54ef8d | ||
|
02e13337bf | ||
|
b4eb7aaeac | ||
|
7e21c725d8 | ||
|
dd889ea7cc | ||
|
4dab5a00b1 | ||
|
5cc58e8988 | ||
|
0944e595d3 | ||
|
32bebec0df | ||
|
c0cf210600 | ||
|
f85a27a8e5 | ||
|
88ae8b829f | ||
|
fcb60ed8bc | ||
|
3d535507fb | ||
|
e89bdac47d | ||
|
4038702841 | ||
|
7ced2d2a7b | ||
|
c53981f4a6 | ||
|
076dec27d5 | ||
|
5354aa8d0a | ||
|
12143c8e69 | ||
|
50519e9236 | ||
|
7f6d007c04 | ||
|
98be4f05cc | ||
|
79558e2168 | ||
|
b966241997 | ||
|
60a7384f88 | ||
|
76f225b996 | ||
|
37a25c6b29 | ||
|
6c45842387 | ||
|
d37b0866d5 | ||
|
270f244128 | ||
|
ebddf688c6 | ||
|
f1c572ecc9 | ||
|
af5361b6c3 | ||
|
6daf0eab4a | ||
|
66fe0e9534 | ||
|
75ccc6dda4 | ||
|
e45ec785d7 | ||
|
b067b50937 | ||
|
0c2e6364ac | ||
|
b232fb2c8e | ||
|
4a19694c1a | ||
|
af766abe54 | ||
|
6333d78eab | ||
|
c06fe315d8 | ||
|
bc1f44f0b7 | ||
|
95bb8da8b7 | ||
|
68f8ff9cdd | ||
|
9e122fefd3 | ||
|
b47ead21be | ||
|
ebe43c3b27 | ||
|
686084f5cf | ||
|
0abaf15101 | ||
|
9dd2b5cdb5 | ||
|
2246a98bbb | ||
|
6265b66baf | ||
|
5488206588 | ||
|
b4f2042aa0 | ||
|
21dca2163b | ||
|
2bc02323ae | ||
|
8b073fb855 | ||
|
5d28b547a1 | ||
|
f2407dc12a | ||
|
f02b317cf4 | ||
|
270b774c33 | ||
|
864b72c82c | ||
|
c5716b0102 | ||
|
ad097121da | ||
|
79b33cff50 | ||
|
e01417f3b3 | ||
|
68ffc6f7d9 | ||
|
ef7cf410b9 | ||
|
151ba2563e | ||
|
78f4dca9a1 | ||
|
52bf963afd | ||
|
e6cfb85b8e | ||
|
6576e7cb6d | ||
|
7d7528ab4c | ||
|
34a79ec833 | ||
|
6cd5b0e5d7 | ||
|
412ddc01d1 | ||
|
10edf0728b | ||
|
57189ce4df | ||
|
e72f933014 | ||
|
782e7adb00 | ||
|
17b78476ee | ||
|
93630d5a09 | ||
|
79f09d0e0e | ||
|
02016eb404 | ||
|
59760ad201 | ||
|
6eca90abb6 | ||
|
b853b4d3f7 | ||
|
6e815e3442 | ||
|
befa82d0f6 | ||
|
5df0e6e423 | ||
|
669f93a327 | ||
|
73ff1fd47f | ||
|
e07c3aeb3d | ||
|
700b29c3d1 | ||
|
0ffdbfd3ca | ||
|
756db80b77 | ||
|
b2559be980 | ||
|
a9754a8eff | ||
|
d5961d4c96 | ||
|
56e35345fc | ||
|
9755f5a635 | ||
|
2ff1aff9f3 | ||
|
164ac7e3ad | ||
|
85a7e890bd | ||
|
8766293966 | ||
|
d2cad491b9 | ||
|
16d2c6abae | ||
|
a212b59d73 | ||
|
3574e34659 | ||
|
13704c6845 | ||
|
bbe337d115 | ||
|
e1b6e59b6a | ||
|
3685644888 | ||
|
050adcbc0f | ||
|
0a12005d5d | ||
|
8a4644049b | ||
|
ca7e5e03be | ||
|
a1ceabec47 | ||
|
917b875732 | ||
|
7df2004671 | ||
|
c50a79d723 | ||
|
519d789281 | ||
|
b5038e9661 | ||
|
bab69698c6 | ||
|
5c6ea6a391 | ||
|
328edc396b | ||
|
9cd8b81149 | ||
|
80e1f8042e | ||
|
1a1bdb314e | ||
|
51ec1bd3b4 | ||
|
c8440ca536 | ||
|
889d1b4f9e | ||
|
97b458e812 | ||
|
0378565b88 | ||
|
8ca8874707 | ||
|
dc2772aabf | ||
|
ce0e561a3f | ||
|
ba9aab03a9 | ||
|
f10686423d | ||
|
c1688f68c2 | ||
|
c916b2f155 | ||
|
5df9ac295d | ||
|
065a45dc98 | ||
|
6b66777699 | ||
|
9927ba0929 | ||
|
a05a29703c | ||
|
76952cac67 | ||
|
9b27a997f3 | ||
|
014e3143fd | ||
|
7eaf1686e1 | ||
|
d4bf2a6667 | ||
|
9d7cf637ee | ||
|
979f80ce89 | ||
|
c677a9b639 | ||
|
9440b91d90 | ||
|
2b18167761 | ||
|
da8b2f1d3a | ||
|
10e4e6abc6 | ||
|
6acfe7c32f | ||
|
d08c1b2008 | ||
|
a47e1d9a63 | ||
|
4187522739 | ||
|
c0d0088f6e | ||
|
d43dff3085 | ||
|
9a04e1f848 | ||
|
621773a6f1 | ||
|
a9672c44bf | ||
|
155c212f89 | ||
|
ee35c3f1b8 | ||
|
0a405f5515 | ||
|
b618b7c40f | ||
|
f10e68c4ad | ||
|
870c3c2c77 | ||
|
1559f15c7f | ||
|
96345e54fb | ||
|
f61590c677 | ||
|
6f1ec4a17a | ||
|
786e9392b1 | ||
|
f229c25b8f | ||
|
9bdd1ff35f | ||
|
4dd7a15b30 | ||
|
a4aa7dbb7d | ||
|
681d2fe273 | ||
87547aafcc | |||
6ab5ba8a56 | |||
78b7ef44d9 | |||
e19ca94653 | |||
|
a85378374b | ||
9e3f6010c3 | |||
e6a637b866 | |||
|
ccf77805a0 | ||
2b2e1bfafa | |||
3fd4ac2f94 | |||
9849eaf1e7 | |||
b516cc07e2 | |||
c9c9a2ddbf | |||
1d0f3b958d | |||
45537cb2e9 | |||
652ddc0cdc | |||
fd3b331cc0 | |||
9facbe76c8 | |||
20dff38cf7 | |||
e374bb8a73 | |||
294b9c6dd3 | |||
d92bf54c8d | |||
914e272fc2 | |||
|
b182b7fda6 | ||
|
22040b43b3 | ||
|
50170cf599 | ||
|
2deff46a7e | ||
|
e939a787ba | ||
|
4ae9562ce1 | ||
|
288e507e6c | ||
d9848a8ba3 | |||
a9d42484cc | |||
a276593c7f | |||
ff50650c28 | |||
d7efeb8d59 | |||
fd71d1f38e | |||
bc8c9f8bf9 | |||
0865ca1a93 | |||
1bc3983f55 | |||
945d88839f | |||
7c06343909 | |||
b8f8f27794 | |||
2a31771ac6 | |||
3f17341b2e | |||
6165f523cc | |||
19dce51a28 | |||
b29cd8e4c9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -51,4 +51,5 @@ projects/common-map/node_modules/
|
|||||||
.angular/*
|
.angular/*
|
||||||
projects/common-map3d/node_modules/
|
projects/common-map3d/node_modules/
|
||||||
projects/common-map/node_modules/
|
projects/common-map/node_modules/
|
||||||
|
projects/ng-openlayers/node_modules/
|
||||||
projects/common/node_modules/
|
projects/common/node_modules/
|
||||||
|
54
Jenkinsfile
vendored
54
Jenkinsfile
vendored
@@ -1,54 +1,24 @@
|
|||||||
|
@Library('farmmaps-shared-library') _
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any;
|
||||||
environment {
|
options {
|
||||||
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
|
copyArtifactPermission projectNames: env.allProjectsArtifactPermission;
|
||||||
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX}"
|
disableConcurrentBuilds();
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('npm install'){
|
stage('FarmmapsLibBuildAll') {
|
||||||
steps {
|
steps {
|
||||||
sh '''rm -rf node_modules/
|
stepFarmmapsLibBuildAll();
|
||||||
npm install --legacy-peer-deps
|
|
||||||
cd projects/common
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
cd ../common-map
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
cd ../common-map3d
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('build'){
|
|
||||||
steps {
|
|
||||||
sh '''ng build common --configuration production
|
|
||||||
ng build common-map --configuration production
|
|
||||||
ng build common-map3d --configuration production'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('npm publish'){
|
|
||||||
steps {
|
|
||||||
sh '''cd dist/common
|
|
||||||
npm version ${PACKAGE_VERSION} --allow-same-version
|
|
||||||
npm publish
|
|
||||||
cd ../common-map
|
|
||||||
npm version ${PACKAGE_VERSION} --allow-same-version
|
|
||||||
npm publish
|
|
||||||
cd ../common-map3d
|
|
||||||
npm version ${PACKAGE_VERSION} --allow-same-version
|
|
||||||
npm publish'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
success {
|
||||||
|
postSuccess();
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
emailext (
|
postAlways();
|
||||||
body: '${DEFAULT_CONTENT}',
|
|
||||||
mimeType: 'text/html',
|
|
||||||
replyTo: '${DEFAULT_REPLYTO}',
|
|
||||||
subject: '${DEFAULT_SUBJECT}',
|
|
||||||
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,54 +1,24 @@
|
|||||||
|
@Library('farmmaps-shared-library') _
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any;
|
||||||
environment {
|
options {
|
||||||
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
|
copyArtifactPermission projectNames: env.allProjectsArtifactPermission;
|
||||||
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX + '-prerelease.' + env.BUILD_NUMBER}"
|
disableConcurrentBuilds();
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('npm install'){
|
stage('FarmmapsLibBuildAll') {
|
||||||
steps {
|
steps {
|
||||||
sh '''rm -rf node_modules/
|
stepFarmmapsLibBuildAll();
|
||||||
npm install --legacy-peer-deps
|
|
||||||
cd projects/common
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
cd ../common-map
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
cd ../common-map3d
|
|
||||||
npm install --legacy-peer-deps
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('build'){
|
|
||||||
steps {
|
|
||||||
sh '''ng build common --configuration production
|
|
||||||
ng build common-map --configuration production
|
|
||||||
ng build common-map3d --configuration production'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('npm publish'){
|
|
||||||
steps {
|
|
||||||
sh '''cd dist/common
|
|
||||||
npm version ${PACKAGE_VERSION}
|
|
||||||
npm publish
|
|
||||||
cd ../common-map
|
|
||||||
npm version ${PACKAGE_VERSION}
|
|
||||||
npm publish
|
|
||||||
cd ../common-map3d
|
|
||||||
npm version ${PACKAGE_VERSION}
|
|
||||||
npm publish'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
success {
|
||||||
|
postSuccess();
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
emailext (
|
postAlways();
|
||||||
body: '${DEFAULT_CONTENT}',
|
|
||||||
mimeType: 'text/html',
|
|
||||||
replyTo: '${DEFAULT_REPLYTO}',
|
|
||||||
subject: '${DEFAULT_SUBJECT}',
|
|
||||||
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -51,7 +51,7 @@ npm install -g @angular/cli
|
|||||||
npm install
|
npm install
|
||||||
ng serve
|
ng serve
|
||||||
```
|
```
|
||||||
*Go*
|
*Go*`
|
||||||
|
|
||||||
Point your browser to http://localhost:4200
|
Point your browser to http://localhost:4200
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 143 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -51,7 +51,17 @@
|
|||||||
content: "i";
|
content: "i";
|
||||||
}
|
}
|
||||||
|
|
||||||
hallo
|
.fm-carbon:before {
|
||||||
|
content: "j";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-bo-akkerbouw:before {
|
||||||
|
content: "k";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-grass:before {
|
||||||
|
content: "l";
|
||||||
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "FarmMaps";
|
font-family: "FarmMaps";
|
||||||
|
22533
package-lock.json
generated
22533
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
66
package.json
66
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "3.0.2",
|
"version": "4.5.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
@@ -11,23 +11,24 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^14.1.3",
|
"@angular/animations": "^17.3.3",
|
||||||
"@angular/common": "^14.1.3",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/compiler": "^14.1.3",
|
"@angular/compiler": "^17.3.3",
|
||||||
"@angular/core": "^14.1.3",
|
"@angular/core": "^17.3.3",
|
||||||
"@angular-eslint/eslint-plugin": "^15.2.1",
|
"@angular-eslint/eslint-plugin": "^15.2.1",
|
||||||
"@angular/forms": "^14.1.3",
|
"@angular/forms": "^17.3.3",
|
||||||
"@angular/platform-browser": "^14.1.3",
|
"@angular/platform-browser": "^17.3.3",
|
||||||
"@angular/platform-browser-dynamic": "^14.1.3",
|
"@angular/platform-browser-dynamic": "^17.3.3",
|
||||||
"@angular/router": "^14.1.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",
|
||||||
|
"ng-openlayers": "17.1.3",
|
||||||
"@microsoft/signalr": "^3.1.16",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^13.0.0",
|
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
|
||||||
"@ngrx/effects": "^14",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": "^14",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": "^14",
|
"@ngrx/store": "^17",
|
||||||
"@popperjs/core": "^2.11.6",
|
"@popperjs/core": "^2.11.6",
|
||||||
"angular-oauth2-oidc": "^13",
|
"angular-oauth2-oidc": "^13",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
@@ -38,38 +39,37 @@
|
|||||||
"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": "^14",
|
"ngrx-store-localstorage": "17.0.0",
|
||||||
"ngx-avatar": "^4.1.0",
|
"ngx-avatars": "1.7.0",
|
||||||
"ngx-clipboard": "^14.0.1",
|
"ngx-clipboard": "16.0.0",
|
||||||
"ngx-image-cropper": "^3.3.5",
|
"ngx-image-cropper": "^7.2.1",
|
||||||
"ngx-openlayers": "1.0.0-next.19",
|
"ngx-uploadx": "^6.2.0",
|
||||||
"ngx-uploadx": "^5.2.0",
|
"ol": "^8.2.0",
|
||||||
"ol": "6.14.1",
|
|
||||||
"olcs": "^2.13.1",
|
"olcs": "^2.13.1",
|
||||||
"resumablejs": "^1.1.0",
|
"resumablejs": "^1.1.0",
|
||||||
"rxjs": "^6.6.7",
|
"rxjs": "^7.8.1",
|
||||||
"stream": "^0.0.2",
|
"stream": "^0.0.2",
|
||||||
"stream-http": "^3.2.0",
|
"stream-http": "^3.2.0",
|
||||||
"tassign": "^1.0.0",
|
"tassign": "^1.0.0",
|
||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
"url": "^0.11.0",
|
"url": "^0.11.0",
|
||||||
"util": "^0.12.4",
|
"util": "^0.12.4",
|
||||||
"zone.js": "~0.11.4"
|
"zone.js": "~0.14.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-builders/custom-webpack": "^14",
|
"@angular-builders/custom-webpack": "^17",
|
||||||
"@angular-devkit/build-angular": "^14.1.3",
|
"@angular-devkit/build-angular": "^17.3.3",
|
||||||
"@angular/cli": "^14.1.3",
|
"@angular/cli": "^17.3.3",
|
||||||
"@angular/compiler-cli": "^14.1.3",
|
"@angular/compiler-cli": "^17.3.3",
|
||||||
"@angular/language-service": "^14.1.3",
|
"@angular/language-service": "^17.3.3",
|
||||||
"@angular/localize": "^14.1.3",
|
"@angular/localize": "^17.3.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": "^12.20.15",
|
"@types/node": "^12.20.15",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||||
"@typescript-eslint/eslint-plugin-tslint": "^5.54.0",
|
"@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^6.18.0",
|
||||||
"codelyzer": "^0.0.28",
|
"codelyzer": "^0.0.28",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.35.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
@@ -81,9 +81,9 @@
|
|||||||
"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": "^14.1.0",
|
"ng-packagr": "^17.3.0",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"ts-node": "^8.8.1",
|
"ts-node": "^8.8.1",
|
||||||
"typescript": "~4.6.4"
|
"typescript": "~5.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
16
projects/common-map/package-lock.json
generated
16
projects/common-map/package-lock.json
generated
@@ -11,14 +11,14 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": ">=14.0.0",
|
"@angular/core": "^17.3.3",
|
||||||
"@ngrx/effects": ">=14.0.0",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": ">=14.0.0",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": ">=14.0.0",
|
"@ngrx/store": "^17",
|
||||||
"ngrx-store-localstorage": ">=14.0.0",
|
"ng-openlayers": "17.1.3",
|
||||||
"ngx-openlayers": ">=1.0.0-next.19",
|
"ngrx-store-localstorage": "^17",
|
||||||
"ol": ">=6.8.1",
|
"ol": "^8.2.0",
|
||||||
"tassign": ">=1.0.0"
|
"tassign": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
|
@@ -8,13 +8,13 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": ">=14.0.0",
|
"@angular/core": "^17.3.3",
|
||||||
"ngrx-store-localstorage": ">=14.0.0",
|
"ngrx-store-localstorage": "^17",
|
||||||
"@ngrx/effects": ">=14.0.0",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store":">=14.0.0",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store":">=14.0.0",
|
"@ngrx/store": "^17",
|
||||||
"tassign": ">=1.0.0",
|
"tassign": "^1.0.0",
|
||||||
"ngx-openlayers": ">=1.0.0-next.19",
|
"ng-openlayers": "17.1.3",
|
||||||
"ol": ">=6.8.1"
|
"ol": "^8.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -18,6 +18,7 @@ export const SETPARENT = '[Map] SetParent';
|
|||||||
export const SETPERIOD = '[Map] SetPeriod';
|
export const SETPERIOD = '[Map] SetPeriod';
|
||||||
export const STARTSEARCH = '[Map] StartSearch';
|
export const STARTSEARCH = '[Map] StartSearch';
|
||||||
export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess';
|
export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess';
|
||||||
|
export const CLICKFEATURE = '[Map] ClickFeature';
|
||||||
export const SELECTFEATURE = '[Map] SelectFeature';
|
export const SELECTFEATURE = '[Map] SelectFeature';
|
||||||
export const SELECTITEM = '[Map] SelectItem';
|
export const SELECTITEM = '[Map] SelectItem';
|
||||||
export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess';
|
export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess';
|
||||||
@@ -56,7 +57,8 @@ export const GETLAYERVALUE = '[Map] GetLayerValue'
|
|||||||
export const GETLAYERVALUESUCCESS = '[Map] GetLayerValueSuccess'
|
export const GETLAYERVALUESUCCESS = '[Map] GetLayerValueSuccess'
|
||||||
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
|
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
|
||||||
export const SETVIEWSTATE = '[Map] SetViewState'
|
export const SETVIEWSTATE = '[Map] SetViewState'
|
||||||
|
export const CLEARFEATURES = '[Map] ClearFeatures';
|
||||||
|
export const SETPANELEXTRAWIDE = '[Map] SetPanelExtraWide';
|
||||||
|
|
||||||
export class Clear implements Action {
|
export class Clear implements Action {
|
||||||
readonly type = CLEAR;
|
readonly type = CLEAR;
|
||||||
@@ -111,6 +113,12 @@ export class StartSearchSuccess implements Action {
|
|||||||
constructor(public features: Array<Feature<Geometry>>, public query:IQueryState) { }
|
constructor(public features: Array<Feature<Geometry>>, public query:IQueryState) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ClickFeature implements Action {
|
||||||
|
readonly type = CLICKFEATURE;
|
||||||
|
|
||||||
|
constructor(public feature:Feature<Geometry>) { }
|
||||||
|
}
|
||||||
|
|
||||||
export class SelectFeature implements Action {
|
export class SelectFeature implements Action {
|
||||||
readonly type = SELECTFEATURE;
|
readonly type = SELECTFEATURE;
|
||||||
|
|
||||||
@@ -329,12 +337,23 @@ export class SetViewState implements Action {
|
|||||||
constructor(public enabled:boolean) {}
|
constructor(public enabled:boolean) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ClearFeatures implements Action {
|
||||||
|
readonly type = CLEARFEATURES;
|
||||||
|
constructor() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SetPanelExtraWide implements Action {
|
||||||
|
readonly type = SETPANELEXTRAWIDE;
|
||||||
|
constructor(public panelExtraWide:boolean) {}
|
||||||
|
}
|
||||||
|
|
||||||
export type Actions = SetMapState
|
export type Actions = SetMapState
|
||||||
| Init
|
| Init
|
||||||
| Clear
|
| Clear
|
||||||
| SetParent
|
| SetParent
|
||||||
| StartSearch
|
| StartSearch
|
||||||
| StartSearchSuccess
|
| StartSearchSuccess
|
||||||
|
| ClickFeature
|
||||||
| SelectFeature
|
| SelectFeature
|
||||||
| SelectItem
|
| SelectItem
|
||||||
| SelectItemSuccess
|
| SelectItemSuccess
|
||||||
@@ -374,5 +393,7 @@ export type Actions = SetMapState
|
|||||||
| GetLayerValue
|
| GetLayerValue
|
||||||
| SetPeriod
|
| SetPeriod
|
||||||
| ToggleShowDataLayerSlide
|
| ToggleShowDataLayerSlide
|
||||||
| SetViewState;
|
| SetViewState
|
||||||
|
| ClearFeatures
|
||||||
|
| SetPanelExtraWide;
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
|
||||||
//external modules
|
//external modules
|
||||||
import { AngularOpenlayersModule } from 'ngx-openlayers';
|
import { AngularOpenlayersModule } from 'ng-openlayers';
|
||||||
import { StoreModule, ActionReducer, MetaReducer } from '@ngrx/store';
|
import { StoreModule, ActionReducer, MetaReducer } from '@ngrx/store';
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output, Inject } from '@angular/core';
|
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output, Inject } from '@angular/core';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
import * as proj from 'ol/proj';
|
import * as proj from 'ol/proj';
|
||||||
import {Point,Geometry} from 'ol/geom';
|
import {Point,Geometry} from 'ol/geom';
|
||||||
|
@@ -1,6 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
.gps-location {
|
.gps-location {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
@@ -14,7 +11,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tolerance {
|
.tolerance {
|
||||||
fill: $primary;
|
fill: var(--bs-primary);
|
||||||
fill-opacity:0.4;
|
fill-opacity:0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,20 +20,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
fill: $white;
|
fill: var(--bs-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
fill: $primary;
|
fill: var(--bs-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stop1 {
|
.stop1 {
|
||||||
stop-color: $primary;
|
stop-color: var(--bs-primary);
|
||||||
stop-opacity:1;
|
stop-opacity:1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stop2 {
|
.stop2 {
|
||||||
stop-color:$primary;
|
stop-color:var(--bs-primary);
|
||||||
stop-opacity: 0;
|
stop-opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges ,Host} from '@angular/core';
|
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges ,Host} from '@angular/core';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import Overlay from 'ol/Overlay';
|
import Overlay from 'ol/Overlay';
|
||||||
import { fromLonLat, toLonLat } from 'ol/proj';
|
import { fromLonLat, toLonLat } from 'ol/proj';
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { LayerGroupComponent, MapComponent } from 'ngx-openlayers';
|
import { LayerGroupComponent, MapComponent } from 'ng-openlayers';
|
||||||
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
||||||
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
||||||
import { ILayerData} from '../../../models/layer.data';
|
import { ILayerData} from '../../../models/layer.data';
|
||||||
@@ -19,6 +19,7 @@ import VectorTileLayer from 'ol/layer/VectorTile';
|
|||||||
import {GeoJSON,MVT} from 'ol/format';
|
import {GeoJSON,MVT} from 'ol/format';
|
||||||
import { Geometry } from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
import BaseLayer from 'ol/layer/Base';
|
import BaseLayer from 'ol/layer/Base';
|
||||||
|
import Feature from 'ol/Feature';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-item-layers',
|
selector: 'fm-map-item-layers',
|
||||||
@@ -180,9 +181,9 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
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<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);
|
const features = format.readFeatures(data).filter(feature => feature instanceof Feature) as Feature[];
|
||||||
for (const f of features) {
|
for (const f of features) {
|
||||||
if (f.get("code")) {
|
if (f.get("code")) {
|
||||||
f.setId(f.get("code"));
|
f.setId(f.get("code"));
|
||||||
@@ -250,8 +251,8 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return new style.Style(
|
return new style.Style(
|
||||||
{
|
{
|
||||||
stroke: new style.Stroke({
|
stroke: new style.Stroke({
|
||||||
color: 'red',
|
color: '#0d6efd',
|
||||||
width: 2
|
width: 3
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken } from '@angular/core';
|
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken, OnDestroy, LOCALE_ID } from '@angular/core';
|
||||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ngx-openlayers';
|
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ng-openlayers';
|
||||||
import { ItemService, ItemTypeService, IItem, IItemType } from '@farmmaps/common';
|
import { ItemService, ItemTypeService, IItem, IItemType, FolderService } from '@farmmaps/common';
|
||||||
|
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { Point, Geometry } from 'ol/geom';
|
import { Point, Geometry } from 'ol/geom';
|
||||||
@@ -17,6 +17,9 @@ import { GeoJSON } from 'ol/format';
|
|||||||
import { Select } from 'ol/interaction';
|
import { Select } from 'ol/interaction';
|
||||||
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',
|
||||||
@@ -25,8 +28,8 @@ import { FeatureIconService } from '../../../services/feature-icon.service';
|
|||||||
{ provide: SourceVectorComponent, useExisting: forwardRef(() => ItemVectorSourceComponent) }
|
{ provide: SourceVectorComponent, useExisting: forwardRef(() => ItemVectorSourceComponent) }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnChanges {
|
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
instance: Vector<Geometry>;
|
instance: Vector<Feature<Geometry>>;
|
||||||
private _format: GeoJSON;
|
private _format: GeoJSON;
|
||||||
private _select: Select;
|
private _select: Select;
|
||||||
private _hoverSelect: Select;
|
private _hoverSelect: Select;
|
||||||
@@ -38,8 +41,10 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
@Output() onFeatureSelected: EventEmitter<Feature<Geometry>> = new EventEmitter<Feature<Geometry>>();
|
@Output() onFeatureSelected: EventEmitter<Feature<Geometry>> = new EventEmitter<Feature<Geometry>>();
|
||||||
@Output() onFeatureHover: EventEmitter<Feature<Geometry>> = new EventEmitter<Feature<Geometry>>();
|
@Output() onFeatureHover: EventEmitter<Feature<Geometry>> = new EventEmitter<Feature<Geometry>>();
|
||||||
private stylesCache: IStyles = {};
|
private stylesCache: IStyles = {};
|
||||||
|
private sub: Subscription;
|
||||||
|
private displayMapFeatureSettings: { [code: string]: string[] } = defaultDisplayMapFeatureSettings();
|
||||||
|
|
||||||
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, private map: MapComponent, private itemTypeService: ItemTypeService, private featureIconService$: FeatureIconService) {
|
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();
|
this._format = new GeoJSON();
|
||||||
}
|
}
|
||||||
@@ -76,6 +81,18 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.sub = this.folderService.getFolder('my_settings').subscribe(
|
||||||
|
userSettingsRoot => {
|
||||||
|
if (userSettingsRoot == undefined) return;
|
||||||
|
this.itemService.getChildItemList(userSettingsRoot.code, 'vnd.farmmaps.itemtype.settings.general').subscribe(
|
||||||
|
items => {
|
||||||
|
if (items && items.length > 0 && items[0].data?.displayMapFeatureSettings) {
|
||||||
|
this.displayMapFeatureSettings = items[0].data?.displayMapFeatureSettings;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
);
|
||||||
this.strategy = loadingstrategy.bbox;
|
this.strategy = loadingstrategy.bbox;
|
||||||
this.format = new GeoJSON();
|
this.format = new GeoJSON();
|
||||||
this._select = new Select({
|
this._select = new Select({
|
||||||
@@ -133,7 +150,8 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
fill: new style.Fill({
|
fill: new style.Fill({
|
||||||
color: fillColor
|
color: fillColor
|
||||||
}),
|
}),
|
||||||
geometry: (feature: Feature<Geometry>) => this.geometry(feature)
|
geometry: (feature: Feature<Geometry>) => this.geometry(feature),
|
||||||
|
text: this.getDisplayTextForFeature(feature, this.map.instance.getView().getZoom())
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
key = 'file';
|
key = 'file';
|
||||||
@@ -153,6 +171,10 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (this.sub) this.sub.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes["features"] && this.instance) {
|
if (changes["features"] && this.instance) {
|
||||||
this.instance.clear(true);
|
this.instance.clear(true);
|
||||||
@@ -188,4 +210,51 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDisplayTextForFeature(feature: Feature<Geometry>, zoom: number, overrule?: style.Text) {
|
||||||
|
if (!feature) return null;
|
||||||
|
|
||||||
|
const propertiesToShow: string[] = this.displayMapFeatureSettings[feature.get('itemType')];
|
||||||
|
if (!propertiesToShow) return null;
|
||||||
|
if (propertiesToShow.length <= 0) return null;
|
||||||
|
if (zoom < 14) return null;
|
||||||
|
|
||||||
|
let displayText = '';
|
||||||
|
for (let i = 0; i < propertiesToShow.length; i++) {
|
||||||
|
let value = feature.get(propertiesToShow[i]);
|
||||||
|
switch (propertiesToShow[i]) {
|
||||||
|
case "area": value = formatNumber(value, this.locale, '0.1-2') + ' ha'; break;
|
||||||
|
case "centroid": {
|
||||||
|
if (feature.getGeometry()) {
|
||||||
|
const centroid = getCenter(feature.getGeometry().getExtent());
|
||||||
|
value = Math.round(centroid[0]) + ',' + Math.round(centroid[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (value) {
|
||||||
|
displayText += value + (i < propertiesToShow.length ? '\n' : '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const styleText = new style.Text({
|
||||||
|
font: '13px Calibri,sans-serif',
|
||||||
|
fill: new style.Fill({ color: '#ffffff' }),
|
||||||
|
stroke: new style.Stroke({ color: '#000000', width: 2 }),
|
||||||
|
text: displayText
|
||||||
|
});
|
||||||
|
|
||||||
|
if (overrule) {
|
||||||
|
if (overrule.getFont()) styleText.setFont(overrule.getFont());
|
||||||
|
if (overrule.getFill()) styleText.setFill(overrule.getFill());
|
||||||
|
if (overrule.getStroke()) styleText.setStroke(overrule.getStroke());
|
||||||
|
}
|
||||||
|
|
||||||
|
return styleText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function defaultDisplayMapFeatureSettings() {
|
||||||
|
return {
|
||||||
|
'vnd.farmmaps.itemtype.cropfield': ['name', 'cropTypeName', 'area']
|
||||||
|
};
|
||||||
}
|
}
|
@@ -3,7 +3,7 @@ import { IItemLayer } from '../../../models/item.layer';
|
|||||||
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 * as mapActions from '../../../actions/map.actions';
|
import * as mapActions from '../../../actions/map.actions';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import { ILayervalue } from '../../../models/layer.value';
|
import { ILayervalue } from '../../../models/layer.value';
|
||||||
import { Observable, interval, Subject } from 'rxjs';
|
import { Observable, interval, Subject } from 'rxjs';
|
||||||
import { debounce, throttle } from 'rxjs/operators';
|
import { debounce, throttle } from 'rxjs/operators';
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { LayerVectorComponent, MapComponent } from 'ngx-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';
|
||||||
|
import Feature from 'ol/Feature';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-aol-layer-vector-image',
|
selector: 'fm-map-aol-layer-vector-image',
|
||||||
@@ -14,7 +15,7 @@ export class LayerVectorImageComponent extends LayerVectorComponent implements O
|
|||||||
//public source: Vector;
|
//public source: Vector;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
renderMode: RenderType<VectorSource<Geometry>> | string = "image";
|
renderMode: RenderType<VectorSource<Feature<Geometry>>> | string = "image";
|
||||||
|
|
||||||
constructor(map: MapComponent) {
|
constructor(map: MapComponent) {
|
||||||
super(map);
|
super(map);
|
||||||
|
@@ -1,11 +1,8 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
.gps-location {
|
.gps-location {
|
||||||
display:block;
|
display:block;
|
||||||
width:2.5em;
|
width:2.5em;
|
||||||
height:2.5em;
|
height:2.5em;
|
||||||
background-color: $body-bg;
|
background-color: var(--bs-body-bg);
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
margin-top:0.5em;
|
margin-top:0.5em;
|
||||||
border-radius: 1.75em;
|
border-radius: 1.75em;
|
||||||
@@ -17,15 +14,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pan-to {
|
.pan-to {
|
||||||
fill: $secondary;
|
fill: var(--bs-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.gps-location:hover .pan-to {
|
div.gps-location:hover .pan-to {
|
||||||
fill: $white;
|
fill: var(--bs-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
.pan-to-centered {
|
.pan-to-centered {
|
||||||
fill: $primary;
|
fill: var(--bs-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.gps-location:hover .pan-to-centered {
|
div.gps-location:hover .pan-to-centered {
|
||||||
@@ -33,5 +30,5 @@ div.gps-location:hover .pan-to-centered {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pan-to.pan-to-disabled {
|
.pan-to.pan-to-disabled {
|
||||||
fill: $gray-300;
|
fill: var(--bs-gray-300);
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit, Input, Host, OnChanges, SimpleChanges,ChangeDetectorRef } from '@angular/core';
|
import { Component, OnInit, Input, Host, OnChanges, SimpleChanges,ChangeDetectorRef } from '@angular/core';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
import {IMapState} from '../../../models/map.state'
|
import {IMapState} from '../../../models/map.state'
|
||||||
import {View} from 'ol';
|
import {View} from 'ol';
|
||||||
import { fromLonLat } from 'ol/proj';
|
import { fromLonLat } from 'ol/proj';
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.compass {
|
.compass {
|
||||||
width:2.5em;
|
width:2.5em;
|
||||||
height:2.5em;
|
height:2.5em;
|
||||||
@@ -13,7 +11,7 @@
|
|||||||
|
|
||||||
#north {
|
#north {
|
||||||
display: none;
|
display: none;
|
||||||
fill:$black;
|
fill:var(--bs-black);
|
||||||
}
|
}
|
||||||
|
|
||||||
#top-l {
|
#top-l {
|
||||||
@@ -33,23 +31,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.compass:hover #top-l {
|
div.compass:hover #top-l {
|
||||||
fill:$white;
|
fill:var(--bs-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.compass:hover #top-r {
|
div.compass:hover #top-r {
|
||||||
fill:$gray-300;
|
fill:var(--bs-gray-300);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.compass:hover #bottom-l {
|
div.compass:hover #bottom-l {
|
||||||
fill:$gray-300;
|
fill:var(--bs-gray-300);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.compass:hover #bottom-r {
|
div.compass:hover #bottom-r {
|
||||||
fill:$white;
|
fill:var(--bs-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
div.compass:hover #north {
|
div.compass:hover #north {
|
||||||
fill:$white;
|
fill:var(--bs-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
.compass-n {
|
.compass-n {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Host, Input, OnInit, ChangeDetectorRef } from '@angular/core';
|
import { Component, Host, Input, OnInit, ChangeDetectorRef } from '@angular/core';
|
||||||
import { ViewComponent, MapComponent } from 'ngx-openlayers';
|
import { ViewComponent, 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, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ViewComponent, MapComponent } from 'ngx-openlayers';
|
import { ViewComponent, MapComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -1,14 +1,10 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid $gray-500;
|
border-bottom: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 44rem) {
|
@media screen and (min-width: 44rem) {
|
||||||
|
@@ -64,9 +64,9 @@ export class FeatureListContainerComponent {
|
|||||||
viewContainerRef.clear();
|
viewContainerRef.clear();
|
||||||
if(showItem) {
|
if(showItem) {
|
||||||
this.componentRef = viewContainerRef.createComponent(componentFactory);
|
this.componentRef = viewContainerRef.createComponent(componentFactory);
|
||||||
(<AbstractFeatureListComponent>this.componentRef.instance).features = null;
|
(<AbstractFeatureListComponent>this.componentRef.instance).features = this.features;
|
||||||
(<AbstractFeatureListComponent>this.componentRef.instance).queryState = queryState;
|
(<AbstractFeatureListComponent>this.componentRef.instance).queryState = this.queryState;
|
||||||
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = null;
|
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = this.selectedFeature;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,22 +1,20 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
fm-map-feature-list-feature-container {
|
fm-map-feature-list-feature-container {
|
||||||
width:100%;
|
width:100%;
|
||||||
pointer-events:none;
|
pointer-events:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid $gray-500;
|
border-bottom: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding-left:1.5rem;
|
padding-left:1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cropfields {
|
.cropfields {
|
||||||
border-top: 1px solid $gray-500;
|
border-top: 1px solid var(--bs-gray-500);
|
||||||
margin-left: -1.25rem;
|
margin-left: -1.25rem;
|
||||||
margin-right: -1.25rem;
|
margin-right: -1.25rem;
|
||||||
}
|
}
|
||||||
|
@@ -1,22 +1,20 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
fm-map-feature-list-feature-container {
|
fm-map-feature-list-feature-container {
|
||||||
width:100%;
|
width:100%;
|
||||||
pointer-events:none;
|
pointer-events:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid $gray-500;
|
border-bottom: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding-left:1.5rem;
|
padding-left:1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.farms {
|
.farms {
|
||||||
border-top: 1px solid $gray-500;
|
border-top: 1px solid var(--bs-gray-500);
|
||||||
margin-left: -1.25rem;
|
margin-left: -1.25rem;
|
||||||
margin-right: -1.25rem;
|
margin-right: -1.25rem;
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@@ -1,15 +1,13 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
fm-map-feature-list-feature-container {
|
fm-map-feature-list-feature-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid $gray-500;
|
border-bottom: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@ export abstract class AbstractFeatureListComponent {
|
|||||||
|
|
||||||
handleFeatureClick(feature:Feature<Geometry>) {
|
handleFeatureClick(feature:Feature<Geometry>) {
|
||||||
if(feature) {
|
if(feature) {
|
||||||
|
this.store.dispatch(new mapActions.ClickFeature(feature));
|
||||||
const action = this.getAction(feature);
|
const action = this.getAction(feature);
|
||||||
this.store.dispatch(action);
|
this.store.dispatch(action);
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input, OnChanges } from '@angular/core';
|
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input, OnChanges } from '@angular/core';
|
||||||
import { Layer } from 'ol/layer';
|
import { Layer } from 'ol/layer';
|
||||||
import { Source } from 'ol/source';
|
import { Source } from 'ol/source';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[fmMapIfZoomToShow]',
|
selector: '[fmMapIfZoomToShow]',
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.widget {
|
.widget {
|
||||||
padding:0.8rem;
|
padding:0.8rem;
|
||||||
height:100%;
|
height:100%;
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.widget-container {
|
.widget-container {
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
margin-bottom:1rem;
|
margin-bottom:1rem;
|
||||||
@@ -7,7 +5,7 @@
|
|||||||
|
|
||||||
.widget {
|
.widget {
|
||||||
position:relative;
|
position:relative;
|
||||||
border: 1px solid $gray-500;
|
border: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
width:50%;
|
width:50%;
|
||||||
@@ -28,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.widget:hover {
|
.widget:hover {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget-container {
|
.widget-container {
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.widget-container {
|
.widget-container {
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
margin-bottom:1rem;
|
margin-bottom:1rem;
|
||||||
@@ -7,7 +5,7 @@
|
|||||||
|
|
||||||
.widget {
|
.widget {
|
||||||
position:relative;
|
position:relative;
|
||||||
border: 1px solid $gray-500;
|
border: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
width:50%;
|
width:50%;
|
||||||
@@ -28,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.widget:hover {
|
.widget:hover {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget-container {
|
.widget-container {
|
||||||
|
@@ -1,18 +1,15 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
.layer-switcher {
|
.layer-switcher {
|
||||||
display:block;
|
display:block;
|
||||||
width:2.5em;
|
width:2.5em;
|
||||||
height:2.5em;
|
height:2.5em;
|
||||||
background-color: $body-bg;
|
background-color: var(--bs-body-bg);
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
margin-top:0.5em;
|
margin-top:0.5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 2.5em;
|
line-height: 2.5em;
|
||||||
border-radius: 1.75em;
|
border-radius: 1.75em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: $secondary;
|
color: var(--bs-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer-switcher i {
|
.layer-switcher i {
|
||||||
@@ -24,7 +21,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layers {
|
.layers {
|
||||||
color:$secondary;
|
color:var(--bs-secondary);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
bottom: -1em;
|
bottom: -1em;
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
<div class="row ps-3">
|
<div class="row ps-3">
|
||||||
<div class="col-8 nopadding"><span i18n>Average</span>:</div>
|
<div class="col-8 nopadding"><span i18n>Average</span>:</div>
|
||||||
<div class="col-4 pull-left nopadding">{{histogram.mean| number:'1.0-2'}}</div>
|
<div class="col-4 pull-left nopadding">{{ getScaledValue(histogram.mean)| number:'1.0-2'}}</div>
|
||||||
<div class="col-8 nopadding"><span i18n>Standard deviation</span>:</div>
|
<div class="col-8 nopadding"><span i18n>Standard deviation</span>:</div>
|
||||||
<div class="col-4 pull-left nopadding">{{histogram.stddev| number:'1.0-2'}}</div>
|
<div class="col-4 pull-left nopadding">{{ getScaledValue(histogram.stddev)| number:'1.0-2'}}</div>
|
||||||
<div class="col-8 nopadding"><span i18n>Min</span>:</div>
|
<div class="col-8 nopadding"><span i18n>Min</span>:</div>
|
||||||
<div class="col-4 pull-left nopadding">{{histogram.min| number:'1.0-2'}}</div>
|
<div class="col-4 pull-left nopadding">{{ getScaledValue(histogram.min)| number:'1.0-2'}}</div>
|
||||||
<div class="col-8 nopadding" ><span i18n>Max</span>:</div>
|
<div class="col-8 nopadding" ><span i18n>Max</span>:</div>
|
||||||
<div class="col-4 pull-left nopadding">{{histogram.max| number:'1.0-2'}}</div>
|
<div class="col-4 pull-left nopadding">{{ getScaledValue(histogram.max)| number:'1.0-2'}}</div>
|
||||||
|
|
||||||
<ng-container *ngIf="showConfidenceInterval()">
|
<ng-container *ngIf="showConfidenceInterval()">
|
||||||
<div class="col-8 nopadding"><span i18n>Confidence interval</span>:</div>
|
<div class="col-8 nopadding"><span i18n>Confidence interval</span>:</div>
|
||||||
<div class="col-4 pull-left nopadding">{{histogram.confidence * 100| number:'1.0-0'}}%</div>
|
<div class="col-4 pull-left nopadding">{{ getScaledValue(histogram.confidence * 100)| number:'1.0-0'}}%</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -14,6 +14,17 @@ export class HistogramDetailsComponent {
|
|||||||
@Input()
|
@Input()
|
||||||
histogram: IHistogram;
|
histogram: IHistogram;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
scale: number | null;
|
||||||
|
|
||||||
|
public getScaledValue(value: number): number {
|
||||||
|
let v = value;
|
||||||
|
if (this.scale && this.scale != 0) {
|
||||||
|
v = this.scale * value;
|
||||||
|
}
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
showConfidenceInterval(): boolean {
|
showConfidenceInterval(): boolean {
|
||||||
return this.histogram.confidence != null && this.histogram.confidence !== 1;
|
return this.histogram.confidence != null && this.histogram.confidence !== 1;
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-template #histogram>
|
<ng-template #histogram>
|
||||||
<fm-map-histogram-details [histogram]="layer.renderer.band.histogram"></fm-map-histogram-details>
|
<fm-map-histogram-details [histogram]="layer.renderer.band.histogram" [scale]="layer.scale"></fm-map-histogram-details>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
div.map-search {
|
div.map-search {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0.5rem;
|
top: 0.5rem;
|
||||||
@@ -106,7 +104,7 @@ div.map-search.searchcollapsed button[type="submit"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-control, .form-control:focus {
|
.form-control, .form-control:focus {
|
||||||
border-color: $secondary;
|
border-color: var(--bs-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
panelVisible:panelVisible$|async,
|
panelVisible:panelVisible$|async,
|
||||||
openedModalName:openedModalName$|async,
|
openedModalName:openedModalName$|async,
|
||||||
panelCollapsed:panelCollapsed$|async,
|
panelCollapsed:panelCollapsed$|async,
|
||||||
|
panelExtraWide:panelExtraWide$|async,
|
||||||
searchMinified:searchMinified$|async,
|
searchMinified:searchMinified$|async,
|
||||||
selectedItem:selectedItem$|async,
|
selectedItem:selectedItem$|async,
|
||||||
parentItem:parentItem$|async,
|
parentItem:parentItem$|async,
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-panel-container">
|
<div class="side-panel-container">
|
||||||
|
|
||||||
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false">
|
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false" [extrawide]="state.panelExtraWide">
|
||||||
<div class="panel-wrapper" *ngIf="noContent">
|
<div class="panel-wrapper" *ngIf="noContent">
|
||||||
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
|
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
|
||||||
</div>
|
</div>
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fm-side-panel>
|
</fm-side-panel>
|
||||||
<fm-side-panel [resizeable]="true" [visible]="!noContent">
|
<fm-side-panel [resizeable]="true" [visible]="!noContent" [extrawide]="state.panelExtraWide">
|
||||||
<router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet>
|
<router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet>
|
||||||
</fm-side-panel>
|
</fm-side-panel>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
aol-map { position:absolute;width:100%;height:calc( 100vh );}
|
aol-map { position:absolute;width:100%;height:calc( 100vh );}
|
||||||
|
|
||||||
.arrow {
|
.arrow {
|
||||||
@@ -195,7 +193,7 @@ timespan.menuVisible {
|
|||||||
width: 4rem;
|
width: 4rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
color: $primary;
|
color: var(--bs-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.shortcut-icon > .farm-icon {
|
.shortcut-icon > .farm-icon {
|
||||||
|
@@ -66,6 +66,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
public parentCode$: Observable<string> =this.store.select(mapReducers.selectGetParentCode);
|
public parentCode$: Observable<string> =this.store.select(mapReducers.selectGetParentCode);
|
||||||
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
|
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
|
||||||
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
|
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
|
||||||
|
public panelExtraWide$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelExtraWide);
|
||||||
public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature);
|
public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature);
|
||||||
public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
|
public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
|
||||||
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
|
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
|
||||||
@@ -119,7 +120,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([query,mapState]) =>{
|
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([query,mapState]) =>{
|
||||||
if(query && query.querystate) {
|
if(query && query.querystate) {
|
||||||
let newQueryState = tassign(mapReducers.initialQueryState);
|
let newQueryState = tassign(mapReducers.initialQueryState);
|
||||||
console.debug(`Do Query`);
|
//console.debug(`Do Query`);
|
||||||
const urlparts=[];
|
const urlparts=[];
|
||||||
if (query.querystate.itemCode && query.querystate.itemCode != "") {
|
if (query.querystate.itemCode && query.querystate.itemCode != "") {
|
||||||
if(query.querystate.itemType && query.querystate.itemType!= "") {
|
if(query.querystate.itemType && query.querystate.itemType!= "") {
|
||||||
@@ -192,6 +193,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleFeatureClick(feature: Feature<Geometry>) {
|
handleFeatureClick(feature: Feature<Geometry>) {
|
||||||
|
this.store.dispatch(new mapActions.ClickFeature(feature));
|
||||||
this.clickedFeature.next(feature);
|
this.clickedFeature.next(feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,12 +209,18 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
if(component && component.hasOwnProperty('clickedFeature')) {
|
if(component && component.hasOwnProperty('clickedFeature')) {
|
||||||
(component as IClickedFeature).clickedFeature = this.clickedFeature;
|
(component as IClickedFeature).clickedFeature = this.clickedFeature;
|
||||||
}
|
}
|
||||||
|
if(component && component.hasOwnProperty('extrawide')) {
|
||||||
|
this.store.dispatch(new mapActions.SetPanelExtraWide(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSidepaneloutletDeactivate(component:any) {
|
handleSidepaneloutletDeactivate(component:any) {
|
||||||
if(component && component.hasOwnProperty('clickedFeature')) {
|
if(component && component.hasOwnProperty('clickedFeature')) {
|
||||||
(component as IClickedFeature).clickedFeature = null;
|
(component as IClickedFeature).clickedFeature = null;
|
||||||
}
|
}
|
||||||
|
if(component && component.hasOwnProperty('extrawide')) {
|
||||||
|
this.store.dispatch(new mapActions.SetPanelExtraWide(false));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePrerender(event:any) {
|
handlePrerender(event:any) {
|
||||||
@@ -242,7 +250,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
console.debug("Init");
|
//console.debug("Init");
|
||||||
this.store.dispatch(new mapActions.Clear());
|
this.store.dispatch(new mapActions.Clear());
|
||||||
this.selectedFeatures$.next({x:0,y:0,features:[]});
|
this.selectedFeatures$.next({x:0,y:0,features:[]});
|
||||||
this.selectedFeatures$.next(null);
|
this.selectedFeatures$.next(null);
|
||||||
@@ -314,7 +322,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
console.debug("View init");
|
//console.debug("View init");
|
||||||
this.noContent=true;
|
this.noContent=true;
|
||||||
this.route.children.forEach((entry) => {
|
this.route.children.forEach((entry) => {
|
||||||
if(entry.outlet=="primary") {
|
if(entry.outlet=="primary") {
|
||||||
@@ -348,7 +356,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
})).subscribe((action) => {
|
})).subscribe((action) => {
|
||||||
if(action) {
|
if(action) {
|
||||||
this.zone.run(() => {
|
this.zone.run(() => {
|
||||||
console.debug("Url to state");
|
//console.debug("Url to state");
|
||||||
this.store.dispatch(action);
|
this.store.dispatch(action);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -365,9 +373,9 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
else {
|
else {
|
||||||
return of(null);
|
return of(null);
|
||||||
}
|
}
|
||||||
})).subscribe((newUrlState) =>{
|
})).subscribe((newUrlState: any) => {
|
||||||
if(newUrlState) {
|
if(newUrlState) {
|
||||||
console.debug(`State to url`);
|
//console.debug(`State to url`);
|
||||||
this.replaceUrl(newUrlState.mapState,newUrlState.queryState,newUrlState.replaceUrl);
|
this.replaceUrl(newUrlState.mapState,newUrlState.queryState,newUrlState.replaceUrl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -425,7 +433,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
parts.push(mapState.baseLayerCode);
|
parts.push(mapState.baseLayerCode);
|
||||||
parts.push( this.serializeService.serialize(queryState));
|
parts.push( this.serializeService.serialize(queryState));
|
||||||
|
|
||||||
console.debug("Replace url",parts);
|
//console.debug("Replace url",parts);
|
||||||
this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
|
this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -434,7 +442,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
handleOnMoveEnd(event) {
|
handleOnMoveEnd(event) {
|
||||||
if(this.initialized && this.viewEnabled) {
|
if(this.initialized && this.viewEnabled) {
|
||||||
this.zone.run(() =>{
|
this.zone.run(() =>{
|
||||||
console.debug("Move end");
|
//console.debug("Move end");
|
||||||
const map = event.map;
|
const map = event.map;
|
||||||
const view = map.getView();
|
const view = map.getView();
|
||||||
const rotation = view.getRotation();
|
const rotation = view.getRotation();
|
||||||
@@ -443,7 +451,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
const viewExtent = view.calculateExtent(this.map.instance.getSize());
|
const viewExtent = view.calculateExtent(this.map.instance.getSize());
|
||||||
const mapState: IMapState = { xCenter: center[0], yCenter: center[1], zoom: zoom, rotation: rotation, baseLayerCode: null };
|
const mapState: IMapState = { xCenter: center[0], yCenter: center[1], zoom: zoom, rotation: rotation, baseLayerCode: null };
|
||||||
const state = { mapState: mapState, viewExtent: viewExtent };
|
const state = { mapState: mapState, viewExtent: viewExtent };
|
||||||
console.debug("Center: ",center[0],center[1] );
|
//console.debug("Center: ",center[0],center[1] );
|
||||||
const source = from([state]);
|
const source = from([state]);
|
||||||
source.pipe(withLatestFrom(this.selectedBaseLayer$)).subscribe(([state, baselayer]) => {
|
source.pipe(withLatestFrom(this.selectedBaseLayer$)).subscribe(([state, baselayer]) => {
|
||||||
if (mapState && baselayer) { // do not react on first move
|
if (mapState && baselayer) { // do not react on first move
|
||||||
|
@@ -1,13 +1,9 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid $gray-500;
|
border-bottom: 1px solid var(--bs-gray-500);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row:hover {
|
.row:hover {
|
||||||
background-color: $gray-100;
|
background-color: var(--bs-gray-100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
<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)="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>
|
<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>
|
</ng-container>
|
||||||
|
<li><fm-item-link class="text-primary p-0" [itemCode]="item.code" pathSuffix="data" [showText]="true"></fm-item-link></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
|
@@ -41,7 +41,7 @@ export const {
|
|||||||
selectRouteParam, // factory function to select a route param
|
selectRouteParam, // factory function to select a route param
|
||||||
selectRouteData, // select the current route data
|
selectRouteData, // select the current route data
|
||||||
selectUrl, // select the current url
|
selectUrl, // select the current url
|
||||||
} = fromRouter.getSelectors(getRouterState);
|
} = fromRouter.getRouterSelectors(getRouterState);
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -133,7 +133,7 @@ export class MapEffects {
|
|||||||
f.id = f.properties["code"];
|
f.id = f.properties["code"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features), a.queryState));
|
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features).filter(feature => feature instanceof Feature) as Feature[], a.queryState));
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
catchError(error => of(new commonActions.Fail(error))));
|
catchError(error => of(new commonActions.Fail(error))));
|
||||||
@@ -218,7 +218,7 @@ export class MapEffects {
|
|||||||
if (!this.overrideSelectedItemLayer) {
|
if (!this.overrideSelectedItemLayer) {
|
||||||
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
|
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
|
||||||
map((feature: any) => {
|
map((feature: any) => {
|
||||||
const f = this._geojsonFormat.readFeature(feature);
|
const f = this._geojsonFormat.readFeature(feature) as Feature;
|
||||||
f.setId(action.item.code);
|
f.setId(action.item.code);
|
||||||
return new mapActions.AddFeatureSuccess(f);
|
return new mapActions.AddFeatureSuccess(f);
|
||||||
}),
|
}),
|
||||||
|
@@ -49,6 +49,7 @@ export interface State {
|
|||||||
features: Array<Feature<Geometry>>,
|
features: Array<Feature<Geometry>>,
|
||||||
panelVisible: boolean,
|
panelVisible: boolean,
|
||||||
panelCollapsed: boolean,
|
panelCollapsed: boolean,
|
||||||
|
panelExtraWide: boolean,
|
||||||
selectedFeature: Feature<Geometry>,
|
selectedFeature: Feature<Geometry>,
|
||||||
selectedItem:IItem,
|
selectedItem:IItem,
|
||||||
parentItem:IItem,
|
parentItem:IItem,
|
||||||
@@ -94,6 +95,7 @@ export const initialState: State = {
|
|||||||
features: [],
|
features: [],
|
||||||
panelVisible: false,
|
panelVisible: false,
|
||||||
panelCollapsed: false,
|
panelCollapsed: false,
|
||||||
|
panelExtraWide: false,
|
||||||
selectedFeature: null,
|
selectedFeature: null,
|
||||||
selectedItem: null,
|
selectedItem: null,
|
||||||
parentItem: null,
|
parentItem: null,
|
||||||
@@ -388,6 +390,9 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
case mapActions.CLEARLAYERS: {
|
case mapActions.CLEARLAYERS: {
|
||||||
return tassign(state, {overlayLayers: [], selectedOverlayLayer: null});
|
return tassign(state, {overlayLayers: [], selectedOverlayLayer: null});
|
||||||
}
|
}
|
||||||
|
case mapActions.CLEARFEATURES: {
|
||||||
|
return tassign(state, {features: [], selectedFeature: null});
|
||||||
|
}
|
||||||
case mapActions.SETVISIBILITY: {
|
case mapActions.SETVISIBILITY: {
|
||||||
const a = action as mapActions.SetVisibility;
|
const a = action as mapActions.SetVisibility;
|
||||||
if(state.selectedItemLayer == a.itemLayer) {
|
if(state.selectedItemLayer == a.itemLayer) {
|
||||||
@@ -569,6 +574,10 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
case mapActions.SETPANELEXTRAWIDE:{
|
||||||
|
const a= action as mapActions.SetPanelExtraWide;
|
||||||
|
return tassign(state,{panelExtraWide:a.panelExtraWide});
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
@@ -580,6 +589,7 @@ export const getParentCode = (state: State) => state.parentCode;
|
|||||||
export const getFeatures = (state: State) => state.features;
|
export const getFeatures = (state: State) => state.features;
|
||||||
export const getPanelVisible = (state: State) => state.panelVisible;
|
export const getPanelVisible = (state: State) => state.panelVisible;
|
||||||
export const getPanelCollapsed = (state: State) => state.panelCollapsed;
|
export const getPanelCollapsed = (state: State) => state.panelCollapsed;
|
||||||
|
export const getPanelExtraWide = (state: State) => state.panelExtraWide;
|
||||||
export const getSelectedFeature = (state: State) => state.selectedFeature;
|
export const getSelectedFeature = (state: State) => state.selectedFeature;
|
||||||
export const getSelectedItem = (state: State) => state.selectedItem;
|
export const getSelectedItem = (state: State) => state.selectedItem;
|
||||||
export const getParentItem = (state: State) => state.parentItem;
|
export const getParentItem = (state: State) => state.parentItem;
|
||||||
@@ -588,6 +598,7 @@ export const getClearEnabled = (state: State) => state.clearEnabled;
|
|||||||
export const getSearchCollapsed = (state: State) => state.searchCollapsed;
|
export const getSearchCollapsed = (state: State) => state.searchCollapsed;
|
||||||
export const getSearchMinified = (state: State) => state.searchMinified;
|
export const getSearchMinified = (state: State) => state.searchMinified;
|
||||||
export const getExtent = (state: State) => state.extent;
|
export const getExtent = (state: State) => state.extent;
|
||||||
|
export const getViewExtent = (state: State) => state.viewExtent;
|
||||||
export const getOverlayLayers = (state: State) => state.overlayLayers;
|
export const getOverlayLayers = (state: State) => state.overlayLayers;
|
||||||
export const getBaseLayers = (state: State) => state.baseLayers;
|
export const getBaseLayers = (state: State) => state.baseLayers;
|
||||||
export const getProjection = (state: State) => state.projection;
|
export const getProjection = (state: State) => state.projection;
|
||||||
@@ -614,6 +625,7 @@ export const selectGetParentCode = createSelector(selectMapState, getParentCode)
|
|||||||
export const selectGetFeatures = createSelector(selectMapState, getFeatures);
|
export const selectGetFeatures = createSelector(selectMapState, getFeatures);
|
||||||
export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible);
|
export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible);
|
||||||
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
|
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
|
||||||
|
export const selectGetPanelExtraWide = createSelector(selectMapState, getPanelExtraWide);
|
||||||
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
|
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
|
||||||
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
|
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
|
||||||
export const selectGetParentItem = createSelector(selectMapState, getParentItem);
|
export const selectGetParentItem = createSelector(selectMapState, getParentItem);
|
||||||
@@ -622,6 +634,7 @@ export const selectGetClearEnabled = createSelector(selectMapState, getClearEnab
|
|||||||
export const selectGetSearchCollapsed = createSelector(selectMapState, getSearchCollapsed);
|
export const selectGetSearchCollapsed = createSelector(selectMapState, getSearchCollapsed);
|
||||||
export const selectGetSearchMinified = createSelector(selectMapState, getSearchMinified);
|
export const selectGetSearchMinified = createSelector(selectMapState, getSearchMinified);
|
||||||
export const selectGetExtent = createSelector(selectMapState, getExtent);
|
export const selectGetExtent = createSelector(selectMapState, getExtent);
|
||||||
|
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 selectGetProjection = createSelector(selectMapState, getProjection);
|
export const selectGetProjection = createSelector(selectMapState, getProjection);
|
||||||
|
@@ -9,8 +9,6 @@ import {
|
|||||||
platformBrowserDynamicTesting
|
platformBrowserDynamicTesting
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
declare const require: any;
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(
|
getTestBed().initTestEnvironment(
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
@@ -18,7 +16,3 @@ getTestBed().initTestEnvironment(
|
|||||||
teardown: { destroyAfterEach: false }
|
teardown: { destroyAfterEach: false }
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// Then we find all the tests.
|
|
||||||
const context = require.context('./', true, /\.spec\.ts$/);
|
|
||||||
// And load the modules.
|
|
||||||
context.keys().map(context);
|
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../out-tsc/lib",
|
"outDir": "../../out-tsc/lib",
|
||||||
"target": "es2020",
|
|
||||||
"module": "es2015",
|
"module": "es2015",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
@@ -11,18 +10,27 @@
|
|||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es2018"
|
"es2018"
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@angular/*": [
|
||||||
|
|
||||||
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
"strictMetadataEmit": true,
|
"strictMetadataEmit": true,
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"enableResourceInlining": true
|
"enableResourceInlining": true,
|
||||||
|
"compilationMode": "partial"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"src/test.ts",
|
"src/test.ts",
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../out-tsc/lib",
|
"outDir": "../../out-tsc/lib",
|
||||||
"target": "es2020",
|
|
||||||
"module": "es2015",
|
"module": "es2015",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
6
projects/common-map3d/package-lock.json
generated
6
projects/common-map3d/package-lock.json
generated
@@ -11,10 +11,10 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": ">=14.0.0",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/core": ">=14.0.0",
|
"@angular/core": "^17.3.3",
|
||||||
"cesium": ">=1.82.1",
|
"cesium": ">=1.82.1",
|
||||||
"ngx-openlayers": "1.0.0-next.19",
|
"ng-openlayers": "17.1.3",
|
||||||
"ol-cesium": ">=2.13.0"
|
"ol-cesium": ">=2.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": ">=14.0.0",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/core": ">=14.0.0",
|
"@angular/core": "^17.3.3",
|
||||||
"ngx-openlayers": "1.0.0-next.19",
|
"ng-openlayers": "17.1.3",
|
||||||
"cesium": ">=1.82.1",
|
"cesium": ">=1.82.1",
|
||||||
"ol-cesium": ">=2.13.0"
|
"ol-cesium": ">=2.13.0"
|
||||||
},
|
},
|
||||||
|
@@ -1,17 +1,15 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.twotreed {
|
.twotreed {
|
||||||
display:block;
|
display:block;
|
||||||
width:2.5em;
|
width:2.5em;
|
||||||
height:2.5em;
|
height:2.5em;
|
||||||
background-color: $body-bg;
|
background-color: var(--bs-body-bg);
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
margin-top:0.5em;
|
margin-top:0.5em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 2.5em;
|
line-height: 2.5em;
|
||||||
border-radius: 1.75em;
|
border-radius: 1.75em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: $secondary;
|
color: var(--bs-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa-spinner {
|
.fa-spinner {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit,Input,Host } from '@angular/core';
|
import { Component, OnInit,Input,Host } from '@angular/core';
|
||||||
import { Interaction} from 'ol/interaction';
|
import { Interaction} from 'ol/interaction';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from 'ng-openlayers';
|
||||||
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';
|
||||||
|
@@ -8,13 +8,6 @@ import {
|
|||||||
platformBrowserDynamicTesting
|
platformBrowserDynamicTesting
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
declare const require: {
|
|
||||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
||||||
keys(): string[];
|
|
||||||
<T>(id: string): T;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
getTestBed().initTestEnvironment(
|
getTestBed().initTestEnvironment(
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
@@ -22,7 +15,3 @@ getTestBed().initTestEnvironment(
|
|||||||
teardown: { destroyAfterEach: false }
|
teardown: { destroyAfterEach: false }
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// Then we find all the tests.
|
|
||||||
const context = require.context('./', true, /\.spec\.ts$/);
|
|
||||||
// And load the modules.
|
|
||||||
context.keys().map(context);
|
|
||||||
|
@@ -11,18 +11,27 @@
|
|||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es2018"
|
"es2018"
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@angular/*": [
|
||||||
|
|
||||||
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
"strictMetadataEmit": true,
|
"strictMetadataEmit": true,
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"enableResourceInlining": true
|
"enableResourceInlining": true,
|
||||||
|
"compilationMode": "partial"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"src/test.ts",
|
"src/test.ts",
|
||||||
|
32
projects/common/package-lock.json
generated
32
projects/common/package-lock.json
generated
@@ -8,22 +8,22 @@
|
|||||||
"name": "@farmmaps/common",
|
"name": "@farmmaps/common",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": ">=14.0.0",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/core": ">=14.0.0",
|
"@angular/core": "^17.3.3",
|
||||||
"@angular/forms": ">=14.0.0",
|
"@angular/forms": "^17.3.3",
|
||||||
"@microsoft/signalr": ">=3.1.3",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"@ng-bootstrap/ng-bootstrap": ">=10.0.0",
|
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
|
||||||
"@ngrx/effects": ">=14.0.0",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": ">=14.0.0",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": ">=14.0.0",
|
"@ngrx/store": "^17",
|
||||||
"angular-oauth2-oidc": ">=13.0.0",
|
"angular-oauth2-oidc": "^13",
|
||||||
"bootstrap": ">=4.4.1",
|
"bootstrap": "^5.2.0",
|
||||||
"moment": ">=2.27.0",
|
"moment": "^2.29.4",
|
||||||
"ngx-avatar": ">=4.1.0",
|
"ngx-avatars": "1.7.0",
|
||||||
"ngx-clipboard": ">=14.0.1",
|
"ngx-clipboard": "16.0.0",
|
||||||
"ngx-image-cropper": ">=3.3.5",
|
"ngx-image-cropper": "^7.2.1",
|
||||||
"ngx-uploadx": ">=5.1.0",
|
"ngx-uploadx": "^6.2.0",
|
||||||
"tassign": ">=1.0.0"
|
"tassign": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5,21 +5,21 @@
|
|||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@ng-bootstrap/ng-bootstrap": ">=10.0.0",
|
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
|
||||||
"@angular/common": ">=14.0.0",
|
"@angular/common": "^17.3.3",
|
||||||
"@angular/core": ">=14.0.0",
|
"@angular/core": "^17.3.3",
|
||||||
"@angular/forms": ">=14.0.0",
|
"@angular/forms": "^17.3.3",
|
||||||
"@ngrx/effects": ">=14.0.0",
|
"@ngrx/effects": "^17",
|
||||||
"@ngrx/router-store": ">=14.0.0",
|
"@ngrx/router-store": "^17",
|
||||||
"@ngrx/store": ">=14.0.0",
|
"@ngrx/store": "^17",
|
||||||
"tassign": ">=1.0.0",
|
"tassign": "^1.0.0",
|
||||||
"bootstrap": ">=4.4.1",
|
"bootstrap": "^5.2.0",
|
||||||
"@microsoft/signalr": ">=3.1.3",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"ngx-uploadx": ">=5.1.0",
|
"ngx-uploadx": "^6.2.0",
|
||||||
"angular-oauth2-oidc": ">=13.0.0",
|
"angular-oauth2-oidc": "^13",
|
||||||
"moment": ">=2.27.0",
|
"moment": "^2.29.4",
|
||||||
"ngx-avatar": ">=4.1.0",
|
"ngx-avatars": "1.7.0",
|
||||||
"ngx-image-cropper": ">=3.3.5",
|
"ngx-image-cropper": "^7.2.1",
|
||||||
"ngx-clipboard": ">=14.0.1"
|
"ngx-clipboard": "16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -126,7 +126,7 @@ export class InitUserSettingsRoot implements Action {
|
|||||||
export class InitUserSettingsRootSuccess implements Action {
|
export class InitUserSettingsRootSuccess implements Action {
|
||||||
readonly type = INITUSERSETTINGSROOTSUCCESS;
|
readonly type = INITUSERSETTINGSROOTSUCCESS;
|
||||||
|
|
||||||
constructor(public item: IItem ) { }
|
constructor(public item: IListItem ) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class InitRoot implements Action {
|
export class InitRoot implements Action {
|
||||||
|
@@ -7,6 +7,7 @@ import {NavBarGuard} from './services/nav-bar-guard.service';
|
|||||||
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 {SessionClearedComponent} from './components/session-cleared/session-cleared.component';
|
||||||
import {NotFoundComponent} from './components/not-found/not-found.component';
|
import {NotFoundComponent} from './components/not-found/not-found.component';
|
||||||
|
import { ProductionGuard } from './services/production-guard.service';
|
||||||
|
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
@@ -21,7 +22,7 @@ const routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '**', component: NotFoundComponent,
|
path: '**', component: NotFoundComponent,
|
||||||
canActivate: [NavBarGuard]
|
canActivate: [NavBarGuard, ProductionGuard]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@ import { EventService } from './services/event.service';
|
|||||||
import { TypeaheadService } from './services/typeahead.service';
|
import { TypeaheadService } from './services/typeahead.service';
|
||||||
import { UserService } from './services/user.service';
|
import { UserService } from './services/user.service';
|
||||||
import { ImageService } from './services/image.service';
|
import { ImageService } from './services/image.service';
|
||||||
|
import { DownloadService } from './services/download.service';
|
||||||
import { GeolocatorService } from './services/geolocator.service';
|
import { GeolocatorService } from './services/geolocator.service';
|
||||||
import { WeatherService} from './services/weather.service';
|
import { WeatherService} from './services/weather.service';
|
||||||
import { AppConfig } from './shared/app.config';
|
import { AppConfig } from './shared/app.config';
|
||||||
@@ -48,6 +49,7 @@ export {
|
|||||||
TypeaheadService,
|
TypeaheadService,
|
||||||
UserService,
|
UserService,
|
||||||
ImageService,
|
ImageService,
|
||||||
|
DownloadService,
|
||||||
GeolocatorService,
|
GeolocatorService,
|
||||||
WeatherService,
|
WeatherService,
|
||||||
AppConfig,
|
AppConfig,
|
||||||
|
@@ -42,6 +42,8 @@ import { IEventMessage } from './models/event.message';
|
|||||||
import { IItem, Item } from './models/item';
|
import { IItem, Item } from './models/item';
|
||||||
import { WeatherCurrentObservation } from './models/weatherCurrentObservation';
|
import { WeatherCurrentObservation } from './models/weatherCurrentObservation';
|
||||||
import { IItemType } from './models/item.type';
|
import { IItemType } from './models/item.type';
|
||||||
|
import { IItemLinkType} from './models/itemlink.type';
|
||||||
|
import {IUrlType} from './models/url.type';
|
||||||
import { IItemTypes } from './models/item.types';
|
import { IItemTypes } from './models/item.types';
|
||||||
import { IItemTask, ItemTask } from './models/itemTask';
|
import { IItemTask, ItemTask } from './models/itemTask';
|
||||||
import { IListItem } from './models/list.item';
|
import { IListItem } from './models/list.item';
|
||||||
@@ -65,7 +67,8 @@ import { HelpMenuComponent} from './components/help-menu/help-menu.component';
|
|||||||
import { BackButtonComponent } from './components/back-button/back-button.component';
|
import { BackButtonComponent } from './components/back-button/back-button.component';
|
||||||
import { EditImageModalComponent } from './components/edit-image-modal/edit-image-modal.component';
|
import { EditImageModalComponent } from './components/edit-image-modal/edit-image-modal.component';
|
||||||
import { AvatarComponent } from './components/avatar/avatar.component';
|
import { AvatarComponent } from './components/avatar/avatar.component';
|
||||||
import { AvatarModule } from 'ngx-avatar';
|
import { ItemLinkComponent } from './components/item-link/item-link.component';
|
||||||
|
import { AvatarModule } from 'ngx-avatars';
|
||||||
import { ImageCropperModule } from 'ngx-image-cropper';
|
import { ImageCropperModule } from 'ngx-image-cropper';
|
||||||
|
|
||||||
export const FM_COMMON_STARTPAGE = new InjectionToken<string>('fm-common-startpage');
|
export const FM_COMMON_STARTPAGE = new InjectionToken<string>('fm-common-startpage');
|
||||||
@@ -92,6 +95,8 @@ export {
|
|||||||
IItem,
|
IItem,
|
||||||
Item,
|
Item,
|
||||||
IItemType,
|
IItemType,
|
||||||
|
IItemLinkType,
|
||||||
|
IUrlType,
|
||||||
IItemTypes,
|
IItemTypes,
|
||||||
IItemTask,
|
IItemTask,
|
||||||
ItemTask,
|
ItemTask,
|
||||||
@@ -115,6 +120,7 @@ export {
|
|||||||
IGradientstop,
|
IGradientstop,
|
||||||
BackButtonComponent,
|
BackButtonComponent,
|
||||||
AvatarComponent,
|
AvatarComponent,
|
||||||
|
ItemLinkComponent,
|
||||||
EditImageModalComponent,
|
EditImageModalComponent,
|
||||||
GradientComponent,
|
GradientComponent,
|
||||||
GradientSelectComponent
|
GradientSelectComponent
|
||||||
@@ -160,7 +166,8 @@ export {
|
|||||||
BackButtonComponent,
|
BackButtonComponent,
|
||||||
ThumbnailComponent,
|
ThumbnailComponent,
|
||||||
EditImageModalComponent,
|
EditImageModalComponent,
|
||||||
AvatarComponent
|
AvatarComponent,
|
||||||
|
ItemLinkComponent
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
NgbModule,
|
NgbModule,
|
||||||
@@ -189,6 +196,7 @@ export {
|
|||||||
BackButtonComponent,
|
BackButtonComponent,
|
||||||
ThumbnailComponent,
|
ThumbnailComponent,
|
||||||
AvatarComponent,
|
AvatarComponent,
|
||||||
|
ItemLinkComponent,
|
||||||
EditImageModalComponent
|
EditImageModalComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@@ -1,9 +1,3 @@
|
|||||||
/* Import Bootstrap & Fonts */
|
|
||||||
|
|
||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// custom styles
|
// custom styles
|
||||||
|
|
||||||
.btn:focus {
|
.btn:focus {
|
||||||
@@ -16,7 +10,7 @@
|
|||||||
|
|
||||||
.form-control:focus {
|
.form-control:focus {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-color: $input-border-color;
|
border-color: var(--bs-input-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -69,7 +69,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
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`);
|
||||||
switch (event.eventType) {
|
switch (event.eventType) {
|
||||||
case "ItemChanged": {
|
case "ItemChanged": {
|
||||||
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);
|
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);
|
||||||
@@ -115,18 +115,11 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadItemTypes() {
|
|
||||||
await this.itemTypeService$.load(this.appConfig$)
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.InstallRouteEventHandler();
|
this.InstallRouteEventHandler();
|
||||||
this.InstallEventServiceEventHandler();
|
this.InstallEventServiceEventHandler();
|
||||||
this.InstallAuthenticationEventHandler();
|
this.InstallAuthenticationEventHandler();
|
||||||
this.InstallHealthCheck();
|
this.InstallHealthCheck();
|
||||||
|
|
||||||
//load item types
|
|
||||||
this.loadItemTypes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@HostListener('document:keyup', ['$event'])
|
@HostListener('document:keyup', ['$event'])
|
||||||
@@ -146,12 +139,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||||||
private InstallAuthenticationEventHandler() {
|
private InstallAuthenticationEventHandler() {
|
||||||
// auth event handler
|
// auth event handler
|
||||||
this.oauthService$.events.subscribe((event) => {
|
this.oauthService$.events.subscribe((event) => {
|
||||||
console.debug(event.type);
|
//console.debug(event.type);
|
||||||
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout' || event.type == 'logout') {
|
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout' || event.type == 'logout') {
|
||||||
const e = event as OAuthErrorEvent;
|
const e = event as OAuthErrorEvent;
|
||||||
const p = e.params as any;
|
const p = e.params as any;
|
||||||
if (event.type == 'silent_refresh_timeout' || event.type == 'logout' || (p.error && p.error == 'login_required')) {
|
if (event.type == 'silent_refresh_timeout' || event.type == 'logout' || (p.error && p.error == 'login_required')) {
|
||||||
console.debug("Session expired");
|
//console.debug("Session expired");
|
||||||
this.router.navigate(['loggedout'], { queryParams: { redirectTo: this.router.url } });
|
this.router.navigate(['loggedout'], { queryParams: { redirectTo: this.router.url } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Router, CanActivate } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { OAuthService } from 'angular-oauth2-oidc';
|
import { OAuthService } from 'angular-oauth2-oidc';
|
||||||
import { } from '@angular/router';
|
import { } from '@angular/router';
|
||||||
@@ -6,7 +6,7 @@ import { } from '@angular/router';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class AuthCallbackGuard implements CanActivate {
|
export class AuthCallbackGuard {
|
||||||
|
|
||||||
constructor(private router$: Router,private oauthService$:OAuthService) {}
|
constructor(private router$: Router,private oauthService$:OAuthService) {}
|
||||||
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<span class="avatar-container" [title]="name">
|
<span class="avatar-container" [title]="name">
|
||||||
<ngx-avatar
|
<ngx-avatars
|
||||||
class="farmmaps-avatar"
|
class="farmmaps-avatar"
|
||||||
[src]="src"
|
[src]="src"
|
||||||
[name]="name"
|
[name]="name"
|
||||||
[size]="size"
|
[size]="size"
|
||||||
[round]='true'
|
[round]='true'
|
||||||
>
|
>
|
||||||
</ngx-avatar>
|
</ngx-avatars>
|
||||||
</span>
|
</span>
|
@@ -1,12 +1,10 @@
|
|||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
.back-button {
|
.back-button {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
color: $primary;
|
color: var(--bs-primary);
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-button:hover {
|
.back-button:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: $secondary;
|
color: var(--bs-secondary);
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
<span class="item-link" (click)="copylink(copiedtt)" triggers="manual" ngbTooltip="Link copied" #copiedtt="ngbTooltip" ><i ngbTooltip='Copy link' class="fa-solid fa-link"></i> <span *ngIf="showText" i18n>Copy link</span></span>
|
@@ -0,0 +1,44 @@
|
|||||||
|
import { Component, Input, OnDestroy} from '@angular/core';
|
||||||
|
import { IItemLinkType} from '../../models/itemlink.type'
|
||||||
|
import { IUrlType } from '../../models/url.type';
|
||||||
|
import { ItemService } from '../../common-service.module';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
import { ClipboardService } from 'ngx-clipboard'
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'fm-item-link',
|
||||||
|
templateUrl: './item-link.component.html'
|
||||||
|
})
|
||||||
|
export class ItemLinkComponent implements OnDestroy {
|
||||||
|
|
||||||
|
@Input() itemCode:string;
|
||||||
|
@Input() pathSuffix:string;
|
||||||
|
@Input() query:string;
|
||||||
|
@Input() validMinutes:number;
|
||||||
|
@Input() showText:boolean;
|
||||||
|
|
||||||
|
private sub : Subscription = null;
|
||||||
|
|
||||||
|
constructor(private itemService:ItemService,private clipboardService$: ClipboardService) { }
|
||||||
|
|
||||||
|
copylink(tooltip) {
|
||||||
|
if(this.sub) {
|
||||||
|
this.sub.unsubscribe();
|
||||||
|
}
|
||||||
|
let link: IItemLinkType = {itemcode:this.itemCode,pathsuffix:this.pathSuffix,query:this.query,validminutes:this.validMinutes}
|
||||||
|
this.sub = this.itemService.getItemLink(link).subscribe((url:IUrlType) => {
|
||||||
|
this.clipboardService$.copy(url.url);
|
||||||
|
tooltip.open();
|
||||||
|
setTimeout(() => {
|
||||||
|
tooltip.close();
|
||||||
|
}, 2000);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if(this.sub) {
|
||||||
|
this.sub.unsubscribe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,7 +1,3 @@
|
|||||||
/* Import Bootstrap & Fonts */
|
|
||||||
|
|
||||||
@import "~bootstrap/scss/bootstrap.scss";
|
|
||||||
|
|
||||||
div.resumable-file-upload {
|
div.resumable-file-upload {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
@@ -76,7 +72,7 @@ div.card-header span.fa {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.upload-file.busy > div > span.fa-times {
|
.upload-file.busy > div > span.fa-times {
|
||||||
color: $danger;
|
color: var(--bs-danger);
|
||||||
width: 20px;
|
width: 20px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -94,7 +90,7 @@ div.card-header span.fa {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.upload-file > div.errormessage {
|
.upload-file > div.errormessage {
|
||||||
color: $danger;
|
color: var(--bs-danger);
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="side-panel hidden" [ngClass]="{'hidden':!visible,'collapsed':collapsed,'resizeable':(resizeable && mobile),'resizing':resizing,'left':left}" [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($event)">
|
||||||
<i class="fal fa-chevron-left" aria-hidden="true"></i>
|
<i class="fal fa-chevron-left" aria-hidden="true"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.side-panel.collapsed {
|
.side-panel.collapsed {
|
||||||
left:-22rem;
|
left:-44rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow {
|
.arrow {
|
||||||
@@ -76,7 +76,6 @@ div.resizegrip > span {
|
|||||||
|
|
||||||
.resizeable .resizegrip {
|
.resizeable .resizegrip {
|
||||||
display:block;
|
display:block;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.resizeable .content {
|
.resizeable .content {
|
||||||
@@ -94,10 +93,17 @@ div.resizegrip > span {
|
|||||||
|
|
||||||
.side-panel.hidden {
|
.side-panel.hidden {
|
||||||
width: 22rem;
|
width: 22rem;
|
||||||
left:-24rem;
|
left:-22rem;
|
||||||
height:100%;
|
height:100%;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.side-panel.extrawide {
|
||||||
|
top:0px;
|
||||||
|
width: 44rem;
|
||||||
|
height:100%;
|
||||||
|
left:0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef } from '@angular/core';
|
import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-side-panel',
|
selector: 'fm-side-panel',
|
||||||
@@ -13,6 +13,7 @@ export class SidePanelComponent implements OnChanges {
|
|||||||
@Input() public collapsable: boolean;
|
@Input() public collapsable: boolean;
|
||||||
@Input() public resizeable = false;
|
@Input() public resizeable = false;
|
||||||
@Input() public left = false;
|
@Input() public left = false;
|
||||||
|
@Input() public extrawide: boolean;
|
||||||
@Output() onResize: EventEmitter<number> = new EventEmitter<number>();
|
@Output() onResize: EventEmitter<number> = new EventEmitter<number>();
|
||||||
@ViewChild("resizeGrip") elementView: ElementRef;
|
@ViewChild("resizeGrip") elementView: ElementRef;
|
||||||
public mobile = true;
|
public mobile = true;
|
||||||
@@ -41,7 +42,7 @@ export class SidePanelComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.parentHeight = this.element.nativeElement.offsetParent.clientHeight;
|
this.parentHeight = this.element.nativeElement.offsetParent?.clientHeight;
|
||||||
this.setTop();
|
this.setTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,6 +5,9 @@
|
|||||||
<div class="card" *ngIf="user">
|
<div class="card" *ngIf="user">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="username">{{user.name}}</div>
|
<div class="username">{{user.name}}</div>
|
||||||
|
<div *ngIf="getProvider(); let provider">
|
||||||
|
<small><span i18n>Provider</span><span> {{provider}}</span></small>
|
||||||
|
</div>
|
||||||
<div><a href="#" (click)="logout($event)" i18n>logout</a></div>
|
<div><a href="#" (click)="logout($event)" i18n>logout</a></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -20,11 +20,14 @@ export class UserMenuComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
getLetter():string {
|
getProvider():string | null {
|
||||||
if (this.user && this.user.firstName && this.user.lastName)
|
const ownedClaims = this.oauthService.getIdentityClaims();
|
||||||
return this.user.firstName.substr(0,1).toUpperCase() +
|
if(ownedClaims) {
|
||||||
this.user.lastName.substr(0,1).toUpperCase();
|
if (ownedClaims["idp"] != "local") {
|
||||||
return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():"";
|
return ownedClaims["idp"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
logout(event:MouseEvent) {
|
logout(event:MouseEvent) {
|
||||||
|
@@ -85,9 +85,8 @@ export class AppCommonEffects {
|
|||||||
|
|
||||||
initUserSettingsRoot$ = createEffect(() => this.actions$.pipe(
|
initUserSettingsRoot$ = createEffect(() => this.actions$.pipe(
|
||||||
ofType(appCommonActions.INITUSERSETTINGSROOT),
|
ofType(appCommonActions.INITUSERSETTINGSROOT),
|
||||||
withLatestFrom(this.store$.select(appCommonReducers.SelectGetUser)),
|
switchMap(_ => {
|
||||||
switchMap(([, user]) => {
|
return this.folderService$.getFolder('my_settings').pipe(
|
||||||
return this.itemService$.getItem(user.code + ':USER_SETTINGS').pipe(
|
|
||||||
switchMap((item) => of(new appCommonActions.InitUserSettingsRootSuccess(item))),
|
switchMap((item) => of(new appCommonActions.InitUserSettingsRootSuccess(item))),
|
||||||
catchError(error => of(new appCommonActions.Fail(error)))
|
catchError(error => of(new appCommonActions.Fail(error)))
|
||||||
)
|
)
|
||||||
@@ -170,7 +169,7 @@ export class AppCommonEffects {
|
|||||||
this.router$.navigate(['/map', query ])
|
this.router$.navigate(['/map', query ])
|
||||||
}else if(viewer == 'edit_in_editor') {
|
}else if(viewer == 'edit_in_editor') {
|
||||||
this.router$.navigate(['/editor', editor, 'item', a.item.code])
|
this.router$.navigate(['/editor', editor, 'item', a.item.code])
|
||||||
} else {
|
} else if(viewer) {
|
||||||
this.router$.navigate(['/viewer', viewer, 'item', a.item.code])
|
this.router$.navigate(['/viewer', viewer, 'item', a.item.code])
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
@@ -182,18 +181,18 @@ export class AppCommonEffects {
|
|||||||
ofType(appCommonActions.FAIL),
|
ofType(appCommonActions.FAIL),
|
||||||
map((action) => {
|
map((action) => {
|
||||||
const failAction = action as appCommonActions.Fail;
|
const failAction = action as appCommonActions.Fail;
|
||||||
console.debug(failAction.payload)
|
//console.debug(failAction.payload)
|
||||||
return null;
|
return null;
|
||||||
})),{dispatch:false});
|
})),{dispatch:false});
|
||||||
|
|
||||||
online$ = createEffect(() => this.actions$.pipe(
|
online$ = createEffect(() => this.actions$.pipe(
|
||||||
ofType(appCommonActions.ONLINE),
|
ofType(appCommonActions.ONLINE),
|
||||||
switchMap((action) => {
|
switchMap((action) => {
|
||||||
console.debug("Online: Check token");
|
//console.debug("Online: Check token");
|
||||||
if(!this.oauthService$.hasValidAccessToken()) {
|
if(!this.oauthService$.hasValidAccessToken()) {
|
||||||
console.debug("No valid token, try to refresh");
|
//console.debug("No valid token, try to refresh");
|
||||||
if(this.oauthService$.getRefreshToken() != null ) {
|
if(this.oauthService$.getRefreshToken() != null ) {
|
||||||
console.debug("We have a refresh token");
|
//console.debug("We have a refresh token");
|
||||||
this.oauthService$.refreshToken();
|
this.oauthService$.refreshToken();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
projects/common/src/fm/models/itemlink.type.ts
Normal file
6
projects/common/src/fm/models/itemlink.type.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export interface IItemLinkType {
|
||||||
|
itemcode: string;
|
||||||
|
pathsuffix?: string;
|
||||||
|
query?: string;
|
||||||
|
validminutes?: number;
|
||||||
|
}
|
3
projects/common/src/fm/models/url.type.ts
Normal file
3
projects/common/src/fm/models/url.type.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export interface IUrlType {
|
||||||
|
url: string;
|
||||||
|
}
|
@@ -64,6 +64,8 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
|||||||
code:a.user.code,
|
code:a.user.code,
|
||||||
email:claims["email"]!== undefined ? claims["email"] : a.user.name,
|
email:claims["email"]!== undefined ? claims["email"] : a.user.name,
|
||||||
name:claims["name"]!== undefined?claims["name"] : a.user.email,
|
name:claims["name"]!== undefined?claims["name"] : a.user.email,
|
||||||
|
lastName:a.user.lastName,
|
||||||
|
firstName:a.user.firstName,
|
||||||
claims:claims,
|
claims:claims,
|
||||||
searchable: false
|
searchable: false
|
||||||
};
|
};
|
||||||
|
@@ -1,11 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {
|
import { Router, Route, ActivatedRouteSnapshot, RouterStateSnapshot, UrlSegment, UrlTree } from '@angular/router';
|
||||||
CanActivate, Router, CanLoad, Route, CanActivateChild ,
|
|
||||||
ActivatedRouteSnapshot,
|
|
||||||
RouterStateSnapshot,
|
|
||||||
UrlSegment,
|
|
||||||
UrlTree
|
|
||||||
} from '@angular/router';
|
|
||||||
|
|
||||||
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
@@ -19,49 +13,58 @@ import * as appCommonReducer from '../reducers/app-common.reducer';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class AuthGuard implements CanActivate, CanLoad, CanActivateChild {
|
export class AuthGuard {
|
||||||
|
|
||||||
constructor(private oauthService: OAuthService, private router: Router, private store: Store<appCommonReducer.State>) { }
|
constructor(private oauthService: OAuthService, private router: Router, private store: Store<appCommonReducer.State>) { }
|
||||||
|
|
||||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
||||||
console.debug("AuthGuard->canActivate", route, state);
|
//console.debug("AuthGuard->canActivate", route, state);
|
||||||
const url: string = state.url;
|
const url: string = state.url;
|
||||||
|
|
||||||
return this.checkLogin(url, route);
|
return this.checkLogin(url, route);
|
||||||
}
|
}
|
||||||
|
|
||||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
||||||
console.debug("AuthGuard->canActivateChild", childRoute, state);
|
//console.debug("AuthGuard->canActivateChild", childRoute, state);
|
||||||
const url: string = state.url;
|
const url: string = state.url;
|
||||||
|
|
||||||
return this.checkLogin(url, childRoute);
|
return this.checkLogin(url, childRoute);
|
||||||
}
|
}
|
||||||
|
|
||||||
canLoad(route: Route, segments: UrlSegment[]): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
canLoad(route: Route, segments: UrlSegment[]): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
||||||
console.debug("AuthGuard->canLoad", route, segments);
|
//console.debug("AuthGuard->canLoad", route, segments);
|
||||||
return this.checkLogin(route.path, null);
|
return this.checkLogin(route.path, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkLogin(url: string, route: ActivatedRouteSnapshot): boolean {
|
checkLogin(url: string, route: ActivatedRouteSnapshot): boolean {
|
||||||
console.debug("AuthGuard->checkLogin", url, route);
|
//console.debug("AuthGuard->checkLogin", url, route);
|
||||||
if (!this.oauthService.hasValidAccessToken()) {
|
if (!this.oauthService.hasValidAccessToken()) {
|
||||||
console.debug("No valid token");
|
//console.debug("No valid token");
|
||||||
this.oauthService.initCodeFlow(url);
|
this.oauthService.initCodeFlow(url);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
const requiredRoleClaim = route.data.role;
|
const requiredRoleClaim = route.data.role;
|
||||||
if (!requiredRoleClaim) { return true; }
|
if (!requiredRoleClaim) { return true; }
|
||||||
const ownedClaims = this.oauthService.getIdentityClaims();
|
const ownedClaims = this.oauthService.getIdentityClaims();
|
||||||
if (!ownedClaims) { console.debug("No owned claims"); return false; }
|
if (!ownedClaims) {
|
||||||
|
//console.debug("No owned claims");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const ownedRoleClaims: string[] = ownedClaims['role'];
|
const ownedRoleClaims: string[] = ownedClaims['role'];
|
||||||
if (!ownedRoleClaims) { console.debug("No owned role claims"); return false; }
|
if (!ownedRoleClaims) {
|
||||||
|
// console.debug("No owned role claims");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (Array.isArray(ownedRoleClaims)) {
|
if (Array.isArray(ownedRoleClaims)) {
|
||||||
if (ownedRoleClaims.findIndex(r => r === requiredRoleClaim) <= -1) { console.debug("No required role claim", ownedRoleClaims, requiredRoleClaim); return false; }
|
if (ownedRoleClaims.findIndex(r => r === requiredRoleClaim) <= -1) {
|
||||||
|
//console.debug("No required role claim", ownedRoleClaims, requiredRoleClaim);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (ownedRoleClaims !== requiredRoleClaim) { console.debug("No required role claim", ownedRoleClaims, requiredRoleClaim); return false; }
|
if (ownedRoleClaims !== requiredRoleClaim) { console.debug("No required role claim", ownedRoleClaims, requiredRoleClaim); return false; }
|
||||||
}
|
}
|
||||||
console.debug("Has required role claim", requiredRoleClaim);
|
//console.debug("Has required role claim", requiredRoleClaim);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
29
projects/common/src/fm/services/download.service.ts
Normal file
29
projects/common/src/fm/services/download.service.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Observable, of } from 'rxjs';
|
||||||
|
import { IItem } from '../models/item';
|
||||||
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { AppConfig } from "../shared/app.config";
|
||||||
|
import {ItemTypeService} from './itemtype.service';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class DownloadService {
|
||||||
|
constructor(public httpClient: HttpClient, public appConfig: AppConfig,private itemTypeService:ItemTypeService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ApiEndpoint() {
|
||||||
|
return this.appConfig.getConfig("apiEndPoint");
|
||||||
|
}
|
||||||
|
|
||||||
|
getData(itemCode: string): Observable<any> {
|
||||||
|
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/data`);
|
||||||
|
}
|
||||||
|
|
||||||
|
getData2(item: IItem): Observable<any> {
|
||||||
|
if (item.size > 0) {
|
||||||
|
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/data`)
|
||||||
|
}
|
||||||
|
return of({});
|
||||||
|
}
|
||||||
|
}
|
@@ -1,17 +1,17 @@
|
|||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import { Observable , Observer } from 'rxjs';
|
import {Observable} from 'rxjs';
|
||||||
import {map} from 'rxjs/operators';
|
|
||||||
import {IListItem} from '../models/list.item';
|
import {IListItem} from '../models/list.item';
|
||||||
import {IItem} from '../models/item';
|
import {IItem} from '../models/item';
|
||||||
import { HttpClient } from "@angular/common/http";
|
import {HttpClient} from '@angular/common/http';
|
||||||
import { AppConfig } from "../shared/app.config";
|
import {AppConfig} from '../shared/app.config';
|
||||||
|
import {ItemService} from './item.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class FolderService {
|
export class FolderService {
|
||||||
|
|
||||||
constructor(public httpClient: HttpClient, public appConfig: AppConfig) {
|
constructor(public httpClient: HttpClient, public appConfig: AppConfig, public itemService: ItemService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiEndpoint() {
|
ApiEndpoint() {
|
||||||
@@ -27,15 +27,16 @@ export class FolderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFolderParents(code: string): Observable<IListItem[]> {
|
getFolderParents(code: string): Observable<IListItem[]> {
|
||||||
return this.httpClient.get<IListItem[]>(`${this.ApiEndpoint()}/api/v1/folders/${code}/parents`);
|
return this.itemService.getBreadcrumbs(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
getChildFolders(code: string): Observable<IListItem[]> {
|
getChildFolders(code: string): Observable<IListItem[]> {
|
||||||
return this.httpClient.get<IListItem[]>(`${this.ApiEndpoint()}/api/v1/folders/${code}/listfolders`);
|
const folderItemTypes = "FOLDER,FTP_FOLDER";
|
||||||
|
return this.itemService.getChildItemList(code, folderItemTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
getItems(code: string,skip:number, take:number): Observable<IListItem[]> {
|
getItems(code: string,skip:number, take:number): Observable<IListItem[]> {
|
||||||
return this.httpClient.get<IListItem[]>(`${this.ApiEndpoint()}/api/v1/folders/${code}/list?skip=${skip}&take=${take}`);
|
return this.itemService.getChildItemList(code, null, null, 1, true, null, null, skip, take);
|
||||||
}
|
}
|
||||||
|
|
||||||
moveItem(itemCode: string, newParentCode: string): Observable<IListItem> {
|
moveItem(itemCode: string, newParentCode: string): Observable<IListItem> {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router';
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import * as appCommonActions from '../actions/app-common.actions';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class FullScreenGuard implements CanActivate,CanActivateChild {
|
export class FullScreenGuard {
|
||||||
|
|
||||||
private loginDispatched = false;
|
private loginDispatched = false;
|
||||||
constructor(private store: Store<appCommonReducer.State> ) { }
|
constructor(private store: Store<appCommonReducer.State> ) { }
|
||||||
|
@@ -2,12 +2,15 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { IItemType } from '../models/item.type';
|
import { IItemType } from '../models/item.type';
|
||||||
|
import { IItemLinkType } from '../models/itemlink.type';
|
||||||
|
import { IUrlType } from '../models/url.type';
|
||||||
import { IItem } from '../models/item';
|
import { IItem } from '../models/item';
|
||||||
import { IJsonline } from '../models/json-line';
|
import { IJsonline } from '../models/json-line';
|
||||||
import { IItemTask } from '../models/itemTask';
|
import { IItemTask } from '../models/itemTask';
|
||||||
import { HttpClient, HttpParams,HttpHeaders } from "@angular/common/http";
|
import { HttpClient, HttpParams,HttpHeaders } from "@angular/common/http";
|
||||||
import { AppConfig } from "../shared/app.config";
|
import { AppConfig } from "../shared/app.config";
|
||||||
import {ItemTypeService} from './itemtype.service';
|
import {ItemTypeService} from './itemtype.service';
|
||||||
|
import {IListItem} from '../models/list.item';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
@@ -62,6 +65,10 @@ export class ItemService {
|
|||||||
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getItemLink(itemLink: IItemLinkType): Observable<any> {
|
||||||
|
return this.httpClient.post<IItemLinkType>(`${this.ApiEndpoint()}/api/v1/itemlink`,itemLink);
|
||||||
|
}
|
||||||
|
|
||||||
getItemData(code: string,start?:number,size?:number): Observable<ArrayBuffer> {
|
getItemData(code: string,start?:number,size?:number): Observable<ArrayBuffer> {
|
||||||
let headers = new HttpHeaders();
|
let headers = new HttpHeaders();
|
||||||
if(start !== undefined && size !== undefined) headers=headers.set("Range",`bytes=${start}-${size-1}`);
|
if(start !== undefined && size !== undefined) headers=headers.set("Range",`bytes=${start}-${size-1}`);
|
||||||
@@ -72,7 +79,7 @@ export class ItemService {
|
|||||||
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
return this.httpClient.get<IItem>(`${this.ApiEndpoint()}/api/v1/items/${code}/${itemType}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, indexed?: boolean, validToday?: boolean): Observable<IItem[]> {
|
getItemList(itemType?: string, dataFilter?: any, level?: number, atItemLocationItemCode?: string, indexed?: boolean, validToday?: boolean,tags?:string,crs?:string): Observable<IItem[]> {
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
if(itemType) params = params.append("it", itemType);
|
if(itemType) params = params.append("it", itemType);
|
||||||
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
|
if(dataFilter) params = params.append("df", JSON.stringify(dataFilter));
|
||||||
@@ -80,11 +87,13 @@ export class ItemService {
|
|||||||
if(indexed) params = params.append("ind",indexed?"true":"false");
|
if(indexed) params = params.append("ind",indexed?"true":"false");
|
||||||
if (level) params = params.append("lvl", level.toFixed());
|
if (level) params = params.append("lvl", level.toFixed());
|
||||||
if (validToday) params = params.append("vt", validToday ? "true" : "false");
|
if (validToday) params = params.append("vt", validToday ? "true" : "false");
|
||||||
|
if (tags) params = params.append("t", tags);
|
||||||
|
if (crs) params = params.append("crs", crs);
|
||||||
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/`, { params: params });
|
||||||
}
|
}
|
||||||
|
|
||||||
getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level = 1, deep = true,
|
getChildItemList(parentcode: string, itemType: string, dataFilter?: any, level = 1, deep = true,
|
||||||
startDate?: Date, endDate?: Date): Observable<IItem[]> {
|
startDate?: Date, endDate?: Date, skip?: number, take?: number): Observable<IItem[]> {
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
if(itemType != null) {
|
if(itemType != null) {
|
||||||
params = params.append("it", itemType);
|
params = params.append("it", itemType);
|
||||||
@@ -96,6 +105,9 @@ export class ItemService {
|
|||||||
params = params.append("deep", deep.toString());
|
params = params.append("deep", deep.toString());
|
||||||
if (startDate) params = params.append("sDate", startDate.toISOString());
|
if (startDate) params = params.append("sDate", startDate.toISOString());
|
||||||
if (endDate) params = params.append("eDate", endDate.toISOString());
|
if (endDate) params = params.append("eDate", endDate.toISOString());
|
||||||
|
|
||||||
|
if(skip) params = params.append("skip", skip);
|
||||||
|
if(take) params = params.append("take", take);
|
||||||
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params });
|
return this.httpClient.get<IItem[]>(`${this.ApiEndpoint()}/api/v1/items/${parentcode}/children`, { params: params });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +152,13 @@ export class ItemService {
|
|||||||
return this.httpClient.put<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item);
|
return this.httpClient.put<IItem>(`${this.ApiEndpoint()}/api/v1/items/${item.code}`,item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
putItemFile(item: IItem, jsonObject: any): Observable<IItem> {
|
||||||
|
const formData = new FormData();
|
||||||
|
const file = new File([JSON.stringify(jsonObject, undefined, '\t')], 'data.dat', {type: 'application/json'});
|
||||||
|
formData.append('file', file);
|
||||||
|
return this.httpClient.put<any>(`${this.ApiEndpoint()}/api/v1/items/${item.code}/data`, formData);
|
||||||
|
}
|
||||||
|
|
||||||
deleteItem(code: string): Observable<any> {
|
deleteItem(code: string): Observable<any> {
|
||||||
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
return this.httpClient.delete<any>(`${this.ApiEndpoint()}/api/v1/items/${code}`);
|
||||||
}
|
}
|
||||||
@@ -181,4 +200,7 @@ export class ItemService {
|
|||||||
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/value/layer/${layerIndex}?c=${x},${y}&crs=${crs}`);
|
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/value/layer/${layerIndex}?c=${x},${y}&crs=${crs}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getBreadcrumbs(itemCode: string): Observable<IListItem[]> {
|
||||||
|
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${itemCode}/breadcrumbs`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@ export class ItemTypeService {
|
|||||||
|
|
||||||
getExtraAttributes(itemType: string) {
|
getExtraAttributes(itemType: string) {
|
||||||
let extraAttributes = null;
|
let extraAttributes = null;
|
||||||
if (this.itemTypes[itemType]) extraAttributes = this.itemTypes[itemType].extraAttributes;
|
if (this.itemTypes[itemType] && this.itemTypes[itemType].extraAttributes) extraAttributes = this.itemTypes[itemType].extraAttributes;
|
||||||
return extraAttributes;
|
return extraAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { CanLoad, Route, CanActivate, CanDeactivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
import { Route, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import * as appCommonActions from '../actions/app-common.actions';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class NavBarGuard implements CanActivate {
|
export class NavBarGuard {
|
||||||
|
|
||||||
private loginDispatched = false;
|
private loginDispatched = false;
|
||||||
constructor(private store: Store<appCommonReducer.State>) { }
|
constructor(private store: Store<appCommonReducer.State>) { }
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import {Injectable} from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot} from '@angular/router';
|
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
import {PackageService} from './package.service';
|
import {PackageService} from './package.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class PackageGuard implements CanActivate {
|
export class PackageGuard {
|
||||||
|
|
||||||
constructor(private packageService: PackageService) { }
|
constructor(private packageService: PackageService) { }
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ export class PackagePreloadStrategy extends PreloadingStrategy {
|
|||||||
}
|
}
|
||||||
if(route.data && route.data.package) {
|
if(route.data && route.data.package) {
|
||||||
if(this.packageService$.hasPackage(route.data.package)) {
|
if(this.packageService$.hasPackage(route.data.package)) {
|
||||||
console.debug(`Load module for package ${route.data.package}`)
|
//console.debug(`Load module for package ${route.data.package}`)
|
||||||
this.loading.add(route);
|
this.loading.add(route);
|
||||||
return load()
|
return load()
|
||||||
}
|
}
|
||||||
|
10
projects/common/src/fm/services/production-guard.service.ts
Normal file
10
projects/common/src/fm/services/production-guard.service.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { Injectable, isDevMode } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class ProductionGuard {
|
||||||
|
canActivate(): boolean {
|
||||||
|
return !isDevMode();
|
||||||
|
}
|
||||||
|
}
|
@@ -12,6 +12,7 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
|
|||||||
return (): Promise<any> => {
|
return (): Promise<any> => {
|
||||||
return new Promise<void>((resolve,reject) => {
|
return new Promise<void>((resolve,reject) => {
|
||||||
appConfig.load().then(() => {
|
appConfig.load().then(() => {
|
||||||
|
itemtypeService.load(appConfig);
|
||||||
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
|
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
|
||||||
oauthService.setStorage(authStorage);
|
oauthService.setStorage(authStorage);
|
||||||
oauthService.setupAutomaticSilentRefresh();
|
oauthService.setupAutomaticSilentRefresh();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user