This file contains hidden or 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 Resolver from 'ember-resolver'; | |
import { capitalize } from '@ember/string'; | |
import GlimmerComponent from '@glimmer/component'; | |
import EmberComponent from '@ember/component'; | |
/* | |
* Ember Tiny Module Unification Resolver | |
* this does not resolve local componentns and helpers, instead this should | |
* to be used together with ember-template-component-import and ember-template-helper-import | |
*/ |
This file contains hidden or 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
var a_slice = [].slice; | |
Ember.ComputedProperty.prototype.chain = function(method){ | |
var chainedCP, dependentKey, args, func, cp = this; | |
dependentKey = Ember.guidFor(cp) + '-chain'; | |
args = [dependentKey].concat(a_slice.call(arguments,1)); | |
if (typeof method === 'string') { | |
method = Ember.computed[method]; | |
} |
This file contains hidden or 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
/** | |
A computed property that chains all given computed properties | |
Example | |
```javascript | |
Ember.computed.chain('content', [ | |
[Ember.computed.mapBy, 'key'], | |
[Ember.computed.filter, callback], //e.g. remove undefined/null | |
[Ember.computed.sum], | |
[customComputed] |
This file contains hidden or 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 function(path, options) { | |
var buffer = "", | |
key; | |
var object = null; | |
var p = path.split('.'); | |
var keyword = p[0]; | |
var o = options.data.view.getStream(keyword).value(); |
This file contains hidden or 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
var template = '' + | |
'<div class="arrow"></div>' + | |
' <h3 class="popover-title">{{title}}</h3>' + | |
'<div class="popover-content">' + | |
'{{#if content}}' + | |
' {{content}}' + | |
'{{else}}' + | |
'{{yield}}' + | |
'{{/if}}' + | |
' </div>'; |
This file contains hidden or 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 simplejson | |
import sqlalchemy | |
from sqlalchemy import String | |
from sqlalchemy.ext.mutable import Mutable | |
class JSONEncodedObj(sqlalchemy.types.TypeDecorator): | |
"""Represents an immutable structure as a json-encoded string.""" | |
impl = String |
NewerOlder