├── .gitignore ├── LICENSE ├── README.md ├── docs ├── css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal.css │ ├── reveal.scss │ └── theme │ │ ├── README.md │ │ ├── beige.css │ │ ├── black.css │ │ ├── blood.css │ │ ├── esri-dev-summit-2018.css │ │ ├── league.css │ │ ├── moon.css │ │ ├── night.css │ │ ├── serif.css │ │ ├── simple.css │ │ ├── sky.css │ │ ├── solarized.css │ │ ├── source │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── blood.scss │ │ ├── esri-dev-summit-2018.scss │ │ ├── league.scss │ │ ├── moon.scss │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── solarized.scss │ │ └── white.scss │ │ ├── template │ │ ├── mixins.scss │ │ ├── settings.scss │ │ └── theme.scss │ │ └── white.css ├── img │ ├── 2020-feedback.png │ ├── 2020-plain-bg.png │ ├── AngularJS-large.png │ ├── In-White-121px-R.png │ ├── Twitter_Logo_WhiteOnImage.png │ ├── angular.png │ ├── app_screenshot_2.png │ ├── app_screenshot_3.png │ ├── async_events.png │ ├── async_observables.png │ ├── async_operations.png │ ├── async_pattern_options.png │ ├── async_promises.png │ ├── autocomplete_screenshot.png │ ├── bg-basic.png │ ├── bg-endslide.png │ ├── bg-titleslide2.png │ ├── esri-logo-white.png │ ├── esri-science-logo-white.png │ ├── issue-template.png │ └── title_slide.png ├── index.html ├── js │ └── reveal.js ├── lib │ ├── css │ │ └── zenburn.css │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.css │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ └── league-gothic.woff │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js └── plugin │ ├── highlight │ └── highlight.js │ ├── markdown │ ├── example.html │ ├── example.md │ ├── markdown.js │ └── marked.js │ ├── math │ └── math.js │ ├── multiplex │ ├── client.js │ ├── index.js │ ├── master.js │ └── package.json │ ├── notes-server │ ├── client.js │ ├── index.js │ └── notes.html │ ├── notes │ ├── notes.html │ └── notes.js │ ├── print-pdf │ └── print-pdf.js │ ├── search │ └── search.js │ └── zoom-js │ └── zoom.js └── sample_apps ├── angular-cdk ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── browserslist ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ │ ├── services │ │ │ └── esri-map.service.ts │ │ └── table │ │ │ ├── table.component.css │ │ │ ├── table.component.html │ │ │ ├── table.component.spec.ts │ │ │ └── table.component.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json ├── app-scaffolding ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.html │ │ ├── app.component.scss │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── esri-map │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.scss │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ └── test.ts ├── tsconfig.app.json ├── tsconfig.json └── tslint.json ├── arcgis-api-service ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── autocomplete_screenshot.png ├── browserslist ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ ├── esri-map.component.ts │ │ │ ├── esri-map.service.spec.ts │ │ │ └── esri-map.service.ts │ │ └── services │ │ │ └── map-state.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json ├── async-events ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── autocomplete_screenshot.png ├── browserslist ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── dashboard │ │ │ ├── dashboard.component.css │ │ │ ├── dashboard.component.html │ │ │ └── dashboard.component.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ │ └── header │ │ │ ├── header.component.css │ │ │ ├── header.component.html │ │ │ └── header.component.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json ├── async-observables ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── autocomplete_screenshot.png ├── browserslist ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── control-panel │ │ │ ├── control-panel.component.css │ │ │ ├── control-panel.component.html │ │ │ └── control-panel.component.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ │ ├── header │ │ │ ├── header.component.css │ │ │ ├── header.component.html │ │ │ └── header.component.ts │ │ └── services │ │ │ └── esri-map.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json ├── async-promises ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── autocomplete_screenshot.png ├── browserslist ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── dashboard │ │ │ ├── dashboard.component.css │ │ │ ├── dashboard.component.html │ │ │ └── dashboard.component.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ │ └── header │ │ │ ├── header.component.css │ │ │ ├── header.component.html │ │ │ └── header.component.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json ├── data-store ├── .gitignore ├── LICENSE ├── README.md ├── angular.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── dashboard │ │ │ ├── dashboard.component.css │ │ │ ├── dashboard.component.html │ │ │ └── dashboard.component.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ │ ├── header │ │ │ ├── header.component.css │ │ │ ├── header.component.html │ │ │ └── header.component.ts │ │ ├── navigation │ │ │ ├── navigation.component.css │ │ │ ├── navigation.component.html │ │ │ └── navigation.component.ts │ │ └── state │ │ │ ├── actions │ │ │ └── map.actions.ts │ │ │ ├── index.ts │ │ │ ├── models │ │ │ └── map-settings.ts │ │ │ └── reducers │ │ │ └── map-state.reducer.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.app.json ├── tsconfig.json └── tslint.json ├── simple-map-state ├── .editorconfig ├── .gitignore ├── LICENSE ├── README.md ├── angular.json ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── dashboard │ │ │ ├── dashboard.component.css │ │ │ ├── dashboard.component.html │ │ │ └── dashboard.component.ts │ │ ├── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ │ ├── header │ │ │ ├── header.component.css │ │ │ ├── header.component.html │ │ │ └── header.component.ts │ │ ├── map-store.class.ts │ │ ├── navigation │ │ │ ├── navigation.component.css │ │ │ ├── navigation.component.html │ │ │ └── navigation.component.ts │ │ └── services │ │ │ └── map-state.service.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.app.json ├── tsconfig.json └── tslint.json ├── types-for-arcgis-js-api ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── autocomplete_screenshot.png ├── browserslist ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── esri-map │ │ │ ├── esri-map.component.css │ │ │ ├── esri-map.component.html │ │ │ ├── esri-map.component.spec.ts │ │ │ └── esri-map.component.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── karma.conf.js │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── tslint.json ├── tsconfig.json └── tslint.json └── webpack ├── .gitignore ├── LICENSE ├── README.md ├── angular.json ├── extra-webpack.config.js ├── package-lock.json ├── package.json ├── src ├── app │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ └── esri-map │ │ ├── esri-map.component.html │ │ ├── esri-map.component.scss │ │ ├── esri-map.component.spec.ts │ │ └── esri-map.component.ts ├── assets │ └── .gitkeep ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── styles.scss └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /dist-server 6 | /tmp 7 | /out-tsc 8 | 9 | # dependencies 10 | node_modules 11 | 12 | # IDEs and editors 13 | **/.idea/** 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | testem.log 35 | /typings 36 | 37 | # e2e 38 | /e2e 39 | /e2e/*.js 40 | /e2e/*.map 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /docs/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /docs/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /docs/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /docs/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /docs/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 40px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /docs/img/2020-feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/2020-feedback.png -------------------------------------------------------------------------------- /docs/img/2020-plain-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/2020-plain-bg.png -------------------------------------------------------------------------------- /docs/img/AngularJS-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/AngularJS-large.png -------------------------------------------------------------------------------- /docs/img/In-White-121px-R.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/In-White-121px-R.png -------------------------------------------------------------------------------- /docs/img/Twitter_Logo_WhiteOnImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/Twitter_Logo_WhiteOnImage.png -------------------------------------------------------------------------------- /docs/img/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/angular.png -------------------------------------------------------------------------------- /docs/img/app_screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/app_screenshot_2.png -------------------------------------------------------------------------------- /docs/img/app_screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/app_screenshot_3.png -------------------------------------------------------------------------------- /docs/img/async_events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/async_events.png -------------------------------------------------------------------------------- /docs/img/async_observables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/async_observables.png -------------------------------------------------------------------------------- /docs/img/async_operations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/async_operations.png -------------------------------------------------------------------------------- /docs/img/async_pattern_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/async_pattern_options.png -------------------------------------------------------------------------------- /docs/img/async_promises.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/async_promises.png -------------------------------------------------------------------------------- /docs/img/autocomplete_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/autocomplete_screenshot.png -------------------------------------------------------------------------------- /docs/img/bg-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/bg-basic.png -------------------------------------------------------------------------------- /docs/img/bg-endslide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/bg-endslide.png -------------------------------------------------------------------------------- /docs/img/bg-titleslide2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/bg-titleslide2.png -------------------------------------------------------------------------------- /docs/img/esri-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/esri-logo-white.png -------------------------------------------------------------------------------- /docs/img/esri-science-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/esri-science-logo-white.png -------------------------------------------------------------------------------- /docs/img/issue-template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/issue-template.png -------------------------------------------------------------------------------- /docs/img/title_slide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/img/title_slide.png -------------------------------------------------------------------------------- /docs/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /docs/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /docs/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /docs/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /docs/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /docs/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /docs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/docs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /docs/lib/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | document.createElement('header'); 2 | document.createElement('nav'); 3 | document.createElement('section'); 4 | document.createElement('article'); 5 | document.createElement('aside'); 6 | document.createElement('footer'); 7 | document.createElement('hgroup'); -------------------------------------------------------------------------------- /docs/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /docs/plugin/multiplex/client.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var multiplex = Reveal.getConfig().multiplex; 3 | var socketId = multiplex.id; 4 | var socket = io.connect(multiplex.url); 5 | 6 | socket.on(multiplex.id, function(data) { 7 | // ignore data from sockets that aren't ours 8 | if (data.socketId !== socketId) { return; } 9 | if( window.location.host === 'localhost:1947' ) return; 10 | 11 | Reveal.setState(data.state); 12 | }); 13 | }()); 14 | -------------------------------------------------------------------------------- /docs/plugin/multiplex/master.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | // Don't emit events from inside of notes windows 4 | if ( window.location.search.match( /receiver/gi ) ) { return; } 5 | 6 | var multiplex = Reveal.getConfig().multiplex; 7 | 8 | var socket = io.connect( multiplex.url ); 9 | 10 | function post() { 11 | 12 | var messageData = { 13 | state: Reveal.getState(), 14 | secret: multiplex.secret, 15 | socketId: multiplex.id 16 | }; 17 | 18 | socket.emit( 'multiplex-statechanged', messageData ); 19 | 20 | }; 21 | 22 | // post once the page is loaded, so the client follows also on "open URL". 23 | window.addEventListener( 'load', post ); 24 | 25 | // Monitor events that trigger a change in state 26 | Reveal.addEventListener( 'slidechanged', post ); 27 | Reveal.addEventListener( 'fragmentshown', post ); 28 | Reveal.addEventListener( 'fragmenthidden', post ); 29 | Reveal.addEventListener( 'overviewhidden', post ); 30 | Reveal.addEventListener( 'overviewshown', post ); 31 | Reveal.addEventListener( 'paused', post ); 32 | Reveal.addEventListener( 'resumed', post ); 33 | 34 | }()); 35 | -------------------------------------------------------------------------------- /docs/plugin/multiplex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reveal-js-multiplex", 3 | "version": "1.0.0", 4 | "description": "reveal.js multiplex server", 5 | "homepage": "http://revealjs.com", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "engines": { 10 | "node": "~4.1.1" 11 | }, 12 | "dependencies": { 13 | "express": "~4.13.3", 14 | "grunt-cli": "~0.1.13", 15 | "mustache": "~2.2.1", 16 | "socket.io": "~1.3.7" 17 | }, 18 | "license": "MIT" 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /sample_apps/angular-cdk/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /sample_apps/angular-cdk/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('angular-cdk app is running!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo(): Promise { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText(): Promise { 9 | return element(by.css('app-root .content span')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/angular-cdk'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/angular-cdk/src/app/app.component.css -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 | 8 |
9 |
10 |
11 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | 4 | describe('AppComponent', () => { 5 | beforeEach(async(() => { 6 | TestBed.configureTestingModule({ 7 | declarations: [ 8 | AppComponent 9 | ], 10 | }).compileComponents(); 11 | })); 12 | 13 | it('should create the app', () => { 14 | const fixture = TestBed.createComponent(AppComponent); 15 | const app = fixture.componentInstance; 16 | expect(app).toBeTruthy(); 17 | }); 18 | 19 | it(`should have as title 'angular-cdk'`, () => { 20 | const fixture = TestBed.createComponent(AppComponent); 21 | const app = fixture.componentInstance; 22 | expect(app.title).toEqual('angular-cdk'); 23 | }); 24 | 25 | it('should render title', () => { 26 | const fixture = TestBed.createComponent(AppComponent); 27 | fixture.detectChanges(); 28 | const compiled = fixture.nativeElement; 29 | expect(compiled.querySelector('.content span').textContent).toContain('angular-cdk app is running!'); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { TableComponent } from './table/table.component'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.css'] 8 | }) 9 | export class AppComponent { 10 | title = 'angular-cdk'; 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { CdkTableModule } from '@angular/cdk/table'; 4 | import { AppComponent } from './app.component'; 5 | import { TableComponent } from './table/table.component'; 6 | import { EsriMapComponent } from './esri-map/esri-map.component'; 7 | import { EsriMapService } from './services/esri-map.service'; 8 | 9 | @NgModule({ 10 | declarations: [ 11 | AppComponent, 12 | TableComponent, 13 | EsriMapComponent 14 | ], 15 | imports: [ 16 | BrowserModule, 17 | CdkTableModule 18 | ], 19 | providers: [EsriMapService], 20 | bootstrap: [AppComponent] 21 | }) 22 | export class AppModule { } 23 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | 2 | /* import the required JSAPI css */ 3 | @import 'https://js.arcgis.com/4.10/esri/css/main.css'; 4 | 5 | .esri-view { 6 | height: 500px; 7 | } 8 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from "@angular/core/testing"; 2 | 3 | import { EsriMapComponent } from "./esri-map.component"; 4 | import { AppComponent } from "../app.component"; 5 | 6 | describe("EsriMapComponent", () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }).compileComponents(); 15 | fixture = TestBed.createComponent(EsriMapComponent); 16 | app = fixture.debugElement.componentInstance; 17 | component = fixture.componentInstance; 18 | fixture.detectChanges(); 19 | })); 20 | 21 | it("should create", () => { 22 | expect(component).toBeTruthy(); 23 | }); 24 | 25 | it("should create MapView", () => { 26 | const compiled = fixture.debugElement.nativeElement; 27 | expect(compiled.querySelector("mapViewNode")).toBeDefined(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/services/esri-map.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019 Esri 3 | Licensed under the Apache License, Version 2.0 (the 'License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Injectable } from '@angular/core'; 14 | import { Subject } from 'rxjs'; 15 | 16 | @Injectable() 17 | export class EsriMapService { 18 | panRequest = new Subject(); 19 | panComplete = new Subject(); 20 | wonderCoordinates; 21 | 22 | panToWonder(wonderCoordinates) { 23 | this.wonderCoordinates = wonderCoordinates; 24 | this.panRequest.next(); 25 | } 26 | 27 | panToWonderComplete() { 28 | this.panComplete.next(); 29 | } 30 | 31 | constructor() {} 32 | } 33 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/table/table.component.css: -------------------------------------------------------------------------------- 1 | table { 2 | width: 50%; 3 | } 4 | 5 | th { 6 | text-align: left; 7 | } 8 | 9 | .table-row:hover { 10 | color: grey; 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/table/table.component.html: -------------------------------------------------------------------------------- 1 |

Wonders of the World

2 |
Click a table row to pan the map.
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
ID{{wonder.id}}Name{{wonder.name}}Coordinates{{wonder.coordinates[0]}}, {{wonder.coordinates[1]}}
23 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/app/table/table.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { TableComponent } from './table.component'; 4 | 5 | describe('TableComponent', () => { 6 | let component: TableComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ TableComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(TableComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/angular-cdk/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/angular-cdk/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularCdk 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | /* @import 'https://s3-us-west-1.amazonaws.com/patterns.esri.com/files/calcite-web/1.2.4/css/calcite-web.min.css'; */ 3 | body { 4 | font-family: "Lato", sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | }, 22 | "angularCompilerOptions": { 23 | "fullTemplateTypeCheck": true, 24 | "strictInjectionParameters": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sample_apps/angular-cdk/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 | Welcome to 5 | 6 | ArcGIS API for JavaScript 7 | 8 | using 9 | 10 | esri-loader 11 | 12 | with . . . 13 |

14 | Angular Logo 19 |
20 | 21 | 27 | 28 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .title { 2 | font-family: Arial, Helvetica, sans-serif; 3 | text-align: center; 4 | } -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.scss'] 7 | }) 8 | 9 | export class AppComponent { 10 | // Set our map properties 11 | mapCenter = [-122.4194, 37.7749]; 12 | basemapType = 'satellite'; 13 | mapZoomLevel = 12; 14 | 15 | // See app.component.html 16 | mapLoadedEvent(status: boolean) { 17 | console.log('The map loaded: ' + status); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from "@angular/platform-browser"; 2 | import { NgModule } from "@angular/core"; 3 | 4 | import { AppComponent } from "./app.component"; 5 | import { EsriMapComponent } from "./esri-map/esri-map.component"; 6 | 7 | @NgModule({ 8 | declarations: [AppComponent, EsriMapComponent], 9 | imports: [BrowserModule], 10 | providers: [], 11 | bootstrap: [AppComponent] 12 | }) 13 | export class AppModule {} 14 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/esri-map/esri-map.component.scss: -------------------------------------------------------------------------------- 1 | /* import the required JSAPI css */ 2 | @import url('https://js.arcgis.com/4.14/esri/css/main.css'); 3 | 4 | .esri-view { 5 | height: 500px; 6 | } 7 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | 5 | describe('EsriMapComponent', () => { 6 | let component: EsriMapComponent; 7 | let fixture: ComponentFixture; 8 | let app: any; // debugElement.componentInstance 9 | 10 | beforeEach(async(() => { 11 | TestBed.configureTestingModule({ 12 | declarations: [EsriMapComponent] 13 | }) 14 | .compileComponents(); 15 | fixture = TestBed.createComponent(EsriMapComponent); 16 | app = fixture.debugElement.componentInstance; 17 | component = fixture.componentInstance; 18 | fixture.detectChanges(); 19 | })); 20 | 21 | it('should create', () => { 22 | expect(component).toBeTruthy(); 23 | }); 24 | 25 | it('verify default values', () => { 26 | expect(app.basemap).toEqual(jasmine.any(String)); 27 | expect(app.center).toEqual(jasmine.any(Array)); 28 | expect(app.zoom).toEqual(jasmine.any(Number)); 29 | expect(app.mapLoaded).toEqual(false); 30 | }); 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/app-scaffolding/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/app-scaffolding/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularCliEsriMap 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["src/test.ts", "src/**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/app-scaffolding/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | }, 22 | "angularCompilerOptions": { 23 | "fullTemplateTypeCheck": true, 24 | "strictInjectionParameters": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/autocomplete_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/arcgis-api-service/autocomplete_screenshot.png -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to project1!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .title { 2 | font-family: Arial, Helvetica, sans-serif; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 | Welcome to 5 | 6 | ArcGIS API for JavaScript 7 | 8 | using 9 |

10 |

11 | 12 | esri-loader 13 | 14 |

15 |

16 | with . . . 17 |

18 | Angular Logo 19 |
20 | 21 | 26 | 27 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | import { EsriMapComponent } from './esri-map/esri-map.component'; 4 | import { EsriMapService } from './esri-map/esri-map.service'; 5 | 6 | describe('AppComponent', () => { 7 | let fixture, app; 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({ 10 | declarations: [ 11 | AppComponent, 12 | EsriMapComponent 13 | ], 14 | providers: [EsriMapService] 15 | }).compileComponents(); 16 | 17 | fixture = TestBed.createComponent(AppComponent); 18 | app = fixture.debugElement.componentInstance; 19 | 20 | }); 21 | 22 | it('should create the app', async(() => { 23 | expect(app).toBeTruthy(); 24 | })); 25 | 26 | it('should set zoom level', async(() => { 27 | expect(app.mapZoomLevel).toEqual(jasmine.any(Number)); 28 | })); 29 | 30 | it('should set basemap type', async(() => { 31 | expect(app.basemapType).toEqual(jasmine.any(String)); 32 | expect(app.basemapType).toEqual('satellite'); 33 | })); 34 | 35 | it('should set map center location', async(() => { 36 | expect(app.mapCenter).toEqual(jasmine.any(Array)); 37 | expect(app.mapCenter.length).toEqual(2); 38 | })); 39 | }); 40 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | 9 | export class AppComponent { 10 | // Set our map properties 11 | mapCenter = [-122.4194, 37.7749]; 12 | basemapType = 'satellite'; 13 | mapZoomLevel = 12; 14 | 15 | // See app.component.html 16 | mapLoadedEvent(status: boolean) { 17 | console.log('The map loaded: ' + status); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | import { EsriMapComponent } from './esri-map/esri-map.component'; 7 | import { EsriMapService} from './esri-map/esri-map.service'; 8 | 9 | 10 | @NgModule({ 11 | declarations: [ 12 | AppComponent, 13 | EsriMapComponent 14 | ], 15 | imports: [ 16 | BrowserModule 17 | ], 18 | providers: [EsriMapService], 19 | bootstrap: [AppComponent] 20 | }) 21 | export class AppModule { } 22 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | /* import the required JSAPI css */ 2 | @import 'https://js.arcgis.com/4.10/esri/css/main.css'; 3 | 4 | .esri-view { 5 | height: 500px; 6 | } 7 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/esri-map/esri-map.service.spec.ts: -------------------------------------------------------------------------------- 1 | import {TestBed, inject, ComponentFixture} from '@angular/core/testing'; 2 | import { EsriMapComponent } from './esri-map.component'; 3 | import { EsriMapService } from './esri-map.service'; 4 | 5 | describe('EsriMapService', () => { 6 | 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(() => { 12 | TestBed.configureTestingModule({ 13 | providers: [EsriMapService], 14 | declarations: [EsriMapComponent], 15 | }) 16 | .compileComponents(); 17 | fixture = TestBed.createComponent(EsriMapComponent); 18 | app = fixture.debugElement.componentInstance; 19 | component = fixture.componentInstance; 20 | fixture.detectChanges(); 21 | }); 22 | 23 | it('should be created', inject([EsriMapService], (service: EsriMapService) => { 24 | expect(service).toBeTruthy(); 25 | service.loadMap('topo',[0,0],10, app.mapViewEl).then((r) => { 26 | expect(r).toBeTruthy(); 27 | }); 28 | })); 29 | 30 | it('mapLoaded event fired', (done) => { 31 | app.mapLoaded.subscribe(g => { 32 | expect(g).toBeTruthy(); 33 | done(); 34 | }); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/esri-map/esri-map.service.ts: -------------------------------------------------------------------------------- 1 | import {ElementRef, Injectable} from '@angular/core'; 2 | import { loadModules } from 'esri-loader'; 3 | import esri = __esri; 4 | 5 | @Injectable() 6 | export class EsriMapService { 7 | 8 | constructor() { } 9 | 10 | loadMap(basemap: string, center: Array, zoom: number, mapContainer: ElementRef) { 11 | 12 | const promise = new Promise((resolve, reject) => { 13 | loadModules([ 14 | 'esri/Map', 15 | 'esri/views/MapView' 16 | ]) 17 | .then(([EsriMap, EsriMapView]) => { 18 | 19 | const map: esri.Map = new EsriMap({ 20 | basemap 21 | }); 22 | 23 | const mapView: esri.MapView = new EsriMapView({ 24 | container: mapContainer.nativeElement, 25 | center, 26 | zoom, 27 | map 28 | }); 29 | 30 | mapView.when(() => { 31 | // All the resources in the MapView and the map have loaded. Now execute additional processes 32 | resolve('true'); 33 | }, err => { 34 | console.error(err); 35 | reject(err); 36 | }); 37 | }) 38 | .catch(err => { 39 | console.error(err); 40 | reject(err); 41 | }); 42 | }); 43 | 44 | return promise; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/app/services/map-state.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Injectable } from '@angular/core'; 14 | 15 | @Injectable() 16 | export class MapStateService { 17 | private _points: __esri.Graphic[] = []; 18 | get points() { 19 | return this._points; 20 | } 21 | addPoint(point: __esri.Graphic) { 22 | this.points.push(point); 23 | } 24 | constructor() { } 25 | } 26 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/arcgis-api-service/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/arcgis-api-service/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9-arcgis-api-service 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | body { 3 | font-family: "Lato", sans-serif; 4 | } 5 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": [ 8 | "main.ts", 9 | "polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/arcgis-api-service/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "target": "es2015", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sample_apps/async-events/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/async-events/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/async-events/autocomplete_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-events/autocomplete_screenshot.png -------------------------------------------------------------------------------- /sample_apps/async-events/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /sample_apps/async-events/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /sample_apps/async-events/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to project1!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/async-events/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/async-events/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .eds-header{ 2 | height: 60px; 3 | margin: 30px 0; 4 | } 5 | 6 | .eds-nav{ 7 | 8 | } 9 | 10 | .eds-body{ 11 | 12 | } 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppComponent } from './app.component'; 5 | import { EsriMapComponent } from './esri-map/esri-map.component'; 6 | import { HeaderComponent } from './header/header.component'; 7 | import { DashboardComponent } from './dashboard/dashboard.component'; 8 | 9 | @NgModule({ 10 | declarations: [ 11 | AppComponent, 12 | EsriMapComponent, 13 | HeaderComponent, 14 | DashboardComponent 15 | ], 16 | imports: [ 17 | BrowserModule 18 | ], 19 | providers: [], 20 | bootstrap: [AppComponent] 21 | }) 22 | export class AppModule { } 23 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/dashboard/dashboard.component.css: -------------------------------------------------------------------------------- 1 | select{ 2 | width: 100%; 3 | } 4 | p{ 5 | margin-top: 20px; 6 | font-size: 1.1em; 7 | /* font-weight: 500; */ 8 | } 9 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
Select a World Wonder
5 | 9 | 10 |

{{feedback}}

11 |
12 |
13 | 14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | 2 | /* import the required JSAPI css */ 3 | @import 'https://js.arcgis.com/4.10/esri/css/main.css'; 4 | 5 | .esri-view { 6 | height: 500px; 7 | } 8 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | import { AppComponent } from '../app.component'; 5 | 6 | describe('EsriMapComponent', () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }) 15 | .compileComponents(); 16 | fixture = TestBed.createComponent(EsriMapComponent); 17 | app = fixture.debugElement.componentInstance; 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | })); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should create MapView', () => { 27 | const compiled = fixture.debugElement.nativeElement; 28 | expect(compiled.querySelector('mapViewNode')).toBeDefined(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/header/header.component.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | font-size: 1.4em; 3 | } 4 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/header/header.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{header}} 3 |

4 |
5 | {{header_tag}} 6 |
7 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/app/header/header.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | import { Component, OnInit } from '@angular/core'; 15 | 16 | @Component({ 17 | selector: 'app-header', 18 | templateUrl: './header.component.html', 19 | styleUrls: ['./header.component.css'] 20 | }) 21 | export class HeaderComponent implements OnInit { 22 | 23 | header = 'Async Operations Using the Angular Event Emitter'; 24 | header_tag = 'Select a world wonder. The select menu is disabled while the map pans to your selection. ' + 25 | ' Once complete, the map component emits an event and the dashboard selector is re-enabled.'; 26 | 27 | constructor() { } 28 | 29 | ngOnInit() { 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-events/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/async-events/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-events/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/async-events/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6-async-events 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import 'https://s3-us-west-1.amazonaws.com/patterns.esri.com/files/calcite-web/1.2.4/css/calcite-web.min.css'; 3 | body { 4 | font-family: "Lato", sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": [ 8 | "main.ts", 9 | "polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/async-events/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/async-events/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "target": "es2015", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sample_apps/async-observables/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/async-observables/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/async-observables/autocomplete_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-observables/autocomplete_screenshot.png -------------------------------------------------------------------------------- /sample_apps/async-observables/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /sample_apps/async-observables/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /sample_apps/async-observables/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to project1!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/async-observables/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/async-observables/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .eds-header{ 2 | height: 60px; 3 | margin: 30px 0; 4 | } 5 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { ReactiveFormsModule } from '@angular/forms'; 4 | import { AppComponent } from './app.component'; 5 | import { EsriMapComponent } from './esri-map/esri-map.component'; 6 | import { HeaderComponent } from './header/header.component'; 7 | import { ControlPanelComponent } from './control-panel/control-panel.component'; 8 | 9 | import { EsriMapService } from './services/esri-map.service'; 10 | 11 | 12 | @NgModule({ 13 | declarations: [ 14 | AppComponent, 15 | EsriMapComponent, 16 | HeaderComponent, 17 | ControlPanelComponent 18 | ], 19 | imports: [ 20 | BrowserModule, 21 | ReactiveFormsModule 22 | ], 23 | providers: [EsriMapService], 24 | bootstrap: [AppComponent] 25 | }) 26 | export class AppModule { } 27 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/control-panel/control-panel.component.css: -------------------------------------------------------------------------------- 1 | select{ 2 | width: 100%; 3 | } 4 | p{ 5 | margin-top: 20px; 6 | font-size: 1.1em; 7 | /* font-weight: 500; */ 8 | } 9 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/control-panel/control-panel.component.html: -------------------------------------------------------------------------------- 1 |
Select a World Wonder
2 | 5 | 6 |

{{feedback}}

7 |

Form touched: {{wonderForm.touched}}

8 |

Form valid: {{wonderForm.valid}}

9 |

Form value: {{wonderForm.value}}

10 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | 2 | /* import the required JSAPI css */ 3 | @import 'https://js.arcgis.com/4.10/esri/css/main.css'; 4 | 5 | .esri-view { 6 | height: 500px; 7 | } 8 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | import { AppComponent } from '../app.component'; 5 | 6 | describe('EsriMapComponent', () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }) 15 | .compileComponents(); 16 | fixture = TestBed.createComponent(EsriMapComponent); 17 | app = fixture.debugElement.componentInstance; 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | })); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should create MapView', () => { 27 | const compiled = fixture.debugElement.nativeElement; 28 | expect(compiled.querySelector('mapViewNode')).toBeDefined(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/header/header.component.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | font-size: 1.4em; 3 | } 4 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/header/header.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{header}} 3 |

4 |
5 | Select a world wonder. On changes to the form control's value, the select is 6 | disabled while the map pans to your selection. Once complete, the map component notifies the service. The service in turn then notifies all subscribed observers that the map is finished panning. 7 |
8 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/app/header/header.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, OnInit } from '@angular/core'; 14 | 15 | @Component({ 16 | selector: 'app-header', 17 | templateUrl: './header.component.html', 18 | styleUrls: ['./header.component.css'] 19 | }) 20 | export class HeaderComponent implements OnInit { 21 | 22 | header = 'Async Operations Using RxJS Observables'; 23 | 24 | constructor() { } 25 | 26 | ngOnInit() { 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-observables/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/async-observables/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-observables/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/async-observables/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7-async-observables 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import 'https://s3-us-west-1.amazonaws.com/patterns.esri.com/files/calcite-web/1.2.4/css/calcite-web.min.css'; 3 | body { 4 | font-family: "Lato", sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": [ 8 | "main.ts", 9 | "polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/async-observables/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/async-observables/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "target": "es2015", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sample_apps/async-promises/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/async-promises/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/async-promises/autocomplete_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-promises/autocomplete_screenshot.png -------------------------------------------------------------------------------- /sample_apps/async-promises/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /sample_apps/async-promises/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /sample_apps/async-promises/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to project1!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/async-promises/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/async-promises/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .eds-header{ 2 | height: 60px; 3 | margin: 30px 0; 4 | } 5 | 6 | .eds-nav{ 7 | 8 | } 9 | 10 | .eds-body{ 11 | 12 | } 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppComponent } from './app.component'; 5 | import { EsriMapComponent } from './esri-map/esri-map.component'; 6 | import { HeaderComponent } from './header/header.component'; 7 | import { DashboardComponent } from './dashboard/dashboard.component'; 8 | 9 | @NgModule({ 10 | declarations: [ 11 | AppComponent, 12 | EsriMapComponent, 13 | HeaderComponent, 14 | DashboardComponent 15 | ], 16 | imports: [ 17 | BrowserModule 18 | ], 19 | providers: [], 20 | bootstrap: [AppComponent] 21 | }) 22 | export class AppModule { } 23 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/dashboard/dashboard.component.css: -------------------------------------------------------------------------------- 1 | select{ 2 | width: 100%; 3 | } 4 | p{ 5 | margin-top: 20px; 6 | font-size: 1.1em; 7 | /* font-weight: 500; */ 8 | } 9 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
Select a World Wonder
5 | 9 | 10 |

{{feedback}}

11 |
12 |
13 | 14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | 2 | /* import the required JSAPI css */ 3 | @import 'https://js.arcgis.com/4.10/esri/css/main.css'; 4 | 5 | .esri-view { 6 | height: 500px; 7 | } 8 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | import { AppComponent } from '../app.component'; 5 | 6 | describe('EsriMapComponent', () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }) 15 | .compileComponents(); 16 | fixture = TestBed.createComponent(EsriMapComponent); 17 | app = fixture.debugElement.componentInstance; 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | })); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should create MapView', () => { 27 | const compiled = fixture.debugElement.nativeElement; 28 | expect(compiled.querySelector('mapViewNode')).toBeDefined(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/header/header.component.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | font-size: 1.4em; 3 | } 4 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/header/header.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{header}} 3 |

4 |
5 | {{header_tag}} 6 |
7 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/app/header/header.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | import { Component, OnInit } from '@angular/core'; 15 | 16 | @Component({ 17 | selector: 'app-header', 18 | templateUrl: './header.component.html', 19 | styleUrls: ['./header.component.css'] 20 | }) 21 | export class HeaderComponent implements OnInit { 22 | 23 | header = 'Async Operations Using Promises'; 24 | header_tag = 'Select a world wonder. The select menu is disabled while the panMap method is called, which returns a promise. ' + 25 | ' Once the map has panned, the map component resolves the promise, and the select menu is re-enabled.'; 26 | 27 | constructor() { } 28 | 29 | ngOnInit() { 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-promises/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/async-promises/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/async-promises/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/async-promises/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 5-async-promises 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import 'https://s3-us-west-1.amazonaws.com/patterns.esri.com/files/calcite-web/1.2.4/css/calcite-web.min.css'; 3 | body { 4 | font-family: "Lato", sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": [ 8 | "main.ts", 9 | "polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/async-promises/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/async-promises/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "target": "es2015", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sample_apps/data-store/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/data-store/README.md: -------------------------------------------------------------------------------- 1 | # Managing Map State 2 | This sample app demonstrates a single entity pattern for managing map state through the use of NgRx Store. 3 | 4 | ## Overview 5 | A challenge with more complex Angular mapping apps comes with the need to maintain map state while routing. Each time a route loads a component that contains a map, the component will (re-)initialize itself, setting the map to its original state. So how do you maintain the state of your map? One way is through the use of one of several libraries including NgRx. 6 | 7 | This sample app provides a simple example of using a more scalable pattern for maintaining map state. 8 | 9 | ## Working with ngrx 10 | 11 | The meat of this app is in the `/state` directory that contains actions, models and reducers. I've tried to keep it as simple as possible, and reduce unnecessary clutter so you can study how the various parts work together. 12 | 13 | The great thing about NgRx is there's no limit to how far you can scale the state management. 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .eds-header{ 2 | height: 60px; 3 | margin: 30px 0; 4 | } 5 | 6 | .eds-nav{ 7 | 8 | } 9 | 10 | .eds-body{ 11 | 12 | } 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { AppComponent } from './app.component'; 6 | import { EsriMapComponent } from './esri-map/esri-map.component'; 7 | import { HeaderComponent } from './header/header.component'; 8 | import { NavigationComponent } from './navigation/navigation.component'; 9 | import { DashboardComponent } from './dashboard/dashboard.component'; 10 | 11 | import { ScrollingModule } from '@angular/cdk/scrolling'; 12 | 13 | import { StoreModule } from '@ngrx/store'; 14 | import { reducer } from './state/reducers/map-state.reducer'; 15 | 16 | const routes = [ 17 | { path: 'map', component: EsriMapComponent }, 18 | { path: 'dashboard', component: DashboardComponent }, 19 | { path: '**', redirectTo: '/map' } 20 | ]; 21 | 22 | @NgModule({ 23 | declarations: [ 24 | AppComponent, 25 | EsriMapComponent, 26 | HeaderComponent, 27 | NavigationComponent, 28 | DashboardComponent 29 | ], 30 | imports: [ 31 | BrowserModule, 32 | RouterModule.forRoot(routes), 33 | ScrollingModule, 34 | StoreModule.forRoot({map: reducer}) 35 | ], 36 | providers: [], 37 | bootstrap: [AppComponent] 38 | }) 39 | export class AppModule { } 40 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/dashboard/dashboard.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/data-store/src/app/dashboard/dashboard.component.css -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 |

2 | Lorem ipsum dolor sit amet, mei solum abhorreant scribentur ad, erant saepe diceret an pri. Ne vix diam aliquando consequuntur, sed ei timeam deleniti, an omnis utroque vim. Labitur discere appellantur eam eu. Animal verterem definitionem ne sea. An enim prodesset dissentiunt mel, nihil possit contentiones pri ea. Malis intellegam no nam, est ut interesset reformidans ullamcorper. 3 | 4 |

5 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/dashboard/dashboard.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | import { Component, OnInit } from '@angular/core'; 15 | 16 | @Component({ 17 | selector: 'app-dashboard', 18 | templateUrl: './dashboard.component.html', 19 | styleUrls: ['./dashboard.component.css'] 20 | }) 21 | export class DashboardComponent implements OnInit { 22 | 23 | constructor() { } 24 | 25 | ngOnInit() { 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | 2 | /* import the required JSAPI css */ 3 | @import 'https://js.arcgis.com/4.14/esri/css/main.css'; 4 | 5 | .esri-view { 6 | height: 500px; 7 | } 8 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | import { AppComponent } from '../app.component'; 5 | 6 | describe('EsriMapComponent', () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }) 15 | .compileComponents(); 16 | fixture = TestBed.createComponent(EsriMapComponent); 17 | app = fixture.debugElement.componentInstance; 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | })); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should create MapView', () => { 27 | const compiled = fixture.debugElement.nativeElement; 28 | expect(compiled.querySelector('mapViewNode')).toBeDefined(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/header/header.component.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | font-size: 1.4em; 3 | font-family: "Lato", sans-serif; 4 | } 5 | .header-tag { 6 | font-family: "Lato", sans-serif; 7 | } 8 | 9 | .point-viewport { 10 | height: 60px; 11 | width: 50%; 12 | border: 1px solid lightgray; 13 | } 14 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/header/header.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{header}} 3 |

4 |
5 | {{header_tag}} 6 |
-------------------------------------------------------------------------------- /sample_apps/data-store/src/app/header/header.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, OnInit, OnDestroy } from '@angular/core'; 14 | import { Observable, Subscription } from 'rxjs'; 15 | 16 | @Component({ 17 | selector: 'app-header', 18 | templateUrl: './header.component.html', 19 | styleUrls: ['./header.component.css'], 20 | }) 21 | export class HeaderComponent implements OnInit, OnDestroy { 22 | 23 | header = 'Maintaining component state'; 24 | header_tag = 'Managing Map State with ngrx. Pan or zoom the map, select Other Route tab and then select Map tab '; 25 | 26 | constructor() {} 27 | 28 | ngOnInit() {} 29 | 30 | ngOnDestroy(){} 31 | } 32 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/navigation/navigation.component.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/navigation/navigation.component.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/navigation/navigation.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, OnInit } from '@angular/core'; 14 | 15 | @Component({ 16 | selector: 'app-navigation', 17 | templateUrl: './navigation.component.html', 18 | styleUrls: ['./navigation.component.css'] 19 | }) 20 | export class NavigationComponent implements OnInit { 21 | 22 | constructor() { } 23 | 24 | ngOnInit() { 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/state/actions/map.actions.ts: -------------------------------------------------------------------------------- 1 | import { createAction, props, Action } from '@ngrx/store'; 2 | import { MapSettings } from '../models/map-settings'; 3 | 4 | export const setMapState = createAction('[Map Stuff] Set Map State', props<{ map: MapSettings }>()); -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/state/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ActionReducerMap, 3 | createFeatureSelector, 4 | createSelector 5 | } from '@ngrx/store'; 6 | 7 | import * as myMap from './reducers/map-state.reducer'; 8 | 9 | export interface AppState { 10 | map: myMap.State; 11 | } 12 | 13 | export const reducers: ActionReducerMap = { 14 | map: myMap.reducer 15 | }; 16 | 17 | export const selectMapModule = createFeatureSelector('map'); 18 | export const selectMapState = createSelector(selectMapModule, myMap.selectMapState); 19 | export const selectMaps = createSelector(selectMapState, t => { console.log('selectMapState ', t); return [t]; }); 20 | 21 | 22 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/state/models/map-settings.ts: -------------------------------------------------------------------------------- 1 | export interface MapSettings { 2 | zoom: number; 3 | center: string; 4 | } -------------------------------------------------------------------------------- /sample_apps/data-store/src/app/state/reducers/map-state.reducer.ts: -------------------------------------------------------------------------------- 1 | import { Action, createReducer, on, createFeatureSelector, createSelector } from '@ngrx/store'; 2 | import { createEntityAdapter, EntityState } from '@ngrx/entity'; 3 | 4 | import { MapSettings } from '../models/map-settings'; 5 | import {setMapState} from '../actions/map.actions'; 6 | export interface State extends EntityState {} 7 | 8 | const adapterMap = createEntityAdapter(); 9 | 10 | const mapInitialState: State = adapterMap.getInitialState({ 11 | zoom: 12, 12 | center: "{\"spatialReference\":{\"latestWkid\":3857,\"wkid\":102100},\"x\":-1367424.95,\"y\":-4455144.78}" 13 | }); 14 | 15 | const mapReducer = createReducer( 16 | mapInitialState, 17 | on(setMapState, (state, { map }) => ({ 18 | ids: null, 19 | entities: null, 20 | zoom: map.zoom, center: map.center 21 | })) 22 | ) 23 | 24 | export function reducer(state: State | undefined, action: Action) { 25 | console.log('reduce') 26 | return mapReducer(state, action); 27 | } 28 | 29 | export const selectMapState = (state: State) => { 30 | let s: any; 31 | (state === undefined) ? s = mapInitialState : s = state; 32 | return s; 33 | } -------------------------------------------------------------------------------- /sample_apps/data-store/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/data-store/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/data-store/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/data-store/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/data-store/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | data-store 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import 'https://s3-us-west-1.amazonaws.com/patterns.esri.com/files/calcite-web/1.2.4/css/calcite-web.min.css'; 3 | body { 4 | font-family: "Lato", sans-serif; 5 | } -------------------------------------------------------------------------------- /sample_apps/data-store/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/data-store/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/data-store/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["src/test.ts", "src/**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/data-store/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | }, 22 | "angularCompilerOptions": { 23 | "fullTemplateTypeCheck": true, 24 | "strictInjectionParameters": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /sample_apps/simple-map-state/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to project1!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .eds-header{ 2 | height: 60px; 3 | margin: 30px 0; 4 | } 5 | 6 | .eds-nav{ 7 | 8 | } 9 | 10 | .eds-body{ 11 | 12 | } 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 |
9 | 10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { RouterModule } from '@angular/router'; 4 | 5 | import { AppComponent } from './app.component'; 6 | import { EsriMapComponent } from './esri-map/esri-map.component'; 7 | import { HeaderComponent } from './header/header.component'; 8 | import { NavigationComponent } from './navigation/navigation.component'; 9 | import { DashboardComponent } from './dashboard/dashboard.component'; 10 | 11 | import { MapStateService } from './services/map-state.service'; 12 | 13 | import { ScrollingModule } from '@angular/cdk/scrolling'; 14 | 15 | const routes = [ 16 | { path: 'map', component: EsriMapComponent }, 17 | { path: 'dashboard', component: DashboardComponent }, 18 | { path: '**', redirectTo: '/map' } 19 | ]; 20 | 21 | @NgModule({ 22 | declarations: [ 23 | AppComponent, 24 | EsriMapComponent, 25 | HeaderComponent, 26 | NavigationComponent, 27 | DashboardComponent 28 | ], 29 | imports: [ 30 | BrowserModule, 31 | RouterModule.forRoot(routes), 32 | ScrollingModule 33 | ], 34 | providers: [MapStateService], 35 | bootstrap: [AppComponent] 36 | }) 37 | export class AppModule { } 38 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/dashboard/dashboard.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/simple-map-state/src/app/dashboard/dashboard.component.css -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/dashboard/dashboard.component.html: -------------------------------------------------------------------------------- 1 |

2 | Lorem ipsum dolor sit amet, mei solum abhorreant scribentur ad, erant saepe diceret an pri. Ne vix diam aliquando consequuntur, sed ei timeam deleniti, an omnis utroque vim. Labitur discere appellantur eam eu. Animal verterem definitionem ne sea. An enim prodesset dissentiunt mel, nihil possit contentiones pri ea. Malis intellegam no nam, est ut interesset reformidans ullamcorper. 3 | 4 |

5 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/dashboard/dashboard.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | import { Component, OnInit } from '@angular/core'; 15 | 16 | @Component({ 17 | selector: 'app-dashboard', 18 | templateUrl: './dashboard.component.html', 19 | styleUrls: ['./dashboard.component.css'] 20 | }) 21 | export class DashboardComponent implements OnInit { 22 | 23 | constructor() { } 24 | 25 | ngOnInit() { 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | 2 | /* import the required JSAPI css */ 3 | @import 'https://js.arcgis.com/4.14/esri/css/main.css'; 4 | 5 | .esri-view { 6 | height: 500px; 7 | } 8 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | import { AppComponent } from '../app.component'; 5 | 6 | describe('EsriMapComponent', () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }) 15 | .compileComponents(); 16 | fixture = TestBed.createComponent(EsriMapComponent); 17 | app = fixture.debugElement.componentInstance; 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | })); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should create MapView', () => { 27 | const compiled = fixture.debugElement.nativeElement; 28 | expect(compiled.querySelector('mapViewNode')).toBeDefined(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/header/header.component.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | font-size: 1.4em; 3 | font-family: "Lato", sans-serif; 4 | } 5 | .header-tag { 6 | font-family: "Lato", sans-serif; 7 | } 8 | 9 | .point-viewport { 10 | height: 60px; 11 | width: 50%; 12 | border: 1px solid lightgray; 13 | } 14 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/header/header.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{header}} 3 |

4 |
5 | {{header_tag}} 6 |
7 | 8 | 9 | 10 |
11 | {{point}} 12 |
13 |
14 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/map-store.class.ts: -------------------------------------------------------------------------------- 1 | import { Observable, BehaviorSubject } from 'rxjs'; 2 | 3 | export class MapStore { 4 | 5 | private state$: BehaviorSubject; 6 | 7 | protected constructor(initialState: T) { 8 | this.state$ = new BehaviorSubject(initialState); 9 | } 10 | 11 | getValue(): T { 12 | if (typeof this.state$ !== 'undefined') { 13 | return this.state$.getValue(); 14 | } 15 | } 16 | 17 | getState(): Observable { 18 | if (typeof this.state$ !== 'undefined') { 19 | console.log('getState', this.state$); 20 | return this.state$.asObservable(); 21 | } 22 | else { 23 | console.error('State is not set in map-store'); 24 | } 25 | } 26 | 27 | setState(nextState: T): void { 28 | if(typeof this.state$ === 'undefined'){ 29 | this.state$ = new BehaviorSubject(nextState); 30 | } 31 | else { 32 | this.state$.next(nextState); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/navigation/navigation.component.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/navigation/navigation.component.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/app/navigation/navigation.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2020 Esri 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | import { Component, OnInit } from '@angular/core'; 14 | 15 | @Component({ 16 | selector: 'app-navigation', 17 | templateUrl: './navigation.component.html', 18 | styleUrls: ['./navigation.component.css'] 19 | }) 20 | export class NavigationComponent implements OnInit { 21 | 22 | constructor() { } 23 | 24 | ngOnInit() { 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/simple-map-state/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/simple-map-state/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | simple-map-state 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | @import 'https://s3-us-west-1.amazonaws.com/patterns.esri.com/files/calcite-web/1.2.4/css/calcite-web.min.css'; 3 | body { 4 | font-family: "Lato", sans-serif; 5 | } -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.d.ts"], 9 | "exclude": ["src/test.ts", "src/**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/simple-map-state/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | }, 22 | "angularCompilerOptions": { 23 | "fullTemplateTypeCheck": true, 24 | "strictInjectionParameters": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # profiling files 12 | chrome-profiler-events.json 13 | speed-measure-plugin.json 14 | 15 | # IDEs and editors 16 | /.idea 17 | .project 18 | .classpath 19 | .c9/ 20 | *.launch 21 | .settings/ 22 | *.sublime-workspace 23 | 24 | # IDE - VSCode 25 | .vscode/* 26 | !.vscode/settings.json 27 | !.vscode/tasks.json 28 | !.vscode/launch.json 29 | !.vscode/extensions.json 30 | .history/* 31 | 32 | # misc 33 | /.sass-cache 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | npm-debug.log 38 | yarn-error.log 39 | testem.log 40 | /typings 41 | 42 | # System Files 43 | .DS_Store 44 | Thumbs.db 45 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/autocomplete_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/types-for-arcgis-js-api/autocomplete_screenshot.png -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('Welcome to project1!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | })); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/types-for-arcgis-js-api/src/app/app.component.css -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 | Welcome to {{ title }}! 5 |

6 | Angular Logo 7 |
8 |

Here are some links to help you start:

9 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | import { EsriMapComponent } from './esri-map/esri-map.component'; 7 | 8 | 9 | @NgModule({ 10 | declarations: [ 11 | AppComponent, 12 | EsriMapComponent 13 | ], 14 | imports: [ 15 | BrowserModule 16 | ], 17 | providers: [], 18 | bootstrap: [AppComponent] 19 | }) 20 | export class AppModule { } 21 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/esri-map/esri-map.component.css: -------------------------------------------------------------------------------- 1 | /* import the required JSAPI css */ 2 | @import 'https://js.arcgis.com/4.10/esri/css/main.css'; 3 | 4 | .esri-view { 5 | height: 500px; 6 | } 7 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | import { AppComponent } from '../app.component'; 5 | 6 | describe('EsriMapComponent', () => { 7 | let component: EsriMapComponent; 8 | let fixture: ComponentFixture; 9 | let app: any; // debugElement.componentInstance 10 | 11 | beforeEach(async(() => { 12 | TestBed.configureTestingModule({ 13 | declarations: [EsriMapComponent] 14 | }) 15 | .compileComponents(); 16 | fixture = TestBed.createComponent(EsriMapComponent); 17 | app = fixture.debugElement.componentInstance; 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | })); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | 26 | it('should create MapView', () => { 27 | const compiled = fixture.debugElement.nativeElement; 28 | expect(compiled.querySelector('mapViewNode')).toBeDefined(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/types-for-arcgis-js-api/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/types-for-arcgis-js-api/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 4-esri-types 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, '../coverage/project1'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | body { 3 | font-family: "Lato", sans-serif; 4 | } 5 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": [ 8 | "main.ts", 9 | "polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node", 8 | "arcgis-js-api" 9 | ] 10 | }, 11 | "files": [ 12 | "test.ts", 13 | "polyfills.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sample_apps/types-for-arcgis-js-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "downlevelIteration": true, 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "emitDecoratorMetadata": true, 12 | "experimentalDecorators": true, 13 | "importHelpers": true, 14 | "target": "es2015", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sample_apps/webpack/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /sample_apps/webpack/extra-webpack.config.js: -------------------------------------------------------------------------------- 1 | const ArcGISPlugin = require('@arcgis/webpack-plugin'); 2 | /** 3 | * Configuration items defined here will be appended to the end of the existing webpack config defined by the Angular CLI. 4 | * 5 | * Note: devtool setting is set for fastest build time: https://webpack.js.org/configuration/devtool/ 6 | */ 7 | module.exports = { 8 | plugins: [new ArcGISPlugin()], 9 | node: { 10 | process: false, 11 | global: false, 12 | fs: "empty" 13 | }, 14 | devtool: 'eval' 15 | } -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 | Welcome to 5 | 6 | ArcGIS API for JavaScript 7 | 8 |
9 | And, arcgis-webpack-plugin 10 |
11 | with . . . 12 |

13 | Angular Logo 15 |
16 | 17 | 19 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .title { 2 | font-family: Arial, Helvetica, sans-serif; 3 | text-align: center; 4 | } -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from "@angular/core/testing"; 2 | import { AppComponent } from "./app.component"; 3 | import { EsriMapComponent } from "./esri-map/esri-map.component"; 4 | 5 | describe("AppComponent", () => { 6 | let fixture; 7 | let app: any; 8 | 9 | beforeEach(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [AppComponent, EsriMapComponent] 12 | }).compileComponents(); 13 | 14 | fixture = TestBed.createComponent(AppComponent); 15 | app = fixture.debugElement.componentInstance; 16 | }); 17 | 18 | it("should create the app", async(() => { 19 | expect(app).toBeTruthy(); 20 | })); 21 | 22 | it("should set zoom level", async(() => { 23 | expect(app.mapZoomLevel).toEqual(jasmine.any(Number)); 24 | })); 25 | 26 | it("should set basemap type", async(() => { 27 | expect(app.basemapType).toEqual(jasmine.any(String)); 28 | expect(app.basemapType).toEqual("satellite"); 29 | })); 30 | 31 | it("should set map center location", async(() => { 32 | expect(app.mapCenter).toEqual(jasmine.any(Array)); 33 | expect(app.mapCenter.length).toEqual(2); 34 | })); 35 | 36 | it("zoom has a default value", async(() => { 37 | expect(app.mapZoomLevel).toBeGreaterThanOrEqual(0); 38 | expect(app.mapZoomLevel).toBeLessThanOrEqual(24); 39 | })); 40 | }); -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.scss'] 7 | }) 8 | 9 | export class AppComponent { 10 | // Set our map properties 11 | mapCenter = [-122.4194, 37.7749]; 12 | basemapType = 'satellite'; 13 | mapZoomLevel = 12; 14 | 15 | // See app.component.html 16 | mapLoadedEvent(status: boolean) { 17 | console.log('The map loaded: ' + status); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from "@angular/platform-browser"; 2 | import { NgModule } from "@angular/core"; 3 | 4 | import { AppComponent } from "./app.component"; 5 | import { EsriMapComponent } from "./esri-map/esri-map.component"; 6 | 7 | @NgModule({ 8 | declarations: [AppComponent, EsriMapComponent], 9 | imports: [BrowserModule], 10 | providers: [], 11 | bootstrap: [AppComponent] 12 | }) 13 | export class AppModule {} 14 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/esri-map/esri-map.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/esri-map/esri-map.component.scss: -------------------------------------------------------------------------------- 1 | /* import the required JSAPI css */ 2 | @import url('https://js.arcgis.com/4.14/esri/themes/light/main.css'); 3 | 4 | .esri-view { 5 | height: 500px; 6 | } 7 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/app/esri-map/esri-map.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { EsriMapComponent } from './esri-map.component'; 4 | 5 | describe('EsriMapComponent', () => { 6 | let component: EsriMapComponent; 7 | let fixture: ComponentFixture; 8 | let app: any; // debugElement.componentInstance 9 | 10 | beforeEach(async(() => { 11 | TestBed.configureTestingModule({ 12 | declarations: [EsriMapComponent] 13 | }) 14 | .compileComponents(); 15 | fixture = TestBed.createComponent(EsriMapComponent); 16 | app = fixture.debugElement.componentInstance; 17 | component = fixture.componentInstance; 18 | fixture.detectChanges(); 19 | })); 20 | 21 | it('should create', () => { 22 | expect(component).toBeTruthy(); 23 | }); 24 | 25 | it('verify default values', () => { 26 | expect(app.basemap).toEqual(jasmine.any(String)); 27 | expect(app.center).toEqual(jasmine.any(Array)); 28 | expect(app.zoom).toEqual(jasmine.any(Number)); 29 | expect(app.mapLoaded).toEqual(false); 30 | }); 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/webpack/src/assets/.gitkeep -------------------------------------------------------------------------------- /sample_apps/webpack/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andygup/angular-plus-arcgis-javascript-ds2020/b61751f2a55b50d2046bf40dbf9fdeeec296b6b8/sample_apps/webpack/src/favicon.ico -------------------------------------------------------------------------------- /sample_apps/webpack/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularCliEsriWebpack 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /sample_apps/webpack/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /sample_apps/webpack/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": ["arcgis-js-api"] 6 | }, 7 | "files": ["src/main.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["src/test.ts", "src/**/*.spec.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /sample_apps/webpack/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "noImplicitAny": true, 11 | "esModuleInterop": true, 12 | "module": "esnext", 13 | "moduleResolution": "node", 14 | "importHelpers": true, 15 | "target": "es5", 16 | "typeRoots": [ 17 | "node_modules/@types" 18 | ], 19 | "lib": [ 20 | "dom", 21 | "es2015.promise", 22 | "es5", 23 | "es6" 24 | ] 25 | } 26 | // [NOTE: these options simply haven't been tested yet with the angular-cli-esri-map components] 27 | // "angularCompilerOptions": { 28 | // "fullTemplateTypeCheck": true, 29 | // "strictInjectionParameters": true 30 | // } 31 | } 32 | -------------------------------------------------------------------------------- /sample_apps/webpack/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": ["jasmine", "node", "arcgis-js-api"] 6 | }, 7 | "files": ["src/test.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] 9 | } 10 | --------------------------------------------------------------------------------