@taijiweb taijiweb released this Sep 16, 2016 · 2 commits to master since this release

Assets 2

What's new

  • minor upgrade
  • tagName can be changed dynamically and cause to recreate the element
  • can use tagName in attrs to instantiage Tag component

@taijiweb taijiweb released this Jul 31, 2016 · 13 commits to master since this release

Assets 2

What's new

  • addEventListenerMap: for oncompositionstart like events, use node.addEventListener(eventName, domEventHandler), instead of node[eventName] = domEventHandler
  • fix a bug caused by missing this.valid = true in List.updateDom
  • use Component.valid, remove Text.textValid

@taijiweb taijiweb released this Jun 14, 2016 · 19 commits to master since this release

Assets 2

What's new

  • add api: dc.clean(): remove all components in dc.removingChildren
  • fix bugs in domcom/demo
    wrong renderDom after the component is removed ( check component.removing and component.removed before calling renderDom in component.render())
    the component is not refreshed after switching each3, each4 (caused by wrong component.valid, component.attachValid field)
Jun 14, 2016
big refactor: separate the code for updating and attaching/detaching dom

@taijiweb taijiweb released this Mar 29, 2016 · 27 commits to master since this release

Assets 2

What's new

  • some fix and refactor, especially for Component.clone()
  • src/config is removed
  • Component.setReactive: set reaction between component's fields
  • setText for Html and Text component
  • toComponentList is renamed to toComponentArray
  • an universal domEventHandler
  • eventHandlerFromArray is renamed to domEventHandlerFromArray, and is not bound to node
  • classFn.coffee().clone()

@taijiweb taijiweb released this Mar 17, 2016 · 33 commits to master since this release

Assets 2

What's new

  • a very big refactor: do not update from top to bottom, directly update the component in renderingMap instead
  • Each component is removed, in favor of the new every, each, funcEacn and mapEach function, which generate watched list component
  • Case component supports to use array as map
  • set attributes by using attr_xxx
  • new api: ListMixin.insertChildBefore, insertAfter;
  • fix bug about Component.destroy
  • rename life time events to willXXXX/didXXXX,
  • make Component.listeners and Tag.events field always be available, avoid to add .on or .bind after component super(...)

@taijiweb taijiweb released this Jan 31, 2016 · 45 commits to master since this release

Assets 2

What's new

  • fix a bug in webpack.config, remove the file path in .min.js file
  • stop pass component as the parameter to eventHandlerFromArray, just use "node.component"
  • always emit "attach" event while component to the tree, and "detach" event while removing the component from the tree

@taijiweb taijiweb released this Jan 16, 2016 · 49 commits to master since this release

Assets 2

What's new

  • api(new): new api for delegating event: Tag.delegateByHolder, Tag.delegateByComponent, Tag.delegate
  • api(new): dc.error, dc.onerror
  • api(change): rename component event: beforeMount -> mount, afterUnmount -> 'unmount', beforeAttatch -> attach, afterDetach -> detach; remove afterMount
  • api(change): Hmtl component's super class becomes Tag, wrap with div, add Html.text setter, add attrs
  • api(change): Component.renderDom() -> Component.renderDom(oldBaseComponent), delete Component.getBaseComponent
  • api(change): remove Component.setNode and Component.setFirstNode
  • api(change): add BaseComponent.removing field to mark removing, split Component.setParentAndNextNode to setParentNode and setNextNode
  • api(change): api for new If(test, then, else, , merge, recursive), dc.mergeIf, dc.recursiveIf
  • improvement: Tag.propBind, Tag.cssBind: return bound reactive function for Tag props or style props
  • improvement: Tag.prop(propName) and Tag.css(propName) return domValue of props at first, if undefined then return cache value
  • improvement: Component.on, Component.off
  • refactor: split property.coffee to core/property/ folder (classFn, events, style, ...), and move core/prop-util.coffee to core/property/css-arith.coffee
  • refactor: Both Tag and List use ListMixin
  • refactor: remove constructTextLikeComponent for Text, Comment, Html, Cdata, use super(text) directly
  • fix two bug: one in Component.setParentAndNextNode, another one in Component.on
  • fix a bug about List.nextNode

@taijiweb taijiweb released this Dec 19, 2015 · 70 commits to master since this release

Assets 2

What's new

  • a group of new utilities: unitAdd, unitSub, unitMul, unitDiv, Tag.cssAdd, Tag.cssSub, Tag.cssMul, Tag.cssDiv
  • add lost minify js back (uglifyjs)

@taijiweb taijiweb released this Dec 12, 2015 · 72 commits to master since this release

Assets 2

What's new

  • let domcom can be required out of browser

  • new component: Cdata component (core/base/Cdata)

  • new component: Pick component (core/base/Pick )

    pick the value of field in host object as the content of the component

    new Pick(host, field, initialContent)

    pick(host, field, initialContent)

  • change the behavior of the namespace for svg and math tag

  • refactor gulp scripts

  • new utility: toComponentList

  • add default arguments for List and Tag (by using toComponentList)

    List children default to [], Tag Name default to div, children default to [], if isComponent(children), then convert to [children]

  • getBaseComponent method back: issue #1

    While renderDom, it is necessary to replace dom only when oldBaseComponent and new baseComponent is different.

    The new solution will improve the performance.

  • decrease dom operation: issure #5

    use parentNode and nextNode to improve removeDom and renderDom, better minify dom operation

    to minify removing and reinsert, oldBaseComponent.markRemovingDom(), then baseComponent.renderDom(), then oldBaseComponent.removeDom()

  • add some tests on every, all, nItems, fix bug in it.

  • bug fix: Text Component's field "textValid" is processed wrongly

    if @textValid ### before here is "if !@textValid"
    return @node

  • fix bug: fail to emit beforeAttach for content component in some cases

  • fix bug: should mark removing transform component

  • update document