-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING: This drops support for Ember LTS 3.8 and 3.12
- Loading branch information
Showing
98 changed files
with
4,442 additions
and
3,946 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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
root = true | ||
|
||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
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,29 +1,45 @@ | ||
import { get, computed, getWithDefault } from "@ember/object"; | ||
import { get, computed } from "@ember/object"; | ||
import { getOwner } from "@ember/application"; | ||
|
||
export default component => { | ||
return computed(function() { | ||
const parts = component.split("/"); | ||
const [, ...componentNameParts] = parts; | ||
export default (component) => { | ||
return computed({ | ||
get() { | ||
const parts = component.split("/"); | ||
const [, ...componentNameParts] = parts; | ||
|
||
const config = getWithDefault( | ||
getOwner(this).resolveRegistration("config:environment"), | ||
"ember-validated-form", | ||
{} | ||
); | ||
if (this.get(`overrideComponents.${componentNameParts}`)) { | ||
return this.get(`overrideComponents.${componentNameParts}`); | ||
} | ||
|
||
const theme = get(config, "theme"); | ||
const defaultComponent = get( | ||
config, | ||
`defaults.${componentNameParts.join("/")}` | ||
); | ||
const config = | ||
getOwner(this).resolveRegistration("config:environment")[ | ||
"ember-validated-form" | ||
] !== undefined | ||
? getOwner(this).resolveRegistration("config:environment")[ | ||
"ember-validated-form" | ||
] | ||
: {}; | ||
|
||
const name = parts.pop(); | ||
const basePath = parts.join("/"); | ||
const theme = config.theme; | ||
const defaultComponent = get( | ||
config, | ||
`defaults.${componentNameParts.join("/")}` | ||
); | ||
|
||
return ( | ||
defaultComponent || | ||
(theme ? `${basePath}/-themes/${theme}/${name}` : `${basePath}/${name}`) | ||
); | ||
const name = parts.pop(); | ||
const basePath = parts.join("/"); | ||
|
||
return ( | ||
defaultComponent || | ||
(theme ? `${basePath}/-themes/${theme}/${name}` : `${basePath}/${name}`) | ||
); | ||
}, | ||
set(key, value) { | ||
if (!this.get(`overrideComponents`)) { | ||
this.set(`overrideComponents`, {}); | ||
} | ||
this.set(`overrideComponents.${key}`, value); | ||
return value; | ||
}, | ||
}); | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Component from "../../error"; | ||
|
||
export default Component.extend({ | ||
classNames: ["invalid-feedback"] | ||
classNames: ["invalid-feedback"], | ||
}); |
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,5 +1,5 @@ | ||
import Component from "../../hint"; | ||
|
||
export default Component.extend({ | ||
classNames: ["form-text", "text-muted"] | ||
classNames: ["form-text", "text-muted"], | ||
}); |
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,5 +1,5 @@ | ||
import Component from "../../render"; | ||
|
||
export default Component.extend({ | ||
classNames: ["form-group"] | ||
classNames: ["form-group"], | ||
}); |
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,5 +1,5 @@ | ||
import Component from "../../hint"; | ||
|
||
export default Component.extend({ | ||
classNames: ["uk-text-muted"] | ||
classNames: ["uk-text-muted"], | ||
}); |
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,5 +1,5 @@ | ||
import Component from "../../label"; | ||
|
||
export default Component.extend({ | ||
classNames: ["uk-form-label"] | ||
classNames: ["uk-form-label"], | ||
}); |
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
Oops, something went wrong.