Skip to content

Commit

Permalink
DN-34: Update to map.apps 4.18.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Bröker committed Jun 13, 2024
1 parent e6b3a8b commit 93e8503
Show file tree
Hide file tree
Showing 22 changed files with 94 additions and 50 deletions.
4 changes: 1 addition & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"plugins": [
"vue"
],
"ignorePatterns": [
"src/main/js/bundles/interactjs"
]
"ignorePatterns": ["/src/main/js/bundles/interactjs/**"]
}
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ https://demos.conterra.de/mapapps/resources/apps/downloads_popups-draggable/inde

[dn_popups-draggable Documentation](https://github.com/conterra/mapapps-popups-draggable/tree/master/src/main/js/bundles/dn_popups-draggable)

## Development Guide
### Define the mapapps remote base
Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file:
`<mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>`

### Other methods to to define the mapapps.remote.base property.
1. Goal parameters
`mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%`

2. Build properties
Change the mapapps.remote.base in the build.properties file and run:
`mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties`
## Quick start

Clone this project and ensure that you have all required dependencies installed correctly (see [Documentation](https://docs.conterra.de/en/mapapps/latest/developersguide/getting-started/set-up-development-environment.html)).

Then run the following commands from the project root directory to start a local development server:

```bash
# install all required node modules
$ mvn initialize

# start dev server
$ mvn compile -Denv=dev -Pinclude-mapapps-deps

# run unit tests
$ mvn test -P run-js-tests,include-mapapps-deps
```
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
✅ Tested for map.apps 4.14.1 / Linie 4
✅ Tested for map.apps 4.18.1 / Linie 4

#### Release Notes
- SNAPSHOT-Release
- autogenerated SNAPSHOT-Release
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2024 con terra GmbH ([email protected])
# Copyright (C) 2023 con terra GmbH ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
"watch-types": "tsc -w --noEmit"
},
"devDependencies": {
"@conterra/ct-mapapps-typings": "~4.17.0",
"@conterra/ct-mapapps-typings": "~4.18.1",
"@conterra/mapapps-mocha-runner": "1.1.1",
"@types/arcgis-js-api": "4.28.0",
"@conterra/reactivity-core": "^0.4.0",
"@types/chai": "4.3.10",
"@types/license-checker": "^25.0.6",
"@types/mocha": "10.0.4",
"arcgis-js-api": "4.29.10",
"chai": "4.3.10",
"ct-mapapps-browser-sync": "0.0.35",
"ct-mapapps-gulp-js": "0.10.2",
"ct-mapapps-browser-sync": "0.0.39",
"ct-mapapps-gulp-js": "0.10.3",
"eslint-config-ct-prodeng": "1.4.0",
"license-checker": "25.0.1",
"mocha": "10.2.0",
Expand All @@ -28,7 +29,7 @@
"stylelint-config-recommended-less": "2.0.0",
"ts-node": "^10.9.1",
"tsx": "^4.6.0",
"typescript": "5.2.2",
"typescript": "5.4.5",
"vue": "2.7.15",
"vue-template-compiler": "2.7.15"
}
Expand Down
53 changes: 47 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2024 con terra GmbH ([email protected])
Copyright (C) 2023 con terra GmbH ([email protected])
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -91,6 +91,10 @@
<artifactId>ct-jsregistry-maven-plugin</artifactId>
<version>${ct.jsregistry.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -191,6 +195,29 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>[3.8.0,)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>[17,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.conterra.maven</groupId>
<artifactId>setproperties-maven-plugin</artifactId>
Expand Down Expand Up @@ -314,7 +341,7 @@
<properties>
<owner>con terra GmbH</owner>
<email>[email protected]</email>
<project.inceptionYear>2024</project.inceptionYear>
<project.inceptionYear>2023</project.inceptionYear>
</properties>
<includes>
<include>src/main/js/**/*.js</include>
Expand Down Expand Up @@ -402,6 +429,7 @@
<configuration>
<!-- only build zip files -->
<skipDeploy>true</skipDeploy>
<createApp>false</createApp>
<sourceDirectory>${js.build.outputPath}/apps</sourceDirectory>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
Expand Down Expand Up @@ -485,12 +513,12 @@
<root.build.outputPath>${project.build.directory}/webapp</root.build.outputPath>
<js.build.outputPath>${root.build.outputPath}/js</js.build.outputPath>

<mapapps.version>4.17.0</mapapps.version>
<vuetify.version>1.5.28</vuetify.version>
<mapapps.version>4.18.1</mapapps.version>
<vuetify.version>1.5.30</vuetify.version>
<!-- JS lib versions -->
<apprt.version>${mapapps.version}</apprt.version>
<!-- java lib versions -->
<ct.jsregistry.version>2.0.1</ct.jsregistry.version>
<ct.jsregistry.version>2.1.1</ct.jsregistry.version>
<ct.jsrt-test.version>2.0.2</ct.jsrt-test.version>

<!-- the default app, replaced in the *.html files to switch app names-->
Expand Down Expand Up @@ -520,7 +548,7 @@
required -->
<mapapps.useChunkedRequestEncoding>true</mapapps.useChunkedRequestEncoding>
<!-- enable this if "upload" profile should only deploy bundles -->
<skip.apps.upload>true</skip.apps.upload>
<skip.apps.upload>false</skip.apps.upload>
<!-- enable this if "upload" profile should pre-optimize apps -->
<triggerPreOptimization>false</triggerPreOptimization>
</properties>
Expand Down Expand Up @@ -568,6 +596,11 @@
<artifactId>apprt-polyfill</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.conterra.js</groupId>
<artifactId>reactivity</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
Expand Down Expand Up @@ -660,6 +693,12 @@
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<updateReleaseInfo>true</updateReleaseInfo>
</configuration>
</plugin>
<plugin>
<groupId>de.conterra.jsregistry</groupId>
<artifactId>ct-jsregistry-maven-plugin</artifactId>
Expand Down Expand Up @@ -702,6 +741,8 @@
<configuration>
<skipDeploy>${skip.apps.upload}</skipDeploy>
<deployAsApp>true</deployAsApp>
<appName>${project.artifactId}</appName>
<appTitle>${project.artifactId}-${project.version}</appTitle>
<appEditorState>PUBLISHED</appEditorState>
<serverResourcesEndpoint>${mapapps.remote.base}/resources</serverResourcesEndpoint>
<username>${mapapps.user}</username>
Expand Down
2 changes: 1 addition & 1 deletion src/main/config/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (C) 2024 con terra GmbH ([email protected])
Copyright (C) 2023 con terra GmbH ([email protected])
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions src/main/js/bundles/dn_popups-draggable/PopupsDraggable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///
/// Copyright (C) 2024 con terra GmbH ([email protected])
/// Copyright (C) 2023 con terra GmbH ([email protected])
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ export default class PopupsDraggable {

private popupTargetSelectionString = ".esri-component.esri-popup";

async activate() {
async activate(): Promise<void> {
const view = await this.getView();

view.popup.watch("features", (features) => {
view.popup.watch("features", (features: any) => {
if (features.length === 0) {
// popup closed - reset the transform css so that it doesn't move next time the popup opens
async(() => {
Expand All @@ -41,7 +41,7 @@ export default class PopupsDraggable {
});
}

setupInteractJs() {
setupInteractJs(): void {
// popup opened - first delete the old listener if applicable:
// https://github.com/taye/interact.js/blob/main/docs/faq.md#remove--destroy--release

Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_popups-draggable/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///
/// Copyright (C) 2024 con terra GmbH ([email protected])
/// Copyright (C) 2023 con terra GmbH ([email protected])
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_popups-draggable/nls/bundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_popups-draggable/nls/de/bundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/main/js/bundles/dn_popups-draggable/tests/all.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///
/// Copyright (C) 2024 con terra GmbH ([email protected])
/// Copyright (C) 2023 con terra GmbH ([email protected])
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/main/js/bundles/interactjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2024 con terra GmbH ([email protected])
# Copyright (C) 2023 con terra GmbH ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions src/test/webapp/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (C) 2024 con terra GmbH ([email protected])
Copyright (C) 2023 con terra GmbH ([email protected])
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -59,7 +59,7 @@
proxyUrl: url
});
});
var trustedServers = "@@cors.request.trustedServers@@".split("\s*,\s*")
var trustedServers = "@@cors.request.trustedServers@@".split(/\s*,\s*/)
.filter(function(item){ return item && item.match(/^[^@.].*$/)});
$apprt.changeConfig({
isDebug: true,
Expand Down
2 changes: 1 addition & 1 deletion src/test/webapp/init.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/test/webapp/js/tests/init-packs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/test/webapp/js/tests/runTests.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Copyright (C) 2024 con terra GmbH ([email protected])
Copyright (C) 2023 con terra GmbH ([email protected])
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/test/webapp/js/tests/test-init.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/test/webapp/login.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2024 con terra GmbH ([email protected])
* Copyright (C) 2023 con terra GmbH ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"baseUrl": ".",
"paths": {
"*": ["./src/main/js/bundles/*", "./node_modules/@conterra/ct-mapapps-typings/*"]
Expand Down

0 comments on commit 93e8503

Please sign in to comment.