forked from peopledoc/ember-parachute
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
178 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ export default function withParachute(desc) { | |
klass.reopen(new QueryParams().Mixin); | ||
|
||
return klass; | ||
} | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ export default class QueryParams { | |
static metaFor(controller) { | ||
assert( | ||
`[ember-parachute] The controller '${controller}' is not set up with ember-parachute.`, | ||
this.hasParachute(controller) | ||
this.hasParachute(controller), | ||
); | ||
return get(controller, PARACHUTE_META); | ||
} | ||
|
@@ -114,7 +114,7 @@ export default class QueryParams { | |
return qps; | ||
}, | ||
{}, | ||
undefined | ||
undefined, | ||
); | ||
} | ||
|
||
|
@@ -150,7 +150,7 @@ export default class QueryParams { | |
return defaults; | ||
}, | ||
{}, | ||
undefined | ||
undefined, | ||
); | ||
|
||
setProperties(controller, defaults); | ||
|
@@ -171,7 +171,7 @@ export default class QueryParams { | |
let { queryParams } = this.metaFor(controller); | ||
assert( | ||
`[ember-parachute] The query parameter '${param}' does not exist.`, | ||
queryParams[param] | ||
queryParams[param], | ||
); | ||
set(queryParams[param], 'defaultValue', defaultValue); | ||
} | ||
|
@@ -195,11 +195,8 @@ export default class QueryParams { | |
* @returns {Ember.Mixin} | ||
*/ | ||
_generateMixin() { | ||
let { | ||
queryParams, | ||
defaultValues, | ||
qpMapForController | ||
} = this._generateMeta(); | ||
let { queryParams, defaultValues, qpMapForController } = | ||
this._generateMeta(); | ||
|
||
let ControllerMixin = Mixin.create(defaultValues, { | ||
/** | ||
|
@@ -230,7 +227,7 @@ export default class QueryParams { | |
* @public | ||
* @property {Ember.ComputedProperty} | ||
*/ | ||
allQueryParams: computed(...keys(queryParams), function() { | ||
allQueryParams: computed(...keys(queryParams), function () { | ||
return QueryParams.queryParamsFor(this); | ||
}).readOnly(), | ||
|
||
|
@@ -243,9 +240,9 @@ export default class QueryParams { | |
queryParamsState: computed( | ||
...keys(queryParams), | ||
`${PARACHUTE_META}[email protected]`, | ||
function() { | ||
function () { | ||
return QueryParams.stateFor(this); | ||
} | ||
}, | ||
).readOnly(), | ||
|
||
/** | ||
|
@@ -269,7 +266,7 @@ export default class QueryParams { | |
*/ | ||
setDefaultQueryParamValue(key, defaultValue) { | ||
QueryParams.setDefaultValue(this, key, defaultValue); | ||
} | ||
}, | ||
}); | ||
|
||
return ControllerMixin; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
export { default, initialize } from 'ember-parachute/initializers/ember-parachute'; | ||
export { | ||
default, | ||
initialize, | ||
} from 'ember-parachute/initializers/ember-parachute'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.