diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..db3dfb0
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+# http://editorconfig.org
+# top-most EditorConfig file
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/.gitignore b/.gitignore
index e0cc28e..cc762e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,16 @@
-target/*
-.idea/*
-*.iml
-nbactions.xml
+/.idea
+/.vs
+**/nbactions.xml
+**/*.iml
+**/*.lnk
+**/target
+/build.properties
+/node_modules
+/node
+/nb-configuration.xml
+/.classpath
+/.project
+/.settings/
+/.vscode/settings.json
+/.externalToolBuilders/
+/package-lock.json
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..3c28f08
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,127 @@
+#!/usr/bin/env groovy
+def releaseParams = [:];
+def buildParams = [:];
+
+def testStageWasExecute = false;
+
+def updateVersions(targetversion,pushChanges=false){
+ echo "update versions in manifest.json files to ${targetversion}"
+ sh "mvn validate -P write-release-versions -Dreplace.target.version=${targetversion}"
+ echo "update versions in pom.xml files to ${targetversion}"
+ sh "mvn versions:set -DnewVersion=${targetversion} -DgenerateBackupPoms=false"
+ sh "mvn scm:checkin -DpushChanges=${pushChanges} -Dmessage=\"[update-version] to ${targetversion}\""
+}
+
+pipeline {
+ agent {
+ label 'maven-java-8'
+ }
+ environment {
+ GIT_NEXUS_ID = 'bitbucket-nexus-access'
+ GITHUB_CREDENTIAL_ID = 'github-api-key'
+ AKS_CRED_ID = 'aksCTPrdSrv'
+ }
+ options {
+ buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '0', daysToKeepStr: '', numToKeepStr: '10'))
+ disableConcurrentBuilds()
+ timeout(time: 60, unit: 'MINUTES')
+ }
+ parameters {
+ string(name: 'cause', defaultValue: 'manual', description: 'Who triggered this build?')
+ booleanParam(name: 'release', defaultValue: false, description: 'Should a release be performed?')
+ booleanParam(name: 'test', defaultValue: true, description: 'Should tests be performed?')
+ booleanParam(name: 'build', defaultValue: true, description: 'Should a full build/compress be performed?')
+ }
+ stages {
+ stage('Initialize'){
+ steps {
+ echo "Pipeline triggered because ${params.cause}"
+
+ echo "Cleanup workspace"
+ sh 'mvn clean -P release,compress,rollout'
+
+ script{
+ buildParams << params;
+ if (!buildParams.release){
+ return;
+ }
+ def project = readMavenPom();
+ def curversion = project.version.replace('-SNAPSHOT', '')
+ timeout(5) {
+ releaseParams = input message: "Choose Versions:", parameters: [
+ string(defaultValue: "${curversion}", description: 'The current release version', name: 'RELEASE_VERSION'),
+ string(defaultValue: "${curversion}", description: 'The next target version', name: 'NEXT_DEV_VERSION_RAW')]
+ }
+ if (releaseParams['RELEASE_VERSION'] == releaseParams['NEXT_DEV_VERSION_RAW']){
+ error "Release and new target version must be different!"
+ }
+ def rawDevVersion = releaseParams['NEXT_DEV_VERSION_RAW']
+ rawDevVersion = rawDevVersion.replace('-SNAPSHOT', '');
+ // Ensure that raw dev version has no snapshot post fix
+ releaseParams['NEXT_DEV_VERSION_RAW'] = rawDevVersion;
+ // ensure that next dev version has a snapshot post fix
+ releaseParams['NEXT_DEV_VERSION'] = rawDevVersion + "-SNAPSHOT";
+ // update display name
+ currentBuild.displayName = "${currentBuild.displayName} RELEASE ${releaseParams['RELEASE_VERSION']}"
+
+ echo "Update module versions ${releaseParams}"
+ withCredentials([usernamePassword(credentialsId: GITHUB_CREDENTIAL_ID, passwordVariable: 'GITHUB_USER_PW', usernameVariable: 'GITHUB_USER_NAME')]){
+ updateVersions(releaseParams['RELEASE_VERSION'],false);
+ }
+ }
+ }
+ }
+ stage('Test'){
+ when { expression { return buildParams.test && !buildParams.release} }
+ steps {
+ echo "run java tests"
+ // need to run install to have submodules ready for webapp jetty start
+ sh "mvn install"
+ echo "run js tests"
+ sh "mvn prepare-package -P run-js-tests,include-mapapps-deps"
+
+ script {
+ testStageWasExecute = true;
+ }
+ }
+ }
+ stage('Build') {
+ when { expression { return buildParams.build || buildParams.release } }
+ steps {
+ echo "full build + js compress + nexus deploy"
+ withCredentials([usernamePassword(credentialsId: GIT_NEXUS_ID, passwordVariable: 'USER_PW', usernameVariable: 'USER_NAME')]) {
+ sh 'mvn deploy -P compress -DdeployAtEnd=true -Dmaven.test.skip.exec=true -Dct-nexus.username=$USER_NAME -Dct-nexus.password=$USER_PW'
+ }
+ }
+ }
+ stage('Rollout') {
+ when { expression { return buildParams.release } }
+ steps {
+ echo "create rollout"
+ withCredentials([usernamePassword(credentialsId: GIT_NEXUS_ID, passwordVariable: 'USER_PW', usernameVariable: 'USER_NAME'),
+ usernamePassword(credentialsId: GITHUB_CREDENTIAL_ID, passwordVariable: 'GITHUB_USER_PW', usernameVariable: 'GITHUB_USER_NAME')]){
+ sh "mvn deploy -P github-release -Dct-nexus.username=${USER_NAME} -Dct-nexus.password=${USER_PW} -Dusername=${GITHUB_USER_NAME} -Dpassword=${GITHUB_USER_PW}"
+ }
+ }
+ }
+ stage('Finalize') {
+ steps {
+ script {
+ if (!buildParams.release){
+ return;
+ }
+ echo "Update versions after release"
+ withCredentials([usernamePassword(credentialsId: GITHUB_CREDENTIAL_ID, passwordVariable: 'GITHUB_USER_PW', usernameVariable: 'GITHUB_USER_NAME')]){
+ updateVersions(releaseParams['NEXT_DEV_VERSION'],true);
+ }
+ }
+ }
+ post {
+ success{
+ echo "Cleanup workspace after build"
+ sh 'mvn clean -P release,compress,rollout'
+ }
+ }
+ }
+ }
+}
diff --git a/LICENSE b/LICENSE
index 8dada3e..261eeb9 100644
--- a/LICENSE
+++ b/LICENSE
@@ -178,7 +178,7 @@
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
+ boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright {yyyy} {name of copyright owner}
+ Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/README.md b/README.md
index 9a81943..7433f37 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
# mapapps-intro
+
This bundle allows you to create your own step-by-step guide in map.apps based on the hopscotch framework.
https://github.com/linkedin/hopscotch
@@ -6,136 +7,27 @@ https://github.com/linkedin/hopscotch
![Screenshot App](https://github.com/conterra/mapapps-intro/blob/master/screenshot.JPG)
-Sample App
-------------------
-https://demos.conterra.de/mapapps/resources/apps/downloads_intro/index.html
-https://demos.conterra.de/mapapps/resources/apps/downloads_intro_4x/index.html
+## Sample App
-Installation Guide
-------------------
+https://demos.conterra.de/mapapps/resources/apps/downloads_intro_4x/index.html
-1. First, you need to add the bundle "dn_intro" to your app.
-2. After that, change the intro properties in the app.json:
+## Installation Guide
-```
-"dn_intro": {
- "UserIntro": {
- // Enable / Disable intro-start on startup
- "startIntroOnStartup": true,
- // Default bubble width. Default: 280.
- "bubbleWidth": 280,
- // Default bubble padding. Default: 15.
- "bubblePadding": 15,
- // Should the page scroll smoothly to the next step? Default: true.
- "smoothScroll": true,
- // Duration of page scroll in milliseconds. Only relevant when smoothScroll is set to true. Default: 1000.
- "scrollDuration": 1000,
- // When the page scrolls, how much space should there be between the bubble/targetElement and the top of the viewport? Default: 200.
- "scrollTopMargin": 200,
- // Should the tour bubble show a close (X) button? Default: true.
- "showCloseButton": true,
- // Should the bubble have the Previous button? Default: true.
- "showPrevButton": true,
- // Should the bubble have the Next button? Default: true.
- "showNextButton": true,
- // Default arrow width. (space between the bubble and the targetEl) Used for bubble position calculation. This option is provided for the case where the developer wants to use custom CSS to adjust the size of the arrow. Default: 20.
- "arrowWidth": 20,
- // If a specified target element is not found, should we skip to the next step? Default: true.
- "skipIfNoElement": true,
- // Should we advance to the next step when the user clicks on the target? Default: false.
- "nextOnTargetClick": false,
- // For i18n purposes. Allows you to change the text of button labels and step numbers.
- "i18n": {
- // Label for next button
- "nextBtn": "${intro.next}",
- // Label for prev button
- "prevBtn": "${intro.back}",
- // Label for done button
- "doneBtn": "${intro.skip}",
- // Label for skip button
- "skipBtn": "${intro.done}",
- // Text for close button tooltip
- "closeTooltip": "${intro.closeTooltip}",
- // Provide a list of strings to be shown as the step number, based on index of array. Unicode characters are supported. (e.g., ['一', '二', '三']) If there are more steps than provided numbers, Arabic numerals ('4', '5', '6', etc.) will be used as default.
- "stepNums": []
- },
- // Step configuration
- "steps": [
- {
- // id of the target DOM element or DOM element itself. It is also possible to define an array of several targets. If an array is provided, Hopscotch will use the first target that exists on the page and disregard the rest.
- "target": ".mainMap",
- // specifies where the bubble should appear in relation to the target. Valid values are "top", "bottom", "right", "left".
- "placement": "top",
- // step title
- "title": "${intro.familiarise.title}",
- // step content
- "content": "${intro.familiarise.content}",
- // bubble width
- "width": 280,
- // bubble padding
- "padding": 15,
- // horizontal position adjustment for bubble. Value can be number of pixels or "center". Default: 0.
- "xOffset": "center",
- // vertical position adjustment for bubble. Value can be number of pixels or "center". Default: 0.
- "yOffset": "center",
- // offset for the bubble arrow. Value can be number of pixels or "center". Default: 0.
- "arrowOffset": "center",
- // number in milliseconds to wait before showing step. Default: 0.
- "delay": 0,
- // sets the z-index of the bubble
- "zindex": 0,
- // should show the next button. Default: true.
- "showNextButton": true,
- // should show the prev button. Default: true.
- "showPrevButton": true,
- // should show the call-to-action button. Default: false.
- "showCTAButton": false,
- // label for the call-to-action button.
- "ctaLabel": "",
- // indicates that the next step is on a different page. Default: false.
- "multipage": false,
- // if true, 'Next' button reads 'Skip'. Default: false.
- "showSkip": false,
- // set to true if the target element has fixed positioning. Default: false.
- "fixedElement": false,
- // triggers nextStep() when the target is clicked. Default: false.
- "nextOnTargetClick": false
- },
- {
- "target": ".mapview_tools",
- "placement": "left",
- "title": "${intro.mapview.title}",
- "content": "${intro.mapview.content}"
- },
- {
- "target": ".basemapToggler",
- "placement": "bottom",
- "title": "${intro.basemap.title}",
- "content": "${intro.basemap.content}",
- "xOffset": -20,
- "arrowOffset": 40
- },
- ...
- ]
- }
-}
-```
+**Requirement: map.apps 4**
-There are to tools that provides different functions:
-* introTool: shows a widget that allows the user to start the intro and hide it on next startup.
-* introImmediateTool: starts the intro immediately.
+[dn_intro Documentation](https://github.com/conterra/mapapps-intro/tree/master/src/main/js/bundles/dn_intro)
+## Development Guide
-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:
`http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%`
-##### Other methods to to define the mapapps.remote.base property.
+### Other methods to to define the mapapps.remote.base property.
+
1. Goal parameters
-`mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%`
+ `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`
\ No newline at end of file
+2. Build properties Change the mapapps.remote.base in the build.properties file and run:
+ `mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties`
diff --git a/build.properties b/build.properties
index 0216c83..f9701c3 100644
--- a/build.properties
+++ b/build.properties
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2019 con terra GmbH (info@conterra.de)
+# Copyright (C) 2021 con terra GmbH (info@conterra.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..3670b46
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+const gulp = require("gulp");
+const mapapps = require('ct-mapapps-gulp-js');
+
+mapapps.registerTasks({
+ /* A detailed description of available setting is available at https://www.npmjs.com/package/ct-mapapps-gulp-js */
+ /* a list of themes inside this project */
+ themes: [/*"sample-theme"*/],
+ /* state that the custom theme will be dependant from map.apps everlasting theme that provides the base styles */
+ hasBaseThemes: true,
+ /* state that we want to support vuetify components and therefore need the the vuetify core styles*/
+ hasVuetify: true,
+ /*themeChangeTargets: {
+ "vuetify": [
+ "sample_theme"
+ ]
+ }*/
+});
+
+gulp.task("default",
+ gulp.series(
+ "copy-resources",
+ "themes-copy",
+ gulp.parallel("js-transpile", "themes-compile")
+ )
+);
+
+gulp.task("compress",
+ gulp.series(
+ "copy-resources",
+ "themes-copy",
+ gulp.parallel(
+ "js-transpile",
+ gulp.series(
+ "themes-compile",
+ "themes-compress"
+ )
+ )
+ )
+);
+
+gulp.task("run-js-tests", function (done) {
+ const initialWait = 10000;
+ setTimeout(() => {
+ const trigger = gulp.series("run-browser-tests");
+ trigger(done);
+ }, initialWait);
+});
+
+gulp.task("skip", function (done) {
+ setTimeout(() => {
+ done();
+ }, 1);
+});
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..595183e
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "test",
+ "description": "test build",
+ "version": "0.0.1",
+ "devDependencies": {
+ "@types/arcgis-js-api": "4.17.0",
+ "ct-mapapps-gulp-js": "^0.5.6",
+ "vue-template-compiler": "2.6.6",
+ "puppeteer": "^5.5.0",
+ "eslint-config-ct-prodeng": "^1.1.16",
+ "stylelint-config-ct-prodeng": "1.0.3"
+ }
+}
diff --git a/pom.xml b/pom.xml
index 0afed22..4309667 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,942 +1,983 @@
-
-
-
- 4.0.0
- de.conterra.devnet
- mapapps-intro
- 1.0.3-SNAPSHOT
- jar
-
-
-
- 52n-dependencies
- 52n-dependencies
- http://52north.org/maven/repo/releases
-
-
-
-
- 52n-dependencies
- 52n-dependencies
- http://52north.org/maven/repo/releases
-
-
-
-
-
-
- de.conterra.mapapps
- ct-mapapps
- ${mapapps4.version}
- pom
- import
-
-
-
-
-
-
- log4j
- log4j
- test
-
-
- org.slf4j
- slf4j-log4j12
- test
-
-
-
- de.conterra.mapapps
- ct-mapapps-proxy
- test
-
-
-
- de.conterra.jsregistry
- ct-jsregistry-embedded
- test
-
-
-
- de.conterra.jsrt
- ct-jsrt-test-intern
- test
-
-
-
-
-
-
- de.conterra.mapapps
- mapapps-maven-plugin
- ${mapapps4.version}
-
-
- de.conterra.jsregistry
- ct-jsregistry-maven-plugin
- ${ct.jsregistry.version}
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.7
-
- \
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.4
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.3
-
-
- 1.7
- true
-
- **/*
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.2
-
- true
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
- ${js.build.outputPath}
-
- **/*
-
-
- apps/**
- **/tests/**
-
-
-
-
- maven-war-plugin
- 2.6
-
-
- org.eclipse.jetty
- jetty-maven-plugin
- 9.2.10.v20150310
-
-
- org.codehaus.mojo
- properties-maven-plugin
- 1.0-alpha-2
-
-
- com.google.code.maven-replacer-plugin
- replacer
- 1.5.3
-
-
- org.lesscss
- lesscss-maven-plugin
- 1.7.0.1.1
-
-
- org.lesscss
- lesscss
- 2.7.1-v8
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- 1.10
-
-
- maven-release-plugin
- 2.5.3
-
-
- de.jutzig
- github-release-plugin
- 1.1.1
-
-
- maven-assembly-plugin
- 3.0.0
-
-
- com.mycila
- license-maven-plugin
- 2.11
-
-
- de.conterra.maven
- setproperties-maven-plugin
- 1.0.2
-
-
- de.conterra.jsrt
- ct-jsrt-test-maven-plugin
- ${ct.jsrt-test.version}
-
-
- maven-scm-plugin
- 1.9.5
-
-
-
-
- src/main/js
-
-
- src/main/js
- ${js.build.outputPath}
- false
-
-
-
-
- src/test/resources
-
- application.properties
-
- true
-
-
- src/test/resources
-
- application.properties
-
- false
-
-
- src/test/webapp
-
- **/*
-
- false
-
-
-
-
- com.mycila
- license-maven-plugin
-
- ${project.baseUri}apache2-license-header.txt
-
- con terra GmbH
- info@conterra.de
- 2019
-
-
- **/README*
- **/*.html
- **/*.json
- src/test/**
-
-
-
-
-
- format
-
- process-sources
-
-
-
-
- de.conterra.maven
- setproperties-maven-plugin
- 1.0.2
-
-
-
- setProperties
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
-
-
-
- unpack-themes-src
- generate-sources
-
- unpack
-
-
- true
-
-
-
- de.conterra.mapapps
- ct-mapapps-js-api
- ${mapapps.version}
- src
- ${project.build.directory}/unpacked
-
- bundles/base/themes/themes/winter/**,bundles/base/themes/themes/common/**,bundles/base/templates/templates/common/**
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
-
-
- UTF-8
-
-
-
- de.conterra.jsregistry
- ct-jsregistry-maven-plugin
-
-
- build-jsregistry.properties
- process-resources
-
- buildPacksProperties
-
-
-
-
- ${js.build.outputPath}
- ${js.build.outputPath}
-
-
-
- org.lesscss
- lesscss-maven-plugin
-
-
- process-resources
-
- compile
-
-
-
-
- ${js.build.outputPath}
- ${js.build.outputPath}
-
- bundles/**/*.less
-
-
-
-
- com.google.code.maven-replacer-plugin
- replacer
-
-
- replace some config settings in app.json
- prepare-package
-
- replace
-
-
- ${js.build.outputPath}
-
- **/app.json
-
- true
-
-
-
- \s*"bundleLocations"\s*:\s*\[\s*"localbundles"\s*,\s*"bundles"\s*\]\s*,\s*
-
-
-
-
-
-
-
-
-
- de.conterra.mapapps
- mapapps-maven-plugin
-
-
- build-app-template
- prepare-package
-
- deployAppTemplate
-
-
- ${project.build.directory}/${project.artifactId}-sample-app.zip
-
-
- ${js.build.outputPath}/apps/sample
-
- **/*
-
-
-
-
-
-
-
- true
- false
-
-
-
- maven-assembly-plugin
-
-
- src/main/config/assembly.xml
-
- ${project.artifactId}-bundle
- false
-
-
-
- make-zip
- package
-
- single
-
-
-
-
-
- org.eclipse.jetty
- jetty-maven-plugin
-
-
- 9090
-
- 9966
- jetty-stop
- 60000
- 0
- manual
- ${basedir}/src/test/webapp/WEB-INF/web.xml
- true
-
- /
-
-
- ${basedir}/src/main,${basedir}/src/test/webapp,${project.build.directory}/${project.artifactId}
-
-
-
- .*/ct-jsregistry-embedded-[^/]*\.jar$
-
-
-
-
- catalina.base
- ${project.build.directory}
-
-
-
-
-
- maven-release-plugin
-
- @{project.version}
- clean
- compress,github-release
- true
-
- -Dusername=${scm.username} -Dpassword=${scm.password}
- ${scm.username}
- ${scm.password}
-
-
-
-
-
- scm:git:https://github.com/conterra/mapapps-intro.git
- scm:git:https://github.com/conterra/mapapps-intro.git
-
- https://github.com/conterra/mapapps-intro
- HEAD
-
-
-
- ct-dist-releases-file
- repository for sdi.suite releases
- ${release.deployment.url}
-
-
- ct-dist-snapshots-file
- repository for sdi.suite snapshots
- ${snapshot.deployment.url}
-
-
-
- UTF-8
-
- ${project.build.directory}/${project.artifactId}/js
- JDK_1.7
-
-
- 3.10.5
- 4.7.1
-
-
-
- ${mapapps4.version}
-
-
- 1.3.0
- 1.1.5
-
-
- sample
-
- $\{mapapps.remote.base\}/resources/jsregistry/root/apprt-boot/${mapapps4.version}/boot.js
-
-
-
- http,*;
- *
-
-
- false
- ${env.USER_NAME}
- ${env.USER_PW}
-
-
-
- run-js-tests
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
-
-
- reserve-jetty-port
-
- reserve-network-port
-
- process-test-classes
-
-
- jetty.server.port
-
-
-
-
-
-
- org.eclipse.jetty
- jetty-maven-plugin
-
-
- jetty-start
- process-test-classes
-
- start
-
-
-
- ${jetty.server.port}
-
- 0
- true
-
-
-
- jetty-stop
- prepare-package
-
- stop
-
-
-
-
-
- de.conterra.jsrt
- ct-jsrt-test-maven-plugin
-
-
- test
-
- runTests
-
-
-
-
- 2000
- 60000
-
-
- http://localhost:${jetty.server.port}/resources/jsregistry/root/intern/latest/runner.html?boot=/js/tests/test-init.js&test=sample_helloworld/tests/all
-
-
-
-
-
-
-
-
- env-dev
-
-
-
- env
- dev
-
-
-
- ${basedir}/build.properties
-
-
-
-
- org.codehaus.mojo
- properties-maven-plugin
-
-
- initialize
-
- read-project-properties
-
-
-
- ${local.configfile}
-
-
-
-
-
-
-
-
-
- github-release
-
-
-
- de.jutzig
- github-release-plugin
-
-
- github-upload
- deploy
-
- release
-
-
- ${project.version}
- ${project.build.directory}/${project.artifactId}-${project.version}.jar
-
-
-
- ${project.build.directory}
-
- ${project.artifactId}-bundle.zip
- ${project.artifactId}-sample-app.zip
-
- ${project.artifactId}*.zip
-
-
-
-
-
-
-
-
-
-
-
- write-release-versions
-
- ${project.version}
- ${project.version}
-
-
-
-
-
- com.google.code.maven-replacer-plugin
- replacer
-
-
-
- Set Versions from ${replace.source.version} to ${replace.target.version}
- validate
-
- replace
-
-
- ${basedir}
-
- src/main/js/**/manifest.json
- src/main/js/**/package.json
-
-
- src/main/js/**/tests/**
-
- false
-
-
- "${replace.source.version}"
- "${replace.target.version}"
-
-
- "~${replace.source.version}"
- "~${replace.target.version}"
-
-
-
-
-
-
-
-
-
-
- commit-release-versions
-
-
-
- maven-scm-plugin
-
-
- validate
-
- checkin
-
-
- [update-bundle-package-versions] from ${replace.source.version} to
- ${replace.target.version}
-
- ${basedir}/src/main/js
- ${scm.push}
- ${scm.username}
- ${scm.password}
-
-
-
-
-
-
-
-
-
-
- compress
-
-
-
- de.conterra.jsregistry
- ct-jsregistry-maven-plugin
-
-
- calculate js dependencies
-
- calculateDependencies
-
-
-
- optimize js
-
- optimizeJS
-
-
-
- false
-
-
-
- apps/**
- **/tests/**
-
-
-
-
-
- optimize CSS
-
- optimizeCSS
-
- compile
-
-
-
- bundles/*/*/*.css
-
-
- **/themeSettings.css
-
-
-
-
-
-
-
-
-
-
- upload
-
-
-
- de.conterra.mapapps
- mapapps-maven-plugin
-
-
- false
- true
- ${project.artifactId}
- ${project.artifactId}-${project.version}
- PUBLISHED
- ${mapapps.remote.base}/resources
- admin
- admin
-
-
-
- de.conterra.jsregistry
- ct-jsregistry-maven-plugin
-
-
- deploy bundles
-
- deployJSPackage
-
-
- ${mapapps.remote.base}/resources/jsregistry
- admin
- admin
-
-
-
-
-
-
-
-
- less-v8-x32
-
-
- sun.arch.data.model
- 32
-
-
-
-
-
-
- org.lesscss
- lesscss-maven-plugin
-
-
- lu.flier.script
- jav8-win32
- 0.4
-
-
-
-
-
-
-
-
- less-v8-x64
-
-
- sun.arch.data.model
- 64
-
-
-
-
-
-
- org.lesscss
- lesscss-maven-plugin
-
-
- lu.flier.script
- jav8-win64
- 0.6
-
-
-
-
-
-
-
-
- less-v8-x64-mac
-
-
- mac
-
-
-
-
-
-
- org.lesscss
- lesscss-maven-plugin
-
-
- lu.flier.script
- jav8-macosx86_64
- 0.6
-
-
-
-
-
-
-
-
-
+
+
+
+ 4.0.0
+ de.conterra.devnet
+ mapapps-selection-actions
+ 1.10.1-SNAPSHOT
+ jar
+
+
+ 52n-dependencies
+ 52n-dependencies
+ http://52north.org/maven/repo/releases
+
+
+
+
+ 52n-dependencies
+ 52n-dependencies
+ http://52north.org/maven/repo/releases
+
+
+
+
+
+
+ de.conterra.mapapps
+ ct-mapapps
+ ${mapapps.version}
+ pom
+ import
+
+
+
+
+
+ de.conterra.jsregistry
+ ct-jsregistry-embedded
+ test
+
+
+ de.conterra.ct-proxy
+ ct-proxy-servlet
+ test
+
+
+
+ org.vuejs
+ vue
+ dev
+ test
+
+
+
+ org.vuetifyjs
+ vuetify
+ dev
+ test
+
+
+
+
+ de.conterra.jsrt
+ ct-jsrt-test-intern
+ ${ct.jsrt-test.version}
+ test
+
+
+ de.conterra.jsrt
+ ct-jsrt-test-uitest
+ ${ct.jsrt-test.version}
+ test
+
+
+
+
+
+
+
+ de.conterra.mapapps
+ mapapps-maven-plugin
+ ${mapapps.version}
+
+
+ de.conterra.jsregistry
+ ct-jsregistry-maven-plugin
+ ${ct.jsregistry.version}
+
+
+ maven-deploy-plugin
+ 2.8.2
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.1.0
+
+ \
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.2.0
+
+ ${js.build.outputPath}
+
+ **/*
+
+
+ apps/**
+ **/tests/**
+
+
+
+
+ maven-war-plugin
+ 3.2.3
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.6.0
+
+
+ org.eclipse.jetty
+ jetty-maven-plugin
+ 9.4.17.v20190418
+
+
+ jar
+
+
+
+
+ org.codehaus.mojo
+ properties-maven-plugin
+ 1.0.0
+
+
+ com.google.code.maven-replacer-plugin
+ replacer
+ 1.5.3
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+ 1.10.0
+
+ v14.15.1
+ 6.14.9
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 3.1.0
+
+
+ maven-release-plugin
+ 2.5.3
+
+
+ de.jutzig
+ github-release-plugin
+ 1.4.0
+
+
+ maven-assembly-plugin
+ 3.0.0
+
+
+ com.mycila
+ license-maven-plugin
+ 2.11
+
+
+ de.conterra.maven
+ setproperties-maven-plugin
+ 1.0.2
+
+
+ de.conterra.jsrt
+ ct-jsrt-test-maven-plugin
+ ${ct.jsrt-test.version}
+
+
+ maven-scm-plugin
+ 1.10.0
+
+ ${project.version}
+ ${scm.username}
+ ${scm.password}
+
+
+
+
+ src/main/js
+
+
+ src/main/js
+ ${js.build.outputPath}
+ false
+
+
+
+
+ src/test/resources
+
+ application.properties
+
+ true
+
+
+ src/test/resources
+
+ application.properties
+
+
+
+ src/test/webapp
+
+ **/*
+
+
+
+
+
+ de.conterra.maven
+ setproperties-maven-plugin
+ 1.0.2
+
+
+
+ setProperties
+
+
+
+
+
+
+
+ .
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.0
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack-themes-src
+ generate-sources
+
+ unpack
+
+
+ true
+
+
+ de.conterra.mapapps
+ ct-mapapps-js-api
+ ${mapapps.version}
+ src
+ ${project.build.directory}/unpacked
+ layout/theme-everlasting/**,layout/theme-common/**
+ layout/theme-everlasting/styles/vuetify/**
+
+
+
+ org.vuetifyjs
+ vuetify
+ ${vuetify.version}
+ dev
+ ${project.build.directory}/unpacked/layout
+ vuetify/stylus/**
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+
+ UTF-8
+
+
+
+ de.conterra.jsregistry
+ ct-jsregistry-maven-plugin
+
+
+ build-jsregistry.properties
+ process-resources
+
+ buildPacksProperties
+
+
+
+
+ ${js.build.outputPath}
+ ${js.build.outputPath}
+
+
+
+ org.eclipse.jetty
+ jetty-maven-plugin
+
+
+ ${jetty.port}
+
+ 9966
+ jetty-stop
+ 60000
+ 0
+ manual
+ ${basedir}/src/test/webapp/WEB-INF/web.xml
+ true
+
+ /
+
+ ${root.build.outputPath},${basedir}/src/test/webapp
+
+
+ .*/ct-jsregistry-embedded-[^/]*\.jar$
+
+
+
+
+ catalina.base
+ ${project.build.directory}
+
+
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+
+
+ run gulp ${gulp.task}
+
+ gulp
+
+
+ ${gulp.task}
+
+
+
+
+ watch-changes
+
+ gulp
+
+ none
+
+ watch
+
+
+
+
+
+ com.mycila
+ license-maven-plugin
+
+ ${project.baseUri}apache2-license-header.txt
+
+ con terra GmbH
+ info@conterra.de
+ 2021
+
+
+ src/main/js/**/*.js
+ src/main/js/**/*.ts
+ src/main/js/**/*.vue
+ src/main/js/**/*.css
+ src/main/config/assembly.xml
+ **/build.properties
+ **/gulpfile.js
+ **/pom.xml
+
+
+ XML_STYLE
+
+
+
+
+
+ format
+
+ process-sources
+
+
+
+
+ com.google.code.maven-replacer-plugin
+ replacer
+
+
+ replace some config settings in app.json
+ prepare-package
+
+ replace
+
+
+ ${js.build.outputPath}
+
+ **/app.json
+
+ true
+
+
+
+ \s*"bundleLocations"\s*:\s*\[\s*"localbundles"\s*,\s*"bundles"\s*\]\s*,\s*
+
+
+
+
+
+
+
+
+
+ de.conterra.mapapps
+ mapapps-maven-plugin
+
+
+ build-app-template
+ prepare-package
+
+ deployAppTemplate
+
+
+ ${project.build.directory}/${project.artifactId}-sample-app.zip
+
+
+ ${js.build.outputPath}/apps/sample
+
+ **/*
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+ maven-assembly-plugin
+
+
+ src/main/config/assembly.xml
+
+ ${project.artifactId}-bundle
+ false
+
+
+
+ make-zip
+ package
+
+ single
+
+
+
+
+
+ maven-release-plugin
+
+ @{project.version}
+ clean
+ compress,github-release
+ true
+
+ -Dusername=${scm.username} -Dpassword=${scm.password}
+ ${scm.username}
+ ${scm.password}
+
+
+
+
+
+ scm:git:https://github.com/conterra/mapapps-selection-actions.git
+ scm:git:https://github.com/conterra/mapapps-selection-actions.git
+ https://github.com/conterra/mapapps-selection-actions
+ HEAD
+
+
+
+ repository for sdi.suite releases
+ ${dist.releases.id}
+ ${dist.releases.url}
+
+
+ repository for sdi.suite snapshots
+ ${dist.snapshots.id}
+ ${dist.snapshots.url}
+
+
+
+ UTF-8
+
+ ${project.build.directory}/webapp
+ ${root.build.outputPath}/js
+
+ 4.10.0
+
+ ${mapapps.version}
+
+ 1.3.10
+ 1.1.5
+
+
+ sample
+
+
+
+ *://*:*/**;
+
+ *
+
+ 9090
+ mvn
+
+
+
+ false
+ ${env.GITHUB_USER_NAME}
+ ${env.GITHUB_USER_PW}
+
+
+
+ run-js-tests
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ reserve-jetty-port
+
+ reserve-network-port
+
+ process-test-classes
+
+
+ jetty.server.port
+
+
+
+
+
+
+ org.eclipse.jetty
+ jetty-maven-plugin
+
+
+ jetty-start
+ process-test-classes
+
+ start
+
+
+
+ ${jetty.server.port}
+
+ 0
+ true
+
+
+
+ jetty-stop
+ prepare-package
+
+ stop
+
+
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+
+
+ run gulp js tests
+ test
+
+ gulp
+
+
+ run-js-tests --tests "http://localhost:${jetty.server.port}/resources/jsregistry/root/intern/latest/runner.html?boot=/js/tests/test-init.js&test=dn_selectionactions/tests/all"
+
+
+
+
+
+
+
+
+ include-mapapps-deps
+
+
+ de.conterra.mapapps
+ ct-mapapps-js-api
+ test
+
+
+ org.dojotoolkit
+ dojo-release
+ test
+
+
+ org.dojotoolkit
+ dgrid
+ test
+
+
+ org.dojotoolkit
+ dstore
+ test
+
+
+ com.esri.js
+ ags-js-api4
+ test
+
+
+ moment-js
+ moment-js
+ test
+
+
+ de.conterra.js
+ apprt-polyfill
+ test
+
+
+
+
+ node-install
+
+
+ env
+ !dev
+
+
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+
+
+ install node and npm
+ initialize
+
+ install-node-and-npm
+
+
+
+ npm install
+ initialize
+
+ npm
+
+
+ install
+
+
+
+
+
+
+
+
+ env-dev
+
+
+
+ env
+ dev
+
+
+
+ ${basedir}/build.properties
+
+
+
+
+
+ org.codehaus.mojo
+ properties-maven-plugin
+
+
+ initialize
+
+ read-project-properties
+
+
+ true
+
+ ${local.configfile}
+
+
+
+
+
+
+
+
+
+ watch-all
+
+
+ env
+ dev
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+
+
+ trigger-watch-changes
+ test-compile
+
+ exec
+
+
+ true
+ ${maven.home}/bin/${mvn.cmd}
+
+ com.github.eirslett:frontend-maven-plugin:gulp@watch-changes
+
+
+
+
+
+
+
+
+
+
+ github-release
+
+
+
+ de.jutzig
+ github-release-plugin
+
+
+ github-upload
+ deploy
+
+ release
+
+
+ ${project.version}
+ ${project.build.directory}/${project.artifactId}-${project.version}.jar
+
+
+
+ ${project.build.directory}
+
+ ${project.artifactId}-bundle.zip
+ ${project.artifactId}-sample-app.zip
+
+ ${project.artifactId}*.zip
+
+
+
+
+
+
+
+
+
+
+
+ write-release-versions
+
+ ${project.version}
+ ${project.version}
+
+
+
+
+
+ com.google.code.maven-replacer-plugin
+ replacer
+
+
+
+ Set Versions from ${replace.source.version} to ${replace.target.version}
+ validate
+
+ replace
+
+
+ ${basedir}
+
+ src/main/js/**/manifest.json
+ src/main/js/**/package.json
+
+
+ src/main/js/**/tests/**
+
+ false
+
+
+ "${replace.source.version}"
+ "${replace.target.version}"
+
+
+ "~${replace.source.version}"
+ "~${replace.target.version}"
+
+
+
+
+
+
+
+
+
+
+ compress
+
+ compress
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+ de.conterra.jsregistry
+ ct-jsregistry-maven-plugin
+
+
+ calculate js dependencies
+
+ calculateDependencies
+
+
+
+ optimize js
+
+ optimizeJS
+
+
+
+ false
+
+
+
+ apps/**
+ **/tests/**
+
+
+
+
+
+
+
+
+
+
+ upload
+
+
+
+ de.conterra.mapapps
+ mapapps-maven-plugin
+
+
+ false
+ true
+ ${project.artifactId}
+ ${project.artifactId}-${project.version}
+ PUBLISHED
+ ${mapapps.remote.base}/resources
+ admin
+ admin
+
+
+
+ de.conterra.jsregistry
+ ct-jsregistry-maven-plugin
+
+
+ deploy bundles
+
+ deployJSPackage
+
+
+ ${mapapps.remote.base}/resources/jsregistry
+ admin
+ admin
+
+
+
+
+
+
+
+
+ windows
+
+
+ Windows
+
+
+
+ mvn.cmd
+
+
+
+ unix
+
+
+ unix
+
+
+
+ mvn
+
+
+
+
diff --git a/src/main/config/assembly.xml b/src/main/config/assembly.xml
index 2a484eb..9c6c27f 100644
--- a/src/main/config/assembly.xml
+++ b/src/main/config/assembly.xml
@@ -1,6 +1,6 @@
+
+
+
+ {{ i18n.start }}
+
+
+
+
+
diff --git a/src/main/js/bundles/dn_intro/IntroWidgetFactory.js b/src/main/js/bundles/dn_intro/IntroWidgetFactory.js
index 820b262..c49746e 100644
--- a/src/main/js/bundles/dn_intro/IntroWidgetFactory.js
+++ b/src/main/js/bundles/dn_intro/IntroWidgetFactory.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,72 +13,67 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define([
- "dojo/_base/declare",
- "dojo/_base/array",
- "dojo/_base/Deferred",
- "dojo/aspect",
- "dojo/cookie",
- "ct/_when",
- "ct/array",
- "ct/_Connect",
- "./IntroWidget"
-], function (declare,
- d_array,
- Deferred,
- d_aspect,
- d_cookie,
- ct_when,
- ct_array,
- _Connect,
- IntroWidget) {
- return declare([_Connect], {
- createInstance: function () {
- this.inherited(arguments);
- return this.widget;
- },
- activate: function () {
- this.inherited(arguments);
- var i18n = this._i18n.get();
- var userIntro = this._userIntro;
- var properties = userIntro._properties;
- var startIntroOnStartup = properties.startIntroOnStartup;
- var widget = this.widget = new IntroWidget({
- source: this,
- i18n: i18n,
- startIntroOnStartup: startIntroOnStartup
- });
- if (this.isEnabled() === "false") {
- widget._checkBox.set("value", true);
+import d_cookie from "dojo/cookie";
+import VueDijit from "apprt-vue/VueDijit";
+import Vue from "apprt-vue/Vue";
+import IntroWidget from "./IntroWidget.vue";
+
+export default class IntroWidgetFactory {
+
+ activate() {
+ this._initComponent();
+ }
+
+ createInstance() {
+ return VueDijit(this.vm);
+ }
+
+ _initComponent() {
+ const userIntro = this._userIntro;
+ const properties = userIntro._properties;
+ const startIntroOnStartup = properties.startIntroOnStartup;
+
+ const vm = this.vm = new Vue(IntroWidget);
+
+ vm.i18n = this._i18n.get().ui;
+ vm.startIntroOnStartup = startIntroOnStartup;
+
+ if (this.isEnabled() === "false") {
+ vm.checkBox = true;
+ } else {
+ vm.checkBox = false;
+ }
+
+ vm.$on("start-intro", () => {
+ this.start();
+ });
+ vm.$on('checkbox-changed', (value) => {
+ if (value) {
+ this.disableIntro();
} else {
- widget._checkBox.set("value", false);
+ this.enableIntro();
}
- this.connect(widget, "onStart", this.start);
- this.connect(widget._checkBox, "onChange", function (activated) {
- if (activated) {
- this.disableIntro();
- } else {
- this.enableIntro();
- }
- });
- widget.resize();
- },
- start: function () {
- this._userIntro.startIntro();
- this._introTool.set("active", false);
- },
- disableIntro: function () {
- var cookieKey = "ShowIntroduction";
- d_cookie(cookieKey, false, {expires: 365});
- },
- enableIntro: function () {
- var cookieKey = "ShowIntroduction";
- d_cookie(cookieKey, null, {expires: -1});
- },
- isEnabled: function () {
- var cookieKey = "ShowIntroduction";
- return d_cookie(cookieKey);
- }
- });
-});
-
\ No newline at end of file
+ });
+ }
+
+ start() {
+ this._userIntro.startIntro();
+ this._introTool.set("active", false);
+ }
+
+ disableIntro() {
+ const cookieKey = "ShowIntroduction";
+ d_cookie(cookieKey, false, {expires: 365});
+ }
+
+ enableIntro() {
+ const cookieKey = "ShowIntroduction";
+ d_cookie(cookieKey, null, {expires: -1});
+ }
+
+ isEnabled() {
+ const cookieKey = "ShowIntroduction";
+ return d_cookie(cookieKey);
+ }
+
+}
diff --git a/src/main/js/bundles/dn_intro/README.md b/src/main/js/bundles/dn_intro/README.md
new file mode 100644
index 0000000..f146c3f
--- /dev/null
+++ b/src/main/js/bundles/dn_intro/README.md
@@ -0,0 +1,119 @@
+# dn_intro
+
+This bundle allows you to create your own step-by-step guide in map.apps based on the hopscotch
+framework. https://github.com/linkedin/hopscotch
+
+## Usage
+
+**Requirement: map.apps 4**
+
+1. First, you need to add the bundle "dn_intro" to your app.
+2. After that, change the intro properties in the app.json:
+
+```json
+"dn_intro": {
+ "UserIntro": {
+ // Enable / Disable intro-start on startup
+ "startIntroOnStartup": true,
+ // Default bubble width. Default: 280.
+ "bubbleWidth": 280,
+ // Default bubble padding. Default: 15.
+ "bubblePadding": 15,
+ // Should the page scroll smoothly to the next step? Default: true.
+ "smoothScroll": true,
+ // Duration of page scroll in milliseconds. Only relevant when smoothScroll is set to true. Default: 1000.
+ "scrollDuration": 1000,
+ // When the page scrolls, how much space should there be between the bubble/targetElement and the top of the viewport? Default: 200.
+ "scrollTopMargin": 200,
+ // Should the tour bubble show a close (X) button? Default: true.
+ "showCloseButton": true,
+ // Should the bubble have the Previous button? Default: true.
+ "showPrevButton": true,
+ // Should the bubble have the Next button? Default: true.
+ "showNextButton": true,
+ // Default arrow width. (space between the bubble and the targetEl) Used for bubble position calculation. This option is provided for the case where the developer wants to use custom CSS to adjust the size of the arrow. Default: 20.
+ "arrowWidth": 20,
+ // If a specified target element is not found, should we skip to the next step? Default: true.
+ "skipIfNoElement": true,
+ // Should we advance to the next step when the user clicks on the target? Default: false.
+ "nextOnTargetClick": false,
+ // For i18n purposes. Allows you to change the text of button labels and step numbers.
+ "i18n": {
+ // Label for next button
+ "nextBtn": "${intro.next}",
+ // Label for prev button
+ "prevBtn": "${intro.back}",
+ // Label for done button
+ "doneBtn": "${intro.skip}",
+ // Label for skip button
+ "skipBtn": "${intro.done}",
+ // Text for close button tooltip
+ "closeTooltip": "${intro.closeTooltip}",
+ // Provide a list of strings to be shown as the step number, based on index of array. Unicode characters are supported. (e.g., ['一', '二', '三']) If there are more steps than provided numbers, Arabic numerals ('4', '5', '6', etc.) will be used as default.
+ "stepNums": []
+ },
+ // Step configuration
+ "steps": [
+ {
+ // id of the target DOM element or DOM element itself. It is also possible to define an array of several targets. If an array is provided, Hopscotch will use the first target that exists on the page and disregard the rest.
+ "target": ".mainMap",
+ // specifies where the bubble should appear in relation to the target. Valid values are "top", "bottom", "right", "left".
+ "placement": "top",
+ // step title
+ "title": "${intro.familiarise.title}",
+ // step content
+ "content": "${intro.familiarise.content}",
+ // bubble width
+ "width": 280,
+ // bubble padding
+ "padding": 15,
+ // horizontal position adjustment for bubble. Value can be number of pixels or "center". Default: 0.
+ "xOffset": "center",
+ // vertical position adjustment for bubble. Value can be number of pixels or "center". Default: 0.
+ "yOffset": "center",
+ // offset for the bubble arrow. Value can be number of pixels or "center". Default: 0.
+ "arrowOffset": "center",
+ // number in milliseconds to wait before showing step. Default: 0.
+ "delay": 0,
+ // sets the z-index of the bubble
+ "zindex": 0,
+ // should show the next button. Default: true.
+ "showNextButton": true,
+ // should show the prev button. Default: true.
+ "showPrevButton": true,
+ // should show the call-to-action button. Default: false.
+ "showCTAButton": false,
+ // label for the call-to-action button.
+ "ctaLabel": "",
+ // indicates that the next step is on a different page. Default: false.
+ "multipage": false,
+ // if true, 'Next' button reads 'Skip'. Default: false.
+ "showSkip": false,
+ // set to true if the target element has fixed positioning. Default: false.
+ "fixedElement": false,
+ // triggers nextStep() when the target is clicked. Default: false.
+ "nextOnTargetClick": false
+ },
+ {
+ "target": ".mapview_tools",
+ "placement": "left",
+ "title": "${intro.mapview.title}",
+ "content": "${intro.mapview.content}"
+ },
+ {
+ "target": ".basemapToggler",
+ "placement": "bottom",
+ "title": "${intro.basemap.title}",
+ "content": "${intro.basemap.content}",
+ "xOffset": -20,
+ "arrowOffset": 40
+ },
+ ...
+ ]
+ }
+}
+```
+
+There are to tools that provides different functions:
+* introTool: shows a widget that allows the user to start the intro and hide it on next startup.
+* introImmediateTool: starts the intro immediately.
diff --git a/src/main/js/bundles/dn_intro/SampleStartIntroOnStartupChecker.js b/src/main/js/bundles/dn_intro/SampleStartIntroOnStartupChecker.js
index 9e9ae51..0c64434 100644
--- a/src/main/js/bundles/dn_intro/SampleStartIntroOnStartupChecker.js
+++ b/src/main/js/bundles/dn_intro/SampleStartIntroOnStartupChecker.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define([
- "dojo/_base/declare"
-], function (declare) {
- return declare([], {
- getStartIntroOnStartupValue: function () {
- return true;
- }
- });
-});
\ No newline at end of file
+export default class SampleStartIntroOnStartupChecker {
+
+ getStartIntroOnStartupValue() {
+ return true;
+ }
+
+}
diff --git a/src/main/js/bundles/dn_intro/UserIntro.js b/src/main/js/bundles/dn_intro/UserIntro.js
index b2ae69b..cb7d921 100644
--- a/src/main/js/bundles/dn_intro/UserIntro.js
+++ b/src/main/js/bundles/dn_intro/UserIntro.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,110 +13,104 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define([
- "dojo/_base/declare",
- "dojo/_base/lang",
- "dojo/_base/array",
- "dojo/dom-construct",
- "dojo/query",
- "dojo/_base/window",
- "ct/_Connect",
- "ct/async",
- "ct/array",
- "hopscotch"
-], function (declare, d_lang, d_array, domConstruct, query, win, _Connect, ct_async, ct_array, hopscotch) {
- return declare([_Connect], {
- activate: function () {
- this.inherited(arguments);
- },
- startIntro: function () {
- var properties = this._properties;
- var tour = {
- id: properties.id || "mapapps_intro",
- bubbleWidth: properties.bubbleWidth,
- bubblePadding: properties.bubblePadding,
- smoothScroll: properties.smoothScroll,
- scrollDuration: properties.scrollDuration,
- scrollTopMargin: properties.scrollTopMargin,
- showCloseButton: properties.showCloseButton,
- showPrevButton: properties.showPrevButton,
- showNextButton: properties.showNextButton,
- arrowWidth: properties.arrowWidth,
- skipIfNoElement: properties.skipIfNoElement,
- nextOnTargetClick: properties.nextOnTargetClick,
- i18n: {
- nextBtn: properties.i18n.nextBtn,
- prevBtn: properties.i18n.prevBtn,
- doneBtn: properties.i18n.doneBtn,
- skipBtn: properties.i18n.skipBtn,
- closeTooltip: properties.i18n.closeTooltip,
- stepNums: properties.i18n.stepNums
- }
- };
- tour.steps = this._steps = properties.steps;
- var appCtx = this._appCtx;
- if (appCtx._applicationRootNode.addClassName !== undefined) {
- appCtx._applicationRootNode.addClassName("dn_intro_initializing");
- } else {
- appCtx._applicationRootNode.className = appCtx._applicationRootNode.className + " dn_intro_initializing";
- }
- d_array.forEach(properties.steps, function (step) {
- if (step.toolId) {
- var tool = this.getTool(step.toolId);
- if (tool) {
- tool.set("active", true);
- ct_async(function () {
- tool.set("active", false);
- }, this, 500);
- }
- }
- }, this);
- ct_async(function () {
- if (appCtx._applicationRootNode.removeClassName !== undefined) {
- appCtx._applicationRootNode.removeClassName("dn_intro_initializing");
- } else {
- appCtx._applicationRootNode.className = appCtx._applicationRootNode.className.replace("dn_intro_initializing", "");
- }
- }, this, 1000);
- hopscotch.startTour(tour, 0);
- hopscotch.listen("next", d_lang.hitch(this, this.onStep));
- hopscotch.listen("prev", d_lang.hitch(this, this.onStep));
+import d_lang from "dojo/_base/lang";
+import d_array from "dojo/_base/array";
+import ct_async from "ct/async";
+import ct_array from "ct/array";
+import hopscotch from "hopscotch";
+
+export default class UserIntro {
- window.addEventListener("keydown", d_lang.hitch(hopscotch, this.onKeyDown), false);
- },
- onKeyDown: function (event) {
- var key = event.which || event.keyCode;
- switch (key) {
- case 32:
- // space key pressed
- this.nextStep();
- break;
- case 37:
- // left key pressed
- break;
- case 39:
- // right key pressed
- break;
+ startIntro() {
+ const properties = this._properties;
+ const tour = {
+ id: properties.id || "mapapps_intro",
+ bubbleWidth: properties.bubbleWidth,
+ bubblePadding: properties.bubblePadding,
+ smoothScroll: properties.smoothScroll,
+ scrollDuration: properties.scrollDuration,
+ scrollTopMargin: properties.scrollTopMargin,
+ showCloseButton: properties.showCloseButton,
+ showPrevButton: properties.showPrevButton,
+ showNextButton: properties.showNextButton,
+ arrowWidth: properties.arrowWidth,
+ skipIfNoElement: properties.skipIfNoElement,
+ nextOnTargetClick: properties.nextOnTargetClick,
+ i18n: {
+ nextBtn: properties.i18n.nextBtn,
+ prevBtn: properties.i18n.prevBtn,
+ doneBtn: properties.i18n.doneBtn,
+ skipBtn: properties.i18n.skipBtn,
+ closeTooltip: properties.i18n.closeTooltip,
+ stepNums: properties.i18n.stepNums
}
- },
- onStep: function () {
- var activeTool = this._activeTool;
- if (activeTool) {
- activeTool.set("active", false);
+ };
+ tour.steps = this._steps = properties.steps;
+ const appCtx = this._appCtx;
+ if (appCtx._applicationRootNode.addClassName !== undefined) {
+ appCtx._applicationRootNode.addClassName("dn_intro_initializing");
+ } else {
+ appCtx._applicationRootNode.className = appCtx._applicationRootNode.className + " dn_intro_initializing";
+ }
+ d_array.forEach(properties.steps, function (step) {
+ if (step.toolId) {
+ const tool = this.getTool(step.toolId);
+ if (tool) {
+ tool.set("active", true);
+ ct_async(function () {
+ tool.set("active", false);
+ }, this, 500);
+ }
}
- var steps = this._steps;
- var currStepNum = hopscotch.getCurrStepNum();
- var currStep = steps[currStepNum];
- if (currStep.toolId) {
- var tool = this._activeTool = this.getTool(currStep.toolId);
- tool.set("active", true);
+ }, this);
+ ct_async(function () {
+ if (appCtx._applicationRootNode.removeClassName !== undefined) {
+ appCtx._applicationRootNode.removeClassName("dn_intro_initializing");
+ } else {
+ appCtx._applicationRootNode.className = appCtx._applicationRootNode.className.replace("dn_intro_initializing", "");
}
- },
- getTool: function (toolId) {
- var tools = this._tools;
- return ct_array.arraySearchFirst(tools, {
- id: toolId
- });
+ }, this, 1000);
+ hopscotch.startTour(tour, 0);
+ hopscotch.listen("next", d_lang.hitch(this, this.onStep));
+ hopscotch.listen("prev", d_lang.hitch(this, this.onStep));
+
+ window.addEventListener("keydown", d_lang.hitch(hopscotch, this.onKeyDown), false);
+ }
+
+ onKeyDown(event) {
+ const key = event.which || event.keyCode;
+ switch (key) {
+ case 32:
+ // space key pressed
+ this.nextStep();
+ break;
+ case 37:
+ // left key pressed
+ break;
+ case 39:
+ // right key pressed
+ break;
}
- });
-});
+ }
+
+ onStep() {
+ const activeTool = this._activeTool;
+ if (activeTool) {
+ activeTool.set("active", false);
+ }
+ const steps = this._steps;
+ const currStepNum = hopscotch.getCurrStepNum();
+ const currStep = steps[currStepNum];
+ if (currStep.toolId) {
+ const tool = this._activeTool = this.getTool(currStep.toolId);
+ tool.set("active", true);
+ }
+ }
+
+ getTool(toolId) {
+ const tools = this._tools;
+ return ct_array.arraySearchFirst(tools, {
+ id: toolId
+ });
+ }
+}
diff --git a/src/main/js/bundles/dn_intro/config/main.js b/src/main/js/bundles/dn_intro/config/main.js
index ccc784b..7d17125 100644
--- a/src/main/js/bundles/dn_intro/config/main.js
+++ b/src/main/js/bundles/dn_intro/config/main.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define(["dojo/i18n!./nls/bundle"], {});
\ No newline at end of file
+import "dojo/i18n!./nls/bundle";
diff --git a/src/main/js/bundles/dn_intro/config/manifest.json b/src/main/js/bundles/dn_intro/config/manifest.json
index c31d2dd..a17e145 100644
--- a/src/main/js/bundles/dn_intro/config/manifest.json
+++ b/src/main/js/bundles/dn_intro/config/manifest.json
@@ -1,83 +1,84 @@
{
- "Bundle-SymbolicName": "dn_intro-config",
- "Bundle-Version": "1.0.3-SNAPSHOT",
- "Bundle-Name": "${bundleName}",
- "Bundle-Description": "${bundleDescription}",
- "Bundle-Vendor": "con terra GmbH",
- "Require-Bundle": [
- {
- "name": "dataform"
+ "name": "dn_intro-config",
+ "version": "2.0.0-SNAPSHOT",
+ "title": "${bundleName}",
+ "description": "${bundleDescription}",
+ "vendor": "con terra GmbH",
+ "dependencies": {
+ "dataform": "^4.0.0",
+ "wizard": "^4.0.0"
},
- {
- "name": "wizard"
- }
- ],
- "Components": [
- {
- "name": "BuilderEntry",
- "impl": "ct/Stateful",
- "provides": [
- "wizard.MenuEntry"
- ],
- "propertiesConstructor": true,
- "properties": {
- "menuNode": {
- "priority": 0,
- "title": "${windowTitle}",
- "widget": "introBuilderWidget",
- "iconUrl": "resource('styles/images/bundleIcon.png')"
- }
- }
- },
- {
- "name": "BuilderWidget",
- "impl": "wizard/DataFormBuilderWidgetFactory",
- "provides": [
- "dijit.wizard.Widget"
- ],
- "immediate": true,
- "instanceFactory": true,
- "properties": {
- "dataformFile": "resource('./DataForm.json')",
- "bid": "dn_intro",
- "pid": "dn_intro-UserIntro",
- "id": "introBuilderWidget",
- "defaultProperties": {
- "startIntroOnStartup": true,
- "enableCookie": true,
- "bubbleWidth": 280,
- "bubblePadding": 15,
- "smoothScroll": true,
- "scrollDuration": 1000,
- "scrollTopMargin": 200,
- "showCloseButton": true,
- "showPrevButton": true,
- "showNextButton": true,
- "arrowWidth": 20,
- "skipIfNoElement": true,
- "nextOnTargetClick": false,
- "i18n": {
- "nextBtn": "${next}",
- "prevBtn": "${back}",
- "doneBtn": "${done}",
- "skipBtn": "${skip}",
- "closeTooltip": "${closeTooltip}",
- "stepNums": []
- },
- "steps": []
- },
- "description": "${description}"
- },
- "references": [
+ "productName": "devnet-mapapps-intro",
+ "layer": "module",
+ "i18n": [
+ "bundle"
+ ],
+ "components": [
{
- "name": "_configAdminService",
- "providing": "ct.framework.api.ConfigurationAdmin"
+ "name": "BuilderEntry",
+ "impl": "ct/Stateful",
+ "provides": [
+ "wizard.MenuEntry"
+ ],
+ "propertiesConstructor": true,
+ "properties": {
+ "menuNode": {
+ "priority": 0,
+ "title": "${windowTitle}",
+ "widget": "introBuilderWidget",
+ "iconUrl": "resource('styles/images/bundleIcon.png')"
+ }
+ }
},
{
- "name": "_dataformService",
- "providing": "dataform.DataFormService"
+ "name": "BuilderWidget",
+ "impl": "wizard/DataFormBuilderWidgetFactory",
+ "provides": [
+ "dijit.wizard.Widget"
+ ],
+ "immediate": true,
+ "instanceFactory": true,
+ "properties": {
+ "dataformFile": "resource('./DataForm.json')",
+ "bid": "dn_intro",
+ "pid": "dn_intro-UserIntro",
+ "id": "introBuilderWidget",
+ "defaultProperties": {
+ "startIntroOnStartup": true,
+ "enableCookie": true,
+ "bubbleWidth": 280,
+ "bubblePadding": 15,
+ "smoothScroll": true,
+ "scrollDuration": 1000,
+ "scrollTopMargin": 200,
+ "showCloseButton": true,
+ "showPrevButton": true,
+ "showNextButton": true,
+ "arrowWidth": 20,
+ "skipIfNoElement": true,
+ "nextOnTargetClick": false,
+ "i18n": {
+ "nextBtn": "${next}",
+ "prevBtn": "${back}",
+ "doneBtn": "${done}",
+ "skipBtn": "${skip}",
+ "closeTooltip": "${closeTooltip}",
+ "stepNums": []
+ },
+ "steps": []
+ },
+ "description": "${description}"
+ },
+ "references": [
+ {
+ "name": "_configAdminService",
+ "providing": "ct.framework.api.ConfigurationAdmin"
+ },
+ {
+ "name": "_dataformService",
+ "providing": "dataform.DataFormService"
+ }
+ ]
}
- ]
- }
- ]
+ ]
}
diff --git a/src/main/js/bundles/dn_intro/config/module.js b/src/main/js/bundles/dn_intro/config/module.js
index 646dccd..5531b03 100644
--- a/src/main/js/bundles/dn_intro/config/module.js
+++ b/src/main/js/bundles/dn_intro/config/module.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,8 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define([
- ".",
- "ct/Stateful",
- "wizard/DataFormBuilderWidgetFactory"
-], {});
\ No newline at end of file
+import ".";
+import "ct/Stateful";
+import "wizard/DataFormBuilderWidgetFactory";
diff --git a/src/main/js/bundles/dn_intro/config/nls/bundle.js b/src/main/js/bundles/dn_intro/config/nls/bundle.js
index 48887e1..741b017 100644
--- a/src/main/js/bundles/dn_intro/config/nls/bundle.js
+++ b/src/main/js/bundles/dn_intro/config/nls/bundle.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define({
+module.exports = {
root: {
bundleName: "Intro Config",
bundleDescription: "Configuration Bundle for the Intro Bundle",
@@ -73,4 +73,4 @@ define({
}
},
de: true
-});
\ No newline at end of file
+}
diff --git a/src/main/js/bundles/dn_intro/config/nls/de/bundle.js b/src/main/js/bundles/dn_intro/config/nls/de/bundle.js
index eada0c9..9341822 100644
--- a/src/main/js/bundles/dn_intro/config/nls/de/bundle.js
+++ b/src/main/js/bundles/dn_intro/config/nls/de/bundle.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define({
+module.exports = {
bundleName: "Intro Konfiguration",
bundleDescription: "Konfigurationsbundle f\u00fcr das Intro Bundle",
windowTitle: "Intro Konfiguration",
@@ -70,4 +70,4 @@ define({
title: "Schritte definieren",
description: "Schritte mit JSON definieren"
}
-});
\ No newline at end of file
+}
diff --git a/src/main/js/bundles/dn_intro/css/intro.css b/src/main/js/bundles/dn_intro/css/intro.css
index 27bb474..ce4ebdc 100644
--- a/src/main/js/bundles/dn_intro/css/intro.css
+++ b/src/main/js/bundles/dn_intro/css/intro.css
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/js/bundles/dn_intro/main.js b/src/main/js/bundles/dn_intro/main.js
index 76c9164..7d17125 100644
--- a/src/main/js/bundles/dn_intro/main.js
+++ b/src/main/js/bundles/dn_intro/main.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define(["dojo/i18n!./nls/bundle"], {});
+import "dojo/i18n!./nls/bundle";
diff --git a/src/main/js/bundles/dn_intro/manifest.json b/src/main/js/bundles/dn_intro/manifest.json
index d1f3782..95bdc50 100644
--- a/src/main/js/bundles/dn_intro/manifest.json
+++ b/src/main/js/bundles/dn_intro/manifest.json
@@ -1,180 +1,181 @@
{
- "Bundle-SymbolicName": "dn_intro",
- "Bundle-Version": "1.0.3-SNAPSHOT",
- "Bundle-Name": "${bundleName}",
- "Bundle-Description": "${bundleDescription}",
- "Bundle-Vendor": "con terra GmbH",
- "Product-Name": "devnet-mapapps-intro",
- "Bundle-StartLevel": 51,
- "Bundle-DocURL": "https://github.com/conterra/mapapps-intro/blob/master/README.md",
- "Bundle-ExcludedExecutionEnvironment": [
- "mobile",
- "Android",
- "iPad",
- "iPhone"
- ],
- "Config-Bundle-Location": "/config",
- "Require-Bundle": [
- {
- "name": "hopscotch"
- }
- ],
- "CSS-Themes-Extension": [
- {
- "name": "*",
- "files": [
- "./css/intro.css"
- ]
- }
- ],
- "layout-widgets": [
- {
- "role": "introWidget",
- "window": {
- "title": "${windowTitle}",
- "marginBox": {
- "w": 400,
- "h": 180
- },
- "dockTool": "introTool",
- "closable": true,
- "minimizeOnClose": true,
- "resizable": false
- }
- }
- ],
- "Components": [
- {
- "name": "IntroStarter",
- "references": [
- {
- "name": "_tool",
- "providing": "ct.tools.Tool",
- "filter": "(id=introTool)"
- },
+ "name": "dn_intro",
+ "version": "2.0.0-SNAPSHOT",
+ "title": "${bundleName}",
+ "description": "${bundleDescription}",
+ "vendor": "con terra GmbH",
+ "productName": "devnet-mapapps-intro",
+ "startLevel": 51,
+ "url": "https://github.com/conterra/mapapps-intro/blob/master/README.md",
+ "excludedExecutionEnvironment": [
+ "mobile",
+ "Android",
+ "iPad",
+ "iPhone"
+ ],
+ "configBundleLocation": "/config",
+ "dependencies": {
+ "hopscotch": "0.3.1",
+ "apprt-vue": "^4.0.0",
+ "apprt-binding": "^4.0.0",
+ "apprt-vuetify": "^4.0.0"
+ },
+ "CSS-Themes-Extension": [
{
- "name": "_userIntro",
- "providing": "dn_intro.UserIntro"
- },
+ "name": "*",
+ "files": [
+ "./css/intro.css"
+ ]
+ }
+ ],
+ "layout-widgets": [
{
- "name": "_startIntroOnStartupChecker",
- "providing": "dn_intro.StartIntroOnStartupChecker",
- "cardinality": "0..1"
+ "role": "introWidget",
+ "window": {
+ "title": "${ui.windowTitle}",
+ "marginBox": {
+ "w": 400,
+ "h": 180
+ },
+ "dockTool": "introTool",
+ "closable": true,
+ "minimizeOnClose": true,
+ "resizable": false
+ }
}
- ]
- },
- {
- "name": "IntroWidgetFactory",
- "provides": [
- "dijit.Widget",
- "ct.framework.api.EventHandler"
- ],
- "properties": {
- "widgetRole": "introWidget"
- },
- "instanceFactory": true,
- "immediate": true,
- "references": [
+ ],
+ "components": [
{
- "name": "_userIntro",
- "providing": "dn_intro.UserIntro"
+ "name": "IntroStarter",
+ "references": [
+ {
+ "name": "_tool",
+ "providing": "ct.tools.Tool",
+ "filter": "(id=introTool)"
+ },
+ {
+ "name": "_userIntro",
+ "providing": "dn_intro.UserIntro"
+ },
+ {
+ "name": "_startIntroOnStartupChecker",
+ "providing": "dn_intro.StartIntroOnStartupChecker",
+ "cardinality": "0..1"
+ }
+ ]
},
{
- "name": "_introTool",
- "providing": "ct.tools.Tool",
- "filter": "(id=introTool)"
- }
- ]
- },
- {
- "name": "IntroTool",
- "impl": "ct/tools/Tool",
- "provides": [
- "ct.tools.Tool"
- ],
- "propertiesConstructor": true,
- "properties": {
- "id": "introTool",
- "toolRole": "toolset",
- "title": "${introToolTitle}",
- "tooltip": "${introToolTooltip}",
- "togglable": true,
- "groups": "introTools",
- "iconClass": "icon-add-symbol"
- }
- },
- {
- "name": "IntroImmediateTool",
- "impl": "ct/tools/Tool",
- "provides": [
- "ct.tools.Tool"
- ],
- "propertiesConstructor": true,
- "properties": {
- "id": "introImmediateTool",
- "toolRole": "toolset",
- "title": "${introImmediateToolTitle}",
- "tooltip": "${introImmediateToolTooltip}",
- "togglable": false,
- "clickHandler": "startIntro",
- "iconClass": "icon-add-symbol"
- },
- "references": [
- {
- "name": "handlerScope",
- "providing": "dn_intro.UserIntro"
- }
- ]
- },
- {
- "name": "UserIntro",
- "propertiesConstructor": true,
- "immediate": true,
- "provides": [
- "ct.framework.api.EventHandler",
- "dn_intro.UserIntro"
- ],
- "properties": {
- // start options
- "startIntroOnStartup": true,
- "enableCookie": true,
- // intro options
- "bubbleWidth": 280,
- "bubblePadding": 15,
- "smoothScroll": true,
- "scrollDuration": 1000,
- "scrollTopMargin": 200,
- "showCloseButton": true,
- "showPrevButton": true,
- "showNextButton": true,
- "arrowWidth": 20,
- "skipIfNoElement": true,
- "nextOnTargetClick": false,
- "i18n": {
- "nextBtn": "${next}",
- "prevBtn": "${back}",
- "doneBtn": "${done}",
- "skipBtn": "${skip}",
- "closeTooltip": "${closeTooltip}",
- "stepNums": []
+ "name": "IntroWidgetFactory",
+ "provides": [
+ "dijit.Widget",
+ "ct.framework.api.EventHandler"
+ ],
+ "properties": {
+ "widgetRole": "introWidget"
+ },
+ "instanceFactory": true,
+ "immediate": true,
+ "references": [
+ {
+ "name": "_userIntro",
+ "providing": "dn_intro.UserIntro"
+ },
+ {
+ "name": "_introTool",
+ "providing": "ct.tools.Tool",
+ "filter": "(id=introTool)"
+ }
+ ]
},
- "steps": []
- },
- "references": [
{
- "name": "_eventService",
- "providing": "ct.framework.api.EventService"
+ "name": "IntroTool",
+ "impl": "ct/tools/Tool",
+ "provides": [
+ "ct.tools.Tool"
+ ],
+ "propertiesConstructor": true,
+ "properties": {
+ "id": "introTool",
+ "toolRole": "toolset",
+ "title": "${introTool.title}",
+ "tooltip": "${introTool.tooltip}",
+ "togglable": true,
+ "groups": "introTools",
+ "iconClass": "icon-info-2"
+ }
},
{
- "name": "_appCtx",
- "providing": "ct.framework.api.ApplicationContext"
+ "name": "IntroImmediateTool",
+ "impl": "ct/tools/Tool",
+ "provides": [
+ "ct.tools.Tool"
+ ],
+ "propertiesConstructor": true,
+ "properties": {
+ "id": "introImmediateTool",
+ "toolRole": "toolset",
+ "title": "${introImmediateTool.title}",
+ "tooltip": "${introImmediateTool.tooltip}",
+ "togglable": false,
+ "clickHandler": "startIntro",
+ "iconClass": "icon-info-2"
+ },
+ "references": [
+ {
+ "name": "handlerScope",
+ "providing": "dn_intro.UserIntro"
+ }
+ ]
},
{
- "name": "_tools",
- "providing": "ct.tools.Tool",
- "cardinality": "0..n"
+ "name": "UserIntro",
+ "propertiesConstructor": true,
+ "immediate": true,
+ "provides": [
+ "ct.framework.api.EventHandler",
+ "dn_intro.UserIntro"
+ ],
+ "properties": {
+ // start options
+ "startIntroOnStartup": true,
+ "enableCookie": true,
+ // intro options
+ "bubbleWidth": 280,
+ "bubblePadding": 15,
+ "smoothScroll": true,
+ "scrollDuration": 1000,
+ "scrollTopMargin": 200,
+ "showCloseButton": true,
+ "showPrevButton": true,
+ "showNextButton": true,
+ "arrowWidth": 20,
+ "skipIfNoElement": true,
+ "nextOnTargetClick": false,
+ "i18n": {
+ "nextBtn": "${next}",
+ "prevBtn": "${back}",
+ "doneBtn": "${done}",
+ "skipBtn": "${skip}",
+ "closeTooltip": "${closeTooltip}",
+ "stepNums": []
+ },
+ "steps": []
+ },
+ "references": [
+ {
+ "name": "_eventService",
+ "providing": "ct.framework.api.EventService"
+ },
+ {
+ "name": "_appCtx",
+ "providing": "ct.framework.api.ApplicationContext"
+ },
+ {
+ "name": "_tools",
+ "providing": "ct.tools.Tool",
+ "cardinality": "0..n"
+ }
+ ]
}
- ]
- }
- ]
+ ]
}
diff --git a/src/main/js/bundles/dn_intro/module.js b/src/main/js/bundles/dn_intro/module.js
index 2476338..18fa66e 100644
--- a/src/main/js/bundles/dn_intro/module.js
+++ b/src/main/js/bundles/dn_intro/module.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,10 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define([
- ".",
- "./IntroStarter",
- "./IntroWidget",
- "./IntroWidgetFactory",
- "./UserIntro"
-], {});
\ No newline at end of file
+import ".";
+import "ct/tools/Tool";
+import "./IntroStarter";
+import "./IntroWidgetFactory";
+import "./UserIntro";
diff --git a/src/main/js/bundles/dn_intro/nls/bundle.js b/src/main/js/bundles/dn_intro/nls/bundle.js
index 5f4ae04..4d6f739 100644
--- a/src/main/js/bundles/dn_intro/nls/bundle.js
+++ b/src/main/js/bundles/dn_intro/nls/bundle.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,24 +13,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define({
+module.exports = {
root: {
bundleName: "Intro Bundle",
bundleDescription: "This bundle allows you to create your own step-by-step guide in map.apps based on the hopscotch framework.",
- windowTitle: "Welcome to map.apps!",
- introToolName: "Intro Tool",
- introToolTitle: "Start Intro",
- introToolTooltip: "Start Intro",
- introImmediateToolName: "Immediate Intro Tool",
- introImmediateToolTitle: "Start Intro",
- introImmediateToolTooltip: "Start Intro",
- start: "Start Intro",
- hint: "Don't show the intro again on next start-up",
- next: "next",
- back: "back",
- done: "done",
- skip: "skip",
- closeTooltip: "close intro"
+ ui: {
+ windowTitle: "Welcome to map.apps!",
+ start: "Start Intro",
+ hint: "Don't show the intro again on next start-up",
+ next: "next",
+ back: "back",
+ done: "done",
+ skip: "skip",
+ closeTooltip: "close intro"
+ },
+ introTool: {
+ title: "Start Intro",
+ tooltip: "Start Intro"
+ },
+ introImmediateTool: {
+ title: "Start Intro",
+ tooltip: "Start Intro"
+ }
},
- "de": true
-});
\ No newline at end of file
+ de: true
+}
diff --git a/src/main/js/bundles/dn_intro/nls/de/bundle.js b/src/main/js/bundles/dn_intro/nls/de/bundle.js
index 321ae93..c9b37ad 100644
--- a/src/main/js/bundles/dn_intro/nls/de/bundle.js
+++ b/src/main/js/bundles/dn_intro/nls/de/bundle.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,21 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-define({
+module.exports = {
bundleName: "Intro Bundle",
bundleDescription: "Dieses Bundle erlaubt die Erstellung eigener Intros in map.apps. Es basiert auf dem hopscotch framework.",
- windowTitle: "Willkommen in map.apps!",
- introToolName: "Intro Tool",
- introToolTitle: "Intro starten",
- introToolTooltip: "Intro starten",
- introImmediateToolName: "Immediate Intro Tool",
- introImmediateToolTitle: "Intro starten",
- introImmediateToolTooltip: "Intro starten",
- start: "Einf\u00fchrung starten",
- hint: "Beim n\u00e4chsten Start nicht mehr anzeigen",
- next: "Weiter",
- back: "Zur\u00fcck",
- done: "Beenden",
- skip: "\u00dcberspringen",
- closeTooltip: "Intro beenden"
-});
\ No newline at end of file
+ ui: {
+ windowTitle: "Willkommen in map.apps!",
+ start: "Einf\u00fchrung starten",
+ hint: "Beim n\u00e4chsten Start nicht mehr anzeigen",
+ next: "Weiter",
+ back: "Zur\u00fcck",
+ done: "Beenden",
+ skip: "\u00dcberspringen",
+ closeTooltip: "Intro beenden"
+ },
+ introTool: {
+ title: "Intro starten",
+ tooltip: "Intro starten"
+ },
+ introImmediateTool: {
+ title: "Intro starten",
+ tooltip: "Intro starten"
+ }
+}
diff --git a/src/main/js/bundles/dn_intro/templates/IntroWidget.html b/src/main/js/bundles/dn_intro/templates/IntroWidget.html
deleted file mode 100644
index e683f3c..0000000
--- a/src/main/js/bundles/dn_intro/templates/IntroWidget.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/js/bundles/hopscotch/.babelrc b/src/main/js/bundles/hopscotch/.babelrc
new file mode 100644
index 0000000..9f70a4a
--- /dev/null
+++ b/src/main/js/bundles/hopscotch/.babelrc
@@ -0,0 +1,5 @@
+{
+ "ignore": [
+ "**/*.min.js"
+ ]
+}
diff --git a/src/main/js/bundles/hopscotch/css/hopscotch.min.css b/src/main/js/bundles/hopscotch/css/hopscotch.min.css
index 041128a..88463f4 100644
--- a/src/main/js/bundles/hopscotch/css/hopscotch.min.css
+++ b/src/main/js/bundles/hopscotch/css/hopscotch.min.css
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/js/bundles/hopscotch/js/hopscotch.min.js b/src/main/js/bundles/hopscotch/js/hopscotch.min.js
index 1e57fa1..d28636c 100644
--- a/src/main/js/bundles/hopscotch/js/hopscotch.min.js
+++ b/src/main/js/bundles/hopscotch/js/hopscotch.min.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 con terra GmbH (info@conterra.de)
+ * Copyright (C) 2021 con terra GmbH (info@conterra.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/js/bundles/hopscotch/manifest.json b/src/main/js/bundles/hopscotch/manifest.json
new file mode 100644
index 0000000..e12918a
--- /dev/null
+++ b/src/main/js/bundles/hopscotch/manifest.json
@@ -0,0 +1,62 @@
+{
+ "name": "hopscotch",
+ "version": "0.3.1",
+ "description": "A framework to make it easy for developers to add product tours to their pages.",
+ "main": "js/hopscotch.min.js",
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "grunt test"
+ },
+ "i18n": [],
+ "layer": "",
+ "CSS-Themes-Extension": [
+ {
+ "name": "*",
+ "files": [
+ "./css/hopscotch.min.css"
+ ]
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/linkedin/hopscotch.git"
+ },
+ "author": {
+ "name": "Hopscotch's community of authors and contributors",
+ "url": "https://github.com/linkedin/hopscotch/graphs/contributors"
+ },
+ "license": "Apache-2.0",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/linkedin/hopscotch/issues"
+ },
+ "devDependencies": {
+ "babel-core": "^6.24.1",
+ "babel-loader": "^7.0.0",
+ "babel-plugin-external-helpers": "^6.22.0",
+ "babel-preset-env": "^1.5.1",
+ "babel-preset-latest": "^6.24.1",
+ "grunt": "~0.4.1",
+ "grunt-bump": "~0.0.13",
+ "grunt-contrib-clean": "~0.5.0",
+ "grunt-contrib-compress": "~1.4.1",
+ "grunt-contrib-connect": "^0.9.0",
+ "grunt-contrib-copy": "~0.5.0",
+ "grunt-contrib-jasmine": "^0.9.2",
+ "grunt-contrib-jshint": "~0.6.0",
+ "grunt-contrib-jst": "~0.6.0",
+ "grunt-contrib-less": "~0.9.0",
+ "grunt-contrib-uglify": "~0.2.2",
+ "grunt-contrib-watch": "~0.5.1",
+ "grunt-include-replace": "~1.2.0",
+ "grunt-rollup": "^1.0.1",
+ "grunt-shell": "~0.3.1",
+ "grunt-template-jasmine-istanbul": "^0.3.0",
+ "grunt-template-jasmine-requirejs": "^0.2.3",
+ "jquery": "~2.1.0",
+ "rollup-plugin-babel": "^2.7.1",
+ "webpack": "^2.6.1"
+ }
+}
diff --git a/src/main/js/bundles/hopscotch/package.json b/src/main/js/bundles/hopscotch/package.json
deleted file mode 100644
index bdb2f53..0000000
--- a/src/main/js/bundles/hopscotch/package.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "name": "hopscotch",
- "version": "0.3.1",
- "description": "A framework to make it easy for developers to add product tours to their pages.",
- "main": "js/hopscotch.min.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "test": "grunt test"
- },
- "i18n": [],
- "CSS-Themes-Extension": [
- {
- "name": "*",
- "files": [
- "./css/hopscotch.min.css"
- ]
- }
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/linkedin/hopscotch.git"
- },
- "author": {
- "name": "Hopscotch's community of authors and contributors",
- "url": "https://github.com/linkedin/hopscotch/graphs/contributors"
- },
- "license": "Apache-2.0",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/linkedin/hopscotch/issues"
- },
- "devDependencies": {
- "babel-core": "^6.24.1",
- "babel-loader": "^7.0.0",
- "babel-plugin-external-helpers": "^6.22.0",
- "babel-preset-env": "^1.5.1",
- "babel-preset-latest": "^6.24.1",
- "grunt": "~0.4.1",
- "grunt-bump": "~0.0.13",
- "grunt-contrib-clean": "~0.5.0",
- "grunt-contrib-compress": "~1.4.1",
- "grunt-contrib-connect": "^0.9.0",
- "grunt-contrib-copy": "~0.5.0",
- "grunt-contrib-jasmine": "^0.9.2",
- "grunt-contrib-jshint": "~0.6.0",
- "grunt-contrib-jst": "~0.6.0",
- "grunt-contrib-less": "~0.9.0",
- "grunt-contrib-uglify": "~0.2.2",
- "grunt-contrib-watch": "~0.5.1",
- "grunt-include-replace": "~1.2.0",
- "grunt-rollup": "^1.0.1",
- "grunt-shell": "~0.3.1",
- "grunt-template-jasmine-istanbul": "^0.3.0",
- "grunt-template-jasmine-requirejs": "^0.2.3",
- "jquery": "~2.1.0",
- "rollup-plugin-babel": "^2.7.1",
- "webpack": "^2.6.1"
- }
-}
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index bc7fd23..f889047 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -4,13 +4,23 @@
# url to the remote map.apps instance
mapapps.remote.base=${mapapps.remote.base}
+# title in apps
+client.config.productname=Samples
# defines runtime version for the sample project. Defaults to map.apps 3.x
# to develope mapapps 4.x apps, change this property
apprt.version=${apprt.version}
+
# the init file to bootstrap map.apps
-client.config.initjs=${client.config.initjs}
+client.config.initjs=$\{mapapps.remote.base\}/resources/jsregistry/root/apprt-boot/$\{apprt.version\}/boot.js
+
+# defines the initialization layer file
+# you can use a comma separated list of layer files
+# or change the name of the main layer file
+client.config.mainlayerfiles=apprt/launch/layer
+
#local (embedded) js registry root url
jsregistry.root.url=${applicationURL.noscheme}/resources/jsregistry/root
+
# This is used to filter a default app name in the *.html files
default.app.name=${default.app.name}
@@ -25,4 +35,15 @@ proxy.allowedServerUrls=${proxy.allowedServerUrls}
# if you configure '*' then you trust all ssl server certificates
# you can also confige the dns of the certificate subjects to trust them, separated by '|'
# or leave the configuration empty, then the normal java mechanism is used.
-proxy.allowedSSLDNs=${proxy.allowedSSLDNs}
\ No newline at end of file
+proxy.allowedSSLDNs=${proxy.allowedSSLDNs}
+
+# Defines rules for proxy access based on host names.
+# It provides more fine grained control what requests use a proxy page.
+# Sample:
+# proxy.use.rules=sample1.mapapps.de,sample2.mapapps.de|/proxyPage
+#
+# sample1.mapapps.de goes over default proxy page "/proxy",
+# sample2.mapapps.de goes over own proxy page "/proxyPage'
+proxy.use.rules=${proxy.use.rules}
+
+jsregistry.replacement.paths=**/tests/*.html
diff --git a/src/test/webapp/WEB-INF/web.xml b/src/test/webapp/WEB-INF/web.xml
index 29ca804..a30e8a8 100644
--- a/src/test/webapp/WEB-INF/web.xml
+++ b/src/test/webapp/WEB-INF/web.xml
@@ -5,18 +5,18 @@
version="3.0">
map.apps remote sample
-
+
ProxyServlet
ProxyServlet
- de.conterra.mapapps.proxy.ProxyServlet
+ de.conterra.proxy.servlet.ProxyServlet
0
ProxyServlet
/proxy
-
-
\ No newline at end of file
+
+
diff --git a/src/test/webapp/index.html b/src/test/webapp/index.html
index e405aba..d169aba 100644
--- a/src/test/webapp/index.html
+++ b/src/test/webapp/index.html
@@ -1,58 +1,79 @@
+
-
-
-
-
+
+
+
+
-
+
+ -->
-
+
map.apps remote sample
-
-
-
-
-
-
-
-
+
-
-
+
@@ -86,4 +107,5 @@
-
\ No newline at end of file
+
+