Skip to content

Commit a4ad093

Browse files
committed
v1.0.1 release
Feature improvement Unicode character support: BorisMoore/jsrender#342 https://www.jsviews.com/#unicode Additional documentation topics: Cascading <select>s: dynamic selection of subcategory items in child <select>: https://www.jsviews.com/#link-select@cascade Unicode character support: https://www.jsviews.com/#unicode Minor bug fixes: Data-linked {^{for start= end=}} renders all items on $.observable.refresh() #410 Correction to typescript definition files: https://www.jsviews.com/#typescript
1 parent 09534f1 commit a4ad093

28 files changed

+390
-376
lines changed

jquery.observable.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JsObservable v1.0.0: http://jsviews.com/#jsobservable */
1+
/*! JsObservable v1.0.1: http://jsviews.com/#jsobservable */
22
/*
33
* Subcomponent of JsViews
44
* Data change events for data-linking
@@ -44,7 +44,7 @@ if (!$ || !$.fn) {
4444
throw "JsObservable requires jQuery"; // We require jQuery
4545
}
4646

47-
var versionNumber = "v1.0.0",
47+
var versionNumber = "v1.0.1",
4848
_ocp = "_ocp", // Observable contextual parameter
4949
$observe, $observable,
5050

@@ -1056,7 +1056,7 @@ if (!$.observe) {
10561056
self._srt = true; // Flag for sorting during refresh
10571057
for (j=k=0; j<newLength; j++) {
10581058
if ((newItem = newItems[j]) === data[j-k]) {
1059-
insertAdded();
1059+
insertAdded();
10601060
} else {
10611061
for (i=j-k; i<dataLength; i++) {
10621062
if (newItem === data[i]) {
@@ -1154,7 +1154,7 @@ if (!$.observe) {
11541154
} else if (!unbound) {
11551155
if (mapDef.obsSrc) {
11561156
$observable(map.src).observeAll(map.obs = function(ev, eventArgs) {
1157-
if (!changing) {
1157+
if (!changing && !eventArgs.refresh) {
11581158
changing = true;
11591159
mapDef.obsSrc(map, ev, eventArgs);
11601160
changing = undefined;

jquery.observable.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jquery.observable.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jquery.views.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jquery.views.js v1.0.0: http://jsviews.com/ */
1+
/*! jquery.views.js v1.0.1: http://jsviews.com/ */
22
/*
33
* Interactive data-driven views using JsRender templates.
44
* Subcomponent of JsViews
@@ -44,7 +44,7 @@ var setGlobals = $ === false; // Only set globals if script block in browser (no
4444
jsr = jsr || setGlobals && global.jsrender;
4545
$ = $ || global.jQuery;
4646

47-
var versionNumber = "v1.0.0",
47+
var versionNumber = "v1.0.1",
4848
requiresStr = "JsViews requires ";
4949

5050
if (!$ || !$.fn) {
@@ -133,7 +133,7 @@ var activeBody, rTagDatalink, $view, $viewsLinkAttr, linkViewsSel, wrapMap, view
133133
bindingStore = {},
134134
bindingKey = 1,
135135
rViewPath = /^#(view\.?)?/,
136-
rConvertMarkers = /((\/>)|<\/(\w+)>|)(\s*)([#\/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>)|$)/g,
136+
rConvertMarkers = /((\/>)|<\/(\w+)>|)(\s*)([#/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>)|$)/g,
137137
rOpenViewMarkers = /(#)()(\d+)(_)/g,
138138
rOpenMarkers = /(#)()(\d+)([_^])/g,
139139
rViewMarkers = /(?:(#)|(\/))(\d+)(_)/g,
@@ -1078,7 +1078,7 @@ function viewLink(outerData, parentNode, prevNode, nextNode, html, refresh, cont
10781078

10791079
//==== nested functions ====
10801080
function convertMarkers(all, preceding, selfClose, closeTag, spaceBefore, id, boundId, spaceAfter, tag1, tag2, closeTag2, spaceAfterClose, selfClose2, endOpenTag) {
1081-
// rConvertMarkers = /(^|(\/>)|<\/(\w+)>|)(\s*)([#\/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>))/g,
1081+
// rConvertMarkers = /(^|(\/>)|<\/(\w+)>|)(\s*)([#/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>))/g,
10821082
// prec, slfCl, clsTag, spBefore, id, bndId spAfter,tag1, tag2, clTag2,sac slfCl2, endOpenTag
10831083
// Convert the markers that were included by addBindingMarkers in template output, to appropriate DOM annotations:
10841084
// data-jsv attributes (for element-only content) or script marker nodes (within phrasing or flow content).
@@ -3116,7 +3116,7 @@ $tags({
31163116
if (!contextOb) {
31173117
// Get the path for the preceding object (context object) of handler (which is the last arg), compile function
31183118
// to return that context object, and run compiled function against data
3119-
contextOb = /^(.*)[\.^][\w$]+$/.exec(tagCtx.params.args.slice(-params.length - 1)[0]);
3119+
contextOb = /^(.*)[.^][\w$]+$/.exec(tagCtx.params.args.slice(-params.length - 1)[0]);
31203120
contextOb = contextOb && $sub.tmplFn(delimOpenChar1 + ":" + contextOb[1] + delimCloseChar0, view.tmpl, true)(linkCtx.data, view);
31213121
}
31223122

jquery.views.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jquery.views.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsrender.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! JsRender v1.0.0: http://jsviews.com/#jsrender */
1+
/*! JsRender v1.0.1: http://jsviews.com/#jsrender */
22
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
33
/*
44
* Best-of-breed templating in browser or on Node.js.
@@ -44,25 +44,19 @@ var setGlobals = $ === false; // Only set globals if script block in browser (no
4444

4545
$ = $ && $.fn ? $ : global.jQuery; // $ is jQuery passed in by CommonJS loader (Browserify), or global jQuery.
4646

47-
var versionNumber = "v1.0.0",
47+
var versionNumber = "v1.0.1",
4848
jsvStoreName, rTag, rTmplString, topView, $views, $expando,
4949
_ocp = "_ocp", // Observable contextual parameter
5050

5151
//TODO tmplFnsCache = {},
52-
$isFunction, $isArray, $templates, $converters, $helpers, $tags, $sub, $subSettings, $subSettingsAdvanced, $viewsSettings, delimOpenChar0, delimOpenChar1, delimCloseChar0, delimCloseChar1, linkChar, setting, baseOnError,
53-
54-
rPath = /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
55-
// not object helper view viewProperty pathTokens leafToken
56-
57-
rParams = /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$_])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
58-
// lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
59-
// (left paren? followed by (path? followed by operator) or (path followed by left paren?)) or comma or apos or quot or right paren or space
52+
$isFunction, $isArray, $templates, $converters, $helpers, $tags, $sub, $subSettings, $subSettingsAdvanced, $viewsSettings,
53+
delimOpenChar0, delimOpenChar1, delimCloseChar0, delimCloseChar1, linkChar, setting, baseOnError,
6054

6155
isRenderCall,
6256
rNewLine = /[ \t]*(\r\n|\n|\r)/g,
6357
rUnescapeQuotes = /\\(['"])/g,
6458
rEscapeQuotes = /['"\\]/g, // Escape quotes and \ character
65-
rBuildHash = /(?:\x08|^)(onerror:)?(?:(~?)(([\w$_\.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,
59+
rBuildHash = /(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,
6660
rTestElseIf = /^if\s/,
6761
rFirstElem = /<(\w+)[>\s]/,
6862
rAttrEncode = /[\x00`><"'&=]/g, // Includes > encoding since rConvertMarkers in JsViews does not skip > characters in attribute strings
@@ -118,6 +112,12 @@ var versionNumber = "v1.0.0",
118112
jsviews: versionNumber,
119113
sub: {
120114
// subscription, e.g. JsViews integration
115+
rPath: /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
116+
// not object helper view viewProperty pathTokens leafToken
117+
118+
rPrm: /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
119+
// lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
120+
121121
View: View,
122122
Err: JsViewsError,
123123
tmplFn: tmplFn,
@@ -2092,12 +2092,13 @@ function paramStructure(parts, type) {
20922092
function parseParams(params, pathBindings, tmpl, isLinkExpr) {
20932093

20942094
function parseTokens(all, lftPrn0, lftPrn, bound, path, operator, err, eq, path2, late, prn, comma, lftPrn2, apos, quot, rtPrn, rtPrnDot, prn2, space, index, full) {
2095-
// /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
2096-
// lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
2097-
// (left paren? followed by (path? followed by operator) or (path followed by paren?)) or comma or apos or quot or right paren or space
2095+
// /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
2096+
//lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
2097+
// (left paren? followed by (path? followed by operator) or (path followed by paren?)) or comma or apos or quot or right paren or space
2098+
20982099
function parsePath(allPath, not, object, helper, view, viewProperty, pathTokens, leafToken) {
2099-
//rPath = /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
2100-
// not object helper view viewProperty pathTokens leafToken
2100+
// /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
2101+
// not object helper view viewProperty pathTokens leafToken
21012102
var subPath = object === ".";
21022103
if (object) {
21032104
path = path.slice(not.length);
@@ -2246,7 +2247,7 @@ function parseParams(params, pathBindings, tmpl, isLinkExpr) {
22462247
bindings && ((bindings = bndCtx.bd = pathBindings[named] = []), bindings.skp = !bound), path + ':')
22472248
: path
22482249
// path
2249-
? (path.split("^").join(".").replace(rPath, parsePath)
2250+
? (path.split("^").join(".").replace($sub.rPath, parsePath)
22502251
+ (prn
22512252
// some.fncall(
22522253
? (bndCtx = bndStack[++parenDepth] = {bd: []}, fnCall[parenDepth] = rtSq, prn)
@@ -2290,7 +2291,7 @@ function parseParams(params, pathBindings, tmpl, isLinkExpr) {
22902291
if (params[0] === "@") {
22912292
params = params.replace(rBracketQuote, ".");
22922293
}
2293-
result = (params + (tmpl ? " " : "")).replace(rParams, parseTokens);
2294+
result = (params + (tmpl ? " " : "")).replace($sub.rPrm, parseTokens);
22942295

22952296
return !parenDepth && result || syntaxError(params); // Syntax error if unbalanced parens in params expression
22962297
}

jsrender.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsrender.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsviews.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! jsviews.js v1.0.0 single-file version: http://jsviews.com/ */
1+
/*! jsviews.js v1.0.1 single-file version: http://jsviews.com/ */
22
/*! includes JsRender, JsObservable and JsViews - see: http://jsviews.com/#download */
33

44
/* Interactive data-driven views using JsRender templates */
@@ -47,26 +47,20 @@ if (!$ || !$.fn) {
4747
throw "JsViews requires jQuery"; // We require jQuery
4848
}
4949

50-
var versionNumber = "v1.0.0",
50+
var versionNumber = "v1.0.1",
5151

5252
jsvStoreName, rTag, rTmplString, topView, $views, $observe, $observable, $expando,
5353
_ocp = "_ocp", // Observable contextual parameter
5454

5555
//TODO tmplFnsCache = {},
56-
$isFunction, $isArray, $templates, $converters, $helpers, $tags, $sub, $subSettings, $subSettingsAdvanced, $viewsSettings, delimOpenChar0, delimOpenChar1, delimCloseChar0, delimCloseChar1, linkChar, setting, baseOnError,
57-
58-
rPath = /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
59-
// not object helper view viewProperty pathTokens leafToken
60-
61-
rParams = /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$_])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
62-
// lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
63-
// (left paren? followed by (path? followed by operator) or (path followed by left paren?)) or comma or apos or quot or right paren or space
56+
$isFunction, $isArray, $templates, $converters, $helpers, $tags, $sub, $subSettings, $subSettingsAdvanced, $viewsSettings,
57+
delimOpenChar0, delimOpenChar1, delimCloseChar0, delimCloseChar1, linkChar, setting, baseOnError,
6458

6559
isRenderCall,
6660
rNewLine = /[ \t]*(\r\n|\n|\r)/g,
6761
rUnescapeQuotes = /\\(['"])/g,
6862
rEscapeQuotes = /['"\\]/g, // Escape quotes and \ character
69-
rBuildHash = /(?:\x08|^)(onerror:)?(?:(~?)(([\w$_\.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,
63+
rBuildHash = /(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,
7064
rTestElseIf = /^if\s/,
7165
rFirstElem = /<(\w+)[>\s]/,
7266
rAttrEncode = /[\x00`><"'&=]/g, // Includes > encoding since rConvertMarkers in JsViews does not skip > characters in attribute strings
@@ -122,6 +116,12 @@ var versionNumber = "v1.0.0",
122116
jsviews: versionNumber,
123117
sub: {
124118
// subscription, e.g. JsViews integration
119+
rPath: /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
120+
// not object helper view viewProperty pathTokens leafToken
121+
122+
rPrm: /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
123+
// lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
124+
125125
View: View,
126126
Err: JsViewsError,
127127
tmplFn: tmplFn,
@@ -2096,12 +2096,13 @@ function paramStructure(parts, type) {
20962096
function parseParams(params, pathBindings, tmpl, isLinkExpr) {
20972097

20982098
function parseTokens(all, lftPrn0, lftPrn, bound, path, operator, err, eq, path2, late, prn, comma, lftPrn2, apos, quot, rtPrn, rtPrnDot, prn2, space, index, full) {
2099-
// /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
2100-
// lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
2101-
// (left paren? followed by (path? followed by operator) or (path followed by paren?)) or comma or apos or quot or right paren or space
2099+
// /(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,
2100+
//lftPrn0 lftPrn bound path operator err eq path2 late prn comma lftPrn2 apos quot rtPrn rtPrnDot prn2 space
2101+
// (left paren? followed by (path? followed by operator) or (path followed by paren?)) or comma or apos or quot or right paren or space
2102+
21022103
function parsePath(allPath, not, object, helper, view, viewProperty, pathTokens, leafToken) {
2103-
//rPath = /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
2104-
// not object helper view viewProperty pathTokens leafToken
2104+
// /^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,
2105+
// not object helper view viewProperty pathTokens leafToken
21052106
var subPath = object === ".";
21062107
if (object) {
21072108
path = path.slice(not.length);
@@ -2250,7 +2251,7 @@ function parseParams(params, pathBindings, tmpl, isLinkExpr) {
22502251
bindings && ((bindings = bndCtx.bd = pathBindings[named] = []), bindings.skp = !bound), path + ':')
22512252
: path
22522253
// path
2253-
? (path.split("^").join(".").replace(rPath, parsePath)
2254+
? (path.split("^").join(".").replace($sub.rPath, parsePath)
22542255
+ (prn
22552256
// some.fncall(
22562257
? (bndCtx = bndStack[++parenDepth] = {bd: []}, fnCall[parenDepth] = rtSq, prn)
@@ -2294,7 +2295,7 @@ function parseParams(params, pathBindings, tmpl, isLinkExpr) {
22942295
if (params[0] === "@") {
22952296
params = params.replace(rBracketQuote, ".");
22962297
}
2297-
result = (params + (tmpl ? " " : "")).replace(rParams, parseTokens);
2298+
result = (params + (tmpl ? " " : "")).replace($sub.rPrm, parseTokens);
22982299

22992300
return !parenDepth && result || syntaxError(params); // Syntax error if unbalanced parens in params expression
23002301
}
@@ -3874,7 +3875,7 @@ if (!$.observe) {
38743875
self._srt = true; // Flag for sorting during refresh
38753876
for (j=k=0; j<newLength; j++) {
38763877
if ((newItem = newItems[j]) === data[j-k]) {
3877-
insertAdded();
3878+
insertAdded();
38783879
} else {
38793880
for (i=j-k; i<dataLength; i++) {
38803881
if (newItem === data[i]) {
@@ -3972,7 +3973,7 @@ if (!$.observe) {
39723973
} else if (!unbound) {
39733974
if (mapDef.obsSrc) {
39743975
$observable(map.src).observeAll(map.obs = function(ev, eventArgs) {
3975-
if (!changing) {
3976+
if (!changing && !eventArgs.refresh) {
39763977
changing = true;
39773978
mapDef.obsSrc(map, ev, eventArgs);
39783979
changing = undefined;
@@ -4118,7 +4119,7 @@ var activeBody, rTagDatalink, $view, $viewsLinkAttr, linkViewsSel, wrapMap, view
41184119
bindingStore = {},
41194120
bindingKey = 1,
41204121
rViewPath = /^#(view\.?)?/,
4121-
rConvertMarkers = /((\/>)|<\/(\w+)>|)(\s*)([#\/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>)|$)/g,
4122+
rConvertMarkers = /((\/>)|<\/(\w+)>|)(\s*)([#/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>)|$)/g,
41224123
rOpenViewMarkers = /(#)()(\d+)(_)/g,
41234124
rOpenMarkers = /(#)()(\d+)([_^])/g,
41244125
rViewMarkers = /(?:(#)|(\/))(\d+)(_)/g,
@@ -5063,7 +5064,7 @@ function viewLink(outerData, parentNode, prevNode, nextNode, html, refresh, cont
50635064

50645065
//==== nested functions ====
50655066
function convertMarkers(all, preceding, selfClose, closeTag, spaceBefore, id, boundId, spaceAfter, tag1, tag2, closeTag2, spaceAfterClose, selfClose2, endOpenTag) {
5066-
// rConvertMarkers = /(^|(\/>)|<\/(\w+)>|)(\s*)([#\/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>))/g,
5067+
// rConvertMarkers = /(^|(\/>)|<\/(\w+)>|)(\s*)([#/]\d+(?:_|(\^)))`(\s*)(<\w+(?=[\s\/>]))?|\s*(?:(<\w+(?=[\s\/>]))|<\/(\w+)>(\s*)|(\/>)\s*|(>))/g,
50675068
// prec, slfCl, clsTag, spBefore, id, bndId spAfter,tag1, tag2, clTag2,sac slfCl2, endOpenTag
50685069
// Convert the markers that were included by addBindingMarkers in template output, to appropriate DOM annotations:
50695070
// data-jsv attributes (for element-only content) or script marker nodes (within phrasing or flow content).
@@ -7098,7 +7099,7 @@ $tags({
70987099
if (!contextOb) {
70997100
// Get the path for the preceding object (context object) of handler (which is the last arg), compile function
71007101
// to return that context object, and run compiled function against data
7101-
contextOb = /^(.*)[\.^][\w$]+$/.exec(tagCtx.params.args.slice(-params.length - 1)[0]);
7102+
contextOb = /^(.*)[.^][\w$]+$/.exec(tagCtx.params.args.slice(-params.length - 1)[0]);
71027103
contextOb = contextOb && $sub.tmplFn(delimOpenChar1 + ":" + contextOb[1] + delimCloseChar0, view.tmpl, true)(linkCtx.data, view);
71037104
}
71047105

0 commit comments

Comments
 (0)