Install dependencies
npm installBuild project
gulpInstall as bower component
bower install ergo-jsAdd scripts
<script src="lib/ergojs-core.js" type="text/javascript"></script>
<script src="lib/ergojs-widgets-all.js" type="text/javascript"></script>Add styles
<link href='lib/ergojs.css' rel='stylesheet' type='text/css'>Now ergo is ready to use
$(document).ready(function(){
// creates simple widget and renders it into <body/>
var w = $.ergo({
etype: 'box'
});
w.render('body');
});- Call context changed to widget for
dynamicFilter,dynamicSorter,renderFilterandrenderSorter - Disabling aware of
widget._wrapperwithwidget.show(false)orwidget.hide(false) - Disabling aware of html event propagation with
event.stop(false) - Disabling aware of html event immediate propagation with
event.interupt(false) - New
Ergo.data.ObjectandErgo.data.Collectionmethoddrop()which is exposed to provider methoddelete() _oid()method replaced byoidproperty so it marked as deprecated
- History arranged as include
- Router also arranged as include
- Include
provider-methodsadds provider methods prefixed with$to data source - Default formatter supports format pipeline:
format: '#{prop|format_1|format_2}' - Binding events to
observableproperties througheventsoption (data:dirtyfires ondirtyevent ofdata) - Alias
ergoforErgo - Lazy initializing
children,items,componentsandlayout - Single child widget has no layout and renders with raw append
- New
Ergo.core.Eventmethods:interrupt,yield widgets:selectsupports dropdown navigation by defaultwidgets:selectfocusable by default- New
focusableinclude addstabindex=0 - Cancel closing modal dialog with
event.cancel() - DataSource events
entry:added,entry:deletedandentry:changedare deprecated - New datasource events:
changed,dirty,diff - New datasource method
sync(newValue)produces diff from new and old values - New datasouce functional options
valueUid: (value, index)andvalueEql: (value1, value2) - Injecting
scopeinstead ofcontext(butctx:prefix still available) - Binding scope events to widget with
scope:prefix - String value of
dataoption binds widget properties as data (nested properties not supported) widthandheightoptions now usesouterWidth/outerHeightmethods- Datasource validator rises
validorinvalidevents - New datasource method
rmremoves entry by value selectableinclude uses hash object as multiselect container and no container for single select- New include
user-inputadds eventinputon keyup if not a special key (esc, tab, left arrow etc) pressed
- Migrated to jQuery 2 (no more IE8 support)
mixinsandpluginsreplaced byincludeevents.reg()andevents.unreg()renamed toevents.on()andevents.off()events.off()without arguments removes all event listeners- Option
selectorofselectablemixin renamed tolookup - Using ES5 getters and setters (get_/set_ accessors are deprecated)
- Less support
- New layout option
autoClassadds component name as element class - Added
flexas standalone layout - Component shortcuts should be prefixed with
$(access to component likewidget.myComponentis deprecated) - New
autoRenderoption valuenon-emptyrenders only non-empty containers - Installing ergo-js as bower dependency
formatshortcut syntax extended to use predefinded formatters:'#{property|format}'or'#{*|format}'- Filtering and sorting became part of widget (
renderFilter/renderSorteranddynamicFilter/dynamicSorter) - New event shortcut syntax (
onClick: 'action:selectItem'calls methodactionwith argselectItem) - New
actionmethod rises specified event - Multikey datasource support:
dataId: ['a', 'b', 'c'] - New autoHeight mode
fitadjusts widget height to container if it lesser than container height - New static option
ascombinesclsandstatebehaviour
- Focus management and keyboard support
- CSS animations
- Flex layout
- Mobile support
- Themes
- Performance optimization
- Test coverage
- Simplify Ergo collections
- Change nested property accessor from
_to__(like BEM) - Composite weight
- Local storage provider
- Add properties (with
propsoption) - Add overriding methods (with
overridesoption) getandsetoptions should generate getters and setters- Extend widget/state to replace context/scope
- Rendering to widgets of another scope by name
and more new widgets :)