-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from thoov/embrodier-improvements
- Loading branch information
Showing
12 changed files
with
484 additions
and
231 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
import { macroCondition, dependencySatisfies, importSync } from '@embroider/macros'; | ||
import { ensureSafeComponent } from '@embroider/util'; | ||
import Component from '@ember/component'; | ||
import { computed } from '@ember/object'; | ||
import { assert } from '@ember/debug'; | ||
import layout from './template'; | ||
|
||
let LiquidIf, hasRealLiquidIf; | ||
if (macroCondition(dependencySatisfies('liquid-fire', '*'))) { | ||
LiquidIf = importSync('liquid-fire/components/liquid-if').default; | ||
hasRealLiquidIf = true; | ||
} else { | ||
hasRealLiquidIf = false; | ||
} | ||
|
||
export default Component.extend({ | ||
layout, | ||
|
||
classNames: ['cp-Panel-body'], | ||
classNameBindings: ['isOpen:cp-is-open'] | ||
classNameBindings: ['isOpen:cp-is-open'], | ||
|
||
}); | ||
// ideally we'd use a getter here, but that requires Ember 3.16+ | ||
'liquidif': computed(function() { | ||
assert('ember-collapsible-panel\'s cp-panel-body component requires liquid-fire to be present if `shouldAnimate` is used', hasRealLiquidIf); | ||
return ensureSafeComponent(LiquidIf, this); | ||
}), | ||
}); |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,16 +1,6 @@ | ||
/*jshint node:true*/ | ||
'use strict'; | ||
|
||
var VersionChecker = require('ember-cli-version-checker'); | ||
|
||
module.exports = function( environment, appConfig, addon ) { | ||
appConfig['ember-collapsible-panel'] = appConfig['ember-collapsible-panel'] || {}; | ||
|
||
var checker = new VersionChecker(addon); | ||
var dep = checker.for('liquid-fire', 'npm'); | ||
var hasLiquidFire = dep.version; | ||
|
||
appConfig['ember-collapsible-panel']['hasLiquidFire'] = hasLiquidFire; | ||
|
||
return appConfig; | ||
}; | ||
module.exports = function() { | ||
return {}; | ||
} |
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,19 +1,5 @@ | ||
'use strict'; | ||
|
||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
module.exports = { | ||
name: 'ember-collapsible-panel', | ||
|
||
config: function (env, baseConfig) { | ||
var configPath = path.join(this.root, 'config', 'environment.js'); | ||
|
||
if (fs.existsSync(configPath)) { | ||
var configGenerator = require(configPath); | ||
|
||
return configGenerator(env, baseConfig, this); | ||
} | ||
} | ||
|
||
name: require('./package').name, | ||
}; |
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 |
---|---|---|
|
@@ -5,22 +5,26 @@ | |
"keywords": [ | ||
"ember-addon" | ||
], | ||
"homepage": "https://adopted-ember-addons.github.io/ember-collapsible-panel/", | ||
"bugs": { | ||
"url": "https://github.com/adopted-ember-addons/ember-collapsible-panel/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/adopted-ember-addons/ember-collapsible-panel.git" | ||
}, | ||
"license": "MIT", | ||
"author": "TEDconf and contributors", | ||
"contributors": [ | ||
{ | ||
"email": "[email protected]", | ||
"name": "Alon Bukai" | ||
"name": "Alon Bukai", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"directories": { | ||
"doc": "doc", | ||
"test": "tests" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/adopted-ember-addons/ember-collapsible-panel.git" | ||
}, | ||
"scripts": { | ||
"build": "ember build", | ||
"lint:js": "eslint .", | ||
|
@@ -29,12 +33,14 @@ | |
"test:ember": "ember test" | ||
}, | ||
"dependencies": { | ||
"@embroider/macros": "^0.47.2", | ||
"@embroider/util": "^0.47.2", | ||
"ember-cli-babel": "^7.26.6", | ||
"ember-cli-htmlbars": "^6.0.0", | ||
"ember-cli-version-checker": "^5.1.2" | ||
"ember-cli-htmlbars": "^6.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ember/test-helpers": "^2.6.0", | ||
"@embroider/test-setup": "^0.47.2", | ||
"bootstrap": "^3.3.7", | ||
"broccoli-asset-rev": "^3.0.0", | ||
"ember-auto-import": "^2.2.3", | ||
|
@@ -56,11 +62,11 @@ | |
"ember-source": "~3.28.0", | ||
"ember-source-channel-url": "^3.0.0", | ||
"ember-ted-docs": "Alonski/ember-ted-docs", | ||
"ember-try": "^2.0.0", | ||
"ember-try": "^1.4.0", | ||
"eslint": "^7.0.0", | ||
"eslint-plugin-ember": "^5.0.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"liquid-fire": "0.32.0", | ||
"liquid-fire": "^0.32.0", | ||
"loader.js": "^4.7.0", | ||
"node-sass": "^5.0.0", | ||
"qunit": "^2.17.2", | ||
|
@@ -70,12 +76,11 @@ | |
"engines": { | ||
"node": "12.* || 14.* || >= 16" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/adopted-ember-addons/ember-collapsible-panel/issues" | ||
}, | ||
"homepage": "https://adopted-ember-addons.github.io/ember-collapsible-panel/", | ||
"ember-addon": { | ||
"configPath": "tests/dummy/config", | ||
"demoURL": "https://adopted-ember-addons.github.io/ember-collapsible-panel/" | ||
}, | ||
"volta": { | ||
"node": "12.22.7" | ||
} | ||
} |
Oops, something went wrong.