├── .bowerrc ├── .editorconfig ├── .ember-cli ├── .eslintrc.js ├── .gitignore ├── .idea └── jsLinters │ └── jshint.xml ├── .npmignore ├── .travis.yml ├── .watchmanconfig ├── LICENSE.md ├── README.md ├── lerna.json ├── package-lock.json ├── package.json ├── packages ├── ember-cli-google-analytics │ ├── .editorconfig │ ├── .ember-cli │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ └── ci.yml │ ├── .gitignore │ ├── .npmignore │ ├── .prettierignore │ ├── .stylelintignore │ ├── .stylelintrc.js │ ├── .template-lintrc.js │ ├── .watchmanconfig │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── addon │ │ ├── .gitkeep │ │ ├── initializers │ │ │ └── g-analytics.js │ │ └── services │ │ │ └── gtag.js │ ├── app │ │ ├── .gitkeep │ │ ├── initializers │ │ │ └── g-analytics.js │ │ └── services │ │ │ └── gtag.js │ ├── blueprints │ │ └── @onehilltech │ │ │ └── ember-cli-google-analytics │ │ │ └── index.js │ ├── ember-cli-build.js │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── testem.js │ ├── tests │ │ ├── dummy │ │ │ ├── app │ │ │ │ ├── app.js │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ ├── controllers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── index.html │ │ │ │ ├── models │ │ │ │ │ └── .gitkeep │ │ │ │ ├── router.js │ │ │ │ ├── routes │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── application.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── messages.js │ │ │ │ ├── styles │ │ │ │ │ └── app.css │ │ │ │ └── templates │ │ │ │ │ ├── application.hbs │ │ │ │ │ ├── index.hbs │ │ │ │ │ └── messages.hbs │ │ │ ├── config │ │ │ │ ├── ember-cli-update.json │ │ │ │ ├── ember-try.js │ │ │ │ ├── environment.js │ │ │ │ ├── optional-features.json │ │ │ │ └── targets.js │ │ │ └── public │ │ │ │ └── robots.txt │ │ ├── helpers │ │ │ └── index.js │ │ ├── index.html │ │ ├── integration │ │ │ └── .gitkeep │ │ ├── test-helper.js │ │ └── unit │ │ │ ├── .gitkeep │ │ │ ├── initializers │ │ │ ├── g-analytics-init-test.js │ │ │ └── g-analytics-test.js │ │ │ └── services │ │ │ ├── g-analytics-test.js │ │ │ └── gtag-test.js │ └── tsconfig.declarations.json ├── ember-cli-google-charts │ ├── .editorconfig │ ├── .ember-cli │ ├── .eslintrc.js │ ├── .gitignore │ ├── .npmignore │ ├── .travis.yml │ ├── .watchmanconfig │ ├── LICENSE.md │ ├── README.md │ ├── addon │ │ ├── .gitkeep │ │ ├── components │ │ │ ├── g-areachart.js │ │ │ ├── g-barchart.js │ │ │ ├── g-bubblechart.js │ │ │ ├── g-columnchart.js │ │ │ ├── g-geochart.js │ │ │ ├── g-linechart.js │ │ │ └── g-piechart.js │ │ ├── lib │ │ │ ├── g-chart.js │ │ │ ├── g-xychart.js │ │ │ └── options │ │ │ │ ├── animation.js │ │ │ │ ├── annotations.js │ │ │ │ ├── crosshair.js │ │ │ │ ├── explorer.js │ │ │ │ ├── font.js │ │ │ │ ├── haxis.js │ │ │ │ ├── legend.js │ │ │ │ ├── line.js │ │ │ │ ├── point.js │ │ │ │ ├── title.js │ │ │ │ └── vaxis.js │ │ ├── services │ │ │ └── g-charts.js │ │ └── templates │ │ │ └── components │ │ │ ├── g-areachart.hbs │ │ │ ├── g-barchart.hbs │ │ │ ├── g-bubblechart.hbs │ │ │ ├── g-chart.hbs │ │ │ ├── g-columnchart.hbs │ │ │ ├── g-geochart.hbs │ │ │ ├── g-linechart.hbs │ │ │ └── g-piechart.hbs │ ├── app │ │ ├── .gitkeep │ │ ├── components │ │ │ ├── g-areachart.js │ │ │ ├── g-barchart.js │ │ │ ├── g-bubblechart.js │ │ │ ├── g-columnchart.js │ │ │ ├── g-geochart.js │ │ │ ├── g-linechart.js │ │ │ └── g-piechart.js │ │ ├── services │ │ │ └── g-charts.js │ │ └── templates │ │ │ └── g-chart.js │ ├── config │ │ ├── ember-try.js │ │ └── environment.js │ ├── ember-cli-build.js │ ├── index.js │ ├── package.json │ ├── testem.js │ ├── tests │ │ ├── .eslintrc.js │ │ ├── dummy │ │ │ ├── app │ │ │ │ ├── app.js │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ ├── controllers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── index.html │ │ │ │ ├── models │ │ │ │ │ └── .gitkeep │ │ │ │ ├── resolver.js │ │ │ │ ├── router.js │ │ │ │ ├── routes │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── barchart.js │ │ │ │ │ ├── columnchart.js │ │ │ │ │ └── linechart.js │ │ │ │ ├── styles │ │ │ │ │ └── app.css │ │ │ │ └── templates │ │ │ │ │ ├── application.hbs │ │ │ │ │ ├── barchart.hbs │ │ │ │ │ ├── columnchart.hbs │ │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── linechart.hbs │ │ │ ├── config │ │ │ │ ├── environment.js │ │ │ │ └── targets.js │ │ │ └── public │ │ │ │ ├── crossdomain.xml │ │ │ │ └── robots.txt │ │ ├── helpers │ │ │ ├── destroy-app.js │ │ │ ├── module-for-acceptance.js │ │ │ ├── resolver.js │ │ │ └── start-app.js │ │ ├── index.html │ │ ├── integration │ │ │ ├── .gitkeep │ │ │ └── components │ │ │ │ ├── g-areachart-test.js │ │ │ │ ├── g-barchart-test.js │ │ │ │ ├── g-bubblechart-test.js │ │ │ │ ├── g-columnchart-test.js │ │ │ │ ├── g-geochart-test.js │ │ │ │ ├── g-linechart-test.js │ │ │ │ └── g-piechart-test.js │ │ ├── test-helper.js │ │ └── unit │ │ │ ├── .gitkeep │ │ │ └── services │ │ │ └── g-charts-test.js │ └── vendor │ │ └── .gitkeep ├── ember-cli-google-maps │ ├── .editorconfig │ ├── .ember-cli │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ └── ci.yml │ ├── .gitignore │ ├── .npmignore │ ├── .prettierignore │ ├── .prettierrc.js │ ├── .stylelintignore │ ├── .stylelintrc.js │ ├── .template-lintrc.js │ ├── .travis.yml │ ├── .watchmanconfig │ ├── CONTRIBUTING.md │ ├── README.md │ ├── addon │ │ ├── .gitkeep │ │ ├── components │ │ │ ├── g-circle.hbs │ │ │ ├── g-circle.js │ │ │ ├── g-directions.hbs │ │ │ ├── g-directions.js │ │ │ ├── g-heatmap-layer.hbs │ │ │ ├── g-heatmap-layer.js │ │ │ ├── g-map.hbs │ │ │ ├── g-map.js │ │ │ ├── g-marker.hbs │ │ │ ├── g-marker.js │ │ │ ├── g-rectangle.hbs │ │ │ ├── g-rectangle.js │ │ │ ├── g-static-map.hbs │ │ │ └── g-static-map.js │ │ ├── helpers │ │ │ └── directions-url.js │ │ ├── lib │ │ │ ├── entity.js │ │ │ └── get-options.js │ │ ├── mixins │ │ │ └── map-entity.js │ │ ├── services │ │ │ └── g-maps.js │ │ └── styles │ │ │ └── addon.css │ ├── app │ │ ├── .gitkeep │ │ ├── components │ │ │ ├── g-circle.js │ │ │ ├── g-directions.js │ │ │ ├── g-heatmap-layer.js │ │ │ ├── g-map.js │ │ │ ├── g-marker.js │ │ │ ├── g-rectangle.js │ │ │ └── g-static-map.js │ │ ├── helpers │ │ │ └── directions-url.js │ │ └── services │ │ │ ├── g-maps-visualization.js │ │ │ └── g-maps.js │ ├── blueprints │ │ └── ember-cli-google-maps │ │ │ └── index.js │ ├── ember-cli-build.js │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── testem.js │ ├── tests │ │ ├── dummy │ │ │ ├── app │ │ │ │ ├── app.js │ │ │ │ ├── components │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── g-custom-marker.js │ │ │ │ ├── controllers │ │ │ │ │ ├── .gitkeep │ │ │ │ │ └── index.js │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── index.html │ │ │ │ ├── models │ │ │ │ │ └── .gitkeep │ │ │ │ ├── router.js │ │ │ │ ├── routes │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── index.js │ │ │ │ │ └── static-map.js │ │ │ │ ├── styles │ │ │ │ │ └── app.scss │ │ │ │ └── templates │ │ │ │ │ ├── application.hbs │ │ │ │ │ ├── components │ │ │ │ │ └── g-custom-marker.hbs │ │ │ │ │ ├── index.hbs │ │ │ │ │ └── static-map.hbs │ │ │ ├── config │ │ │ │ ├── ember-cli-update.json │ │ │ │ ├── ember-try.js │ │ │ │ ├── environment.js │ │ │ │ ├── optional-features.json │ │ │ │ └── targets.js │ │ │ └── public │ │ │ │ └── robots.txt │ │ ├── helpers │ │ │ └── index.js │ │ ├── index.html │ │ ├── integration │ │ │ ├── .gitkeep │ │ │ ├── components │ │ │ │ ├── g-circle-test.js │ │ │ │ ├── g-directions-test.js │ │ │ │ ├── g-heatmap-layer-test.js │ │ │ │ ├── g-map-test.js │ │ │ │ ├── g-marker-test.js │ │ │ │ ├── g-rectangle-test.js │ │ │ │ └── g-static-map-test.js │ │ │ └── helpers │ │ │ │ └── directions-url-test.js │ │ ├── test-helper.js │ │ └── unit │ │ │ ├── .gitkeep │ │ │ ├── mixins │ │ │ └── map-entity-test.js │ │ │ └── services │ │ │ ├── g-maps-test.js │ │ │ └── g-maps-visualization-test.js │ ├── tsconfig.declarations.json │ └── yarn.lock ├── ember-cli-google-recaptcha │ ├── .editorconfig │ ├── .ember-cli │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .github │ │ └── workflows │ │ │ └── ci.yml │ ├── .gitignore │ ├── .npmignore │ ├── .prettierignore │ ├── .prettierrc.js │ ├── .stylelintignore │ ├── .stylelintrc.js │ ├── .template-lintrc.js │ ├── .watchmanconfig │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── addon │ │ ├── -private │ │ │ └── g-recaptcha-base.js │ │ ├── .gitkeep │ │ ├── components │ │ │ ├── g-recaptcha-invisible.hbs │ │ │ ├── g-recaptcha-invisible.js │ │ │ ├── g-recaptcha-v2.hbs │ │ │ └── g-recaptcha-v2.js │ │ └── services │ │ │ └── g-recaptcha.js │ ├── app │ │ ├── .gitkeep │ │ ├── components │ │ │ ├── g-recaptcha-invisible.js │ │ │ └── g-recaptcha-v2.js │ │ └── services │ │ │ ├── g-recaptcha-v3.js │ │ │ └── g-recaptcha.js │ ├── blueprints │ │ └── ember-cli-google-recaptcha │ │ │ └── index.js │ ├── ember-cli-build.js │ ├── index.js │ ├── package-lock.json │ ├── package.json │ ├── testem.js │ ├── tests │ │ ├── .eslintrc.js │ │ ├── dummy │ │ │ ├── app │ │ │ │ ├── app.js │ │ │ │ ├── components │ │ │ │ │ └── .gitkeep │ │ │ │ ├── controllers │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── invisible.js │ │ │ │ │ └── v2.js │ │ │ │ ├── helpers │ │ │ │ │ └── .gitkeep │ │ │ │ ├── index.html │ │ │ │ ├── models │ │ │ │ │ └── .gitkeep │ │ │ │ ├── router.js │ │ │ │ ├── routes │ │ │ │ │ ├── .gitkeep │ │ │ │ │ ├── index.js │ │ │ │ │ ├── invisible.js │ │ │ │ │ └── v2.js │ │ │ │ ├── styles │ │ │ │ │ └── app.css │ │ │ │ └── templates │ │ │ │ │ ├── application.hbs │ │ │ │ │ ├── index.hbs │ │ │ │ │ ├── invisible.hbs │ │ │ │ │ └── v2.hbs │ │ │ ├── config │ │ │ │ ├── ember-cli-update.json │ │ │ │ ├── ember-try.js │ │ │ │ ├── environment.js │ │ │ │ ├── optional-features.json │ │ │ │ └── targets.js │ │ │ └── public │ │ │ │ ├── crossdomain.xml │ │ │ │ └── robots.txt │ │ ├── helpers │ │ │ ├── destroy-app.js │ │ │ ├── index.js │ │ │ ├── module-for-acceptance.js │ │ │ ├── resolver.js │ │ │ └── start-app.js │ │ ├── index.html │ │ ├── integration │ │ │ ├── .gitkeep │ │ │ └── components │ │ │ │ ├── g-recaptcha-invisible-test.js │ │ │ │ └── g-recaptcha-v2-test.js │ │ ├── test-helper.js │ │ └── unit │ │ │ ├── .gitkeep │ │ │ └── services │ │ │ ├── g-recaptcha-test.js │ │ │ └── g-recaptcha-v3-test.js │ └── tsconfig.declarations.json └── ember-cli-google │ ├── README.md │ ├── addon │ └── .gitkeep │ ├── app │ └── .gitkeep │ ├── blueprints │ └── ember-cli-google │ │ └── index.js │ ├── bower.json │ ├── config │ ├── ember-try.js │ └── environment.js │ ├── ember-cli-build.js │ ├── index.js │ ├── package.json │ ├── testem.js │ ├── tests │ ├── .eslintrc.js │ ├── .jshintrc │ ├── dummy │ │ ├── app │ │ │ ├── app.js │ │ │ ├── components │ │ │ │ └── .gitkeep │ │ │ ├── controllers │ │ │ │ └── .gitkeep │ │ │ ├── helpers │ │ │ │ └── .gitkeep │ │ │ ├── index.html │ │ │ ├── models │ │ │ │ └── .gitkeep │ │ │ ├── resolver.js │ │ │ ├── router.js │ │ │ ├── routes │ │ │ │ └── .gitkeep │ │ │ ├── styles │ │ │ │ └── app.css │ │ │ └── templates │ │ │ │ ├── application.hbs │ │ │ │ └── components │ │ │ │ └── .gitkeep │ │ ├── config │ │ │ ├── environment.js │ │ │ └── targets.js │ │ └── public │ │ │ ├── crossdomain.xml │ │ │ └── robots.txt │ ├── helpers │ │ ├── destroy-app.js │ │ ├── module-for-acceptance.js │ │ ├── resolver.js │ │ └── start-app.js │ ├── index.html │ ├── integration │ │ └── .gitkeep │ ├── test-helper.js │ └── unit │ │ └── .gitkeep │ └── vendor │ └── .gitkeep └── yarn.lock /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components", 3 | "analytics": false 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parserOptions: { 4 | ecmaVersion: 2017, 5 | sourceType: 'module' 6 | }, 7 | extends: 'eslint:recommended', 8 | env: { 9 | browser: true 10 | }, 11 | rules: { 12 | }, 13 | 14 | globals: { 15 | "google": true 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /bower_components 2 | /config/ember-try.js 3 | /dist 4 | /tests 5 | /tmp 6 | **/.gitkeep 7 | .bowerrc 8 | .editorconfig 9 | .ember-cli 10 | .gitignore 11 | .eslintrc.js 12 | .watchmanconfig 13 | .travis.yml 14 | bower.json 15 | ember-cli-build.js 16 | testem.js 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "4" 5 | 6 | sudo: false 7 | 8 | cache: 9 | directories: 10 | - $HOME/.npm 11 | 12 | env: 13 | # we recommend testing LTS's and latest stable release (bonus points to beta/canary) 14 | - EMBER_TRY_SCENARIO=ember-lts-2.4 15 | - EMBER_TRY_SCENARIO=ember-lts-2.8 16 | - EMBER_TRY_SCENARIO=ember-release 17 | - EMBER_TRY_SCENARIO=ember-beta 18 | - EMBER_TRY_SCENARIO=ember-canary 19 | - EMBER_TRY_SCENARIO=ember-default 20 | 21 | matrix: 22 | fast_finish: true 23 | allow_failures: 24 | - env: EMBER_TRY_SCENARIO=ember-canary 25 | 26 | before_install: 27 | - npm config set spin false 28 | - npm install -g phantomjs-prebuilt 29 | - phantomjs --version 30 | 31 | install: 32 | - npm install 33 | 34 | script: 35 | # Usually, it's ok to finish the test scenario without reverting 36 | # to the addon's original dependency state, skipping "cleanup". 37 | - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup 38 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ember-cli-google 2 | ================================================================= 3 | 4 | 5 | EmberJS add-on for a variety of Google services and products. 6 | 7 | 8 | Features 9 | ----------------------------------------------------------------- 10 | 11 | 12 | * Designed to support seamless integration into an EmberJS application. 13 | * Proper binding of attributes to options for real-time, dynamic updates. 14 | * Handle events as actions for interactive designs. 15 | * Auto-loading and configuring of scripts that correspond with appropriate lifecycle events. 16 | 17 | 18 | Supported Products 19 | ----------------------------------------------------------------- 20 | 21 | * [ember-cli-google-analytics](https://github.com/onehilltech/ember-cli-google/tree/master/packages/ember-cli-google-analytics) 22 | * [ember-cli-google-charts](https://github.com/onehilltech/ember-cli-google/tree/master/packages/ember-cli-google-charts) 23 | * [ember-cli-google-maps](https://github.com/onehilltech/ember-cli-google/tree/master/packages/ember-cli-google-maps) 24 | * [ember-cli-google-recaptcha](https://github.com/onehilltech/ember-cli-google/tree/master/packages/ember-cli-google-recaptcha) 25 | 26 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "command": { 6 | "publish": { 7 | "ignoreChanges": [ 8 | "ignored-file", 9 | "*.md", 10 | "package.json" 11 | ] 12 | } 13 | }, 14 | "version": "independent" 15 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-google", 3 | "private": false, 4 | "description": "A collection of ember-cli addons for Google services", 5 | "license": "Apache-2.0", 6 | "author": "James H. Hill ", 7 | "repository": "github:onehilltech/ember-cli-google", 8 | "devDependencies": { 9 | "lerna": "^3.4.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.hbs] 16 | insert_final_newline = false 17 | 18 | [*.{diff,md}] 19 | trim_trailing_whitespace = false 20 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript 4 | rather than JavaScript by default, when a TypeScript version of a given blueprint is available. 5 | */ 6 | "isTypeScriptProject": false 7 | } 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # misc 8 | /coverage/ 9 | !.* 10 | .*/ 11 | 12 | # ember-try 13 | /.node_modules.ember-try/ 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.eslintrc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | root: true, 5 | parser: "@babel/eslint-parser", 6 | parserOptions: { 7 | ecmaVersion: "latest", 8 | sourceType: "module", 9 | requireConfigFile: false, 10 | babelOptions: { 11 | plugins: [ 12 | ["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }], 13 | ], 14 | }, 15 | }, 16 | plugins: ["ember"], 17 | extends: [ 18 | "eslint:recommended", 19 | "plugin:ember/recommended", 20 | "plugin:prettier/recommended", 21 | ], 22 | env: { 23 | browser: true, 24 | }, 25 | rules: {}, 26 | overrides: [ 27 | // node files 28 | { 29 | files: [ 30 | "./.eslintrc.js", 31 | "./.prettierrc.js", 32 | "./.stylelintrc.js", 33 | "./.template-lintrc.js", 34 | "./ember-cli-build.js", 35 | "./index.js", 36 | "./testem.js", 37 | "./blueprints/*/index.js", 38 | "./config/**/*.js", 39 | "./tests/dummy/config/**/*.js", 40 | ], 41 | parserOptions: { 42 | sourceType: "script", 43 | }, 44 | env: { 45 | browser: false, 46 | node: true, 47 | }, 48 | extends: ["plugin:n/recommended"], 49 | }, 50 | { 51 | // test files 52 | files: ["tests/**/*-test.{js,ts}"], 53 | extends: ["plugin:qunit/recommended"], 54 | }, 55 | ], 56 | }; 57 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | pull_request: {} 9 | 10 | concurrency: 11 | group: ci-${{ github.head_ref || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | test: 16 | name: "Tests" 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 10 19 | 20 | steps: 21 | - uses: actions/checkout@v3 22 | - name: Install Node 23 | uses: actions/setup-node@v3 24 | with: 25 | node-version: 18 26 | cache: npm 27 | - name: Install Dependencies 28 | run: npm ci 29 | - name: Lint 30 | run: npm run lint 31 | - name: Run Tests 32 | run: npm run test:ember 33 | 34 | floating: 35 | name: "Floating Dependencies" 36 | runs-on: ubuntu-latest 37 | timeout-minutes: 10 38 | 39 | steps: 40 | - uses: actions/checkout@v3 41 | - uses: actions/setup-node@v3 42 | with: 43 | node-version: 18 44 | cache: npm 45 | - name: Install Dependencies 46 | run: npm install --no-shrinkwrap 47 | - name: Run Tests 48 | run: npm run test:ember 49 | 50 | try-scenarios: 51 | name: ${{ matrix.try-scenario }} 52 | runs-on: ubuntu-latest 53 | needs: "test" 54 | timeout-minutes: 10 55 | 56 | strategy: 57 | fail-fast: false 58 | matrix: 59 | try-scenario: 60 | - ember-lts-4.8 61 | - ember-lts-4.12 62 | - ember-release 63 | - ember-beta 64 | - ember-canary 65 | - embroider-safe 66 | - embroider-optimized 67 | 68 | steps: 69 | - uses: actions/checkout@v3 70 | - name: Install Node 71 | uses: actions/setup-node@v3 72 | with: 73 | node-version: 18 74 | cache: npm 75 | - name: Install Dependencies 76 | run: npm ci 77 | - name: Run Tests 78 | run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} 79 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.gitignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /declarations/ 4 | 5 | # dependencies 6 | /node_modules/ 7 | 8 | # misc 9 | /.env* 10 | /.pnp* 11 | /.eslintcache 12 | /coverage/ 13 | /npm-debug.log* 14 | /testem.log 15 | /yarn-error.log 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /npm-shrinkwrap.json.ember-try 20 | /package.json.ember-try 21 | /package-lock.json.ember-try 22 | /yarn.lock.ember-try 23 | 24 | # broccoli-debug 25 | /DEBUG/ 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.npmignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /tmp/ 4 | 5 | # misc 6 | /.editorconfig 7 | /.ember-cli 8 | /.env* 9 | /.eslintcache 10 | /.eslintignore 11 | /.eslintrc.js 12 | /.git/ 13 | /.github/ 14 | /.gitignore 15 | /.prettierignore 16 | /.prettierrc.js 17 | /.stylelintignore 18 | /.stylelintrc.js 19 | /.template-lintrc.js 20 | /.travis.yml 21 | /.watchmanconfig 22 | /CONTRIBUTING.md 23 | /ember-cli-build.js 24 | /testem.js 25 | /tests/ 26 | /yarn-error.log 27 | /yarn.lock 28 | .gitkeep 29 | 30 | # ember-try 31 | /.node_modules.ember-try/ 32 | /npm-shrinkwrap.json.ember-try 33 | /package.json.ember-try 34 | /package-lock.json.ember-try 35 | /yarn.lock.ember-try 36 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.prettierignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # misc 8 | /coverage/ 9 | !.* 10 | .*/ 11 | 12 | # ember-try 13 | /.node_modules.ember-try/ 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.stylelintignore: -------------------------------------------------------------------------------- 1 | # unconventional files 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # addons 8 | /.node_modules.ember-try/ 9 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.stylelintrc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | extends: ["stylelint-config-standard", "stylelint-prettier/recommended"], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | extends: "recommended", 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["dist"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How To Contribute 2 | 3 | ## Installation 4 | 5 | * `git clone ` 6 | * `cd ember-cli-google-analytics` 7 | * `npm install` 8 | 9 | ## Linting 10 | 11 | * `npm run lint` 12 | * `npm run lint:fix` 13 | 14 | ## Running tests 15 | 16 | * `npm run test` – Runs the test suite on the current Ember version 17 | * `npm run test:ember -- --server` – Runs the test suite in "watch mode" 18 | * `npm run test:ember-compatibility` – Runs the test suite against multiple Ember versions 19 | 20 | ## Running the dummy application 21 | 22 | * `npm run start` 23 | * Visit the dummy application at [http://localhost:4200](http://localhost:4200). 24 | 25 | For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/). 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/README.md: -------------------------------------------------------------------------------- 1 | # ember-cli-google-analytics 2 | 3 | EmberJS add-on for Google Analytics 4 | 5 | ember install @onehilltech/ember-cli-google-analytics 6 | 7 | ## Compatibility 8 | 9 | * Ember.js v4.8 or above 10 | * Ember CLI v4.8 or above 11 | * Node.js v18 or above 12 | 13 | ## Configuration 14 | 15 | After you install this add-on, you only need to add your Google analytics settings 16 | to the `config/environment.js` file for basic usage. 17 | 18 | ```javascript 19 | // config/environment.js 20 | 21 | let ENV = { 22 | 'ember-cli-google': { 23 | analytics: { 24 | version: 'v4', 25 | measurementId: 'G-XXXXXXXXXX' 26 | } 27 | } 28 | } 29 | ``` 30 | 31 | ## Initialization 32 | 33 | Ember 5.x deprecated implicit injections from its initializers. This means you have 34 | to manually initialize Google Analytics in your application. The easiest way to initialize 35 | the add-on is to inject the `gtag` service in the `ApplicationRoute`, and override the 36 | `activate()` method to call `gtag.configure()` as shown below. 37 | 38 | > Use the following command to generate the application route: `ember g route application` 39 | 40 | ```javascript 41 | import Route from '@ember/routing/route'; 42 | import { service } from '@ember/service'; 43 | 44 | export default class ApplicationRoute extends Route { 45 | @service 46 | gtag; 47 | 48 | async activate () { 49 | // Pass control to the base class. 50 | await super.activate (...arguments); 51 | 52 | // Configure Google Analytics for our application. 53 | await this.gtag.configure (); 54 | } 55 | } 56 | ``` 57 | 58 | ### Sending custom events to Google Analytics 59 | 60 | You can easily send custom events to Google Analytics by injecting the `gtag` service, and 61 | calling the `event(name, params)` method. Here is an example of tracking the search term from an input 62 | field. 63 | 64 | ```javascript 65 | import Component from '@glimmer/component'; 66 | import { action } from '@ember/object'; 67 | import { inject as service } from '@ember/service'; 68 | 69 | class SearchComponent extends Component { 70 | // Inject the Google Tag Manager service into our component. 71 | @service 72 | gtag; 73 | 74 | @action 75 | searching (ev) { 76 | const { target } = ev; 77 | 78 | // Send an event to Google Analytics. 79 | this.gtag.event ('searching', { term: target.value } ); 80 | } 81 | } 82 | ``` 83 | 84 | Happy Coding! 85 | 86 | 87 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/addon/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/addon/initializers/g-analytics.js: -------------------------------------------------------------------------------- 1 | import { get } from "@ember/object"; 2 | import { deprecate } from "@ember/debug"; 3 | 4 | export function initialize(app) { 5 | const ENV = app.resolveRegistration("config:environment"); 6 | const analytics = get(ENV, "ember-cli-google.analytics"); 7 | 8 | if (analytics.version === "v4") { 9 | if (app.inject) { 10 | deprecate( 11 | "Use of Ember initializers to auto-inject Google Analytics services has been deprecated. Please manually inject @service gtag into your Ember objects.", 12 | false, 13 | ); 14 | 15 | app.inject("route", "gtag", "service:gtag"); 16 | app.inject("controller", "gtag", "service:gtag"); 17 | } else { 18 | console.warn( 19 | "auto-injection is deprecated in Ember 5. Please manually inject @service gtag into your Ember objects.", 20 | ); 21 | } 22 | } else { 23 | if (app.inject) { 24 | deprecate( 25 | "Use of Ember initializers to auto-inject Google Analytics services has been deprecated. Please manually inject @service gAnalytics into your Ember objects.", 26 | false, 27 | ); 28 | 29 | app.inject("route", "analytics", "service:g-analytics"); 30 | app.inject("controller", "analytics", "service:g-analytics"); 31 | } else { 32 | console.warn( 33 | "auto-injection is deprecated in Ember 5. Please manually inject @service gAnalytics into your Ember objects.", 34 | ); 35 | } 36 | } 37 | } 38 | 39 | export default { 40 | initialize, 41 | }; 42 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/addon/services/gtag.js: -------------------------------------------------------------------------------- 1 | import { get } from "@ember/object"; 2 | import Service, { inject as service } from "@ember/service"; 3 | import { getOwner } from "@ember/application"; 4 | import { isEmpty } from "@ember/utils"; 5 | 6 | export default class GtagService extends Service { 7 | async configure (options = {}) { 8 | // Let's make sure there is a dataLayer variable present. We are adding it even 9 | // if we do not enable Google Analytics. This will allow clients to not have to 10 | // check if Google Analytics is turned on. 11 | 12 | window.dataLayer = window.dataLayer || []; 13 | 14 | const ENV = getOwner(this).resolveRegistration('config:environment'); 15 | const { 16 | measurementId = options.measurementId, 17 | forceEnable = options.forceEnable, 18 | } = get (ENV, 'ember-cli-google.analytics') || {}; 19 | 20 | if (ENV.environment === 'production' || forceEnable) { 21 | // We only load the script if we are running in production mode. Otherwise, we 22 | // run the risk of taking measurements of the application executed in the 23 | // development environment. 24 | 25 | if (isEmpty(measurementId)) { 26 | throw new Error('You must define the measurementId property in config/environment.'); 27 | } 28 | 29 | await this.script.load(`https://www.googletagmanager.com/gtag/js?id=${measurementId}`); 30 | 31 | this.push('js', new Date()); 32 | this.push('config', measurementId); 33 | } 34 | } 35 | 36 | @service 37 | script; 38 | 39 | push() { 40 | window.dataLayer.push(arguments); 41 | } 42 | 43 | event(name, params) { 44 | this.push({ event: name, ...params }); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/app/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/app/initializers/g-analytics.js: -------------------------------------------------------------------------------- 1 | export { 2 | default, 3 | initialize, 4 | } from "@onehilltech/ember-cli-google-analytics/initializers/g-analytics"; 5 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/app/services/gtag.js: -------------------------------------------------------------------------------- 1 | export { default } from "@onehilltech/ember-cli-google-analytics/services/gtag"; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/blueprints/@onehilltech/ember-cli-google-analytics/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | const { Blueprint } = require("ember-cli-blueprint-helpers"); 4 | 5 | module.exports = Blueprint.extend({ 6 | addons: [{ name: "ember-cli-script" }], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/ember-cli-build.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const EmberAddon = require("ember-cli/lib/broccoli/ember-addon"); 4 | 5 | module.exports = function (defaults) { 6 | const app = new EmberAddon(defaults, { 7 | // Add options here 8 | }); 9 | 10 | /* 11 | This build file specifies the options for the dummy test app of this 12 | addon, located in `/tests/dummy` 13 | This build file does *not* influence how the addon or the app using it 14 | behave. You most likely want to be modifying `./index.js` or app's build file 15 | */ 16 | 17 | const { maybeEmbroider } = require("@embroider/test-setup"); 18 | return maybeEmbroider(app, { 19 | skipBabel: [ 20 | { 21 | package: "qunit", 22 | }, 23 | ], 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | name: require("./package").name, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/testem.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = { 4 | test_page: "tests/index.html?hidepassed", 5 | disable_watching: true, 6 | launch_in_ci: ["Chrome"], 7 | launch_in_dev: ["Chrome"], 8 | browser_start_timeout: 120, 9 | browser_args: { 10 | Chrome: { 11 | ci: [ 12 | // --no-sandbox is needed when running Chrome inside a container 13 | process.env.CI ? "--no-sandbox" : null, 14 | "--headless", 15 | "--disable-dev-shm-usage", 16 | "--disable-software-rasterizer", 17 | "--mute-audio", 18 | "--remote-debugging-port=0", 19 | "--window-size=1440,900", 20 | ].filter(Boolean), 21 | }, 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from "@ember/application"; 2 | import Resolver from "ember-resolver"; 3 | import loadInitializers from "ember-load-initializers"; 4 | import config from "dummy/config/environment"; 5 | 6 | export default class App extends Application { 7 | modulePrefix = config.modulePrefix; 8 | podModulePrefix = config.podModulePrefix; 9 | Resolver = Resolver; 10 | } 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dummy 6 | 7 | 8 | 9 | {{content-for "head"}} 10 | 11 | 12 | 13 | 14 | {{content-for "head-footer"}} 15 | 16 | 17 | {{content-for "body"}} 18 | 19 | 20 | 21 | 22 | {{content-for "body-footer"}} 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from "@ember/routing/router"; 2 | import config from "dummy/config/environment"; 3 | 4 | export default class Router extends EmberRouter { 5 | location = config.locationType; 6 | rootURL = config.rootURL; 7 | } 8 | 9 | Router.map(function () { 10 | this.route("messages"); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/routes/application.js: -------------------------------------------------------------------------------- 1 | import Route from "@ember/routing/route"; 2 | import { service } from '@ember/service'; 3 | 4 | export default class ApplicationRoute extends Route { 5 | @service 6 | gtag; 7 | 8 | async activate () { 9 | await super.activate (...arguments); 10 | await this.gtag.configure (); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/routes/index.js: -------------------------------------------------------------------------------- 1 | import Route from "@ember/routing/route"; 2 | 3 | export default Route.extend({}); 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/routes/messages.js: -------------------------------------------------------------------------------- 1 | import Route from "@ember/routing/route"; 2 | 3 | export default class MessagesRoute extends Route {} 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- 1 | /* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */ 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{page-title "Dummy"}} 2 | 3 |

Welcome to Ember

4 | 5 | {{outlet}} -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/templates/index.hbs: -------------------------------------------------------------------------------- 1 | Messages -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/app/templates/messages.hbs: -------------------------------------------------------------------------------- 1 | Index -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/config/ember-cli-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "1.0.0", 3 | "packages": [ 4 | { 5 | "name": "ember-cli", 6 | "version": "5.5.0", 7 | "blueprints": [ 8 | { 9 | "name": "addon", 10 | "outputRepo": "https://github.com/ember-cli/ember-addon-output", 11 | "codemodsSource": "ember-addon-codemods-manifest@1", 12 | "isBaseBlueprint": true, 13 | "options": [ 14 | "--welcome", 15 | "--ci-provider=github" 16 | ] 17 | } 18 | ] 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/config/ember-try.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const getChannelURL = require("ember-source-channel-url"); 4 | const { embroiderSafe, embroiderOptimized } = require("@embroider/test-setup"); 5 | 6 | module.exports = async function () { 7 | return { 8 | scenarios: [ 9 | { 10 | name: "ember-lts-4.8", 11 | npm: { 12 | devDependencies: { 13 | "ember-source": "~4.8.0", 14 | }, 15 | }, 16 | }, 17 | { 18 | name: "ember-lts-4.12", 19 | npm: { 20 | devDependencies: { 21 | "ember-source": "~4.12.0", 22 | }, 23 | }, 24 | }, 25 | { 26 | name: "ember-release", 27 | npm: { 28 | devDependencies: { 29 | "ember-source": await getChannelURL("release"), 30 | }, 31 | }, 32 | }, 33 | { 34 | name: "ember-beta", 35 | npm: { 36 | devDependencies: { 37 | "ember-source": await getChannelURL("beta"), 38 | }, 39 | }, 40 | }, 41 | { 42 | name: "ember-canary", 43 | npm: { 44 | devDependencies: { 45 | "ember-source": await getChannelURL("canary"), 46 | }, 47 | }, 48 | }, 49 | embroiderSafe(), 50 | embroiderOptimized(), 51 | ], 52 | }; 53 | }; 54 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | module.exports = function (environment) { 4 | const ENV = { 5 | modulePrefix: "dummy", 6 | environment, 7 | rootURL: "/", 8 | locationType: "history", 9 | EmberENV: { 10 | EXTEND_PROTOTYPES: false, 11 | FEATURES: { 12 | // Here you can enable experimental features on an ember canary build 13 | // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true 14 | }, 15 | }, 16 | 17 | APP: { 18 | // Here you can pass flags/options to your application instance 19 | // when it is created 20 | }, 21 | "ember-cli-google": { 22 | analytics: { 23 | version: "v4", 24 | measurementId: "G-PZS86M3RVR", 25 | forceEnable: true, 26 | }, 27 | }, 28 | }; 29 | 30 | if (environment === "development") { 31 | // ENV.APP.LOG_RESOLVER = true; 32 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 33 | // ENV.APP.LOG_TRANSITIONS = true; 34 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 35 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 36 | } 37 | 38 | if (environment === "test") { 39 | // Testem prefers this... 40 | ENV.locationType = "none"; 41 | 42 | // keep test console output quieter 43 | ENV.APP.LOG_ACTIVE_GENERATION = false; 44 | ENV.APP.LOG_VIEW_LOOKUPS = false; 45 | 46 | ENV.APP.rootElement = "#ember-testing"; 47 | ENV.APP.autoboot = false; 48 | } 49 | 50 | if (environment === "production") { 51 | // here you can enable a production-specific feature 52 | } 53 | 54 | return ENV; 55 | }; 56 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "application-template-wrapper": false, 3 | "default-async-observers": true, 4 | "jquery-integration": false, 5 | "template-only-glimmer-components": true 6 | } 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const browsers = [ 4 | "last 1 Chrome versions", 5 | "last 1 Firefox versions", 6 | "last 1 Safari versions", 7 | ]; 8 | 9 | module.exports = { 10 | browsers, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/helpers/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | setupApplicationTest as upstreamSetupApplicationTest, 3 | setupRenderingTest as upstreamSetupRenderingTest, 4 | setupTest as upstreamSetupTest, 5 | } from "ember-qunit"; 6 | 7 | // This file exists to provide wrappers around ember-qunit's 8 | // test setup functions. This way, you can easily extend the setup that is 9 | // needed per test type. 10 | 11 | function setupApplicationTest(hooks, options) { 12 | upstreamSetupApplicationTest(hooks, options); 13 | 14 | // Additional setup for application tests can be done here. 15 | // 16 | // For example, if you need an authenticated session for each 17 | // application test, you could do: 18 | // 19 | // hooks.beforeEach(async function () { 20 | // await authenticateSession(); // ember-simple-auth 21 | // }); 22 | // 23 | // This is also a good place to call test setup functions coming 24 | // from other addons: 25 | // 26 | // setupIntl(hooks); // ember-intl 27 | // setupMirage(hooks); // ember-cli-mirage 28 | } 29 | 30 | function setupRenderingTest(hooks, options) { 31 | upstreamSetupRenderingTest(hooks, options); 32 | 33 | // Additional setup for rendering tests can be done here. 34 | } 35 | 36 | function setupTest(hooks, options) { 37 | upstreamSetupTest(hooks, options); 38 | 39 | // Additional setup for unit tests can be done here. 40 | } 41 | 42 | export { setupApplicationTest, setupRenderingTest, setupTest }; 43 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dummy Tests 6 | 7 | 8 | 9 | {{content-for "head"}} 10 | {{content-for "test-head"}} 11 | 12 | 13 | 14 | 15 | 16 | {{content-for "head-footer"}} 17 | {{content-for "test-head-footer"}} 18 | 19 | 20 | {{content-for "body"}} 21 | {{content-for "test-body"}} 22 | 23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {{content-for "body-footer"}} 37 | {{content-for "test-body-footer"}} 38 | 39 | 40 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/integration/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from "dummy/app"; 2 | import config from "dummy/config/environment"; 3 | import * as QUnit from "qunit"; 4 | import { setApplication } from "@ember/test-helpers"; 5 | import { setup } from "qunit-dom"; 6 | import { start } from "ember-qunit"; 7 | 8 | setApplication(Application.create(config.APP)); 9 | 10 | setup(QUnit.assert); 11 | 12 | start(); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-analytics/tests/unit/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/unit/initializers/g-analytics-init-test.js: -------------------------------------------------------------------------------- 1 | import Application from "@ember/application"; 2 | import { run } from "@ember/runloop"; 3 | 4 | import { initialize } from "dummy/initializers/g-analytics-init"; 5 | import { module, test } from "qunit"; 6 | import destroyApp from "../../helpers/destroy-app"; 7 | 8 | module("Unit | Initializer | g analytics init", function (hooks) { 9 | hooks.beforeEach(function () { 10 | run(() => { 11 | this.application = Application.create(); 12 | this.application.deferReadiness(); 13 | }); 14 | }); 15 | 16 | hooks.afterEach(function () { 17 | destroyApp(this.application); 18 | }); 19 | 20 | // Replace this with your real tests. 21 | test("it works", function (assert) { 22 | initialize(this.application); 23 | 24 | // you would normally confirm the results of the initializer here 25 | assert.ok(true); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/unit/initializers/g-analytics-test.js: -------------------------------------------------------------------------------- 1 | import Application from "@ember/application"; 2 | 3 | import config from "dummy/config/environment"; 4 | import { initialize } from "dummy/initializers/g-analytics"; 5 | import { module, test } from "qunit"; 6 | import Resolver from "ember-resolver"; 7 | import { run } from "@ember/runloop"; 8 | 9 | module("Unit | Initializer | g-analytics", function (hooks) { 10 | hooks.beforeEach(function () { 11 | this.TestApplication = class TestApplication extends Application { 12 | modulePrefix = config.modulePrefix; 13 | podModulePrefix = config.podModulePrefix; 14 | Resolver = Resolver; 15 | }; 16 | 17 | this.TestApplication.initializer({ 18 | name: "initializer under test", 19 | initialize, 20 | }); 21 | 22 | this.application = this.TestApplication.create({ 23 | autoboot: false, 24 | }); 25 | }); 26 | 27 | hooks.afterEach(function () { 28 | run(this.application, "destroy"); 29 | }); 30 | 31 | // TODO: Replace this with your real tests. 32 | test("it works", async function (assert) { 33 | await this.application.boot(); 34 | 35 | assert.ok(true); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/unit/services/g-analytics-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from "qunit"; 2 | import { setupTest } from "ember-qunit"; 3 | 4 | module("Unit | Service | g-analytics", function (hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test("it exists", function (assert) { 9 | let service = this.owner.lookup("service:g-analytics"); 10 | assert.ok(service); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tests/unit/services/gtag-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from "qunit"; 2 | import { setupTest } from "ember-qunit"; 3 | 4 | module("Unit | Service | gtag", function (hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test("it exists", function (assert) { 9 | let service = this.owner.lookup("service:gtag"); 10 | assert.ok(service); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-analytics/tsconfig.declarations.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "declarations", 5 | "emitDeclarationOnly": true, 6 | "noEmit": false, 7 | "rootDir": "." 8 | }, 9 | "include": ["addon", "addon-test-support"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.hbs] 17 | insert_final_newline = false 18 | 19 | [*.{diff,md}] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | 4 | parserOptions: { 5 | ecmaVersion: 2017, 6 | sourceType: 'module' 7 | }, 8 | 9 | extends: 'eslint:recommended', 10 | 11 | env: { 12 | browser: true 13 | }, 14 | 15 | rules: { 16 | }, 17 | 18 | globals: { 19 | google: true 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # misc 12 | /.sass-cache 13 | /connect.lock 14 | /coverage/* 15 | /libpeerconnection.log 16 | npm-debug.log* 17 | yarn-error.log 18 | testem.log 19 | 20 | # ember-try 21 | .node_modules.ember-try/ 22 | bower.json.ember-try 23 | package.json.ember-try 24 | 25 | .idea/ -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.npmignore: -------------------------------------------------------------------------------- 1 | /bower_components 2 | /config/ember-try.js 3 | /dist 4 | /tests 5 | /tmp 6 | **/.gitkeep 7 | .bowerrc 8 | .editorconfig 9 | .ember-cli 10 | .gitignore 11 | .eslintrc.js 12 | .watchmanconfig 13 | .travis.yml 14 | bower.json 15 | ember-cli-build.js 16 | testem.js 17 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | # we recommend testing addons with the same minimum supported node version as Ember CLI 5 | # so that your addon works for all apps 6 | - "4" 7 | 8 | sudo: false 9 | dist: trusty 10 | 11 | addons: 12 | chrome: stable 13 | 14 | cache: 15 | directories: 16 | - $HOME/.npm 17 | 18 | env: 19 | global: 20 | # See https://git.io/vdao3 for details. 21 | - JOBS=1 22 | matrix: 23 | # we recommend new addons test the current and previous LTS 24 | # as well as latest stable release (bonus points to beta/canary) 25 | - EMBER_TRY_SCENARIO=ember-lts-2.8 26 | - EMBER_TRY_SCENARIO=ember-lts-2.12 27 | - EMBER_TRY_SCENARIO=ember-release 28 | - EMBER_TRY_SCENARIO=ember-beta 29 | - EMBER_TRY_SCENARIO=ember-canary 30 | - EMBER_TRY_SCENARIO=ember-default 31 | 32 | matrix: 33 | fast_finish: true 34 | allow_failures: 35 | - env: EMBER_TRY_SCENARIO=ember-canary 36 | 37 | before_install: 38 | - npm config set spin false 39 | - npm install -g npm@4 40 | - npm --version 41 | 42 | script: 43 | # Usually, it's ok to finish the test scenario without reverting 44 | # to the addon's original dependency state, skipping "cleanup". 45 | - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup 46 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/README.md: -------------------------------------------------------------------------------- 1 | # ember-cli-google-charts 2 | 3 | EmberJS add-on for using Google Charts 4 | 5 | [![npm version](https://img.shields.io/npm/v/ember-cli-google-charts.svg?maxAge=2592000)](https://www.npmjs.com/package/ember-cli-google-charts) 6 | [![Dependencies](https://david-dm.org/onehilltech/ember-cli-google-charts.svg)](https://david-dm.org/onehilltech/ember-cli-google-charts) 7 | [![devDependencies Status](https://david-dm.org/onehilltech/ember-cli-google-charts/dev-status.svg)](https://david-dm.org/onehilltech/ember-cli-google-charts?type=dev) 8 | 9 | ## Features 10 | 11 | * Designed to support seamless integration into an EmberJS application. 12 | * Proper binding of attributes to options for real-time, dynamic updates. 13 | * Handle events as actions for interactive designs. 14 | * Auto-loading and configuring of scripts that correspond with appropriate lifecycle events. 15 | 16 | ## Installation 17 | 18 | ember install ember-cli-google-charts 19 | 20 | ## Quick Example 21 | 22 | Here is an example of creating 23 | [the following line chart](https://developers.google.com/chart/interactive/docs/gallery/linechart#curving-the-lines): 24 | 25 | ```handlebars 26 | {{g-linechart data=lineChartData title="Company Performance" curveType="function" legendPosition="bottom"}} 27 | ``` 28 | 29 | Each of the chart options above can bind to a variable. When the variable is updated, 30 | the chart is redrawn. 31 | 32 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/addon/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-areachart.js: -------------------------------------------------------------------------------- 1 | import XYChart from '../lib/g-xychart'; 2 | 3 | export default XYChart.extend({ 4 | classNames: ['g-areachart'], 5 | 6 | chartOptionsMapping: { 7 | isStacked: 'isStacked' 8 | }, 9 | 10 | createChart () { 11 | return new google.visualization.LineChart (this.element); 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-barchart.js: -------------------------------------------------------------------------------- 1 | /* globals google */ 2 | 3 | import XYChart from '../lib/g-xychart'; 4 | import Ember from 'ember'; 5 | 6 | export default XYChart.extend({ 7 | classNames: ['g-barchart'], 8 | 9 | packages: Ember.computed ('material', function () { 10 | let material = this.getWithDefault ('material', false); 11 | return material ? ['bar'] : ['corechart']; 12 | }), 13 | 14 | chartOptionsMapping: { 15 | barGroupWidth: 'bar.groupWidth', 16 | bars: 'bars', 17 | isStacked: 'isStacked' 18 | }, 19 | 20 | createChart () { 21 | let material = this.getWithDefault ('material', false); 22 | let Chart = material ? google.charts.Bar : google.visualization.BarChart; 23 | 24 | return new Chart (this.element); 25 | }, 26 | 27 | convertOptions (opts) { 28 | let newOptions = Ember.merge ({bars: 'horizontal'}, opts); 29 | return google.charts.Bar.convertOptions (newOptions); 30 | } 31 | }); 32 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-bubblechart.js: -------------------------------------------------------------------------------- 1 | import XYChart from '../lib/g-xychart'; 2 | 3 | export default XYChart.extend({ 4 | classNames: ['g-bubblechart'], 5 | 6 | packages: ['corechart'], 7 | 8 | chartOptionsMapping: { 9 | bubble: 'bubble', 10 | bubbleOpacity: 'bubble.opacity', 11 | bubbleStroke: 'bubble.stroke', 12 | bubbleTextStyle: 'bubble.textStyle' 13 | }, 14 | 15 | createChart () { 16 | return new google.visualization.BubbleChart (this.element); 17 | } 18 | }); 19 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-columnchart.js: -------------------------------------------------------------------------------- 1 | import XYChart from '../lib/g-xychart'; 2 | import Ember from 'ember'; 3 | 4 | export default XYChart.extend({ 5 | classNames: ['g-columnchart'], 6 | 7 | packages: Ember.computed ('material', function () { 8 | let material = this.getWithDefault ('material', false); 9 | return material ? ['bar'] : ['corechart']; 10 | }), 11 | 12 | chartOptionsMapping: { 13 | barGroupWidth: 'bar.groupWidth', 14 | bars: 'bars', 15 | isStacked: 'isStacked' 16 | }, 17 | 18 | createChart () { 19 | let material = this.getWithDefault ('material', false); 20 | let Chart = material ? google.charts.Bar : google.visualization.ColumnChart; 21 | 22 | return new Chart (this.element); 23 | }, 24 | 25 | convertOptions (opts) { 26 | let newOptions = Ember.merge ({}, opts); 27 | return google.charts.Bar.convertOptions (newOptions); 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-geochart.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Chart from '../lib/g-chart'; 3 | 4 | export default Chart.extend({ 5 | classNames: ['g-geochart'], 6 | 7 | packages: ['geochart'], 8 | 9 | chartOptionsMapping: { 10 | colorAxis: 'colorAxis', 11 | colorAxisMinValue: 'colorAxis.minValue', 12 | colorAxisMaxValue: 'colorAxis.maxValue', 13 | colorAxisValues: 'colorAxis.values', 14 | colorAxisColors: 'colorAxis.colors', 15 | datalessRegionColor: 'datalessRegionColor', 16 | defaultColor: 'defaultColor', 17 | displayMode: 'displayMode', 18 | domain: 'domain', 19 | enableRegionInteractivity: 'enableRegionInteractivity', 20 | keepAspectRatio: 'keepAspectRatio', 21 | region: 'region', 22 | magnifyingGlass: 'magnifyingGlass', 23 | magnifyingGlassEnable: 'magnifyingGlass.enable', 24 | magnifyingGlassZoomFactor: 'magnifyingGlass.zoomFactor', 25 | markerOpacity: 'markerOpacity', 26 | resolution: 'resolution', 27 | sizeAxis: 'sizeAxis', 28 | sizeAxisMaxSize: 'sizeAxis.maxSize', 29 | sizeAxisMaxValue: 'sizeAxis.maxValue', 30 | sizeAxisMinSize: 'sizeAxis.minSize', 31 | sizeAxisMinValue: 'sizeAxis.minValue', 32 | }, 33 | 34 | packagesOptions: Ember.computed (function () { 35 | let ENV = Ember.getOwner (this).resolveRegistration ('config:environment'); 36 | 37 | return { 38 | mapsApiKey: Ember.get (ENV, 'ember-cli-google.charts.mapsApiKey') 39 | }; 40 | }), 41 | 42 | createChart () { 43 | return new google.visualization.GeoChart (this.element); 44 | }, 45 | 46 | didCreateChart (chart) { 47 | this._super (...arguments); 48 | 49 | google.visualization.events.addListener (chart, 'regionClick', this.didClickRegion.bind (this)); 50 | }, 51 | 52 | didClickRegion (ev) { 53 | this.sendAction ('regionClick', ev); 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-linechart.js: -------------------------------------------------------------------------------- 1 | import XYChart from '../lib/g-xychart'; 2 | import Ember from 'ember'; 3 | 4 | export default XYChart.extend({ 5 | classNames: ['g-linechart'], 6 | 7 | packages: Ember.computed ('material', function () { 8 | let material = this.getWithDefault ('material', false); 9 | return material ? ['line'] : ['corechart']; 10 | }), 11 | 12 | chartOptionsMapping: { 13 | curveType: 'curveType', 14 | 15 | trendlines: 'trendlines', 16 | }, 17 | 18 | createChart () { 19 | let material = this.getWithDefault ('material', false); 20 | let Chart = material ? google.charts.Line : google.visualization.LineChart; 21 | 22 | return new Chart (this.element); 23 | }, 24 | 25 | convertOptions (opts) { 26 | let newOpts = Ember.merge ({}, opts); 27 | return google.charts.Line.convertOptions (newOpts); 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/components/g-piechart.js: -------------------------------------------------------------------------------- 1 | import Chart from '../lib/g-chart'; 2 | 3 | export default Chart.extend({ 4 | classNames: ['g-piechart'], 5 | 6 | packages: ['corechart'], 7 | 8 | chartOptionsMapping: { 9 | pieHole: 'pieHole', 10 | pieSliceBorderColor: 'pieSliceBorderColor', 11 | pieSliceText: 'pieSliceText', 12 | pieSliceTextStyle: 'pieSliceTextStyle', 13 | pieStartAngle: 'pieStartAngle', 14 | reverseCategories: 'reverseCategories', 15 | pieResidueSliceColor: 'pieResidueSliceColor', 16 | pieResidueSliceLabel: 'pieResidueSliceLabel', 17 | slices: 'slices', 18 | sliceVisibilityThreshold: 'sliceVisibilityThreshold' 19 | }, 20 | 21 | createChart () { 22 | return new google.visualization.PieChart (this.element); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/animation.js: -------------------------------------------------------------------------------- 1 | export default { 2 | animationDuration: 'animation.duration', 3 | animationEasing: 'animation.easing', 4 | animationStartup: 'animation.startup', 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/annotations.js: -------------------------------------------------------------------------------- 1 | export default { 2 | annotationsBoxStyle: 'annotations.boxStyle', 3 | annotationsDatum: 'annotations.datum', 4 | annotationsDomain: 'annotations.domain', 5 | annotationsHighContrast: 'annotations.highContrast', 6 | annotationsStem: 'annotations.stem', 7 | annotationsStyle: 'annotations.style', 8 | annotationsTextStyle: 'annotations.textStyle', 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/crosshair.js: -------------------------------------------------------------------------------- 1 | export default { 2 | crosshair: 'crosshair', 3 | crosshairColor: 'crosshair.color', 4 | crosshairFocused: 'crosshair.focused', 5 | crosshairOpacity: 'crosshair.opacity', 6 | crosshairOrientation: 'crosshair.orientation', 7 | crosshairSelected: 'crosshair.selected', 8 | crosshairTrigger: 'crosshair.trigger', 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/explorer.js: -------------------------------------------------------------------------------- 1 | export default { 2 | explorer: 'explorer', 3 | explorerActions: 'explorer.actions', 4 | explorerAxis: 'explorer.axis', 5 | explorerKeepInBounds: 'explorer.keepInBounds', 6 | explorerMaxZoomIn: 'explorer.maxZoomIn', 7 | explorerMaxZoomOut: 'explorer.maxZoomOut', 8 | explorerZoomDelta: 'explorer.zoomDelta' 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/font.js: -------------------------------------------------------------------------------- 1 | export default { 2 | fontSize: 'fontSize', 3 | fontName: 'fontName' 4 | }; 5 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/haxis.js: -------------------------------------------------------------------------------- 1 | export default { 2 | hAxis: 'hAxis', 3 | hAxisBaseline: 'hAxis.baseline', 4 | hAxisBaselineColor: 'hAxis.baselineColor', 5 | hAxisDirection: 'hAxis.direction', 6 | hAxisFormat: 'hAxis.format', 7 | hAxisGridlines: 'hAxis.gridlines', 8 | hAxisGridlinesColor: 'hAxis.gridlines.color', 9 | hAxisGridlinesCount: 'hAxis.gridlines.count', 10 | hAxisGridlinesUnits: 'hAxis.gridlines.units', 11 | hAxisMinorGridlines: 'hAxis.minorGridlines', 12 | hAxisMinorGridlinesColor: 'hAxis.minorGridlines.color', 13 | hAxisMinorGridlinesCount: 'hAxis.minorGridlines.count', 14 | hAxisMinorGridlinesUnits: 'hAxis.minorGridlines.units', 15 | hAxisLogScale: 'hAxis.logScale', 16 | hAxisScaleType: 'hAxis.scaleType', 17 | hAxisTextPosition: 'hAxis.textPosition', 18 | hAxisTextStyle: 'hAxis.textStyle', 19 | hAxisTicks: 'hAxis.ticks', 20 | hAxisTitle: 'hAxis.title', 21 | hAxisTitleTextStyle: 'hAxis.titleTextStyle', 22 | hAxisAllowContainerBoundaryTextCufoff: 'hAxis.allowContainerBoundaryTextCufoff', 23 | hAxisSlantedText: 'hAxis.slantedText', 24 | hAxisSlantedTextAngle: 'hAxis.slantedTextAngle', 25 | hAxisMaxAlternation: 'hAxis.maxAlternation', 26 | hAxisMaxTextLines: 'hAxis.maxTextLines', 27 | hAxisMinTextSpacing: 'hAxis.minTextSpacing', 28 | hAxisShowTextEvery: 'hAxis.showTextEvery', 29 | hAxisMaxValue: 'hAxis.maxValue', 30 | hAxisMinValue: 'hAxis.minValue', 31 | hAxisViewWindowMode: 'hAxis.viewWindowMode', 32 | hAxisViewWindow: 'hAxis.viewWindow', 33 | hAxisViewWindowMax: 'hAxis.viewWindow.max', 34 | hAxisViewWindowMin: 'hAxis.viewWindow.min' 35 | }; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/legend.js: -------------------------------------------------------------------------------- 1 | export default { 2 | legend: 'legend', 3 | legendAlignment: 'legend.alignment', 4 | legendMaxLines: 'legend.maxLines', 5 | legendPosition: 'legend.position', 6 | legendTextStyle: 'legend.textStyle' 7 | }; 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/line.js: -------------------------------------------------------------------------------- 1 | export default { 2 | lineDashStyle: 'lineDashStyle', 3 | lineWidth: 'lineWidth', 4 | }; 5 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/point.js: -------------------------------------------------------------------------------- 1 | export default { 2 | pointShape: 'pointShape', 3 | pointSize: 'pointSize', 4 | pointsVisible: 'pointsVisible' 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/title.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/lib/options/vaxis.js: -------------------------------------------------------------------------------- 1 | export default { 2 | vAxis: 'vAxis', 3 | vAxisBaseline: 'vAxis.baseline', 4 | vAxisBaselineColor: 'vAxis.baselineColor', 5 | vAxisDirection: 'vAxis.direction', 6 | vAxisFormat: 'vAxis.format', 7 | vAxisGridlines: 'vAxis.gridlines', 8 | vAxisGridlinesColor: 'vAxis.gridlines.color', 9 | vAxisGridlinesCount: 'vAxis.gridlines.count', 10 | vAxisGridlinesUnits: 'vAxis.gridlines.units', 11 | vAxisMinorGridlines: 'vAxis.minorGridlines', 12 | vAxisMinorGridlinesColor: 'vAxis.minorGridlines.color', 13 | vAxisMinorGridlinesCount: 'vAxis.minorGridlines.count', 14 | vAxisMinorGridlinesUnits: 'vAxis.minorGridlines.units', 15 | vAxisLogScale: 'vAxis.logScale', 16 | vAxisScaleType: 'vAxis.scaleType', 17 | vAxisTextPosition: 'vAxis.textPosition', 18 | vAxisTextStyle: 'vAxis.textStyle', 19 | vAxisTicks: 'vAxis.ticks', 20 | vAxisTitle: 'vAxis.title', 21 | vAxisTitleTextStyle: 'vAxis.titleTextStyle', 22 | vAxisAllowContainerBoundaryTextCufoff: 'vAxis.allowContainerBoundaryTextCufoff', 23 | vAxisSlantedText: 'vAxis.slantedText', 24 | vAxisSlantedTextAngle: 'vAxis.slantedTextAngle', 25 | vAxisMaxAlternation: 'vAxis.maxAlternation', 26 | vAxisMaxTextLines: 'vAxis.maxTextLines', 27 | vAxisMinTextSpacing: 'vAxis.minTextSpacing', 28 | vAxisShowTextEvery: 'vAxis.showTextEvery', 29 | vAxisMaxValue: 'vAxis.maxValue', 30 | vAxisMinValue: 'vAxis.minValue', 31 | vAxisViewWindowMode: 'vAxis.viewWindowMode', 32 | vAxisViewWindow: 'vAxis.viewWindow', 33 | vAxisViewWindowMax: 'vAxis.viewWindow.max', 34 | vAxisViewWindowMin: 'vAxis.viewWindow.min' 35 | }; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/services/g-charts.js: -------------------------------------------------------------------------------- 1 | /*global google*/ 2 | 3 | import Ember from 'ember'; 4 | 5 | export default Ember.Service.extend({ 6 | init () { 7 | this._super (...arguments); 8 | 9 | let ENV = Ember.getOwner (this).resolveRegistration ('config:environment'); 10 | let version = Ember.getWithDefault (ENV, 'ember-cli-google.charts.version', 'current'); 11 | 12 | this.set ('version', version); 13 | }, 14 | 15 | /** 16 | * Load a set of packages needed for the charts. 17 | * 18 | * @param packages Array of packages to load 19 | * @param options Additional load options, less the packages 20 | * @param onLoadCallback Callback for when the load is complete 21 | */ 22 | load (packages, options, onLoadCallback) { 23 | if (Ember.isNone (onLoadCallback)) { 24 | onLoadCallback = options; 25 | options = {}; 26 | } 27 | 28 | this._charts.then (() => { 29 | // Load the packages. As of version 45, you can call this method multiple times 30 | // and not have any negative side-effects. 31 | let loadOptions = Ember.merge ({ packages: packages }, options); 32 | let version = this.get ('version'); 33 | 34 | google.charts.load (version, loadOptions); 35 | 36 | if (onLoadCallback) { 37 | google.charts.setOnLoadCallback (onLoadCallback); 38 | } 39 | }); 40 | }, 41 | 42 | /** 43 | * Get the singleton grecaptha instance from the window. If the instance does 44 | * not exist, it is installed by downloading the recaptcha script from online. 45 | */ 46 | _charts: new Ember.RSVP.Promise ((resolve, reject) => { 47 | Ember.$ (window).ready (() => { 48 | Ember.$.getScript ('https://www.gstatic.com/charts/loader.js') 49 | .then (() => Ember.run (null, resolve)) 50 | .fail ((jqxhr) =>Ember.run (null, reject, jqxhr)); 51 | }); 52 | }) 53 | }); 54 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-areachart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-barchart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-bubblechart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-chart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-columnchart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-geochart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-linechart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/addon/templates/components/g-piechart.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/app/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-areachart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-areachart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-barchart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-barchart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-bubblechart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-bubblechart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-columnchart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-columnchart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-geochart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-geochart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-linechart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-linechart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/components/g-piechart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/components/g-piechart'; -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/services/g-charts.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/services/g-charts'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/app/templates/g-chart.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-charts/templates/g-chart'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/config/ember-try.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | scenarios: [ 4 | { 5 | name: 'ember-lts-2.8', 6 | bower: { 7 | dependencies: { 8 | 'ember': 'components/ember#lts-2-8' 9 | }, 10 | resolutions: { 11 | 'ember': 'lts-2-8' 12 | } 13 | }, 14 | npm: { 15 | devDependencies: { 16 | 'ember-source': null 17 | } 18 | } 19 | }, 20 | { 21 | name: 'ember-lts-2.12', 22 | npm: { 23 | devDependencies: { 24 | 'ember-source': '~2.12.0' 25 | } 26 | } 27 | }, 28 | { 29 | name: 'ember-release', 30 | bower: { 31 | dependencies: { 32 | 'ember': 'components/ember#release' 33 | }, 34 | resolutions: { 35 | 'ember': 'release' 36 | } 37 | }, 38 | npm: { 39 | devDependencies: { 40 | 'ember-source': null 41 | } 42 | } 43 | }, 44 | { 45 | name: 'ember-beta', 46 | bower: { 47 | dependencies: { 48 | 'ember': 'components/ember#beta' 49 | }, 50 | resolutions: { 51 | 'ember': 'beta' 52 | } 53 | }, 54 | npm: { 55 | devDependencies: { 56 | 'ember-source': null 57 | } 58 | } 59 | }, 60 | { 61 | name: 'ember-canary', 62 | bower: { 63 | dependencies: { 64 | 'ember': 'components/ember#canary' 65 | }, 66 | resolutions: { 67 | 'ember': 'canary' 68 | } 69 | }, 70 | npm: { 71 | devDependencies: { 72 | 'ember-source': null 73 | } 74 | } 75 | }, 76 | { 77 | name: 'ember-default', 78 | npm: { 79 | devDependencies: {} 80 | } 81 | } 82 | ] 83 | }; 84 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(/* environment, appConfig */) { 5 | return { }; 6 | }; 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/ember-cli-build.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 5 | 6 | module.exports = function(defaults) { 7 | let app = new EmberAddon(defaults, { 8 | // Add options here 9 | }); 10 | 11 | /* 12 | This build file specifies the options for the dummy test app of this 13 | addon, located in `/tests/dummy` 14 | This build file does *not* influence how the addon or the app using it 15 | behave. You most likely want to be modifying `./index.js` or app's build file 16 | */ 17 | 18 | return app.toTree(); 19 | }; 20 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | name: 'ember-cli-google-charts' 6 | }; 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-google-charts", 3 | "version": "0.3.1", 4 | "description": "The default blueprint for ember-cli addons.", 5 | "keywords": [ 6 | "ember-addon" 7 | ], 8 | "license": "Apache 2.0", 9 | "author": "One Hill Technologies, LLC", 10 | "directories": { 11 | "doc": "doc", 12 | "test": "tests" 13 | }, 14 | "repository": "github:onehilltech/ember-cli-google", 15 | "scripts": { 16 | "build": "ember build", 17 | "start": "ember server", 18 | "test": "ember try:each" 19 | }, 20 | "dependencies": { 21 | "ember-cli-babel": "^6.6.0", 22 | "ember-cli-htmlbars": "^2.0.3" 23 | }, 24 | "devDependencies": { 25 | "broccoli-asset-rev": "^2.4.5", 26 | "ember-ajax": "^3.0.0", 27 | "ember-cli": "~2.16.2", 28 | "ember-cli-dependency-checker": "^2.0.0", 29 | "ember-cli-eslint": "^4.0.0", 30 | "ember-cli-htmlbars": "^2.0.1", 31 | "ember-cli-htmlbars-inline-precompile": "^1.0.0", 32 | "ember-cli-inject-live-reload": "^1.4.1", 33 | "ember-cli-qunit": "^4.0.0", 34 | "ember-cli-shims": "^1.1.0", 35 | "ember-cli-sri": "^2.1.0", 36 | "ember-cli-uglify": "^2.0.0", 37 | "ember-disable-prototype-extensions": "^1.1.2", 38 | "ember-export-application-global": "^2.0.0", 39 | "ember-load-initializers": "^1.0.0", 40 | "ember-resolver": "^4.0.0", 41 | "ember-source": "~2.16.0", 42 | "loader.js": "^4.2.3" 43 | }, 44 | "engines": { 45 | "node": "^4.5 || 6.* || >= 7.*" 46 | }, 47 | "ember-addon": { 48 | "configPath": "tests/dummy/config" 49 | }, 50 | "gitHead": "8ca291c9aa8b42a49d344eb4472a2eb6d165920d" 51 | } 52 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/testem.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | test_page: 'tests/index.html?hidepassed', 4 | disable_watching: true, 5 | launch_in_ci: [ 6 | 'Chrome' 7 | ], 8 | launch_in_dev: [ 9 | 'Chrome' 10 | ], 11 | browser_args: { 12 | Chrome: { 13 | mode: 'ci', 14 | args: [ 15 | '--disable-gpu', 16 | '--headless', 17 | '--remote-debugging-port=9222', 18 | '--window-size=1440,900' 19 | ] 20 | }, 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | embertest: true 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | const App = Application.extend({ 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix, 9 | Resolver 10 | }); 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | 12 | 13 | 14 | 15 | {{content-for "head-footer"}} 16 | 17 | 18 | {{content-for "body"}} 19 | 20 | 21 | 22 | 23 | {{content-for "body-footer"}} 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from './config/environment'; 3 | 4 | const Router = EmberRouter.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | this.route('barchart'); 11 | this.route('columnchart'); 12 | this.route('linechart'); 13 | }); 14 | 15 | export default Router; 16 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/routes/barchart.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | model () { 5 | return [ 6 | ['Year', 'Sales', 'Expenses', 'Profit'], 7 | ['2014', 1000, 400, 200], 8 | ['2015', 1170, 460, 250], 9 | ['2016', 660, 1120, 300], 10 | ['2017', 1030, 540, 350] 11 | ]; 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/routes/columnchart.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | model () { 5 | return [ 6 | ['Year', 'Sales', 'Expenses', 'Profit'], 7 | ['2014', 1000, 400, 200], 8 | ['2015', 1170, 460, 250], 9 | ['2016', 660, 1120, 300], 10 | ['2017', 1030, 540, 350] 11 | ]; 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/routes/linechart.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | model () { 5 | return [ 6 | ['Year', 'Sales', 'Expenses'], 7 | ['2004', 1000, 400], 8 | ['2005', 1170, 460], 9 | ['2006', 660, 1120], 10 | ['2007', 1030, 540] 11 | ]; 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/styles/app.css -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{outlet}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/templates/barchart.hbs: -------------------------------------------------------------------------------- 1 | {{g-barchart data=model title="Company Performance" subtitle="Sales, Expenses, and Profit: 2014-2017"}} 2 | 3 | {{g-barchart data=model title="Company Performance" subtitle="Sales, Expenses, and Profit: 2014-2017" material=true}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/templates/columnchart.hbs: -------------------------------------------------------------------------------- 1 | {{g-columnchart data=model title="Company Performance" subtitle="Sales, Expenses, and Profit: 2014-2017"}} 2 | 3 | {{g-columnchart data=model title="Company Performance" subtitle="Sales, Expenses, and Profit: 2014-2017" material=true}} -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/dummy/app/templates/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/app/templates/linechart.hbs: -------------------------------------------------------------------------------- 1 | {{g-linechart data=model title="Company Performance" curveType="function" legendPosition="bottom"}} 2 | 3 | {{g-linechart material=true data=model title="Company Performance" curveType="function" legendPosition="bottom"}} 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(environment) { 5 | let ENV = { 6 | modulePrefix: 'dummy', 7 | environment, 8 | rootURL: '/', 9 | locationType: 'auto', 10 | EmberENV: { 11 | FEATURES: { 12 | // Here you can enable experimental features on an ember canary build 13 | // e.g. 'with-controller': true 14 | }, 15 | EXTEND_PROTOTYPES: { 16 | // Prevent Ember Data from overriding Date.parse. 17 | Date: false 18 | } 19 | }, 20 | 21 | APP: { 22 | // Here you can pass flags/options to your application instance 23 | // when it is created 24 | } 25 | }; 26 | 27 | if (environment === 'development') { 28 | // ENV.APP.LOG_RESOLVER = true; 29 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 30 | // ENV.APP.LOG_TRANSITIONS = true; 31 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 32 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 33 | } 34 | 35 | if (environment === 'test') { 36 | // Testem prefers this... 37 | ENV.locationType = 'none'; 38 | 39 | // keep test console output quieter 40 | ENV.APP.LOG_ACTIVE_GENERATION = false; 41 | ENV.APP.LOG_VIEW_LOOKUPS = false; 42 | 43 | ENV.APP.rootElement = '#ember-testing'; 44 | } 45 | 46 | if (environment === 'production') { 47 | // here you can enable a production-specific feature 48 | } 49 | 50 | return ENV; 51 | }; 52 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | browsers: [ 4 | 'ie 9', 5 | 'last 1 Chrome versions', 6 | 'last 1 Firefox versions', 7 | 'last 1 Safari versions' 8 | ] 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import { run } from '@ember/runloop'; 2 | 3 | export default function destroyApp(application) { 4 | run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/helpers/module-for-acceptance.js: -------------------------------------------------------------------------------- 1 | import { module } from 'qunit'; 2 | import { resolve } from 'rsvp'; 3 | import startApp from '../helpers/start-app'; 4 | import destroyApp from '../helpers/destroy-app'; 5 | 6 | export default function(name, options = {}) { 7 | module(name, { 8 | beforeEach() { 9 | this.application = startApp(); 10 | 11 | if (options.beforeEach) { 12 | return options.beforeEach.apply(this, arguments); 13 | } 14 | }, 15 | 16 | afterEach() { 17 | let afterEach = options.afterEach && options.afterEach.apply(this, arguments); 18 | return resolve(afterEach).then(() => destroyApp(this.application)); 19 | } 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from '../../resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Application from '../../app'; 2 | import config from '../../config/environment'; 3 | import { merge } from '@ember/polyfills'; 4 | import { run } from '@ember/runloop'; 5 | 6 | export default function startApp(attrs) { 7 | let attributes = merge({}, config.APP); 8 | attributes = merge(attributes, attrs); // use defaults, but you can override; 9 | 10 | return run(() => { 11 | let application = Application.create(attributes); 12 | application.setupForTesting(); 13 | application.injectTestHelpers(); 14 | return application; 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy Tests 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | {{content-for "test-head"}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for "head-footer"}} 18 | {{content-for "test-head-footer"}} 19 | 20 | 21 | {{content-for "body"}} 22 | {{content-for "test-body"}} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{content-for "body-footer"}} 31 | {{content-for "test-body-footer"}} 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/integration/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-areachart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-areachart', 'Integration | Component | g areachart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-areachart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-areachart}} 19 | template block text 20 | {{/g-areachart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-barchart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-barchart', 'Integration | Component | g barchart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-barchart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-barchart}} 19 | template block text 20 | {{/g-barchart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-bubblechart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-bubblechart', 'Integration | Component | g bubblechart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-bubblechart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-bubblechart}} 19 | template block text 20 | {{/g-bubblechart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-columnchart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-columnchart', 'Integration | Component | g columnchart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-columnchart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-columnchart}} 19 | template block text 20 | {{/g-columnchart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-geochart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-geochart', 'Integration | Component | g geochart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-geochart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-geochart}} 19 | template block text 20 | {{/g-geochart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-linechart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-linechart', 'Integration | Component | g linechart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-linechart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-linechart}} 19 | template block text 20 | {{/g-linechart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/integration/components/g-piechart-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('g-piechart', 'Integration | Component | g piechart', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | // Set any properties with this.set('myProperty', 'value'); 10 | // Handle any actions with this.on('myAction', function(val) { ... }); 11 | 12 | this.render(hbs`{{g-piechart}}`); 13 | 14 | assert.equal(this.$().text().trim(), ''); 15 | 16 | // Template block usage: 17 | this.render(hbs` 18 | {{#g-piechart}} 19 | template block text 20 | {{/g-piechart}} 21 | `); 22 | 23 | assert.equal(this.$().text().trim(), 'template block text'); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import resolver from './helpers/resolver'; 2 | import { 3 | setResolver 4 | } from 'ember-qunit'; 5 | import { start } from 'ember-cli-qunit'; 6 | 7 | setResolver(resolver); 8 | start(); 9 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/tests/unit/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/tests/unit/services/g-charts-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('service:g-charts', 'Unit | Service | g charts', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['service:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let service = this.subject(); 11 | assert.ok(service); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-charts/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-charts/vendor/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.hbs] 16 | insert_final_newline = false 17 | 18 | [*.{diff,md}] 19 | trim_trailing_whitespace = false 20 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript 4 | rather than JavaScript by default, when a TypeScript version of a given blueprint is available. 5 | */ 6 | "isTypeScriptProject": false 7 | } 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # misc 8 | /coverage/ 9 | !.* 10 | .*/ 11 | 12 | # ember-try 13 | /.node_modules.ember-try/ 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | root: true, 5 | parser: '@babel/eslint-parser', 6 | parserOptions: { 7 | ecmaVersion: 'latest', 8 | sourceType: 'module', 9 | requireConfigFile: false, 10 | babelOptions: { 11 | plugins: [ 12 | ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], 13 | ], 14 | }, 15 | }, 16 | plugins: ['ember'], 17 | extends: [ 18 | 'eslint:recommended', 19 | 'plugin:ember/recommended', 20 | 'plugin:prettier/recommended', 21 | ], 22 | env: { 23 | browser: true, 24 | }, 25 | rules: {}, 26 | overrides: [ 27 | // node files 28 | { 29 | files: [ 30 | './.eslintrc.js', 31 | './.prettierrc.js', 32 | './.stylelintrc.js', 33 | './.template-lintrc.js', 34 | './ember-cli-build.js', 35 | './index.js', 36 | './testem.js', 37 | './blueprints/*/index.js', 38 | './config/**/*.js', 39 | './tests/dummy/config/**/*.js', 40 | ], 41 | parserOptions: { 42 | sourceType: 'script', 43 | }, 44 | env: { 45 | browser: false, 46 | node: true, 47 | }, 48 | extends: ['plugin:n/recommended'], 49 | }, 50 | { 51 | // test files 52 | files: ['tests/**/*-test.{js,ts}'], 53 | extends: ['plugin:qunit/recommended'], 54 | }, 55 | ], 56 | }; 57 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | pull_request: {} 9 | 10 | concurrency: 11 | group: ci-${{ github.head_ref || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | test: 16 | name: "Tests" 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 10 19 | 20 | steps: 21 | - uses: actions/checkout@v3 22 | - name: Install Node 23 | uses: actions/setup-node@v3 24 | with: 25 | node-version: 18 26 | cache: yarn 27 | - name: Install Dependencies 28 | run: yarn install --frozen-lockfile 29 | - name: Lint 30 | run: yarn lint 31 | - name: Run Tests 32 | run: yarn test:ember 33 | 34 | floating: 35 | name: "Floating Dependencies" 36 | runs-on: ubuntu-latest 37 | timeout-minutes: 10 38 | 39 | steps: 40 | - uses: actions/checkout@v3 41 | - uses: actions/setup-node@v3 42 | with: 43 | node-version: 18 44 | cache: yarn 45 | - name: Install Dependencies 46 | run: yarn install --no-lockfile 47 | - name: Run Tests 48 | run: yarn test:ember 49 | 50 | try-scenarios: 51 | name: ${{ matrix.try-scenario }} 52 | runs-on: ubuntu-latest 53 | needs: "test" 54 | timeout-minutes: 10 55 | 56 | strategy: 57 | fail-fast: false 58 | matrix: 59 | try-scenario: 60 | - ember-lts-4.8 61 | - ember-lts-4.12 62 | - ember-release 63 | - ember-beta 64 | - ember-canary 65 | - embroider-safe 66 | - embroider-optimized 67 | 68 | steps: 69 | - uses: actions/checkout@v3 70 | - name: Install Node 71 | uses: actions/setup-node@v3 72 | with: 73 | node-version: 18 74 | cache: yarn 75 | - name: Install Dependencies 76 | run: yarn install --frozen-lockfile 77 | - name: Run Tests 78 | run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} 79 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.gitignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /declarations/ 4 | 5 | # dependencies 6 | /node_modules/ 7 | 8 | # misc 9 | /.env* 10 | /.pnp* 11 | /.eslintcache 12 | /coverage/ 13 | /npm-debug.log* 14 | /testem.log 15 | /yarn-error.log 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /npm-shrinkwrap.json.ember-try 20 | /package.json.ember-try 21 | /package-lock.json.ember-try 22 | /yarn.lock.ember-try 23 | 24 | # broccoli-debug 25 | /DEBUG/ 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.npmignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /tmp/ 4 | 5 | # misc 6 | /.editorconfig 7 | /.ember-cli 8 | /.env* 9 | /.eslintcache 10 | /.eslintignore 11 | /.eslintrc.js 12 | /.git/ 13 | /.github/ 14 | /.gitignore 15 | /.prettierignore 16 | /.prettierrc.js 17 | /.stylelintignore 18 | /.stylelintrc.js 19 | /.template-lintrc.js 20 | /.travis.yml 21 | /.watchmanconfig 22 | /CONTRIBUTING.md 23 | /ember-cli-build.js 24 | /testem.js 25 | /tests/ 26 | /yarn-error.log 27 | /yarn.lock 28 | .gitkeep 29 | 30 | # ember-try 31 | /.node_modules.ember-try/ 32 | /npm-shrinkwrap.json.ember-try 33 | /package.json.ember-try 34 | /package-lock.json.ember-try 35 | /yarn.lock.ember-try 36 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.prettierignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # misc 8 | /coverage/ 9 | !.* 10 | .*/ 11 | 12 | # ember-try 13 | /.node_modules.ember-try/ 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.prettierrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | overrides: [ 5 | { 6 | files: '*.{js,ts}', 7 | options: { 8 | singleQuote: true, 9 | }, 10 | }, 11 | ], 12 | }; 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.stylelintignore: -------------------------------------------------------------------------------- 1 | # unconventional files 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # addons 8 | /.node_modules.ember-try/ 9 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.stylelintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'recommended', 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | # we recommend testing addons with the same minimum supported node version as Ember CLI 5 | # so that your addon works for all apps 6 | - "12" 7 | 8 | dist: xenial 9 | 10 | addons: 11 | chrome: stable 12 | 13 | cache: 14 | directories: 15 | - $HOME/.npm 16 | 17 | env: 18 | global: 19 | # See https://git.io/vdao3 for details. 20 | - JOBS=1 21 | 22 | branches: 23 | only: 24 | - master 25 | # npm version tags 26 | - /^v\d+\.\d+\.\d+/ 27 | 28 | jobs: 29 | fast_finish: true 30 | allow_failures: 31 | - env: EMBER_TRY_SCENARIO=ember-canary 32 | 33 | include: 34 | # runs linting and tests with current locked deps 35 | - stage: "Tests" 36 | name: "Tests" 37 | script: 38 | - yarn lint 39 | - yarn test:ember 40 | 41 | - stage: "Additional Tests" 42 | name: "Floating Dependencies" 43 | install: 44 | - yarn install --no-lockfile --non-interactive 45 | script: 46 | - yarn test:ember 47 | 48 | # we recommend new addons test the current and previous LTS 49 | # as well as latest stable release (bonus points to beta/canary) 50 | - env: EMBER_TRY_SCENARIO=ember-lts-3.24 51 | - env: EMBER_TRY_SCENARIO=ember-lts-3.28 52 | - env: EMBER_TRY_SCENARIO=ember-release 53 | - env: EMBER_TRY_SCENARIO=ember-beta 54 | - env: EMBER_TRY_SCENARIO=ember-canary 55 | - env: EMBER_TRY_SCENARIO=ember-default-with-jquery 56 | - env: EMBER_TRY_SCENARIO=ember-classic 57 | - env: EMBER_TRY_SCENARIO=embroider-safe 58 | - env: EMBER_TRY_SCENARIO=embroider-optimized 59 | 60 | before_install: 61 | - curl -o- -L https://yarnpkg.com/install.sh | bash 62 | - export PATH=$HOME/.yarn/bin:$PATH 63 | 64 | script: 65 | - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO 66 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["dist"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How To Contribute 2 | 3 | ## Installation 4 | 5 | * `git clone ` 6 | * `cd ember-cli-google-maps` 7 | * `yarn install` 8 | 9 | ## Linting 10 | 11 | * `yarn lint` 12 | * `yarn lint:fix` 13 | 14 | ## Running tests 15 | 16 | * `yarn test` – Runs the test suite on the current Ember version 17 | * `yarn test:ember --server` – Runs the test suite in "watch mode" 18 | * `yarn test:ember-compatibility` – Runs the test suite against multiple Ember versions 19 | 20 | ## Running the dummy application 21 | 22 | * `yarn start` 23 | * Visit the dummy application at [http://localhost:4200](http://localhost:4200). 24 | 25 | For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/). 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/addon/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-circle.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-circle.js: -------------------------------------------------------------------------------- 1 | /* global google */ 2 | 3 | import MapEntity from '../lib/entity'; 4 | import getOptions from '../lib/get-options'; 5 | 6 | export default class GCircleEntity extends MapEntity { 7 | get eventType () { 8 | return 'GCircle'; 9 | } 10 | 11 | createEntity () { 12 | return new google.maps.Circle (this.options); 13 | } 14 | 15 | get options () { 16 | return getOptions (this.args, [ 17 | 'center', 18 | 'clickable', 19 | 'draggable', 20 | 'editable', 21 | 'fillColor', 22 | 'fillOpacity', 23 | 'radius', 24 | 'stokeColor', 25 | 'strokeOpacity', 26 | 'strokePosition', 27 | 'strokeWeight', 28 | 'zIndex', 29 | ]); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-directions.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-directions.js: -------------------------------------------------------------------------------- 1 | /* global google */ 2 | 3 | import MapEntity from '../lib/entity'; 4 | import getOptions from '../lib/get-options'; 5 | import { defaults } from 'lodash'; 6 | 7 | function noOp () {} 8 | 9 | export default class GDirectionsEntity extends MapEntity { 10 | get mode () { 11 | return this.args.mode || this.args.travelMode || 'DRIVING'; 12 | } 13 | 14 | get options () { 15 | const options = getOptions (this.args, [ 16 | 'draggable', 17 | 'hideRouteList', 18 | 'markerOptions', 19 | 'panel', 20 | 'preserveViewport', 21 | 'polylineOptions', 22 | 'routeIndex', 23 | 'suppressBicyclingLayer', 24 | 'suppressInfoWindows', 25 | 'suppressMarkers', 26 | 'suppressPolylines', 27 | ]); 28 | 29 | return defaults (options, { 30 | draggable: false, 31 | hideRouteList: false, 32 | preserveViewport: false, 33 | routeIndex: 0, 34 | suppressBicyclingLayer: true, 35 | suppressInfoWindows: true, 36 | suppressMarkers: false, 37 | suppressPolylines: false, 38 | }); 39 | } 40 | 41 | createEntity () { 42 | // Delete the old directions. 43 | 44 | this._removeDirections (); 45 | this._renderer = this.map.createDirectionsRenderer (this.options); 46 | 47 | const routeOptions = { 48 | origin: this.origin, 49 | destination: this.destination, 50 | travelMode: this.mode 51 | }; 52 | 53 | this.map.directions.route (routeOptions, (response, status) => { 54 | if (status === 'OK') { 55 | this._renderer.setDirections(response); 56 | } else { 57 | (this.args.error || noOp)(status, response); 58 | } 59 | }); 60 | 61 | return this._renderer; 62 | } 63 | 64 | _removeDirections() { 65 | if (this._renderer) { 66 | this._renderer.setMap (null); 67 | this._renderer = null; 68 | } 69 | } 70 | 71 | get origin () { 72 | return this.args.origin; 73 | } 74 | 75 | get destination (){ 76 | return this.args.destination; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-heatmap-layer.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-heatmap-layer.js: -------------------------------------------------------------------------------- 1 | /* global google */ 2 | 3 | import MapEntity from '../lib/entity'; 4 | import getOptions from '../lib/get-options'; 5 | import { action } from '@ember/object'; 6 | 7 | import { isEmpty } from '@ember/utils'; 8 | 9 | export default class GHeatmapLayerEntity extends MapEntity { 10 | get eventType () { 11 | return 'GHeatmapLayer'; 12 | } 13 | 14 | get options () { 15 | return getOptions (this.args, [ 16 | 'dissipating', 17 | 'gradient', 18 | 'maxIntensity', 19 | 'radius', 20 | 'opacity', 21 | ]); 22 | } 23 | 24 | get clickable () { 25 | return false; 26 | } 27 | 28 | @action 29 | didInsert () { 30 | super.didInsert (...arguments); 31 | this.gMaps.include ('visualization'); 32 | } 33 | 34 | createEntity() { 35 | const options = Object.assign ({}, this.options, {data: this.heatMapData}); 36 | return new google.maps.visualization.HeatmapLayer (options); 37 | } 38 | 39 | @action 40 | refresh (element, [data]) { 41 | this._super(...arguments); 42 | 43 | this.entity.setData (this.heatMapData); 44 | } 45 | 46 | get heatMapData () { 47 | const data = this.args.data || []; 48 | 49 | if (isEmpty (data)) { 50 | return []; 51 | } 52 | 53 | return data.map(({ lat, lng, weight }) => 54 | weight 55 | ? { location: new google.maps.LatLng(lat, lng), weight } 56 | : new google.maps.LatLng(lat, lng) 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-map.hbs: -------------------------------------------------------------------------------- 1 |
3 |
4 |
{{yield}}
5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-marker.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-marker.js: -------------------------------------------------------------------------------- 1 | /* global google */ 2 | 3 | import MapEntity from '../lib/entity'; 4 | import getOptions from '../lib/get-options'; 5 | 6 | export default class GMarkerEntity extends MapEntity { 7 | get options () { 8 | return getOptions (this.args, [ 9 | 'position', 10 | 'title', 11 | 'draggable', 12 | 'label', 13 | 'icon', 14 | 'shape', 15 | 'zIndex', 16 | ]); 17 | } 18 | 19 | get eventType () { 20 | return 'GMarker'; 21 | } 22 | 23 | createEntity () { 24 | const options = this.options; 25 | options.animation = this.animationType; 26 | 27 | return new google.maps.Marker (options); 28 | } 29 | 30 | get animation () { 31 | return this.args.animation || 'drop'; 32 | } 33 | 34 | get animationType () { 35 | const animation = this.animation; 36 | 37 | if (animation === 'drop') { 38 | return google.maps.Animation.DROP; 39 | } else if (animation === 'bounce') { 40 | return google.maps.Animation.BOUNCE; 41 | } else { 42 | return null; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-rectangle.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-rectangle.js: -------------------------------------------------------------------------------- 1 | import MapEntity from '../lib/entity'; 2 | import getOptions from '../lib/get-options'; 3 | 4 | export default class GRectangleEntity extends MapEntity { 5 | createEntity() { 6 | return new google.maps.Rectangle(this.options) 7 | } 8 | 9 | get options () { 10 | return getOptions (this.args, [ 11 | 'bounds', 12 | 'clickable', 13 | 'draggable', 14 | 'editable', 15 | 'fillColor', 16 | 'fillOpacity', 17 | 'stokeColor', 18 | 'strokeOpacity', 19 | 'strokePosition', 20 | 'strokeWeight', 21 | 'zIndex', 22 | ]); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-static-map.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/components/g-static-map.js: -------------------------------------------------------------------------------- 1 | import Component from '@glimmer/component'; 2 | import { isPresent } from '@ember/utils'; 3 | import { getOwner } from '@ember/application'; 4 | import { get } from '@ember/object'; 5 | 6 | export default class GStaticMapComponent extends Component { 7 | get options() { 8 | let params = [ 9 | `size=${this.size}`, 10 | `maptype=${this.type}`, 11 | `zoom=${this.zoom}`, 12 | `key=${this.apiKey}`, 13 | ]; 14 | 15 | if (isPresent(this.args.center)) { 16 | params.push(`center=${encodeURI(this.args.center)}`); 17 | } 18 | 19 | return params.join('&'); 20 | } 21 | 22 | get size() { 23 | return `${this.width}x${this.height}`; 24 | } 25 | 26 | get width() { 27 | return this.args.width || 600; 28 | } 29 | 30 | get height() { 31 | return this.args.height || 300; 32 | } 33 | 34 | get type() { 35 | return this.args.type || 'roadmap'; 36 | } 37 | 38 | get zoom() { 39 | return this.args.zoom || 13; 40 | } 41 | 42 | get apiKey() { 43 | if (isPresent(this.args.apiKey)) { 44 | return this.args.apiKey; 45 | } 46 | 47 | const ENV = getOwner(this).resolveRegistration('config:environment'); 48 | return get(ENV, 'ember-cli-google.maps.apiKey'); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/helpers/directions-url.js: -------------------------------------------------------------------------------- 1 | import { helper } from '@ember/component/helper'; 2 | 3 | export default helper(function directionsUrl([destination], options) { 4 | const { api = 1 } = options; 5 | 6 | return `https://www.google.com/maps/dir/?api=${api}&destination=${encodeURIComponent(destination)}`; 7 | }); 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/lib/get-options.js: -------------------------------------------------------------------------------- 1 | import { get } from '@ember/object'; 2 | import { isPresent } from '@ember/utils'; 3 | 4 | /** 5 | * Get the options by selecting the keys from the object. If the key is not defined, 6 | * then it is not included in the options. 7 | * * 8 | * @param obj 9 | * @param keys 10 | * @return {{}} 11 | */ 12 | export default function getOptions (obj, keys) { 13 | const options = {}; 14 | 15 | keys.forEach (key => { 16 | const value = get (obj, key); 17 | 18 | if (isPresent (value)) { 19 | options[key] = value; 20 | } 21 | }); 22 | 23 | return options; 24 | } -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/mixins/map-entity.js: -------------------------------------------------------------------------------- 1 | import { reads } from '@ember/object/computed'; 2 | import Mixin from '@ember/object/mixin'; 3 | import { isPresent } from '@ember/utils'; 4 | 5 | export default Mixin.create({ 6 | classNames: ['g-entity'], 7 | 8 | _entity: null, 9 | 10 | /// Show/hide the entity. 11 | show: true, 12 | 13 | didInsertElement() { 14 | this._super(...arguments); 15 | 16 | this.parentView.on('loading', this, '_mapLoading'); 17 | this.parentView.on('loaded', this, '_mapLoaded'); 18 | 19 | const map = this.map; 20 | 21 | if (isPresent(map)) { 22 | const entity = this.createEntity(); 23 | this._showEntity(entity); 24 | } 25 | }, 26 | 27 | willDestroyElement() { 28 | this._super(...arguments); 29 | 30 | this.parentView.off('loading', this, '_mapLoading'); 31 | this.parentView.off('loaded', this, '_mapLoaded'); 32 | 33 | let entity = this.getEntity(); 34 | 35 | if (isPresent(entity)) { 36 | entity.setMap(null); 37 | } 38 | }, 39 | 40 | didUpdateAttr() { 41 | let entity = this.getEntity(); 42 | 43 | if (isPresent(entity)) { 44 | this._showEntity(entity); 45 | } 46 | }, 47 | 48 | /** 49 | * Get the implementation for the entity. 50 | */ 51 | getEntity() {}, 52 | 53 | willLoadMap() {}, 54 | 55 | didLoadMap(/* map */) {}, 56 | 57 | createEntity() {}, 58 | 59 | _mapLoading() { 60 | this.willLoadMap(); 61 | }, 62 | 63 | /** 64 | * The map has been loaded. 65 | * 66 | * @param map 67 | * @private 68 | */ 69 | _mapLoaded(map) { 70 | // Notify the subclass the map has been loaded. 71 | 72 | this.didLoadMap(map); 73 | 74 | // Instruct the subclass to create its entity. We will then show the entity. 75 | const entity = this.createEntity(); 76 | this._showEntity(entity); 77 | }, 78 | 79 | map: reads('parentView.map').volatile(), 80 | 81 | /** 82 | * Either show or hide the entity. 83 | * 84 | * @param entity 85 | * @private 86 | */ 87 | _showEntity(entity) { 88 | if (isPresent(entity)) { 89 | const show = this.show === undefined ? true : this.show; 90 | const map = this.map; 91 | 92 | if (show) { 93 | entity.setMap(map); 94 | } else { 95 | entity.setMap(null); 96 | } 97 | } 98 | }, 99 | }); 100 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/addon/styles/addon.css: -------------------------------------------------------------------------------- 1 | .g-map { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | .g-map .g-map__map { 7 | flex-grow: 1; 8 | } 9 | 10 | .g-map .g-map__entity { 11 | display: none; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/app/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-circle.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-circle'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-directions.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-directions'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-heatmap-layer.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-heatmap-layer'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-map.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-map'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-marker.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-marker'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-rectangle.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-rectangle'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/components/g-static-map.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/components/g-static-map'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/helpers/directions-url.js: -------------------------------------------------------------------------------- 1 | export { 2 | default, 3 | directionsUrl, 4 | } from 'ember-cli-google-maps/helpers/directions-url'; 5 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/services/g-maps-visualization.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/services/g-maps-visualization'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/app/services/g-maps.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-maps/services/g-maps'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/blueprints/ember-cli-google-maps/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | const { Blueprint } = require('ember-cli-blueprint-helpers'); 4 | 5 | module.exports = Blueprint.extend({ 6 | addons: [{ name: '@ember/render-modifiers', target: '^2.0.0' }], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/ember-cli-build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 4 | 5 | module.exports = function (defaults) { 6 | const app = new EmberAddon(defaults, { 7 | // Add options here 8 | }); 9 | 10 | /* 11 | This build file specifies the options for the dummy test app of this 12 | addon, located in `/tests/dummy` 13 | This build file does *not* influence how the addon or the app using it 14 | behave. You most likely want to be modifying `./index.js` or app's build file 15 | */ 16 | 17 | const { maybeEmbroider } = require('@embroider/test-setup'); 18 | return maybeEmbroider(app, { 19 | skipBabel: [ 20 | { 21 | package: 'qunit', 22 | }, 23 | ], 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | name: require('./package').name, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/testem.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | test_page: 'tests/index.html?hidepassed', 5 | disable_watching: true, 6 | launch_in_ci: ['Chrome'], 7 | launch_in_dev: ['Chrome'], 8 | browser_start_timeout: 120, 9 | browser_args: { 10 | Chrome: { 11 | ci: [ 12 | // --no-sandbox is needed when running Chrome inside a container 13 | process.env.CI ? '--no-sandbox' : null, 14 | '--headless', 15 | '--disable-dev-shm-usage', 16 | '--disable-software-rasterizer', 17 | '--mute-audio', 18 | '--remote-debugging-port=0', 19 | '--window-size=1440,900', 20 | ].filter(Boolean), 21 | }, 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from 'ember-resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from 'dummy/config/environment'; 5 | 6 | export default class App extends Application { 7 | modulePrefix = config.modulePrefix; 8 | podModulePrefix = config.podModulePrefix; 9 | Resolver = Resolver; 10 | } 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/components/g-custom-marker.js: -------------------------------------------------------------------------------- 1 | import MarkerComponent from 'ember-cli-google-maps/components/g-marker'; 2 | 3 | export default MarkerComponent.extend({ 4 | draggable: true, 5 | 6 | /* 7 | icon: computed ('item.direction', function () { 8 | 9 | }) 10 | */ 11 | 12 | icon: 'https://maps.google.com/mapfiles/kml/shapes/parking_lot_maps.png', 13 | 14 | didInsertElement() { 15 | this._super(...arguments); 16 | 17 | // Add custom code here to initialize 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/controllers/index.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | import { tracked } from "@glimmer/tracking"; 3 | import { action } from '@ember/object'; 4 | 5 | export default class IndexController extends Controller { 6 | @tracked 7 | showDirections = false; 8 | 9 | @tracked 10 | animation = 'bounce'; 11 | 12 | @tracked 13 | lat = 37.774546; 14 | 15 | @tracked 16 | lng = -122.433523; 17 | 18 | set latInput (value) { 19 | this.lat = parseFloat (value); 20 | } 21 | 22 | get latInput () { 23 | return this.lat; 24 | } 25 | 26 | set lngInput (value) { 27 | this.lng = parseFloat (value); 28 | } 29 | 30 | get lngInput () { 31 | return this.lng; 32 | } 33 | 34 | heatMapData = Object.freeze([ 35 | { lat: 37.782, lng: -122.447, weight: 1 }, 36 | { lat: 37.782, lng: -122.445 }, 37 | { lat: 37.782, lng: -122.443 }, 38 | { lat: 37.782, lng: -122.441 }, 39 | { lat: 37.782, lng: -122.439 }, 40 | { lat: 37.782, lng: -122.437 }, 41 | { lat: 37.782, lng: -122.435 }, 42 | { lat: 37.782, lng: -122.447 }, 43 | { lat: 37.782, lng: -122.445 }, 44 | { lat: 37.782, lng: -122.443 }, 45 | { lat: 37.782, lng: -122.441 }, 46 | { lat: 37.782, lng: -122.439 }, 47 | { lat: 37.782, lng: -122.437 }, 48 | { lat: 37.782, lng: -122.435 }, 49 | ]); 50 | 51 | @action 52 | click(ev) { 53 | console.log (ev); 54 | } 55 | 56 | @action 57 | toggleBounce() { 58 | this.animation = this.animation === 'bounce' ? null : 'bounce'; 59 | } 60 | 61 | @action 62 | recenterMap() {} 63 | } 64 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dummy 6 | 7 | 8 | 9 | {{content-for "head"}} 10 | 11 | 12 | 13 | 14 | {{content-for "head-footer"}} 15 | 16 | 17 | {{content-for "body"}} 18 | 19 | 20 | 21 | 22 | {{content-for "body-footer"}} 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from 'dummy/config/environment'; 3 | 4 | export default class Router extends EmberRouter { 5 | location = config.locationType; 6 | rootURL = config.rootURL; 7 | } 8 | 9 | Router.map(function () { 10 | this.route('static-map'); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/routes/index.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({}); 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/routes/static-map.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default class StaticMapRoute extends Route {} 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/styles/app.scss: -------------------------------------------------------------------------------- 1 | html, body { 2 | height: 100%; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | .ember-application > .ember-view { 8 | height: 100%; 9 | 10 | display: flex; 11 | flex-direction: column; 12 | } 13 | 14 | .map-controls--location { 15 | padding: 8px; 16 | display: flex; 17 | flex-direction: column; 18 | 19 | width: 60%; 20 | } 21 | 22 | .g-map { 23 | height: 100%; 24 | } -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{outlet}} -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/templates/components/g-custom-marker.hbs: -------------------------------------------------------------------------------- 1 | {{yield}} -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/templates/index.hbs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
Latitude:
4 |
Longitude:
5 |
6 | 7 | {{#if this.showDirections}} 8 | 9 | {{else}} 10 | 11 | {{/if}} 12 |
13 | 14 | 15 | 16 | 17 | 18 | {{!-- Coachella, CA --}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/app/templates/static-map.hbs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/config/ember-cli-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "1.0.0", 3 | "packages": [ 4 | { 5 | "name": "ember-cli", 6 | "version": "5.5.0", 7 | "blueprints": [ 8 | { 9 | "name": "addon", 10 | "outputRepo": "https://github.com/ember-cli/ember-addon-output", 11 | "codemodsSource": "ember-addon-codemods-manifest@1", 12 | "isBaseBlueprint": true, 13 | "options": [ 14 | "--yarn", 15 | "--no-welcome" 16 | ] 17 | } 18 | ] 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/config/ember-try.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getChannelURL = require('ember-source-channel-url'); 4 | const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); 5 | 6 | module.exports = async function () { 7 | return { 8 | useYarn: true, 9 | scenarios: [ 10 | { 11 | name: 'ember-lts-4.8', 12 | npm: { 13 | devDependencies: { 14 | 'ember-source': '~4.8.0', 15 | }, 16 | }, 17 | }, 18 | { 19 | name: 'ember-lts-4.12', 20 | npm: { 21 | devDependencies: { 22 | 'ember-source': '~4.12.0', 23 | }, 24 | }, 25 | }, 26 | { 27 | name: 'ember-release', 28 | npm: { 29 | devDependencies: { 30 | 'ember-source': await getChannelURL('release'), 31 | }, 32 | }, 33 | }, 34 | { 35 | name: 'ember-beta', 36 | npm: { 37 | devDependencies: { 38 | 'ember-source': await getChannelURL('beta'), 39 | }, 40 | }, 41 | }, 42 | { 43 | name: 'ember-canary', 44 | npm: { 45 | devDependencies: { 46 | 'ember-source': await getChannelURL('canary'), 47 | }, 48 | }, 49 | }, 50 | embroiderSafe(), 51 | embroiderOptimized(), 52 | ], 53 | }; 54 | }; 55 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { GOOGLE_MAPS_API_KEY } = process.env; 4 | 5 | module.exports = function (environment) { 6 | const ENV = { 7 | modulePrefix: 'dummy', 8 | environment, 9 | rootURL: '/', 10 | locationType: 'history', 11 | EmberENV: { 12 | EXTEND_PROTOTYPES: false, 13 | FEATURES: { 14 | // Here you can enable experimental features on an ember canary build 15 | // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true 16 | }, 17 | }, 18 | 19 | APP: { 20 | // Here you can pass flags/options to your application instance 21 | // when it is created 22 | }, 23 | 'ember-cli-google': { 24 | maps: { 25 | apiKey: GOOGLE_MAPS_API_KEY, 26 | libraries: ['visualization'] 27 | }, 28 | }, 29 | }; 30 | 31 | if (environment === 'development') { 32 | // ENV.APP.LOG_RESOLVER = true; 33 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 34 | // ENV.APP.LOG_TRANSITIONS = true; 35 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 36 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 37 | } 38 | 39 | if (environment === 'test') { 40 | // Testem prefers this... 41 | ENV.locationType = 'none'; 42 | 43 | // keep test console output quieter 44 | ENV.APP.LOG_ACTIVE_GENERATION = false; 45 | ENV.APP.LOG_VIEW_LOOKUPS = false; 46 | 47 | ENV.APP.rootElement = '#ember-testing'; 48 | ENV.APP.autoboot = false; 49 | } 50 | 51 | if (environment === 'production') { 52 | // here you can enable a production-specific feature 53 | } 54 | 55 | return ENV; 56 | }; 57 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "application-template-wrapper": false, 3 | "default-async-observers": true, 4 | "jquery-integration": false, 5 | "template-only-glimmer-components": true 6 | } 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions', 7 | ]; 8 | 9 | module.exports = { 10 | browsers, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/helpers/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | setupApplicationTest as upstreamSetupApplicationTest, 3 | setupRenderingTest as upstreamSetupRenderingTest, 4 | setupTest as upstreamSetupTest, 5 | } from 'ember-qunit'; 6 | 7 | // This file exists to provide wrappers around ember-qunit's 8 | // test setup functions. This way, you can easily extend the setup that is 9 | // needed per test type. 10 | 11 | function setupApplicationTest(hooks, options) { 12 | upstreamSetupApplicationTest(hooks, options); 13 | 14 | // Additional setup for application tests can be done here. 15 | // 16 | // For example, if you need an authenticated session for each 17 | // application test, you could do: 18 | // 19 | // hooks.beforeEach(async function () { 20 | // await authenticateSession(); // ember-simple-auth 21 | // }); 22 | // 23 | // This is also a good place to call test setup functions coming 24 | // from other addons: 25 | // 26 | // setupIntl(hooks); // ember-intl 27 | // setupMirage(hooks); // ember-cli-mirage 28 | } 29 | 30 | function setupRenderingTest(hooks, options) { 31 | upstreamSetupRenderingTest(hooks, options); 32 | 33 | // Additional setup for rendering tests can be done here. 34 | } 35 | 36 | function setupTest(hooks, options) { 37 | upstreamSetupTest(hooks, options); 38 | 39 | // Additional setup for unit tests can be done here. 40 | } 41 | 42 | export { setupApplicationTest, setupRenderingTest, setupTest }; 43 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dummy Tests 6 | 7 | 8 | 9 | {{content-for "head"}} 10 | {{content-for "test-head"}} 11 | 12 | 13 | 14 | 15 | 16 | {{content-for "head-footer"}} 17 | {{content-for "test-head-footer"}} 18 | 19 | 20 | {{content-for "body"}} 21 | {{content-for "test-body"}} 22 | 23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {{content-for "body-footer"}} 37 | {{content-for "test-body-footer"}} 38 | 39 | 40 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/integration/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-circle-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g-circle', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-circle}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-circle}} 20 | template block text 21 | {{/g-circle}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-directions-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g-directions', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-directions}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-directions}} 20 | template block text 21 | {{/g-directions}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-heatmap-layer-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g-heatmap-layer', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-heatmap-layer}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-heatmap-layer}} 20 | template block text 21 | {{/g-heatmap-layer}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-map-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g-map', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-map}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-map}} 20 | template block text 21 | {{/g-map}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-marker-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g-marker', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-marker}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-marker}} 20 | template block text 21 | {{/g-marker}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-rectangle-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g-rectangle', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-rectangle}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-rectangle}} 20 | template block text 21 | {{/g-rectangle}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/components/g-static-map-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import { hbs } from 'ember-cli-htmlbars'; 5 | 6 | module('Integration | Component | g-static-map', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function (assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.set('myAction', function(val) { ... }); 12 | 13 | await render(hbs``); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | 20 | template block text 21 | 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/integration/helpers/directions-url-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import { hbs } from 'ember-cli-htmlbars'; 5 | 6 | module('Integration | Helper | directions-url', function (hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | // Replace this with your real tests. 10 | test('it renders', async function (assert) { 11 | this.set('inputValue', '1234'); 12 | 13 | await render(hbs`{{directions-url inputValue}}`); 14 | 15 | assert.dom(this.element).hasText('1234'); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from 'dummy/app'; 2 | import config from 'dummy/config/environment'; 3 | import * as QUnit from 'qunit'; 4 | import { setApplication } from '@ember/test-helpers'; 5 | import { setup } from 'qunit-dom'; 6 | import { start } from 'ember-qunit'; 7 | 8 | setApplication(Application.create(config.APP)); 9 | 10 | setup(QUnit.assert); 11 | 12 | start(); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-maps/tests/unit/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/unit/mixins/map-entity-test.js: -------------------------------------------------------------------------------- 1 | import EmberObject from '@ember/object'; 2 | import MapEntityMixin from 'ember-cli-google-maps/mixins/map-entity'; 3 | import { module, test } from 'qunit'; 4 | 5 | module('Unit | Mixin | map-entity', function () { 6 | // Replace this with your real tests. 7 | test('it works', function (assert) { 8 | let MapEntityObject = EmberObject.extend(MapEntityMixin); 9 | let subject = MapEntityObject.create(); 10 | assert.ok(subject); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/unit/services/g-maps-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupTest } from 'ember-qunit'; 3 | 4 | module('Unit | Service | g-maps', function (hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test('it exists', function (assert) { 9 | let service = this.owner.lookup('service:g-maps'); 10 | assert.ok(service); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tests/unit/services/g-maps-visualization-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupTest } from 'ember-qunit'; 3 | 4 | module('Unit | Service | g-maps-visualization', function (hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test('it exists', function (assert) { 9 | let service = this.owner.lookup('service:g-maps-visualization'); 10 | assert.ok(service); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-maps/tsconfig.declarations.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "declarations", 5 | "emitDeclarationOnly": true, 6 | "noEmit": false, 7 | "rootDir": "." 8 | }, 9 | "include": ["addon", "addon-test-support"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.hbs] 16 | insert_final_newline = false 17 | 18 | [*.{diff,md}] 19 | trim_trailing_whitespace = false 20 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript 4 | rather than JavaScript by default, when a TypeScript version of a given blueprint is available. 5 | */ 6 | "isTypeScriptProject": false 7 | } 8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.eslintignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # misc 8 | /coverage/ 9 | !.* 10 | .*/ 11 | 12 | # ember-try 13 | /.node_modules.ember-try/ 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | root: true, 5 | parser: '@babel/eslint-parser', 6 | parserOptions: { 7 | ecmaVersion: 'latest', 8 | sourceType: 'module', 9 | requireConfigFile: false, 10 | babelOptions: { 11 | plugins: [ 12 | ['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }], 13 | ], 14 | }, 15 | }, 16 | plugins: ['ember'], 17 | extends: [ 18 | 'eslint:recommended', 19 | 'plugin:ember/recommended', 20 | 'plugin:prettier/recommended', 21 | ], 22 | env: { 23 | browser: true, 24 | }, 25 | rules: {}, 26 | overrides: [ 27 | // node files 28 | { 29 | files: [ 30 | './.eslintrc.js', 31 | './.prettierrc.js', 32 | './.stylelintrc.js', 33 | './.template-lintrc.js', 34 | './ember-cli-build.js', 35 | './index.js', 36 | './testem.js', 37 | './blueprints/*/index.js', 38 | './config/**/*.js', 39 | './tests/dummy/config/**/*.js', 40 | ], 41 | parserOptions: { 42 | sourceType: 'script', 43 | }, 44 | env: { 45 | browser: false, 46 | node: true, 47 | }, 48 | extends: ['plugin:n/recommended'], 49 | }, 50 | { 51 | // test files 52 | files: ['tests/**/*-test.{js,ts}'], 53 | extends: ['plugin:qunit/recommended'], 54 | }, 55 | ], 56 | }; 57 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | pull_request: {} 9 | 10 | concurrency: 11 | group: ci-${{ github.head_ref || github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | test: 16 | name: "Tests" 17 | runs-on: ubuntu-latest 18 | timeout-minutes: 10 19 | 20 | steps: 21 | - uses: actions/checkout@v3 22 | - name: Install Node 23 | uses: actions/setup-node@v3 24 | with: 25 | node-version: 18 26 | cache: npm 27 | - name: Install Dependencies 28 | run: npm ci 29 | - name: Lint 30 | run: npm run lint 31 | - name: Run Tests 32 | run: npm run test:ember 33 | 34 | floating: 35 | name: "Floating Dependencies" 36 | runs-on: ubuntu-latest 37 | timeout-minutes: 10 38 | 39 | steps: 40 | - uses: actions/checkout@v3 41 | - uses: actions/setup-node@v3 42 | with: 43 | node-version: 18 44 | cache: npm 45 | - name: Install Dependencies 46 | run: npm install --no-shrinkwrap 47 | - name: Run Tests 48 | run: npm run test:ember 49 | 50 | try-scenarios: 51 | name: ${{ matrix.try-scenario }} 52 | runs-on: ubuntu-latest 53 | needs: "test" 54 | timeout-minutes: 10 55 | 56 | strategy: 57 | fail-fast: false 58 | matrix: 59 | try-scenario: 60 | - ember-lts-4.8 61 | - ember-lts-4.12 62 | - ember-release 63 | - ember-beta 64 | - ember-canary 65 | - embroider-safe 66 | - embroider-optimized 67 | 68 | steps: 69 | - uses: actions/checkout@v3 70 | - name: Install Node 71 | uses: actions/setup-node@v3 72 | with: 73 | node-version: 18 74 | cache: npm 75 | - name: Install Dependencies 76 | run: npm ci 77 | - name: Run Tests 78 | run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} 79 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.gitignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /declarations/ 4 | 5 | # dependencies 6 | /node_modules/ 7 | 8 | # misc 9 | /.env* 10 | /.pnp* 11 | /.eslintcache 12 | /coverage/ 13 | /npm-debug.log* 14 | /testem.log 15 | /yarn-error.log 16 | 17 | # ember-try 18 | /.node_modules.ember-try/ 19 | /npm-shrinkwrap.json.ember-try 20 | /package.json.ember-try 21 | /package-lock.json.ember-try 22 | /yarn.lock.ember-try 23 | 24 | # broccoli-debug 25 | /DEBUG/ 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.npmignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist/ 3 | /tmp/ 4 | 5 | # misc 6 | /.editorconfig 7 | /.ember-cli 8 | /.env* 9 | /.eslintcache 10 | /.eslintignore 11 | /.eslintrc.js 12 | /.git/ 13 | /.github/ 14 | /.gitignore 15 | /.prettierignore 16 | /.prettierrc.js 17 | /.stylelintignore 18 | /.stylelintrc.js 19 | /.template-lintrc.js 20 | /.travis.yml 21 | /.watchmanconfig 22 | /CONTRIBUTING.md 23 | /ember-cli-build.js 24 | /testem.js 25 | /tests/ 26 | /yarn-error.log 27 | /yarn.lock 28 | .gitkeep 29 | 30 | # ember-try 31 | /.node_modules.ember-try/ 32 | /npm-shrinkwrap.json.ember-try 33 | /package.json.ember-try 34 | /package-lock.json.ember-try 35 | /yarn.lock.ember-try 36 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.prettierignore: -------------------------------------------------------------------------------- 1 | # unconventional js 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # misc 8 | /coverage/ 9 | !.* 10 | .*/ 11 | 12 | # ember-try 13 | /.node_modules.ember-try/ 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.prettierrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | overrides: [ 5 | { 6 | files: '*.{js,ts}', 7 | options: { 8 | singleQuote: true, 9 | }, 10 | }, 11 | ], 12 | }; 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.stylelintignore: -------------------------------------------------------------------------------- 1 | # unconventional files 2 | /blueprints/*/files/ 3 | 4 | # compiled output 5 | /dist/ 6 | 7 | # addons 8 | /.node_modules.ember-try/ 9 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.stylelintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'], 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.template-lintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | extends: 'recommended', 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["dist"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How To Contribute 2 | 3 | ## Installation 4 | 5 | * `git clone ` 6 | * `cd packages/ember-cli-google-recaptcha` 7 | * `npm install` 8 | 9 | ## Linting 10 | 11 | * `npm run lint` 12 | * `npm run lint:fix` 13 | 14 | ## Running tests 15 | 16 | * `npm run test` – Runs the test suite on the current Ember version 17 | * `npm run test:ember -- --server` – Runs the test suite in "watch mode" 18 | * `npm run test:ember-compatibility` – Runs the test suite against multiple Ember versions 19 | 20 | ## Running the dummy application 21 | 22 | * `npm run start` 23 | * Visit the dummy application at [http://localhost:4200](http://localhost:4200). 24 | 25 | For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/). 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/addon/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/addon/components/g-recaptcha-invisible.hbs: -------------------------------------------------------------------------------- 1 |
5 | {{yield}} 6 |
7 |
8 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/addon/components/g-recaptcha-invisible.js: -------------------------------------------------------------------------------- 1 | import CaptchaComponent from '../-private/g-recaptcha-base'; 2 | import { action } from '@ember/object'; 3 | import { isPresent } from '@ember/utils'; 4 | 5 | /** 6 | * @class GRecaptchaInvisibleComponent 7 | * 8 | * The component for invisible reRECAPTCHA 9 | */ 10 | export default class GRecaptchaInvisibleComponent extends CaptchaComponent { 11 | getOptions () { 12 | return { 13 | badge: this.badge 14 | } 15 | } 16 | 17 | get size () { 18 | return 'invisible'; 19 | } 20 | 21 | get type () { 22 | return this.args.type || 'image' 23 | } 24 | 25 | get badge () { 26 | return this.args.badge || 'bottomright'; 27 | } 28 | 29 | @action 30 | async run (element, [execute, reset]) { 31 | if (reset) { 32 | await this.reset (); 33 | } 34 | 35 | if (execute) { 36 | await this.execute (); 37 | } 38 | } 39 | 40 | get listenToSubmit () { 41 | const { listenToSubmit = true } = this.args; 42 | return listenToSubmit; 43 | } 44 | 45 | @action 46 | async submit (ev) { 47 | // Prevent the default behavior of the form, which is to refresh the page. 48 | ev.preventDefault (); 49 | 50 | if (this.listenToSubmit) { 51 | await this.forceVerify (); 52 | } 53 | } 54 | 55 | @action 56 | async verify (element, [ verify ]) { 57 | if (verify) { 58 | await this.forceVerify (); 59 | } 60 | } 61 | 62 | /** 63 | * Force the verification of the user 64 | */ 65 | async forceVerify () { 66 | // The client wants to to handle the submit event. We need to reset the 67 | // control if there is already a response. Otherwise, there is a chance the 68 | // response has already been used and it cannot be used again. 69 | 70 | if (isPresent (this.response)) { 71 | await this.reset (); 72 | } 73 | 74 | await this.execute (); 75 | } 76 | } -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/addon/components/g-recaptcha-v2.hbs: -------------------------------------------------------------------------------- 1 |
4 |
-------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/addon/components/g-recaptcha-v2.js: -------------------------------------------------------------------------------- 1 | import CaptchaComponent from '../-private/g-recaptcha-base'; 2 | import { action } from '@ember/object'; 3 | 4 | export default class GRecaptchaV2Component extends CaptchaComponent { 5 | get tabIndex () { 6 | return this.args.tabIndex || 0; 7 | } 8 | 9 | get theme () { 10 | return this.args.theme || 'light'; 11 | } 12 | 13 | get type () { 14 | return this.args.type || 'image'; 15 | } 16 | 17 | get size () { 18 | return this.args.size || 'normal'; 19 | } 20 | 21 | @action 22 | async run (element, [reset]) { 23 | if (reset) { 24 | await this.reset (); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/app/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/app/components/g-recaptcha-invisible.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-recaptcha/components/g-recaptcha-invisible'; -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/app/components/g-recaptcha-v2.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-recaptcha/components/g-recaptcha-v2'; -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/app/services/g-recaptcha-v3.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-recaptcha/services/g-recaptcha-v3'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/app/services/g-recaptcha.js: -------------------------------------------------------------------------------- 1 | export { default } from 'ember-cli-google-recaptcha/services/g-recaptcha'; 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/blueprints/ember-cli-google-recaptcha/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 3 | const { Blueprint } = require ('ember-cli-blueprint-helpers'); 4 | 5 | module.exports = Blueprint.extend ({ 6 | addons: [ 7 | { name: '@ember/render-modifiers' }, 8 | { name: 'ember-cli-script' } 9 | ] 10 | }); 11 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/ember-cli-build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 4 | 5 | module.exports = function (defaults) { 6 | const app = new EmberAddon(defaults, { 7 | // Add options here 8 | }); 9 | 10 | /* 11 | This build file specifies the options for the dummy test app of this 12 | addon, located in `/tests/dummy` 13 | This build file does *not* influence how the addon or the app using it 14 | behave. You most likely want to be modifying `./index.js` or app's build file 15 | */ 16 | 17 | const { maybeEmbroider } = require('@embroider/test-setup'); 18 | return maybeEmbroider(app, { 19 | skipBabel: [ 20 | { 21 | package: 'qunit', 22 | }, 23 | ], 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | name: require('./package').name, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/testem.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | test_page: 'tests/index.html?hidepassed', 5 | disable_watching: true, 6 | launch_in_ci: ['Chrome'], 7 | launch_in_dev: ['Chrome'], 8 | browser_start_timeout: 120, 9 | browser_args: { 10 | Chrome: { 11 | ci: [ 12 | // --no-sandbox is needed when running Chrome inside a container 13 | process.env.CI ? '--no-sandbox' : null, 14 | '--headless', 15 | '--disable-dev-shm-usage', 16 | '--disable-software-rasterizer', 17 | '--mute-audio', 18 | '--remote-debugging-port=0', 19 | '--window-size=1440,900', 20 | ].filter(Boolean), 21 | }, 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | embertest: true 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Application from '@ember/application'; 2 | import Resolver from 'ember-resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from 'dummy/config/environment'; 5 | 6 | export default class App extends Application { 7 | modulePrefix = config.modulePrefix; 8 | podModulePrefix = config.podModulePrefix; 9 | Resolver = Resolver; 10 | } 11 | 12 | loadInitializers(App, config.modulePrefix); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/controllers/invisible.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | import { tracked } from "@glimmer/tracking"; 3 | import { action } from '@ember/object'; 4 | 5 | export default class InvisibleController extends Controller { 6 | @tracked 7 | reset; 8 | 9 | @tracked 10 | execute; 11 | 12 | @tracked 13 | response; 14 | 15 | @action 16 | verified (response) { 17 | this.response = response; 18 | } 19 | 20 | @action 21 | resetRecaptcha () { 22 | this.response = null; 23 | this.reset = true; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/controllers/v2.js: -------------------------------------------------------------------------------- 1 | import Controller from '@ember/controller'; 2 | import { action } from '@ember/object'; 3 | import { tracked } from "@glimmer/tracking"; 4 | 5 | export default class V2Controller extends Controller { 6 | @tracked 7 | response; 8 | 9 | @tracked 10 | reset; 11 | 12 | @action 13 | verified (response) { 14 | this.response = response; 15 | } 16 | 17 | @action 18 | resetRecaptcha () { 19 | this.reset = true; 20 | this.response = null; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dummy 6 | 7 | 8 | 9 | {{content-for "head"}} 10 | 11 | 12 | 13 | 14 | {{content-for "head-footer"}} 15 | 16 | 17 | {{content-for "body"}} 18 | 19 | 20 | 21 | 22 | {{content-for "body-footer"}} 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import EmberRouter from '@ember/routing/router'; 2 | import config from 'dummy/config/environment'; 3 | 4 | export default class Router extends EmberRouter { 5 | location = config.locationType; 6 | rootURL = config.rootURL; 7 | } 8 | 9 | Router.map(function() { 10 | this.route('v2'); 11 | this.route('invisible'); 12 | this.route('v3'); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/routes/index.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/routes/invisible.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default class InvisibleRoute extends Route { 4 | setupController (controller) { 5 | super.setupController (...arguments); 6 | 7 | controller.execute = true; 8 | } 9 | 10 | resetController (controller, isExiting) { 11 | super.resetController (...arguments); 12 | 13 | if (isExiting) { 14 | controller.reset = false; 15 | controller.execute = false; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/routes/v2.js: -------------------------------------------------------------------------------- 1 | import Route from '@ember/routing/route'; 2 | 3 | export default class V2Route extends Route { 4 | resetController (controller, isExiting) { 5 | super.setupController (...arguments); 6 | 7 | if (isExiting) { 8 | controller.response = null; 9 | controller.reset = true; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- 1 | /* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */ 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{outlet}} -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/templates/index.hbs: -------------------------------------------------------------------------------- 1 |

Invisible reCAPTCHA

2 |

v2 reCAPTCHA

3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/templates/invisible.hbs: -------------------------------------------------------------------------------- 1 |

Back to index

2 | 3 | 4 |
5 | 6 |
7 |
8 | 9 | {{#if this.response}} 10 |

Response: {{this.response}}

11 |

12 | 13 | {{#if this.isExpired}} 14 |

The response has expired.

15 | {{/if}} 16 | {{/if}} 17 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/app/templates/v2.hbs: -------------------------------------------------------------------------------- 1 |

Back to index

2 | 3 | 4 | 5 | {{#if this.response}} 6 |

Response: {{this.response}}

7 |

8 | {{/if}} 9 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/config/ember-cli-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": "1.0.0", 3 | "packages": [ 4 | { 5 | "name": "ember-cli", 6 | "version": "5.5.0", 7 | "blueprints": [ 8 | { 9 | "name": "addon", 10 | "outputRepo": "https://github.com/ember-cli/ember-addon-output", 11 | "codemodsSource": "ember-addon-codemods-manifest@1", 12 | "isBaseBlueprint": true, 13 | "options": [ 14 | "--no-welcome" 15 | ] 16 | } 17 | ] 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/config/ember-try.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const getChannelURL = require('ember-source-channel-url'); 4 | const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); 5 | 6 | module.exports = async function () { 7 | return { 8 | scenarios: [ 9 | { 10 | name: 'ember-lts-4.8', 11 | npm: { 12 | devDependencies: { 13 | 'ember-source': '~4.8.0', 14 | }, 15 | }, 16 | }, 17 | { 18 | name: 'ember-lts-4.12', 19 | npm: { 20 | devDependencies: { 21 | 'ember-source': '~4.12.0', 22 | }, 23 | }, 24 | }, 25 | { 26 | name: 'ember-release', 27 | npm: { 28 | devDependencies: { 29 | 'ember-source': await getChannelURL('release'), 30 | }, 31 | }, 32 | }, 33 | { 34 | name: 'ember-beta', 35 | npm: { 36 | devDependencies: { 37 | 'ember-source': await getChannelURL('beta'), 38 | }, 39 | }, 40 | }, 41 | { 42 | name: 'ember-canary', 43 | npm: { 44 | devDependencies: { 45 | 'ember-source': await getChannelURL('canary'), 46 | }, 47 | }, 48 | }, 49 | embroiderSafe(), 50 | embroiderOptimized(), 51 | ], 52 | }; 53 | }; 54 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function (environment) { 4 | const ENV = { 5 | modulePrefix: 'dummy', 6 | environment, 7 | rootURL: '/', 8 | locationType: 'history', 9 | EmberENV: { 10 | EXTEND_PROTOTYPES: false, 11 | FEATURES: { 12 | // Here you can enable experimental features on an ember canary build 13 | // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true 14 | }, 15 | }, 16 | 17 | APP: { 18 | // Here you can pass flags/options to your application instance 19 | // when it is created 20 | }, 21 | 'ember-cli-google': { 22 | recaptcha: { 23 | siteKey: '6Ler5jcUAAAAAF3XTDnsEPKx4c2oQtW3wxE1rzIC' 24 | } 25 | } 26 | }; 27 | 28 | if (environment === 'development') { 29 | // ENV.APP.LOG_RESOLVER = true; 30 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 31 | // ENV.APP.LOG_TRANSITIONS = true; 32 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 33 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 34 | } 35 | 36 | if (environment === 'test') { 37 | // Testem prefers this... 38 | ENV.locationType = 'none'; 39 | 40 | // keep test console output quieter 41 | ENV.APP.LOG_ACTIVE_GENERATION = false; 42 | ENV.APP.LOG_VIEW_LOOKUPS = false; 43 | 44 | ENV.APP.rootElement = '#ember-testing'; 45 | ENV.APP.autoboot = false; 46 | } 47 | 48 | if (environment === 'production') { 49 | // here you can enable a production-specific feature 50 | } 51 | 52 | return ENV; 53 | }; 54 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/config/optional-features.json: -------------------------------------------------------------------------------- 1 | { 2 | "application-template-wrapper": false, 3 | "default-async-observers": true, 4 | "jquery-integration": false, 5 | "template-only-glimmer-components": true 6 | } 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const browsers = [ 4 | 'last 1 Chrome versions', 5 | 'last 1 Firefox versions', 6 | 'last 1 Safari versions', 7 | ]; 8 | 9 | module.exports = { 10 | browsers, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import { run } from '@ember/runloop'; 2 | 3 | export default function destroyApp(application) { 4 | run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/helpers/index.js: -------------------------------------------------------------------------------- 1 | import { 2 | setupApplicationTest as upstreamSetupApplicationTest, 3 | setupRenderingTest as upstreamSetupRenderingTest, 4 | setupTest as upstreamSetupTest, 5 | } from 'ember-qunit'; 6 | 7 | // This file exists to provide wrappers around ember-qunit's 8 | // test setup functions. This way, you can easily extend the setup that is 9 | // needed per test type. 10 | 11 | function setupApplicationTest(hooks, options) { 12 | upstreamSetupApplicationTest(hooks, options); 13 | 14 | // Additional setup for application tests can be done here. 15 | // 16 | // For example, if you need an authenticated session for each 17 | // application test, you could do: 18 | // 19 | // hooks.beforeEach(async function () { 20 | // await authenticateSession(); // ember-simple-auth 21 | // }); 22 | // 23 | // This is also a good place to call test setup functions coming 24 | // from other addons: 25 | // 26 | // setupIntl(hooks); // ember-intl 27 | // setupMirage(hooks); // ember-cli-mirage 28 | } 29 | 30 | function setupRenderingTest(hooks, options) { 31 | upstreamSetupRenderingTest(hooks, options); 32 | 33 | // Additional setup for rendering tests can be done here. 34 | } 35 | 36 | function setupTest(hooks, options) { 37 | upstreamSetupTest(hooks, options); 38 | 39 | // Additional setup for unit tests can be done here. 40 | } 41 | 42 | export { setupApplicationTest, setupRenderingTest, setupTest }; 43 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/helpers/module-for-acceptance.js: -------------------------------------------------------------------------------- 1 | import { module } from 'qunit'; 2 | import { resolve } from 'rsvp'; 3 | import startApp from '../helpers/start-app'; 4 | import destroyApp from '../helpers/destroy-app'; 5 | 6 | export default function(name, options = {}) { 7 | module(name, { 8 | beforeEach() { 9 | this.application = startApp(); 10 | 11 | if (options.beforeEach) { 12 | return options.beforeEach.apply(this, arguments); 13 | } 14 | }, 15 | 16 | afterEach() { 17 | let afterEach = options.afterEach && options.afterEach.apply(this, arguments); 18 | return resolve(afterEach).then(() => destroyApp(this.application)); 19 | } 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from '../../resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Application from '../../app'; 2 | import config from '../../config/environment'; 3 | import { merge } from '@ember/polyfills'; 4 | import { run } from '@ember/runloop'; 5 | 6 | export default function startApp(attrs) { 7 | let attributes = merge({}, config.APP); 8 | attributes = merge(attributes, attrs); // use defaults, but you can override; 9 | 10 | return run(() => { 11 | let application = Application.create(attributes); 12 | application.setupForTesting(); 13 | application.injectTestHelpers(); 14 | return application; 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dummy Tests 6 | 7 | 8 | 9 | {{content-for "head"}} 10 | {{content-for "test-head"}} 11 | 12 | 13 | 14 | 15 | 16 | {{content-for "head-footer"}} 17 | {{content-for "test-head-footer"}} 18 | 19 | 20 | {{content-for "body"}} 21 | {{content-for "test-body"}} 22 | 23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | {{content-for "body-footer"}} 37 | {{content-for "test-body-footer"}} 38 | 39 | 40 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/integration/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/integration/components/g-recaptcha-invisible-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g recaptcha invisible', function(hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function(assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.on('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-recaptcha-invisible}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-recaptcha-invisible}} 20 | template block text 21 | {{/g-recaptcha-invisible}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/integration/components/g-recaptcha-v2-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupRenderingTest } from 'ember-qunit'; 3 | import { render } from '@ember/test-helpers'; 4 | import hbs from 'htmlbars-inline-precompile'; 5 | 6 | module('Integration | Component | g recaptcha v2', function(hooks) { 7 | setupRenderingTest(hooks); 8 | 9 | test('it renders', async function(assert) { 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.on('myAction', function(val) { ... }); 12 | 13 | await render(hbs`{{g-recaptcha-v2}}`); 14 | 15 | assert.dom(this.element).hasText(''); 16 | 17 | // Template block usage: 18 | await render(hbs` 19 | {{#g-recaptcha-v2}} 20 | template block text 21 | {{/g-recaptcha-v2}} 22 | `); 23 | 24 | assert.dom(this.element).hasText('template block text'); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import Application from 'dummy/app'; 2 | import config from 'dummy/config/environment'; 3 | import * as QUnit from 'qunit'; 4 | import { setApplication } from '@ember/test-helpers'; 5 | import { setup } from 'qunit-dom'; 6 | import { start } from 'ember-qunit'; 7 | 8 | setApplication(Application.create(config.APP)); 9 | 10 | setup(QUnit.assert); 11 | 12 | start(); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google-recaptcha/tests/unit/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/unit/services/g-recaptcha-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupTest } from 'ember-qunit'; 3 | 4 | module('Unit | Service | g recaptcha', function(hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test('it exists', function(assert) { 9 | let service = this.owner.lookup('service:g-recaptcha'); 10 | assert.ok(service); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tests/unit/services/g-recaptcha-v3-test.js: -------------------------------------------------------------------------------- 1 | import { module, test } from 'qunit'; 2 | import { setupTest } from 'ember-qunit'; 3 | 4 | module('Unit | Service | g-recaptcha-v3', function(hooks) { 5 | setupTest(hooks); 6 | 7 | // Replace this with your real tests. 8 | test('it exists', function(assert) { 9 | let service = this.owner.lookup('service:g-recaptcha-v3'); 10 | assert.ok(service); 11 | }); 12 | }); 13 | 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google-recaptcha/tsconfig.declarations.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "declarationDir": "declarations", 5 | "emitDeclarationOnly": true, 6 | "noEmit": false, 7 | "rootDir": "." 8 | }, 9 | "include": ["addon", "addon-test-support"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/ember-cli-google/README.md: -------------------------------------------------------------------------------- 1 | # ember-cli-google 2 | 3 | EmberJS add-on for a variety of Google services and products. 4 | 5 | ## Features 6 | 7 | * Designed to support seamless integration into an EmberJS application. 8 | * Proper binding of attributes to options for real-time, dynamic updates. 9 | * Handle events as actions for interactive designs. 10 | * Auto-loading and configuring of scripts that correspond with appropriate lifecycle events. 11 | 12 | ## Supported Products 13 | 14 | * [ember-cli-google-analytics](https://github.com/onehilltech/ember-cli-google-analytics) 15 | * [ember-cli-google-charts](https://github.com/onehilltech/ember-cli-google-charts) 16 | * [ember-cli-google-recaptcha](https://github.com/onehilltech/ember-cli-google-recaptcha) 17 | 18 | ## Installation 19 | 20 | ember install ember-cli-google 21 | -------------------------------------------------------------------------------- /packages/ember-cli-google/addon/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/addon/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/app/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/app/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/blueprints/ember-cli-google/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | normalizeEntityName() {}, // no-op since we're just adding dependencies 4 | 5 | afterInstall () { 6 | return this.addAddonsToProject ({ 7 | packages: [ 8 | {name: 'ember-cli-google-recaptcha', target: '^1.0.0'}, 9 | {name: 'ember-cli-google-charts', target: '^0.2.1'}, 10 | {name: '@onehilltech/ember-cli-google-analytics', target: '^0.3.0'} 11 | ] 12 | }); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /packages/ember-cli-google/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-google", 3 | "dependencies": { 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google/config/ember-try.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | scenarios: [ 4 | { 5 | name: 'ember-lts-2.8', 6 | bower: { 7 | dependencies: { 8 | 'ember': 'components/ember#lts-2-8' 9 | }, 10 | resolutions: { 11 | 'ember': 'lts-2-8' 12 | } 13 | }, 14 | npm: { 15 | devDependencies: { 16 | 'ember-source': null 17 | } 18 | } 19 | }, 20 | { 21 | name: 'ember-lts-2.12', 22 | npm: { 23 | devDependencies: { 24 | 'ember-source': '~2.12.0' 25 | } 26 | } 27 | }, 28 | { 29 | name: 'ember-release', 30 | bower: { 31 | dependencies: { 32 | 'ember': 'components/ember#release' 33 | }, 34 | resolutions: { 35 | 'ember': 'release' 36 | } 37 | }, 38 | npm: { 39 | devDependencies: { 40 | 'ember-source': null 41 | } 42 | } 43 | }, 44 | { 45 | name: 'ember-beta', 46 | bower: { 47 | dependencies: { 48 | 'ember': 'components/ember#beta' 49 | }, 50 | resolutions: { 51 | 'ember': 'beta' 52 | } 53 | }, 54 | npm: { 55 | devDependencies: { 56 | 'ember-source': null 57 | } 58 | } 59 | }, 60 | { 61 | name: 'ember-canary', 62 | bower: { 63 | dependencies: { 64 | 'ember': 'components/ember#canary' 65 | }, 66 | resolutions: { 67 | 'ember': 'canary' 68 | } 69 | }, 70 | npm: { 71 | devDependencies: { 72 | 'ember-source': null 73 | } 74 | } 75 | }, 76 | { 77 | name: 'ember-default', 78 | npm: { 79 | devDependencies: {} 80 | } 81 | } 82 | ] 83 | }; 84 | -------------------------------------------------------------------------------- /packages/ember-cli-google/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(/* environment, appConfig */) { 5 | return { }; 6 | }; 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google/ember-cli-build.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); 5 | 6 | module.exports = function(defaults) { 7 | let app = new EmberAddon(defaults, { 8 | // Add options here 9 | }); 10 | 11 | /* 12 | This build file specifies the options for the dummy test app of this 13 | addon, located in `/tests/dummy` 14 | This build file does *not* influence how the addon or the app using it 15 | behave. You most likely want to be modifying `./index.js` or app's build file 16 | */ 17 | 18 | return app.toTree(); 19 | }; 20 | -------------------------------------------------------------------------------- /packages/ember-cli-google/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = { 5 | name: 'ember-cli-google' 6 | }; 7 | -------------------------------------------------------------------------------- /packages/ember-cli-google/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ember-cli-google", 3 | "version": "0.10.0", 4 | "description": "The default blueprint for ember-cli addons.", 5 | "keywords": [ 6 | "ember-addon" 7 | ], 8 | "license": "MIT", 9 | "author": "", 10 | "directories": { 11 | "doc": "doc", 12 | "test": "tests" 13 | }, 14 | "repository": "", 15 | "scripts": { 16 | "build": "ember build", 17 | "start": "ember server", 18 | "test": "ember try:each" 19 | }, 20 | "dependencies": { 21 | "ember-cli-babel": "^6.6.0", 22 | "ember-cli-htmlbars": "^2.0.3" 23 | }, 24 | "devDependencies": { 25 | "broccoli-asset-rev": "^2.4.5", 26 | "ember-ajax": "^3.0.0", 27 | "ember-cli": "~2.16.2", 28 | "ember-cli-dependency-checker": "^2.0.0", 29 | "ember-cli-eslint": "^4.0.0", 30 | "ember-cli-htmlbars": "^2.0.1", 31 | "ember-cli-htmlbars-inline-precompile": "^1.0.0", 32 | "ember-cli-inject-live-reload": "^1.4.1", 33 | "ember-cli-qunit": "^4.0.0", 34 | "ember-cli-shims": "^1.1.0", 35 | "ember-cli-sri": "^2.1.0", 36 | "ember-cli-uglify": "^2.0.0", 37 | "ember-disable-prototype-extensions": "^1.1.2", 38 | "ember-export-application-global": "^2.0.0", 39 | "ember-load-initializers": "^1.0.0", 40 | "ember-resolver": "^4.0.0", 41 | "ember-source": "~2.16.0", 42 | "ember-welcome-page": "^3.0.0", 43 | "loader.js": "^4.2.3" 44 | }, 45 | "engines": { 46 | "node": "^4.5 || 6.* || >= 7.*" 47 | }, 48 | "ember-addon": { 49 | "configPath": "tests/dummy/config" 50 | }, 51 | "gitHead": "8ca291c9aa8b42a49d344eb4472a2eb6d165920d" 52 | } 53 | -------------------------------------------------------------------------------- /packages/ember-cli-google/testem.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | test_page: 'tests/index.html?hidepassed', 4 | disable_watching: true, 5 | launch_in_ci: [ 6 | 'Chrome' 7 | ], 8 | launch_in_dev: [ 9 | 'Chrome' 10 | ], 11 | browser_args: { 12 | Chrome: { 13 | mode: 'ci', 14 | args: [ 15 | '--disable-gpu', 16 | '--headless', 17 | '--remote-debugging-port=9222', 18 | '--window-size=1440,900' 19 | ] 20 | }, 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | embertest: true 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ 3 | "document", 4 | "window", 5 | "location", 6 | "setTimeout", 7 | "$", 8 | "-Promise", 9 | "define", 10 | "console", 11 | "visit", 12 | "exists", 13 | "fillIn", 14 | "click", 15 | "keyEvent", 16 | "triggerEvent", 17 | "find", 18 | "findWithAssert", 19 | "wait", 20 | "DS", 21 | "andThen", 22 | "currentURL", 23 | "currentPath", 24 | "currentRouteName" 25 | ], 26 | "node": false, 27 | "browser": false, 28 | "boss": true, 29 | "curly": true, 30 | "debug": false, 31 | "devel": false, 32 | "eqeqeq": true, 33 | "evil": true, 34 | "forin": false, 35 | "immed": false, 36 | "laxbreak": false, 37 | "newcap": true, 38 | "noarg": true, 39 | "noempty": false, 40 | "nonew": false, 41 | "nomen": false, 42 | "onevar": false, 43 | "plusplus": false, 44 | "regexp": false, 45 | "undef": true, 46 | "sub": true, 47 | "strict": false, 48 | "white": false, 49 | "eqnull": true, 50 | "esversion": 6, 51 | "unused": true 52 | } 53 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Resolver from './resolver'; 3 | import loadInitializers from 'ember-load-initializers'; 4 | import config from './config/environment'; 5 | 6 | let App; 7 | 8 | App = Ember.Application.extend({ 9 | modulePrefix: config.modulePrefix, 10 | podModulePrefix: config.podModulePrefix, 11 | Resolver 12 | }); 13 | 14 | loadInitializers(App, config.modulePrefix); 15 | 16 | export default App; 17 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/controllers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/controllers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/helpers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/helpers/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | 12 | 13 | 14 | 15 | {{content-for "head-footer"}} 16 | 17 | 18 | {{content-for "body"}} 19 | 20 | 21 | 22 | 23 | {{content-for "body-footer"}} 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/models/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/models/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember-resolver'; 2 | 3 | export default Resolver; 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/router.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import config from './config/environment'; 3 | 4 | const Router = Ember.Router.extend({ 5 | location: config.locationType, 6 | rootURL: config.rootURL 7 | }); 8 | 9 | Router.map(function() { 10 | 11 | }); 12 | 13 | export default Router; 14 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/routes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/routes/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/styles/app.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/styles/app.css -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/templates/application.hbs: -------------------------------------------------------------------------------- 1 | {{outlet}} 2 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/app/templates/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/dummy/app/templates/components/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/config/environment.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | 'use strict'; 3 | 4 | module.exports = function(environment) { 5 | let ENV = { 6 | modulePrefix: 'dummy', 7 | environment, 8 | rootURL: '/', 9 | locationType: 'auto', 10 | EmberENV: { 11 | FEATURES: { 12 | // Here you can enable experimental features on an ember canary build 13 | // e.g. 'with-controller': true 14 | }, 15 | EXTEND_PROTOTYPES: { 16 | // Prevent Ember Data from overriding Date.parse. 17 | Date: false 18 | } 19 | }, 20 | 21 | APP: { 22 | // Here you can pass flags/options to your application instance 23 | // when it is created 24 | } 25 | }; 26 | 27 | if (environment === 'development') { 28 | // ENV.APP.LOG_RESOLVER = true; 29 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 30 | // ENV.APP.LOG_TRANSITIONS = true; 31 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 32 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 33 | } 34 | 35 | if (environment === 'test') { 36 | // Testem prefers this... 37 | ENV.locationType = 'none'; 38 | 39 | // keep test console output quieter 40 | ENV.APP.LOG_ACTIVE_GENERATION = false; 41 | ENV.APP.LOG_VIEW_LOOKUPS = false; 42 | 43 | ENV.APP.rootElement = '#ember-testing'; 44 | } 45 | 46 | if (environment === 'production') { 47 | 48 | } 49 | 50 | return ENV; 51 | }; 52 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/config/targets.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | browsers: [ 4 | 'ie 9', 5 | 'last 1 Chrome versions', 6 | 'last 1 Firefox versions', 7 | 'last 1 Safari versions' 8 | ] 9 | }; 10 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/dummy/public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import { run } from '@ember/runloop'; 2 | 3 | export default function destroyApp(application) { 4 | run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/helpers/module-for-acceptance.js: -------------------------------------------------------------------------------- 1 | import { module } from 'qunit'; 2 | import { resolve } from 'rsvp'; 3 | import startApp from '../helpers/start-app'; 4 | import destroyApp from '../helpers/destroy-app'; 5 | 6 | export default function(name, options = {}) { 7 | module(name, { 8 | beforeEach() { 9 | this.application = startApp(); 10 | 11 | if (options.beforeEach) { 12 | return options.beforeEach.apply(this, arguments); 13 | } 14 | }, 15 | 16 | afterEach() { 17 | let afterEach = options.afterEach && options.afterEach.apply(this, arguments); 18 | return resolve(afterEach).then(() => destroyApp(this.application)); 19 | } 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from '../../resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Application from '../../app'; 2 | import config from '../../config/environment'; 3 | import { merge } from '@ember/polyfills'; 4 | import { run } from '@ember/runloop'; 5 | 6 | export default function startApp(attrs) { 7 | let attributes = merge({}, config.APP); 8 | attributes = merge(attributes, attrs); // use defaults, but you can override; 9 | 10 | return run(() => { 11 | let application = Application.create(attributes); 12 | application.setupForTesting(); 13 | application.injectTestHelpers(); 14 | return application; 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dummy Tests 7 | 8 | 9 | 10 | {{content-for "head"}} 11 | {{content-for "test-head"}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for "head-footer"}} 18 | {{content-for "test-head-footer"}} 19 | 20 | 21 | {{content-for "body"}} 22 | {{content-for "test-body"}} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | {{content-for "body-footer"}} 31 | {{content-for "test-body-footer"}} 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/integration/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/integration/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import resolver from './helpers/resolver'; 2 | import { 3 | setResolver 4 | } from 'ember-qunit'; 5 | import { start } from 'ember-cli-qunit'; 6 | 7 | setResolver(resolver); 8 | start(); 9 | -------------------------------------------------------------------------------- /packages/ember-cli-google/tests/unit/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/tests/unit/.gitkeep -------------------------------------------------------------------------------- /packages/ember-cli-google/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onehilltech/ember-cli-google/d93c45e8a1889ecae5226c1df50e0c020a259bde/packages/ember-cli-google/vendor/.gitkeep --------------------------------------------------------------------------------