Skip to content

Commit

Permalink
Commit 91 (v0.9.91 - Beta)
Browse files Browse the repository at this point in the history
Major update

Breaking change

- Templates declared in <div> or other non script element are not
  supported. (Throws with error message)

Minor breaking changes

- The {{range}} tag has been removed - replaced by {{for}} tag using
  built-in range features. See https://www.jsviews.com#jsvfortag@jsvsortfilterrange

- Changed behavior of .setValue() API on custom tags. The .setValue()
  method is called even for undefined values. The .getValue() method
  is not called. Return false from setValue to not data-link a linked
  element. (e.g. jQuery UI slider). See https://www.jsviews.com#tagoptions@setvalue

- {{tabs}} API changes: The selectedIndex property is renamed to the
  pane property. The tabCaption property is renamed to the caption
  property

- Some changes to behavior/effect of the bindTo tag option - which is
  now associated with the new bindFrom tag option.
  See https://www.jsviews.com#tagoptions@bindto and https://www.jsviews.com#tagoptions@bindfrom

Major feature improvements

- The {{for}} tag now has built-in support for sort, filter, start and
  end. See https://www.jsviews.com#fortag@sortfilterrange

- The {{props}} tag now has built-in support for sort, filter, start
  and end. See https://www.jsviews.com#propstag@sortfilterrange

- New converters encode/unencode. See https://www.jsviews.com#convertersapi@encode

- New tag options: bindFrom - together with tag option bindTo - provide
  improved features for custom tags.
  See https://www.jsviews.com#tagoptions@bindto and https://www.jsviews.com#tagoptions@bindfrom

- New support for observing/unobserving contextual parameters.
  $.observe(tagOrView, "~foo", callback) - documentation to follow

- New support for observing properties of any item in an array, using
  "array.[].*" or "array.[].foo" (or "array.[]^*", etc.) - documentation to follow

- Late paths support: "@a.b.c" - documentation to follow

- New support for getting a reference to a tag instance using
  {^{mytag this=~myTag}} - documentation to follow

Minor feature improvements

- Custom tag linkedElem can now target non-editable and contentEditable.
  See https://www.jsviews.com#bindingpatterns@linkedelem

- New APIs added for tagCtx.ctxPrm(), tagCtx.cvtArgs() and
  tagCtx.bndArgs() even for non-data-linked tags - documentation to follow

- The contentCtx option now works also for custom tag using render(),
  rather than a template. See https://www.jsviews.com#tagsapi@contentctx

- In a template, ~tag.tagCtx.xxx can now be written ~tagCtx.xxx,
  and works correctly e.g. for data-linking using
  {{mytag}}{{else}}{{~tagCtx...}}{{/mytag}} - documentation to follow

- ~tagCtx is now a reserved name like ~tag ~root ~parentTags...

- On a custom tag, the bindTo option is not needed with 2-way linking
  to first argument

- updateValue() now supports an async option: pass true for the fourth
  parameter, defer - updateValue(val, index, tagElse, tag, defer).
  - Documentation to follow

- New debug:true option on a compiled template.
  See https://www.jsviews.com#d.templates@debug

- New depends option on custom tags (see https://www.jsviews.com#tagoptions@depends)
  or an instance property {{someTag depends='a.b'}} or
  {{someTag depends=~someTagDependsArray}}

- An error will be thrown if different versions of jsrender.js,
  jquery.observable.js and  jquery.views.js are loaded together

- DataMap, {{props}} and {{jsonview}} now include support for function
  properties too, unless opt out using {{props foo noFunctions=true}}.
  See https://www.jsviews.com#propstag@nofunctions

- Support for nested {{for}} tags without iteration, and for then
  applying operations such as sorting to arrays in nexted context, as in
  {{for filter=... noIteration=true}}{{for sort=... noIteration=true}}{{for start=...  end=...}}.
  See https://www.jsviews.com#fortag@itemvar

Documentation

- Extensive new documentation, especially on custom tag controls:
  See https://www.jsviews.com#jsvtagcontrols. For an example of a JsViews
  custom tag control see https://www.jsviews.com#samples/tag-controls/colorpicker

Minor bug fixes, including:

- a contentEditable bug for IE

- a bug for data-linking to 'length' property.

- a bug when a computed property 'depends' mixes data and contextual paths

- a bug in jquery-1.x cleanData

- a bug in move() arrayChange on {{for}}

- Issue BorisMoore/jsviews#408
  $.observe('ns', model.list, '[]^qty', handler);??

- Issue BorisMoore/jsviews#406
  Weird data-linked `for` loop behaviour with deep observing after model update

- Issue BorisMoore/jsviews#404
  Props Convert else statement not working

- Issue BorisMoore/jsviews#403
  ~ operator support

- Issue BorisMoore/jsviews#400
  Move the tag property in views to before rendering, to enable "get current path" path scenario

- Issue BorisMoore/jsviews#398
  After DOM modifications to the child options of a data-linked select, the first option shows as selected

- Issue BorisMoore/jsviews#397
  {^{radiogroup value disabled=notEnabled}} is now supported

- Issue BorisMoore/jsviews#198
  Provide full documentation of custom tags using 2-way binding, binding to args or props etc.

- Issue BorisMoore/jsviews#374
  Wrong initial value shown (timespinner control)

- Issue BorisMoore/jsrender#335
  encode and unencode converters
  • Loading branch information
BorisMoore committed Sep 21, 2018
2 parents f59020f + 23b5269 commit 9125a97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _src/jsrender-node-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"body-parser": "^1.13.2",
"browserify": "^11.0.0",
"express": "^4.13.3",
"hapi": "^9.0.3",
"hapi": "^11.1.3",
"inert": "^3.0.1",
"jquery": "^3.0.0",
"jsrender": "^0.9.91",
Expand Down
2 changes: 1 addition & 1 deletion _src/templates/jsrender-node-starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"body-parser": "^1.13.2",
"browserify": "^11.0.0",
"express": "^4.13.3",
"hapi": "^9.0.3",
"hapi": "^11.1.3",
"inert": "^3.0.1",
"jquery": "^3.0.0",
"jsrender": "^@@include("templates/-version.txt")",
Expand Down
1 change: 1 addition & 0 deletions googleba1a921b26fe70cf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: googleba1a921b26fe70cf.html

0 comments on commit 9125a97

Please sign in to comment.