Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix embroider-optimized #1532

Merged
merged 9 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/cibernox/ember-power-select.svg?branch=master)](https://travis-ci.org/cibernox/ember-power-select)
[![CI](https://github.com/cibernox/ember-power-select/actions/workflows/ci.yml/badge.svg)](https://github.com/cibernox/ember-power-select/actions/workflows/ci.yml)
[![Ember Observer Score](http://emberobserver.com/badges/ember-power-select.svg)](http://emberobserver.com/addons/ember-power-select)
[![Code Climate](https://codeclimate.com/github/cibernox/ember-power-select/badges/gpa.svg)](https://codeclimate.com/github/cibernox/ember-power-select)
[![npm version](https://badge.fury.io/js/ember-power-select.svg)](https://badge.fury.io/js/ember-power-select)
Expand Down
6 changes: 5 additions & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ module.exports = async function () {
},
},
embroiderSafe(),
embroiderOptimized(),
embroiderOptimized({
npm: {
devDependencies: { 'ember-data': '^4.6.0' },
},
}),
],
};
};
6 changes: 6 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ module.exports = function (defaults) {
package: 'qunit',
},
],
packageRules: [
{
package: 'ember-power-select',
semverRange: '*',
},
],
});
};
316 changes: 144 additions & 172 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-code-example-component": "^0.4.0",
"ember-code-snippet": "^2.4.0",
"ember-data": "^3.21.0",
"ember-data": "^3.28.9",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.1.0",
Expand Down
9 changes: 9 additions & 0 deletions tests/dummy/app/components/custom-group-component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable ember/classic-decorator-hooks, ember/require-tagless-components */
import Component from '@ember/component';

export default class CustomGroupComponent extends Component {
init() {
super.init(...arguments);
this.onInit?.bind(this)();
}
}
4 changes: 4 additions & 0 deletions tests/dummy/app/components/list-of-countries.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-disable ember/require-tagless-components */
import Component from '@ember/component';

export default class ListOfCountriesComponent extends Component {}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button class="custom-after-options2-button" type="button" onclick={{@extra.passedAction}}>Do something</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p id="custom-after-options-p-tag">Customized after options!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<button class="custom-before-options2-button" type="button" onclick={{@extra.passedAction}}>Do something</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<p id='custom-before-options-p-tag'>
{{@placeholder}}
</p>
{{component
(ensure-safe-component @placeholderComponent)
placeholder=@placeholder
}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="custom-component">{{yield}}</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p id="custom-no-matches-message-p-tag">{{@noMatchesMessage}}</p>
7 changes: 7 additions & 0 deletions tests/dummy/app/templates/components/custom-placeholder.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class='ember-power-select-placeholder'>
This is a very
<span style='font-weight:bold'>
bold
</span>
placeholder
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p id="custom-search-message-p-tag">Customized seach message!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div class="custom-trigger-component">{{@loadingMessage}}</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<input type="text" id="focusable-input" onFocus={{@onFocus}}>
18 changes: 18 additions & 0 deletions tests/dummy/app/templates/components/list-of-countries.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<p>
Countries:
</p>
<ul>
{{#if @extra.field}}
{{#each @options as |option index|}}
<li>
{{index}}. {{get option @extra.field}}
</li>
{{/each}}
{{else}}
{{#each @options as |option index|}}
<li>
{{index}}. {{option.name}}
</li>
{{/each}}
{{/if}}
</ul>
6 changes: 6 additions & 0 deletions tests/dummy/app/templates/components/selected-country.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<img
src={{@select.selected.flagUrl}}
class='icon-flag {{if @extra.coolFlagIcon 'cool-flag-icon'}}'
alt='Flag of {{@select.selected.name}}'
/>
{{@select.selected.name}}
Loading