-
Notifications
You must be signed in to change notification settings - Fork 25
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
9 changed files
with
112 additions
and
99 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
69 changes: 28 additions & 41 deletions
69
addon/templates/components/frost-list-content-container.hbs
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,44 +1,31 @@ | ||
{{! Template for the frost-list-content-container component }} | ||
{{#vertical-collection | ||
alwaysRemeasure=true | ||
alwaysUseDefaultHeight=alwaysUseDefaultHeight | ||
bufferSize=bufferSize | ||
content=items | ||
defaultHeight=defaultHeight | ||
firstReached=onLoadPrevious | ||
lastReached=onLoadNext | ||
scrollPosition=scrollTop | ||
useContentProxy=false | ||
|
||
{{#if pagination}} | ||
{{#frost-scroll | ||
hook=(concat hookPrefix '-scroll') | ||
}} | ||
{{#each items as |model index|}} | ||
{{yield model index}} | ||
{{else}} | ||
{{yield to="inverse"}} | ||
{{/each}} | ||
{{/frost-scroll}} | ||
{{else}} | ||
{{#vertical-collection | ||
alwaysRemeasure=true | ||
alwaysUseDefaultHeight=alwaysUseDefaultHeight | ||
bufferSize=bufferSize | ||
content=items | ||
defaultHeight=defaultHeight | ||
firstReached=onLoadPrevious | ||
lastReached=onLoadNext | ||
scrollPosition=scrollTop | ||
useContentProxy=false | ||
|
||
key='@identity' | ||
resizeDebounce=64 | ||
firstVisibleChanged=null | ||
lastVisibleChanged=null | ||
didMountCollection=null | ||
idForFirstItem=null | ||
renderFromLast=false | ||
renderAllInitially=false | ||
shouldRender=true | ||
minimumMovement=15 | ||
containerSelector=null | ||
containerHeight=null | ||
key='@identity' | ||
resizeDebounce=64 | ||
firstVisibleChanged=null | ||
lastVisibleChanged=null | ||
didMountCollection=null | ||
idForFirstItem=null | ||
renderFromLast=false | ||
renderAllInitially=false | ||
shouldRender=true | ||
minimumMovement=15 | ||
containerSelector=null | ||
containerHeight=null | ||
|
||
as |model index| | ||
}} | ||
{{yield model index}} | ||
{{else}} | ||
{{yield to="inverse"}} | ||
{{/vertical-collection}} | ||
{{/if}} | ||
as |model index| | ||
}} | ||
{{yield model index}} | ||
{{else}} | ||
{{yield to="inverse"}} | ||
{{/vertical-collection}} |
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 |
---|---|---|
@@ -1,15 +1,31 @@ | ||
const blueprintHelper = require('ember-frost-core/blueprint-helper') | ||
|
||
module.exports = { | ||
afterInstall: function () { | ||
return this.addAddonsToProject({ | ||
packages: [ | ||
{name: 'ember-frost-core', target: '^1.5.1'}, | ||
{name: 'ember-frost-sort', target: '^7.0.0'}, | ||
{name: 'ember-math-helpers', target: '^2.0.0'}, | ||
{name: 'smoke-and-mirrors', target: '~0.6.2'} | ||
] | ||
afterInstall: function (options) { | ||
const addonsToAdd = [ | ||
{name: 'ember-frost-core', target: '^1.14.3'}, | ||
{name: 'ember-frost-sort', target: '^7.0.0'}, | ||
{name: 'ember-math-helpers', target: '^2.0.0'}, | ||
{name: 'smoke-and-mirrors', target: 'github:ciena-frost/smoke-and-mirrors'} | ||
] | ||
|
||
// Get the packages installed in the consumer app/addon. Packages that are already installed in the consumer within | ||
// the required semver range will not be re-installed or have blueprints re-run. | ||
const consumerPackages = blueprintHelper.consumer.getPackages(options) | ||
|
||
// Get the packages to install (not already installed) from a list of potential packages | ||
return blueprintHelper.packageHandler.getPkgsToInstall(addonsToAdd, consumerPackages).then((pkgsToInstall) => { | ||
if (pkgsToInstall.length !== 0) { | ||
// Call the blueprint hook | ||
return this.addAddonsToProject({ | ||
packages: pkgsToInstall | ||
}) | ||
} | ||
}) | ||
}, | ||
|
||
normalizeEntityName: function () { | ||
// this prevents an error when the entityName is | ||
// not specified (since that doesn't actually matter to us) | ||
} | ||
} |
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