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
import Ember from 'ember'; | |
import SlotsMixin from 'ember-block-slots'; | |
export default Ember.Component.extend(SlotsMixin, { | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
saveModel() { | |
}, | |
}); |
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
{ | |
"data": { | |
"import_json": { | |
"flow_template": { | |
"enabled": true, | |
"template_name": "Product Onboarding", | |
"description": "Facilitate the smooth onboarding of products", | |
"entity_type": "product" | |
}, | |
"triggers": [ |
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
/********************************************************************************** | |
** Basic timeout example | |
**/ | |
// component | |
export default Component.extend({ | |
pollStatus: task(function*() { | |
yield milestone('poll-status-timeout', () => timeout(1000)); | |
this.get('statusModel').reload(); | |
}), |
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
import Ember from 'ember'; | |
const { A, get, String: { pluralize } } = Ember; | |
export default Ember.Controller.extend({ | |
facetsForChecklist: Ember.computed('taskFacets', 'selectedFacets', function() { | |
// Merged facets is an array of objects of the form { facetAttribute: {}, taskFacets: [] } | |
const mergedFacets = this.get('taskFacets').reduce(function(mergedFacets, taskFacet) { | |
const facetAttribute = get(taskFacet, 'facetAttribute'); | |
const facetAttributeId = get(taskFacet, 'facetAttributeId'); | |
const mergedFacet = mergedFacets.findBy('facetAttribute.id', facetAttributeId) |
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 is using the JS port of Google's libphonenumber. | |
As far as I know, though, all of the APIs are the same or similar | |
*/ | |
// I just hardcoded "US" as the country, but of course you can use any country iso code | |
var ctry = 'US'; | |
var exampleNumber = i18n.phonenumbers.PhoneNumberUtil.getInstance() | |
.getExampleNumberForType(ctry, i18n.phonenumbers.PhoneNumberType.MOBILE); // returns PhoneNumber instance |