Repository: mike-north/ember-cli-materialize Branch: master Commit: 80ea04284bf2 Files: 385 Total size: 280.5 KB Directory structure: gitextract_pahd7ynm/ ├── .bowerrc ├── .editorconfig ├── .ember-cli ├── .eslintignore ├── .eslintrc.js ├── .github/ │ └── ISSUE_TEMPLATE/ │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .jscsrc ├── .jshintrc ├── .npmignore ├── .prettierrc ├── .template-lintrc.js ├── .travis.yml ├── .vscode/ │ └── settings.json ├── .watchmanconfig ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── addon/ │ ├── components/ │ │ ├── -md-fixed-btn-base.js │ │ ├── md-badge.js │ │ ├── md-btn-dropdown.js │ │ ├── md-btn-submit.js │ │ ├── md-btn.js │ │ ├── md-card-action.js │ │ ├── md-card-collapsible.js │ │ ├── md-card-content.js │ │ ├── md-card-panel.js │ │ ├── md-card-reveal.js │ │ ├── md-card.js │ │ ├── md-check.js │ │ ├── md-checks-check.js │ │ ├── md-checks.js │ │ ├── md-collapsible.js │ │ ├── md-collection.js │ │ ├── md-copyright.js │ │ ├── md-default-collection-header.js │ │ ├── md-default-column-header.js │ │ ├── md-fixed-btn.js │ │ ├── md-fixed-btns.js │ │ ├── md-input-date.js │ │ ├── md-input-field.js │ │ ├── md-input.js │ │ ├── md-loader.js │ │ ├── md-modal-container.js │ │ ├── md-modal.js │ │ ├── md-navbar.js │ │ ├── md-pagination.js │ │ ├── md-parallax.js │ │ ├── md-radio.js │ │ ├── md-radios-radio.js │ │ ├── md-radios.js │ │ ├── md-range.js │ │ ├── md-select.js │ │ ├── md-switch.js │ │ ├── md-switches-switch.js │ │ ├── md-switches.js │ │ ├── md-tab.js │ │ ├── md-table-col.js │ │ ├── md-table.js │ │ ├── md-tabs.js │ │ ├── md-textarea.js │ │ ├── selectable-item-group.js │ │ └── selectable-item.js │ ├── helpers/ │ │ └── bw-compat-icon.js │ ├── mixins/ │ │ ├── group-selectable-item.js │ │ └── uses-settings.js │ ├── services/ │ │ └── md-settings.js │ └── templates/ │ └── components/ │ ├── md-badge.hbs │ ├── md-btn-dropdown.hbs │ ├── md-btn.hbs │ ├── md-card-collapsible.hbs │ ├── md-card-content.hbs │ ├── md-card-panel.hbs │ ├── md-card-reveal.hbs │ ├── md-card.hbs │ ├── md-checkbox.hbs │ ├── md-checks-check.hbs │ ├── md-collapsible.hbs │ ├── md-collection.hbs │ ├── md-copyright.hbs │ ├── md-default-collection-header.hbs │ ├── md-default-column-header.hbs │ ├── md-fixed-btn.hbs │ ├── md-fixed-btns.hbs │ ├── md-input-date.hbs │ ├── md-input.hbs │ ├── md-loader.hbs │ ├── md-modal-container.hbs │ ├── md-modal.hbs │ ├── md-navbar.hbs │ ├── md-pagination.hbs │ ├── md-parallax.hbs │ ├── md-radio.hbs │ ├── md-radios-radio.hbs │ ├── md-range.hbs │ ├── md-select.hbs │ ├── md-switch.hbs │ ├── md-switches-switch.hbs │ ├── md-tab.hbs │ ├── md-table-col.hbs │ ├── md-table.hbs │ ├── md-tabs.hbs │ ├── md-textarea.hbs │ └── selectable-item-group.hbs ├── app/ │ ├── .gitkeep │ ├── components/ │ │ ├── materialize-badge.js │ │ ├── materialize-button-submit.js │ │ ├── materialize-button.js │ │ ├── materialize-card-action.js │ │ ├── materialize-card-content.js │ │ ├── materialize-card-panel.js │ │ ├── materialize-card-reveal.js │ │ ├── materialize-card.js │ │ ├── materialize-checkbox.js │ │ ├── materialize-checkboxes.js │ │ ├── materialize-collapsible-card.js │ │ ├── materialize-collapsible.js │ │ ├── materialize-copyright.js │ │ ├── materialize-date-input.js │ │ ├── materialize-input-field.js │ │ ├── materialize-input.js │ │ ├── materialize-loader.js │ │ ├── materialize-modal.js │ │ ├── materialize-navbar.js │ │ ├── materialize-pagination.js │ │ ├── materialize-parallax.js │ │ ├── materialize-radio.js │ │ ├── materialize-radios.js │ │ ├── materialize-range.js │ │ ├── materialize-select.js │ │ ├── materialize-switch.js │ │ ├── materialize-switches.js │ │ ├── materialize-tabs-tab.js │ │ ├── materialize-tabs.js │ │ ├── materialize-textarea.js │ │ ├── md-badge.js │ │ ├── md-btn-dropdown.js │ │ ├── md-btn-submit.js │ │ ├── md-btn.js │ │ ├── md-card-action.js │ │ ├── md-card-collapsible.js │ │ ├── md-card-content.js │ │ ├── md-card-panel.js │ │ ├── md-card-reveal.js │ │ ├── md-card.js │ │ ├── md-check.js │ │ ├── md-checks-check.js │ │ ├── md-checks.js │ │ ├── md-collapsible.js │ │ ├── md-collection.js │ │ ├── md-copyright.js │ │ ├── md-default-collection-header.js │ │ ├── md-default-column-header.js │ │ ├── md-fixed-btn.js │ │ ├── md-fixed-btns.js │ │ ├── md-input-date.js │ │ ├── md-input-field.js │ │ ├── md-input.js │ │ ├── md-loader.js │ │ ├── md-modal-container.js │ │ ├── md-modal.js │ │ ├── md-navbar.js │ │ ├── md-pagination.js │ │ ├── md-parallax.js │ │ ├── md-radio.js │ │ ├── md-radios-radio.js │ │ ├── md-radios.js │ │ ├── md-range.js │ │ ├── md-select.js │ │ ├── md-switch.js │ │ ├── md-switches-switch.js │ │ ├── md-switches.js │ │ ├── md-tab.js │ │ ├── md-table-col.js │ │ ├── md-table.js │ │ ├── md-tabs.js │ │ └── md-textarea.js │ ├── helpers/ │ │ └── bw-compat-icon.js │ ├── initializers/ │ │ ├── add-modals-container.js │ │ └── md-settings.js │ ├── services/ │ │ └── md-settings.js │ └── styles/ │ ├── app.scss │ └── ember-cli-materialize.scss ├── app.json ├── blueprints/ │ ├── .jshintrc │ └── ember-cli-materialize/ │ └── index.js ├── bower.json ├── config/ │ ├── ember-try.js │ ├── environment.js │ └── release.js ├── ember-cli-build.js ├── index.js ├── jsconfig.json ├── lib/ │ └── try-generate-pages.sh ├── package.json ├── renovate.json ├── testem.js ├── tests/ │ ├── .jshintrc │ ├── acceptance/ │ │ ├── badges-test.js │ │ ├── buttons-test.js │ │ ├── cards-test.js │ │ ├── collapsible-test.js │ │ ├── collection-test.js │ │ ├── copyright-test.js │ │ ├── forms-test.js │ │ ├── index-test.js │ │ ├── loader-test.js │ │ ├── modal-test.js │ │ ├── navbar-test.js │ │ ├── pagination-test.js │ │ ├── parallax-test.js │ │ ├── table-test.js │ │ └── tabs-test.js │ ├── blanket-options.js │ ├── dummy/ │ │ ├── app/ │ │ │ ├── app.js │ │ │ ├── components/ │ │ │ │ ├── .gitkeep │ │ │ │ ├── demo-nav.js │ │ │ │ ├── example-snippet.js │ │ │ │ ├── my-column-header.js │ │ │ │ ├── my-custom-header.js │ │ │ │ └── options-panel.js │ │ │ ├── config/ │ │ │ │ └── environment.d.ts │ │ │ ├── controllers/ │ │ │ │ ├── .gitkeep │ │ │ │ ├── application.js │ │ │ │ ├── buttons.js │ │ │ │ ├── collapsible.js │ │ │ │ ├── collection.js │ │ │ │ ├── colors.js │ │ │ │ ├── forms.js │ │ │ │ ├── loader.js │ │ │ │ ├── modal.js │ │ │ │ ├── pagination.js │ │ │ │ └── tabs.js │ │ │ ├── helpers/ │ │ │ │ └── .gitkeep │ │ │ ├── index.html │ │ │ ├── models/ │ │ │ │ └── .gitkeep │ │ │ ├── resolver.js │ │ │ ├── router.js │ │ │ ├── routes/ │ │ │ │ ├── .gitkeep │ │ │ │ ├── buttons.js │ │ │ │ ├── collection.js │ │ │ │ ├── forms.js │ │ │ │ └── tables.js │ │ │ ├── styles/ │ │ │ │ ├── app.scss │ │ │ │ ├── code.scss │ │ │ │ └── tests.scss │ │ │ └── templates/ │ │ │ ├── application.hbs │ │ │ ├── badges.hbs │ │ │ ├── buttons.hbs │ │ │ ├── cards.hbs │ │ │ ├── collapsible.hbs │ │ │ ├── collection.hbs │ │ │ ├── colors.hbs │ │ │ ├── components/ │ │ │ │ ├── .gitkeep │ │ │ │ ├── component-option.hbs │ │ │ │ ├── demo-nav.hbs │ │ │ │ ├── example-header.hbs │ │ │ │ ├── example-snippet.hbs │ │ │ │ └── options-panel.hbs │ │ │ ├── copyright.hbs │ │ │ ├── forms.hbs │ │ │ ├── index.hbs │ │ │ ├── loader.hbs │ │ │ ├── modal.hbs │ │ │ ├── navbar.hbs │ │ │ ├── pagination.hbs │ │ │ ├── parallax.hbs │ │ │ ├── snippets/ │ │ │ │ ├── badges-simple.hbs │ │ │ │ ├── buttons-disabled.hbs │ │ │ │ ├── buttons-dropdown.hbs │ │ │ │ ├── buttons-flat.hbs │ │ │ │ ├── buttons-floating-group.hbs │ │ │ │ ├── buttons-floating.hbs │ │ │ │ ├── buttons-large.hbs │ │ │ │ ├── buttons-raised.hbs │ │ │ │ ├── buttons-submit.hbs │ │ │ │ ├── cards-basic.hbs │ │ │ │ ├── cards-image.hbs │ │ │ │ ├── cards-panel.hbs │ │ │ │ ├── cards-reveal.hbs │ │ │ │ ├── collapsible-accordion.hbs │ │ │ │ ├── collapsible-action.hbs │ │ │ │ ├── collapsible-expandable.hbs │ │ │ │ ├── collapsible-preselected.hbs │ │ │ │ ├── collection-avatars.hbs │ │ │ │ ├── collection-basic.hbs │ │ │ │ ├── collection-header-custom.hbs │ │ │ │ ├── collection-header.hbs │ │ │ │ ├── collection-links.hbs │ │ │ │ ├── collection-secondary-content.hbs │ │ │ │ ├── copyright-basic.hbs │ │ │ │ ├── form-validation-basic.hbs │ │ │ │ ├── input-basic.hbs │ │ │ │ ├── input-check-basic.hbs │ │ │ │ ├── input-check-list.hbs │ │ │ │ ├── input-date-basic.hbs │ │ │ │ ├── input-radio-list.hbs │ │ │ │ ├── input-range-basic.hbs │ │ │ │ ├── input-switch-basic.hbs │ │ │ │ ├── input-switch-list-exclusive.hbs │ │ │ │ ├── input-switch-list.hbs │ │ │ │ ├── input-types.hbs │ │ │ │ ├── input-with-icon.hbs │ │ │ │ ├── modal-basic.hbs │ │ │ │ ├── my-column-header.hbs │ │ │ │ ├── my-custom-header.hbs │ │ │ │ ├── navbar-basic.hbs │ │ │ │ ├── navbar-custom-home.hbs │ │ │ │ ├── none.hbs │ │ │ │ ├── pagination-basic.hbs │ │ │ │ ├── parallax-basic.hbs │ │ │ │ ├── progress-circular.hbs │ │ │ │ ├── progress-determinate.hbs │ │ │ │ ├── progress-indeterminate.hbs │ │ │ │ ├── select-basic.hbs │ │ │ │ ├── tables-basic.hbs │ │ │ │ ├── tables-bordered.hbs │ │ │ │ ├── tables-centered.hbs │ │ │ │ ├── tables-custom-cell.hbs │ │ │ │ ├── tables-custom-header.hbs │ │ │ │ ├── tables-hoverable.hbs │ │ │ │ ├── tables-responsive.hbs │ │ │ │ ├── tables-striped.hbs │ │ │ │ ├── tabs-basic.hbs │ │ │ │ ├── tabs-declarative.hbs │ │ │ │ ├── tabs-optionpaths.hbs │ │ │ │ ├── text-color.hbs │ │ │ │ └── textarea-basic.hbs │ │ │ ├── tables.hbs │ │ │ └── tabs.hbs │ │ ├── config/ │ │ │ ├── environment.js │ │ │ ├── optional-features.json │ │ │ └── targets.js │ │ └── public/ │ │ ├── crossdomain.xml │ │ └── robots.txt │ ├── helpers/ │ │ ├── destroy-app.js │ │ ├── module-for-acceptance.js │ │ ├── resolver.js │ │ ├── selectable-item-group.js │ │ ├── selectable-item.js │ │ └── start-app.js │ ├── index.html │ ├── integration/ │ │ └── components/ │ │ ├── md-btn-dropdown-test.js │ │ ├── md-pagination-test.js │ │ └── md-select-test.js │ ├── test-helper.js │ └── unit/ │ ├── .gitkeep │ ├── components/ │ │ ├── materialize-badge-test.js │ │ ├── materialize-button-dropdown-test.js │ │ ├── materialize-button-submit-test.js │ │ ├── materialize-button-test.js │ │ ├── materialize-card-action-test.js │ │ ├── materialize-card-content-test.js │ │ ├── materialize-card-panel-test.js │ │ ├── materialize-card-reveal-test.js │ │ ├── materialize-card-test.js │ │ ├── materialize-checkbox-test.js │ │ ├── materialize-checkboxes-test.js │ │ ├── materialize-collapsible-card-test.js │ │ ├── materialize-collapsible-test.js │ │ ├── materialize-copyright-test.js │ │ ├── materialize-date-input-test.js │ │ ├── materialize-input-field-test.js │ │ ├── materialize-input-test.js │ │ ├── materialize-loader-test.js │ │ ├── materialize-pagination-test.js │ │ ├── materialize-parallax-test.js │ │ ├── materialize-radios-test.js │ │ ├── materialize-range-test.js │ │ ├── materialize-switch-test.js │ │ ├── materialize-switches-test.js │ │ ├── materialize-tabs-tab-test.js │ │ ├── materialize-tabs-test.js │ │ ├── materialize-textarea-test.js │ │ ├── md-collection-test.js │ │ ├── md-fixed-btn-test.js │ │ ├── md-fixed-btns-test.js │ │ └── md-modal-container-test.js │ ├── helpers/ │ │ └── bw-compat-icon-test.js │ ├── initializers/ │ │ └── md-settings-test.js │ └── services/ │ └── md-settings-test.js └── vendor/ ├── .gitkeep └── highlight.pack.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .bowerrc ================================================ { "directory": "bower_components", "analytics": false } ================================================ FILE: .editorconfig ================================================ # EditorConfig helps developers define and maintain consistent # coding styles between different editors and IDEs # editorconfig.org root = true [*] end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 2 [*.hbs] insert_final_newline = false [*.{diff,md}] trim_trailing_whitespace = false ================================================ FILE: .ember-cli ================================================ { /** Ember CLI sends analytics information by default. The data is completely anonymous, but there are times when you might want to disable this behavior. Setting `disableAnalytics` to true will prevent any data from being sent. */ "disableAnalytics": false } ================================================ FILE: .eslintignore ================================================ # unconventional js /blueprints/*/files/ /vendor/ # compiled output /dist/ /tmp/ # dependencies /bower_components/ # misc /coverage/ !.* # ember-try /.node_modules.ember-try/ /bower.json.ember-try /package.json.ember-try ================================================ FILE: .eslintrc.js ================================================ /* eslint-env node */ module.exports = { root: true, parserOptions: { ecmaVersion: 2017, sourceType: 'module' }, plugins: [ 'ember' ], extends: [ 'eslint:recommended', 'plugin:ember/recommended' ], env: { browser: true }, rules: { "ember/use-brace-expansion": 1, "ember/no-on-calls-in-components": 1, "ember/avoid-leaking-state-in-ember-objects": 1, "ember/closure-actions": 1, "ember/no-global-jquery": 1 }, overrides: [ // node files { files: [ 'index.js', 'testem.js', 'ember-cli-build.js', 'config/**/*.js', 'tests/dummy/config/**/*.js' ], excludedFiles: [ 'app/**', 'addon/**' ], parserOptions: { sourceType: 'script', ecmaVersion: 2015 }, env: { browser: false, node: true }, plugins: ['node'], rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { // add your custom rules and overrides for node files here }) }, // test files { files: ['tests/**/*.js'], excludedFiles: ['tests/dummy/**/*.js'], env: { embertest: true } } ] }; ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - Browser [e.g. chrome, safari] - Library Version [e.g. 22] **Additional context** Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .gitignore ================================================ # See https://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist/ /tmp/ # dependencies /bower_components/ /node_modules/ # misc /.sass-cache /connect.lock /coverage/ /libpeerconnection.log /npm-debug.log* /testem.log /yarn-error.log # ember-try /.node_modules.ember-try/ /bower.json.ember-try /package.json.ember-try ================================================ FILE: .jscsrc ================================================ { "preset": "ember-suave", "excludeFiles": ["blanket-options.js"], "requireParenthesesAroundArrowParam": null, "disallowConstOutsideModuleScope": null } ================================================ FILE: .jshintrc ================================================ { "predef": [ "document", "window", "-Promise" ], "browser": true, "boss": true, "curly": true, "debug": false, "devel": true, "eqeqeq": true, "evil": true, "forin": false, "immed": false, "laxbreak": false, "newcap": true, "noarg": true, "noempty": false, "nonew": false, "nomen": false, "onevar": false, "plusplus": false, "regexp": false, "undef": true, "sub": true, "strict": false, "white": false, "eqnull": true, "esnext": true, "unused": true } ================================================ FILE: .npmignore ================================================ # compiled output /dist/ /tmp/ # dependencies /bower_components/ # misc /.bowerrc /.editorconfig /.ember-cli /.eslintignore /.eslintrc.js /.gitignore /.template-lintrc.js /.travis.yml /.watchmanconfig /bower.json /config/ember-try.js /ember-cli-build.js /testem.js /tests/ /yarn.lock .gitkeep # ember-try /.node_modules.ember-try/ /bower.json.ember-try /package.json.ember-try ================================================ FILE: .prettierrc ================================================ { "singleQuote": true, "bracketSpacing": true, "trailingComma": "none", "useTabs": false, "tabWidth": 2, "printWidth": 120, "semi": true } ================================================ FILE: .template-lintrc.js ================================================ /* eslint-env node */ 'use strict'; module.exports = { extends: 'recommended' }; ================================================ FILE: .travis.yml ================================================ language: node_js node_js: - '8' sudo: false dist: trusty addons: chrome: stable cache: yarn: true yarn: true env: global: - JOBS=1 stages: - 'Tests' - 'Additional Tests' - 'Canary Tests' - name: 'Deploy' if: branch = master AND type = push jobs: fail_fast: true allow_failures: - env: EMBER_TRY_SCENARIO=ember-canary include: - stage: Tests name: Tests install: - yarn install --non-interactive && bower install script: - yarn lint:js && ember test - name: Floating Dependencies script: - ember test - stage: Additional Tests node_js: 10 env: EMBER_TRY_SCENARIO=ember-1.13 - env: EMBER_TRY_SCENARIO=ember-lts-2.16 - env: EMBER_TRY_SCENARIO=ember-lts-2.18 - env: EMBER_TRY_SCENARIO=ember-release - env: EMBER_TRY_SCENARIO=ember-beta - env: EMBER_TRY_SCENARIO=ember-default-with-jquery - stage: 'Canary Tests' script: - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO env: EMBER_TRY_SCENARIO=ember-canary - stage: 'Deploy' name: 'Publish to npm' install: - yarn install --non-interactive script: yarn semantic-release before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH - npm install -g bower install: - yarn install --no-lockfile --non-interactive && bower install script: - yarn lint:js && ember try:one $EMBER_TRY_SCENARIO deploy: provider: heroku api_key: secure: MZDN5BsZUmmxIkOGDC1/fLem7B0E1xoTTX62P/UyzHaNTByQBEBilzhqxarfBVJ+jkrDHVLB4iPxeZKoQhphmdYCBDJvZlPTLmRcSaHBy+m80JfPvm9lkOuTVVklNjcJuwhSLC9rlRxNRL6sVbfJUgOwx/lFEKXyUYVc5Y1Cn6A= app: ember-materialize-demo on: repo: mike-north/ember-cli-materialize condition: "$EMBER_TRY_SCENARIO = ember-release" ================================================ FILE: .vscode/settings.json ================================================ { "javascript.implicitProjectConfig.checkJs": true, "editor.formatOnSave": false } ================================================ FILE: .watchmanconfig ================================================ { "ignore_dirs": ["tmp", "dist"] } ================================================ FILE: CHANGELOG.md ================================================ # [0.24.0](https://github.com/mike-north/ember-cli-materialize/compare/v0.23.0...v0.24.0) (2019-03-03) ### Features * remove ember-new-computed dependency ([e3ab9f4](https://github.com/mike-north/ember-cli-materialize/commit/e3ab9f4)) # [0.23.0](https://github.com/mike-north/ember-cli-materialize/compare/v0.22.0...v0.23.0) (2019-02-14) ### Features * trigger actions from md-select. ([#716](https://github.com/mike-north/ember-cli-materialize/issues/716)) ([b8e9821](https://github.com/mike-north/ember-cli-materialize/commit/b8e9821)) # [0.22.0](https://github.com/mike-north/ember-cli-materialize/compare/v0.21.0...v0.22.0) (2018-11-10) ### Features * upgrade to ember 3 ([d7a8d4c](https://github.com/mike-north/ember-cli-materialize/commit/d7a8d4c)) # Change Log ## [v0.18.1](https://github.com/mike-north/ember-cli-materialize/tree/v0.18.1) (2015-08-17) [Full Changelog](https://github.com/mike-north/ember-cli-materialize/compare/v0.18.0...v0.18.1) **Fixed bugs:** - md-btn isDisabled doesn't disable event [\#201](https://github.com/mike-north/ember-cli-materialize/issues/201) - Upgraded to master & materialize 0.97 - modals have lost the translucent overlay, and have z-index issues [\#192](https://github.com/mike-north/ember-cli-materialize/issues/192) - ember-radio-button v1.0.4 causing deprecation warning, updating breaks radio buttons [\#178](https://github.com/mike-north/ember-cli-materialize/issues/178) - Update docs to reflect buttonType correctly [\#164](https://github.com/mike-north/ember-cli-materialize/issues/164) - Override `waves-light` [\#157](https://github.com/mike-north/ember-cli-materialize/issues/157) - Odd blue line showing up when using the datepicker [\#140](https://github.com/mike-north/ember-cli-materialize/issues/140) **Merged pull requests:** - Allow customization of button waves [\#210](https://github.com/mike-north/ember-cli-materialize/pull/210) ([mike-north](https://github.com/mike-north)) - Button actions shouldn't fire when in disabled state [\#209](https://github.com/mike-north/ember-cli-materialize/pull/209) ([mike-north](https://github.com/mike-north)) ## [v0.18.0](https://github.com/mike-north/ember-cli-materialize/tree/v0.18.0) (2015-08-17) [Full Changelog](https://github.com/mike-north/ember-cli-materialize/compare/v0.17.4...v0.18.0) **Closed issues:** - Deprecation warnings [\#176](https://github.com/mike-north/ember-cli-materialize/issues/176) **Merged pull requests:** - Autofocus Support on input field [\#208](https://github.com/mike-north/ember-cli-materialize/pull/208) ([cmanou](https://github.com/cmanou)) - Kill deprecations [\#207](https://github.com/mike-north/ember-cli-materialize/pull/207) ([mike-north](https://github.com/mike-north)) - Use v0.4.0 of ember-key-responder [\#191](https://github.com/mike-north/ember-cli-materialize/pull/191) ([mike-north](https://github.com/mike-north)) ## [v0.17.4](https://github.com/mike-north/ember-cli-materialize/tree/v0.17.4) (2015-08-15) [Full Changelog](https://github.com/mike-north/ember-cli-materialize/compare/v0.17.3...v0.17.4) **Closed issues:** - md-modal computed property with @each leaf causing assertion failure in canary [\#202](https://github.com/mike-north/ember-cli-materialize/issues/202) - Installation of the addon breaks auto-generated tests [\#199](https://github.com/mike-north/ember-cli-materialize/issues/199) - How can i use the md-input small validation message with ember-validations? [\#198](https://github.com/mike-north/ember-cli-materialize/issues/198) - Remove {{bind-attr}} [\#168](https://github.com/mike-north/ember-cli-materialize/issues/168) **Merged pull requests:** - Style/Testing Cleanup [\#206](https://github.com/mike-north/ember-cli-materialize/pull/206) ([mike-north](https://github.com/mike-north)) - \[Canary\] Replaced '@each' computed property with '\[\]' \(fixes \#202\) [\#203](https://github.com/mike-north/ember-cli-materialize/pull/203) ([mdehoog](https://github.com/mdehoog)) - Switched md-btn-dropdown boolean attributes to use booleans [\#200](https://github.com/mike-north/ember-cli-materialize/pull/200) ([mdehoog](https://github.com/mdehoog)) - Using elementId in dropdown instead of element.id [\#196](https://github.com/mike-north/ember-cli-materialize/pull/196) ([unmanbearpig](https://github.com/unmanbearpig)) - Fixed closeModal action name \(fixes \#193\) [\#194](https://github.com/mike-north/ember-cli-materialize/pull/194) ([mdehoog](https://github.com/mdehoog)) ## [v0.17.3](https://github.com/mike-north/ember-cli-materialize/tree/v0.17.3) (2015-07-31) [Full Changelog](https://github.com/mike-north/ember-cli-materialize/compare/v0.17.2...v0.17.3) **Closed issues:** - Modal only closes if close action is called 'closeModal' [\#193](https://github.com/mike-north/ember-cli-materialize/issues/193) - No placeholder option for md-input [\#188](https://github.com/mike-north/ember-cli-materialize/issues/188) - Recent changes to validations? [\#186](https://github.com/mike-north/ember-cli-materialize/issues/186) - Switch and Check seem to have issue with missing ember-composability [\#181](https://github.com/mike-north/ember-cli-materialize/issues/181) **Merged pull requests:** - Add ember-legacy-views [\#190](https://github.com/mike-north/ember-cli-materialize/pull/190) ([mike-north](https://github.com/mike-north)) - Remove Ember.keys deprecation warning [\#189](https://github.com/mike-north/ember-cli-materialize/pull/189) ([mdehoog](https://github.com/mdehoog)) - Observer timing issues [\#187](https://github.com/mike-north/ember-cli-materialize/pull/187) ([brandonparsons](https://github.com/brandonparsons)) - Make dat homeRoute customizable!!! [\#185](https://github.com/mike-north/ember-cli-materialize/pull/185) ([rtablada](https://github.com/rtablada)) - input type should be tel [\#184](https://github.com/mike-north/ember-cli-materialize/pull/184) ([basz](https://github.com/basz)) - Deprecation fixes - convert each-in to each-as [\#180](https://github.com/mike-north/ember-cli-materialize/pull/180) ([mike-north](https://github.com/mike-north)) ## [v0.17.2](https://github.com/mike-north/ember-cli-materialize/tree/v0.17.2) (2015-07-14) [Full Changelog](https://github.com/mike-north/ember-cli-materialize/compare/v0.17.1...v0.17.2) **Closed issues:** - Error on new project: unbound variable $mdi-list-icons [\#171](https://github.com/mike-north/ember-cli-materialize/issues/171) **Merged pull requests:** - Fix leftover "disabled" debug legend on checkbox [\#182](https://github.com/mike-north/ember-cli-materialize/pull/182) ([LexLythius](https://github.com/LexLythius)) - fix-anchor [\#179](https://github.com/mike-north/ember-cli-materialize/pull/179) ([ladyleet](https://github.com/ladyleet)) - Removed blueprint temporary fix for materialize.css that is no longer [\#177](https://github.com/mike-north/ember-cli-materialize/pull/177) ([mnannola](https://github.com/mnannola)) - Feature/md btn dropdown [\#162](https://github.com/mike-north/ember-cli-materialize/pull/162) ([basz](https://github.com/basz)) ## [v0.17.1](https://github.com/mike-north/ember-cli-materialize/tree/v0.17.1) (2015-07-12) [Full Changelog](https://github.com/mike-north/ember-cli-materialize/compare/v0.17.0...v0.17.1) **Merged pull requests:** - Ember-composability [\#175](https://github.com/mike-north/ember-cli-materialize/pull/175) ([mike-north](https://github.com/mike-north)) ## [v0.17.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.17.2) (2015-07-14) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.17.1...v0.17.2) **Closed issues:** - Error on new project: unbound variable $mdi-list-icons [\#171](https://github.com/truenorth/ember-cli-materialize/issues/171) **Merged pull requests:** - Fix leftover "disabled" debug legend on checkbox [\#182](https://github.com/truenorth/ember-cli-materialize/pull/182) ([LexLythius](https://github.com/LexLythius)) - fix-anchor [\#179](https://github.com/truenorth/ember-cli-materialize/pull/179) ([ladyleet](https://github.com/ladyleet)) - Removed blueprint temporary fix for materialize.css that is no longer [\#177](https://github.com/truenorth/ember-cli-materialize/pull/177) ([mnannola](https://github.com/mnannola)) - Feature/md btn dropdown [\#162](https://github.com/truenorth/ember-cli-materialize/pull/162) ([basz](https://github.com/basz)) ## [v0.17.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.17.1) (2015-07-12) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.17.0...v0.17.1) **Merged pull requests:** - Ember-composability [\#175](https://github.com/truenorth/ember-cli-materialize/pull/175) ([truenorth](https://github.com/truenorth)) ## [v0.17.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.17.0) (2015-07-11) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.16.4...v0.17.0) **Merged pull requests:** - minor-color-edits-and-colors-page-additions [\#174](https://github.com/truenorth/ember-cli-materialize/pull/174) ([ladyleet](https://github.com/ladyleet)) - colors-page [\#173](https://github.com/truenorth/ember-cli-materialize/pull/173) ([ladyleet](https://github.com/ladyleet)) - Remove all instances of bind-attr [\#169](https://github.com/truenorth/ember-cli-materialize/pull/169) ([MattMSumner](https://github.com/MattMSumner)) ## [v0.16.4](https://github.com/truenorth/ember-cli-materialize/tree/v0.16.4) (2015-07-11) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.16.3...v0.16.4) **Merged pull requests:** - Update to ember-cli 1.13.1 [\#170](https://github.com/truenorth/ember-cli-materialize/pull/170) ([truenorth](https://github.com/truenorth)) ## [v0.16.3](https://github.com/truenorth/ember-cli-materialize/tree/v0.16.3) (2015-07-05) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.16.2...v0.16.3) **Fixed bugs:** - issue with modal not being on top [\#166](https://github.com/truenorth/ember-cli-materialize/issues/166) **Merged pull requests:** - Modal fixes, blueprint update [\#167](https://github.com/truenorth/ember-cli-materialize/pull/167) ([truenorth](https://github.com/truenorth)) ## [v0.16.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.16.2) (2015-07-03) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.16.1...v0.16.2) **Merged pull requests:** - Configurable default values [\#165](https://github.com/truenorth/ember-cli-materialize/pull/165) ([truenorth](https://github.com/truenorth)) ## [v0.16.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.16.1) (2015-07-03) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.16.0...v0.16.1) **Implemented enhancements:** - Sending an action argument within a button action [\#153](https://github.com/truenorth/ember-cli-materialize/issues/153) - Actions can not be passed to SelectableItem sub classes [\#102](https://github.com/truenorth/ember-cli-materialize/issues/102) **Closed issues:** - Support projects using broccoli-less [\#146](https://github.com/truenorth/ember-cli-materialize/issues/146) - LinkView deprecation [\#144](https://github.com/truenorth/ember-cli-materialize/issues/144) - cannot find module 'handlebars' [\#123](https://github.com/truenorth/ember-cli-materialize/issues/123) - consider making collapsibles actionable [\#112](https://github.com/truenorth/ember-cli-materialize/issues/112) - Get ember-canary on critical CI path again [\#71](https://github.com/truenorth/ember-cli-materialize/issues/71) **Merged pull requests:** - Pass argument along with action, when md-btn fires [\#161](https://github.com/truenorth/ember-cli-materialize/pull/161) ([truenorth](https://github.com/truenorth)) ## [v0.16.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.16.0) (2015-07-03) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.11...v0.16.0) **Merged pull requests:** - Tables [\#160](https://github.com/truenorth/ember-cli-materialize/pull/160) ([truenorth](https://github.com/truenorth)) - Collections [\#159](https://github.com/truenorth/ember-cli-materialize/pull/159) ([truenorth](https://github.com/truenorth)) ## [v0.15.11](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.11) (2015-07-02) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.10...v0.15.11) **Closed issues:** - Ember 1.13 [\#156](https://github.com/truenorth/ember-cli-materialize/issues/156) **Merged pull requests:** - Redo all examples on demo site as code snippets [\#158](https://github.com/truenorth/ember-cli-materialize/pull/158) ([truenorth](https://github.com/truenorth)) ## [v0.15.10](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.10) (2015-06-30) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.9...v0.15.10) ## [v0.15.9](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.9) (2015-06-30) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.8...v0.15.9) ## [v0.15.8](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.8) (2015-06-30) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.7...v0.15.8) ## [v0.15.7](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.7) (2015-06-30) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.6...v0.15.7) ## [v0.15.6](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.6) (2015-06-30) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.5...v0.15.6) **Closed issues:** - Sidnav mobile - links don't work on iOS / Mobile Safari [\#147](https://github.com/truenorth/ember-cli-materialize/issues/147) **Merged pull requests:** - Enable CI testing against ember release channel [\#155](https://github.com/truenorth/ember-cli-materialize/pull/155) ([truenorth](https://github.com/truenorth)) - Cleanup to finish repository transfer [\#154](https://github.com/truenorth/ember-cli-materialize/pull/154) ([truenorth](https://github.com/truenorth)) - Ember 1.13 workarounds [\#152](https://github.com/truenorth/ember-cli-materialize/pull/152) ([truenorth](https://github.com/truenorth)) - fix typo in md-input-date [\#151](https://github.com/truenorth/ember-cli-materialize/pull/151) ([nflbeezy](https://github.com/nflbeezy)) - md-check, md-radio, md-switch fire actions on state change [\#138](https://github.com/truenorth/ember-cli-materialize/pull/138) ([truenorth](https://github.com/truenorth)) - Add example of snippet-based demo page [\#137](https://github.com/truenorth/ember-cli-materialize/pull/137) ([truenorth](https://github.com/truenorth)) ## [v0.15.5](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.5) (2015-06-22) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.4...v0.15.5) **Fixed bugs:** - \[Bug\] Navbar unresonsible on iPad [\#141](https://github.com/truenorth/ember-cli-materialize/issues/141) **Closed issues:** - How did you guys manage to get a logo in the nav bar on the demo page? [\#143](https://github.com/truenorth/ember-cli-materialize/issues/143) - Help with dropdown nav bar? [\#135](https://github.com/truenorth/ember-cli-materialize/issues/135) - Cannot deselect item with md-checks and others if multiple=false [\#133](https://github.com/truenorth/ember-cli-materialize/issues/133) - /Users/username/appName/tmp/tree\_merger-tmp\_dest\_dir-NKY037BG.tmp/app/styles/app.\[scss|sass\] does not exist [\#132](https://github.com/truenorth/ember-cli-materialize/issues/132) **Merged pull requests:** - Update modal.hbs [\#145](https://github.com/truenorth/ember-cli-materialize/pull/145) ([samselikoff](https://github.com/samselikoff)) - Fix demo's sidenav for mobile [\#142](https://github.com/truenorth/ember-cli-materialize/pull/142) ([truenorth](https://github.com/truenorth)) - Revert "Move sassOptions to Brocfile" [\#139](https://github.com/truenorth/ember-cli-materialize/pull/139) ([truenorth](https://github.com/truenorth)) - Fix issue \#133 [\#134](https://github.com/truenorth/ember-cli-materialize/pull/134) ([LexLythius](https://github.com/LexLythius)) ## [v0.15.4](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.4) (2015-06-08) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.3...v0.15.4) **Fixed bugs:** - Deprecation on ember-cli 0.2.6 [\#125](https://github.com/truenorth/ember-cli-materialize/issues/125) **Merged pull requests:** - Sidenav instead of navbar for demo app [\#129](https://github.com/truenorth/ember-cli-materialize/pull/129) ([truenorth](https://github.com/truenorth)) - make md-collapsible actionable [\#128](https://github.com/truenorth/ember-cli-materialize/pull/128) ([foxnewsnetwork](https://github.com/foxnewsnetwork)) ## [v0.15.3](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.3) (2015-06-02) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.2...v0.15.3) **Merged pull requests:** - Ember-cli 0.2.6 [\#127](https://github.com/truenorth/ember-cli-materialize/pull/127) ([truenorth](https://github.com/truenorth)) ## [v0.15.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.2) (2015-06-01) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.1...v0.15.2) **Merged pull requests:** - Adds "demoURL" to package.json [\#126](https://github.com/truenorth/ember-cli-materialize/pull/126) ([gcollazo](https://github.com/gcollazo)) ## [v0.15.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.1) (2015-05-28) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.15.0...v0.15.1) **Closed issues:** - Get rid of the pyramid of doom [\#110](https://github.com/truenorth/ember-cli-materialize/issues/110) **Merged pull requests:** - \[Bugfix\] md-tabs Indicator position not updated if content set after selection [\#122](https://github.com/truenorth/ember-cli-materialize/pull/122) ([truenorth](https://github.com/truenorth)) ## [v0.15.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.15.0) (2015-05-27) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.14.1...v0.15.0) **Closed issues:** - \(roadmap || priority\) to include slider [\#121](https://github.com/truenorth/ember-cli-materialize/issues/121) - md-card: passing a handlebars expression inside title hash [\#100](https://github.com/truenorth/ember-cli-materialize/issues/100) ## [v0.14.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.14.1) (2015-05-25) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.14.0...v0.14.1) **Fixed bugs:** - \[Glimmer\] Card titles do not render [\#113](https://github.com/truenorth/ember-cli-materialize/issues/113) **Merged pull requests:** - \[BUGFIX\] Glimmer fixes [\#119](https://github.com/truenorth/ember-cli-materialize/pull/119) ([truenorth](https://github.com/truenorth)) ## [v0.14.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.14.0) (2015-05-25) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.7...v0.14.0) **Fixed bugs:** - Deprecation warning: sassOptions should be moved to your Brocfile [\#109](https://github.com/truenorth/ember-cli-materialize/issues/109) **Closed issues:** - md-checks optionLabelPath appears dysfunctional [\#120](https://github.com/truenorth/ember-cli-materialize/issues/120) - Update ember-modal-dialog to 0.7.0 [\#115](https://github.com/truenorth/ember-cli-materialize/issues/115) - Bad contrast on demo page's hero unit [\#105](https://github.com/truenorth/ember-cli-materialize/issues/105) **Merged pull requests:** - Move sassOptions to Brocfile [\#118](https://github.com/truenorth/ember-cli-materialize/pull/118) ([truenorth](https://github.com/truenorth)) - \[Enhancement\] Floating button group [\#117](https://github.com/truenorth/ember-cli-materialize/pull/117) ([truenorth](https://github.com/truenorth)) - Update ember-modal-dialog to 0.7.0 [\#116](https://github.com/truenorth/ember-cli-materialize/pull/116) ([truenorth](https://github.com/truenorth)) ## [v0.13.7](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.7) (2015-05-21) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.6...v0.13.7) **Closed issues:** - Installation fails on ember-cli 0.2.3 [\#101](https://github.com/truenorth/ember-cli-materialize/issues/101) **Merged pull requests:** - Fixed floating button group example in docs [\#114](https://github.com/truenorth/ember-cli-materialize/pull/114) ([truenorth](https://github.com/truenorth)) - First revamp of demo page [\#111](https://github.com/truenorth/ember-cli-materialize/pull/111) ([truenorth](https://github.com/truenorth)) - Ember-cli 0.2.5 [\#108](https://github.com/truenorth/ember-cli-materialize/pull/108) ([truenorth](https://github.com/truenorth)) - Fixed possible XSS bug in md-loader style binding [\#107](https://github.com/truenorth/ember-cli-materialize/pull/107) ([truenorth](https://github.com/truenorth)) ## [v0.13.6](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.6) (2015-05-16) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.5...v0.13.6) **Fixed bugs:** - Navbar problem [\#90](https://github.com/truenorth/ember-cli-materialize/issues/90) **Closed issues:** - Uncaught TypeError: Cannot read property 'indexOf' of undefined [\#103](https://github.com/truenorth/ember-cli-materialize/issues/103) - Improve documentation for forms [\#95](https://github.com/truenorth/ember-cli-materialize/issues/95) **Merged pull requests:** - Update to ember-cli 0.2.4 [\#104](https://github.com/truenorth/ember-cli-materialize/pull/104) ([truenorth](https://github.com/truenorth)) ## [v0.13.5](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.5) (2015-04-27) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.4...v0.13.5) **Closed issues:** - addon changed my application.hbs and my arrangement in config/environment :-\( [\#89](https://github.com/truenorth/ember-cli-materialize/issues/89) - Publish v0.13.4 to NPM [\#88](https://github.com/truenorth/ember-cli-materialize/issues/88) - Modal issue [\#81](https://github.com/truenorth/ember-cli-materialize/issues/81) **Merged pull requests:** - Fix deprecation in navbar docs [\#91](https://github.com/truenorth/ember-cli-materialize/pull/91) ([truenorth](https://github.com/truenorth)) ## [v0.13.4](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.4) (2015-04-24) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.3...v0.13.4) **Closed issues:** - Trouble with buttons [\#79](https://github.com/truenorth/ember-cli-materialize/issues/79) - Simple arrays [\#74](https://github.com/truenorth/ember-cli-materialize/issues/74) - Binding value [\#28](https://github.com/truenorth/ember-cli-materialize/issues/28) **Merged pull requests:** - Modal container component, modal documentation improvements [\#83](https://github.com/truenorth/ember-cli-materialize/pull/83) ([truenorth](https://github.com/truenorth)) - \[Bugfix\] Handle nested addons properly [\#80](https://github.com/truenorth/ember-cli-materialize/pull/80) ([truenorth](https://github.com/truenorth)) - \[Bugfix\] Select - simple array case [\#78](https://github.com/truenorth/ember-cli-materialize/pull/78) ([truenorth](https://github.com/truenorth)) - \[Refactor\] Remove liquid fire [\#77](https://github.com/truenorth/ember-cli-materialize/pull/77) ([truenorth](https://github.com/truenorth)) ## [v0.13.3](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.3) (2015-04-23) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.2...v0.13.3) **Closed issues:** - Style broken in Safari [\#73](https://github.com/truenorth/ember-cli-materialize/issues/73) **Merged pull requests:** - \[Bugfix\] Datepicker input now updates bound value [\#76](https://github.com/truenorth/ember-cli-materialize/pull/76) ([truenorth](https://github.com/truenorth)) ## [v0.13.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.2) (2015-04-22) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.1...v0.13.2) **Merged pull requests:** - Fixed classnamebinding in md-select [\#75](https://github.com/truenorth/ember-cli-materialize/pull/75) ([pajter](https://github.com/pajter)) ## [v0.13.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.1) (2015-04-21) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.13.0...v0.13.1) **Merged pull requests:** - New CP syntax, cleanup, formatting [\#70](https://github.com/truenorth/ember-cli-materialize/pull/70) ([truenorth](https://github.com/truenorth)) - md-\* helpers [\#69](https://github.com/truenorth/ember-cli-materialize/pull/69) ([truenorth](https://github.com/truenorth)) - Modal [\#65](https://github.com/truenorth/ember-cli-materialize/pull/65) ([truenorth](https://github.com/truenorth)) ## [v0.13.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.13.0) (2015-04-16) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.12.0...v0.13.0) **Merged pull requests:** - added configuration block in README [\#68](https://github.com/truenorth/ember-cli-materialize/pull/68) ([hanloong](https://github.com/hanloong)) - Forms - Checkbox, Radio, Switch, Range and Checkbox/Radio/Switch List components [\#64](https://github.com/truenorth/ember-cli-materialize/pull/64) ([truenorth](https://github.com/truenorth)) ## [v0.12.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.12.0) (2015-04-16) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.11.3...v0.12.0) **Merged pull requests:** - ES6ification [\#66](https://github.com/truenorth/ember-cli-materialize/pull/66) ([truenorth](https://github.com/truenorth)) - Re-enable stylesheet in qunit test runner [\#61](https://github.com/truenorth/ember-cli-materialize/pull/61) ([truenorth](https://github.com/truenorth)) - Pagination [\#58](https://github.com/truenorth/ember-cli-materialize/pull/58) ([truenorth](https://github.com/truenorth)) ## [v0.11.3](https://github.com/truenorth/ember-cli-materialize/tree/v0.11.3) (2015-04-16) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.11.2...v0.11.3) **Merged pull requests:** - WIP - Modal [\#63](https://github.com/truenorth/ember-cli-materialize/pull/63) ([truenorth](https://github.com/truenorth)) ## [v0.11.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.11.2) (2015-04-15) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.11.1...v0.11.2) **Closed issues:** - Crashes on startup [\#48](https://github.com/truenorth/ember-cli-materialize/issues/48) - If the browser fills the input with a value on page load then the label is not set to active [\#43](https://github.com/truenorth/ember-cli-materialize/issues/43) **Merged pull requests:** - \[Bugfix\] Teardown pickadate and collapsible events [\#62](https://github.com/truenorth/ember-cli-materialize/pull/62) ([jasonmit](https://github.com/jasonmit)) - Run ember-try on travis-ci parallel [\#60](https://github.com/truenorth/ember-cli-materialize/pull/60) ([truenorth](https://github.com/truenorth)) - Update travis.yml to use PhantomJS 2.0 [\#59](https://github.com/truenorth/ember-cli-materialize/pull/59) ([truenorth](https://github.com/truenorth)) - ES6ification [\#57](https://github.com/truenorth/ember-cli-materialize/pull/57) ([truenorth](https://github.com/truenorth)) - Form \(switch, check box, range, radio buttons\) [\#46](https://github.com/truenorth/ember-cli-materialize/pull/46) ([truenorth](https://github.com/truenorth)) ## [v0.11.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.11.1) (2015-04-11) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.11.0...v0.11.1) **Merged pull requests:** - Use non-beta version of ember-cli-sass to address dependency issues. [\#56](https://github.com/truenorth/ember-cli-materialize/pull/56) ([rynam0](https://github.com/rynam0)) ## [v0.11.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.11.0) (2015-04-10) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.10.0...v0.11.0) **Merged pull requests:** - Tabs [\#34](https://github.com/truenorth/ember-cli-materialize/pull/34) ([truenorth](https://github.com/truenorth)) ## [v0.10.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.10.0) (2015-04-10) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.9.3...v0.10.0) **Merged pull requests:** - Create component for footer [\#53](https://github.com/truenorth/ember-cli-materialize/pull/53) ([franktcurran](https://github.com/franktcurran)) ## [v0.9.3](https://github.com/truenorth/ember-cli-materialize/tree/v0.9.3) (2015-04-09) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.9.2...v0.9.3) **Merged pull requests:** - Upgrade ember-cli-sass to 4.0.0-beta.4 [\#55](https://github.com/truenorth/ember-cli-materialize/pull/55) ([truenorth](https://github.com/truenorth)) ## [v0.9.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.9.2) (2015-04-08) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.9.1...v0.9.2) **Merged pull requests:** - Ember-cli 0.2.3, Don't rely on prototype extensions [\#54](https://github.com/truenorth/ember-cli-materialize/pull/54) ([truenorth](https://github.com/truenorth)) ## [v0.9.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.9.1) (2015-04-07) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.9.0...v0.9.1) **Closed issues:** - Fresh install results in error in config/environment.js [\#50](https://github.com/truenorth/ember-cli-materialize/issues/50) - Ember-cli crashes with V0.9.0 of addon [\#42](https://github.com/truenorth/ember-cli-materialize/issues/42) **Merged pull requests:** - Fix blueprint [\#51](https://github.com/truenorth/ember-cli-materialize/pull/51) ([truenorth](https://github.com/truenorth)) - Restore ember-1.10 compatibility, and add ember-try [\#49](https://github.com/truenorth/ember-cli-materialize/pull/49) ([truenorth](https://github.com/truenorth)) - Refactor cards-test [\#45](https://github.com/truenorth/ember-cli-materialize/pull/45) ([truenorth](https://github.com/truenorth)) - Code climate improvements [\#44](https://github.com/truenorth/ember-cli-materialize/pull/44) ([truenorth](https://github.com/truenorth)) ## [v0.9.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.9.0) (2015-04-02) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.8.1...v0.9.0) **Closed issues:** - icons not showing [\#41](https://github.com/truenorth/ember-cli-materialize/issues/41) **Merged pull requests:** - Loader component [\#37](https://github.com/truenorth/ember-cli-materialize/pull/37) ([truenorth](https://github.com/truenorth)) ## [v0.8.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.8.1) (2015-04-02) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.8.0...v0.8.1) ## [v0.8.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.8.0) (2015-04-02) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.7.2...v0.8.0) **Closed issues:** - Generalize materialize-input [\#39](https://github.com/truenorth/ember-cli-materialize/issues/39) - \_normalize.scss - invalid top-level expression [\#35](https://github.com/truenorth/ember-cli-materialize/issues/35) - Invalid top-level expression [\#30](https://github.com/truenorth/ember-cli-materialize/issues/30) **Merged pull requests:** - Type of input can be set through parameter [\#40](https://github.com/truenorth/ember-cli-materialize/pull/40) ([jaimevent](https://github.com/jaimevent)) - Add emberobserver.com badge to Readme [\#38](https://github.com/truenorth/ember-cli-materialize/pull/38) ([truenorth](https://github.com/truenorth)) - Badge component [\#36](https://github.com/truenorth/ember-cli-materialize/pull/36) ([truenorth](https://github.com/truenorth)) ## [v0.7.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.7.2) (2015-04-01) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.7.1...v0.7.2) **Merged pull requests:** - Update to ember-cli 0.2.2 [\#33](https://github.com/truenorth/ember-cli-materialize/pull/33) ([truenorth](https://github.com/truenorth)) ## [v0.7.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.7.1) (2015-03-29) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.7.0...v0.7.1) **Closed issues:** - paralax broken and other issues when changing routes [\#18](https://github.com/truenorth/ember-cli-materialize/issues/18) **Merged pull requests:** - Fix dummy app CSS path [\#27](https://github.com/truenorth/ember-cli-materialize/pull/27) ([truenorth](https://github.com/truenorth)) - Update dev dependencies [\#26](https://github.com/truenorth/ember-cli-materialize/pull/26) ([truenorth](https://github.com/truenorth)) ## [v0.7.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.7.0) (2015-03-28) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.6.0...v0.7.0) **Merged pull requests:** - sgasser/ember-cli-materialize/18: create a component for parallax [\#25](https://github.com/truenorth/ember-cli-materialize/pull/25) ([rynam0](https://github.com/rynam0)) ## [v0.6.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.6.0) (2015-03-27) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.5.2...v0.6.0) **Closed issues:** - disabled submit button submits forms [\#21](https://github.com/truenorth/ember-cli-materialize/issues/21) **Merged pull requests:** - create input components for Date, Select, and TextArea [\#24](https://github.com/truenorth/ember-cli-materialize/pull/24) ([rynam0](https://github.com/rynam0)) ## [v0.5.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.5.2) (2015-03-23) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.5.1...v0.5.2) ## [v0.5.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.5.1) (2015-03-23) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.5.0...v0.5.1) **Closed issues:** - navbar should "closeOnClick" by default [\#22](https://github.com/truenorth/ember-cli-materialize/issues/22) ## [v0.5.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.5.0) (2015-03-23) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.4.1...v0.5.0) **Merged pull requests:** - Create component for form input [\#23](https://github.com/truenorth/ember-cli-materialize/pull/23) ([rynam0](https://github.com/rynam0)) ## [v0.4.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.4.1) (2015-03-19) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.4.0...v0.4.1) **Closed issues:** - Components should live in the project's addon directory [\#17](https://github.com/truenorth/ember-cli-materialize/issues/17) **Merged pull requests:** - Refactor: sgasser/ember-cli-materialize/17 [\#20](https://github.com/truenorth/ember-cli-materialize/pull/20) ([rynam0](https://github.com/rynam0)) ## [v0.4.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.4.0) (2015-03-18) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.3.3...v0.4.0) **Closed issues:** - Cannot install under ember-cli 0.2.0 [\#13](https://github.com/truenorth/ember-cli-materialize/issues/13) **Merged pull requests:** - create components for Collapsibles [\#16](https://github.com/truenorth/ember-cli-materialize/pull/16) ([rynam0](https://github.com/rynam0)) - create components for cards [\#15](https://github.com/truenorth/ember-cli-materialize/pull/15) ([rynam0](https://github.com/rynam0)) ## [v0.3.3](https://github.com/truenorth/ember-cli-materialize/tree/v0.3.3) (2015-03-16) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.3.2...v0.3.3) ## [v0.3.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.3.2) (2015-03-15) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.3.1...v0.3.2) **Closed issues:** - App blank after installing [\#10](https://github.com/truenorth/ember-cli-materialize/issues/10) - Transfer ownership of ember-cli-materialize [\#9](https://github.com/truenorth/ember-cli-materialize/issues/9) - Can not import @materialze with newest ember-cli version. [\#8](https://github.com/truenorth/ember-cli-materialize/issues/8) **Merged pull requests:** - Upgrade to ember-cli@0.2.0 [\#14](https://github.com/truenorth/ember-cli-materialize/pull/14) ([rynam0](https://github.com/rynam0)) - Removed extra semi-colon [\#12](https://github.com/truenorth/ember-cli-materialize/pull/12) ([rynam0](https://github.com/rynam0)) ## [v0.3.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.3.1) (2015-03-02) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.3.0...v0.3.1) **Closed issues:** - sorry bad repo [\#5](https://github.com/truenorth/ember-cli-materialize/issues/5) ## [v0.3.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.3.0) (2015-01-28) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.2.1...v0.3.0) **Closed issues:** - select input doesn’t work properly with ember-cli [\#4](https://github.com/truenorth/ember-cli-materialize/issues/4) ## [v0.2.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.2.1) (2015-01-05) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.2.0...v0.2.1) **Merged pull requests:** - Reopen LinkView in an initializer [\#3](https://github.com/truenorth/ember-cli-materialize/pull/3) ([miguelcobain](https://github.com/miguelcobain)) - include ember-cli 0.1.5 install instructions [\#2](https://github.com/truenorth/ember-cli-materialize/pull/2) ([miguelcobain](https://github.com/miguelcobain)) ## [v0.2.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.2.0) (2014-12-25) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.1.2...v0.2.0) ## [v0.1.2](https://github.com/truenorth/ember-cli-materialize/tree/v0.1.2) (2014-12-23) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.1.1...v0.1.2) ## [v0.1.1](https://github.com/truenorth/ember-cli-materialize/tree/v0.1.1) (2014-12-22) [Full Changelog](https://github.com/truenorth/ember-cli-materialize/compare/v0.1.0...v0.1.1) ## [v0.1.0](https://github.com/truenorth/ember-cli-materialize/tree/v0.1.0) (2014-12-22) ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing First of all, **thank you** for contributing, **you are awesome**! Here are a few rules to follow in order to ease code reviews, and discussions before maintainers accept and merge your work. You MUST run the test suite. You MUST write (or update) unit tests. You SHOULD write documentation. Please, write [commit messages that make sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), and [rebase your branch](http://git-scm.com/book/en/Git-Branching-Rebasing) before submitting your Pull Request. One may ask you to [squash your commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html) too. This is used to "clean" your Pull Request before merging it (we don't want commits such as `fix tests`, `fix 2`, `fix 3`, etc.). Also, while creating your Pull Request on GitHub, you MUST write a description which gives the context and/or explains why you are creating it. Thank you! ================================================ FILE: LICENSE.md ================================================ The MIT License (MIT) Copyright (c) 2016 Stefan Gasser and Mike North Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # ember-cli-materialize [![Greenkeeper badge](https://badges.greenkeeper.io/mike-north/ember-cli-materialize.svg)](https://greenkeeper.io/) [![Build Status](https://travis-ci.org/mike-north/ember-cli-materialize.svg?branch=master)](https://travis-ci.org/mike-north/ember-cli-materialize) [![npm version](https://badge.fury.io/js/ember-cli-materialize.svg)](http://badge.fury.io/js/ember-cli-materialize) [![Code Climate](https://codeclimate.com/github/mike-north/ember-cli-materialize/badges/gpa.svg)](https://codeclimate.com/github/mike-north/ember-cli-materialize) [![Coverage Status](https://coveralls.io/repos/mike-north/ember-cli-materialize/badge.svg?branch=master&service=github)](https://coveralls.io/github/mike-north/ember-cli-materialize?branch=master) [![Ember Observer Score](http://emberobserver.com/badges/ember-cli-materialize.svg)](http://emberobserver.com/addons/ember-cli-materialize) [![Book session on Codementor](https://cdn.codementor.io/badges/book_session_github.svg)](https://www.codementor.io/mikenorth0?utm_source=github&utm_medium=button&utm_term=mikenorth0&utm_campaign=github) An [ember-cli](http://www.ember-cli.com) addon for using [Materialize](http://materializecss.com/) (CSS Framework based on [Material Design](http://www.google.com/design/spec/material-design/introduction.html)) in Ember applications. **Ember 2.0 Friendly** **Materialize Version ~0.97.0** [![NPM](https://nodei.co/npm-dl/ember-cli-materialize.png?months=6)](https://nodei.co/npm/ember-cli-materialize/) ### Which version do I use? Ember.js version | ember-cli-materialize version -----------------|-------------- `< 1.10.0` | Not supported `1.10.0 <= x < 1.11.0`| [`v0.16.4`](https://github.com/mike-north/ember-cli-materialize/tree/v0.16.4) `1.11.0 <= x < 1.13.0`| [`v0.18.6`](https://github.com/mike-north/ember-cli-materialize/tree/v0.18.6) `x >= 1.13.0` | [![npm version](https://badge.fury.io/js/ember-cli-materialize.svg)](http://badge.fury.io/js/ember-cli-materialize) ## Main features * Imports [Materialize](http://materializecss.com/) sass (via [ember-cli-sass](https://www.npmjs.com/package/ember-cli-sass)) and fonts into your app. * It's a components library for all Materialize components ## Usage The [online demo](http://mike.works/ember-cli-materialize) demonstrates all components with all possible options. Or you can download the demo: ```sh $ sudo npm install -g ember-cli $ git clone git@github.com:mike-north/ember-cli-materialize $ cd ember-cli-materialize # install dependencies $ npm install && bower install # fire up local server $ ember serve ``` ### Configuration #### Style Using **SASS** makes configuring the color scheme simple. Just make sure you import `components/color` and `components/variables` before `materialize` like the example below. ```scss // Example app.scss @import 'components/color'; // Custom color settings go here $primary-color: color("pink", "lighten-2"); @import 'components/variables'; @import 'materialize'; @import 'ember-cli-materialize'; ``` See the materialize docs on sass variables [here](http://materializecss.com/color.html). #### Defaults Some of the library's defaults can be set via your **config/environment.js** file ```javascript module.exports = function(/* environment, appConfig */) { var ENV = { materializeDefaults: { modalIsFooterFixed: false, buttonIconPosition: 'left', loaderSize: 'big', loaderMode: 'indeterminate', modalContainerId: 'materialize-modal-root-element', dropdownInDuration: 300, dropdownOutDuration: 300 }, ... }; } ``` ## Installation ```sh $ ember install ember-cli-materialize ``` ### PhantomJS If you are using PhantomJS version 1.9.x as a test runner then after installing this addon you may experience test failures when running tests via `ember test` that you do not see in a browser. This is due to the known limitation in PhantomJS 1.9 not providing a `.bind` method. To continue using PhantomJS simply either install [ember-cli-es5-shim](https://github.com/pixelhandler/ember-cli-es5-shim), which provides a `.bind` method, or try PhantomJS 2.x. ## Testing This addon is continuiously integrated against the following framework versions Version | Failures Allowed --------|------------------- Ember `~1.10.0` | No Ember `~1.11.0` | No Ember `~1.12.0` | No components/ember#release | No components/ember#beta | No components/ember#canary | No ## Contributing See [CONTRIBUTING file](https://github.com/mike-north/ember-cli-materialize/tree/master/CONTRIBUTING.md). ## Special Thanks Special thanks to [Stefan Gasser](https://github.com/sgasser) for creating and originally maintaining this great library ## License ember-cli-materialize is released under the MIT License. See the bundled LICENSE file for details. ![Analytics](https://ga-beacon.appspot.com/UA-66610985-1/mike-north/ember-cli-materialize/readme) ================================================ FILE: addon/components/-md-fixed-btn-base.js ================================================ import { computed } from '@ember/object'; import Component from '@ember/component'; export default Component.extend({ actionArgs: null, large: true, actions: { fireButtonAction() { const actionArgs = this.get('actionArgs'); if (actionArgs) { this.sendAction('action', actionArgs || null); } else { this.sendAction('action'); } } }, _btnClassString: computed('btnClass', function() { return `${this.get('btnClass')} btn-floating ${this.get('large') ? 'btn-large' : ''}`; }) }); ================================================ FILE: addon/components/md-badge.js ================================================ import Component from '@ember/component'; import layout from '../templates/components/md-badge'; export default Component.extend({ layout, tagName: 'span', text: null, classNames: ['badge'] }); ================================================ FILE: addon/components/md-btn-dropdown.js ================================================ import { computed } from '@ember/object'; import layout from '../templates/components/md-btn-dropdown'; import MaterializeButton from './md-btn'; export default MaterializeButton.extend({ layout, tagName: 'a', classNames: ['dropdown-button'], icon: 'mdi-navigation-expand-more', iconBody: '', iconPosition: 'right', attributeBindings: [ 'inDuration:data-induration', 'outDuration:data-outduration', 'constrainWidth:data-constrainwidth', '_hoverVal:data-hover', 'gutter:data-gutter', 'belowOrigin:data-beloworigin', 'alignment' ], didRender() { this._super(...arguments); this._setupDropdown(); }, _hoverVal: computed('hover', function() { return this.get('hover') ? 'true' : 'false'; }), _setupDropdown() { // needed until the Materialize.dropdown plugin is replaced this.$().attr('data-activates', this.get('_dropdownContentId')); let options = { hover: !!this.getWithDefault('hover', false), // Ignore requireCamelCaseOrUpperCaseIdentifiers because the original // variable of materializecss contains underscore // jscs:disable requireCamelCaseOrUpperCaseIdentifiers constrain_width: !!this.getWithDefault('constrainWidth', true), // jscs:enable requireCamelCaseOrUpperCaseIdentifiers inDuration: this.getWithDefault('inDuration', this.get('_mdSettings.dropdownInDuration')), outDuration: this.getWithDefault('outDuration', this.get('_mdSettings.dropdownOutDuration')), gutter: this.getWithDefault('gutter', 0), belowOrigin: !!this.getWithDefault('belowOrigin', false), alignment: this.getWithDefault('alignment', 'left') }; this.$().dropdown(options); }, _dropdownContentId: computed(function() { return `${this.get('elementId')}-dropdown-content`; }) }); ================================================ FILE: addon/components/md-btn-submit.js ================================================ import MaterializeButton from './md-btn'; export default MaterializeButton.extend({ layoutName: 'components/materialize-button', tagName: 'button', attributeBindings: ['type'], type: 'submit' }); ================================================ FILE: addon/components/md-btn.js ================================================ import { equal } from '@ember/object/computed'; import Component from '@ember/component'; import { computed } from '@ember/object'; import { typeOf } from '@ember/utils'; import { scheduleOnce } from '@ember/runloop'; import UsesSettings from '../mixins/uses-settings'; import layout from '../templates/components/md-btn'; export default Component.extend(UsesSettings, { layout, tagName: 'a', classNameBindings: ['btn:waves-effect', 'wavesClass', 'isDisabled:disabled:waves-effect', 'buttonClass'], attributeBindings: ['isDisabled:disabled'], wavesClass: 'waves-light', text: null, icon: null, iconPosition: null, buttonType: null, actionArg: null, isFlat: equal('buttonType', 'flat'), isDisabled: false, init() { this._super(...arguments); if (!this.get('iconPosition')) { this.set('iconPosition', this.get('_mdSettings.buttonIconPosition')); } }, didInsertElement() { this._super(...arguments); scheduleOnce('afterRender', this, this._setupWaves); }, buttonClass: computed('buttonType', function() { const buttonType = this.get('buttonType'); return buttonType ? `btn-${buttonType}` : 'btn'; }), _setupWaves() { const Waves = window.Waves || {}; if (typeOf(Waves.displayEffect) === 'function') { Waves.displayEffect(); } }, click() { if (!this.get('isDisabled')) { this.sendAction('action', this.get('actionArg')); } } }); ================================================ FILE: addon/components/md-card-action.js ================================================ import Component from '@ember/component'; export default Component.extend({ classNames: ['card-action'] }); ================================================ FILE: addon/components/md-card-collapsible.js ================================================ import { computed } from '@ember/object'; import Component from '@ember/component'; import layout from '../templates/components/md-card-collapsible'; export default Component.extend({ layout, tagName: 'ul', classNames: ['collapsible'], attributeBindings: ['data-collapsible'], accordion: true, 'data-collapsible': computed(function() { return this.get('accordion') ? 'accordion' : 'expandable'; }), didInsertElement() { this._super(...arguments); this._setupCollapsible(); }, _setupCollapsible() { const accordion = this.get('accordion'); this.$().collapsible({ accordion }); }, _teardownCollapsible() { const $panelHeaders = this.$('> li > .collapsible-header'); this.$().off('click.collapse', '.collapsible-header'); $panelHeaders.off('click.collapse'); }, willDestroyElement() { this._super(...arguments); this._teardownCollapsible(); } }); ================================================ FILE: addon/components/md-card-content.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import layout from '../templates/components/md-card-content'; import { deprecate } from '@ember/application/deprecations'; export default Component.extend({ layout, classNames: ['card-content'], classNameBindings: ['class'], title: computed('parentView.title', function() { deprecate('Using md-card-content without passing it a "title" property (relying on parentView.title) is deprecated.', true, { id: 'ember-cli-materialize.deprecate-parentView', until: '1.0.0' }); return this.get('parentView.title'); }), titleClass: computed('parentView.titleClass', function() { deprecate('Using md-card-content without passing it a "titleClass" property (relying on parentView.titleClass) is deprecated.', true, { id: 'ember-cli-materialize.deprecate-parentView', until: '1.0.0' }); return this.get('parentView.titleClass'); }), activator: computed('parentView.activator', function() { deprecate('Using md-card-content without passing it an "activator" property (relying on parentView.activator) is deprecated.', true, { id: 'ember-cli-materialize.deprecate-parentView', until: '1.0.0' }); return this.get('parentView.activator'); }), cardTitleClass: computed('titleClass', function() { return this.get('titleClass') || 'black-text'; }) }); ================================================ FILE: addon/components/md-card-panel.js ================================================ import Component from '@ember/component'; import layout from '../templates/components/md-card-panel'; export default Component.extend({ layout, classNames: ['card-panel'], classNameBindings: ['class'] }); ================================================ FILE: addon/components/md-card-reveal.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import layout from '../templates/components/md-card-reveal'; import { deprecate } from '@ember/application/deprecations'; export default Component.extend({ layout, tagName: 'div', classNames: ['card-reveal'], classNameBindings: ['class'], title: computed('parentView.title', function() { deprecate('Using md-card-reveal without passing it a "title" property (relying on parentView.title) is deprecated.', true, { id: 'ember-cli-materialize.deprecate-parentView', until: '1.0.0' }); return this.get('parentView.title'); }), activator: computed('parentView.activator', function() { deprecate('Using md-card-reveal without passing it an "activator" property (relying on parentView.activator) is deprecated.', true, { id: 'ember-cli-materialize.deprecate-parentView', until: '1.0.0' }); return this.get('parentView.activator'); }) }); ================================================ FILE: addon/components/md-card.js ================================================ import Component from '@ember/component'; import layout from '../templates/components/md-card'; export default Component.extend({ layout, classNames: ['card'], classNameBindings: ['class'] }); ================================================ FILE: addon/components/md-check.js ================================================ import { alias } from '@ember/object/computed'; import SelectableItem from './selectable-item'; import layout from '../templates/components/md-checkbox'; export default SelectableItem.extend({ layout, text: alias('name'), classNames: ['materialize-checkbox'] }); ================================================ FILE: addon/components/md-checks-check.js ================================================ import CheckboxComponent from './md-check'; import GroupSelectableItemMixin from '../mixins/group-selectable-item'; export default CheckboxComponent.extend(GroupSelectableItemMixin, {}); ================================================ FILE: addon/components/md-checks.js ================================================ import SelectableItemGroup from './selectable-item-group'; export default SelectableItemGroup.extend({ selectableItemView: 'md-checks-check', multiple: true }); ================================================ FILE: addon/components/md-collapsible.js ================================================ import { deprecate } from '@ember/application/deprecations'; import Component from '@ember/component'; import layout from '../templates/components/md-collapsible'; import { computed } from '@ember/object'; export default Component.extend({ layout, tagName: 'li', // classNameBindings: ['class'], actionArg: null, model: computed('actionArg', { get() { deprecate('md-collapsible#model is deprecated. Please use md-collapsible#actionArg instead'); return this.get('actionArg'); }, set(key, val) { deprecate('md-collapsible#model is deprecated. Please use md-collapsible#actionArg instead'); return this.set('actionArg', val); } }), actions: { headerClicked() { this.sendAction('action', this.get('actionArg')); } } }); ================================================ FILE: addon/components/md-collection.js ================================================ import Component from '@ember/component'; import { bool } from '@ember/object/computed'; import layout from '../templates/components/md-collection'; export default Component.extend({ layout, classNames: ['collection'], classNameBindings: ['_hasHeader:with-header'], headerComponentName: 'md-default-collection-header', header: null, _hasHeader: bool('header') }); ================================================ FILE: addon/components/md-copyright.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { assert } from '@ember/debug'; import layout from '../templates/components/md-copyright'; export default Component.extend({ layout, classNames: ['footer-copyright'], init() { this._super(...arguments); assert( 'Property startYear must be less than or equal to the current year.', this.get('startYear') === null || this.get('startYear') <= new Date().getFullYear() ); }, startYear: null, text: null, date: computed(function() { const currentYear = new Date().getFullYear(); const startYear = this.get('startYear'); if (startYear === null || startYear === currentYear) { return `${currentYear}`; } else { return `${startYear} - ${currentYear}`; } }) }); ================================================ FILE: addon/components/md-default-collection-header.js ================================================ import Component from '@ember/component'; import layout from '../templates/components/md-default-collection-header'; export default Component.extend({ layout, classNames: ['collection-header'] }); ================================================ FILE: addon/components/md-default-column-header.js ================================================ import Component from '@ember/component'; import { alias } from '@ember/object/computed'; import layout from '../templates/components/md-default-column-header'; export default Component.extend({ tagName: 'th', layout, attributeBindings: ['data-field'], 'data-field': alias('column.valueBindingPath') }); ================================================ FILE: addon/components/md-fixed-btn.js ================================================ import FixedButtonBase from './-md-fixed-btn-base'; import layout from '../templates/components/md-fixed-btn'; export default FixedButtonBase.extend({ layout, tagName: 'li', classNames: ['md-fixed-btn'] }); ================================================ FILE: addon/components/md-fixed-btns.js ================================================ import FixedButtonBase from './-md-fixed-btn-base'; import layout from '../templates/components/md-fixed-btns'; export default FixedButtonBase.extend({ layout, classNames: ['md-fixed-btns', 'fixed-action-btn'] }); ================================================ FILE: addon/components/md-input-date.js ================================================ import $ from 'jquery'; import MaterializeInput from './md-input'; import layout from '../templates/components/md-input-date'; const MONTH_NAMES = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; function formatDate(timestamp) { const d = new Date(timestamp); return `${d.getDate()} ${MONTH_NAMES[d.getMonth()]}, ${d.getFullYear()}`; } export default MaterializeInput.extend({ layout, selectMonths: true, numberOfYears: 15, min: '', max: '', didInsertElement() { this._super(...arguments); this._setupPicker(); }, willDestroyElement() { this._super(...arguments); this._teardownPicker(); }, _setupPicker() { const datePickerOptions = this.getProperties('selectMonths', 'numberOfYears', 'min', 'max'); datePickerOptions.selectYears = datePickerOptions.numberOfYears; this._onDateSet = evt => { if (evt.select) { this.set('value', formatDate(evt.select)); } }; this.$('.datepicker').pickadate( $.extend(datePickerOptions, { onSet: this._onDateSet }) ); }, _teardownPicker() { const $pickadate = this.$('.datepicker').data('pickadate'); if ($pickadate) { $pickadate.stop(); } } }); ================================================ FILE: addon/components/md-input-field.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { isPresent } from '@ember/utils'; export default Component.extend({ classNames: ['input-field'], bindAttributes: ['disabled', 'readonly', 'autofocus'], validate: false, _wasTouched: false, isValid: computed('_wasTouched', 'value', 'validate', 'errors', 'errors.[]', function() { return ( (isPresent(this.get('value')) || this.get('_wasTouched')) && this.get('validate') && this.get('errors') && this.get('errors.length') === 0 ); }), isInvalid: computed('_wasTouched', 'value', 'validate', 'errors', 'errors.[]', function() { return ( (isPresent(this.get('value')) || this.get('_wasTouched')) && this.get('validate') && this.get('errors') && this.get('errors.length') > 0 ); }), didInsertElement() { this._super(...arguments); // pad the errors element when an icon is present if (isPresent(this.get('icon'))) { this.$('> span').css('padding-left', '3rem'); } }, id: computed('elementId', function() { return `${this.get('elementId')}-input`; }), _setupLabel() { const $label = this.$('> label'); if (isPresent(this.get('value')) && !$label.hasClass('active')) { $label.addClass('active'); } }, _errorString: computed('errors.[]', function() { return (this.get('errors') || []).join('. '); }), actions: { inputFocusIn(evt) { this.set('_wasTouched', true); this.sendAction('focusIn', evt); } } }); ================================================ FILE: addon/components/md-input.js ================================================ import MaterializeInputField from './md-input-field'; import layout from '../templates/components/md-input'; export default MaterializeInputField.extend({ layout, type: 'text', didInsertElement() { this._super(...arguments); // make sure the label moves when a value is bound. this._setupLabel(); } }); ================================================ FILE: addon/components/md-loader.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { A } from '@ember/array'; import { htmlSafe } from '@ember/string'; import UsesSettings from '../mixins/uses-settings'; import layout from '../templates/components/md-loader'; export default Component.extend(UsesSettings, { layout, classNameBindings: ['isBarType:progress:preloader-wrapper', 'active:active', 'size'], mode: null, percent: 0, size: null, active: true, color: null, init() { this._super(...arguments); if (!this.get('mode')) { this.set('mode', this.get('_mdSettings.loaderMode')); } if (!this.get('size')) { this.set('size', this.get('_mdSettings.loaderSize')); } }, isBarType: computed('mode', function() { return ['determinate', 'indeterminate'].indexOf(this.get('mode')) >= 0; }), isDeterminate: computed('mode', function() { return ['determinate'].indexOf(this.get('mode')); }), barStyle: computed('mode', 'percent', function() { if (this.get('mode') === 'determinate') { return htmlSafe(`width: ${parseInt(this.get('percent'), 10)}%`); } else { return htmlSafe(''); } }), barClassName: computed('isBarType', 'mode', function() { return this.get('isBarType') ? this.get('mode') : null; }), spinnerClassNames: computed('color', 'isBarType', function() { if (!this.get('isBarType')) { const color = this.get('color'); if (!color) { return A(['blue', 'red', 'green', 'yellow'].map(c => `spinner-layer spinner-${c}`)); } else { return A([`spinner-layer spinner-${color}-only`]); } } else { return A(); } }) }); ================================================ FILE: addon/components/md-modal-container.js ================================================ import Component from '@ember/component'; import UsesSettings from '../mixins/uses-settings'; import layout from '../templates/components/md-modal-container'; export default Component.extend(UsesSettings, { layout, modalContainerId: null, init() { this._super(...arguments); if (!this.get('modalContainerId')) { this.set('modalContainerId', this.get('_mdSettings.modalContainerId')); } } }); ================================================ FILE: addon/components/md-modal.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { oneWay } from '@ember/object/computed'; import { htmlSafe } from '@ember/string'; import { on } from '@ember/object/evented'; import UsesSettings from '../mixins/uses-settings'; import layout from '../templates/components/md-modal'; import { EKMixin, keyUp } from 'ember-keyboard'; export default Component.extend(EKMixin, UsesSettings, { layout, attributeBindings: ['style:inlineStyle'], concatenatedProperties: ['modalClassNames'], inlineStyle: computed(function() { return htmlSafe('z-index: 1000;'); }), isFooterFixed: oneWay('_mdSettings.modalIsFooterFixed'), modalClassNames: ['modal', 'show'], _modalClassString: computed('modalClassNames.[]', 'isFooterFixed', function() { const names = this.get('modalClassNames'); if (this.get('isFooterFixed')) { names.push('modal-fixed-footer'); } return names.join(' '); }), init() { this._super(...arguments); this.set('keyboardActivated', true); }, _onEsc: on(keyUp('Escape'), function() { this.cancel(); }), cancel() { this.sendAction('close'); }, actions: { closeModal() { this.sendAction('close'); } } }); ================================================ FILE: addon/components/md-navbar.js ================================================ import $ from 'jquery'; import { computed } from '@ember/object'; import Component from '@ember/component'; import { typeOf } from '@ember/utils'; import { scheduleOnce } from '@ember/runloop'; import layout from '../templates/components/md-navbar'; export default Component.extend({ tagName: 'nav', layout, homeRoute: 'index', didInsertElement() { this._super(...arguments); // TODO: is this scheduling necessary? scheduleOnce('afterRender', this, this._setupNavbar); }, _setupNavbar() { if (typeOf($('.button-collapse').sideNav) === 'function') { this.notifyPropertyChange('_sideNavId'); this.$('.button-collapse').sideNav({ closeOnClick: true }); } }, _sideNavId: computed(function() { return (typeof FastBoot === 'undefined') ? `${this.get('element.id')}-sidenav` : ''; }) // TODO: Unregister any listeners that $.sideNav() puts in place // _teardownNavbar() { // // } }); ================================================ FILE: addon/components/md-pagination.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { A } from '@ember/array'; import layout from '../templates/components/md-pagination'; export default Component.extend({ layout, classNames: ['pagination'], min: 1, max: 1, current: 1, range: 5, tagName: 'ul', windowRange: computed('min', 'max', 'range', 'current', function() { // TODO: this should be broken out into a util, so that it can be tested independently const max = this.get('max'); const min = this.get('min'); const range = this.get('range'); const current = this.get('current'); const middle = Math.floor((max - min) / 2); let low = Math.max(min, current - Math.floor(range / 2)); let high = Math.min(max, current + Math.floor(range / 2)); if (high - low < range - 1) { if (current <= middle) { high = Math.min(max, low + range - 1); } else { low = Math.max(min, high - (range - 1)); } } return { low, high }; }), _pages: computed('windowRange.low', 'windowRange.high', 'current', function() { const a = new A([]); const winRange = this.get('windowRange'); const current = this.get('current'); for (let i = winRange.low; i <= winRange.high; i += 1) { a.addObject({ val: i, cssClass: current === i ? 'active' : 'waves-effect' }); } return a; }), _canGoBack: computed('min', 'current', function() { return this.get('current') > this.get('min'); }), _canGoFwd: computed('max', 'current', function() { return this.get('current') < this.get('max'); }), incrementClass: computed('_canGoFwd', function() { return this.get('_canGoFwd') ? '' : 'disabled'; }), decrementClass: computed('_canGoBack', function() { return this.get('_canGoBack') ? '' : 'disabled'; }), actions: { oneBack() { if (this.get('_canGoBack')) { this.decrementProperty('current'); } }, oneFwd() { if (this.get('_canGoFwd')) { this.incrementProperty('current'); } }, gotoPage(pagenum) { this.set('current', pagenum); } } }); ================================================ FILE: addon/components/md-parallax.js ================================================ import Component from '@ember/component'; import layout from '../templates/components/md-parallax'; export default Component.extend({ layout, classNames: ['parallax-container'], didInsertElement() { this._super(...arguments); this._setupParallax(); }, _setupParallax() { this.$('.parallax').parallax(); } // TODO: unregister any listeners that $.parallax() registers // _teardownParallax() { // // } }); ================================================ FILE: addon/components/md-radio.js ================================================ import { computed } from '@ember/object'; import { alias } from '@ember/object/computed'; import { isEmpty } from '@ember/utils'; import { assert } from '@ember/debug'; import SelectableItem from './selectable-item'; import layout from '../templates/components/md-radio'; export default SelectableItem.extend({ layout, value: '', text: alias('name'), groupValue: alias('group.selection'), className: ['materialize-radio'], checked: computed('groupValue', 'value', function() { return this.get('groupValue') === this.get('value'); }), didInsertElement() { this._super(...arguments); assert( !isEmpty(this.get('group')), 'materialize-radio is not supported outside the context of a materialize-radio-group' ); } }); ================================================ FILE: addon/components/md-radios-radio.js ================================================ import RadioComponent from './md-radio'; import GroupSelectableItemMixin from '../mixins/group-selectable-item'; export default RadioComponent.extend(GroupSelectableItemMixin, {}); ================================================ FILE: addon/components/md-radios.js ================================================ import SelectableItemGroup from './selectable-item-group'; export default SelectableItemGroup.extend({ classNames: ['md-radios'], selectableItemView: 'md-radios-radio' }); ================================================ FILE: addon/components/md-range.js ================================================ import Component from '@ember/component'; import layout from '../templates/components/md-range'; export default Component.extend({ layout, classNames: ['md-range'], min: 0, max: 100, step: 1 }); ================================================ FILE: addon/components/md-select.js ================================================ import { A } from '@ember/array'; import { isNone } from '@ember/utils'; import { later } from '@ember/runloop'; import { get, observer, computed } from '@ember/object'; import MaterializeInputField from './md-input-field'; import layout from '../templates/components/md-select'; export default MaterializeInputField.extend({ layout, classNames: ['md-select'], optionLabelPath: 'content', optionValuePath: 'content', didRender() { this._super(...arguments); this._setupSelect(); }, willUpdate() { this._teardownSelect(); }, willDestroyElement() { this._teardownSelect(); }, _setupSelect() { // jscs: disable this.$('select').material_select(); // jscs: enable }, _parsedContent: computed('optionValuePath', 'optionLabelPath', 'content.[]', function() { const contentRegex = /(content\.|^content$)/; // keep backwards compatability for defining optionValuePath & as optionContentPath `content.{{attName}}` const optionValuePath = (this.get('optionValuePath') || '').replace(contentRegex, ''); const optionLabelPath = (this.get('optionLabelPath') || '').replace(contentRegex, ''); return A( (this.get('content') || []).map(option => { return { value: optionValuePath ? get(option, optionValuePath) : option, label: optionLabelPath ? get(option, optionLabelPath) : option }; }) ); }), _teardownSelect() { // jscs: disable this.$('select').material_select('destroy'); // jscs: enable }, actions: { optionSelected(e) { const target = e.target; if (!this.get('isDisabled')) { if (this.get('action')) { this.sendAction('action', target.value); } else { this.set('value', target.value) } } } }, // TODO: this could be converted to a computed property, returning a string // that is bound to the class attribute of the inputSelector errorsDidChange: observer('errors', function() { const inputSelector = this.$('input'); // monitor the select's validity and copy the appropriate validation class to the materialize input element. if (!isNone(inputSelector)) { later( this, function() { const isValid = this.$('select').hasClass('valid'); if (isValid) { inputSelector.removeClass('invalid'); inputSelector.addClass('valid'); } else { inputSelector.removeClass('valid'); inputSelector.addClass('invalid'); } }, 150 ); } }) }); ================================================ FILE: addon/components/md-switch.js ================================================ import { computed } from '@ember/object'; import SelectableItem from './selectable-item'; import layout from '../templates/components/md-switch'; export default SelectableItem.extend({ layout, classNames: ['switch', 'materialize-switch'], offLabel: 'Off', onLabel: 'On', disabled: false, _labelClass: computed('name', function() { return this.get('name') ? 'right' : ''; }) }); ================================================ FILE: addon/components/md-switches-switch.js ================================================ import GroupSelectableItemMixin from '../mixins/group-selectable-item'; import SwitchComponent from './md-switch'; export default SwitchComponent.extend(GroupSelectableItemMixin, {}); ================================================ FILE: addon/components/md-switches.js ================================================ import SelectableItemGroup from './selectable-item-group'; export default SelectableItemGroup.extend({ selectableItemView: 'md-switches-switch', multiple: true }); ================================================ FILE: addon/components/md-tab.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { oneWay } from '@ember/object/computed'; import ChildComponentSupport from 'ember-composability/mixins/child-component-support'; import MdTabs from './md-tabs'; import layout from '../templates/components/md-tab'; export default Component.extend(ChildComponentSupport, { _parentComponentTypes: [MdTabs], tagName: 'li', layout, classNames: ['materialize-tabs-tab', 'tab', 'col'], classNameBindings: ['_colClass'], colWidth: oneWay('composableParent.colWidth'), _colClass: computed('colWidth', function() { return `s${this.get('colWidth')}`; }), active: computed('composableParent.composableChildren.[]', 'composableParent.selected', 'value', function() { const selected = this.get('composableParent.selected'); if (selected) { return selected === this.get('value'); } else { const values = this.get('composableParent') .tabComponents() .map(t => t.get('value')); return values.indexOf(this.get('value')) === 0; } }).readOnly(), click() { this.get('composableParent').set('selected', this.get('value')); } }); ================================================ FILE: addon/components/md-table-col.js ================================================ import Component from '@ember/component'; import { get, computed } from '@ember/object'; import { alias } from '@ember/object/computed'; import layout from '../templates/components/md-table-col'; import Table from './md-table'; import ChildComponentSupport from 'ember-composability/mixins/child-component-support'; export default Component.extend(ChildComponentSupport, { // eslint-disable-next-line _parentComponentTypes: [Table], tagName: 'td', layout, valueBindingPath: null, headerComponentName: 'md-default-column-header', header: alias('valueBindingPath'), key: alias('valueBindingPath'), _value: computed('valueBindingPath', 'row', function() { let vbp = this.get('valueBindingPath'); if (!vbp) { return ''; } else { return get(this.get('row'), this.get('valueBindingPath')); } }) }); ================================================ FILE: addon/components/md-table.js ================================================ import { A } from '@ember/array'; import Component from '@ember/component'; import { computed } from '@ember/object'; import ParentComponentSupport from 'ember-composability/mixins/parent-component-support'; import layout from '../templates/components/md-table'; export default Component.extend(ParentComponentSupport, { tagName: 'table', layout, columns: null, composableChildrenDebounceTime: 1, init() { this._super(...arguments); this.set('columns', []); }, columnComponents: computed('composableChildren', function() { return new A(this.get('composableChildren')); }).readOnly(), registerChildComponent(childComponent) { this.get('_childComponents').add(childComponent, childComponent.get('key')); this._notifyComposableChildrenChanged(); }, unregisterChildComponent(childComponent) { this.get('_childComponents').delete(childComponent, childComponent.get('key')); this._notifyComposableChildrenChanged(); } }); ================================================ FILE: addon/components/md-tabs.js ================================================ import Component from '@ember/component'; import { alias } from '@ember/object/computed'; import { debounce } from '@ember/runloop'; import { A } from '@ember/array'; import { observer, computed, get } from '@ember/object'; import ParentComponentSupport from 'ember-composability/mixins/parent-component-support'; import layout from '../templates/components/md-tabs'; export default Component.extend(ParentComponentSupport, { layout, classNames: ['materialize-tabs', 'row'], composableChildrenDebounceTime: 1, content: null, numTabs: alias('composableChildren.length'), optionValuePath: 'id', optionLabelPath: 'title', colWidth: 2, selected: null, didInsertElement() { this._super(...arguments); this._updateIndicatorPosition(false); }, _indicatorUpdater: observer('selected', 'content.[]', 'composableChildren.[]', function() { debounce(this, this._updateIndicatorPosition, 100); }), tabComponents() { return A(this.get('composableChildren')) || A(); }, _updateIndicatorPosition(animate = true) { if (!this.element) { return; } const [tabComponent] = (this.get('composableChildren') || []).filter( item => get(item, 'value') === this.get('selected') ); const tabSetRect = this.element.getBoundingClientRect(); if (tabComponent) { const tabRect = tabComponent.element.getBoundingClientRect(); const cssParams = { left: tabRect.left - tabSetRect.left, right: tabSetRect.right - tabRect.right }; if (!animate) { this.$('.indicator').css(cssParams); } else { this.$('.indicator1').velocity(cssParams, { duration: 150 }); this.$('.indicator2').velocity(cssParams, { duration: 150, delay: 40 }); } } }, _content: computed('content.[]', 'optionLabelPath', 'optionValuePath', function() { const labelPath = this.get('optionLabelPath'); const valuePath = this.get('optionValuePath'); return new A( (this.get('content') || []).map(contentItem => ({ id: contentItem[valuePath], title: contentItem[labelPath] })) ); }) }); ================================================ FILE: addon/components/md-textarea.js ================================================ import InputField from './md-input-field'; import layout from '../templates/components/md-textarea'; export default InputField.extend({ layout, didInsertElement() { this._super(...arguments); // make sure the label moves when a value is bound. this._setupLabel(); } }); ================================================ FILE: addon/components/selectable-item-group.js ================================================ import Component from '@ember/component'; import { A } from '@ember/array'; import { computed, get } from '@ember/object'; import ParentComponentSupport from 'ember-composability/mixins/parent-component-support'; import layout from '../templates/components/selectable-item-group'; export default Component.extend(ParentComponentSupport, { layout, content: null, selection: null, optionValuePath: 'content', optionLabelPath: 'content', multiple: false, __materializeSelectableItemGroup: true, init() { this._super(...arguments); if (this.get('selection') === null && !!this.get('multiple')) { this.set('selection', new A([])); } }, isValueSelected(value) { if (this.get('multiple')) { return this.get('selection').indexOf(value) >= 0; } else { return this.get('selection') === value; } }, setValueSelection(value, select) { if (select) { return this.addToSelection(value); } else { return this.removeFromSelection(value); } }, addToSelection(value) { if (this.get('multiple')) { this.get('selection').addObject(value); } else { this.set('selection', value); } }, removeFromSelection(value) { if (this.get('multiple')) { this.get('selection').removeObject(value); } else { if (this.get('selection') === value) { this.set('selection', null); } } }, disabled: false, _valuePath: computed('optionValuePath', function() { const optionValuePath = get(this, 'optionValuePath'); return optionValuePath.replace(/^content\.?/, ''); }), _labelPath: computed('optionLabelPath', function() { const optionLabelPath = get(this, 'optionLabelPath'); return optionLabelPath.replace(/^content\.?/, ''); }), _content: computed('content.[]', '_valuePath', '_labelPath', function() { const valuePath = get(this, '_valuePath'); const labelPath = get(this, '_labelPath'); const content = get(this, 'content') || new A([]); if (valuePath && labelPath) { return A( content.map(el => { return { value: get(el, valuePath), label: get(el, labelPath) }; }) ); } else { return A( content.map(el => { return { value: el, label: el }; }) ); } }) }); ================================================ FILE: addon/components/selectable-item.js ================================================ import { computed } from '@ember/object'; import { alias } from '@ember/object/computed'; import Component from '@ember/component'; import ChildComponentSupport from 'ember-composability/mixins/child-component-support'; import SelectableItemGroup from './selectable-item-group'; export default Component.extend(ChildComponentSupport, { // eslint-disable-next-line _parentComponentTypes: [SelectableItemGroup], checked: null, disabled: false, classNames: ['materialize-selectable-item'], _checked: computed('checked', 'group.selection', 'group.selection.[]', { get() { let group = this.get('group'); if (!group) { return this.get('checked'); } else { return group.isValueSelected(this.get('value')); } }, set(key, val) { let group = this.get('group'); if (!group) { this.set('checked', val); } else { group.setValueSelection(this.get('value'), val); } this.sendAction('action', { checked: !!val }); return !!val; } }), isSelected: alias('_checked'), _setupLabel() { let [$input] = this.$( '.materialize-selectable-item-input, .materialize-selectable-item-input-container input' ).toArray(); let inputId = $input ? $input.id : null; this.$('.materialize-selectable-item-label').attr('for', inputId); }, didInsertElement() { this._super(...arguments); this._setupLabel(); }, group: computed(function() { return this.nearestWithProperty('__materializeSelectableItemGroup'); }) }); ================================================ FILE: addon/helpers/bw-compat-icon.js ================================================ import Helper from '@ember/component/helper'; import { htmlSafe } from '@ember/string'; import { A } from '@ember/array'; export function isOldIcon(str) { return ( str.split(' ').filter(c => { return c.indexOf('mdi-') === 0; }).length > 0 ); } export function bwCompatIcon(params, hash) { let [iconStr] = params; let extraClassesString = (hash || {}).extraClasses || null; let extraClasses = extraClassesString ? extraClassesString.split(' ') : []; if (isOldIcon(iconStr)) { return htmlSafe( `` ); } else { let classes = iconStr.split(' '); let icon = classes.shift(); let classString = A(['material-icons'].concat(classes).concat(extraClasses)) .compact() .join(' '); return htmlSafe(`${icon}`); } } export default Helper.helper(bwCompatIcon); ================================================ FILE: addon/mixins/group-selectable-item.js ================================================ import Mixin from '@ember/object/mixin'; import { alias } from '@ember/object/computed'; export default Mixin.create({ name: alias('content.label'), value: alias('content.value'), disabled: false }); ================================================ FILE: addon/mixins/uses-settings.js ================================================ import { getOwner } from '@ember/application'; import { computed } from '@ember/object'; import Mixin from '@ember/object/mixin'; export default Mixin.create({ _mdSettings: computed(function() { // jscs:disable disallowDirectPropertyAccess let owner = getOwner ? getOwner(this) : this.get('container'); // jscs:enable disallowDirectPropertyAccess return owner.lookup('service:materialize-settings'); }) }); ================================================ FILE: addon/services/md-settings.js ================================================ import { keys as emberKeys } from '@ember/polyfills'; import { set, getWithDefault } from '@ember/object'; import { oneWay } from '@ember/object/computed'; import Service from '@ember/service'; import { classify } from '@ember/string'; // jscs:disable disallowDirectPropertyAccess const keys = Object.keys || emberKeys; // jscs:enable disallowDirectPropertyAccess export default Service.extend({ // Footer modalIsFooterFixed: oneWay('defaultModalIsFooterFixed'), // Button buttonIconPosition: oneWay('defaultButtonIconPosition'), // Loader loaderSize: oneWay('defaultLoaderSize'), loaderMode: oneWay('defaultLoaderMode'), // Modal modalContainerId: oneWay('defaultModalContainerId'), // Animation (Dropdown Button) dropdownInDuration: oneWay('defaultDropdownInDuration'), dropdownOutDuration: oneWay('defaultDropdownOutDuration'), init() { this._super(...arguments); this._setDefaults(); }, _setDefaults() { const defaults = getWithDefault(this, 'materializeDefaults', {}); keys(defaults).map(key => { const classifiedKey = classify(key); const defaultKey = `default${classifiedKey}`; return set(this, defaultKey, defaults[key]); }); } }); ================================================ FILE: addon/templates/components/md-badge.hbs ================================================ {{text}}{{yield}} ================================================ FILE: addon/templates/components/md-btn-dropdown.hbs ================================================ {{#if icon}} {{bw-compat-icon icon extraClasses=iconPosition}} {{/if}} {{text}} ================================================ FILE: addon/templates/components/md-btn.hbs ================================================ {{#if icon}} {{bw-compat-icon icon extraClasses=iconPosition}} {{/if}} {{text}} {{yield}} ================================================ FILE: addon/templates/components/md-card-collapsible.hbs ================================================ {{yield}} ================================================ FILE: addon/templates/components/md-card-content.hbs ================================================ {{#if title}} {{title}} {{#if activator}} more_vert {{/if}} {{/if}}

{{yield}}

================================================ FILE: addon/templates/components/md-card-panel.hbs ================================================ {{yield}} ================================================ FILE: addon/templates/components/md-card-reveal.hbs ================================================ {{title}} close

{{yield}}

================================================ FILE: addon/templates/components/md-card.hbs ================================================ {{#if image}}
{{/if}} {{yield}} ================================================ FILE: addon/templates/components/md-checkbox.hbs ================================================ {{input type="checkbox" class="materialize-selectable-item-input" checked=isSelected disabled=disabled}} ================================================ FILE: addon/templates/components/md-checks-check.hbs ================================================ {{yield}} ================================================ FILE: addon/templates/components/md-collapsible.hbs ================================================
{{#if icon}} {{bw-compat-icon icon}} {{/if}} {{title}}

{{yield}}

================================================ FILE: addon/templates/components/md-collection.hbs ================================================ {{#if _hasHeader}} {{component headerComponentName header=header}} {{/if}} {{#each content as |item idx|}} {{yield item idx}} {{/each}} ================================================ FILE: addon/templates/components/md-copyright.hbs ================================================
© {{date}} {{text}} {{yield}}
================================================ FILE: addon/templates/components/md-default-collection-header.hbs ================================================

{{header}}

================================================ FILE: addon/templates/components/md-default-column-header.hbs ================================================ {{column.header}} ================================================ FILE: addon/templates/components/md-fixed-btn.hbs ================================================ {{#md-btn icon=btnIcon class=_btnClassString action='fireButtonAction'}} {{yield}} {{/md-btn}} ================================================ FILE: addon/templates/components/md-fixed-btns.hbs ================================================ {{md-btn icon=btnIcon class=_btnClassString action='fireButtonAction'}} ================================================ FILE: addon/templates/components/md-input-date.hbs ================================================ {{#if icon}} {{bw-compat-icon icon extraClasses="prefix"}} {{/if}} ================================================ FILE: addon/templates/components/md-input.hbs ================================================ {{#if icon}} {{bw-compat-icon icon extraClasses="prefix"}} {{/if}} {{input id=id value=value classNameBindings="validate:validate: isValid:valid: isInvalid:invalid:" type=type required=required pattern=pattern maxlength=maxlength readonly=readonly disabled=disabled autocomplete=autocomplete autofocus=autofocus focusIn=(action 'inputFocusIn') step=step min=min max=max}} ================================================ FILE: addon/templates/components/md-loader.hbs ================================================ {{#if isBarType}}
{{/if}} {{#each spinnerClassNames as |spinnerClassName|}}
{{/each}} ================================================ FILE: addon/templates/components/md-modal-container.hbs ================================================
================================================ FILE: addon/templates/components/md-modal.hbs ================================================ {{#modal-dialog alignment=alignment alignmentTarget=alignmentTarget translucentOverlay=true overlayClassNames='lean-modal' clickOutsideToClose=true onClose='closeModal'}}
{{yield}}
{{/modal-dialog}} ================================================ FILE: addon/templates/components/md-navbar.hbs ================================================ ================================================ FILE: addon/templates/components/md-pagination.hbs ================================================
  • chevron_left
  • {{#each _pages as |page|}}
  • {{page.val}}
  • {{/each}}
  • chevron_right
  • ================================================ FILE: addon/templates/components/md-parallax.hbs ================================================
    ================================================ FILE: addon/templates/components/md-radio.hbs ================================================ {{radio-button disabled=disabled value=value groupValue=groupValue radioClass="materialize-selectable-item-input"}} ================================================ FILE: addon/templates/components/md-radios-radio.hbs ================================================ {{yield}} ================================================ FILE: addon/templates/components/md-range.hbs ================================================

    {{input type="range" min=min max=max step=step value=value disabled=disabled}}

    ================================================ FILE: addon/templates/components/md-select.hbs ================================================ {{#if errors}} {{errors.firstObject}} {{else}}   {{/if}} ================================================ FILE: addon/templates/components/md-switch.hbs ================================================ {{name}} ================================================ FILE: addon/templates/components/md-switches-switch.hbs ================================================ {{yield}} ================================================ FILE: addon/templates/components/md-tab.hbs ================================================ {{title}} ================================================ FILE: addon/templates/components/md-table-col.hbs ================================================ {{_value}} {{yield}} ================================================ FILE: addon/templates/components/md-table.hbs ================================================ {{#each columnComponents as |column|}} {{component column.headerComponentName column=column}} {{/each}} {{#each content as |row|}} {{yield row}} {{/each}} ================================================ FILE: addon/templates/components/md-tabs.hbs ================================================
      {{#each _content as |tab|}} {{md-tab title=tab.title value=tab.id}} {{/each}} {{yield}}
    ================================================ FILE: addon/templates/components/md-textarea.hbs ================================================ {{#if icon}} {{bw-compat-icon icon extraClasses="prefix"}} {{/if}} {{textarea id=id value=value name=name required=required readonly=readonly disabled=disabled maxlength=maxlength class="materialize-textarea"}} ================================================ FILE: addon/templates/components/selectable-item-group.hbs ================================================ {{yield}} {{#each _content as |item|}}

    {{component selectableItemView content=item disabled=disabled groupId="group-{{elementId}}"}}

    {{/each}} ================================================ FILE: app/.gitkeep ================================================ ================================================ FILE: app/components/materialize-badge.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeBadge from './md-badge'; export default MaterializeBadge.extend({ init() { this._super(...arguments); deprecate('{{materialize-badge}} has been deprecated. Please use {{md-badge}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-button-submit.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeButtonSubmit from './md-btn-submit'; export default MaterializeButtonSubmit.extend({ init() { this._super(...arguments); deprecate('{{materialize-button-submit}} has been deprecated. Please use {{md-btn-submit}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-button.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeButton from './md-btn'; export default MaterializeButton.extend({ init() { this._super(...arguments); deprecate('{{materialize-button}} has been deprecated. Please use {{md-btn}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-card-action.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCardAction from './md-card-action'; export default MaterializeCardAction.extend({ init() { this._super(...arguments); deprecate('{{materialize-card-action}} has been deprecated. Please use {{md-card-action}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-card-content.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCardContent from './md-card-content'; export default MaterializeCardContent.extend({ init() { this._super(...arguments); deprecate('{{materialize-card-content}} has been deprecated. Please use {{md-card-content}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-card-panel.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCardPanel from './md-card-panel'; export default MaterializeCardPanel.extend({ init() { this._super(...arguments); deprecate('{{materialize-card-panel}} has been deprecated. Please use {{md-card-panel}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-card-reveal.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCardReveal from './md-card-reveal'; export default MaterializeCardReveal.extend({ init() { this._super(...arguments); deprecate('{{materialize-card-reveal}} has been deprecated. Please use {{md-card-reveal}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-card.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCard from './md-card'; export default MaterializeCard.extend({ init() { this._super(...arguments); deprecate('{{materialize-card}} has been deprecated. Please use {{md-card}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-checkbox.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeCheckbox from './md-check'; export default materializeCheckbox.extend({ init() { this._super(...arguments); deprecate('{{materialize-checkbox}} has been deprecated. Please use {{md-check}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-checkboxes.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeCheckboxes from './md-checks'; export default materializeCheckboxes.extend({ init() { this._super(...arguments); deprecate('{{materialize-checkboxes}} has been deprecated. Please use {{md-checks}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-collapsible-card.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCollapsibleCard from './md-card-collapsible'; export default MaterializeCollapsibleCard.extend({ init() { this._super(...arguments); deprecate( '{{materialize-collapsible-card}} has been deprecated. Please use {{md-card-collapsible}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' } ); } }); ================================================ FILE: app/components/materialize-collapsible.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeCollapsible from './md-collapsible'; export default MaterializeCollapsible.extend({ init() { this._super(...arguments); deprecate('{{materialize-collapsible}} has been deprecated. Please use {{md-collapsible}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-copyright.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeCopyright from './md-copyright'; export default materializeCopyright.extend({ init() { this._super(...arguments); deprecate('{{materialize-copyright}} has been deprecated. Please use {{md-copyright}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-date-input.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeDateInput from './md-input-date'; export default materializeDateInput.extend({ init() { this._super(...arguments); deprecate('{{materialize-date-input}} has been deprecated. Please use {{md-input-date}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-input-field.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeInputField from './md-input-field'; export default materializeInputField.extend({ init() { this._super(...arguments); deprecate('{{materialize-input-field}} has been deprecated. Please use {{md-input-field}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-input.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeInput from './md-input'; export default materializeInput.extend({ init() { this._super(...arguments); deprecate('{{materialize-input}} has been deprecated. Please use {{md-input}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-loader.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeLoader from './md-loader'; export default materializeLoader.extend({ init() { this._super(...arguments); deprecate('{{materialize-loader}} has been deprecated. Please use {{md-loader}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-modal.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeModal from './md-modal'; export default MaterializeModal.extend({ init() { this._super(...arguments); deprecate('{{materialize-modal}} has been deprecated. Please use {{md-modal}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-navbar.js ================================================ import { deprecate } from '@ember/application/deprecations'; import MaterializeNavBar from './md-navbar'; export default MaterializeNavBar.extend({ init() { this._super(...arguments); deprecate('{{materialize-navbar}} has been deprecated. Please use {{md-navbar}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-pagination.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializePagination from './md-pagination'; export default materializePagination.extend({ init() { this._super(...arguments); deprecate('{{materialize-pagination}} has been deprecated. Please use {{md-pagination}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-parallax.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeParallax from './md-parallax'; export default materializeParallax.extend({ init() { this._super(...arguments); deprecate('{{materialize-parallax}} has been deprecated. Please use {{md-parallax}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-radio.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeRadio from './md-radio'; export default materializeRadio.extend({ init() { this._super(...arguments); deprecate('{{materialize-radio}} has been deprecated. Please use {{md-radio}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-radios.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeRadios from './md-radios'; export default materializeRadios.extend({ init() { this._super(...arguments); deprecate('{{materialize-radios}} has been deprecated. Please use {{md-radios}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-range.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeRange from './md-range'; export default materializeRange.extend({ init() { this._super(...arguments); deprecate('{{materialize-range}} has been deprecated. Please use {{md-range}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-select.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeSelect from './md-select'; export default materializeSelect.extend({ init() { this._super(...arguments); deprecate('{{materialize-select}} has been deprecated. Please use {{md-select}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-switch.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeSwitch from './md-switch'; export default materializeSwitch.extend({ init() { this._super(...arguments); deprecate('{{materialize-switch}} has been deprecated. Please use {{md-switch}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-switches.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeSwitches from './md-switches'; export default materializeSwitches.extend({ init() { this._super(...arguments); deprecate('{{materialize-switches}} has been deprecated. Please use {{md-switches}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-tabs-tab.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeTabsTab from './md-tab'; export default materializeTabsTab.extend({ init() { this._super(...arguments); deprecate('{{materialize-tabs-tab}} has been deprecated. Please use {{md-tab}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-tabs.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeTabs from './md-tabs'; export default materializeTabs.extend({ init() { this._super(...arguments); deprecate('{{materialize-tabs}} has been deprecated. Please use {{md-tabs}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/materialize-textarea.js ================================================ import { deprecate } from '@ember/application/deprecations'; import materializeTextarea from './md-textarea'; export default materializeTextarea.extend({ init() { this._super(...arguments); deprecate('{{materialize-textarea}} has been deprecated. Please use {{md-textarea}} instead', false, { url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }); } }); ================================================ FILE: app/components/md-badge.js ================================================ import materializeBadge from 'ember-cli-materialize/components/md-badge'; export default materializeBadge; ================================================ FILE: app/components/md-btn-dropdown.js ================================================ import MaterializeButtonDropdown from 'ember-cli-materialize/components/md-btn-dropdown'; export default MaterializeButtonDropdown; ================================================ FILE: app/components/md-btn-submit.js ================================================ import MaterializeButtonSubmit from 'ember-cli-materialize/components/md-btn-submit'; export default MaterializeButtonSubmit; ================================================ FILE: app/components/md-btn.js ================================================ import MaterializeButton from 'ember-cli-materialize/components/md-btn'; export default MaterializeButton; ================================================ FILE: app/components/md-card-action.js ================================================ import MaterializeCardAction from 'ember-cli-materialize/components/md-card-action'; export default MaterializeCardAction; ================================================ FILE: app/components/md-card-collapsible.js ================================================ import MaterializeCollapsibleCard from 'ember-cli-materialize/components/md-card-collapsible'; export default MaterializeCollapsibleCard; ================================================ FILE: app/components/md-card-content.js ================================================ import MaterializeCardContent from 'ember-cli-materialize/components/md-card-content'; export default MaterializeCardContent; ================================================ FILE: app/components/md-card-panel.js ================================================ import MaterializeCardPanel from 'ember-cli-materialize/components/md-card-panel'; export default MaterializeCardPanel; ================================================ FILE: app/components/md-card-reveal.js ================================================ import MaterializeCardReveal from 'ember-cli-materialize/components/md-card-reveal'; export default MaterializeCardReveal; ================================================ FILE: app/components/md-card.js ================================================ import MaterializeCard from 'ember-cli-materialize/components/md-card'; export default MaterializeCard; ================================================ FILE: app/components/md-check.js ================================================ import materializeCheckbox from 'ember-cli-materialize/components/md-check'; export default materializeCheckbox; ================================================ FILE: app/components/md-checks-check.js ================================================ export { default } from 'ember-cli-materialize/components/md-checks-check'; ================================================ FILE: app/components/md-checks.js ================================================ import materializeCheckboxes from 'ember-cli-materialize/components/md-checks'; export default materializeCheckboxes; ================================================ FILE: app/components/md-collapsible.js ================================================ import MaterializeCollapsible from 'ember-cli-materialize/components/md-collapsible'; export default MaterializeCollapsible; ================================================ FILE: app/components/md-collection.js ================================================ export { default } from 'ember-cli-materialize/components/md-collection'; ================================================ FILE: app/components/md-copyright.js ================================================ import materializeCopyright from 'ember-cli-materialize/components/md-copyright'; export default materializeCopyright; ================================================ FILE: app/components/md-default-collection-header.js ================================================ export { default } from 'ember-cli-materialize/components/md-default-collection-header'; ================================================ FILE: app/components/md-default-column-header.js ================================================ export { default } from 'ember-cli-materialize/components/md-default-column-header'; ================================================ FILE: app/components/md-fixed-btn.js ================================================ export { default } from 'ember-cli-materialize/components/md-fixed-btn'; ================================================ FILE: app/components/md-fixed-btns.js ================================================ export { default } from 'ember-cli-materialize/components/md-fixed-btns'; ================================================ FILE: app/components/md-input-date.js ================================================ import materializeDateInput from 'ember-cli-materialize/components/md-input-date'; export default materializeDateInput; ================================================ FILE: app/components/md-input-field.js ================================================ import materializeInputField from 'ember-cli-materialize/components/md-input-field'; export default materializeInputField; ================================================ FILE: app/components/md-input.js ================================================ import materializeInput from 'ember-cli-materialize/components/md-input'; export default materializeInput; ================================================ FILE: app/components/md-loader.js ================================================ import materializeLoader from 'ember-cli-materialize/components/md-loader'; export default materializeLoader; ================================================ FILE: app/components/md-modal-container.js ================================================ import mdModalContainer from 'ember-cli-materialize/components/md-modal-container'; export default mdModalContainer; ================================================ FILE: app/components/md-modal.js ================================================ import materializeModal from 'ember-cli-materialize/components/md-modal'; export default materializeModal; ================================================ FILE: app/components/md-navbar.js ================================================ import MaterializeNavBar from 'ember-cli-materialize/components/md-navbar'; export default MaterializeNavBar; ================================================ FILE: app/components/md-pagination.js ================================================ import materializePagination from 'ember-cli-materialize/components/md-pagination'; export default materializePagination; ================================================ FILE: app/components/md-parallax.js ================================================ import materializeParallax from 'ember-cli-materialize/components/md-parallax'; export default materializeParallax; ================================================ FILE: app/components/md-radio.js ================================================ import materializeRadio from 'ember-cli-materialize/components/md-radio'; export default materializeRadio; ================================================ FILE: app/components/md-radios-radio.js ================================================ export { default } from 'ember-cli-materialize/components/md-radios-radio'; ================================================ FILE: app/components/md-radios.js ================================================ import materializeRadios from 'ember-cli-materialize/components/md-radios'; export default materializeRadios; ================================================ FILE: app/components/md-range.js ================================================ import materializeRange from 'ember-cli-materialize/components/md-range'; export default materializeRange; ================================================ FILE: app/components/md-select.js ================================================ import materializeSelect from 'ember-cli-materialize/components/md-select'; export default materializeSelect; ================================================ FILE: app/components/md-switch.js ================================================ import materializeSwitch from 'ember-cli-materialize/components/md-switch'; export default materializeSwitch; ================================================ FILE: app/components/md-switches-switch.js ================================================ export { default } from 'ember-cli-materialize/components/md-switches-switch'; ================================================ FILE: app/components/md-switches.js ================================================ import materializeSwitches from 'ember-cli-materialize/components/md-switches'; export default materializeSwitches; ================================================ FILE: app/components/md-tab.js ================================================ import materializeTabsTab from 'ember-cli-materialize/components/md-tab'; export default materializeTabsTab; ================================================ FILE: app/components/md-table-col.js ================================================ export { default } from 'ember-cli-materialize/components/md-table-col'; ================================================ FILE: app/components/md-table.js ================================================ export { default } from 'ember-cli-materialize/components/md-table'; ================================================ FILE: app/components/md-tabs.js ================================================ import materializeTabs from 'ember-cli-materialize/components/md-tabs'; export default materializeTabs; ================================================ FILE: app/components/md-textarea.js ================================================ import materializeTextarea from 'ember-cli-materialize/components/md-textarea'; export default materializeTextarea; ================================================ FILE: app/helpers/bw-compat-icon.js ================================================ export { default, bwCompatIcon } from 'ember-cli-materialize/helpers/bw-compat-icon'; ================================================ FILE: app/initializers/add-modals-container.js ================================================ export function initialize() { const application = arguments[1] || arguments[0]; var rootEl = document.querySelector(application.rootElement); var modalContainerEl = document.createElement('div'); var emberModalDialog = application.emberModalDialog || {}; var modalContainerElId = emberModalDialog.modalRootElementId || 'modal-overlays'; modalContainerEl.id = modalContainerElId; rootEl.appendChild(modalContainerEl); application.register('config:modals-container-id', modalContainerElId, { instantiate: false }); application.inject('component:materialize-modal', 'destinationElementId', 'config:modals-container-id'); } export default { name: 'add-modals-container', initialize: initialize }; ================================================ FILE: app/initializers/md-settings.js ================================================ import config from '../config/environment'; import MaterializeSettings from 'ember-cli-materialize/services/md-settings'; export function initialize() { const { materializeDefaults } = config; const application = arguments[1] || arguments[0]; if (window && window.validate_field) { window.validate_field = function() {}; } application.register('config:materialize', materializeDefaults, { instantiate: false }); application.register('service:materialize-settings', MaterializeSettings); application.inject('service:materialize-settings', 'materializeDefaults', 'config:materialize'); } export default { name: 'md-settings', initialize: initialize }; ================================================ FILE: app/services/md-settings.js ================================================ export { default } from 'ember-cli-materialize/services/md-settings'; ================================================ FILE: app/styles/app.scss ================================================ // Fix for Roboto font path $roboto-font-path: '../assets/'; // Materialize styles @import "materialize"; ================================================ FILE: app/styles/ember-cli-materialize.scss ================================================ .ember-modal-overlay { height: 100vh; left: 0; opacity: 0; position: fixed; right: 0; top: 0; z-index: 50; } .ember-modal-dialog { z-index: 50; position: fixed; &.ember-modal-dialog-in-place { position: relative; } } .lean-modal { background-color: rgba(0, 0, 0, 0.5); opacity: 1.0; z-index: 10001; } ================================================ FILE: app.json ================================================ { "name": "ember-cli-materialize", "description": "Documentation for ember-cli-materialize", "scripts": { }, "env": { }, "formation": { "web": { "quantity": 1 } }, "addons": [ ], "buildpacks": [ { "url": "https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/emberjs.tgz" } ] } ================================================ FILE: blueprints/.jshintrc ================================================ { "predef": [ "console" ] } ================================================ FILE: blueprints/ember-cli-materialize/index.js ================================================ /* eslint-env node */ module.exports = { normalizeEntityName: function() {}, beforeInstall: function() { return this.addAddonsToProject({ packages: [ { name: 'ember-composability', target: '~0.3.7' }, { name: 'ember-radio-button', target: '1.0.7' }, { name: 'ember-keyboard', target: '3.0.0' }, { name: 'ember-truth-helpers', target: '1.2.0' }, { name: 'ember-modal-dialog', target: '~0.8.0' }, { name: 'ember-materialize-shim', target: '~0.2.0' } ] }); } }; ================================================ FILE: bower.json ================================================ { "name": "ember-cli-materialize", "dependencies": { "materialize": "~0.98.0" } } ================================================ FILE: config/ember-try.js ================================================ /* eslint-env node */ 'use strict'; const getChannelURL = require('ember-source-channel-url'); function scenario(emberVersion) { return { name: 'ember-' + emberVersion, bower: { dependencies: { ember: '~' + emberVersion + '.0' }, resolutions: { ember: '~' + emberVersion + '.0' } } }; } module.exports = function() { return Promise.all([getChannelURL('release'), getChannelURL('beta'), getChannelURL('canary')]).then(urls => { return { useYarn: true, scenarios: [ scenario('1.13'), { name: 'ember-lts-2.16', env: { EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }) }, npm: { devDependencies: { '@ember/jquery': '^0.5.1', 'ember-source': '~2.16.0' } } }, { name: 'ember-lts-2.18', env: { EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }) }, npm: { devDependencies: { '@ember/jquery': '^0.5.1', 'ember-source': '~2.18.0' } } }, { name: 'ember-release', npm: { devDependencies: { 'ember-source': urls[0] } } }, { name: 'ember-beta', npm: { devDependencies: { 'ember-source': urls[1] } } }, { name: 'ember-canary', npm: { devDependencies: { 'ember-source': urls[2] } } }, { name: 'ember-default', npm: { devDependencies: {} } }, { name: 'ember-default-with-jquery', env: { EMBER_OPTIONAL_FEATURES: JSON.stringify({ 'jquery-integration': true }) }, npm: { devDependencies: { '@ember/jquery': '^0.5.1' } } } ] }; }); }; ================================================ FILE: config/environment.js ================================================ 'use strict'; module.exports = function(/* environment, appConfig */) { return { materializeDefaults: { modalIsFooterFixed: false, modalContainerId: 'materialize-modal-root-element', buttonIconPosition: 'left', loaderSize: 'big', loaderMode: 'indeterminate', dropdownInDuration: 300, dropdownOutDuration: 300 } }; }; ================================================ FILE: config/release.js ================================================ /* jshint node:true */ // var RSVP = require('rsvp'); // For details on each option run `ember help release` module.exports = { // local: true, // remote: 'some_remote', // annotation: "Release %@", // message: "Bumped version to %@", // manifest: [ 'package.json', 'bower.json', 'someconfig.json' ], // publish: true, // strategy: 'date', // format: 'YYYY-MM-DD', // timezone: 'America/Los_Angeles', // // beforeCommit: function(project, versions) { // return new RSVP.Promise(function(resolve, reject) { // // Do custom things here... // }); // } }; ================================================ FILE: ember-cli-build.js ================================================ 'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { let app = new EmberAddon(defaults, { sassOptions: { includePaths: ['bower_components/materialize/sass'] } }); app.options.snippetPaths = ['tests/dummy/app/templates/snippets']; app.options.snippetSearchPaths = ['tests/dummy', 'app', 'addon']; /* This build file specifes the options for the dummy test app of this addon, located in `/tests/dummy` This build file does *not* influence how the addon or the app using it behave. You most likely want to be modifying `./index.js` or app's build file */ app.import('vendor/highlight.pack.js', { exports: ['highlight.js'] }); return app.toTree(); }; ================================================ FILE: index.js ================================================ 'use strict'; module.exports = { name: 'ember-cli-materialize' }; ================================================ FILE: jsconfig.json ================================================ {"compilerOptions":{"target":"es6","experimentalDecorators":true},"exclude":["node_modules","bower_components","tmp","vendor",".git","dist"]} ================================================ FILE: lib/try-generate-pages.sh ================================================ #!/bin/bash echo "Attempting to generate pages" if [[ "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" == 'master' && "${EMBER_TRY_SCENARIO}" == 'ember-1.12' ]]; then ember github-pages:commit --message "New release" --branch "${GH_DEST_BRANCH}" git push deploy gh-pages 2>&1 >/dev/null else echo "Not a main build -- no deploy" fi ================================================ FILE: package.json ================================================ { "name": "ember-cli-materialize", "description": "An ember-cli addon for using Materialize (CSS Framework based on Material Design) in Ember applications.", "version": "0.0.0-development", "directories": { "doc": "doc", "test": "tests" }, "scripts": { "build": "ember build", "lint:js": "eslint .", "start": "ember serve", "test": "ember try:each", "semantic-release": "semantic-release" }, "repository": { "type": "git", "url": "https://github.com/mike-north/ember-cli-materialize.git" }, "bugs": { "url": "https://github.com/mike-north/ember-cli-materialize/issues" }, "engines": { "node": "^4.5 || 6.* || >= 7.*" }, "author": "Mike North (http://mike.works)", "contributors": [ { "name": "Stefan Gasser" } ], "license": "MIT", "devDependencies": { "@commitlint/cli": "7.6.0", "@commitlint/config-conventional": "7.6.0", "@commitlint/travis-cli": "7.6.0", "@ember/optional-features": "0.7.0", "@mike-north/js-lib-renovate-config": "1.1.5", "@mike-north/js-lib-semantic-release-config": "1.0.1", "@types/ember": "3.0.28", "bower": "1.8.13", "broccoli-asset-rev": "3.0.0", "ember-ajax": "5.0.0", "ember-anchor": "1.0.3", "ember-array-helper": "5.1.0", "ember-ci": "0.1.4", "ember-cli": "4.11.0", "ember-cli-app-version": "3.2.0", "ember-cli-dependency-checker": "3.3.1", "ember-cli-eslint": "5.1.0", "ember-cli-htmlbars-inline-precompile": "3.0.2", "ember-cli-inject-live-reload": "2.1.0", "ember-cli-qunit": "4.4.0", "ember-cli-sass": "10.0.1", "ember-cli-shims": "1.2.0", "ember-cli-sri": "2.1.1", "ember-cli-test-loader": "2.2.0", "ember-cli-uglify": "3.0.0", "ember-cli-version-checker": "3.0.1", "ember-code-snippet": "2.4.2", "ember-composability": "1.0.1", "ember-disable-prototype-extensions": "1.1.3", "ember-export-application-global": "2.0.1", "ember-keyboard": "4.0.0", "ember-load-initializers": "2.1.2", "ember-material-design-icons-shim": "0.1.13", "ember-materialize-shim": "0.5.1", "ember-modal-dialog": "3.0.1", "ember-percy": "1.6.0", "ember-radio-button": "2.0.1", "ember-resolver": "8.1.0", "ember-source": "4.11.0", "ember-source-channel-url": "1.2.0", "ember-truth-helpers": "2.1.0", "ember-try": "1.4.0", "eslint-plugin-ember": "10.6.1", "eslint-plugin-node": "11.1.0", "husky": "1.3.1", "loader.js": "4.7.0", "sass": "1.15.3", "semantic-release": "15.12.5" }, "keywords": [ "materialize", "materialize-css", "material-design", "ember-addon" ], "dependencies": { "ember-cli-babel": "^7.1.3", "ember-cli-htmlbars": "^6.0.0", "rsvp": "^4.7.0" }, "ember-addon": { "configPath": "tests/dummy/config", "demoURL": "https://mike.works/ember-cli-materialize" }, "commitlint": { "extends": [ "@commitlint/config-conventional" ] }, "husky": { "hooks": { "commit-msg": "./node_modules/.bin/commitlint -e $HUSKY_GIT_PARAMS" } }, "release": { "extends": "@mike-north/js-lib-semantic-release-config" } } ================================================ FILE: renovate.json ================================================ { "extends": ["@mike-north/js-lib-renovate-config"] } ================================================ FILE: testem.js ================================================ module.exports = { test_page: 'tests/index.html?hidepassed', disable_watching: true, launch_in_ci: [ 'Chrome' ], launch_in_dev: [ 'Chrome' ], browser_args: { Chrome: { ci: [ // --no-sandbox is needed when running Chrome inside a container process.env.CI ? '--no-sandbox' : null, '--headless', '--disable-gpu', '--disable-dev-shm-usage', '--disable-software-rasterizer', '--mute-audio', '--remote-debugging-port=0', '--window-size=1440,900' ].filter(Boolean) } } }; ================================================ FILE: tests/.jshintrc ================================================ { "predef": [ "percySnapshot", "document", "window", "location", "setTimeout", "$", "-Promise", "define", "console", "visit", "exists", "fillIn", "click", "keyEvent", "triggerEvent", "find", "findWithAssert", "wait", "DS", "andThen", "currentURL", "currentPath", "currentRouteName" ], "node": false, "browser": false, "boss": true, "curly": true, "debug": false, "devel": false, "eqeqeq": true, "evil": true, "forin": false, "immed": false, "laxbreak": false, "newcap": true, "noarg": true, "noempty": false, "nonew": false, "nomen": false, "onevar": false, "plusplus": false, "regexp": false, "undef": true, "sub": true, "strict": false, "white": false, "eqnull": true, "esnext": true, "unused": true } ================================================ FILE: tests/acceptance/badges-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Badges'); test('Load the demo page', function(assert) { visit('/badges'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/buttons-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; import $ from 'jquery'; moduleForAcceptance('Acceptance - Buttons'); const BUTTON_HOVER_TIMEOUT = 1000; test('Load the demo page', function(assert) { visit('/buttons'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); test('Floating buttons should be exposed on hover', assert => { visit('/buttons'); andThen(() => { const mainButton = find('.fixed-btns-example > a.btn-floating'); assert.equal( $('.fixed-btns-example ul li:first-child a').css('opacity'), '0', 'Secondary buttons should be hidden before mouseover' ); $(mainButton).mouseover(); }); andThen(() => { const done = assert.async(); setTimeout(() => { assert.ok( parseInt($('.fixed-btns-example ul li:first-child a').css('opacity'), 10) > 0.5, 'Secondary buttons should be shown after mouseover' ); done(); }, BUTTON_HOVER_TIMEOUT); }); }); test('Clicking the first floating button should fire an action', assert => { visit('/buttons'); const done = assert.async(); const oldAlert = window.alert; window.alert = function(alertText) { assert.equal(alertText, 'firstAction', 'firstAction is fired when primary button is clicked'); window.alert = oldAlert; done(); }; click('.fixed-btns-example > a.btn-floating'); }); test('Clicking a secondary floating button should fire a different action, and pass arguments', assert => { visit('/buttons'); const done = assert.async(); const oldAlert = window.alert; andThen(() => { const mainButton = find('.fixed-btns-example > a.btn-floating'); assert.equal( $('.fixed-btns-example ul li:first-child a').css('opacity'), '0', 'Secondary buttons should be hidden before mouseover' ); $(mainButton).mouseover(); }); andThen(() => { setTimeout(() => { window.alert = function(alertText) { assert.equal(alertText, `anotherAction\narg: "1"`, 'firstAction is fired when primary button is clicked'); window.alert = oldAlert; done(); }; click('.fixed-btns-example ul li:first-child a'); }, BUTTON_HOVER_TIMEOUT); }); }); ================================================ FILE: tests/acceptance/cards-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Cards'); function checkCardTitle(cardType, cardId) { test(`${cardType} should have a title`, function(assert) { visit('/cards'); andThen(function() { const titleEle = find(`#${cardId} > .card-content span`); assert.ok(titleEle.hasClass('card-title')); assert.equal( titleEle .children() .remove() .end() .text() .trim(), 'Card Title' ); }); }); } function checkCardContent(cardType, cardId) { test(`${cardType} should have content`, function(assert) { visit('/cards'); andThen(function() { const contentEle = find(`#${cardId} > .card-content`); assert.ok(contentEle.hasClass('card-content')); const expected = `I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively.`; // skip over the span containing the card title and get just the card content text. const actual = contentEle .find('>span') .next() .text() .trim() .replace(/[\s\n]+/g, ' '); assert.equal(actual, expected); }); }); } function checkCardActions(cardType, cardId) { test(`${cardType} should have actions`, function(assert) { visit('/cards'); andThen(function() { const actionEle = find(`#${cardId} > .card-action`); assert.ok(actionEle.hasClass('card-action')); }); }); } const cardFlavors = [ { type: 'Basic Card', id: 'basic-card' }, { type: 'Image Card', id: 'image-card' }, { type: 'Card Reveal', id: 'card-reveal' } ]; for (let i = 0; i < cardFlavors.length; i++) { checkCardTitle(cardFlavors[i].type, cardFlavors[i].id); } checkCardContent(cardFlavors[0].type, cardFlavors[0].id); checkCardContent(cardFlavors[1].type, cardFlavors[1].id); checkCardActions(cardFlavors[0].type, cardFlavors[0].id); checkCardActions(cardFlavors[1].type, cardFlavors[1].id); test('Card Reveal should have content', function(assert) { visit('/cards'); andThen(function() { const contentEle = find('#card-reveal > .card-content'); assert.ok(contentEle.hasClass('card-content')); // skip over the span containing the card title and get just the card content text. const actual = contentEle .find('>span') .next() .text() .trim(); assert.equal(actual, 'This is a Link'); }); }); test('Card Reveal should have content', function(assert) { visit('/cards'); andThen(function() { const contentEle = find('#card-panel > span'); assert.ok(contentEle.hasClass('white-text')); const expected = 'I am a very simple card. I am good at containing small bits of information. ' + 'I am convenient because I require little markup to use effectively. ' + 'I am similar to what is called a panel in other frameworks.'; // skip over the span containing the card title and get just the card content text. const actual = contentEle .text() .trim() .replace(/[\s\n]+/g, ' '); assert.equal(actual, expected); }); }); test('Card Reveal should reveal and conceal content', function(assert) { visit('/cards'); andThen(function() { const doneReveal = assert.async(); const doneConceal = assert.async(); const activatorEle = find('#card-reveal>.card-content>.activator'); const revealEle = find('#card-reveal>.card-reveal'); const concealEle = revealEle.find('>.card-title'); const animationClass = 'velocity-animating'; // click to reveal click(activatorEle).then(function() { // should be animating... assert.ok(revealEle.hasClass(animationClass)); // wait for animation to complete setTimeout(function() { assert.ok(!revealEle.hasClass(animationClass)); doneReveal(); // click to conceal click(concealEle).then(function() { assert.ok(revealEle.hasClass(animationClass)); // wait for animation to complete setTimeout(function() { assert.ok(!revealEle.hasClass(animationClass)); doneConceal(); }, 500); }); }, 500); }); }); }); ================================================ FILE: tests/acceptance/collapsible-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; import $ from 'jquery'; moduleForAcceptance('Acceptance - Collapsible'); test('Collapsible basic tests', function(assert) { visit('/collapsible'); andThen(function() { assert.equal($('.accordion-example ul > li').length, 3, 'Accordion should have 3 headers'); assert.equal($('.expandable-example ul > li').length, 3, 'Expandable should have 3 headers'); assert.equal($('.preselected-example ul >li').length, 3, 'Preselected should have 3 headers'); assert.equal( $('.accordion-example ul > li>.active').length, 0, 'Accordion should not have an active collapsible' ); assert.equal( $('.expandable-example ul > li>.active').length, 0, 'Expandable should not have an active collapsible' ); assert.equal( $('.preselected-example ul > li>.active').length, 1, 'Preselected should have an active collapsible' ); assert.equal($('.action-selection-example ul > li').length, 3, 'Action selection should also have 3 headers'); }); }); test('Action collapsible operations', function(assert) { visit('/collapsible'); andThen(function() { assert.equal($('.selected-action').text(), '', 'there should be no selected action'); }); click('.action-selection-example ul > li:first-child > .collapsible-header'); andThen(function() { assert.equal( $('.selected-action').text(), 'cloud', 'after clicking, we should have the correct selected action' ); assert.equal($('.action-selection-example ul > li > .active').length, 1, 'we should have an activated tab'); }); click('.action-selection-example ul > li:nth-child(2) > .collapsible-header'); andThen(function() { assert.equal($('.selected-action').text(), 'marker', 'clicking another header should fire the action again'); }); }); ================================================ FILE: tests/acceptance/collection-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Collection'); test('Load the demo page', function(assert) { visit('/collection'); andThen(function() { // Basic collection assert.equal(find('.basic-collection-example .collection-item').length, 3, '3 items in basic collection example'); // Links example assert.equal( find('.links-collection-example a.collection-item').length, 3, 'links items in links collection example' ); // Active link assert.equal( find('.links-collection-example a.collection-item.active').text(), 'Gustavo Freng', 'Gus should be active' ); // Simple header on collection assert.equal( find('.simple-header-collection-example .collection-item').length, 3, '3 items in basic collection example' ); assert.equal( find('.simple-header-collection-example .collection-header').text(), 'People to Watch', 'Header content is correct' ); assert.equal(find('.simple-header-collection-example .with-header').length, 1, 'with-header class is present'); // Custom header on collection assert.equal( find('.custom-header-collection-example .collection-item').length, 3, '3 items in basic collection example' ); assert.equal( find('.custom-header-collection-example .collection-header').text(), 'People to Watch', 'Header content is correct' ); assert.equal(find('.custom-header-collection-example .with-header').length, 1, 'with-header class is present'); assert.equal( find('.custom-header-collection-example .collection-header.deep-purple').length, 1, 'Header is customized (deep-purple)' ); }); }); ================================================ FILE: tests/acceptance/copyright-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Copyright'); test('Load the demo page', function(assert) { visit('/copyright'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/forms-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Forms'); test('Load the demo page', assert => { visit('/forms'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/index-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Dummy app index page'); test('Load the demo page', assert => { visit('/'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/loader-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Loader'); test('Load the demo page', assert => { visit('/loader'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/modal-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; import $ from 'jquery'; moduleForAcceptance('Acceptance - Modal'); test('Modal container is installed', assert => { visit('/modal'); andThen(function() { assert.equal($('#materialize-modal-root-element').length, 1, 'Modal container is in body'); }); }); test('Modal opens when button is clicked', assert => { visit('/modal'); andThen(function() { assert.equal($('#materialize-modal-root-element .modal-content').length, 0, 'Modal is not on the screen'); }); click('.open-modal-button'); andThen(function() { assert.equal($('#materialize-modal-root-element .modal-content').length, 1, 'Modal is on the screen'); }); }); test('Modal is dismissed upon hitting "cancel"', assert => { visit('/modal'); andThen(function() { assert.equal($('#materialize-modal-root-element .modal-content').length, 0, 'Modal is not on the screen'); }); click('.open-modal-button'); andThen(function() { assert.equal($('#materialize-modal-root-element .modal-content').length, 1, 'Modal is on the screen'); }); click('#materialize-modal-root-element .modal-footer .cancel-button'); andThen(function() { assert.equal($('#materialize-modal-root-element .modal-content').length, 0, 'Modal is on not the screen'); }); }); test('Modal is dismissed by clicking on background', assert => { visit('/modal'); andThen(function() { assert.equal($('.ember-modal-wrapper .modal-content').length, 0, 'Modal is not on the screen'); }); click('.test-modal-button'); andThen(function() { assert.equal($('.ember-modal-wrapper .modal-content').length, 1, 'Modal is on the screen'); }); click('.ember-modal-wrapper'); }); ================================================ FILE: tests/acceptance/navbar-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; import $ from 'jquery'; moduleForAcceptance('Acceptance - Navbar'); test('Load the demo page', assert => { visit('/navbar'); andThen(() => { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); assert.equal($('.navbar-example nav').length, 1, 'Navbar is in the DOM'); assert.equal($('.navbar-example nav .brand-logo').text(), 'Example', 'name is rendered in .brand-info'); }); }); test('SideNav', assert => { visit('/navbar'); let done = assert.async(); andThen(() => { assert.equal(find('.navbar-example nav .button-collapse').length, 1, 'Navbar collapse button is in the DOM'); click('.navbar-example nav .button-collapse'); }); andThen(() => { setTimeout(() => { assert.ok( $('.navbar-example .side-nav') .attr('style') .indexOf('translateX(0px)') > 0, 'TranslateX is 0' ); assert.equal($('.navbar-example .side-nav').css('left'), '0px', 'SideNav is open'); setTimeout(() => { $('#sidenav-overlay').click(); setTimeout(() => { assert.ok( $('.navbar-example .side-nav') .attr('style') .indexOf('translateX(-100%)') > 0, 'TranslateX > 0' ); done(); }, 1200); }, 1200); }, 1200); }); }); test('Navbar Custom Home Route', assert => { visit('/navbar'); click('.navbar-custom-home a.brand-logo'); andThen(() => { assert.equal('/navbar', currentURL(), 'Navbar can have a custom home route'); }); }); ================================================ FILE: tests/acceptance/pagination-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Pagination'); test('Load the demo page', assert => { visit('/pagination'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/parallax-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Parallax'); test('Load the demo page', assert => { visit('/parallax'); andThen(function() { assert.ok(true, 'If this is passing, this page has no deprecation warnings'); }); }); ================================================ FILE: tests/acceptance/table-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Table'); test('Load the demo page', assert => { visit('/tables'); andThen(function() { assert.equal(find('.basic-table table tbody tr').length, 6, 'Three rows (x2 tables) in basic table example'); assert.equal(find('.basic-table table:nth-child(2) tbody tr:first-child td').length, 2, 'Two columns'); assert.equal(find('.custom-cells table td .btn').length, 3, 'Buttons as table cells'); assert.equal(find('.custom-headers table thead th i').length, 2, 'Headers are customized'); }); }); ================================================ FILE: tests/acceptance/tabs-test.js ================================================ import { test } from 'qunit'; import moduleForAcceptance from '../../tests/helpers/module-for-acceptance'; moduleForAcceptance('Acceptance - Tabs'); test('Basic Example - One set of tabs should be rendered, with three tabs', function(assert) { visit('/tabs').then(function() { assert.equal(find('.basic-tabs-example .materialize-tabs').length, 1, 'One set of tabs'); assert.equal( find('.basic-tabs-example .materialize-tabs .materialize-tabs-tab a').length, 3, 'Three tabs in the set' ); assert.equal( find('.basic-tabs-example .materialize-tabs .materialize-tabs-tab:first-child a') .text() .trim(), 'First', 'Label of first tab is "First"' ); assert.equal( find('.basic-tabs-example .materialize-tabs .materialize-tabs-tab:nth-child(2) a') .text() .trim(), 'Second', 'Label of second tab is "Second"' ); assert.equal( find('.basic-tabs-example .materialize-tabs .materialize-tabs-tab:nth-child(3) a') .text() .trim(), 'Third', 'Label of third tab is "Third"' ); assert.equal( find('.basic-tabs-example .materialize-tabs .materialize-tabs-tab:first-child .active').length, 1, 'First tab is initially selected' ); }); }); ================================================ FILE: tests/blanket-options.js ================================================ /* globals blanket, module */ var options = { modulePrefix: 'ember-cli-materialize', filter: '//.*ember-cli-materialize/.*/', antifilter: '//.*(tests|template).*/', enableCoverage: true, loaderExclusions: ['highlight.js'], cliOptions: { reporters: ['lcov'], autostart: true } }; if (typeof exports === 'undefined') { blanket.options(options); } else { module.exports = options; } ================================================ FILE: tests/dummy/app/app.js ================================================ import Application from '@ember/application'; import Resolver from './resolver'; import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; const App = Application.extend({ modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix, Resolver }); loadInitializers(App, config.modulePrefix); export default App; ================================================ FILE: tests/dummy/app/components/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/components/demo-nav.js ================================================ import Component from '@ember/component'; export default Component.extend({ classNames: ['navbar-fixed'], didInsertElement() { this._super(...arguments); this.$('.demo-button-collapse').sideNav(); } }); ================================================ FILE: tests/dummy/app/components/example-snippet.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; import { empty } from '@ember/object/computed'; export default Component.extend({ emptySnippet: empty('snippet'), exampleFrameClass: 'col s12 position-relative', partialName: computed('snippet', { get() { return `snippets/${this.get('snippet') || 'none'}`; } }), snippetName: computed('snippet', { get() { return `${this.get('snippet') || 'none'}.hbs`; } }), send() { let target = this.get('targetObject'); target.send(...arguments); } }); ================================================ FILE: tests/dummy/app/components/my-column-header.js ================================================ import layout from '../templates/snippets/my-column-header'; // BEGIN-SNIPPET my-column-header import DefaultHeader from 'ember-cli-materialize/components/md-default-column-header'; export default DefaultHeader.extend({ layout }); // END-SNIPPET ================================================ FILE: tests/dummy/app/components/my-custom-header.js ================================================ // BEGIN-SNIPPET custom-collection-header import DefaultCollectionHeader from 'ember-cli-materialize/components/md-default-collection-header'; import layout from '../templates/snippets/my-custom-header'; export default DefaultCollectionHeader.extend({ layout, classNames: ['deep-purple'] }); // END-SNIPPET ================================================ FILE: tests/dummy/app/components/options-panel.js ================================================ import Component from '@ember/component'; import { computed } from '@ember/object'; export default Component.extend({ componentName: '', header: computed('componentName', { get() { return `${this.get('componentName')} component options are:`; } }) }); ================================================ FILE: tests/dummy/app/config/environment.d.ts ================================================ /* tslint:disable */ export default config; declare namespace config { const APP: { [k: string]: any; }; const environment: any; const modulePrefix: string; const podModulePrefix: string; const locationType: string; const rootURL: string; } ================================================ FILE: tests/dummy/app/controllers/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/controllers/application.js ================================================ import { A } from '@ember/array'; import Controller from '@ember/controller'; export default Controller.extend({ // eslint-disable-next-line demoSections: new A([ { name: 'Badges', route: 'badges' }, { name: 'Buttons', route: 'buttons' }, { name: 'Cards', route: 'cards' }, { name: 'Collapsible', route: 'collapsible' }, { name: 'Collection', route: 'collection' }, { name: 'Colors', route: 'colors', new: true }, { name: 'Copyright', route: 'copyright' }, { name: 'Forms', route: 'forms' }, { name: 'Loader', route: 'loader' }, { name: 'Modal', route: 'modal' }, { name: 'Navbar', route: 'navbar' }, { name: 'Pagination', route: 'pagination' }, { name: 'Parallax', route: 'parallax' }, { name: 'Tables', route: 'tables' }, { name: 'Tabs', route: 'tabs' } ]) }); ================================================ FILE: tests/dummy/app/controllers/buttons.js ================================================ import Controller from '@ember/controller'; import { A } from '@ember/array'; export default Controller.extend({ // eslint-disable-next-line myData: new A(['hello', 'world']), actions: { debug() { window.alert('clicked!'); }, firstAction() { window.alert('firstAction'); }, anotherAction(arg) { window.alert(`anotherAction\narg: ${JSON.stringify(arg)}`); } } }); ================================================ FILE: tests/dummy/app/controllers/collapsible.js ================================================ import Controller from '@ember/controller'; export default Controller.extend({ lastClicked: null, actions: { clicked(tabModel) { this.set('lastClicked', tabModel); if (tabModel === this.get('activeSlide')) { this.set('activeSlide', null); } else { this.set('activeSlide', tabModel); } } } }); ================================================ FILE: tests/dummy/app/controllers/collection.js ================================================ import Controller from '@ember/controller'; export default Controller.extend({}); ================================================ FILE: tests/dummy/app/controllers/colors.js ================================================ import { A } from '@ember/array'; import Controller from '@ember/controller'; import { computed } from '@ember/object'; import AnchorControllerSupport from 'ember-anchor/mixins/controller-support'; export default Controller.extend(AnchorControllerSupport, { //eslint-disable-next-line colorBases: new A([ 'pink', 'red', 'deep-orange', 'orange', 'amber', 'yellow', 'light-green', 'green', 'teal', 'cyan', 'light-blue', 'blue', 'indigo', 'purple', 'deep-purple' ]), //eslint-disable-next-line boringColorBases: new A(['brown', 'grey', 'blue-grey']), //eslint-disable-next-line colorVariants: new A([ 'lighten-5', 'lighten-4', 'lighten-3', 'lighten-2', 'lighten-1', '', 'darken-1', 'darken-2', 'darken-3', 'darken-4' ]), //eslint-disable-next-line accentColorVariants: new A(['accent-1', 'accent-2', 'accent-3', 'accent-4']), colors: computed('colorBases.[]', 'colorVariants.[]', function() { return new A( this.get('colorBases').map(colorBase => { let variants = this.get('colorVariants'); if (['brown', 'grey', 'blue-grey'].indexOf(colorBase) < 0) { variants = variants.concat(this.get('accentColorVariants')); } return { base: colorBase, variants: new A(variants) }; }) ); }), boringColors: computed('boringColorBases.[]', 'colorVariants.[]', function() { return new A( this.get('boringColorBases').map(colorBase => { let variants = this.get('colorVariants'); if (['brown', 'grey', 'blue-grey'].indexOf(colorBase) < 0) { variants = variants.concat(this.get('accentColorVariants')); } return { base: colorBase, variants: new A(variants) }; }) ); }) }); ================================================ FILE: tests/dummy/app/controllers/forms.js ================================================ // @ts-check import Controller from '@ember/controller'; import { A } from '@ember/array'; import { computed, observer } from '@ember/object'; import { isPresent } from '@ember/utils'; import { not } from '@ember/object/computed'; import { later } from '@ember/runloop'; function asJSON(propKey) { return computed(`${propKey},${propKey}.[]`, function() { return JSON.stringify(this.get(propKey)); }); } export default Controller.extend({ //eslint-disable-next-line frameworks: new A([ { id: 1, value: 'Materialize CSS' }, { id: 2, value: 'Ember-CLI Materialize' } ]), message: `This is a long message. It might flow to the next line if I keep typing, so it's better suited to a textarea`, //eslint-disable-next-line errors: { name: A([]), framework: A([]) }, // BEGIN-SNIPPET form-validation-basic nameDidChange: observer('model.name', function() { let messages = []; if (!isPresent(this.get('model.name'))) { messages = ['This field is required']; } this.get('errors.name').setObjects(messages); }), // END-SNIPPET frameworkDidChange: observer('framework', function() { let self = this; later(() => { let messages = []; if (!isPresent(self.get('framework'))) { messages = ['This field is required']; } this.get('errors.framework').setObjects(messages); }, 100); }), dateValue: '15 January, 1974', ageFromDate: computed('dateValue', function() { let d = new Date(this.get('dateValue')); return new Date().getFullYear() - d.getFullYear(); }), rangeValue: 64, switchValue1: true, notSwitchValue: not('switchValue'), switchValue: true, checkValueOne: false, checkValueTwo: true, checkboxIsSelected: false, radioIsSelected: false, radioSelection: 2, otherRadioSelection: 'green', //eslint-disable-next-line radioChoices: new A([ { id: 1, text: 'One' }, { id: 2, text: 'Two' } ]), radioSelectionString: asJSON('radioSelection'), radioChoicesString: asJSON('radioChoices'), //eslint-disable-next-line checkboxSelections: new A([3, 4]), //eslint-disable-next-line checkboxChoices: new A([ { id: 3, label: 'Three' }, { id: 4, label: 'Four' }, { id: 5, label: 'Five' } ]), switchesChoicesString: asJSON('switchesChoices'), //eslint-disable-next-line switchesChoices: new A([ { key: 6, name: 'Six' }, { key: 7, name: 'Seven' }, { key: 8, name: 'Eight' } ]), //eslint-disable-next-line switchesSelections: new A([7]), switchesSelection: 7, switchesSelectionString: asJSON('switchesSelection'), switchesSelectionsString: asJSON('switchesSelections'), checkboxChoicesString: asJSON('checkboxChoices'), checkboxSelectionsString: asJSON('checkboxSelections') }); ================================================ FILE: tests/dummy/app/controllers/loader.js ================================================ import Controller from '@ember/controller'; export default Controller.extend({ percent: 70 }); ================================================ FILE: tests/dummy/app/controllers/modal.js ================================================ import Controller from '@ember/controller'; export default Controller.extend({ modalIsOpen: false, isOpen: false, actions: { openModal() { this.set('modalIsOpen', true); }, closeModal() { this.set('modalIsOpen', false); }, agree() { window.alert('Thanks for using ember-cli-materialize!'); this.set('modalIsOpen', false); } } }); ================================================ FILE: tests/dummy/app/controllers/pagination.js ================================================ // BEGIN-SNIPPET pagination-controller import Controller from '@ember/controller'; export default Controller.extend({ queryParams: ['page'], page: 3 }); // END-SNIPPET ================================================ FILE: tests/dummy/app/controllers/tabs.js ================================================ import Controller from '@ember/controller'; import { A } from '@ember/array'; export default Controller.extend({ //eslint-disable-next-line basicTabsContent: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]), //eslint-disable-next-line alternateTabsContent: new A([ { key: 'a', label: 'First' }, { key: 'b', label: 'Second' }, { key: 'c', label: 'Third' } ]), basicTabsSelection: 'a', secondTabsSelection: 'g', actions: { addTab() { this.get('basicTabsContent').addObject({ id: 'd', title: 'Fourth' }); } } }); ================================================ FILE: tests/dummy/app/helpers/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/index.html ================================================ ember-cli-materialize {{content-for "head"}} {{content-for "head-footer"}} {{content-for "body"}} {{content-for "body-footer"}} ================================================ FILE: tests/dummy/app/models/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/resolver.js ================================================ import Resolver from 'ember-resolver'; export default Resolver; ================================================ FILE: tests/dummy/app/router.js ================================================ import EmberRouter from '@ember/routing/router'; import config from './config/environment'; const Router = EmberRouter.extend({ location: config.locationType, rootURL: config.rootURL }); Router.map(function() { this.route('badges'); this.route('buttons'); this.route('cards'); this.route('collapsible'); this.route('collection'); this.route('copyright'); this.route('forms'); this.route('loader'); this.route('modal'); this.route('navbar'); this.route('pagination'); this.route('parallax'); this.route('tables'); this.route('tabs'); this.route('colors'); }); export default Router; ================================================ FILE: tests/dummy/app/routes/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/routes/buttons.js ================================================ import Route from '@ember/routing/route'; export default Route.extend({ actions: { debug() { // eslint-disable-next-line console.debug('Action debug sent'); } } }); ================================================ FILE: tests/dummy/app/routes/collection.js ================================================ import { A } from '@ember/array'; import Route from '@ember/routing/route'; export default Route.extend({ model() { // BEGIN-SNIPPET collection-route let content = A([ { id: 'white', name: 'Walter White', route: 'tabs' }, { id: 'pinkman', name: 'Jesse Pinkman', route: 'modal' }, { id: 'freng', name: 'Gustavo Freng', route: 'collection' } ]); // END-SNIPPET return content; } }); ================================================ FILE: tests/dummy/app/routes/forms.js ================================================ import EObj from '@ember/object'; import Route from '@ember/routing/route'; import { A } from '@ember/array'; // jscs:enable disallowDirectPropertyAccess export default Route.extend({ model() { return EObj.create({ name: null }); }, setupController(controller, model) { this._super(controller, model); controller.set('errors', EObj.create({ name: A(['This field is required']) })); } }); ================================================ FILE: tests/dummy/app/routes/tables.js ================================================ import Route from '@ember/routing/route'; import { A } from '@ember/array'; export default Route.extend({ model() { // BEGIN-SNIPPET table-route let content = new A([ { id: 'white', name: 'Walter White', route: 'tabs' }, { id: 'pinkman', name: 'Jesse Pinkman', route: 'modal' }, { id: 'freng', name: 'Gustavo Freng', route: 'collection' } ]); // END-SNIPPET return content; } }); ================================================ FILE: tests/dummy/app/styles/app.scss ================================================ // Fix for Roboto font path $roboto-font-path: '../assets/'; $button-color: #e51c23; // Materialize styles @import "materialize"; @import 'code'; // ember-cli-materialize styles @import 'ember-cli-materialize'; span.new-badge { padding-right: 15px; padding-left: 10px; margin-right: -20px; } .index-banner { background-color: color('grey', 'lighten-3'); .container { position: relative; .header { color: color('deep-orange', 'base'); } } h4 { margin-bottom: 40px; } a{ color: color('deep-orange', 'base'); } } .github-commit { padding: 14px 0; height: 60px; line-height: 36px; background-color: #5c5757; color: #e6e6e6; font-size: 0.9rem; } a { color: $button-color; } .badge { &.new { color: color('materialize-red', 'base'); background-color: #fff } &.default-value { float: none; position: inherit; } } .intro { font-size: 1.2em; } // /* FIXME: Workaround for https://github.com/Dogfalo/materialize/issues/1079 */ // @each $mdi-icon-name, $mdi-icon-value in $mdi-list-icons { // .#{$mdi-prefix}#{$mdi-icon-name}:before { // content: "\""+ $mdi-icon-value +"\""; // } // } // Qunit test runner style fixes #qunit-testrunner-toolbar { [type="checkbox"] + label { margin-left: 25px; &:before { left: -20px; } } #qunit-modulefilter { display: inherit; } } nav .brand-logo { white-space: nowrap; padding-left: 20px; } .code-comment { color: #aaa; } .ember-logo { height: 48px; padding-top: 15px; } .top-nav-container { float: right; max-width: calc(100% - 260px); overflow-y: scroll; box-shadow: inset -10px 0 20px rgba(255,255,255,0.7), inset 10px 0 20px rgba(255,255,255,0.7); ul { white-space: nowrap; li { float: none; display: inline-block; } } } .fixed-btns-example { position: relative; display: inline-block; right: 0; bottom: 0; } header, main, footer.demo-footer { padding-left: 240px; } @media only screen and (max-width : 992px) { main, footer.demo-footer, header { padding-left: 0; } } .demo-page-submenu { li:hover, li.active { background-color: color('deep-orange', 'lighten-2'); a { color: white; } } } .navbar-fixed { z-index: 10000; } .option-description { font-size: 0.8rem; margin-left: 40px; } .color-swatch-collection { .color-swatch { &[class*="darken"] { color: white; } height: 40px; line-height: 40px; } } .text-center { text-align: center; } .font-size-18 { font-size: 18px; } .position-relative { position: relative; } ================================================ FILE: tests/dummy/app/styles/code.scss ================================================ /* Code blocks */ pre[class*="language-"] { padding: 1em; margin: .5em 0; overflow: auto; } :not(pre) > code[class*="language-"], pre[class*="language-"] { background: #f5f2f0; } /* Inline code */ :not(pre) > code[class*="language-"] { padding: .1em; border-radius: .3em; } ================================================ FILE: tests/dummy/app/styles/tests.scss ================================================ // Qunit test runner style fixes #qunit-testrunner-toolbar { [type="checkbox"] + label { margin-left: 25px; &:before { left: -20px; } } #qunit-modulefilter { display: inherit; } } ================================================ FILE: tests/dummy/app/templates/application.hbs ================================================
    {{demo-nav}}
      {{#each demoSections as |section|}} {{#link-to section.route activeClass='active' tagName='li'}} {{#link-to section.route}} {{section.name}} {{#if section.new}} {{#md-badge class='deep-orange lighten-1 new-badge right white-text'}}New{{/md-badge}} {{/if}} {{/link-to}} {{/link-to}} {{/each}}
    {{outlet}}
    {{!-- {{md-modal-container}} --}}
    {{#md-copyright text='Copyright Text' startYear=2014}} More Links{{/md-copyright}}
    {{ember-anchor a=myQueryParam}} ================================================ FILE: tests/dummy/app/templates/badges.hbs ================================================ {{example-header title="Badges"}}
    {{#options-panel}} {{component-option optionId="text"}} {{/options-panel}}
    {{example-snippet snippet='badges-simple'}}
    ================================================ FILE: tests/dummy/app/templates/buttons.hbs ================================================ {{example-header title="Buttons"}}
    {{#options-panel}} {{component-option optionId="text"}} {{component-option optionId="action"}} {{component-option optionId="actionArg" description="An object or value to be passed to action handlers when it fires"}} {{component-option optionId="icon"}} {{component-option optionId="iconPosition" default="left"}} {{component-option optionId="buttonType"}} {{component-option optionId="isDisabled" default="false"}} {{/options-panel}}

    Raised

    {{example-snippet targetObject=this snippet='buttons-raised' class="button-example"}}

    Floating

    {{example-snippet targetObject=this snippet='buttons-floating' class="button-example"}}

    Floating Group

    {{example-snippet targetObject=this snippet='buttons-floating-group' class="button-example"}}

    Dropdown

    Add a dropdown list to any button. Note: list items are wrapped in an <ul>-tag by the component.

    {{example-snippet snippet='buttons-dropdown' class="button-example"}} {{#options-panel}} {{component-option optionId="hover" default="false" description="If true, the dropdown will open on hover."}} {{component-option optionId="constrainWidth" default="true" description="If true, constrainWidth to the size of the dropdown activator."}} {{component-option optionId="inDuration" default="300" description="The duration of the transition enter in milliseconds."}} {{component-option optionId="outDuration" default="300" description="The duration of the transition out in milliseconds."}} {{component-option optionId="gutter" default="0" description="This defines the spacing from the aligned edge."}} {{component-option optionId="belowOrigin" default="false" description="If true, the dropdown will show below the activator."}} {{/options-panel}}

    Flat

    {{example-snippet snippet='buttons-flat'}}

    Submit

    {{example-snippet snippet='buttons-submit'}}

    Large

    {{example-snippet snippet='buttons-large'}}

    Disabled

    {{example-snippet snippet='buttons-disabled'}}
    ================================================ FILE: tests/dummy/app/templates/cards.hbs ================================================ {{example-header title="Cards"}}
    {{#options-panel}} {{component-option optionId="title"}} {{component-option optionId="titleClass" default="black-text"}} {{component-option optionId="class"}} {{component-option optionId="image"}} {{component-option optionId="activator"}} {{component-option optionId="bodyClass"}} {{/options-panel}}

    Basic Card

    {{example-snippet snippet='cards-basic' class='card-example' exampleFrameClass="col m8 s12"}}

    Image Card

    {{example-snippet snippet='cards-image' class='card-example' exampleFrameClass="col m6 s12"}}

    Card Reveal

    {{example-snippet snippet='cards-reveal' class='card-example' exampleFrameClass="col m6 s12"}}

    Card Panel

    {{example-snippet snippet='cards-panel' class='card-example' exampleFrameClass="col m8 s12"}}
    ================================================ FILE: tests/dummy/app/templates/collapsible.hbs ================================================ {{example-header title="Collapsible"}}
    {{#options-panel}} {{component-option optionId="title" }} {{component-option optionId="icon" }} {{component-option optionId="accordion" default="true"}} {{component-option optionId="active" }} {{component-option optionId="action" }} {{component-option optionId="model" }} {{/options-panel}}

    Accordion

    {{example-snippet snippet='collapsible-accordion' class='accordion-example'}}

    Expandable

    {{example-snippet snippet='collapsible-expandable' class='expandable-example'}}

    Preselected Section

    {{example-snippet snippet='collapsible-preselected' class='preselected-example'}}

    Action Section

    {{#if lastClicked}}

    Last slide clicked: {{lastClicked}}

    {{/if}} {{example-snippet snippet='collapsible-action' targetObject=this class='action-selection-example'}}
    ================================================ FILE: tests/dummy/app/templates/collection.hbs ================================================ {{example-header title="Collection"}}
    {{#options-panel}} {{component-option optionId="content" required=true description="Iterable collection"}} {{component-option optionId="header" description="Header text"}} {{component-option optionId="headerView" description="Header view (string or view class)"}} {{/options-panel}}

    For the following examples, let's say we have an array like this

    {{code-snippet name='collection-route.js'}}

    Basic Collection

    {{example-snippet snippet='collection-basic' class='basic-collection-example' content=(or content model)}}

    Links

    {{example-snippet snippet='collection-links' class='links-collection-example' content=(or content model)}}

    Simple Collection Header

    {{example-snippet snippet='collection-header' class='simple-header-collection-example' content=(or content model)}}

    Custom Collection Header

    First you need to create a view

    {{code-snippet name='custom-collection-header.js'}}

    And a template for the header view

    {{code-snippet name='my-custom-header.hbs'}}

    You can then pass this view to the collection

    {{example-snippet snippet='collection-header-custom' class='custom-header-collection-example' content=(or content model)}}

    Secondary Content

    {{example-snippet snippet='collection-secondary-content' class='secondary-content-collection-example' content=(or content model)}}

    Avatars

    {{example-snippet snippet='collection-avatars' class='avatars-collection-example' content=(or content model)}}
    ================================================ FILE: tests/dummy/app/templates/colors.hbs ================================================ {{example-header title="Colors"}}

    Use of Colors

    • {{link-to 'Background Colors' 'colors' (query-params anchor='background-colors')}}
    • {{link-to 'Text Colors' 'colors' (query-params anchor='text-colors')}}
    • {{link-to 'Text Colors with Variants' 'colors' (query-params anchor='text-colors-with-variants')}}

    {{!-- colors --}}

    Background Colors

    {{#each colors as |color|}}

    {{color.base}}

    {{#each color.variants as |cv|}}
    <div class="{{color.base}} {{cv}}">
    {{/each}}
    {{/each}}
    {{#each boringColors as |color|}}

    {{color.base}}

    {{#each color.variants as |cv|}}
    <div class="{{color.base}} {{cv}}">
    {{/each}}
    {{/each}}
    {{!-- text colors --}}

    Text Colors

    {{#each colors as |color|}}

    {{color.base}}

    <div class= "{{color.base}}-text">

    {{/each}}
    {{!-- text-color-variants --}}

    Text Colors Using Darken, Lighten, or Accent

    To use darken or lighten in text, just add text-darken-1 or text-lighten-5 to the class.

    {{example-snippet snippet='text-color' class='text-color-example'}}
    ================================================ FILE: tests/dummy/app/templates/components/.gitkeep ================================================ ================================================ FILE: tests/dummy/app/templates/components/component-option.hbs ================================================
  • {{optionId}}, {{#if required}} {{#md-badge class='red darken-2 white-text'}}Required{{/md-badge}} {{else}} {{#md-badge class='grey lighten-2'}}Optional{{/md-badge}} {{/if}} default value {{if default default 'null'}} {{#if description}}

    {{description}}

    {{/if}}
  • ================================================ FILE: tests/dummy/app/templates/components/demo-nav.hbs ================================================ ================================================ FILE: tests/dummy/app/templates/components/example-header.hbs ================================================

    {{title}}

    ================================================ FILE: tests/dummy/app/templates/components/example-snippet.hbs ================================================ {{#if emptySnippet}}
    You must provide a snippet parameter
    {{else}}
    {{partial partialName}}
    {{code-snippet name=snippetName}}
    {{/if}} ================================================ FILE: tests/dummy/app/templates/components/options-panel.hbs ================================================

    {{header}}

    {{content}}
      {{yield}}
    ================================================ FILE: tests/dummy/app/templates/copyright.hbs ================================================ {{example-header title="Copyright"}}
    {{#options-panel}} {{component-option optionId="text"}} {{component-option optionId="startYear"}} {{/options-panel}}

    Copyright

    {{example-snippet snippet='copyright-basic' class='copyright-example'}}
    ================================================ FILE: tests/dummy/app/templates/forms.hbs ================================================ {{example-header title="Forms"}}

    Input

    {{#options-panel header=''}} {{component-option optionId="label"}} {{component-option optionId="icon"}} {{component-option optionId="value"}} {{component-option optionId="type" default="text"}} {{component-option optionId="required" default="false"}} {{component-option optionId="readonly" default="false"}} {{component-option optionId="disabled" default="false"}} {{component-option optionId="maxlength"}} {{component-option optionId="pattern"}} {{component-option optionId="validate" default="false"}} {{component-option optionId="autocomplete"}} {{/options-panel}}
    Basic Input
    {{example-snippet snippet='input-basic' class='input-example'}}
    Input With Icon
    {{example-snippet snippet='input-with-icon' class='input-example'}}
    Typed Inputs
    {{example-snippet snippet='input-types' class='input-example'}}

    Validations

    Validations can be performed using HTML5 browser validation by passing validate=true to the component or you can take advantage of the ember-validations addon w/out additional configuration of the component. The following example simulates ember-validations style validation using an observer on the controller's name property.

    {{example-snippet snippet='form-validation-basic' model=model errors=errors}} {{code-snippet name='form-validation-basic.js'}}

    Text Area

    {{#options-panel header=''}} {{component-option optionId="label" }} {{component-option optionId="icon" }} {{component-option optionId="value" }} {{component-option optionId="name" }} {{component-option optionId="required" default="false"}} {{component-option optionId="readonly" default="false"}} {{component-option optionId="disabled" default="false"}} {{component-option optionId="maxlength" }} {{component-option optionId="validate" default="false"}} {{/options-panel}}
    Basic Textarea
    {{example-snippet snippet='textarea-basic' class='input-example' message=message}}

    Select

    {{#options-panel header=''}} {{component-option optionId="label" }} {{component-option optionId="prompt" }} {{component-option optionId="content" }} {{component-option optionId="value" }} {{component-option optionId="optionValuePath" }} {{component-option optionId="optionLabelPath" }} {{component-option optionId="validate" default="false"}} {{/options-panel}}
    Basic Select
    {{example-snippet snippet='select-basic' class='input-example' framework=framework frameworks=frameworks}}

    Date Input

    {{#options-panel header=''}} {{component-option optionId="label" }} {{component-option optionId="icon" }} {{component-option optionId="value" }} {{component-option optionId="required" }} {{component-option optionId="readonly" }} {{component-option optionId="disabled" }} {{component-option optionId="selectMonths" default="true"}} {{component-option optionId="numberOfYears" default="15"}} {{component-option optionId="min" }} {{component-option optionId="max" }} {{component-option optionId="validate" default="false"}} {{/options-panel}}
    Date Input
    {{example-snippet snippet='input-date-basic' class='input-example' dateValue=dateValue}}

    If you were born on {{dateValue}}, you are about {{ageFromDate}} years old.

    Range Input

    {{#options-panel header=''}} {{component-option optionId="value" default=0}} {{component-option optionId="min" default=0}} {{component-option optionId="max" default=100}} {{component-option optionId="step" default=5}} {{component-option optionId="disabled" default=false}} {{/options-panel}}
    Range Input
    {{example-snippet snippet='input-range-basic' class='input-example' rangeValue=rangeValue}}

    Checkbox

    {{#options-panel header=''}} {{component-option optionId="checked" default="false"}} {{component-option optionId="name" }} {{component-option optionId="disabled" default="false"}} {{/options-panel}}
    Checkbox
    {{example-snippet snippet='input-check-basic' class='checkbox-example' checkboxIsSelected=checkboxIsSelected}}

    Switch

    {{#options-panel header=''}} {{component-option optionId="onLabel" default="On"}} {{component-option optionId="offLabel" default="Off"}} {{component-option optionId="checked" default="false"}} {{component-option optionId="disabled" default="false"}} {{/options-panel}}
    Switch
    {{example-snippet snippet='input-switch-basic' class='switch-example' switchValue=switchValue notSwitchValue=notSwitchValue}}

    Checkbox, Radio button and Switch lists

    {{#options-panel header=''}} {{component-option optionId="selection" default="null"}} {{component-option optionId="content" default="null"}} {{component-option optionId="optionValuePath" default="content"}} {{component-option optionId="optionLabelPath" default="content"}} {{component-option optionId="disabled" default="false"}} {{/options-panel}}
    Multi-Select Switch List

    Selection: {{#each checkboxSelections as |str|}} {{md-badge text=str class="default-value light-blue white-text"}} {{/each}}

    {{example-snippet snippet='input-switch-list' class='checkbox-example' checkboxChoices=checkboxChoices checkboxSelections=checkboxSelections}}
    Single-Select Switch List

    Selection: {{md-badge text=radioSelection class="default-value light-blue white-text"}}

    {{example-snippet snippet='input-switch-list-exclusive' class='checkbox-example' radioSelection=radioSelection}}
    Checkbox List

    Selection: {{#each checkboxSelections as |str|}} {{md-badge text=str class="default-value blue white-text"}} {{/each}}

    {{example-snippet snippet='input-check-list' class='checkbox-example' checkboxChoices=checkboxChoices checkboxSelections=checkboxSelections}}
    Radio List

    Selection: {{md-badge text=radioSelection class="default-value light-blue white-text"}}

    {{example-snippet snippet='input-radio-list' class='checkbox-example' radioSelection=radioSelection}}
    ================================================ FILE: tests/dummy/app/templates/index.hbs ================================================

    Materialize.css

    A CSS Framework based on Material Design made simple, for Ember.js apps.

    Main features

    • Imports Materialize sass (via ember-cli-sass) and fonts into your app.
    • It's a components library for all Materialize components.

    Installation

          
            # install via npm
            $ npm install ember-cli-materialize --save-dev
            # make ember-cli fetch internal dependencies
            $ ember g ember-cli-materialize
          
        
    ================================================ FILE: tests/dummy/app/templates/loader.hbs ================================================ {{example-header title="Loader"}}
    {{#options-panel}} {{component-option optionId="mode" default="indeterminate" description="Loader mode (determinate, indeterminate, circular)"}} {{component-option optionId="percent" default="0" description="Percent progress (determinate loader only)"}} {{component-option optionId="active" default="true" description="Whether the animation should be active or not (indeterminate loaders only)"}} {{component-option optionId="color" description="Circular loader color (null, yellow, blue, green, red). Setting this to null (default) will result in the color rotating"}} {{component-option optionId="size" default="big" description="Circular loader size (small, big)"}} {{/options-panel}}

    Indeterminate Loader

    {{example-snippet snippet='progress-indeterminate' class='loader-example'}}

    Determinate Loader

    {{example-snippet snippet='progress-determinate' class='loader-example' percent=percent}}

    Circular Indeterminate Loader

    {{example-snippet snippet='progress-circular' class='loader-example'}}
    ================================================ FILE: tests/dummy/app/templates/modal.hbs ================================================ {{example-header title="Modal"}}
    {{#options-panel}} {{component-option optionId="close" default="close" description="action called by hitting 'esc' key or clicking on overlay"}} {{component-option optionId="isFooterFixed" default="false" description="toggle to add a fixed footer to your modal"}} {{/options-panel}}

    Modal

    {{#md-btn action='openModal' class="open-modal-button"}}Open modal{{/md-btn}} {{example-snippet snippet='modal-basic' class='modal-example' modalIsOpen=modalIsOpen}}
    {{#if isOpen}} {{#md-modal close=(action (mut isOpen) false) class="test-modal"}} {{/md-modal}} {{else}} {{/if}}
    ================================================ FILE: tests/dummy/app/templates/navbar.hbs ================================================ {{example-header title="Navbar"}}
    {{#options-panel}} {{component-option optionId="name"}} {{/options-panel}}

    Navbar with mobile collapse button

    {{example-snippet snippet='navbar-basic' class='navbar-example'}}

    Navbar with custom homeRoute defined

    {{example-snippet snippet='navbar-custom-home' class='navbar-custom-home'}}
    ================================================ FILE: tests/dummy/app/templates/pagination.hbs ================================================ {{example-header title="Pagination"}}
    {{#options-panel}} {{component-option optionId="min" default=1 required=true}} {{component-option optionId="max" default=1 required=true}} {{component-option optionId="current" default=1 required=true}} {{component-option optionId="range" default=5}} {{/options-panel}}

    Pagination

    {{example-snippet snippet='pagination-basic' class='pagination-example' page=page}} {{code-snippet name='pagination-controller.js'}}
    ================================================ FILE: tests/dummy/app/templates/parallax.hbs ================================================ {{example-header title="Parallax"}}
    {{#options-panel}} {{component-option optionId="image"}} {{/options-panel}}

    Parallax

    {{example-snippet snippet='parallax-basic'}}
    ================================================ FILE: tests/dummy/app/templates/snippets/badges-simple.hbs ================================================
    • 1. Steal Some Underpants {{md-badge class='deep-purple white-text' text="6"}}
    • 2. ??? {{#md-badge class='deep-orange lighten-2 white-text'}} 9 {{/md-badge}}
    • 3. Profit
    ================================================ FILE: tests/dummy/app/templates/snippets/buttons-disabled.hbs ================================================ {{md-btn text='Disabled button' isDisabled=true}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-dropdown.hbs ================================================ {{#md-btn-dropdown text='Button' belowOrigin=true}}
  • one
  • two
  • three
  • {{/md-btn-dropdown}} {{#md-btn-dropdown text="Other Button" icon="material-icons" iconBody="arrow_drop_down" iconPosition="right"}}
  • four
  • five
  • six
  • {{/md-btn-dropdown}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-flat.hbs ================================================ {{md-btn action='debug' text='These' buttonType='flat' class='lime'}} {{#md-btn action='debug' buttonType='flat' class='purple lighten-2 white-text'}} Buttons {{/md-btn}} {{#md-btn action='debug' buttonType='flat' class='yellow black-text' wavesClass='waves-dark'}} Are {{/md-btn}} {{#md-btn action='debug' buttonType='flat' class='pink lighten-2 white-text' wavesClass='waves-dark'}} Flat {{/md-btn}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-floating-group.hbs ================================================ {{#md-fixed-btns class="fixed-btns-example" btnIcon="mdi-content-add" btnClass="btn-large lime darken-2" action="firstAction" actionArgs="0"}} {{md-fixed-btn btnClass="indigo" btnIcon="mdi-action-class" action="anotherAction" actionArgs="1"}} {{md-fixed-btn btnClass="deep-purple" btnIcon="mdi-content-grade" action="anotherAction" actionArgs="abc"}} {{md-fixed-btn btnClass="green" btnIcon="mdi-action-redeem" action="anotherAction" actionArgs=myData}} {{md-fixed-btn btnClass="green" btnIcon="mdi-alert-warning" action="anotherAction"}} {{/md-fixed-btns}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-floating.hbs ================================================ {{md-btn icon='mdi-action-favorite' action='debug' buttonType='floating' class='btn-large'}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-large.hbs ================================================ {{md-btn text='Large button' action='debug' buttonType='large' class='deep-orange darken-2 white-text'}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-raised.hbs ================================================ {{md-btn text='Button' action='debug' class='indigo darken-2'}} {{md-btn text='Button' icon='mdi-action-favorite' action='debug' class='deep-purple darken-3'}} {{md-btn text='Button' icon='mdi-action-favorite' iconPosition='right' action='debug' class='yellow deep-purple-text text-darken-3'}} ================================================ FILE: tests/dummy/app/templates/snippets/buttons-submit.hbs ================================================ {{md-btn-submit icon='mdi-content-send' iconPosition='right' text='Submit'}} ================================================ FILE: tests/dummy/app/templates/snippets/cards-basic.hbs ================================================ {{#md-card title="Card Title" id="basic-card"}} {{#md-card-content}} I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively. {{/md-card-content}} {{#md-card-action}} {{#link-to "cards"}}Link 1{{/link-to}} {{#link-to "cards"}}Link 2{{/link-to}} {{/md-card-action}} {{/md-card}} ================================================ FILE: tests/dummy/app/templates/snippets/cards-image.hbs ================================================ {{#md-card title="Card Title" titleClass="orange-text" image="images/ember.png" id="image-card"}} {{#md-card-content}} I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively. {{/md-card-content}} {{#md-card-action}} {{#link-to "cards"}}Link 1{{/link-to}} {{#link-to "cards"}}Link 2{{/link-to}} {{/md-card-action}} {{/md-card}} ================================================ FILE: tests/dummy/app/templates/snippets/cards-panel.hbs ================================================ {{#md-card-panel class="teal" bodyClass="white-text" id="card-panel"}} I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively. I am similar to what is called a panel in other frameworks. {{/md-card-panel}} ================================================ FILE: tests/dummy/app/templates/snippets/cards-reveal.hbs ================================================ {{#md-card title="Card Title" image="images/ember-cli.png" activator=true id="card-reveal"}} {{#md-card-content}} {{#link-to "cards"}}This is a Link{{/link-to}} {{/md-card-content}} {{#md-card-reveal}} Here is some more information about this product that is only revealed once clicked on. {{/md-card-reveal}} {{/md-card}} ================================================ FILE: tests/dummy/app/templates/snippets/collapsible-accordion.hbs ================================================ {{#md-card-collapsible }} {{#md-collapsible icon="mdi-image-filter-drama" title="One"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-maps-place" title="Two"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-social-whatshot" title="Three"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{/md-card-collapsible}} ================================================ FILE: tests/dummy/app/templates/snippets/collapsible-action.hbs ================================================ {{#md-card-collapsible }} {{#md-collapsible icon="mdi-image-filter-drama" title="One" action="clicked" actionArg='cloud'}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-maps-place" title="Two" action="clicked" actionArg='marker'}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-social-whatshot" title="Three" action="clicked" actionArg='three'}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{/md-card-collapsible}} ================================================ FILE: tests/dummy/app/templates/snippets/collapsible-expandable.hbs ================================================ {{#md-card-collapsible accordion=false}} {{#md-collapsible icon="mdi-image-filter-drama" title="One"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-maps-place" title="Two"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-social-whatshot" title="Three"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{/md-card-collapsible}} ================================================ FILE: tests/dummy/app/templates/snippets/collapsible-preselected.hbs ================================================ {{#md-card-collapsible }} {{#md-collapsible icon="mdi-image-filter-drama" title="One"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-maps-place" title="Two" active=true}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{#md-collapsible icon="mdi-social-whatshot" title="Three"}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. {{/md-collapsible}} {{/md-card-collapsible}} ================================================ FILE: tests/dummy/app/templates/snippets/collection-avatars.hbs ================================================ {{#md-collection content=content as |item|}}
    {{item.name}}

    A character from the TV series "Breaking Bad"

    {{#link-to item.route class='secondary-content'}} {{/link-to}}
    {{/md-collection}} ================================================ FILE: tests/dummy/app/templates/snippets/collection-basic.hbs ================================================ {{#md-collection content=content as |item|}}
    {{item.name}}
    {{/md-collection}} ================================================ FILE: tests/dummy/app/templates/snippets/collection-header-custom.hbs ================================================ {{#md-collection content=content headerComponentName='my-custom-header' header='People to Watch' as |item|}}
    {{item.name}}
    {{/md-collection}} ================================================ FILE: tests/dummy/app/templates/snippets/collection-header.hbs ================================================ {{#md-collection content=content header='People to Watch' as |item|}}
    {{item.name}}
    {{/md-collection}} ================================================ FILE: tests/dummy/app/templates/snippets/collection-links.hbs ================================================ {{#md-collection content=content as |item|}} {{link-to item.name item.route class='collection-item'}} {{/md-collection}} ================================================ FILE: tests/dummy/app/templates/snippets/collection-secondary-content.hbs ================================================ {{#md-collection content=content as |item|}}
    {{item.name}} {{#link-to item.route class='secondary-content'}} {{/link-to}}
    {{/md-collection}} ================================================ FILE: tests/dummy/app/templates/snippets/copyright-basic.hbs ================================================
    Left
    Right
    {{#md-copyright text='Copyright Text' startYear=2014 class='light-blue darken-2 white-text'}} More Links {{/md-copyright}}
    ================================================ FILE: tests/dummy/app/templates/snippets/form-validation-basic.hbs ================================================
    {{md-input value=model.name label="Name" validate=true class="col s12" errors=errors.name}}
    ================================================ FILE: tests/dummy/app/templates/snippets/input-basic.hbs ================================================ {{md-input value="Hi Mom" label='Example' class="col s6" validate=true}} {{md-input value="An error was found" label='Example' class="col s6" validate=true errors=(array "We found an error")}} ================================================ FILE: tests/dummy/app/templates/snippets/input-check-basic.hbs ================================================ {{md-check name="A single checkbox" checked=checkboxIsSelected}} ================================================ FILE: tests/dummy/app/templates/snippets/input-check-list.hbs ================================================ {{md-checks selection=checkboxSelections content=checkboxChoices optionValuePath='id' optionLabelPath='label'}} ================================================ FILE: tests/dummy/app/templates/snippets/input-date-basic.hbs ================================================
    {{md-input-date label='Birthday' value=dateValue class="col s12"}}
    ================================================ FILE: tests/dummy/app/templates/snippets/input-radio-list.hbs ================================================ {{#md-radios selection=radioSelection optionValuePath='id' optionLabelPath='text'}}

    {{md-radio value=1 name="One"}}

    {{md-radio value=2 name="Two"}}

    {{/md-radios}} ================================================ FILE: tests/dummy/app/templates/snippets/input-range-basic.hbs ================================================ {{md-range value=rangeValue min=50 name="My Range"}} ================================================ FILE: tests/dummy/app/templates/snippets/input-switch-basic.hbs ================================================

    {{md-switch checked=switchValue}}

    {{md-switch checked=switchValue onLabel="Enabled" offLabel="Disabled"}}

    {{md-switch disabled=notSwitchValue checked=false}}

    ================================================ FILE: tests/dummy/app/templates/snippets/input-switch-list-exclusive.hbs ================================================ {{#md-switches multiple=false selection=radioSelection optionValuePath='id' optionLabelPath='text'}}

    {{md-switch value=1 name="One"}}

    {{md-switch value=2 name="Two"}}

    {{/md-switches}} ================================================ FILE: tests/dummy/app/templates/snippets/input-switch-list.hbs ================================================ {{md-switches selection=checkboxSelections content=checkboxChoices optionValuePath='id' optionLabelPath='label'}} ================================================ FILE: tests/dummy/app/templates/snippets/input-types.hbs ================================================
    {{md-input value="test" label='Password' type="password" class="col s12" validate=true}} {{md-input value=65 label='Number' type="number" class="col s12" validate=true}} {{md-input value='(202) 555-1212' label='Phone' type="tel" class="col s12" validate=true}} {{md-input value='test@test.com' label='Email' type="email" class="col s12" validate=true}}
    ================================================ FILE: tests/dummy/app/templates/snippets/input-with-icon.hbs ================================================
    {{md-input value="I love material design." label="Example with color specification" icon="android light-blue-text" class="col s12" validate=true}} {{md-input value="I love material design." label="Example with icon and errors" icon="phone light-lime-text" class="col s12" validate=true errors=(array "Sorry, phones aren't cool anymore")}}
    ================================================ FILE: tests/dummy/app/templates/snippets/modal-basic.hbs ================================================ {{#if modalIsOpen}} {{#md-modal close=(action (mut modalIsOpen) false) class="test-modal"}} {{/md-modal}} {{/if}} ================================================ FILE: tests/dummy/app/templates/snippets/my-column-header.hbs ================================================ {{column.header}} ================================================ FILE: tests/dummy/app/templates/snippets/my-custom-header.hbs ================================================

    {{header}}

    ================================================ FILE: tests/dummy/app/templates/snippets/navbar-basic.hbs ================================================ {{#md-navbar name='Example' class='indigo'}} {{#link-to 'navbar' tagName='li'}} {{link-to 'Navbar' 'navbar'}} {{/link-to}} {{#link-to 'tabs' tagName='li'}} {{link-to 'Tabs' 'tabs'}} {{/link-to}} {{/md-navbar}} ================================================ FILE: tests/dummy/app/templates/snippets/navbar-custom-home.hbs ================================================ {{#md-navbar name='Example' class='indigo' homeRoute='navbar'}} {{#link-to 'navbar' tagName='li'}} {{link-to 'Navbar' 'navbar'}} {{/link-to}} {{#link-to 'tabs' tagName='li'}} {{link-to 'Tabs' 'tabs'}} {{/link-to}} {{/md-navbar}} ================================================ FILE: tests/dummy/app/templates/snippets/none.hbs ================================================ ================================================ FILE: tests/dummy/app/templates/snippets/pagination-basic.hbs ================================================ {{md-pagination min=1 max=12 current=page range=7}} ================================================ FILE: tests/dummy/app/templates/snippets/parallax-basic.hbs ================================================ {{md-parallax image="images/ember-cli.png"}}

    Hello Parallax

    My really amazing content goes here...

    {{md-parallax image="images/ember-cli.png"}} ================================================ FILE: tests/dummy/app/templates/snippets/progress-circular.hbs ================================================ {{md-loader mode="circular"}} {{md-loader mode="circular" size="small"}} {{md-loader mode="circular" color="blue"}} {{md-loader mode="circular" color="red"}} {{md-loader mode="circular" color="green"}} {{md-loader mode="circular" color="yellow"}} ================================================ FILE: tests/dummy/app/templates/snippets/progress-determinate.hbs ================================================
    {{md-input label="Percent" type="number" value=percent step=5 min=0 max=100}}
    {{md-loader mode="determinate" percent=percent}}
    ================================================ FILE: tests/dummy/app/templates/snippets/progress-indeterminate.hbs ================================================ {{md-loader}} ================================================ FILE: tests/dummy/app/templates/snippets/select-basic.hbs ================================================
    {{md-select content=frameworks value=framework label="Framework" prompt="Please choose..." optionLabelPath="content.value" optionValuePath="content" class="col s12"}}
    ================================================ FILE: tests/dummy/app/templates/snippets/tables-basic.hbs ================================================
    Example 1
    {{#md-table content=content as |row|}} {{md-table-col row=row valueBindingPath='id'}} {{md-table-col row=row valueBindingPath='name'}} {{/md-table}}
    Example 2
    {{#md-table content=content as |row|}} {{#md-table-col row=row key='id' header='Person Id'}} {{row.id}} {{/md-table-col}} {{#md-table-col row=row key='name' header='Person Name'}} {{row.name}} {{/md-table-col}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-bordered.hbs ================================================ {{#md-table content=content class='bordered' as |row|}} {{md-table-col row=row valueBindingPath='id'}} {{md-table-col row=row valueBindingPath='name'}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-centered.hbs ================================================ {{#md-table content=content class='centered' as |row|}} {{md-table-col row=row valueBindingPath='id'}} {{md-table-col row=row valueBindingPath='name'}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-custom-cell.hbs ================================================ {{#md-table content=content as |row|}} {{#md-table-col row=row key='id' header='Person Id'}} {{row.id}} {{/md-table-col}} {{#md-table-col row=row key='name' header='Person Name'}} {{md-btn class='teal white-text' text=row.name}} {{/md-table-col}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-custom-header.hbs ================================================ {{#md-table content=content as |row|}} {{md-table-col row=row valueBindingPath='id' headerComponentName='my-column-header'}} {{md-table-col row=row valueBindingPath='name' headerComponentName='my-column-header'}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-hoverable.hbs ================================================ {{#md-table content=content class='hoverable' as |row|}} {{md-table-col row=row valueBindingPath='id'}} {{md-table-col row=row valueBindingPath='name'}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-responsive.hbs ================================================ {{#md-table content=content class='responsive-table' as |row|}} {{md-table-col row=row valueBindingPath='id'}} {{md-table-col row=row valueBindingPath='name'}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tables-striped.hbs ================================================ {{#md-table content=content class='striped' as |row|}} {{md-table-col row=row valueBindingPath='id'}} {{md-table-col row=row valueBindingPath='name'}} {{/md-table}} ================================================ FILE: tests/dummy/app/templates/snippets/tabs-basic.hbs ================================================ {{md-tabs content=basicTabsContent selected=basicTabsSelection}} ================================================ FILE: tests/dummy/app/templates/snippets/tabs-declarative.hbs ================================================ {{#md-tabs selected=basicTabsSelection}} {{md-tab value='a' title="Sixth"}} {{md-tab value='b' title="Seventh"}} {{md-tab value='c' title="Eighth"}} {{/md-tabs}} ================================================ FILE: tests/dummy/app/templates/snippets/tabs-optionpaths.hbs ================================================ {{md-tabs content=alternateTabsContent selected='b' optionValuePath='key' optionLabelPath='label'}} ================================================ FILE: tests/dummy/app/templates/snippets/text-color.hbs ================================================
    lighten-2 lighten-1 blue-text darken-1 darken-2
    ================================================ FILE: tests/dummy/app/templates/snippets/textarea-basic.hbs ================================================
    {{md-textarea label='Message' value=message class="col s12"}}
    ================================================ FILE: tests/dummy/app/templates/tables.hbs ================================================ {{example-header title="Tables"}}
    {{#options-panel componentName='md-table'}} {{component-option optionId="content" required=true description='an array of objects, each of which will become a row in the table'}} {{/options-panel}} {{#options-panel componentName='md-table-col'}} {{component-option optionId="key" required=true default='valueBindingPath' description='a unique key for the column -- used to maintain a set of column models'}} {{component-option optionId="row" required=true description="pass the row through each column, as it's yielded by the md-table component"}} {{component-option optionId="header" default='valueBindingPath' description='column header text (or value)'}} {{component-option optionId="valueBindingPath" description='the on each row object to render into the columns cells'}} {{component-option optionId="headerView" default='ember-cli-materialize/views/default-column-view' description='Ember view to use to render the column header'}} {{/options-panel}}

    Basic Table

    {{example-snippet snippet='tables-basic' content=(or content model) class='basic-table'}}

    Bordered Table

    {{example-snippet snippet='tables-bordered' content=(or content model)}}

    Striped Table

    {{example-snippet snippet='tables-striped' content=(or content model)}}

    Hoverable Table

    {{example-snippet snippet='tables-hoverable' content=(or content model)}}

    Centered Table

    {{example-snippet snippet='tables-centered' content=(or content model)}}

    Responsive Table

    {{example-snippet snippet='tables-responsive' content=(or content model)}}

    Customizing Cells

    {{example-snippet snippet='tables-custom-cell' content=(or content model) class='custom-cells'}}

    Customizing Headers

    First you need to create a new column header view

    app/views/my-column-header.js {{code-snippet name='my-column-header.js'}} app/templates/my-column-header.hbs {{code-snippet name='my-column-header.hbs'}}

    ...and then you can pass this new column header view to one or more columns

    {{example-snippet snippet='tables-custom-header' content=(or content model) class='custom-headers'}}
    ================================================ FILE: tests/dummy/app/templates/tabs.hbs ================================================ {{example-header title="Tabs"}}
    {{#options-panel}} {{component-option optionId="content" default="[]" description="tabs array"}} {{component-option optionId="selected" description="selected tab id"}} {{component-option optionId="colWidth" default="2" description="width of tabs, in grid columns"}} {{/options-panel}}

    Basic Usage

    Creating a basic set of tabs is simple, and you have several syntax options to choose from. First, you can pass an array of tabs to the {{md-tabs}} component:

    {{example-snippet snippet='tabs-basic' class='basic-tabs-example' basicTabsContent=basicTabsContent basicTabsSelection=basicTabsSelection exampleFrameClass='z-depth-1'}}

    By default, the structure of the array of tabs is expected to look like this

          
          [ {id: 'a', title: 'First'},
            {id: 'b', title: 'Second'},
            {id: 'c', title: 'Third'} ]
          
        

    If you wish to use different key and value properties, you may specify some additional options

    {{example-snippet snippet='tabs-optionpaths' class='second-tabs-example' alternateTabsContent=alternateTabsContent basicTabsSelection=basicTabsSelection exampleFrameClass='z-depth-1'}}

    Alternate Syntax

    The following syntax allows for more granular control over the particulars of each tab

    {{example-snippet snippet='tabs-declarative' class='third-tabs-example' basicTabsSelection=basicTabsSelection exampleFrameClass='z-depth-1'}}
    ================================================ FILE: tests/dummy/config/environment.js ================================================ /* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment, rootURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true }, EXTEND_PROTOTYPES: { // Prevent Ember Data from overriding Date.parse. Date: false } }, APP: { emberModalDialog: { modalRootElementId: 'materialize-modal-root-element' } // Here you can pass flags/options to your application instance // when it is created } }; if (environment === 'development') { // ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_TRANSITIONS = true; // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; // ENV.APP.LOG_VIEW_LOOKUPS = true; // ENV.EmberENV.RAISE_ON_DEPRECATION = true; } if (environment === 'test') { // Testem prefers this... ENV.rootURL = '/'; ENV.locationType = 'none'; // ENV.EmberENV.RAISE_ON_DEPRECATION = !process.env['ALLOW_DEPRECATIONS']; // keep test console output quieter ENV.APP.LOG_ACTIVE_GENERATION = false; ENV.APP.LOG_VIEW_LOOKUPS = false; ENV.APP.rootElement = '#ember-testing'; ENV.APP.autoboot = false; } if (environment === 'production') { ENV.locationType = 'hash'; ENV.rootURL = '/ember-cli-materialize/'; ENV.rootURL = '/ember-cli-materialize'; ENV.locationType = 'hash'; } // ENV.contentSecurityPolicy = { // "default-src": "'unsafe-inline'", // "script-src": "'self' 'unsafe-eval' 'unsafe-inline'", // "style-src": "'self' 'unsafe-inline'", // "connect-src": "'self' ", // "img-src": "'self'", // "media-src": "'self'" // }; return ENV; }; ================================================ FILE: tests/dummy/config/optional-features.json ================================================ { "jquery-integration": true } ================================================ FILE: tests/dummy/config/targets.js ================================================ 'use strict'; const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ]; const isCI = !!process.env.CI; const isProduction = process.env.EMBER_ENV === 'production'; if (isCI || isProduction) { browsers.push('ie 11'); } module.exports = { browsers }; ================================================ FILE: tests/dummy/public/crossdomain.xml ================================================ ================================================ FILE: tests/dummy/public/robots.txt ================================================ # http://www.robotstxt.org User-agent: * Disallow: ================================================ FILE: tests/helpers/destroy-app.js ================================================ import { run } from '@ember/runloop'; export default function destroyApp(application) { run(application, 'destroy'); } ================================================ FILE: tests/helpers/module-for-acceptance.js ================================================ import { module } from 'qunit'; import { resolve } from 'rsvp'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; export default function(name, options = {}) { module(name, { beforeEach() { this.application = startApp(); if (options.beforeEach) { return options.beforeEach.apply(this, arguments); } }, afterEach() { let afterEach = options.afterEach && options.afterEach.apply(this, arguments); return resolve(afterEach).then(() => destroyApp(this.application)); } }); } ================================================ FILE: tests/helpers/resolver.js ================================================ import Resolver from '../../resolver'; import config from '../../config/environment'; const resolver = Resolver.create(); resolver.namespace = { modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix }; export default resolver; ================================================ FILE: tests/helpers/selectable-item-group.js ================================================ import { run } from '@ember/runloop'; import { test } from 'ember-qunit'; export function deselectForSingleSelectionTest() { test('deselecting checkbox works with multiple=false', function(assert) { assert.expect(6); const component = this.subject(); component.set('content', ['a', 'b', 'c']); component.set('multiple', false); component.setValueSelection('b', true); this.render(); run(function() { assert.equal(component.isValueSelected('a'), false, 'A should be un-checked'); assert.equal(component.isValueSelected('b'), true, 'B should be checked'); assert.equal(component.isValueSelected('c'), false, 'C should be un-checked'); assert.equal(component.get('selection'), 'b', 'Selection should be B and only B'); component.setValueSelection('b', false); assert.equal(component.isValueSelected('b'), false, 'B should be un-checked after unselection'); assert.equal(component.get('selection'), null, 'Selection should be B and only B'); }); }); } ================================================ FILE: tests/helpers/selectable-item.js ================================================ import { schedule, run } from '@ember/runloop'; import { isArray, A } from '@ember/array'; import $ from 'jquery'; import { test } from 'ember-qunit'; export function selectableItemHasRequiredParts() { test('has required DOM elements', function(assert) { assert.expect(3); let component = this.subject(); this.render(); assert.equal( component.$().hasClass('materialize-selectable-item'), true, 'has materialize-selectable-item class on top-level element' ); assert.equal( component.$('input.materialize-selectable-item-input').length > 0, true, 'has materialize-selectable-item-input on input' ); assert.equal( component.$('label.materialize-selectable-item-label').length > 0, true, 'has materialize-selectable-item-label on label' ); }); } export function disabledStateTest() { test('disabled state', function(assert) { assert.expect(3); // Creates the component instance let component = this.subject(); component.set('checked', false); // Renders the component to the page this.render(); assert.ok(!component.$('input').attr('disabled'), 'by default, component is not disabled'); run(function() { component.set('disabled', true); run.schedule('afterRender', function() { assert.ok(!!component.$('input').attr('disabled'), 'disabling the component disables its input'); component.$('input').click(); assert.equal(component.get('checked'), false, 'clicking on component does nothing while it is disabled'); }); }); }); } export function selectTest(params = {}) { test('clicking changes its state', function(assert) { assert.expect(2); let component = this.subject(params); component.set('checked', false); this.render(); assert.equal(component.get('checked'), false, 'Initially un-checked'); component.$('input').click(); assert.equal(component.get('checked'), true, 'After clicking, is checked'); }); } export function selectByLabelTest() { test('clicking on label changes its state', function(assert) { assert.expect(2); let component = this.subject(); component.set('checked', false); this.render(); assert.equal(component.get('checked'), false, 'Initially un-checked'); component.$('label').click(); assert.equal(component.get('checked'), true, 'After clicking, is checked'); }); } export function labelTest() { test('component label', function(assert) { assert.expect(2); let component = this.subject(); component.set('name', 'Heisenberg'); this.render(); assert.equal( component .$() .text() .indexOf('Heisenberg') >= 0, true, 'Label is rendered' ); run(function() { component.set('name', 'Walter'); schedule('afterRender', function() { assert.equal( component .$() .text() .indexOf('Walter') >= 0, true, 'Label is updated' ); }); }); }); } export function groupItemsRenderTest() { test('items render', function(assert) { assert.expect(2); let choices = A(['aaa', 'bbb', 'ccc', 'ddd', 'eee']); // Creates the component instance let component = this.subject({ content: choices, selection: null }); // Renders the component to the page this.render(); assert.equal( component.$('.materialize-selectable-item .materialize-selectable-item-label').length, choices.length, `${choices} items rendered` ); assert.equal( component .$('.materialize-selectable-item .materialize-selectable-item-label') .text() .replace(/[\s\n]/g, ''), choices.join(''), 'All choice labels are present' ); }); } export function initialSelectionTest(selection) { test('initial selection is correct', function(assert) { assert.expect(1); let choices = A(['aaa', 'bbb', 'ccc', 'ddd', 'eee']); // Creates the component instance let component = this.subject({ content: choices, selection }); // Renders the component to the page this.render(); let shouldBeSelected = isArray(selection) ? selection : A([selection]); let actuallySelected = component .$('input:checked') .map((idx, e) => { let parentElement = $(e).closest('.materialize-selectable-item'); return parentElement .find('.materialize-selectable-item-label') .text() .trim(); }) .toArray(); assert.equal(actuallySelected.join(''), shouldBeSelected.join(''), 'initial selection is correct'); }); } export function disabledGroupTest() { test('disabling group disables all inputs', function(assert) { let choices = A(['aaa', 'bbb', 'ccc', 'ddd', 'eee']); // Creates the component instance let component = this.subject({ content: choices, selection: null }); this.render(); assert.equal(component.$('input:disabled').length, 0, 'No inputs are initially disabled'); run(function() { component.set('disabled', true); run.schedule('afterRender', function() { assert.equal(component.$('input:disabled').length, 5, 'All inputs are disabled when group is disabled'); }); }); }); } ================================================ FILE: tests/helpers/start-app.js ================================================ import Application from '../../app'; import config from '../../config/environment'; import { merge } from '@ember/polyfills'; import { run } from '@ember/runloop'; export default function startApp(attrs) { let attributes = merge({}, config.APP); attributes.autoboot = true; attributes = merge(attributes, attrs); // use defaults, but you can override; return run(() => { let application = Application.create(attributes); application.setupForTesting(); application.injectTestHelpers(); return application; }); } ================================================ FILE: tests/index.html ================================================ Dummy Tests {{content-for "head"}} {{content-for "test-head"}} {{content-for "head-footer"}} {{content-for "test-head-footer"}} {{content-for "body"}} {{content-for "test-body"}} {{content-for "body-footer"}} {{content-for "test-body-footer"}} ================================================ FILE: tests/integration/components/md-btn-dropdown-test.js ================================================ // import Ember from 'ember'; // import { moduleForComponent, test } from 'ember-qunit'; // import hbs from 'htmlbars-inline-precompile'; // moduleForComponent('md-btn-dropdown', 'Integration | Component | md btn dropdown', { // integration: true // }); // test('it renders on origin', function(assert) { // // Set any properties with this.set('myProperty', 'value'); // // Handle any actions with this.on('myAction', function(val) { ... }); // let done = assert.async(); // this.render(hbs`{{md-btn-dropdown}}`); // assert.equal(this.$().text().trim(), ''); // // Template block usage: // this.render(hbs` // {{#md-btn-dropdown text='Button'}} //
  • one
  • //
  • two
  • //
  • //
  • three
  • // {{/md-btn-dropdown}} // `); // assert.equal(this.$().text().trim().replace(/[\s\n]+/g, '\n'), `Button // one // two // three`); // assert.equal(this.$('.dropdown-content.active').length, 0, 'Dropdown is closed'); // this.$('.dropdown-button').click(); // Ember.run(() => { // Ember.run.later(() => { // assert.equal(this.$('.dropdown-content.active').position().top < 5, true, 'not below origin'); // done(); // }, 300); // }); // }); ================================================ FILE: tests/integration/components/md-pagination-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; import $ from 'jquery'; moduleForComponent('md-pagination', 'Integration | Component | md pagination', { integration: true }); test('Buttons render properly', function(assert) { this.render(hbs` {{md-pagination min=1 max=12 current=2 range=5}} `); let labels = $('.pagination li') .toArray() .map(x => x.innerText); assert.equal(labels.length, 7, '5 labels + 2 directional buttons'); assert.deepEqual(labels, ['chevron_left', '1', '2', '3', '4', '5', 'chevron_right'], 'labels are correct'); }); test('decrement button disables at lower end of range', function(assert) { this.render(hbs` {{md-pagination min=1 max=12 current=1 range=5}} `); let labels = $('.pagination li.disabled a.decrement') .toArray() .map(x => x.innerText); assert.equal(labels.length, 1, 'left button is disabled at lower-end of range'); }); test('increment button disables at lower end of range', function(assert) { this.render(hbs` {{md-pagination min=1 max=12 current=12 range=5}} `); let labels = $('.pagination li.disabled a.increment') .toArray() .map(x => x.innerText); assert.equal(labels.length, 1, 'right button is disabled at upper-end of range'); }); ================================================ FILE: tests/integration/components/md-select-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('md-select', 'Integration | Component | md select', { integration: true }); test('basic usage', function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle any actions with this.on('myAction', function(val) { ... }); this.set('frameworks', [{ id: 1, value: 'Materialize CSS' }, { id: 2, value: 'Ember-CLI Materialize' }]); // Template block usage: this.render(hbs` {{md-select content=frameworks value=framework label="Framework" prompt="Please choose..." optionLabelPath="content.value" optionValuePath="content" class="col s12"}} `); assert.equal( this.$() .text() .trim() .replace(/[\s\n]+/g, ''), `Framework▼Pleasechoose...MaterializeCSSEmber-CLIMaterializePleasechoose...MaterializeCSSEmber-CLIMaterialize` ); assert.ok(this.$('.md-select').hasClass('input-field')); assert.equal(this.$('.md-select >label').text(), 'Framework'); }); test('simple array usage', function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle any actions with this.on('myAction', function(val) { ... }); this.set('content', ['Walter White', 'Jesee Pinkman', 'Gus Freng']); // Template block usage: this.render(hbs` {{md-select content=content value="Jesee Pinkman"}} `); assert.equal( this.$() .text() .trim() .replace(/[\s\n]+/g, ''), '▼WalterWhiteJeseePinkmanGusFrengWalterWhiteJeseePinkmanGusFreng' ); assert.equal(this.$('.md-select input').val(), 'Jesee Pinkman', 'Jesee Pinkman is initially selected'); }); ================================================ FILE: tests/test-helper.js ================================================ import Application from '../app'; import config from '../config/environment'; import { setApplication } from '@ember/test-helpers'; import { start } from 'ember-qunit'; setApplication(Application.create(config.APP)); start(); ================================================ FILE: tests/unit/.gitkeep ================================================ ================================================ FILE: tests/unit/components/materialize-badge-test.js ================================================ import { run } from '@ember/runloop'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-badge', { unit: true // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('badge renders', function(assert) { assert.expect(2); // Creates the component instance let component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('badge binding to the text property works', function(assert) { assert.expect(2); let component = this.subject(); this.render(); assert.equal( component .$() .text() .trim(), '', 'By default the text property is empty' ); run(function() { component.set('text', 'Heisenberg'); run.schedule('afterRender', function() { assert.equal( component .$() .text() .trim(), 'Heisenberg', 'Setting the text property updates the content of the badge' ); }); }); }); ================================================ FILE: tests/unit/components/materialize-button-dropdown-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-btn-dropdown', 'component:md-btn-dropdown', { unit: true, needs: ['helper:bw-compat-icon'] }); test('button dropdown renders', function(assert) { assert.expect(2); // creates the component instance let component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('button dropdown is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('button').length); }); test('dropdown shown when clicked', function(assert) { let component = this.subject(); component.set('hover', false); this.render(); let dropdownContentId = `#${component.get('_dropdownContentId')}`; let dropdownElement = $(dropdownContentId); assert.ok(!dropdownElement.is(':visible')); component.$().trigger('mouseenter'); assert.ok(!dropdownElement.is(':visible')); component.$().click(); assert.ok(dropdownElement.is(':visible')); }); test('dropdown shown when hovered', function(assert) { let component = this.subject(); component.set('hover', true); this.render(); let dropdownContentId = `#${component.get('_dropdownContentId')}`; let dropdownElement = $(dropdownContentId); assert.ok(!dropdownElement.is(':visible')); component.$().trigger('mouseenter'); assert.ok(dropdownElement.is(':visible')); }); ================================================ FILE: tests/unit/components/materialize-button-submit-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-btn-submit', 'component:md-btn-submit', { unit: true, needs: ['helper:bw-compat-icon'] }); test('button submit renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('button submit is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('button').length); }); ================================================ FILE: tests/unit/components/materialize-button-test.js ================================================ import { run } from '@ember/runloop'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-btn', { unit: true, needs: ['helper:bw-compat-icon'] }); test('button renders', function(assert) { assert.expect(2); // creates the component instance let component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('button is added to the page', function(assert) { let component = this.subject(); this.render(); assert.ok(component.$().length); assert.ok(component.$().hasClass('waves-light')); assert.ok(component.$().hasClass('waves-effect')); assert.ok(component.$().hasClass('btn')); }); test('button click test', function(assert) { let clickedCount = 0; let component = this.subject({ action() { clickedCount++; } }); this.render(); component.$().click(); assert.equal(clickedCount, 1, 'action should fire when clicked'); }); test('button click action does not fire if disabled', function(assert) { let clickedCount = 0; let component = this.subject({ isDisabled: true, action() { clickedCount++; } }); this.render(); component.$().click(); assert.equal(clickedCount, 0, 'action should not fire when clicked'); }); test('button text test', function(assert) { let component = this.subject(); this.render(); run(function() { component.set('text', 'Button'); }); assert.equal( component .$() .text() .trim(), 'Button' ); }); test('button icon test', function(assert) { let component = this.subject({ iconPosition: 'left' }); this.render(); run(function() { component.set('icon', 'mdi-action-favorite'); }); assert.ok(this.$('i').length); assert.ok(this.$('i').hasClass('mdi-action-favorite')); assert.ok(this.$('i').hasClass('left')); }); test('button icon with position test', function(assert) { let component = this.subject(); this.render(); run(function() { component.set('icon', 'mdi-action-favorite'); component.set('iconPosition', 'right'); }); assert.ok(this.$('i').length); assert.ok(this.$('i').hasClass('mdi-action-favorite')); assert.ok(this.$('i').hasClass('right')); }); test('button buttonType floating test', function(assert) { let component = this.subject(); this.render(); run(function() { component.set('buttonType', 'floating'); }); assert.ok(this.$().hasClass('waves-light')); assert.ok(this.$().hasClass('waves-effect')); assert.ok(this.$().hasClass('btn-floating')); }); test('button buttonType flat test', function(assert) { let component = this.subject(); this.render(); run(function() { component.set('buttonType', 'flat'); }); assert.ok(this.$().hasClass('waves-effect')); assert.ok(this.$().hasClass('btn-flat')); }); test('button buttonType large test', function(assert) { let component = this.subject(); this.render(); run(function() { component.set('buttonType', 'large'); }); assert.ok(this.$().hasClass('waves-light')); assert.ok(this.$().hasClass('waves-effect')); assert.ok(this.$().hasClass('btn-large')); }); test('button isDisabled test', function(assert) { let component = this.subject(); this.render(); run(function() { component.set('isDisabled', 'true'); }); assert.ok(this.$().hasClass('waves-light')); assert.ok(this.$().hasClass('disabled')); assert.ok(this.$().hasClass('btn')); }); ================================================ FILE: tests/unit/components/materialize-card-action-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-card-action', { unit: true }); test('card action renders', function(assert) { // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('card action it is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('div').length); }); test('card action is a DIV', function(assert) { this.subject(); assert.equal('DIV', this.$().prop('tagName')); }); test('card action has passed classes', function(assert) { this.subject({ classNames: 'teal' }); assert.ok(this.$().hasClass('card-action')); assert.ok(this.$().hasClass('teal')); }); ================================================ FILE: tests/unit/components/materialize-card-content-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-card-content', { unit: true }); test('card-content renders', function(assert) { // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('card-content is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('div').length); }); test('card-content is a DIV', function(assert) { this.subject(); assert.equal('DIV', this.$().prop('tagName')); }); test('card-content has passed classes', function(assert) { this.subject({ classNames: 'teal' }); assert.ok(this.$().hasClass('card-content')); assert.ok(this.$().hasClass('teal')); }); ================================================ FILE: tests/unit/components/materialize-card-panel-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-card-panel', { unit: true }); test('card panel renders', function(assert) { // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('card panel it is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('div').length); }); test('card panel is a DIV', function(assert) { this.subject(); assert.equal('DIV', this.$().prop('tagName')); }); test('card panel has passed classes', function(assert) { this.subject({ classNames: 'teal' }); assert.ok(this.$().hasClass('card-panel')); assert.ok(this.$().hasClass('teal')); }); ================================================ FILE: tests/unit/components/materialize-card-reveal-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-card-reveal', { unit: true }); test('card reveal renders', function(assert) { // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('card reveal it is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('div').length); }); test('card reveal is a DIV', function(assert) { this.subject(); assert.equal('DIV', this.$().prop('tagName')); }); test('card reveal has passed classes', function(assert) { this.subject({ classNames: 'teal' }); assert.ok(this.$().hasClass('card-reveal')); assert.ok(this.$().hasClass('teal')); }); ================================================ FILE: tests/unit/components/materialize-card-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import $ from 'jquery'; moduleForComponent('md-card', { unit: true }); test('card renders', function(assert) { // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // appends the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('card is added to the page', function(assert) { this.subject(); this.render(); assert.ok($('div').length); }); test('card a DIV', function(assert) { this.subject(); assert.equal('DIV', this.$().prop('tagName')); }); test('card has title properties', function(assert) { const component = this.subject({ title: 'My Component', titleClass: 'green-text' }); assert.equal('My Component', component.get('title')); assert.equal('green-text', component.get('titleClass')); }); test('card has an image', function(assert) { const component = this.subject({ image: 'images/ember.png' }); assert.equal('images/ember.png', component.get('image')); }); test('card has passed classes', function(assert) { this.subject({ classNames: 'teal' }); assert.ok(this.$().hasClass('card')); assert.ok(this.$().hasClass('teal')); }); ================================================ FILE: tests/unit/components/materialize-checkbox-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import { disabledStateTest, selectTest, labelTest, selectByLabelTest, selectableItemHasRequiredParts } from '../../helpers/selectable-item'; moduleForComponent('md-check', { unit: true // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); selectableItemHasRequiredParts(); selectTest(); selectByLabelTest(); disabledStateTest(); labelTest(); ================================================ FILE: tests/unit/components/materialize-checkboxes-test.js ================================================ import { A } from '@ember/array'; import $ from 'jquery'; import { moduleForComponent, test } from 'ember-qunit'; import { disabledGroupTest, groupItemsRenderTest, initialSelectionTest } from '../../helpers/selectable-item'; import { deselectForSingleSelectionTest } from '../../helpers/selectable-item-group'; moduleForComponent('md-checks', { unit: true, needs: ['component:md-checks-check'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance let component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('simple array test', function(assert) { let component = this.subject({ content: A(['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan']), selection: A(['Harry Morgan']) }); this.render(); assert.deepEqual( component .$('label') .toArray() .map(x => $(x).text()), ['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan'], 'Choices are valid' ); assert.equal(component.$('input[type="checkbox"]')[2].checked, true, 'Third checkbox is checked'); }); disabledGroupTest(); groupItemsRenderTest(); initialSelectionTest(A(['bbb', 'ccc'])); deselectForSingleSelectionTest(); ================================================ FILE: tests/unit/components/materialize-collapsible-card-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-card-collapsible', { unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('collapsible card renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); ================================================ FILE: tests/unit/components/materialize-collapsible-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-collapsible', { unit: true, needs: ['helper:bw-compat-icon'] }); test('collapsible renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); ================================================ FILE: tests/unit/components/materialize-copyright-test.js ================================================ import { run } from '@ember/runloop'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-copyright', { unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('copyright renders', function(assert) { assert.expect(2); // creates the component instance let component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('copyright binding to the text property works', function(assert) { assert.expect(2); let component = this.subject(); let currentYear = new Date().getFullYear(); this.render(); assert.equal( component .$() .text() .trim(), `\u00A9 ${currentYear}`, 'By default the text property is empty' ); run(function() { component.set('text', 'Copyright Text'); run.schedule('afterRender', function() { assert.equal( component .$() .text() .trim(), `\u00A9 ${currentYear} Copyright Text`, 'Setting the text property updates the content of the copyright component' ); }); }); }); test('copyright null startYear', function(assert) { // get the component to test let component = this.subject(); this.render(); // confirm the component's date is 'currentYear' run(function() { run.schedule('afterRender', function() { assert.equal( component.get('date'), new Date().getFullYear(), 'Not setting the startYear property just shows the currentYear' ); }); }); }); test('copyright current startYear', function(assert) { // get the component to test // set the startYear equal to the currentYear let currentYear = new Date().getFullYear(); let component = this.subject({ startYear: currentYear }); this.render(); // confirm the component's date is 'currentYear' run(function() { run.schedule('afterRender', function() { assert.equal( component.get('date'), currentYear, 'Setting the startYear property to the same year as the currentYear just shows the currentYear' ); }); }); }); test('copyright past startYear', function(assert) { // get the component to test // set the startYear a year less than the currentYear let currentYear = new Date().getFullYear(); let component = this.subject({ startYear: currentYear - 1 }); this.render(); // confirm the component's date is 'startYear - currentYear' run(function() { run.schedule('afterRender', function() { assert.equal( component.get('date'), `${currentYear - 1} - ${currentYear}`, 'Setting the startYear property to a year before the currentYear shows startYear - currentYear' ); }); }); }); test('copyright future startYear', function(assert) { assert.throws(() => { this.subject({ startYear: new Date().getFullYear() + 1 }); this.render(); }, /Property startYear must be less than or equal to the current year/); }); ================================================ FILE: tests/unit/components/materialize-date-input-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-input-date', { unit: true, needs: ['helper:bw-compat-icon'] // specify the other units that are required for this test }); test('date input renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('date input has class input-field', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('input-field')); }); test('date input has a label', function(assert) { const label = 'My Input'; const component = this.subject({ label }); this.render(); assert.equal(component.$('>label').text(), label); }); test('date input has a value', function(assert) { const value = '15 January, 1974'; const component = this.subject({ value }); this.render(); assert.equal(component.$('>input').val(), value); }); test('date input label is active with value', function(assert) { const component = this.subject({ value: '15 January, 1974' }); this.render(); assert.ok(component.$('>label').hasClass('active')); }); test('date input has an icon', function(assert) { const icon = 'mdi-action-face-unlock'; const component = this.subject({ icon }); this.render(); assert.ok(component.$('>i').hasClass(icon)); }); ================================================ FILE: tests/unit/components/materialize-input-field-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-input-field', { unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('input field renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('input field has class input-field', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('input-field')); }); test('input field has class input-field', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('input-field')); }); test('input field has a label', function(assert) { const label = 'My Input'; const component = this.subject({ label }); this.render(); assert.equal(component.get('label'), label); }); test('input field has a value', function(assert) { const value = 'My Input Value'; const component = this.subject({ value }); this.render(); assert.equal(component.get('value'), value); }); test('input field has an icon', function(assert) { const icon = 'mdi-action-face-unlock'; const component = this.subject({ icon }); this.render(); assert.equal(component.get('icon'), icon); }); ================================================ FILE: tests/unit/components/materialize-input-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-input', { unit: true, needs: ['helper:bw-compat-icon', 'service:keyboard'] }); test('input renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('input has class input-field', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('input-field')); }); test('input has a label', function(assert) { const label = 'My Input'; const component = this.subject({ label }); this.render(); assert.equal(component.$('>label').text(), label); }); test('input has a value', function(assert) { const value = 'My Input Value'; const component = this.subject({ value }); this.render(); assert.equal(component.$('>input').val(), value); }); test('input label is active with value', function(assert) { const component = this.subject({ value: 'some text' }); this.render(); assert.ok(component.$('>label').hasClass('active')); }); test('input has an icon', function(assert) { const icon = 'mdi-action-face-unlock'; const component = this.subject({ icon }); this.render(); assert.ok(component.$('>i').hasClass(icon)); }); test('input has type password', function(assert) { const type = 'password'; const component = this.subject({ type }); this.render(); assert.equal(component.$('>input').attr('type'), type); }); ================================================ FILE: tests/unit/components/materialize-loader-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-loader', { unit: true // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('loader renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); ================================================ FILE: tests/unit/components/materialize-pagination-test.js ================================================ // import { run } from '@ember/runloop'; // import { moduleForComponent, test } from 'ember-qunit'; // moduleForComponent('md-pagination', { // unit: true // // Specify the other units that are required for this test // // needs: ['component:foo', 'helper:bar'] // }); // test('it renders', function(assert) { // assert.expect(2); // // Creates the component instance // let component = this.subject(); // assert.equal(component._state, 'preRender'); // // Renders the component to the page // this.render(); // assert.equal(component._state, 'inDOM'); // }); // test('window range calculation', function(assert) { // assert.expect(3); // // Creates the component instance // let component = this.subject({ // min: 1, // max: 12, // current: 2, // range: 5 // }); // assert.deepEqual(component.get('windowRange'), { low: 1, high: 5 }, 'Off center window range calculates correctly'); // run(function() { // component.setProperties({ // min: 1, // max: 12, // current: 7, // range: 5 // }); // assert.deepEqual( // component.get('windowRange'), // { low: 5, high: 9 }, // 'Changes to current position updates window range' // ); // component.setProperties({ // min: 1, // max: 12, // current: 7, // range: 7 // }); // assert.deepEqual(component.get('windowRange'), { low: 4, high: 10 }, 'Changes to range width updates window range'); // }); // }); // test('increment button', function(assert) { // assert.expect(5); // // Creates the component instance // let component = this.subject({ // min: 1, // max: 12, // current: 2, // range: 5 // }); // this.render(); // component.$('.increment').click(); // assert.equal(component.get('current'), 3, 'Increment button incremenets position'); // component.$('.decrement').click(); // component.$('.decrement').click(); // assert.equal(component.get('current'), 1, 'Decrement button incremenets position'); // assert.equal(component.$('li.disabled').length, 1, 'Decrement button disables at lower edge of range'); // component.set('current', 7); // assert.equal(component.$('li.disabled').length, 0, 'No buttons disabled in middle of range'); // component.set('current', 12); // // run.schedule('afterRender', function() { // assert.equal(component.$('li.disabled').length, 1, 'Increment button disables at upper edge of range'); // // }); // }); ================================================ FILE: tests/unit/components/materialize-parallax-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-parallax', { unit: true // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('parallax renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('parallax has class parallax-container', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('parallax-container')); }); test('parallax has div with class parallax', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$('>div').hasClass('parallax')); }); test('parallax has an image', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$('>div>img').length); }); ================================================ FILE: tests/unit/components/materialize-radios-test.js ================================================ import { A } from '@ember/array'; import $ from 'jquery'; import hbs from 'htmlbars-inline-precompile'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-radios', { integration: true }); test('simple array test, with initial selection', function(assert) { this.setProperties({ content: A(['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan']), selection: 'Harry Morgan' }); this.render(hbs` {{md-radios content=content selection=selection}} `); assert.deepEqual( this.$('label') .toArray() .map(x => $(x) .text() .trim() ), ['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan'], 'Choices are valid' ); assert.equal(this.$('input[type="radio"]')[2].checked, true, 'Third radio is checked'); }); test('disabled test', function(assert) { this.setProperties({ content: A(['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan']), selection: 'Harry Morgan' }); this.render(hbs` {{md-radios content=content selection=selection disabled=true}} `); assert.equal(this.$('input:disabled').length, 3, 'All three inputs disabled'); }); test('deselecting checkbox works with multiple=false', function(assert) { this.setProperties({ content: ['a', 'b', 'c'], selection: 'b' }); this.render(hbs` {{md-radios content=content selection=selection}} `); assert.equal(this.$('input:checked').length, 1, 'One item should be selected'); assert.equal(this.$('input:checked').attr('value'), 'b', 'Item b should be selected'); this.$('input[value="a"]').click(); assert.equal(this.$('input:checked').length, 1, 'One item should be selected'); assert.equal(this.$('input:checked').attr('value'), 'a', 'Item a should be selected'); this.$('input[value="b"]').click(); assert.equal(this.$('input:checked').length, 1, 'One item should be selected'); assert.equal(this.$('input:checked').attr('value'), 'b', 'Item b should be selected'); this.$('input[value="b"]').click(); assert.equal(this.$('input:checked').length, 1, 'One item should be selected'); assert.equal(this.$('input:checked').attr('value'), 'b', 'Item b should be selected'); this.$('input[value="c"]').click(); assert.equal(this.$('input:checked').length, 1, 'One item should be selected'); assert.equal(this.$('input:checked').attr('value'), 'c', 'Item c should be selected'); }); ================================================ FILE: tests/unit/components/materialize-range-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; import { disabledStateTest, labelTest } from '../../helpers/selectable-item'; moduleForComponent('md-range', { unit: true, // Specify the other units that are required for this test needs: ['service:keyboard'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); disabledStateTest(); labelTest(); ================================================ FILE: tests/unit/components/materialize-switch-test.js ================================================ import { run } from '@ember/runloop'; import { moduleForComponent, test } from 'ember-qunit'; import { selectTest, disabledStateTest, labelTest } from '../../helpers/selectable-item'; moduleForComponent('md-switch', { unit: true // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance let component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('custom on/off labels', function(assert) { assert.expect(4); // Creates the component instance let component = this.subject(); component.set('checked', false); // Renders the component to the page this.render(); assert.equal(component.$('.offlabel').text(), 'Off', 'by default, off label is "Off"'); assert.equal(component.$('.onlabel').text(), 'On', 'by default, off label is "On"'); run(function() { component.setProperties({ offLabel: 'disabled', onLabel: 'enabled' }); run.schedule('afterRender', function() { assert.equal(component.$('.offlabel').text(), 'disabled', 'off label should be customized'); assert.equal(component.$('.onlabel').text(), 'enabled', 'on label should be customized'); }); }); }); selectTest(); disabledStateTest(); labelTest(); ================================================ FILE: tests/unit/components/materialize-switches-test.js ================================================ import { A } from '@ember/array'; import $ from 'jquery'; import { moduleForComponent, test } from 'ember-qunit'; import { disabledGroupTest, groupItemsRenderTest, initialSelectionTest } from '../../helpers/selectable-item'; import { deselectForSingleSelectionTest } from '../../helpers/selectable-item-group'; moduleForComponent('md-switches', { unit: true, needs: ['component:md-switches-switch'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('simple array test', function(assert) { const component = this.subject({ content: A(['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan']), selection: A(['Deborah Morgan']) }); this.render(); assert.deepEqual( component .$('.switch-label') .toArray() .map(x => $(x).text()), ['Dexter Morgan', 'Deborah Morgan', 'Harry Morgan'], 'Choices are valid' ); assert.equal(component.$('input[type="checkbox"]')[1].checked, true, 'Second checkbox is checked'); }); disabledGroupTest(); groupItemsRenderTest(); initialSelectionTest(A(['bbb', 'ccc'])); deselectForSingleSelectionTest(); ================================================ FILE: tests/unit/components/materialize-tabs-tab-test.js ================================================ /** * @public * Testing of this component is included in the materialize-tabs test cases, since this component * cannot exist independently */ ================================================ FILE: tests/unit/components/materialize-tabs-test.js ================================================ import { A } from '@ember/array'; import { schedule, scheduleOnce, run } from '@ember/runloop'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-tabs', { unit: true, // Specify the other units that are required for this test needs: ['component:md-tab'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); component.setProperties({ content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]), selected: 'a' }); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('programatically setting selected tab', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); component.setProperties({ content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]), selected: 'a' }); this.render(); assert.equal( component .$('.active') .text() .trim(), 'First', 'First tab is initially selected' ); run(function() { component.set('selected', 'b'); schedule('afterRender', function() { assert.equal( component .$('.active') .text() .trim(), 'Second', 'Second tab is now selected' ); }); }); }); test('No initial selection - first tab should be selected', function(assert) { assert.expect(1); // Creates the component instance const component = this.subject(); component.setProperties({ content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]) }); run(() => { this.render(); scheduleOnce('afterRender', () => { assert.equal( component .$('.active') .text() .trim(), 'First', 'First tab is initially selected' ); }); }); }); test('Empty content - should render an empty UL', function(assert) { assert.expect(1); // Creates the component instance const component = this.subject(); component.setProperties({ content: new A([]) }); this.render(); assert.equal(component.$('.materialize-tabs-tab').length, 0, 'No tabs should be rendered'); }); test('Col width - should result in the correct CSS classes', function(assert) { assert.expect(3); // Creates the component instance const component = this.subject(); assert.equal(component.get('colWidth'), 2, 'Default col width is 2'); component.setProperties({ colWidth: 4, content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]) }); this.render(); assert.equal(component.get('composableChildren')[0].get('colWidth'), 4, 'Col width on tab set applies to tabs'); assert.equal(component.get('composableChildren')[0].get('_colClass'), 's4', 'tab col class is correct'); }); ================================================ FILE: tests/unit/components/materialize-textarea-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-textarea', { unit: true, needs: ['helper:bw-compat-icon', 'service:keyboard'] // specify the other units that are required for this test }); test('textarea renders', function(assert) { assert.expect(2); // creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('textarea has class input-field', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('input-field')); }); test('textarea has a label', function(assert) { const label = 'My Input'; const component = this.subject({ label }); this.render(); assert.equal(component.$('>label').text(), label); }); test('textarea has a value', function(assert) { const value = 'My Input Value'; const component = this.subject({ value }); this.render(); assert.equal(component.get('value'), value); }); test('textarea label is active with value', function(assert) { const component = this.subject({ value: 'some text' }); this.render(); assert.ok(component.$('>label').hasClass('active')); }); test('textarea has an icon', function(assert) { const icon = 'mdi-action-face-unlock'; const component = this.subject({ icon }); this.render(); assert.ok(component.$('>i').hasClass(icon)); }); ================================================ FILE: tests/unit/components/md-collection-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-collection', 'Unit | Component | md collection', { // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'], unit: true }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); ================================================ FILE: tests/unit/components/md-fixed-btn-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-fixed-btn', 'component:md-fixed-btn', { // Specify the other units that are required for this test needs: ['component:md-btn', 'helper:bw-compat-icon'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('btnIcon attribute results in an icon being rendered', function(assert) { const component = this.subject({ btnIcon: 'mdi-content-add' }); this.render(); assert.equal(component.$('i.mdi-content-add').length, 1, 'Icon should be present'); }); test('btnIcon(material-icons) attribute results in an icon being rendered', function(assert) { const component = this.subject({ btnIcon: 'edit' }); this.render(); assert.equal(component.$('i.material-icons').html(), 'edit', 'Icon should be present'); }); test('btnClass attribute should pass through to the button', function(assert) { const component = this.subject({ btnClass: 'green' }); this.render(); assert.equal(component.$('.btn-floating.green').length, 1, 'Class should be appended to button'); }); test('btn-floating and btn-large classes are on the button by default', function(assert) { const component = this.subject(); this.render(); assert.equal(component.$('.btn-floating.btn-large').length, 1, 'Classes should be present'); }); test('button should be wrapped in a li tag', function(assert) { const component = this.subject(); this.render(); assert.equal(component.$()[0].tagName, 'LI'); assert.equal(component.$('.btn-floating').length, 1, 'Button should be wrapped in a li tag'); }); test('Optionally, users can opt to use small floating buttons', function(assert) { const component = this.subject({ large: false }); this.render(); assert.equal(component.$('.btn-floating').length, 1, 'Button should be in DOM'); assert.equal(component.$('.btn-floating.btn-large').length, 0, 'Button should not be large'); }); ================================================ FILE: tests/unit/components/md-fixed-btns-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-fixed-btns', 'component:md-fixed-btns', { // Specify the other units that are required for this test needs: ['component:md-btn', 'helper:bw-compat-icon'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('btnIcon attribute results in an icon being rendered', function(assert) { const component = this.subject({ btnIcon: 'mdi-content-add' }); this.render(); assert.equal(component.$('i.mdi-content-add').length, 1, 'Icon should be present'); }); test('btnClass attribute should pass through to the button', function(assert) { const component = this.subject({ btnClass: 'green' }); this.render(); assert.equal(component.$('.btn-floating.green').length, 1, 'Class should be appended to button'); }); test('btn-floating and btn-large classes are on the button by default', function(assert) { const component = this.subject(); this.render(); assert.equal(component.$('.btn-floating.btn-large').length, 1, 'Classes should be present'); }); test('Optionally, users can opt to use small floating buttons', function(assert) { const component = this.subject({ large: false }); this.render(); assert.equal(component.$('.btn-floating').length, 1, 'Button should be in DOM'); assert.equal(component.$('.btn-floating.btn-large').length, 0, 'Button should not be large'); }); test('there should be a UL tag to hold child buttons', function(assert) { const component = this.subject(); this.render(); assert.ok(component.$().hasClass('fixed-action-btn')); assert.equal(component.$('ul').length, 1, 'ul should be present'); }); ================================================ FILE: tests/unit/components/md-modal-container-test.js ================================================ import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('md-modal-container', { unit: true // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('it renders', function(assert) { assert.expect(2); // Creates the component instance const component = this.subject(); assert.equal(component._state, 'preRender'); // Renders the component to the page this.render(); assert.equal(component._state, 'inDOM'); }); test('it has the expected ID for md-modal to render into it', function(assert) { assert.expect(1); // Creates the component instance const component = this.subject({ modalContainerId: 'materialize-modal-root-element' }); // Renders the component to the page this.render(); assert.equal( component.$('#materialize-modal-root-element').length, 1, '#materialize-modal-root-element should be in the DOM' ); }); ================================================ FILE: tests/unit/helpers/bw-compat-icon-test.js ================================================ import { bwCompatIcon } from 'dummy/helpers/bw-compat-icon'; import { module, test } from 'qunit'; module('Unit | Helper | bw compat icon'); // Replace this with your real tests. test('it works with the old materialize icons', function(assert) { assert.equal( bwCompatIcon(['mdi-action-android']).toHTML(), ``, 'Correct html for old icons' ); assert.equal( bwCompatIcon(['mdi-action-android blue-text']).toHTML(), ``, 'Correct html for old icons with other classes' ); }); test('it works with the new materialize icons', function(assert) { assert.equal( bwCompatIcon(['all_out']).toHTML(), `all_out`, 'Correct html for new icons' ); assert.equal( bwCompatIcon(['all_out blue-text']).toHTML(), `all_out`, 'Correct html for old icons' ); }); ================================================ FILE: tests/unit/initializers/md-settings-test.js ================================================ import { run } from '@ember/runloop'; import Application from '@ember/application'; import { initialize } from '../../../initializers/md-settings'; import { module, test } from 'qunit'; let container, application; module('Unit | Initializer | md settings', { beforeEach() { run(function() { application = Application.create(); container = application.__container__; application.deferReadiness(); }); } }); // Replace this with your real tests. test('it works', function(assert) { initialize(container, application); // you would normally confirm the results of the initializer here assert.ok(true); }); ================================================ FILE: tests/unit/services/md-settings-test.js ================================================ import { moduleFor, test } from 'ember-qunit'; moduleFor('service:md-settings', 'Unit | Service | md settings', { // Specify the other units that are required for this test. // needs: ['service:foo'] }); // Replace this with your real tests. test('it exists', function(assert) { const service = this.subject(); assert.ok(service); }); ================================================ FILE: vendor/.gitkeep ================================================ ================================================ FILE: vendor/highlight.pack.js ================================================ ! function(e) { "undefined" != typeof exports ? e(exports) : (window.hljs = e({}), "function" == typeof define && define.amd && define("hljs", [], function() { return window.hljs })) }(function(e) { function n(e) { return e.replace(/&/gm, "&").replace(//gm, ">") } function t(e) { return e.nodeName.toLowerCase() } function r(e, n) { var t = e && e.exec(n); return t && 0 == t.index } function a(e) { return /no-?highlight|plain|text/.test(e) } function i(e) { var n, t, r, i = e.className + " "; if (i += e.parentNode ? e.parentNode.className : "", t = /\blang(?:uage)?-([\w-]+)\b/.exec(i)) return E(t[1]) ? t[1] : "no-highlight"; for (i = i.split(/\s+/), n = 0, r = i.length; r > n; n++) if (E(i[n]) || a(i[n])) return i[n] } function o(e, n) { var t, r = {}; for (t in e) r[t] = e[t]; if (n) for (t in n) r[t] = n[t]; return r } function u(e) { var n = []; return function r(e, a) { for (var i = e.firstChild; i; i = i.nextSibling) 3 == i.nodeType ? a += i.nodeValue.length : 1 == i.nodeType && (n.push({ event: "start", offset: a, node: i }), a = r(i, a), t(i).match(/br|hr|img|input/) || n.push({ event: "stop", offset: a, node: i })); return a }(e, 0), n } function c(e, r, a) { function i() { return e.length && r.length ? e[0].offset != r[0].offset ? e[0].offset < r[0].offset ? e : r : "start" == r[0].event ? e : r : e.length ? e : r } function o(e) { function r(e) { return " " + e.nodeName + '="' + n(e.value) + '"' } f += "<" + t(e) + Array.prototype.map.call(e.attributes, r).join("") + ">" } function u(e) { f += "" } function c(e) { ("start" == e.event ? o : u)(e.node) } for (var s = 0, f = "", l = []; e.length || r.length;) { var g = i(); if (f += n(a.substr(s, g[0].offset - s)), s = g[0].offset, g == e) { l.reverse().forEach(u); do c(g.splice(0, 1)[0]), g = i(); while (g == e && g.length && g[0].offset == s); l.reverse().forEach(o) } else "start" == g[0].event ? l.push(g[0].node) : l.pop(), c(g.splice(0, 1)[0]) } return f + n(a.substr(s)) } function s(e) { function n(e) { return e && e.source || e } function t(t, r) { return new RegExp(n(t), "m" + (e.cI ? "i" : "") + (r ? "g" : "")) } function r(a, i) { if (!a.compiled) { if (a.compiled = !0, a.k = a.k || a.bK, a.k) { var u = {}, c = function(n, t) { e.cI && (t = t.toLowerCase()), t.split(" ").forEach(function(e) { var t = e.split("|"); u[t[0]] = [n, t[1] ? Number(t[1]) : 1] }) }; "string" == typeof a.k ? c("keyword", a.k) : Object.keys(a.k).forEach(function(e) { c(e, a.k[e]) }), a.k = u } a.lR = t(a.l || /\b\w+\b/, !0), i && (a.bK && (a.b = "\\b(" + a.bK.split(" ").join("|") + ")\\b"), a.b || (a.b = /\B|\b/), a.bR = t(a.b), a.e || a.eW || (a.e = /\B|\b/), a.e && (a.eR = t(a.e)), a.tE = n(a.e) || "", a.eW && i.tE && (a.tE += (a.e ? "|" : "") + i.tE)), a.i && (a.iR = t(a.i)), void 0 === a.r && (a.r = 1), a.c || (a.c = []); var s = []; a.c.forEach(function(e) { e.v ? e.v.forEach(function(n) { s.push(o(e, n)) }) : s.push("self" == e ? a : e) }), a.c = s, a.c.forEach(function(e) { r(e, a) }), a.starts && r(a.starts, i); var f = a.c.map(function(e) { return e.bK ? "\\.?(" + e.b + ")\\.?" : e.b }).concat([a.tE, a.i]).map(n).filter(Boolean); a.t = f.length ? t(f.join("|"), !0) : { exec: function() { return null } } } } r(e) } function f(e, t, a, i) { function o(e, n) { for (var t = 0; t < n.c.length; t++) if (r(n.c[t].bR, e)) return n.c[t] } function u(e, n) { if (r(e.eR, n)) { for (; e.endsParent && e.parent;) e = e.parent; return e } return e.eW ? u(e.parent, n) : void 0 } function c(e, n) { return !a && r(n.iR, e) } function g(e, n) { var t = N.cI ? n[0].toLowerCase() : n[0]; return e.k.hasOwnProperty(t) && e.k[t] } function h(e, n, t, r) { var a = r ? "" : w.classPrefix, i = '"; return i += e + '">', i + n + o } function p() { if (!L.k) return n(y); var e = "", t = 0; L.lR.lastIndex = 0; for (var r = L.lR.exec(y); r;) { e += n(y.substr(t, r.index - t)); var a = g(L, r); a ? (B += a[1], e += h(a[0], n(r[0]))) : e += n(r[0]), t = L.lR.lastIndex, r = L.lR.exec(y) } return e + n(y.substr(t)) } function d() { var e = "string" == typeof L.sL; if (e && !x[L.sL]) return n(y); var t = e ? f(L.sL, y, !0, M[L.sL]) : l(y, L.sL.length ? L.sL : void 0); return L.r > 0 && (B += t.r), e && (M[L.sL] = t.top), h(t.language, t.value, !1, !0) } function b() { return void 0 !== L.sL ? d() : p() } function v(e, t) { var r = e.cN ? h(e.cN, "", !0) : ""; e.rB ? (k += r, y = "") : e.eB ? (k += n(t) + r, y = "") : (k += r, y = t), L = Object.create(e, { parent: { value: L } }) } function m(e, t) { if (y += e, void 0 === t) return k += b(), 0; var r = o(t, L); if (r) return k += b(), v(r, t), r.rB ? 0 : t.length; var a = u(L, t); if (a) { var i = L; i.rE || i.eE || (y += t), k += b(); do L.cN && (k += ""), B += L.r, L = L.parent; while (L != a.parent); return i.eE && (k += n(t)), y = "", a.starts && v(a.starts, ""), i.rE ? 0 : t.length } if (c(t, L)) throw new Error('Illegal lexeme "' + t + '" for mode "' + (L.cN || "") + '"'); return y += t, t.length || 1 } var N = E(e); if (!N) throw new Error('Unknown language: "' + e + '"'); s(N); var R, L = i || N, M = {}, k = ""; for (R = L; R != N; R = R.parent) R.cN && (k = h(R.cN, "", !0) + k); var y = "", B = 0; try { for (var C, j, I = 0;;) { if (L.t.lastIndex = I, C = L.t.exec(t), !C) break; j = m(t.substr(I, C.index - I), C[0]), I = C.index + j } for (m(t.substr(I)), R = L; R.parent; R = R.parent) R.cN && (k += ""); return { r: B, value: k, language: e, top: L } } catch (O) { if (-1 != O.message.indexOf("Illegal")) return { r: 0, value: n(t) }; throw O } } function l(e, t) { t = t || w.languages || Object.keys(x); var r = { r: 0, value: n(e) }, a = r; return t.forEach(function(n) { if (E(n)) { var t = f(n, e, !1); t.language = n, t.r > a.r && (a = t), t.r > r.r && (a = r, r = t) } }), a.language && (r.second_best = a), r } function g(e) { return w.tabReplace && (e = e.replace(/^((<[^>]+>|\t)+)/gm, function(e, n) { return n.replace(/\t/g, w.tabReplace) })), w.useBR && (e = e.replace(/\n/g, "
    ")), e } function h(e, n, t) { var r = n ? R[n] : t, a = [e.trim()]; return e.match(/\bhljs\b/) || a.push("hljs"), -1 === e.indexOf(r) && a.push(r), a.join(" ").trim() } function p(e) { var n = i(e); if (!a(n)) { var t; w.useBR ? (t = document.createElementNS("http://www.w3.org/1999/xhtml", "div"), t.innerHTML = e.innerHTML.replace(/\n/g, "").replace(//g, "\n")) : t = e; var r = t.textContent, o = n ? f(n, r, !0) : l(r), s = u(t); if (s.length) { var p = document.createElementNS("http://www.w3.org/1999/xhtml", "div"); p.innerHTML = o.value, o.value = c(s, u(p), r) } o.value = g(o.value), e.innerHTML = o.value, e.className = h(e.className, n, o.language), e.result = { language: o.language, re: o.r }, o.second_best && (e.second_best = { language: o.second_best.language, re: o.second_best.r }) } } function d(e) { w = o(w, e) } function b() { if (!b.called) { b.called = !0; var e = document.querySelectorAll("pre code"); Array.prototype.forEach.call(e, p) } } function v() { addEventListener("DOMContentLoaded", b, !1), addEventListener("load", b, !1) } function m(n, t) { var r = x[n] = t(e); r.aliases && r.aliases.forEach(function(e) { R[e] = n }) } function N() { return Object.keys(x) } function E(e) { return x[e] || x[R[e]] } var w = { classPrefix: "hljs-", tabReplace: null, useBR: !1, languages: void 0 }, x = {}, R = {}; return e.highlight = f, e.highlightAuto = l, e.fixMarkup = g, e.highlightBlock = p, e.configure = d, e.initHighlighting = b, e.initHighlightingOnLoad = v, e.registerLanguage = m, e.listLanguages = N, e.getLanguage = E, e.inherit = o, e.IR = "[a-zA-Z]\\w*", e.UIR = "[a-zA-Z_]\\w*", e.NR = "\\b\\d+(\\.\\d+)?", e.CNR = "(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", e.BNR = "\\b(0b[01]+)", e.RSR = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", e.BE = { b: "\\\\[\\s\\S]", r: 0 }, e.ASM = { cN: "string", b: "'", e: "'", i: "\\n", c: [e.BE] }, e.QSM = { cN: "string", b: '"', e: '"', i: "\\n", c: [e.BE] }, e.PWM = { b: /\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/ }, e.C = function(n, t, r) { var a = e.inherit({ cN: "comment", b: n, e: t, c: [] }, r || {}); return a.c.push(e.PWM), a.c.push({ cN: "doctag", b: "(?:TODO|FIXME|NOTE|BUG|XXX):", r: 0 }), a }, e.CLCM = e.C("//", "$"), e.CBCM = e.C("/\\*", "\\*/"), e.HCM = e.C("#", "$"), e.NM = { cN: "number", b: e.NR, r: 0 }, e.CNM = { cN: "number", b: e.CNR, r: 0 }, e.BNM = { cN: "number", b: e.BNR, r: 0 }, e.CSSNM = { cN: "number", b: e.NR + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", r: 0 }, e.RM = { cN: "regexp", b: /\//, e: /\/[gimuy]*/, i: /\n/, c: [e.BE, { b: /\[/, e: /\]/, r: 0, c: [e.BE] }] }, e.TM = { cN: "title", b: e.IR, r: 0 }, e.UTM = { cN: "title", b: e.UIR, r: 0 }, e }); hljs.registerLanguage("css", function(e) { var c = "[a-zA-Z-][a-zA-Z0-9_-]*", a = { cN: "function", b: c + "\\(", rB: !0, eE: !0, e: "\\(" }, r = { cN: "rule", b: /[A-Z\_\.\-]+\s*:/, rB: !0, e: ";", eW: !0, c: [{ cN: "attribute", b: /\S/, e: ":", eE: !0, starts: { cN: "value", eW: !0, eE: !0, c: [a, e.CSSNM, e.QSM, e.ASM, e.CBCM, { cN: "hexcolor", b: "#[0-9A-Fa-f]+" }, { cN: "important", b: "!important" }] } }] }; return { cI: !0, i: /[=\/|'\$]/, c: [e.CBCM, r, { cN: "id", b: /\#[A-Za-z0-9_-]+/ }, { cN: "class", b: /\.[A-Za-z0-9_-]+/ }, { cN: "attr_selector", b: /\[/, e: /\]/, i: "$" }, { cN: "pseudo", b: /:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/ }, { cN: "at_rule", b: "@(font-face|page)", l: "[a-z-]+", k: "font-face page" }, { cN: "at_rule", b: "@", e: "[{;]", c: [{ cN: "keyword", b: /\S+/ }, { b: /\s/, eW: !0, eE: !0, r: 0, c: [a, e.ASM, e.QSM, e.CSSNM] }] }, { cN: "tag", b: c, r: 0 }, { cN: "rules", b: "{", e: "}", i: /\S/, c: [e.CBCM, r] }] } }); hljs.registerLanguage("javascript", function(e) { return { aliases: ["js"], k: { keyword: "in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await", literal: "true false null undefined NaN Infinity", built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise" }, c: [{ cN: "pi", r: 10, b: /^\s*['"]use (strict|asm)['"]/ }, e.ASM, e.QSM, { cN: "string", b: "`", e: "`", c: [e.BE, { cN: "subst", b: "\\$\\{", e: "\\}" }] }, e.CLCM, e.CBCM, { cN: "number", v: [{ b: "\\b(0[bB][01]+)" }, { b: "\\b(0[oO][0-7]+)" }, { b: e.CNR }], r: 0 }, { b: "(" + e.RSR + "|\\b(case|return|throw)\\b)\\s*", k: "return throw case", c: [e.CLCM, e.CBCM, e.RM, { b: /\s*[);\]]/, r: 0, sL: "xml" }], r: 0 }, { cN: "function", bK: "function", e: /\{/, eE: !0, c: [e.inherit(e.TM, { b: /[A-Za-z$_][0-9A-Za-z$_]*/ }), { cN: "params", b: /\(/, e: /\)/, eB: !0, eE: !0, c: [e.CLCM, e.CBCM], i: /["'\(]/ }], i: /\[|%/ }, { b: /\$[(.]/ }, { b: "\\." + e.IR, r: 0 }, { bK: "import", e: "[;$]", k: "import from as", c: [e.ASM, e.QSM] }, { cN: "class", bK: "class", e: /[{;=]/, eE: !0, i: /[:"\[\]]/, c: [{ bK: "extends" }, e.UTM] }], i: /#/ } }); hljs.registerLanguage("xml", function(t) { var s = "[A-Za-z0-9\\._:-]+", c = { b: /<\?(php)?(?!\w)/, e: /\?>/, sL: "php" }, e = { eW: !0, i: /]+/ }] }] }] }; return { aliases: ["html", "xhtml", "rss", "atom", "xsl", "plist"], cI: !0, c: [{ cN: "doctype", b: "", r: 10, c: [{ b: "\\[", e: "\\]" }] }, t.C("", { r: 10 }), { cN: "cdata", b: "<\\!\\[CDATA\\[", e: "\\]\\]>", r: 10 }, { cN: "tag", b: "|$)", e: ">", k: { title: "style" }, c: [e], starts: { e: "", rE: !0, sL: "css" } }, { cN: "tag", b: "|$)", e: ">", k: { title: "script" }, c: [e], starts: { e: "", rE: !0, sL: ["actionscript", "javascript", "handlebars"] } }, c, { cN: "pi", b: /<\?\w+/, e: /\?>/, r: 10 }, { cN: "tag", b: "", c: [{ cN: "title", b: /[^ \/><\n\t]+/, r: 0 }, e] }] } }); hljs.registerLanguage("json", function(e) { var t = { literal: "true false null" }, i = [e.QSM, e.CNM], l = { cN: "value", e: ",", eW: !0, eE: !0, c: i, k: t }, c = { b: "{", e: "}", c: [{ cN: "attribute", b: '\\s*"', e: '"\\s*:\\s*', eB: !0, eE: !0, c: [e.BE], i: "\\n", starts: l }], i: "\\S" }, n = { b: "\\[", e: "\\]", c: [e.inherit(l, { cN: null })], i: "\\S" }; return i.splice(i.length, 0, c, n), { c: i, k: t, i: "\\S" } });