Skip to content
Open
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 addon/components/md-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default Component.extend({
}),

_pages: computed('windowRange.low', 'windowRange.high', 'current', function() {
const a = new A([]);
const a = A([]);
const winRange = this.get('windowRange');
const current = this.get('current');
for (let i = winRange.low; i <= winRange.high; i += 1) {
Expand Down
2 changes: 1 addition & 1 deletion addon/components/md-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default Component.extend(ParentComponentSupport, {
},

columnComponents: computed('composableChildren', function() {
return new A(this.get('composableChildren'));
return A(this.get('composableChildren'));
}).readOnly(),

registerChildComponent(childComponent) {
Expand Down
2 changes: 1 addition & 1 deletion addon/components/md-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default Component.extend(ParentComponentSupport, {
_content: computed('content.[]', 'optionLabelPath', 'optionValuePath', function() {
const labelPath = this.get('optionLabelPath');
const valuePath = this.get('optionValuePath');
return new A(
return A(
(this.get('content') || []).map(contentItem => ({
id: contentItem[valuePath],
title: contentItem[labelPath]
Expand Down
4 changes: 2 additions & 2 deletions addon/components/selectable-item-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default Component.extend(ParentComponentSupport, {
init() {
this._super(...arguments);
if (this.get('selection') === null && !!this.get('multiple')) {
this.set('selection', new A([]));
this.set('selection', A([]));
}
},

Expand Down Expand Up @@ -70,7 +70,7 @@ export default Component.extend(ParentComponentSupport, {
_content: computed('content.[]', '_valuePath', '_labelPath', function() {
const valuePath = get(this, '_valuePath');
const labelPath = get(this, '_labelPath');
const content = get(this, 'content') || new A([]);
const content = get(this, 'content') || A([]);

if (valuePath && labelPath) {
return A(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"ember-cli-uglify": "3.0.0",
"ember-cli-version-checker": "3.0.1",
"ember-code-snippet": "2.4.0",
"ember-composability": "1.0.1",
"ember-composability": "git://github.com/jacobq/ember-composability.git#30b10d71562b08af9ad5cecc1506953aec46392e",
"ember-disable-prototype-extensions": "1.1.3",
"ember-export-application-global": "2.0.1",
"ember-keyboard": "4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Controller from '@ember/controller';

export default Controller.extend({
// eslint-disable-next-line
demoSections: new A([
demoSections: A([
{ name: 'Badges', route: 'badges' },
{ name: 'Buttons', route: 'buttons' },
{ name: 'Cards', route: 'cards' },
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/controllers/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { A } from '@ember/array';

export default Controller.extend({
// eslint-disable-next-line
myData: new A(['hello', 'world']),
myData: A(['hello', 'world']),

actions: {
debug() {
Expand Down
16 changes: 8 additions & 8 deletions tests/dummy/app/controllers/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import AnchorControllerSupport from 'ember-anchor/mixins/controller-support';

export default Controller.extend(AnchorControllerSupport, {
//eslint-disable-next-line
colorBases: new A([
colorBases: A([
'pink',
'red',
'deep-orange',
Expand All @@ -23,9 +23,9 @@ export default Controller.extend(AnchorControllerSupport, {
'deep-purple'
]),
//eslint-disable-next-line
boringColorBases: new A(['brown', 'grey', 'blue-grey']),
boringColorBases: A(['brown', 'grey', 'blue-grey']),
//eslint-disable-next-line
colorVariants: new A([
colorVariants: A([
'lighten-5',
'lighten-4',
'lighten-3',
Expand All @@ -38,33 +38,33 @@ export default Controller.extend(AnchorControllerSupport, {
'darken-4'
]),
//eslint-disable-next-line
accentColorVariants: new A(['accent-1', 'accent-2', 'accent-3', 'accent-4']),
accentColorVariants: A(['accent-1', 'accent-2', 'accent-3', 'accent-4']),

colors: computed('colorBases.[]', 'colorVariants.[]', function() {
return new A(
return 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)
variants: A(variants)
};
})
);
}),

boringColors: computed('boringColorBases.[]', 'colorVariants.[]', function() {
return new A(
return 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)
variants: A(variants)
};
})
);
Expand Down
12 changes: 6 additions & 6 deletions tests/dummy/app/controllers/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function asJSON(propKey) {

export default Controller.extend({
//eslint-disable-next-line
frameworks: new A([
frameworks: A([
{
id: 1,
value: 'Materialize CSS'
Expand Down Expand Up @@ -70,7 +70,7 @@ export default Controller.extend({
radioSelection: 2,
otherRadioSelection: 'green',
//eslint-disable-next-line
radioChoices: new A([
radioChoices: A([
{
id: 1,
text: 'One'
Expand All @@ -85,9 +85,9 @@ export default Controller.extend({
radioChoicesString: asJSON('radioChoices'),

//eslint-disable-next-line
checkboxSelections: new A([3, 4]),
checkboxSelections: A([3, 4]),
//eslint-disable-next-line
checkboxChoices: new A([
checkboxChoices: A([
{
id: 3,
label: 'Three'
Expand All @@ -104,7 +104,7 @@ export default Controller.extend({

switchesChoicesString: asJSON('switchesChoices'),
//eslint-disable-next-line
switchesChoices: new A([
switchesChoices: A([
{
key: 6,
name: 'Six'
Expand All @@ -119,7 +119,7 @@ export default Controller.extend({
}
]),
//eslint-disable-next-line
switchesSelections: new A([7]),
switchesSelections: A([7]),
switchesSelection: 7,
switchesSelectionString: asJSON('switchesSelection'),
switchesSelectionsString: asJSON('switchesSelections'),
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/controllers/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ 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' }]),
basicTabsContent: A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]),
//eslint-disable-next-line
alternateTabsContent: new A([
alternateTabsContent: A([
{ key: 'a', label: 'First' },
{ key: 'b', label: 'Second' },
{ key: 'c', label: 'Third' }
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/routes/tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { A } from '@ember/array';
export default Route.extend({
model() {
// BEGIN-SNIPPET table-route
let content = new A([
let content = A([
{ id: 'white', name: 'Walter White', route: 'tabs' },
{ id: 'pinkman', name: 'Jesse Pinkman', route: 'modal' },
{ id: 'freng', name: 'Gustavo Freng', route: 'collection' }
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/components/materialize-tabs-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('it renders', function(assert) {
const component = this.subject();

component.setProperties({
content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]),
content: A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]),
selected: 'a'
});

Expand All @@ -34,7 +34,7 @@ test('programatically setting selected tab', function(assert) {
const component = this.subject();

component.setProperties({
content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]),
content: A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }]),
selected: 'a'
});
this.render();
Expand Down Expand Up @@ -69,7 +69,7 @@ test('No initial selection - first tab should be selected', function(assert) {
const component = this.subject();

component.setProperties({
content: new A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }])
content: A([{ id: 'a', title: 'First' }, { id: 'b', title: 'Second' }, { id: 'c', title: 'Third' }])
});

run(() => {
Expand All @@ -94,7 +94,7 @@ test('Empty content - should render an empty UL', function(assert) {
const component = this.subject();

component.setProperties({
content: new A([])
content: A([])
});
this.render();
assert.equal(component.$('.materialize-tabs-tab').length, 0, 'No tabs should be rendered');
Expand All @@ -108,7 +108,7 @@ test('Col width - should result in the correct CSS classes', function(assert) {
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' }])
content: 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');
Expand Down
42 changes: 8 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5340,7 +5340,7 @@ debug@^3.0.1, debug@^3.1.0, debug@^3.1.1:
dependencies:
ms "^2.1.1"

debuglog@*, debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
Expand Down Expand Up @@ -6149,10 +6149,9 @@ ember-compatibility-helpers@^1.1.1:
ember-cli-version-checker "^2.1.1"
semver "^5.4.1"

ember-composability@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ember-composability/-/ember-composability-1.0.1.tgz#c9d167f7c24c67fee03ae6c91b9059c06a849b63"
integrity sha512-F+PxGBgWlaadZmEKKpKKwCn0VRXZF4wzeOlPLlCNMxP+ykbeko6cF0RdHjlfHPW+BCz+YvuwpWGCVMtuUbujdQ==
"ember-composability@git://github.com/jacobq/ember-composability.git#30b10d71562b08af9ad5cecc1506953aec46392e":
version "0.0.0-development"
resolved "git://github.com/jacobq/ember-composability.git#30b10d71562b08af9ad5cecc1506953aec46392e"
dependencies:
"@ember/ordered-set" "^2.0.3"
ember-cli-babel "^7.0.0"
Expand Down Expand Up @@ -8321,7 +8320,7 @@ import-lazy@^2.1.0:
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=

imurmurhash@*, imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
Expand Down Expand Up @@ -9412,11 +9411,6 @@ lodash._baseflatten@^3.0.0:
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"

lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=

lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
Expand All @@ -9425,16 +9419,11 @@ lodash._baseuniq@~4.6.0:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"

lodash._bindcallback@*, lodash._bindcallback@^3.0.0:
lodash._bindcallback@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=

lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=

lodash._createassigner@^3.0.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
Expand All @@ -9444,19 +9433,12 @@ lodash._createassigner@^3.0.0:
lodash._isiterateecall "^3.0.0"
lodash.restparam "^3.0.0"

lodash._createcache@*:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
dependencies:
lodash._getnative "^3.0.0"

lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=

lodash._getnative@*, lodash._getnative@^3.0.0:
lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
Expand Down Expand Up @@ -9594,7 +9576,7 @@ lodash.omit@^4.1.0:
resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60"
integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=

lodash.restparam@*, lodash.restparam@^3.0.0:
lodash.restparam@^3.0.0:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=
Expand Down Expand Up @@ -10637,7 +10619,6 @@ npm@^6.10.3:
cmd-shim "^3.0.3"
columnify "~1.5.4"
config-chain "^1.1.12"
debuglog "*"
detect-indent "~5.0.0"
detect-newline "^2.1.0"
dezalgo "~1.0.3"
Expand All @@ -10652,7 +10633,6 @@ npm@^6.10.3:
has-unicode "~2.0.1"
hosted-git-info "^2.8.8"
iferr "^1.0.2"
imurmurhash "*"
infer-owner "^1.0.4"
inflight "~1.0.6"
inherits "^2.0.4"
Expand All @@ -10671,14 +10651,8 @@ npm@^6.10.3:
libnpx "^10.2.4"
lock-verify "^2.1.0"
lockfile "^1.0.4"
lodash._baseindexof "*"
lodash._baseuniq "~4.6.0"
lodash._bindcallback "*"
lodash._cacheindexof "*"
lodash._createcache "*"
lodash._getnative "*"
lodash.clonedeep "~4.5.0"
lodash.restparam "*"
lodash.union "~4.6.0"
lodash.uniq "~4.5.0"
lodash.without "~4.4.0"
Expand Down