Skip to content

Commit

Permalink
Merge pull request #1201 from Subtletree/update-blocking-dependencies…
Browse files Browse the repository at this point in the history
…-and-code

Update blocking dependencies and codebase
  • Loading branch information
Subtletree authored Jan 24, 2022
2 parents 1c23f2e + f710607 commit b8401c6
Show file tree
Hide file tree
Showing 142 changed files with 42,280 additions and 13,491 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
48 changes: 26 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use strict';

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
legacyDecorators: true,
},
},
plugins: [
'ember'
],
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
Expand All @@ -20,21 +20,22 @@ module.exports = {
},
rules: {
'ember/no-jquery': 'error',
'ember/no-new-mixins': 'off'
'ember/no-new-mixins': 'off',
'ember/no-classic-classes': 'off'
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js',
'lib/**/*.js'
'./.eslintrc.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
excludedFiles: [
'addon/**',
Expand All @@ -43,16 +44,19 @@ module.exports = {
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script'
sourceType: 'script',
},
env: {
browser: false,
node: true
node: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
extends: ['plugin:node/recommended'],
},
{
// Test files:
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
],
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
/.editorconfig
/.ember-cli
/.env*
/.eslintcache
/.eslintignore
/.eslintrc.js
/.git/
/.gitignore
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand All @@ -23,6 +26,7 @@
/ember-cli-build.js
/testem.js
/tests/
/yarn-error.log
/yarn.lock
.gitkeep

Expand Down
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "10"
- "12"

dist: trusty
dist: xenial

addons:
chrome: stable
Expand Down Expand Up @@ -35,26 +35,27 @@ jobs:
- stage: "Tests"
name: "Tests"
script:
- npm run lint:hbs
- npm run lint:js
- npm test
- npm run lint
- npm run test:ember

- stage: "Additional Tests"
name: "Floating Dependencies"
install:
- npm install --no-package-lock
script:
- npm test
- npm run test:ember

# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- env: EMBER_TRY_SCENARIO=ember-lts-3.12
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
- env: EMBER_TRY_SCENARIO=ember-classic
- env: EMBER_TRY_SCENARIO=embroider-safe
- env: EMBER_TRY_SCENARIO=embroider-optimized

script:
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Ember Paper Changelog

### 1.0.0-beta.36
- [#1201](https://github.com/miguelcobain/ember-paper/pull/1201) BREAKING - update blocking dependencies and codebase
- Requires ember version >=3.20.0 < 4.0.0.
- Updated `ember-basic-dropdown` and `ember-power-select` to latest versions which use glimmer components. Will be breaking for applications with custom components that extend `paper-select` or `paper-autocomplete`.
### 1.0.0-beta.35
- [09886b7](https://github.com/miguelcobain/ember-paper/commit/09886b7b68bc4cdb2dc163c72b598224ef842a4b) bump `ember-cli-polyfill-importer` version again. Turns out the previous version didn't fix all of the problems.

Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@

## Linting

* `npm run lint:hbs`
* `npm run lint:js`
* `npm run lint:js -- --fix`
* `npm run lint`
* `npm run lint:fix`

## Running tests

Expand All @@ -23,4 +22,4 @@
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020
Copyright (c) 2021

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:

Expand Down
13 changes: 0 additions & 13 deletions addon/components/paper-autocomplete/options/component.js

This file was deleted.

3 changes: 3 additions & 0 deletions addon/components/paper-autocomplete/options/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PowerSelectOptions from 'ember-power-select/components/power-select/options';

export default class PaperAutocompleteOptions extends PowerSelectOptions {}
35 changes: 7 additions & 28 deletions addon/components/paper-autocomplete/reset-button/component.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
import Component from '@ember/component';
import TransitionMixin from 'ember-css-transitions/mixins/transition-mixin';

import { tagName, attribute } from '@ember-decorators/component';
import template from './template';
import { tagName, layout } from '@ember-decorators/component';

@tagName('button')
class PaperAutocompleteResetButton extends Component.extend(TransitionMixin) {
@tagName('')
@layout(template)
export default class PaperAutocompleteResetButton extends Component {

@attribute
type = 'button';

@attribute
tabindex = '-1';

transitionClass = 'ng';
onReset = null;

click(e) {
let onReset = this.get('onReset');
if (onReset === null) {
return;
}
onReset(e);
}

didTransitionOut() {
super.didTransitionOut(...arguments);
if (this.onDidTransitionOut) {
this.onDidTransitionOut();
}
handleClick(onReset, e) {
if (onReset) { onReset(e) }
}
}

export default PaperAutocompleteResetButton;
8 changes: 8 additions & 0 deletions addon/components/paper-autocomplete/reset-button/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<button
{{on 'click' (fn this.handleClick @onReset)}}
{{css-transition 'ng' didTransitionOut=@onDidTransitionOut}}
type="button"
tabindex="-1"
...attributes>
{{yield}}
</button>
6 changes: 3 additions & 3 deletions addon/components/paper-autocomplete/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

@calculatePosition={{this.calculatePosition}}
@extra={{hash label=@label labelPath=@labelPath required=@required passThru=@passThru inputClass=@inputClass}}
@_ebdTriggerComponent={{component "paper-autocomplete/ebd-trigger" label=@label disabled=@disabled}}
@ebdTriggerComponent={{component "paper-autocomplete/ebd-trigger" label=@label disabled=@disabled}}
@triggerComponent={{component "paper-autocomplete/eps-trigger" isTouched=this.isTouched hideAllMessages=@hideAllMessages validationErrorMessages=@validationErrorMessages errors=@errors}}

@_ebdContentComponent={{component "paper-autocomplete/ebd-content" select=this.publicAPI}}
@ebdContentComponent={{component "paper-autocomplete/ebd-content" select=this.publicAPI}}
@optionsComponent="paper-autocomplete/options"
@noMatchesMessageComponent={{component "paper-autocomplete/no-matches-message" onCreate=this._onCreate}}
@onClose={{this.close}}
Expand All @@ -35,7 +35,7 @@
@scrollTo={{this.scrollTo}}
@onKeydown={{@onKeydown}}
as |option term|>
{{#if hasBlock}}
{{#if (has-block)}}
{{yield option term}}
{{else}}
<PaperAutocomplete::Highlight
Expand Down
49 changes: 11 additions & 38 deletions addon/components/paper-backdrop.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,25 @@
/**
* @module ember-paper
*/
import { bool } from '@ember/object/computed';

import Component from '@ember/component';
import { computed } from '@ember/object';
import { htmlSafe } from '@ember/string';
import TransitionMixin from 'ember-css-transitions/mixins/transition-mixin';
import { invokeAction } from 'ember-invoke-action';
import layout from '../templates/components/paper-backdrop';
/**
* @class PaperBackdrop
* @extends Ember.Component
* @uses TransitionMixin
*/
export default Component.extend(TransitionMixin, {

tagName: 'md-backdrop',
classNames: ['md-default-theme'],
classNameBindings: ['opaque:md-opaque', 'isLockedOpen:md-locked-open'],
attributeBindings: ['backdropStyle:style'],

// TransitionMixin:
transitionName: 'ng',
shouldTransition: bool('opaque'),
export default Component.extend({
layout,
tagName: '',

backdropStyle: computed('fixed', function() {
return this.get('fixed') ? htmlSafe('position:fixed;') : null;
}),
// addDestroyedElementClone(original, clone) {
// if (original.parentNode) {
// original.parentNode.appendChild(clone);
// }
// },

addDestroyedElementClone(original, clone) {
if (original.parentNode) {
original.parentNode.appendChild(clone);
}
},

sendClickAction(e) {
sendClickAction(onClick, e) {
e.preventDefault();
invokeAction(this, 'onClick', e);
},

click(e) {
this.sendClickAction(e);
},

// needed for iOS
// iOS doesn't trigger a click event on normal divs
// unless we use `cursor: pointer` css
touchEnd(e) {
this.sendClickAction(e);
if (onClick) { onClick(e); }
}
});
Loading

0 comments on commit b8401c6

Please sign in to comment.