Install dependencies
npm install
Build project
gulp
Install as bower component
bower install ergo-js
Add 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
,renderFilter
andrenderSorter
- Disabling aware of
widget._wrapper
withwidget.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.Object
andErgo.data.Collection
methoddrop()
which is exposed to provider methoddelete()
_oid()
method replaced byoid
property so it marked as deprecated
- History arranged as include
- Router also arranged as include
- Include
provider-methods
adds provider methods prefixed with$
to data source - Default formatter supports format pipeline:
format: '#{prop|format_1|format_2}'
- Binding events to
observable
properties throughevents
option (data:dirty
fires ondirty
event ofdata
) - Alias
ergo
forErgo
- Lazy initializing
children
,items
,components
andlayout
- Single child widget has no layout and renders with raw append
- New
Ergo.core.Event
methods:interrupt
,yield
widgets:select
supports dropdown navigation by defaultwidgets:select
focusable by default- New
focusable
include addstabindex=0
- Cancel closing modal dialog with
event.cancel()
- DataSource events
entry:added
,entry:deleted
andentry:changed
are 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
scope
instead ofcontext
(butctx:
prefix still available) - Binding scope events to widget with
scope:
prefix - String value of
data
option binds widget properties as data (nested properties not supported) width
andheight
options now usesouterWidth/outerHeight
methods- Datasource validator rises
valid
orinvalid
events - New datasource method
rm
removes entry by value selectable
include uses hash object as multiselect container and no container for single select- New include
user-input
adds eventinput
on keyup if not a special key (esc, tab, left arrow etc) pressed
- Migrated to jQuery 2 (no more IE8 support)
mixins
andplugins
replaced byinclude
events.reg()
andevents.unreg()
renamed toevents.on()
andevents.off()
events.off()
without arguments removes all event listeners- Option
selector
ofselectable
mixin renamed tolookup
- Using ES5 getters and setters (get_/set_ accessors are deprecated)
- Less support
- New layout option
autoClass
adds component name as element class - Added
flex
as standalone layout - Component shortcuts should be prefixed with
$
(access to component likewidget.myComponent
is deprecated) - New
autoRender
option valuenon-empty
renders only non-empty containers - Installing ergo-js as bower dependency
format
shortcut syntax extended to use predefinded formatters:'#{property|format}'
or'#{*|format}'
- Filtering and sorting became part of widget (
renderFilter
/renderSorter
anddynamicFilter
/dynamicSorter
) - New event shortcut syntax (
onClick: 'action:selectItem'
calls methodaction
with argselectItem
) - New
action
method rises specified event - Multikey datasource support:
dataId: ['a', 'b', 'c']
- New autoHeight mode
fit
adjusts widget height to container if it lesser than container height - New static option
as
combinescls
andstate
behaviour
- 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
props
option) - Add overriding methods (with
overrides
option) get
andset
options should generate getters and setters- Extend widget/state to replace context/scope
- Rendering to widgets of another scope by name
and more new widgets :)