-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
give the ability to load custom renderers
load alpaca renderer from its own file move alpaca renderer under forms dir add htmlbars compile to ember renderer
- Loading branch information
1 parent
24f2c65
commit bbd2028
Showing
5 changed files
with
39 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Ember from 'ember'; | ||
|
||
const TYPE_MAP = { | ||
text: '', | ||
radio: '' | ||
}; | ||
|
||
export default Ember.Object.extend({ | ||
componentFor(type) { | ||
|
||
} | ||
}); |
4 changes: 2 additions & 2 deletions
4
addon/renderers/alpaca.js → addon/dynamic-forms/renderers/alpaca.js
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,7 +1,7 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Object.extend({ | ||
render(schema, element) { | ||
element.alpaca(schema); | ||
render(schema, component) { | ||
component.$().alpaca(schema); | ||
} | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Ember from 'ember'; | ||
|
||
export default Ember.Object.extend({ | ||
render(schema, component) { | ||
component.set('layout', Ember.computed(function () { | ||
return Ember.HTMLBars.compile(` | ||
{{#each fields as |field|}} | ||
{{component field.type}} | ||
{{/each}} | ||
`); | ||
})); | ||
// iterate fields in schema | ||
//let fields = schema.schema.properties; | ||
|
||
// load component equivs from factory | ||
|
||
// attach to DOM or parent component | ||
} | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Alpaca from 'ember-cli-dynamic-forms/dynamic-forms/renderers/alpaca'; | ||
|
||
export default Alpaca; |