From 30ce4db749259db237bad890f27a1d1350c615e4 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 31 Oct 2023 11:54:32 +0900 Subject: [PATCH 001/106] Uses organisation variables for matrix config --- .github/workflows/test-postgis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 717d388b..ed3f7fc4 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -2,6 +2,8 @@ name: Test with PostGIS env: PLUGIN_NAME: ${{ github.event.repository.name }} + REDMINE_VERSIONS: ${{ fromJson(vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION) }} + RUBY_VERSIONS: ${{ fromJson(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} on: push: @@ -24,8 +26,8 @@ jobs: strategy: fail-fast: false matrix: - redmine_version: [5.0-stable, master] - ruby_version: ['3.0', '3.1'] + redmine_version: ${{ env.REDMINE_VERSIONS }} + ruby_version: ${{ env.RUBY_VERSIONS }} db_version: [12-3.0, 15-3.3] services: From e45c75afe985ea471dab815e59edb9b7cd290172 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 31 Oct 2023 12:07:03 +0900 Subject: [PATCH 002/106] Fixes syntax --- .github/workflows/test-postgis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index ed3f7fc4..4f41c938 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -2,8 +2,6 @@ name: Test with PostGIS env: PLUGIN_NAME: ${{ github.event.repository.name }} - REDMINE_VERSIONS: ${{ fromJson(vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION) }} - RUBY_VERSIONS: ${{ fromJson(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} on: push: @@ -26,8 +24,8 @@ jobs: strategy: fail-fast: false matrix: - redmine_version: ${{ env.REDMINE_VERSIONS }} - ruby_version: ${{ env.RUBY_VERSIONS }} + redmine_version: ${{ vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION }} + ruby_version: ${{ vars.PLUGIN_TEST_MATRIX_RUBY_VERSION }} db_version: [12-3.0, 15-3.3] services: From 9d50ccf8c6643443dc6bca467bbd962013feacb6 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 31 Oct 2023 12:26:55 +0900 Subject: [PATCH 003/106] Update test-postgis.yml --- .github/workflows/test-postgis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 4f41c938..539d4b09 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -24,8 +24,8 @@ jobs: strategy: fail-fast: false matrix: - redmine_version: ${{ vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION }} - ruby_version: ${{ vars.PLUGIN_TEST_MATRIX_RUBY_VERSION }} + redmine_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION) }} + ruby_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} db_version: [12-3.0, 15-3.3] services: From 32f0f9c6aa699860b8cbc3fbf523c079bacf2468 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 14 Nov 2023 11:07:32 +0900 Subject: [PATCH 004/106] Updates dependencies Signed-off-by: Daniel Kastl --- package.json | 14 ++++++------- yarn.lock | 56 ++++++++++++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index efc47437..c58b475e 100644 --- a/package.json +++ b/package.json @@ -26,21 +26,21 @@ "geojson": "^0.5.0", "ol": "^8.1.0", "ol-ext": "^4.0.11", - "ol-mapbox-style": "^12.0.0" + "ol-mapbox-style": "^12.1.0" }, "devDependencies": { - "@types/fontfaceobserver": "^2.1.1", - "@types/geojson": "^7946.0.11", - "@types/jquery": "^3.5.22", - "@types/jqueryui": "^1.12.18", + "@types/fontfaceobserver": "^2.1.3", + "@types/geojson": "^7946.0.13", + "@types/jquery": "^3.5.27", + "@types/jqueryui": "^1.12.20", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", "css-loader": "^6.8.1", - "sass": "^1.69.0", + "sass": "^1.69.5", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", "ts-loader": "^9.5.0", "typescript": "^5.2.2", - "webpack": "^5.88.2", + "webpack": "^5.89.0", "webpack-cli": "^5.1.4" } } diff --git a/yarn.lock b/yarn.lock index 5e9c1011..08401c75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -124,15 +124,15 @@ resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz" integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== -"@types/fontfaceobserver@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@types/fontfaceobserver/-/fontfaceobserver-2.1.1.tgz#8953914e602d571b3d675d0e061a95bf5f2a029a" - integrity sha512-ur2vdKw6m/2Ks1LHFCZxjgXyiXDwM9iThH+vQ4pBoxvoU06UhZ/j+vHnE8eKwsRooBRdGrkNBXSZ4k92JANhAQ== +"@types/fontfaceobserver@^2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@types/fontfaceobserver/-/fontfaceobserver-2.1.3.tgz#2c735284b71dde89afab441bff05ebad4a636e04" + integrity sha512-AewfFg9iUfoUZ4EfKxhBaEuzY2TUS+Hm0vXWMPcJRY7C4wC9XtW20lPVYHTcWVZYq1uthCEa5APl7RAX7jr2Xg== -"@types/geojson@^7946.0.11": - version "7946.0.11" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.11.tgz#012c17cb2256ad8de78560da851ab914a7b9b40e" - integrity sha512-L7A0AINMXQpVwxHJ4jxD6/XjZ4NDufaRlUJHjNIFKYUFBH1SvOW+neaqb0VTRSLW5suSrSu19ObFEFnfNcr+qg== +"@types/geojson@^7946.0.13": + version "7946.0.13" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.13.tgz#e6e77ea9ecf36564980a861e24e62a095988775e" + integrity sha512-bmrNrgKMOhM3WsafmbGmC+6dsF2Z308vLFsQ3a/bT8X8Sv5clVYpPars/UPq+sAaJP+5OoLAYgwbkS5QEJdLUQ== "@types/jquery@*": version "3.5.16" @@ -141,17 +141,17 @@ dependencies: "@types/sizzle" "*" -"@types/jquery@^3.5.22": - version "3.5.22" - resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.22.tgz#893273736f5695a520986c019c873b75b157f26a" - integrity sha512-ISQFeUK5GwRftLK4PVvKTWEVCxZ2BpaqBz0TWkIq5w4vGojxZP9+XkqgcPjxoqmPeew+HLyWthCBvK7GdF5NYA== +"@types/jquery@^3.5.27": + version "3.5.27" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.27.tgz#d9d67a003d0292a36fe35868a618c82f8fd12b19" + integrity sha512-TR28Y8ezIGgfyA02UOh9x+Fy16/1qWYAnvtRd2gTBJuccX/vmddyti0MezLkTv7f+OLofVc2T961VPyKv1tXJQ== dependencies: "@types/sizzle" "*" -"@types/jqueryui@^1.12.18": - version "1.12.18" - resolved "https://registry.yarnpkg.com/@types/jqueryui/-/jqueryui-1.12.18.tgz#5112277df93534dfd99388e8b9258f63f007bf5e" - integrity sha512-crlmH8kFzIiU+4aBFgvYUjykSaOTP5RDw7NqkFkcSNWFAF/SMPrr7sY1uNXDEhite/2pEwUoZlufQoy87A22LA== +"@types/jqueryui@^1.12.20": + version "1.12.20" + resolved "https://registry.yarnpkg.com/@types/jqueryui/-/jqueryui-1.12.20.tgz#c726cba62b3f32134275e85f79aeff4ffff16c90" + integrity sha512-kHjvlPOHy+8+3SBYFA4g+n144SBZ/RFEq6oYr5w1I7PfrrGJ3RXNc13UlGA2ohkx2EjGD93QB97or63IJWB+Lw== dependencies: "@types/jquery" "*" @@ -923,10 +923,10 @@ ol-ext@^4.0.11: resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.11.tgz#402334d79bfc0a4705dea4805d080e7bdf79936f" integrity sha512-zorUn71RsahiA/kbf+tRDbv19wqdLCclxd3gkjsFMnqCbdgl+P59CSJCqMO4O7b2bvaHrw5FEmep7FNFnGGQXg== -ol-mapbox-style@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.0.0.tgz#614941894880c1f929cf96705517d6f59ecff12e" - integrity sha512-rrIFh1BuXdMfl9XwKobpz7sKLAVchseowQlGdgN3WRbCnovSdTeC5RSw1lgnC334kY74y9CQ7cY2WOR5nbnpHg== +ol-mapbox-style@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.1.0.tgz#03483e4bfdbe75681aa85191de689c8c1d620c7c" + integrity sha512-rizjny/ECsHW13P+WEoHoXpQcvf230d0iM3kNU2eej3Uc1iQJtn1YR1YDLUFnLafvIDFVEQaytD8tTSIjdiR8w== dependencies: "@mapbox/mapbox-gl-style-spec" "^13.23.1" mapbox-to-css-font "^2.4.1" @@ -1175,10 +1175,10 @@ sass-loader@^13.3.2: dependencies: neo-async "^2.6.2" -sass@^1.69.0: - version "1.69.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.0.tgz#5195075371c239ed556280cf2f5944d234f42679" - integrity sha512-l3bbFpfTOGgQZCLU/gvm1lbsQ5mC/WnLz3djL2v4WCJBDrWm58PO+jgngcGRNnKUh6wSsdm50YaovTqskZ0xDQ== +sass@^1.69.5: + version "1.69.5" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.5.tgz#23e18d1c757a35f2e52cc81871060b9ad653dfde" + integrity sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -1438,10 +1438,10 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.88.2: - version "5.88.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.88.2.tgz#f62b4b842f1c6ff580f3fcb2ed4f0b579f4c210e" - integrity sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ== +webpack@^5.89.0: + version "5.89.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.89.0.tgz#56b8bf9a34356e93a6625770006490bf3a7f32dc" + integrity sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.0" From 23a41c052d2fa66ba663a61adc221267c4e93b73 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 14 Nov 2023 11:11:28 +0900 Subject: [PATCH 005/106] Updates ol-ext types Signed-off-by: Daniel Kastl --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 08401c75..c9a69f6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -166,9 +166,9 @@ integrity sha512-At4pvmIOki8yuwLtd7BNHl3CiWNbtclUbNtScGx4OHfBd4/oWoJC8KRCIxXwkdndzhxOsPXihrsOoydxBjlE9Q== "@types/ol-ext@npm:@siedlerchr/types-ol-ext": - version "3.2.0" - resolved "https://registry.npmjs.org/@siedlerchr/types-ol-ext/-/types-ol-ext-3.2.0.tgz" - integrity sha512-G6+IkijEDBfseBLtOxUsc+CnmyKrHQfTpmbjSVTea1enUIifpWkTkxAIQ1dtaOGCZiSjclRpmz9e3MioEzvBkA== + version "3.2.4" + resolved "https://registry.yarnpkg.com/@siedlerchr/types-ol-ext/-/types-ol-ext-3.2.4.tgz#5411370c5cc62db6f5fddbe6c5dba203c19aeba3" + integrity sha512-d6auH1slNSyR6v2gP0J2fFPdgvRetAcThASZrcA65lciZmewRgDJaryaCj6/hjvEopokaE4KaMc1OkO8LdRNOw== dependencies: jspdf "^2.5.1" From 094990b802eb7a9b1bf9483d3f1373838fb97528 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 19 Dec 2023 16:41:18 +0900 Subject: [PATCH 006/106] Updates dependencies Signed-off-by: Daniel Kastl --- package.json | 14 ++++----- yarn.lock | 82 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index c58b475e..5e5cb75c 100644 --- a/package.json +++ b/package.json @@ -24,22 +24,22 @@ "@mdi/font": "^7.3.67", "fontfaceobserver": "^2.3.0", "geojson": "^0.5.0", - "ol": "^8.1.0", - "ol-ext": "^4.0.11", - "ol-mapbox-style": "^12.1.0" + "ol": "^8.2.0", + "ol-ext": "^4.0.13", + "ol-mapbox-style": "^12.1.1" }, "devDependencies": { "@types/fontfaceobserver": "^2.1.3", "@types/geojson": "^7946.0.13", - "@types/jquery": "^3.5.27", - "@types/jqueryui": "^1.12.20", + "@types/jquery": "^3.5.29", + "@types/jqueryui": "^1.12.21", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", "css-loader": "^6.8.1", "sass": "^1.69.5", "sass-loader": "^13.3.2", "style-loader": "^3.3.3", - "ts-loader": "^9.5.0", - "typescript": "^5.2.2", + "ts-loader": "^9.5.1", + "typescript": "^5.2.3", "webpack": "^5.89.0", "webpack-cli": "^5.1.4" } diff --git a/yarn.lock b/yarn.lock index c9a69f6a..679de50c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -141,17 +141,17 @@ dependencies: "@types/sizzle" "*" -"@types/jquery@^3.5.27": - version "3.5.27" - resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.27.tgz#d9d67a003d0292a36fe35868a618c82f8fd12b19" - integrity sha512-TR28Y8ezIGgfyA02UOh9x+Fy16/1qWYAnvtRd2gTBJuccX/vmddyti0MezLkTv7f+OLofVc2T961VPyKv1tXJQ== +"@types/jquery@^3.5.29": + version "3.5.29" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.29.tgz#3c06a1f519cd5fc3a7a108971436c00685b5dcea" + integrity sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg== dependencies: "@types/sizzle" "*" -"@types/jqueryui@^1.12.20": - version "1.12.20" - resolved "https://registry.yarnpkg.com/@types/jqueryui/-/jqueryui-1.12.20.tgz#c726cba62b3f32134275e85f79aeff4ffff16c90" - integrity sha512-kHjvlPOHy+8+3SBYFA4g+n144SBZ/RFEq6oYr5w1I7PfrrGJ3RXNc13UlGA2ohkx2EjGD93QB97or63IJWB+Lw== +"@types/jqueryui@^1.12.21": + version "1.12.21" + resolved "https://registry.yarnpkg.com/@types/jqueryui/-/jqueryui-1.12.21.tgz#e8c3a2955a5236da452b3dacd4d87c8d64cb5326" + integrity sha512-hsTOaWPg963smNdoHbEN2anu4vVWj9k2xuaZMIajWERPikaBRG49RmaDA/tb2HldX9/a0qHvQYKipXHSLhM3qA== dependencies: "@types/jquery" "*" @@ -473,11 +473,31 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-parse@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/color-parse/-/color-parse-2.0.0.tgz#6bcf1f0f1fafffe68cacc2dde7a19b3a8c3d7bcd" + integrity sha512-g2Z+QnWsdHLppAbrpcFWo629kLOnOPtpxYV69GCqm92gqSgyXbzlfyN3MXs0412fPBkFmiuS+rXposgBgBa6Kg== + dependencies: + color-name "^1.0.0" + +color-rgba@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/color-rgba/-/color-rgba-3.0.0.tgz#77090bdcdb2951c1735e20099ddd50401675375b" + integrity sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg== + dependencies: + color-parse "^2.0.0" + color-space "^2.0.0" + +color-space@^2.0.0, color-space@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-space/-/color-space-2.0.1.tgz#da39871175baf4a5785ba519397df04b8d67e0fa" + integrity sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA== + colorette@^2.0.14: version "2.0.20" resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" @@ -918,24 +938,26 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -ol-ext@^4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.11.tgz#402334d79bfc0a4705dea4805d080e7bdf79936f" - integrity sha512-zorUn71RsahiA/kbf+tRDbv19wqdLCclxd3gkjsFMnqCbdgl+P59CSJCqMO4O7b2bvaHrw5FEmep7FNFnGGQXg== +ol-ext@^4.0.13: + version "4.0.13" + resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.13.tgz#977d20a3d5f40f39ca10b34ca2c8411ef9032c31" + integrity sha512-eNUKmPXBp7pOI8lE/qhv+oIbCwFyrqW4gGcILxTlvjhICKyaNkcmXGm3lOvHd2PnsKBtbjwg2knHiJKpEQNDtg== -ol-mapbox-style@^12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.1.0.tgz#03483e4bfdbe75681aa85191de689c8c1d620c7c" - integrity sha512-rizjny/ECsHW13P+WEoHoXpQcvf230d0iM3kNU2eej3Uc1iQJtn1YR1YDLUFnLafvIDFVEQaytD8tTSIjdiR8w== +ol-mapbox-style@^12.1.1: + version "12.1.1" + resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.1.1.tgz#2ceb2120fac9a6be25c8b0e4e12b256ba6746c2a" + integrity sha512-jjIQO2BiO/GTjJO/2Idw0WQQAGorPXewZ5wEuusXM8BRXZHIa3mmDZDWoBWtb0H4VHB9RpLsTbRMj5Dquo9Etg== dependencies: "@mapbox/mapbox-gl-style-spec" "^13.23.1" mapbox-to-css-font "^2.4.1" -ol@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/ol/-/ol-8.1.0.tgz#6f3259855cb331a6fa9cbf363aa69d37bba7306a" - integrity sha512-cx3SH2plpFS9fM8pp1nCypgQXGJD7Mcb1E3mEySmy5XEw1DUEo+kkNzgtAZz5qupekqi7aU9iBJEjCoMfqvO2Q== +ol@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/ol/-/ol-8.2.0.tgz#145153eab0ea3b5d04f51f46d6c69c224cccd5c3" + integrity sha512-/m1ddd7Jsp4Kbg+l7+ozR5aKHAZNQOBAoNZ5pM9Jvh4Etkf0WGkXr9qXd7PnhmwiC1Hnc2Toz9XjCzBBvexfXw== dependencies: + color-rgba "^3.0.0" + color-space "^2.0.1" earcut "^2.2.3" geotiff "^2.0.7" pbf "3.2.1" @@ -1350,10 +1372,10 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -ts-loader@^9.5.0: - version "9.5.0" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.0.tgz#f0a51dda37cc4d8e43e6cb14edebbc599b0c3aa2" - integrity sha512-LLlB/pkB4q9mW2yLdFMnK3dEHbrBjeZTYguaaIfusyojBgAGf5kF+O6KcWqiGzWqHk0LBsoolrp4VftEURhybg== +ts-loader@^9.5.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.5.1.tgz#63d5912a86312f1fbe32cef0859fb8b2193d9b89" + integrity sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" @@ -1361,10 +1383,10 @@ ts-loader@^9.5.0: semver "^7.3.4" source-map "^0.7.4" -typescript@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" - integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== +typescript@^5.2.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== update-browserslist-db@^1.0.10: version "1.0.11" From 3a01d26fa564fce9448611316bae4a83b1ef3694 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 19 Dec 2023 16:58:54 +0900 Subject: [PATCH 007/106] Fixes TypeScript errors Signed-off-by: Daniel Kastl --- src/components/gtt-client/GttClient.ts | 5 +++-- src/components/gtt-client/init/layers.ts | 27 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/components/gtt-client/GttClient.ts b/src/components/gtt-client/GttClient.ts index 184ed5f5..0336589d 100644 --- a/src/components/gtt-client/GttClient.ts +++ b/src/components/gtt-client/GttClient.ts @@ -2,6 +2,7 @@ import { Map, Geolocation } from 'ol'; import { Geometry } from 'ol/geom'; import { Vector as VectorLayer } from 'ol/layer'; import { Vector as VectorSource } from 'ol/source'; +import Feature from 'ol/Feature'; import { IGttClientOption, IFilterOption } from './interfaces'; @@ -24,8 +25,8 @@ export default class GttClient { contents: DOMStringMap; i18n: any; filters: IFilterOption; - vector: VectorLayer>; - bounds: VectorLayer>; + vector: VectorLayer>>; + bounds: VectorLayer>>; geolocations: Array; /** diff --git a/src/components/gtt-client/init/layers.ts b/src/components/gtt-client/init/layers.ts index 842cae7c..7ff11eb0 100644 --- a/src/components/gtt-client/init/layers.ts +++ b/src/components/gtt-client/init/layers.ts @@ -50,11 +50,14 @@ export function initLayers(this: any): Layer[] { */ function readGeoJSONFeatures(this: any): Feature[] | null { if (this.contents.geom && this.contents.geom !== null && this.contents.geom !== 'null') { - return new GeoJSON().readFeatures( + const features = new GeoJSON().readFeatures( JSON.parse(this.contents.geom), { featureProjection: 'EPSG:3857' } ); + + // Filter out non-standard features and cast the rest to Feature + return features.filter(feature => feature instanceof Feature) as Feature[]; } return null; } @@ -171,15 +174,24 @@ function addBoundsLayer(this: any): void { */ function addVectorLayer(this: any, features: Feature[] | null): void { const yOrdering: unknown = Ordering.yOrdering(); - this.vector = new VectorLayer>({ - source: new VectorSource({ - 'features': features, - 'useSpatialIndex': false - }), + + // Initialize the VectorSource with the appropriate type and options + const vectorSource = new VectorSource>({ + useSpatialIndex: false + }); + + // Add features to the source if they are not null + if (features !== null) { + vectorSource.addFeatures(features); + } + + this.vector = new VectorLayer({ + source: vectorSource, renderOrder: yOrdering as OrderFunction, style: getStyle.bind(this), minZoom: this.defaults.vectorMinzoom || 0 }); + this.vector.set('title', 'Features'); this.vector.set('displayInLayerSwitcher', false); this.vector.on('prerender', () => this.map.flushDeclutterItems()); @@ -223,7 +235,8 @@ function renderProjectBoundary(this: any): void { this.contents.bounds, { featureProjection: 'EPSG:3857' } - ); + ) as Feature; + this.bounds.getSource().addFeature(boundary); if (this.contents.bounds === this.contents.geom) { this.vector.setVisible(false); From ecb49f07187c2073b608e3ae517182097979a951 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Wed, 7 Feb 2024 12:15:21 +0900 Subject: [PATCH 008/106] Updates dependencies Signed-off-by: Daniel Kastl --- package.json | 18 ++-- yarn.lock | 242 +++++++++++++++++++++++++++++---------------------- 2 files changed, 145 insertions(+), 115 deletions(-) diff --git a/package.json b/package.json index 5e5cb75c..3055c908 100644 --- a/package.json +++ b/package.json @@ -21,26 +21,26 @@ "homepage": "https://github.com/gtt-project/redmine_gtt#readme", "dependencies": { "@juggle/resize-observer": "^3.4.0", - "@mdi/font": "^7.3.67", + "@mdi/font": "^7.4.47", "fontfaceobserver": "^2.3.0", "geojson": "^0.5.0", "ol": "^8.2.0", - "ol-ext": "^4.0.13", - "ol-mapbox-style": "^12.1.1" + "ol-ext": "^4.0.14", + "ol-mapbox-style": "^12.2.0" }, "devDependencies": { "@types/fontfaceobserver": "^2.1.3", - "@types/geojson": "^7946.0.13", + "@types/geojson": "^7946.0.14", "@types/jquery": "^3.5.29", "@types/jqueryui": "^1.12.21", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", - "css-loader": "^6.8.1", - "sass": "^1.69.5", - "sass-loader": "^13.3.2", - "style-loader": "^3.3.3", + "css-loader": "^6.10.0", + "sass": "^1.70.0", + "sass-loader": "^14.1.0", + "style-loader": "^3.3.4", "ts-loader": "^9.5.1", "typescript": "^5.2.3", - "webpack": "^5.89.0", + "webpack": "^5.90.1", "webpack-cli": "^5.1.4" } } diff --git a/yarn.lock b/yarn.lock index 679de50c..66c2cdd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,15 +28,20 @@ resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/source-map@^0.3.2": - version "0.3.3" - resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz" - integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== +"@jridgewell/source-map@^0.3.3": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== dependencies: "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" @@ -46,12 +51,20 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.20": + version "0.3.22" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz#72a621e5de59f5f1ef792d0793a82ee20f645e4c" + integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@jridgewell/trace-mapping@^0.3.9": version "0.3.18" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz" integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== @@ -93,10 +106,10 @@ resolved "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz" integrity sha512-HPnRdYO0WjFjRTSwO3frz1wKaU649OBFPX3Zo/2WZvuRi6zMiRGui8SnPQiQABgqCf8YikDe5t3HViTVw1WUzA== -"@mdi/font@^7.3.67": - version "7.3.67" - resolved "https://registry.yarnpkg.com/@mdi/font/-/font-7.3.67.tgz#faa344a04c9d02f608c891a01134084febeb42db" - integrity sha512-SWxvzRbUQRfewlIV+OF4/YF4DkeTjMWoT8Hh9yeU/5UBVdJZj9Uf4a9+cXjknSIhIaMxZ/4N1O/s7ojApOOGjg== +"@mdi/font@^7.4.47": + version "7.4.47" + resolved "https://registry.yarnpkg.com/@mdi/font/-/font-7.4.47.tgz#2ae522867da3a5c88b738d54b403eb91471903af" + integrity sha512-43MtGpd585SNzHZPcYowu/84Vz2a2g31TvPMTm9uTiCSWzaheQySUcSyUH/46fPnuPQWof2yd0pGBtzee/IQWw== "@petamoriken/float16@^3.4.7": version "3.8.0" @@ -119,20 +132,25 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*", "@types/estree@^1.0.0": +"@types/estree@*": version "1.0.1" resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz" integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== +"@types/estree@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/fontfaceobserver@^2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@types/fontfaceobserver/-/fontfaceobserver-2.1.3.tgz#2c735284b71dde89afab441bff05ebad4a636e04" integrity sha512-AewfFg9iUfoUZ4EfKxhBaEuzY2TUS+Hm0vXWMPcJRY7C4wC9XtW20lPVYHTcWVZYq1uthCEa5APl7RAX7jr2Xg== -"@types/geojson@^7946.0.13": - version "7946.0.13" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.13.tgz#e6e77ea9ecf36564980a861e24e62a095988775e" - integrity sha512-bmrNrgKMOhM3WsafmbGmC+6dsF2Z308vLFsQ3a/bT8X8Sv5clVYpPars/UPq+sAaJP+5OoLAYgwbkS5QEJdLUQ== +"@types/geojson@^7946.0.14": + version "7946.0.14" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" + integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== "@types/jquery@*": version "3.5.16" @@ -333,11 +351,16 @@ acorn-import-assertions@^1.9.0: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== -acorn@^8.5.0, acorn@^8.7.1: +acorn@^8.7.1: version "8.8.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.8.2: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" @@ -390,15 +413,15 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.14.5: - version "4.21.5" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz" - integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== +browserslist@^4.21.10: + version "4.22.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.3.tgz#299d11b7e947a6b843981392721169e27d60c5a6" + integrity sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A== dependencies: - caniuse-lite "^1.0.30001449" - electron-to-chromium "^1.4.284" - node-releases "^2.0.8" - update-browserslist-db "^1.0.10" + caniuse-lite "^1.0.30001580" + electron-to-chromium "^1.4.648" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" btoa@^1.2.1: version "1.2.1" @@ -410,10 +433,10 @@ buffer-from@^1.0.0: resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -caniuse-lite@^1.0.30001449: - version "1.0.30001487" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001487.tgz" - integrity sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA== +caniuse-lite@^1.0.30001580: + version "1.0.30001584" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001584.tgz#5e3ea0625d048d5467670051687655b1f7bf7dfd" + integrity sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ== canvg@^3.0.6: version "3.0.10" @@ -534,19 +557,19 @@ css-line-break@^2.1.0: dependencies: utrie "^1.0.2" -css-loader@^6.8.1: - version "6.8.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.8.1.tgz#0f8f52699f60f5e679eab4ec0fcd68b8e8a50a88" - integrity sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g== +css-loader@^6.10.0: + version "6.10.0" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.10.0.tgz#7c172b270ec7b833951b52c348861206b184a4b7" + integrity sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw== dependencies: icss-utils "^5.1.0" - postcss "^8.4.21" + postcss "^8.4.33" postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.3" - postcss-modules-scope "^3.0.0" + postcss-modules-local-by-default "^4.0.4" + postcss-modules-scope "^3.1.1" postcss-modules-values "^4.0.0" postcss-value-parser "^4.2.0" - semver "^7.3.8" + semver "^7.5.4" csscolorparser@~1.0.2: version "1.0.3" @@ -568,10 +591,10 @@ earcut@^2.2.3: resolved "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz" integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== -electron-to-chromium@^1.4.284: - version "1.4.394" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.394.tgz" - integrity sha512-0IbC2cfr8w5LxTz+nmn2cJTGafsK9iauV2r5A5scfzyovqLrxuLoxOHE5OBobP3oVIggJT+0JfKnw9sm87c8Hw== +electron-to-chromium@^1.4.648: + version "1.4.659" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.659.tgz#e93af8119b6610cb4d2614a47508a74543b96ce5" + integrity sha512-sRJ3nV3HowrYpBtPF9bASQV7OW49IgZC01Xiq43WfSE3RTCkK0/JidoCmR73Hyc1mN+l/H4Yqx0eNiomvExFZg== enhanced-resolve@^5.0.0: version "5.14.0" @@ -918,35 +941,35 @@ minimist@^1.2.6: resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -nanoid@^3.3.6: - version "3.3.6" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== neo-async@^2.6.2: version "2.6.2" resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -node-releases@^2.0.8: - version "2.0.10" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz" - integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -ol-ext@^4.0.13: - version "4.0.13" - resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.13.tgz#977d20a3d5f40f39ca10b34ca2c8411ef9032c31" - integrity sha512-eNUKmPXBp7pOI8lE/qhv+oIbCwFyrqW4gGcILxTlvjhICKyaNkcmXGm3lOvHd2PnsKBtbjwg2knHiJKpEQNDtg== +ol-ext@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.14.tgz#12389a2131356be2daa4324f83480f67c8b76df1" + integrity sha512-ooTz4D2eXrZ5EdAQZvG0zXh4Jc0cEQDQVTcVu0MdoOpswq550NQbLuA8jRILWesWbpNh/7AnntnLPqmoizI2uA== -ol-mapbox-style@^12.1.1: - version "12.1.1" - resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.1.1.tgz#2ceb2120fac9a6be25c8b0e4e12b256ba6746c2a" - integrity sha512-jjIQO2BiO/GTjJO/2Idw0WQQAGorPXewZ5wEuusXM8BRXZHIa3mmDZDWoBWtb0H4VHB9RpLsTbRMj5Dquo9Etg== +ol-mapbox-style@^12.2.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.2.0.tgz#081eb25270b8e8ed3b697a69b3f7c55f9838b7b6" + integrity sha512-krod1qyX6IedQ0Hb3Q3FYQE+Dq2cH6qqBrBrYDwwWNx934gw2mCxlvBg7h32Xd++GECwnPn47MOIPqV+M+DwGg== dependencies: "@mapbox/mapbox-gl-style-spec" "^13.23.1" mapbox-to-css-font "^2.4.1" @@ -1042,19 +1065,19 @@ postcss-modules-extract-imports@^3.0.0: resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== -postcss-modules-local-by-default@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz#b08eb4f083050708998ba2c6061b50c2870ca524" - integrity sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA== +postcss-modules-local-by-default@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz#7cbed92abd312b94aaea85b68226d3dec39a14e6" + integrity sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q== dependencies: icss-utils "^5.0.0" postcss-selector-parser "^6.0.2" postcss-value-parser "^4.1.0" -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== +postcss-modules-scope@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz#32cfab55e84887c079a19bbb215e721d683ef134" + integrity sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA== dependencies: postcss-selector-parser "^6.0.4" @@ -1078,12 +1101,12 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.21: - version "8.4.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.23.tgz#df0aee9ac7c5e53e1075c24a3613496f9e6552ab" - integrity sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA== +postcss@^8.4.33: + version "8.4.34" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.34.tgz#563276e86b4ff20dfa5eed0d394d4c53853b2051" + integrity sha512-4eLTO36woPSocqZ1zIrFD2K1v6wH7pY1uBh0JIM2KKfrVtGvPFiAku6aNOP0W1Wr9qwnaCsF0Z+CrVnryB2A8Q== dependencies: - nanoid "^3.3.6" + nanoid "^3.3.7" picocolors "^1.0.0" source-map-js "^1.0.2" @@ -1190,17 +1213,17 @@ safe-buffer@^5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -sass-loader@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-13.3.2.tgz#460022de27aec772480f03de17f5ba88fa7e18c6" - integrity sha512-CQbKl57kdEv+KDLquhC+gE3pXt74LEAzm+tzywcA0/aHZuub8wTErbjAoNI57rPUWRYRNC5WUnNl8eGJNbDdwg== +sass-loader@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.1.0.tgz#43ba90e0cd8a15a1e932e818c525b0115a0ce8a3" + integrity sha512-LS2mLeFWA+orYxHNu+O18Xe4jR0kyamNOOUsE3NyBP4DvIL+8stHpNX0arYTItdPe80kluIiJ7Wfe/9iHSRO0Q== dependencies: neo-async "^2.6.2" -sass@^1.69.5: - version "1.69.5" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.69.5.tgz#23e18d1c757a35f2e52cc81871060b9ad653dfde" - integrity sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ== +sass@^1.70.0: + version "1.70.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.70.0.tgz#761197419d97b5358cb25f9dd38c176a8a270a75" + integrity sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -1224,13 +1247,20 @@ schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -semver@^7.3.4, semver@^7.3.8: +semver@^7.3.4: version "7.5.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== dependencies: lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz" @@ -1303,10 +1333,10 @@ stackblur-canvas@^2.0.0: resolved "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz" integrity sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ== -style-loader@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.3.tgz#bba8daac19930169c0c9c96706749a597ae3acff" - integrity sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw== +style-loader@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.4.tgz#f30f786c36db03a45cbd55b6a70d930c479090e7" + integrity sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w== supports-color@^7.1.0: version "7.2.0" @@ -1337,24 +1367,24 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -terser-webpack-plugin@^5.3.7: - version "5.3.8" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.8.tgz" - integrity sha512-WiHL3ElchZMsK27P8uIUh4604IgJyAW47LVXGbEoB21DbQcZ+OuMpGjVYnEUaqcWM6dO8uS2qUbA7LSCWqvsbg== +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== dependencies: - "@jridgewell/trace-mapping" "^0.3.17" + "@jridgewell/trace-mapping" "^0.3.20" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.1" - terser "^5.16.8" + terser "^5.26.0" -terser@^5.16.8: - version "5.17.3" - resolved "https://registry.npmjs.org/terser/-/terser-5.17.3.tgz" - integrity sha512-AudpAZKmZHkG9jueayypz4duuCFJMMNGRMwaPvQKWfxKedh8Z2x3OCoDqIIi1xx5+iwx1u6Au8XQcc9Lke65Yg== +terser@^5.26.0: + version "5.27.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.27.0.tgz#70108689d9ab25fef61c4e93e808e9fd092bf20c" + integrity sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A== dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" commander "^2.20.0" source-map-support "~0.5.20" @@ -1388,10 +1418,10 @@ typescript@^5.2.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== -update-browserslist-db@^1.0.10: - version "1.0.11" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -1460,19 +1490,19 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.89.0: - version "5.89.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.89.0.tgz#56b8bf9a34356e93a6625770006490bf3a7f32dc" - integrity sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw== +webpack@^5.90.1: + version "5.90.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.1.tgz#62ab0c097d7cbe83d32523dbfbb645cdb7c3c01c" + integrity sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog== dependencies: "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.0" + "@types/estree" "^1.0.5" "@webassemblyjs/ast" "^1.11.5" "@webassemblyjs/wasm-edit" "^1.11.5" "@webassemblyjs/wasm-parser" "^1.11.5" acorn "^8.7.1" acorn-import-assertions "^1.9.0" - browserslist "^4.14.5" + browserslist "^4.21.10" chrome-trace-event "^1.0.2" enhanced-resolve "^5.15.0" es-module-lexer "^1.2.1" @@ -1486,7 +1516,7 @@ webpack@^5.89.0: neo-async "^2.6.2" schema-utils "^3.2.0" tapable "^2.1.1" - terser-webpack-plugin "^5.3.7" + terser-webpack-plugin "^5.3.10" watchpack "^2.4.0" webpack-sources "^3.2.3" From bdd465ddcee5e932221aa53e5c287205132e1325 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 12:20:54 +0900 Subject: [PATCH 009/106] Upgrades to OpenLayers 9 Signed-off-by: Daniel Kastl --- package.json | 10 +++--- src/components/gtt-client/init/layers.ts | 2 +- yarn.lock | 40 ++++++++++++------------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 3055c908..6c463bed 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,9 @@ "@mdi/font": "^7.4.47", "fontfaceobserver": "^2.3.0", "geojson": "^0.5.0", - "ol": "^8.2.0", + "ol": "^9.0.0", "ol-ext": "^4.0.14", - "ol-mapbox-style": "^12.2.0" + "ol-mapbox-style": "^12.2.1" }, "devDependencies": { "@types/fontfaceobserver": "^2.1.3", @@ -35,12 +35,12 @@ "@types/jqueryui": "^1.12.21", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", "css-loader": "^6.10.0", - "sass": "^1.70.0", - "sass-loader": "^14.1.0", + "sass": "^1.71.1", + "sass-loader": "^14.1.1", "style-loader": "^3.3.4", "ts-loader": "^9.5.1", "typescript": "^5.2.3", - "webpack": "^5.90.1", + "webpack": "^5.90.3", "webpack-cli": "^5.1.4" } } diff --git a/src/components/gtt-client/init/layers.ts b/src/components/gtt-client/init/layers.ts index 7ff11eb0..888032ad 100644 --- a/src/components/gtt-client/init/layers.ts +++ b/src/components/gtt-client/init/layers.ts @@ -194,7 +194,7 @@ function addVectorLayer(this: any, features: Feature[] | null): void { this.vector.set('title', 'Features'); this.vector.set('displayInLayerSwitcher', false); - this.vector.on('prerender', () => this.map.flushDeclutterItems()); + // this.vector.on('prerender', () => this.map.flushDeclutterItems()); // Listen to the moveend event and show message when zoom level is too low let previousZoom = this.map.getView().getZoom(); diff --git a/yarn.lock b/yarn.lock index 66c2cdd2..db6d3ab2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -966,18 +966,18 @@ ol-ext@^4.0.14: resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.14.tgz#12389a2131356be2daa4324f83480f67c8b76df1" integrity sha512-ooTz4D2eXrZ5EdAQZvG0zXh4Jc0cEQDQVTcVu0MdoOpswq550NQbLuA8jRILWesWbpNh/7AnntnLPqmoizI2uA== -ol-mapbox-style@^12.2.0: - version "12.2.0" - resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.2.0.tgz#081eb25270b8e8ed3b697a69b3f7c55f9838b7b6" - integrity sha512-krod1qyX6IedQ0Hb3Q3FYQE+Dq2cH6qqBrBrYDwwWNx934gw2mCxlvBg7h32Xd++GECwnPn47MOIPqV+M+DwGg== +ol-mapbox-style@^12.2.1: + version "12.2.1" + resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.2.1.tgz#12b568f199a8448fd146191b817b93e075eac2f9" + integrity sha512-soh8x+8CwlA+e3fd8grotA4XXnm0DSWnpzu5Ef3aEQwpM1o2OfoGPSk/hpjhXL5kFUm79pEyiONTw+kdth2FEQ== dependencies: "@mapbox/mapbox-gl-style-spec" "^13.23.1" mapbox-to-css-font "^2.4.1" -ol@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/ol/-/ol-8.2.0.tgz#145153eab0ea3b5d04f51f46d6c69c224cccd5c3" - integrity sha512-/m1ddd7Jsp4Kbg+l7+ozR5aKHAZNQOBAoNZ5pM9Jvh4Etkf0WGkXr9qXd7PnhmwiC1Hnc2Toz9XjCzBBvexfXw== +ol@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/ol/-/ol-9.0.0.tgz#449207b0da5c31f905a030fac141e04935a126a0" + integrity sha512-+nYHZYbHrRUTDJ8ryxXPdDoAiaT6Zea02cocmGqsJXs4Oac1fYC9EbTIU2Y7803QcmG3u2MR88RxbksBvK+ZfQ== dependencies: color-rgba "^3.0.0" color-space "^2.0.1" @@ -1213,17 +1213,17 @@ safe-buffer@^5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -sass-loader@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.1.0.tgz#43ba90e0cd8a15a1e932e818c525b0115a0ce8a3" - integrity sha512-LS2mLeFWA+orYxHNu+O18Xe4jR0kyamNOOUsE3NyBP4DvIL+8stHpNX0arYTItdPe80kluIiJ7Wfe/9iHSRO0Q== +sass-loader@^14.1.1: + version "14.1.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.1.1.tgz#2c9d2277c5b1c5fe789cd0570c046d8ad23cb7ca" + integrity sha512-QX8AasDg75monlybel38BZ49JP5Z+uSKfKwF2rO7S74BywaRmGQMUBw9dtkS+ekyM/QnP+NOrRYq8ABMZ9G8jw== dependencies: neo-async "^2.6.2" -sass@^1.70.0: - version "1.70.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.70.0.tgz#761197419d97b5358cb25f9dd38c176a8a270a75" - integrity sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ== +sass@^1.71.1: + version "1.71.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.71.1.tgz#dfb09c63ce63f89353777bbd4a88c0a38386ee54" + integrity sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -1490,10 +1490,10 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.90.1: - version "5.90.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.1.tgz#62ab0c097d7cbe83d32523dbfbb645cdb7c3c01c" - integrity sha512-SstPdlAC5IvgFnhiRok8hqJo/+ArAbNv7rhU4fnWGHNVfN59HSQFaxZDSAL3IFG2YmqxuRs+IU33milSxbPlog== +webpack@^5.90.3: + version "5.90.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.3.tgz#37b8f74d3ded061ba789bb22b31e82eed75bd9ac" + integrity sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" From 2ae6722d45684380a83cc04ec5f7dd11f3fb17ed Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 12:41:35 +0900 Subject: [PATCH 010/106] Adds Google Maps config and example Signed-off-by: Daniel Kastl --- app/views/gtt_map_layers/_form.html.erb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/views/gtt_map_layers/_form.html.erb b/app/views/gtt_map_layers/_form.html.erb index d1282b41..ed0dc8c5 100644 --- a/app/views/gtt_map_layers/_form.html.erb +++ b/app/views/gtt_map_layers/_form.html.erb @@ -11,7 +11,7 @@

<%= f.select :layer, options_for_select( - ['Image','Tile','MapboxVector','Vector','VectorTile'], + ['Image','Tile','MapboxVector','Vector','VectorTile','WebGLTile'], selected: f.object.layer ), { include_blank: t('map_layer.layer_options_select'), required: true } %> @@ -22,7 +22,7 @@

<%= f.select :source, options_for_select( - ['BingMaps','CartoDB','ImageStatic','ImageWMS','OSM','Raster','Stamen', + ['BingMaps','CartoDB','Google','ImageStatic','ImageWMS','OSM','Raster','Stamen', 'TileJSON','TileWMS','UTFGrid','Vector','VectorTile','WMTS','XYZ'], selected: f.object.source ), { include_blank: t('map_layer.source_options_select') } @@ -55,6 +55,7 @@ 'MapboxVector': [], 'Vector': ['Vector'], 'VectorTile': ['VectorTile'], + 'WebGLTile': ['Google'], }; const map_format_config = { @@ -211,5 +212,17 @@ }, 'format': 'ol.format.MVT', 'format_options': {} + },{ + 'name': 'Google Maps', + 'layer': 'WebGLTile', + 'layer_options': {}, + 'source': 'Google', + 'source_options': { + 'key': 'YOUR_API_KEY', + 'scale': 'scaleFactor2x', + 'highDpi': true, + }, + 'format': '', + 'format_options': {} }]; From 8aa96253e24bbaa108dddab45ed1be228bd39e65 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 13:09:27 +0900 Subject: [PATCH 011/106] Improves example Signed-off-by: Daniel Kastl --- app/views/gtt_map_layers/_form.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/gtt_map_layers/_form.html.erb b/app/views/gtt_map_layers/_form.html.erb index ed0dc8c5..43292ab4 100644 --- a/app/views/gtt_map_layers/_form.html.erb +++ b/app/views/gtt_map_layers/_form.html.erb @@ -219,8 +219,10 @@ 'source': 'Google', 'source_options': { 'key': 'YOUR_API_KEY', + 'mapType': 'roadmap', + 'language': 'ja_JP', 'scale': 'scaleFactor2x', - 'highDpi': true, + 'layerTypes': ['layerTraffic'], }, 'format': '', 'format_options': {} From 43f9403cb0a5d8a731edebc12d542b52b7d0564e Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 13:18:33 +0900 Subject: [PATCH 012/106] Do not apply filter for Google source Signed-off-by: Daniel Kastl --- src/components/gtt-client/init/layers.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/gtt-client/init/layers.ts b/src/components/gtt-client/init/layers.ts index 888032ad..6adf09c3 100644 --- a/src/components/gtt-client/init/layers.ts +++ b/src/components/gtt-client/init/layers.ts @@ -243,13 +243,19 @@ function renderProjectBoundary(this: any): void { } this.layerArray.forEach((layer: Layer) => { if (layer.get('baseLayer')) { - layer.addFilter(new Mask({ - feature: boundary, - inner: false, - fill: new Fill({ - color: [220, 26, 26, 0.1] - }) - })); + console.log(layer.getRenderSource()) + if (layer.getRenderSource() instanceof olSource.Google) { + // currently Google source does not seem to support filters + } + else { + layer.addFilter(new Mask({ + feature: boundary, + inner: false, + fill: new Fill({ + color: [220, 26, 26, 0.1] + }) + })); + } } }); } From 6d5b08ffb00dcb8865d913769ecef3f5f11a3cf2 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 13:27:03 +0900 Subject: [PATCH 013/106] Updates Node version Signed-off-by: Daniel Kastl --- .github/workflows/test-postgis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index b8246778..73d0148b 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -62,7 +62,7 @@ jobs: - name: Install Node/Yarn packages run: | - curl -sL https://deb.nodesource.com/setup_16.x | bash - + curl -sL https://deb.nodesource.com/setup_18.x | bash - curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list apt-get update --yes --quiet From 77676909e392fea1ebf83988d1e10d629211915e Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 14:21:27 +0900 Subject: [PATCH 014/106] Excludes in build matrix Signed-off-by: Daniel Kastl --- .github/workflows/test-postgis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 73d0148b..ea12103c 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -27,6 +27,11 @@ jobs: redmine_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION) }} ruby_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} db_version: [12-3.0, 15-3.3] + exclude: + - redmine: 5.1-stable + ruby_version: '3.0' + - redmine: master + ruby_version: '3.0' services: postgres: From 179348d9808c53c248537f23bd4356855d8ba6c8 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 14:23:27 +0900 Subject: [PATCH 015/106] Uses Node 20 Signed-off-by: Daniel Kastl --- .github/workflows/test-postgis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index ea12103c..25a971bb 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -67,7 +67,7 @@ jobs: - name: Install Node/Yarn packages run: | - curl -sL https://deb.nodesource.com/setup_18.x | bash - + curl -sL https://deb.nodesource.com/setup_20.x | bash - curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list apt-get update --yes --quiet From fc20e1d59e853aae0cfe39a0e7c73094638dc665 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 14:34:52 +0900 Subject: [PATCH 016/106] Exclude fix redmine_version Signed-off-by: Daniel Kastl --- .github/workflows/test-postgis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 25a971bb..50c9fd46 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -28,9 +28,9 @@ jobs: ruby_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} db_version: [12-3.0, 15-3.3] exclude: - - redmine: 5.1-stable + - redmine_version: 5.1-stable ruby_version: '3.0' - - redmine: master + - redmine_version: master ruby_version: '3.0' services: From 6f74e8f0a3a9fc4ac7986301eeadd7805b5be416 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 14:55:40 +0900 Subject: [PATCH 017/106] Updates excludes Signed-off-by: Daniel Kastl --- .github/workflows/test-postgis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 50c9fd46..893d136c 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -28,10 +28,9 @@ jobs: ruby_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} db_version: [12-3.0, 15-3.3] exclude: - - redmine_version: 5.1-stable - ruby_version: '3.0' + - redmine_version: 5.0-stable + ruby_version: '3.2' - redmine_version: master - ruby_version: '3.0' services: postgres: From c52b98f824b2a15e79e89aa4c40277b55d344abd Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Mon, 26 Feb 2024 17:02:31 +0900 Subject: [PATCH 018/106] Removes console log Signed-off-by: Daniel Kastl --- src/components/gtt-client/init/layers.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/gtt-client/init/layers.ts b/src/components/gtt-client/init/layers.ts index 6adf09c3..68d509c3 100644 --- a/src/components/gtt-client/init/layers.ts +++ b/src/components/gtt-client/init/layers.ts @@ -243,7 +243,6 @@ function renderProjectBoundary(this: any): void { } this.layerArray.forEach((layer: Layer) => { if (layer.get('baseLayer')) { - console.log(layer.getRenderSource()) if (layer.getRenderSource() instanceof olSource.Google) { // currently Google source does not seem to support filters } From aef508019b6edb436c509357b90a21f8bf4afdc7 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 5 Mar 2024 08:47:45 +0900 Subject: [PATCH 019/106] Dependency minor version upgrade Signed-off-by: Daniel Kastl --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c463bed..dcb51b27 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "fontfaceobserver": "^2.3.0", "geojson": "^0.5.0", "ol": "^9.0.0", - "ol-ext": "^4.0.14", + "ol-ext": "^4.0.15", "ol-mapbox-style": "^12.2.1" }, "devDependencies": { From ec2536430f58793023de239079d1ba3f44264797 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Mon, 8 Apr 2024 15:28:37 +0900 Subject: [PATCH 020/106] Fix GttMapLayer position default (0 to nil) --- ...240408062313_remove_gtt_map_layer_position_default.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20240408062313_remove_gtt_map_layer_position_default.rb diff --git a/db/migrate/20240408062313_remove_gtt_map_layer_position_default.rb b/db/migrate/20240408062313_remove_gtt_map_layer_position_default.rb new file mode 100644 index 00000000..82398d37 --- /dev/null +++ b/db/migrate/20240408062313_remove_gtt_map_layer_position_default.rb @@ -0,0 +1,9 @@ +class RemoveGttMapLayerPositionDefault < ActiveRecord::Migration[5.2] + def up + change_column GttMapLayer.table_name, :position, :integer, :default => nil + end + + def down + change_column GttMapLayer.table_name, :position, :integer, :default => 0 + end +end From 5decb94e8591e167171d0f23dfe7b420489e6810 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Thu, 11 Apr 2024 14:04:42 +0900 Subject: [PATCH 021/106] Updates dependencies to latest versions Signed-off-by: Daniel Kastl --- package.json | 16 ++-- yarn.lock | 234 +++++++++++++++++++++++++-------------------------- 2 files changed, 125 insertions(+), 125 deletions(-) diff --git a/package.json b/package.json index dcb51b27..9091fe1f 100644 --- a/package.json +++ b/package.json @@ -24,23 +24,23 @@ "@mdi/font": "^7.4.47", "fontfaceobserver": "^2.3.0", "geojson": "^0.5.0", - "ol": "^9.0.0", + "ol": "^9.1.0", "ol-ext": "^4.0.15", - "ol-mapbox-style": "^12.2.1" + "ol-mapbox-style": "^12.3.1" }, "devDependencies": { "@types/fontfaceobserver": "^2.1.3", "@types/geojson": "^7946.0.14", "@types/jquery": "^3.5.29", - "@types/jqueryui": "^1.12.21", + "@types/jqueryui": "^1.12.22", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", - "css-loader": "^6.10.0", - "sass": "^1.71.1", + "css-loader": "^7.1.1", + "sass": "^1.74.1", "sass-loader": "^14.1.1", - "style-loader": "^3.3.4", + "style-loader": "^4.0.0", "ts-loader": "^9.5.1", - "typescript": "^5.2.3", - "webpack": "^5.90.3", + "typescript": "^5.4.5", + "webpack": "^5.91.0", "webpack-cli": "^5.1.4" } } diff --git a/yarn.lock b/yarn.lock index db6d3ab2..9c9fab77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -166,10 +166,10 @@ dependencies: "@types/sizzle" "*" -"@types/jqueryui@^1.12.21": - version "1.12.21" - resolved "https://registry.yarnpkg.com/@types/jqueryui/-/jqueryui-1.12.21.tgz#e8c3a2955a5236da452b3dacd4d87c8d64cb5326" - integrity sha512-hsTOaWPg963smNdoHbEN2anu4vVWj9k2xuaZMIajWERPikaBRG49RmaDA/tb2HldX9/a0qHvQYKipXHSLhM3qA== +"@types/jqueryui@^1.12.22": + version "1.12.22" + resolved "https://registry.yarnpkg.com/@types/jqueryui/-/jqueryui-1.12.22.tgz#6cd7ac3e2ad6e10286c5f2fc06329d715202bd8e" + integrity sha512-4r7ROoUJ5gaIWvQa2qAHyrhskJcUNM62Md8M9+4DtabEiIQ9Y0pVlW88ojyXvn4M1HNUc/47KpFJaXhrk8P/rg== dependencies: "@types/jquery" "*" @@ -200,10 +200,10 @@ resolved "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz" integrity sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ== -"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz" - integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== +"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== dependencies: "@webassemblyjs/helper-numbers" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" @@ -218,10 +218,10 @@ resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz" integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== -"@webassemblyjs/helper-buffer@1.11.6": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz" - integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== "@webassemblyjs/helper-numbers@1.11.6": version "1.11.6" @@ -237,15 +237,15 @@ resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz" integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== -"@webassemblyjs/helper-wasm-section@1.11.6": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz" - integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" "@webassemblyjs/ieee754@1.11.6": version "1.11.6" @@ -266,59 +266,59 @@ resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz" integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== -"@webassemblyjs/wasm-edit@^1.11.5": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz" - integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-opt" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" - "@webassemblyjs/wast-printer" "1.11.6" - -"@webassemblyjs/wasm-gen@1.11.6": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz" - integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== - dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wasm-opt@1.11.6": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz" - integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" -"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz" - integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== +"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@webassemblyjs/helper-api-error" "1.11.6" "@webassemblyjs/helper-wasm-bytecode" "1.11.6" "@webassemblyjs/ieee754" "1.11.6" "@webassemblyjs/leb128" "1.11.6" "@webassemblyjs/utf8" "1.11.6" -"@webassemblyjs/wast-printer@1.11.6": - version "1.11.6" - resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz" - integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== dependencies: - "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/ast" "1.12.1" "@xtuc/long" "4.2.2" "@webpack-cli/configtest@^2.1.1": @@ -557,16 +557,16 @@ css-line-break@^2.1.0: dependencies: utrie "^1.0.2" -css-loader@^6.10.0: - version "6.10.0" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.10.0.tgz#7c172b270ec7b833951b52c348861206b184a4b7" - integrity sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw== +css-loader@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.1.tgz#de4163c0cb765c03d7957eb9e0a49c7f354948c7" + integrity sha512-OxIR5P2mjO1PSXk44bWuQ8XtMK4dpEqpIyERCx3ewOo3I8EmbcxMPUc5ScLtQfgXtOojoMv57So4V/C02HQLsw== dependencies: icss-utils "^5.1.0" postcss "^8.4.33" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.4" - postcss-modules-scope "^3.1.1" + postcss-modules-extract-imports "^3.1.0" + postcss-modules-local-by-default "^4.0.5" + postcss-modules-scope "^3.2.0" postcss-modules-values "^4.0.0" postcss-value-parser "^4.2.0" semver "^7.5.4" @@ -604,10 +604,10 @@ enhanced-resolve@^5.0.0: graceful-fs "^4.2.4" tapable "^2.2.0" -enhanced-resolve@^5.15.0: - version "5.15.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" - integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== +enhanced-resolve@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz#65ec88778083056cb32487faa9aef82ed0864787" + integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -737,7 +737,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -961,23 +961,23 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -ol-ext@^4.0.14: - version "4.0.14" - resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.14.tgz#12389a2131356be2daa4324f83480f67c8b76df1" - integrity sha512-ooTz4D2eXrZ5EdAQZvG0zXh4Jc0cEQDQVTcVu0MdoOpswq550NQbLuA8jRILWesWbpNh/7AnntnLPqmoizI2uA== +ol-ext@^4.0.15: + version "4.0.18" + resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.18.tgz#87e68566bae1a7821e3a1af8b7019409ce922324" + integrity sha512-zzeTAoCg9IocaM7LlXiLNnVCgVmfxxLzlDTWvYn3Y2gFxtICHSfRrIQl/8vumgBjftBksVl1Fds8P5uFReTmew== -ol-mapbox-style@^12.2.1: - version "12.2.1" - resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.2.1.tgz#12b568f199a8448fd146191b817b93e075eac2f9" - integrity sha512-soh8x+8CwlA+e3fd8grotA4XXnm0DSWnpzu5Ef3aEQwpM1o2OfoGPSk/hpjhXL5kFUm79pEyiONTw+kdth2FEQ== +ol-mapbox-style@^12.3.1: + version "12.3.1" + resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.3.1.tgz#155e93fc148e2a6bee80de5c2e26ba51069dcb34" + integrity sha512-pKBpKBns4YUgeFCp+aeuJtM+D2BKLc1HJmk5tFL0Nv7u7nelZnInUs/+XnSlHOa1hPBSrOyL+7CvKtegEyuYlg== dependencies: "@mapbox/mapbox-gl-style-spec" "^13.23.1" mapbox-to-css-font "^2.4.1" -ol@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/ol/-/ol-9.0.0.tgz#449207b0da5c31f905a030fac141e04935a126a0" - integrity sha512-+nYHZYbHrRUTDJ8ryxXPdDoAiaT6Zea02cocmGqsJXs4Oac1fYC9EbTIU2Y7803QcmG3u2MR88RxbksBvK+ZfQ== +ol@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/ol/-/ol-9.1.0.tgz#738e9f17093f65dafe114b8a78c69f110f5d0220" + integrity sha512-nDrkJ2tzZNpo/wzN/PpHV5zdxbnXZaFktoMaD2cFLEc6gCwlgLY21Yd8wnt/4FjaVYwLBnbN9USXSwIBGcyksQ== dependencies: color-rgba "^3.0.0" color-space "^2.0.1" @@ -1060,24 +1060,24 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== +postcss-modules-extract-imports@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz#b4497cb85a9c0c4b5aabeb759bb25e8d89f15002" + integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== -postcss-modules-local-by-default@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz#7cbed92abd312b94aaea85b68226d3dec39a14e6" - integrity sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q== +postcss-modules-local-by-default@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz#f1b9bd757a8edf4d8556e8d0f4f894260e3df78f" + integrity sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== dependencies: icss-utils "^5.0.0" postcss-selector-parser "^6.0.2" postcss-value-parser "^4.1.0" -postcss-modules-scope@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz#32cfab55e84887c079a19bbb215e721d683ef134" - integrity sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA== +postcss-modules-scope@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz#a43d28289a169ce2c15c00c4e64c0858e43457d5" + integrity sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== dependencies: postcss-selector-parser "^6.0.4" @@ -1220,10 +1220,10 @@ sass-loader@^14.1.1: dependencies: neo-async "^2.6.2" -sass@^1.71.1: - version "1.71.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.71.1.tgz#dfb09c63ce63f89353777bbd4a88c0a38386ee54" - integrity sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg== +sass@^1.74.1: + version "1.74.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.74.1.tgz#686fc227d3707dd25cb2925e1db8e4562be29319" + integrity sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -1333,10 +1333,10 @@ stackblur-canvas@^2.0.0: resolved "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz" integrity sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ== -style-loader@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.4.tgz#f30f786c36db03a45cbd55b6a70d930c479090e7" - integrity sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w== +style-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-4.0.0.tgz#0ea96e468f43c69600011e0589cb05c44f3b17a5" + integrity sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA== supports-color@^7.1.0: version "7.2.0" @@ -1413,10 +1413,10 @@ ts-loader@^9.5.1: semver "^7.3.4" source-map "^0.7.4" -typescript@^5.2.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^5.4.5: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== update-browserslist-db@^1.0.13: version "1.0.13" @@ -1445,10 +1445,10 @@ utrie@^1.0.2: dependencies: base64-arraybuffer "^1.0.2" -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== +watchpack@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff" + integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -1490,26 +1490,26 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.90.3: - version "5.90.3" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.90.3.tgz#37b8f74d3ded061ba789bb22b31e82eed75bd9ac" - integrity sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA== +webpack@^5.91.0: + version "5.91.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" + integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" - "@webassemblyjs/ast" "^1.11.5" - "@webassemblyjs/wasm-edit" "^1.11.5" - "@webassemblyjs/wasm-parser" "^1.11.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" acorn "^8.7.1" acorn-import-assertions "^1.9.0" browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.15.0" + enhanced-resolve "^5.16.0" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" + graceful-fs "^4.2.11" json-parse-even-better-errors "^2.3.1" loader-runner "^4.2.0" mime-types "^2.1.27" @@ -1517,7 +1517,7 @@ webpack@^5.90.3: schema-utils "^3.2.0" tapable "^2.1.1" terser-webpack-plugin "^5.3.10" - watchpack "^2.4.0" + watchpack "^2.4.1" webpack-sources "^3.2.3" which@^2.0.1: From 3e3f6b4c84623af29dea8b2ad8d0750e7e7aaefc Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Wed, 17 Apr 2024 17:41:59 +0900 Subject: [PATCH 022/106] Updates Sass dependencies Signed-off-by: Daniel Kastl --- package.json | 4 ++-- yarn.lock | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 9091fe1f..b0e038ad 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ "@types/jqueryui": "^1.12.22", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", "css-loader": "^7.1.1", - "sass": "^1.74.1", - "sass-loader": "^14.1.1", + "sass": "^1.75.0", + "sass-loader": "^14.2.1", "style-loader": "^4.0.0", "ts-loader": "^9.5.1", "typescript": "^5.4.5", diff --git a/yarn.lock b/yarn.lock index 9c9fab77..cef6ce2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1213,17 +1213,17 @@ safe-buffer@^5.1.0: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -sass-loader@^14.1.1: - version "14.1.1" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.1.1.tgz#2c9d2277c5b1c5fe789cd0570c046d8ad23cb7ca" - integrity sha512-QX8AasDg75monlybel38BZ49JP5Z+uSKfKwF2rO7S74BywaRmGQMUBw9dtkS+ekyM/QnP+NOrRYq8ABMZ9G8jw== +sass-loader@^14.2.1: + version "14.2.1" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-14.2.1.tgz#db9ad96b56dc1c1ea546101e76375d5b008fec70" + integrity sha512-G0VcnMYU18a4N7VoNDegg2OuMjYtxnqzQWARVWCIVSZwJeiL9kg8QMsuIZOplsJgTzZLF6jGxI3AClj8I9nRdQ== dependencies: neo-async "^2.6.2" -sass@^1.74.1: - version "1.74.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.74.1.tgz#686fc227d3707dd25cb2925e1db8e4562be29319" - integrity sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA== +sass@^1.75.0: + version "1.75.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.75.0.tgz#91bbe87fb02dfcc34e052ddd6ab80f60d392be6c" + integrity sha512-ShMYi3WkrDWxExyxSZPst4/okE9ts46xZmJDSawJQrnte7M1V9fScVB+uNXOVKRBt0PggHOwoZcn8mYX4trnBw== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" From b5f0c7e00a13cf463b3e95c87d0b680607bda234 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 19 Dec 2023 13:35:00 +0900 Subject: [PATCH 023/106] Correctly access project information Signed-off-by: Daniel Kastl --- .../redmine_gtt/hooks/_view_issues_form_details_top.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/redmine_gtt/hooks/_view_issues_form_details_top.html.erb b/app/views/redmine_gtt/hooks/_view_issues_form_details_top.html.erb index 50009295..634cd194 100644 --- a/app/views/redmine_gtt/hooks/_view_issues_form_details_top.html.erb +++ b/app/views/redmine_gtt/hooks/_view_issues_form_details_top.html.erb @@ -1,9 +1,8 @@ -<% if (@project.nil? or @project.module_enabled?(:gtt)) && +<% if issue.project && issue.project.module_enabled?(:gtt) && ((issue.new_record? && User.current.allowed_to?(:add_issues, issue.project)) || User.current.allowed_to?(:edit_issues, issue.project)) %> - <%= map_form_field form, issue.map, bounds: issue.project.map.bounds, rotation: @project.map_rotation, + <%= map_form_field form, issue.map, bounds: issue.project.map.bounds, rotation: issue.project.map_rotation || 0, edit_mode: Setting.plugin_redmine_gtt['editable_geometry_types_on_issue_map'] && Setting.plugin_redmine_gtt['editable_geometry_types_on_issue_map'].join(' '), upload: Setting.plugin_redmine_gtt['enable_geojson_upload_on_issue_map'] == "true" %> <% end %> - From 8d491ab9e76ca43810bcb9327b125285515898c2 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Mon, 13 May 2024 15:07:34 +0900 Subject: [PATCH 024/106] Add issues integration tests --- test/integration/issues_test.rb | 118 ++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 test/integration/issues_test.rb diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb new file mode 100644 index 00000000..9bc7a261 --- /dev/null +++ b/test/integration/issues_test.rb @@ -0,0 +1,118 @@ +require_relative '../test_helper' + +class IssuesTest < Redmine::IntegrationTest + fixtures :projects, + :users, :email_addresses, + :roles, + :members, + :member_roles, + :trackers, + :projects_trackers, + :enabled_modules, + :issue_statuses, + :issues, + :enumerations, + :custom_fields, + :custom_values, + :custom_fields_trackers, :custom_fields_projects, + :attachments, + :issue_categories + + setup do + User.current = nil + @maplayer = RedmineGtt::Actions::CreateMapLayer.( + name: 'OSM Tiles', + layer: 'Tile', + source: 'OSM', + source_options_string: '{"url":"https://tile.openstreetmap.jp/{z}/{x}/{y}.png"}' + ).map_layer + @project = Project.find 'ecookbook' + @project.enabled_modules.create name: 'gtt' + @project.gtt_map_layers << @maplayer + end + + test 'create an issue from global scope' do + log_user('jsmith', 'jsmith') + + get '/issues/new' + assert_response :success + + geo = { + 'type' => 'Feature', + 'geometry' => { + 'type' => 'Point', + 'coordinates' => [123.269691,9.305099,0.0] + } + } + + issue = new_record(Issue) do + post( + '/issues', + :params => { + :issue => { + :project_id => "1", + :tracker_id => "1", + :start_date => "2006-12-26", + :priority_id => "4", + :subject => "new test issue with geometry from globa scope", + :category_id => "", + :description => "new issue", + :done_ratio => "0", + :due_date => "", + :assigned_to_id => "", + :custom_field_values => {'2' => 'Value for field 2'}, + :geojson => geo.to_json + } + } + ) + end + # check redirection + assert_redirected_to :controller => 'issues', :action => 'show', :id => issue + follow_redirect! + + # check issue geometry + assert_equal geo['geometry'].to_json, issue.geom.to_json + end + + test 'create an issue from project scope' do + log_user('jsmith', 'jsmith') + + get '/projects/ecookbook/issues/new' + assert_response :success + + geo = { + 'type' => 'Feature', + 'geometry' => { + 'type' => 'Point', + 'coordinates' => [123.269691,9.305099,0.0] + } + } + + issue = new_record(Issue) do + post( + '/projects/ecookbook/issues', + :params => { + :issue => { + :tracker_id => "1", + :start_date => "2006-12-26", + :priority_id => "4", + :subject => "new test issue with geometry from project scope", + :category_id => "", + :description => "new issue", + :done_ratio => "0", + :due_date => "", + :assigned_to_id => "", + :custom_field_values => {'2' => 'Value for field 2'}, + :geojson => geo.to_json + } + } + ) + end + # check redirection + assert_redirected_to :controller => 'issues', :action => 'show', :id => issue + follow_redirect! + + # check issue geometry + assert_equal geo['geometry'].to_json, issue.geom.to_json + end +end From 76108d47ce94b81c7524c4062dc32228724107db Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 10:50:15 +0900 Subject: [PATCH 025/106] Modify issues integration test names --- test/integration/issues_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index 9bc7a261..b4e3ee9f 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -31,7 +31,7 @@ class IssuesTest < Redmine::IntegrationTest @project.gtt_map_layers << @maplayer end - test 'create an issue from global scope' do + test 'should create issue from global scope' do log_user('jsmith', 'jsmith') get '/issues/new' @@ -74,7 +74,7 @@ class IssuesTest < Redmine::IntegrationTest assert_equal geo['geometry'].to_json, issue.geom.to_json end - test 'create an issue from project scope' do + test 'should create issue from project scope' do log_user('jsmith', 'jsmith') get '/projects/ecookbook/issues/new' From e5513d2cbaaeb6a24bbc1342337c1f5f62a0c81e Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 11:13:51 +0900 Subject: [PATCH 026/106] Adding system test with CI --- .github/workflows/test-postgis.yml | 27 +++++++++--- test/system/issues_map_test.rb | 66 ++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 test/system/issues_map_test.rb diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 893d136c..33eded0d 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -27,6 +27,10 @@ jobs: redmine_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_REDMINE_VERSION) }} ruby_version: ${{ fromJSON(vars.PLUGIN_TEST_MATRIX_RUBY_VERSION) }} db_version: [12-3.0, 15-3.3] + include: + - system_test: true + redmine_version: 5.2-stable + ruby_version: '3.2' exclude: - redmine_version: 5.0-stable ruby_version: '3.2' @@ -59,10 +63,17 @@ jobs: run: apt-get update --yes --quiet - name: Install package dependencies - run: > - apt-get install --yes --quiet - postgresql-client - gcc libpq-dev make patch libgeos-dev curl + run: | + apt-get install --yes --quiet \ + postgresql-client \ + gcc libpq-dev make patch libgeos-dev curl + # For system test + if [ ${{ matrix.system_test }} = "true" ]; then + wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - + sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' + apt-get -y update + apt-get install -y google-chrome-stable + fi - name: Install Node/Yarn packages run: | @@ -127,7 +138,13 @@ jobs: env: RAILS_ENV: test working-directory: redmine - run: bundle exec rake redmine:plugins:test NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0" + run: | + bundle exec rake redmine:plugins:test:units NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0" + bundle exec rake redmine:plugins:test:functionals NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0" + bundle exec rake redmine:plugins:test:integration NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0" + if [ ${{ matrix.system_test }} = "true" ]; then + bundle exec rake redmine:plugins:test:system NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0" + fi - name: Run uninstall test env: diff --git a/test/system/issues_map_test.rb b/test/system/issues_map_test.rb new file mode 100644 index 00000000..6b2b9ced --- /dev/null +++ b/test/system/issues_map_test.rb @@ -0,0 +1,66 @@ +require_relative '../../../../test/application_system_test_case' +require_relative '../test_helper' + +class IssuesMapTest < ApplicationSystemTestCase + fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, + :trackers, :projects_trackers, :enabled_modules, :issue_statuses, :issues, + :enumerations, :custom_fields, :custom_values, :custom_fields_trackers, + :watchers, :journals, :journal_details + + setup do + User.current = nil + @maplayer = RedmineGtt::Actions::CreateMapLayer.( + name: 'OSM Tiles', + layer: 'Tile', + source: 'OSM', + source_options_string: '{"url":"https://tile.openstreetmap.jp/{z}/{x}/{y}.png"}' + ).map_layer + @project = Project.find 'ecookbook' + @project.enabled_modules.create name: 'gtt' + @project.gtt_map_layers << @maplayer + end + + teardown do + + end + + test 'should not show issues map in gtt disabled project' do + log_user('jsmith', 'jsmith') + visit '/issues/4' + + assert_no_selector('div.ol-map') + end + + test 'should show alert box on issues map in no baselayer project' do + @project.gtt_map_layers.clear + log_user('jsmith', 'jsmith') + visit '/issues/1' + + assert_selector('div.ol-map') do + assert_no_selector('canvas') + page.has_content?('There is no baselayer available!') + end + end + + test 'should show issues new map from global scope only when selected project enables gtt module' do + log_user('jsmith', 'jsmith') + visit '/issues/new' + + # Default gtt enabled project + assert_selector('div.ol-map') do + assert_selector('canvas') + end + + # Select gtt disabled project + page.find('#issue_project_id').select('OnlineStore') + assert_no_selector('div.ol-map') + + # Select gtt enabled project again + page.find('#issue_project_id').select('eCookbook') + ## FIXME: Should replace to commented out assertions below + assert_selector('div.ol-map') + # assert_selector('div.ol-map') do + # assert_selector('canvas') + # end + end +end From 6af9849b6f800c851bf8611bf23e3ac7a9c61d47 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 11:17:34 +0900 Subject: [PATCH 027/106] Fix redmine version for system test in CI --- .github/workflows/test-postgis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 33eded0d..8f219d94 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -29,7 +29,7 @@ jobs: db_version: [12-3.0, 15-3.3] include: - system_test: true - redmine_version: 5.2-stable + redmine_version: 5.1-stable ruby_version: '3.2' exclude: - redmine_version: 5.0-stable From 1d06f1c492b3cea63b3cb9d0cf46f376aa6e7158 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 11:22:50 +0900 Subject: [PATCH 028/106] Add GOOGLE_CHROME_OPTS_ARGS env for system test --- .github/workflows/test-postgis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 8f219d94..91dfa57f 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -137,6 +137,8 @@ jobs: - name: Run tests env: RAILS_ENV: test + # For system test in plugin + GOOGLE_CHROME_OPTS_ARGS: "headless,disable-gpu,no-sandbox,disable-dev-shm-usage" working-directory: redmine run: | bundle exec rake redmine:plugins:test:units NAME=${{ env.PLUGIN_NAME }} RUBYOPT="-W0" From e088ff3fdc6088bfcfd10474a0e744ce1c563bd6 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 12:46:29 +0900 Subject: [PATCH 029/106] Update actions/checkout@v4 to use Node.js 20 --- .github/workflows/test-postgis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 91dfa57f..26f1af83 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -48,14 +48,14 @@ jobs: steps: - name: Checkout Redmine - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: redmine/redmine ref: ${{ matrix.redmine_version }} path: redmine - name: Checkout Plugin - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: redmine/plugins/${{ env.PLUGIN_NAME }} From 0a53c62287df203c3c0e34631bdeeb34000e0f83 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 13:38:20 +0900 Subject: [PATCH 030/106] Fix switching gtt disabled/enabled projects issues map rendering --- app/helpers/gtt_map_helper.rb | 7 +++++++ test/system/issues_map_test.rb | 8 +++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/helpers/gtt_map_helper.rb b/app/helpers/gtt_map_helper.rb index caca1044..c3741af3 100644 --- a/app/helpers/gtt_map_helper.rb +++ b/app/helpers/gtt_map_helper.rb @@ -68,6 +68,13 @@ def map_tag(map: nil, layers: map&.layers, window.createGttClient(target); contentObserver(); }, { once: true }); + var target = document.getElementById('#{uid}'); + if ( + document.readyState === 'complete' + && !target.hasChildNodes() + ) { + window.createGttClient(target); + } } document.addEventListener('DOMContentLoaded', function(){ var target = document.getElementById('#{uid}'); diff --git a/test/system/issues_map_test.rb b/test/system/issues_map_test.rb index 6b2b9ced..eb8dd8f9 100644 --- a/test/system/issues_map_test.rb +++ b/test/system/issues_map_test.rb @@ -57,10 +57,8 @@ class IssuesMapTest < ApplicationSystemTestCase # Select gtt enabled project again page.find('#issue_project_id').select('eCookbook') - ## FIXME: Should replace to commented out assertions below - assert_selector('div.ol-map') - # assert_selector('div.ol-map') do - # assert_selector('canvas') - # end + assert_selector('div.ol-map') do + assert_selector('canvas') + end end end From eb4e168606b0a54495ab5438fb6929424356e098 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Tue, 14 May 2024 13:42:30 +0900 Subject: [PATCH 031/106] Enable manual trigger in CI --- .github/workflows/test-postgis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-postgis.yml b/.github/workflows/test-postgis.yml index 26f1af83..c5f09c7f 100644 --- a/.github/workflows/test-postgis.yml +++ b/.github/workflows/test-postgis.yml @@ -12,6 +12,7 @@ on: branches: - main - next + workflow_dispatch: jobs: test: From d36a873a2514f6dfc35c6e6841fd2bbccd3d46d1 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 28 May 2024 15:15:54 +0900 Subject: [PATCH 032/106] Updates dependencies Signed-off-by: Daniel Kastl --- package.json | 8 ++++---- yarn.lock | 32 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index b0e038ad..dfaa48bb 100644 --- a/package.json +++ b/package.json @@ -26,16 +26,16 @@ "geojson": "^0.5.0", "ol": "^9.1.0", "ol-ext": "^4.0.15", - "ol-mapbox-style": "^12.3.1" + "ol-mapbox-style": "^12.3.2" }, "devDependencies": { "@types/fontfaceobserver": "^2.1.3", "@types/geojson": "^7946.0.14", - "@types/jquery": "^3.5.29", + "@types/jquery": "^3.5.30", "@types/jqueryui": "^1.12.22", "@types/ol-ext": "npm:@siedlerchr/types-ol-ext", - "css-loader": "^7.1.1", - "sass": "^1.75.0", + "css-loader": "^7.1.2", + "sass": "^1.77.2", "sass-loader": "^14.2.1", "style-loader": "^4.0.0", "ts-loader": "^9.5.1", diff --git a/yarn.lock b/yarn.lock index cef6ce2c..6a84b673 100644 --- a/yarn.lock +++ b/yarn.lock @@ -159,10 +159,10 @@ dependencies: "@types/sizzle" "*" -"@types/jquery@^3.5.29": - version "3.5.29" - resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.29.tgz#3c06a1f519cd5fc3a7a108971436c00685b5dcea" - integrity sha512-oXQQC9X9MOPRrMhPHHOsXqeQDnWeCDT3PelUIg/Oy8FAbzSZtFHRjc7IpbfFVmpLtJ+UOoywpRsuO5Jxjybyeg== +"@types/jquery@^3.5.30": + version "3.5.30" + resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.30.tgz#888d584cbf844d3df56834b69925085038fd80f7" + integrity sha512-nbWKkkyb919DOUxjmRVk8vwtDb0/k8FKncmUKFi+NY+QXqWltooxTrswvz4LspQwxvLdvzBN1TImr6cw3aQx2A== dependencies: "@types/sizzle" "*" @@ -557,10 +557,10 @@ css-line-break@^2.1.0: dependencies: utrie "^1.0.2" -css-loader@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.1.tgz#de4163c0cb765c03d7957eb9e0a49c7f354948c7" - integrity sha512-OxIR5P2mjO1PSXk44bWuQ8XtMK4dpEqpIyERCx3ewOo3I8EmbcxMPUc5ScLtQfgXtOojoMv57So4V/C02HQLsw== +css-loader@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-7.1.2.tgz#64671541c6efe06b0e22e750503106bdd86880f8" + integrity sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA== dependencies: icss-utils "^5.1.0" postcss "^8.4.33" @@ -966,10 +966,10 @@ ol-ext@^4.0.15: resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.18.tgz#87e68566bae1a7821e3a1af8b7019409ce922324" integrity sha512-zzeTAoCg9IocaM7LlXiLNnVCgVmfxxLzlDTWvYn3Y2gFxtICHSfRrIQl/8vumgBjftBksVl1Fds8P5uFReTmew== -ol-mapbox-style@^12.3.1: - version "12.3.1" - resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.3.1.tgz#155e93fc148e2a6bee80de5c2e26ba51069dcb34" - integrity sha512-pKBpKBns4YUgeFCp+aeuJtM+D2BKLc1HJmk5tFL0Nv7u7nelZnInUs/+XnSlHOa1hPBSrOyL+7CvKtegEyuYlg== +ol-mapbox-style@^12.3.2: + version "12.3.2" + resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-12.3.2.tgz#1cad02b1fca019fce4a2e8814049b5706588c1fb" + integrity sha512-Qw9I6+WHz9zBsLNm8zWWb707Y/hXrQP1fcwK86pxcX/FklwyDxAhfJAdTkINHncZ331CBEWcqvi2tzoN23dgwg== dependencies: "@mapbox/mapbox-gl-style-spec" "^13.23.1" mapbox-to-css-font "^2.4.1" @@ -1220,10 +1220,10 @@ sass-loader@^14.2.1: dependencies: neo-async "^2.6.2" -sass@^1.75.0: - version "1.75.0" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.75.0.tgz#91bbe87fb02dfcc34e052ddd6ab80f60d392be6c" - integrity sha512-ShMYi3WkrDWxExyxSZPst4/okE9ts46xZmJDSawJQrnte7M1V9fScVB+uNXOVKRBt0PggHOwoZcn8mYX4trnBw== +sass@^1.77.2: + version "1.77.2" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.77.2.tgz#18d4ed2eefc260cdc8099c5439ec1303fd5863aa" + integrity sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" From cd5e868f13742c6292020e4f93f0f6f7a97e38ea Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 28 May 2024 16:20:43 +0900 Subject: [PATCH 033/106] Adds settings to hide issue map without geometry, fixes #279 Signed-off-by: Daniel Kastl --- app/views/issues/show.api.rsb | 2 +- app/views/issues/show/_map.html.erb | 8 +++++++- app/views/settings/gtt/_general.html.erb | 9 +++++++++ config/locales/en.yml | 4 ++++ config/locales/ja.yml | 4 ++++ init.rb | 3 ++- yarn.lock | 8 ++++---- 7 files changed, 31 insertions(+), 7 deletions(-) diff --git a/app/views/issues/show.api.rsb b/app/views/issues/show.api.rsb index c0da42fb..7df837f3 100644 --- a/app/views/issues/show.api.rsb +++ b/app/views/issues/show.api.rsb @@ -23,7 +23,7 @@ api.issue do api.total_spent_hours(@issue.total_spent_hours) end - if @issue.geom + if @issue.geom.present? api.geojson (params[:format] == "json") ? @issue.geojson : @issue.geojson.to_json else api.geojson nil diff --git a/app/views/issues/show/_map.html.erb b/app/views/issues/show/_map.html.erb index 31ef972f..3152db4b 100644 --- a/app/views/issues/show/_map.html.erb +++ b/app/views/issues/show/_map.html.erb @@ -1,3 +1,9 @@ <% if @project.nil? or @project.module_enabled?(:gtt) %> - <%= map_tag map: @issue.map, geom: (@issue.as_geojson(include_properties: { only: %i(tracker_id status_id) }) if @issue), rotation: @project.map_rotation %> + <% if @issue.geom.present? or !Setting.plugin_redmine_gtt['hide_map_for_invalid_geom'] %> + <%= map_tag map: @issue.map, + geom: (@issue.as_geojson(include_properties: { only: %i(tracker_id status_id) }) if @issue), + rotation: @project.map_rotation %> + <% else %> +

<%= l(:gtt_hide_map_for_invalid_geom_info) %>
+ <% end %> <% end %> diff --git a/app/views/settings/gtt/_general.html.erb b/app/views/settings/gtt/_general.html.erb index e1f015c7..d7466f33 100644 --- a/app/views/settings/gtt/_general.html.erb +++ b/app/views/settings/gtt/_general.html.erb @@ -62,3 +62,12 @@ <%= check_box_tag 'settings[enable_geojson_upload_on_issue_map]', true, @settings[:enable_geojson_upload_on_issue_map] %>

+ +
+

<%= l(:select_other_gtt_settings) %>

+ +

+ <%= content_tag(:label, l(:label_hide_map_for_invalid_geom)) %> + <%= check_box_tag 'settings[hide_map_for_invalid_geom]', 1, Setting.plugin_redmine_gtt['hide_map_for_invalid_geom'] %> +

+
diff --git a/config/locales/en.yml b/config/locales/en.yml index a20bdc3f..b820da06 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -52,6 +52,10 @@ en: label_enable_geojson_upload_on_issue_map: "Enable GeoJSON upload on issue map" label_enable_geocoding_on_map: "Enable geocoding on map" + select_other_gtt_settings: "Other GTT settings" + label_hide_map_for_invalid_geom: "Hide issue map for invalid geometry" + gtt_hide_map_for_invalid_geom_info: "Please edit the issue and set the geometry to see the map." + select_default_tracker_icon: "Select default tracker icon:" select_default_status_color: "Select default status color:" select_default_map_settings: "Set default map settings:" diff --git a/config/locales/ja.yml b/config/locales/ja.yml index b8d2a711..a26abb54 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -52,6 +52,10 @@ ja: label_enable_geojson_upload_on_issue_map: "チケット地図上でGeoJSONアップロードを有効化" label_enable_geocoding_on_map: "地図上でジオコーディングを有効化" + select_other_gtt_settings: "Other GTT settings" + label_hide_map_for_invalid_geom: "Hide issue map for invalid geometry" + gtt_hide_map_for_invalid_geom_info: "Please edit the issue and set the geometry to see the map." + select_default_tracker_icon: "トラッカーアイコンを選択:" select_default_status_color: "ステータス色を選択:" select_default_map_settings: "地図の初期値を設定:" diff --git a/init.rb b/init.rb index 89efcaa2..086358f6 100644 --- a/init.rb +++ b/init.rb @@ -33,7 +33,8 @@ 'default_geocoder_options' => '{}', 'editable_geometry_types_on_issue_map' => ["Point"], 'enable_geojson_upload_on_issue_map' => false, - 'enable_geocoding_on_map' => false + 'enable_geocoding_on_map' => false, + 'hide_map_for_invalid_geom' => false }, partial: 'settings/gtt/settings' ) diff --git a/yarn.lock b/yarn.lock index db6d3ab2..4d744a81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -961,10 +961,10 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -ol-ext@^4.0.14: - version "4.0.14" - resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.14.tgz#12389a2131356be2daa4324f83480f67c8b76df1" - integrity sha512-ooTz4D2eXrZ5EdAQZvG0zXh4Jc0cEQDQVTcVu0MdoOpswq550NQbLuA8jRILWesWbpNh/7AnntnLPqmoizI2uA== +ol-ext@^4.0.15: + version "4.0.18" + resolved "https://registry.yarnpkg.com/ol-ext/-/ol-ext-4.0.18.tgz#87e68566bae1a7821e3a1af8b7019409ce922324" + integrity sha512-zzeTAoCg9IocaM7LlXiLNnVCgVmfxxLzlDTWvYn3Y2gFxtICHSfRrIQl/8vumgBjftBksVl1Fds8P5uFReTmew== ol-mapbox-style@^12.2.1: version "12.2.1" From e391afa1c829c11c7e09d68909de3c3ae86db567 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Tue, 28 May 2024 17:08:16 +0900 Subject: [PATCH 034/106] Adds a clear map control, fixes #282 Signed-off-by: Daniel Kastl --- config/locales/de.yml | 1 + config/locales/en.yml | 1 + config/locales/ja.yml | 1 + lib/redmine_gtt/patches/issue_patch.rb | 2 +- src/components/gtt-client/helpers/index.ts | 14 +++++++++----- src/components/gtt-client/openlayers/index.ts | 11 +++++++++++ 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index dd74f6ce..39288ae4 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -65,6 +65,7 @@ de: point: Punkteditor linestring: Linieneditor polygon: Flächeneditor + clear_map: "Clear map" modal: load: Laden cancel: Abbrechen diff --git a/config/locales/en.yml b/config/locales/en.yml index a20bdc3f..e80ee730 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -105,6 +105,7 @@ en: point: "Point editor" linestring: "Line editor" polygon: "Area editor" + clear_map: "Clear map" modal: load: "Load" cancel: "Cancel" diff --git a/config/locales/ja.yml b/config/locales/ja.yml index b8d2a711..11a28bd3 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -105,6 +105,7 @@ ja: point: ポイント編集 linestring: ライン編集 polygon: エリア編集 + clear_map: "Clear map" modal: load: 読み込み cancel: キャンセル diff --git a/lib/redmine_gtt/patches/issue_patch.rb b/lib/redmine_gtt/patches/issue_patch.rb index 8b67a38a..b91d6790 100644 --- a/lib/redmine_gtt/patches/issue_patch.rb +++ b/lib/redmine_gtt/patches/issue_patch.rb @@ -29,7 +29,7 @@ def map # (i.e. [140.1250590699026,35.6097256061325] vs [140.1250590699026,35.60972560613251]) def ignore_small_geom_change - unless geom_change[0].nil? + unless geom_change[0].nil? || geom_change[1].nil? if geom_change[0].geometry_type == geom_change[1].geometry_type old_value = geom_change[0].coordinates new_value = geom_change[1].coordinates diff --git a/src/components/gtt-client/helpers/index.ts b/src/components/gtt-client/helpers/index.ts index 52d8ee28..045a7670 100644 --- a/src/components/gtt-client/helpers/index.ts +++ b/src/components/gtt-client/helpers/index.ts @@ -104,12 +104,16 @@ export const getObjectPathValue = (obj: any, path: string | Array, def: * @param updateAddressFlag - A flag to update the address field with reverse geocoding, default is false. */ export function updateForm(mapObj: any, features: FeatureLike[] | null, updateAddressFlag: boolean = false):void { - if (features == null) { - return - } - const geom = document.querySelector('#geom') as HTMLInputElement + + const geom = document.querySelector('#geom') as HTMLInputElement; if (!geom) { - return + return; + } + + if (features == null) { + // Clear the geom input field + geom.value = ''; + return; } const writer = new GeoJSON() diff --git a/src/components/gtt-client/openlayers/index.ts b/src/components/gtt-client/openlayers/index.ts index 34aaf0bb..1f995d60 100644 --- a/src/components/gtt-client/openlayers/index.ts +++ b/src/components/gtt-client/openlayers/index.ts @@ -201,6 +201,17 @@ export function setControls(types: Array) { editbar.addControl(control) }) + // Add the clear map control + const clearMapCtrl = new Button({ + html: '', + title: this.i18n.control.clear_map, + handleClick: () => { + this.vector.getSource().clear(); + updateForm(this, null); + } + }); + editbar.addControl(clearMapCtrl); + // Uses jQuery UI for GeoJSON Upload modal window const mapObj = this const dialog = $("#dialog-geojson-upload").dialog({ From 1872a8ea4c65125ba276cbf25862782c30be8891 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Wed, 29 May 2024 18:31:01 +0900 Subject: [PATCH 035/106] Implements SearchGTT basic class Signed-off-by: Daniel Kastl --- config/locales/de.yml | 3 + config/locales/en.yml | 3 + config/locales/ja.yml | 3 + src/@types/ol-ext/util/element.d.ts | 80 +++++++++++++++++++ .../gtt-client/geocoding/SearchGTT.ts | 52 ++++++++++++ src/components/gtt-client/init/controls.ts | 18 +++++ src/styles/scss/app.scss | 13 +++ tsconfig.json | 6 +- 8 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 src/@types/ol-ext/util/element.d.ts create mode 100644 src/components/gtt-client/geocoding/SearchGTT.ts diff --git a/config/locales/de.yml b/config/locales/de.yml index dd74f6ce..52a5da3f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -56,6 +56,9 @@ de: control: geocoding: Standort-Suche geolocation: Mein Standort + search_location: "Search location" + reverse_location: "Click on the map..." + search_placeholder: "Type a location..." maximize: Zoom auf alle Objekte upload: GeoJSON hochladen fullscreen: Vollbildmodus umschalten diff --git a/config/locales/en.yml b/config/locales/en.yml index a20bdc3f..8ca22000 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -96,6 +96,9 @@ en: control: geocoding: "Location search" geolocation: "My location" + search_location: "Search location" + reverse_location: "Click on the map..." + search_placeholder: "Type a location..." maximize: "Zoom to all features" upload: "Upload GeoJSON" fullscreen: "Toggle full-screen" diff --git a/config/locales/ja.yml b/config/locales/ja.yml index b8d2a711..e7eeebb4 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -96,6 +96,9 @@ ja: control: geocoding: 住所検索 geolocation: 現在地へ移動 + search_location: "Search location" + reverse_location: "Click on the map..." + search_placeholder: "Type a location..." maximize: 地物にズーム upload: GeoJSONのアップロード fullscreen: フルスクリーン切り替え diff --git a/src/@types/ol-ext/util/element.d.ts b/src/@types/ol-ext/util/element.d.ts new file mode 100644 index 00000000..76636367 --- /dev/null +++ b/src/@types/ol-ext/util/element.d.ts @@ -0,0 +1,80 @@ +declare module 'ol-ext/util/element' { + interface CreateElementOptions { + className?: string; + parent?: Element; + html?: Element | string; + text?: string; + options?: Record; + style?: Record; + change?: EventListener; + click?: EventListener; + on?: Record; + checked?: boolean; + [key: string]: any; + } + + interface SwitchOptions extends CreateElementOptions { + html?: string | Element; + after?: string | Element; + checked?: boolean; + } + + interface CheckOptions extends CreateElementOptions { + html?: string | Element; + after?: string | Element; + name?: string; + type?: 'checkbox' | 'radio'; + value?: string; + } + + interface ScrollDivOptions { + onmove?: (scrolling: boolean) => void; + vertical?: boolean; + animate?: boolean; + mousewheel?: boolean; + minibar?: boolean; + } + + interface ScrollDivResult { + refresh: () => void; + } + + interface OffsetRect { + top: number; + left: number; + height: number; + width: number; + } + + interface PositionRect { + top: number; + left: number; + bottom: number; + right: number; + } + + export namespace ol_ext_element { + function create(tagName: string, options?: CreateElementOptions): Element | Text; + function createSwitch(options: SwitchOptions): HTMLInputElement; + function createCheck(options: CheckOptions): HTMLInputElement; + function setHTML(element: Element, html: Element | string): void; + function appendText(element: Element, text: string): void; + function addListener(element: Element, eventType: string | string[], fn: EventListener, useCapture?: boolean): void; + function removeListener(element: Element, eventType: string | string[], fn: EventListener): void; + function show(element: Element): void; + function hide(element: Element): void; + function hidden(element: Element): boolean; + function toggle(element: Element): void; + function setStyle(el: Element, st: Record): void; + function getStyle(el: Element, styleProp: string): string | number; + function outerHeight(elt: Element): number; + function outerWidth(elt: Element): number; + function offsetRect(elt: Element): OffsetRect; + function getFixedOffset(elt: Element): { top: number; left: number }; + function positionRect(elt: Element, fixed?: boolean): PositionRect; + function scrollDiv(elt: Element, options?: ScrollDivOptions): ScrollDivResult; + function dispatchEvent(eventName: string, element: Element): void; + } + + export default ol_ext_element; +} diff --git a/src/components/gtt-client/geocoding/SearchGTT.ts b/src/components/gtt-client/geocoding/SearchGTT.ts new file mode 100644 index 00000000..03de8658 --- /dev/null +++ b/src/components/gtt-client/geocoding/SearchGTT.ts @@ -0,0 +1,52 @@ +// src/components/gtt-client/geocoding/SearchGTT.ts +import Search, { Options as SearchOptions } from 'ol-ext/control/Search'; +import ol_ext_element from 'ol-ext/util/element'; + +interface SearchGTTOptions extends SearchOptions { + // Additional options + html?: string; +} + +class SearchGTT extends Search { + private button: HTMLButtonElement; + + constructor(options: SearchGTTOptions = {}) { + options = options || {}; + options.className = options.className || 'ol-search-gtt'; + options.html = options.html || '?'; + + super(options); + + // Remove the default button if it exists + const defaultButton = this.element.querySelector('button[type="button"]'); + if (defaultButton) { + defaultButton.remove(); + } + + // Create a custom button with a custom icon + this.button = ol_ext_element.create('BUTTON', { + className: 'ol-search-gtt', + title: options.title || 'Search', + html: options.html, + parent: this.element, + click: function () { + this.element.classList.toggle('ol-collapsed'); + if (!this.element.classList.contains('ol-collapsed')) { + const input = this.element.querySelector('input.search'); + if (input) { + input.focus(); + this.drawList_(); + } + } + }.bind(this) + }) as HTMLButtonElement; + + // Move list to the end + const ul = this.element.querySelector("ul.autocomplete"); + if (ul) { + this.element.appendChild(ul); + } + } +} + +export default SearchGTT; diff --git a/src/components/gtt-client/init/controls.ts b/src/components/gtt-client/init/controls.ts index 66412323..29b03370 100644 --- a/src/components/gtt-client/init/controls.ts +++ b/src/components/gtt-client/init/controls.ts @@ -6,6 +6,7 @@ import LayerSwitcher from 'ol-ext/control/LayerSwitcher'; import { position } from 'ol-ext/control/control'; import { setGeocoding } from "../geocoding"; +import SearchGTT from '../geocoding/SearchGTT'; import { radiansToDegrees, degreesToRadians, parseHistory } from "../helpers"; import { zoomToExtent, setGeolocation, setView, setControls, setPopover } from "../openlayers"; @@ -19,11 +20,28 @@ function addToolbarAndControls(instance: any): void { instance.map.addControl(instance.toolbar); setView.call(instance); + setSearchControl(instance); setGeocoding.call(instance, instance.map); setGeolocation.call(instance, instance.map); parseHistory.call(instance); } +/** + * Adds the search control to the map instance. + * @param {any} map - The OpenLayers map instance. + */ +function setSearchControl(instance: any): void { + const searchControl = new SearchGTT({ + title: instance.i18n.control.search_location, + reverseTitle: instance.i18n.control.reverse_search, + placeholder: instance.i18n.control.search_placeholder, + html: '', + // Add other options as needed + }); + + instance.map.addControl(searchControl); +} + /** * Adds the FullScreen and Rotate controls to the map instance. * @param {any} instance - The GttClient instance. diff --git a/src/styles/scss/app.scss b/src/styles/scss/app.scss index f34c60fe..5f6eafac 100644 --- a/src/styles/scss/app.scss +++ b/src/styles/scss/app.scss @@ -61,8 +61,16 @@ $breakpoint-tablet: 899px; background-color: rgba(52, 73, 94, 1); } +// Unset default search icon +.ol-control.ol-search > button::before, +.ol-control.ol-search > button::after { + content: none; +} + +// Increase button icon size .ol-zoom button.ol-zoom-in, .ol-zoom button.ol-zoom-out, +.ol-search-gtt button.ol-search-gtt, .ol-full-screen button.ol-full-screen-true, .ol-full-screen button.ol-full-screen-false, .ol-rotate button.ol-rotate-reset, @@ -70,6 +78,11 @@ $breakpoint-tablet: 899px; font-size: 1.5rem; } +.ol-search-gtt input.search { + padding: 1.0em; + font-size: 1.0rem; +} + div.ol-full-screen { right: 2.55rem; } diff --git a/tsconfig.json b/tsconfig.json index c78fe4fe..0c7237a8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "module": "es6", "moduleResolution": "node", "jsx": "react", @@ -8,6 +8,10 @@ "outDir": "./dist", "allowJs": true, "noImplicitAny": true, + // "strict": true, + // "esModuleInterop": true, + // "skipLibCheck": true, + // "sourceMap": true, "paths": { "*": ["@types/*"] } From 021d82744d0f02dd02b8ae5435805a904a35f64f Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Wed, 29 May 2024 21:39:25 +0900 Subject: [PATCH 036/106] Removes legacy Geocoder control Signed-off-by: Daniel Kastl --- src/components/gtt-client/init/controls.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/gtt-client/init/controls.ts b/src/components/gtt-client/init/controls.ts index 29b03370..ba0fca4c 100644 --- a/src/components/gtt-client/init/controls.ts +++ b/src/components/gtt-client/init/controls.ts @@ -5,7 +5,6 @@ import LayerPopup from 'ol-ext/control/LayerPopup'; import LayerSwitcher from 'ol-ext/control/LayerSwitcher'; import { position } from 'ol-ext/control/control'; -import { setGeocoding } from "../geocoding"; import SearchGTT from '../geocoding/SearchGTT'; import { radiansToDegrees, degreesToRadians, parseHistory } from "../helpers"; import { zoomToExtent, setGeolocation, setView, setControls, setPopover } from "../openlayers"; @@ -21,7 +20,6 @@ function addToolbarAndControls(instance: any): void { setView.call(instance); setSearchControl(instance); - setGeocoding.call(instance, instance.map); setGeolocation.call(instance, instance.map); parseHistory.call(instance); } @@ -35,8 +33,7 @@ function setSearchControl(instance: any): void { title: instance.i18n.control.search_location, reverseTitle: instance.i18n.control.reverse_search, placeholder: instance.i18n.control.search_placeholder, - html: '', - // Add other options as needed + html: '' }); instance.map.addControl(searchControl); From 361c74371d6cc113ae558d6a1d204f8ed9cd3358 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Wed, 29 May 2024 23:09:58 +0900 Subject: [PATCH 037/106] Extends plugin setting Signed-off-by: Daniel Kastl --- app/helpers/gtt_map_helper.rb | 16 ++++++++- app/views/settings/gtt/_geocoder.html.erb | 41 +++++++++++++++++++++++ config/locales/de.yml | 4 ++- config/locales/en.yml | 4 ++- config/locales/ja.yml | 4 ++- 5 files changed, 65 insertions(+), 4 deletions(-) diff --git a/app/helpers/gtt_map_helper.rb b/app/helpers/gtt_map_helper.rb index caca1044..bae76149 100644 --- a/app/helpers/gtt_map_helper.rb +++ b/app/helpers/gtt_map_helper.rb @@ -32,7 +32,18 @@ def map_tag(map: nil, layers: map&.layers, data[:popup] = popup if popup data[:upload] = upload data[:collapsed] = collapsed if collapsed - data[:geocoding] = true if Setting.plugin_redmine_gtt['enable_geocoding_on_map'] == 'true' + + if Setting.plugin_redmine_gtt['enable_geocoding_on_map'] == 'true' + data[:geocoding] = { + enabled: true, + provider: Setting.plugin_redmine_gtt['default_geocoder_provider'], + options: (JSON.parse(Setting.plugin_redmine_gtt['default_geocoder_options']) rescue {}) + } + else + data[:geocoding] = { + enabled: false + } + end uid = "ol-" + rand(36**8).to_s(36) @@ -40,6 +51,9 @@ def map_tag(map: nil, layers: map&.layers, content_tag(:div, "", data: data, id: uid, class: 'ol-map', style: (collapsed ? "display: none" : "display: block")), javascript_tag(" + var data = document.getElementById('#{uid}').dataset; + var geocoding = data.geocoding; + console.log('geocoding', JSON.parse(geocoding)); var contentObserver = () => { const target = document.getElementById('#{uid}'); const observerCallback = function(mutations) { diff --git a/app/views/settings/gtt/_geocoder.html.erb b/app/views/settings/gtt/_geocoder.html.erb index c0c6c6db..b4bfcfa9 100644 --- a/app/views/settings/gtt/_geocoder.html.erb +++ b/app/views/settings/gtt/_geocoder.html.erb @@ -6,6 +6,21 @@ <%= check_box_tag 'settings[enable_geocoding_on_map]', true, @settings[:enable_geocoding_on_map] %>

+

+ <%= content_tag(:label, l(:geocoder_provider)) %> + <%= select_tag 'settings[default_geocoder_provider]', + options_for_select([ + ['Bing', 'bing', {disabled: true}], + ['Google', 'google', {disabled: true}], + ['Nominatim (OSM)', 'nominatim'], + ['pgGeocoder', 'pggeocoder', {disabled: true}], + ['Photon', 'photon'], + ['Custom', 'custom'] + ], @settings['default_geocoder_provider']), + include_blank: true %> + <%= link_to t('geocoder_load_example'), '#', id: 'geocoder_load_example', class: 'info' %> +

+

<%= content_tag(:label, l(:geocoder_options)) %> <%= text_area_tag('settings[default_geocoder_options]', @@ -15,3 +30,29 @@ :cols => 100) %>

+ + diff --git a/config/locales/de.yml b/config/locales/de.yml index 52a5da3f..d4e495cd 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -11,7 +11,9 @@ de: label_gtt_select_icon: Icon auswählen label_parameters: Parameter label_tab_geocoder: Geocoder - geocoder_options: Geocoder Optionen + geocoder_provider: "Anbieter" + geocoder_options: Optionen + geocoder_load_example: "Load example options" gtt_settings_general_maxzoom_level: Standardwert für die maximale Zoomstufe der Karte label_default_collapsed_issues_page_map: Standardmäßig ausgeblendete Karte für Tickets diff --git a/config/locales/en.yml b/config/locales/en.yml index 8ca22000..82ff85e4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -28,7 +28,9 @@ en: label_tab_general: "General" label_tab_geocoder: "Geocoder" - geocoder_options: "Geocoder Options" + geocoder_provider: "Provider" + geocoder_options: "Options" + geocoder_load_example: "Load example options" gtt_map_rotate_label: "Map rotation" gtt_map_rotate_info_html: "Hold down Shift+Alt and drag the map to rotate." diff --git a/config/locales/ja.yml b/config/locales/ja.yml index e7eeebb4..0bd9e814 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -28,7 +28,9 @@ ja: label_tab_general: "一般" label_tab_geocoder: "ジオコーダ" - geocoder_options: "ジオコーダのオプション" + geocoder_provider: "Provider" + geocoder_options: "オプション" + geocoder_load_example: "Load example options" gtt_map_rotate_label: "地図の回転" gtt_map_rotate_info_html: "Shift+Alt を押しながらドラッグして地図を回転します。" From f3cbe3d3625d3965266abd64fc681835250d1c96 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Wed, 29 May 2024 23:40:59 +0900 Subject: [PATCH 038/106] Passes Geocoder plugin settings enable/disable geocoder control Signed-off-by: Daniel Kastl --- app/helpers/gtt_map_helper.rb | 15 -------------- .../hooks/view_layouts_base_html_head_hook.rb | 20 +++++++++++-------- .../gtt-client/geocoding/SearchGTT.ts | 5 +++++ src/components/gtt-client/init/controls.ts | 20 ++++++++++++------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app/helpers/gtt_map_helper.rb b/app/helpers/gtt_map_helper.rb index bae76149..fb216248 100644 --- a/app/helpers/gtt_map_helper.rb +++ b/app/helpers/gtt_map_helper.rb @@ -33,27 +33,12 @@ def map_tag(map: nil, layers: map&.layers, data[:upload] = upload data[:collapsed] = collapsed if collapsed - if Setting.plugin_redmine_gtt['enable_geocoding_on_map'] == 'true' - data[:geocoding] = { - enabled: true, - provider: Setting.plugin_redmine_gtt['default_geocoder_provider'], - options: (JSON.parse(Setting.plugin_redmine_gtt['default_geocoder_options']) rescue {}) - } - else - data[:geocoding] = { - enabled: false - } - end - uid = "ol-" + rand(36**8).to_s(36) safe_join [ content_tag(:div, "", data: data, id: uid, class: 'ol-map', style: (collapsed ? "display: none" : "display: block")), javascript_tag(" - var data = document.getElementById('#{uid}').dataset; - var geocoding = data.geocoding; - console.log('geocoding', JSON.parse(geocoding)); var contentObserver = () => { const target = document.getElementById('#{uid}'); const observerCallback = function(mutations) { diff --git a/lib/redmine_gtt/hooks/view_layouts_base_html_head_hook.rb b/lib/redmine_gtt/hooks/view_layouts_base_html_head_hook.rb index f06ac494..dd3eb130 100644 --- a/lib/redmine_gtt/hooks/view_layouts_base_html_head_hook.rb +++ b/lib/redmine_gtt/hooks/view_layouts_base_html_head_hook.rb @@ -13,15 +13,19 @@ def view_layouts_base_html_head(context={}) def view_layouts_base_body_bottom(context={}) tags = []; - geocoder = {} - geocoder_options = Setting.plugin_redmine_gtt['default_geocoder_options'] - if geocoder_options.present? - begin - geocoder = JSON.parse(geocoder_options) - rescue JSON::ParserError => exception - Rails.logger.warn "Failed to parse setting's 'geocoder_options' as JSON: #{exception}\nUse default '{}' instead." - end + + geocoder = { + enabled: false + } + + if Setting.plugin_redmine_gtt['enable_geocoding_on_map'] == 'true' + geocoder = { + enabled: true, + provider: Setting.plugin_redmine_gtt['default_geocoder_provider'], + options: (JSON.parse(Setting.plugin_redmine_gtt['default_geocoder_options']) rescue {}) + } end + tags.push(tag.div :data => { :lon => Setting.plugin_redmine_gtt['default_map_center_longitude'], :lat => Setting.plugin_redmine_gtt['default_map_center_latitude'], diff --git a/src/components/gtt-client/geocoding/SearchGTT.ts b/src/components/gtt-client/geocoding/SearchGTT.ts index 03de8658..61b0e260 100644 --- a/src/components/gtt-client/geocoding/SearchGTT.ts +++ b/src/components/gtt-client/geocoding/SearchGTT.ts @@ -5,6 +5,8 @@ import ol_ext_element from 'ol-ext/util/element'; interface SearchGTTOptions extends SearchOptions { // Additional options html?: string; + provider?: string; + providerOptions?: object; } class SearchGTT extends Search { @@ -15,6 +17,9 @@ class SearchGTT extends Search { options.className = options.className || 'ol-search-gtt'; options.html = options.html || '?'; + options.provider = options.provider || ''; + options.providerOptions = options.providerOptions || {}; + super(options); // Remove the default button if it exists diff --git a/src/components/gtt-client/init/controls.ts b/src/components/gtt-client/init/controls.ts index ba0fca4c..710e31f3 100644 --- a/src/components/gtt-client/init/controls.ts +++ b/src/components/gtt-client/init/controls.ts @@ -29,14 +29,20 @@ function addToolbarAndControls(instance: any): void { * @param {any} map - The OpenLayers map instance. */ function setSearchControl(instance: any): void { - const searchControl = new SearchGTT({ - title: instance.i18n.control.search_location, - reverseTitle: instance.i18n.control.reverse_search, - placeholder: instance.i18n.control.search_placeholder, - html: '' - }); + const geocoder = JSON.parse(instance.defaults.geocoder); + + if (JSON.parse(geocoder.enabled)) { + const searchControl = new SearchGTT({ + title: instance.i18n.control.search_location, + reverseTitle: instance.i18n.control.reverse_location, + placeholder: instance.i18n.control.search_placeholder, + provider: geocoder.provider, + providerOptions: geocoder.options, + html: '', + }); - instance.map.addControl(searchControl); + instance.map.addControl(searchControl); + } } /** From cafe15fc2dc4d65b4ec7f62637a54cdeb415de02 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Thu, 30 May 2024 00:49:43 +0900 Subject: [PATCH 039/106] Implements Search Factory Signed-off-by: Daniel Kastl --- .../gtt-client/geocoding/CustomButtonMixin.ts | 34 +++++++++++++++++ .../gtt-client/geocoding/SearchFactory.ts | 38 +++++++++++++++++++ .../gtt-client/geocoding/SearchGTT.ts | 34 +---------------- src/components/gtt-client/init/controls.ts | 7 ++-- src/styles/scss/app.scss | 2 +- 5 files changed, 78 insertions(+), 37 deletions(-) create mode 100644 src/components/gtt-client/geocoding/CustomButtonMixin.ts create mode 100644 src/components/gtt-client/geocoding/SearchFactory.ts diff --git a/src/components/gtt-client/geocoding/CustomButtonMixin.ts b/src/components/gtt-client/geocoding/CustomButtonMixin.ts new file mode 100644 index 00000000..75dc2448 --- /dev/null +++ b/src/components/gtt-client/geocoding/CustomButtonMixin.ts @@ -0,0 +1,34 @@ +// src/components/gtt-client/geocoding/CustomButtonMixin.ts +import ol_ext_element from 'ol-ext/util/element'; + +export function applyCustomButton(searchControl: any, options: any) { + // Remove the default button if it exists + const defaultButton = searchControl.element.querySelector('button[type="button"]'); + if (defaultButton) { + defaultButton.remove(); + } + + // Create a custom button with a custom icon + searchControl.button = ol_ext_element.create('BUTTON', { + className: 'ol-search-gtt', + title: options.title || 'Search', + html: options.html || '', + parent: searchControl.element, + click: function () { + searchControl.element.classList.toggle('ol-collapsed'); + if (!searchControl.element.classList.contains('ol-collapsed')) { + const input = searchControl.element.querySelector('input.search'); + if (input) { + input.focus(); + searchControl.drawList_(); + } + } + }.bind(searchControl) + }) as HTMLButtonElement; + + // Move list to the end + const ul = searchControl.element.querySelector("ul.autocomplete"); + if (ul) { + searchControl.element.appendChild(ul); + } +} diff --git a/src/components/gtt-client/geocoding/SearchFactory.ts b/src/components/gtt-client/geocoding/SearchFactory.ts new file mode 100644 index 00000000..d53df8f3 --- /dev/null +++ b/src/components/gtt-client/geocoding/SearchFactory.ts @@ -0,0 +1,38 @@ +// src/components/gtt-client/geocoding/SearchFactory.ts +import { applyCustomButton } from './CustomButtonMixin'; +import SearchGTT from './SearchGTT'; +import SearchNominatim from 'ol-ext/control/SearchNominatim'; +import SearchPhoton from 'ol-ext/control/SearchPhoton'; + +export function createSearchControl(options: any): any { + let searchControl: any; + + console.log(options); + + switch (options.provider) { + case 'nominatim': + console.log('Creating Nominatim search control'); + searchControl = new SearchNominatim(options); + break; + case 'photon': + console.log('Creating Photon search control'); + searchControl = new SearchPhoton(options); + break; + case 'custom': + console.log('Creating custom search control'); + searchControl = new SearchGTT(options); + break; + // Add cases for other providers as needed + default: + console.log('Creating default search control'); + // Todo: Decide default search control + searchControl = new SearchPhoton(options); + break; + } + + // Apply custom button implementation + console.log('Creating custom button'); + applyCustomButton(searchControl, options); + + return searchControl; +} diff --git a/src/components/gtt-client/geocoding/SearchGTT.ts b/src/components/gtt-client/geocoding/SearchGTT.ts index 61b0e260..9eea26a6 100644 --- a/src/components/gtt-client/geocoding/SearchGTT.ts +++ b/src/components/gtt-client/geocoding/SearchGTT.ts @@ -1,16 +1,14 @@ // src/components/gtt-client/geocoding/SearchGTT.ts import Search, { Options as SearchOptions } from 'ol-ext/control/Search'; -import ol_ext_element from 'ol-ext/util/element'; interface SearchGTTOptions extends SearchOptions { - // Additional options html?: string; provider?: string; providerOptions?: object; } class SearchGTT extends Search { - private button: HTMLButtonElement; + public button: HTMLButtonElement; constructor(options: SearchGTTOptions = {}) { options = options || {}; @@ -21,36 +19,6 @@ class SearchGTT extends Search { options.providerOptions = options.providerOptions || {}; super(options); - - // Remove the default button if it exists - const defaultButton = this.element.querySelector('button[type="button"]'); - if (defaultButton) { - defaultButton.remove(); - } - - // Create a custom button with a custom icon - this.button = ol_ext_element.create('BUTTON', { - className: 'ol-search-gtt', - title: options.title || 'Search', - html: options.html, - parent: this.element, - click: function () { - this.element.classList.toggle('ol-collapsed'); - if (!this.element.classList.contains('ol-collapsed')) { - const input = this.element.querySelector('input.search'); - if (input) { - input.focus(); - this.drawList_(); - } - } - }.bind(this) - }) as HTMLButtonElement; - - // Move list to the end - const ul = this.element.querySelector("ul.autocomplete"); - if (ul) { - this.element.appendChild(ul); - } } } diff --git a/src/components/gtt-client/init/controls.ts b/src/components/gtt-client/init/controls.ts index 710e31f3..8d3bc146 100644 --- a/src/components/gtt-client/init/controls.ts +++ b/src/components/gtt-client/init/controls.ts @@ -5,9 +5,9 @@ import LayerPopup from 'ol-ext/control/LayerPopup'; import LayerSwitcher from 'ol-ext/control/LayerSwitcher'; import { position } from 'ol-ext/control/control'; -import SearchGTT from '../geocoding/SearchGTT'; import { radiansToDegrees, degreesToRadians, parseHistory } from "../helpers"; import { zoomToExtent, setGeolocation, setView, setControls, setPopover } from "../openlayers"; +import { createSearchControl } from '../geocoding/SearchFactory'; /** * Adds the toolbar and basic controls to the map instance. @@ -32,15 +32,16 @@ function setSearchControl(instance: any): void { const geocoder = JSON.parse(instance.defaults.geocoder); if (JSON.parse(geocoder.enabled)) { - const searchControl = new SearchGTT({ + const options = { title: instance.i18n.control.search_location, reverseTitle: instance.i18n.control.reverse_location, placeholder: instance.i18n.control.search_placeholder, provider: geocoder.provider, providerOptions: geocoder.options, html: '', - }); + }; + const searchControl = createSearchControl(options); instance.map.addControl(searchControl); } } diff --git a/src/styles/scss/app.scss b/src/styles/scss/app.scss index 5f6eafac..3a14146a 100644 --- a/src/styles/scss/app.scss +++ b/src/styles/scss/app.scss @@ -70,7 +70,7 @@ $breakpoint-tablet: 899px; // Increase button icon size .ol-zoom button.ol-zoom-in, .ol-zoom button.ol-zoom-out, -.ol-search-gtt button.ol-search-gtt, +.ol-search button.ol-search-gtt, .ol-full-screen button.ol-full-screen-true, .ol-full-screen button.ol-full-screen-false, .ol-rotate button.ol-rotate-reset, From 775b28b07fce0af588548ac3652f6d26b0a397b4 Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Thu, 30 May 2024 01:23:14 +0900 Subject: [PATCH 040/106] Pass and merge options Signed-off-by: Daniel Kastl --- .../gtt-client/geocoding/CustomButtonMixin.ts | 2 +- .../gtt-client/geocoding/SearchFactory.ts | 25 ++++++++++--------- .../gtt-client/geocoding/SearchGTT.ts | 8 +----- src/components/gtt-client/init/controls.ts | 16 ++++++------ 4 files changed, 23 insertions(+), 28 deletions(-) diff --git a/src/components/gtt-client/geocoding/CustomButtonMixin.ts b/src/components/gtt-client/geocoding/CustomButtonMixin.ts index 75dc2448..16c9f737 100644 --- a/src/components/gtt-client/geocoding/CustomButtonMixin.ts +++ b/src/components/gtt-client/geocoding/CustomButtonMixin.ts @@ -12,7 +12,7 @@ export function applyCustomButton(searchControl: any, options: any) { searchControl.button = ol_ext_element.create('BUTTON', { className: 'ol-search-gtt', title: options.title || 'Search', - html: options.html || '', + html: options.html || '?', parent: searchControl.element, click: function () { searchControl.element.classList.toggle('ol-collapsed'); diff --git a/src/components/gtt-client/geocoding/SearchFactory.ts b/src/components/gtt-client/geocoding/SearchFactory.ts index d53df8f3..336b1071 100644 --- a/src/components/gtt-client/geocoding/SearchFactory.ts +++ b/src/components/gtt-client/geocoding/SearchFactory.ts @@ -7,31 +7,32 @@ import SearchPhoton from 'ol-ext/control/SearchPhoton'; export function createSearchControl(options: any): any { let searchControl: any; - console.log(options); - + // Create search control instance based on the provider switch (options.provider) { case 'nominatim': - console.log('Creating Nominatim search control'); - searchControl = new SearchNominatim(options); + searchControl = new SearchNominatim({ + ...options.providerOptions, + }); break; case 'photon': - console.log('Creating Photon search control'); - searchControl = new SearchPhoton(options); + searchControl = new SearchPhoton({ + ...options.providerOptions, + }); break; case 'custom': - console.log('Creating custom search control'); - searchControl = new SearchGTT(options); + searchControl = new SearchGTT({ + ...options.providerOptions, + }); break; // Add cases for other providers as needed default: - console.log('Creating default search control'); - // Todo: Decide default search control - searchControl = new SearchPhoton(options); + searchControl = new SearchPhoton({ + ...options.providerOptions, + }); break; } // Apply custom button implementation - console.log('Creating custom button'); applyCustomButton(searchControl, options); return searchControl; diff --git a/src/components/gtt-client/geocoding/SearchGTT.ts b/src/components/gtt-client/geocoding/SearchGTT.ts index 9eea26a6..026c3757 100644 --- a/src/components/gtt-client/geocoding/SearchGTT.ts +++ b/src/components/gtt-client/geocoding/SearchGTT.ts @@ -2,9 +2,7 @@ import Search, { Options as SearchOptions } from 'ol-ext/control/Search'; interface SearchGTTOptions extends SearchOptions { - html?: string; - provider?: string; - providerOptions?: object; + // Add custom options here } class SearchGTT extends Search { @@ -13,10 +11,6 @@ class SearchGTT extends Search { constructor(options: SearchGTTOptions = {}) { options = options || {}; options.className = options.className || 'ol-search-gtt'; - options.html = options.html || '?'; - - options.provider = options.provider || ''; - options.providerOptions = options.providerOptions || {}; super(options); } diff --git a/src/components/gtt-client/init/controls.ts b/src/components/gtt-client/init/controls.ts index 8d3bc146..66714dab 100644 --- a/src/components/gtt-client/init/controls.ts +++ b/src/components/gtt-client/init/controls.ts @@ -32,16 +32,16 @@ function setSearchControl(instance: any): void { const geocoder = JSON.parse(instance.defaults.geocoder); if (JSON.parse(geocoder.enabled)) { - const options = { + const searchControl = createSearchControl({ + html: '', title: instance.i18n.control.search_location, - reverseTitle: instance.i18n.control.reverse_location, - placeholder: instance.i18n.control.search_placeholder, provider: geocoder.provider, - providerOptions: geocoder.options, - html: '', - }; - - const searchControl = createSearchControl(options); + providerOptions: { + reverseTitle: instance.i18n.control.reverse_location, + placeholder: instance.i18n.control.search_placeholder, + ...geocoder.options + }, + }); instance.map.addControl(searchControl); } } From e5c2ceab75231a60bda6feaa6f3831c17b97b8ac Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Thu, 30 May 2024 02:24:22 +0900 Subject: [PATCH 041/106] Select event listener zooms to result item Signed-off-by: Daniel Kastl --- app/views/settings/gtt/_geocoder.html.erb | 10 +++------- src/components/gtt-client/init/controls.ts | 9 +++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/views/settings/gtt/_geocoder.html.erb b/app/views/settings/gtt/_geocoder.html.erb index b4bfcfa9..d18508a8 100644 --- a/app/views/settings/gtt/_geocoder.html.erb +++ b/app/views/settings/gtt/_geocoder.html.erb @@ -34,21 +34,17 @@